gem5 v24.0.0.0
Loading...
Searching...
No Matches
xbar.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011-2015, 2018-2020 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
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2006 The Regents of The University of Michigan
15 * All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions are
19 * met: redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer;
21 * redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution;
24 * neither the name of the copyright holders nor the names of its
25 * contributors may be used to endorse or promote products derived from
26 * this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 */
40
46#include "mem/xbar.hh"
47
48#include <memory>
49#include <string>
50
51#include "base/logging.hh"
52#include "base/trace.hh"
53#include "debug/AddrRanges.hh"
54#include "debug/Drain.hh"
55#include "debug/XBar.hh"
56
57namespace gem5
58{
59
60BaseXBar::BaseXBar(const BaseXBarParams &p)
62 frontendLatency(p.frontend_latency),
63 forwardLatency(p.forward_latency),
64 responseLatency(p.response_latency),
65 headerLatency(p.header_latency),
66 width(p.width),
67 gotAddrRanges(p.port_default_connection_count +
68 p.port_mem_side_ports_connection_count, false),
69 gotAllAddrRanges(false), defaultPortID(InvalidPortID),
70 useDefaultRange(p.use_default_range),
71
72 ADD_STAT(transDist, statistics::units::Count::get(),
73 "Transaction distribution"),
74 ADD_STAT(pktCount, statistics::units::Count::get(),
75 "Packet count per connected requestor and responder"),
76 ADD_STAT(pktSize, statistics::units::Byte::get(),
77 "Cumulative packet size per connected requestor and responder")
78{
79}
80
82{
83 for (auto port: memSidePorts)
84 delete port;
85
86 for (auto port: cpuSidePorts)
87 delete port;
88}
89
90Port &
91BaseXBar::getPort(const std::string &if_name, PortID idx)
92{
93 if (if_name == "mem_side_ports" && idx < memSidePorts.size()) {
94 // the memory-side ports index translates directly to the vector
95 // position
96 return *memSidePorts[idx];
97 } else if (if_name == "default") {
99 } else if (if_name == "cpu_side_ports" && idx < cpuSidePorts.size()) {
100 // the CPU-side ports index translates directly to the vector position
101 return *cpuSidePorts[idx];
102 } else {
103 return ClockedObject::getPort(if_name, idx);
105}
106
107void
109{
110 // the crossbar will be called at a time that is not necessarily
111 // coinciding with its own clock, so start by determining how long
112 // until the next clock edge (could be zero)
114
115 // the header delay depends on the path through the crossbar, and
116 // we therefore rely on the caller to provide the actual
117 // value
118 pkt->headerDelay += offset + header_delay;
119
120 // note that we add the header delay to the existing value, and
121 // align it to the crossbar clock
122
123 // do a quick sanity check to ensure the timings are not being
124 // ignored, note that this specific value may cause problems for
125 // slower interconnects
127 "Encountered header delay exceeding 1 us\n");
128
129 if (pkt->hasData()) {
130 // the payloadDelay takes into account the relative time to
131 // deliver the payload of the packet, after the header delay,
132 // we take the maximum since the payload delay could already
133 // be longer than what this parcitular crossbar enforces.
134 pkt->payloadDelay = std::max<Tick>(pkt->payloadDelay,
135 divCeil(pkt->getSize(), width) *
136 clockPeriod());
137 }
138
139 // the payload delay is not paying for the clock offset as that is
140 // already done using the header delay, and the payload delay is
141 // also used to determine how long the crossbar layer is busy and
142 // thus regulates throughput
143}
144
145template <typename SrcType, typename DstType>
147 const std::string& _name) :
148 statistics::Group(&_xbar, _name.c_str()),
149 port(_port), xbar(_xbar), _name(xbar.name() + "." + _name), state(IDLE),
150 waitingForPeer(NULL), releaseEvent([this]{ releaseLayer(); }, name()),
151 ADD_STAT(occupancy, statistics::units::Tick::get(), "Layer occupancy (ticks)"),
152 ADD_STAT(utilization, statistics::units::Ratio::get(), "Layer utilization")
153{
154 occupancy
155 .flags(statistics::nozero);
156
157 utilization
158 .precision(1)
159 .flags(statistics::nozero);
160
161 utilization = occupancy / simTicks;
162}
163
164template <typename SrcType, typename DstType>
166{
167 // ensure the state is busy at this point, as the layer should
168 // transition from idle as soon as it has decided to forward the
169 // packet to prevent any follow-on calls to sendTiming seeing an
170 // unoccupied layer
171 assert(state == BUSY);
172
173 // until should never be 0 as express snoops never occupy the layer
174 assert(until != 0);
175 xbar.schedule(releaseEvent, until);
176
177 // account for the occupied ticks
178 occupancy += until - curTick();
179
180 DPRINTF(BaseXBar, "The crossbar layer is now busy from tick %d to %d\n",
181 curTick(), until);
182}
183
184template <typename SrcType, typename DstType>
185bool
187{
188 // if we are in the retry state, we will not see anything but the
189 // retrying port (or in the case of the snoop ports the snoop
190 // response port that mirrors the actual CPU-side port) as we leave
191 // this state again in zero time if the peer does not immediately
192 // call the layer when receiving the retry
193
194 // first we see if the layer is busy, next we check if the
195 // destination port is already engaged in a transaction waiting
196 // for a retry from the peer
197 if (state == BUSY || waitingForPeer != NULL) {
198 // the port should not be waiting already
199 assert(std::find(waitingForLayer.begin(), waitingForLayer.end(),
200 src_port) == waitingForLayer.end());
201
202 // put the port at the end of the retry list waiting for the
203 // layer to be freed up (and in the case of a busy peer, for
204 // that transaction to go through, and then the layer to free
205 // up)
206 waitingForLayer.push_back(src_port);
207 return false;
208 }
209
210 state = BUSY;
211
212 return true;
213}
214
215template <typename SrcType, typename DstType>
216void
218{
219 // we should have gone from idle or retry to busy in the tryTiming
220 // test
221 assert(state == BUSY);
222
223 // occupy the layer accordingly
224 occupyLayer(busy_time);
225}
226
227template <typename SrcType, typename DstType>
228void
230 Tick busy_time)
231{
232 // ensure no one got in between and tried to send something to
233 // this port
234 assert(waitingForPeer == NULL);
235
236 // if the source port is the current retrying one or not, we have
237 // failed in forwarding and should track that we are now waiting
238 // for the peer to send a retry
239 waitingForPeer = src_port;
240
241 // we should have gone from idle or retry to busy in the tryTiming
242 // test
243 assert(state == BUSY);
244
245 // occupy the bus accordingly
246 occupyLayer(busy_time);
247}
248
249template <typename SrcType, typename DstType>
250void
252{
253 // releasing the bus means we should now be idle
254 assert(state == BUSY);
255 assert(!releaseEvent.scheduled());
256
257 // update the state
258 state = IDLE;
259
260 // bus layer is now idle, so if someone is waiting we can retry
261 if (!waitingForLayer.empty()) {
262 // there is no point in sending a retry if someone is still
263 // waiting for the peer
264 if (waitingForPeer == NULL)
265 retryWaiting();
266 } else if (waitingForPeer == NULL && drainState() == DrainState::Draining) {
267 DPRINTF(Drain, "Crossbar done draining, signaling drain manager\n");
268 //If we weren't able to drain before, do it now.
269 signalDrainDone();
270 }
271}
272
273template <typename SrcType, typename DstType>
274void
276{
277 // this should never be called with no one waiting
278 assert(!waitingForLayer.empty());
279
280 // we always go to retrying from idle
281 assert(state == IDLE);
282
283 // update the state
284 state = RETRY;
285
286 // set the retrying port to the front of the retry list and pop it
287 // off the list
288 SrcType* retryingPort = waitingForLayer.front();
289 waitingForLayer.pop_front();
290
291 // tell the port to retry, which in some cases ends up calling the
292 // layer again
293 sendRetry(retryingPort);
294
295 // If the layer is still in the retry state, sendTiming wasn't
296 // called in zero time (e.g. the cache does this when a writeback
297 // is squashed)
298 if (state == RETRY) {
299 // update the state to busy and reset the retrying port, we
300 // have done our bit and sent the retry
301 state = BUSY;
302
303 // occupy the crossbar layer until the next clock edge
304 occupyLayer(xbar.clockEdge());
305 }
306}
307
308template <typename SrcType, typename DstType>
309void
311{
312 // we should never get a retry without having failed to forward
313 // something to this port
314 assert(waitingForPeer != NULL);
315
316 // add the port where the failed packet originated to the front of
317 // the waiting ports for the layer, this allows us to call retry
318 // on the port immediately if the crossbar layer is idle
319 waitingForLayer.push_front(waitingForPeer);
320
321 // we are no longer waiting for the peer
322 waitingForPeer = NULL;
323
324 // if the layer is idle, retry this port straight away, if we
325 // are busy, then simply let the port wait for its turn
326 if (state == IDLE) {
327 retryWaiting();
328 } else {
329 assert(state == BUSY);
330 }
331}
332
333PortID
335{
336 // we should never see any address lookups before we've got the
337 // ranges of all connected CPU-side-port modules
338 assert(gotAllAddrRanges);
339
340 // Check the address map interval tree
341 auto i = portMap.contains(addr_range);
342 if (i != portMap.end()) {
343 return i->second;
344 }
345
346 // Check if this matches the default range
347 if (useDefaultRange) {
348 if (addr_range.isSubset(defaultRange)) {
349 DPRINTF(AddrRanges, " found addr %s on default\n",
350 addr_range.to_string());
351 return defaultPortID;
352 }
353 } else if (defaultPortID != InvalidPortID) {
354 DPRINTF(AddrRanges, "Unable to find destination for %s, "
355 "will use default port\n", addr_range.to_string());
356 return defaultPortID;
357 }
358
359 // We should use the range for the default port and it did not match,
360 // or the default port is not set. Dump out the port trace if possible.
361 std::string port_trace = "";
362 if (pkt) {
363 std::shared_ptr<TracingExtension> ext =
365 port_trace = ext ? ext->getTraceInString() :
366 "Use --debug-flags=PortTrace to see the port trace of the packet.";
367 }
368 fatal("Unable to find destination for %s on %s\n%s\n",
369 addr_range.to_string(), name(), port_trace);
370}
371
373void
375{
376 DPRINTF(AddrRanges, "Received range change from cpu_side_ports %s\n",
377 memSidePorts[mem_side_port_id]->getPeer());
378
379 // remember that we got a range from this memory-side port and thus the
380 // connected CPU-side-port module
381 gotAddrRanges[mem_side_port_id] = true;
382
383 // update the global flag
384 if (!gotAllAddrRanges) {
385 // take a logical AND of all the ports and see if we got
386 // ranges from everyone
387 gotAllAddrRanges = true;
389 while (gotAllAddrRanges && r != gotAddrRanges.end()) {
390 gotAllAddrRanges &= *r++;
391 }
393 DPRINTF(AddrRanges, "Got address ranges from all responders\n");
394 }
395
396 // note that we could get the range from the default port at any
397 // point in time, and we cannot assume that the default range is
398 // set before the other ones are, so we do additional checks once
399 // all ranges are provided
400 if (mem_side_port_id == defaultPortID) {
401 // only update if we are indeed checking ranges for the
402 // default port since the port might not have a valid range
403 // otherwise
404 if (useDefaultRange) {
405 AddrRangeList ranges = memSidePorts[mem_side_port_id]->
407
408 if (ranges.size() != 1)
409 fatal("Crossbar %s may only have a single default range",
410 name());
411
412 defaultRange = ranges.front();
413 }
414 } else {
415 // the ports are allowed to update their address ranges
416 // dynamically, so remove any existing entries
417 if (gotAddrRanges[mem_side_port_id]) {
418 for (auto p = portMap.begin(); p != portMap.end(); ) {
419 if (p->second == mem_side_port_id)
420 // erasing invalidates the iterator, so advance it
421 // before the deletion takes place
422 portMap.erase(p++);
423 else
424 p++;
425 }
426 }
427
428 AddrRangeList ranges = memSidePorts[mem_side_port_id]->
430
431 for (const auto& r: ranges) {
432 DPRINTF(AddrRanges, "Adding range %s for id %d\n",
433 r.to_string(), mem_side_port_id);
434 if (portMap.insert(r, mem_side_port_id) == portMap.end()) {
435 PortID conflict_id = portMap.intersects(r)->second;
436 fatal("%s has two ports responding within range "
437 "%s:\n\t%s\n\t%s\n",
438 name(),
439 r.to_string(),
440 memSidePorts[mem_side_port_id]->getPeer(),
441 memSidePorts[conflict_id]->getPeer());
442 }
443 }
444 }
445
446 // if we have received ranges from all our neighbouring CPU-side-port
447 // modules, go ahead and tell our connected memory-side-port modules in
448 // turn, this effectively assumes a tree structure of the system
449 if (gotAllAddrRanges) {
450 DPRINTF(AddrRanges, "Aggregating address ranges\n");
451 xbarRanges.clear();
452
453 // start out with the default range
454 if (useDefaultRange) {
456 fatal("Crossbar %s uses default range, but none provided",
457 name());
458
459 xbarRanges.push_back(defaultRange);
460 DPRINTF(AddrRanges, "-- Adding default %s\n",
462 }
463
464 // merge all interleaved ranges and add any range that is not
465 // a subset of the default range
466 std::vector<AddrRange> intlv_ranges;
467 for (const auto& r: portMap) {
468 // if the range is interleaved then save it for now
469 if (r.first.interleaved()) {
470 // if we already got interleaved ranges that are not
471 // part of the same range, then first do a merge
472 // before we add the new one
473 if (!intlv_ranges.empty() &&
474 !intlv_ranges.back().mergesWith(r.first)) {
475 DPRINTF(AddrRanges, "-- Merging range from %d ranges\n",
476 intlv_ranges.size());
477 AddrRange merged_range(intlv_ranges);
478 // next decide if we keep the merged range or not
479 if (!(useDefaultRange &&
480 merged_range.isSubset(defaultRange))) {
481 xbarRanges.push_back(merged_range);
482 DPRINTF(AddrRanges, "-- Adding merged range %s\n",
483 merged_range.to_string());
484 }
485 intlv_ranges.clear();
486 }
487 intlv_ranges.push_back(r.first);
488 } else {
489 // keep the current range if not a subset of the default
490 if (!(useDefaultRange &&
491 r.first.isSubset(defaultRange))) {
492 xbarRanges.push_back(r.first);
493 DPRINTF(AddrRanges, "-- Adding range %s\n",
494 r.first.to_string());
495 }
496 }
497 }
498
499 // if there is still interleaved ranges waiting to be merged,
500 // go ahead and do it
501 if (!intlv_ranges.empty()) {
502 DPRINTF(AddrRanges, "-- Merging range from %d ranges\n",
503 intlv_ranges.size());
504 AddrRange merged_range(intlv_ranges);
505 if (!(useDefaultRange && merged_range.isSubset(defaultRange))) {
506 xbarRanges.push_back(merged_range);
507 DPRINTF(AddrRanges, "-- Adding merged range %s\n",
508 merged_range.to_string());
509 }
510 }
511
512 // also check that no range partially intersects with the
513 // default range, this has to be done after all ranges are set
514 // as there are no guarantees for when the default range is
515 // update with respect to the other ones
516 if (useDefaultRange) {
517 for (const auto& r: xbarRanges) {
518 // see if the new range is partially
519 // overlapping the default range
520 if (r.intersects(defaultRange) &&
521 !r.isSubset(defaultRange))
522 fatal("Range %s intersects the " \
523 "default range of %s but is not a " \
524 "subset\n", r.to_string(), name());
525 }
526 }
527
528 // tell all our neighbouring memory-side ports that our address
529 // ranges have changed
530 for (const auto& port: cpuSidePorts)
531 port->sendRangeChange();
532 }
533}
534
537{
538 // we should never be asked without first having sent a range
539 // change, and the latter is only done once we have all the ranges
540 // of the connected devices
541 assert(gotAllAddrRanges);
542
543 // at the moment, this never happens, as there are no cycles in
544 // the range queries and no devices on the memory side of a crossbar
545 // (CPU, cache, bridge etc) actually care about the ranges of the
546 // ports they are connected to
547
548 DPRINTF(AddrRanges, "Received address range request\n");
549
550 return xbarRanges;
551}
552
553void
555{
557
558 using namespace statistics;
559
562 .flags(nozero);
563
564 // get the string representation of the commands
565 for (int i = 0; i < MemCmd::NUM_MEM_CMDS; i++) {
566 MemCmd cmd(i);
567 const std::string &cstr = cmd.toString();
568 transDist.subname(i, cstr);
569 }
570
572 .init(cpuSidePorts.size(), memSidePorts.size())
573 .flags(total | nozero | nonan);
574
575 pktSize
576 .init(cpuSidePorts.size(), memSidePorts.size())
577 .flags(total | nozero | nonan);
578
579 // both the packet count and total size are two-dimensional
580 // vectors, indexed by CPU-side port id and memory-side port id, thus the
581 // neighbouring memory-side ports and CPU-side ports, they do not
582 // differentiate what came from the memory-side ports and was forwarded to
583 // the CPU-side ports (requests and snoop responses) and what came from
584 // the CPU-side ports and was forwarded to the memory-side ports (responses
585 // and snoop requests)
586 for (int i = 0; i < cpuSidePorts.size(); i++) {
587 pktCount.subname(i, cpuSidePorts[i]->getPeer().name());
588 pktSize.subname(i, cpuSidePorts[i]->getPeer().name());
589 for (int j = 0; j < memSidePorts.size(); j++) {
590 pktCount.ysubname(j, memSidePorts[j]->getPeer().name());
591 pktSize.ysubname(j, memSidePorts[j]->getPeer().name());
592 }
593 }
594}
595
596template <typename SrcType, typename DstType>
599{
600 //We should check that we're not "doing" anything, and that noone is
601 //waiting. We might be idle but have someone waiting if the device we
602 //contacted for a retry didn't actually retry.
603 if (state != IDLE) {
604 DPRINTF(Drain, "Crossbar not drained\n");
606 } else {
607 return DrainState::Drained;
608 }
609}
610
618
619} // namespace gem5
#define DPRINTF(x,...)
Definition trace.hh:210
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Definition addr_range.hh:82
A layer is an internal crossbar arbitration point with its own flow control.
Definition xbar.hh:92
void recvRetry()
Handle a retry from a neighbouring module.
Definition xbar.cc:310
DrainState drain() override
Drain according to the normal semantics, so that the crossbar can tell the layer to drain,...
Definition xbar.cc:598
bool tryTiming(SrcType *src_port)
Determine if the layer accepts a packet from a specific port.
Definition xbar.cc:186
Layer(DstType &_port, BaseXBar &_xbar, const std::string &_name)
Create a layer and give it a name.
Definition xbar.cc:146
void occupyLayer(Tick until)
Definition xbar.cc:165
void retryWaiting()
Send a retry to the port at the head of waitingForLayer.
Definition xbar.cc:275
void failedTiming(SrcType *src_port, Tick busy_time)
Deal with a destination port not accepting a packet by potentially adding the source port to the retr...
Definition xbar.cc:229
void releaseLayer()
Release the layer after being occupied and return to an idle state where we proceed to send a retry t...
Definition xbar.cc:251
void succeededTiming(Tick busy_time)
Deal with a destination port accepting a packet by potentially removing the source port from the retr...
Definition xbar.cc:217
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
Definition xbar.hh:72
PortID defaultPortID
Port that handles requests that don't match any of the interfaces.
Definition xbar.hh:390
bool gotAllAddrRanges
Definition xbar.hh:383
std::vector< RequestPort * > memSidePorts
Definition xbar.hh:387
AddrRange defaultRange
Definition xbar.hh:332
PortID findPort(AddrRange addr_range, PacketPtr pkt=nullptr)
Find which port connected to this crossbar (if any) should be given a packet with this address range.
Definition xbar.cc:334
statistics::Vector transDist
Stats for transaction distribution and data passing through the crossbar.
Definition xbar.hh:409
const bool useDefaultRange
If true, use address range provided by default device.
Definition xbar.hh:396
statistics::Vector2d pktCount
Definition xbar.hh:410
BaseXBar(const BaseXBarParams &p)
Definition xbar.cc:60
std::vector< QueuedResponsePort * > cpuSidePorts
The memory-side ports and CPU-side ports of the crossbar.
Definition xbar.hh:386
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
A function used to return the port associated with this object.
Definition xbar.cc:91
void regStats() override
Callback to set stat parameters.
Definition xbar.cc:554
AddrRangeList xbarRanges
all contigous ranges seen by this crossbar
Definition xbar.hh:330
AddrRangeMap< PortID, 3 > portMap
Definition xbar.hh:319
const uint32_t width
the width of the xbar in bytes
Definition xbar.hh:317
statistics::Vector2d pktSize
Definition xbar.hh:411
std::vector< bool > gotAddrRanges
Remember for each of the memory-side ports of the crossbar if we got an address range from the connec...
Definition xbar.hh:382
virtual void recvRangeChange(PortID mem_side_port_id)
Function called by the port when the crossbar is recieving a range change.
Definition xbar.cc:374
void calcPacketTiming(PacketPtr pkt, Tick header_delay)
Calculate the timing parameters for the packet.
Definition xbar.cc:108
virtual ~BaseXBar()
Definition xbar.cc:81
AddrRangeList getAddrRanges() const
Return the address ranges the crossbar is responsible for.
Definition xbar.cc:536
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
Tick clockPeriod() const
std::shared_ptr< T > getExtension()
Get the extension pointer by linear search with the extensionID.
const std::string & toString() const
Return the string to a cmd given by idx.
Definition packet.hh:276
virtual std::string name() const
Definition named.hh:47
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition packet.hh:295
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
Definition packet.hh:449
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
Definition packet.hh:431
bool hasData() const
Definition packet.hh:614
unsigned getSize() const
Definition packet.hh:817
Ports are used to interface objects to each other.
Definition port.hh:62
TracingExtension is an Extension of the Packet for recording the trace of the Packet.
Definition port.hh:78
std::string getTraceInString()
Definition port.hh:104
Derived & ysubname(off_type index, const std::string &subname)
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Statistics container.
Definition group.hh:93
Derived & init(size_type _x, size_type _y)
Derived & init(size_type size)
Set this vector to have the given size.
STL vector class.
Definition stl.hh:37
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition group.hh:75
const_iterator begin() const
bool isSubset(const AddrRange &r) const
Determine if this range is a subset of another range, i.e.
const_iterator intersects(const AddrRange &r) const
Find entry that intersects with the given address range.
iterator insert(const AddrRange &r, const V &d)
void erase(iterator p)
const_iterator contains(const AddrRange &r) const
Find entry that contains the given address range.
const_iterator end() const
std::string to_string() const
Get a string representation of the range.
static constexpr T divCeil(const T &a, const U &b)
Definition intmath.hh:110
DrainState
Object drain/handover states.
Definition drain.hh:75
@ Draining
Draining buffers pending serialization/handover.
@ Drained
Buffers drained, ready for serialization/handover.
#define fatal(...)
This implements a cprintf based fatal() function.
Definition logging.hh:200
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition logging.hh:214
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
virtual void regStats()
Callback to set stat parameters.
Definition group.cc:68
atomic_var_t state
Definition helpers.cc:211
Bitfield< 4 > width
Definition misc_types.hh:72
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 23, 0 > offset
Definition types.hh:144
Bitfield< 12 > ext
Bitfield< 0 > p
Tick us
microsecond
Definition core.cc:67
const FlagsType nonan
Don't print if this is NAN.
Definition info.hh:69
const FlagsType nozero
Don't print if this is zero.
Definition info.hh:67
const FlagsType total
Print the total.
Definition info.hh:59
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
const PortID InvalidPortID
Definition types.hh:246
Tick curTick()
The universal simulation clock.
Definition cur_tick.hh:46
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition types.hh:245
uint64_t Tick
Tick count type.
Definition types.hh:58
statistics::Value & simTicks
Definition stats.cc:46
const std::string & name()
Definition trace.cc:48
Declaration of an abstract crossbar base class.

Generated on Tue Jun 18 2024 16:24:05 for gem5 by doxygen 1.11.0