V0.8: Can not have and undefined repeat.

This patch mirrors what was done in development to fail when the
repeat has an undefined value.
This commit is contained in:
Cary R 2008-11-21 16:30:35 -08:00 committed by Stephen Williams
parent 322bbed7c7
commit 451783056d
2 changed files with 15 additions and 0 deletions

View File

@ -428,6 +428,13 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope, bool) const
des->errors += 1;
}
if (!rep->value().is_defined()) {
cerr << get_line() << ": error: Concatenation repeat "
<< "may not be undefined (" << rep->value()
<< ")." << endl;
des->errors += 1;
}
repeat = rep;
}

View File

@ -1341,6 +1341,14 @@ NetNet* PEConcat::elaborate_net(Design*des, NetScope*scope,
des->errors += 1;
return 0;
}
if (!erep->value().is_defined()) {
cerr << get_line() << ": error: Concatenation repeat "
<< "may not be undefined (" << erep->value()
<< ")." << endl;
des->errors += 1;
return 0;
}
}
/* The operands of the concatenation must contain all