Code Monkey home page Code Monkey logo

cache-sim

GitHub release Travis (.org)

A multi-level cache simulator built using C++.

Installation

No installations needed here, unless you don't have the ncurses library, in which case just run
sudo apt-get install libncurses5-dev

Input Format

The configuration for the cache you want to simulate has to be given in the form of a text file. A sample format can be found in paras.cfg

The input format is as so:

<levels>  
<policy> <cacheSize> <blockSize> <setAssociativity>
.  
.  
.  

The trace for the simulator is expected to be a gzip file generated the Pin tool from Intel.

Usage

./run.sh -t|--trace <TRACE> -c|--config <CONFIG_FILE> [-i|--interactive] [-d|--debug]
The -i option outputs the hits and misses in all the levels of the cache in live time (obviously making it slower but hopefully increases your patience :).
The -d option checks if the the cacheBlock chosen by the policy indeed matches the index of the address being accessed, just a safety measure.

Contribution

To add support for more eviction policies, have a look at the template folder and declare the required data structures and complete the functions (don't forget to put them in the policies folder). If the template seems to be lacking something, raise an issue and we can have a look at it.

cache-sim's Projects

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.