summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-10 17:28:09 -0700
committerGabe Black <gabeblack@google.com>2018-11-02 20:42:17 +0000
commitc71dfc17a7f5601de06085b6c2fe5efd9e3ea11f (patch)
tree4c85126f1eee2ec10261b1359900b13bf5888256 /util
parent006eb36634a35f6b6d44ee63254f31ba96ac5267 (diff)
downloadgem5-c71dfc17a7f5601de06085b6c2fe5efd9e3ea11f.tar.xz
util: Move the existing systemc example into a subdirectory.
This example is for how to embed gem5 within systemc and make it use the systemc event queue. This used to be the only method of using gem5 and systemc together, but now that there are other options, it's ambiguous to have it as the only thing in the util/systemc directory. This change moves it into a gem5_within_systemc subdirectory which clearly shows what type of integration that example corresponds with. Change-Id: I426d68ccb618397d820bef492cbb1ff8ef4a979b Reviewed-on: https://gem5-review.googlesource.com/c/13375 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'util')
-rw-r--r--util/systemc/gem5_within_systemc/Makefile (renamed from util/systemc/Makefile)2
-rw-r--r--util/systemc/gem5_within_systemc/README (renamed from util/systemc/README)9
-rw-r--r--util/systemc/gem5_within_systemc/main.cc (renamed from util/systemc/main.cc)4
-rw-r--r--util/systemc/gem5_within_systemc/sc_gem5_control.cc (renamed from util/systemc/sc_gem5_control.cc)6
-rw-r--r--util/systemc/gem5_within_systemc/sc_gem5_control.hh (renamed from util/systemc/sc_gem5_control.hh)0
-rw-r--r--util/systemc/gem5_within_systemc/sc_logger.cc (renamed from util/systemc/sc_logger.cc)0
-rw-r--r--util/systemc/gem5_within_systemc/sc_logger.hh (renamed from util/systemc/sc_logger.hh)0
-rw-r--r--util/systemc/gem5_within_systemc/sc_module.cc (renamed from util/systemc/sc_module.cc)0
-rw-r--r--util/systemc/gem5_within_systemc/sc_module.hh (renamed from util/systemc/sc_module.hh)0
-rw-r--r--util/systemc/gem5_within_systemc/stats.cc (renamed from util/systemc/stats.cc)0
-rw-r--r--util/systemc/gem5_within_systemc/stats.hh (renamed from util/systemc/stats.hh)0
11 files changed, 11 insertions, 10 deletions
diff --git a/util/systemc/Makefile b/util/systemc/gem5_within_systemc/Makefile
index 24d1e52f2..100402c15 100644
--- a/util/systemc/Makefile
+++ b/util/systemc/gem5_within_systemc/Makefile
@@ -41,7 +41,7 @@ VARIANT = opt
SYSTEMC_INC = ./systemc/include
SYSTEMC_LIB = ./systemc/lib-linux64
-CXXFLAGS = -I../../build/$(ARCH) -L../../build/$(ARCH)
+CXXFLAGS = -I../../../build/$(ARCH) -L../../../build/$(ARCH)
CXXFLAGS += -I$(SYSTEMC_INC) -L$(SYSTEMC_LIB)
CXXFLAGS += -std=c++0x
CXXFLAGS += -g
diff --git a/util/systemc/README b/util/systemc/gem5_within_systemc/README
index b05c81058..9ee1103a8 100644
--- a/util/systemc/README
+++ b/util/systemc/gem5_within_systemc/README
@@ -29,7 +29,7 @@ First build gem5 as a library with cxx-config support and (optionally)
without python. Also build a normal gem5 (cxx-config not needed, Python
needed):
-> cd ../..
+> cd ../../..
> scons build/ARM/gem5.opt
> scons --with-cxx-config --without-python build/ARM/libgem5_opt.so
> cd util/systemc
@@ -60,8 +60,8 @@ Then run make:
Make a config file for the C++-configured gem5 using normal gem5
-> ../../build/ARM/gem5.opt ../../configs/example/se.py -c \
-> ../../tests/test-progs/hello/bin/arm/linux/hello
+> ../../../build/ARM/gem5.opt ../../../configs/example/se.py -c \
+> ../../../tests/test-progs/hello/bin/arm/linux/hello
The binary 'gem5.opt.cxx' can now be used to load in the generated config
file from the previous normal gem5 run.
@@ -76,7 +76,8 @@ This should print:
The .ini file can also be read by the Python .ini file reader example:
-> ../../build/ARM/gem5.opt ../../configs/example/read_ini.py m5out/config.ini
+> ../../../build/ARM/gem5.opt ../../../configs/example/read_ini.py \
+> m5out/config.ini
If you are interested in SystemC Transaction Level Modeling (TLM2) please have
a look into /util/tlm.
diff --git a/util/systemc/main.cc b/util/systemc/gem5_within_systemc/main.cc
index cbbdd7229..9d88b63cb 100644
--- a/util/systemc/main.cc
+++ b/util/systemc/gem5_within_systemc/main.cc
@@ -63,6 +63,8 @@
#include "base/str.hh"
#include "base/trace.hh"
#include "cpu/base.hh"
+#include "sc_logger.hh"
+#include "sc_module.hh"
#include "sim/cxx_config_ini.hh"
#include "sim/cxx_manager.hh"
#include "sim/init_signals.hh"
@@ -70,8 +72,6 @@
#include "sim/simulate.hh"
#include "sim/stat_control.hh"
#include "sim/system.hh"
-#include "sc_logger.hh"
-#include "sc_module.hh"
#include "stats.hh"
// Defining global string variable decalred in stats.hh
diff --git a/util/systemc/sc_gem5_control.cc b/util/systemc/gem5_within_systemc/sc_gem5_control.cc
index cf6e0d57c..ae3dc241f 100644
--- a/util/systemc/sc_gem5_control.cc
+++ b/util/systemc/gem5_within_systemc/sc_gem5_control.cc
@@ -42,14 +42,14 @@
#include <list>
#include "base/statistics.hh"
+#include "sc_gem5_control.hh"
+#include "sc_logger.hh"
+#include "sc_module.hh"
#include "sim/cxx_config_ini.hh"
#include "sim/cxx_manager.hh"
#include "sim/debug.hh"
#include "sim/init_signals.hh"
#include "sim/stat_control.hh"
-#include "sc_gem5_control.hh"
-#include "sc_logger.hh"
-#include "sc_module.hh"
#include "stats.hh"
namespace Gem5SystemC
diff --git a/util/systemc/sc_gem5_control.hh b/util/systemc/gem5_within_systemc/sc_gem5_control.hh
index a5a372344..a5a372344 100644
--- a/util/systemc/sc_gem5_control.hh
+++ b/util/systemc/gem5_within_systemc/sc_gem5_control.hh
diff --git a/util/systemc/sc_logger.cc b/util/systemc/gem5_within_systemc/sc_logger.cc
index a8b9020f4..a8b9020f4 100644
--- a/util/systemc/sc_logger.cc
+++ b/util/systemc/gem5_within_systemc/sc_logger.cc
diff --git a/util/systemc/sc_logger.hh b/util/systemc/gem5_within_systemc/sc_logger.hh
index 4143f8bb8..4143f8bb8 100644
--- a/util/systemc/sc_logger.hh
+++ b/util/systemc/gem5_within_systemc/sc_logger.hh
diff --git a/util/systemc/sc_module.cc b/util/systemc/gem5_within_systemc/sc_module.cc
index dafa80ee9..dafa80ee9 100644
--- a/util/systemc/sc_module.cc
+++ b/util/systemc/gem5_within_systemc/sc_module.cc
diff --git a/util/systemc/sc_module.hh b/util/systemc/gem5_within_systemc/sc_module.hh
index ff4e56e53..ff4e56e53 100644
--- a/util/systemc/sc_module.hh
+++ b/util/systemc/gem5_within_systemc/sc_module.hh
diff --git a/util/systemc/stats.cc b/util/systemc/gem5_within_systemc/stats.cc
index 54d149474..54d149474 100644
--- a/util/systemc/stats.cc
+++ b/util/systemc/gem5_within_systemc/stats.cc
diff --git a/util/systemc/stats.hh b/util/systemc/gem5_within_systemc/stats.hh
index 9dac960ee..9dac960ee 100644
--- a/util/systemc/stats.hh
+++ b/util/systemc/gem5_within_systemc/stats.hh