in CO and Architecture
1,116 views
3 votes
3 votes
R1 <- R1+R2

R2 <- R3*R4

R3 <- R4-R1

R2 <- R3+R4

Can someone point out hazards. Thanks :)
in CO and Architecture
1.1k views

4 Comments

raw hazard follow - inorder

war and waw  follow - out of order

try...
0
0

Ans is 2 RAW , 2 WAR and 1 WAW and didn't even show where hazards are -_-

I didn't get your point @Hradesh patel and which 2 RAW you pointed out? Probably @vishal chugh missed out that one. It would have been correct.

1
1
I found my mistake. There is RAW hazard in Instruction 3 for R1. So there are 2 RAW , 2 WAR and 1 WAW hazards.
0
0

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

2 Comments

You forgot I4-I1 WAR hazard
1
1
thanx, i will correct it with some explanation
1
1

Related questions

0 votes
0 votes
0 answers
4
Na462 asked in CO and Architecture Nov 14, 2018
758 views
Na462 asked in CO and Architecture Nov 14, 2018
by Na462
758 views