8/28/2006 1
CS425 – Computer System Design Lecture 10 – Pipelining Hazards
Shankar Balachandran
- Dept. of Computer Science and Engineering
CS425 Computer System Design Lecture 10 Pipelining Hazards - - PowerPoint PPT Presentation
CS425 Computer System Design Lecture 10 Pipelining Hazards Shankar Balachandran Dept. of Computer Science and Engineering IIT-Madras shankar@cse.iitm.ernet.in 8/28/2006 1 2 Recap 8/28/2006 3 Hennessey and Patterson Reference
8/28/2006 1
2 8/28/2006
3 8/28/2006
4 8/28/2006
5 8/28/2006
I n s t r. O r d e r
ALU IF Reg Dm Reg ALU
IF Reg Dm Reg
ALU IF Reg Dm Reg Dm Reg Reg ALU IF
Structural Hazard
6 8/28/2006
7 8/28/2006
I n s t r. O r d e r
ALU IF Reg Dm Reg ALU
IF Reg Dm Reg
ALU IF Reg Dm Reg ALU Dm Reg Reg IF
Bubble Bubble BubbleBubble Bubble
8 8/28/2006
9 8/28/2006
ALU IF Reg Dm Reg ALU
IF Reg Dm Reg
ALU IF Reg Dm Reg ALU Dm Reg Reg
IF
ALU Dm Reg Reg
IF
10 8/28/2006
11 8/28/2006
12 8/28/2006
13 8/28/2006
ALU IF Reg Dm Reg ALU
IF Reg Dm Reg
ALU IF Reg Dm Reg ALU Dm Reg Reg
IF
ALU Dm Reg Reg
IF
14 8/28/2006
MEM/WR ID/EX EX/MEM Data Memory
ALU
mux mux Registers
NextPC Immediate
mux
15 8/28/2006
ALU IF Reg Dm Reg ALU
IF Reg Dm Reg
ALU IF Reg Dm Reg ALU Dm Reg Reg
IF
16 8/28/2006
ALU
IF Reg Dm Reg IF Reg
ALU
Dm Reg Bubble IF Reg
ALU
Dm Reg Bubble IF Reg
ALU
Dm Reg Bubble
17 8/28/2006
Slow code: LW Rb,b LW Rc,c ADD Ra,Rb,Rc SW a,Ra LW Re,e LW Rf,f SUB Rd,Re,Rf SW d,Rd
Fast code: LW Rb,b LW Rc,c LW Re,e ADD Ra,Rb,Rc LW Rf,f SW a,Ra SUB Rd,Re,Rf SW d,Rd
18 8/28/2006
19 8/28/2006
Main Memory execution unit
control memory
CPU ADD SUB AND DATA . . . User program plus Data this can change!
mapped into one
Supported complex instructions a sequence of simple micro-inst (RTs) Pipelined micro-instruction processing, but very limited view. Could not reorganize macroinstructions to enable pipelining
20 8/28/2006
ALU IF Reg Dm Reg ALU
IF Reg Dm Reg
ALU IF Reg Dm Reg ALU Dm Reg Reg
IF
ALU Dm Reg Reg
IF 10: beq r1,r3,36 14: and r2,r3,r5 18: or r6,r1,r7 22: add r8,r1,r9 36: xor r10,r1,r11
21 8/28/2006