gem5 v24.0.0.0
Loading...
Searching...
No Matches
brrip_rp.hh
Go to the documentation of this file.
1
52#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_BRRIP_RP_HH__
53#define __MEM_CACHE_REPLACEMENT_POLICIES_BRRIP_RP_HH__
54
55#include "base/sat_counter.hh"
57
58namespace gem5
59{
60
61struct BRRIPRPParams;
62
63namespace replacement_policy
64{
65
66class BRRIP : public Base
67{
68 protected:
71 {
80
82 bool valid;
83
87 BRRIPReplData(const int num_bits)
88 : rrpv(num_bits), valid(false)
89 {
90 }
91 };
92
99 const unsigned numRRPVBits;
100
106 const bool hitPriority;
107
112 const unsigned btp;
113
114 public:
115 typedef BRRIPRPParams Params;
116 BRRIP(const Params &p);
117 ~BRRIP() = default;
118
125 void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
126 override;
127
133 void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
134 override;
135
142 void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
143 override;
144
151 ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
152 override;
153
159 std::shared_ptr<ReplacementData> instantiateEntry() override;
160};
161
162} // namespace replacement_policy
163} // namespace gem5
164
165#endif // __MEM_CACHE_REPLACEMENT_POLICIES_BRRIP_RP_HH__
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using rrpv.
Definition brrip_rp.cc:96
const unsigned numRRPVBits
Number of RRPV bits.
Definition brrip_rp.hh:99
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition brrip_rp.cc:52
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition brrip_rp.cc:62
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:106
const unsigned btp
Bimodal throtle parameter.
Definition brrip_rp.hh:112
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition brrip_rp.cc:145
A common base class of cache replacement policy objects.
Definition base.hh:55
STL vector class.
Definition stl.hh:37
Bitfield< 0 > p
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
BRRIP-specific implementation of replacement data.
Definition brrip_rp.hh:71
bool valid
Whether the entry is valid.
Definition brrip_rp.hh:82
BRRIPReplData(const int num_bits)
Default constructor.
Definition brrip_rp.hh:87
SatCounter8 rrpv
Re-Reference Interval Prediction Value.
Definition brrip_rp.hh:79
The replacement data needed by replacement policies.

Generated on Tue Jun 18 2024 16:24:05 for gem5 by doxygen 1.11.0