gem5  v20.0.0.3
lru_rp.hh
Go to the documentation of this file.
1 
35 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_LRU_RP_HH__
36 #define __MEM_CACHE_REPLACEMENT_POLICIES_LRU_RP_HH__
37 
39 
40 struct LRURPParams;
41 
43 {
44  protected:
47  {
50 
54  LRUReplData() : lastTouchTick(0) {}
55  };
56 
57  public:
59  typedef LRURPParams Params;
60 
64  LRURP(const Params *p);
65 
69  ~LRURP() {}
70 
77  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
78  const 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 #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:42
LRURP(const Params *p)
Construct and initiliaze this replacement policy.
Definition: lru_rp.cc:36
LRUReplData()
Default constructor.
Definition: lru_rp.hh:54
A common base class of cache replacement policy objects.
Definition: base.hh:46
STL vector class.
Definition: stl.hh:37
LRU-specific implementation of replacement data.
Definition: lru_rp.hh:46
Copyright (c) 2018 Inria All rights reserved.
uint64_t Tick
Tick count type.
Definition: types.hh:61
LRURPParams Params
Convenience typedef.
Definition: lru_rp.hh:59
Definition: lru_rp.hh:42
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lru_rp.cc:59
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using LRU timestamps.
Definition: lru_rp.cc:67
~LRURP()
Destructor.
Definition: lru_rp.hh:69
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lru_rp.cc:88
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:51
Tick lastTouchTick
Tick on which the entry was last touched.
Definition: lru_rp.hh:49
Bitfield< 0 > p

Generated on Fri Jul 3 2020 15:53:03 for gem5 by doxygen 1.8.13