13.L11 Pipelining
13.L11 Pipelining
13.L11 Pipelining
1
Outline
Overview of Pipelining
A Pipelined Data Path
2
Designing Efficient Processors
3
The Notion of Pipelining
4
Pipelined Processors
inst 5 inst 4 inst 3 inst 2 inst 1
6
Design of a Pipeline
Splitting the Data Path
We divide the data path into 5 parts : IF, OF, EX,
MA, and RW
Timing
We insert latches (registers) between
consecutive stages
4 Latches → IF-OF, OF-EX, EX-MA, and MA-RW
At the negative edge of a clock, an instruction
moves from one stage to the next
7
Pipelined Data Path with Latches
Latches
8
The Instruction Packet
What travels between stages ?
ANSWER : the instruction packet
Instruction Packet
Instruction contents
Program counter
All intermediate results
Control signals
Every instruction moves with its entire state, no
interference between instructions
9
Outline
Overview of Pipelining
A Pipelined Data Path
10
IF Stage
instruction
11
OF Stage
instruction
Control
Immediate and unit
branch target
12
EX Stage
aluSignals
flags
0 1 isBeq
Branch
isRet ALU unit isBgt
branchPC ?ags
isUBranch
isBranchTaken
13
MA Stage
pc aluResult op2 instruction control EX-MA
mar mdr
isLd
Data memory Memory
unit
isSt
14
RW Stage
4 isLd
10 01 00 isCall isWb
E
rd
0
Register
E enable A file
1
data ra(15) D
A address
D data
15
1
pc + 4 0
pc Instruction instruction
memory
pc instruction
1 0 1 0 isSt
isRet Control
reg
Immediate and Register unit
file data
branch target
op2 op1
isWb
immx isImmediate
1 0
aluSignals
flags
0 1 isBeq
Branch
isRet ALU unit isBgt
isUBranch
isBranchTaken
pc aluResult op2 instruction control
mar mdr
isLd
Data
Memory
memory unit
isSt
4 isLd
isWb
10 01 00 isCall
rd
0
ra(15) 1
data
16
Abridged Diagram
Data
ALU
memory
op2 Unit
Instruction Register
memory file op1
17