gem5 v24.0.0.0
|
This is a proxy for prefetcher class in classic memory. More...
#include <RubyPrefetcherProxy.hh>
Public Member Functions | |
RubyPrefetcherProxy (AbstractController *parent, prefetch::Base *prefetcher, MessageBuffer *pf_queue) | |
void | deschedulePrefetch () |
Deschedled the ready prefetch event. | |
void | completePrefetch (Addr addr) |
Notifies a completed prefetch request. | |
void | notifyPfHit (const RequestPtr &req, bool is_read, const DataBlock &data_blk) |
Notify PF probes hit/miss/fill. | |
void | notifyPfMiss (const RequestPtr &req, bool is_read, const DataBlock &data_blk) |
void | notifyPfFill (const RequestPtr &req, const DataBlock &data_blk, bool from_pf) |
void | notifyPfEvict (Addr blkAddr, bool hwPrefetched, RequestorID requestorID) |
void | regProbePoints () |
Registers probes. | |
bool | inCache (Addr addr, bool is_secure) const override |
Accessor functions. | |
bool | hasBeenPrefetched (Addr addr, bool is_secure) const override |
Determine if address has been prefetched. | |
bool | hasBeenPrefetched (Addr addr, bool is_secure, RequestorID requestor) const override |
Determine if address has been prefetched by the requestor. | |
bool | inMissQueue (Addr addr, bool is_secure) const override |
Determine if address is in cache miss queue. | |
bool | coalesce () const override |
Determine if cache is coalescing writes. | |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Private Member Functions | |
void | scheduleNextPrefetch () |
Schedule the next ready prefetch. | |
void | issuePrefetch () |
Issue prefetch to the contoller prefetch queue. | |
Private Attributes | |
prefetch::Base * | prefetcher |
Prefetcher from classic memory. | |
AbstractController * | cacheCntrl |
Ruby cache controller. | |
MessageBuffer * | pfQueue |
Prefetch queue to the cache controller. | |
std::unordered_map< Addr, PacketPtr > | issuedPfPkts |
List of issued prefetch request packets. | |
EventFunctionWrapper | pfEvent |
Prefetch event. | |
ProbePointArg< CacheAccessProbeArg > * | ppHit |
To probe when a cache hit occurs. | |
ProbePointArg< CacheAccessProbeArg > * | ppMiss |
To probe when a cache miss occurs. | |
ProbePointArg< CacheAccessProbeArg > * | ppFill |
To probe when a cache fill occurs. | |
ProbePointArg< CacheDataUpdateProbeArg > * | ppDataUpdate |
To probe when the contents of a block are updated. | |
This is a proxy for prefetcher class in classic memory.
This wrapper enables a SLICC machine to interact with classic prefetchers.
The expected use case for this class is to instantiate it in the SLICC state machine definition and provide a pointer to the prefetcher object (typically defined in SLICC as one of the SM's configuration parameters) and the prefetch queue where prefetch requests will be inserted.
The SLICC SM can them use the notifyPF* functions to notify the prefetcher.
Notes:
This object's regProbePoints() must be called explicitly. The SLICC SM may defined it's own regProbePoints() to call it.
completePrefetch(Addr) must be called when a request injected into the prefetch queue is completed.
A nullptr prefetcher can be provided, in which case the notifyPf* are no-ops.
Definition at line 77 of file RubyPrefetcherProxy.hh.
gem5::ruby::RubyPrefetcherProxy::RubyPrefetcherProxy | ( | AbstractController * | parent, |
prefetch::Base * | prefetcher, | ||
MessageBuffer * | pf_queue ) |
Definition at line 49 of file RubyPrefetcherProxy.cc.
References issuePrefetch().
|
inlineoverridevirtual |
Determine if cache is coalescing writes.
Implements gem5::CacheAccessor.
Definition at line 170 of file RubyPrefetcherProxy.hh.
References cacheCntrl, and gem5::ruby::AbstractController::coalesce().
void gem5::ruby::RubyPrefetcherProxy::completePrefetch | ( | Addr | addr | ) |
Notifies a completed prefetch request.
Definition at line 95 of file RubyPrefetcherProxy.cc.
References gem5::X86ISA::addr, DPRINTF, issuedPfPkts, and gem5::ruby::makeLineAddress().
void gem5::ruby::RubyPrefetcherProxy::deschedulePrefetch | ( | ) |
Deschedled the ready prefetch event.
Definition at line 88 of file RubyPrefetcherProxy.cc.
References cacheCntrl, gem5::EventManager::deschedule(), pfEvent, and gem5::Event::scheduled().
|
inlineoverridevirtual |
Determine if address has been prefetched.
Implements gem5::CacheAccessor.
Definition at line 154 of file RubyPrefetcherProxy.hh.
References gem5::X86ISA::addr, cacheCntrl, and gem5::ruby::AbstractController::hasBeenPrefetched().
|
inlineoverridevirtual |
Determine if address has been prefetched by the requestor.
Implements gem5::CacheAccessor.
Definition at line 159 of file RubyPrefetcherProxy.hh.
References gem5::X86ISA::addr, cacheCntrl, and gem5::ruby::AbstractController::hasBeenPrefetched().
|
inlineoverridevirtual |
Accessor functions.
Implements gem5::CacheAccessor.
Definition at line 149 of file RubyPrefetcherProxy.hh.
References gem5::X86ISA::addr, cacheCntrl, and gem5::ruby::AbstractController::inCache().
|
inlineoverridevirtual |
Determine if address is in cache miss queue.
Implements gem5::CacheAccessor.
Definition at line 165 of file RubyPrefetcherProxy.hh.
References gem5::X86ISA::addr, cacheCntrl, and gem5::ruby::AbstractController::inMissQueue().
|
private |
Issue prefetch to the contoller prefetch queue.
Definition at line 105 of file RubyPrefetcherProxy.cc.
References gem5::ruby::MessageBuffer::areNSlotsAvailable(), cacheCntrl, gem5::Clocked::clockEdge(), gem5::curTick(), gem5::Clocked::cyclesToTicks(), DPRINTF, gem5::ruby::MessageBuffer::enqueue(), gem5::Packet::getAddr(), gem5::Packet::getBlockAddr(), gem5::ruby::RubySystem::getBlockSizeBytes(), gem5::prefetch::Base::getPacket(), issuedPfPkts, gem5::Packet::needsWritable(), pfQueue, prefetcher, gem5::Packet::print(), and scheduleNextPrefetch().
Referenced by RubyPrefetcherProxy().
void gem5::ruby::RubyPrefetcherProxy::notifyPfEvict | ( | Addr | blkAddr, |
bool | hwPrefetched, | ||
RequestorID | requestorID ) |
Definition at line 207 of file RubyPrefetcherProxy.cc.
References DPRINTF, gem5::CacheDataUpdateProbeArg::hwPrefetched, ppDataUpdate, and scheduleNextPrefetch().
void gem5::ruby::RubyPrefetcherProxy::notifyPfFill | ( | const RequestPtr & | req, |
const DataBlock & | data_blk, | ||
bool | from_pf ) |
Definition at line 189 of file RubyPrefetcherProxy.cc.
References gem5::Packet::cmd, gem5::Packet::dataStaticConst(), DPRINTF, gem5::ruby::DataBlock::getData(), gem5::ruby::getOffset(), gem5::Packet::getSize(), gem5::Packet::makeReadCmd(), ppFill, gem5::Packet::print(), and scheduleNextPrefetch().
void gem5::ruby::RubyPrefetcherProxy::notifyPfHit | ( | const RequestPtr & | req, |
bool | is_read, | ||
const DataBlock & | data_blk ) |
Notify PF probes hit/miss/fill.
Definition at line 157 of file RubyPrefetcherProxy.cc.
References gem5::Packet::dataStaticConst(), DPRINTF, gem5::ruby::DataBlock::getData(), gem5::ruby::getOffset(), gem5::Packet::getSize(), gem5::Packet::makeReadCmd(), gem5::Packet::makeWriteCmd(), ppHit, gem5::Packet::print(), and scheduleNextPrefetch().
void gem5::ruby::RubyPrefetcherProxy::notifyPfMiss | ( | const RequestPtr & | req, |
bool | is_read, | ||
const DataBlock & | data_blk ) |
Definition at line 173 of file RubyPrefetcherProxy.cc.
References gem5::Packet::dataStaticConst(), DPRINTF, gem5::ruby::DataBlock::getData(), gem5::ruby::getOffset(), gem5::Packet::getSize(), gem5::Packet::makeReadCmd(), gem5::Packet::makeWriteCmd(), ppMiss, gem5::Packet::print(), and scheduleNextPrefetch().
void gem5::ruby::RubyPrefetcherProxy::regProbePoints | ( | ) |
Registers probes.
Definition at line 219 of file RubyPrefetcherProxy.cc.
References cacheCntrl, gem5::SimObject::getProbeManager(), ppDataUpdate, ppFill, ppHit, and ppMiss.
|
private |
Schedule the next ready prefetch.
Definition at line 74 of file RubyPrefetcherProxy.cc.
References cacheCntrl, gem5::Clocked::clockEdge(), DPRINTF, gem5::MaxTick, gem5::prefetch::Base::nextPrefetchReadyTime(), pfEvent, prefetcher, gem5::EventManager::schedule(), and gem5::Event::scheduled().
Referenced by issuePrefetch(), notifyPfEvict(), notifyPfFill(), notifyPfHit(), and notifyPfMiss().
|
private |
Ruby cache controller.
Definition at line 118 of file RubyPrefetcherProxy.hh.
Referenced by coalesce(), deschedulePrefetch(), hasBeenPrefetched(), hasBeenPrefetched(), inCache(), inMissQueue(), issuePrefetch(), regProbePoints(), and scheduleNextPrefetch().
List of issued prefetch request packets.
Definition at line 124 of file RubyPrefetcherProxy.hh.
Referenced by completePrefetch(), and issuePrefetch().
|
private |
Prefetch event.
Definition at line 127 of file RubyPrefetcherProxy.hh.
Referenced by deschedulePrefetch(), and scheduleNextPrefetch().
|
private |
Prefetch queue to the cache controller.
Definition at line 121 of file RubyPrefetcherProxy.hh.
Referenced by issuePrefetch().
|
private |
To probe when the contents of a block are updated.
Content updates include data fills, overwrites, and invalidations, which means that this probe partially overlaps with other probes.
Definition at line 143 of file RubyPrefetcherProxy.hh.
Referenced by notifyPfEvict(), and regProbePoints().
|
private |
To probe when a cache fill occurs.
Definition at line 136 of file RubyPrefetcherProxy.hh.
Referenced by notifyPfFill(), and regProbePoints().
|
private |
To probe when a cache hit occurs.
Definition at line 130 of file RubyPrefetcherProxy.hh.
Referenced by notifyPfHit(), and regProbePoints().
|
private |
To probe when a cache miss occurs.
Definition at line 133 of file RubyPrefetcherProxy.hh.
Referenced by notifyPfMiss(), and regProbePoints().
|
private |
Prefetcher from classic memory.
Definition at line 115 of file RubyPrefetcherProxy.hh.
Referenced by issuePrefetch(), and scheduleNextPrefetch().