diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-02-09 15:27:58 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-02-09 15:27:58 +0100 |
commit | d229324420b804df621e945a1c3548311d7fa216 (patch) | |
tree | 1251719ba0c214e2e109683622df7bebd7ec3457 /libs/subcircuit | |
parent | 38469e76861a4ced8c557c86d7818183e2be5eba (diff) | |
download | yosys-d229324420b804df621e945a1c3548311d7fa216.tar.gz yosys-d229324420b804df621e945a1c3548311d7fa216.tar.bz2 yosys-d229324420b804df621e945a1c3548311d7fa216.zip |
fixed a bug in subcircuit library with cells that have connections to itself
Diffstat (limited to 'libs/subcircuit')
-rw-r--r-- | libs/subcircuit/subcircuit.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/subcircuit/subcircuit.cc b/libs/subcircuit/subcircuit.cc index b4e74be6b..da2638792 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; } |