5) This exercise examines the accuracy of various branch predictors for the foll
ID: 3839981 • Letter: 5
Question
5)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 always-taken and always-not-taken predictors for this sequence of branch outcomes?
b)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 in the text book (predict not taken)?
c)What is the accuracy of the two-bit predictor if this pattern is required forever?
d)Design a predictor that would achieve a perfect accuracy if this pattern is repeated forever.
Your 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.
Explanation / Answer
A. What is the accuracy of always-taken and always-not-taken predictors for this sequence of branch outcomes?
Answer :0 %
B. 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)
Answer: only the third Tcan be predictly correctly.THAT IS 1/5=20%
C. What is the accuracy of the two-bit predictor if this pattern is repeated forever?
Answer: approximately 75% (NT will be predicted wrong) approximately 40% (2 NT’s and the first T will be
predicted wrong)
prediction 0-NT 01-NT 00-NT 01 -NT 10-T Actual Branch outcome T NT T T NT Riaht(1 WVrona(Q) Pred. 0 1 0 0 0 New Prediction 1-NT 00-NT 01-NT 10-T 01-NTRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.