Question: Question 1. MIPS and branch delay You have some MIPS code for which: Question 1. MIPS and branch delay You have some MIPS code for

Question 1. MIPS and branch delay

You have some MIPS code for which:

Question 1. MIPS and branch delay You have some MIPS code for

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-the-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? e) 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. 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-the-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? e) 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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!