---------- Forwarded message ----------
From: Reinhardt, Steve <[EMAIL PROTECTED]>
Date: Tue, Sep 30, 2008 at 7:16 AM
Subject: FW: changeset in m5: Make overriding port assignments in Python
work,
To: [EMAIL PROTECTED]




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, September 30, 2008 7:14 AM
To: Reinhardt, Steve
Subject: changeset in m5: Make overriding port assignments in Python
work,

You are not allowed to post to this mailing list, and your message has
been automatically rejected.  If you think that your messages are being
rejected in error, contact the mailing list owner at
[EMAIL PROTECTED]



---------- Forwarded message ----------
From: "Reinhardt, Steve" <[EMAIL PROTECTED]>
To: <m5-dev@m5sim.org>
Date: Tue, 30 Sep 2008 09:13:47 -0500
Subject: changeset in m5: Make overriding port assignments in Python work,
changeset db6756431717 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=db6756431717
description:
       Make overriding port assignments in Python work,
       and print better error messages when it doesn't.

diffstat:

1 file changed, 1 deletion(-)
src/dev/io_device.hh |    1 -

diffs (50 lines):

diff -r d67a7becce5c -r db6756431717 src/dev/io_device.hh
--- a/src/dev/io_device.hh      Mon Sep 29 23:30:14 2008 -0700
+++ b/src/dev/io_device.hh      Mon Sep 29 23:30:14 2008 -0700
@@ -212,7 +212,8 @@
    {
        if (if_name == "pio") {
            if (pioPort != NULL)
-                panic("pio port already connected to.");
+                fatal("%s: pio port already connected to %s",
+                      name(), pioPort->getPeer()->name());
            pioPort = new PioPort(this, sys);
            return pioPort;
        } else
@@ -289,12 +290,14 @@
    {
        if (if_name == "pio") {
            if (pioPort != NULL)
-                panic("pio port already connected to.");
+                fatal("%s: pio port already connected to %s",
+                      name(), pioPort->getPeer()->name());
            pioPort = new PioPort(this, sys);
            return pioPort;
        } else if (if_name == "dma") {
            if (dmaPort != NULL)
-                panic("dma port already connected to.");
+                fatal("%s: dma port already connected to %s",
+                      name(), pioPort->getPeer()->name());
            dmaPort = new DmaPort(this, sys);
            return dmaPort;
        } else
diff -r d67a7becce5c -r db6756431717 src/python/m5/params.py
--- a/src/python/m5/params.py   Mon Sep 29 23:30:14 2008 -0700
+++ b/src/python/m5/params.py   Mon Sep 29 23:30:14 2008 -0700
@@ -1004,6 +1004,7 @@
        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 @@
        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
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to