Go to the documentation of this file.
41 #ifndef __MEM_RUBY_STRUCTURES_PREFETCHER_HH__
42 #define __MEM_RUBY_STRUCTURES_PREFETCHER_HH__
54 #include "params/RubyPrefetcher.hh"
58 #define MAX_PF_INFLIGHT 8
120 void print(std::ostream& out)
const;
139 uint32_t
index,
const RubyRequestType&
type);
148 uint32_t *hit_table, uint32_t &
index,
Addr address,
224 #endif // __MEM_RUBY_STRUCTURES_PREFETCHER_HH__
RubyRequestType m_type
L1D prefetches loads and stores.
Addr pageAddress(Addr addr) const
determine the page aligned address
Stats::Scalar numPartialHits
Count of partial successful prefetches.
void print(std::ostream &out) const
Print out some statistics.
uint32_t m_num_startup_pfs
number of initial prefetches to startup a stream
void setController(AbstractController *_ctrl)
int * m_nonunit_stride
An array of strides (in # of cache lines) for the filter entries.
Cycles m_use_time
the last time that any prefetched request was used
void issueNextPrefetch(Addr address, PrefetchEntry *stream)
int m_stride
stride distance to get next address from
Stats::Scalar numHits
Count of successful prefetches.
uint32_t m_num_streams
number of prefetch streams available
std::bitset< MAX_PF_INFLIGHT > requestCompleted
void observeMiss(Addr address, const RubyRequestType &type)
Observe a memory miss from the cache.
PrefetchEntry()
constructor
bool accessUnitFilter(std::vector< Addr > &filter_table, uint32_t *hit_table, uint32_t &index, Addr address, int stride, bool &alloc)
access a unit stride filter to determine if there is a hit
bool m_is_valid
valid bit for each stream
std::bitset< MAX_PF_INFLIGHT > requestIssued
Bitset for tracking prefetches for which addresses have been issued, which ones have completed.
void observePfHit(Addr address)
Implement the prefetch hit(miss) callback interface.
uint32_t m_negative_filter_index
a round robin pointer into the negative filter group
This is a simple scalar statistic, like a counter.
uint32_t m_num_nonunit_filters
number of non-stride filters
RubyPrefetcher(const Params *p)
AbstractController * m_controller
Stats::Scalar numPagesCrossed
Count of pages crossed.
uint32_t getLRUindex(void)
Returns an unused stream buffer (or if all are used, returns the least recently used (accessed) strea...
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool accessNonunitFilter(Addr address, int *stride, bool &alloc)
access a unit stride filter to determine if there is a hit
uint32_t * m_nonunit_hit
An array used to count the of times particular filter entries have been hit.
std::vector< Addr > m_unit_filter
a unit stride filter array: helps reduce BW requirement of prefetching
void observePfMiss(Addr address)
void initializeStream(Addr address, int stride, uint32_t index, const RubyRequestType &type)
allocate a new stream buffer at a specific index
Stats::Scalar numAllocatedStreams
Count of prefetch streams allocated.
std::vector< Addr > m_nonunit_filter
a non-unit stride filter array: helps reduce BW requirement of prefetching
void regStats()
Callback to set stat parameters.
std::vector< PrefetchEntry > m_array
an array of the active prefetch streams
uint32_t * m_unit_filter_hit
An array used to count the of times particular filter entries have been hit.
Addr m_address
The base address for the stream prefetch.
Bitfield< 21, 20 > stride
RubyPrefetcherParams Params
Cycles is a wrapper class for representing cycle counts, i.e.
std::vector< Addr > m_negative_filter
a negative unit stride filter array: helps reduce BW requirement of prefetching
PrefetchEntry * getPrefetchEntry(Addr address, uint32_t &index)
get pointer to the matching stream entry, returns NULL if not found index holds the multiple of the s...
uint32_t m_train_misses
number of misses I must see before allocating a stream
uint32_t m_unit_filter_index
a round robin pointer into the unit filter group
Stats::Scalar numMissedPrefetchedBlocks
Count of misses incurred for blocks that were prefetched.
Stats::Scalar numPrefetchRequested
Count of prefetch requests made.
bool m_prefetch_cross_pages
Used for allowing prefetches across pages.
uint32_t m_nonunit_index
a round robin pointer into the unit filter group
void clearNonunitEntry(uint32_t index)
clear a non-unit stride prefetcher entry
uint32_t m_num_unit_filters
number of stride filters
Stats::Scalar numMissObserved
Count of accesses to the prefetcher.
static uint32_t getBlockSizeBits()
uint32_t * m_negative_filter_hit
An array used to count the of times particular filter entries have been hit.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17