The CPU design team is choosing between two implementations
The CPU design team is choosing between two implementations of the same instruction set each with three classes of instructions. Parameters for the two possibilities are given in the following table.
CPU-1 CPU-2
Clock Rate 2 GHZ 3 GHZ
CPI for ALU Inst 1 2
CPI for Memory Inst 2 2
CPI for Control Inst 4 2
a) For a program with 40% ALU instructions, 50% memory instructions, and 10% control instructions, which design will be faster? Give a quantitative average CPI for each case.
b) For a program with 70% ALU instructions, 20% memory instructions and 10% control instructions, which design will be faster? Give a quantitative average CPI for each case.
Solution
CPI (CPU1) = ((40x1) + (50x2) + (10x4)) / 100 = 1.8
CPI (CPU2) = ((70x2) + (20x2) + (10x2)) / 100 = 2.0
CPU1 execution time = ((1.8)/2000) x 1000 = 0.9ns
CPU2 execution time = ((2.0)/3000) x 1000 = 0.66ns
Design of CPU2 is faster
2. Average CPI for each CPU
CPI (CPU1) = ((70x1) + (20x2) + (10x4)) / 100 = 1.5
CPI (CPU2) = ((70x2) + (20x2) + (10x2)) / 100 = 2.0
CPU1 execution time = ((1.5)/2000) x 1000 = 0.75ns
CPU2 execution time = ((2.0)/3000) x 1000 = 0.66ns
Design of CPU2 is faster
