Pipeline Hazards (Computer Architecture/Organization)
Rajkumar Lama
August 20, 2019
CA
,
Computer Architecture
,
MICT 1st semester notes
,
Pipeline Hazards
,
Types of pipeline hazards
Pipeline hazards are situations that prevent the next instruction in the instruction stream from executing during its designated clock cycles. In another word, any condition that causes a stall in the pipeline operations can be called a hazard. There are mainly three types of hazards, they are:
Data Hazards
It arises when instructions depend on the result of previous instruction but the previous instruction is not available yet.
Structural Hazards:
They arise when there are resource conflicts that prevents hardware to execute simultaneous execution of instruction. For e.g. Lets say the hardware has a register file which has a limitation of only one read or write in a cycle. If there is an instruction that needs to read from this register file while another instruction needs to write to this register file, only one can execute because of conflict.
Control Hazards
These hazards arise as a result of any type of branch instruction. Till the branch is completely executed. The branch is completely executed, the stream of following instructions will not be known completely.
- Data Hazards
- Structural Hazards
- Control Hazards
Data Hazards
It arises when instructions depend on the result of previous instruction but the previous instruction is not available yet.
Structural Hazards:
They arise when there are resource conflicts that prevents hardware to execute simultaneous execution of instruction. For e.g. Lets say the hardware has a register file which has a limitation of only one read or write in a cycle. If there is an instruction that needs to read from this register file while another instruction needs to write to this register file, only one can execute because of conflict.
Control Hazards
These hazards arise as a result of any type of branch instruction. Till the branch is completely executed. The branch is completely executed, the stream of following instructions will not be known completely.