From 9bc9b2408395f93297a38aa1f54df562291f7752 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 20 Feb 2019 16:36:57 -0800 Subject: systemc: Add m5.systemc and m5.tlm python modules. These will be how systemc and tlm APIs which are not attached to SimObjects will be exposed. This avoids having to artificially attach them to wrapping SimObjects for instance, which is a bit awkward and non-obvious. The python code which attaches the systemc and tlm modules to the m5 modules lives in src/python/m5/__init__.py, but the modules themselves live in src/systemc/python to keep all the systemc code grouped together. It might be a little confusing to have a small part of the glue that adds those modules in a separate place (__init__.py), but that is, as far as I can tell, unavoidable, and it's better in my opinion to keep the systemc code grouped together than to put it alongside the other python code and __init__.py. Change-Id: Iecb218daec5e15772152b5ad22b51f43b86c3d4b Reviewed-on: https://gem5-review.googlesource.com/c/16563 Reviewed-by: Andreas Sandberg Maintainer: Gabe Black --- src/python/m5/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/python/m5') diff --git a/src/python/m5/__init__.py b/src/python/m5/__init__.py index d97727cd8..8cad3b8d1 100644 --- a/src/python/m5/__init__.py +++ b/src/python/m5/__init__.py @@ -47,9 +47,13 @@ except ImportError: if in_gem5: from . import SimObject from . import core + from . import defines from . import objects from . import params from . import stats + if defines.buildEnv['USE_SYSTEMC']: + from . import systemc + from . import tlm from . import util from .event import * -- cgit v1.2.3