Enhance the real selection is invalid error messages.
This patch enhances the error messages emitted when trying to select part of a real value. It now includes the signal name so it is easier to debug.
This commit is contained in:
parent
5852f1eb7a
commit
3517f11c2c
|
|
@ -2356,8 +2356,9 @@ NetExpr* PEIdent::elaborate_expr_param_(Design*des,
|
|||
|
||||
if (par->expr_type() == IVL_VT_REAL &&
|
||||
use_sel != index_component_t::SEL_NONE) {
|
||||
perm_string name = peek_tail_name(path_);
|
||||
cerr << get_fileline() << ": error: "
|
||||
<< "Can not select part of a real parameter value." << endl;
|
||||
<< "can not select part of real parameter: " << name << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2637,8 +2638,10 @@ NetExpr* PEIdent::elaborate_expr_net_word_(Design*des, NetScope*scope,
|
|||
if (res->expr_type() == IVL_VT_REAL &&
|
||||
word_sel != index_component_t::SEL_NONE) {
|
||||
cerr << get_fileline() << ": error: "
|
||||
<< "Can not select part of a real array word." << endl;
|
||||
<< "can not select part of real array word: "
|
||||
<< net->name() <<"[" << *word_index << "]" << endl;
|
||||
des->errors += 1;
|
||||
delete res;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2939,7 +2942,7 @@ NetExpr* PEIdent::elaborate_expr_net(Design*des, NetScope*scope,
|
|||
if (node->expr_type() == IVL_VT_REAL &&
|
||||
use_sel != index_component_t::SEL_NONE) {
|
||||
cerr << get_fileline() << ": error: "
|
||||
<< "Can not select part of a real value." << endl;
|
||||
<< "can not select part of real: " << net->name() << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ NetAssign_* PEIdent::elaborate_lval(Design*des,
|
|||
if (reg->data_type() == IVL_VT_REAL &&
|
||||
use_sel != index_component_t::SEL_NONE) {
|
||||
cerr << get_fileline() << ": error: "
|
||||
<< "Can not select part of a real value." << endl;
|
||||
<< "can not select part of real: " << reg->name() << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -300,8 +300,10 @@ NetAssign_* PEIdent::elaborate_lval_net_word_(Design*des,
|
|||
|
||||
if (reg->data_type() == IVL_VT_REAL &&
|
||||
use_sel != index_component_t::SEL_NONE) {
|
||||
perm_string name = peek_tail_name(path_);
|
||||
cerr << get_fileline() << ": error: "
|
||||
<< "Can not select part of a real array word." << endl;
|
||||
<< "can not select part of real array word: "
|
||||
<< reg->name() << "[" << *word << "]" << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -462,8 +462,8 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
|||
if (name_tail.index.size() > sig->array_dimensions()) {
|
||||
if (sig->data_type() == IVL_VT_REAL) {
|
||||
cerr << get_fileline() << ": error: "
|
||||
<< "Can not select part of a real array word."
|
||||
<< endl;
|
||||
<< "can not select part of real array word: "
|
||||
<< sig->name() << "[" << widx_val << "]" << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -485,7 +485,8 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
|||
} else if (!name_tail.index.empty()) {
|
||||
if (sig->data_type() == IVL_VT_REAL) {
|
||||
cerr << get_fileline() << ": error: "
|
||||
<< "Can not select part of a real value." << endl;
|
||||
<< "can not select part of real: "
|
||||
<< sig->name() << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue