gem5
v24.0.0.0
Loading...
Searching...
No Matches
mem
cache
replacement_policies
lru_rp.hh
Go to the documentation of this file.
1
35
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_LRU_RP_HH__
36
#define __MEM_CACHE_REPLACEMENT_POLICIES_LRU_RP_HH__
37
38
#include "
mem/cache/replacement_policies/base.hh
"
39
40
namespace
gem5
41
{
42
43
struct
LRURPParams;
44
45
namespace
replacement_policy
46
{
47
48
class
LRU
:
public
Base
49
{
50
protected
:
52
struct
LRUReplData
:
ReplacementData
53
{
55
Tick
lastTouchTick
;
56
60
LRUReplData
() :
lastTouchTick
(0) {}
61
};
62
63
public
:
64
typedef
LRURPParams
Params
;
65
LRU
(
const
Params
&
p
);
66
~LRU
() =
default
;
67
74
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
75
override
;
76
83
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
84
override
;
85
92
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
93
override
;
94
101
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
102
override
;
103
109
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
110
};
111
112
}
// namespace replacement_policy
113
}
// namespace gem5
114
115
#endif
// __MEM_CACHE_REPLACEMENT_POLICIES_LRU_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::LRU
Definition
lru_rp.hh:49
gem5::replacement_policy::LRU::LRU
LRU(const Params &p)
Definition
lru_rp.cc:43
gem5::replacement_policy::LRU::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition
lru_rp.cc:57
gem5::replacement_policy::LRU::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition
lru_rp.cc:49
gem5::replacement_policy::LRU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using LRU timestamps.
Definition
lru_rp.cc:73
gem5::replacement_policy::LRU::~LRU
~LRU()=default
gem5::replacement_policy::LRU::Params
LRURPParams Params
Definition
lru_rp.hh:64
gem5::replacement_policy::LRU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition
lru_rp.cc:94
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::Tick
uint64_t Tick
Tick count type.
Definition
types.hh:58
gem5::replacement_policy::LRU::LRUReplData
LRU-specific implementation of replacement data.
Definition
lru_rp.hh:53
gem5::replacement_policy::LRU::LRUReplData::lastTouchTick
Tick lastTouchTick
Tick on which the entry was last touched.
Definition
lru_rp.hh:55
gem5::replacement_policy::LRU::LRUReplData::LRUReplData
LRUReplData()
Default constructor.
Definition
lru_rp.hh:60
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