Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume that you are executing 1000 instructions. A multi-cycle machine is used s

ID: 3805752 • Letter: A

Question

Assume that you are executing 1000 instructions. A multi-cycle machine is used such that different instruction types may take a different number of clock cycles depending on the type of instruction. The instruction ratio and CPI per instruction is shown below:

a) What is the CPU execution time for this code?

b) Assume that you were able to create a more efficient multiplier that could complete the multiplication in half the time of the original—i.e. 5 clock cycles.

What is the speedup for the overall code?

TYPE percent in program CPI ADD/SUB 45 % 4 LOAD/Store 40 % 6 MULT 15 % 10

Explanation / Answer

1)

CPU execution time = No of instruction execution * Average CPI * CPU clock cycle


CPI = CPU clock cycle / Instruction count

Now we have number of instruction = 1000
CPI = (4+ 6+10)/3
= 20/3
= 6.668 {if we round off to 7)

CPI = CPU clock cycle / Instruction count
7 = CPU clock cycle/Instruction count
CPU clock cycle = 7* instruction count

CPU execution time = 1000 * 7 *7 *1000