summaryrefslogtreecommitdiff
path: root/configs/common/CacheConfig.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2019-02-25 11:55:02 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2019-03-18 15:13:52 +0000
commitfe3e8084959a6910f4c8d075c5c03e40d0269527 (patch)
tree7e4e43608dfd8d3d5544177e439f57733f3837d8 /configs/common/CacheConfig.py
parent9e22a2ab603d743b187108986cfbeba07c0c0b8d (diff)
downloadgem5-fe3e8084959a6910f4c8d075c5c03e40d0269527.tar.xz
configs: Use absolute import paths
Use absoluate import paths to be Python 3 compatible. This also imports absolute_import from __future__ to ensure that Python 2.7 behaves the same way as Python 3. Change-Id: Ica06ed95814e9cd3e768b3e1785075e36f6e56d0 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/16708 Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'configs/common/CacheConfig.py')
-rw-r--r--configs/common/CacheConfig.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/configs/common/CacheConfig.py b/configs/common/CacheConfig.py
index 368356f06..ab9d26735 100644
--- a/configs/common/CacheConfig.py
+++ b/configs/common/CacheConfig.py
@@ -42,10 +42,11 @@
#
from __future__ import print_function
+from __future__ import absolute_import
import m5
from m5.objects import *
-from Caches import *
+from .Caches import *
def config_cache(options, system):
if options.external_memory_system and (options.caches or options.l2cache):
@@ -57,13 +58,14 @@ def config_cache(options, system):
if options.cpu_type == "O3_ARM_v7a_3":
try:
- from cores.arm.O3_ARM_v7a import *
+ import cores.arm.O3_ARM_v7a as core
except:
print("O3_ARM_v7a_3 is unavailable. Did you compile the O3 model?")
sys.exit(1)
dcache_class, icache_class, l2_cache_class, walk_cache_class = \
- O3_ARM_v7a_DCache, O3_ARM_v7a_ICache, O3_ARM_v7aL2, \
+ core.O3_ARM_v7a_DCache, core.O3_ARM_v7a_ICache, \
+ core.O3_ARM_v7aL2, \
O3_ARM_v7aWalkCache
else:
dcache_class, icache_class, l2_cache_class, walk_cache_class = \