dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 121

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
This register is not stacked by a DO instruction and not unstacked by end-of-loop processing, as is done on
other Freescale DSCs. Section 5.3, “Program Looping,” discusses what occurs when the loop count is zero.
See Section 8.6.4, “Nested Loops,” on page 8-22 for a discussion of nesting loops in software.
The upper three bits of this register will read as zero during DSC read operations and should be written as
zero to ensure future compatibility.
5.1.6
The loop address (LA) register indicates the location of the last instruction word in a hardware program
loop (DO loop only). When the instruction word at the address contained in this register is fetched, the LC
is checked. If it is not equal to one, the LC is decremented, and the next instruction is taken from the
address at the top of the system stack; otherwise the PC is incremented, the LF is restored with the value in
the OMR’s NL bit, one location from the Hardware Stack is purged, and instruction execution continues
with the instruction immediately after the loop.
The LA register is a read/write register written into by the DO instruction. The LA register can be directly
accessed by the MOVE instructions as well. This also allows for saving and restoring the LA to and from
the stack during the nesting of loops. This register is not stacked by a DO instruction and is not unstacked
by end-of-loop processing. See Section 8.6.4, “Nested Loops,” on page 8-22 for a discussion of nesting
loops in software.
Freescale Semiconductor
Loop Address
Used as a Source
Register LC Used
as a Destination
Register LC
Figure 5-3. Accessing the Loop Count Register (LC)
Reading the Loop Count Register
Writing the Loop Count Register
15
15
15
15
No Bits Present
No Bits Present
Zero Extension
Not Used
Program Controller
of LC
13 12
13 12
13 12
13 12
13 LSB of
13 LSB of
Contents
Word
Word
of LC
LC
LC
0
0
0
0
Architecture and Programming Model
Register LC
CGDB Bus Contents
CGDB Bus Contents
Register LC
AA0010
5-5

Related parts for dsp56800