Professional Documents
Culture Documents
Pipelined Design
Pipeline hazards
Control Hazard
Control Hazards
1 BZ R1, 18
2 MOV R2, R3
3 MOV R1, R2
branch instruction)
R1=0 evaluated,
and PC set to 20
Branch instructions
IF
DR
DF
WB
IF
DR
DF
WB
IF
DR
DF
WB
IF
DR
DF
20 MOV R5, R6
WB
Instruction fetched
from target address
Sol 2:
Solution 1: stall
The instructions after the branch are stalled, until the
branch condition is checked and target address is
generated
Sol. 3a
Sol.3b
Sol.4
Micro-architecture solution
ISA solution
Branch prediction
9
11
Pipelining Cautions
12
13
Parallelism in CPUs
Pipelined CPUs
Superscalar
IF
ID
IF
ID
STALL STALL
MEM
WB
MEM
14
15
Superscalar CPUs
4-Way Superscalar
IF
ID
MEM
IF
ID
MEM
WB
WB
WB
16
VLIW CPUs
17
4-way VLIW
IF
ID
MEM
WB
MEM
WB
18
19