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: Joerg Wunsch
Subject: Re: [Simulavr-devel] modification of AVR simulator for SCA
Date: Thu, 18 Feb 2016 09:12:25 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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.
-- 
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)



reply via email to

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