1# Copyright (c) 2012 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 30 unchanged lines hidden (view full) --- 39# 40# Authors: Steve Reinhardt 41# Nathan Binkert 42# Andreas Hansson 43 44import sys 45from types import FunctionType, MethodType, ModuleType 46 |
47import m5 48from m5.util import * 49 50# Have to import params up top since Param is referenced on initial 51# load (when SimObject class references Param to create a class 52# variable, the 'name' param)... 53from m5.params import * 54# There are a few things we need that aren't in params.__all__ since --- 995 unchanged lines hidden (view full) --- 1050 # i don't know if there's a better way to do this - calling 1051 # setMemoryMode directly from self._ccObject results in calling 1052 # SimObject::setMemoryMode, not the System::setMemoryMode 1053 self._ccObject.setMemoryMode(mode) 1054 1055 def takeOverFrom(self, old_cpu): 1056 self._ccObject.takeOverFrom(old_cpu._ccObject) 1057 |
1058# Function to provide to C++ so it can look up instances based on paths 1059def resolveSimObject(name): 1060 obj = instanceDict[name] 1061 return obj.getCCObject() 1062 1063def isSimObject(value): 1064 return isinstance(value, SimObject) 1065 --- 52 unchanged lines hidden --- |