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 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 CI? Why? runs

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_2

Step: 3

blur-text-image_3

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

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions

Question

Challenges Facing Todays Organizations?

Answered: 1 week ago