Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem #5 (Loop Unrolling) (a) What is loop unrolling and why it is used? What are the pros and cons of loop unrolling? (b) Unroll

image text in transcribed
Problem #5 (Loop Unrolling) (a) What is loop unrolling and why it is used? What are the pros and cons of loop unrolling? (b) Unroll the loop two times and then draw an instruction scheduling diagram for the following code executed on a 2-issue processor (where one of the instructions can be integer ALU or branch and the other can be load or store). Reorder the instructions to avoid as many pipeline stalls as possible to schedule the instructions in minimum number of clock cycles. Compute the IPC for the code too. Loop: lw $2,0($4) addi $2, $2, #10 lw $3, 64(84) addi $3, S3, #20 add $5, S2, S3 $5, 128($4) addi $4, S4, #4 bne $4, S7, Loop sw Problem #5 (Loop Unrolling) (a) What is loop unrolling and why it is used? What are the pros and cons of loop unrolling? (b) Unroll the loop two times and then draw an instruction scheduling diagram for the following code executed on a 2-issue processor (where one of the instructions can be integer ALU or branch and the other can be load or store). Reorder the instructions to avoid as many pipeline stalls as possible to schedule the instructions in minimum number of clock cycles. Compute the IPC for the code too. Loop: lw $2,0($4) addi $2, $2, #10 lw $3, 64(84) addi $3, S3, #20 add $5, S2, S3 $5, 128($4) addi $4, S4, #4 bne $4, S7, Loop sw

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

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions

Question

What is a nondevelopmental item (NDI)?

Answered: 1 week ago

Question

Identify conflict triggers in yourself and others

Answered: 1 week ago