params.py (3102:225b76c8ac68) params.py (3103:330ec058b026)
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

756 assert(isSimObject(simobj))
757 self.simobj = simobj
758 self.name = name
759 self.index = -1
760 self.isVec = isVec # is this a vector port?
761 self.peer = None # not associated with another port yet
762 self.ccConnected = False # C++ port connection done?
763
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

756 assert(isSimObject(simobj))
757 self.simobj = simobj
758 self.name = name
759 self.index = -1
760 self.isVec = isVec # is this a vector port?
761 self.peer = None # not associated with another port yet
762 self.ccConnected = False # C++ port connection done?
763
764 def __str__(self):
765 ext = ''
766 if self.isVec:
767 ext = '[%d]' % self.index
768 return '%s.%s%s' % (self.simobj.path(), self.name, ext)
769
764 # Set peer port reference. Called via __setattr__ as a result of
765 # a port assignment, e.g., "obj1.port1 = obj2.port2".
766 def setPeer(self, other):
767 if self.isVec:
768 curMap = self.simobj._port_map.get(self.name, [])
769 self.index = len(curMap)
770 curMap.append(other)
771 else:

--- 92 unchanged lines hidden ---
770 # Set peer port reference. Called via __setattr__ as a result of
771 # a port assignment, e.g., "obj1.port1 = obj2.port2".
772 def setPeer(self, other):
773 if self.isVec:
774 curMap = self.simobj._port_map.get(self.name, [])
775 self.index = len(curMap)
776 curMap.append(other)
777 else:

--- 92 unchanged lines hidden ---