Download presentation
Presentation is loading. Please wait.
Published bySudomo Tanudjaja Modified over 6 years ago
1
1.4.2 [5] <1.4> What is the global CPI for each implementation?
Consider two different implementations of the same instruction set architecture. There are four classes of instructions, A, B, C, and D. The clock rate and CPI of each implementation are given in the following table. 1.4.1 [10] <1.4> Given a program with 106 instructions divided into classes as follows: 10% class A, 20% class B, 50% class C, and 20% class D, which implementation is faster? 1.4.2 [5] <1.4> What is the global CPI for each implementation? 1.4.3 [5] <1.4> Find the clock cycles required in both cases. Processor Clock Rate CPI (class A) CPI (class B) CPI (class C) CPI (class D) P1 2.5 GHz 1 2 3 P2 3 GHz
2
Class A (10% of 106 instr.): 105 instr.
Solution 1.4.1 Class A (10% of 106 instr.): 105 instr. Class B (20% of 106 instr.): 2 × 105 instr. Class C(50% of 106 instr.): 5 × 105 instr. Class D(20% of 106 instr.): 2 × 105 instr. CPU-Time = AƩD(ICi x CPIi) x Clock Cycle Time = (IC x CPI)/Clock Rate Used for: 1. CPU-Time(P1) = ( × 105 × × 105 × × 105 × 3)/(2.5 × 109) = × 10−4 s CPU-Time(P2) = (105 × × 105 × × 105 × × 105 × 2)/(3 × 109) = 6.66 × 10−4 s Return
3
Global CPI = (CPU-Time x Clock Rate)/IC Therefore:
Solution 1.4.2 Global CPI = (CPU-Time x Clock Rate)/IC Therefore: CPI (P1) = 10.4 × 10−4 × 2.5 × 109/106 = 2.6 CPI (P2) = 6.66 × 10−4 × 3 × 109/106 = 2.0 Return
4
Class A (10% of 106 instr.): 105 instr.
Solution 1.4.3 Class A (10% of 106 instr.): 105 instr. Class B (20% of 106 instr.): 2 × 105 instr. Class C(50% of 106 instr.): 5 × 105 instr. Class D(20% of 106 instr.): 2 × 105 instr. CPU-Time = AƩD(ICi x CPIi) x Clock Cycle Time Clock Cycles = (AƩD(ICi x CPIi) Therefore: clock cycles (P1) = 105 × × 105 × × 105 × × 105 × 3 = × 105 clock cycles (P2) = 105 × × 105 × × 105 × × 105 × 2 = 20 × 105 Return
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.