configs: Remove Python 2.7 glue code
Remove uses of six and from __future__ imports as they are no longer needed. Change-Id: I6e2f270557d7343bbad30c8e6d743e363c43715a Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39755 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from common.SysPaths import script, disk, binary
|
||||
from os import environ as env
|
||||
from m5.defines import buildEnv
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
# Configure the M5 cache hierarchy config in one place
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from common.Caches import *
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.defines import buildEnv
|
||||
from m5.objects import *
|
||||
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5 import fatal
|
||||
import m5.objects
|
||||
|
||||
|
||||
@@ -38,20 +38,12 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from m5.util import *
|
||||
from common.Benchmarks import *
|
||||
from common import ObjectList
|
||||
|
||||
if six.PY3:
|
||||
long = int
|
||||
|
||||
# Populate to reflect supported os types per target ISA
|
||||
os_types = { 'mips' : [ 'linux' ],
|
||||
'riscv' : [ 'linux' ], # TODO that's a lie
|
||||
@@ -228,11 +220,11 @@ def makeArmSystem(mem_mode, machine_type, num_cpus=1, mdesc=None,
|
||||
pci_devices.append(self.pci_ide)
|
||||
|
||||
self.mem_ranges = []
|
||||
size_remain = long(Addr(mdesc.mem()))
|
||||
size_remain = int(Addr(mdesc.mem()))
|
||||
for region in self.realview._mem_regions:
|
||||
if size_remain > long(region.size()):
|
||||
if size_remain > int(region.size()):
|
||||
self.mem_ranges.append(region)
|
||||
size_remain = size_remain - long(region.size())
|
||||
size_remain = size_remain - int(region.size())
|
||||
else:
|
||||
self.mem_ranges.append(AddrRange(region.start, size=size_remain))
|
||||
size_remain = 0
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from m5.util.convert import *
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Configure the TLB hierarchy
|
||||
# Places which would probably need to be modified if you
|
||||
# want a different hierarchy are specified by a <Modify here .. >'
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
def tlb_options(parser):
|
||||
|
||||
#===================================================================
|
||||
|
||||
@@ -119,9 +119,6 @@
|
||||
# 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
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5.objects
|
||||
from common import ObjectList
|
||||
from common import HMC
|
||||
|
||||
@@ -34,9 +34,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5.objects
|
||||
import inspect
|
||||
import sys
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5
|
||||
from m5.defines import buildEnv
|
||||
from m5.objects import *
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
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
|
||||
|
||||
@@ -37,10 +37,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import six
|
||||
import sys
|
||||
from os import getcwd
|
||||
from os.path import join as joinpath
|
||||
@@ -53,9 +49,6 @@ from m5.defines import buildEnv
|
||||
from m5.objects import *
|
||||
from m5.util import *
|
||||
|
||||
if six.PY3:
|
||||
long = int
|
||||
|
||||
addToPath('../common')
|
||||
|
||||
def getCPUClass(cpu_type):
|
||||
@@ -196,7 +189,7 @@ def findCptDir(options, cptdir, testsys):
|
||||
if match:
|
||||
cpts.append(match.group(1))
|
||||
|
||||
cpts.sort(key = lambda a: long(a))
|
||||
cpts.sort(key = lambda a: int(a))
|
||||
|
||||
cpt_num = options.checkpoint_restore
|
||||
if cpt_num > len(cpts):
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from six import string_types
|
||||
import os, sys
|
||||
|
||||
config_path = os.path.dirname(os.path.abspath(__file__))
|
||||
@@ -38,7 +34,7 @@ class PathSearchFunc(object):
|
||||
environment_variable = 'M5_PATH'
|
||||
|
||||
def __init__(self, subdirs, sys_paths=None):
|
||||
if isinstance(subdirs, string_types):
|
||||
if isinstance(subdirs, str):
|
||||
subdirs = [subdirs]
|
||||
self._subdir = os.path.join(*subdirs)
|
||||
if sys_paths:
|
||||
|
||||
@@ -33,6 +33,3 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
@@ -32,6 +32,3 @@
|
||||
# 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.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
@@ -42,9 +42,6 @@ at: http://www.arm.com/ResearchEnablement/SystemModeling
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.objects import *
|
||||
|
||||
# Simple function to allow a string of [01x_] to be converted into a
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.objects import *
|
||||
|
||||
# Simple ALU Instructions have a latency of 1
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from pkgutil import iter_modules
|
||||
from importlib import import_module
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.objects import *
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.objects import *
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import sys
|
||||
from os.path import basename, exists, join as joinpath, normpath
|
||||
|
||||
@@ -33,11 +33,7 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import gzip
|
||||
import six
|
||||
import optparse
|
||||
import os
|
||||
|
||||
@@ -53,9 +49,6 @@ from common import MemConfig
|
||||
addToPath('../../util')
|
||||
import protolib
|
||||
|
||||
if six.PY3:
|
||||
long = int
|
||||
|
||||
# this script is helpful to observe the memory latency for various
|
||||
# levels in a cache hierarchy, and various cache and memory
|
||||
# configurations, in essence replicating the lmbench lat_mem_rd thrash
|
||||
@@ -206,8 +199,8 @@ def create_trace(filename, max_addr, burst_size, itt):
|
||||
packet.size = int(burst_size)
|
||||
|
||||
for addr in addrs:
|
||||
packet.tick = long(tick)
|
||||
packet.addr = long(addr)
|
||||
packet.tick = int(tick)
|
||||
packet.addr = int(addr)
|
||||
protolib.encodeMessage(proto_out, packet)
|
||||
tick = tick + itt
|
||||
|
||||
@@ -218,7 +211,7 @@ print("Generating traces, please wait...")
|
||||
|
||||
nxt_range = 0
|
||||
nxt_state = 0
|
||||
period = long(itt * (max_range / burst_size))
|
||||
period = int(itt * (max_range / burst_size))
|
||||
|
||||
# now we create the states for each range
|
||||
for r in ranges:
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import argparse
|
||||
|
||||
import m5
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import math
|
||||
import optparse
|
||||
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import optparse, os, re, getpass
|
||||
import math
|
||||
import glob
|
||||
|
||||
@@ -35,9 +35,6 @@
|
||||
|
||||
# Basic elastic traces replay script that configures a Trace CPU
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import optparse
|
||||
|
||||
from m5.util import addToPath, fatal
|
||||
|
||||
@@ -39,9 +39,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import optparse
|
||||
import sys
|
||||
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
#
|
||||
# Author: Tushar Krishna
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from m5.defines import buildEnv
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
#
|
||||
# Author: Éder F. Zulian
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
import subprocess
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import optparse
|
||||
import random
|
||||
import sys
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import optparse
|
||||
import random
|
||||
import sys
|
||||
|
||||
@@ -45,23 +45,16 @@
|
||||
# between system construction and run control may allow better
|
||||
# debugging.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import argparse
|
||||
from six.moves import configparser
|
||||
import configparser
|
||||
import inspect
|
||||
import json
|
||||
import re
|
||||
import six
|
||||
import sys
|
||||
|
||||
import m5
|
||||
import m5.ticks as ticks
|
||||
|
||||
if six.PY3:
|
||||
long = int
|
||||
|
||||
sim_object_classes_by_name = {
|
||||
cls.__name__: cls for cls in list(m5.objects.__dict__.values())
|
||||
if inspect.isclass(cls) and issubclass(cls, m5.objects.SimObject) }
|
||||
@@ -92,13 +85,13 @@ def addr_range_parser(cls, flags, param):
|
||||
_param = param.split(':')
|
||||
(start, end) = _param[0:2]
|
||||
if len(_param) == 2:
|
||||
return m5.objects.AddrRange(start=long(start), end=long(end))
|
||||
return m5.objects.AddrRange(start=int(start), end=int(end))
|
||||
else:
|
||||
assert len(_param) > 2
|
||||
intlv_match = _param[2]
|
||||
masks = [ long(m) for m in _param[3:] ]
|
||||
return m5.objects.AddrRange(start=long(start), end=long(end),
|
||||
masks=masks, intlvMatch=long(intlv_match))
|
||||
masks = [ int(m) for m in _param[3:] ]
|
||||
return m5.objects.AddrRange(start=int(start), end=int(end),
|
||||
masks=masks, intlvMatch=int(intlv_match))
|
||||
|
||||
|
||||
def memory_bandwidth_parser(cls, flags, param):
|
||||
@@ -114,7 +107,7 @@ def memory_bandwidth_parser(cls, flags, param):
|
||||
param_parsers = {
|
||||
'Bool': simple_parser(),
|
||||
'ParamValue': no_parser,
|
||||
'NumericParamValue': simple_parser(cast=long),
|
||||
'NumericParamValue': simple_parser(cast=int),
|
||||
'TickParamValue': tick_parser(),
|
||||
'Frequency': tick_parser(cast=m5.objects.Latency),
|
||||
'Current': simple_parser(suffix='A'),
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from m5.defines import buildEnv
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from m5.defines import buildEnv
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from m5.defines import buildEnv
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from m5.defines import buildEnv
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
||||
import m5
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
#
|
||||
# "m5 test.py"
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import optparse
|
||||
import sys
|
||||
import os
|
||||
|
||||
@@ -32,9 +32,6 @@ 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
|
||||
|
||||
|
||||
@@ -35,10 +35,6 @@ IMPORTANT: If you modify this file, it's likely that the Learning gem5 book
|
||||
|
||||
"""
|
||||
|
||||
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
|
||||
|
||||
@@ -38,9 +38,6 @@ IMPORTANT: If you modify this file, it's likely that the Learning gem5 book
|
||||
|
||||
"""
|
||||
|
||||
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
|
||||
|
||||
@@ -34,9 +34,6 @@ IMPORTANT: If you modify this file, it's likely that the Learning gem5 book
|
||||
|
||||
"""
|
||||
|
||||
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
|
||||
|
||||
@@ -33,9 +33,6 @@ system. Since there are no events, this "simulation" should finish immediately
|
||||
|
||||
"""
|
||||
|
||||
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
|
||||
|
||||
@@ -31,9 +31,6 @@ World application. Adds a simple cache between the CPU and the membus.
|
||||
This config file assumes that the x86 ISA was built.
|
||||
"""
|
||||
|
||||
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
|
||||
|
||||
@@ -31,9 +31,6 @@ World application. Adds a simple memobj between the CPU and the membus.
|
||||
This config file assumes that the x86 ISA was built.
|
||||
"""
|
||||
|
||||
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
|
||||
|
||||
@@ -35,9 +35,6 @@ IMPORTANT: If you modify this file, it's likely that the Learning gem5 book
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import math
|
||||
|
||||
from m5.defines import buildEnv
|
||||
|
||||
@@ -37,9 +37,6 @@ IMPORTANT: If you modify this file, it's likely that the Learning gem5 book
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import math
|
||||
|
||||
from m5.defines import buildEnv
|
||||
|
||||
@@ -33,8 +33,6 @@ IMPORTANT: If you modify this file, it's likely that the Learning gem5 book
|
||||
also needs to be updated. For now, email Jason <jason@lowepower.com>
|
||||
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import the m5 (gem5) library created when gem5 is built
|
||||
import m5
|
||||
|
||||
@@ -36,8 +36,6 @@ IMPORTANT: If you modify this file, it's likely that the Learning gem5 book
|
||||
also needs to be updated. For now, email Jason <jason@lowepower.com>
|
||||
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import the m5 (gem5) library created when gem5 is built
|
||||
import m5
|
||||
|
||||
@@ -35,9 +35,6 @@ IMPORTANT: If you modify this file, it's likely that the Learning gem5 book
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.defines import buildEnv
|
||||
from m5.util import fatal
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import math
|
||||
import m5
|
||||
from m5.objects import *
|
||||
|
||||
@@ -32,6 +32,3 @@
|
||||
# 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.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
@@ -35,9 +35,6 @@
|
||||
#
|
||||
# Authors: Andreas Hansson
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import math
|
||||
import optparse
|
||||
|
||||
|
||||
@@ -35,9 +35,6 @@
|
||||
#
|
||||
# Authors: Andreas Hansson
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import math
|
||||
import optparse
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import six
|
||||
import math
|
||||
import m5
|
||||
from m5.objects import *
|
||||
@@ -44,9 +43,6 @@ addToPath('../')
|
||||
from topologies.Cluster import Cluster
|
||||
from topologies.Crossbar import Crossbar
|
||||
|
||||
if six.PY3:
|
||||
long = int
|
||||
|
||||
class CntrlBase:
|
||||
_seqs = 0
|
||||
@classmethod
|
||||
@@ -261,8 +257,8 @@ class TCC(RubyCache):
|
||||
self.dataArrayBanks = 256 / options.num_tccs #number of data banks
|
||||
self.tagArrayBanks = 256 / options.num_tccs #number of tag banks
|
||||
self.size.value = self.size.value / options.num_tccs
|
||||
if ((self.size.value / long(self.assoc)) < 128):
|
||||
self.size.value = long(128 * self.assoc)
|
||||
if ((self.size.value / int(self.assoc)) < 128):
|
||||
self.size.value = int(128 * self.assoc)
|
||||
self.start_index_bit = math.log(options.cacheline_size, 2) + \
|
||||
math.log(options.num_tccs, 2)
|
||||
self.replacement_policy = TreePLRURP()
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import math
|
||||
import m5
|
||||
from m5.objects import *
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
#
|
||||
# "m5 test.py"
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import optparse
|
||||
import sys
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
# Splash2 Run Script
|
||||
#
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import optparse
|
||||
import sys
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
import m5
|
||||
|
||||
class BaseTopology(object):
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from topologies.BaseTopology import BaseTopology
|
||||
|
||||
class Cluster(BaseTopology):
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.params import *
|
||||
from m5.objects import *
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.params import *
|
||||
from m5.objects import *
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.params import *
|
||||
from m5.objects import *
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.params import *
|
||||
from m5.objects import *
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.params import *
|
||||
from m5.objects import *
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
from m5.params import *
|
||||
from m5.objects import *
|
||||
|
||||
|
||||
@@ -32,6 +32,3 @@
|
||||
# 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.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
|
||||
Reference in New Issue
Block a user