Cache Model¶
-
class CACHE : public champsim::operable¶
-
-
struct prefetcher_module_concept¶
Subclassed by CACHE::prefetcher_module_model< Ps >
-
template<typename ...Ps>
struct prefetcher_module_model : public CACHE::prefetcher_module_concept¶
-
struct replacement_module_concept¶
Subclassed by CACHE::replacement_module_model< Rs >
-
template<typename ...Rs>
struct replacement_module_model : public CACHE::replacement_module_concept¶
-
struct prefetcher_module_concept¶
Builder¶
-
template<typename P = cache_builder_module_type_holder<>, typename R = cache_builder_module_type_holder<>>
class cache_builder : public champsim::detail::cache_builder_base¶ Public Functions
-
self_type &name(std::string name_)¶
Specify the name of the cache. This will be a unique identifier in the statistics.
-
self_type &clock_period(champsim::chrono::picoseconds clock_period_)¶
Specify the clock period of the cache.
-
self_type &size(champsim::data::bytes size_)¶
Specify the size of the cache.
If the number of sets or ways is not specified, this value can be used to derive them.
-
self_type &log2_size(uint64_t log2_size_)¶
Specify the logarithm of the cache size.
-
self_type &sets(uint32_t sets_)¶
Specify the number of sets in the cache.
-
self_type &log2_sets(uint32_t log2_sets_)¶
Specify the logarithm of the number of sets in the cache.
-
self_type &ways(uint32_t ways_)¶
Specify the number of ways in the cache.
-
self_type &log2_ways(uint32_t log2_ways_)¶
Specify the logarithm of the number of ways in the cache.
-
self_type &pq_size(uint32_t pq_size_)¶
Specify the size of the internal prefetch queue.
-
self_type &mshr_size(uint32_t mshr_size_)¶
Specify the number of MSHRs. If this is not specified, it will be derived from the number of sets, fill latency, and fill bandwidth.
-
self_type &latency(uint64_t lat_)¶
Specify the latency of the cache, in cycles. If the hit latency and fill latency are not specified, this will be distributed evenly between them.
-
self_type &hit_latency(uint64_t hit_lat_)¶
Specify the latency of the cache’s tag check, in cycles.
-
self_type &fill_latency(uint64_t fill_lat_)¶
Specify the latency of the cache fill operation, in cycles.
-
self_type &tag_bandwidth(champsim::bandwidth::maximum_type max_read_)¶
Specify the bandwidth of the cache’s tag check.
-
self_type &fill_bandwidth(champsim::bandwidth::maximum_type max_write_)¶
Specify the bandwidth of the cache fill.
-
self_type &offset_bits(champsim::data::bits offset_bits_)¶
Specify the number of bits to be used as a block offset.
-
self_type &log2_offset_bits(unsigned log2_offset_bits_)¶
Specify the logarithm of the number of bits to be used as a block offset.
-
self_type &set_prefetch_as_load()¶
Specify that prefetches should be issued with the same priority as loads.
-
self_type &reset_prefetch_as_load()¶
Specify that prefetches should be issued with lower priority than loads.
-
self_type &set_wq_checks_full_addr()¶
Specify that the write queue should check the full address (including the offset) when determining collisions.
-
self_type &reset_wq_checks_full_addr()¶
Specify that the write queue should ignore the offset bits when determining collisions.
-
self_type &set_virtual_prefetch()¶
Specify that prefetchers should operate in the virtual address space.
-
self_type &reset_virtual_prefetch()¶
Specify that prefetchers should operate in the physical address space.
-
template<typename ...Elems>
self_type &prefetch_activate(Elems... pref_act_elems)¶ Specify the
access_type
values that should activate the prefetcher.
-
self_type &upper_levels(std::vector<champsim::channel*> &&uls_)¶
Specify the upper levels to this cache.
-
self_type &lower_level(champsim::channel *ll_)¶
Specify the lower level of the cache.
-
self_type &lower_translate(champsim::channel *lt_)¶
Specify the translator (TLB) for this cache.
-
template<typename ...Ps>
cache_builder<cache_builder_module_type_holder<Ps...>, R> prefetcher()¶ Specify the cache prefetcher.
-
template<typename ...Rs>
cache_builder<P, cache_builder_module_type_holder<Rs...>> replacement()¶ Specify the cache replacement policy.
-
self_type &name(std::string name_)¶