gem5  v20.1.0.0
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 
45 {
46  protected:
49  {
51  unsigned refCount;
52 
57  };
58 
59  public:
61  typedef LFURPParams Params;
62 
66  LFURP(const Params *p);
67 
71  ~LFURP() {}
72 
79  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
80  const override;
81 
88  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
89  override;
90 
97  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
98  override;
99 
106  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
107  override;
108 
114  std::shared_ptr<ReplacementData> instantiateEntry() override;
115 };
116 
117 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition: replaceable_entry.hh:53
BaseReplacementPolicy::Params
BaseReplacementPolicyParams Params
Convenience typedef.
Definition: base.hh:52
LFURP::~LFURP
~LFURP()
Destructor.
Definition: lfu_rp.hh:71
LFURP::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:42
std::vector
STL vector class.
Definition: stl.hh:37
ReplacementData
Copyright (c) 2018 Inria All rights reserved.
Definition: replaceable_entry.hh:41
LFURP::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using reference frequency.
Definition: lfu_rp.cc:64
LFURP::LFUReplData
LFU-specific implementation of replacement data.
Definition: lfu_rp.hh:48
LFURP::LFUReplData::refCount
unsigned refCount
Number of references to this entry since it was reset.
Definition: lfu_rp.hh:51
LFURP
Definition: lfu_rp.hh:44
BaseReplacementPolicy
A common base class of cache replacement policy objects.
Definition: base.hh:46
LFURP::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lfu_rp.cc:85
base.hh
LFURP::LFUReplData::LFUReplData
LFUReplData()
Default constructor.
Definition: lfu_rp.hh:56
LFURP::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lfu_rp.cc:57
LFURP::Params
LFURPParams Params
Convenience typedef.
Definition: lfu_rp.hh:61
LFURP::LFURP
LFURP(const Params *p)
Construct and initiliaze this replacement policy.
Definition: lfu_rp.cc:36
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
LFURP::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: lfu_rp.cc:50

Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17