summaryrefslogtreecommitdiff
path: root/libs/subcircuit
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-02-09 15:27:58 +0100
committerClifford Wolf <clifford@clifford.at>2014-02-09 15:27:58 +0100
commitd229324420b804df621e945a1c3548311d7fa216 (patch)
tree1251719ba0c214e2e109683622df7bebd7ec3457 /libs/subcircuit
parent38469e76861a4ced8c557c86d7818183e2be5eba (diff)
fixed a bug in subcircuit library with cells that have connections to itself
Diffstat (limited to 'libs/subcircuit')
-rw-r--r--libs/subcircuit/subcircuit.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/subcircuit/subcircuit.cc b/libs/subcircuit/subcircuit.cc
index b4e74be6..da263879 100644
--- a/libs/subcircuit/subcircuit.cc
+++ b/libs/subcircuit/subcircuit.cc
@@ -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;
}