gem5 v24.1.0.1
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gem5::ruby::RubyPrefetcherProxy Class Reference

This is a proxy for prefetcher class in classic memory. More...

#include <RubyPrefetcherProxy.hh>

Inheritance diagram for gem5::ruby::RubyPrefetcherProxy:
gem5::CacheAccessor gem5::Named

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.
 
Addr makeLineAddress (Addr addr) const
 
Addr getOffset (Addr addr) const
 

Private Attributes

prefetch::Baseprefetcher
 Prefetcher from classic memory.
 
AbstractControllercacheCntrl
 Ruby cache controller.
 
MessageBufferpfQueue
 Prefetch queue to the cache controller.
 
std::unordered_map< Addr, PacketPtrissuedPfPkts
 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RubyPrefetcherProxy()

gem5::ruby::RubyPrefetcherProxy::RubyPrefetcherProxy ( AbstractController parent,
prefetch::Base prefetcher,
MessageBuffer pf_queue 
)

Definition at line 49 of file RubyPrefetcherProxy.cc.

References issuePrefetch().

Member Function Documentation

◆ coalesce()

bool gem5::ruby::RubyPrefetcherProxy::coalesce ( ) const
inlineoverridevirtual

Determine if cache is coalescing writes.

Implements gem5::CacheAccessor.

Definition at line 173 of file RubyPrefetcherProxy.hh.

References cacheCntrl, and gem5::ruby::AbstractController::coalesce().

◆ completePrefetch()

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 makeLineAddress().

◆ deschedulePrefetch()

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().

◆ getOffset()

Addr gem5::ruby::RubyPrefetcherProxy::getOffset ( Addr  addr) const
private

◆ hasBeenPrefetched() [1/2]

bool gem5::ruby::RubyPrefetcherProxy::hasBeenPrefetched ( Addr  addr,
bool  is_secure 
) const
inlineoverridevirtual

Determine if address has been prefetched.

Implements gem5::CacheAccessor.

Definition at line 157 of file RubyPrefetcherProxy.hh.

References gem5::X86ISA::addr, cacheCntrl, and gem5::ruby::AbstractController::hasBeenPrefetched().

◆ hasBeenPrefetched() [2/2]

bool gem5::ruby::RubyPrefetcherProxy::hasBeenPrefetched ( Addr  addr,
bool  is_secure,
RequestorID  requestor 
) const
inlineoverridevirtual

Determine if address has been prefetched by the requestor.

Implements gem5::CacheAccessor.

Definition at line 162 of file RubyPrefetcherProxy.hh.

References gem5::X86ISA::addr, cacheCntrl, and gem5::ruby::AbstractController::hasBeenPrefetched().

◆ inCache()

bool gem5::ruby::RubyPrefetcherProxy::inCache ( Addr  addr,
bool  is_secure 
) const
inlineoverridevirtual

Accessor functions.

Implements gem5::CacheAccessor.

Definition at line 152 of file RubyPrefetcherProxy.hh.

References gem5::X86ISA::addr, cacheCntrl, and gem5::ruby::AbstractController::inCache().

◆ inMissQueue()

bool gem5::ruby::RubyPrefetcherProxy::inMissQueue ( Addr  addr,
bool  is_secure 
) const
inlineoverridevirtual

Determine if address is in cache miss queue.

Implements gem5::CacheAccessor.

Definition at line 168 of file RubyPrefetcherProxy.hh.

References gem5::X86ISA::addr, cacheCntrl, and gem5::ruby::AbstractController::inMissQueue().

◆ issuePrefetch()

void gem5::ruby::RubyPrefetcherProxy::issuePrefetch ( )
private

◆ makeLineAddress()

Addr gem5::ruby::RubyPrefetcherProxy::makeLineAddress ( Addr  addr) const
private

◆ notifyPfEvict()

void gem5::ruby::RubyPrefetcherProxy::notifyPfEvict ( Addr  blkAddr,
bool  hwPrefetched,
RequestorID  requestorID 
)

◆ notifyPfFill()

void gem5::ruby::RubyPrefetcherProxy::notifyPfFill ( const RequestPtr req,
const DataBlock data_blk,
bool  from_pf 
)

◆ notifyPfHit()

void gem5::ruby::RubyPrefetcherProxy::notifyPfHit ( const RequestPtr req,
bool  is_read,
const DataBlock data_blk 
)

◆ notifyPfMiss()

void gem5::ruby::RubyPrefetcherProxy::notifyPfMiss ( const RequestPtr req,
bool  is_read,
const DataBlock data_blk 
)

◆ regProbePoints()

void gem5::ruby::RubyPrefetcherProxy::regProbePoints ( )

Registers probes.

Definition at line 224 of file RubyPrefetcherProxy.cc.

References cacheCntrl, gem5::SimObject::getProbeManager(), ppDataUpdate, ppFill, ppHit, and ppMiss.

◆ scheduleNextPrefetch()

void gem5::ruby::RubyPrefetcherProxy::scheduleNextPrefetch ( )
private

Member Data Documentation

◆ cacheCntrl

AbstractController* gem5::ruby::RubyPrefetcherProxy::cacheCntrl
private

◆ issuedPfPkts

std::unordered_map<Addr, PacketPtr> gem5::ruby::RubyPrefetcherProxy::issuedPfPkts
private

List of issued prefetch request packets.

Definition at line 124 of file RubyPrefetcherProxy.hh.

Referenced by completePrefetch(), and issuePrefetch().

◆ pfEvent

EventFunctionWrapper gem5::ruby::RubyPrefetcherProxy::pfEvent
private

Prefetch event.

Definition at line 127 of file RubyPrefetcherProxy.hh.

Referenced by deschedulePrefetch(), and scheduleNextPrefetch().

◆ pfQueue

MessageBuffer* gem5::ruby::RubyPrefetcherProxy::pfQueue
private

Prefetch queue to the cache controller.

Definition at line 121 of file RubyPrefetcherProxy.hh.

Referenced by issuePrefetch().

◆ ppDataUpdate

ProbePointArg<CacheDataUpdateProbeArg>* gem5::ruby::RubyPrefetcherProxy::ppDataUpdate
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().

◆ ppFill

ProbePointArg<CacheAccessProbeArg>* gem5::ruby::RubyPrefetcherProxy::ppFill
private

To probe when a cache fill occurs.

Definition at line 136 of file RubyPrefetcherProxy.hh.

Referenced by notifyPfFill(), and regProbePoints().

◆ ppHit

ProbePointArg<CacheAccessProbeArg>* gem5::ruby::RubyPrefetcherProxy::ppHit
private

To probe when a cache hit occurs.

Definition at line 130 of file RubyPrefetcherProxy.hh.

Referenced by notifyPfHit(), and regProbePoints().

◆ ppMiss

ProbePointArg<CacheAccessProbeArg>* gem5::ruby::RubyPrefetcherProxy::ppMiss
private

To probe when a cache miss occurs.

Definition at line 133 of file RubyPrefetcherProxy.hh.

Referenced by notifyPfMiss(), and regProbePoints().

◆ prefetcher

prefetch::Base* gem5::ruby::RubyPrefetcherProxy::prefetcher
private

Prefetcher from classic memory.

Definition at line 115 of file RubyPrefetcherProxy.hh.

Referenced by issuePrefetch(), and scheduleNextPrefetch().


The documentation for this class was generated from the following files:

Generated on Mon Jan 13 2025 04:29:13 for gem5 by doxygen 1.9.8