diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-07-25 12:01:25 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-07-25 12:09:57 +0200 |
commit | 2a613b1b662956e681cab4259ff495c33b39a393 (patch) | |
tree | 18693197b9a3ed46f538478141b1a251d68022f1 | |
parent | badc5f7eb9f438e66797c12352b6798c27384960 (diff) | |
download | yosys-2a613b1b662956e681cab4259ff495c33b39a393.tar.gz yosys-2a613b1b662956e681cab4259ff495c33b39a393.tar.bz2 yosys-2a613b1b662956e681cab4259ff495c33b39a393.zip |
Some cleanups in opt_rmdff
-rw-r--r-- | passes/opt/opt_rmdff.cc | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/passes/opt/opt_rmdff.cc b/passes/opt/opt_rmdff.cc index 24c2d3fa3..2ecbb31a8 100644 --- a/passes/opt/opt_rmdff.cc +++ b/passes/opt/opt_rmdff.cc @@ -130,38 +130,31 @@ bool handle_dff(RTLIL::Module *mod, RTLIL::Cell *dff) if (sig_c.is_fully_const() && (!sig_r.size() || !has_init || val_init == val_rv)) { if (val_rv.bits.size() == 0) val_rv = val_init; - RTLIL::SigSig conn(sig_q, val_rv); - mod->connect(conn); + mod->connect(sig_q, val_rv); goto delete_dff; } if (sig_d.is_fully_undef() && sig_r.size() && (!has_init || val_init == val_rv)) { - RTLIL::SigSig conn(sig_q, val_rv); - mod->connect(conn); + mod->connect(sig_q, val_rv); goto delete_dff; } if (sig_d.is_fully_undef() && !sig_r.size() && has_init) { - RTLIL::SigSig conn(sig_q, val_init); - mod->connect(conn); + mod->connect(sig_q, val_init); goto delete_dff; } if (sig_d.is_fully_const() && (!sig_r.size() || val_rv == sig_d.as_const()) && (!has_init || val_init == sig_d.as_const())) { - RTLIL::SigSig conn(sig_q, sig_d); - mod->connect(conn); + log_dump(sig_q, sig_d); + mod->connect(sig_q, sig_d); goto delete_dff; } if (sig_d == sig_q && (!sig_r.size() || !has_init || val_init == val_rv)) { - if (sig_r.size()) { - RTLIL::SigSig conn(sig_q, val_rv); - mod->connect(conn); - } - if (has_init) { - RTLIL::SigSig conn(sig_q, val_init); - mod->connect(conn); - } + if (sig_r.size()) + mod->connect(sig_q, val_rv); + if (has_init) + mod->connect(sig_q, val_init); goto delete_dff; } |