Data hazards occur when the order of access to operands is changed by the introduction of pipelining.
ADD R1, R2, R3 (R1:=R2+R3) SUB R4, R1, R5 (R4:=R1-R5)
Inst![]() |
||||||||||||||
ADD R1,R2,R3 | IF | ID | EX | MEM | WB | |||||||||
SUB R4,R1,R5 | IF | ID | EX | MEM | WB | |||||||||
Cycle | 1 | 2 | 3 | 4 | 5 | 6 | ||||||||
![]() |
||||||||||||||
![]() |