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
bip_rp.cc
Go to the documentation of this file.
1
29
#include "
mem/cache/replacement_policies/bip_rp.hh
"
30
31
#include <memory>
32
33
#include "
base/random.hh
"
34
#include "params/BIPRP.hh"
35
#include "
sim/cur_tick.hh
"
36
37
namespace
gem5
38
{
39
40
namespace
replacement_policy
41
{
42
43
BIP::BIP
(
const
Params
&
p
)
44
:
LRU
(
p
), btp(
p
.btp)
45
{
46
}
47
48
void
49
BIP::reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
50
{
51
std::shared_ptr<LRUReplData> casted_replacement_data =
52
std::static_pointer_cast<LRUReplData>(replacement_data);
53
54
// Entries are inserted as MRU if lower than btp, LRU otherwise
55
if
(
random_mt
.
random
<
unsigned
>(1, 100) <=
btp
) {
56
casted_replacement_data->lastTouchTick =
curTick
();
57
}
else
{
58
// Make their timestamps as old as possible, so that they become LRU
59
casted_replacement_data->lastTouchTick = 1;
60
}
61
}
62
63
}
// namespace replacement_policy
64
}
// namespace gem5
gem5::curTick
Tick curTick()
The universal simulation clock.
Definition:
cur_tick.hh:46
bip_rp.hh
Copyright (c) 2018-2020 Inria All rights reserved.
gem5::replacement_policy::BIP::BIP
BIP(const Params &p)
Definition:
bip_rp.cc:43
gem5::replacement_policy::Base::Params
BaseReplacementPolicyParams Params
Definition:
base.hh:57
cur_tick.hh
random.hh
gem5::Random::random
std::enable_if_t< std::is_integral_v< T >, T > random()
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating po...
Definition:
random.hh:90
gem5::VegaISA::p
Bitfield< 54 > p
Definition:
pagetable.hh:70
gem5::replacement_policy::BIP::btp
const unsigned btp
Bimodal throtle parameter.
Definition:
bip_rp.hh:62
gem5::replacement_policy::LRU
Definition:
lru_rp.hh:48
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
gpu_translation_state.hh:37
gem5::random_mt
Random random_mt
Definition:
random.cc:99
gem5::replacement_policy::BIP::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data for an entry.
Definition:
bip_rp.cc:49
Generated on Sun Jul 30 2023 01:56:57 for gem5 by
doxygen
1.8.17