Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 (Data Hazards, Chapter 4) This exercise examines the relationship among data forwarding, hazard detection, and ISA design. It uses the following instruction sequence

image text in transcribed

Problem 3 (Data Hazards, Chapter 4) 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 5-stage pipeline data path as described in Chapter 4 add r5, r2, rl lw r3, 4 (r5) lw r2, 0 (r) or swr3, 0 (r5) 2 r3, r5, r3 A. If there is no data forwarding or hazard detection, insert nops to ensure correct execution B. Assume we can insert nops only when a data hazard cannot be avoided by rearranging orary value in these instructions. You can assume register r7 can be used to hold the temp your modified code C. If the processor has data forwarding, but we forgot to implement the data hazard detection unit. Assume the initial value of r1 and r2 are 100; the initial value of r3 and r5 is 0; the initial value in the memory locations 100, 200 and 204 are 1. All other memory locations and registers have the initial value of 10. What are the values of r1, r2, r3, r5 after the execution? D. If there is data forwarding, for the first five cycles during the execution of the code sequence, specify which signals are asserted in each cycle by the hazard detection unit and the data forwarding unit describe in Figure 4.60 in the textbook shown below E. If there is no data forwarding unit, what new inputs and output signals do we need for the hazard detection unit in the figure above? Using this code sequence explain why each signal is needed. For the new data hazard detection unit obtained from (E), specify which output signals it asserts in each of the first five cycles during the execution of this code sequence. F. Problem 3 (Data Hazards, Chapter 4) 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 5-stage pipeline data path as described in Chapter 4 add r5, r2, rl lw r3, 4 (r5) lw r2, 0 (r) or swr3, 0 (r5) 2 r3, r5, r3 A. If there is no data forwarding or hazard detection, insert nops to ensure correct execution B. Assume we can insert nops only when a data hazard cannot be avoided by rearranging orary value in these instructions. You can assume register r7 can be used to hold the temp your modified code C. If the processor has data forwarding, but we forgot to implement the data hazard detection unit. Assume the initial value of r1 and r2 are 100; the initial value of r3 and r5 is 0; the initial value in the memory locations 100, 200 and 204 are 1. All other memory locations and registers have the initial value of 10. What are the values of r1, r2, r3, r5 after the execution? D. If there is data forwarding, for the first five cycles during the execution of the code sequence, specify which signals are asserted in each cycle by the hazard detection unit and the data forwarding unit describe in Figure 4.60 in the textbook shown below E. If there is no data forwarding unit, what new inputs and output signals do we need for the hazard detection unit in the figure above? Using this code sequence explain why each signal is needed. For the new data hazard detection unit obtained from (E), specify which output signals it asserts in each of the first five cycles during the execution of this code sequence. F

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions