/*
* Copyright (c) 2012-2013, 2015 ARM Limited
- * All rights reserved
+ * Copyright (c) 2016 Google Inc.
+ * Copyright (c) 2017, Centre National de la Recherche Scientifique
+ * All rights reserved.
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
*
* Authors: Thomas Grass
* Andreas Hansson
+ * Rahul Thakur
+ * Pierre-Yves Peneau
*/
#ifndef __MEM_COMM_MONITOR_HH__
*/
CommMonitor(Params* params);
- void init() M5_ATTR_OVERRIDE;
- void regStats() M5_ATTR_OVERRIDE;
- void startup() M5_ATTR_OVERRIDE;
- void regProbePoints() M5_ATTR_OVERRIDE;
+ void init() override;
+ void regStats() override;
+ void startup() override;
+ void regProbePoints() override;
public: // MemObject interfaces
BaseMasterPort& getMasterPort(const std::string& if_name,
- PortID idx = InvalidPortID) M5_ATTR_OVERRIDE;
+ PortID idx = InvalidPortID) override;
BaseSlavePort& getSlavePort(const std::string& if_name,
- PortID idx = InvalidPortID) M5_ATTR_OVERRIDE;
+ PortID idx = InvalidPortID) override;
private:
mon.recvReqRetry();
}
+ void recvRetrySnoopResp()
+ {
+ mon.recvRetrySnoopResp();
+ }
+
private:
CommMonitor& mon;
bool recvTimingSnoopResp(PacketPtr pkt);
+ void recvRetrySnoopResp();
+
AddrRangeList getAddrRanges() const;
bool isSnooping() const;
struct MonitorStats
{
- /** Disable flag for burst length historgrams **/
+ /** Disable flag for burst length histograms **/
bool disableBurstLengthHists;
/** Histogram of read burst lengths */
/** Disable flag for address distributions. */
bool disableAddrDists;
+ /** Address mask for sources of read accesses to be captured */
+ const Addr readAddrMask;
+
+ /** Address mask for sources of write accesses to be captured */
+ const Addr writeAddrMask;
+
/**
* Histogram of number of read accesses to addresses over
* time.
outstandingReadReqs(0), outstandingWriteReqs(0),
disableTransactionHists(params->disable_transaction_hists),
readTrans(0), writeTrans(0),
- disableAddrDists(params->disable_addr_dists)
+ disableAddrDists(params->disable_addr_dists),
+ readAddrMask(params->read_addr_mask),
+ writeAddrMask(params->write_addr_mask)
{ }
+ void updateReqStats(const ProbePoints::PacketInfo& pkt, bool is_atomic,
+ bool expects_response);
+ void updateRespStats(const ProbePoints::PacketInfo& pkt, Tick latency,
+ bool is_atomic);
};
/** This function is called periodically at the end of each time bin */
void samplePeriodic();
/** Periodic event called at the end of each simulation time bin */
- EventWrapper<CommMonitor, &CommMonitor::samplePeriodic> samplePeriodicEvent;
+ EventFunctionWrapper samplePeriodicEvent;
/**
*@{
/** Sample period in seconds */
const double samplePeriod;
- /** Address mask for sources of read accesses to be captured */
- const Addr readAddrMask;
-
- /** Address mask for sources of write accesses to be captured */
- const Addr writeAddrMask;
-
/** @} */
/** Instantiate stats */