summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-08-21 05:49:24 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-08-21 05:49:24 -0400
commit58033095745e9daba44b31541bb21599bb999141 (patch)
tree09ec821d18a5259b9aaa8b69eca8069ea0c9613d
parent4be1ae3cf874292e95afdf9811c51533bcde79f7 (diff)
downloadgem5-58033095745e9daba44b31541bb21599bb999141.tar.xz
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.
-rw-r--r--src/mem/packet_queue.cc3
1 files changed, 2 insertions, 1 deletions
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