gem5
v20.1.0.0
mem
cache
replacement_policies
mru_rp.hh
Go to the documentation of this file.
1
36
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__
37
#define __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__
38
39
#include "
base/types.hh
"
40
#include "
mem/cache/replacement_policies/base.hh
"
41
42
struct
MRURPParams;
43
44
class
MRURP
:
public
BaseReplacementPolicy
45
{
46
protected
:
48
struct
MRUReplData
:
ReplacementData
49
{
51
Tick
lastTouchTick
;
52
56
MRUReplData
() :
lastTouchTick
(0) {}
57
};
58
59
public
:
61
typedef
MRURPParams
Params
;
62
66
MRURP
(
const
Params
*
p
);
67
71
~MRURP
() {}
72
79
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
80
const override
;
81
88
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
89
override
;
90
97
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
98
override
;
99
106
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
107
override
;
108
114
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
115
};
116
117
#endif // __MEM_CACHE_REPLACEMENT_POLICIES_MRU_RP_HH__
ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition:
replaceable_entry.hh:53
BaseReplacementPolicy::Params
BaseReplacementPolicyParams Params
Convenience typedef.
Definition:
base.hh:52
MRURP
Definition:
mru_rp.hh:44
Tick
uint64_t Tick
Tick count type.
Definition:
types.hh:63
std::vector
STL vector class.
Definition:
stl.hh:37
ReplacementData
Copyright (c) 2018 Inria All rights reserved.
Definition:
replaceable_entry.hh:41
MRURP::MRUReplData::MRUReplData
MRUReplData()
Default constructor.
Definition:
mru_rp.hh:56
MRURP::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition:
mru_rp.cc:43
MRURP::MRUReplData::lastTouchTick
Tick lastTouchTick
Tick on which the entry was last touched.
Definition:
mru_rp.hh:51
BaseReplacementPolicy
A common base class of cache replacement policy objects.
Definition:
base.hh:46
MRURP::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
mru_rp.cc:94
base.hh
MRURP::Params
MRURPParams Params
Convenience typedef.
Definition:
mru_rp.hh:61
MRURP::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using access timestamps.
Definition:
mru_rp.cc:68
MRURP::MRUReplData
MRU-specific implementation of replacement data.
Definition:
mru_rp.hh:48
MRURP::~MRURP
~MRURP()
Destructor.
Definition:
mru_rp.hh:71
types.hh
MRURP::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition:
mru_rp.cc:52
MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:323
MRURP::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
mru_rp.cc:60
MRURP::MRURP
MRURP(const Params *p)
Construct and initiliaze this replacement policy.
Definition:
mru_rp.cc:37
Generated on Wed Sep 30 2020 14:02:12 for gem5 by
doxygen
1.8.17