Giter Site home page Giter Site logo

lightsim's Introduction

Cache_Replacement

Build the lightsim

Type make in sim directory to build lightsim. The binary will be in /bin folder

Trace generation

We use Docker the encapsulate Pin tracer. To get a trace,

  • Build the Docker image using the docker file (after this you need to edit the run_docker.sh so that the Docker image name matches).
  • Use the run_docker.sh script to envoke Pin and get trace file.

The format is ./docker_run.sh -o <output_trace_file_name> -t <number_of_trace_to_collect> <the_program_to_run> <the_arguments_of_the_program>

For example running ./docker_run -t 10000 -o ls_trace ls -las

Memory hierarchy configuration

Editing the memory hierarchy of lightsim is easy. We provide a sample memory hierarchy configuration in the /cfg/cfg.json.

Run the simulation

The trace file to be feeded to each CPU can be configed in a JSON file. We provided some simple trace files in /traces folder.

An example to invoke the simulation is provided in /bin/run.sh

./lightsim -c ../cfg/cfg.json -t ../cfg/traces.json -p 1

The command line options are:

  -c, --cfg        configuration file in json format (string)
  
  -t, --trace      trace configuration file in json format (string)
  
  -p, --process    processes to simulate (unsigned int)
  
  -n, --inst       simulation instructions (long long [=-1])
  
  -v, --verbose    verbose output

lightsim's People

Contributors

huodahaha avatar nerokapa avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nerokapa

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.