Skip to content

Is there a way to have a parameterized replacement policy/branch predictor/prefetcher in ChampSim such that the parameter is passed via the config file? #415

Answered by ngober
Setu-Gupta asked this question in Q&A
Discussion options

You must be logged in to vote

I've theorized about this before, and I would love it if it's eventually possible. The mechanisms are probably in place on the develop branch, it would probably just take someone willing to work on it.

I think something that you could do is to use the development branch, where modules can be specified as classes, and to make the module class a template class, like template <uint32_t param> class MyReplacement : public champsim::modules::replacement {};. Then, in the configuration, you could specify

{ "LLC": { "replacement": {
    "class": "MyReplacement<2>",
    "path": ...
} } }

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@maccoymerrell
Comment options

@ngober
Comment options

Answer selected by Setu-Gupta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants