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