47#ifndef __MEM_CACHE_PREFETCH_STRIDE_HH__
48#define __MEM_CACHE_PREFETCH_STRIDE_HH__
51#include <unordered_map>
61#include "params/StridePrefetcherHashedSetAssociative.hh"
66class BaseIndexingPolicy;
67namespace replacement_policy
71struct StridePrefetcherParams;
88 const StridePrefetcherHashedSetAssociativeParams &
p)
168 Stride(
const StridePrefetcherParams &
p);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
A common base class for indexing table locations.
A set associative indexing policy.
A tagged entry is an entry containing a tag.
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Override the default set associative to apply a specific hash function when extracting a set.
Addr extractTag(const Addr addr) const override
Generate the tag from the given address.
StridePrefetcherHashedSetAssociative(const StridePrefetcherHashedSetAssociativeParams &p)
uint32_t extractSet(const Addr addr) const override
Apply a hash function to calculate address set.
~StridePrefetcherHashedSetAssociative()=default
AssociativeSet< StrideEntry > PCTable
const SatCounter8 initConfidence
Initial confidence counter value for the pc tables.
const double threshConf
Confidence threshold for prefetch generation.
PCTable * allocateNewContext(int context)
Create a PC table for the given context.
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses, const CacheAccessor &cache) override
const int distance
How far ahead of the demand stream to start prefetching.
Stride(const StridePrefetcherParams &p)
std::unordered_map< int, PCTable > pcTables
const bool useRequestorId
const struct gem5::prefetch::Stride::PCTableInfo pcTableInfo
PCTable * findTable(int context)
Try to find a table of entries for the given context.
A common base class of cache replacement policy objects.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Declaration of the Packet class.
Declaration of a set associative indexing policy.
Provides generic cache lookup functions.
Information used to create a new PC table.
replacement_policy::Base *const replacementPolicy
BaseIndexingPolicy *const indexingPolicy
PCTableInfo(int assoc, int num_entries, BaseIndexingPolicy *indexing_policy, replacement_policy::Base *repl_policy)
StrideEntry(const SatCounter8 &init_confidence)
void invalidate() override
Invalidate the block.