cs3330-chap4-pipeline-2

cs3330-chap4-pipeline-2 - 1 Situations that prevent...

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 Situations that prevent starting the next instruction in the next cycle Structure hazards Hazards A required resource is busy Data hazard Need to wait for previous instruction to complete its data read/write Control hazard CS/ECE 3330 Fall 2009 Deciding on control action depends on previous instruction 38 Conflict for use of a resource In MIPS pipeline with a single memory Load/store requires data access Structure Hazards Instruction fetch would have to stall for that cycle Would cause a pipeline bubble Hence, pipelined datapaths require separate instruction/data memories Or separate instruction/data caches CS/ECE 3330 Fall 2009 39 2 An instruction depends on completion of data access by a previous instruction add $s0 , $t0, $t1 sub $t2 $s0 $t3 Data Hazards sub $t2, $s0 , $t3 CS/ECE 3330 Fall 2009 40 Think about which pipeline stage generates or uses a value Data Hazards IF ID EX MEM WB IF ID EX MEM WB IF ID EX MEM WB add $s0, $t0, $t1 sub $t2, $s0, $t3 lw $s0, 20($t1) CS/ECE 3330 Fall 2009 41 sw $t3, 12($t0) IF ID EX MEM WB 3 Use result when it is computed Dont wait for it to be stored in a register Requires extra connections in the datapath Forwarding (aka Bypassing) CS/ECE 3330 Fall 2009 42 Cant always avoid stalls by forwarding...
View Full Document

Page1 / 15

cs3330-chap4-pipeline-2 - 1 Situations that prevent...

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