summaryrefslogtreecommitdiff
path: root/util/systemc/README
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/systemc/README
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/systemc/README')
-rw-r--r--util/systemc/README82
1 files changed, 0 insertions, 82 deletions
diff --git a/util/systemc/README b/util/systemc/README
deleted file mode 100644
index b05c81058..000000000
--- a/util/systemc/README
+++ /dev/null
@@ -1,82 +0,0 @@
-This directory contains a demo of C++ configuration of gem5. The intention
-is to provide a mechanism to allow pre-generated config.ini files generated
-by Python-based gem5 to be reloaded in library-base versions of gem5
-embedded in other systems using C++ calls for simulation control.
-
-This directory contain a demo of hosting a C++ configured version of gem5
-onto SystemC's event loop. The hosting is achieved by replacing 'simulate'
-with a SystemC object which implements an event loop using SystemC scheduler
-mechanisms.
-
-The sc_... files here should probably be hosted in a diferent directory and
-buildable as a library.
-
-Files:
-
- main.cc -- demonstration top level
- sc_logger.{cc,hh} -- rehosting of DPRINTF onto SC_REPORT
- sc_module.{cc,hh} -- SystemC simulation loop base class
- sc_gem5_control.{cc,hh} -- Alternative extra wrapping to allow gem5
- Systems to be instantiated as single
- sc_module objects.
- stats.{cc,hh} -- Stats dumping (copied from util/cxx_config)
-
-Read main.cc for more details of the implementation and sc_... files for
-
-To build:
-
-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 ../..
-> scons build/ARM/gem5.opt
-> scons --with-cxx-config --without-python build/ARM/libgem5_opt.so
-> cd util/systemc
-
-Note: For MAC / OSX this command should be used:
-> scons --with-cxx-config --without-python build/ARM/libgem5_opt.dylib
-
-Set a proper LD_LIBRARY_PATH e.g. for bash:
-> export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/gem5/build/ARM/"
-
-or for MAC / OSX:
-> export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/path/to/gem5/build/ARM/"
-
-
-Then edit the Makefile to set the paths for SystemC, e.g:
-
- Linux:
- SYSTEMC_INC = /opt/systemc/include
- SYSTEMC_LIB = /opt/systemc/lib-linux64
-
- MAC / OSX:
- SYSTEMC_INC = /opt/systemc/include
- SYSTEMC_LIB = /opt/systemc/lib-macosx64
-
-Then run make:
-
-> 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
-
-The binary 'gem5.opt.cxx' can now be used to load in the generated config
-file from the previous normal gem5 run.
-
-Try:
-
-> ./gem5.opt.cxx m5out/config.ini
-
-This should print:
-
-> Hello world!
-
-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
-
-If you are interested in SystemC Transaction Level Modeling (TLM2) please have
-a look into /util/tlm.