41 #ifndef __MEM_CACHE_PREFETCH_INDIRECT_MEMORY_HH__ 42 #define __MEM_CACHE_PREFETCH_INDIRECT_MEMORY_HH__ 50 struct IndirectMemoryPrefetcherParams;
98 :
TaggedEntry(), address(0), secure(false), streamCounter(0),
99 enabled(false), index(0), baseAddr(0), shift(0),
100 indirectCounter(indirect_counter_bits),
101 increasedIndirectCounter(false)
115 indirectCounter.
reset();
116 increasedIndirectCounter =
false;
141 unsigned int num_shifts)
142 :
TaggedEntry(), idx1(0), idx2(0), secondIndexSet(false),
154 secondIndexSet =
false;
202 #endif//__MEM_CACHE_PREFETCH_INDIRECT_MEMORY_HH__ IndirectMemoryPrefetcher(const IndirectMemoryPrefetcherParams *p)
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
bool secondIndexSet
Valid bit for the second index.
void invalidate() override
Invalidates the entry.
IndirectPatternDetectorEntry * ipdEntryTrackingMisses
Entry currently tracking misses.
void trackMissIndex1(Addr miss_addr)
Update an IPD entry with a detected miss address, when the first index is being tracked.
void checkAccessMatchOnActiveEntries(Addr addr)
Checks if an access to the cache matches any active PT entry, if so, the indirect confidence counter ...
const int streamingDistance
Number of prefetches generated when using the streaming prefetcher.
const unsigned int maxPrefetchDistance
Maximum number of prefetches generated per event.
Addr address
Accessed address.
const ByteOrder byteOrder
Byte order used to access the cache.
bool increasedIndirectCounter
This variable is set to indicate that there has been at least one match with the current index value...
void invalidate() override
Invalidates the entry.
AssociativeSet< IndirectPatternDetectorEntry > ipd
Indirect Pattern Detector (IPD) table.
Overload hash function for BasicBlockRange type.
std::vector< std::vector< Addr > > baseAddr
Potential BaseAddr candidates for each recorded miss.
PrefetchTableEntry(unsigned indirect_counter_bits)
bool secure
Whether this address is in the secure region.
const unsigned int prefetchThreshold
Counter threshold to start prefetching.
Class containing the information needed by the prefetch to train and generate new prefetch requests...
unsigned int streamCounter
Confidence counter of the stream.
~IndirectMemoryPrefetcher()
int64_t idx2
Second index.
Implements an n bit saturating counter and provides methods to increment, decrement, and read it.
SatCounter indirectCounter
Confidence counter of the indirect fields.
const int streamCounterThreshold
streamCounter value to trigger the streaming prefetcher
void reset()
Reset the counter to its initial value.
bool enabled
Enable bit of the indirect fields.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
IndirectPatternDetectorEntry(unsigned int num_addresses, unsigned int num_shifts)
int64_t index
Current index value.
int numMisses
Number of misses currently recorded.
void trackMissIndex2(Addr miss_addr)
Update an IPD entry with a detected miss address, when the second index is being tracked.
Indirect Pattern Detector entrt.
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
Addr baseAddr
BaseAddr detected.
void allocateOrUpdateIPDEntry(const PrefetchTableEntry *pt_entry, int64_t index)
Allocate or update an entry in the IPD.
const std::vector< int > shiftValues
Shift values considered.
virtual void invalidate()
Invalidates the entry.
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
AssociativeSet< PrefetchTableEntry > prefetchTable
Prefetch table.