CONTD

 

 

 

 

CONTD

Continue to Next Loop Iteration

CONTD

 

 

 

Using a Delay Slot (AGU)

 

Operation

 

Assembler Syntax

 

If LCn > 1, then SAn → PC, LCn-1 → LCn CONTD label

 

 

else PC + displacement → PC

 

0

→ LFn,

 

 

0

→ LCn

 

 

Description

CONTD label

Continues the active loop n from the start address of the loop (SAn) if its loop counter (LCn) is greater than one. Otherwise, it clears the active loop flag (LFn), and branches to an address determined by a 16-bit signed displacement [–216≤ displacement < 216,W] added to the PC. In either case, the active loop counter is decremented by one, and the execution set immediately following the execution set containing the CONTD is executed. Some programming rules apply to the use of this instruction. If no loops are enabled, this instruction is undefined.

Status and Conditions that Affect Instruction

Register Address

Bit Name

Description

SR[30:27]

LF[3:0]

Read loop flags to determine active loop.

Status and Conditions Changed by Instruction

Register Address Bit Name Description

SR[30:27]

LF[3:0]

Clear active loop flag if the active loop counter is less than or equal to

 

 

one.

Example contd lbl3

Instruction

Result

dosetup strt0

; defines start address for loop 0

doen0 #$10

; activates loop 0 with a count of 16

loopstart0

; assembler directive defining starting address SA

strt0 mac d0,d1,d2

; DALU instruction at start address

add d5,d6,d7

 

contd lbl3

; PC returns to strt0 until LC = 1

inc d1

; executes in the delay slot each time, PC jumps to lbl3 when LC = 1

nop

 

nop

 

SC140 DSP Core Reference Manual

A-135

Page 449
Image 449
Freescale Semiconductor SC140 specifications Contd label