diff --git a/src/db/db/dbNetlistCompare.cc b/src/db/db/dbNetlistCompare.cc index d43e813fd..7e49f641d 100644 --- a/src/db/db/dbNetlistCompare.cc +++ b/src/db/db/dbNetlistCompare.cc @@ -926,7 +926,7 @@ public: } else { std::vector::const_iterator in_this = std::lower_bound (nodes_with_same_path.begin (), nodes_with_same_path.end (), n, CompareNodePtr ()); - if (in_this != nodes_with_same_path.end () && *n == **in_this) { + if (in_this != nodes_with_same_path.end () && *n == **in_this && (in_this + 1 == nodes_with_same_path.end () || ! (*n == **(in_this + 1)))) { other_node_index = i->second.first; node_index = node_index_for_net ((*in_this)->net ()); ++count_other; diff --git a/src/db/unit_tests/dbNetlistCompareTests.cc b/src/db/unit_tests/dbNetlistCompareTests.cc index 519f818b8..fb250d97d 100644 --- a/src/db/unit_tests/dbNetlistCompareTests.cc +++ b/src/db/unit_tests/dbNetlistCompareTests.cc @@ -658,8 +658,8 @@ TEST(5_BufferTwoPathsDifferentParameters) EXPECT_EQ (logger.text (), "begin_circuit BUF BUF\n" "match_nets OUT OUT\n" - "match_nets INT $10\n" "match_nets IN IN\n" + "match_ambiguous_nets INT $10\n" "match_nets INT2 $11\n" "match_pins $0 $1\n" "match_pins $1 $3\n" @@ -710,8 +710,8 @@ TEST(5_BufferTwoPathsDifferentParameters) EXPECT_EQ (logger.text (), "begin_circuit BUF BUF\n" "match_nets OUT OUT\n" - "match_nets INT $10\n" "match_nets IN IN\n" + "match_ambiguous_nets INT $10\n" "match_nets INT2 $11\n" "match_pins $0 $1\n" "match_pins $1 $3\n" @@ -736,8 +736,8 @@ TEST(5_BufferTwoPathsDifferentParameters) EXPECT_EQ (logger.text (), "begin_circuit BUF BUF\n" "match_nets OUT OUT\n" - "match_nets INT $10\n" "match_nets IN IN\n" + "match_ambiguous_nets INT $10\n" "match_nets INT2 $11\n" "match_pins $0 $1\n" "match_pins $1 $3\n" @@ -816,8 +816,8 @@ TEST(5_BufferTwoPathsDifferentParameters) EXPECT_EQ (logger.text (), "begin_circuit BUF BUF\n" "match_nets OUT OUT\n" - "match_nets INT $10\n" "match_nets IN IN\n" + "match_ambiguous_nets INT $10\n" "match_nets INT2 $11\n" "match_pins $0 $1\n" "match_pins $1 $3\n" diff --git a/testdata/ruby/dbNetlistCompare.rb b/testdata/ruby/dbNetlistCompare.rb index b955ba481..8f8e254c9 100644 --- a/testdata/ruby/dbNetlistCompare.rb +++ b/testdata/ruby/dbNetlistCompare.rb @@ -460,8 +460,8 @@ END assert_equal(logger.text, <<"END") begin_circuit BUF BUF match_nets OUT OUT -match_nets INT $10 match_nets IN IN +match_ambiguous_nets INT $10 match_nets INT2 $11 match_pins $0 $1 match_pins $1 $3