gem5
v20.1.0.0
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
struct
BRRIPRPParams;
59
60
class
BRRIPRP
:
public
BaseReplacementPolicy
61
{
62
protected
:
64
struct
BRRIPReplData
:
ReplacementData
65
{
73
SatCounter
rrpv
;
74
76
bool
valid
;
77
81
BRRIPReplData
(
const
int
num_bits)
82
:
rrpv
(num_bits),
valid
(false)
83
{
84
}
85
};
86
93
const
unsigned
numRRPVBits
;
94
100
const
bool
hitPriority
;
101
106
const
unsigned
btp
;
107
108
public
:
110
typedef
BRRIPRPParams
Params
;
111
115
BRRIPRP
(
const
Params
*
p
);
116
120
~BRRIPRP
() {}
121
128
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
129
const override
;
130
136
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
137
override
;
138
145
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
146
override
;
147
154
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
155
override
;
156
162
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
163
};
164
165
#endif // __MEM_CACHE_REPLACEMENT_POLICIES_BRRIP_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
BRRIPRP::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition:
brrip_rp.cc:57
BaseReplacementPolicy::Params
BaseReplacementPolicyParams Params
Convenience typedef.
Definition:
base.hh:52
BRRIPRP::Params
BRRIPRPParams Params
Convenience typedef.
Definition:
brrip_rp.hh:110
BRRIPRP::btp
const unsigned btp
Bimodal throtle parameter.
Definition:
brrip_rp.hh:106
BRRIPRP
Definition:
brrip_rp.hh:60
std::vector
STL vector class.
Definition:
stl.hh:37
ReplacementData
Copyright (c) 2018 Inria All rights reserved.
Definition:
replaceable_entry.hh:41
sat_counter.hh
BRRIPRP::invalidate
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:46
BaseReplacementPolicy
A common base class of cache replacement policy objects.
Definition:
base.hh:46
BRRIPRP::~BRRIPRP
~BRRIPRP()
Destructor.
Definition:
brrip_rp.hh:120
BRRIPRP::BRRIPReplData::rrpv
SatCounter rrpv
Re-Reference Interval Prediction Value.
Definition:
brrip_rp.hh:73
BRRIPRP::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
brrip_rp.cc:140
base.hh
SatCounter
Implements an n bit saturating counter and provides methods to increment, decrement,...
Definition:
sat_counter.hh:54
BRRIPRP::numRRPVBits
const unsigned numRRPVBits
Number of RRPV bits.
Definition:
brrip_rp.hh:93
BRRIPRP::BRRIPRP
BRRIPRP(const Params *p)
Construct and initiliaze this replacement policy.
Definition:
brrip_rp.cc:38
BRRIPRP::BRRIPReplData::BRRIPReplData
BRRIPReplData(const int num_bits)
Default constructor.
Definition:
brrip_rp.hh:81
BRRIPRP::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
brrip_rp.cc:73
BRRIPRP::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:100
MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:323
BRRIPRP::BRRIPReplData
BRRIP-specific implementation of replacement data.
Definition:
brrip_rp.hh:64
BRRIPRP::BRRIPReplData::valid
bool valid
Whether the entry is valid.
Definition:
brrip_rp.hh:76
BRRIPRP::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using rrpv.
Definition:
brrip_rp.cc:91
Generated on Wed Sep 30 2020 14:02:12 for gem5 by
doxygen
1.8.17