Go to the documentation of this file.
32 #include "params/SHiPMemRP.hh"
33 #include "params/SHiPPCRP.hh"
34 #include "params/SHiPRP.hh"
39 namespace replacement_policy
56 signature = new_signature;
81 std::shared_ptr<SHiPReplData> casted_replacement_data =
82 std::static_pointer_cast<SHiPReplData>(replacement_data);
86 if (casted_replacement_data->wasReReferenced()) {
87 SHCT[casted_replacement_data->getSignature()]--;
94 SHiP::touch(
const std::shared_ptr<ReplacementData>& replacement_data,
97 std::shared_ptr<SHiPReplData> casted_replacement_data =
98 std::static_pointer_cast<SHiPReplData>(replacement_data);
103 casted_replacement_data->setReReferenced();
110 SHiP::touch(
const std::shared_ptr<ReplacementData>& replacement_data)
113 panic(
"Cant train SHiP's predictor without access information.");
117 SHiP::reset(
const std::shared_ptr<ReplacementData>& replacement_data,
120 std::shared_ptr<SHiPReplData> casted_replacement_data =
121 std::static_pointer_cast<SHiPReplData>(replacement_data);
127 casted_replacement_data->setSignature(signature);
133 casted_replacement_data->rrpv--;
138 SHiP::reset(
const std::shared_ptr<ReplacementData>& replacement_data)
141 panic(
"Cant train SHiP's predictor without access information.");
144 std::shared_ptr<ReplacementData>
165 if (pkt->
req->hasPC()) {
171 return signature %
SHCT.size();
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
SHiPReplData(int num_bits)
RequestPtr req
A pointer to the original request.
BaseReplacementPolicyParams Params
const SignatureType NO_PC_SIGNATURE
Signature to be used when no PC is provided in an access.
void touch(const std::shared_ptr< ReplacementData > &replacement_data, const PacketPtr pkt) override
Touch an entry to update its replacement data.
SHiPPC(const SHiPPCRPParams &p)
std::size_t SignatureType
SignatureType getSignature(const PacketPtr pkt) const override
Extract signature from packet.
BRRIP-specific implementation of replacement data.
void reset(const std::shared_ptr< ReplacementData > &replacement_data, const PacketPtr pkt) override
Reset replacement data.
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
bool wasReReferenced() const
Get whether entry has been re-referenced since insertion.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
virtual SignatureType getSignature(const PacketPtr pkt) const =0
Extract signature from packet.
const unsigned numRRPVBits
Number of RRPV bits.
SignatureType getSignature(const PacketPtr pkt) const override
Extract signature from packet.
const double insertionThreshold
Saturation percentage at which an entry starts being inserted as intermediate re-reference.
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
SignatureType getSignature() const
Get entry's signature.
void setReReferenced()
Set that this entry has been re-referenced.
SHiPMem(const SHiPMemRPParams &p)
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
std::vector< SatCounter8 > SHCT
Signature History Counter Table; learns the re-reference behavior of a signature.
void setSignature(SignatureType signature)
Set this entry's signature and reset outcome.
SHiP-specific implementation of replacement data.
Copyright (c) 2019, 2020 Inria All rights reserved.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Jul 13 2022 10:39:23 for gem5 by doxygen 1.8.17