data.cache.write_only ≡
template < typename Key, typename Word, auto WordCount, typename LUtime, auto Associativity, auto Depth, auto Banks = 1 > class cache §source
A cache that only supports write operations with word-enable bits.
Parameters
-
typename KeyThe type of key for looking up a value in the cache.
-
typename WordThe type of a single word stored in the cache.
-
auto WordCountThe maximum number of words that can be written at one time.
-
typename LUtimeThe type to use for storing the time a cache entry was most recently used. Using a wider type makes LRU eviction more accurate for a set associative cache, but for a direct cache where LRU does not apply, using uint1 saves space.
-
auto AssociativityThe number of entries to store for a given hash value, keeping the most recently used values. Pass 1 to create a directly mapped cache.
-
auto DepthThe total number of entries to cache. Must be a multiple of
Associativity. -
auto Banks = 1
The number of memory banks cache memory is split into.
Callbacks and Fields
Methods
-
void initialize() §source
Initialize the cache. This must be called before using the cache. The caller must ensure that
intializeis not called concurrently with other methods. -
void flush() §source
Write any unwritten data out of the cache. The caller must ensure that
flushis not called concurrently with other methods. -
void write( Key key, cache::set_index_t set_index, optional<Word>[WordCount] words ) §source