diff options
author | Andrew Waterman <andrew@sifive.com> | 2023-04-04 13:10:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-04 13:10:04 -0700 |
commit | 7f4c6eb4693b3726fc856de99811c55e94e8b837 (patch) | |
tree | 8005e819a9fdf9119830b83bec80c0c6c0672906 /riscv | |
parent | 09f29dbc54b61bb1130d3944726346e042cd2009 (diff) | |
parent | 49362eb1b3afbc2aa2d702e72ddf993f0b7eee08 (diff) | |
download | riscv-isa-sim-7f4c6eb4693b3726fc856de99811c55e94e8b837.zip riscv-isa-sim-7f4c6eb4693b3726fc856de99811c55e94e8b837.tar.gz riscv-isa-sim-7f4c6eb4693b3726fc856de99811c55e94e8b837.tar.bz2 |
Merge pull request #1306 from Jakub-Palider/master-override-cache-name
Allow client to override default names of caches
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/cachesim.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/riscv/cachesim.h b/riscv/cachesim.h index 7271954..a96e639 100644 --- a/riscv/cachesim.h +++ b/riscv/cachesim.h @@ -112,7 +112,8 @@ class cache_memtracer_t : public memtracer_t class icache_sim_t : public cache_memtracer_t { public: - icache_sim_t(const char* config) : cache_memtracer_t(config, "I$") {} + icache_sim_t(const char* config, const char* name = "I$") + : cache_memtracer_t(config, name) {} bool interested_in_range(uint64_t UNUSED begin, uint64_t UNUSED end, access_type type) { return type == FETCH; @@ -126,7 +127,8 @@ class icache_sim_t : public cache_memtracer_t class dcache_sim_t : public cache_memtracer_t { public: - dcache_sim_t(const char* config) : cache_memtracer_t(config, "D$") {} + dcache_sim_t(const char* config, const char* name = "D$") + : cache_memtracer_t(config, name) {} bool interested_in_range(uint64_t UNUSED begin, uint64_t UNUSED end, access_type type) { return type == LOAD || type == STORE; |