diff --git a/src/db/db/dbNetlistCompare.cc b/src/db/db/dbNetlistCompare.cc index 752bed8cf..49fef7934 100644 --- a/src/db/db/dbNetlistCompare.cc +++ b/src/db/db/dbNetlistCompare.cc @@ -2649,7 +2649,7 @@ NetGraph::derive_node_identities_from_node_set (std::vector data->max_depth) { + if (data->max_depth != std::numeric_limits::max() && depth > data->max_depth) { if (options ()->debug_netcompare) { tl::info << indent_s << "max. depth exhausted (" << depth + 1 << ">" << data->max_depth << ")"; } @@ -2783,7 +2783,7 @@ NetGraph::derive_node_identities_from_node_set (std::vectornum * n_branch > data->max_n_branch) { + } else if (data->max_n_branch != std::numeric_limits::max () && double (nr->num) * double (n_branch) > double (data->max_n_branch)) { if (options ()->debug_netcompare) { tl::info << indent_s << "max. complexity exhausted (" << nr->num << "*" << n_branch << ">" << data->max_n_branch << ") - mismatch."; @@ -2828,8 +2828,8 @@ NetlistComparer::NetlistComparer (NetlistCompareLogger *logger) m_cap_threshold = -1.0; // not set m_res_threshold = -1.0; // not set - m_max_depth = 50; - m_max_n_branch = 500; + m_max_depth = std::numeric_limits::max (); + m_max_n_branch = std::numeric_limits::max (); m_depth_first = true; m_dont_consider_net_names = false; diff --git a/src/db/db/gsiDeclDbNetlistCompare.cc b/src/db/db/gsiDeclDbNetlistCompare.cc index ee10d9365..3b886efcf 100644 --- a/src/db/db/gsiDeclDbNetlistCompare.cc +++ b/src/db/db/gsiDeclDbNetlistCompare.cc @@ -519,6 +519,9 @@ Class decl_dbNetlistComparer ("db", "NetlistComparer", "@brief Sets the maximum seach depth\n" "This value limits the search depth of the backtracking algorithm to the\n" "given number of jumps.\n" + "\n" + "By default, from version 0.27 on the depth is unlimited and can be reduced in cases where runtimes need to be limited at the cost " + "less elaborate matching evaluation.\n" ) + gsi::method ("max_depth", &db::NetlistComparer::max_depth, "@brief Gets the maximum seach depth\n" @@ -531,6 +534,9 @@ Class decl_dbNetlistComparer ("db", "NetlistComparer", "net matches. Backtracking will stop when the maximum number of options\n" "has been exceeded.\n" "\n" + "By default, from version 0.27 on the complexity is unlimited and can be reduced in cases where runtimes need to be limited at the cost " + "less elaborate matching evaluation.\n" + "\n" "As the computational complexity is the square of the branch count,\n" "this value should be adjusted carefully.\n" ) + diff --git a/src/lvs/lvs/built-in-macros/_lvs_netter.rb b/src/lvs/lvs/built-in-macros/_lvs_netter.rb index f80bc7940..ca20ae82f 100644 --- a/src/lvs/lvs/built-in-macros/_lvs_netter.rb +++ b/src/lvs/lvs/built-in-macros/_lvs_netter.rb @@ -616,6 +616,12 @@ module LVS # pursues this "deduction path" in greater depth while with # smaller values, the algorithm prefers picking nets in a random fashion # as the seeds for this deduction path. The default value is 8. + # + # By default, the depth is unlimited, but it may + # be reduced in order to limit the compare runtimes at the cost + # of a less elaborate compare attempt. The preferred solution + # however is to use labels for net name hints which also reduces + # the branch complexity. def max_depth(value) v = value.to_i @@ -638,6 +644,12 @@ module LVS # can be increased at the expense of potentially larger runtimes. # The runtime penality is roughly proportional to the branch # complexity. + # + # By default, the branch complexity is unlimited, but it may + # be reduced in order to limit the compare runtimes at the cost + # of a less elaborate compare attempt. The preferred solution + # however is to use labels for net name hints which also reduces + # the depth. def max_branch_complexity(value) v = value.to_i