
DOENSHn
SC140 DSP Core Reference Manual A-159
DOENSHn Do Enable Short Loop (AGU) DOENSHn
Description
This instruction initializes the selected loop as a short loop by loading the iteration count to the respective
loop counter and setting the SLF and respective loop flag in the SR. After this instruction is executed, the
loop becomes active. There can be a distance between this instruction and the actual body of the loop. In
case the loop is nested, the DOENSH instruction must be placed inside the enveloping 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
doensh2 d0
Operation Assembler Syntax
#u6 → LCn; 1 → LFn; 1 → SLF
DOENSHn #u6 {0 ≤ u6 < 64}
#u16 → LCn; 1 → LFn; 1 → SLF
DOENSHn #u16 {0 ≤ u16 < 2
16
}
DR → LCn; 1 → LFn; 1 → SLF
DOENSHn DR
DOENSHn #u6
Moves an unsigned 6-bit immediate value into the loop counter (LCn) and enables the chosen loop flag and
short loop flag.
DOENSHn #u16
Moves an unsigned 16-bit immediate value into the loop counter (LCn) and enables the chosen loop flag
and short loop flag.
DOENSHn DR
Moves the 32 lower bits of a data or address register into the loop counter (LCn) and enables the chosen
loop flag and short loop flag.
Register Address Bit Name Description
SR[30:27] LF[3:0] Sets active loopflag.
SR[31] SLF Sets short loopflag.
Register/Memory Address Before After
D0
$00 0000 000F
LC2
$0000 000F
Comentários a estes Manuais