AnsweredAssumed Answered

Loop Sequencer

Question asked by max64 on Aug 23, 2012
Latest reply on Sep 5, 2012 by jeyanthi.jegadeesan

I am trying to use the loop sequencer on the ADSP 21469, with confusing results.

 

     lcntr=r2, do(pc,_end_inner-1) until lce;

     m4=dm(0,i2);

     r1=dm(m4,i3);

     r1=r1 xor r0, modify(i3,m3);

     dm(i2,m6)=r1;

     _end_inner:

 

I can't get the loop to iterate - i.e. it executes only once. Past the end of the loop, I can inspect LADDR, LCNTR and CURLCNTR in the debugger, and all are as expected, except that CURLCNTR is equal to LCNTR - 1.

 

Am I making some fundamental mistake?

 

Incidentally, I also tried this code snippet from the Compiler Manual for SHARC processors, with identical results:

 

lcntr = r3, do(pc, .P1L10-1)until lce;

.P1L9:

r4 = dm(i1, m6);

r2 = dm(i0, m6);

f12 = f2 * f4;

f10 = f10 + f12;

// end_loop .P1L9;

.P1L10:

Outcomes