beautypg.com

Doenn, Do enable long loop (agu), Description – Freescale Semiconductor StarCore SC140 User Manual

Page 471: Status and conditions that affect instruction, Operation assembler syntax

background image

DOENn

SC140 DSP Core Reference Manual

A-157

DOENn

DO Enable Long Loop (AGU)

DOENn

Description

This instruction initializes the selected loop as a long loop by loading the iteration count into the respective
loop counter and setting the respective loop flag in the SR. After this instruction is executed, the loop
becomes active. There can be other instructions between this instruction and the actual body of the loop. If
the loop is nested, the DOEN instruction must be placed inside the enclosing loop in order to re-activate
the inner loop each iteration. Various programming rules apply concerning the minimum distance between
this instruction and the loop body or other loop instructions.

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Example

doen2 d0

Operation

Assembler Syntax

#u6

→ LCn; 1 → LFn

DOENn #u6 {0

≤ u6 < 64}

#u16

→ LCn; 1 → LFn

DOENn #u16 {0

≤ u16 < 2

16

}

DR

→ LCn; 1 → LFn

DOENn DR

DOENn #u6

Moves an unsigned 6-bit immediate value into the loop counter (LCn) and enables the chosen loop flag.

DOENn #u16

Moves an unsigned 16-bit immediate value into the loop counter (LCn) and enables the chosen loop flag.

DOENn DR

Moves the 32 lower bits of data or address register into the loop counter (LCn) and enables the chosen loop
flag.

Register Address

Bit Name

Description

SR[30:27]

LF[3:0]

Sets active loopflag.

Register/Memory Address

Before

After

D0

$00 0000 000F

LC2

$0000 000F

SR

$00E4 0000

$20E4 0000