Hardware Loops
SC140 DSP Core Reference Manual
5-31
The following is an example of a short loop in one execution set.
Example 5-15. Short Loop, One Execution Set
The following is an example of a nested loop.
Example 5-16. Nested Loop
In Example 5-16, the LPMARKA bit of loop 0 is set because the SKIPLS instruction can skip over the
LPMARKB bit of loop 0.
The assembler sets the appropriate LPMARK bits, adding a prefix word with the loopstart or loopend
information, if necessary. In disassembly, these LPMARK bits (if used) appear preceding the normal
disassembled mnemonics of the set.
doensh0#$10
...
loopstart0
mac
d0,d1,d2 move.w (r0)+,d0
loopend0
Loop body
LPMARKA
SA, LA
dosetup0
_start0
dosetup1
_start1
doen0
#$10
...
loopstart0
_start0
bmset
#$ff01,d0
doen1
d7
clr
d2
skipls
_end1
loopstart1
_start1
mac d0,d1,d2 move.w (r0)+,d0
add d5,d6,d4 move.w (r1)+,d5
sub d3,d2,d4 inc d5
mac d4,d5,d6 move.w (r0)+,d4
add d3,d4,d6 move.w (r1)+,d3
loopend1
_end1 inc
d0
loopend0
_end0
SA
LA
Loop body 0
SA
LA
loop 0
loop 0
loop 1
loop 1
LPMARKB
LPMARKB
loop 0
loop 1
LPMARKA
loop 0
Loop
body
1
Summary of Contents for SC140 DSP Core
Page 12: ...xii SC140 DSP Core Reference Manual ...
Page 18: ...xviii SC140 DSP Core Reference Manual ...
Page 32: ...1 6 SC140 DSP Core Reference Manual Core Architecture Features ...
Page 180: ...4 70 SC140 DSP Core Reference Manual Trace Unit Registers ...
Page 250: ...6 70 SC140 DSP Core Reference Manual Programming Rules ...
Page 314: ...7 64 SC140 DSP Core Reference Manual NOP Definition ...
Page 463: ...DI SC140 DSP Core Reference Manual A 149 15 8 7 0 DI 1 1 4 1 0 0 1 1 1 1 1 0 1 1 1 1 1 0 1 ...
Page 478: ...A 164 SC140 DSP Core Reference Manual EI ...
Page 618: ...A 304 SC140 DSP Core Reference Manual MOVES 4F s15 sssssssssssssss Signed 15 bit offset ...
Page 638: ...A 324 SC140 DSP Core Reference Manual MPYR ...
Page 746: ...A 432 SC140 DSP Core Reference Manual ZXTA x ...
Page 758: ...I 10 Index ...
Page 759: ...SC140 DSP Core Reference Manual i ...
Page 760: ......