gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lru_rp.hh
Go to the documentation of this file.
1 
37 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_LRU_RP_HH__
38 #define __MEM_CACHE_REPLACEMENT_POLICIES_LRU_RP_HH__
39 
41 
42 struct LRURPParams;
43 
45 {
46  protected:
49  {
52 
56  LRUReplData() : lastTouchTick(0) {}
57  };
58 
59  public:
61  typedef LRURPParams Params;
62 
66  LRURP(const Params *p);
67 
71  ~LRURP() {}
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_LRU_RP_HH__
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition: lru_rp.cc:44
LRURP(const Params *p)
Construct and initiliaze this replacement policy.
Definition: lru_rp.cc:38
LRUReplData()
Default constructor.
Definition: lru_rp.hh:56
A common base class of cache replacement policy objects.
Definition: base.hh:48
STL vector class.
Definition: stl.hh:40
LRU-specific implementation of replacement data.
Definition: lru_rp.hh:48
Copyright (c) 2018 Inria All rights reserved.
uint64_t Tick
Tick count type.
Definition: types.hh:63
LRURPParams Params
Convenience typedef.
Definition: lru_rp.hh:61
Definition: lru_rp.hh:44
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lru_rp.cc:61
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using LRU timestamps.
Definition: lru_rp.cc:69
~LRURP()
Destructor.
Definition: lru_rp.hh:71
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lru_rp.cc:90
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: lru_rp.cc:53
Tick lastTouchTick
Tick on which the entry was last touched.
Definition: lru_rp.hh:51
Bitfield< 0 > p

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