gem5
v24.0.0.0
Loading...
Searching...
No Matches
mem
cache
replacement_policies
random_rp.hh
Go to the documentation of this file.
1
35
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_RP_HH__
36
#define __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_RP_HH__
37
38
#include "
mem/cache/replacement_policies/base.hh
"
39
40
namespace
gem5
41
{
42
43
struct
RandomRPParams;
44
45
namespace
replacement_policy
46
{
47
48
class
Random
:
public
Base
49
{
50
protected
:
52
struct
RandomReplData
:
ReplacementData
53
{
58
bool
valid
;
59
63
RandomReplData
() :
valid
(false) {}
64
};
65
66
public
:
67
typedef
RandomRPParams
Params
;
68
Random
(
const
Params
&
p
);
69
~Random
() =
default
;
70
77
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
78
override
;
79
86
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
87
override
;
88
95
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
96
override
;
97
104
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
105
override
;
106
112
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
113
};
114
115
}
// namespace replacement_policy
116
}
// namespace gem5
117
118
#endif
// __MEM_CACHE_REPLACEMENT_POLICIES_RANDOM_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::Random
Definition
random_rp.hh:49
gem5::replacement_policy::Random::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition
random_rp.cc:93
gem5::replacement_policy::Random::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition
random_rp.cc:49
gem5::replacement_policy::Random::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition
random_rp.cc:57
gem5::replacement_policy::Random::Params
RandomRPParams Params
Definition
random_rp.hh:67
gem5::replacement_policy::Random::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim at random.
Definition
random_rp.cc:70
gem5::replacement_policy::Random::~Random
~Random()=default
gem5::replacement_policy::Random::Random
Random(const Params &p)
Definition
random_rp.cc:43
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 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition
binary32.hh:36
gem5::replacement_policy::Random::RandomReplData
Random-specific implementation of replacement data.
Definition
random_rp.hh:53
gem5::replacement_policy::Random::RandomReplData::valid
bool valid
Flag informing if the replacement data is valid or not.
Definition
random_rp.hh:58
gem5::replacement_policy::Random::RandomReplData::RandomReplData
RandomReplData()
Default constructor.
Definition
random_rp.hh:63
gem5::replacement_policy::ReplacementData
The replacement data needed by replacement policies.
Definition
replaceable_entry.hh:48
Generated on Tue Jun 18 2024 16:24:05 for gem5 by
doxygen
1.11.0