retagged by
279 views
0 votes
0 votes

What is the total number of Read after Write (RAW), Write after Read (WAR) and Write after Write (WAW) dependencies, respectively in the following assembly program?

$\begin{array}{|l|l|l|} \hline \text{Add } R5, R0, R1; & R5 \leftarrow R0+R1 \\ \hline \text{Sub } R0, R2, R5; & R0 \leftarrow R2 – R5 \\ \hline \text{MUL } R3, R2, R0; & R3 \leftarrow R2 ^* R0 \\ \hline \text{OR } R5, R0, R4; & R5 \leftarrow R0 \text{ or } R4 \\ \hline \text{Store } R6, \ U & U \leftarrow R6 \\ \hline \end{array}$

  1. $2,1,3$
  2. $3,1,2$
  3. $1,2,3$
  4. $3,2,1$
retagged by

1 Answer

Best answer
1 votes
1 votes
1. Add   R5 , R0 ,R1 ;     R5 <--- R0 + R1
 2. Sub    R0, R2, R5;       R0 <--- R2 - R5
3.  MUL  R3, R2, R0 ;   R3 <--- R2 * R0
4.  OR      R5, R0, R4 ;  R5 <--- R0 or R4
 5. Store   R6, U ;   U <---- R6

RAW 1&2 2&3 1&3

WAR 1&2 2&4

WAW 1&4

selected by
Answer:

Related questions

0 votes
0 votes
2 answers
2
Bikram asked May 27, 2017
357 views
Consider a $5$ stage instruction pipeline which can implement the $4$ instructions $I1, \ I2, \ I3, \ I4$. Below table gives the number of clocks required per instruction...