Unsized concatenates now give WIDTHCONCAT warnings.

git-svn-id: file://localhost/svn/verilator/trunk/verilator@1020 77ca24e4-aefa-0310-84f0-b9a241c72d87
This commit is contained in:
Wilson Snyder
2008-04-02 12:53:53 +00:00
parent 549bf876e4
commit 7e5a7b65a0
8 changed files with 109 additions and 6 deletions
+8 -2
View File
@@ -201,7 +201,10 @@ private:
nodep->lhsp()->widthMin() + nodep->rhsp()->widthMin());
}
if (vup->c()->final()) {
if (!nodep->widthSized()) nodep->v3error("Concat argument must have specific size. (No unsized numbers/parameters).");
if (!nodep->widthSized()) {
// See also error in V3Number
nodep->v3warn(WIDTHCONCAT,"Unsized numbers/parameters not allowed in concatenations.");
}
}
}
virtual void visit(AstReplicate* nodep, AstNUser* vup) {
@@ -217,7 +220,10 @@ private:
(nodep->lhsp()->widthMin() * times));
}
if (vup->c()->final()) {
if (!nodep->widthSized()) nodep->v3error("Replication expression must have specific size.");
if (!nodep->widthSized()) {
// See also error in V3Number
nodep->v3warn(WIDTHCONCAT,"Unsized numbers/parameters not allowed in replications.");
}
}
}
virtual void visit(AstRange* nodep, AstNUser* vup) {