aiger: Support $anyinit cells

This commit is contained in:
Jannis Harder 2022-08-02 15:55:54 +02:00
parent 021c3c8da5
commit 5893cae647
1 changed files with 11 additions and 0 deletions

View File

@ -189,6 +189,17 @@ struct AigerWriter
continue; 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_)) if (cell->type == ID($_AND_))
{ {
SigBit A = sigmap(cell->getPort(ID::A).as_bit()); SigBit A = sigmap(cell->getPort(ID::A).as_bit());