gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::BaseCache::CacheReqPacketQueue Class Reference

Override the default behaviour of sendDeferredPacket to enable the memory-side cache port to also send requests based on the current MSHR status. More...

#include <base.hh>

Inheritance diagram for gem5::BaseCache::CacheReqPacketQueue:
gem5::ReqPacketQueue gem5::PacketQueue gem5::Drainable

Public Member Functions

 CacheReqPacketQueue (BaseCache &cache, RequestPort &port, SnoopRespPacketQueue &snoop_resp_queue, const std::string &label)
 
virtual void sendDeferredPacket ()
 Override the normal sendDeferredPacket and do not only consider the transmit list (used for responses), but also requests.
 
bool checkConflictingSnoop (const PacketPtr pkt)
 Check if there is a conflicting snoop response about to be send out, and if so simply stall any requests, and schedule a send event at the same time as the next snoop response is being sent out.
 
- Public Member Functions inherited from gem5::ReqPacketQueue
 ReqPacketQueue (EventManager &_em, RequestPort &_mem_side_port, const std::string _label="ReqPacketQueue")
 Create a request packet queue, linked to an event manager, a memory-side port, and a label that will be used for functional print request packets.
 
virtual ~ReqPacketQueue ()
 
const std::string name () const
 Provide a name to simplify debugging.
 
bool sendTiming (PacketPtr pkt)
 Send a packet using the appropriate method for the specific subclass (request, response or snoop response).
 
- Public Member Functions inherited from gem5::PacketQueue
size_t size () const
 Get the size of the queue.
 
Tick deferredPacketReadyTime () const
 Get the next packet ready time.
 
bool checkConflict (const PacketPtr pkt, const int blk_size) const
 Check if a packet corresponding to the same address exists in the queue.
 
bool trySatisfyFunctional (PacketPtr pkt)
 Check the list of buffered packets against the supplied functional request.
 
void schedSendEvent (Tick when)
 Schedule a send event if we are not already waiting for a retry.
 
void schedSendTiming (PacketPtr pkt, Tick when)
 Add a packet to the transmit list, and schedule a send event.
 
void retry ()
 Retry sending a packet from the queue.
 
void disableSanityCheck ()
 This allows a user to explicitly disable the sanity check on the size of the transmitList, which is enabled by default.
 
DrainState drain () override
 Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight.
 
- Public Member Functions inherited from gem5::Drainable
DrainState drainState () const
 Return the current drain state of an object.
 
virtual void notifyFork ()
 Notify a child process of a fork.
 

Protected Attributes

BaseCachecache
 
SnoopRespPacketQueuesnoopRespQueue
 
- Protected Attributes inherited from gem5::ReqPacketQueue
RequestPortmemSidePort
 
- Protected Attributes inherited from gem5::PacketQueue
const std::string label
 Label to use for print request packets label stack.
 
bool waitingOnRetry
 Remember whether we're awaiting a retry.
 

Additional Inherited Members

- Protected Member Functions inherited from gem5::PacketQueue
bool deferredPacketReady () const
 Check whether we have a packet ready to go on the transmit list.
 
 PacketQueue (EventManager &_em, const std::string &_label, const std::string &_sendEventName, bool force_order=false, bool disable_sanity_check=false)
 Create a packet queue, linked to an event manager, and a label that will be used for functional print request packets.
 
virtual ~PacketQueue ()
 Virtual desctructor since the class may be used as a base class.
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain.
 
void signalDrainDone () const
 Signal that an object is drained.
 
- Static Protected Member Functions inherited from gem5::ReqPacketQueue
static const std::string name (const RequestPort &memSidePort, const std::string &label)
 

Detailed Description

Override the default behaviour of sendDeferredPacket to enable the memory-side cache port to also send requests based on the current MSHR status.

This queue has a pointer to our specific cache implementation and is used by the MemSidePort.

Definition at line 171 of file base.hh.

Constructor & Destructor Documentation

◆ CacheReqPacketQueue()

gem5::BaseCache::CacheReqPacketQueue::CacheReqPacketQueue ( BaseCache & cache,
RequestPort & port,
SnoopRespPacketQueue & snoop_resp_queue,
const std::string & label )
inline

Definition at line 181 of file base.hh.

Member Function Documentation

◆ checkConflictingSnoop()

bool gem5::BaseCache::CacheReqPacketQueue::checkConflictingSnoop ( const PacketPtr pkt)
inline

Check if there is a conflicting snoop response about to be send out, and if so simply stall any requests, and schedule a send event at the same time as the next snoop response is being sent out.

Parameters
pktThe packet to check for conflicts against.

Definition at line 202 of file base.hh.

References gem5::BaseCache::blkSize, cache, gem5::PacketQueue::checkConflict(), gem5::PacketQueue::deferredPacketReadyTime(), DPRINTF, gem5::PacketQueue::schedSendEvent(), and snoopRespQueue.

◆ sendDeferredPacket()

void gem5::BaseCache::CacheReqPacketQueue::sendDeferredPacket ( )
virtual

Override the normal sendDeferredPacket and do not only consider the transmit list (used for responses), but also requests.

Reimplemented from gem5::PacketQueue.

Definition at line 2672 of file base.cc.

References gem5::QueueEntry::getTarget(), gem5::MaxTick, gem5::QueueEntry::Target::pkt, and gem5::QueueEntry::sendPacket().

Member Data Documentation

◆ cache

BaseCache& gem5::BaseCache::CacheReqPacketQueue::cache
protected

Definition at line 176 of file base.hh.

Referenced by checkConflictingSnoop().

◆ snoopRespQueue

SnoopRespPacketQueue& gem5::BaseCache::CacheReqPacketQueue::snoopRespQueue
protected

Definition at line 177 of file base.hh.

Referenced by checkConflictingSnoop().


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

Generated on Tue Jun 18 2024 16:24:09 for gem5 by doxygen 1.11.0