retagged by
2,081 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.

retagged by

3 Answers

Best answer
1 votes
1 votes

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
3 votes
3 votes

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

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

0 votes
0 votes

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

Related questions

2 votes
2 votes
1 answer
1
Mk Utkarsh asked Oct 23, 2018
2,183 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
1 answer
3