Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This exercise examines the accuracy of various branch predictors for the followi

ID: 3815290 • Letter: T

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, NT

a. What is the accuracy of the two-bit predictor if this pattern is repeated forever?
b. [30] <§4.8> 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.
c. [10] <§4.8> 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?
d. [20] <§4.8> Repeat 4.16.4, but now your predictor should be able to eventually (aft er 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. Hint: this input lets your
predictor determine which of the two repeating patterns it is given.

Explanation / Answer

a) Actual T NT NT NT T | T NT NT NT T | T NT NT NT T |

Predictor 0 1 0 0 0 | 1 2 1 0 0 | 1 2 1 0 0 |

Predict NT NT NT NT NT | NT T NT NT NT | NT T NT NT NT |

Steady-state Accuracy = 2/5 = 0.4

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote