Do not create $dffsr cells with no-op resets in proc_dff

This commit is contained in:
Clifford Wolf 2014-06-19 12:29:29 +02:00
parent df76da8fd7
commit 1c85584fe5
1 changed files with 5 additions and 0 deletions

View File

@ -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");