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
stage pipelined datapath:
add $$$
lw $$
lw $$
or $$$
sw $$ Q If there is no forwarding or hazard
detection, insert nops to ensure correct
execution. Note that you need to insert the
bubbles using nops. Q 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 $ 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
