From fe3e8084959a6910f4c8d075c5c03e40d0269527 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 25 Feb 2019 11:55:02 +0000 Subject: 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/16708 Reviewed-by: Jason Lowe-Power --- configs/dram/lat_mem_rd.py | 1 + configs/dram/low_power_sweep.py | 6 ++++-- configs/dram/sweep.py | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'configs/dram') diff --git a/configs/dram/lat_mem_rd.py b/configs/dram/lat_mem_rd.py index a1aa77df4..fd92a6350 100644 --- a/configs/dram/lat_mem_rd.py +++ b/configs/dram/lat_mem_rd.py @@ -36,6 +36,7 @@ # Authors: Andreas Hansson from __future__ import print_function +from __future__ import absolute_import import gzip import optparse diff --git a/configs/dram/low_power_sweep.py b/configs/dram/low_power_sweep.py index e9714a6dc..dc8de01e8 100644 --- a/configs/dram/low_power_sweep.py +++ b/configs/dram/low_power_sweep.py @@ -37,6 +37,7 @@ # Andreas Hansson from __future__ import print_function +from __future__ import absolute_import import argparse @@ -45,8 +46,9 @@ from m5.objects import * from m5.util import addToPath from m5.stats import periodicStatDump -addToPath(os.getcwd() + '/configs/common') -import MemConfig +addToPath('../') + +from common import MemConfig # This script aims at triggering low power state transitions in the DRAM # controller. The traffic generator is used in DRAM mode and traffic diff --git a/configs/dram/sweep.py b/configs/dram/sweep.py index 10ef7486d..61b316417 100644 --- a/configs/dram/sweep.py +++ b/configs/dram/sweep.py @@ -36,6 +36,7 @@ # Authors: Andreas Hansson from __future__ import print_function +from __future__ import absolute_import import math import optparse -- cgit v1.2.3