Consider the following loop. Loop: lw $t0, 0($t1) and $s6, $s2, $t0 lw $t9, 0($s6) lw $t8, 0($s6) beq $t8, $t9, loop Assume that perfect branch prediction is used (no stalls due to control hazards), that there are no delay slots, and that the pipeline has full forwarding support. Also, assume that many iterations of this loop are executed before the loop exits. Show a pipeline execution diagram for the third iteration of this loop, from the cycle in which we fetch the first instruction of that iteration up to (but not including) the cycle in which we can fetch the first instruction of the next iteration. Show all instructions that are in the pipeline during the cycles (not just the third iteration).
Consider the following loop.
Loop: lw $t0, 0($t1)
and $s6, $s2, $t0
lw $t9, 0($s6)
lw $t8, 0($s6)
beq $t8, $t9, loop
Assume that perfect branch prediction is used (no stalls due to control hazards), that there are no delay slots, and that the pipeline has full forwarding support. Also, assume that many iterations of this loop are executed before the loop exits.
Show a pipeline execution diagram for the third iteration of this loop, from the cycle in which we fetch the first instruction of that iteration up to (but not including) the cycle in which we can fetch the first instruction of the next iteration. Show all instructions that are in the pipeline during the cycles (not just the third iteration).
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images