Question: Assume that the following code is executed on a 5 - stage pipelined datapath: add $ 5 , $ 2 , $ 1 lw $

Assume that the following code is executed on a
5-stage pipelined datapath:
add $5,$2,$1
lw $3,4($5)
lw $2,0($2)
or $3,$5,$3
sw $3,0($5) Q1. If there is no forwarding or hazard
detection, insert nops to ensure correct
execution. (Note that you need to insert the
bubbles using nops.) Q2. Repeat the above question but now use
nops only when a hazard cannot be avoided by changing or rearranging these instructions. You
can assume register $7 can be used to hold
temporary values in your modified code. (Note
that whenever bubbles are required, you need to
insert nops.)

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 Databases Questions!