Attempt to make LVS compare output a little more predictable with boundary cases

- For unattached subcircuit pins no error should be reported
- For abstract nets, graph propagation through subcircuit pins isn't attempted.
  Abstract nets are only dummy-associated currently.
This commit is contained in:
Matthias Koefferlein
2019-07-06 23:40:49 +02:00
parent 903b1f7505
commit 0e5ecdc36b
3 changed files with 36 additions and 7 deletions
@@ -1402,8 +1402,14 @@ static std::string search_string_from_names (const std::pair<const Obj *, const
bool
NetlistBrowserModel::is_valid_net_pair (const std::pair<const db::Net *, const db::Net *> &nets) const
{
IndexedNetlistModel::circuit_pair net_parent = mp_indexer->parent_of (nets);
return (net_parent.first != 0 || net_parent.second != 0);
if (! nets.first && ! nets.second) {
// this is a valid case: e.g. two matching subcircuit pins without nets attached
// to them
return true;
} else {
IndexedNetlistModel::circuit_pair net_parent = mp_indexer->parent_of (nets);
return (net_parent.first != 0 || net_parent.second != 0);
}
}
db::NetlistCrossReference::Status
@@ -368,7 +368,9 @@ static size_t get_index_of (const Pair &pair, Iter begin, Iter end, std::map<Pai
}
i = cache.find (pair);
tl_assert (i != cache.end ());
if (i == cache.end ()) {
return lay::no_netlist_index;
}
}