Deleted Added
sdiff udiff text old ( 8922:17f037ad8918 ) new ( 8948:e95ee70f876c )
full compact
1/*
2 * Copyright (c) 2011-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

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

110 /** Return port name (for DPRINTF). */
111 const std::string name() const { return portName; }
112
113 protected:
114
115 /** These functions are protected because they should only be
116 * called by a peer port, never directly by any outside object. */
117
118 /** Called to recive a timing call from the peer port. */
119 virtual bool recvTiming(PacketPtr pkt) = 0;
120
121 /** Called to recive a atomic call from the peer port. */
122 virtual Tick recvAtomic(PacketPtr pkt) = 0;
123
124 /** Called to recive a functional call from the peer port. */
125 virtual void recvFunctional(PacketPtr pkt) = 0;
126
127 /**
128 * Called by a peer port if sendTiming was unsuccesful, and had to
129 * wait.
130 */
131 virtual void recvRetry() = 0;
132
133 public:
134
135 /**
136 * Attempt to send a timing packet to the peer port by calling its
137 * receive function. If the send does not succeed, as indicated by
138 * the return value, then the sender must wait for a recvRetry at
139 * which point it can re-issue a sendTiming.
140 *
141 * @param pkt Packet to send.
142 *
143 * @return If the send was succesful or not.
144 */
145 bool sendTiming(PacketPtr pkt) { return peer->recvTiming(pkt); }
146
147 /**
148 * Send a retry to a peer port that previously attempted a sendTiming
149 * which was unsuccessful.
150 */
151 void sendRetry() { return peer->recvRetry(); }
152
153 /**
154 * Send an atomic packet, where the data is moved and the state
155 * is updated in zero time, without interleaving with other
156 * memory accesses.
157 *
158 * @param pkt Packet to send.
159 *
160 * @return Estimated latency of access.
161 */
162 Tick sendAtomic(PacketPtr pkt) { return peer->recvAtomic(pkt); }
163
164 /**
165 * Send a functional packet, where the data is instantly updated
166 * everywhere in the memory system, without affecting the current
167 * state of any block or moving the block.
168 *
169 * @param pkt Packet to send.
170 */
171 void sendFunctional(PacketPtr pkt) { return peer->recvFunctional(pkt); }
172
173};
174
175/** Forward declaration */
176class SlavePort;
177
178/**
179 * A MasterPort is a specialisation of a port. In addition to the

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

193 MasterPort(const std::string& name, MemObject* owner);
194 virtual ~MasterPort();
195
196 void bind(SlavePort& slave_port);
197 SlavePort& getSlavePort() const;
198 bool isConnected() const;
199
200 /**
201 * Called to receive an address range change from the peer slave
202 * port. the default implementation ignored the change and does
203 * nothing. Override this function in a derived class if the owner
204 * needs to be aware of he laesddress ranges, e.g. in an
205 * interconnect component like a bus.
206 */
207 virtual void recvRangeChange() { }
208

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

252 SlavePort(const std::string& name, MemObject* owner);
253 virtual ~SlavePort();
254
255 void bind(MasterPort& master_port);
256 MasterPort& getMasterPort() const;
257 bool isConnected() const;
258
259 /**
260 * Called by a peer port in order to determine the block size of
261 * the owner of this port.
262 */
263 virtual unsigned deviceBlockSize() const { return 0; }
264
265 /** Called by the associated device if it wishes to find out the blocksize
266 of the device on attached to the peer port.
267 */

--- 18 unchanged lines hidden ---