simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] modification of AVR simulator for SCA


From: Thomas K
Subject: Re: [Simulavr-devel] modification of AVR simulator for SCA
Date: Sun, 21 Feb 2016 20:28:22 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

Hi Jörg,

attiny2313 is tricky, the "old" ones initialized the SP to 0 (datasheet 04/06), the attiny2313a (and attiny4313 also) initialized to RAMEND! (datasheet 11/09)

I've implemented it now for tiny2313 with RAMEND.

cu, Thomas


Am 18.02.2016 um 09:12 schrieb Joerg Wunsch:
As Albrecht Frenzel wrote:

Chapter 7.5.1 "SPH and SPL – Stack Pointer High and Stack Pointer
Low Register" of the atmega 48/88/168/328 says, that the initial
value of SP is RAMEND.
That's the case on all newer AVRs.

The distinction between the architectures that initialize SP in
hardware and those that don't is about the same where the three RC
oscillators have been replaced by a single one, plus a prescaler (and
the CKDIV8 fuse).  ATmega8, ATmega128, ATmega16, ATtiny2313,
AT90CAN128 start with SP = 0, ATmega1281, ATmega88, ATmega164,
ATtiny25 start with SP = RAMEND.

I think SimulAVR should correctly simulate this different behaviour.
Since the datasheet describes it, the user is allowed to rely on it.

Testing for 0 != SP_value only makes sense on instructions, that use
the content of SP.
I agree.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]