in CO and Architecture retagged by
1,656 views
2 votes
2 votes

ADD R, R2, R2; 

ADD R3, R2, R1;

SUB R4, R1 , R5;

ADD R3, R3, R4;

FIND THE NUMBER OF READ AFTER WRITE(RAW) DEPENDENCIES IN THE ABOVE CODE.

in CO and Architecture retagged by
1.7k views

2 Comments

Will I be able to understand in this very birth, WHY RAW is checked in adjacent only.

SOMEBODY please clarify this.
0
0
:D

If you've finally understood please let me know. I am struggling with the same question.
0
0

3 Answers

1 vote
1 vote
Best answer

RAW dependency are those in which one instruction tries to read before its write operation and also they are occured only in adjacent instruction:

1.

ADD R1 , R2, R2; 

ADD R3, R2, R1;


2.

SUB R4, R1 , R5;

ADD R3, R3, R4;


 

total there are 2 (RAW) dpendecy..

edited by

4 Comments

No, this is not the right answer.

See this link

https://gateoverflow.in/29896/number-of-war-dependencies

2
2
completely wrong
0
0
someone should mark this answer as incorrect
0
0
3 votes
3 votes

4 RAW Dependencies.............

and they need not to be adjacent (its Made easy students myth)

1 comment

I have also faced huge confusion due to this myth
0
0
0 votes
0 votes

There are total 4 RAW dependencies … you have to add non adjacent cases also.

Related questions

0 votes
0 votes
1 answer
3