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