gem5  v22.1.0.0
mru_rp.hh
Go to the documentation of this file.
1 
36 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__
37 #define __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__
38 
39 #include "base/types.hh"
41 
42 namespace gem5
43 {
44 
45 struct MRURPParams;
46 
47 GEM5_DEPRECATED_NAMESPACE(ReplacementPolicy, replacement_policy);
48 namespace replacement_policy
49 {
50 
51 class MRU : public Base
52 {
53  protected:
56  {
59 
64  };
65 
66  public:
67  typedef MRURPParams Params;
68  MRU(const Params &p);
69  ~MRU() = 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_MRU_RP_HH__
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
A common base class of cache replacement policy objects.
Definition: base.hh:56
BaseReplacementPolicyParams Params
Definition: base.hh:58
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using access timestamps.
Definition: mru_rp.cc:74
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition: mru_rp.cc:50
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: mru_rp.cc:100
MRU(const Params &p)
Definition: mru_rp.cc:44
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: mru_rp.cc:66
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: mru_rp.cc:58
STL vector class.
Definition: stl.hh:37
Bitfield< 54 > p
Definition: pagetable.hh:70
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Tick
Tick count type.
Definition: types.hh:58
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
MRU-specific implementation of replacement data.
Definition: mru_rp.hh:56
MRUReplData()
Default constructor.
Definition: mru_rp.hh:63
Tick lastTouchTick
Tick on which the entry was last touched.
Definition: mru_rp.hh:58
The replacement data needed by replacement policies.

Generated on Wed Dec 21 2022 10:22:36 for gem5 by doxygen 1.9.1