summaryrefslogtreecommitdiff
path: root/ext/systemc/README.md
diff options
context:
space:
mode:
authorMatthias Jung <jungma@eit.uni-kl.de>2017-03-01 18:39:56 +0100
committerMatthias Jung <jungma@eit.uni-kl.de>2017-05-18 08:36:56 +0000
commitaa651c7f8321bf96fc88f9a17285225000a753ec (patch)
treeb13240008c970b47bd74a5007e68136155d272fc /ext/systemc/README.md
parent595e692de09e1b7cbc5f57ac01da299afc066fdd (diff)
downloadgem5-aa651c7f8321bf96fc88f9a17285225000a753ec.tar.xz
ext: Include SystemC 2.3.1 into gem5
In the past it happened several times that some changes in gem5 broke the SystemC coupling. Recently Accelera has changed the licence for SystemC from their own licence to Apache2.0, which is compatible with gem5. However, SystemC usually relies on the Boost library, but I was able to exchange the boost calls by c++11 alternatives. The recent SystemC version is placed into /ext and is integrated into gem5's build system. The goal is to integrate some SystemC tests for the CI in some following patches. Change-Id: I4b66ec806b5e3cffc1d7c85d3735ff4fa5b31fd0 Reviewed-on: https://gem5-review.googlesource.com/2240 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'ext/systemc/README.md')
-rw-r--r--ext/systemc/README.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/ext/systemc/README.md b/ext/systemc/README.md
new file mode 100644
index 000000000..d4b084591
--- /dev/null
+++ b/ext/systemc/README.md
@@ -0,0 +1,43 @@
+Overview
+========
+
+This repository is a redistribution of the Accellera SystemC 2.3.1 library
+[[1]][sysc]. This distribution replaces Accellera's Autoconf build system with
+a SCons build system, which is very useful for integration of SystemC in other
+SCons based projects, e.g., gem5 [[2]][gem5].
+
+The repository contains all the source files from the Accellera distribution,
+but strips down the boost dependencies. All references to the boost library
+are replaced by calls to the C++11 STL. This repository also contains the
+TLM 2.0 protocl checker from Doulos [[3]][doulos].
+
+Build
+=====
+
+To build libsystemc-2.3.1.so, simply type scons. Optionally you can specify the
+number of jobs.
+
+```
+scons -j N
+```
+
+To build and link to SystemC from another SCons project, simply call the
+SConscript located in `src/`. Be sure to add `-std=c++11` to the `CXXFLAGS` of
+your environment and to export the environment as `'env'`. In case you build on
+OS X, you will need to add `-undefined dynamic lookup` to your `LINKFLAGS`.
+This is how a minimal SConstruct for your SystemC project could look:
+
+```python
+env = Environment()
+
+env.Append(CXXFLAGS=['-std=c++11'])
+if env['PLATFORM'] == 'darwin':
+ env.Append(LINKFLAGS=['-undefined', 'dynamic_lookup'])
+
+systemc = env.SConscript('<path_to_systemc>/src/SConscript', exports=['env'])
+env.Program('example', ['example.cc', systemc])
+```
+
+[sysc]: http://accellera.org/downloads/standards/systemc
+[gem5]: http://www.gem5.org/Main_Page
+[doulos]: https://www.doulos.com/knowhow/systemc/tlm2/base_protocol_checker/