Question: This exercise examines the accuracy of various branch predictors for the following repeating pattern (e.g., in a loop) of branch outcomes: T, NT, T, T,
This exercise examines the accuracy of various branch predictors for the following repeating pattern (e.g., in a loop) of branch outcomes: T, NT, T, T, NT
1. What is the accuracy of always-taken and always-not taken predictors for this sequence of branch outcomes?
2. What is the accuracy of the two-bit predictor for the first 4 branches in this pattern, assuming that the predictor starts off in the bottom left state from Figure 4.63 (predict not taken)?
Figure 4.63

3. What is the accuracy of the two-bit predictor if this pattern is repeated forever?
4. Design a predictor that would achieve a perfect accuracy if this pattern is repeated forever. You predictor should be a sequential circuit with one output that provides a prediction (1 for taken, 0 for not taken) and no inputs other than the clock and the control signal that indicates that the instruction is a conditional branch.
5. What is the accuracy of your predictor from 4.16.4 if it is given a repeating pattern that is the exact opposite of this one?
6. Repeat 4.16.4, but now your predictor should be able to eventually (after a warm-up period during which it can make wrong predictions) start perfectly predicting both this pattern and its opposite. Your predictor should have an input that tells it what the real outcome was.
Taken Not taken Predict taken Predict taken Taken Not taken Taken Not taken Predict not taken Predict not taken Taken Not taken
Step by Step Solution
3.40 Rating (153 Votes )
There are 3 Steps involved in it
1 2 3 The first few recurrences of this pattern do not have the same accuracy as the later ones beca... View full answer
Get step-by-step solutions from verified subject matter experts
