Solution 1.4 1.4.1 P2 Class A: 105 instr. Class B: 2 × 105 instr. Class C: 5 × 105 instr. Class D: 2 × 105 instr. Time = No. instr. × CPI/clock rate P1: Time class A = 0.66 × 10−4 Time class B = 2.66 × 10−4 Time class C = 10 × 10−4 Time class D = 5.33 × 10−4 Total time P1 = 18.65 × 10−4 P2: Time class A = 10−4 Time class B = 2 × 10−4 Time class C = 5 × 10−4 Time class D = 3 × 10−4 Total time P2 = 11 × 10−4
1.4.2 CPI = time × clock rate/No. instr. CPI(P1) = 18.65 × 10−4 × 1.5 × 109/106 = 2.79 CPI(P2) = 11 × 10−4 × 2 × 109/106 = 2.2
1.4.3 clock cycles(P1) = 105 × 1 + 2 × 105 × 2 + 5 × 105 × 3 + 2 × 105 × 4 = 28 × 105 clock cycles(P2) = 105 × 2 + 2 × 105 × 2 + 5 × 105 × 2 + 2 × 105 × 3 = 22 × 105
1.4.4 (500 × 1 + 50 × 5 + 100 × 5 + 50 × 2) × 0.5 × 10–9 = 675 ns
1.4.5 CPI = time × clock rate/No. instr. CPI = 675 × 10–9 × 2 × 109/700 = 1.92
1.4.6 Time = (500 × 1 + 50 × 5 + 50 × 5 + 50 × 2) × 0.5 × 10–9 = 550 ns Speed-up = 675 ns/550 ns = 1.22 CPI = 550 × 10–9 × 2 × 109/700 = 1.57
2021-04-10 16:35:21
1.16MB
课本答案
1