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 --- 684 unchanged lines hidden (view full) --- 693 return memo_dict[self] 694 return self.__class__(_ancestor = self, **kwargs) 695 696 def _get_port_ref(self, attr): 697 # Return reference that can be assigned to another port 698 # via __setattr__. There is only ever one reference 699 # object per port, but we create them lazily here. 700 ref = self._port_refs.get(attr) |
701 if ref == None: |
702 ref = self._ports[attr].makeRef(self) 703 self._port_refs[attr] = ref 704 return ref 705 706 def __getattr__(self, attr): 707 if self._ports.has_key(attr): 708 return self._get_port_ref(attr) 709 --- 420 unchanged lines hidden --- |