From: Clifford Wolf Date: Thu, 19 Jun 2014 10:29:29 +0000 (+0200) Subject: Do not create $dffsr cells with no-op resets in proc_dff X-Git-Tag: yosys-0.4~585 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c85584fe5843a43590de3927fe9bde74a04e72e;p=yosys.git Do not create $dffsr cells with no-op resets in proc_dff --- diff --git a/passes/proc/proc_dff.cc b/passes/proc/proc_dff.cc index 2ec498fb2..c18446512 100644 --- a/passes/proc/proc_dff.cc +++ b/passes/proc/proc_dff.cc @@ -356,6 +356,11 @@ static void proc_dff(RTLIL::Module *mod, RTLIL::Process *proc, ConstEval &ce) rstval.optimize(); sig.optimize(); + if (rstval == sig) { + rstval = RTLIL::SigSpec(RTLIL::State::Sz, sig.width); + sync_level = NULL; + } + if (sync_always) { if (sync_edge || sync_level || many_async_rules.size() > 0) log_error("Mixed always event with edge and/or level sensitive events!\n");