Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
01
Prediction if the last branch is NT
1
Correlating Branch Predictor Performance of Correlating Branch Prediction
• If we use 2 branches as histories, then there are 4 possibilities • With same number of
(T-T, NT-T, NT-NT, NT-T). state bits, (2,2) performs
• For each possibility, we need to use a predictor (1-bit, 2-bit). better than noncorrelating
• And this repeats for every branch. 2-bit predictor.
• Outperforms a 2-bit
predictor with infinite
number of entries
2
BTB operations BTB Performance
• BTB hit, prediction correct Æ • Two things can go wrong
0 cycle delay – BTB miss (misfetch)
• BTB hit, misprediction Æ ≥ 2 – Mispredicted a branch (mispredict)
cycle penalty • Suppose BTB hit rate of 85% and predict accuracy of 90%,
• BTB miss, branch Æ ≥ 1 cycle misfetch penalty of 2 cycles and mispredict penalty of 5 cycles,
penalty what is the average branch penalty?
2*(15%) + 5*(85%*10%) = 0.725
see also the example on Pg. 211
• BTB and BPT can be used together to perform better prediction
Next Time
• Multi – issue processor (3.6)
• Speculation (3.7)