summaryrefslogtreecommitdiff
path: root/ext/systemc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-05-19 16:35:00 -0700
committerGabe Black <gabeblack@google.com>2017-05-29 16:54:08 +0000
commit6e8b0f659602602765fcfdb4d32a8aa2548d669e (patch)
treed4d4011856f28be4b90e4b0180d9195499c4d9dc /ext/systemc
parent7159ea669825a2a876dc3f0f2022336b517299a0 (diff)
downloadgem5-6e8b0f659602602765fcfdb4d32a8aa2548d669e.tar.xz
ext: Revamp the systemc SConscripts.
The existing scripts were including pthread code and QT code at the same time, and also insisting on an having a set of architecture specific source files for whatever the current architecture is. This change selects using either QT or pthreads based on the host architecture, distributes accumulating source files, list source files explicitly (to avoid including redundant coroutine libraries) and makes scons insist on an architecture specific QT implementation only if QT is being used. It also defines a preprocessor symbol which tells some headers whether or not pthreads are being used, and also clones the scons environment to avoid leaking flags into the main environment used to compile gem5 itself. If the host architecture isn't supported by systemc, a warning will be printed, and the various build products and SConscript files will be skipped over. Change-Id: I1a40123a11e49e02922a054f093246cf197087bf Reviewed-on: https://gem5-review.googlesource.com/3461 Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de> Reviewed-by: Christian Menard <christian.menard@tu-dresden.de> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'ext/systemc')
-rw-r--r--ext/systemc/SConscript71
-rw-r--r--ext/systemc/src/sysc/communication/SConscript.sc42
-rw-r--r--ext/systemc/src/sysc/datatypes/bit/SConscript.sc33
-rw-r--r--ext/systemc/src/sysc/datatypes/fx/SConscript.sc40
-rw-r--r--ext/systemc/src/sysc/datatypes/int/SConscript.sc40
-rw-r--r--ext/systemc/src/sysc/datatypes/misc/SConscript.sc31
-rw-r--r--ext/systemc/src/sysc/kernel/SConscript.sc67
-rw-r--r--ext/systemc/src/sysc/qt/SConscript.sc42
-rw-r--r--ext/systemc/src/sysc/tracing/SConscript.sc33
-rw-r--r--ext/systemc/src/sysc/utils/SConscript.sc39
10 files changed, 412 insertions, 26 deletions
diff --git a/ext/systemc/SConscript b/ext/systemc/SConscript
index 804f7abfc..c2e67ae1c 100644
--- a/ext/systemc/SConscript
+++ b/ext/systemc/SConscript
@@ -24,41 +24,60 @@
# Matthias Jung
import os
+from m5.util.terminal import get_termcap
Import('main')
+systemc = main.Clone()
-main.Prepend(CPPPATH=Dir('./src'))
-main.Prepend(CPATH=Dir('./src'))
+build_root = Dir('.').abspath
+src_root = Dir('.').srcdir.abspath
-main.Prepend(CXXFLAGS=['-DSC_INCLUDE_FX', '-pthread'])
-main.Prepend(CFLAGS=['-DSC_INCLUDE_FX', '-pthread'])
+systemc.Prepend(CPPPATH=Dir('./src'))
+systemc.Prepend(CPATH=Dir('./src'))
-conf = Configure(main)
+systemc.Prepend(CXXFLAGS=['-DSC_INCLUDE_FX'])
+systemc.Prepend(CFLAGS=['-DSC_INCLUDE_FX'])
-if main['PLATFORM'] == 'darwin':
- main.Append(LINKFLAGS=['-undefined', 'dynamic_lookup'])
+conf = Configure(systemc,
+ conf_dir = os.path.join(build_root, '.scons_config'),
+ log_file = os.path.join(build_root, 'scons_config.log'))
+
+if systemc['PLATFORM'] == 'darwin':
+ systemc.Append(LINKFLAGS=['-undefined', 'dynamic_lookup'])
+
+arch = None
+systemc['COROUTINE_LIB'] = ''
+if conf.CheckDeclaration('__i386__'):
+ systemc['COROUTINE_LIB'] = 'qt'
+ systemc['QT_ARCH'] = 'i386'
+ arch = 'i386'
+elif conf.CheckDeclaration('__x86_64__'):
+ systemc['COROUTINE_LIB'] = 'qt'
+ systemc['QT_ARCH'] = 'iX86_64'
+ arch = 'x86_64'
+else:
+ termcap = get_termcap(GetOption('use_colors'))
+ print termcap.Yellow + termcap.Bold + \
+ "Warning: Unrecognized architecture for systemc." + termcap.Normal
-s_file = None
-if conf.CheckDeclaration("__i386__"):
- s_file = 'i386.s'
-if conf.CheckDeclaration("__x86_64__"):
- s_file = 'iX86_64.s'
conf.Finish()
-if s_file is None:
- print 'Unsupported CPU architecture!'
- Exit(1)
+if systemc['COROUTINE_LIB'] == 'pthreads':
+ systemc.Prepend(CXXFLAGS=['-DSC_USE_PTHREADS'])
+
+systemc_files = []
+def SystemCSource(*args):
+ for arg in args:
+ systemc_files.append(systemc.File(arg))
-systemc_files = Glob('src/sysc/kernel/*.cpp')
-systemc_files += ['src/sysc/qt/qt.c', 'src/sysc/qt/md/' + s_file]
-systemc_files += Glob('src/sysc/communication/*.cpp')
-systemc_files += Glob('src/sysc/tracing/*.cpp')
-systemc_files += Glob('src/sysc/utils/*.cpp')
-systemc_files += Glob('src/sysc/datatypes/bit/*.cpp')
-systemc_files += Glob('src/sysc/datatypes/fx/*.cpp')
-systemc_files += Glob('src/sysc/datatypes/int/*.cpp')
-systemc_files += Glob('src/sysc/datatypes/misc/*.cpp')
+if arch:
+ for root, dirs, files in os.walk(src_root):
+ if 'SConscript.sc' in files:
+ build_dir = os.path.relpath(root, src_root)
+ systemc.SConscript(os.path.join(root, 'SConscript.sc'),
+ exports=['systemc', 'SystemCSource'],
+ variant_dir=os.path.join(build_root, build_dir))
-main.Library('libsystemc', systemc_files)
-main.SharedLibrary('libsystemc', systemc_files)
+ systemc.Library('libsystemc', systemc_files)
+ systemc.SharedLibrary('libsystemc', systemc_files)
diff --git a/ext/systemc/src/sysc/communication/SConscript.sc b/ext/systemc/src/sysc/communication/SConscript.sc
new file mode 100644
index 000000000..952615033
--- /dev/null
+++ b/ext/systemc/src/sysc/communication/SConscript.sc
@@ -0,0 +1,42 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+Import('systemc', 'SystemCSource')
+
+SystemCSource(
+ 'sc_clock.cpp',
+ 'sc_event_finder.cpp',
+ 'sc_event_queue.cpp',
+ 'sc_export.cpp',
+ 'sc_interface.cpp',
+ 'sc_mutex.cpp',
+ 'sc_port.cpp',
+ 'sc_prim_channel.cpp',
+ 'sc_semaphore.cpp',
+ 'sc_signal.cpp',
+ 'sc_signal_ports.cpp',
+ 'sc_signal_resolved.cpp',
+ 'sc_signal_resolved_ports.cpp',
+)
diff --git a/ext/systemc/src/sysc/datatypes/bit/SConscript.sc b/ext/systemc/src/sysc/datatypes/bit/SConscript.sc
new file mode 100644
index 000000000..aca97d356
--- /dev/null
+++ b/ext/systemc/src/sysc/datatypes/bit/SConscript.sc
@@ -0,0 +1,33 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+Import('systemc', 'SystemCSource')
+
+SystemCSource(
+ 'sc_bit.cpp',
+ 'sc_bv_base.cpp',
+ 'sc_logic.cpp',
+ 'sc_lv_base.cpp',
+)
diff --git a/ext/systemc/src/sysc/datatypes/fx/SConscript.sc b/ext/systemc/src/sysc/datatypes/fx/SConscript.sc
new file mode 100644
index 000000000..71de4a5e4
--- /dev/null
+++ b/ext/systemc/src/sysc/datatypes/fx/SConscript.sc
@@ -0,0 +1,40 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+Import('systemc', 'SystemCSource')
+
+SystemCSource(
+ 'sc_fxcast_switch.cpp',
+ 'sc_fxdefs.cpp',
+ 'sc_fxnum.cpp',
+ 'sc_fxnum_observer.cpp',
+ 'sc_fxtype_params.cpp',
+ 'sc_fxval.cpp',
+ 'sc_fxval_observer.cpp',
+ 'scfx_mant.cpp',
+ 'scfx_pow10.cpp',
+ 'scfx_rep.cpp',
+ 'scfx_utils.cpp',
+)
diff --git a/ext/systemc/src/sysc/datatypes/int/SConscript.sc b/ext/systemc/src/sysc/datatypes/int/SConscript.sc
new file mode 100644
index 000000000..874242926
--- /dev/null
+++ b/ext/systemc/src/sysc/datatypes/int/SConscript.sc
@@ -0,0 +1,40 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+Import('systemc', 'SystemCSource')
+
+SystemCSource(
+ 'sc_int_base.cpp',
+ 'sc_int32_mask.cpp',
+ 'sc_int64_io.cpp',
+ 'sc_int64_mask.cpp',
+ 'sc_length_param.cpp',
+ 'sc_nbdefs.cpp',
+ 'sc_nbexterns.cpp',
+ 'sc_nbutils.cpp',
+ 'sc_signed.cpp',
+ 'sc_uint_base.cpp',
+ 'sc_unsigned.cpp',
+)
diff --git a/ext/systemc/src/sysc/datatypes/misc/SConscript.sc b/ext/systemc/src/sysc/datatypes/misc/SConscript.sc
new file mode 100644
index 000000000..a01c2c180
--- /dev/null
+++ b/ext/systemc/src/sysc/datatypes/misc/SConscript.sc
@@ -0,0 +1,31 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+Import('systemc', 'SystemCSource')
+
+SystemCSource(
+ 'sc_concatref.cpp',
+ 'sc_value_base.cpp',
+)
diff --git a/ext/systemc/src/sysc/kernel/SConscript.sc b/ext/systemc/src/sysc/kernel/SConscript.sc
new file mode 100644
index 000000000..0db22a6ad
--- /dev/null
+++ b/ext/systemc/src/sysc/kernel/SConscript.sc
@@ -0,0 +1,67 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+Import('systemc', 'SystemCSource')
+
+SystemCSource(
+ 'sc_attribute.cpp',
+ 'sc_cthread_process.cpp',
+ 'sc_event.cpp',
+ 'sc_except.cpp',
+ 'sc_join.cpp',
+ 'sc_main.cpp',
+ 'sc_main_main.cpp',
+ 'sc_method_process.cpp',
+ 'sc_module.cpp',
+ 'sc_module_name.cpp',
+ 'sc_module_registry.cpp',
+ 'sc_name_gen.cpp',
+ 'sc_object.cpp',
+ 'sc_object_manager.cpp',
+ 'sc_phase_callback_registry.cpp',
+ 'sc_process.cpp',
+ 'sc_reset.cpp',
+ 'sc_sensitive.cpp',
+ 'sc_simcontext.cpp',
+ 'sc_spawn_options.cpp',
+ 'sc_thread_process.cpp',
+ 'sc_time.cpp',
+ 'sc_ver.cpp',
+ 'sc_wait.cpp',
+ 'sc_wait_cthread.cpp',
+)
+
+coroutine_lib = systemc['COROUTINE_LIB']
+if coroutine_lib == 'qt':
+ SystemCSource('sc_cor_qt.cpp')
+elif coroutine_lib == 'pthreads':
+ systemc.Append(CXXFLAGS=['-pthread'])
+ systemc.Append(CFLAGS=['-pthread'])
+ SystemCSource('sc_cor_pthread.cpp')
+elif coroutine_lib == 'fiber':
+ SystemCSource('sc_cor_fiber.cpp')
+else:
+ print 'Unrecognized threading implementation \'%s\'' % coroutine_lib
+ Exit(1)
diff --git a/ext/systemc/src/sysc/qt/SConscript.sc b/ext/systemc/src/sysc/qt/SConscript.sc
new file mode 100644
index 000000000..5ffb0d3aa
--- /dev/null
+++ b/ext/systemc/src/sysc/qt/SConscript.sc
@@ -0,0 +1,42 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+import os
+
+Import('systemc', 'SystemCSource')
+
+if systemc['COROUTINE_LIB'] == 'qt':
+ SystemCSource('qt.c')
+
+ qt_arch = systemc.get('QT_ARCH', None)
+ if not qt_arch:
+ print 'No architecture selected for the QT coroutine library.'
+ Exit(1)
+
+ if qt_arch in ('i386', 'iX86_64'):
+ SystemCSource(os.path.join('md', qt_arch + '.s'))
+ else:
+ print 'Don\'t know what to do for QT arch %s.' % qt_arch
+ Exit(1)
diff --git a/ext/systemc/src/sysc/tracing/SConscript.sc b/ext/systemc/src/sysc/tracing/SConscript.sc
new file mode 100644
index 000000000..7cd016746
--- /dev/null
+++ b/ext/systemc/src/sysc/tracing/SConscript.sc
@@ -0,0 +1,33 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+Import('systemc', 'SystemCSource')
+
+SystemCSource(
+ 'sc_trace.cpp',
+ 'sc_trace_file_base.cpp',
+ 'sc_vcd_trace.cpp',
+ 'sc_wif_trace.cpp',
+)
diff --git a/ext/systemc/src/sysc/utils/SConscript.sc b/ext/systemc/src/sysc/utils/SConscript.sc
new file mode 100644
index 000000000..63c4a24ff
--- /dev/null
+++ b/ext/systemc/src/sysc/utils/SConscript.sc
@@ -0,0 +1,39 @@
+# Copyright (c) 2017, TU Dresden
+# Copyright (c) 2017, University of Kaiserslautern
+# All rights reserved.
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+# Authors: Christian Menard
+# Matthias Jung
+
+Import('systemc', 'SystemCSource')
+
+SystemCSource(
+ 'sc_hash.cpp',
+ 'sc_list.cpp',
+ 'sc_mempool.cpp',
+ 'sc_pq.cpp',
+ 'sc_report.cpp',
+ 'sc_report_handler.cpp',
+ 'sc_stop_here.cpp',
+ 'sc_string.cpp',
+ 'sc_utils_ids.cpp',
+ 'sc_vector.cpp',
+)