1- Assume the following instruction mix for some program: 15% stores, 25% loads,
ID: 3588507 • Letter: 1
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.
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)
Explanation / Answer
------------------------------------------------------------------------------------------------------------------------
1.975/105% = 1.8810
THey are 5% more instructions per program, so CPI is reduced to 1.8810 and
overall speed = 2.15/1.975 = 1.0886
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.