From: Eddie Hung Date: Mon, 3 Jun 2019 19:33:47 +0000 (-0700) Subject: Assert that box_unique_id is indeed unique X-Git-Tag: working-ls180~1208^2~215 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d018cd9fe3f65187b7f8a878994dfbc37308d653;p=yosys.git Assert that box_unique_id is indeed unique --- diff --git a/frontends/aiger/aigerparse.cc b/frontends/aiger/aigerparse.cc index c951e1fbb..95335a029 100644 --- a/frontends/aiger/aigerparse.cc +++ b/frontends/aiger/aigerparse.cc @@ -198,11 +198,12 @@ void AigerReader::parse_xaiger() dict box_lookup; for (auto m : design->modules()) { - if (m->name[0] == '$') continue; auto it = m->attributes.find("\\abc_box_id"); if (it == m->attributes.end()) continue; - box_lookup[it->second.as_int()] = m->name; + if (m->name[0] == '$') continue; + auto r = box_lookup.insert(std::make_pair(it->second.as_int(), m->name)); + log_assert(r.second); } // Parse footer (symbol table, comments, etc.)