From: Eddie Hung Date: Tue, 14 Jan 2020 07:23:21 +0000 (-0800) Subject: write_xaiger: fix case of PI and CI and (* keep *) X-Git-Tag: working-ls180~849^2~29 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb7dd7d3741983fafe62b13c4a2d6a21ced06133;p=yosys.git write_xaiger: fix case of PI and CI and (* keep *) --- diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index 8651f3a01..822ba4dec 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -356,6 +356,11 @@ struct XAigerWriter alias_map[O] = b; ci_bits.emplace_back(b); undriven_bits.erase(O); + // If PI and CI, then must be a (* keep *) wire + if (input_bits.erase(O)) { + log_assert(output_bits.count(O)); + log_assert(O.wire->get_bool_attribute(ID::keep)); + } } }