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