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>
diff --git a/util/systemc/Makefile b/util/systemc/gem5_within_systemc/Makefile
similarity index 97%
rename from util/systemc/Makefile
rename to util/systemc/gem5_within_systemc/Makefile
index 24d1e52..100402c 100644
--- a/util/systemc/Makefile
+++ b/util/systemc/gem5_within_systemc/Makefile
@@ -41,7 +41,7 @@
 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
similarity index 91%
rename from util/systemc/README
rename to util/systemc/gem5_within_systemc/README
index b05c810..9ee1103 100644
--- a/util/systemc/README
+++ b/util/systemc/gem5_within_systemc/README
@@ -29,7 +29,7 @@
 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 @@
 
 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 @@
 
 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
similarity index 99%
rename from util/systemc/main.cc
rename to util/systemc/gem5_within_systemc/main.cc
index cbbdd72..9d88b63 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
similarity index 99%
rename from util/systemc/sc_gem5_control.cc
rename to util/systemc/gem5_within_systemc/sc_gem5_control.cc
index cf6e0d5..ae3dc24 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
similarity index 100%
rename from util/systemc/sc_gem5_control.hh
rename to 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
similarity index 100%
rename from util/systemc/sc_logger.cc
rename to 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
similarity index 100%
rename from util/systemc/sc_logger.hh
rename to 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
similarity index 100%
rename from util/systemc/sc_module.cc
rename to 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
similarity index 100%
rename from util/systemc/sc_module.hh
rename to util/systemc/gem5_within_systemc/sc_module.hh
diff --git a/util/systemc/stats.cc b/util/systemc/gem5_within_systemc/stats.cc
similarity index 100%
rename from util/systemc/stats.cc
rename to util/systemc/gem5_within_systemc/stats.cc
diff --git a/util/systemc/stats.hh b/util/systemc/gem5_within_systemc/stats.hh
similarity index 100%
rename from util/systemc/stats.hh
rename to util/systemc/gem5_within_systemc/stats.hh