changeset e22ded364548 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=e22ded364548
description:
        Config: Exit with fatal if a port is already connected

        This patch turns the existing warning into a fatal, as there should
        never be any cases where a (non-vector) port is assigned to and then
        later connected to something else. If this behaviour is allowed, as it
        used to be, there are cases where the wrong number of C++ ports are
        created when instantiating objects with VectorPorts (obviously that
        could be fixed, but the better approach is to simply not allow it).

diffstat:

 src/python/m5/params.py |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (15 lines):

diff -r afa278317136 -r e22ded364548 src/python/m5/params.py
--- a/src/python/m5/params.py   Tue May 22 11:38:04 2012 -0500
+++ b/src/python/m5/params.py   Wed May 23 09:01:56 2012 -0400
@@ -1379,9 +1379,8 @@
             # reference to plain VectorPort is implicit append
             other = other._get_next()
         if self.peer and not proxy.isproxy(self.peer):
-            print "warning: overwriting port", self, \
-                  "value", self.peer, "with", other
-            self.peer.peer = None
+            fatal("Port %s is already connected to %s, cannot connect %s\n",
+                  self, self.peer, other);
         self.peer = other
         if proxy.isproxy(other):
             other.set_param_desc(PortParamDesc())
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to