39 #ifndef __MEM_CACHE_PREFETCH_INDIRECT_MEMORY_HH__ 40 #define __MEM_CACHE_PREFETCH_INDIRECT_MEMORY_HH__ 48 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;
205 #endif//__MEM_CACHE_PREFETCH_INDIRECT_MEMORY_HH__
bool increasedIndirectCounter
This variable is set to indicate that there has been at least one match with the current index value...
void checkAccessMatchOnActiveEntries(Addr addr)
Checks if an access to the cache matches any active PT entry, if so, the indirect confidence counter ...
Addr address
Accessed address.
std::vector< std::vector< Addr > > baseAddr
Potential BaseAddr candidates for each recorded miss.
SatCounter indirectCounter
Confidence counter of the indirect fields.
void invalidate() override
Invalidates the entry.
PrefetchTableEntry(unsigned indirect_counter_bits)
~IndirectMemory()=default
const unsigned int maxPrefetchDistance
Maximum number of prefetches generated per event.
Overload hash function for BasicBlockRange type.
AssociativeSet< IndirectPatternDetectorEntry > ipd
Indirect Pattern Detector (IPD) table.
IndirectMemory(const IndirectMemoryPrefetcherParams *p)
Class containing the information needed by the prefetch to train and generate new prefetch requests...
int64_t idx2
Second index.
const unsigned int prefetchThreshold
Counter threshold to start prefetching.
bool enabled
Enable bit of the indirect fields.
const int streamingDistance
Number of prefetches generated when using the streaming prefetcher.
unsigned int streamCounter
Confidence counter of the stream.
bool secondIndexSet
Valid bit for the second index.
IndirectPatternDetectorEntry * ipdEntryTrackingMisses
Entry currently tracking misses.
int64_t index
Current index value.
Implements an n bit saturating counter and provides methods to increment, decrement, and read it.
void trackMissIndex2(Addr miss_addr)
Update an IPD entry with a detected miss address, when the second index is being tracked.
void reset()
Reset the counter to its initial value.
void invalidate() override
Invalidates the entry.
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 ...
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
void trackMissIndex1(Addr miss_addr)
Update an IPD entry with a detected miss address, when the first index is being tracked.
const int streamCounterThreshold
streamCounter value to trigger the streaming prefetcher
const std::vector< int > shiftValues
Shift values considered.
Indirect Pattern Detector entrt.
int numMisses
Number of misses currently recorded.
const ByteOrder byteOrder
Byte order used to access the cache.
void allocateOrUpdateIPDEntry(const PrefetchTableEntry *pt_entry, int64_t index)
Allocate or update an entry in the IPD.
AssociativeSet< PrefetchTableEntry > prefetchTable
Prefetch table.
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
bool secure
Whether this address is in the secure region.
virtual void invalidate()
Invalidates the entry.
Addr baseAddr
BaseAddr detected.
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
IndirectPatternDetectorEntry(unsigned int num_addresses, unsigned int num_shifts)