Question: 1- Assume the following instruction mix for some program: 15% stores, 25% loads, 15% branches, 35% integer arithmetic, 5% integer shift and 5% integer multiply.
1- Assume the following instruction mix for some program: 15% stores, 25% loads, 15% branches, 35% integer arithmetic, 5% integer shift and 5% integer multiply.
Given that load instructions require 2 cycles, stores require 1 cycle, branches require 4 cycles, integer ALU and shift instructions require 1 cycle and integer multiplies require 10 cycles, compute the overall CPI.
2. Given the parametersin problem 1above, consider an optimization that converts multiplies by a constant into a sequence of shits and adds. For this instruction mix, assume 50% of multiplies can be converted to shift-add sequences with an average length of three instructions. Assuming frequency is fixed, what is the new CPI after this optimization? (Hint, notice that the # of instructions changed)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
