![Infineon Technologies XC2200 Скачать руководство пользователя страница 153](http://html1.mh-extra.com/html/infineon-technologies/xc2200/xc2200_user-manual_2055439153.webp)
XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-15
V2.1, 2008-08
CPUSV2_X, V2.2
To avoid these stalls, one multicycle instruction or two single cycle instructions may be
inserted. These instructions must not update the GPR used for indirect addressing.
Conflict_GPRs_Pointer_NoStall:
I
n
ADD R0,R1 ;Compute new value for R0
I
n+1
ADD R6,R0 ;R0 is not updated, just read
I
n+2
ADD R6,R1
I
n+3
MOV R3,[R0] ;Use R0 as address pointer
I
n+4
...
4.3.2
Pipeline Conflicts Using Indirect Addressing Modes
In the case of read accesses using indirect addressing modes, the Address Generation
Unit uses a speculative addressing mechanism. The read data path to one of the
different memory areas (DPRAM, DSRAM, etc.) is selected according to a history table
before the address is decoded. This history table has one entry for each of the GPRs.
The entries store the information of the last accessed memory area using the
corresponding GPR. In the case of an incorrect prediction of the memory area, the read
access must be restarted.
It is recommended that the GPRs used for indirect addressing always point to the same
memory area. If an updated GPR points to a different memory area, the next read
operation will access the wrong memory area. The read access must be repeated, which
leads to pipeline stalls.
Table 4-6
Pipeline Dependencies Using GPRs as Pointers (No Stall)
Stage
T
n
T
n+1
T
n+2
T
n+3
1)
1) R0 forwarded from EXECUTE to ADDRESS (next cycle).
T
n+4
T
n+5
DECODE
I
n
= ADD
R0, R1
I
n+1
= ADD
R6, R0
I
n+2
= ADD
R6, R1
I
n+3
= MOV
R3, [R0]
I
n+4
I
n+5
ADDRESS
I
n-1
I
n
= ADD
R0, R1
I
n+1
= ADD
R6, R0
I
n+2
= ADD
R6, R1
I
n+3
= MOV
R3, [
R0
]
I
n+4
MEMORY
I
n-2
I
n-1
I
n
= ADD
R0, R1
I
n+1
= ADD
R6, R0
I
n+2
= ADD
R6, R1
I
n+3
= MOV
R3, [R0]
EXECUTE
I
n-3
I
n-2
I
n-1
I
n
= ADD
R0
, R1
I
n+1
= ADD
R6, R0
I
n+2
= ADD
R6, R1
WR.BACK
I
n-4
I
n-3
I
n-2
I
n-1
I
n
= ADD
R0, R1
I
n+1
= ADD
R6, R0