This exercise examines the accuracy of various branch predictors for the following repeating pattern (e.g., in a
Question:
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.
Step by Step Answer:
Computer Organization and Design The Hardware Software Interface
ISBN: 978-0124077263
5th edition
Authors: David A. Patterson, John L. Hennessy