From e317d8b9ff611f16e116946054ac9a90cb453300 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Wed, 22 Aug 2012 11:39:56 -0400 Subject: Port: Extend the QueuedPort interface and use where appropriate This patch extends the queued port interfaces with methods for scheduling the transmission of a timing request/response. The methods are named similar to the corresponding sendTiming(Snoop)Req/Resp, replacing the "send" with "sched". As the queues are currently unbounded, the methods always succeed and hence do not return a value. This functionality was previously provided in the subclasses by calling PacketQueue::schedSendTiming with the appropriate parameters. With this change, there is no need to introduce these extra methods in the subclasses, and the use of the queued interface is more uniform and explicit. --- src/mem/qport.hh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/mem/qport.hh') diff --git a/src/mem/qport.hh b/src/mem/qport.hh index 1d0544dfa..b771f6984 100644 --- a/src/mem/qport.hh +++ b/src/mem/qport.hh @@ -84,6 +84,15 @@ class QueuedSlavePort : public SlavePort virtual ~QueuedSlavePort() { } + /** + * Schedule the sending of a timing response. + * + * @param pkt Packet to send + * @param when Absolute time (in ticks) to send packet + */ + void schedTimingResp(PacketPtr pkt, Tick when) + { queue.schedSendTiming(pkt, when); } + /** Check the list of buffered packets against the supplied * functional request. */ bool checkFunctional(PacketPtr pkt) { return queue.checkFunctional(pkt); } @@ -125,6 +134,24 @@ class QueuedMasterPort : public MasterPort virtual ~QueuedMasterPort() { } + /** + * Schedule the sending of a timing request. + * + * @param pkt Packet to send + * @param when Absolute time (in ticks) to send packet + */ + void schedTimingReq(PacketPtr pkt, Tick when) + { queue.schedSendTiming(pkt, when); } + + /** + * Schedule the sending of a timing snoop response. + * + * @param pkt Packet to send + * @param when Absolute time (in ticks) to send packet + */ + void schedTimingSnoopResp(PacketPtr pkt, Tick when) + { queue.schedSendTiming(pkt, when, true); } + /** Check the list of buffered packets against the supplied * functional request. */ bool checkFunctional(PacketPtr pkt) { return queue.checkFunctional(pkt); } -- cgit v1.2.3