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.
728x90
'Computer Architecture > C.A (ETH Zürich, Spring 2020)' 카테고리의 다른 글
Lecture 19: SIMD Processors (0) | 2021.07.19 |
---|---|
Lecture 18a: VLIW (0) | 2021.07.11 |
Lecture 15b: Out of Order , DataFlow & LD/ST Handling (0) | 2021.07.10 |
Lecture 15a: Out-of-Order Execution (0) | 2021.07.07 |
Lecture 14: Pipelining Issues (0) | 2021.07.05 |