This commit is contained in:
Andrew Zonenberg 2016-07-12 16:12:37 -07:00
commit 32bea97b75
1 changed files with 5 additions and 2 deletions

View File

@ -92,12 +92,15 @@ static bool find_states(RTLIL::SigSpec sig, const RTLIL::SigSpec &dff_out, RTLIL
if (reset_state && RTLIL::SigSpec(*reset_state).is_fully_undef())
do {
SigSpec new_reset_state;
if (sig_aa.is_fully_def())
*reset_state = sig_aa.as_const();
new_reset_state = sig_aa.as_const();
else if (sig_bb.is_fully_def())
*reset_state = sig_bb.as_const();
new_reset_state = sig_bb.as_const();
else
break;
new_reset_state.extend_u0(GetSize(*reset_state));
*reset_state = new_reset_state.as_const();
log(" found reset state: %s (guessed from mux tree)\n", log_signal(*reset_state));
} while (0);