Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem #6 (Loop Unrolling) Unroll the loop two times and then draw a pipeline diagram for the following code executed on a 2- issue processor

image text in transcribed
Problem #6 (Loop Unrolling) Unroll the loop two times and then draw a pipeline 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. This code computes the dot product of two arrays pointed by $1 and $2 Loop: lw $5, 0($1) : Load element from first array lw $6, 0($2) ; Load element from second array mult $7, S5, S6 ; Multiply elements add $4, S4, $7 ; Add elements to accumulator in $4, initially $4 is zero addi $1, $1, #4 ; Increment pointers addi $2, $2, #4 addi $3, $3, #-1 ; Decrement element count, $3 contains the length of the array bne $3, $0, Loop ; Continue until all elements done

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

Analyze the impact of labor unions on health care.

Answered: 1 week ago

Question

Assess three motivational theories as they apply to health care.

Answered: 1 week ago

Question

Discuss the history of U.S. labor unions.

Answered: 1 week ago