Support parameter type, bug376.

This commit is contained in:
Wilson Snyder
2016-03-14 21:51:31 -04:00
parent cef097b7b7
commit 9ae40d64f0
17 changed files with 388 additions and 17 deletions
+6 -2
View File
@@ -2260,8 +2260,12 @@ private:
virtual void visit(AstNode* nodep, AstNUser*) {
// Default: Just iterate
if (m_required) {
nodep->v3error("Expecting expression to be constant, but can't convert a "
<<nodep->prettyTypeName()<<" to constant.");
if (nodep->castNodeDType() || nodep->castRange()) {
// Ignore dtypes for parameter type pins
} else {
nodep->v3error("Expecting expression to be constant, but can't convert a "
<<nodep->prettyTypeName()<<" to constant.");
}
} else {
// Calculate the width of this operation
if (m_params && !nodep->width()) {