ele74907datahazards - ELE 749 Lecture 07: Overcoming Data...

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

View Full Document Right Arrow Icon
HU L07 Overcoming Data Hazards page.1 ELE 749 Lecture 07: Overcoming Data Hazards Ali Ziya Alkar ELE749 Computer Organization and Design [Adapted from Computer Organization and Design , Patterson & Hennessy, © 2005, UCB]
Background image of page 1

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

View Full DocumentRight Arrow Icon
HU L07 Overcoming Data Hazards page.2 Review: MIPS Pipeline Data and Control Paths Read Address Instruction Memory Add PC 4 Write Data Read Addr 1 Read Addr 2 Write Addr Register File Read Data 1 Read Data 2 16 32 ALU Shift left 2 Add Data Memory Address Write Data Read Data IF/ID Sign Extend ID/EX MEM/WB EX/MEM Control ALU cntrl RegWrite MemWrite MemRead MemtoReg RegDst ALUOp ALUSrc Branch PCSrc
Background image of page 2
HU L07 Overcoming Data Hazards page.3 Control Settings EX Stage MEM Stage WB Stage Reg Dst ALU Op1 ALU Op0 ALU Src Brch Mem Read Mem Write Reg Write Mem toReg R 110000 0 1 0 lw 000101 0 1 1 sw X00100 1 0 X beq X01010 0 0 X
Background image of page 3

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

View Full DocumentRight Arrow Icon
HU L07 Overcoming Data Hazards page.4 Review: One Way to “Fix” a Data Hazard stall stall add $1 , ALU IM Reg DM Reg sub $4, $1 ,$5 and $6,$7, $1 IM Reg DM Reg IM Reg DM Reg Fix data hazard by waiting – stall – but impacts CPI I n s t r. O r d e r
Background image of page 4
HU L07 Overcoming Data Hazards page.5 Review: Another Way to “Fix” a Data Hazard I n s t r. O r d e r add $1 , ALU IM Reg DM Reg sub $4, $1 ,$5 and $6,$7, $1 IM Reg DM Reg IM Reg DM Reg Fix data hazards by forwarding results as soon as they are available to where they are needed sw $4,4( $1 ) or $8, $1 , $1 IM Reg DM Reg IM Reg DM Reg
Background image of page 5

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

View Full DocumentRight Arrow Icon
HU L07 Overcoming Data Hazards page.6 Data Forwarding (aka Bypassing) ± Take the result from the earliest point that it exists in any of the pipeline state registers and forward it to the functional units (e.g., the ALU) that need it that cycle ± For ALU functional unit: the inputs can come from any pipeline register rather than just from ID/EX by z adding multiplexors to the inputs of the ALU z connecting the Rd write data in EX/MEM or MEM/WB to either (or both) of the EX’s stage Rs and Rt ALU mux inputs z adding the proper control hardware to control the new muxes ± Other functional units may need similar forwarding logic (e.g., the DM) ± With forwarding can achieve a CPI of 1 even in the presence of data dependencies
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/25/2011 for the course ELECTRONIC 749 taught by Professor Aliziyaalkar during the Spring '11 term at Hacettepe Üniversitesi.

Page1 / 21

ele74907datahazards - ELE 749 Lecture 07: Overcoming Data...

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

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