Detect errors elaborating delay expressions.

This commit is contained in:
Stephen Williams 2019-10-01 09:29:13 -07:00
parent 1d2259e0a7
commit da36cee8f0
1 changed files with 12 additions and 0 deletions

View File

@ -2370,6 +2370,18 @@ static NetExpr*elaborate_delay_expr(PExpr*expr, Design*des, NetScope*scope)
{
NetExpr*dex = elab_and_eval(des, scope, expr, -1);
// If the elab_and_eval returns nil, then the function
// failed. It should already have printed an error message,
// but we can add some detail. Lets add the error count, just
// in case.
if (dex == 0) {
cerr << expr->get_fileline() << ": error: "
<< "Unable to elaborate (or evaluate) delay expression."
<< endl;
des->errors += 1;
return 0;
}
check_for_inconsistent_delays(scope);
/* If the delay expression is a real constant or vector