Freescale Semiconductor SC140 Do Enable Short Loop AGU DOENSHn, Doensh2 d0, DOENSHn #u6

Models: SC140

1 760
Download 760 pages 48.94 Kb
Page 473
Image 473

 

 

 

 

DOENSHn

 

 

 

DOENSHn

Do Enable Short Loop (AGU) DOENSHn

Operation

 

Assembler Syntax

#u6 → LCn;

1 → LFn;

1 → SLF

DOENSHn #u6 {0 u6 < 64}

#u16 → LCn;

1 → LFn;

1 → SLF

DOENSHn #u16 {0 u16 < 216}

DR → LCn;

1 → LFn;

1 → SLF

DOENSHn DR

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.

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.

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.

SR[31]

SLF

Sets short loopflag.

Example

doensh2 d0

Register/Memory Address

D0

LC2

BeforeAfter

$00 0000 000F

$0000 000F

SC140 DSP Core Reference Manual

A-159

Page 473
Image 473
Freescale Semiconductor SC140 Do Enable Short Loop AGU DOENSHn, Doensh2 d0, DOENSHn #u6, DOENSHn #u16, DOENSHn DR