mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-07 03:21:34 +02:00
Improving reports for errors in 'same_nets' cases
This commit is contained in:
@@ -938,8 +938,16 @@ NetlistComparer::compare_circuits (const db::Circuit *c1, const db::Circuit *c2,
|
||||
if (mp_logger) {
|
||||
if (p->second && ! exact_match) {
|
||||
if (m_with_log) {
|
||||
mp_logger->log_entry (db::Error,
|
||||
tl::sprintf (tl::to_string (tr ("Nets %s are paired explicitly, but are not identical topologically")), nets2string (p->first)));
|
||||
if (! p->first.first) {
|
||||
mp_logger->log_entry (db::Error,
|
||||
tl::sprintf (tl::to_string (tr ("Right-side net %s is paired explicitly with a left-side one, but no net is present there")), expanded_name (p->first.second)));
|
||||
} else if (! p->first.second) {
|
||||
mp_logger->log_entry (db::Error,
|
||||
tl::sprintf (tl::to_string (tr ("Left-side net %s is paired explicitly with a right-side one, but no net is present there")), expanded_name (p->first.first)));
|
||||
} else {
|
||||
mp_logger->log_entry (db::Error,
|
||||
tl::sprintf (tl::to_string (tr ("Nets %s are paired explicitly, but are not identical topologically")), nets2string (p->first)));
|
||||
}
|
||||
}
|
||||
mp_logger->net_mismatch (p->first.first, p->first.second);
|
||||
} else {
|
||||
@@ -950,7 +958,11 @@ NetlistComparer::compare_circuits (const db::Circuit *c1, const db::Circuit *c2,
|
||||
} else if (p->second && g1.has_node_index_for_net (p->first.first)) {
|
||||
|
||||
if (mp_logger) {
|
||||
mp_logger->net_mismatch (p->first.first, 0);
|
||||
mp_logger->net_mismatch (p->first.first, p->first.second);
|
||||
if (m_with_log && p->first.second) {
|
||||
mp_logger->log_entry (db::Error,
|
||||
tl::sprintf (tl::to_string (tr ("Nets %s are paired explicitly, but are not identical topologically")), nets2string (p->first)));
|
||||
}
|
||||
}
|
||||
|
||||
size_t ni1 = g1.node_index_for_net (p->first.first);
|
||||
@@ -959,7 +971,11 @@ NetlistComparer::compare_circuits (const db::Circuit *c1, const db::Circuit *c2,
|
||||
} else if (p->second && g2.has_node_index_for_net (p->first.second)) {
|
||||
|
||||
if (mp_logger) {
|
||||
mp_logger->net_mismatch (0, p->first.second);
|
||||
mp_logger->net_mismatch (p->first.first, p->first.second);
|
||||
if (m_with_log && p->first.first) {
|
||||
mp_logger->log_entry (db::Error,
|
||||
tl::sprintf (tl::to_string (tr ("Nets %s are paired explicitly, but are not identical topologically")), nets2string (p->first)));
|
||||
}
|
||||
}
|
||||
|
||||
size_t ni2 = g2.node_index_for_net (p->first.second);
|
||||
|
||||
@@ -73,7 +73,7 @@ nl_compare_debug_indent (size_t depth)
|
||||
|
||||
const std::string var_sep = tl::to_string (tr (" vs. "));
|
||||
|
||||
static std::string
|
||||
std::string
|
||||
expanded_name (const db::Net *a)
|
||||
{
|
||||
if (a == 0) {
|
||||
|
||||
@@ -83,6 +83,7 @@ const size_t unknown_id = std::numeric_limits<size_t>::max () - 1;
|
||||
// Some utilities
|
||||
|
||||
std::string nl_compare_debug_indent (size_t depth);
|
||||
std::string expanded_name (const db::Net *a);
|
||||
std::string nets2string (const db::Net *a, const db::Net *b);
|
||||
std::string nets2string (const std::pair<const db::Net *, const db::Net *> &np);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user