Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this homework, you will use the latter approach. Consider the following MIPS fragment: addi $t1 , $ ze r o ,N # N i

For this homework, you will use the latter approach. Consider the following MIPS fragment:

addi $t1 , $ ze r o ,N # N i s some positive immediate

add $t1 , $t1 , $ t 1

L2 : beq $t1 , $ zero , End

lw $s1 , 0 ( $ s2 )

sub $s1 , $s1 , $ t1

add $s1 , $s1 , $ s1

sw $s1 , 0 ( $ t 2 )

addi $t1 , $t1 ,1

j L2

End : lw $s1 , 0 ( $ s1 )

lw $s1 , 0 ( $ s1 )

lw $s1 , 0 ( $ s1 )

You are running this on a 4GHz CPU, which requires 1 CPI for R-type arithmetic instructions, 2 CPI for immediate arithmetic instructions, 3 CPI for jumps, 4 CPI for memory instructions, and 5 CPI for branches. 1. Determine an appropriate value of N for this fragment to run in as close to 50 s. as possible. 2. What is the largest delay possible using this code fragment (on our 32-bit MIPS)? For purposes of this problem, please assume that MIPS does not allow arithmetic overflows (even though this assumption isnt quite correct).

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

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions