From: Andreas Hansson Date: Tue, 21 Aug 2012 09:49:24 +0000 (-0400) Subject: PacketQueue: Allow queuing in the same tick as desired send tick X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58033095745e9daba44b31541bb21599bb999141;p=gem5.git PacketQueue: Allow queuing in the same tick as desired send tick This patch allows packets to be enqueued in the same tick as they are intended to be sent. This does not imply they actually are sent that tick, although that is possible. This change is useful for module that use the queued ports primarly to avoid handling the flow control involved in sending and retrying packets. --- diff --git a/src/mem/packet_queue.cc b/src/mem/packet_queue.cc index 77fba8883..37aa2dcda 100644 --- a/src/mem/packet_queue.cc +++ b/src/mem/packet_queue.cc @@ -106,7 +106,8 @@ PacketQueue::schedSendEvent(Tick when) void PacketQueue::schedSendTiming(PacketPtr pkt, Tick when, bool send_as_snoop) { - assert(when > curTick()); + // we can still send a packet before the end of this tick + assert(when >= curTick()); // nothing on the list, or earlier than current front element, // schedule an event