40#ifndef __MEM_COMM_MONITOR_HH__
41#define __MEM_COMM_MONITOR_HH__
45#include "params/CommMonitor.hh"
387 const CommMonitorParams &
params);
390 bool expects_response);
Sender state class for the monitor so that we can annotate packets with a transmit time and receive t...
Tick transmitTime
Tick when request is transmitted.
CommMonitorSenderState(Tick _transmitTime)
Construct a new sender state and store the time so we can calculate round-trip latency.
~CommMonitorSenderState()
Destructor.
This is the request port of the communication monitor.
void recvRangeChange()
Called to receive an address range change from the peer response port.
bool isSnooping() const
Determine if this request port is snooping or not.
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
void recvTimingSnoopReq(PacketPtr pkt)
Receive a timing snoop request from the peer.
MonitorRequestPort(const std::string &_name, CommMonitor &_mon)
void recvRetrySnoopResp()
Called by the peer if sendTimingSnoopResp was called on this protocol (causing recvTimingSnoopResp to...
void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the peer.
Tick recvAtomicSnoop(PacketPtr pkt)
Receive an atomic snoop request packet from our peer.
This is the CPU-side port of the communication monitor.
MonitorResponsePort(const std::string &_name, CommMonitor &_mon)
bool recvTimingReq(PacketPtr pkt)
Receive a timing request from the peer.
void recvRespRetry()
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
bool recvTimingSnoopResp(PacketPtr pkt)
Receive a timing snoop response from the peer.
bool tryTiming(PacketPtr pkt)
Availability request from the peer.
void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the peer.
AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
The communication monitor is a SimObject which can monitor statistics of the communication happening ...
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
const Tick samplePeriodTicks
Length of simulation time bin.
probing::PacketUPtr ppPktReq
Successfully forwarded request packet.
void recvTimingSnoopReq(PacketPtr pkt)
EventFunctionWrapper samplePeriodicEvent
Periodic event called at the end of each simulation time bin.
void recvFunctionalSnoop(PacketPtr pkt)
void recvFunctional(PacketPtr pkt)
CommMonitorParams Params
Parameters of communication monitor.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Tick recvAtomic(PacketPtr pkt)
void startup() override
startup() is the final initialization call before simulation.
bool recvTimingSnoopResp(PacketPtr pkt)
MonitorResponsePort cpuSidePort
Instance of response port, i.e.
Tick recvAtomicSnoop(PacketPtr pkt)
void regProbePoints() override
Register probe points for this object.
MonitorStats stats
Instantiate stats.
const double samplePeriod
Sample period in seconds.
void recvRetrySnoopResp()
bool tryTiming(PacketPtr pkt)
bool recvTimingReq(PacketPtr pkt)
AddrRangeList getAddrRanges() const
probing::PacketUPtr ppPktResp
Successfully forwarded response packet.
void samplePeriodic()
This function is called periodically at the end of each time bin.
CommMonitor(const Params ¶ms)
Constructor based on the Python params.
bool recvTimingResp(PacketPtr pkt)
MonitorRequestPort memSidePort
Instance of request port, facing the memory side.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
A ResponsePort is a specialization of a port.
Abstract superclass for simulation objects.
A simple distribution stat.
This is a simple scalar statistic, like a counter.
const Params & params() const
std::unique_ptr< Packet > PacketUPtr
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
Declaration of Statistics objects.
Stats declarations, all in a struct for convenience.
statistics::SparseHistogram writeAddrDist
Histogram of number of write accesses to addresses over time.
unsigned int outstandingWriteReqs
unsigned int outstandingReadReqs
statistics::Distribution ittReqReq
const Addr readAddrMask
Address mask for sources of read accesses to be captured.
statistics::Histogram writeBandwidthHist
void updateRespStats(const probing::PacketInfo &pkt, Tick latency, bool is_atomic)
unsigned int writtenBytes
Histogram for write bandwidth per sample window.
statistics::Scalar totalWrittenBytes
bool disableBurstLengthHists
Disable flag for burst length histograms.
const Addr writeAddrMask
Address mask for sources of write accesses to be captured.
bool disableAddrDists
Disable flag for address distributions.
statistics::Histogram writeLatencyHist
Histogram of write request-to-response latencies.
statistics::Histogram outstandingWritesHist
Histogram of outstanding write requests.
statistics::Histogram writeBurstLengthHist
Histogram of write burst lengths.
bool disableTransactionHists
Disable flag for transaction histograms.
statistics::Histogram readLatencyHist
Histogram of read request-to-response latencies.
statistics::Histogram readTransHist
Histogram of number of read transactions per time bin.
bool disableLatencyHists
Disable flag for latency histograms.
bool disableBandwidthHists
Disable flag for the bandwidth histograms.
statistics::SparseHistogram readAddrDist
Histogram of number of read accesses to addresses over time.
statistics::Formula averageWriteBandwidth
statistics::Scalar totalReadBytes
unsigned int readBytes
Histogram for read bandwidth per sample window.
statistics::Histogram readBurstLengthHist
Histogram of read burst lengths.
bool disableITTDists
Disable flag for ITT distributions.
statistics::Histogram writeTransHist
Histogram of number of timing write transactions per time bin.
MonitorStats(statistics::Group *parent, const CommMonitorParams ¶ms)
Create the monitor stats and initialise all the members that are not statistics themselves,...
statistics::Histogram outstandingReadsHist
Histogram of outstanding read requests.
statistics::Distribution ittWriteWrite
void updateReqStats(const probing::PacketInfo &pkt, bool is_atomic, bool expects_response)
statistics::Histogram readBandwidthHist
statistics::Formula averageReadBandwidth
bool disableOutstandingHists
Disable flag for outstanding histograms.
statistics::Distribution ittReadRead
Inter transaction time (ITT) distributions.
A virtual base opaque structure used to hold state associated with the packet (e.g....
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...