mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-06 17:44:09 +00:00
opt_ffinv: Harden against simple ff/inv loop.
This commit is contained in:
parent
9e8a2ac051
commit
d07828b409
|
@ -72,6 +72,8 @@ struct OptFfInvWorker
|
|||
for (auto &port: q_ports) {
|
||||
if (port.cell == ff.cell && port.port == ID::Q)
|
||||
continue;
|
||||
if (port.cell == d_inv)
|
||||
return false;
|
||||
if (port.port != ID::A)
|
||||
return false;
|
||||
if (!port.cell->type.in(ID($not), ID($_NOT_), ID($lut)))
|
||||
|
@ -148,6 +150,8 @@ struct OptFfInvWorker
|
|||
for (auto &port: q_ports) {
|
||||
if (port.cell == ff.cell && port.port == ID::Q)
|
||||
continue;
|
||||
if (port.cell == d_lut)
|
||||
return false;
|
||||
if (port.port != ID::A)
|
||||
return false;
|
||||
if (port.cell->type.in(ID($not), ID($_NOT_))) {
|
||||
|
|
Loading…
Reference in a new issue