Go to the documentation of this file.
44 #include "debug/Drain.hh"
45 #include "debug/PacketQueue.hh"
48 const std::string& _sendEventName,
50 bool disable_sanity_check)
52 _disableSanityCheck(disable_sanity_check),
53 forceOrder(force_order),
54 label(_label), waitingOnRetry(
false)
77 if (
p.pkt->matchBlockAddr(pkt, blk_size))
119 panic(
"Packet queue %s has grown beyond 128 packets\n",
138 if ((
forceOrder && it->pkt->matchAddr(pkt)) || it->tick <= when) {
164 when = std::max(when,
curTick() + 1);
180 DPRINTF(Drain,
"PacketQueue done draining,"
181 "processing drain event\n");
230 DPRINTF(Drain,
"PacketQueue not drained\n");
236 const std::string _label)
238 memSidePort(_mem_side_port)
251 const std::string _label)
253 memSidePort(_mem_side_port)
266 const std::string _label)
268 cpuSidePort(_cpu_side_port)
void sendEvent(ThreadContext *tc)
Send an event (SEV) to a specific PE if there isn't already a pending event.
virtual void sendDeferredPacket()
Attempt to send a packet.
DeferredPacketList transmitList
A list of outgoing packets.
bool scheduled() const
Determine if the current event is scheduled.
A ResponsePort is a specialization of a port.
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the request port by calling its corresponding receive function.
bool sendTiming(PacketPtr pkt)
Send a packet using the appropriate method for the specific subclass (request, response or snoop resp...
bool isExpressSnoop() const
EventFunctionWrapper sendEvent
Event used to call processSendEvent.
void reschedule(Event &event, Tick when, bool always=false)
RequestPort & memSidePort
A packet queue is a class that holds deferred packets and later sends them using the associated CPU-s...
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,...
bool waitingOnRetry
Remember whether we're awaiting a retry.
uint64_t Tick
Tick count type.
void pushLabel(const std::string &lbl)
Push label for PrintReq (safe to call unconditionally).
void schedSendEvent(Tick when)
Schedule a send event if we are not already waiting for a retry.
bool forceOrder
if true, inserted packets have to be unconditionally scheduled after the last packet in the queue tha...
RequestPort & memSidePort
Tick when() const
Get the time that the event is scheduled.
void schedSendTiming(PacketPtr pkt, Tick when)
Add a packet to the transmit list, and schedule a send event.
virtual bool sendTiming(PacketPtr pkt)=0
Send a packet using the appropriate method for the specific subclass (request, response or snoop resp...
bool sendTimingSnoopResp(PacketPtr pkt)
Attempt to send a timing snoop response packet to the response port by calling its corresponding rece...
EventManager & em
The manager which is used for the event queue.
@ Drained
Buffers drained, ready for serialization/handover.
DrainState
Object drain/handover states.
bool sendTiming(PacketPtr pkt)
Send a packet using the appropriate method for the specific subclass (request, response or snoop resp...
void schedule(Event &event, Tick when)
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 ...
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).
void signalDrainDone() const
Signal that an object is drained.
bool sendTiming(PacketPtr pkt)
Send a packet using the appropriate method for the specific subclass (request, response or snoop resp...
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.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
virtual const std::string name() const =0
Provide a name to simplify debugging.
const std::string & name()
DrainState drainState() const
Return the current drain state of an object.
A deferred packet, buffered to transmit later.
bool trySatisfyFunctional(PacketPtr pkt)
Check the list of buffered packets against the supplied functional request.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
virtual ~PacketQueue()
Virtual desctructor since the class may be used as a base class.
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...
const std::string label
Label to use for print request packets label stack.
Tick deferredPacketReadyTime() const
Get the next packet ready time.
Tick curTick()
The universal simulation clock.
bool checkConflict(const PacketPtr pkt, const int blk_size) const
Check if a packet corresponding to the same address exists in the queue.
ResponsePort & cpuSidePort
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...
bool trySatisfyFunctional(PacketPtr other)
Check a functional request against a memory value stored in another packet (i.e.
void popLabel()
Pop label for PrintReq (safe to call unconditionally).
@ Draining
Draining buffers pending serialization/handover.
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
void retry()
Retry sending a packet from the queue.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Tue Mar 23 2021 19:41:28 for gem5 by doxygen 1.8.17