Data Hazards
Notes
- Consider
I1: ADD R1, x, x I2: ADD X, R1, x- Draw a pipeline diagram, Stage across the top, time on the left, instructions as the data
Time IF ID EX MEM WB 0 I1 1 I2 I1 3 I2 I1 4 I2 ☁ I1 5 I2 ☁ ☁ I1 6 I2 ☁ ☁ 7 I2 ☁ 8 I2 - Let's figure out where this can happen:
From P&H
- Where is data produced?
- Where is data consumed?
- What is the cross product of these two?
- What instructions would use each?
- Can we come up with examples of each?
- Draw a pipeline diagram, Stage across the top, time on the left, instructions as the data