gem5
v21.1.0.2
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
r
s
t
v
x
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
e
f
g
h
i
l
m
n
o
p
s
t
v
Variables
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
v
w
Typedefs
a
b
c
d
h
i
m
p
s
t
u
w
Enumerations
b
h
i
o
p
Enumerator
h
i
o
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
mem
cache
replacement_policies
tree_plru_rp.hh
Go to the documentation of this file.
1
69
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__
70
#define __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__
71
72
#include <cstdint>
73
#include <memory>
74
#include <vector>
75
76
#include "
mem/cache/replacement_policies/base.hh
"
77
78
namespace
gem5
79
{
80
81
struct
TreePLRURPParams;
82
83
GEM5_DEPRECATED_NAMESPACE
(ReplacementPolicy, replacement_policy);
84
namespace
replacement_policy
85
{
86
87
class
TreePLRU
:
public
Base
88
{
89
private
:
109
typedef
std::vector<bool>
PLRUTree
;
110
114
const
uint64_t
numLeaves
;
115
121
uint64_t
count
;
122
126
PLRUTree
*
treeInstance
;
127
128
protected
:
133
struct
TreePLRUReplData
:
ReplacementData
134
{
140
const
uint64_t
index
;
141
147
std::shared_ptr<PLRUTree>
tree
;
148
155
TreePLRUReplData
(
const
uint64_t
index
, std::shared_ptr<PLRUTree>
tree
);
156
};
157
158
public
:
159
typedef
TreePLRURPParams
Params
;
160
TreePLRU
(
const
Params
&
p
);
161
~TreePLRU
() =
default
;
162
169
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
170
override
;
171
178
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
179
override
;
180
187
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
188
override
;
189
197
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
198
override
;
199
210
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
211
};
212
213
}
// namespace replacement_policy
214
}
// namespace gem5
215
216
#endif // __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__
gem5::replacement_policy::TreePLRU::TreePLRU
TreePLRU(const Params &p)
Definition:
tree_plru_rp.cc:105
gem5::replacement_policy::TreePLRU::treeInstance
PLRUTree * treeInstance
Holds the latest temporary tree instance created by instantiateEntry().
Definition:
tree_plru_rp.hh:126
gem5::replacement_policy::Base::Params
BaseReplacementPolicyParams Params
Definition:
base.hh:58
gem5::replacement_policy::TreePLRU::numLeaves
const uint64_t numLeaves
Number of leaves that share a single replacement data.
Definition:
tree_plru_rp.hh:114
gem5::replacement_policy::TreePLRU::Params
TreePLRURPParams Params
Definition:
tree_plru_rp.hh:159
gem5::replacement_policy::TreePLRU::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition:
tree_plru_rp.cc:113
std::vector< bool >
gem5::replacement_policy::TreePLRU::TreePLRUReplData::TreePLRUReplData
TreePLRUReplData(const uint64_t index, std::shared_ptr< PLRUTree > tree)
Default constructor.
Definition:
tree_plru_rp.cc:99
gem5::replacement_policy::TreePLRU::count
uint64_t count
Count of the number of sharers of a replacement data.
Definition:
tree_plru_rp.hh:121
gem5::replacement_policy::TreePLRU::TreePLRUReplData::index
const uint64_t index
Theoretical index of this replacement data in the tree.
Definition:
tree_plru_rp.hh:140
gem5::replacement_policy::TreePLRU::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
tree_plru_rp.cc:164
gem5::replacement_policy::TreePLRU::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition:
tree_plru_rp.cc:138
gem5::replacement_policy::ReplacementData
The replacement data needed by replacement policies.
Definition:
replaceable_entry.hh:49
gem5::replacement_policy::TreePLRU::PLRUTree
std::vector< bool > PLRUTree
Instead of implementing the tree itself with pointers, it is implemented as an array of bits.
Definition:
tree_plru_rp.hh:109
gem5::MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:326
gem5::replacement_policy::TreePLRU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using TreePLRU bits.
Definition:
tree_plru_rp.cc:172
gem5::replacement_policy::TreePLRU::TreePLRUReplData
Tree-PLRU-specific implementation of replacement data.
Definition:
tree_plru_rp.hh:133
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::TreePLRU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
tree_plru_rp.cc:200
gem5::replacement_policy::TreePLRU
Definition:
tree_plru_rp.hh:87
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
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
decoder.cc:40
gem5::replacement_policy::TreePLRU::~TreePLRU
~TreePLRU()=default
gem5::replacement_policy::TreePLRU::TreePLRUReplData::tree
std::shared_ptr< PLRUTree > tree
Shared tree pointer.
Definition:
tree_plru_rp.hh:147
Generated on Tue Sep 21 2021 12:25:30 for gem5 by
doxygen
1.8.17