Question: 5. ( 20 pts) Consider the following program: ori Ss7, s0, 2 Loop: add Stl, Ss3, Szero lw St0, 0(Sa0) add $t2, Stl, Sa0 sw
5. ( 20 pts) Consider the following program: ori Ss7, s0, 2 Loop: add Stl, Ss3, Szero lw St0, 0(Sa0) add $t2, Stl, Sa0 sw St0, 0(St1) sw St0, 4(Stl) addi Ss7, Ss7,-1 bne Ss7, Szero, Loop (a) How many instructions will be executed? ruction requires 4 cycles, each lw or sw instruction requires 5 cycles, and bne requires 3 C1? on cycles to complete. How many seconds will it take to run this program on a 1GHz Computer e know that in MIPS the offset in lw/sw instruction must be a constant. So it normally takes at least two instructions to load a word, one for calculating address. Assume that you want to add a new instruction called "Iwr" that can have a register offset, for example, Iwr St0, St1 (Sa0). If you use this new instruction in this program, it can perform the same operation as the 2nd and 3rd instructions together do. Suppose that the CPI is reduced by 5% after you replace the 2nd and 3rd instruction with this new instruction, and the clock rate needs to be reduced to 900 MHz. Is it beneficial to use this new instruction in this program for Computer C1? Why? (c) W (d) Another computer C2 with clock rate of 2.5GiHz has the same performance as computer CI when it runs this program. What is the average CPI of computer C2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
