XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-14
V2.1, 2008-08
CPUSV2_X, V2.2
However, if a GPR is used for indirect addressing the address pointer (i.e. the GPR) will
be required already in the DECODE stage. In this case the instruction is stalled in the
address stage until the operation in the ALU is executed and the result is forwarded to
the address stage.
Conflict_GPRs_Pointer_Stall:
I
n
ADD R0,R1 ;Compute new value for R0
I
n+1
MOV R3,[R0] ;Use R0 as address pointer
I
n+2
ADD R6,R0
I
n+3
ADD R6,R1
I
n+4
...
Table 4-5
Pipeline Dependencies Using GPRs as Pointers (Stall)
Stage
T
n
T
n+1
T
n+2
1)
1) New value of R0 not yet available.
T
n+3
2)
2) R0 forwarded from EXECUTE to ADDRESS (next cycle).
T
n+4
T
n+5
DECODE
I
n
= ADD
R0, R1
I
n+1
= MOV
R3, [R0]
I
n+2
I
n+2
I
n+2
I
n+3
ADDRESS
I
n-1
I
n
= ADD
R0, R1
I
n+1
= MOV
R3, [R0]
I
n+1
= MOV
R3, [R0]
I
n+1
= MOV
R3, [
R0
]
I
n+2
MEMORY
I
n-2
I
n-1
I
n
= ADD
R0, R1
–
–
I
n+1
= MOV
R3, [R0]
EXECUTE
I
n-3
I
n-2
I
n-1
I
n
= ADD
R0
, R1
–
–
WR.BACK
I
n-4
I
n-3
I
n-2
I
n-1
I
n
= ADD
R0, R1
–