50 #include "debug/CacheRepl.hh"
66 DPRINTF(CacheRepl,
"set %x: moving blk %x (%s) to MRU\n",
68 is_secure ?
"s" :
"ns");
80 for (
int i =
assoc - 1;
i >= 0;
i--) {
90 DPRINTF(CacheRepl,
"set %x: selecting blk %x for replacement\n",
119 return new LRU(
this);
unsigned allocAssoc
The allocatable associativity of the cache (alloc mask).
Declares a basic cache interface BaseCache.
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.
void invalidate(CacheBlk *blk)
Invalidate the given block.
Addr tag
Data block tag value.
Declaration of a LRU tag store.
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.
Blktype ** blks
Cache blocks in this set, maintained in LRU order 0 = MRU.
void moveToHead(Blktype *blk)
Move the given block to the head of the list.
A BaseSetAssoc cache tag store.
void insertBlock(PacketPtr pkt, BlkType *blk)
Insert the new block into the cache.
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...
CacheBlk * accessBlock(Addr addr, bool is_secure, Cycles &lat)
Access block and update replacement data.
int extractSet(Addr addr) const override
Calculate the set index from the address.
const unsigned assoc
The associativity of the cache.
void moveToTail(Blktype *blk)
Move the given block to the tail of the list.
int set
The set and way this block belongs to.
bool isValid() const
Checks that a block is valid.
Addr regenerateBlkAddr(Addr tag, unsigned set) const override
Regenerate the block address from the tag.
LRU(const Params *p)
Construct and initialize this tag store.