Eliminate spurious error message for array word lval in always @* block.
This commit is contained in:
parent
36c91491cc
commit
bb39d09d5e
|
|
@ -38,10 +38,27 @@ void NetProc::nex_output(NexusSet&)
|
|||
|
||||
void NetAssign_::nex_output(NexusSet&out)
|
||||
{
|
||||
if (sig_ && !word_) {
|
||||
Nexus*nex = sig_->pin(0).nexus();
|
||||
assert(sig_);
|
||||
unsigned use_word = 0;
|
||||
unsigned use_base = 0;
|
||||
unsigned use_wid = lwidth();
|
||||
if (word_) {
|
||||
long tmp = 0;
|
||||
if (eval_as_long(tmp, word_)) {
|
||||
// A constant word select, so add the selected word.
|
||||
use_word = tmp;
|
||||
} else {
|
||||
// A variable word select. The obvious thing to do
|
||||
// is to add the whole array, but this could cause
|
||||
// NetBlock::nex_input() to overprune the input set.
|
||||
// As array access is not yet handled in synthesis,
|
||||
// I'll leave this as TBD - the output set is not
|
||||
// otherwise used when elaborating an always @*
|
||||
// block.
|
||||
return;
|
||||
}
|
||||
}
|
||||
Nexus*nex = sig_->pin(use_word).nexus();
|
||||
if (base_) {
|
||||
long tmp = 0;
|
||||
bool flag = eval_as_long(tmp, base_);
|
||||
|
|
@ -57,19 +74,7 @@ void NetAssign_::nex_output(NexusSet&out)
|
|||
use_base = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
out.add(nex, use_base, use_wid);
|
||||
|
||||
} else {
|
||||
/* Quoting from netlist.h comments for class NetMemory:
|
||||
* "This is not a node because memory objects can only be
|
||||
* accessed by behavioral code."
|
||||
*/
|
||||
cerr << "?:?" << ": internal error: "
|
||||
<< "NetAssignBase::nex_output on unsupported lval ";
|
||||
dump_lval(cerr);
|
||||
cerr << endl;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue