gem5  v20.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 struct LRURPParams;
41 
43 {
44  protected:
47  {
50 
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__
ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition: replaceable_entry.hh:53
LRURP::LRUReplData::LRUReplData
LRUReplData()
Default constructor.
Definition: lru_rp.hh:54
BaseReplacementPolicy::Params
BaseReplacementPolicyParams Params
Convenience typedef.
Definition: base.hh:52
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
std::vector
STL vector class.
Definition: stl.hh:37
ReplacementData
Copyright (c) 2018 Inria All rights reserved.
Definition: replaceable_entry.hh:41
LRURP::invalidate
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:43
LRURP::LRURP
LRURP(const Params *p)
Construct and initiliaze this replacement policy.
Definition: lru_rp.cc:37
BaseReplacementPolicy
A common base class of cache replacement policy objects.
Definition: base.hh:46
LRURP::~LRURP
~LRURP()
Destructor.
Definition: lru_rp.hh:69
LRURP::LRUReplData
LRU-specific implementation of replacement data.
Definition: lru_rp.hh:46
LRURP::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: lru_rp.cc:52
LRURP::LRUReplData::lastTouchTick
Tick lastTouchTick
Tick on which the entry was last touched.
Definition: lru_rp.hh:49
base.hh
LRURP::Params
LRURPParams Params
Convenience typedef.
Definition: lru_rp.hh:59
LRURP
Definition: lru_rp.hh:42
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
LRURP::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lru_rp.cc:60
LRURP::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lru_rp.cc:89
LRURP::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using LRU timestamps.
Definition: lru_rp.cc:68

Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17