summaryrefslogtreecommitdiff
path: root/src/mem/comm_monitor.cc
diff options
context:
space:
mode:
authorSascha Bischoff <Sascha.Bischoff@ARM.com>2014-03-23 11:11:40 -0400
committerSascha Bischoff <Sascha.Bischoff@ARM.com>2014-03-23 11:11:40 -0400
commit548d47ea2c6f53de2daad78db3187efaf3fbd692 (patch)
tree6ebae38c72264d27d1d67fdadf902f02f5760b31 /src/mem/comm_monitor.cc
parente18d0e04a2d44316bc9c9e09b74bcda5562e64cc (diff)
downloadgem5-548d47ea2c6f53de2daad78db3187efaf3fbd692.tar.xz
mem: CommMonitor trace warn on non-timing mode
Add a warning to the CommMonitor which will alert the user if they try and record a trace when the system is not in timing mode.
Diffstat (limited to 'src/mem/comm_monitor.cc')
-rw-r--r--src/mem/comm_monitor.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mem/comm_monitor.cc b/src/mem/comm_monitor.cc
index 655265c37..70b8a6451 100644
--- a/src/mem/comm_monitor.cc
+++ b/src/mem/comm_monitor.cc
@@ -55,7 +55,8 @@ CommMonitor::CommMonitor(Params* params)
readAddrMask(params->read_addr_mask),
writeAddrMask(params->write_addr_mask),
stats(params),
- traceStream(NULL)
+ traceStream(NULL),
+ system(params->system)
{
// If we are using a trace file, then open the file,
if (params->trace_file != "") {
@@ -106,6 +107,13 @@ CommMonitor::init()
// make sure both sides of the monitor are connected
if (!slavePort.isConnected() || !masterPort.isConnected())
fatal("Communication monitor is not connected on both sides.\n");
+
+ if (traceStream != NULL) {
+ // Check the memory mode. We only record something when in
+ // timing mode. Warn accordingly.
+ if (!system->isTimingMode())
+ warn("%s: Not in timing mode. No trace will be recorded.", name());
+ }
}
BaseMasterPort&