Go to the documentation of this file.
46 #ifndef __MEM_CACHE_PREFETCH_BASE_HH__
47 #define __MEM_CACHE_PREFETCH_BASE_HH__
66 struct BasePrefetcherParams;
77 const std::string &
name,
bool _isFill =
false,
208 template <
typename T>
210 get(ByteOrder endian)
const
212 if (
data ==
nullptr) {
213 panic(
"PrefetchInfo::get called with a request with no data.");
219 case ByteOrder::little:
223 panic(
"Illegal byte order in PrefetchInfo::get()\n");
370 Base(
const BasePrefetcherParams &
p);
371 virtual ~Base() =
default;
450 #endif //__MEM_CACHE_PREFETCH_BASE_HH__
Addr getAddr() const
Obtains the address value of this Prefetcher address.
This is a simple scalar statistic, like a counter.
statistics::Scalar demandMshrMisses
const bool prefetchOnAccess
Prefetch on every access, not just misses.
statistics::Scalar pfUsefulButMiss
The number of times there is a hit on prefetch but cache block is not in an usable state.
Addr blockIndex(Addr a) const
Determine the address of a at block granularity.
const bool useVirtualAddresses
Use Virtual Addresses for prefetching.
Addr pageOffset(Addr a) const
Determine the page-offset of a
void addMMU(BaseMMU *mmu)
Add a BaseMMU object to be used whenever a translation is needed.
bool hasBeenPrefetched(Addr addr, bool is_secure) const
bool write
Whether this event comes from a write request.
StatGroup(statistics::Group *parent)
virtual void setCache(BaseCache *_cache)
Addr address
The address used to train and generate prefetches.
bool isSecure() const
Returns true if the address targets the secure memory space.
statistics::Scalar pfIssued
uint8_t * data
Pointer to the associated request data.
void addEventProbe(SimObject *obj, const char *name)
Add a SimObject and a probe name to listen events from.
std::vector< PrefetchListener * > listeners
bool sameAddr(PrefetchInfo const &pfi) const
Check for equality.
Addr pc
The program counter that generated this address.
Addr pageAddress(Addr a) const
Determine the address of the page in which a lays.
bool inMissQueue(Addr addr, bool is_secure) const
Determine if address is in cache miss queue.
bool isCacheMiss() const
Check if this event comes from a cache miss.
Base(const BasePrefetcherParams &p)
Addr blockAddress(Addr a) const
Determine the address of the block in which a lays.
virtual void notifyFill(const PacketPtr &pkt)
Notify prefetcher of cache fill.
T get(ByteOrder endian) const
Gets the associated data of the request triggering the event.
const RequestorID requestorId
Request id for prefetches.
unsigned int size
Size in bytes of the request triggering this event.
Addr getPaddr() const
Gets the physical address of the request.
const bool onRead
Consult prefetcher on reads?
RequestorID getRequestorId() const
Gets the requestor ID that generated this address.
BaseMMU * mmu
Registered mmu for address translations.
bool validPC
Validity bit for the PC of this address.
statistics::Scalar pfHitInWB
The number of times a HW-prefetch hits in the Write Buffer (WB).
bool observeAccess(const PacketPtr &pkt, bool miss) const
Determine if this access should be observed.
const bool onInst
Consult prefetcher on instruction accesses?
Addr getPC() const
Returns the program counter that generated this request.
statistics::Scalar pfUnused
The number of times a HW-prefetched block is evicted w/o reference.
bool samePage(Addr a, Addr b) const
Determine if addresses are on the same page.
RequestorID requestorId
The requestor ID that generated this address.
const bool onMiss
Only consult prefetcher on cache misses?
virtual std::string name() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
uint64_t usefulPrefetches
Total prefetches that has been useful.
PrefetchInfo(PacketPtr pkt, Addr addr, bool miss)
Constructs a PrefetchInfo using a PacketPtr.
statistics::Formula pfLate
The number of times a HW-prefetch is late (hit in cache, MSHR, WB).
uint64_t Tick
Tick count type.
void probeNotify(const PacketPtr &pkt, bool miss)
Process a notification event from the ProbeListener.
const bool onData
Consult prefetcher on data accesses?
Addr paddress
Physical address, needed because address can be virtual.
statistics::Formula coverage
Abstract superclass for simulation objects.
PrefetchListener(Base &_parent, ProbeManager *pm, const std::string &name, bool _isFill=false, bool _miss=false)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
bool isWrite() const
Checks if the request that caused this prefetch event was a write request.
virtual Tick nextPrefetchReadyTime() const =0
ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners...
unsigned int getSize() const
Gets the size of the request triggering this event.
bool cacheMiss
Whether this event comes from a cache miss.
bool secure
Whether this address targets the secure memory space.
gem5::prefetch::Base::StatGroup prefetchStats
void notify(const PacketPtr &pkt) override
uint64_t issuedPrefetches
Total prefetches issued.
unsigned lBlkSize
log_2(block size of the parent cache).
void regProbeListeners() override
Register probe points for this object.
ProbeListenerArgBase is used to define the base interface to a ProbeListenerArg (i....
statistics::Scalar pfUseful
The number of times a HW-prefetch is useful.
statistics::Formula accuracy
BaseCache * cache
Pointr to the parent cache.
const bool prefetchOnPfHit
Prefetch on hit on prefetched lines.
void incrDemandMhsrMisses()
unsigned blkSize
The block size of the parent cache.
bool inCache(Addr addr, bool is_secure) const
Determine if address is in cache.
Addr pageIthBlockAddress(Addr page, uint32_t i) const
Build the address of the i-th block inside the page.
virtual PacketPtr getPacket()=0
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
statistics::Scalar pfHitInMSHR
The number of times a HW-prefetch hits in a MSHR.
Class containing the information needed by the prefetch to train and generate new prefetch requests.
const bool onWrite
Consult prefetcher on reads?
statistics::Scalar pfHitInCache
The number of times a HW-prefetch hits in cache.
#define panic(...)
This implements a cprintf based panic() function.
bool hasPC() const
Returns true if the associated program counter is valid.
virtual void notify(const PacketPtr &pkt, const PrefetchInfo &pfi)=0
Notify prefetcher of cache access (may be any access or just misses, depending on cache parameters....
Generated on Sun Jul 30 2023 01:56:51 for gem5 by doxygen 1.8.17