retagged by
1,195 views
7 votes
7 votes

Consider the following code fragment:

Identify all data dependencies (potential data hazards) in the given code snippet within one loop iteration. Let the number of true data dependencies be $\mathrm{X}$, the number of anti-dependencies be $\mathrm{Y}, \&$ the number of output dependencies be $\text{Z}$.

What is $\mathrm{X}+2 \mathrm{Y}+3 \mathrm{Z}?$

retagged by

1 Answer

2 votes
2 votes

Finding ALL Data Dependencies in the Program: Finding RAW, WAW, WAR Dependencies

Pipeline Complete Playlist: GO Classes Pipeline Complete Course

$$
\mathrm{X}=3 ; \mathrm{Y}=2 ; \mathrm{Z}=1 \text {. }
$$
True Data Dependencies (within one loop iteration):

  • $\textsf{Register R1: I1 (LD) I2 (DADDI)}$
  • $\textsf{Register R1: I2 (DADDI) I3 (SD)}$
  • $\textsf{Register R4: I5 (DADDI) I6 (BNE)}$
edited by
Answer:

Related questions

852
views
2 answers
0 votes
Mk Utkarsh asked Oct 23, 2018
852 views
$I_1 : MUL \ \ \ \ \ R_1, R_2, R_3$ // $R_1 \leftarrow R_2 \times R_3$ ... R_6$I_4 : SUB \ \ \ \ \ R_4, R_4, R_1$ Sum of RAW, WAR and WAW dependencies is _____.
762
views
3 answers
7 votes
GO Classes asked Jan 21
762 views
Consider a processor with a branch-if-equal instruction that is $32$ bits long$\textsf{: BEQ R12, R11, X.}$ $6$ bits are used to encode the opcode, ... away (the number of instructions) from the $\textsf{BEQ}$ instruction could we reach?
1.4k
views
4 answers
1 votes
Markzuck asked Jan 9, 2019
1,420 views
Please clarify along with the names.