Error if $currQ not found
authorEddie Hung <eddie@fpgeh.com>
Sat, 5 Oct 2019 16:06:13 +0000 (09:06 -0700)
committerEddie Hung <eddie@fpgeh.com>
Sat, 5 Oct 2019 16:06:13 +0000 (09:06 -0700)
backends/aiger/xaiger.cc

index 4547b9c097686d6f94dc58f1391c6f751a4dd872..3e3a8fdc6c0433bb5f10b35782e1fd84d9728bf9 100644 (file)
@@ -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;