fixed a bug in subcircuit library with cells that have connections to itself
authorClifford Wolf <clifford@clifford.at>
Sun, 9 Feb 2014 14:27:58 +0000 (15:27 +0100)
committerClifford Wolf <clifford@clifford.at>
Sun, 9 Feb 2014 14:27:58 +0000 (15:27 +0100)
libs/subcircuit/subcircuit.cc

index b4e74be6b8e54c2c07e0cc284f40bbf6e600f101..da26387925a5444b9f928d8ed0f3e0acab2953af 100644 (file)
@@ -1064,7 +1064,10 @@ class SubCircuit::SolverWorker
                                        assert(haystack.adjMatrix.at(j).count(haystackNeighbour) > 0);
                                        int haystackEdgeType = haystack.adjMatrix.at(j).at(haystackNeighbour);
 
-                                       for (const auto &otherCandidate : portmapCandidates[needleNeighbour]) {
+                                       std::set<std::map<std::string, std::string>> &candidates =
+                                                       i == needleNeighbour ? thisCandidates : portmapCandidates[needleNeighbour];
+
+                                       for (const auto &otherCandidate : candidates) {
                                                if (diCache.compare(needleEdgeType, haystackEdgeType, testCandidate, otherCandidate))
                                                        goto found_match;
                                        }