Added support for $adff with undef data inputs to opt_rmdff

This commit is contained in:
Clifford Wolf 2014-01-17 16:42:40 +01:00
parent 651ce67d97
commit 2e370d5a2f
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,12 @@ static bool handle_dff(RTLIL::Module *mod, RTLIL::Cell *dff)
}
}
if (sig_d.is_fully_undef() && sig_d.width == int(val_rv.bits.size())) {
RTLIL::SigSig conn(sig_q, val_rv);
mod->connections.push_back(conn);
goto delete_dff;
}
if (sig_d.is_fully_const() && sig_r.width == 0) {
RTLIL::SigSig conn(sig_q, sig_d);
mod->connections.push_back(conn);