SimObject.py (10911:0ca18446a5bb) SimObject.py (11231:75c0e4915c05)
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

--- 1213 unchanged lines hidden (view full) ---

1222 self._values[key] = val
1223 if isSimObjectOrVector(val) and not val.has_parent():
1224 warn("%s adopting orphan SimObject param '%s'", self, key)
1225 self.add_child(key, val)
1226
1227 def path(self):
1228 if not self._parent:
1229 return '<orphan %s>' % self.__class__
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

--- 1213 unchanged lines hidden (view full) ---

1222 self._values[key] = val
1223 if isSimObjectOrVector(val) and not val.has_parent():
1224 warn("%s adopting orphan SimObject param '%s'", self, key)
1225 self.add_child(key, val)
1226
1227 def path(self):
1228 if not self._parent:
1229 return '<orphan %s>' % self.__class__
1230 elif isinstance(self._parent, MetaSimObject):
1231 return str(self.__class__)
1232
1230 ppath = self._parent.path()
1231 if ppath == 'root':
1232 return self._name
1233 return ppath + "." + self._name
1234
1235 def __str__(self):
1236 return self.path()
1237

--- 290 unchanged lines hidden ---
1233 ppath = self._parent.path()
1234 if ppath == 'root':
1235 return self._name
1236 return ppath + "." + self._name
1237
1238 def __str__(self):
1239 return self.path()
1240

--- 290 unchanged lines hidden ---