gem5  v21.0.1.0
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 struct LFURPParams;
43 
44 namespace ReplacementPolicy {
45 
46 class LFU : public Base
47 {
48  protected:
51  {
53  unsigned refCount;
54 
59  };
60 
61  public:
62  typedef LFURPParams Params;
63  LFU(const Params &p);
64  ~LFU() = default;
65 
72  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
73  const override;
74 
81  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
82  override;
83 
90  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
91  override;
92 
99  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
100  override;
101 
107  std::shared_ptr<ReplacementData> instantiateEntry() override;
108 };
109 
110 } // namespace ReplacementPolicy
111 
112 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
ReplacementPolicy::LFU::LFUReplData::refCount
unsigned refCount
Number of references to this entry since it was reset.
Definition: lfu_rp.hh:53
ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition: replaceable_entry.hh:57
ReplacementPolicy::LFU::LFUReplData::LFUReplData
LFUReplData()
Default constructor.
Definition: lfu_rp.hh:58
ReplacementPolicy::LFU
Definition: lfu_rp.hh:46
ReplacementPolicy::LFU::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lfu_rp.cc:59
std::vector
STL vector class.
Definition: stl.hh:37
ReplacementPolicy::LFU::LFU
LFU(const Params &p)
Definition: lfu_rp.cc:38
ReplacementPolicy::LFU::~LFU
~LFU()=default
ReplacementPolicy
Copyright (c) 2018-2020 Inria All rights reserved.
Definition: stride.hh:64
ReplacementPolicy::ReplacementData
The replacement data needed by replacement policies.
Definition: replaceable_entry.hh:43
ReplacementPolicy::Base::Params
BaseReplacementPolicyParams Params
Definition: base.hh:51
ReplacementPolicy::Base
A common base class of cache replacement policy objects.
Definition: base.hh:48
ReplacementPolicy::LFU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using reference frequency.
Definition: lfu_rp.cc:66
base.hh
ReplacementPolicy::LFU::LFUReplData
LFU-specific implementation of replacement data.
Definition: lfu_rp.hh:50
ReplacementPolicy::LFU::Params
LFURPParams Params
Definition: lfu_rp.hh:62
ReplacementPolicy::LFU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lfu_rp.cc:87
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
ReplacementPolicy::LFU::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition: lfu_rp.cc:44
ReplacementPolicy::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:52

Generated on Tue Jun 22 2021 15:28:29 for gem5 by doxygen 1.8.17