summaryrefslogtreecommitdiff
path: root/src/mem/tport.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-08-04 20:27:23 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-08-04 20:27:23 -0700
commitcae8d20633c0f43fdae23576adfb894284a7ee86 (patch)
treee9e232684d7fc024900d8a07d6b8a3add1f52e92 /src/mem/tport.hh
parent30e777a5d3829975266ecccac965d2297a5f4985 (diff)
parentdf015f17a45b18302565c43d3790d787e1b54c42 (diff)
downloadgem5-cae8d20633c0f43fdae23576adfb894284a7ee86.tar.xz
Merge with head.
--HG-- extra : convert_revision : 3edb9f03353b18b4c9f062bccf11e79cfb3c15f2
Diffstat (limited to 'src/mem/tport.hh')
-rw-r--r--src/mem/tport.hh20
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