summaryrefslogtreecommitdiff
path: root/src/systemc/core
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-02-15 08:00:20 -0800
committerGabe Black <gabeblack@google.com>2019-02-25 23:09:28 +0000
commit055109800c5f65dcabd07c583c96a5fc20f86ce6 (patch)
treed602b94ceeee2ebfc317a670a4e1beba0987f8d8 /src/systemc/core
parent296f5219da6a2927e84fb748f7f74018c0c1f32e (diff)
downloadgem5-055109800c5f65dcabd07c583c96a5fc20f86ce6.tar.xz
systemc: Export the tlm::tlm_global_quantum class to python.
This way the python code can set up the global quantum without having an sc_main function to do it. Change-Id: I96df4dea0f1bfe9e3e86d4784bbda8f5b6b74d0b Reviewed-on: https://gem5-review.googlesource.com/c/16503 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/systemc/core')
-rw-r--r--src/systemc/core/SystemC.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemc/core/SystemC.py b/src/systemc/core/SystemC.py
index 7afbd285b..84424ef1d 100644
--- a/src/systemc/core/SystemC.py
+++ b/src/systemc/core/SystemC.py
@@ -58,6 +58,11 @@ class SystemC_Kernel(SimObject):
return SystemC_Kernel.ScMainResult(
sc_main_result_code(), sc_main_result_str());
+ def tlm_global_quantum_instance(self):
+ '''Retrieve the global tlm quantum instance'''
+ from _m5.systemc import tlm_global_quantum
+ return tlm_global_quantum.instance()
+
# This class represents systemc sc_object instances in python config files. It
# inherits from SimObject in python, but the c++ version, sc_core::sc_object,
# doesn't inherit from gem5's c++ SimObject class.