Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[20pts. 2- Consider the following code assuming the pipeline latencies shown below and a 1-cycle delay branch that is resolved in the ID stage. In

image text in transcribed

[20pts. 2- Consider the following code assuming the pipeline latencies shown below and a 1-cycle delay branch that is resolved in the ID stage. In addition, the pipeline uses MEM-to-ID forwarding to forward the result of an ALU operation from the MEM stage to the ID stage. ; C code for (i=100;i>0;i=i1) x[i]=x[i]+10 ; MIPS code loop: L.D F0, 0(R1);F0=array element ADD.D F4,FO,F2 ; Add scalar constant S.D 0(R1),F4; Store result DADDIU R1, R1, \#-8 ; Decrement array ptr. BNEZ R1, R2, loop ; Branch if R1!=R2 Latencies of FP operations (a) Show how this loop would execute without any scheduling. Maximize the performance of this code by applying both instruction reordering (also known as pipeline scheduling) and delay branch techniques. Ignoring the startup delays and assuming the loop executes 100 times, determine the number of cycles required to execute the code before and after the optimizations. Do not be concerned about what happens after the loop. (b) Unroll the loop three times (i.e., make four copies) to schedule it without stalls and show the instruction schedule. Again, determine the number of cycles required to execute the code before and after unrolling with scheduling

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

The Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions

Question

3. Identify challenges to good listening and their remedies

Answered: 1 week ago

Question

4. Identify ethical factors in the listening process

Answered: 1 week ago