gem5
v21.0.1.0
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
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
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
o
p
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
_
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
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
struct
TreePLRURPParams;
79
80
namespace
ReplacementPolicy
{
81
82
class
TreePLRU
:
public
Base
83
{
84
private
:
104
typedef
std::vector<bool>
PLRUTree
;
105
109
const
uint64_t
numLeaves
;
110
116
uint64_t
count
;
117
121
PLRUTree
*
treeInstance
;
122
123
protected
:
128
struct
TreePLRUReplData
:
ReplacementData
129
{
135
const
uint64_t
index
;
136
142
std::shared_ptr<PLRUTree>
tree
;
143
150
TreePLRUReplData
(
const
uint64_t
index
, std::shared_ptr<PLRUTree>
tree
);
151
};
152
153
public
:
154
typedef
TreePLRURPParams
Params
;
155
TreePLRU
(
const
Params
&
p
);
156
~TreePLRU
() =
default
;
157
164
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
165
const override
;
166
173
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
174
override
;
175
182
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
183
override
;
184
192
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
193
override
;
194
205
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
206
};
207
208
}
// namespace ReplacementPolicy
209
210
#endif // __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__
ReplacementPolicy::TreePLRU::treeInstance
PLRUTree * treeInstance
Holds the latest temporary tree instance created by instantiateEntry().
Definition:
tree_plru_rp.hh:121
ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition:
replaceable_entry.hh:57
ReplacementPolicy::TreePLRU
Definition:
tree_plru_rp.hh:82
ReplacementPolicy::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:134
ReplacementPolicy::TreePLRU::TreePLRU
TreePLRU(const Params &p)
Definition:
tree_plru_rp.cc:100
ReplacementPolicy::TreePLRU::count
uint64_t count
Count of the number of sharers of a replacement data.
Definition:
tree_plru_rp.hh:116
std::vector< bool >
ReplacementPolicy::TreePLRU::~TreePLRU
~TreePLRU()=default
ReplacementPolicy::TreePLRU::TreePLRUReplData::TreePLRUReplData
TreePLRUReplData(const uint64_t index, std::shared_ptr< PLRUTree > tree)
Default constructor.
Definition:
tree_plru_rp.cc:94
ReplacementPolicy::TreePLRU::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition:
tree_plru_rp.cc:108
ReplacementPolicy
Copyright (c) 2018-2020 Inria All rights reserved.
Definition:
stride.hh:64
ReplacementPolicy::TreePLRU::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
tree_plru_rp.cc:160
ReplacementPolicy::TreePLRU::numLeaves
const uint64_t numLeaves
Number of leaves that share a single replacement data.
Definition:
tree_plru_rp.hh:109
ReplacementPolicy::ReplacementData
The replacement data needed by replacement policies.
Definition:
replaceable_entry.hh:43
ReplacementPolicy::Base::Params
BaseReplacementPolicyParams Params
Definition:
base.hh:51
ReplacementPolicy::TreePLRU::TreePLRUReplData::tree
std::shared_ptr< PLRUTree > tree
Shared tree pointer.
Definition:
tree_plru_rp.hh:142
ReplacementPolicy::Base
A common base class of cache replacement policy objects.
Definition:
base.hh:48
base.hh
ReplacementPolicy::TreePLRU::TreePLRUReplData::index
const uint64_t index
Theoretical index of this replacement data in the tree.
Definition:
tree_plru_rp.hh:135
ReplacementPolicy::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:104
ReplacementPolicy::TreePLRU::Params
TreePLRURPParams Params
Definition:
tree_plru_rp.hh:154
ReplacementPolicy::TreePLRU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
tree_plru_rp.cc:196
MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:323
ReplacementPolicy::TreePLRU::TreePLRUReplData
Tree-PLRU-specific implementation of replacement data.
Definition:
tree_plru_rp.hh:128
ReplacementPolicy::TreePLRU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using TreePLRU bits.
Definition:
tree_plru_rp.cc:168
Generated on Tue Jun 22 2021 15:28:29 for gem5 by
doxygen
1.8.17