47#ifndef __MEM_CACHE_INDEXING_POLICIES_BASE_HH__
48#define __MEM_CACHE_INDEXING_POLICIES_BASE_HH__
52#include "params/BaseIndexingPolicy.hh"
58class ReplaceableEntry;
A common base class for indexing table locations.
virtual Addr regenerateAddr(const Addr tag, const ReplaceableEntry *entry) const =0
Regenerate an entry's address from its tag and assigned indexing bits.
std::vector< std::vector< ReplaceableEntry * > > sets
The cache sets.
const int setShift
The amount to shift the address to get the set.
void setEntry(ReplaceableEntry *entry, const uint64_t index)
Associate a pointer to an entry to its physical counterpart.
BaseIndexingPolicyParams Params
Convenience typedef.
virtual std::vector< ReplaceableEntry * > getPossibleEntries(const Addr addr) const =0
Find all possible entries for insertion and replacement of an address.
~BaseIndexingPolicy()
Destructor.
const uint32_t numSets
The number of sets in the cache.
virtual Addr extractTag(const Addr addr) const
Generate the tag from the given address.
const unsigned setMask
Mask out all bits that aren't part of the set index.
BaseIndexingPolicy(const Params &p)
Construct and initialize this policy.
const int tagShift
The amount to shift the address to get the tag.
const unsigned assoc
The associativity.
ReplaceableEntry * getEntry(const uint32_t set, const uint32_t way) const
Get an entry based on its set and way.
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Abstract superclass for simulation objects.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.