# Ivan Pizarro
from m5.params import *
-from MemObject import MemObject
+from m5.objects.MemObject import MemObject
class BaseTLB(MemObject):
type = 'BaseTLB'
#
# Authors: Nathan Binkert
+from __future__ import print_function
+from __future__ import absolute_import
+
# Simple importer that allows python to import data from a dict of
# code objects. The keys are the module path, and the items are the
# filename and bytecode of the file.
# Andreas Sandberg
from __future__ import print_function
+from __future__ import absolute_import
import sys
from types import FunctionType, MethodType, ModuleType
#
# Authors: Nathan Binkert
+from __future__ import print_function
+from __future__ import absolute_import
+
# Import useful subpackages of M5, but *only* when run as an m5
# script. This is mostly to keep backward compatibility with existing
# scripts while allowing new SCons code to operate properly.
in_gem5 = False
if in_gem5:
- import SimObject
- import core
- import objects
- import params
- import stats
- import util
+ from . import SimObject
+ from . import core
+ from . import objects
+ from . import params
+ from . import stats
+ from . import util
- from event import *
- from main import main
- from simulate import *
+ from .event import *
+ from .main import main
+ from .simulate import *
#
# Authors: Nathan Binkert
+from __future__ import print_function
+from __future__ import absolute_import
+
from _m5.core import setOutputDir
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors: Glenn Bergmans
+
+from __future__ import print_function
+from __future__ import absolute_import
@author: Neil 'superna' Armstrong <superna9999@gmail.com>
"""
+from __future__ import print_function
+from __future__ import absolute_import
+
import string
import os
import json
#
# Authors: Nathan Binkert
+from __future__ import print_function
+from __future__ import absolute_import
+
import inspect
import _m5
"gem5 is copyrighted software; use the --copyright option for details."
def parse_options():
- import config
- from options import OptionParser
+ from . import config
+ from .options import OptionParser
options = OptionParser(usage=usage, version=version,
description=brief_copyright)
def main(*args):
import m5
- import core
- import debug
- import defines
- import event
- import info
- import stats
- import trace
+ from . import core
+ from . import debug
+ from . import defines
+ from . import event
+ from . import info
+ from . import stats
+ from . import trace
- from util import inform, fatal, panic, isInteractive
+ from .util import inform, fatal, panic, isInteractive
if len(args) == 0:
options, arguments = parse_options()
debug.help()
if options.list_sim_objects:
- import SimObject
+ from . import SimObject
done = True
print("SimObjects:")
objects = list(SimObject.allClasses.keys())
#
# Authors: Nathan Binkert
+from __future__ import print_function
+from __future__ import absolute_import
+
from m5.internal import params
from m5.SimObject import *
#
# Authors: Nathan Binkert
+from __future__ import print_function
+from __future__ import absolute_import
+
import optparse
import sys
import time
import math
-import proxy
-import ticks
-from util import *
+from . import proxy
+from . import ticks
+from .util import *
def isSimObject(*args, **kwargs):
return SimObject.isSimObject(*args, **kwargs)
'MasterPort', 'SlavePort',
'VectorMasterPort', 'VectorSlavePort']
-import SimObject
+from . import SimObject
#
#####################################################################
+from __future__ import print_function
+from __future__ import absolute_import
+
import copy
-import params
+from . import params
class BaseProxy(object):
def __init__(self, search_self, search_up):
import _m5.core
from _m5.stats import updateEvents as updateStatEvents
-import stats
-import SimObject
-import ticks
-import objects
+from . import stats
+from . import SimObject
+from . import ticks
+from . import objects
from m5.util.dot_writer import do_dot, do_dvfs_dot
-from util import fatal
-from util import attrdict
+from .util import fatal
+from .util import attrdict
# define a MaxTick parameter, unsigned 64 bit
MaxTick = 2**64 - 1
#
# Authors: Nathan Binkert
+from __future__ import print_function
+from __future__ import absolute_import
+
# Export native methods to Python
from _m5.trace import output, ignore, disable, enable
import re
import sys
-import convert
-import jobfile
-
-from attrdict import attrdict, multiattrdict, optiondict
-from code_formatter import code_formatter
-from multidict import multidict
-from smartdict import SmartDict
-from sorteddict import SortedDict
+from . import convert
+from . import jobfile
+
+from .attrdict import attrdict, multiattrdict, optiondict
+from .code_formatter import code_formatter
+from .multidict import multidict
+from .smartdict import SmartDict
+from .sorteddict import SortedDict
# panic() should be called when something happens that should never
# ever happen regardless of what the user does (i.e., an acutal m5
__all__ = [ "code_formatter" ]
if __name__ == '__main__':
- from code_formatter import code_formatter
+ from .code_formatter import code_formatter
f = code_formatter()
class Foo(dict):
#
#####################################################################
+from __future__ import print_function
+from __future__ import absolute_import
+
import m5, os, re
from m5.SimObject import isRoot, isSimObjectVector
from m5.params import PortRef, isNullPointer
# Authors: Nathan Binkert
from __future__ import print_function
+from __future__ import absolute_import
import sys
#
# Authors: Andreas Sandberg
+from __future__ import print_function
+from __future__ import absolute_import
+
from abc import *
class PyBindExport(object):
# rather than a normal value, and (c) coerce values written to the
# dict to be strings.
+from __future__ import print_function
+from __future__ import absolute_import
-from convert import *
-from attrdict import attrdict
+from .convert import *
+from .attrdict import attrdict
class Variable(str):
"""Intelligent proxy class for SmartDict. Variable will use the
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from __future__ import print_function
+from __future__ import absolute_import
from bisect import bisect_left, bisect_right
# Author: Steve Reinhardt
from __future__ import print_function
+from __future__ import absolute_import
import sys