gem5
v19.0.0.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
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
+
Enumerations
a
b
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
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
k
l
m
n
o
p
r
s
t
u
v
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
i
l
m
o
p
r
s
t
v
w
+
Enumerator
a
b
c
d
e
f
g
h
i
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
random_rp.hh
Go to the documentation of this file.
1
37
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_RP_HH__
38
#define __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_RP_HH__
39
40
#include "
mem/cache/replacement_policies/base.hh
"
41
42
struct
RandomRPParams;
43
44
class
RandomRP
:
public
BaseReplacementPolicy
45
{
46
protected
:
48
struct
RandomReplData
:
ReplacementData
49
{
54
bool
valid
;
55
59
RandomReplData
() : valid(false) {}
60
};
61
62
public
:
64
typedef
RandomRPParams
Params
;
65
69
RandomRP
(
const
Params *
p
);
70
74
~RandomRP
() {}
75
82
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
83
const override
;
84
91
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
92
override
;
93
100
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
101
override
;
102
109
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
110
override
;
111
117
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
118
};
119
120
#endif // __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_RP_HH__
RandomRP::RandomReplData
MRU-specific implementation of replacement data.
Definition:
random_rp.hh:48
RandomRP::RandomReplData::RandomReplData
RandomReplData()
Default constructor.
Definition:
random_rp.hh:59
RandomRP::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim at random.
Definition:
random_rp.cc:67
RandomRP::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition:
random_rp.cc:54
BaseReplacementPolicy
A common base class of cache replacement policy objects.
Definition:
base.hh:48
std::vector
STL vector class.
Definition:
stl.hh:40
ReplacementData
Copyright (c) 2018 Inria All rights reserved.
Definition:
replaceable_entry.hh:43
RandomRP::~RandomRP
~RandomRP()
Destructor.
Definition:
random_rp.hh:74
RandomRP::Params
RandomRPParams Params
Convenience typedef.
Definition:
random_rp.hh:64
RandomRP::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
random_rp.cc:59
RandomRP
Definition:
random_rp.hh:44
ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition:
replaceable_entry.hh:55
RandomRP::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition:
random_rp.cc:45
base.hh
RandomRP::RandomReplData::valid
bool valid
Flag informing if the replacement data is valid or not.
Definition:
random_rp.hh:54
RandomRP::RandomRP
RandomRP(const Params *p)
Construct and initiliaze this replacement policy.
Definition:
random_rp.cc:39
MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:325
RandomRP::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
random_rp.cc:90
Generated on Fri Feb 28 2020 16:27:02 for gem5 by
doxygen
1.8.13