LPMARK Rules

7.8.3.1.2 Active SAn Register

“Active SAn register” is defined as the SAn register where n = the active loop index. This definition is dynamic and follows the SC140 loop state machine.

7.8.3.1.3 Active LCn Register

“Active LCn register” is defined as the LCn register where n = the active loop index. This definition is dynamic and follows the SC140 loop state machine.

7.8.3.2 Loop Nesting Rules

LPMARK Rule L.N.5

At least one LFn status bit in SR must be set at LPA or LPB of a loop.

Example 7-91. LFn Enabled at LPA or LPB

dosetup1 label1

 

doen1

#5

;pop clears all LFn

pop sr

 

...

 

 

label1

{lpmarkb set}

;not allowed

nop

nop

 

 

nop

 

 

7.8.3.3 Loop LA Rules

LPMARK Rule L.L.1

The following instructions are not allowed at LPB+1 or LPB+2 of a long loop:

COF instructions

STOP and WAIT

DI

DEBUG

Example 7-92. Instructions at the End of Long Loops

move.w #count2,d6 dosetup0 label2 doen0 d6

move.w #1,d1 move.w #2,d2 move.w #3,d3 move.w #4,d4

label2 inc d1

 

inc d2

{lpmarkb set}

inc

d3

inc

d4

;not allowed

wait

SC140 DSP Core Reference Manual

7-53

Page 303
Image 303
Freescale Semiconductor SC140 specifications Loop Nesting Rules, Loop LA Rules