Giter VIP home page Giter VIP logo

sim_bp's Introduction

branch predictor

This was a project completed for ECE463, Advanced Microprocessor design to simulate a branch predictor. The simulator takes a trace file (examples found in /traces/) in which all addresses are branches, and compares the actual result of the branch (taken or not taken) with the predicted result.

Command line arguments:

Command line arguments differ depending on which type of predictor is being used. ####bimodal The bimodal predictor uses a single 2i-bit array of 2-bit counters, where iB is the number of bits used to index the PC address. All predictors also have an option to utilize a branch target buffer, which stores previously used branches, and only uses the predictor if there is a hit in the buffer.

./sim_bp bimodal <i_B> <i_BTB> <assoc_BTB> <tracefile>

####gshare The gshare predictor uses the same 2i-bit array of 2-bit counters (iG), however the index for the predictor table is also determined based on a global branch history register (GHR), an h-bit array holding a history of previous branch outcomes.

./sim_bp gshare <i_G> <h> <i_BTB> <assoc_BTB> <tracefile>

####hybrid The hybrid predictor instatiates both a bimodal and gshare predictor, and uses a 2iC-bit array of 2-bit counters to compare the performance of the two predictors, and use the best one.

./sim_bp hybrid <i_C> <i_G> <h> <i_B> <i_BTB> <assoc_BTB> <tracefile>

####yeh/patt The yeah/patt predictor uses a 2h-bit array of integers called the history table and a 2p-bit array of 2-bit counters for prediction. The history table acts like the GHR in a gshare predictor, but has a history for every h index. Each value in the history table is used to index the predictor table.

./sim_bp yehpatt <h> <p> <i_BTB> <assoc_BTB> <tracefile>

*Note that for this project, the BTB does not really do anything, as all addresses are branches anyways.

sim_bp's People

Contributors

zachhannum avatar

Stargazers

Rafael Mayoral avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.