Better packed-array misconnect error message

This commit is contained in:
Wilson Snyder
2013-02-02 19:22:02 -05:00
parent 6e6f1045b8
commit 7d44bba95c
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -1551,9 +1551,11 @@ private:
bool hiArray = nodep->exprp()->dtypep()->skipRefp()->castUnpackArrayDType();
bool loArray = nodep->modVarp()->dtypep()->skipRefp()->castUnpackArrayDType();
if (loArray != hiArray) {
nodep->v3error("Illegal port connection "<<nodep->prettyName()<<","
<<" port is"<<(hiArray?"":" not")<<" an array"
<<" expression is"<<(loArray?"":" not")<<" an array.");
nodep->v3error("Illegal port connection '"<<nodep->prettyName()<<"',"
<<" mismatch between port which is"<<(hiArray?"":" not")<<" an array,"
<<" and expression which is"<<(loArray?"":" not")<<" an array.");
UINFO(1," Related lo: "<<nodep->exprp()->dtypep()->skipRefp()<<endl);
UINFO(1," Related hi: "<<nodep->modVarp()->dtypep()->skipRefp()<<endl);
}
if (inputPin) {
// input pin is lhs, expr is rhs; resize expr to match