gem5
v20.1.0.0
mem
cache
replacement_policies
fifo_rp.hh
Go to the documentation of this file.
1
36
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_FIFO_RP_HH__
37
#define __MEM_CACHE_REPLACEMENT_POLICIES_FIFO_RP_HH__
38
39
#include "
base/types.hh
"
40
#include "
mem/cache/replacement_policies/base.hh
"
41
42
struct
FIFORPParams;
43
44
class
FIFORP
:
public
BaseReplacementPolicy
45
{
46
protected
:
48
struct
FIFOReplData
:
ReplacementData
49
{
51
Tick
tickInserted
;
52
56
FIFOReplData
() :
tickInserted
(0) {}
57
};
58
59
public
:
61
typedef
FIFORPParams
Params
;
62
66
FIFORP
(
const
Params
*
p
);
67
71
~FIFORP
() {}
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_FIFO_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
FIFORP::FIFOReplData
FIFO-specific implementation of replacement data.
Definition:
fifo_rp.hh:48
BaseReplacementPolicy::Params
BaseReplacementPolicyParams Params
Convenience typedef.
Definition:
base.hh:52
FIFORP::FIFOReplData::tickInserted
Tick tickInserted
Tick on which the entry was inserted.
Definition:
fifo_rp.hh:51
FIFORP::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using insertion timestamps.
Definition:
fifo_rp.cc:66
FIFORP::FIFOReplData::FIFOReplData
FIFOReplData()
Default constructor.
Definition:
fifo_rp.hh:56
FIFORP::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition:
fifo_rp.cc:52
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
FIFORP::Params
FIFORPParams Params
Convenience typedef.
Definition:
fifo_rp.hh:61
FIFORP::~FIFORP
~FIFORP()
Destructor.
Definition:
fifo_rp.hh:71
FIFORP::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
fifo_rp.cc:87
BaseReplacementPolicy
A common base class of cache replacement policy objects.
Definition:
base.hh:46
base.hh
FIFORP::FIFORP
FIFORP(const Params *p)
Construct and initiliaze this replacement policy.
Definition:
fifo_rp.cc:37
types.hh
FIFORP::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
fifo_rp.cc:58
FIFORP::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition:
fifo_rp.cc:43
FIFORP
Definition:
fifo_rp.hh:44
MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:323
Generated on Wed Sep 30 2020 14:02:12 for gem5 by
doxygen
1.8.17