Motorola DSP56800 Manual page 304

16-bit digital signal processor
Table of Contents

Advertisement

DO
Note:
The assembler calculates the end-of-loop address to be loaded into LA by evaluating the end-of-loop
"expr" and subtracting one. This is done to accommodate the case in which the last word in the DO
loop is a two-word instruction. Thus, the end-of-loop expression "expr" in the source code must rep-
resent the address of the instruction after the last instruction in the loop.
Note:
The LF is cleared by a hardware reset.
Note:
Due to pipelining, if an address register (R0–R3, SP, or M01) is changed using a move-type instruction
(LEA, Tcc, MOVE, MOVEC, MOVEP, or parallel move), the new contents of the destination address
register will not be available for use during the following instruction (that is, there is a single instruc-
tion cycle pipeline delay). This restriction also applies to the situation in which the last instruction in
a DO loop changes an address register and the first instruction at the top of the DO loop uses that same
address register. The top instruction becomes the following instruction due to the loop construct.
Note:
If the A or B accumulator is specified as a source operand, and the data from the accumulator indicates
that extension is used, the value to be loaded into the LC register will be limited to a 16-bit maximum
positive or negative saturation constant. If positive saturation occurs, the limiter places $7FFF onto the
bus, and the lower 13 bits of this value are all ones. The thirteen ones are loaded into the LC register
as the maximum unsigned positive loop count allows. If negative saturation occurs, the limiter places
$8000 onto the bus, and the lower 13 bits of this value are all zeros. The thirteen zeros are loaded into
the LC register, specifying a loop count of zero. The A and B accumulators remain unchanged.
Note:
If LC is zero upon entering the DO loop, the loop is executed 2
technique outlined in Section 8.6, "Loops," on page 8-20.
Condition Codes Affected:
15
14
LF
*
A-74
Start Hardware Do Loop
MR
13
12
11
10
9
*
*
*
*
I1
LF —
Set when a DO loop is in progress
L
Set if data limiting occurred
DSP56800 Family Manual
13
CCR
8
7
6
5
4
3
L
I0
SZ
E
U
N
times. To avoid this, use the software
2
1
0
Z
V
C
DO

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents