gem5  v21.1.0.2
associative_set.hh
Go to the documentation of this file.
1 
29 #ifndef __CACHE_PREFETCH_ASSOCIATIVE_SET_HH__
30 #define __CACHE_PREFETCH_ASSOCIATIVE_SET_HH__
31 
35 
36 namespace gem5
37 {
38 
44 template<class Entry>
46 {
47  static_assert(std::is_base_of<TaggedEntry, Entry>::value,
48  "Entry must derive from TaggedEntry");
49 
51  const int associativity;
57  const int numEntries;
64 
65  public:
75  AssociativeSet(int assoc, int num_entries, BaseIndexingPolicy *idx_policy,
76  replacement_policy::Base *rpl_policy, Entry const &init_val = Entry());
77 
85  Entry* findEntry(Addr addr, bool is_secure) const;
86 
92  void accessEntry(Entry *entry);
93 
100 
108 
115  void insertEntry(Addr addr, bool is_secure, Entry* entry);
116 
122  void invalidate(Entry* entry);
123 
127 
133  {
134  return entries.begin();
135  }
136 
143  {
144  return entries.end();
145  }
146 
152  {
153  return entries.begin();
154  }
155 
162  {
163  return entries.end();
164  }
165 };
166 
167 } // namespace gem5
168 
169 #endif//__CACHE_PREFETCH_ASSOCIATIVE_SET_HH__
tagged_entry.hh
gem5::AssociativeSet::invalidate
void invalidate(Entry *entry)
Invalidate an entry and its respective replacement data.
Definition: associative_set_impl.hh:121
gem5::AssociativeSet::associativity
const int associativity
Associativity of the container.
Definition: associative_set.hh:48
gem5::AssociativeSet::insertEntry
void insertEntry(Addr addr, bool is_secure, Entry *entry)
Indicate that an entry has just been inserted.
Definition: associative_set_impl.hh:113
gem5::AssociativeSet::entries
std::vector< Entry > entries
Vector containing the entries of the container.
Definition: associative_set.hh:63
gem5::BaseIndexingPolicy
A common base class for indexing table locations.
Definition: base.hh:66
gem5::AssociativeSet::end
const_iterator end() const
Returns an iterator pointing to the end of the the dictionary (placeholder element,...
Definition: associative_set.hh:161
gem5::AssociativeSet< gem5::prefetch::SignaturePath::PatternEntry >::const_iterator
typename std::vector< gem5::prefetch::SignaturePath::PatternEntry >::const_iterator const_iterator
Iterator types.
Definition: associative_set.hh:125
std::vector< Entry >
gem5::AssociativeSet::begin
iterator begin()
Returns an iterator to the first entry of the dictionary.
Definition: associative_set.hh:132
base.hh
gem5::AssociativeSet::begin
const_iterator begin() const
Returns an iterator to the first entry of the dictionary.
Definition: associative_set.hh:151
gem5::AssociativeSet< gem5::prefetch::SignaturePath::PatternEntry >::iterator
typename std::vector< gem5::prefetch::SignaturePath::PatternEntry >::iterator iterator
Definition: associative_set.hh:126
gem5::AssociativeSet::indexingPolicy
BaseIndexingPolicy *const indexingPolicy
Pointer to the indexing policy.
Definition: associative_set.hh:59
gem5::AssociativeSet::AssociativeSet
AssociativeSet(int assoc, int num_entries, BaseIndexingPolicy *idx_policy, replacement_policy::Base *rpl_policy, Entry const &init_val=Entry())
Public constructor.
Definition: associative_set_impl.hh:39
gem5::AssociativeSet
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
Definition: associative_set.hh:45
gem5::AssociativeSet::end
iterator end()
Returns an iterator pointing to the end of the the dictionary (placeholder element,...
Definition: associative_set.hh:142
gem5::replacement_policy::Base
A common base class of cache replacement policy objects.
Definition: base.hh:55
base.hh
gem5::auxv::Entry
@ Entry
Definition: aux_vector.hh:78
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::AssociativeSet::findVictim
Entry * findVictim(Addr addr)
Find a victim to be replaced.
Definition: associative_set_impl.hh:83
gem5::AssociativeSet::getPossibleEntries
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...
Definition: associative_set_impl.hh:98
gem5::AssociativeSet::accessEntry
void accessEntry(Entry *entry)
Do an access to the entry, this is required to update the replacement information data.
Definition: associative_set_impl.hh:76
gem5::AssociativeSet::replacementPolicy
replacement_policy::Base *const replacementPolicy
Pointer to the replacement policy.
Definition: associative_set.hh:61
gem5::AssociativeSet::findEntry
Entry * findEntry(Addr addr, bool is_secure) const
Find an entry within the set.
Definition: associative_set_impl.hh:58
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::AssociativeSet::numEntries
const int numEntries
Total number of entries, entries are organized in sets of the provided associativity.
Definition: associative_set.hh:57
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84

Generated on Tue Sep 21 2021 12:25:29 for gem5 by doxygen 1.8.17