1,097 views
3 votes
3 votes
R1 <- R1+R2

R2 <- R3*R4

R3 <- R4-R1

R2 <- R3+R4

Can someone point out hazards. Thanks :)

2 Answers

0 votes
0 votes
RAW hazard in in I3 instruction.

RAW and WAW hazard takes place in I4 instruction.
0 votes
0 votes

RAW Dependency - 2

I-3 on I-1

I-4 on I-3

WAR Dependency - 2

I-3 on I-2

I-2 on I-1

I-4 on I-1

WAW Dependency - 1

I-4 on I-2

After seeing and solving lots of questions on this topic i would like to share what i found ,

RAW are only between adjecent instruction 

ex- R0← R1+R2

R0← R1+R0

R1← R0 + R2

here RAW is on only valid between I-3 and I-2 not in I-3 and I-1

whereas WAR are not only between adjacent instruction .

not sure about WAW for now i am taking WAW only between adjacent instruction

edited by

Related questions

0 votes
0 votes
1 answer
1
2 votes
2 votes
1 answer
3
Mk Utkarsh asked Oct 23, 2018
2,175 views
Consider the below instructions executed on a 5 stage(IF,ID,EX,MA,WB) RISC pipeline with operand forwarding.I1: ADD R0,R1,R2 (R0=R1+R2)I2: SUB R3,R0,R2I3:MUL R4,R3,R0I4:D...
0 votes
0 votes
0 answers
4
Na462 asked Nov 14, 2018
731 views