Deleted Added
sdiff udiff text old ( 12805:3c900ca6be0a ) new ( 13356:913658aa619c )
full compact
1# Copyright (c) 2017 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
9# terms below provided that you ensure that this notice is replicated

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

929 self.created = True
930
931 # Make it so we can only set attributes at initialization time
932 # and effectively make this a const object.
933 def __setattr__(self, name, value):
934 if not "created" in self.__dict__:
935 self.__dict__[name] = value
936
937# The SimObject class is the root of the special hierarchy. Most of
938# the code in this class deals with the configuration hierarchy itself
939# (parent/child node relationships).
940class SimObject(object):
941 # Specify metaclass. Any class inheriting from SimObject will
942 # get this metaclass.
943 __metaclass__ = MetaSimObject
944 type = 'SimObject'

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

1520 yield # make this function a (null) generator
1521
1522 def recurseDeviceTree(self, state):
1523 for child in self._children.itervalues():
1524 for item in child: # For looping over SimObjectVectors
1525 for dt in item.generateDeviceTree(state):
1526 yield dt
1527
1528# Function to provide to C++ so it can look up instances based on paths
1529def resolveSimObject(name):
1530 obj = instanceDict[name]
1531 return obj.getCCObject()
1532
1533def isSimObject(value):
1534 return isinstance(value, SimObject)
1535

--- 58 unchanged lines hidden ---