params.py (8934:f467d4db555a) | params.py (9014:e22ded364548) |
---|---|
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 --- 1365 unchanged lines hidden (view full) --- 1374 # SimObject.__setattr__ as a result of a port assignment, e.g., 1375 # "obj1.portA = obj2.portB", or via VectorPortElementRef.__setitem__, 1376 # e.g., "obj1.portA[3] = obj2.portB". 1377 def connect(self, other): 1378 if isinstance(other, VectorPortRef): 1379 # reference to plain VectorPort is implicit append 1380 other = other._get_next() 1381 if self.peer and not proxy.isproxy(self.peer): | 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 --- 1365 unchanged lines hidden (view full) --- 1374 # SimObject.__setattr__ as a result of a port assignment, e.g., 1375 # "obj1.portA = obj2.portB", or via VectorPortElementRef.__setitem__, 1376 # e.g., "obj1.portA[3] = obj2.portB". 1377 def connect(self, other): 1378 if isinstance(other, VectorPortRef): 1379 # reference to plain VectorPort is implicit append 1380 other = other._get_next() 1381 if self.peer and not proxy.isproxy(self.peer): |
1382 print "warning: overwriting port", self, \ 1383 "value", self.peer, "with", other 1384 self.peer.peer = None | 1382 fatal("Port %s is already connected to %s, cannot connect %s\n", 1383 self, self.peer, other); |
1385 self.peer = other 1386 if proxy.isproxy(other): 1387 other.set_param_desc(PortParamDesc()) 1388 elif isinstance(other, PortRef): 1389 if other.peer is not self: 1390 other.connect(self) 1391 else: 1392 raise TypeError, \ --- 244 unchanged lines hidden --- | 1384 self.peer = other 1385 if proxy.isproxy(other): 1386 other.set_param_desc(PortParamDesc()) 1387 elif isinstance(other, PortRef): 1388 if other.peer is not self: 1389 other.connect(self) 1390 else: 1391 raise TypeError, \ --- 244 unchanged lines hidden --- |