projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e8a2ac
)
opt_ffinv: Harden against simple ff/inv loop.
author
Marcelina Kościelnicka
<mwk@0x04.net>
Tue, 7 Jun 2022 02:26:25 +0000
(
04:26
+0200)
committer
Marcelina Kościelnicka
<mwk@0x04.net>
Tue, 7 Jun 2022 06:20:06 +0000
(08:20 +0200)
passes/opt/opt_ffinv.cc
patch
|
blob
|
history
diff --git
a/passes/opt/opt_ffinv.cc
b/passes/opt/opt_ffinv.cc
index fd76dd2be3ea9ad9d646b232656644a752b57158..fe5b59fa5c6401b1b9a331a9730f17c2258836f1 100644
(file)
--- a/
passes/opt/opt_ffinv.cc
+++ b/
passes/opt/opt_ffinv.cc
@@
-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_))) {