gem5
v24.0.0.0
Loading...
Searching...
No Matches
mem
cache
replacement_policies
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
"
56
#include "
mem/cache/replacement_policies/base.hh
"
57
58
namespace
gem5
59
{
60
61
struct
BRRIPRPParams;
62
63
namespace
replacement_policy
64
{
65
66
class
BRRIP
:
public
Base
67
{
68
protected
:
70
struct
BRRIPReplData
:
ReplacementData
71
{
79
SatCounter8
rrpv
;
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__
gem5::GenericSatCounter< uint8_t >
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::BRRIP
Definition
brrip_rp.hh:67
gem5::replacement_policy::BRRIP::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using rrpv.
Definition
brrip_rp.cc:96
gem5::replacement_policy::BRRIP::Params
BRRIPRPParams Params
Definition
brrip_rp.hh:115
gem5::replacement_policy::BRRIP::~BRRIP
~BRRIP()=default
gem5::replacement_policy::BRRIP::numRRPVBits
const unsigned numRRPVBits
Number of RRPV bits.
Definition
brrip_rp.hh:99
gem5::replacement_policy::BRRIP::invalidate
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
gem5::replacement_policy::BRRIP::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition
brrip_rp.cc:62
gem5::replacement_policy::BRRIP::BRRIP
BRRIP(const Params &p)
Definition
brrip_rp.cc:44
gem5::replacement_policy::BRRIP::hitPriority
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
gem5::replacement_policy::BRRIP::btp
const unsigned btp
Bimodal throtle parameter.
Definition
brrip_rp.hh:112
gem5::replacement_policy::BRRIP::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition
brrip_rp.cc:145
gem5::replacement_policy::Base
A common base class of cache replacement policy objects.
Definition
base.hh:55
std::vector
STL vector class.
Definition
stl.hh:37
base.hh
gem5::MipsISA::p
Bitfield< 0 > p
Definition
pra_constants.hh:326
gem5::statistics::reset
void reset()
Definition
statistics.cc:309
gem5
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition
binary32.hh:36
sat_counter.hh
gem5::replacement_policy::BRRIP::BRRIPReplData
BRRIP-specific implementation of replacement data.
Definition
brrip_rp.hh:71
gem5::replacement_policy::BRRIP::BRRIPReplData::valid
bool valid
Whether the entry is valid.
Definition
brrip_rp.hh:82
gem5::replacement_policy::BRRIP::BRRIPReplData::BRRIPReplData
BRRIPReplData(const int num_bits)
Default constructor.
Definition
brrip_rp.hh:87
gem5::replacement_policy::BRRIP::BRRIPReplData::rrpv
SatCounter8 rrpv
Re-Reference Interval Prediction Value.
Definition
brrip_rp.hh:79
gem5::replacement_policy::ReplacementData
The replacement data needed by replacement policies.
Definition
replaceable_entry.hh:48
Generated on Tue Jun 18 2024 16:24:05 for gem5 by
doxygen
1.11.0