40 #include "debug/CacheRepl.hh"
68 idx = (idx + 1) %
assoc;
76 DPRINTF(CacheRepl,
"set %x: selecting blk %x for replacement\n",
96 RandomReplParams::create()
unsigned allocAssoc
The allocatable associativity of the cache (alloc mask).
Declares a basic cache interface BaseCache.
void invalidate(CacheBlk *blk)
Invalidate the given block.
void insertBlock(PacketPtr pkt, CacheBlk *blk) override
Insert the new block into the cache.
Cycles is a wrapper class for representing cycle counts, i.e.
CacheBlk * findVictim(Addr addr)
Find an invalid block to evict for the address provided.
CacheBlk * accessBlock(Addr addr, bool is_secure, Cycles &lat) override
Access block and update replacement data.
std::enable_if< std::is_integral< T >::value, T >::type random()
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating po...
Blktype ** blks
Cache blocks in this set, maintained in LRU order 0 = MRU.
void insertBlock(PacketPtr pkt, BlkType *blk)
Insert the new block into the cache.
CacheBlk * findVictim(Addr addr) override
Find an invalid block to evict for the address provided.
A BaseSetAssoc cache tag store.
SetType * sets
The cache sets.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void invalidate(CacheBlk *blk) override
Invalidate the given block.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
int extractSet(Addr addr) const override
Calculate the set index from the address.
const unsigned assoc
The associativity of the cache.
CacheBlk * accessBlock(Addr addr, bool is_secure, Cycles &lat)
Access block and update replacement data.
bool isValid() const
Checks that a block is valid.
RandomRepl(const Params *p)
Construct and initiliaze this tag store.
Declaration of a random replacement tag store.
Addr regenerateBlkAddr(Addr tag, unsigned set) const override
Regenerate the block address from the tag.