2. This question has three parts. Consider two interleaved branch instructions b1 and b2 with the sequence of outcomes shown in the table (where T: Taken, NT: Not-taken). Fill in the following tables based on the respective instructions, and compute the prediction accuracy, i.e., percentage of correct predictions. Please show major steps in your computation. Use the convention (what to predict if the last branch was not
solves a similar problem with different assumptions.]
a) [2] Local + Local Predictors: Use a 1-bit (local) predictor for b1 and a 1-bit local predictor for b2. In this case, they are independent branches. b1 prediction b1 action New b1 prediction b2 prediction b2 action New b2 prediction
T
T
T
T
T
T
NT
NT
T
T
NT
NT
Prediction Accuracy:
b) [2] Local + Correlated Predictors: Use a 1-bit (local) predictor for b1 and a (1, 1) correlated predictor for b2.In this case, b2 depends (correlated) on b1 but b1 does not depend on b2. b1 prediction b1 action New b1 prediction b2 prediction b2 action New b2 prediction
T
T
T
T/T
T
NT
NT
T
T
NT
NT
Prediction Accuracy:
c) [2] Both Correlated Predictors: Assume that both branches are correlated to each other. b1 prediction b1 action New b1 prediction b2 prediction b2 action New b2 prediction
T/T
T
T/T
T/T
T
NT
NT
T
T
NT
NT