Define arithmetic pipelining. Explain pipelining hazards with examples.
Pipelining is a technique where multiple instructions are overlapped during execution. Pipeline is divided into stages and these stages are connected with one another to form a pipe like structure. Instructions enter from one end and exit from another end. There are two types of pipeline.
- Arithmetic Pipeline
- Instruction Pipeline
Pipeline hazards are situations that prevent the next instruction in the instruction stream from
Pipelining 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
- Control Hazards or instruction Hazards
- Structural Hazards.
Example:
A=3+A
B=A*4
For the above sequence, the second instruction needs the value of ‘A’ computed in the first instruction. Thus the second instruction is said to depend on the first. In this situation data hazards is arises. A data hazard is any condition in which either the source or the destination operands of an instruction are not available at the time expected in the pipeline.
Post a Comment