DOENn

DOENn

DO Enable Long Loop (AGU)

DOENn

Operation

Assembler Syntax

#u6 → LCn; 1 → LFn

DOENn #u6 {0 u6 <

64}

#u16 → LCn; 1 → LFn

DOENn

#u16 {0 u16

< 216}

DR → LCn; 1 → LFn

DOENn

DR

 

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.

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.

Status and Conditions that Affect Instruction

None.

Status and Conditions Changed by Instruction

Register Address

Bit Name

Description

SR[30:27]

LF[3:0]

Sets active loopflag.

Example

doen2 d0

Register/Memory Address

D0

LC2

SR

Before

$00 0000 000F

$00E4 0000

After

$0000 000F

$20E4 0000

SC140 DSP Core Reference Manual

A-157

Page 471
Image 471
Freescale Semiconductor SC140 specifications Do Enable Long Loop AGU, Doen2 d0, DOENn #u6, DOENn #u16, DOENn DR