diff --git a/elab_expr.cc b/elab_expr.cc index 397dafd3d..115d17c61 100644 --- a/elab_expr.cc +++ b/elab_expr.cc @@ -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; } diff --git a/elab_lval.cc b/elab_lval.cc index b20a2f2e2..3db84356f 100644 --- a/elab_lval.cc +++ b/elab_lval.cc @@ -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; } diff --git a/elab_net.cc b/elab_net.cc index 499eb464d..6ef1aaa0d 100644 --- a/elab_net.cc +++ b/elab_net.cc @@ -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; }