Question: P 1 . Problems in this exercise refer to the following sequence of instructions, and assume that it is executed on a five - stage

P1.
Problems in this exercise refer to the following sequence of instructions, and assume that it is
executed on a five-stage pipelined data path:
add $s3, $s1, $s0
lw $s2,4($s3)
lw $s1,0($s4)
or $s2, $s3, $s2
sw $s2,0($s3)
a) If there is no forwarding or hazard detection, insert NOPS/bubble to ensure correct execution.
b) Now, change and/or rearrange the code to minimize the number of NOPs/bubbles needed. You
can assume register $t0 can be used to hold temporary values in your modified code.

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!