For this question, mark all answers that apply according to
the following MIPS pipeline diagram:
Consider executing the following code MIPS sequence:
A: andi $t1, $t0, 47
B: and $t3, $t2, $t1
C: andi $t4, $t0, 1541
D: sw $t4, 3276($t5)
E: xor $t0, $t5, $t2
F: lw $t1, 6356($t5)
This code is to be executed on a pipelined MIPS implementation
like that shown in the reference diagram.
Unless stated otherwise, assume value forwarding is not implemented.
Which of the following statements are true?
There is a true dependence (RAW) between instructions A and B
On $t1
There is an output dependence (WAW) between instructions D and F
Nope - don't write the same regs nor memory locations
Adding value forwarding to the pipeline would result in no pipeline bubbles for this code
Only lw is a problem forwarding doesn't fix
Without value forwarding,
the code would execute in less time if instruction C were moved to between A and B
Remember that dependence between A and B?
As written, instruction E couldn't move to before C, but it could if we renamed
register $t0 with $t6 in instruction E
Classic fix for WAR