Question: a) What is the average cycles per instruction (CPI) for the execution profile of Table 1? Instruction Class CPI Frequency A 6 30% B 5
a) What is the average cycles per instruction (CPI) for the execution profile of Table 1?
| Instruction Class | CPI | Frequency |
| A | 6 | 30% |
| B | 5 | 10% |
| C | 2 | 5% |
| D | 2 | 5% |
| E | 3 | 50% |
Table 1: Execution profile for the implementation of a machine.
b. Assume, in order to minimize CPI, you are given an opportunity of reducing the CPI of any instruction class to 1. Which would you choose and what is the resulting speedup?
c. Table 2 below shows how many instructions of each class two compilers generate when compiling a program P. Which compiler creates faster code and what is the speedup of the faster sequence over the slower? Use the data in Table 1.
| Compiler | Number of Instructions | ||||
| A | B | C | D | E | |
| C1 | 200 | 150 | 5 | 10 | 550 |
| C2 | 250 | 100 | 5 | 10 | 520 |
Table 2: Instructions generated by two different compilers for program P.
d. Using $t0 as a temporary register, give a code sequence which would implement the
bge rs, rt, label
pseudo-instruction on a MIPS processor using the slt, beq and bne instructions.
e. Give a clear description of the difference between throughput and latency in the context of instruction execution speed. Which of the two is not improved by pipelining.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
