Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).
We are starting to use an ADSP 21161N Ez-Kit lite board but we have problems with the execution of the first code examples. We arrive to simulate them correctly but once they are loaded in the target we notice that program counter is increased in a strange way (sometimes it jumps more than one position without an explanation) so some instructions are not executed. What may cause this problem? Thanks for your help.
On Tue, 27 Jun 2006, horacio_devega wrote:
> We are starting to use an ADSP 21161N Ez-Kit lite board but we have
> problems with the execution of the first code examples.
>
> We arrive to simulate them correctly but once they are loaded in the
> target we notice that program counter is increased in a strange way
> (sometimes it jumps more than one position without an explanation) so
> some instructions are not executed.
>
> What may cause this problem?
>
> Thanks for your help.
The program steps probably are being executed. What you are seeing is the
hardware break halting 2 or 3 instructions after you expect. This is due
to the pipeline. there are several ways around this. One is to use
software breaks, the other is to put in 2 nop's at places you want to
break. for example:
r0 = dm(number);
test:r1 = r0+1;
nop;
nop;
Then set your breakpoint at test. When you break, the PC will be at
test+2, and you'll be able to tell if r1 was modified or not.
Patience, persistence, truth,
Dr. mike