EE8365/CS8203 ADVANCED COMPUTER ARCHITECTURE A Survey on BRANCH PREDICTION METHODOLOGY By, Baris Mustafa Kazar Resit Sendag.

Slides:



Advertisements
Similar presentations
Branch prediction Titov Alexander MDSP November, 2009.
Advertisements

Pipelining V Topics Branch prediction State machine design Systems I.
Lecture 8 Dynamic Branch Prediction, Superscalar and VLIW Advanced Computer Architecture COE 501.
Dynamic Branch Prediction
Pipeline Hazards Pipeline hazards These are situations that inhibit that the next instruction can be processed in the next stage of the pipeline. This.
EECC722 - Shaaban #1 lec # 6 Fall Dynamic Branch Prediction Dynamic branch prediction schemes run-time behavior of branches to make predictions.
CPE 731 Advanced Computer Architecture ILP: Part II – Branch Prediction Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University.
Computer Architecture 2011 – Branch Prediction 1 Computer Architecture Advanced Branch Prediction Lihu Rappoport and Adi Yoaz.
EECC551 - Shaaban #1 lec # 5 Spring Reduction of Control Hazards (Branch) Stalls with Dynamic Branch Prediction So far we have dealt with.
EECC551 - Shaaban #1 lec # 5 Fall Static Conditional Branch Prediction Branch prediction schemes can be classified into static and dynamic.
Static Branch Prediction
EECC551 - Shaaban #1 lec # 5 Fall Static Conditional Branch Prediction Branch prediction schemes can be classified into static (at compilation.
EECS 470 Branch Prediction Lecture 6 Coverage: Chapter 3.
EECC722 - Shaaban #1 lec # 11 Fall Static Branch Prediction Branch prediction schemes can be classified into static and dynamic schemes.
1 COMP 206: Computer Architecture and Implementation Montek Singh Wed., Oct. 8, 2003 Topic: Instruction-Level Parallelism (Dynamic Branch Prediction)
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon., Oct. 7, 2002 Topic: Instruction-Level Parallelism (Dynamic Branch Prediction)
Two-Level Adaptive Dynamic Branch Prediction Jeroen Lichtenauer.
EECC722 - Shaaban #1 lec # 6 Fall Dynamic Branch Prediction Dynamic branch prediction schemes utilize run-time behavior of branches to make.
EECC551 - Shaaban #1 lec # 5 Fall Reduction of Control Hazards (Branch) Stalls with Dynamic Branch Prediction So far we have dealt with.
Dynamic Branch Prediction
Branch Prediction. Literature Tse-Yu Yeh and Yale N. Patt, “A Comparison of Dynamic Branch Predictors that use Two Levels of Branch History,”Tse-Yu Yeh.
EECC722 - Shaaban #1 lec # 6 Fall Dynamic Branch Prediction Dynamic branch prediction schemes utilize run-time behavior of branches to make.
Combining Branch Predictors
Goal: Reduce the Penalty of Control Hazards
Branch Target Buffers BPB: Tag + Prediction
EECC551 - Shaaban #1 lec # 5 Winter Reduction of Control Hazards (Branch) Stalls with Dynamic Branch Prediction So far we have dealt with.
Computer Architecture Instruction Level Parallelism Dr. Esam Al-Qaralleh.
Branch Prediction Dimitris Karteris Rafael Pasvantidιs.
Branch pred. CSE 471 Autumn 011 Branch statistics Branches occur every 4-6 instructions (16-25%) in integer programs; somewhat less frequently in scientific.
So far we have dealt with control hazards in instruction pipelines by:
CIS 429/529 Winter 2007 Branch Prediction.1 Branch Prediction, Multiple Issue.
EECC722 - Shaaban #1 lec # 10 Fall Dynamic Branch Prediction Dynamic branch prediction schemes are different from static mechanisms because.
1 Lecture 7: Branch prediction Topics: bimodal, global, local branch prediction (Sections )
EECC551 - Shaaban #1 lec # 5 Fall Static Conditional Branch Prediction Branch prediction schemes can be classified into static and dynamic.
Branch Prediction CSE 4711 Branch statistics Branches occur every 4-7 instructions on average in integer programs, commercial and desktop applications;
Evaluation of Dynamic Branch Prediction Schemes in a MIPS Pipeline Debajit Bhattacharya Ali JavadiAbhari ELE 475 Final Project 9 th May, 2012.
Evaluation of the Gini-index for Studying Branch Prediction Features Veerle Desmet Lieven Eeckhout Koen De Bosschere.
Lecture 3. Branch Prediction Prof. Taeweon Suh Computer Science Education Korea University COM506 Computer Design.
Analysis of Branch Predictors
ACSAC’04 Choice Predictor for Free Mongkol Ekpanyapong Pinar Korkmaz Hsien-Hsin S. Lee School of Electrical and Computer Engineering Georgia Institute.
Microprocessor Microarchitecture Instruction Fetch Lynn Choi Dept. Of Computer and Electronics Engineering.
1 Dynamic Branch Prediction. 2 Why do we want to predict branches? MIPS based pipeline – 1 instruction issued per cycle, branch hazard of 1 cycle. –Delayed.
Korea UniversityG. Lee CRE652 Processor Architecture Dynamic Branch Prediction.
CMPE750 - Shaaban #1 lec # 6 Spring Dynamic Branch Prediction Dynamic branch prediction schemes utilize run-time behavior of branches to.
Prophet/Critic Hybrid Branch Prediction B B B
Branch Prediction Perspectives Using Machine Learning Veerle Desmet Ghent University.
Yiorgos Makris Professor Department of Electrical Engineering University of Texas at Dallas EE (CE) 6304 Computer Architecture Lecture #13 (10/28/15) Course.
Samira Khan University of Virginia April 12, 2016
Dynamic Branch Prediction
CSL718 : Pipelined Processors
CS203 – Advanced Computer Architecture
Dynamic Branch Prediction
Computer Architecture Advanced Branch Prediction
UNIVERSITY OF MASSACHUSETTS Dept
CS5100 Advanced Computer Architecture Advanced Branch Prediction
COSC3330 Computer Architecture Lecture 15. Branch Prediction
Samira Khan University of Virginia Dec 4, 2017
So far we have dealt with control hazards in instruction pipelines by:
Dynamic Branch Prediction
Dynamic Branch Prediction
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
Pipelining: dynamic branch prediction Prof. Eric Rotenberg
Adapted from the slides of Prof
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
So far we have dealt with control hazards in instruction pipelines by:
Presentation transcript:

EE8365/CS8203 ADVANCED COMPUTER ARCHITECTURE A Survey on BRANCH PREDICTION METHODOLOGY By, Baris Mustafa Kazar Resit Sendag

Outlines Introduction Static Branch Prediction Schemes: A Brief View Dynamic Branch Prediction –One-Bit Scheme:BHT –To provide target instructions quickly: BTBs –Bimodal Branch Prediction (Two-Bit Prediction Scheme) –Two-level Branch Prediction Global History Schemes: GAg, GAs, GAp Per-Address History Schemes: PAg, PAs, PAp Per-Set Address Schemes: SAg, SAs, Sap –Correlation Branch Prediction –More on Global Branch Prediction: Gselect and Gshare –Hybrid Branch Predictors

Outlines (cont.) –Hybrid Branch Predictors Where did the idea come from? Branch Classification An alternative Selection Mechanism –Reducing PHT Interference Bi-Mode Branch Predictor The Agree Predictor The Skewed Branch Predictor The YAGS Branch Prediction Scheme Concluding Remarks

Introduction Pipeline flushes due to branch mispredictions is one of the most serious problems facing the designer of a deeply pipelined, super- scalar processor. Many branch predictors have been proposed to alleviate this problem… compile-time schemes (static scheduling) Focus on hardware-based prediction schemes (dynamic scheduling)

Static Branch Prediction Schemes: A Brief View Program behavior (i.e. branch direction) Profile information collected Some schemes: ☼ Always not taken, ☼ Always Taken, ☼ Op-code Based, ☼ Backward Taken and Forward not Taken.

Dynamic Prediction Schemes (DPS) One-Bit Scheme –Branch Prediction Buffer or Branch History Table (BHT) –indexed by lower bits of the branch instruction address –prediction bit To provide target instructions quickly: BTBs –Lee and Smith (1984) –Special instruction cache designed to store the target instructions

DPS (cont.) Two-Bit Prediction Scheme –Bimodal (usually taken or usually not taken) –2-bit Saturating Counter, Smith-1981 Two-level Branch Predictors –Yeh and Patt, 1991 –correlating predictors –First-level is the history of the last k branches encountered. –Second-level is the history of branch behavior of the last j occurences of that unique pattern of the last k branches. –Branch History Register and Pattern History Table (PHT) –Run-time collection of the history –Performs better than the other schemes given previously (up to97%)

Two-Level Branch Predictors (cont.) Two-level Predictors are classified into 3 classes(Yeh and Patt, 1993) Global History Schemes (GAg, GAs, GAp ) –The first-level branch history is the actual last k branches. –Only one global history register (GHR) –updated with the results from all branches

Two-Level Branch Predictors (cont.) Per-address History Schemes –Local Branch Prediction –The-first level history refers to the last k occurences of the same branch instruction –The branch prediction is independent of other branches’ execution history

Two-Level Branch Predictors (cont.) Per-set History Schemes –The first-level history means the last k occurences of the branch instructions from the same sub-set. –The set attribute –The prediction is influenced by the other branches in the same set

DPS (cont.) Comparison results for Two-level Branch Prediction Classes –Comparison is made upon the performance and cost effectiveness –Global History Schemes performs better on integer programs –Per-address history schemes performs better on floating point prog. –PAs is the most cost effective among low-cost schemes Correlation Branch Prediction –Pan, So, and Rahmeh, 1992 –GAp and GAs

DPS (cont.) More on Global Branch Prediction –Local Branch Prediction: history of each branch independently –Global Branch Prediction: combined history of all recent branches –Gselect: Global Predictor with Index Selection, Pan, So, Rahmeh, PHT is indexed by concatenations of global history and branch address performs better than either bimodal or global prediction –Gshare: Global Predictor with Index Sharing, McFarling PHT is indexed by XOR of global history and branch address

Hybrid Predictors : Combining Branch Predictors McFarling 1993 Different prediction schemes have different advantages Combined Predictor: Bimodal and Gshare 2 bit-counter is used to select one of the predictor performs always better than either predictor alone 98.1% vs 97.1% The idea of combining predictors was introduced first time.

Hybrid Predictors : Branch Classification Chang, Hao, Yeh, and Patt, 1994 Partitions a program’s branches into sets or branch classes Classes are based on run-time and compile-time info. Associates each branch class with the most suitable predictor 2-bit counter is used to select the branch predictor

An Alternative Selection Mechanism Single-scheme predictors and selection mechanisms 2-level Selector, Chang, Hao, and Patt, 1995 The concept of Two-level Branch Prediction is embodied. The performance of 2-level BPS(Branch Predictor Selector) is shown to be better than 2-bit counter BPS mechanism of McFarling

Reducing Pattern History Table Interference The main problem, which reduces the prediction rate in the global schemes is aliasing. Neutral aliasing- no mispredictions Destructive aliasing-misprediction

Reducing PHT Interference: The Agree Predictor Sprangle, Chappel, Alsup, Patt, 1997 Assigns a biasing bit to each branch in BTB The PHT info is changed with the bias bit. Hopes highly biased behavior of the branches is seen the first time a branch is introduced into the BT. Neutral aliasing

Reducing PHT Interference: Bi-Mode Predictors Lee, Chen, Mudge, 1997 Tries to replace destructive aliasing with neutral aliasing It splits the PHT table into even parts choice PHT direction PHTs: Taken and Not taken Xored indexing of direction PHTs

Reducing PHT Interference: The Skewed Branch Predictor Michaud, Seznec, Uhlig, 1997 Lack of Associativity in PHT conflict aliasing, rather than capacity set associative PHT? (tags, etc) Skewing Function splits PHT into 3 banks uses unique hashing function per bank majority vote partial updating of the banks

Reducing PHT Interference: The YAGS Branch Predictor Eden, Mudge, 1998 Yet Another Global Scheme (YAGS) Combines the strong points of several previous schemes introduces tags into the PHT that allows it to be reduced without sacrificing key branch outcome information. The size reduction more than offsets the cost of the tags. Gives better prediction accuracy for the SPEC95 benchmark suite than several leading prediction schemes, for the same cost.

Conclusions The Branch Prediction Methodology is studied. 2-level Branch Prediction was the most important step on the topic. Hybrid predictors, combining the advantages of the single- predictors are the most effective ones in branch prediction The selection of the predictors in the Hybrid predictors requires a good study of branch behavior and depends to a great extend upon the programs. Branch classification could be a promising method for Hybrid predictors. Using 2-level BPS gives better performance than the 2-bit BPS

Conclusions (cont.) Bi-Mode and Agree predictors that suggest splitting of the PHT into two branch streams have done a good job in reducing the aliasing in global schemes. YAGS scheme further reduces the aliasing by combining the strong points of previous schemes