Fix error on constants connected to outputs, bug323.

This commit is contained in:
Wilson Snyder
2011-01-31 07:05:04 -05:00
parent a2558886c8
commit 8701145b40
5 changed files with 86 additions and 0 deletions
+4
View File
@@ -140,6 +140,10 @@ private:
if (!connectRefp->castConst() && !connectRefp->castVarRef()) {
pinp->v3fatalSrc("Unknown interconnect type; pinReconnectSimple should have cleared up\n");
}
if (pinNewVarp->isOutOnly() && connectRefp->castConst()) {
pinp->v3error("Output port is connected to a constant pin, electrical short");
}
// Propagate any attributes across the interconnect
pinNewVarp->propagateAttrFrom(pinOldVarp);
if (connectRefp->castVarRef()) {