mirror of https://github.com/KLayout/klayout.git
Fixing issue #2252 (internal error on netlist compare)
This commit is contained in:
parent
6ad326e806
commit
5b0e9f146f
|
|
@ -1862,34 +1862,37 @@ NetlistComparer::do_subcircuit_assignment (const db::Circuit *c1, const db::NetG
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == unmatched_a.end () || j == unmatched_b.end ()) {
|
if (i == unmatched_a.end () || j == unmatched_b.end ()) {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
unmatched_list::iterator ii = i, jj = j;
|
} else if (i->first.size () == j->first.size ()) {
|
||||||
++i, ++j;
|
|
||||||
size_t n = ii->first.size ();
|
|
||||||
tl_assert (n == jj->first.size ());
|
|
||||||
|
|
||||||
while (i != unmatched_a.end () && i->first.size () == n) {
|
unmatched_list::iterator ii = i, jj = j;
|
||||||
++i;
|
++i, ++j;
|
||||||
}
|
size_t n = ii->first.size ();
|
||||||
|
|
||||||
while (j != unmatched_b.end () && j->first.size () == n) {
|
while (i != unmatched_a.end () && i->first.size () == n) {
|
||||||
++j;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
align (ii, i, jj, j, KeyDistance ());
|
while (j != unmatched_b.end () && j->first.size () == n) {
|
||||||
|
++j;
|
||||||
|
}
|
||||||
|
|
||||||
for ( ; ii != i && jj != j; ++ii, ++jj) {
|
align (ii, i, jj, j, KeyDistance ());
|
||||||
mp_logger->subcircuit_mismatch (ii->second, jj->second);
|
|
||||||
}
|
|
||||||
|
|
||||||
for ( ; jj != j; ++jj) {
|
for ( ; ii != i && jj != j; ++ii, ++jj) {
|
||||||
mp_logger->subcircuit_mismatch (0, jj->second);
|
mp_logger->subcircuit_mismatch (ii->second, jj->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for ( ; jj != j; ++jj) {
|
||||||
|
mp_logger->subcircuit_mismatch (0, jj->second);
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( ; ii != i; ++ii) {
|
||||||
|
mp_logger->subcircuit_mismatch (ii->second, 0);
|
||||||
|
}
|
||||||
|
|
||||||
for ( ; ii != i; ++ii) {
|
|
||||||
mp_logger->subcircuit_mismatch (ii->second, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue