gem5  v21.2.1.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lfu_rp.hh
Go to the documentation of this file.
1 
37 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
38 #define __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
39 
41 
42 namespace gem5
43 {
44 
45 struct LFURPParams;
46 
47 GEM5_DEPRECATED_NAMESPACE(ReplacementPolicy, replacement_policy);
48 namespace replacement_policy
49 {
50 
51 class LFU : public Base
52 {
53  protected:
56  {
58  unsigned refCount;
59 
64  };
65 
66  public:
67  typedef LFURPParams Params;
68  LFU(const Params &p);
69  ~LFU() = default;
70 
77  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
78  override;
79 
86  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
87  override;
88 
95  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
96  override;
97 
104  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
105  override;
106 
112  std::shared_ptr<ReplacementData> instantiateEntry() override;
113 };
114 
115 } // namespace replacement_policy
116 } // namespace gem5
117 
118 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
gem5::replacement_policy::LFU::Params
LFURPParams Params
Definition: lfu_rp.hh:67
gem5::replacement_policy::Base::Params
BaseReplacementPolicyParams Params
Definition: base.hh:58
gem5::replacement_policy::LFU::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition: lfu_rp.cc:49
gem5::replacement_policy::LFU
Definition: lfu_rp.hh:51
gem5::replacement_policy::LFU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lfu_rp.cc:91
std::vector
STL vector class.
Definition: stl.hh:37
gem5::replacement_policy::LFU::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lfu_rp.cc:63
gem5::replacement_policy::LFU::LFU
LFU(const Params &p)
Definition: lfu_rp.cc:43
gem5::replacement_policy::LFU::LFUReplData::refCount
unsigned refCount
Number of references to this entry since it was reset.
Definition: lfu_rp.hh:58
gem5::replacement_policy::ReplacementData
The replacement data needed by replacement policies.
Definition: replaceable_entry.hh:49
gem5::replacement_policy::LFU::~LFU
~LFU()=default
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::replacement_policy::LFU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using reference frequency.
Definition: lfu_rp.cc:70
gem5::replacement_policy::Base
A common base class of cache replacement policy objects.
Definition: base.hh:55
base.hh
gem5::replacement_policy::LFU::LFUReplData::LFUReplData
LFUReplData()
Default constructor.
Definition: lfu_rp.hh:63
gem5::GEM5_DEPRECATED_NAMESPACE
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
gem5::ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition: replaceable_entry.hh:63
gem5::replacement_policy::LFU::LFUReplData
LFU-specific implementation of replacement data.
Definition: lfu_rp.hh:55
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: tlb.cc:60
gem5::replacement_policy::LFU::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: lfu_rp.cc:56

Generated on Wed May 4 2022 12:13:59 for gem5 by doxygen 1.8.17