45#include "debug/HWPrefetch.hh"
46#include "params/SignaturePathPrefetcherV2.hh"
56 globalHistoryRegister((
name() +
".GlobalHistoryRegister").c_str(),
57 p.global_history_register_entries,
58 p.global_history_register_entries,
59 p.global_history_register_replacement_policy,
60 p.global_history_register_indexing_policy,
75 if (gh_entry.lastBlock + gh_entry.delta == current_block) {
76 new_signature = gh_entry.signature;
77 new_conf = gh_entry.confidence;
78 new_stride = gh_entry.delta;
85 new_signature = current_block;
87 new_stride = current_block;
95 if (sig.
counter == 0)
return 0.0;
104 if (sig.
counter == 0)
return 0.0;
136 assert(gh_entry !=
nullptr);
142 gh_entry->
delta = delta;
uint64_t issuedPrefetches
Total prefetches issued.
uint64_t usefulPrefetches
Total prefetches that has been useful.
double calculateLookaheadConfidence(PatternEntry const &sig, PatternStrideEntry const &lookahead) const override
Computes the lookahead path confidence of the provided pattern entry.
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.
void increasePatternEntryCounter(PatternEntry &pattern_entry, PatternStrideEntry &pstride_entry) override
Increases the counter of a given PatternEntry/PatternStrideEntry.
SignaturePathV2(const SignaturePathPrefetcherV2Params &p)
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...
double calculatePrefetchConfidence(PatternEntry const &sig, PatternStrideEntry const &lookahead) const override
Computes the prefetch confidence of the provided pattern entry.
AssociativeCache< GlobalHistoryEntry > globalHistoryRegister
Global History Register.
int16_t stride_t
Stride type.
uint16_t signature_t
Signature type.
bool isSaturated() const
Whether the counter has achieved its maximum value or not.
Copyright (c) 2024 Arm Limited All rights reserved.
static constexpr auto genTagExtractor(BTBIndexingPolicy *ip)
This helper generates a tag extractor function object which will be typically used by Replaceable ent...
Global History Register entry datatype.
Pattern entry data type, a set of stride and counter entries.
std::vector< PatternStrideEntry > strideEntries
group of stides
SatCounter8 counter
use counter, used by SPPv2
A stride entry with its counter.
SatCounter8 counter
Saturating counter.
const std::string & name()