Question: LDUR X 1 3 , [ X 1 6 , # 4 ] LDUR X 1 0 , [ X 1 5 , # 1

LDUR X13,[X16, #4]
LDUR X10,[X15, #12]
ADD X11, X15, X14
ADD X12, X10, X14
SUB X15, X13, X14
Suppose we modify the pipeline so that it has only one memory (that handles both instructions and data) and no forwarding or hazard detection units. In this case, there will be a structural hazard. To guarantee
forward progress, this hazard must always be resolved in favor of the instruction that accesses data.
a) Draw a pipeline diagram to show where the above code will stall.
b) In general, is it possible to reduce the number of stalls/NOPs resulting from this structural hazard by reordering code?
c) Data hazards can be eliminated by adding NOPs to the code. Can you do the same with this structural hazard? If so, explain how. If not, explain why not.
LDUR X 1 3 , [ X 1 6 , # 4 ] LDUR X 1 0 , [ X 1 5

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!