gem5
v24.1.0.1
Toggle main menu visibility
Main Page
Related Pages
Topics
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
q
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
y
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 Symbols
:
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
d
e
f
g
h
i
l
m
n
o
p
s
t
v
w
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Typedefs
a
b
c
d
g
h
i
l
m
r
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
Loading...
Searching...
No Matches
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
namespace
replacement_policy
84
{
85
86
class
TreePLRU
:
public
Base
87
{
88
private
:
108
typedef
std::vector<bool>
PLRUTree
;
109
113
const
uint64_t
numLeaves
;
114
120
uint64_t
count
;
121
125
PLRUTree
*
treeInstance
;
126
127
protected
:
132
struct
TreePLRUReplData
:
ReplacementData
133
{
139
const
uint64_t
index
;
140
146
std::shared_ptr<PLRUTree>
tree
;
147
154
TreePLRUReplData
(
const
uint64_t
index
, std::shared_ptr<PLRUTree>
tree
);
155
};
132
struct
TreePLRUReplData
:
ReplacementData
{
…
};
156
157
public
:
158
typedef
TreePLRURPParams
Params
;
159
TreePLRU
(
const
Params
&
p
);
160
~TreePLRU
() =
default
;
161
168
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
169
override
;
170
177
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
178
override
;
179
186
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
187
override
;
188
196
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
197
override
;
198
209
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
210
};
86
class
TreePLRU
:
public
Base
{
…
};
211
212
}
// namespace replacement_policy
213
}
// namespace gem5
214
215
#endif
// __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__
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::Base
A common base class of cache replacement policy objects.
Definition
base.hh:55
gem5::replacement_policy::TreePLRU
Definition
tree_plru_rp.hh:87
gem5::replacement_policy::TreePLRU::numLeaves
const uint64_t numLeaves
Number of leaves that share a single replacement data.
Definition
tree_plru_rp.hh:113
gem5::replacement_policy::TreePLRU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using TreePLRU bits.
Definition
tree_plru_rp.cc:171
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:112
gem5::replacement_policy::TreePLRU::Params
TreePLRURPParams Params
Definition
tree_plru_rp.hh:158
gem5::replacement_policy::TreePLRU::~TreePLRU
~TreePLRU()=default
gem5::replacement_policy::TreePLRU::count
uint64_t count
Count of the number of sharers of a replacement data.
Definition
tree_plru_rp.hh:120
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:137
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:108
gem5::replacement_policy::TreePLRU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition
tree_plru_rp.cc:199
gem5::replacement_policy::TreePLRU::treeInstance
PLRUTree * treeInstance
Holds the latest temporary tree instance created by instantiateEntry().
Definition
tree_plru_rp.hh:125
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 Arm Limited All rights reserved.
Definition
binary32.hh:36
gem5::replacement_policy::ReplacementData
The replacement data needed by replacement policies.
Definition
replaceable_entry.hh:48
gem5::replacement_policy::TreePLRU::TreePLRUReplData
Tree-PLRU-specific implementation of replacement data.
Definition
tree_plru_rp.hh:133
gem5::replacement_policy::TreePLRU::TreePLRUReplData::tree
std::shared_ptr< PLRUTree > tree
Shared tree pointer.
Definition
tree_plru_rp.hh:146
gem5::replacement_policy::TreePLRU::TreePLRUReplData::index
const uint64_t index
Theoretical index of this replacement data in the tree.
Definition
tree_plru_rp.hh:139
Generated on Mon Jan 13 2025 04:28:38 for gem5 by
doxygen
1.9.8