42#ifndef __MEM_RUBY_STRUCTURES_PREFETCHER_HH__
43#define __MEM_RUBY_STRUCTURES_PREFETCHER_HH__
56#include "params/RubyPrefetcher.hh"
59#define MAX_PF_INFLIGHT 8
127 void print(std::ostream& out)
const;
173 uint32_t
index,
const RubyRequestType&
type);
Cycles is a wrapper class for representing cycle counts, i.e.
Abstract superclass for simulation objects.
RubyRequestType m_type
L1D prefetches loads and stores.
int m_stride
stride distance to get next address from
std::bitset< MAX_PF_INFLIGHT > requestIssued
Bitset for tracking prefetches for which addresses have been issued, which ones have completed.
bool m_is_valid
valid bit for each stream
PrefetchEntry()
constructor
std::bitset< MAX_PF_INFLIGHT > requestCompleted
Cycles m_use_time
the last time that any prefetched request was used
Addr m_address
The base address for the stream prefetch.
CircularQueue< UnitFilterEntry > negativeFilter
A negative unit stride filter array: helps reduce BW requirement of prefetching.
void initializeStream(Addr address, int stride, uint32_t index, const RubyRequestType &type)
allocate a new stream buffer at a specific index
uint32_t m_num_streams
number of prefetch streams available
gem5::ruby::RubyPrefetcher::RubyPrefetcherStats rubyPrefetcherStats
bool accessNonunitFilter(Addr line_addr, const RubyRequestType &type)
Access a non-unit stride filter to determine if there is a hit, and update it otherwise.
RubyPrefetcher(const Params &p)
void setController(AbstractController *_ctrl)
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...
CircularQueue< UnitFilterEntry > unitFilter
A unit stride filter array: helps reduce BW requirement of prefetching.
void observeMiss(Addr address, const RubyRequestType &type)
Observe a memory miss from the cache.
AbstractController * m_controller
void observePfHit(Addr address)
Implement the prefetch hit(miss) callback interface.
~RubyPrefetcher()=default
uint32_t m_num_startup_pfs
number of initial prefetches to startup a stream
void print(std::ostream &out) const
Print out some statistics.
std::vector< PrefetchEntry > m_array
an array of the active prefetch streams
CircularQueue< NonUnitFilterEntry > nonUnitFilter
A non-unit stride filter array: helps reduce BW requirement of prefetching.
uint32_t getLRUindex(void)
Returns an unused stream buffer (or if all are used, returns the least recently used (accessed) strea...
RubyPrefetcherParams Params
void issueNextPrefetch(Addr address, PrefetchEntry *stream)
void observePfMiss(Addr address)
bool accessUnitFilter(CircularQueue< UnitFilterEntry > *const filter, Addr line_addr, int stride, const RubyRequestType &type)
Access a unit stride filter to determine if there is a hit, and update it otherwise.
uint32_t m_train_misses
number of misses I must see before allocating a stream
bool m_prefetch_cross_pages
Used for allowing prefetches across pages.
Addr pageAddress(Addr addr) const
determine the page aligned address
static uint32_t getBlockSizeBits()
This is a simple scalar statistic, like a counter.
Bitfield< 21, 20 > stride
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 Statistics objects.
NonUnitFilterEntry(Addr _addr=0)
int stride
Stride (in # of cache lines).
statistics::Scalar numPartialHits
Count of partial successful prefetches.
RubyPrefetcherStats(statistics::Group *parent)
statistics::Scalar numPagesCrossed
Count of pages crossed.
statistics::Scalar numMissObserved
Count of accesses to the prefetcher.
statistics::Scalar numHits
Count of successful prefetches.
statistics::Scalar numAllocatedStreams
Count of prefetch streams allocated.
statistics::Scalar numPrefetchRequested
Count of prefetch requests made.
statistics::Scalar numMissedPrefetchedBlocks
Count of misses incurred for blocks that were prefetched.
uint32_t hits
Counter of the number of times this entry has been hit.
Addr addr
Address to which this filter entry refers.
UnitFilterEntry(Addr _addr=0)