From: Andreas Hansson Date: Fri, 14 Oct 2016 14:37:38 +0000 (-0400) Subject: config: Make configs/common a Python package X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f5262eb67f0539ab6c07d56eeae1b72f6b6b509;p=gem5.git config: Make configs/common a Python package Continue along the same line as the recent patch that made the Ruby-related config scripts Python packages and make also the configs/common directory a package. All affected config scripts are updated (hopefully). Note that this change makes it apparent that the current organisation and naming of the config directory and its subdirectories is rather chaotic. We mix scripts that are directly invoked with scripts that merely contain convenience functions. While it is not addressed in this patch we should follow up with a re-organisation of the config structure, and renaming of some of the packages. --- 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] ") 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 # ==================== diff --git a/tests/configs/alpha_generic.py b/tests/configs/alpha_generic.py index a4ebba54d..a5be4f205 100644 --- a/tests/configs/alpha_generic.py +++ b/tests/configs/alpha_generic.py @@ -39,9 +39,9 @@ from abc import ABCMeta, abstractmethod import m5 from m5.objects import * from m5.proxy import * -m5.util.addToPath('../configs/common') -import FSConfig -from Caches import * +m5.util.addToPath('../configs/') +from common import FSConfig +from common.Caches import * from base_config import * class LinuxAlphaSystemBuilder(object): diff --git a/tests/configs/arm_generic.py b/tests/configs/arm_generic.py index 04823973d..12a876a48 100644 --- a/tests/configs/arm_generic.py +++ b/tests/configs/arm_generic.py @@ -39,12 +39,12 @@ from abc import ABCMeta, abstractmethod import m5 from m5.objects import * from m5.proxy import * -m5.util.addToPath('../configs/common') -import FSConfig -from Caches import * +m5.util.addToPath('../configs/') +from common import FSConfig +from common.Caches import * from base_config import * -from O3_ARM_v7a import * -from Benchmarks import SysConfig +from common.O3_ARM_v7a import * +from common.Benchmarks import SysConfig class ArmSESystemUniprocessor(BaseSESystemUniprocessor): """Syscall-emulation builder for ARM uniprocessor systems. diff --git a/tests/configs/base_config.py b/tests/configs/base_config.py index 860b84fa4..6af6408fe 100644 --- a/tests/configs/base_config.py +++ b/tests/configs/base_config.py @@ -40,9 +40,9 @@ from abc import ABCMeta, abstractmethod import m5 from m5.objects import * from m5.proxy import * -m5.util.addToPath('../configs/common') -import FSConfig -from Caches import * +m5.util.addToPath('../configs/') +from common import FSConfig +from common.Caches import * _have_kvm_support = 'BaseKvmCPU' in globals() diff --git a/tests/configs/checkpoint.py b/tests/configs/checkpoint.py index 5ca3d07b7..bea481be5 100644 --- a/tests/configs/checkpoint.py +++ b/tests/configs/checkpoint.py @@ -40,7 +40,6 @@ import sys import os import m5 -m5.util.addToPath('../configs/common') _exit_normal = ( "target called exit()", diff --git a/tests/configs/gpu-randomtest-ruby.py b/tests/configs/gpu-randomtest-ruby.py index 0bc386973..d0a891880 100644 --- a/tests/configs/gpu-randomtest-ruby.py +++ b/tests/configs/gpu-randomtest-ruby.py @@ -39,11 +39,10 @@ from m5.defines import buildEnv from m5.util import addToPath import os, optparse, sys -m5.util.addToPath('../configs/common') m5.util.addToPath('../configs/') from ruby import Ruby -import Options +from common import Options parser = optparse.OptionParser() Options.addCommonOptions(parser) diff --git a/tests/configs/gpu-ruby.py b/tests/configs/gpu-ruby.py index b01914780..6b20c31e8 100644 --- a/tests/configs/gpu-ruby.py +++ b/tests/configs/gpu-ruby.py @@ -39,12 +39,11 @@ from m5.defines import buildEnv from m5.util import addToPath import os, optparse, sys, math, glob -m5.util.addToPath('../configs/common') m5.util.addToPath('../configs/') from ruby import Ruby -import Options -import GPUTLBOptions, GPUTLBConfig +from common import Options +from common import GPUTLBOptions, GPUTLBConfig ########################## Script Options ######################## def setOption(parser, opt_str, value = 1): diff --git a/tests/configs/learning-gem5-p1-two-level.py b/tests/configs/learning-gem5-p1-two-level.py index 8101de318..c0a1e4662 100644 --- a/tests/configs/learning-gem5-p1-two-level.py +++ b/tests/configs/learning-gem5-p1-two-level.py @@ -45,7 +45,7 @@ def run_test(root): # Add paths that we need m5.util.addToPath('../configs/learning_gem5/part1') - m5.util.addToPath('../configs/common') + m5.util.addToPath('../configs/') # The path to this script is the only parameter. Delete it so we can # execute the script that we want to execute. diff --git a/tests/configs/memtest-filter.py b/tests/configs/memtest-filter.py index 34ac75f00..90ad0421c 100644 --- a/tests/configs/memtest-filter.py +++ b/tests/configs/memtest-filter.py @@ -28,8 +28,8 @@ import m5 from m5.objects import * -m5.util.addToPath('../configs/common') -from Caches import * +m5.util.addToPath('../configs/') +from common.Caches import * #MAX CORES IS 8 with the fals sharing method nb_cores = 8 diff --git a/tests/configs/memtest-ruby.py b/tests/configs/memtest-ruby.py index 1fac02a14..8b92af45c 100644 --- a/tests/configs/memtest-ruby.py +++ b/tests/configs/memtest-ruby.py @@ -33,11 +33,10 @@ from m5.defines import buildEnv from m5.util import addToPath import os, optparse, sys -m5.util.addToPath('../configs/common') m5.util.addToPath('../configs/') from ruby import Ruby -import Options +from common import Options parser = optparse.OptionParser() Options.addCommonOptions(parser) diff --git a/tests/configs/memtest.py b/tests/configs/memtest.py index 5bbfeb774..db7a5ef22 100644 --- a/tests/configs/memtest.py +++ b/tests/configs/memtest.py @@ -28,8 +28,8 @@ import m5 from m5.objects import * -m5.util.addToPath('../configs/common') -from Caches import * +m5.util.addToPath('../configs/') +from common.Caches import * #MAX CORES IS 8 with the fals sharing method nb_cores = 8 diff --git a/tests/configs/o3-timing-mp-ruby.py b/tests/configs/o3-timing-mp-ruby.py index 74b207b3e..9248b08fb 100644 --- a/tests/configs/o3-timing-mp-ruby.py +++ b/tests/configs/o3-timing-mp-ruby.py @@ -28,7 +28,6 @@ import m5 from m5.objects import * -m5.util.addToPath('../configs/common') nb_cores = 4 cpus = [ DerivO3CPU(cpu_id=i) for i in xrange(nb_cores) ] diff --git a/tests/configs/o3-timing-mt.py b/tests/configs/o3-timing-mt.py index 5c6ca4800..3802941ab 100644 --- a/tests/configs/o3-timing-mt.py +++ b/tests/configs/o3-timing-mt.py @@ -42,7 +42,7 @@ from m5.objects import * from m5.defines import buildEnv from base_config import * from arm_generic import * -from O3_ARM_v7a import O3_ARM_v7a_3 +from common.O3_ARM_v7a import O3_ARM_v7a_3 # If we are running ARM regressions, use a more sensible CPU # configuration. This makes the results more meaningful, and also diff --git a/tests/configs/o3-timing-ruby.py b/tests/configs/o3-timing-ruby.py index 787ae0bad..81914957b 100644 --- a/tests/configs/o3-timing-ruby.py +++ b/tests/configs/o3-timing-ruby.py @@ -28,8 +28,6 @@ import m5 from m5.objects import * -m5.util.addToPath('../configs/common') - import ruby_config ruby_memory = ruby_config.generate("TwoLevel_SplitL1UnifiedL2.rb", 1) diff --git a/tests/configs/o3-timing.py b/tests/configs/o3-timing.py index 7aa4793ac..c573277d1 100644 --- a/tests/configs/o3-timing.py +++ b/tests/configs/o3-timing.py @@ -42,7 +42,7 @@ from m5.objects import * from m5.defines import buildEnv from base_config import * from arm_generic import * -from O3_ARM_v7a import O3_ARM_v7a_3 +from common.O3_ARM_v7a import O3_ARM_v7a_3 # If we are running ARM regressions, use a more sensible CPU # configuration. This makes the results more meaningful, and also diff --git a/tests/configs/pc-simple-timing-ruby.py b/tests/configs/pc-simple-timing-ruby.py index 32964a875..19c38dc32 100644 --- a/tests/configs/pc-simple-timing-ruby.py +++ b/tests/configs/pc-simple-timing-ruby.py @@ -28,13 +28,11 @@ import m5, os, optparse, sys from m5.objects import * -m5.util.addToPath('../configs/common') -from Benchmarks import SysConfig -import FSConfig - m5.util.addToPath('../configs/') +from common.Benchmarks import SysConfig +from common import FSConfig from ruby import Ruby -import Options +from common import Options # Add the ruby specific and protocol specific options parser = optparse.OptionParser() diff --git a/tests/configs/realview-o3-checker.py b/tests/configs/realview-o3-checker.py index aa9f53dd1..a2f1c7134 100644 --- a/tests/configs/realview-o3-checker.py +++ b/tests/configs/realview-o3-checker.py @@ -37,7 +37,7 @@ from m5.objects import * from arm_generic import * -from O3_ARM_v7a import O3_ARM_v7a_3 +from common.O3_ARM_v7a import O3_ARM_v7a_3 root = LinuxArmFSSystemUniprocessor(mem_mode='timing', mem_class=DDR3_1600_x64, diff --git a/tests/configs/realview-o3-dual.py b/tests/configs/realview-o3-dual.py index 1df536f89..9dff95ac7 100644 --- a/tests/configs/realview-o3-dual.py +++ b/tests/configs/realview-o3-dual.py @@ -37,7 +37,7 @@ from m5.objects import * from arm_generic import * -from O3_ARM_v7a import O3_ARM_v7a_3 +from common.O3_ARM_v7a import O3_ARM_v7a_3 root = LinuxArmFSSystem(mem_mode='timing', mem_class=DDR3_1600_x64, diff --git a/tests/configs/realview-o3.py b/tests/configs/realview-o3.py index 81b52d97c..ba4ddde52 100644 --- a/tests/configs/realview-o3.py +++ b/tests/configs/realview-o3.py @@ -37,7 +37,7 @@ from m5.objects import * from arm_generic import * -from O3_ARM_v7a import O3_ARM_v7a_3 +from common.O3_ARM_v7a import O3_ARM_v7a_3 root = LinuxArmFSSystemUniprocessor(mem_mode='timing', mem_class=DDR3_1600_x64, diff --git a/tests/configs/realview64-o3-checker.py b/tests/configs/realview64-o3-checker.py index 0cd323b8a..904f0b718 100644 --- a/tests/configs/realview64-o3-checker.py +++ b/tests/configs/realview64-o3-checker.py @@ -37,7 +37,7 @@ from m5.objects import * from arm_generic import * -from O3_ARM_v7a import O3_ARM_v7a_3 +from common.O3_ARM_v7a import O3_ARM_v7a_3 root = LinuxArmFSSystemUniprocessor(machine_type='VExpress_EMM64', mem_mode='timing', diff --git a/tests/configs/realview64-o3-dual.py b/tests/configs/realview64-o3-dual.py index 55f923e96..bdfaac0dc 100644 --- a/tests/configs/realview64-o3-dual.py +++ b/tests/configs/realview64-o3-dual.py @@ -37,7 +37,7 @@ from m5.objects import * from arm_generic import * -from O3_ARM_v7a import O3_ARM_v7a_3 +from common.O3_ARM_v7a import O3_ARM_v7a_3 root = LinuxArmFSSystem(machine_type='VExpress_EMM64', mem_mode='timing', diff --git a/tests/configs/realview64-o3.py b/tests/configs/realview64-o3.py index 97f97dd65..b54defa73 100644 --- a/tests/configs/realview64-o3.py +++ b/tests/configs/realview64-o3.py @@ -37,7 +37,7 @@ from m5.objects import * from arm_generic import * -from O3_ARM_v7a import O3_ARM_v7a_3 +from common.O3_ARM_v7a import O3_ARM_v7a_3 root = LinuxArmFSSystemUniprocessor(machine_type='VExpress_EMM64', mem_mode='timing', diff --git a/tests/configs/rubytest-ruby.py b/tests/configs/rubytest-ruby.py index 6e64785da..5445e8181 100644 --- a/tests/configs/rubytest-ruby.py +++ b/tests/configs/rubytest-ruby.py @@ -34,11 +34,10 @@ from m5.defines import buildEnv from m5.util import addToPath import os, optparse, sys -m5.util.addToPath('../configs/common') m5.util.addToPath('../configs/') from ruby import Ruby -import Options +from common import Options parser = optparse.OptionParser() Options.addCommonOptions(parser) diff --git a/tests/configs/simple-timing-mp-ruby.py b/tests/configs/simple-timing-mp-ruby.py index c7dd6cd87..897e05383 100644 --- a/tests/configs/simple-timing-mp-ruby.py +++ b/tests/configs/simple-timing-mp-ruby.py @@ -32,10 +32,9 @@ from m5.defines import buildEnv from m5.util import addToPath import os, optparse, sys -m5.util.addToPath('../configs/common') m5.util.addToPath('../configs/') -import Options +from common import Options from ruby import Ruby parser = optparse.OptionParser() diff --git a/tests/configs/simple-timing-ruby.py b/tests/configs/simple-timing-ruby.py index 2d2a9e4df..e76cd3963 100644 --- a/tests/configs/simple-timing-ruby.py +++ b/tests/configs/simple-timing-ruby.py @@ -32,11 +32,10 @@ from m5.defines import buildEnv from m5.util import addToPath import os, optparse, sys -m5.util.addToPath('../configs/common') m5.util.addToPath('../configs/') from ruby import Ruby -import Options +from common import Options parser = optparse.OptionParser() Options.addCommonOptions(parser) diff --git a/tests/configs/switcheroo.py b/tests/configs/switcheroo.py index 61145bbf6..56eafa613 100644 --- a/tests/configs/switcheroo.py +++ b/tests/configs/switcheroo.py @@ -37,8 +37,8 @@ import m5 from m5.objects import * -m5.util.addToPath('../configs/common') -from Caches import * +m5.util.addToPath('../configs/') +from common.Caches import * class Sequential: """Sequential CPU switcher. diff --git a/tests/configs/t1000-simple-atomic.py b/tests/configs/t1000-simple-atomic.py index 209cb2813..0d971a054 100644 --- a/tests/configs/t1000-simple-atomic.py +++ b/tests/configs/t1000-simple-atomic.py @@ -28,8 +28,8 @@ import m5 from m5.objects import * -m5.util.addToPath('../configs/common') -import FSConfig +m5.util.addToPath('../configs/') +from common import FSConfig try: system = FSConfig.makeSparcSystem('atomic') diff --git a/tests/configs/twosys-tsunami-simple-atomic.py b/tests/configs/twosys-tsunami-simple-atomic.py index e84a06aaf..7d0768e53 100644 --- a/tests/configs/twosys-tsunami-simple-atomic.py +++ b/tests/configs/twosys-tsunami-simple-atomic.py @@ -28,9 +28,9 @@ import m5 from m5.objects import * -m5.util.addToPath('../configs/common') -from FSConfig import * -from Benchmarks import * +m5.util.addToPath('../configs/') +from common.FSConfig import * +from common.Benchmarks import * test_sys = makeLinuxAlphaSystem('atomic', SysConfig('netperf-stream-client.rcS')) diff --git a/tests/configs/x86_generic.py b/tests/configs/x86_generic.py index ad3ea31bf..53c046a58 100644 --- a/tests/configs/x86_generic.py +++ b/tests/configs/x86_generic.py @@ -39,10 +39,10 @@ from abc import ABCMeta, abstractmethod import m5 from m5.objects import * from m5.proxy import * -m5.util.addToPath('../configs/common') -from Benchmarks import SysConfig -import FSConfig -from Caches import * +m5.util.addToPath('../configs/') +from common.Benchmarks import SysConfig +from common import FSConfig +from common.Caches import * from base_config import * class LinuxX86SystemBuilder(object):