summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
Diffstat (limited to 'configs')
-rw-r--r--configs/common/__init__.py36
-rw-r--r--configs/dist/sw.py6
-rw-r--r--configs/dram/lat_mem_rd.py6
-rw-r--r--configs/dram/sweep.py4
-rw-r--r--configs/example/apu_se.py7
-rw-r--r--configs/example/arm/devices.py6
-rw-r--r--configs/example/arm/fs_bigLITTLE.py7
-rw-r--r--configs/example/etrace_replay.py12
-rw-r--r--configs/example/fs.py17
-rw-r--r--configs/example/garnet_synth_traffic.py4
-rw-r--r--configs/example/hmctest.py7
-rw-r--r--configs/example/ruby_direct_test.py4
-rw-r--r--configs/example/ruby_gpu_random_test.py4
-rw-r--r--configs/example/ruby_mem_test.py4
-rw-r--r--configs/example/ruby_random_test.py4
-rw-r--r--configs/example/se.py15
-rw-r--r--configs/learning_gem5/part1/caches.py2
-rw-r--r--configs/learning_gem5/part1/two_level.py4
-rw-r--r--configs/ruby/Ruby.py2
-rw-r--r--configs/splash2/cluster.py2
-rw-r--r--configs/splash2/run.py2
21 files changed, 93 insertions, 62 deletions
diff --git a/configs/common/__init__.py b/configs/common/__init__.py
index e69de29bb..1829385b6 100644
--- a/configs/common/__init__.py
+++ b/configs/common/__init__.py
@@ -0,0 +1,36 @@
+# Copyright (c) 2016 ARM Limited
+# All rights reserved.
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder. You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Andreas Hansson
diff --git a/configs/dist/sw.py b/configs/dist/sw.py
index f21d2c576..b2476e2c2 100644
--- a/configs/dist/sw.py
+++ b/configs/dist/sw.py
@@ -37,10 +37,10 @@ from m5.defines import buildEnv
from m5.objects import *
from m5.util import addToPath, fatal
-addToPath('../common')
+addToPath('../')
-import Simulation
-import Options
+from common import Simulation
+from common import Options
def build_switch(options):
# instantiate an EtherSwitch
diff --git a/configs/dram/lat_mem_rd.py b/configs/dram/lat_mem_rd.py
index 374f1d4be..d4015a522 100644
--- a/configs/dram/lat_mem_rd.py
+++ b/configs/dram/lat_mem_rd.py
@@ -44,8 +44,8 @@ from m5.objects import *
from m5.util import addToPath
from m5.internal.stats import periodicStatDump
-addToPath('../common')
-import MemConfig
+addToPath('../')
+from common import MemConfig
addToPath('../../util')
import protolib
@@ -258,7 +258,7 @@ system.tgen.port = system.monitor.slave
# create the actual cache hierarchy, for now just go with something
# basic to explore some of the options
-from Caches import *
+from common.Caches import *
# a starting point for an L3 cache
class L3Cache(Cache):
diff --git a/configs/dram/sweep.py b/configs/dram/sweep.py
index 368e39488..2797abef0 100644
--- a/configs/dram/sweep.py
+++ b/configs/dram/sweep.py
@@ -42,9 +42,9 @@ from m5.objects import *
from m5.util import addToPath
from m5.internal.stats import periodicStatDump
-addToPath('../common')
+addToPath('../')
-import MemConfig
+from common import MemConfig
# this script is helpful to sweep the efficiency of a specific memory
# controller configuration, by varying the number of banks accessed,
diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py
index 84fadee3f..b8ec149d5 100644
--- a/configs/example/apu_se.py
+++ b/configs/example/apu_se.py
@@ -43,13 +43,12 @@ from m5.objects import *
from m5.util import addToPath
addToPath('../')
-addToPath('../common')
from ruby import Ruby
-import Options
-import Simulation
-import GPUTLBOptions, GPUTLBConfig
+from common import Options
+from common import Simulation
+from common import GPUTLBOptions, GPUTLBConfig
########################## Script Options ########################
def setOption(parser, opt_str, value = 1):
diff --git a/configs/example/arm/devices.py b/configs/example/arm/devices.py
index 65892d9e6..815e94f0c 100644
--- a/configs/example/arm/devices.py
+++ b/configs/example/arm/devices.py
@@ -40,9 +40,9 @@
import m5
from m5.objects import *
-m5.util.addToPath('../../common')
-from Caches import *
-import CpuConfig
+m5.util.addToPath('../../')
+from common.Caches import *
+from common import CpuConfig
class L1I(L1_ICache):
hit_latency = 1
diff --git a/configs/example/arm/fs_bigLITTLE.py b/configs/example/arm/fs_bigLITTLE.py
index 80e0817eb..d1b1ee7ab 100644
--- a/configs/example/arm/fs_bigLITTLE.py
+++ b/configs/example/arm/fs_bigLITTLE.py
@@ -46,9 +46,10 @@ import sys
import m5
from m5.objects import *
-m5.util.addToPath("../../common")
-import SysPaths
-import CpuConfig
+m5.util.addToPath("../../")
+
+from common import SysPaths
+from common import CpuConfig
import devices
diff --git a/configs/example/etrace_replay.py b/configs/example/etrace_replay.py
index e39024f0f..0b0e37ffd 100644
--- a/configs/example/etrace_replay.py
+++ b/configs/example/etrace_replay.py
@@ -41,13 +41,13 @@ import optparse
from m5.util import addToPath, fatal
-addToPath('../common')
+addToPath('../')
-import Options
-import Simulation
-import CacheConfig
-import MemConfig
-from Caches import *
+from common import Options
+from common import Simulation
+from common import CacheConfig
+from common import MemConfig
+from common.Caches import *
parser = optparse.OptionParser()
Options.addCommonOptions(parser)
diff --git a/configs/example/fs.py b/configs/example/fs.py
index 13a8b0cf9..adc67e44c 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -50,18 +50,17 @@ from m5.objects import *
from m5.util import addToPath, fatal
addToPath('../')
-addToPath('../common')
from ruby import Ruby
-from FSConfig import *
-from SysPaths import *
-from Benchmarks import *
-import Simulation
-import CacheConfig
-import MemConfig
-from Caches import *
-import Options
+from common.FSConfig import *
+from common.SysPaths import *
+from common.Benchmarks import *
+from common import Simulation
+from common import CacheConfig
+from common import MemConfig
+from common.Caches import *
+from common import Options
# Check if KVM support has been enabled, we might need to do VM
diff --git a/configs/example/garnet_synth_traffic.py b/configs/example/garnet_synth_traffic.py
index f11022006..16617486d 100644
--- a/configs/example/garnet_synth_traffic.py
+++ b/configs/example/garnet_synth_traffic.py
@@ -31,10 +31,10 @@ from m5.objects import *
from m5.defines import buildEnv
from m5.util import addToPath
import os, optparse, sys
-addToPath('../common')
+
addToPath('../')
-import Options
+from common import Options
from ruby import Ruby
# Get paths we might need. It's expected this file is in m5/configs/example.
diff --git a/configs/example/hmctest.py b/configs/example/hmctest.py
index bd6ca24d1..6e1ad457b 100644
--- a/configs/example/hmctest.py
+++ b/configs/example/hmctest.py
@@ -6,9 +6,10 @@ import m5
from m5.objects import *
from m5.util import addToPath
-addToPath('../common')
-import MemConfig
-import HMC
+addToPath('../')
+
+from common import MemConfig
+from common import HMC
parser = optparse.OptionParser()
diff --git a/configs/example/ruby_direct_test.py b/configs/example/ruby_direct_test.py
index 128a7889a..1c02e6e55 100644
--- a/configs/example/ruby_direct_test.py
+++ b/configs/example/ruby_direct_test.py
@@ -33,10 +33,10 @@ from m5.objects import *
from m5.defines import buildEnv
from m5.util import addToPath
import os, optparse, sys
-addToPath('../common')
+
addToPath('../')
-import Options
+from common import Options
from ruby import Ruby
# Get paths we might need. It's expected this file is in m5/configs/example.
diff --git a/configs/example/ruby_gpu_random_test.py b/configs/example/ruby_gpu_random_test.py
index 9af446799..08eac583a 100644
--- a/configs/example/ruby_gpu_random_test.py
+++ b/configs/example/ruby_gpu_random_test.py
@@ -38,10 +38,10 @@ from m5.objects import *
from m5.defines import buildEnv
from m5.util import addToPath
import os, optparse, sys
-addToPath('../common')
+
addToPath('../')
-import Options
+from common import Options
from ruby import Ruby
# Get paths we might need.
diff --git a/configs/example/ruby_mem_test.py b/configs/example/ruby_mem_test.py
index 1958c139d..3b6c5f110 100644
--- a/configs/example/ruby_mem_test.py
+++ b/configs/example/ruby_mem_test.py
@@ -33,10 +33,10 @@ from m5.objects import *
from m5.defines import buildEnv
from m5.util import addToPath
import os, optparse, sys
-addToPath('../common')
+
addToPath('../')
-import Options
+from common import Options
from ruby import Ruby
# Get paths we might need. It's expected this file is in m5/configs/example.
diff --git a/configs/example/ruby_random_test.py b/configs/example/ruby_random_test.py
index a0dca297e..ce898cd81 100644
--- a/configs/example/ruby_random_test.py
+++ b/configs/example/ruby_random_test.py
@@ -33,10 +33,10 @@ from m5.objects import *
from m5.defines import buildEnv
from m5.util import addToPath
import os, optparse, sys
-addToPath('../common')
+
addToPath('../')
-import Options
+from common import Options
from ruby import Ruby
# Get paths we might need. It's expected this file is in m5/configs/example.
diff --git a/configs/example/se.py b/configs/example/se.py
index cfc82e83a..c48b99eb4 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -52,17 +52,16 @@ from m5.objects import *
from m5.util import addToPath, fatal
addToPath('../')
-addToPath('../common')
from ruby import Ruby
-import Options
-import Simulation
-import CacheConfig
-import CpuConfig
-import MemConfig
-from Caches import *
-from cpu2000 import *
+from common import Options
+from common import Simulation
+from common import CacheConfig
+from common import CpuConfig
+from common import MemConfig
+from common.Caches import *
+from common.cpu2000 import *
# Check if KVM support has been enabled, we might need to do VM
# configuration if that's the case.
diff --git a/configs/learning_gem5/part1/caches.py b/configs/learning_gem5/part1/caches.py
index fbdd1bf3c..87256e5d0 100644
--- a/configs/learning_gem5/part1/caches.py
+++ b/configs/learning_gem5/part1/caches.py
@@ -36,7 +36,7 @@ line options from each individual class.
from m5.objects import Cache
-import SimpleOpts
+from common import SimpleOpts
# Some specific options for caches
# For all options see src/mem/cache/BaseCache.py
diff --git a/configs/learning_gem5/part1/two_level.py b/configs/learning_gem5/part1/two_level.py
index de012b30e..878baa312 100644
--- a/configs/learning_gem5/part1/two_level.py
+++ b/configs/learning_gem5/part1/two_level.py
@@ -46,13 +46,13 @@ import m5
from m5.objects import *
# Add the common scripts to our path
-m5.util.addToPath('../../common')
+m5.util.addToPath('../../')
# import the caches which we made
from caches import *
# import the SimpleOpts module
-import SimpleOpts
+from common import SimpleOpts
# Set the usage message to display
SimpleOpts.set_usage("usage: %prog [options] <binary to execute>")
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py
index a82f6dc5c..50b5ba9af 100644
--- a/configs/ruby/Ruby.py
+++ b/configs/ruby/Ruby.py
@@ -45,7 +45,7 @@ from m5.objects import *
from m5.defines import buildEnv
from m5.util import addToPath, fatal
-import MemConfig
+from common import MemConfig
from topologies import *
from network import Network
diff --git a/configs/splash2/cluster.py b/configs/splash2/cluster.py
index 5991e7428..a2abc7e48 100644
--- a/configs/splash2/cluster.py
+++ b/configs/splash2/cluster.py
@@ -37,8 +37,6 @@ import sys
import m5
from m5.objects import *
-m5.util.addToPath('../common')
-
# --------------------
# Define Command Line Options
# ====================
diff --git a/configs/splash2/run.py b/configs/splash2/run.py
index bf7d1331e..d6427b7f5 100644
--- a/configs/splash2/run.py
+++ b/configs/splash2/run.py
@@ -36,8 +36,6 @@ import sys
import m5
from m5.objects import *
-m5.util.addToPath('../common')
-
# --------------------
# Define Command Line Options
# ====================