Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. (20 pts) Consider the following program: ADD XO, X31, X31 ADDI X7, X31, #2 Loop: ADD X1, X3, X31 LDUR XO, [X1, #0] SUB

image text in transcribed

7. (20 pts) Consider the following program: ADD XO, X31, X31 ADDI X7, X31, #2 Loop: ADD X1, X3, X31 LDUR XO, [X1, #0] SUB X2, X1, XO STUR X2, [X1, #8] STUR X2, [X1, #16] SUBI X7, X7, #1 CBNZ X7, Loop (a) How many instructions will be executed? (Hint: you can find the number of iterations from the 3 instructions in bold) (b) Assume that ALU instruction requires 3 cycles, each LDUR or STUR instruction requires 5 cycles, and CBNZ requires 2 instruction cycles to complete. How many seconds will it take to run this program on a 2 GHz Computer C1? (c) Another computer C2 with clock rate of 3GHz has the same performance as computer C1 when it runs this program. What is the average CPI of computer C2? (d) We know that in LEGv8 the offset in LDUR/STUR instruction must be a constant. So it normally takes at least two instructions to load a doubleword, one for calculating address. Assume that you want to add a new instruction called LDURR that can have a register offset, for example, LDURR XO, [X1, X2]. If you use this new instruction in this program, it can perform the same operation as the 3rd and 4th instructions together do. Suppose that the CPI is reduced by 5% after you replace the 3rd and 4th instruction with this new instruction, and the clock rate needs to be reduced to 1.5 GHz. Is it beneficial to use this new instruction in this program for Computer C1? Why

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

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago