From: Eddie Hung Date: Sat, 5 Oct 2019 16:06:13 +0000 (-0700) Subject: Error if $currQ not found X-Git-Tag: working-ls180~881^2^2~179 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c6e5d82a62650a48027d35e6d92a7a88ad43a16;p=yosys.git Error if $currQ not found --- diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index 4547b9c09..3e3a8fdc6 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -485,7 +485,11 @@ struct XAigerWriter if (box_module->get_bool_attribute("\\abc9_flop")) { IdString port_name = "\\$currQ"; Wire *w = box_module->wire(port_name); + if (!w) + log_error("'$currQ' is not a wire present in module '%s'.\n", log_id(box_module)); SigSpec rhs = module->wire(stringf("%s.$currQ", cell->name.c_str())); + if (rhs.empty()) + log_error("'%s.$currQ' is not a wire present in module '%s'.\n", log_id(cell), log_id(module)); log_assert(GetSize(w) == GetSize(rhs)); int offset = 0;