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++) {
Declaration of a base set associative tag store.
std::vector< CacheBlk > blks
The cache blocks.
const bool sequentialAccess
Whether tags and data are accessed sequentially.
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.
unsigned allocAssoc
The allocatable associativity of the cache (alloc mask).
void moveBlock(CacheBlk *src_blk, CacheBlk *dest_blk) override
Move a block's metadata to another location decided by the replacement policy.
BaseSetAssocParams Params
Convenience typedef.
replacement_policy::Base * replacementPolicy
Replacement policy.
void tagsInit() override
Initialize blocks as CacheBlk instances.
uint64_t getPartitionId() const
Getter for _partitionId.
uint8_t * data
Contains a copy of the data in this block for easy access.
std::shared_ptr< replacement_policy::ReplacementData > replacementData
Replacement data associated to this entry.
void registerTagExtractor(TagExtractor ext)
static constexpr bool isPowerOf2(const T &n)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
#define fatal(...)
This implements a cprintf based fatal() function.
Copyright (c) 2024 Arm Limited All rights reserved.
static constexpr auto genTagExtractor(BTBIndexingPolicy *ip)
This helper generates a tag extractor function object which will be typically used by Replaceable ent...