Refine pin mismatch handling so that only 'not used' nets will make a pin match against null.

This commit is contained in:
Matthias Koefferlein 2019-11-24 16:40:45 +01:00
parent afacf7c0b5
commit 0f1dc1d191
2 changed files with 6 additions and 27 deletions

View File

@ -2997,10 +2997,11 @@ NetlistComparer::handle_pin_mismatch (const db::NetGraph &g1, const db::Circuit
const db::NetGraph *graph = pin1 ? &g1 : &g2;
const db::Net *net = c->net_for_pin (pin->id ());
// Nets which are paired with "null" trigger this condition:
// Nets which are paired with "null" are "safely to be ignored" and
// pin matching against "null" is valid.
if (net) {
const db::NetGraphNode &n = graph->node (graph->node_index_for_net (net));
if (n.has_other ()) {
if (n.has_other () && n.other_net_index () == 0) {
if (mp_logger) {
mp_logger->match_pins (pin1, pin2);
}

View File

@ -3573,34 +3573,12 @@ TEST(23_NodesRemovedWithError)
"match_pins $2 $3\n"
"match_pins $3 $4\n"
"match_pins $4 $5\n"
"match_pins (null) BULK\n"
"match_pins (null) $6\n"
"pin_mismatch (null) BULK\n"
"pin_mismatch (null) $6\n"
"match_subcircuits $1 $1\n"
"subcircuit_mismatch $2 $2\n"
"end_circuit INV2PAIR INV2PAIR NOMATCH\n"
"begin_circuit RINGO RINGO\n"
"match_nets OSC OSC\n"
"match_nets $I7 $I7\n"
"match_nets $I6 $I6\n"
"match_nets $I5 $I5\n"
"match_nets $I21 $I13\n"
"match_nets FB FB\n"
"match_nets VSS VSS\n"
"match_nets VDD VDD\n"
"match_nets $I22 $I22\n"
"match_nets $I23 $I23\n"
"match_nets $I24 $I24\n"
"match_nets $I25 $I25\n"
"match_pins FB FB\n"
"match_pins OSC OSC\n"
"match_pins VDD VDD\n"
"match_pins VSS VSS\n"
"match_subcircuits $1 $1\n"
"match_subcircuits $2 $2\n"
"match_subcircuits $3 $3\n"
"match_subcircuits $4 $4\n"
"match_subcircuits $5 $5\n"
"end_circuit RINGO RINGO MATCH"
"circuit_skipped RINGO RINGO"
);
EXPECT_EQ (good, false);
}