From d3555c667c5057f39e0ea31a518d1f4922f2b2a4 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 23 Apr 2020 16:28:11 -0700 Subject: [PATCH] verific: do not assert if wire not found; warn instead --- frontends/verific/verific.cc | 8 ++++++-- kernel/constids.inc | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontends/verific/verific.cc b/frontends/verific/verific.cc index ae7fcefa7..89606a5bd 100644 --- a/frontends/verific/verific.cc +++ b/frontends/verific/verific.cc @@ -1162,8 +1162,12 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::se if (!type_range->IsTypeEnum()) continue; auto wire = module->wire(RTLIL::escape_id(id_name)); - log_assert(wire); - wire->set_string_attribute(ID(wiretype), type_range->GetTypeName()); + if (!wire) { + if (net->IsUserDeclared()) + log_warning("Unable to find imported net '%s'.\n", net->Name()); + continue; + } + wire->set_string_attribute(ID::wiretype, type_range->GetTypeName()); MapIter mj; char *k, *v; diff --git a/kernel/constids.inc b/kernel/constids.inc index 68a5782fd..c5f672d09 100644 --- a/kernel/constids.inc +++ b/kernel/constids.inc @@ -199,6 +199,7 @@ X(wand) X(whitebox) X(WIDTH) X(wildcard_port_conns) +X(wiretype) X(wor) X(WORDS) X(WR_ADDR) -- 2.30.2