gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
32#include <type_traits>
33
38
39namespace gem5
40{
41
47template<class Entry>
48class AssociativeSet : public AssociativeCache<Entry>
49{
50 static_assert(std::is_base_of_v<TaggedEntry, Entry>,
51 "Entry must derive from TaggedEntry");
52
53 public:
64 AssociativeSet(const char *name, const size_t num_entries,
65 const size_t associativity_,
66 replacement_policy::Base *repl_policy,
67 BaseIndexingPolicy *indexing_policy,
68 Entry const &init_val = Entry());
69
77 Entry* findEntry(Addr addr, bool is_secure) const;
78
85 void insertEntry(Addr addr, bool is_secure, Entry* entry);
86
87 private:
88 // The following APIs are excluded since they lack the secure bit
89 using AssociativeCache<Entry>::getTag;
91 using AssociativeCache<Entry>::findEntry;
94
97};
98
99} // namespace gem5
100
101#endif//__CACHE_PREFETCH_ASSOCIATIVE_SET_HH__
virtual Entry * accessEntryByAddr(const Addr addr)
Do an access to the entry if it exists.
BaseReplacementPolicy * replPolicy
The replacement policy of the cache.
BaseIndexingPolicy * indexingPolicy
Indexing policy of the cache.
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...
virtual Addr getTag(const Addr addr) const
Get the tag for the addr.
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
void insertEntry(Addr addr, bool is_secure, Entry *entry)
Indicate that an entry has just been inserted.
AssociativeSet(const char *name, const size_t num_entries, const size_t associativity_, replacement_policy::Base *repl_policy, BaseIndexingPolicy *indexing_policy, Entry const &init_val=Entry())
Public constructor.
Entry * findEntry(Addr addr, bool is_secure) const
Find an entry within the set.
A common base class for indexing table locations.
Definition base.hh:67
virtual std::string name() const
Definition named.hh:47
A common base class of cache replacement policy objects.
Definition base.hh:55
Declaration of a common framework for indexing policies.
Bitfield< 3 > addr
Definition types.hh:84
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147

Generated on Tue Jun 18 2024 16:24:05 for gem5 by doxygen 1.11.0