+# 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
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
from m5.util import addToPath
from m5.internal.stats import periodicStatDump
-addToPath('../common')
-import MemConfig
+addToPath('../')
+from common import MemConfig
addToPath('../../util')
import protolib
# 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):
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,
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):
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
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
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)
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
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.
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()
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.
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.
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.
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.
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.
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
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>")
from m5.defines import buildEnv
from m5.util import addToPath, fatal
-import MemConfig
+from common import MemConfig
from topologies import *
from network import Network
import m5
from m5.objects import *
-m5.util.addToPath('../common')
-
# --------------------
# Define Command Line Options
# ====================
import m5
from m5.objects import *
-m5.util.addToPath('../common')
-
# --------------------
# Define Command Line Options
# ====================
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):
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.
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()
import os
import m5
-m5.util.addToPath('../configs/common')
_exit_normal = (
"target called exit()",
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)
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):
# 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.
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
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)
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
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) ]
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
import m5
from m5.objects import *
-m5.util.addToPath('../configs/common')
-
import ruby_config
ruby_memory = ruby_config.generate("TwoLevel_SplitL1UnifiedL2.rb", 1)
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
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()
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,
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,
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,
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',
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',
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',
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)
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()
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)
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.
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')
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'))
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):