bridge.hh (8713:2f1a3e335255) | bridge.hh (8851:7e966326ef5b) |
---|---|
1/* 2 * Copyright (c) 2011 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 --- 117 unchanged lines hidden (view full) --- 126 { 127 128 private: 129 130 /** A pointer to the bridge to which this port belongs. */ 131 Bridge *bridge; 132 133 /** | 1/* 2 * Copyright (c) 2011 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 --- 117 unchanged lines hidden (view full) --- 126 { 127 128 private: 129 130 /** A pointer to the bridge to which this port belongs. */ 131 Bridge *bridge; 132 133 /** |
134 * Pointer to the master port on the other side of the bridge | 134 * Master port on the other side of the bridge |
135 * (connected to the other bus). 136 */ | 135 * (connected to the other bus). 136 */ |
137 BridgeMasterPort* masterPort; | 137 BridgeMasterPort& masterPort; |
138 139 /** Minimum request delay though this bridge. */ 140 Tick delay; 141 142 /** Min delay to respond with a nack. */ 143 Tick nackDelay; 144 145 /** Address ranges to pass through the bridge */ --- 38 unchanged lines hidden (view full) --- 184 void trySend(); 185 186 /** 187 * Private class for scheduling sending of responses from the 188 * response queue. 189 */ 190 class SendEvent : public Event 191 { | 138 139 /** Minimum request delay though this bridge. */ 140 Tick delay; 141 142 /** Min delay to respond with a nack. */ 143 Tick nackDelay; 144 145 /** Address ranges to pass through the bridge */ --- 38 unchanged lines hidden (view full) --- 184 void trySend(); 185 186 /** 187 * Private class for scheduling sending of responses from the 188 * response queue. 189 */ 190 class SendEvent : public Event 191 { |
192 BridgeSlavePort *port; | 192 BridgeSlavePort& port; |
193 194 public: | 193 194 public: |
195 SendEvent(BridgeSlavePort *p) : port(p) {} 196 virtual void process() { port->trySend(); } | 195 SendEvent(BridgeSlavePort& p) : port(p) {} 196 virtual void process() { port.trySend(); } |
197 virtual const char *description() const { return "bridge send"; } 198 }; 199 200 /** Send event for the response queue. */ 201 SendEvent sendEvent; 202 203 public: 204 --- 4 unchanged lines hidden (view full) --- 209 * @param _bridge the structural owner 210 * @param _masterPort the master port on the other side of the bridge 211 * @param _delay the delay from seeing a response to sending it 212 * @param _nack_delay the delay from a NACK to sending the response 213 * @param _resp_limit the size of the response queue 214 * @param _ranges a number of address ranges to forward 215 */ 216 BridgeSlavePort(const std::string &_name, Bridge *_bridge, | 197 virtual const char *description() const { return "bridge send"; } 198 }; 199 200 /** Send event for the response queue. */ 201 SendEvent sendEvent; 202 203 public: 204 --- 4 unchanged lines hidden (view full) --- 209 * @param _bridge the structural owner 210 * @param _masterPort the master port on the other side of the bridge 211 * @param _delay the delay from seeing a response to sending it 212 * @param _nack_delay the delay from a NACK to sending the response 213 * @param _resp_limit the size of the response queue 214 * @param _ranges a number of address ranges to forward 215 */ 216 BridgeSlavePort(const std::string &_name, Bridge *_bridge, |
217 BridgeMasterPort* _masterPort, int _delay, | 217 BridgeMasterPort& _masterPort, int _delay, |
218 int _nack_delay, int _resp_limit, 219 std::vector<Range<Addr> > _ranges); 220 221 /** 222 * Queue a response packet to be sent out later and also schedule 223 * a send if necessary. 224 * 225 * @param pkt a response to send out after a delay --- 41 unchanged lines hidden (view full) --- 267 268 /** A pointer to the bridge to which this port belongs. */ 269 Bridge* bridge; 270 271 /** 272 * Pointer to the slave port on the other side of the bridge 273 * (connected to the other bus). 274 */ | 218 int _nack_delay, int _resp_limit, 219 std::vector<Range<Addr> > _ranges); 220 221 /** 222 * Queue a response packet to be sent out later and also schedule 223 * a send if necessary. 224 * 225 * @param pkt a response to send out after a delay --- 41 unchanged lines hidden (view full) --- 267 268 /** A pointer to the bridge to which this port belongs. */ 269 Bridge* bridge; 270 271 /** 272 * Pointer to the slave port on the other side of the bridge 273 * (connected to the other bus). 274 */ |
275 BridgeSlavePort* slavePort; | 275 BridgeSlavePort& slavePort; |
276 277 /** Minimum delay though this bridge. */ 278 Tick delay; 279 280 /** 281 * Request packet queue. Request packets are held in this 282 * queue for a specified delay to model the processing delay 283 * of the bridge. --- 14 unchanged lines hidden (view full) --- 298 void trySend(); 299 300 /** 301 * Private class for scheduling sending of requests from the 302 * request queue. 303 */ 304 class SendEvent : public Event 305 { | 276 277 /** Minimum delay though this bridge. */ 278 Tick delay; 279 280 /** 281 * Request packet queue. Request packets are held in this 282 * queue for a specified delay to model the processing delay 283 * of the bridge. --- 14 unchanged lines hidden (view full) --- 298 void trySend(); 299 300 /** 301 * Private class for scheduling sending of requests from the 302 * request queue. 303 */ 304 class SendEvent : public Event 305 { |
306 BridgeMasterPort *port; | 306 BridgeMasterPort& port; |
307 308 public: | 307 308 public: |
309 SendEvent(BridgeMasterPort *p) : port(p) {} 310 virtual void process() { port->trySend(); } | 309 SendEvent(BridgeMasterPort& p) : port(p) {} 310 virtual void process() { port.trySend(); } |
311 virtual const char *description() const { return "bridge send"; } 312 }; 313 314 /** Send event for the request queue. */ 315 SendEvent sendEvent; 316 317 public: 318 319 /** 320 * Constructor for the BridgeMasterPort. 321 * 322 * @param _name the port name including the owner 323 * @param _bridge the structural owner 324 * @param _slavePort the slave port on the other side of the bridge 325 * @param _delay the delay from seeing a request to sending it 326 * @param _req_limit the size of the request queue 327 */ 328 BridgeMasterPort(const std::string &_name, Bridge *_bridge, | 311 virtual const char *description() const { return "bridge send"; } 312 }; 313 314 /** Send event for the request queue. */ 315 SendEvent sendEvent; 316 317 public: 318 319 /** 320 * Constructor for the BridgeMasterPort. 321 * 322 * @param _name the port name including the owner 323 * @param _bridge the structural owner 324 * @param _slavePort the slave port on the other side of the bridge 325 * @param _delay the delay from seeing a request to sending it 326 * @param _req_limit the size of the request queue 327 */ 328 BridgeMasterPort(const std::string &_name, Bridge *_bridge, |
329 BridgeSlavePort* _slavePort, int _delay, | 329 BridgeSlavePort& _slavePort, int _delay, |
330 int _req_limit); 331 332 /** 333 * Is this side blocked from accepting new request packets. 334 * 335 * @return true if the occupied space has reached the set limit 336 */ 337 bool reqQueueFull(); --- 70 unchanged lines hidden --- | 330 int _req_limit); 331 332 /** 333 * Is this side blocked from accepting new request packets. 334 * 335 * @return true if the occupied space has reached the set limit 336 */ 337 bool reqQueueFull(); --- 70 unchanged lines hidden --- |