Go to the documentation of this file.
46 #ifndef __MEM_CACHE_TAGS_BASE_SET_ASSOC_HH__
47 #define __MEM_CACHE_TAGS_BASE_SET_ASSOC_HH__
63 #include "params/BaseSetAssoc.hh"
136 if (blk !=
nullptr) {
144 if (blk !=
nullptr) {
169 const std::size_t
size,
181 evict_blks.push_back(victim);
212 fatal_if(ways < 1,
"Allocation limit must be greater than zero");
248 #endif //__MEM_CACHE_TAGS_BASE_SET_ASSOC_HH__
Addr regenerateBlkAddr(const CacheBlk *blk) const override
Regenerate the block address from the tag and indexing location.
virtual ~BaseSetAssoc()
Destructor.
CacheBlk * findVictim(Addr addr, const bool is_secure, const std::size_t size, std::vector< CacheBlk * > &evict_blks) override
Find replacement victim based on address.
virtual void reset(const std::shared_ptr< ReplacementData > &replacement_data, const PacketPtr pkt)
Reset replacement data.
replacement_policy::Base * replacementPolicy
Replacement policy.
virtual Addr getTag() const
Get tag associated to this block.
virtual int getWayAllocationMax() const override
Get the way allocation mask limit.
virtual std::vector< ReplaceableEntry * > getPossibleEntries(const Addr addr) const =0
Find all possible entries for insertion and replacement of an address.
Cycles is a wrapper class for representing cycle counts, i.e.
void increaseRefCount()
Get the number of references to this block since insertion.
void invalidate(CacheBlk *blk) override
This function updates the tags when a block is invalidated.
const bool sequentialAccess
Whether tags and data are accessed sequentially.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
virtual ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const =0
Find replacement victim among candidates.
BaseSetAssoc(const Params &p)
Construct and initialize this tag store.
A common base class of cache replacement policy objects.
unsigned allocAssoc
The allocatable associativity of the cache (alloc mask).
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void insertBlock(const PacketPtr pkt, CacheBlk *blk) override
Insert the new block into the cache and update replacement data.
bool anyBlk(std::function< bool(CacheBlk &)> visitor) override
Find if any of the blocks satisfies a condition.
virtual void touch(const std::shared_ptr< ReplacementData > &replacement_data, const PacketPtr pkt)
Update replacement data.
virtual void setWayAllocationMax(int ways) override
Limit the allocation for the cache ways.
std::vector< CacheBlk > blks
The cache blocks.
virtual Addr regenerateAddr(const Addr tag, const ReplaceableEntry *entry) const =0
Regenerate an entry's address from its tag and assigned indexing bits.
CacheBlk * accessBlock(const PacketPtr pkt, Cycles &lat) override
Access block and update replacement data.
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....
BaseSetAssocParams Params
Convenience typedef.
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.
Generated on Sun Jul 30 2023 01:56:57 for gem5 by doxygen 1.8.17