7-32
SC140 DSP Core Reference Manual
Static Programming Rules
Rule L.L.3
The following instructions are not allowed in a short loop:
•
COF instructions
•
STOP and WAIT
•
DI
•
DEBUG
•
DOENn/DOENSHn
•
MOVE-like instructions that read any LCn register
•
MOVE-like instructions that write any LCn register
•
MOVE-like instructions that read the SR register
•
MOVE-like instructions that write the SR register
This rule does not apply to other instructions that affect status bits in SR.
Example 7-56. Instructions in Short Loops
doensh0 #$10
nop
loopstart0
jmp end
;not allowed
loopend0
doensh1 #count2
move.w #num,d2
loopstart1
doen1 #5
;not allowed
loopend1
Rule L.L.4
The LA of a short loop cannot be at LA-1 of a long loop.
Example 7-57. Short Loop LA at the End of a Long Loop
dosetup0 label1
doen0 #count1
move.w #num,d1
nop
nop
loopstart0
nop
nop
label1 inc d1
doensh1 #count2
move.w #num1,d2
loopstart1
label2 inc d2
impyuu d1,d2,d3
;not allowed
loopend1
nop
loopend0
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: ......