40#include "debug/HWPrefetch.hh"
53 prefetcher(_prefetcher),
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(),
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());
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 =
133 RubyAccessMode_Supervisor,
144 DPRINTF(HWPrefetch,
"Aborted PF request for address being "
150 DPRINTF(HWPrefetch,
"No prefetch slots are available\n");
197 pkt.
cmd = Packet::Command::HardPFReq;
210 DPRINTF(HWPrefetch,
"notify evict: %#x hw_pf=%d\n", blkAddr, hwPrefetched);
212 blkAddr,
false, requestorID, *
this);
Information provided to probes on a cache event.
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
Tick cyclesToTicks(Cycles c) const
Cycles is a wrapper class for representing cycle counts, i.e.
Interface for things with names.
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.
virtual PacketPtr getPacket()=0
virtual Tick nextPrefetchReadyTime() const =0
const uint8_t * getData(int offset, int len) const
bool areNSlotsAvailable(unsigned int n, Tick curTime)
void enqueue(MsgPtr message, Tick curTime, Tick delta, bool bypassStrictFIFO=false)
void regProbePoints()
Registers probes.
void issuePrefetch()
Issue prefetch to the contoller prefetch queue.
void notifyPfEvict(Addr blkAddr, bool hwPrefetched, RequestorID requestorID)
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.
std::unordered_map< Addr, PacketPtr > issuedPfPkts
List of issued prefetch request packets.
RubyPrefetcherProxy(AbstractController *parent, prefetch::Base *prefetcher, MessageBuffer *pf_queue)
static uint32_t getBlockSizeBytes()
void deschedule(Event &event)
bool scheduled() const
Determine if the current event is scheduled.
void schedule(Event &event, Tick when)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
ProbeManager * getProbeManager()
Get the probe manager for this object.
Addr makeLineAddress(Addr addr)
Addr getOffset(Addr addr)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria 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()