diff -r cf49901df862 -r d5e319e6ac19 src/python/m5/SimObject.py --- a/src/python/m5/SimObject.py Tue Jul 27 21:23:56 2010 -0700 +++ b/src/python/m5/SimObject.py Tue Jul 27 21:23:56 2010 -0700 @@ -761,13 +761,16 @@ # children. def getCCObject(self): if not self._ccObject: - # Cycles in the configuration heirarchy are not supported. This + # Make sure this object is in the configuration hierarchy + if not self._parent and not isRoot(self): + raise RuntimeError, "Attempt to instantiate orphan node" + # Cycles in the configuration hierarchy are not supported. This # will catch the resulting recursion and stop. self._ccObject = -1 params = self.getCCParams() self._ccObject = params.create() elif self._ccObject == -1: - raise RuntimeError, "%s: Cycle found in configuration heirarchy." \ + raise RuntimeError, "%s: Cycle found in configuration hierarchy." \ % self.path() return self._ccObject @@ -890,6 +893,10 @@ def isSimObjectOrSequence(value): return isSimObject(value) or isSimObjectSequence(value) +def isRoot(obj): + from m5.objects import Root + return obj and obj is Root.getInstance() + baseClasses = allClasses.copy() baseInstances = instanceDict.copy() diff -r cf49901df862 -r d5e319e6ac19 src/python/m5/params.py --- a/src/python/m5/params.py Tue Jul 27 21:23:56 2010 -0700 +++ b/src/python/m5/params.py Tue Jul 27 21:23:56 2010 -0700 @@ -1049,8 +1049,14 @@ peer = self.peer if not self.peer: # nothing to connect to return - connectPorts(self.simobj.getCCObject(), self.name, self.index, - peer.simobj.getCCObject(), peer.name, peer.index) + try: + connectPorts(self.simobj.getCCObject(), self.name, self.index, + peer.simobj.getCCObject(), peer.name, peer.index) + except: + print "Error connecting port %s.%s to %s.%s" % \ + (self.simobj.path(), self.name, + peer.simobj.path(), peer.name) + raise self.ccConnected = True peer.ccConnected = True diff -r cf49901df862 -r d5e319e6ac19 tests/configs/rubytest-ruby.py --- a/tests/configs/rubytest-ruby.py Tue Jul 27 21:23:56 2010 -0700 +++ b/tests/configs/rubytest-ruby.py Tue Jul 27 21:23:56 2010 -0700 @@ -70,7 +70,7 @@ # tester = RubyTester(checks_to_complete = 100, wakeup_frequency = 10) -system = System(physmem = PhysicalMemory()) +system = System(tester = tester, physmem = PhysicalMemory()) system.ruby = Ruby.create_system(options, system.physmem)