Comp206 Lecture8
Comp206 Lecture8
The Processor
• Data hazard
Need to wait for previous instruction to complete its data
• Control hazard
Deciding on control action depends on previous instruction
Structure Hazards
• Conflict for use of a resource
• In MIPS pipeline with a single memory
Load/store requires data access
Instruction fetch would have to stall for that cycle
Would cause a pipeline “bubble”
• In MIPS pipeline
Prediction
correct
• Subject to hazards
Structure, data, control
WB
data
hazards
Right-to-left
flow leads to
hazards
Pipeline registers
• Add registers to hold data so that portions of a single datapath
can be shared during instruction execution
Holds information produced in previous cycle