Merge pull request #184 from YosysHQ/fix_183

common/chain_utils: Don't allow overlapping chains
This commit is contained in:
David Shah 2018-12-19 10:54:44 +00:00 committed by GitHub
commit c46a22cb7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,8 @@ std::vector<CellChain> find_chains(const Context *ctx, F1 cell_type_predicate, F
CellChain chain;
CellInfo *end = start;
while (end != nullptr) {
chain.cells.push_back(end);
if (chained.insert(end->name).second)
chain.cells.push_back(end);
end = get_next(ctx, end);
}
if (chain.cells.size() >= min_length) {