Browse Source
Merge pull request #1306 from Jakub-Palider/master-override-cache-name
Allow client to override default names of caches
pull/1309/head
Andrew Waterman
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
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; |
|
|
|
|