gem5  v21.2.1.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
random_rp.hh
Go to the documentation of this file.
1 
35 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_RP_HH__
36 #define __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_RP_HH__
37 
39 
40 namespace gem5
41 {
42 
43 struct RandomRPParams;
44 
45 GEM5_DEPRECATED_NAMESPACE(ReplacementPolicy, replacement_policy);
46 namespace replacement_policy
47 {
48 
49 class Random : public Base
50 {
51  protected:
54  {
59  bool valid;
60 
64  RandomReplData() : valid(false) {}
65  };
66 
67  public:
68  typedef RandomRPParams Params;
69  Random(const Params &p);
70  ~Random() = default;
71 
78  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
79  override;
80 
87  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
88  override;
89 
96  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
97  override;
98 
105  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
106  override;
107 
113  std::shared_ptr<ReplacementData> instantiateEntry() override;
114 };
115 
116 } // namespace replacement_policy
117 } // namespace gem5
118 
119 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_RP_HH__
gem5::replacement_policy::Random::~Random
~Random()=default
gem5::replacement_policy::Base::Params
BaseReplacementPolicyParams Params
Definition: base.hh:58
std::vector
STL vector class.
Definition: stl.hh:37
gem5::replacement_policy::Random
Definition: random_rp.hh:49
gem5::replacement_policy::ReplacementData
The replacement data needed by replacement policies.
Definition: replaceable_entry.hh:49
gem5::replacement_policy::Random::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: random_rp.cc:63
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::replacement_policy::Random::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: random_rp.cc:94
gem5::replacement_policy::Random::Random
Random(const Params &p)
Definition: random_rp.cc:44
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::Random::RandomReplData::RandomReplData
RandomReplData()
Default constructor.
Definition: random_rp.hh:64
gem5::replacement_policy::Random::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: random_rp.cc:58
gem5::replacement_policy::Random::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition: random_rp.cc:50
gem5::replacement_policy::Random::Params
RandomRPParams Params
Definition: random_rp.hh:68
gem5::replacement_policy::Random::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim at random.
Definition: random_rp.cc:71
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::Random::RandomReplData
Random-specific implementation of replacement data.
Definition: random_rp.hh:53
gem5::replacement_policy::Random::RandomReplData::valid
bool valid
Flag informing if the replacement data is valid or not.
Definition: random_rp.hh:59
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: tlb.cc:60

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