5,258 views
2 votes
2 votes
Consider the following instructions.
I​ 1​ : R​ 1​ = 100
I​ 2​ : R​ 1​ = R​ 2​ + R​ 4
I​ 3​ : R​ 2​ = R​ 4​ + 25
I​ 4​ : R​ 4​ = R​ 1​ + R​ 3
I​ 5​ : R​ 1​ = R​ 1​ + 30
Calculate sum of (WAR, RAW and WAW) dependencies the above instructions.

(a) 10
(c) 6
(b) 12
(d) 8

3 Answers

1 votes
1 votes

 

L1: R1 = 100

L2: R1 = R2 + R4

L3: R2 = R4 - 25

L4: R4 = R1 + R3

L5: R1 = R1 + 30

 

RAW WAR WAW
L2 – L4 L2 – L3 L1-L2
L2 – L5 L2 -  L4 L2-L5
L1 – L4 L3 -  L4 L1-L5
L1 – L5 L4 – L5  

SUM = 11

Question 16.4. Computer Organization and Architecture Designing for Performance Tenth Edition William Stallings 

Related questions

1 votes
1 votes
1 answer
1
Tuhin Dutta asked Dec 3, 2017
2,071 views
J1: R1 = 100J2: R1 = R2 + R4J3: R2 = R4 + 25J4: R4 = R1 + R3J5: R1 = R1 + 30Give the no of RAW, WAR and WAW hazards
2 votes
2 votes
1 answer
3
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...
2 votes
2 votes
2 answers
4