From 5893cae6472727a71573cb0826158125a6aa04af Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Tue, 2 Aug 2022 15:55:54 +0200 Subject: [PATCH] aiger: Support $anyinit cells --- backends/aiger/aiger.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backends/aiger/aiger.cc b/backends/aiger/aiger.cc index 547d131ee..800743b22 100644 --- a/backends/aiger/aiger.cc +++ b/backends/aiger/aiger.cc @@ -189,6 +189,17 @@ struct AigerWriter continue; } + if (cell->type == ID($anyinit)) + { + auto sig_d = sigmap(cell->getPort(ID::D)); + auto sig_q = sigmap(cell->getPort(ID::Q)); + for (int i = 0; i < sig_d.size(); i++) { + undriven_bits.erase(sig_q[i]); + ff_map[sig_q[i]] = sig_d[i]; + } + continue; + } + if (cell->type == ID($_AND_)) { SigBit A = sigmap(cell->getPort(ID::A).as_bit());