gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
comm_monitor.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2013, 2015, 2018-2019 ARM Limited
3  * Copyright (c) 2016 Google Inc.
4  * Copyright (c) 2017, Centre National de la Recherche Scientifique
5  * All rights reserved.
6  *
7  * The license below extends only to copyright in the software and shall
8  * not be construed as granting a license to any other intellectual
9  * property including but not limited to intellectual property relating
10  * to a hardware implementation of the functionality of the software
11  * licensed hereunder. You may use the software subject to the license
12  * terms below provided that you ensure that this notice is replicated
13  * unmodified and in its entirety in all distributions of the software,
14  * modified or unmodified, in source code or in binary form.
15  *
16  * Redistribution and use in source and binary forms, with or without
17  * modification, are permitted provided that the following conditions are
18  * met: redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer;
20  * redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution;
23  * neither the name of the copyright holders nor the names of its
24  * contributors may be used to endorse or promote products derived from
25  * this software without specific prior written permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38  */
39 
40 #include "mem/comm_monitor.hh"
41 
42 #include "base/trace.hh"
43 #include "debug/CommMonitor.hh"
44 #include "sim/stats.hh"
45 
47  : SimObject(params),
48  memSidePort(name() + "-mem_side_port", *this),
49  cpuSidePort(name() + "-cpu_side_port", *this),
50  samplePeriodicEvent([this]{ samplePeriodic(); }, name()),
51  samplePeriodTicks(params.sample_period),
52  samplePeriod(params.sample_period / SimClock::Float::s),
53  stats(this, params)
54 {
56  "Created monitor %s with sample period %d ticks (%f ms)\n",
57  name(), samplePeriodTicks, samplePeriod * 1E3);
58 }
59 
60 void
62 {
63  // make sure both sides of the monitor are connected
65  fatal("Communication monitor is not connected on both sides.\n");
66 }
67 
68 void
70 {
71  ppPktReq.reset(new ProbePoints::Packet(getProbeManager(), "PktRequest"));
72  ppPktResp.reset(new ProbePoints::Packet(getProbeManager(), "PktResponse"));
73 }
74 
75 Port &
76 CommMonitor::getPort(const std::string &if_name, PortID idx)
77 {
78  if (if_name == "mem_side_port") {
79  return memSidePort;
80  } else if (if_name == "cpu_side_port") {
81  return cpuSidePort;
82  } else {
83  return SimObject::getPort(if_name, idx);
84  }
85 }
86 
87 void
89 {
91 }
92 
93 void
95 {
97 }
98 
100  const CommMonitorParams &params)
101  : Stats::Group(parent),
102 
103  disableBurstLengthHists(params.disable_burst_length_hists),
104  ADD_STAT(readBurstLengthHist, UNIT_BYTE,
105  "Histogram of burst lengths of transmitted packets"),
106  ADD_STAT(writeBurstLengthHist, UNIT_BYTE,
107  "Histogram of burst lengths of transmitted packets"),
108 
109  disableBandwidthHists(params.disable_bandwidth_hists),
110  readBytes(0),
111  ADD_STAT(readBandwidthHist,
112  UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
113  "Histogram of read bandwidth per sample period"),
114  ADD_STAT(totalReadBytes, UNIT_BYTE, "Number of bytes read"),
115  ADD_STAT(averageReadBandwidth,
116  UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
117  "Average read bandwidth",
118  totalReadBytes / simSeconds),
119 
120  writtenBytes(0),
121  ADD_STAT(writeBandwidthHist,
122  UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
123  "Histogram of write bandwidth"),
124  ADD_STAT(totalWrittenBytes,
125  UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
126  "Number of bytes written"),
127  ADD_STAT(averageWriteBandwidth,
128  UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
129  "Average write bandwidth",
130  totalWrittenBytes / simSeconds),
131 
132  disableLatencyHists(params.disable_latency_hists),
133  ADD_STAT(readLatencyHist, UNIT_TICK, "Read request-response latency"),
134  ADD_STAT(writeLatencyHist, UNIT_TICK, "Write request-response latency"),
135 
136  disableITTDists(params.disable_itt_dists),
137  ADD_STAT(ittReadRead, UNIT_TICK, "Read-to-read inter transaction time"),
138  ADD_STAT(ittWriteWrite, UNIT_TICK,
139  "Write-to-write inter transaction time"),
140  ADD_STAT(ittReqReq, UNIT_TICK,
141  "Request-to-request inter transaction time"),
142  timeOfLastRead(0), timeOfLastWrite(0), timeOfLastReq(0),
143 
144  disableOutstandingHists(params.disable_outstanding_hists),
145  ADD_STAT(outstandingReadsHist, UNIT_COUNT,
146  "Outstanding read transactions"),
147  outstandingReadReqs(0),
148  ADD_STAT(outstandingWritesHist, UNIT_COUNT,
149  "Outstanding write transactions"),
150  outstandingWriteReqs(0),
151 
152  disableTransactionHists(params.disable_transaction_hists),
153  ADD_STAT(readTransHist, UNIT_COUNT,
154  "Histogram of read transactions per sample period"),
155  readTrans(0),
156  ADD_STAT(writeTransHist, UNIT_COUNT,
157  "Histogram of write transactions per sample period"),
158  writeTrans(0),
159 
160  disableAddrDists(params.disable_addr_dists),
161  readAddrMask(params.read_addr_mask),
162  writeAddrMask(params.write_addr_mask),
163  ADD_STAT(readAddrDist, UNIT_COUNT, "Read address distribution"),
164  ADD_STAT(writeAddrDist, UNIT_COUNT, "Write address distribution")
165 {
166  using namespace Stats;
167 
169  .init(params.burst_length_bins)
171 
173  .init(params.burst_length_bins)
175 
176  // Stats based on received responses
178  .init(params.bandwidth_bins)
180 
183 
186 
187  // Stats based on successfully sent requests
189  .init(params.bandwidth_bins)
191 
194 
197 
198 
200  .init(params.latency_bins)
202 
204  .init(params.latency_bins)
206 
208  .init(1, params.itt_max_bin, params.itt_max_bin /
209  params.itt_bins)
211 
213  .init(1, params.itt_max_bin, params.itt_max_bin /
214  params.itt_bins)
216 
217  ittReqReq
218  .init(1, params.itt_max_bin, params.itt_max_bin /
219  params.itt_bins)
221 
223  .init(params.outstanding_bins)
225 
227  .init(params.outstanding_bins)
229 
231  .init(params.transaction_bins)
233 
235  .init(params.transaction_bins)
237 
239  .init(0)
241 
243  .init(0)
245 }
246 
247 void
249  const ProbePoints::PacketInfo& pkt_info, bool is_atomic,
250  bool expects_response)
251 {
252  if (pkt_info.cmd.isRead()) {
253  // Increment number of observed read transactions
255  ++readTrans;
256 
257  // Get sample of burst length
259  readBurstLengthHist.sample(pkt_info.size);
260 
261  // Sample the masked address
262  if (!disableAddrDists)
263  readAddrDist.sample(pkt_info.addr & readAddrMask);
264 
265  if (!disableITTDists) {
266  // Sample value of read-read inter transaction time
267  if (timeOfLastRead != 0)
270 
271  // Sample value of req-req inter transaction time
272  if (timeOfLastReq != 0)
275  }
276  if (!is_atomic && !disableOutstandingHists && expects_response)
278 
279  } else if (pkt_info.cmd.isWrite()) {
280  // Same as for reads
282  ++writeTrans;
283 
285  writeBurstLengthHist.sample(pkt_info.size);
286 
287  // Update the bandwidth stats on the request
288  if (!disableBandwidthHists) {
289  writtenBytes += pkt_info.size;
290  totalWrittenBytes += pkt_info.size;
291  }
292 
293  // Sample the masked write address
294  if (!disableAddrDists)
296 
297  if (!disableITTDists) {
298  // Sample value of write-to-write inter transaction time
299  if (timeOfLastWrite != 0)
302 
303  // Sample value of req-to-req inter transaction time
304  if (timeOfLastReq != 0)
307  }
308 
309  if (!is_atomic && !disableOutstandingHists && expects_response)
311  }
312 }
313 
314 void
316  const ProbePoints::PacketInfo& pkt_info, Tick latency, bool is_atomic)
317 {
318  if (pkt_info.cmd.isRead()) {
319  // Decrement number of outstanding read requests
320  if (!is_atomic && !disableOutstandingHists) {
321  assert(outstandingReadReqs != 0);
323  }
324 
325  if (!disableLatencyHists)
326  readLatencyHist.sample(latency);
327 
328  // Update the bandwidth stats based on responses for reads
329  if (!disableBandwidthHists) {
330  readBytes += pkt_info.size;
331  totalReadBytes += pkt_info.size;
332  }
333 
334  } else if (pkt_info.cmd.isWrite()) {
335  // Decrement number of outstanding write requests
336  if (!is_atomic && !disableOutstandingHists) {
337  assert(outstandingWriteReqs != 0);
339  }
340 
341  if (!disableLatencyHists)
342  writeLatencyHist.sample(latency);
343  }
344 }
345 
346 Tick
348 {
349  const bool expects_response(pkt->needsResponse() &&
350  !pkt->cacheResponding());
351  ProbePoints::PacketInfo req_pkt_info(pkt);
352  ppPktReq->notify(req_pkt_info);
353 
354  const Tick delay(memSidePort.sendAtomic(pkt));
355 
356  stats.updateReqStats(req_pkt_info, true, expects_response);
357  if (expects_response)
358  stats.updateRespStats(req_pkt_info, delay, true);
359 
360  // Some packets, such as WritebackDirty, don't need response.
361  assert(pkt->isResponse() || !expects_response);
362  ProbePoints::PacketInfo resp_pkt_info(pkt);
363  ppPktResp->notify(resp_pkt_info);
364  return delay;
365 }
366 
367 Tick
369 {
370  return cpuSidePort.sendAtomicSnoop(pkt);
371 }
372 
373 bool
375 {
376  // should always see a request
377  assert(pkt->isRequest());
378 
379  // Store relevant fields of packet, because packet may be modified
380  // or even deleted when sendTiming() is called.
381  const ProbePoints::PacketInfo pkt_info(pkt);
382 
383  const bool expects_response(pkt->needsResponse() &&
384  !pkt->cacheResponding());
385 
386  // If a cache miss is served by a cache, a monitor near the memory
387  // would see a request which needs a response, but this response
388  // would not come back from the memory. Therefore we additionally
389  // have to check the cacheResponding flag
390  if (expects_response && !stats.disableLatencyHists) {
392  }
393 
394  // Attempt to send the packet
395  bool successful = memSidePort.sendTimingReq(pkt);
396 
397  // If not successful, restore the sender state
398  if (!successful && expects_response && !stats.disableLatencyHists) {
399  delete pkt->popSenderState();
400  }
401 
402  if (successful) {
403  ppPktReq->notify(pkt_info);
404  }
405 
406  if (successful) {
407  DPRINTF(CommMonitor, "Forwarded %s request\n", pkt->isRead() ? "read" :
408  pkt->isWrite() ? "write" : "non read/write");
409  stats.updateReqStats(pkt_info, false, expects_response);
410  }
411  return successful;
412 }
413 
414 bool
416 {
417  // should always see responses
418  assert(pkt->isResponse());
419 
420  // Store relevant fields of packet, because packet may be modified
421  // or even deleted when sendTiming() is called.
422  const ProbePoints::PacketInfo pkt_info(pkt);
423 
424  Tick latency = 0;
425  CommMonitorSenderState* received_state =
426  dynamic_cast<CommMonitorSenderState*>(pkt->senderState);
427 
428  if (!stats.disableLatencyHists) {
429  // Restore initial sender state
430  if (received_state == NULL)
431  panic("Monitor got a response without monitor sender state\n");
432 
433  // Restore the sate
434  pkt->senderState = received_state->predecessor;
435  }
436 
437  // Attempt to send the packet
438  bool successful = cpuSidePort.sendTimingResp(pkt);
439 
440  if (!stats.disableLatencyHists) {
441  // If packet successfully send, sample value of latency,
442  // afterwards delete sender state, otherwise restore state
443  if (successful) {
444  latency = curTick() - received_state->transmitTime;
445  DPRINTF(CommMonitor, "Latency: %d\n", latency);
446  delete received_state;
447  } else {
448  // Don't delete anything and let the packet look like we
449  // did not touch it
450  pkt->senderState = received_state;
451  }
452  }
453 
454  if (successful) {
455  ppPktResp->notify(pkt_info);
456  DPRINTF(CommMonitor, "Received %s response\n", pkt->isRead() ? "read" :
457  pkt->isWrite() ? "write" : "non read/write");
458  stats.updateRespStats(pkt_info, latency, false);
459  }
460  return successful;
461 }
462 
463 void
465 {
467 }
468 
469 bool
471 {
472  return memSidePort.sendTimingSnoopResp(pkt);
473 }
474 
475 void
477 {
479 }
480 
481 bool
483 {
484  // check if the connected request port is snooping
485  return cpuSidePort.isSnooping();
486 }
487 
490 {
491  // get the address ranges of the connected CPU-side port
492  return memSidePort.getAddrRanges();
493 }
494 
495 void
497 {
499 }
500 
501 void
503 {
505 }
506 
507 bool
509 {
510  return memSidePort.tryTiming(pkt);
511 }
512 
513 void
515 {
517 }
518 
519 void
521 {
522  // the periodic stats update runs on the granularity of sample
523  // periods, but in combination with this there may also be a
524  // external resets and dumps of the stats (through schedStatEvent)
525  // causing the stats themselves to capture less than a sample
526  // period
527 
528  // only capture if we have not reset the stats during the last
529  // sample period
530  if (simTicks.value() >= samplePeriodTicks) {
531  if (!stats.disableTransactionHists) {
532  stats.readTransHist.sample(stats.readTrans);
533  stats.writeTransHist.sample(stats.writeTrans);
534  }
535 
536  if (!stats.disableBandwidthHists) {
537  stats.readBandwidthHist.sample(stats.readBytes / samplePeriod);
538  stats.writeBandwidthHist.sample(stats.writtenBytes / samplePeriod);
539  }
540 
541  if (!stats.disableOutstandingHists) {
542  stats.outstandingReadsHist.sample(stats.outstandingReadReqs);
543  stats.outstandingWritesHist.sample(stats.outstandingWriteReqs);
544  }
545  }
546 
547  // reset the sampled values
548  stats.readTrans = 0;
549  stats.writeTrans = 0;
550 
551  stats.readBytes = 0;
552  stats.writtenBytes = 0;
553 
555 }
556 
557 void
559 {
561 }
CommMonitor::MonitorStats::writeAddrDist
Stats::SparseHistogram writeAddrDist
Histogram of number of write accesses to addresses over time.
Definition: comm_monitor.hh:376
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:183
CommMonitor::MonitorStats::MonitorStats
MonitorStats(Stats::Group *parent, const CommMonitorParams &params)
Create the monitor stats and initialise all the members that are not statistics themselves,...
Definition: comm_monitor.cc:99
CommMonitor::samplePeriodic
void samplePeriodic()
This function is called periodically at the end of each time bin.
Definition: comm_monitor.cc:520
CommMonitor::MonitorStats::updateReqStats
void updateReqStats(const ProbePoints::PacketInfo &pkt, bool is_atomic, bool expects_response)
Definition: comm_monitor.cc:248
SimClock::Float::s
double s
These variables equal the number of ticks in the unit of time they're named after in a double.
Definition: core.cc:46
CommMonitor::Params
CommMonitorParams Params
Parameters of communication monitor.
Definition: comm_monitor.hh:66
UNIT_BYTE
#define UNIT_BYTE
Definition: units.hh:43
Packet::isResponse
bool isResponse() const
Definition: packet.hh:561
CommMonitor::MonitorStats::disableBurstLengthHists
bool disableBurstLengthHists
Disable flag for burst length histograms.
Definition: comm_monitor.hh:273
CommMonitor::startup
void startup() override
startup() is the final initialization call before simulation.
Definition: comm_monitor.cc:558
ProbePoints::PacketInfo::addr
Addr addr
Definition: mem.hh:55
Packet::cacheResponding
bool cacheResponding() const
Definition: packet.hh:620
CommMonitor
The communication monitor is a SimObject which can monitor statistics of the communication happening ...
Definition: comm_monitor.hh:60
CommMonitor::recvAtomic
Tick recvAtomic(PacketPtr pkt)
Definition: comm_monitor.cc:347
CommMonitor::MonitorStats::writeBurstLengthHist
Stats::Histogram writeBurstLengthHist
Histogram of write burst lengths.
Definition: comm_monitor.hh:279
ResponsePort::sendTimingResp
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the request port by calling its corresponding receive function.
Definition: port.hh:367
CommMonitor::recvRespRetry
void recvRespRetry()
Definition: comm_monitor.cc:502
CommMonitor::recvTimingSnoopResp
bool recvTimingSnoopResp(PacketPtr pkt)
Definition: comm_monitor.cc:470
CommMonitor::isSnooping
bool isSnooping() const
Definition: comm_monitor.cc:482
CommMonitor::memSidePort
MonitorRequestPort memSidePort
Instance of request port, facing the memory side.
Definition: comm_monitor.hh:176
CommMonitor::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: comm_monitor.cc:61
CommMonitor::CommMonitorSenderState::transmitTime
Tick transmitTime
Tick when request is transmitted.
Definition: comm_monitor.hh:108
comm_monitor.hh
CommMonitor::recvTimingReq
bool recvTimingReq(PacketPtr pkt)
Definition: comm_monitor.cc:374
CommMonitor::MonitorStats::readBytes
unsigned int readBytes
Histogram for read bandwidth per sample window.
Definition: comm_monitor.hh:288
CommMonitor::recvFunctionalSnoop
void recvFunctionalSnoop(PacketPtr pkt)
Definition: comm_monitor.cc:94
CommMonitor::MonitorStats::outstandingWriteReqs
unsigned int outstandingWriteReqs
Definition: comm_monitor.hh:344
CommMonitor::MonitorStats::disableTransactionHists
bool disableTransactionHists
Disable flag for transaction histograms.
Definition: comm_monitor.hh:347
CommMonitor::MonitorStats::timeOfLastWrite
Tick timeOfLastWrite
Definition: comm_monitor.hh:324
Packet::isRead
bool isRead() const
Definition: packet.hh:557
ProbePointArg
ProbePointArg generates a point for the class of Arg.
Definition: thermal_domain.hh:51
UNIT_TICK
#define UNIT_TICK
Definition: units.hh:40
CommMonitor::MonitorStats::readTrans
unsigned int readTrans
Definition: comm_monitor.hh:351
CommMonitor::MonitorStats::writtenBytes
unsigned int writtenBytes
Histogram for write bandwidth per sample window.
Definition: comm_monitor.hh:297
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:59
CommMonitor::samplePeriodicEvent
EventFunctionWrapper samplePeriodicEvent
Periodic event called at the end of each simulation time bin.
Definition: comm_monitor.hh:395
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:243
CommMonitor::MonitorStats::writeBandwidthHist
Stats::Histogram writeBandwidthHist
Definition: comm_monitor.hh:298
ResponsePort::sendAtomicSnoop
Tick sendAtomicSnoop(PacketPtr pkt)
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time,...
Definition: port.hh:323
RequestPort::getAddrRanges
AddrRangeList getAddrRanges() const
Get the address ranges of the connected responder port.
Definition: port.cc:148
CommMonitor::recvRetrySnoopResp
void recvRetrySnoopResp()
Definition: comm_monitor.cc:476
CommMonitor::MonitorStats::outstandingWritesHist
Stats::Histogram outstandingWritesHist
Histogram of outstanding write requests.
Definition: comm_monitor.hh:343
CommMonitor::MonitorStats::ittWriteWrite
Stats::Distribution ittWriteWrite
Definition: comm_monitor.hh:321
RequestPort::sendFunctional
void sendFunctional(PacketPtr pkt) const
Send a functional request packet, where the data is instantly updated everywhere in the memory system...
Definition: port.hh:482
CommMonitor::MonitorStats::writeLatencyHist
Stats::Histogram writeLatencyHist
Histogram of write request-to-response latencies.
Definition: comm_monitor.hh:309
simTicks
Stats::Value & simTicks
Definition: stats.cc:43
Packet::isRequest
bool isRequest() const
Definition: packet.hh:560
CommMonitor::cpuSidePort
MonitorResponsePort cpuSidePort
Instance of response port, i.e.
Definition: comm_monitor.hh:237
CommMonitor::MonitorStats::timeOfLastReq
Tick timeOfLastReq
Definition: comm_monitor.hh:325
CommMonitor::MonitorStats::disableBandwidthHists
bool disableBandwidthHists
Disable flag for the bandwidth histograms.
Definition: comm_monitor.hh:282
CommMonitor::recvFunctional
void recvFunctional(PacketPtr pkt)
Definition: comm_monitor.cc:88
CommMonitor::MonitorStats::disableLatencyHists
bool disableLatencyHists
Disable flag for latency histograms.
Definition: comm_monitor.hh:303
RequestPort::sendTimingSnoopResp
bool sendTimingSnoopResp(PacketPtr pkt)
Attempt to send a timing snoop response packet to the response port by calling its corresponding rece...
Definition: port.hh:512
CommMonitor::MonitorStats::readTransHist
Stats::Histogram readTransHist
Histogram of number of read transactions per time bin.
Definition: comm_monitor.hh:350
CommMonitor::MonitorStats::readBandwidthHist
Stats::Histogram readBandwidthHist
Definition: comm_monitor.hh:289
CommMonitor::MonitorStats::disableITTDists
bool disableITTDists
Disable flag for ITT distributions.
Definition: comm_monitor.hh:312
Stats::DataWrap::flags
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Definition: statistics.hh:339
CommMonitor::regProbePoints
void regProbePoints() override
Register probe points for this object.
Definition: comm_monitor.cc:69
CommMonitor::MonitorStats::disableAddrDists
bool disableAddrDists
Disable flag for address distributions.
Definition: comm_monitor.hh:358
CommMonitor::MonitorStats::averageWriteBandwidth
Stats::Formula averageWriteBandwidth
Definition: comm_monitor.hh:300
CommMonitor::recvReqRetry
void recvReqRetry()
Definition: comm_monitor.cc:496
ResponsePort::sendTimingSnoopReq
void sendTimingSnoopReq(PacketPtr pkt)
Attempt to send a timing snoop request packet to the request port by calling its corresponding receiv...
Definition: port.hh:384
stats.hh
CommMonitor::recvTimingResp
bool recvTimingResp(PacketPtr pkt)
Definition: comm_monitor.cc:415
EventManager::schedule
void schedule(Event &event, Tick when)
Definition: eventq.hh:1016
MemCmd::isRead
bool isRead() const
Definition: packet.hh:200
RequestPort::sendTimingReq
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
Definition: port.hh:492
CommMonitor::MonitorStats::readAddrMask
const Addr readAddrMask
Address mask for sources of read accesses to be captured.
Definition: comm_monitor.hh:361
SimObject::getPort
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Definition: sim_object.cc:120
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:237
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:71
CommMonitor::MonitorStats::outstandingReadsHist
Stats::Histogram outstandingReadsHist
Histogram of outstanding read requests.
Definition: comm_monitor.hh:335
CommMonitor::MonitorStats::disableOutstandingHists
bool disableOutstandingHists
Disable flag for outstanding histograms.
Definition: comm_monitor.hh:328
CommMonitor::MonitorStats::writeTransHist
Stats::Histogram writeTransHist
Histogram of number of timing write transactions per time bin.
Definition: comm_monitor.hh:354
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
Packet::needsResponse
bool needsResponse() const
Definition: packet.hh:571
CommMonitor::CommMonitor
CommMonitor(const Params &params)
Constructor based on the Python params.
Definition: comm_monitor.cc:46
Stats::Group::stats
std::vector< Info * > stats
Definition: group.hh:215
RequestPort::sendRetryResp
virtual void sendRetryResp()
Send a retry to the response port that previously attempted a sendTimingResp to this request port and...
Definition: port.hh:522
CommMonitor::MonitorStats::readBurstLengthHist
Stats::Histogram readBurstLengthHist
Histogram of read burst lengths.
Definition: comm_monitor.hh:276
ResponsePort::isSnooping
bool isSnooping() const
Find out if the peer request port is snooping or not.
Definition: port.hh:288
CommMonitor::ppPktReq
ProbePoints::PacketUPtr ppPktReq
Successfully forwarded request packet.
Definition: comm_monitor.hh:419
CommMonitor::recvRangeChange
void recvRangeChange()
Definition: comm_monitor.cc:514
CommMonitor::MonitorStats::totalReadBytes
Stats::Scalar totalReadBytes
Definition: comm_monitor.hh:290
CommMonitor::MonitorStats::readAddrDist
Stats::SparseHistogram readAddrDist
Histogram of number of read accesses to addresses over time.
Definition: comm_monitor.hh:370
CommMonitor::tryTiming
bool tryTiming(PacketPtr pkt)
Definition: comm_monitor.cc:508
CommMonitor::CommMonitorSenderState
Sender state class for the monitor so that we can annotate packets with a transmit time and receive t...
Definition: comm_monitor.hh:89
UNIT_COUNT
#define UNIT_COUNT
Definition: units.hh:49
Stats::ValueBase::value
Counter value()
Definition: statistics.hh:754
simSeconds
Stats::Formula & simSeconds
Definition: stats.cc:42
name
const std::string & name()
Definition: trace.cc:48
LaneSize::Byte
@ Byte
Stats::nozero
const FlagsType nozero
Don't print if this is zero.
Definition: info.hh:58
SimObject::getProbeManager
ProbeManager * getProbeManager()
Get the probe manager for this object.
Definition: sim_object.cc:114
CommMonitor::ppPktResp
ProbePoints::PacketUPtr ppPktResp
Successfully forwarded response packet.
Definition: comm_monitor.hh:422
Stats::SparseHistBase::sample
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Definition: statistics.hh:2464
UNIT_RATE
#define UNIT_RATE(T1, T2)
Definition: units.hh:47
Packet::pushSenderState
void pushSenderState(SenderState *sender_state)
Push a new sender state to the packet and make the current sender state the predecessor of the new on...
Definition: packet.cc:332
ProbePoints::PacketInfo::cmd
MemCmd cmd
Definition: mem.hh:54
CommMonitor::samplePeriod
const double samplePeriod
Sample period in seconds.
Definition: comm_monitor.hh:405
CommMonitor::MonitorStats::writeTrans
unsigned int writeTrans
Definition: comm_monitor.hh:355
Stats::Distribution::init
Distribution & init(Counter min, Counter max, Counter bkt)
Set the parameters of this distribution.
Definition: statistics.hh:2113
Stats::pdf
const FlagsType pdf
Print the percent of the total that this entry represents.
Definition: info.hh:52
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:258
Stats::Group
Statistics container.
Definition: group.hh:87
Packet::popSenderState
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Definition: packet.cc:340
ResponsePort::sendFunctionalSnoop
void sendFunctionalSnoop(PacketPtr pkt) const
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory ...
Definition: port.hh:343
Port::isConnected
bool isConnected() const
Is this port currently connected to a peer?
Definition: port.hh:128
ProbePoints::PacketInfo::size
uint32_t size
Definition: mem.hh:56
Stats::DistBase::sample
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Definition: statistics.hh:1323
ResponsePort::sendRetrySnoopResp
void sendRetrySnoopResp()
Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response por...
Definition: port.hh:412
Packet::isWrite
bool isWrite() const
Definition: packet.hh:558
CommMonitor::MonitorStats::ittReqReq
Stats::Distribution ittReqReq
Definition: comm_monitor.hh:322
CommMonitor::MonitorStats::totalWrittenBytes
Stats::Scalar totalWrittenBytes
Definition: comm_monitor.hh:299
CommMonitor::MonitorStats::writeAddrMask
const Addr writeAddrMask
Address mask for sources of write accesses to be captured.
Definition: comm_monitor.hh:364
Stats
Definition: statistics.cc:53
CommMonitor::MonitorStats::timeOfLastRead
Tick timeOfLastRead
Definition: comm_monitor.hh:323
CommMonitor::recvAtomicSnoop
Tick recvAtomicSnoop(PacketPtr pkt)
Definition: comm_monitor.cc:368
curTick
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:43
Stats::SparseHistogram::init
SparseHistogram & init(size_type size)
Set the parameters of this histogram.
Definition: statistics.hh:2523
trace.hh
CommMonitor::MonitorStats::readLatencyHist
Stats::Histogram readLatencyHist
Histogram of read request-to-response latencies.
Definition: comm_monitor.hh:306
ResponsePort::sendRetryReq
void sendRetryReq()
Send a retry to the request port that previously attempted a sendTimingReq to this response port and ...
Definition: port.hh:398
Stats::Histogram::init
Histogram & init(size_type size)
Set the parameters of this histogram.
Definition: statistics.hh:2153
SimObject::params
const Params & params() const
Definition: sim_object.hh:168
Packet::senderState
SenderState * senderState
This packet's sender state.
Definition: packet.hh:509
RequestPort::sendAtomic
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time,...
Definition: port.hh:461
CommMonitor::recvTimingSnoopReq
void recvTimingSnoopReq(PacketPtr pkt)
Definition: comm_monitor.cc:464
CommMonitor::MonitorStats::updateRespStats
void updateRespStats(const ProbePoints::PacketInfo &pkt, Tick latency, bool is_atomic)
Definition: comm_monitor.cc:315
std::list< AddrRange >
CommMonitor::MonitorStats::ittReadRead
Stats::Distribution ittReadRead
Inter transaction time (ITT) distributions.
Definition: comm_monitor.hh:320
Packet::SenderState::predecessor
SenderState * predecessor
Definition: packet.hh:434
ResponsePort::sendRangeChange
void sendRangeChange() const
Called by the owner to send a range change.
Definition: port.hh:293
CommMonitor::getAddrRanges
AddrRangeList getAddrRanges() const
Definition: comm_monitor.cc:489
ProbePoints::PacketInfo
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...
Definition: mem.hh:53
CommMonitor::samplePeriodTicks
const Tick samplePeriodTicks
Length of simulation time bin.
Definition: comm_monitor.hh:403
CommMonitor::MonitorStats::averageReadBandwidth
Stats::Formula averageReadBandwidth
Definition: comm_monitor.hh:291
CommMonitor::MonitorStats::outstandingReadReqs
unsigned int outstandingReadReqs
Definition: comm_monitor.hh:336
MemCmd::isWrite
bool isWrite() const
Definition: packet.hh:201
RequestPort::tryTiming
bool tryTiming(PacketPtr pkt) const
Check if the responder can handle a timing request.
Definition: port.hh:502
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
CommMonitor::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: comm_monitor.cc:76
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:141

Generated on Tue Jun 22 2021 15:28:29 for gem5 by doxygen 1.8.17