Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem #3 How would the following loop be scheduled on a static 2-issue pipeline for MIPS (where one of the instructions can be integer ALU

image text in transcribed

Problem #3 How would the following loop be scheduled on a static 2-issue pipeline for MIPS (where one of the instructions can be integer ALU or branch and the other can be load or storc)? Reorder the instructions to avoid as many pipeline stalls as possible and unroll the loop two times. Assume branches are predicted, so that control hazards are handled by the hardware. Compute the IPC for the code too ; This code add a scalar constant to each element of the array pointed by $sl Loop: lw $t0, 0(Ss1) addu t0, $t0, $s2 sw St0, 0(Ss1) addi $s1,$s1,#-4 bne $s, $zero, Loop;Continue until Ssl !-0 ; Load clement from array ; Add a scalar in $s2 ; Store result ; Decrement pointer Problem #3 How would the following loop be scheduled on a static 2-issue pipeline for MIPS (where one of the instructions can be integer ALU or branch and the other can be load or storc)? Reorder the instructions to avoid as many pipeline stalls as possible and unroll the loop two times. Assume branches are predicted, so that control hazards are handled by the hardware. Compute the IPC for the code too ; This code add a scalar constant to each element of the array pointed by $sl Loop: lw $t0, 0(Ss1) addu t0, $t0, $s2 sw St0, 0(Ss1) addi $s1,$s1,#-4 bne $s, $zero, Loop;Continue until Ssl !-0 ; Load clement from array ; Add a scalar in $s2 ; Store result ; Decrement pointer

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

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

What is the profitability index? When it is used?

Answered: 1 week ago

Question

What is quality of work life ?

Answered: 1 week ago

Question

What is meant by Career Planning and development ?

Answered: 1 week ago

Question

What are Fringe Benefits ? List out some.

Answered: 1 week ago