Deleted Added
sdiff udiff text old ( 8711:c7e14f52c682 ) new ( 8856:241ee47b0dc6 )
full compact
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright

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

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Ali Saidi
29 */
30
31#ifndef __MEM_TPORT_HH__
32#define __MEM_TPORT_HH__
33
34/**
35 * @file
36 *

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

71
72 typedef std::list<DeferredPacket> DeferredPacketList;
73 typedef std::list<DeferredPacket>::iterator DeferredPacketIterator;
74
75 /** A list of outgoing timing response packets that haven't been
76 * serviced yet. */
77 DeferredPacketList transmitList;
78
79 /** This function attempts to send deferred packets. Scheduled to
80 * be called in the future via SendEvent. */
81 void processSendEvent();
82
83 /**
84 * This class is used to implemented sendTiming() with a delay. When
85 * a delay is requested a the event is scheduled if it isn't already.
86 * When the event time expires it attempts to send the packet.
87 * If it cannot, the packet sent when recvRetry() is called.
88 **/
89 Event *sendEvent;
90
91 /** If we need to drain, keep the drain event around until we're done
92 * here.*/
93 Event *drainEvent;
94
95 /** Remember whether we're awaiting a retry from the bus. */
96 bool waitingOnRetry;
97
98 /** Check the list of buffered packets against the supplied
99 * functional request. */
100 bool checkFunctional(PacketPtr funcPkt);
101
102 /** Check whether we have a packet ready to go on the transmit list. */
103 bool deferredPacketReady()
104 { return !transmitList.empty() && transmitList.front().tick <= curTick(); }
105
106 Tick deferredPacketReadyTime()
107 { return transmitList.empty() ? MaxTick : transmitList.front().tick; }
108
109 /**

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

121 */
122 void schedSendTiming(PacketPtr pkt, Tick when);
123
124 /** Attempt to send the packet at the head of the deferred packet
125 * list. Caller must guarantee that the deferred packet list is
126 * non-empty and that the head packet is scheduled for curTick() (or
127 * earlier).
128 */
129 void sendDeferredPacket();
130
131 /** This function is notification that the device should attempt to send a
132 * packet again. */
133 virtual void recvRetry();
134
135 /** Implemented using recvAtomic(). */
136 void recvFunctional(PacketPtr pkt);
137
138 /** Implemented using recvAtomic(). */

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

144 * range changes (as the neighbouring port has a master role and
145 * do not have any address ranges. A subclass can override the
146 * default behaviuor if needed.
147 */
148 virtual void recvRangeChange() { }
149
150
151 public:
152 SimpleTimingPort(std::string pname, MemObject *_owner);
153 ~SimpleTimingPort();
154
155 /** Hook for draining timing accesses from the system. The
156 * associated SimObject's drain() functions should be implemented
157 * something like this when this class is used:
158 \code
159 PioDevice::drain(Event *de)
160 {
161 unsigned int count;
162 count = SimpleTimingPort->drain(de);

--- 12 unchanged lines hidden ---