xbar.hh (10694:1a6785e37d81) xbar.hh (10713:eddb533708cb)
1/*
1/*
2 * Copyright (c) 2011-2014 ARM Limited
2 * Copyright (c) 2011-2015 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

169 */
170 void recvRetry();
171
172 /**
173 * Register stats for the layer
174 */
175 void regStats();
176
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

169 */
170 void recvRetry();
171
172 /**
173 * Register stats for the layer
174 */
175 void regStats();
176
177 protected:
178
179 /**
180 * Sending the actual retry, in a manner specific to the
181 * individual layers. Note that for a MasterPort, there is
182 * both a RequestLayer and a SnoopResponseLayer using the same
183 * port, but using different functions for the flow control.
184 */
185 virtual void sendRetry(SrcType* retry_port) = 0;
186
177 private:
178
179 /** The destination port this layer converges at. */
180 DstType& port;
181
182 /** The crossbar this layer is a part of. */
183 BaseXBar& xbar;
184

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

236 * the time the layer spends in the busy state and are thus only
237 * relevant when the memory system is in timing mode.
238 */
239 Stats::Scalar occupancy;
240 Stats::Formula utilization;
241
242 };
243
187 private:
188
189 /** The destination port this layer converges at. */
190 DstType& port;
191
192 /** The crossbar this layer is a part of. */
193 BaseXBar& xbar;
194

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

246 * the time the layer spends in the busy state and are thus only
247 * relevant when the memory system is in timing mode.
248 */
249 Stats::Scalar occupancy;
250 Stats::Formula utilization;
251
252 };
253
254 class ReqLayer : public Layer<SlavePort,MasterPort>
255 {
256 public:
257 /**
258 * Create a request layer and give it a name.
259 *
260 * @param _port destination port the layer converges at
261 * @param _xbar the crossbar this layer belongs to
262 * @param _name the layer's name
263 */
264 ReqLayer(MasterPort& _port, BaseXBar& _xbar, const std::string& _name) :
265 Layer(_port, _xbar, _name) {}
266
267 protected:
268
269 void sendRetry(SlavePort* retry_port)
270 { retry_port->sendRetryReq(); }
271 };
272
273 class RespLayer : public Layer<MasterPort,SlavePort>
274 {
275 public:
276 /**
277 * Create a response layer and give it a name.
278 *
279 * @param _port destination port the layer converges at
280 * @param _xbar the crossbar this layer belongs to
281 * @param _name the layer's name
282 */
283 RespLayer(SlavePort& _port, BaseXBar& _xbar, const std::string& _name) :
284 Layer(_port, _xbar, _name) {}
285
286 protected:
287
288 void sendRetry(MasterPort* retry_port)
289 { retry_port->sendRetryResp(); }
290 };
291
292 class SnoopRespLayer : public Layer<SlavePort,MasterPort>
293 {
294 public:
295 /**
296 * Create a snoop response layer and give it a name.
297 *
298 * @param _port destination port the layer converges at
299 * @param _xbar the crossbar this layer belongs to
300 * @param _name the layer's name
301 */
302 SnoopRespLayer(MasterPort& _port, BaseXBar& _xbar,
303 const std::string& _name) :
304 Layer(_port, _xbar, _name) {}
305
306 protected:
307
308 void sendRetry(SlavePort* retry_port)
309 { retry_port->sendRetrySnoopResp(); }
310 };
311
244 /** cycles of overhead per transaction */
245 const Cycles headerCycles;
246 /** the width of the xbar in bytes */
247 const uint32_t width;
248
249 AddrRangeMap<PortID> portMap;
250
251 /**

--- 146 unchanged lines hidden ---
312 /** cycles of overhead per transaction */
313 const Cycles headerCycles;
314 /** the width of the xbar in bytes */
315 const uint32_t width;
316
317 AddrRangeMap<PortID> portMap;
318
319 /**

--- 146 unchanged lines hidden ---