summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorSteve Reinhardt <Steve.Reinhardt@amd.com>2008-09-29 23:30:14 -0700
committerSteve Reinhardt <Steve.Reinhardt@amd.com>2008-09-29 23:30:14 -0700
commit7bf6a219db91406df91d4e9323b47e6d70ed73fb (patch)
tree41c9cc9fc047aed0affaf6acb9d38d01c99c874c /src/python
parent45cba35fc11bbe4e57d9615cfbb79580904ef820 (diff)
downloadgem5-7bf6a219db91406df91d4e9323b47e6d70ed73fb.tar.xz
Make overriding port assignments in Python work,
and print better error messages when it doesn't.
Diffstat (limited to 'src/python')
-rw-r--r--src/python/m5/params.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index 9394b11e2..081bd342e 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -1004,6 +1004,7 @@ class PortRef(object):
if self.peer and not proxy.isproxy(self.peer):
print "warning: overwriting port", self, \
"value", self.peer, "with", other
+ self.peer.peer = None
self.peer = other
if proxy.isproxy(other):
other.set_param_desc(PortParamDesc())
@@ -1046,6 +1047,8 @@ class PortRef(object):
if self.ccConnected: # already done this
return
peer = self.peer
+ if not self.peer: # nothing to connect to
+ return
connectPorts(self.simobj.getCCObject(), self.name, self.index,
peer.simobj.getCCObject(), peer.name, peer.index)
self.ccConnected = True