









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
pipeline Hazards, the types, and examples to explain the concept of the Hazards , structural hazard , Data hazard , and control hazrad . how can we solve these hazards? the concept of forwarding and stalls
Typology: Slides
1 / 17
This page cannot be seen from the preview
Don't miss anything!










Advance Computer Architecture Nora Almotery
Pipeline Hazards Types Of Pipeline Hazards. Structural Hazards. Data Hazards. Control Hazards.
Arise from resource conflicts. HW cannot support all possible combinations of instructions Arise when an instruction depends on the results of a previous instruction Result from branch, other instructions that change flow of Program. Structural Hazards (^) Data Hazards Control Hazards
It can be generated by:
Why a designer allows structural hazard? To reduce cost (^) To reduce latency A machine with structural hazard will have lower CPI. realistic solution? Answer: Add more hardware.
Consider the execution of following instructions, on our pipelined example processor: ADD R1, R2, R SUB R4, R1, R AND R6, R1, R OR R8, R1, R XOR R10, R1, R Data hazards occur when the pipeline changes the order of read/write accesses to operands so that the order differs from the order seen by sequentially executing instructions on an un-pipelined machine
by a simple hardware technique called forwarding (also called bypassing or short-circuiting ) Unfortunately not all data hazards can be handled by forwarding. Consider the following sequence: LW R1, 0(R2) SUB R4, R1, R AND R6, R1, R OR R8, R1, R
When a branch is executed it may or it may not change the PC (to other value than its value + 4) Can cause a greater performance loss than the data hazards ▪ If a branch is changing the PC to its target address, then it is a taken branch ▪ If a branch doesn’t change the PC to its target address, then it is a not taken branch
Branch taken