gem5  v22.1.0.0
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 namespace gem5
41 {
42 
43 struct LRURPParams;
44 
45 GEM5_DEPRECATED_NAMESPACE(ReplacementPolicy, replacement_policy);
46 namespace replacement_policy
47 {
48 
49 class LRU : public Base
50 {
51  protected:
54  {
57 
62  };
63 
64  public:
65  typedef LRURPParams Params;
66  LRU(const Params &p);
67  ~LRU() = default;
68 
75  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
76  override;
77 
84  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
85  override;
86 
93  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
94  override;
95 
102  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
103  override;
104 
110  std::shared_ptr<ReplacementData> instantiateEntry() override;
111 };
112 
113 } // namespace replacement_policy
114 } // namespace gem5
115 
116 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_LRU_RP_HH__
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
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lru_rp.cc:66
LRU(const Params &p)
Definition: lru_rp.cc:44
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: lru_rp.cc:58
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition: lru_rp.cc:50
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using LRU timestamps.
Definition: lru_rp.cc:74
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lru_rp.cc:95
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)
LRU-specific implementation of replacement data.
Definition: lru_rp.hh:54
Tick lastTouchTick
Tick on which the entry was last touched.
Definition: lru_rp.hh:56
LRUReplData()
Default constructor.
Definition: lru_rp.hh:61
The replacement data needed by replacement policies.

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