Question: Problem 1 Pipeline Control Hazard ( Chapter 4 ) The importance of having a good branch predictor depends on how often conditional branches are executed.

Problem 1 Pipeline Control Hazard (Chapter 4)
The importance of having a good branch predictor depends on how often conditional branches are executed. Together with branch predictor accuracy, this will determine how much time is spent stalling due to mis-predicted branches. Assume we have the following breakdown of dynamic instructions.
Also, assume the accuracies of the three different branch predictors are as follows:
If the branch target address will be available the same cycle the branch condition is resolved, i.e. in EX stage (different from Lecture slides). So, there is a 2-cycle penalty for a branch mis-prediction. Please answer the following 5 questions.
A. Stall cycles due to mis-predicted branches increase the CPI. What is the extra CPI due to mis-predicted branches with the always-taken predictor? Assume branch outcomes are determined in EX stage, and there is no data hazard.
B. Repeat the above question with an always-not-taken predictor.
C. Repeat the above question with a 2-bit predictor.
D. With the 2-bit predictor, what speedup would be achieved if we could convert half of the branch instructions in a way that replaces a branch instruction with an ALU instruction? Assume that correctly and incorrectly predicted instructions have the same chance of being replaced.
E. With the 2-bit predictor, what speedup would be achieved if we could convert half of the branch instructions in a way that replaced each branch instruction with 2 ALU instructions? Assume that correctly and incorrectly predicted branch instructions have the same chance of being replaced.
Problem 1 Pipeline Control Hazard ( Chapter 4 )

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 Programming Questions!