gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mru_rp.hh
Go to the documentation of this file.
1 
38 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__
39 #define __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__
40 
41 #include "base/types.hh"
43 
44 struct MRURPParams;
45 
47 {
48  protected:
51  {
54 
58  MRUReplData() : lastTouchTick(0) {}
59  };
60 
61  public:
63  typedef MRURPParams Params;
64 
68  MRURP(const Params *p);
69 
73  ~MRURP() {}
74 
81  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
82  const override;
83 
90  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
91  override;
92 
99  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
100  override;
101 
108  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
109  override;
110 
116  std::shared_ptr<ReplacementData> instantiateEntry() override;
117 };
118 
119 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: mru_rp.cc:53
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition: mru_rp.cc:44
MRURP(const Params *p)
Construct and initiliaze this replacement policy.
Definition: mru_rp.cc:38
A common base class of cache replacement policy objects.
Definition: base.hh:48
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: mru_rp.cc:95
STL vector class.
Definition: stl.hh:40
MRUReplData()
Default constructor.
Definition: mru_rp.hh:58
Copyright (c) 2018 Inria All rights reserved.
~MRURP()
Destructor.
Definition: mru_rp.hh:73
uint64_t Tick
Tick count type.
Definition: types.hh:63
Tick lastTouchTick
Tick on which the entry was last touched.
Definition: mru_rp.hh:53
MRU-specific implementation of replacement data.
Definition: mru_rp.hh:50
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: mru_rp.cc:61
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition: mru_rp.hh:46
MRURPParams Params
Convenience typedef.
Definition: mru_rp.hh:63
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using access timestamps.
Definition: mru_rp.cc:69
Bitfield< 0 > p

Generated on Fri Feb 28 2020 16:27:02 for gem5 by doxygen 1.8.13