comm_monitor.cc (13784:1941dc118243) | comm_monitor.cc (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 --- 35 unchanged lines hidden (view full) --- 44 45#include "mem/comm_monitor.hh" 46 47#include "base/trace.hh" 48#include "debug/CommMonitor.hh" 49#include "sim/stats.hh" 50 51CommMonitor::CommMonitor(Params* params) | 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 --- 35 unchanged lines hidden (view full) --- 44 45#include "mem/comm_monitor.hh" 46 47#include "base/trace.hh" 48#include "debug/CommMonitor.hh" 49#include "sim/stats.hh" 50 51CommMonitor::CommMonitor(Params* params) |
52 : MemObject(params), | 52 : SimObject(params), |
53 masterPort(name() + "-master", *this), 54 slavePort(name() + "-slave", *this), 55 samplePeriodicEvent([this]{ samplePeriodic(); }, name()), 56 samplePeriodTicks(params->sample_period), 57 samplePeriod(params->sample_period / SimClock::Float::s), 58 stats(params) 59{ 60 DPRINTF(CommMonitor, --- 25 unchanged lines hidden (view full) --- 86Port & 87CommMonitor::getPort(const std::string &if_name, PortID idx) 88{ 89 if (if_name == "master") { 90 return masterPort; 91 } else if (if_name == "slave") { 92 return slavePort; 93 } else { | 53 masterPort(name() + "-master", *this), 54 slavePort(name() + "-slave", *this), 55 samplePeriodicEvent([this]{ samplePeriodic(); }, name()), 56 samplePeriodTicks(params->sample_period), 57 samplePeriod(params->sample_period / SimClock::Float::s), 58 stats(params) 59{ 60 DPRINTF(CommMonitor, --- 25 unchanged lines hidden (view full) --- 86Port & 87CommMonitor::getPort(const std::string &if_name, PortID idx) 88{ 89 if (if_name == "master") { 90 return masterPort; 91 } else if (if_name == "slave") { 92 return slavePort; 93 } else { |
94 return MemObject::getPort(if_name, idx); | 94 return SimObject::getPort(if_name, idx); |
95 } 96} 97 98void 99CommMonitor::recvFunctional(PacketPtr pkt) 100{ 101 masterPort.sendFunctional(pkt); 102} --- 273 unchanged lines hidden (view full) --- 376CommMonitor::recvRangeChange() 377{ 378 slavePort.sendRangeChange(); 379} 380 381void 382CommMonitor::regStats() 383{ | 95 } 96} 97 98void 99CommMonitor::recvFunctional(PacketPtr pkt) 100{ 101 masterPort.sendFunctional(pkt); 102} --- 273 unchanged lines hidden (view full) --- 376CommMonitor::recvRangeChange() 377{ 378 slavePort.sendRangeChange(); 379} 380 381void 382CommMonitor::regStats() 383{ |
384 MemObject::regStats(); | 384 SimObject::regStats(); |
385 386 // Initialise all the monitor stats 387 using namespace Stats; 388 389 stats.readBurstLengthHist 390 .init(params()->burst_length_bins) 391 .name(name() + ".readBurstLengthHist") 392 .desc("Histogram of burst lengths of transmitted packets") --- 159 unchanged lines hidden --- | 385 386 // Initialise all the monitor stats 387 using namespace Stats; 388 389 stats.readBurstLengthHist 390 .init(params()->burst_length_bins) 391 .name(name() + ".readBurstLengthHist") 392 .desc("Histogram of burst lengths of transmitted packets") --- 159 unchanged lines hidden --- |