# hanle branch predictors instead of memory controllers / CPUs
from __future__ import print_function
+from __future__ import absolute_import
from m5 import fatal
import m5.objects
# Authors: Ali Saidi
from __future__ import print_function
+from __future__ import absolute_import
-from SysPaths import script, disk, binary
+from .SysPaths import script, disk, binary
from os import environ as env
from m5.defines import buildEnv
#
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):
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 = \
#
# Authors: Lisa Hsu
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.defines import buildEnv
from m5.objects import *
# Authors: Andreas Sandberg
from __future__ import print_function
+from __future__ import absolute_import
from m5 import fatal
import m5.objects
from importlib import import_module
for package in [ "generic", buildEnv['TARGET_ISA']]:
try:
- package = import_module(".cores." + package, package=__package__)
+ package = import_module(".cores." + package,
+ package=__name__.rpartition('.')[0])
except ImportError:
# No timing models for this ISA
continue
# Authors: Kevin Lim
from __future__ import print_function
+from __future__ import absolute_import
from m5.objects import *
-from Benchmarks import *
from m5.util import *
-from common import PlatformConfig
+from .Benchmarks import *
+from . import PlatformConfig
# Populate to reflect supported os types per target ISA
os_types = { 'alpha' : [ 'linux' ],
# Authors: Lisa Hsu
from __future__ import print_function
+from __future__ import absolute_import
# Configure the TLB hierarchy
# Places which would probably need to be modified if you
#
# Authors: Myrto Papadopoulou
+from __future__ import print_function
+from __future__ import absolute_import
+
def tlb_options(parser):
#===================================================================
# 2 Crossbars are connected to only local vaults. From other 2 crossbar, a
# request can be forwarded to any other vault.
+from __future__ import print_function
+from __future__ import absolute_import
+
import argparse
import m5
# Andreas Hansson
from __future__ import print_function
+from __future__ import absolute_import
import m5.objects
import inspect
import sys
-import HMC
from textwrap import TextWrapper
+from . import HMC
# Dictionary of mapping names of real memory controller models to
# classes.
#
# Authors: Lisa Hsu
+from __future__ import print_function
+from __future__ import absolute_import
+
import m5
from m5.defines import buildEnv
from m5.objects import *
-from common.Benchmarks import *
-from common import CpuConfig
-from common import BPConfig
-from common import MemConfig
-from common import PlatformConfig
+from .Benchmarks import *
+from . import CpuConfig
+from . import BPConfig
+from . import MemConfig
+from . import PlatformConfig
def _listCpuTypes(option, opt, value, parser):
CpuConfig.print_cpu_list()
help="Redirect stderr to a file.")
def addFSOptions(parser):
- from FSConfig import os_types
+ from .FSConfig import os_types
# Simulation options
parser.add_option("--timesync", action="store_true",
# Pierre-Yves Peneau
from __future__ import print_function
+from __future__ import absolute_import
import m5.objects
import inspect
#
# Authors: Jason Power
+from __future__ import print_function
+from __future__ import absolute_import
+
""" Options wrapper for simple gem5 configuration scripts
This module wraps the optparse class so that we can register options
# Authors: Lisa Hsu
from __future__ import print_function
+from __future__ import absolute_import
import sys
from os import getcwd
from os.path import join as joinpath
-from common import CpuConfig
-from common import BPConfig
-from common import MemConfig
+from . import CpuConfig
+from . import BPConfig
+from . import MemConfig
import m5
from m5.defines import buildEnv
#
# Authors: Ali Saidi
+from __future__ import print_function
+from __future__ import absolute_import
from six import string_types
import os, sys
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors: Andreas Hansson
+
+from __future__ import print_function
+from __future__ import absolute_import
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors: Andreas Sandberg
+
+from __future__ import print_function
+from __future__ import absolute_import
"""
from __future__ import print_function
+from __future__ import absolute_import
from m5.objects import *
#
# Authors: Ron Dreslinski
+from __future__ import print_function
+from __future__ import absolute_import
from m5.objects import *
#
# Authors: Andreas Sandberg
+from __future__ import print_function
+from __future__ import absolute_import
+
from pkgutil import iter_modules
from importlib import import_module
for c in _cpu_modules:
try:
- import_module("." + c, package=__package__)
+ import_module("." + c, package=__name__)
except NameError:
# Failed to import a CPU model due to a missing
# dependency. This typically happens if gem5 has been compiled
# Anastasiia Butko
# Louisa Bessad
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.objects import *
#-----------------------------------------------------------------------
# Anastasiia Butko
# Louisa Bessad
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.objects import *
#-----------------------------------------------------------------------
# Authors: Nathan Binkert
from __future__ import print_function
+from __future__ import absolute_import
import os
import sys
# Authors: Andreas Hansson
from __future__ import print_function
+from __future__ import absolute_import
import gzip
import optparse
# Andreas Hansson
from __future__ import print_function
+from __future__ import absolute_import
import argparse
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
# Authors: Andreas Hansson
from __future__ import print_function
+from __future__ import absolute_import
import math
import optparse
# Authors: Sooraj Puthoor
from __future__ import print_function
+from __future__ import absolute_import
import optparse, os, re
import math
# System components used by the bigLITTLE.py configuration script
+from __future__ import print_function
+from __future__ import absolute_import
+
import m5
from m5.objects import *
m5.util.addToPath('../../')
# This configuration file extends the example ARM big.LITTLE(tm)
# configuration to enabe dist-gem5 siulations of big.LITTLE systems.
+from __future__ import print_function
+from __future__ import absolute_import
+
import argparse
import os
from __future__ import print_function
+from __future__ import absolute_import
import argparse
import os
# with example power models.
from __future__ import print_function
+from __future__ import absolute_import
import argparse
import os
"""
from __future__ import print_function
+from __future__ import absolute_import
import os
import m5
"""
from __future__ import print_function
+from __future__ import absolute_import
import os
import m5
# Basic elastic traces replay script that configures a Trace CPU
from __future__ import print_function
+from __future__ import absolute_import
import optparse
# Brad Beckmann
from __future__ import print_function
+from __future__ import absolute_import
import optparse
import sys
# Author: Tushar Krishna
from __future__ import print_function
+from __future__ import absolute_import
import m5
from m5.objects import *
#
# Author: Éder F. Zulian
+from __future__ import print_function
+from __future__ import absolute_import
+
import sys
import argparse
+
from __future__ import print_function
+from __future__ import absolute_import
import sys
import argparse
# Andreas Hansson
from __future__ import print_function
+from __future__ import absolute_import
import optparse
import random
# Andreas Hansson
from __future__ import print_function
+from __future__ import absolute_import
import optparse
import random
# debugging.
from __future__ import print_function
+from __future__ import absolute_import
import argparse
import ConfigParser
# Brad Beckmann
from __future__ import print_function
+from __future__ import absolute_import
import m5
from m5.objects import *
# Authors: Brad Beckmann
from __future__ import print_function
+from __future__ import absolute_import
import m5
from m5.objects import *
# Brad Beckmann
from __future__ import print_function
+from __future__ import absolute_import
import m5
from m5.objects import *
# Brad Beckmann
from __future__ import print_function
+from __future__ import absolute_import
import m5
from m5.objects import *
# "m5 test.py"
from __future__ import print_function
+from __future__ import absolute_import
import optparse
import sys
gem5 configuration script. It uses the SimpleOpts wrapper to set up command
line options from each individual class.
"""
+
+from __future__ import print_function
+from __future__ import absolute_import
+
import m5
from m5.objects import Cache
"""
from __future__ import print_function
+from __future__ import absolute_import
+
# import the m5 (gem5) library created when gem5 is built
import m5
"""
from __future__ import print_function
+from __future__ import absolute_import
# import the m5 (gem5) library created when gem5 is built
import m5
"""
from __future__ import print_function
+from __future__ import absolute_import
# import the m5 (gem5) library created when gem5 is built
import m5
"""
from __future__ import print_function
+from __future__ import absolute_import
# import the m5 (gem5) library created when gem5 is built
import m5
"""
from __future__ import print_function
+from __future__ import absolute_import
# import the m5 (gem5) library created when gem5 is built
import m5
"""
from __future__ import print_function
+from __future__ import absolute_import
# import the m5 (gem5) library created when gem5 is built
import m5
"""
+from __future__ import print_function
+from __future__ import absolute_import
+
import math
from m5.defines import buildEnv
"""
+from __future__ import print_function
+from __future__ import absolute_import
+
import math
from m5.defines import buildEnv
"""
from __future__ import print_function
+from __future__ import absolute_import
# import the m5 (gem5) library created when gem5 is built
import m5
# import all of the SimObjects
from m5.objects import *
-from test_caches import TestCacheSystem
+from .test_caches import TestCacheSystem
# create the system we are going to simulate
system = System()
"""
from __future__ import print_function
+from __future__ import absolute_import
# import the m5 (gem5) library created when gem5 is built
import m5
# You can import ruby_caches_MI_example to use the MI_example protocol instead
# of the MSI protocol
-from msi_caches import MyCacheSystem
+from .msi_caches import MyCacheSystem
# create the system we are going to simulate
system = System()
"""
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.defines import buildEnv
from m5.util import fatal
from m5.objects import *
-from msi_caches import L1Cache, DirController, MyNetwork
+from .msi_caches import L1Cache, DirController, MyNetwork
class TestCacheSystem(RubySystem):
#
# Authors: Tushar Krishna
+from __future__ import print_function
+from __future__ import absolute_import
+
import math
import m5
from m5.objects import *
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors: Andreas Hansson
+
+from __future__ import print_function
+from __future__ import absolute_import
from m5.objects import *
from m5.defines import buildEnv
from m5.util import addToPath
-from Ruby import create_topology
-from Ruby import send_evicts
+from .Ruby import create_topology
+from .Ruby import send_evicts
addToPath('../')
import m5
from m5.objects import *
from m5.defines import buildEnv
-from Ruby import create_topology, create_directories
-from Ruby import send_evicts
+from .Ruby import create_topology, create_directories
+from .Ruby import send_evicts
#
# Declare caches used by the protocol
help="Recycle latency for ruby controller input buffers")
protocol = buildEnv['PROTOCOL']
- exec "import %s" % protocol
+ exec("from . import %s" % protocol)
eval("%s.define_options(parser)" % protocol)
Network.define_options(parser)
found in configs/topologies/BaseTopology.py
This is a wrapper for the legacy topologies.
"""
- exec "import topologies.%s as Topo" % options.topology
+ exec("import topologies.%s as Topo" % options.topology)
topology = eval("Topo.%s(controllers)" % options.topology)
return topology
ruby.network = network
protocol = buildEnv['PROTOCOL']
- exec "import %s" % protocol
+ exec("from . import %s" % protocol)
try:
(cpu_sequencers, dir_cntrls, topology) = \
eval("%s.create_system(options, full_system, system, dma_ports,\
# "m5 test.py"
from __future__ import print_function
+from __future__ import absolute_import
import os
import optparse
#
from __future__ import print_function
+from __future__ import absolute_import
import os
import optparse
#
# Authors: Jason Power
+from __future__ import print_function
+from __future__ import absolute_import
+
import m5
class BaseTopology(object):
#
# Authors: Jason Power
+from __future__ import print_function
+from __future__ import absolute_import
-from BaseTopology import BaseTopology
+from .BaseTopology import BaseTopology
class Cluster(BaseTopology):
""" A cluster is a group of nodes which are all one hop from eachother
#
# Authors: Steve Reinhardt
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.params import *
from m5.objects import *
-from BaseTopology import SimpleTopology
+from .BaseTopology import SimpleTopology
class Crossbar(SimpleTopology):
description='Crossbar'
#
# Authors: Tushar Krishna
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.params import *
from m5.objects import *
-from BaseTopology import SimpleTopology
+from .BaseTopology import SimpleTopology
class CrossbarGarnet(SimpleTopology):
description='CrossbarGarnet'
#
# Authors: Brad Beckmann
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.params import *
from m5.objects import *
-from BaseTopology import SimpleTopology
+from .BaseTopology import SimpleTopology
# Creates a Mesh topology with 4 directories, one at each corner.
# One L1 (and L2, depending on the protocol) are connected to each router.
# Authors: Brad Beckmann
# Tushar Krishna
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.params import *
from m5.objects import *
-from BaseTopology import SimpleTopology
+from .BaseTopology import SimpleTopology
# Creates a generic Mesh assuming an equal number of cache
# and directory controllers.
#
# Authors: Brad Beckmann
# Tushar Krishna
+from __future__ import print_function
+from __future__ import absolute_import
from m5.params import *
from m5.objects import *
-from BaseTopology import SimpleTopology
+from .BaseTopology import SimpleTopology
# Creates a generic Mesh assuming an equal number of cache
# and directory controllers.
# Authors: Brad Beckmann
# Tushar Krishna
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.params import *
from m5.objects import *
-from BaseTopology import SimpleTopology
+from .BaseTopology import SimpleTopology
class Pt2Pt(SimpleTopology):
description='Pt2Pt'
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors: Andreas Hansson
+
+from __future__ import print_function
+from __future__ import absolute_import