summaryrefslogtreecommitdiff
path: root/util/tlm
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/tlm
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/tlm')
-rw-r--r--util/tlm/main.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/tlm/main.cc b/util/tlm/main.cc
index c06565603..bf442e02b 100644
--- a/util/tlm/main.cc
+++ b/util/tlm/main.cc
@@ -30,6 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors: Matthias Jung
+ * Abdul Mutaal Ahmad
*/
/**
@@ -67,6 +68,9 @@
#include "sim/system.hh"
#include "stats.hh"
+// Defining global string variable decalred in stats.hh
+std::string filename;
+
void usage(const std::string &prog_name)
{
std::cerr << "Usage: " << prog_name << (
@@ -296,6 +300,8 @@ sc_main(int argc, char **argv)
SimControl sim_control("gem5", argc, argv);
Target *memory;
+ filename = "m5out/stats-tlm.txt";
+
tlm::tlm_initiator_socket <> *mem_port =
dynamic_cast<tlm::tlm_initiator_socket<> *>(
sc_core::sc_find_object("gem5.memory")
@@ -319,5 +325,7 @@ sc_main(int argc, char **argv)
SC_REPORT_INFO("sc_main", "End of Simulation");
+ CxxConfig::statsDump();
+
return EXIT_SUCCESS;
}