Deleted Added
sdiff udiff text old ( 2642:c162e0359b49 ) new ( 2657:b119b774656b )
full compact
1/*
2 * Copyright (c) 2002-2005 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;

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

87 { }
88
89 /** Return port name (for DPRINTF). */
90 const std::string &name() const { return portName; }
91
92 virtual ~Port() {};
93
94 // mey be better to use subclasses & RTTI?
95 /** Holds the ports status. Keeps track if it is blocked, or has
96 calculated a range change. */
97 enum Status {
98 Blocked,
99 Unblocked,
100 RangeChange
101 };
102
103 private:
104
105 /** A pointer to the peer port. Ports always come in pairs, that way they
106 can use a standardized interface to communicate between different
107 memory objects. */

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

135
136 /** Called to recieve a status change from the peer port. */
137 virtual void recvStatusChange(Status status) = 0;
138
139 /** Called by a peer port if the send was unsuccesful, and had to
140 wait. This shouldn't be valid for response paths (IO Devices).
141 so it is set to panic if it isn't already defined.
142 */
143 virtual Packet *recvRetry() { panic("??"); }
144
145 /** Called by a peer port in order to determine the block size of the
146 device connected to this port. It sometimes doesn't make sense for
147 this function to be called, a DMA interface doesn't really have a
148 block size, so it is defaulted to a panic.
149 */
150 virtual int deviceBlockSize() { panic("??"); }
151

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

160
161 public:
162
163 /** Function called by associated memory device (cache, memory, iodevice)
164 in order to send a timing request to the port. Simply calls the peer
165 port receive function.
166 @return This function returns if the send was succesful in it's
167 recieve. If it was a failure, then the port will wait for a recvRetry
168 at which point it can issue a successful sendTiming. This is used in
169 case a cache has a higher priority request come in while waiting for
170 the bus to arbitrate.
171 */
172 bool sendTiming(Packet *pkt) { return peer->recvTiming(pkt); }
173
174 /** Function called by the associated device to send an atomic access,
175 an access in which the data is moved and the state is updated in one
176 cycle, without interleaving with other memory accesses.

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

189 /** Called by the associated device to send a status change to the device
190 connected to the peer interface.
191 */
192 void sendStatusChange(Status status) {peer->recvStatusChange(status); }
193
194 /** When a timing access doesn't return a success, some time later the
195 Retry will be sent.
196 */
197 Packet *sendRetry() { return peer->recvRetry(); }
198
199 /** Called by the associated device if it wishes to find out the blocksize
200 of the device on attached to the peer port.
201 */
202 int peerBlockSize() { return peer->deviceBlockSize(); }
203
204 /** Called by the associated device if it wishes to find out the address
205 ranges connected to the peer ports devices.

--- 65 unchanged lines hidden ---