diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-11-12 18:06:02 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-11-12 18:06:02 -0800 |
commit | 6095dceb0c34cf79ecbd799ab4b2cbe7b7c8629a (patch) | |
tree | 5a82debf1ba3fb5187a19d4a47a1f3670e1ef37b /src/python/m5/SimObject.py | |
parent | 917ae9ec668fde45c8cb614d9fac29df33892fa1 (diff) | |
download | gem5-6095dceb0c34cf79ecbd799ab4b2cbe7b7c8629a.tar.xz |
Params: Fix check for cycles in the configuration and clarify the comments/error message.
--HG--
extra : convert_revision : 8f35dde408fae874bcba1a248d32a22222d98c35
Diffstat (limited to 'src/python/m5/SimObject.py')
-rw-r--r-- | src/python/m5/SimObject.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py index d3e7d7975..78df6bef1 100644 --- a/src/python/m5/SimObject.py +++ b/src/python/m5/SimObject.py @@ -793,12 +793,14 @@ class SimObject(object): # necessary to construct it. Does *not* recursively create # children. def getCCObject(self): - params = self.getCCParams() if not self._ccObject: - self._ccObject = -1 # flag to catch cycles in recursion + # Cycles in the configuration heirarchy 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: recursive call to getCCObject()" \ + raise RuntimeError, "%s: Cycle found in configuration heirarchy." \ % self.path() return self._ccObject |