params.py (4762:c94e103c83ad) | params.py (4859:97c7749896a6) |
---|---|
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 --- 1011 unchanged lines hidden (view full) --- 1020 except: 1021 print "Error in unproxying port '%s' of %s" % \ 1022 (self.name, self.simobj.path()) 1023 raise 1024 self.connect(realPeer) 1025 1026 # Call C++ to create corresponding port connection between C++ objects 1027 def ccConnect(self): | 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 --- 1011 unchanged lines hidden (view full) --- 1020 except: 1021 print "Error in unproxying port '%s' of %s" % \ 1022 (self.name, self.simobj.path()) 1023 raise 1024 self.connect(realPeer) 1025 1026 # Call C++ to create corresponding port connection between C++ objects 1027 def ccConnect(self): |
1028 import internal | 1028 from m5.objects.params import connectPorts |
1029 1030 if self.ccConnected: # already done this 1031 return 1032 peer = self.peer | 1029 1030 if self.ccConnected: # already done this 1031 return 1032 peer = self.peer |
1033 internal.sim_object.connectPorts(self.simobj.getCCObject(), self.name, 1034 self.index, peer.simobj.getCCObject(), peer.name, peer.index) | 1033 connectPorts(self.simobj.getCCObject(), self.name, self.index, 1034 peer.simobj.getCCObject(), peer.name, peer.index) |
1035 self.ccConnected = True 1036 peer.ccConnected = True 1037 1038# A reference to an individual element of a VectorPort... much like a 1039# PortRef, but has an index. 1040class VectorPortElementRef(PortRef): 1041 def __init__(self, simobj, name, index): 1042 PortRef.__init__(self, simobj, name) --- 125 unchanged lines hidden --- | 1035 self.ccConnected = True 1036 peer.ccConnected = True 1037 1038# A reference to an individual element of a VectorPort... much like a 1039# PortRef, but has an index. 1040class VectorPortElementRef(PortRef): 1041 def __init__(self, simobj, name, index): 1042 PortRef.__init__(self, simobj, name) --- 125 unchanged lines hidden --- |