Computer MIPS Rate
Two code sequences: A5 B C, A10 B C;
Compute CPI for each sequence with 100MHz Clock:
- (5x1+1x2+1x3) x 106 10CPI1 = ----------------------------- = --- = 1.43 (5 + 1 + 1) x 106 7
- (10x1+1x2+1x3) x 106 15CPI2 = ------------------------------ = --- = 1.25 (10+1+1) x 106 12
- MIPS1 = 100MHz/1.43x106 = 69.9
- MIPS2 = 100MHz/1.25x106 = 80.0
Execution time = Instruction count x CPI/clock rate
- CPU time1 = ((5+1+1)x106x1.43)/100x106 = 7x1.43/100 = 0.10sec
- CPU time2 = ((10+1+1)x106x1.25)/100x106=12x1.25/100=0.15sec