summaryrefslogtreecommitdiff
path: root/configs/common/cores
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-06-26 16:18:56 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-07-03 09:47:19 +0000
commit89530735d115578d7e88f1bba1f299becb1350ca (patch)
tree1a557ed0ea48e2222b34deea66a36274d39aa2d0 /configs/common/cores
parent3212bdf3a89addef371bd7d3f43c322b002644db (diff)
downloadgem5-89530735d115578d7e88f1bba1f299becb1350ca.tar.xz
config: Clean up core timing model discovery
Instead of hard-coding timing models in CpuConfig.py, use introspection to find them in the cores.arm model package. Change-Id: I6642dc9cbc3f5beeeec748e716c9426c233d51ea Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Gabor Dozsa <gabor.dozsa@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3944 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'configs/common/cores')
-rw-r--r--configs/common/cores/arm/__init__.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/configs/common/cores/arm/__init__.py b/configs/common/cores/arm/__init__.py
index 7a2173eab..96388f731 100644
--- a/configs/common/cores/arm/__init__.py
+++ b/configs/common/cores/arm/__init__.py
@@ -34,3 +34,15 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors: Andreas Sandberg
+
+from pkgutil import iter_modules
+from importlib import import_module
+
+_cpu_modules = [
+ name for _, name, ispkg in iter_modules(__path__) if not ispkg
+]
+
+for c in _cpu_modules:
+ import_module("." + c, package=__package__)
+
+__all__ = _cpu_modules