Question: Problem 4 : Performance & Pipelining ( 2 5 points ) Given an integer array A in memory with the base address stored in register

Problem 4: Performance & Pipelining (25 points)
Given an integer array A in memory with the base address stored in register $s1, the following
MIPS code is executed. Register $s0 contains the variable b. Assume that register $s2 is used for
output. The content of array A is {0,1,5,7,9,11,6,3,7,2} where A[0]?=0 and A[9]=2. The
variable b=5.
addi $t0,$s1,20
1oop: 1w $t1,0($t0)
beg $t1,$s0, L1
addi $t0,$t0,-4
bne $t0,$s1,100 p
L1: add $s2, $zero, $zero
beg $t0,$s1, exit
addi. $ s2, $zero, 1
exit:
a)[6 points] Describe in one sentence what this code does.
b)[3 points] What is the final value in $s2?
c) points
 Problem 4: Performance & Pipelining (25 points) Given an integer array

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!