dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 311

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
10.4.3.1
There are a few dependencies that occur when one is working with the DO, DOSLC, and REP hardware
looping mechanisms. In particular, a dependency occurs when the LC register is loaded prior to executing
one of the hardware looping instructions. Due to the architecture of the instruction pipeline, none of the
hardware looping instructions can be executed immediately after a value is placed in the LC register.
Example 10-9 shows a code sequence that has such a dependency.
LABEL
In the code sequence in Example 10-9, the value that is loaded into LC in the first instruction is not
available when it is needed by the DOSLC instruction: 2 more cycles are required before it is available in
the right place in the pipeline.
The solution to this problem is to insert instructions that require at least 2 cycles to execute between the
load of LC and the DOSLC instruction. If instructions are not inserted to correct this problem, the
assembler will insert as many NOP instructions as necessary to ensure that the code executes correctly.
Freescale Semiconductor
MOVE.W
MOVEU.W
MOVE.W
MOVEU.W
DOSLC
MOVE.W
ADD
Example 10-9. Dependency with Load of LC and Start of Hardware Loop
Dependencies with Hardware Looping
R2,X:(R1)+
X:(N)-,N
R5,X:(R5+N)
R0,LC
LABEL
X:(R3)+,X0
X0,B
Example 10-8. Instructions with No Stalls
; n1: Write to LC immediately followed by:
; n2: 3-cycle, 2-word DOSLC loop
; n3
; n4
Instruction Pipeline
; R2 stored with R1 post-update
; N loaded with N post-update
; R5 stored with no R5 post-update
Pipeline Dependencies and Interlocks
10-31

Related parts for dsp56800e