{
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 == "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
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())
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