summaryrefslogtreecommitdiff
path: root/util/systemc/main.cc
diff options
context:
space:
mode:
authorAbdul Mutaal Ahmad <abdul.mutaal@gmail.com>2016-07-01 09:30:15 -0500
committerAbdul Mutaal Ahmad <abdul.mutaal@gmail.com>2016-07-01 09:30:15 -0500
commit1051223318360a74c46c0f818bdc599287a51064 (patch)
treed933d7f95a0cad40290b69956d24e5641069916d /util/systemc/main.cc
parent50e9d0df51247f4aeafe63cdab2a0f53a09cc8e4 (diff)
downloadgem5-1051223318360a74c46c0f818bdc599287a51064.tar.xz
misc: Separate stats file for SystemC-gem5 co-simulation
In previous versions of systemC-gem5 coupling statistics were not updated for the systemc-gem5 simulation. systemC-gem5 simulation only need the previously built config.ini file and normal gem5 simulation has to be run once to generate config.ini file. Thus stats.txt inside the m5out folder is redundant for systemC-gem5 simulation. A new stats file is now generated with the all the statistics for systemC-gem5 simulation. This will also resolve the stats issue in tlm-sysmtemC simulation. Committed by Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'util/systemc/main.cc')
-rw-r--r--util/systemc/main.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/systemc/main.cc b/util/systemc/main.cc
index 75a77853b..19482d069 100644
--- a/util/systemc/main.cc
+++ b/util/systemc/main.cc
@@ -74,6 +74,9 @@
#include "sc_module.hh"
#include "stats.hh"
+// Defining global string variable decalred in stats.hh
+std::string filename;
+
void
usage(const std::string &prog_name)
{
@@ -383,7 +386,11 @@ sc_main(int argc, char **argv)
{
SimControl sim_control("gem5", argc, argv);
+ filename = "m5out/stats-systemc.txt";
+
sc_core::sc_start();
+ CxxConfig::statsDump();
+
return EXIT_SUCCESS;
}