29 #ifndef __CACHE_PREFETCH_ASSOCIATIVE_SET_HH__
30 #define __CACHE_PREFETCH_ASSOCIATIVE_SET_HH__
47 static_assert(std::is_base_of_v<TaggedEntry, Entry>,
48 "Entry must derive from TaggedEntry");
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
std::vector< Entry * > getPossibleEntries(const Addr addr) const
Find the set of entries that could be replaced given that we want to add a new entry with the provide...
const_iterator begin() const
Returns an iterator to the first entry of the dictionary.
BaseIndexingPolicy *const indexingPolicy
Pointer to the indexing policy.
replacement_policy::Base *const replacementPolicy
Pointer to the replacement policy.
const int associativity
Associativity of the container.
iterator begin()
Returns an iterator to the first entry of the dictionary.
std::vector< Entry > entries
Vector containing the entries of the container.
const int numEntries
Total number of entries, entries are organized in sets of the provided associativity.
void insertEntry(Addr addr, bool is_secure, Entry *entry)
Indicate that an entry has just been inserted.
Entry * findVictim(Addr addr)
Find a victim to be replaced.
void accessEntry(Entry *entry)
Do an access to the entry, this is required to update the replacement information data.
iterator end()
Returns an iterator pointing to the end of the the dictionary (placeholder element,...
AssociativeSet(int assoc, int num_entries, BaseIndexingPolicy *idx_policy, replacement_policy::Base *rpl_policy, Entry const &init_val=Entry())
Public constructor.
const_iterator end() const
Returns an iterator pointing to the end of the the dictionary (placeholder element,...
void invalidate(Entry *entry)
Invalidate an entry and its respective replacement data.
typename std::vector< Entry >::const_iterator const_iterator
Iterator types.
Entry * findEntry(Addr addr, bool is_secure) const
Find an entry within the set.
typename std::vector< Entry >::iterator iterator
A common base class for indexing table locations.
A common base class of cache replacement policy objects.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.