10.5k views
3 votes
You are a designer of a new processor. You have to choose between two possible implementations (called M1 and M2) of the same architecture. a. Machine M1 has a clock rate of 2.8 GHz and the following characteristics:Instruction classes CPI (Clocks per instruction) for each Instruction classes Frequency A 1 40% B 3 25%C 3 25%D 5 10%Instruction classes CPI (Clocks per instruction) Frequency A 2 40%B 2 20% C 3 15%D 4 25%Required:a. What is the CPI for each machine? b. What are the native MIPS ratings for M1 and M2? c. Which machine has a better by the MIPS performance (by comparing their MIPS values) and by how much?

1 Answer

6 votes

Answer:

A ) CPI : M1 = 2.4 , M2 = 2.65

B ) MIPS : M1 = 1083, M2 = 1056

C ) The machine that has a better performance based on MIPS is M1 and this is by 27 million number of instructions per sec

Step-by-step explanation:

A) The CPI for each machine

CPI = ( Total number of execution cycles ) / ( instruction counter executed )

For Machine 1 ( M1 )

we have to make some assumptions : number of instructions = 10

number of times A was executed = 4 , Number of times B was executed = 2.5 , number of times C was executed = 2.5, Number of times D was executed = 1. and this was based on the frequency given above

hence CPI for M1 =[ ( 1 * 4 ) + ( 3 * 2.5 ) + ( 3 * 2.5 ) + ( 5 * 1 ) ] / 10

CPI for M1 = 2.4

For Machine 2 ( M2 )

we have to make some assumptions : number of instructions = 10

number of times A was executed = 4 , Number of times B was executed = 2. number of times C was executed = 1.5, Number of times D was executed = 2.5 times. and this was based on the frequency given above

Hence CPI for M1 = [ ( 2 * 4 ) + ( 2 * 2 ) + ( 3 * 1.5 ) + ( 4 * 2.5 ) ] / 10

CPI for M2 = 2.65

B ) Calculate the native MIPS ratings for M1 and M2

MIPS = ( instruction counts ) / ( Execution time * 10^6 )

For M1

Assumptions : number of instructions executed = 10

each clock cycle = 0.3846 * 10^-9. frequency = 2.6 Ghz

first we calculate the total execution time which is equal to :

= [ ( 1 * 4 ) + ( 3 * 2.5 ) + ( 3 * 2.5 ) + ( 5 * 1 ) ] * 0.3846 * 10 ^-9

= 9.2304 * 10 ^-9 secs

therefore the MIPS for M1

= 10 / ( 9.2304 * 10^-9 ) * 10^6 = 1083

For M2

Assumptions : number of instructions executed = 10

each clock cycle = 0.3846 * 10^-9. frequency = 2.8 Ghz

first we calculate the total execution time which is equal to :

= [ (2*4) + (2*2) + (3 * 1.5 ) + ( 4 * 2.5 ) ] * 0.3846 * 10^-9 = 9.4631 * 10^-9 secs

therefor the MIPS for M2

= 10 / ( 9.4631*10^-9) * 10^6 = 1056

C ) The machine that has a better performance based on MIPS is M1 and this is by 27 million number of instructions per sec

User Spencer Ruport
by
4.3k points