Question: Consider a branch instruction in which is executed 8 times in a program. The actual outcomes of the branch are as follows: NT, T, NT,
Consider a branch instruction in which is executed 8 times in a program. The actual outcomes of the branch are as follows: NT, T, NT, T, NT, NT, NT, T where T = Taken and NT = Not taken. Dynamic branch prediction is used to predict the branch outcomes. Show the predictions made for each instance of the branch and calculate the branch prediction accuracy in case of the following two predictors:
a) A 1-bit branch predictor which starts in the NT (Not Taken) state
b) A 2-bit branch predictor which starts in the SNT (Strong Not Taken) state
c) If you were to design a branch predictor that would beat the 2-bit branch predictor. What would your design look like?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
