How many cycles are required to complete these four instructions with forwarding?
lw $s0, 4($t1)
add $s0, $s0, $s1
sw $s0, 4($t1)
addi $t1, $t1, 4
The correct answer is 9 but I can't find out why and I keep coming to the conclusion of 10. I think you have to stall once in the second and third instruction but that results in 10. Why is it 9? Can someone tell me where the stalls are to make it 9 and how?
I meant to be more informative. Stall the register phase once in the second instruction so the value from the execution phase of the first can be forwarded. Same situation for the second and third instruction. It's wrong though and I don't know why.
Be the first to answer this question.