Question: Problem 2 ( Data Hazards, Chapter 4 ) This exercise examines the relationship among data forwarding, hazard detection, and ISA design. It uses the following
Problem Data Hazards, Chapter
This exercise examines the relationship among data forwarding, hazard detection, and ISA design. It uses the following instruction sequence and assumes that it is executed on a stage pipeline data path as described in Chapter Register writes are done in the first half, and register reads in the second half of the WB stage.A If there is no hardware data forwarding and hazard detection support, please insert nops to ensure correct execution of the code sequence above, and show your revised code sequence.B Assume we can rearrange the code to reduce the number of nops needed. Please show your improved code sequence with minimal number of nops needed.
C Assume there are data forwarding and hazard detection. For the optimized code in B in each cycle, please show which signals are asserted and their values by the hazard detection unit and the data forwarding unit in Figure in textbook shown below. The signals relevant here are PCWrite, IFIDWrite and IDEXZero which controls the MUX connected to the output of the control unit from the hazard detection unit; and ALUSel and ALUSel to those two input MUXes to ALU from the forwarding unit. The three possible values for ALUSel and ALUSel are: no forwardingforward ALU output from previous instruction or forward data value from the secondprevious instruction You only need to show the first cycles in the following table.
D If there is no data forwarding unit, what additional inputs and output signals do we need for the hazard detection unit in Figure to have a correct execution? Explain in detail why each of those additional signals is necded.
E For the new data hazard detection unit obtained from D and with no data forwarding unit ie ALUSell and ALUSel are not there specify which output signals it asserts in each of the first cycles during the execution of the code sequence in B Please use a time table similar to the one in C
Figure in Textbook
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
