Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following C code fragment that is executed on the 5 stage Pipelined MIPS architecture for (i=1; i x[i] = x[i] + y[i]; Provide

Consider the following C code fragment that is executed on the 5 stage Pipelined MIPS architecture

for (i=1; i

x[i] = x[i] + y[i];

Provide an equivalent MIPS assembly code fragment. Assume a. $s0 and $s1 hold the pointers to the start of the x and y arrays, respectively, and b. the index i is kept in $t0. Comment the lines.

2, Show how the instructions are scheduled on the pipeline including any stalls (you extend the diagram with as many columns as needed). Assume the branch is resolved in the ID stage with no branch prediction. How many cycles on average does one execution of the loop take?image text in transcribed

3. Now unroll the loop 4 times and reschedule the instructions to minimize the stalls. Also assume now delayed branches are used. Try to fill delay slots with useful instructions. What is the average number of cycles spent per iteration of the unrolled code?.

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

what is a peer Group? Importance?

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago