comm_monitor.hh (13784:1941dc118243) comm_monitor.hh (13892:0182a0601f66)
1/*
2 * Copyright (c) 2012-2013, 2015, 2018 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

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

41 * Rahul Thakur
42 * Pierre-Yves Peneau
43 */
44
45#ifndef __MEM_COMM_MONITOR_HH__
46#define __MEM_COMM_MONITOR_HH__
47
48#include "base/statistics.hh"
1/*
2 * Copyright (c) 2012-2013, 2015, 2018 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

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

41 * Rahul Thakur
42 * Pierre-Yves Peneau
43 */
44
45#ifndef __MEM_COMM_MONITOR_HH__
46#define __MEM_COMM_MONITOR_HH__
47
48#include "base/statistics.hh"
49#include "mem/mem_object.hh"
49#include "mem/port.hh"
50#include "params/CommMonitor.hh"
51#include "sim/probe/mem.hh"
50#include "params/CommMonitor.hh"
51#include "sim/probe/mem.hh"
52#include "sim/sim_object.hh"
52
53/**
53
54/**
54 * The communication monitor is a MemObject which can monitor statistics of
55 * The communication monitor is a SimObject which can monitor statistics of
55 * the communication happening between two ports in the memory system.
56 *
57 * Currently the following stats are implemented: Histograms of read/write
58 * transactions, read/write burst lengths, read/write bandwidth,
59 * outstanding read/write requests, read latency and inter transaction time
60 * (read-read, write-write, read/write-read/write). Furthermore it allows
61 * to capture the number of accesses to an address over time ("heat map").
62 * All stats can be disabled from Python.
63 */
56 * the communication happening between two ports in the memory system.
57 *
58 * Currently the following stats are implemented: Histograms of read/write
59 * transactions, read/write burst lengths, read/write bandwidth,
60 * outstanding read/write requests, read latency and inter transaction time
61 * (read-read, write-write, read/write-read/write). Furthermore it allows
62 * to capture the number of accesses to an address over time ("heat map").
63 * All stats can be disabled from Python.
64 */
64class CommMonitor : public MemObject
65class CommMonitor : public SimObject
65{
66
67 public: // Construction & SimObject interfaces
68
69 /** Parameters of communication monitor */
70 typedef CommMonitorParams Params;
71 const Params* params() const
72 { return reinterpret_cast<const Params*>(_params); }

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

78 */
79 CommMonitor(Params* params);
80
81 void init() override;
82 void regStats() override;
83 void startup() override;
84 void regProbePoints() override;
85
66{
67
68 public: // Construction & SimObject interfaces
69
70 /** Parameters of communication monitor */
71 typedef CommMonitorParams Params;
72 const Params* params() const
73 { return reinterpret_cast<const Params*>(_params); }

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

79 */
80 CommMonitor(Params* params);
81
82 void init() override;
83 void regStats() override;
84 void startup() override;
85 void regProbePoints() override;
86
86 public: // MemObject interfaces
87 public: // SimObject interfaces
87 Port &getPort(const std::string &if_name,
88 PortID idx=InvalidPortID) override;
89
90 private:
91
92 /**
93 * Sender state class for the monitor so that we can annotate
94 * packets with a transmit time and receive time.

--- 355 unchanged lines hidden ---
88 Port &getPort(const std::string &if_name,
89 PortID idx=InvalidPortID) override;
90
91 private:
92
93 /**
94 * Sender state class for the monitor so that we can annotate
95 * packets with a transmit time and receive time.

--- 355 unchanged lines hidden ---