From: Clifford Wolf Date: Fri, 17 Jan 2014 15:42:40 +0000 (+0100) Subject: Added support for $adff with undef data inputs to opt_rmdff X-Git-Tag: yosys-0.2.0~168 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e370d5a2f364a469f11a2dc6f4217a9e9880a1c;p=yosys.git Added support for $adff with undef data inputs to opt_rmdff --- diff --git a/passes/opt/opt_rmdff.cc b/passes/opt/opt_rmdff.cc index a84bf4376..9ce98004e 100644 --- a/passes/opt/opt_rmdff.cc +++ b/passes/opt/opt_rmdff.cc @@ -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);