Pipeline 2
Pipeline 2
Pipelining
Chapter Four
of
The Book of David A. Patterson
Pipelined Datapath
✔ The 5 steps in instruction execution are:
1. Instruction Fetch & PC Increment (IF)
2. Instruction Decode and Register Read (ID)
3. Execution or calculate address (EX)
4. Memory access (MEM)
5. Write result into register (WB)
✔ Review: single-cycle processor
1. all 5 steps done in a single clock cycle
2. dedicated hardware required for each step
Review - Single-Cycle Datapath
“Steps”
ADD
4 ADD
PC <<2
Instruction I
ADDR RD
32 16 32
5 5 5
Instruction
Memory RN RN WN
1 2 RD Zero
Register File1 ALU
WD
RD M
2 U ADDR
X
Data
Memory RD M
E U
16 X 32 X
T WD
N
D
IF ID EX MEM WB
Instruction Fetch Instruction Decode Execute/ Address Calc. Memory Access Write Back
Pipelined Datapath
Pipeline registers wide enough to hold data coming in
AD
D
4 AD
64 bits 128 bits D
4 AD
D
PC <<2
Instruction I
ADDR RD
32 16 32
5 5 5
Instruction
Memory RN RN WN
1 2 RD
Register File1 AL
WD U
RD M
2 U ADDR
X
Data
Memory RD M
E U
1 X 3 X
6 T 2 WD
N
D
sw $t3, 20($t4) I RE AL D RE
M G U M G