Question: ( 2 0 points ) [ Structural Hazards ] Consider the fragment of MIPS assembly below: Suppose we modify the pipeline so that it has
pointsStructural Hazards
Consider the fragment of MIPS assembly below:
Suppose we modify the pipeline so that it has only one memory that handles both
instructions and data In this case, there will be a structural hazard every time a program
needs to fetch an instruction during the same cycle in which another instruction accesses
data.
a Draw a pipeline diagram to show where the code above will stall.
b In general, is it possible to reduce the number of stallsNOPs resulting from this structural
hazard by reordering code?
c Must this structural hazard be handled in hardware? We have seen that 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.
d Using the instruction mix from problem approximately how many stalls would you
expect this structural hazard to generate in a typical program?
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
