Instruction Overview
7-16
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
The
LOOP
,
LOOP_BEGIN
,
LOOP_END
syntax is generally more readable and
user friendly. The
LSETUP
syntax contains the same information, but in a
more compact form.
If
LCn
is nonzero when the fetch address equals
LBn
, the processor decre-
ments
LCn
and places the address in
LTn
into the
PC
. The loop always
executes once through because
Loop_Count
is evaluated at the end of the
loop.
There are two special cases for small loop count values. A value of 0 in
Loop_Count
causes the hardware loop mechanism to neither decrement or
loopback, causing the instructions enclosed by the loop pointers to be exe-
cuted as straight-line code. A value of 1 in
Loop_Count
causes the hardware
loop mechanism to decrement only (not loopback), also causing the
instructions enclosed by the loop pointers to be executed as straight-line
code.
In the instruction syntax, the designation of the loop counter–
LC0
or
LC1
–
determines which loop level is initialized. Consequently, to initialize
Loop0
, code
LC0
; to initialize
Loop1
, code
LC1
.
In the case of nested loops that end on the same instruction, the processor
requires
Loop0
to describe the outer loop and
Loop1
to describe the inner
loop. The user is responsible for meeting this requirement.
For example, if
LB0=LB1
, then the processor assumes loop 1 is the inner
loop and loop 0 the outer loop.
Just like entries in any other register, loop register entries can be saved and
restored. If nesting beyond two loop levels is required, the user can explic-
itly save the outermost loop register values, re-use the registers for an inner
loop, and then restore the outermost loop values before terminating the
inner loop. In such a case, remember that loop 0 must always be outside of
loop 1. Alternately, the user can implement the outermost loop in soft-
ware with the Conditional Jump structure.
Содержание ADSP-BF53x Blackfin
Страница 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 780: ...Product Identification Register 21 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 994: ...Instructions Listed By Operation Code C 194 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...