ChampSim is a trace-based simulator for a microarchitecture study. If you have questions about how to use ChampSim, we encourage you to search the threads in the Discussions tab or start your own thread. If you are aware of a bug or have a feature request, open a new Issue.
ChampSim is the result of academic research. To support its continued growth, please cite our work when you publish results that use ChampSim by clicking "Cite this Repository" in the sidebar.
ChampSim uses vcpkg to manage its dependencies. In this repository, vcpkg is included as a submodule. You can download the dependencies with
git submodule update --init
vcpkg/bootstrap-vcpkg.sh
vcpkg/vcpkg install
branch
folder in this directory includes all the code additions made by our team.
In the file btb/basic_btb.cc
change BTB_WAY = 2
on line 27.
Edit the configuration file under /ChampSim/champsim_config.json
as
"branch_predictor": "gshare"
or
"branch_predictor": "perceptron"
or
"branch_predictor": "tage"
or
"branch_predictor": "hybrid_pt"
or
"branch_predictor": "hybrid_gp"
or
"branch_predictor": "hybrid_tg"
Run the following commands
$ ./config.sh champsim_config.json
$ make
Optional step to save terminal output to file:
$ script gshare_602.txt
Download the following traces from https://dpc3.compas.cs.stonybrook.edu/champsim-traces/speccpu/
$ 602.gcc_s-2226B.champsimtrace.xz
$ 605.mcf_s-472B.champsimtrace.xz
$ 625.x264_s-18B.champsimtrace.xz
Add them under the Champsim folder.
Execute the binary directly.
$ bin/champsim --warmup_instructions 200000000 --simulation_instructions 500000000 602.gcc_s-2226B.champsimtrace.xz
$ bin/champsim --warmup_instructions 200000000 --simulation_instructions 500000000 605.mcf_s-472B.champsimtrace.xz
$ bin/champsim --warmup_instructions 200000000 --simulation_instructions 500000000 625.x264_s-18B.champsimtrace.xz
ChampSim gives results for Instructions per Cycle, MPKI, Prediction Accuracy and MPKI lost to various branch types.
There are some other useful metrics printed out at the end of simulation.
This folder also contains the output generated and saved from the terminal that were used by us in the report.