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