gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
brrip_rp.hh
Go to the documentation of this file.
1 
54 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_BRRIP_RP_HH__
55 #define __MEM_CACHE_REPLACEMENT_POLICIES_BRRIP_RP_HH__
56 
57 #include "base/sat_counter.hh"
59 
60 struct BRRIPRPParams;
61 
63 {
64  protected:
67  {
76 
78  bool valid;
79 
83  BRRIPReplData(const int num_bits)
84  : rrpv(num_bits), valid(false)
85  {
86  }
87  };
88 
95  const unsigned numRRPVBits;
96 
102  const bool hitPriority;
103 
108  const unsigned btp;
109 
110  public:
112  typedef BRRIPRPParams Params;
113 
117  BRRIPRP(const Params *p);
118 
122  ~BRRIPRP() {}
123 
130  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
131  const override;
132 
138  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
139  override;
140 
147  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
148  override;
149 
156  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
157  override;
158 
164  std::shared_ptr<ReplacementData> instantiateEntry() override;
165 };
166 
167 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_BRRIP_RP_HH__
bool valid
Whether the entry is valid.
Definition: brrip_rp.hh:78
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: brrip_rp.cc:142
BRRIPReplData(const int num_bits)
Default constructor.
Definition: brrip_rp.hh:83
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: brrip_rp.cc:59
A common base class of cache replacement policy objects.
Definition: base.hh:48
STL vector class.
Definition: stl.hh:40
Copyright (c) 2018 Inria All rights reserved.
const unsigned numRRPVBits
Number of RRPV bits.
Definition: brrip_rp.hh:95
const unsigned btp
Bimodal throtle parameter.
Definition: brrip_rp.hh:108
Implements an n bit saturating counter and provides methods to increment, decrement, and read it.
Definition: sat_counter.hh:57
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition: brrip_rp.cc:48
BRRIPRP(const Params *p)
Construct and initiliaze this replacement policy.
Definition: brrip_rp.cc:40
BRRIP-specific implementation of replacement data.
Definition: brrip_rp.hh:66
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: brrip_rp.cc:75
const bool hitPriority
The hit priority (HP) policy replaces entries that do not receive cache hits over any cache entry tha...
Definition: brrip_rp.hh:102
SatCounter rrpv
Re-Reference Interval Prediction Value.
Definition: brrip_rp.hh:75
BRRIPRPParams Params
Convenience typedef.
Definition: brrip_rp.hh:112
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
~BRRIPRP()
Destructor.
Definition: brrip_rp.hh:122
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using rrpv.
Definition: brrip_rp.cc:93
Bitfield< 0 > p

Generated on Fri Feb 28 2020 16:27:02 for gem5 by doxygen 1.8.13