Improve error messages for mixed procedural/continuous assignments.
We have already eliminated procedural assignments to uwires, so if we find a l-value of type UNRESOLVED_WIRE, it must be a variable that has a continuous assignment. Report it as such.
This commit is contained in:
parent
11fc90faf7
commit
42c5174c8d
13
elab_lval.cc
13
elab_lval.cc
|
|
@ -332,9 +332,10 @@ NetAssign_*PEIdent::elaborate_lval_var_(Design *des, NetScope *scope,
|
||||||
ivl_assert(*this, use_sel == index_component_t::SEL_NONE);
|
ivl_assert(*this, use_sel == index_component_t::SEL_NONE);
|
||||||
|
|
||||||
if (reg->type()==NetNet::UNRESOLVED_WIRE && !is_force) {
|
if (reg->type()==NetNet::UNRESOLVED_WIRE && !is_force) {
|
||||||
cerr << get_fileline() << ": error: "
|
ivl_assert(*this, reg->coerced_to_uwire());
|
||||||
<< path_ << " Unable to assign to unresolved wires."
|
cerr << get_fileline() << ": error: Cannot perform "
|
||||||
<< endl;
|
"procedural assignment to '" << reg->name()
|
||||||
|
<< "' because it is also continuously assigned." << endl;
|
||||||
des->errors += 1;
|
des->errors += 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -466,8 +467,10 @@ NetAssign_* PEIdent::elaborate_lval_net_word_(Design*des,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((reg->type()==NetNet::UNRESOLVED_WIRE) && !is_force) {
|
if ((reg->type()==NetNet::UNRESOLVED_WIRE) && !is_force) {
|
||||||
cerr << get_fileline() << ": error: "
|
ivl_assert(*this, reg->coerced_to_uwire());
|
||||||
<< "Unable to assign words of unresolved wire array." << endl;
|
cerr << get_fileline() << ": error: Cannot perform "
|
||||||
|
"procedural assignment to word in array '" << reg->name()
|
||||||
|
<< "' because it is also continuously assigned." << endl;
|
||||||
des->errors += 1;
|
des->errors += 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue