vlog95: a sign extend can have an out of scope reference.
If modules instantiations were always handled correctly this would not be needed, but for now looking for the nexus driver outside the scope is needed to make some of the tests work.
This commit is contained in:
parent
2e86c208d1
commit
69705ef32b
|
|
@ -465,7 +465,7 @@ void emit_nexus_as_ca(ivl_scope_t scope, ivl_nexus_t nex, unsigned allow_UD)
|
|||
assert(! must_be_sig);
|
||||
// HERE: I think we need special input code like the following.
|
||||
#if 0
|
||||
/* If these is a signal in this scope that is also driven by
|
||||
/* If there is a signal in this scope that is also driven by
|
||||
* the LPM then use the signal instead. */
|
||||
sig = find_local_signal(scope, ivl_lpm_q(lpm), &word);
|
||||
if (sig) emit_nexus_as_ca(scope, ivl_signal_nex(sig, word), 0);
|
||||
|
|
@ -1009,9 +1009,12 @@ static void emit_lpm_as_ca(ivl_scope_t scope, ivl_lpm_t lpm)
|
|||
fprintf(vlog_out, ")");
|
||||
break;
|
||||
case IVL_LPM_SIGN_EXT:
|
||||
// HERE: pr1002 and one other test fails if this assert is used. A more
|
||||
// robust method is needed to make sure things work as expected.
|
||||
// assert(! sign_extend);
|
||||
sign_extend = 1;
|
||||
emit_nexus_as_ca(scope, ivl_lpm_data(lpm, 0), 0);
|
||||
emit_nexus_as_ca(scope, ivl_lpm_data(lpm, 0), 1);
|
||||
sign_extend = 0;
|
||||
break;
|
||||
case IVL_LPM_SUB:
|
||||
fprintf(vlog_out, "(");
|
||||
|
|
|
|||
Loading…
Reference in New Issue