mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-19 10:52:03 +00:00
clk2fflogic: Generate less unused logic when using verific
Verific generates a lot of FFs with an unused async load and we cannot always optimize that away before running clk2fflogic, so check for that special case here.
This commit is contained in:
parent
65145db7e7
commit
4ad13c647e
1 changed files with 4 additions and 1 deletions
|
@ -233,7 +233,10 @@ struct Clk2fflogicPass : public Pass {
|
||||||
qval = past_q;
|
qval = past_q;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ff.has_aload) {
|
// The check for a constant sig_aload is also done by opt_dff, but when using verific and running
|
||||||
|
// clk2fflogic before opt_dff (which does more and possibly unwanted optimizations) this check avoids
|
||||||
|
// generating a lot of extra logic.
|
||||||
|
if (ff.has_aload && ff.sig_aload != (ff.pol_aload ? State::S0 : State::S1)) {
|
||||||
SigSpec sig_aload = wrap_async_control(module, ff.sig_aload, ff.pol_aload, ff.is_fine, NEW_ID);
|
SigSpec sig_aload = wrap_async_control(module, ff.sig_aload, ff.pol_aload, ff.is_fine, NEW_ID);
|
||||||
|
|
||||||
if (!ff.is_fine)
|
if (!ff.is_fine)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue