1,342 views

4 Answers

2 votes
2 votes
RAW 5(I2-I3,I2-I4,I3-I4,I4-I5,I3-I6)

WAR 2(I1-I3,I3-I4)

WAW 1 (I2-I4)
1 votes
1 votes

Answer : D) 1 and 3

Anti Data Dependency is caused when Instruction ‘J’ tries to Write the data before Instruction ‘I’ Reads it (Write-Before-Read

So we need to find where (O/p register of Inst. ‘J’) == (I/p register of Inst. ‘I’). Anti data dependency can be non adjacent. 

Here, $(I3-I1)$ creates Anti Data Dependency because $I3$ writes $R1$ before $I1$, if $I3$ will execute before $I1$. 

Hence $1$  Anti Data Dependency. 

True Data Dependency is caused when Instruction ‘J’ tries to Read the data before Instruction ‘I’ Writes it (Read-Before-Write

So we need to find where (I/p register of Inst. ‘J’) == (O/p register of Inst. ‘I’). True data dependency is always adjacent data dependency. 

Here, $(I2-I3)$ creates True Data Dependency because $I3$ reads $R2$ before $I2$, if $I3$ will execute before $I2$. 

Here, $(I3-I4)$ creates True Data Dependency because $I4$ reads $R1$ before $I3$, if $I4$ will execute before $I3$. 

Here, $(I4-I5)$ creates True Data Dependency because $I5$ reads $R2$ before $I4$, if $I5$ will execute before $I4$. 

Hence $3$ True Data Dependency. 

 

0 votes
0 votes

True dependency(read before write) =3.

True dependency means output of instruction i is same as input of instruction of i+1.( \ )

so.i2 and i3,i3 and i4 and i4 and i5 are true dependency.

Anti dependency(write before read)=1.

anti dependency means input of instruction i is same as  output of i+1.( / )

 

0 votes
0 votes

RAW Dependency (True) - 5

I-3 on I-2

I-4 on I-2

I-5 on I-4

I-4 on I-3

I-6 on I-3

WAR Dependency (anti) - 2

I-3 on I-1

I-4 on I-3

WAW Dependency (output) - 1

I-4 on I-2

edited by

Related questions

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