Generate better error messages for concat. with indefinite width.
This patch generates a more user friendly error message for a concatenation with an indefinite width operand.
This commit is contained in:
parent
fc8549c9f8
commit
d0457a1ac2
10
elab_expr.cc
10
elab_expr.cc
|
|
@ -1617,7 +1617,7 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmp->expr_type() == IVL_VT_REAL) {
|
if (tmp->expr_type() == IVL_VT_REAL) {
|
||||||
cerr << tmp->get_fileline() << ": error: concatenation "
|
cerr << tmp->get_fileline() << ": error: Concatenation "
|
||||||
<< "repeat expression can not be REAL." << endl;
|
<< "repeat expression can not be REAL." << endl;
|
||||||
des->errors += 1;
|
des->errors += 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -1627,7 +1627,7 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
|
||||||
|
|
||||||
if (rep == 0) {
|
if (rep == 0) {
|
||||||
cerr << get_fileline() << ": error: "
|
cerr << get_fileline() << ": error: "
|
||||||
"concatenation repeat expression cannot be evaluated."
|
"Concatenation repeat expression cannot be evaluated."
|
||||||
<< endl;
|
<< endl;
|
||||||
cerr << get_fileline() << ": : The expression is: "
|
cerr << get_fileline() << ": : The expression is: "
|
||||||
<< *tmp << endl;
|
<< *tmp << endl;
|
||||||
|
|
@ -1688,7 +1688,7 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
|
||||||
|
|
||||||
if (ex->expr_type() == IVL_VT_REAL) {
|
if (ex->expr_type() == IVL_VT_REAL) {
|
||||||
cerr << ex->get_fileline() << ": error: "
|
cerr << ex->get_fileline() << ": error: "
|
||||||
<< "concatenation operand can not be real: "
|
<< "Concatenation operand can not be real: "
|
||||||
<< *parms_[idx] << endl;
|
<< *parms_[idx] << endl;
|
||||||
des->errors += 1;
|
des->errors += 1;
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -1696,8 +1696,8 @@ NetExpr* PEConcat::elaborate_expr(Design*des, NetScope*scope,
|
||||||
|
|
||||||
if (! ex->has_width()) {
|
if (! ex->has_width()) {
|
||||||
cerr << ex->get_fileline() << ": error: "
|
cerr << ex->get_fileline() << ": error: "
|
||||||
<< "concatenation operand has indefinite width: "
|
<< "Concatenation operand \"" << *parms_[idx]
|
||||||
<< *ex << endl;
|
<< "\" has indefinite width." << endl;
|
||||||
des->errors += 1;
|
des->errors += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue