Branch Prediction in SimpleScalar

Slides:



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

Dynamic History-Length Fitting: A third level of adaptivity for branch prediction Toni Juan Sanji Sanjeevan Juan J. Navarro Department of Computer Architecture.
Lecture 8 Dynamic Branch Prediction, Superscalar and VLIW Advanced Computer Architecture COE 501.
1 SS and Pipelining: The Sequel Data Forwarding Caches Branch Prediction Michele Co, September 24, 2001.
SimpleScalar v3.0 Tutorial U. of Wisconsin, CS752, Fall 2004 Andrey Litvin (main source: Austin & Burger) (also Dana Vantrease’ slides)
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.
Sim-alpha: A Validated, Execution-Driven Alpha Simulator Rajagopalan Desikan, Doug Burger, Stephen Keckler, Todd Austin.
Chapter 8. Pipelining. Instruction Hazards Overview Whenever the stream of instructions supplied by the instruction fetch unit is interrupted, the pipeline.
SimpleScalar CS401. A Computer Architecture Simulator Primer What is an architectural simulator? – Tool that reproduces the behavior of a computing device.
CPE 731 Advanced Computer Architecture ILP: Part II – Branch Prediction Dr. Gheith Abandah Adapted from the slides of Prof. David Patterson, University.
1 Lecture: Branch Prediction Topics: branch prediction, bimodal/global/local/tournament predictors, branch target buffer (Section 3.3, notes on class webpage)
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.
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.
1 Improving Branch Prediction by Dynamic Dataflow-based Identification of Correlation Branches from a Larger Global History CSE 340 Project Presentation.
EECC551 - Shaaban #1 lec # 5 Fall Reduction of Control Hazards (Branch) Stalls with Dynamic Branch Prediction So far we have dealt with.
1 Lecture 8: Branch Prediction, Dynamic ILP Topics: branch prediction, out-of-order processors (Sections )
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.
So far we have dealt with control hazards in instruction pipelines by:
Dynamic Branch Prediction
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.
EECC722 - Shaaban #1 Lec # 9 Fall Conventional & Block-based Trace Caches In high performance superscalar processors the instruction fetch.
Evaluation of Dynamic Branch Prediction Schemes in a MIPS Pipeline Debajit Bhattacharya Ali JavadiAbhari ELE 475 Final Project 9 th May, 2012.
Improving the Performance of Object-Oriented Languages with Dynamic Predication of Indirect Jumps José A. Joao *‡ Onur Mutlu ‡* Hyesoon Kim § Rishi Agarwal.
5-Stage Pipelining Fetch Instruction (FI) Fetch Operand (FO) Decode Instruction (DI) Write Operand (WO) Execution Instruction (EI) S3S3 S4S4 S1S1 S2S2.
1 Introduction to SimpleScalar (Based on SimpleScalar Tutorial) CPSC 614 Texas A&M University.
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.
Branch Prediction Prof. Mikko H. Lipasti University of Wisconsin-Madison Lecture notes based on notes by John P. Shen Updated by Mikko Lipasti.
Computer Architecture 2015 – Advanced Branch Prediction 1 Computer Architecture Advanced Branch Prediction By Yoav Etsion and Dan Tsafrir Presentation.
CS 6290 Branch Prediction. Control Dependencies Branches are very frequent –Approx. 20% of all instructions Can not wait until we know where it goes –Long.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 13: Branch prediction (Chapter 4/6)
Sim-outorder 사용법 Brnach Prediction 순천향대학교 정보기술공학부 이상정.
Dynamic Branch Prediction
CSL718 : Pipelined Processors
Lecture: Out-of-order Processors
CS203 – Advanced Computer Architecture
Computer Structure Advanced Branch Prediction
Computer Architecture Advanced Branch Prediction
COSC3330 Computer Architecture Lecture 15. Branch Prediction
PowerPC 604 Superscalar Microprocessor
Introduction to SimpleScalar (Based on SimpleScalar Tutorial)
Introduction to SimpleScalar (Based on SimpleScalar Tutorial)
CMSC 611: Advanced Computer Architecture
Module 3: Branch Prediction
TIME C1 C2 C3 C4 C5 C6 C7 C8 C9 I1 branch decode exec mem wb bubble
So far we have dealt with control hazards in instruction pipelines by:
Lecture: Branch Prediction
So far we have dealt with control hazards in instruction pipelines by:
Lecture 10: Branch Prediction and Instruction Delivery
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
Dynamic Hardware 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:
So far we have dealt with control hazards in instruction pipelines by:
Aliasing and Anti-Aliasing in Branch History Table Prediction
So far we have dealt with control hazards in instruction pipelines by:
Gang Luo, Hongfei Guo {gangluo,
Lecture 7: Branch Prediction, Dynamic ILP
Presentation transcript:

Branch Prediction in SimpleScalar Brooks Lombardy David Austin

Overview Problem Statement Solution SimpleScalar Branch Predictor Overview Command Line Options Data Conclusion

Problem Far too many combinations of branch prediction hardware to justify cost of implementing them all. Reliable solution is needed to provide useful measures of branch prediction schemes.

Solution Computer based simulation of proposed new implementations SimpleScalar Simulator suite for many different parts of an architecture. Simulators for caches, out of order simulation, branch prediction

SimpleScalar Branch Prediction –sim-bpred Capable of simulating two static and three dynamic predictors Not taken Taken Bimodal (Branch Prediction Buffer) 2-level adaptive Combined bimodal and 2-level adaptive

Sample Output 1

Sample Output 2

Bimodal Predictor sim-bpred -bpred bimod -bpred:bimod <size> Size, the only user definable option specifies the number of entries in the Branch Target Buffer. Entries in the BTB are 2-bit counters. Default case for sim-bpred with no options is a bimodal predictor with 2k entries.

2 Bit Branch Predictor Decrement if branch not taken Increment if branch taken Predict taken when counter is greater than 1/2 the maximum value, else not taken

Two Level Adaptive Predictor sim-bpred -bpred 2lev -bpred:2lev <L1_size><L2_size><h_size><xor> L1_size: number of entries in the L1 table L2_size: number of entries in the L2 table h_size: history width xor: sets xoring between the history and the address in L2 Default values are 1, 1k, 8 and 0

2 Level Adaptive Predictor Level 1 is a shift register with h_size bits recording branch history. Level 2 is the 2 bit predictor associated with the pattern in Level 1

Combined Predictor sim-bpred -bpred comb -bpred:comb<size> size: number of entries in the combined predictor table Default size = 1k

Miscellaneous Options -bpred:ras <size> Specifies the number of entries in the address stack. -bpred:btb <sets><assoc> Sets the associativity and number of sets for the branch prediction buffer. *-bpred:spec_update <stage> Enables speculative update of the predictor stage can be either Decode (ID) or Writeback (WB)

Conclusions SimpleScalar can effectively be used to simulate various branch prediction methods. Static prediction proved to be less effective in most cases.

References [1] Austin, “SimpleScalar Hacker’s Guide” [2] Burger, Austin, “The SimpleScalar Tool Set, Version 2.0”