Skip to main content
edited tags
Link
umang
  • 99
  • 5
Source Link
umang
  • 99
  • 5

Read After Write(RAW) hazard

I am confused in finding RAW dependencies whether we have to find only in adjacent instructions or non-adjacent also.

consider the following assembly code

I1: ADD R1 , R2, R2;

I2: ADD R3, R2, R1;

I3: SUB R4, R1 , R5;

I4: ADD R3, R3, R4;

FIND THE NUMBER OF READ AFTER WRITE(RAW) DEPENDENCIES IN THE Above Code.

I am getting 2 dependency I2-I1 and I4-I3.