Question: Assume the below datapath figure (no forwarding or hazard detection unit). Assume writing to the registers at the first half of the cycle and reading

 Assume the below datapath figure (no forwarding or hazard detection unit).

Assume the below datapath figure (no forwarding or hazard detection unit). Assume writing to the registers at the first half of the cycle and reading is at the second half is possible. Any hazards must be resolved by inserting nops. Assume the following code: a. (5pts) What are the hazard types in this code? Give an example for each from this code. b. (8pts) Considering the above datapath, show hazard sources on the code and rewrite the code inserting minimum number of nops to resolve any hazards. c. (Spts) Write down the hazard in the code that cannot be resolved without stalling even we use forwarding unit. d. (5pts) Write down the hazard in the code that cannot be resolved without flushing even we use

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 Databases Questions!