Giter Club home page Giter Club logo

coolsharedcache's Introduction

Multicore Project


Introduction

Our team's final project structure is based on ChampSim. What our team contributed is located at the cache replacement policy that is located at /replacement. It contains four algorithms, EAF, LFRU, PLRU, LRU-K, you can switch to run each of them.


Environment

Our project should be run on crunchy1 machine on CIMS. Please be sure that your are at that machine. Then you should use gcc-9.2 to compile the program.

$ module load gcc-9.2

Download Trace

Due to limited volume in the CIMS machine, our team does not place our running data in the project. However, we did place a script for you to download two of them and run a two cores example. (Be sure to add the permission the script)

$ ./download_data.sh 

This would download 401.bzip2-226B.champsimtrace.xz and 401.bzip2-277B.champsimtrace.xz. If you want ot test the 435 and 437, you should download them via Traces.


Compile

ChampSim takes a JSON configuration script. Examine champsim_config.json for a fully-specified example. All options described in this file are optional and will be replaced with defaults if not specified. The configuration scrip can also be run without input, in which case an empty file is assumed.

$ ./config.sh champsim_config.json
$ make

Run simulation

Execute the binary directly (Example to run a two core simulator).

$ bin/champsim --warmup_instructions 10000000 --simulation_instructions 50000000 traces/401.bzip2-226B.champsimtrace.xz traces/401.bzip2-277B.champsimtrace.xz

The number of warmup and simulation instructions given will be the number of instructions retired. Note that the statistics printed at the end of the simulation include only the simulation phase.


Run Different Algorithms

You can modify the champsim_config.json with the following content with the directory name in /replacement ("eaf", "lru", "plru", "lfru", "lru-k").

    "LLC": {
        "frequency": 4000,
        "sets": 2048,
        "ways": 16,
        "rq_size": 32,
        "wq_size": 32,
        "pq_size": 32,
        "mshr_size": 64,
        "latency": 20,
        "max_read": 1,
        "max_write": 1,
        "prefetch_as_load": false,
        "virtual_prefetch": false,
        "prefetch_activate": "LOAD,PREFETCH",
        "prefetcher": "no",
        "replacement": "eaf" // Modify here, example "lfru"
    },

Then, recompile and run the simulator again.


Run Different Cores

If you want to run 4 cores, you should modify the num_cores in champsim_config.json and copy the content in ooo_cpu to the corresponding number.

    "num_cores": 2, // modify here

    "ooo_cpu": [
        {
            // ...
        },
        {
            // ...
        }
        // add more {} to the num_cores.
    ],

    "DIB": {
        "window_size": 16,
        "sets": 32,
        "ways": 8
    },

Then recompile and run the simulator again.


coolsharedcache's People

Contributors

alva112358 avatar jiuliwei 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.