Question: LDUR X 1 3 , [ X 1 6 , # 4 ] LDUR X 1 0 , [ X 1 5 , # 1
LDUR XX #
LDUR XX #
ADD X X X
ADD X X X
SUB X X X
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 stallsNOPs 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.
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
