No description
  • C++ 78.1%
  • Python 20.4%
  • Makefile 0.9%
  • Shell 0.3%
  • TeX 0.2%
Find a file
Arunan Gnanasekaran 6fd922ee05 Fixup in GHRP btb
2026-02-10 17:14:30 +01:00
.github Fix workflows to work with git.n.n 2026-01-30 15:30:00 +01:00
branch Get champsim to work 2026-01-29 13:11:44 +01:00
btb Fixup in GHRP btb 2026-02-10 17:14:30 +01:00
config Check dependencies of the main file 2025-05-01 08:26:38 +00:00
configs Add *maybe* working GHRP 2026-02-05 17:33:36 +01:00
docs Added release notes generation 2024-12-03 14:53:33 -06:00
inc Add *maybe* working GHRP 2026-02-05 17:33:36 +01:00
prefetcher Cleanup fdip implementation a bit 2026-01-30 11:38:17 +01:00
python Do some cleanup in ghrp 2026-02-10 16:36:27 +01:00
replacement Fixed "Fixed merge of #506" 2024-11-08 12:29:27 -06:00
src Add *maybe* working GHRP 2026-02-05 17:33:36 +01:00
test Add increment and decrement tests for fwcounter 2025-11-16 16:06:54 -06:00
tracer Merge branch 'master' into develop 2023-01-04 10:14:46 -06:00
vcpkg@1de2026f28 Rollback vcpkg from 4b6c50d to 1de2026 2025-02-06 07:19:01 +00:00
.clang-format Format Json 2025-01-23 14:19:06 +09:00
.clang-tidy refactor: Fixed a bunch of warnings under clang-tidy 2023-06-13 00:45:18 +01:00
.gitignore Generate compile_commands.json for LSP support 2025-01-08 13:17:50 -06:00
.gitmodules First add of vcpkg support 2023-01-12 19:19:57 -06:00
champsim_config.json Change to final config 2026-01-30 13:02:51 +01:00
CITATION.cff Add CITATION.cff 2022-10-27 14:38:31 -05:00
config.sh feat: used makefile to generate legacy patch files 2024-03-05 14:05:32 -06:00
CONTRIBUTING.md chore: added contributing guidelines 2023-09-06 14:29:49 -05:00
global.options refactor: fixed -Wconversion warnings and promoted it to global.options 2024-01-09 09:07:14 -06:00
LICENSE Updated License 2022-12-26 20:53:44 -06:00
Makefile Fix TEST_NUM parameter parsing in Makefile 2025-09-25 14:31:39 +02:00
module.options fix: reduced number of generated files in cases where no legacy modules are present 2023-08-18 14:59:05 -05:00
PUBLICATIONS_USING_CHAMPSIM.bib feature[docs]: Added 'Publications' page to documentation 2024-09-07 12:34:42 -05:00
README.md fix: deprecated options in README example 2025-01-17 16:05:12 +01:00
vcpkg.json Migrated CLI parsing to CLI11 (#323) 2023-05-25 16:15:36 -05:00

ChampSim

GitHub GitHub Workflow Status GitHub forks Coverage Status

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.

Using ChampSim

ChampSim is the result of academic research. If you use this software in your work, please cite it using the following reference:

Gober, N., Chacon, G., Wang, L., Gratz, P. V., Jimenez, D. A., Teran, E., Pugsley, S., & Kim, J. (2022). The Championship Simulator: Architectural Simulation for Education and Competition. https://doi.org/10.48550/arXiv.2210.14324

If you use ChampSim in your work, you may submit a pull request modifying PUBLICATIONS_USING_CHAMPSIM.bib to have it featured in the documentation.

Download dependencies

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

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 <configuration file>
$ make

Download DPC-3 trace

Traces used for the 3rd Data Prefetching Championship (DPC-3) can be found here. (https://dpc3.compas.cs.stonybrook.edu/champsim-traces/speccpu/) A set of traces used for the 2nd Cache Replacement Championship (CRC-2) can be found from this link. (http://bit.ly/2t2nkUj)

Storage for these traces is kindly provided by Daniel Jimenez (Texas A&M University) and Mike Ferdman (Stony Brook University). If you find yourself frequently using ChampSim, it is highly encouraged that you maintain your own repository of traces, in case the links ever break.

Run simulation

Execute the binary directly.

$ bin/champsim --warmup-instructions 200000000 --simulation-instructions 500000000 ~/path/to/traces/600.perlbench_s-210B.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.

Add your own branch predictor, data prefetchers, and replacement policy

Copy an empty template

$ mkdir prefetcher/mypref
$ cp prefetcher/no_l2c/no.cc prefetcher/mypref/mypref.cc

Work on your algorithms with your favorite text editor

$ vim prefetcher/mypref/mypref.cc

Compile and test Add your prefetcher to the configuration file.

{
    "L2C": {
        "prefetcher": "mypref"
    }
}

Note that the example prefetcher is an L2 prefetcher. You might design a prefetcher for a different level.

$ ./config.sh <configuration file>
$ make
$ bin/champsim --warmup-instructions 200000000 --simulation-instructions 500000000 600.perlbench_s-210B.champsimtrace.xz

How to create traces

Program traces are available in a variety of locations, however, many ChampSim users wish to trace their own programs for research purposes. Example tracing utilities are provided in the tracer/ directory.

Evaluate Simulation

ChampSim measures the IPC (Instruction Per Cycle) value as a performance metric.
There are some other useful metrics printed out at the end of simulation.

Good luck and be a champion!