SimObject.py (10023:91faf6649de0) | SimObject.py (10195:7d4d0cd3f7e5) |
---|---|
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 --- 847 unchanged lines hidden (view full) --- 856 return self.path() 857 858 def find_any(self, ptype): 859 if isinstance(self, ptype): 860 return self, True 861 862 found_obj = None 863 for child in self._children.itervalues(): | 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 --- 847 unchanged lines hidden (view full) --- 856 return self.path() 857 858 def find_any(self, ptype): 859 if isinstance(self, ptype): 860 return self, True 861 862 found_obj = None 863 for child in self._children.itervalues(): |
864 if isinstance(child, ptype): | 864 visited = False 865 if hasattr(child, '_visited'): 866 visited = getattr(child, '_visited') 867 868 if isinstance(child, ptype) and not visited: |
865 if found_obj != None and child != found_obj: 866 raise AttributeError, \ 867 'parent.any matched more than one: %s %s' % \ 868 (found_obj.path, child.path) 869 found_obj = child 870 # search param space 871 for pname,pdesc in self._params.iteritems(): 872 if issubclass(pdesc.ptype, ptype): --- 268 unchanged lines hidden --- | 869 if found_obj != None and child != found_obj: 870 raise AttributeError, \ 871 'parent.any matched more than one: %s %s' % \ 872 (found_obj.path, child.path) 873 found_obj = child 874 # search param space 875 for pname,pdesc in self._params.iteritems(): 876 if issubclass(pdesc.ptype, ptype): --- 268 unchanged lines hidden --- |