35 #include "debug/HWPrefetch.hh" 37 #include "params/SignaturePathPrefetcherV2.hh" 40 const SignaturePathPrefetcherV2Params *
p)
42 globalHistoryRegister(p->global_history_register_entries,
43 p->global_history_register_entries,
44 p->global_history_register_indexing_policy,
45 p->global_history_register_replacement_policy,
61 for (
auto gh_entry : all_ghr_entries) {
62 if (gh_entry->lastBlock + gh_entry->delta == current_block) {
63 new_signature = gh_entry->signature;
64 new_conf = gh_entry->confidence;
65 new_stride = gh_entry->delta;
72 new_signature = current_block;
74 new_stride = current_block;
82 if (sig.
counter == 0)
return 0.0;
91 if (sig.
counter == 0)
return 0.0;
122 assert(gh_entry !=
nullptr);
128 gh_entry->
delta = delta;
133 SignaturePathPrefetcherV2Params::create()
double calculatePrefetchConfidence(PatternEntry const &sig, PatternStrideEntry const &lookahead) const override
Computes the prefetch confidence of the provided pattern entry.
A stride entry with its counter.
uint64_t usefulPrefetches
Total prefetches that has been useful.
AssociativeSet< GlobalHistoryEntry > globalHistoryRegister
Global History Register.
SatCounter counter
use counter, used by SPPv2
uint64_t issuedPrefetches
Total prefetches issued.
std::vector< PatternStrideEntry > strideEntries
group of stides
Global History Register entry datatype.
int16_t stride_t
Stride type.
void handleSignatureTableMiss(stride_t current_block, signature_t &new_signature, double &new_conf, stride_t &new_stride) override
Whenever a new SignatureEntry is allocated, it computes the new signature to be used with the new ent...
bool isSaturated() const
Whether the counter has achieved its maximum value or not.
double calculateLookaheadConfidence(PatternEntry const &sig, PatternStrideEntry const &lookahead) const override
Computes the lookahead path confidence of the provided pattern entry.
SignaturePathPrefetcherV2(const SignaturePathPrefetcherV2Params *p)
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
virtual void handlePageCrossingLookahead(signature_t signature, stride_t last_offset, stride_t delta, double path_confidence) override
Handles the situation when the lookahead process has crossed the boundaries of the current page...
SatCounter counter
Saturating counter.
uint16_t signature_t
Signature type.
Pattern entry data type, a set of stride and counter entries.
void increasePatternEntryCounter(PatternEntry &pattern_entry, PatternStrideEntry &pstride_entry) override
Increases the counter of a given PatternEntry/PatternStrideEntry.