L13 - 1 ECS 154B Computer Architecture II Winter 2008 Data...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 ECS 154B Computer Architecture II Winter 2008 Data and Control Hazards 6.5 6.6 Adapted from slides by Mary Jane Irwin, Penn State 2 Load Use Hazards Require Stalls No forwarding can help Requires a Hazard Detection Unit Detects hazards Inserts pipeline bubble A L U IM Reg DM Reg lw $4, 16($5) add $8, $4 , $7 A L U IM Reg DM Reg nop 3 Stalling The Pipeline Stalls occur by inserting pipeline bubble Hold some state registers (stage repeats) Allow other stages to continue processing A L U IM Reg DM Reg lw $4, 16($5) add $8, $4 , $7 A L U IM Reg DM Reg add becomes nop A L U IM Reg DM Reg Repeats 4 Stalling The Pipeline Load Use Hazard code lw $4, 16($5) add $8, $4, $7 A L U IM Reg DM Reg add lw 2 5 Stalling The Pipeline Load Use Hazard code lw $4, 16($5) add $8, $4, $7 A L U IM Reg DM Reg add lw Hazard Detected 6 Stalling The Pipeline Load Use Hazard code lw $4, 16($5) add $8, $4, $7 IM Reg DM Reg add lw nop Bubble Inserted Stage Repeated 7 Stalling The Pipeline Load Use Hazard code lw $4, 16($5) add $8, $4, $7 A L U IM Reg Reg add lw nop Data Forwarded 8 Stalling The Pipeline Load Use Hazard code lw $4, 16($5) add $8, $4, $7 A L U IM Reg DM add nop No Register Written 3 9 How To Stall The Pipeline Two ways to stall the pipeline Set control signals to safe values Change instruction Set control signals All control signals become 0 Only MemWrite and RegWrite need to be 0 Change the instruction Make destination register $0 MIPS nop = 0x00000000 ( sll $0, $0, 0 ) 10 How To Stall The Pipeline Read Address IM PC Write Data Read Addr 1 Read Addr 2...
View Full Document

This note was uploaded on 05/06/2008 for the course ECS 154b taught by Professor Krado during the Winter '08 term at UC Davis.

Page1 / 8

L13 - 1 ECS 154B Computer Architecture II Winter 2008 Data...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online