Single and Multi Cycle Pipelined Units
Single and Multi Cycle Pipelined Units
¤ Multi-Cycle/Pipelined Processor
n Intro
Recall: Simple Processor
¨ Fetch unit is involved in processing all instructions
¤ Program counter (PC) and instruction memory
R-type Instructions
¨ Instructions of the form
PC
AND $1,$2,$3
XOR $4,$2,$3
SUB $5,$1,$4
ADD $6,$1,$4
MUL $7,$5,$6
Time
Single-cycle RISC Architecture
¨ Example program
¤ CT=6ns; CPU Time = 5 x 6ns = 30ns
AND $1,$2,$3
How to improve?
XOR $4,$2,$3
SUB $5,$1,$4
ADD $6,$1,$4
MUL $7,$5,$6
Time
Reusing Idle Resources
¨ Each processing step finishes in a fraction of a cycle
¤ Idle resources can be reused for processing next
instructions
Write Back
PC
PC
AND $1,$2,$3
XOR $4,$2,$3
SUB $5,$1,$4
ADD $6,$1,$4
MUL $7,$5,$6
Time
Pipelined Architecture
¨ Example program
¤ CT=1.5ns; CPU Time = 9 x 1.5ns = 13.5ns
AND $1,$2,$3
XOR $4,$2,$3
SUB $5,$1,$4
ADD $6,$1,$4
MUL $7,$5,$6
Time