Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Sim problems, AGAIN.

2004-01-02 by Wagner Lipnharski

----- Original Message -----
From: "David VanHorn" <dvanhorn@cedar.net>
> Even more fun, I put an extra NOP in the main loop, with the main routines
enabled.
> What would you guess?
>
> I start the clock at reset, and let it run till I hit panic.
>
> Without the NOP, 55074 uS every time.
> With the NOP, 34594uS every time.
> Two nops, 38609, every time.
>
> I'm not seeing a pattern here.

Of course this is a software bug.   It should be related to some internal
counter, pointer or something like that.
It is going beyond from where expected.
Instead of two nops, include a dummy 4 bytes (2 words) instruction, like a
LDS   (LDS R2,$0000), the resulting count should be the same as the two
nops.  Try to include 3, 4, 5, 6 nops and make sure about the count error.
I guess you will have always error count between $8000 and $FFFF. For some
reason, some routine at the simulator is using an integer signed or
something like that, and it blew pointers as positive or negative carry
bits.  That would be quick for debug, if having the sim source code... that
is.
I guess the sim *must* have some setup that could be changed, buffers
expanded, or something like that, unfortunately not for us poor mortals.
Try to contact the manufacturer with this data you already gattered.

wagner

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.