dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 472

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
DO
Example 3:
Explanation of Example:
Condition Codes Affected:
Restrictions: Refer to Section 10.4, “Pipeline Dependencies and Interlocks,” on page 10-26.
A-128
END
This example illustrates a DO loop with a REP loop nested within the DO loop. In this example, “cnt1”
values are fetched from memory; each value is left shifted by “cnt2” counts and is stored back in mem-
ory. The DO loop executes “cnt1” times while the ASL instruction inside the REP loop executes for a
number of times equal to “cnt1” × “cnt2.” The END label is located at the first instruction past the end
of the DO loop, as mentioned previously.
LF —
L
LF
15
14
*
Set when a DO loop is in progress
Set if data limiting occurred
DO
MOVE.W
REP
ASL
MOVE.W
13
*
12
*
MR
DSP56800E Core Reference Manual
Start Hardware DO Loop
11
*
#cnt1,END
X:(R0),A
#cnt2
A
A,X:(R0)+
:
10
*
I1
9
I0
8
; begin DO loop
; nested REP loop
; repeat this instruction
; last instruction in DO loop
; (outside DO loop)
SZ
7
6
L
5
E
U
4
CCR
N
3
2
Z
Freescale Semiconductor
V
1
C
0
DO

Related parts for dsp56800e