SV does not require constant expression in variable initialisation.

This commit is contained in:
Martin Whitaker 2019-10-05 20:11:38 +01:00
parent c86dc285cc
commit 862010ac19
2 changed files with 1 additions and 3 deletions

View File

@ -2321,8 +2321,6 @@ NetExpr* PAssign_::elaborate_rval_(Design*des, NetScope*scope,
if (!is_constant_ || !rv) return rv;
if (dynamic_cast<NetENew*>(rv)) return rv;
cerr << get_fileline() << ": error: "
"The RHS expression must be constant." << endl;
cerr << get_fileline() << " : "

View File

@ -2507,7 +2507,7 @@ void pform_make_var_init(const struct vlltype&li,
PEIdent*lval = new PEIdent(name);
FILE_NAME(lval, li);
PAssign*ass = new PAssign(lval, expr, true);
PAssign*ass = new PAssign(lval, expr, !gn_system_verilog());
FILE_NAME(ass, li);
lexical_scope->var_inits.push_back(ass);