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

Consider two different implementations of the same instruction set architecture.

ID: 3741732 • Letter: C

Question

Consider two different implementations of the same instruction set architecture. The instructions can be divided into four classes according to their CPI (class A, B, C, and D). P1 has a clock rate of 2.5 GHz and P2 of 3 GHz. For a program with (dynamic) instruction count of 1012 instructions divided into classes as 10% class A, 20% class B, 50% class C, and 20% class D.

Class

CPI on P1 (@2.5 GHz)

CPI on P2 (@3GHz)

Instruction Frequency

A

1

2

10%

B

3

2

20%

C

3

2

50%

D

4

4

20%

(a) What is the average CPI for each of the implementations?

(b) What is the execution time of the program for each of implementations?

Class

CPI on P1 (@2.5 GHz)

CPI on P2 (@3GHz)

Instruction Frequency

A

1

2

10%

B

3

2

20%

C

3

2

50%

D

4

4

20%

Explanation / Answer

a) To find the average CPI for each of the implementations follow the steps :

Class A : 1012 , Class B : 2 * 1012 , Class C : 5 * 1012 , class D: 2 * 1012

Time= Number of instruction * CPI/clockrate

Total time (P1) = (1012 + 2 * 1012 * 3 + 5 * 1012 * 3 + 4 * 1012 * 2) / (2.5 * 109)

= (1 + 6 + 15 + 8) 1012 / 2.5 * 109

= 12 * 103 s

CPI (P1) = 12 * 103 * 2.5 *109 / 1012 = 30

Total time (P2) = (1012 * 2 + 2 * 1012 * 2 + 5 * 1012 * 2 + 4 * 1012 * 2) / (3 * 109)

= (2 + 4 + 10 + 8) 1012 / 3 * 109

= 8 * 103 s

CPI (P2) = 8 * 103 * 3 *109 / 1012 = 24

b) Total time (P1) = (1012 + 2 * 1012 * 3 + 5 * 1012 * 3 + 4 * 1012 * 2)

= 30 * 1012

Total time (P2) = (1012 * 2 + 2 * 1012 * 2 + 5 * 1012 * 2 + 4 * 1012 * 2)

= (2 + 4 + 10 + 8) 1012

24 * 1012