gem5
[DEVELOP-FOR-23.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
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 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
d
e
f
g
h
i
l
m
n
o
p
s
t
v
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
mem
cache
replacement_policies
second_chance_rp.hh
Go to the documentation of this file.
1
38
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__
39
#define __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__
40
41
#include "
mem/cache/replacement_policies/base.hh
"
42
#include "
mem/cache/replacement_policies/fifo_rp.hh
"
43
44
namespace
gem5
45
{
46
47
struct
SecondChanceRPParams;
48
49
namespace
replacement_policy
50
{
51
52
class
SecondChance
:
public
FIFO
53
{
54
protected
:
56
struct
SecondChanceReplData
:
public
FIFOReplData
57
{
63
bool
hasSecondChance
;
64
68
SecondChanceReplData
() :
FIFOReplData
(),
hasSecondChance
(false) {}
69
};
70
76
void
useSecondChance
(
77
const
std::shared_ptr<SecondChanceReplData>& replacement_data)
const
;
78
79
public
:
80
typedef
SecondChanceRPParams
Params
;
81
SecondChance
(
const
Params
&
p
);
82
~SecondChance
() =
default
;
83
91
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
92
override
;
93
99
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
100
override
;
101
109
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
110
override
;
111
119
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
120
override
;
121
127
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
128
};
129
130
}
// namespace replacement_policy
131
}
// namespace gem5
132
133
#endif // __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__
gem5::replacement_policy::SecondChance::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its re-insertion tick and second chance bit.
Definition:
second_chance_rp.cc:69
fifo_rp.hh
Copyright (c) 2018-2020 Inria All rights reserved.
gem5::replacement_policy::SecondChance::SecondChanceReplData::SecondChanceReplData
SecondChanceReplData()
Default constructor.
Definition:
second_chance_rp.hh:68
gem5::replacement_policy::Base::Params
BaseReplacementPolicyParams Params
Definition:
base.hh:57
std::vector
STL vector class.
Definition:
stl.hh:37
gem5::replacement_policy::SecondChance::Params
SecondChanceRPParams Params
Definition:
second_chance_rp.hh:80
gem5::replacement_policy::SecondChance::SecondChanceReplData::hasSecondChance
bool hasSecondChance
This is different from isTouched because isTouched accounts only for insertion, while this bit is res...
Definition:
second_chance_rp.hh:63
gem5::VegaISA::p
Bitfield< 54 > p
Definition:
pagetable.hh:70
gem5::replacement_policy::SecondChance::SecondChance
SecondChance(const Params &p)
Definition:
second_chance_rp.cc:41
gem5::replacement_policy::SecondChance::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
second_chance_rp.cc:135
gem5::replacement_policy::SecondChance::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition:
second_chance_rp.cc:58
gem5::replacement_policy::SecondChance::SecondChanceReplData
Second-Chance-specific implementation of replacement data.
Definition:
second_chance_rp.hh:56
base.hh
gem5::replacement_policy::SecondChance::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using insertion timestamps and second chance bit.
Definition:
second_chance_rp.cc:91
gem5::replacement_policy::FIFO
Definition:
fifo_rp.hh:50
gem5::replacement_policy::SecondChance::~SecondChance
~SecondChance()=default
gem5::replacement_policy::SecondChance::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
second_chance_rp.cc:80
gem5::replacement_policy::SecondChance::useSecondChance
void useSecondChance(const std::shared_ptr< SecondChanceReplData > &replacement_data) const
Use replacement data's second chance.
Definition:
second_chance_rp.cc:47
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:62
gem5::replacement_policy::SecondChance
Definition:
second_chance_rp.hh:52
gem5::replacement_policy::FIFO::FIFOReplData
FIFO-specific implementation of replacement data.
Definition:
fifo_rp.hh:54
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
gpu_translation_state.hh:37
Generated on Sun Jul 30 2023 01:56:57 for gem5 by
doxygen
1.8.17