<aside> 🐛

Performance requirement for pipelined processors. Importance of accuracy increases with depth and width of pipeline. Basic building block is 2-bit saturating counter

image.png

</aside>

Simple strategy assumes branch not taken

Spectulation

“Engagement in risky transactions ont he chance of profit”

Unknown parameter: are these the correct instructions to execute next

  1. Guess branch target, start fetching at guessed position
  2. Execute branch to verify guess
    1. Correct speculation? keep going
    2. Mis-spectulation? Flush mis-speculated instructions
  3. Don’t write registers or memory until predicton verified

image.png

Branch Prediction Performance

Assume Branch: 20%, load 20%, store 10%, other 50% 75% of branches are taken