Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( Loop unrolling and instruction reordering ) Given the code segment shown below, assume we use a conventional 5 - stage pipeline. Load - use


(Loop unrolling and instruction reordering) Given the code segment
shown below, assume we use a conventional 5-stage pipeline. Load-use would
cause 1-cycle pipeline stall, and branches are resolved at the instruction decode
stage. Registers St0 ~ St9 are for temporal use. Please answer the following
questions.
Loop: lw. $to,0($s1)
addu $t0, St0, $s2
SW $t0,0($s1)
add $s1, $s1,-4
bne $s1, Szero, Loop
(a)(4 pts) Without loop unrolling and instruction reordering, how many
needed to execute four iterations?
(b)(16 pts) With loop unrolling that unrolls the loop four times and instruction
reordering, how many cycles are required to execute fous iterations?

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

Computer Architecture A Quantitative Approach

Authors: John L. Hennessy, David A. Patterson

6th Edition

0128119055, 978-0128119051

More Books

Students also viewed these Programming questions

Question

2. Use different groups for different subjects.

Answered: 1 week ago