in CO and Architecture edited by
1,694 views
1 vote
1 vote

​​​​​An instruction format has the following structure:

Instruction Number: Opcode destination reg, source reg-$1$, source reg-$2$
 

Consider the following sequence of instructions to be executed in a pipelined processor:

$\text{I 1: DIV R3, R1, R2}$

$\text{I 2: SUB R5, R3, R4}$

$\text{I 3: ADD R3, R5, R6}$

$\text{I 4: MUL R7, R3, R8}$

Which of the following statements is/are TRUE?

  1. There is a RAW dependency on $\text{R 3}$ between $\text{I 1}$ and $\text{I 2}$
  2. There is a WAR dependency on $\text{R 3}$ between $\text{I 1}$ and $\text{I 3}$
  3. There is a RAW dependency on $\text{R 3}$ between $\text{I 2}$ and $\text{I 3}$
  4. There is a WAW dependency on $\text{R 3}$ between $\text{I 3}$ and $\text{I 4}$
in CO and Architecture edited by
by
1.7k views

1 Answer

0 votes
0 votes

Video Explanation: GATE CSE 2024 - RAW Dependency, WAW Dependency, WAR Dependency

There is a RAW dependency on $R_3$ between $I_1$ and $I_2$.

There is a RAW dependency on $R_5$ between $I_2$ and $I_3$.

There is NO RAW dependency on $R_3$ between $I_2$ and $I_3$.

There is a WAW dependency on $R_3$ between $I_1$ and $I_3$.

So, answer will be: Only Option $A$ is correct. See HERE.

Answer:

Related questions