40#include "debug/HWPrefetch.hh"
57 ppHit(
nullptr), ppMiss(
nullptr),
58 ppFill(
nullptr), ppDataUpdate(
nullptr)
61 "initializing a RubyPrefetcherProxy without a parent");
64 "%s initializing a RubyPrefetcherProxy without a prefetch queue",
66 prefetcher->setParentInfo(
67 cacheCntrl->params().system,
68 cacheCntrl->getProbeManager(),
69 cacheCntrl->m_ruby_system->getBlockSizeBytes());
82 DPRINTF(HWPrefetch,
"Next prefetch ready at %d\n", next_pf_time);
99 DPRINTF(HWPrefetch,
"Prefetch request for addr %#x completed\n",
addr);
114 DPRINTF(HWPrefetch,
"Next prefetch ready %s\n", pkt->
print());
115 unsigned blk_size =
cacheCntrl->m_ruby_system->getBlockSizeBytes();
119 DPRINTF(HWPrefetch,
"Issued PF request for paddr=%#x, "
120 "line_addr=%#x, is_write=%d\n",
125 RubyRequestType_ST : RubyRequestType_LD;
127 std::shared_ptr<RubyRequest> msg =
128 std::make_shared<RubyRequest>(
cacheCntrl->clockEdge(),
135 RubyAccessMode_Supervisor,
142 cacheCntrl->m_ruby_system->getRandomization(),
149 DPRINTF(HWPrefetch,
"Aborted PF request for address being "
155 DPRINTF(HWPrefetch,
"No prefetch slots are available\n");
202 pkt.
cmd = Packet::Command::HardPFReq;
215 DPRINTF(HWPrefetch,
"notify evict: %#x hw_pf=%d\n", blkAddr, hwPrefetched);
217 blkAddr,
false, requestorID, *
this);
235 cacheCntrl->getProbeManager(),
"Data Update");
242 cacheCntrl->m_ruby_system->getBlockSizeBits());
249 cacheCntrl->m_ruby_system->getBlockSizeBits());
Information provided to probes on a cache event.
Cycles is a wrapper class for representing cycle counts, i.e.
Named(std::string_view name_)
virtual std::string name() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
bool needsWritable() const
void print(std::ostream &o, int verbosity=0, const std::string &prefix="") const
static MemCmd makeWriteCmd(const RequestPtr &req)
Generate the appropriate write MemCmd based on the Request flags.
Addr getBlockAddr(unsigned int blk_size) const
void dataStaticConst(const T *p)
Set the data pointer to the following value that should not be freed.
static MemCmd makeReadCmd(const RequestPtr &req)
Generate the appropriate read MemCmd based on the Request flags.
MemCmd cmd
The command field of the packet.
ProbePointArg generates a point for the class of Arg.
const uint8_t * getData(int offset, int len) const
void regProbePoints()
Registers probes.
void issuePrefetch()
Issue prefetch to the contoller prefetch queue.
void notifyPfEvict(Addr blkAddr, bool hwPrefetched, RequestorID requestorID)
Addr makeLineAddress(Addr addr) const
prefetch::Base * prefetcher
Prefetcher from classic memory.
ProbePointArg< CacheAccessProbeArg > * ppMiss
To probe when a cache miss occurs.
EventFunctionWrapper pfEvent
Prefetch event.
void notifyPfMiss(const RequestPtr &req, bool is_read, const DataBlock &data_blk)
ProbePointArg< CacheAccessProbeArg > * ppFill
To probe when a cache fill occurs.
void scheduleNextPrefetch()
Schedule the next ready prefetch.
void notifyPfHit(const RequestPtr &req, bool is_read, const DataBlock &data_blk)
Notify PF probes hit/miss/fill.
void completePrefetch(Addr addr)
Notifies a completed prefetch request.
AbstractController * cacheCntrl
Ruby cache controller.
void deschedulePrefetch()
Deschedled the ready prefetch event.
void notifyPfFill(const RequestPtr &req, const DataBlock &data_blk, bool from_pf)
ProbePointArg< CacheAccessProbeArg > * ppHit
To probe when a cache hit occurs.
MessageBuffer * pfQueue
Prefetch queue to the cache controller.
ProbePointArg< CacheDataUpdateProbeArg > * ppDataUpdate
To probe when the contents of a block are updated.
Addr getOffset(Addr addr) const
std::unordered_map< Addr, PacketPtr > issuedPfPkts
List of issued prefetch request packets.
RubyPrefetcherProxy(AbstractController *parent, prefetch::Base *prefetcher, MessageBuffer *pf_queue)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Addr makeLineAddress(Addr addr, int cacheLineBits)
Addr getOffset(Addr addr, int cacheLineBits)
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< Request > RequestPtr
Tick curTick()
The universal simulation clock.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
A data contents update is composed of the updated block's address, the old contents,...
bool hwPrefetched
Set if the update is from a prefetch or evicting a prefetched block that was never used.
const std::string & name()