41#ifndef __MEM_PACKET_QUEUE_HH__
42#define __MEM_PACKET_QUEUE_HH__
146 const std::string& _sendEventName,
147 bool force_order =
false,
148 bool disable_sanity_check =
false);
162 virtual const std::string
name()
const = 0;
236 const std::string&
label)
251 const std::string _label =
"ReqPacketQueue");
272 const std::string&
label)
288 bool force_order =
false,
289 const std::string _label =
"SnoopRespPacketQueue");
310 const std::string&
label)
326 bool force_order =
false,
327 const std::string _label =
"RespPacketQueue");
Interface for objects that might require draining before checkpointing.
A deferred packet, buffered to transmit later.
DeferredPacket(Tick t, PacketPtr p)
PacketPtr pkt
Pointer to the packet to transmit.
Tick tick
The tick when the packet is ready to transmit.
A packet queue is a class that holds deferred packets and later sends them using the associated CPU-s...
size_t size() const
Get the size of the queue.
bool waitingOnRetry
Remember whether we're awaiting a retry.
bool forceOrder
if true, inserted packets have to be unconditionally scheduled after the last packet in the queue tha...
void disableSanityCheck()
This allows a user to explicitly disable the sanity check on the size of the transmitList,...
EventManager & em
The manager which is used for the event queue.
bool trySatisfyFunctional(PacketPtr pkt)
Check the list of buffered packets against the supplied functional request.
void processSendEvent()
Used to schedule sending of deferred packets.
bool deferredPacketReady() const
Check whether we have a packet ready to go on the transmit list.
DeferredPacketList transmitList
A list of outgoing packets.
const std::string label
Label to use for print request packets label stack.
EventFunctionWrapper sendEvent
Event used to call processSendEvent.
void retry()
Retry sending a packet from the queue.
virtual bool sendTiming(PacketPtr pkt)=0
Send a packet using the appropriate method for the specific subclass (request, response or snoop resp...
void schedSendTiming(PacketPtr pkt, Tick when)
Add a packet to the transmit list, and schedule a send event.
virtual const std::string name() const =0
Provide a name to simplify debugging.
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...
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
bool checkConflict(const PacketPtr pkt, const int blk_size) const
Check if a packet corresponding to the same address exists in the queue.
virtual void sendDeferredPacket()
Attempt to send a packet.
void schedSendEvent(Tick when)
Schedule a send event if we are not already waiting for a retry.
std::list< DeferredPacket > DeferredPacketList
virtual ~PacketQueue()
Virtual desctructor since the class may be used as a base class.
Tick deferredPacketReadyTime() const
Get the next packet ready time.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
const std::string name() const
Return port name (for DPRINTF).
static const std::string name(const RequestPort &memSidePort, const std::string &label)
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 resp...
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 ...
RequestPort & memSidePort
virtual ~ReqPacketQueue()
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
static const std::string name(const ResponsePort &cpuSidePort, const std::string &label)
const std::string name() const
Provide a name to simplify debugging.
virtual ~RespPacketQueue()
bool sendTiming(PacketPtr pkt)
Send a packet using the appropriate method for the specific subclass (request, response or snoop resp...
ResponsePort & cpuSidePort
RespPacketQueue(EventManager &_em, ResponsePort &_cpu_side_port, bool force_order=false, const std::string _label="RespPacketQueue")
Create a response packet queue, linked to an event manager, a CPU-side port, and a label that will be...
A ResponsePort is a specialization of a port.
const std::string name() const
Provide a name to simplify debugging.
RequestPort & memSidePort
static const std::string name(const RequestPort &memSidePort, const std::string &label)
SnoopRespPacketQueue(EventManager &_em, RequestPort &_mem_side_port, bool force_order=false, const std::string _label="SnoopRespPacketQueue")
Create a snoop response packet queue, linked to an event manager, a memory-side port,...
virtual ~SnoopRespPacketQueue()
bool sendTiming(PacketPtr pkt)
Send a packet using the appropriate method for the specific subclass (request, response or snoop resp...
DrainState
Object drain/handover states.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
uint64_t Tick
Tick count type.