Computer Architecture/C.A (ETH Zürich, Spring 2020)

Lecture 16: Branch Prediction

Tony Lim 2021. 7. 10. 16:10
728x90

Branch Problem = Next fetch address after a control-flow instruction is not determined after N cycels in a pipelined processor

so we try to predict branch target address.

based on previous history we might have some address in BTB. if not we just add insturction size to current PC and take that to next PC.

 

Simple Branch Prediction Schemes

Compile time (Static)

  • Assuming always not taken
  • Assuming always taken
  • BTFN(backward taken, forward taken) = we can recognize by additional bit
  • Profile based (compiler predict branch for us per branch)

Run time (dynamic)

  • Last time prediction (single-bit) 
  • Two bit counter based prediction 
  • Two level prediction (global vs local)
  • Hybrid
  • Advanced algorithms (using ML)

 

unlike global branch history now we have history per branch which makes prediction better.

 

therer are many other way to make branch prediction and it is reasearch area.

Digital Design & Computer Architecture - Lecture 17: Branch Prediction II (ETH Zürich, Spring 2020) - YouTube

 

 

 

 

 

 

 

728x90