Question 1. MIPS and branch delay You have some MIPS code for which: 1% of instructions are unconditional branches (otherwise known as jumps, assume these are handled in the pipeline just like branches, except with a fixed condition bit of '1'). 15% of instructions are conditional branches. On average, 65% of conditional branches are taken, and 35% are not taken. The average CPI of non-branch instructions is 1.2. a) Consider a variation 1 MIPS that uses a freeze-the-pipeline strategy for branches. What is the CPI of the code? b) Consider a variation 4 MIPS that uses a freeze-tho-pipeline strategy for branches. What is the CPI of the code? c) What speed-up is gained for this code by moving from the variation 1 MIPS to the variation 4 MIPs? Assume the clock cycle has to be lengthened 3% for the variation 4 MIPS. d) Consider a variation 4 MIPS that uses a predict-not-taken strategy for branches. What is the CPI of the code? 9) What speed-up is gained for this code by moving from the variation 4 MIPS with a freeze-the-pipeline strategy to a variation 4 MIPS with a predict-not-taken strategy? Assume no change in clock cycle has to be made. Variation 1 MIPS MEMW Variation 4 MIPS Question 1. MIPS and branch delay You have some MIPS code for which: 1% of instructions are unconditional branches (otherwise known as jumps, assume these are handled in the pipeline just like branches, except with a fixed condition bit of '1'). 15% of instructions are conditional branches. On average, 65% of conditional branches are taken, and 35% are not taken. The average CPI of non-branch instructions is 1.2. a) Consider a variation 1 MIPS that uses a freeze-the-pipeline strategy for branches. What is the CPI of the code? b) Consider a variation 4 MIPS that uses a freeze-tho-pipeline strategy for branches. What is the CPI of the code? c) What speed-up is gained for this code by moving from the variation 1 MIPS to the variation 4 MIPs? Assume the clock cycle has to be lengthened 3% for the variation 4 MIPS. d) Consider a variation 4 MIPS that uses a predict-not-taken strategy for branches. What is the CPI of the code? 9) What speed-up is gained for this code by moving from the variation 4 MIPS with a freeze-the-pipeline strategy to a variation 4 MIPS with a predict-not-taken strategy? Assume no change in clock cycle has to be made. Variation 1 MIPS MEMW Variation 4 MIPS