else:
cpu = AtomicSimpleCPU()
cpu.mem = Parent.magicbus2
+ cpu.itb = AlphaITB()
+ cpu.dtb = AlphaDTB()
sim_console = SimConsole(listener=ConsoleListener(port=3456))
kernel = binary('vmlinux')
pal = binary('ts_osfpal')
# readfile = os.path.join(test_base, 'halt.sh')
-BaseCPU.itb = AlphaITB()
-BaseCPU.dtb = AlphaDTB()
-BaseCPU.system = Parent.any
class TsunamiRoot(System):
pass
-def DualRoot(ClientSystem, ServerSystem):
+def DualRoot(clientSystem, serverSystem):
self = Root()
- self.client = ClientSystem()
- self.server = ServerSystem()
+ self.client = clientSystem
+ self.server = serverSystem
self.etherdump = EtherDump(file='ethertrace')
self.etherlink = EtherLink(int1 = Parent.client.tsunami.etherint[0],
self.clock = '5GHz'
return self
-root = DualRoot(ClientSystem = LinuxAlphaSystem(readfile=script('netperf-stream-nt-client.rcS')),
- ServerSystem = LinuxAlphaSystem(readfile=script('netperf-server.rcS')))
+root = DualRoot(LinuxAlphaSystem(readfile=script('netperf-stream-nt-client.rcS')),
+ LinuxAlphaSystem(readfile=script('netperf-server.rcS')))
m5.instantiate(root)
# initialize required attributes
cls._params = multidict()
cls._values = multidict()
+ cls._instantiated = False # really instantiated or subclassed
cls._anon_subclass_counter = 0
# We don't support multiple inheritance. If you want to, you
if isinstance(base, MetaSimObject):
cls._params.parent = base._params
cls._values.parent = base._values
+ base._instantiated = True
# now process the _init_dict items
for key,val in cls._init_dict.items():
param = cls._params.get(attr, None)
if param:
# It's ok: set attribute by delegating to 'object' class.
+ if (isSimObject(value) or isSimObjSequence(value)) \
+ and cls._instantiated:
+ raise AttributeError, \
+ "Cannot set SimObject parameter '%s' after\n" \
+ " class %s has been instantiated or subclassed" \
+ % (attr, cls.__name__)
try:
cls._values[attr] = param.convert(value)
except Exception, e:
# instantiated objects.
_memo = {}
+ self.__class__._instantiated = True
+
self._children = {}
# Inherit parameter values from class using multidict so
# individual value settings can be overridden.