Go to the documentation of this file.
53 :
BaseTags(
p), allocAssoc(
p.assoc), blks(
p.size /
p.block_size),
54 sequentialAccess(
p.sequential_access),
55 replacementPolicy(
p.replacement_policy)
58 fatal_if(!
p.indexing_policy,
"An indexing policy is required");
62 fatal(
"Block size must be at least 4 and a power of 2");
70 for (
unsigned blk_index = 0; blk_index <
numBlocks; blk_index++) {
#define fatal(...)
This implements a cprintf based fatal() function.
ReplacementPolicy::Base * replacementPolicy
Replacement policy.
void tagsInit() override
Initialize blocks as CacheBlk instances.
virtual void reset(const std::shared_ptr< ReplacementData > &replacement_data) const =0
Reset replacement data.
void invalidate(CacheBlk *blk) override
This function updates the tags when a block is invalidated.
void setEntry(ReplaceableEntry *entry, const uint64_t index)
Associate a pointer to an entry to its physical counterpart.
std::shared_ptr< ReplacementPolicy::ReplacementData > replacementData
Replacement data associated to this entry.
BaseSetAssoc(const Params &p)
Construct and initialize this tag store.
virtual void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const =0
Invalidate replacement data to set it as the next probable victim.
virtual std::shared_ptr< ReplacementData > instantiateEntry()=0
Instantiate a replacement data entry.
uint8_t * data
Contains a copy of the data in this block for easy access.
void moveBlock(CacheBlk *src_blk, CacheBlk *dest_blk) override
Move a block's metadata to another location decided by the replacement policy.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
bool isPowerOf2(const T &n)
std::vector< CacheBlk > blks
The cache blocks.
Generated on Tue Mar 23 2021 19:41:27 for gem5 by doxygen 1.8.17