Dependencies in a pipelined processor
There are mainly three types of dependencies possible in a pipelined processor. These are :
1) Structural Dependency
2) Control Dependency
3) Data Dependency
These dependencies may introduce stalls in the pipeline.
Stall : A stall is a cycle in the pipeline without new input.
Data Hazards
Data hazards occur when instructions that exhibit data dependence, modify data in different stages of a pipeline. Hazard cause delays in the pipeline. There are mainly three types of data hazards:
1) RAW (Read after Write) [Flow dependency]
2) WAR (Write after Read) [Anti-Data dependency]
3) WAW (Write after Write) [Output dependency]
Data hazards in Above question.
RAW |
WAR |
WAW |
I1-I2 (R1) |
I1-I2 (R2) |
I1-I4(R1) |
I1-I3(R1) |
I1-I3(R3) |
|
I2-I3(R2) |
I2-I3(R3) |
|
I2-I4(R2) |
I3-I4(R1) |
|
|
I2-I4(R1) |
|
ref: http://www.geeksforgeeks.org/computer-organization-and-architecture-pipelining-set-2-dependencies-and-data-hazard/