Question: The following code is executed on the five - stage pipelined MIPS we studied in class. lw $ 1 , 4 0 ( $ 6

The following code is executed on the five-stage pipelined MIPS we studied in class. lw $1,40($6) add $2, $3, $1 add $1, $6, $4 sw $2,20($4) and $1, $1, $4(a) Assume that there are no forwarding and no hazard detection (no stalling mechanism). Insert nops to ensure correct execution. (b) Assume no forwarding and no hazard detection as in (a). Use nops only when a hazard cannot be avoided by rearranging these instructions. Use register R7 to hold temporary values in your modified code, if necessary. (c) If the processor has forwarding, but we forgot to implement the hazard detection unit, what occurs when this unmodified code executes?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!