diff --git a/backends/aiger/aiger.cc b/backends/aiger/aiger.cc index 2ea999dc0..513f9d95a 100644 --- a/backends/aiger/aiger.cc +++ b/backends/aiger/aiger.cc @@ -202,7 +202,7 @@ struct AigerWriter ff_map[Q] = D; if (cell->type != ID($_FF_)) { - auto sig_clk = sigmap(cell->getPort(ID::CLK).as_bit()); + auto sig_clk = sigmap(cell->getPort(ID::C).as_bit()); ywmap_clocks[sig_clk] |= cell->type == ID($_DFF_N_) ? 2 : 1; } continue; diff --git a/tests/various/aiger_dff.ys b/tests/various/aiger_dff.ys new file mode 100644 index 000000000..057f3d774 --- /dev/null +++ b/tests/various/aiger_dff.ys @@ -0,0 +1,7 @@ +read_verilog -icells <