projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6983d3f
)
Added constant-clock case to opt_rmdff
author
Clifford Wolf
<clifford@clifford.at>
Sun, 2 Feb 2014 20:09:08 +0000
(21:09 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Sun, 2 Feb 2014 20:09:08 +0000
(21:09 +0100)
passes/opt/opt_rmdff.cc
patch
|
blob
|
history
diff --git
a/passes/opt/opt_rmdff.cc
b/passes/opt/opt_rmdff.cc
index 9ce98004ebab09c7e2a80e2209aacea17ceb8409..a8e2c4121895297701f67075853d296c61f59351 100644
(file)
--- a/
passes/opt/opt_rmdff.cc
+++ b/
passes/opt/opt_rmdff.cc
@@
-92,6
+92,14
@@
static bool handle_dff(RTLIL::Module *mod, RTLIL::Cell *dff)
}
}
+ if (sig_c.is_fully_const()) {
+ if (val_rv.bits.size() == 0)
+ val_rv = RTLIL::Const(RTLIL::State::Sx, sig_q.width);
+ RTLIL::SigSig conn(sig_q, val_rv);
+ mod->connections.push_back(conn);
+ goto delete_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);