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 $3, 64($4) addi $3, $3, #20 add $5, $2, $3 SW $5, 128($4) addi $4, $4, #4 bne $4, $7, Loop 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 $3, 64($4) addi $3, $3, #20 add $5, $2, $3 SW $5, 128($4) addi $4, $4, #4 bne $4, $7, Loop

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions