params.py (6656:69714e675ee2) params.py (7526:4bb5f5207617)
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

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

1044 def ccConnect(self):
1045 from m5.objects.params import connectPorts
1046
1047 if self.ccConnected: # already done this
1048 return
1049 peer = self.peer
1050 if not self.peer: # nothing to connect to
1051 return
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

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

1044 def ccConnect(self):
1045 from m5.objects.params import connectPorts
1046
1047 if self.ccConnected: # already done this
1048 return
1049 peer = self.peer
1050 if not self.peer: # nothing to connect to
1051 return
1052 connectPorts(self.simobj.getCCObject(), self.name, self.index,
1053 peer.simobj.getCCObject(), peer.name, peer.index)
1052 try:
1053 connectPorts(self.simobj.getCCObject(), self.name, self.index,
1054 peer.simobj.getCCObject(), peer.name, peer.index)
1055 except:
1056 print "Error connecting port %s.%s to %s.%s" % \
1057 (self.simobj.path(), self.name,
1058 peer.simobj.path(), peer.name)
1059 raise
1054 self.ccConnected = True
1055 peer.ccConnected = True
1056
1057# A reference to an individual element of a VectorPort... much like a
1058# PortRef, but has an index.
1059class VectorPortElementRef(PortRef):
1060 def __init__(self, simobj, name, index):
1061 PortRef.__init__(self, simobj, name)

--- 136 unchanged lines hidden ---
1060 self.ccConnected = True
1061 peer.ccConnected = True
1062
1063# A reference to an individual element of a VectorPort... much like a
1064# PortRef, but has an index.
1065class VectorPortElementRef(PortRef):
1066 def __init__(self, simobj, name, index):
1067 PortRef.__init__(self, simobj, name)

--- 136 unchanged lines hidden ---