gem5  v21.2.1.1
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__
gem5::replacement_policy::LRU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lru_rp.cc:95
gem5::replacement_policy::LRU::LRU
LRU(const Params &p)
Definition: lru_rp.cc:44
gem5::replacement_policy::Base::Params
BaseReplacementPolicyParams Params
Definition: base.hh:58
std::vector
STL vector class.
Definition: stl.hh:37
gem5::replacement_policy::LRU::LRUReplData::lastTouchTick
Tick lastTouchTick
Tick on which the entry was last touched.
Definition: lru_rp.hh:56
gem5::replacement_policy::LRU::~LRU
~LRU()=default
gem5::replacement_policy::ReplacementData
The replacement data needed by replacement policies.
Definition: replaceable_entry.hh:49
gem5::replacement_policy::LRU::LRUReplData::LRUReplData
LRUReplData()
Default constructor.
Definition: lru_rp.hh:61
gem5::replacement_policy::LRU::LRUReplData
LRU-specific implementation of replacement data.
Definition: lru_rp.hh:53
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::replacement_policy::Base
A common base class of cache replacement policy objects.
Definition: base.hh:55
base.hh
gem5::GEM5_DEPRECATED_NAMESPACE
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
gem5::replacement_policy::LRU::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: lru_rp.cc:58
gem5::replacement_policy::LRU::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lru_rp.cc:66
gem5::ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition: replaceable_entry.hh:63
gem5::replacement_policy::LRU
Definition: lru_rp.hh:49
gem5::replacement_policy::LRU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using LRU timestamps.
Definition: lru_rp.cc:74
gem5::replacement_policy::LRU::invalidate
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
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: tlb.cc:60
gem5::replacement_policy::LRU::Params
LRURPParams Params
Definition: lru_rp.hh:65

Generated on Wed May 4 2022 12:14:00 for gem5 by doxygen 1.8.17