XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-9
V2.1, 2008-08
CPUSV2_X, V2.2
Figure 4-3
Program Memory Section for Correctly Predicted Flow
4.2.3
Incorrectly Predicted Instruction Flow
If the CPU detects that the IFU made an incorrect prediction of the instruction flow, then
the pipeline stages and the Instruction FIFO containing the wrong prefetched instructions
are canceled. The entire instruction fetch is restarted at the correct point of the program.
shows the restarted execution of instructions, assuming a 0-waitstate program
memory.
shows the corresponding program memory section.
During the cycle T
n
, the CPU detects an incorrectly prediction case which leads to a
canceling of the pipeline. The new address is transferred to the PMU in T
n+1
which
delivers the first data in the next cycle T
n+2
. But, the target instruction crosses the 64-bit
memory boundary and a second fetch in T
n+3
is required to get the entire 32-bit
instruction. In T
n+4
, the Prefetch Buffer contains two 32-bit instructions while the first
instruction I
m
is directly forwarded to the Decode stage.
The prefetcher is now restarted and prefetches further instructions. In T
n+5
, the
instruction I
m+1
is forwarded from the Fetch Instruction Buffer directly to the Decode
stage as well. The Fetch row shows all instructions in the Fetch Instruction Buffer and
the instructions fetched from the Instruction FIFO. The instruction I
m+3
is the first
instruction fetched from the FIFO during T
n+6
. During the same cycle, instruction I
m+2
was
still forwarded from the Fetch Instruction Buffer to the Decode stage.
MCA04918
I
n+21
I
n+21
I
n+20
I
n+20
I
n+19
I
n+18
I
n+17
I
n+16
I
n+16
I
n+15
I
n+15
I
n+14
I
n+14
I
n+13
I
n+12
I
n+12
I
n+11
I
n+11
I
n+10
I
n+10
I
n+9
I
n+8
I
n+7
I
n+6
I
a+40
I
a+32
I
a+24
I
a+16
I
a+8
I
a