diff options
Diffstat (limited to 'src/mem/tport.hh')
-rw-r--r-- | src/mem/tport.hh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mem/tport.hh b/src/mem/tport.hh index ea0f05ed1..d0f1be425 100644 --- a/src/mem/tport.hh +++ b/src/mem/tport.hh @@ -99,12 +99,30 @@ class SimpleTimingPort : public Port /** Check the list of buffered packets against the supplied * functional request. */ - void checkFunctional(PacketPtr funcPkt); + bool checkFunctional(PacketPtr funcPkt); /** Check whether we have a packet ready to go on the transmit list. */ bool deferredPacketReady() { return !transmitList.empty() && transmitList.front().tick <= curTick; } + Tick deferredPacketReadyTime() + { return transmitList.empty() ? MaxTick : transmitList.front().tick; } + + void schedSendEvent(Tick when) + { + if (waitingOnRetry) { + assert(!sendEvent->scheduled()); + return; + } + + if (!sendEvent->scheduled()) { + sendEvent->schedule(when); + } else if (sendEvent->when() > when) { + sendEvent->reschedule(when); + } + } + + /** Schedule a sendTiming() event to be called in the future. * @param pkt packet to send * @param absolute time (in ticks) to send packet |