packet_queue.hh (8914:8c3bd7bea667) packet_queue.hh (8948:e95ee70f876c)
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 56 unchanged lines hidden (view full) ---

65class PacketQueue
66{
67 private:
68 /** A deferred packet, buffered to transmit later. */
69 class DeferredPacket {
70 public:
71 Tick tick; ///< The tick when the packet is ready to transmit
72 PacketPtr pkt; ///< Pointer to the packet to transmit
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 56 unchanged lines hidden (view full) ---

65class PacketQueue
66{
67 private:
68 /** A deferred packet, buffered to transmit later. */
69 class DeferredPacket {
70 public:
71 Tick tick; ///< The tick when the packet is ready to transmit
72 PacketPtr pkt; ///< Pointer to the packet to transmit
73 DeferredPacket(Tick t, PacketPtr p)
74 : tick(t), pkt(p)
73 bool sendAsSnoop; ///< Should it be sent as a snoop or not
74 DeferredPacket(Tick t, PacketPtr p, bool send_as_snoop)
75 : tick(t), pkt(p), sendAsSnoop(send_as_snoop)
75 {}
76 };
77
78 typedef std::list<DeferredPacket> DeferredPacketList;
79 typedef std::list<DeferredPacket>::iterator DeferredPacketIterator;
80
81 /** A list of outgoing timing response packets that haven't been
82 * serviced yet. */

--- 108 unchanged lines hidden (view full) ---

191 void schedSendEvent(Tick when);
192
193 /**
194 * Add a packet to the transmit list, and ensure that a
195 * processSendEvent is called in the future.
196 *
197 * @param pkt Packet to send
198 * @param when Absolute time (in ticks) to send packet
76 {}
77 };
78
79 typedef std::list<DeferredPacket> DeferredPacketList;
80 typedef std::list<DeferredPacket>::iterator DeferredPacketIterator;
81
82 /** A list of outgoing timing response packets that haven't been
83 * serviced yet. */

--- 108 unchanged lines hidden (view full) ---

192 void schedSendEvent(Tick when);
193
194 /**
195 * Add a packet to the transmit list, and ensure that a
196 * processSendEvent is called in the future.
197 *
198 * @param pkt Packet to send
199 * @param when Absolute time (in ticks) to send packet
200 * @param send_as_snoop Send the packet as a snoop or not
199 */
201 */
200 void schedSendTiming(PacketPtr pkt, Tick when);
202 void schedSendTiming(PacketPtr pkt, Tick when, bool send_as_snoop = false);
201
202 /**
203 * Used by a port to notify the queue that a retry was received
204 * and that the queue can proceed and retry sending the packet
205 * that caused the wait.
206 */
207 void retry();
208
209 /**
210 * Hook for draining the packet queue.
211 *
212 * @param de An event which is used to signal back to the caller
213 * @return A number indicating how many times process will be called
214 */
215 unsigned int drain(Event *de);
216};
217
203
204 /**
205 * Used by a port to notify the queue that a retry was received
206 * and that the queue can proceed and retry sending the packet
207 * that caused the wait.
208 */
209 void retry();
210
211 /**
212 * Hook for draining the packet queue.
213 *
214 * @param de An event which is used to signal back to the caller
215 * @return A number indicating how many times process will be called
216 */
217 unsigned int drain(Event *de);
218};
219
218#endif // __MEM_TPORT_HH__
220#endif // __MEM_PACKET_QUEUE_HH__