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

Consider two different implementations, M1 and M2, of the same instruction set.

ID: 3631394 • Letter: C

Question

Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. M1 has a clock rate of 80 MHz and M2 has a clock rate of 100 MHz. The average number of cycles for each instruction class and their frequencies (for a typical program) are as follows:
Instruction Class Machine M1 Machine M2 Frequency
Cycles/Instruction
Frequency
A 1 2 60%
B 2 3 30%
C 4 4 10%

(a) Calculate the average CPI for each machine, M1, and M2.








(b) Calculate the average MIPS ratings for each machine, M1 and M2.





(c) Which machine has a smaller MIPS rating? Which individual instruction class CPI do you need to change, and by how much, to have this machine have the same or better performance as the machine with the higher MIPS rating (you can only change the CPI for one of the instruction classes on the slower machine)?

Explanation / Answer

(a) The average CPI for M1 = 0.6 x 1 + 0.3 x 2 + 0.1 x 4 = 1.6 The average CPI for M2 = 0.6 x 2 + 0.3 x 3 + 0.1 x 4 = 2.5 (b) The average MIPS rate is calculated as: Clock Rate/ averageCPI x 10^6 The average MIPS ratings for M1 = 80 / 1.6 x 10^6 = 50 x 10^6 The average MIPS ratings for M2 = 100 / 2.5 x 10^6 = 40 x 10^6 c) Machine M2 has a smaller MIPS rating Changing instruction set A from 2 to 1 The CPI will be increased to 1.9 (1*.6+3*.3+4*.1) and hence MIPS Rating will now be (100/1.9)*10^6 =52.6*10^6.