gem5
v21.0.1.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
namespace
ReplacementPolicy
{
45
46
class
MRU
:
public
Base
47
{
48
protected
:
50
struct
MRUReplData
:
ReplacementData
51
{
53
Tick
lastTouchTick
;
54
58
MRUReplData
() :
lastTouchTick
(0) {}
59
};
60
61
public
:
62
typedef
MRURPParams
Params
;
63
MRU
(
const
Params
&
p
);
64
~MRU
() =
default
;
65
72
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
73
const override
;
74
81
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
82
override
;
83
90
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
91
override
;
92
99
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
100
override
;
101
107
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
108
};
109
110
}
// namespace ReplacementPolicy
111
112
#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:57
ReplacementPolicy::MRU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
mru_rp.cc:96
ReplacementPolicy::MRU::MRUReplData
MRU-specific implementation of replacement data.
Definition:
mru_rp.hh:50
ReplacementPolicy::MRU::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition:
mru_rp.cc:54
Tick
uint64_t Tick
Tick count type.
Definition:
types.hh:59
ReplacementPolicy::MRU::Params
MRURPParams Params
Definition:
mru_rp.hh:62
std::vector
STL vector class.
Definition:
stl.hh:37
ReplacementPolicy::MRU::MRUReplData::lastTouchTick
Tick lastTouchTick
Tick on which the entry was last touched.
Definition:
mru_rp.hh:53
ReplacementPolicy::MRU::~MRU
~MRU()=default
ReplacementPolicy
Copyright (c) 2018-2020 Inria All rights reserved.
Definition:
stride.hh:64
ReplacementPolicy::ReplacementData
The replacement data needed by replacement policies.
Definition:
replaceable_entry.hh:43
ReplacementPolicy::MRU::MRU
MRU(const Params &p)
Definition:
mru_rp.cc:39
ReplacementPolicy::Base::Params
BaseReplacementPolicyParams Params
Definition:
base.hh:51
ReplacementPolicy::MRU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using access timestamps.
Definition:
mru_rp.cc:70
ReplacementPolicy::Base
A common base class of cache replacement policy objects.
Definition:
base.hh:48
base.hh
ReplacementPolicy::MRU::MRUReplData::MRUReplData
MRUReplData()
Default constructor.
Definition:
mru_rp.hh:58
ReplacementPolicy::MRU::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:45
types.hh
ReplacementPolicy::MRU
Definition:
mru_rp.hh:46
MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:323
ReplacementPolicy::MRU::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
mru_rp.cc:62
Generated on Tue Jun 22 2021 15:28:29 for gem5 by
doxygen
1.8.17