Go to the documentation of this file.
46 #ifndef __MEM_CACHE_PREFETCH_BASE_HH__
47 #define __MEM_CACHE_PREFETCH_BASE_HH__
61 struct BasePrefetcherParams;
71 const std::string &
name,
bool _isFill =
false,
201 template <
typename T>
203 get(ByteOrder endian)
const
205 if (
data ==
nullptr) {
206 panic(
"PrefetchInfo::get called with a request with no data.");
212 case ByteOrder::little:
216 panic(
"Illegal byte order in PrefetchInfo::get()\n");
335 Base(
const BasePrefetcherParams *
p);
336 virtual ~Base() =
default;
385 #endif //__MEM_CACHE_PREFETCH_BASE_HH__
const bool onData
Consult prefetcher on data accesses?
PrefetchListener(Base &_parent, ProbeManager *pm, const std::string &name, bool _isFill=false, bool _miss=false)
BaseCache * cache
Pointr to the parent cache.
PrefetchInfo(PacketPtr pkt, Addr addr, bool miss)
Constructs a PrefetchInfo using a PacketPtr.
bool sameAddr(PrefetchInfo const &pfi) const
Check for equality.
const bool useVirtualAddresses
Use Virtual Addresses for prefetching.
StatGroup(Stats::Group *parent)
unsigned blkSize
The block size of the parent cache.
Addr getPC() const
Returns the program counter that generated this request.
virtual void notifyFill(const PacketPtr &pkt)
Notify prefetcher of cache fill.
Addr pageAddress(Addr a) const
Determine the address of the page in which a lays.
const bool onWrite
Consult prefetcher on reads?
uint64_t Tick
Tick count type.
bool inCache(Addr addr, bool is_secure) const
Determine if address is in cache.
bool cacheMiss
Whether this event comes from a cache miss.
uint64_t usefulPrefetches
Total prefetches that has been useful.
const bool onInst
Consult prefetcher on instruction accesses?
const bool onMiss
Only consult prefetcher on cache misses?
bool hasBeenPrefetched(Addr addr, bool is_secure) const
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Addr getPaddr() const
Gets the physical address of the request.
Prefetcher::Base::StatGroup prefetchStats
This is a simple scalar statistic, like a counter.
RequestorID requestorId
The requestor ID that generated this address.
BaseTLB * tlb
Registered tlb for address translations.
bool observeAccess(const PacketPtr &pkt, bool miss) const
Determine if this access should be observed.
uint8_t * data
Pointer to the associated request data.
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....
bool isWrite() const
Checks if the request that caused this prefetch event was a write request.
RequestorID getRequestorId() const
Gets the requestor ID that generated this address.
Base(const BasePrefetcherParams *p)
const bool onRead
Consult prefetcher on reads?
unsigned lBlkSize
log_2(block size of the parent cache).
virtual void setCache(BaseCache *_cache)
bool isCacheMiss() const
Check if this event comes from a cache miss.
Addr address
The address used to train and generate prefetches.
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
std::vector< PrefetchListener * > listeners
unsigned int getSize() const
Gets the size of the request triggering this event.
void notify(const PacketPtr &pkt) override
bool validPC
Validity bit for the PC of this address.
Addr pageOffset(Addr a) const
Determine the page-offset of a
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void addTLB(BaseTLB *tlb)
Add a BaseTLB object to be used whenever a translation is needed.
virtual Tick nextPrefetchReadyTime() const =0
virtual const std::string name() const
bool isSecure() const
Returns true if the address targets the secure memory space.
Addr blockIndex(Addr a) const
Determine the address of a at block granularity.
ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners...
uint64_t issuedPrefetches
Total prefetches issued.
const RequestorID requestorId
Request id for prefetches.
const bool prefetchOnAccess
Prefetch on every access, not just misses.
void regProbeListeners() override
Register probe points for this object.
void addEventProbe(SimObject *obj, const char *name)
Add a SimObject and a probe name to listen events from.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Class containing the information needed by the prefetch to train and generate new prefetch requests.
bool secure
Whether this address targets the secure memory space.
virtual PacketPtr getPacket()=0
bool write
Whether this event comes from a write request.
Addr blockAddress(Addr a) const
Determine the address of the block in which a lays.
Addr paddress
Physical address, needed because address can be virtual.
bool inMissQueue(Addr addr, bool is_secure) const
Determine if address is in cache miss queue.
bool samePage(Addr a, Addr b) const
Determine if addresses are on the same page.
T get(ByteOrder endian) const
Gets the associated data of the request triggering the event.
unsigned int size
Size in bytes of the request triggering this event.
void probeNotify(const PacketPtr &pkt, bool miss)
Process a notification event from the ProbeListener.
Addr getAddr() const
Obtains the address value of this Prefetcher address.
Addr pageIthBlockAddress(Addr page, uint32_t i) const
Build the address of the i-th block inside the page.
Addr pc
The program counter that generated this address.
bool hasPC() const
Returns true if the associated program counter is valid.
#define panic(...)
This implements a cprintf based panic() function.
Abstract superclass for simulation objects.
ProbeListenerArgBase is used to define the base interface to a ProbeListenerArg (i....
Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17