Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve for Part (b).I have provided question and solution both.Explain everystep clearly. Refer :Computer Architecture: A Quantitative Approach, 6th Edition, Hennessy and Patterson, Morgan

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Please solve for Part (b).I have provided question and solution both.Explain everystep clearly.

Refer :Computer Architecture: A Quantitative Approach, 6th Edition, Hennessy and Patterson, Morgan Kaufmann Publishers, Inc., 2019, ISBN: 978-0-12-811905-1.

Consider the following code sequence executing on the microarchitecture shown below. Assume that the ALUs can perform all arithmetic and branch operations, and that the centralized Reservation Station (RS) can dispatch at most one operation to each functional unit per cycle (i.e., one instruction to each ALU plus one instruction to LD/ST unit). If more than two ALU instructions can be dispatched, then instructions are dispatched in program order. Assume that dispatching instructions from RS to functional units requires one cycle and once instructions are in the function units they have the latencies shown on right. Also, assume functional unit results can be fully bypassed to subsequent instructions, i.e., when a result is available at cycle t, any instructions dependent on the result (and have all their operands available) can be dispatched at cycle t+1. All functional units are fully pipelined. (a) Suppose all of the instructions from the code sequence above are present in the RS without register renaming at cycle 0 . Indicate all the RAW, WAR, and WAW hazards and show how the RS should dispatch these instructions using a timing table similar to the one shown below. The first L.D instruction dispatched at cycle 1 is shown. The red arrows indicate RAW hazards, blue arrows indicate WAR hazards, and green arrows indicate WAW hazards. These dependencies force most of the instructions to be dispatched serially. The dispatch timing is shown below. (b) Now rewrite the code using register renaming. Assume the free list contains rename registers T0, T1, T2, T2, etc. Also, assume these registers can be used to rename both FP and integer registers. Suppose the code with registers renamed is resident in the RS at cycle 0 . Show how the RS should dispatch these instructions out-of-order to obtain the optimal performance. Solutions The difference between the code in part (a) and the code below is that all the WAR and WAW dependencies are eliminated. This allows dispatching of the two DADDIs, DSUB, and BNEZ earlier, which results in the following execution timing. It may appear that there is no improvement in performance, despite the fact that these instructions can be dispatched earlier. This is true when you only look at one iteration of this loop. However, when multiple iterations are executed, dispatching DADDIs, DSUB, and BNEZ earlier allows instructions from the next iteration to be dispatched earlier resulting in performance improvement

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_2

Step: 3

blur-text-image_3

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

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

6. What questions would you suggest should be included?

Answered: 1 week ago