R01UH0822EJ0100 Rev.1.00
Page 70 of 1041
Jul 31, 2019
RX13T Group
2. CPU
2.8.2.3
Pipeline Basic Operation
In the ideal pipeline processing, each stage is executed in one cycle, though all instructions may not be pipelined in due
to the processing in each stage and the branch execution.
The CPU controls the pipeline stage with the IF stage in the unit of instructions, while the D and subsequent stages in the
unit of micro-operations.
The figures below show the pipeline processing of typical cases.
Note:
mop: Micro-operation, stall: Pipeline stall
(1) Pipeline Flow with Stalls
Figure 2.16
When an Instruction which Requires Multiple Cycles is Executed in the E Stage
Figure 2.17
When an Instruction which Requires more than One Cycle for its Operand Access is Executed
Figure 2.18
When a Branch Instruction is Executed (an Unconditional Branch Instruction is Executed or
the Condition is Satisfied for a Conditional Branch Instruction)
Figure 2.19
When the Subsequent Instruction Uses an Operand Read from the Memory
IF
DIV R1, R2
ADD R3, R4
D
E
E
E
WB
IF
D
stall
E
WB
stall
IF
stall
E
WB
D
stall
ADD R5, R6
(mop) div
(mop) add
(mop) add
IF
MOV [R1], R2
MOV [R3], R4
D
E
M
M
WB
IF
D
E
M
WB
stall
IF
D
WB
E
stall
ADD R5, R6
M
stall
stall
Other than no-wait
memory access
(mop) load
(mop) load
(mop) add
IF
D
E
Branch
instruction
Branch instruction is executed
IF
D
E
WB
Branch penalty
2 cycles
(mop) jump
IF
D
E
MOV [R2], R1
M
WB
IF
D
stall
E
WB
ADD R2, R1
Bypass process
(mop) load
(mop) add