diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-27 16:19:24 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-27 16:43:39 +0200 |
commit | 5da343b7de8c4fd45695af68aaba3d5091d8e670 (patch) | |
tree | f5a722324665c4fefed4777b37c054d403ba43f1 /kernel | |
parent | 0c86d6106c3ff4cd7628b1206281eb6080f8bf51 (diff) | |
download | yosys-5da343b7de8c4fd45695af68aaba3d5091d8e670.tar.gz yosys-5da343b7de8c4fd45695af68aaba3d5091d8e670.tar.bz2 yosys-5da343b7de8c4fd45695af68aaba3d5091d8e670.zip |
Added topological sorting to techmap
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/toposort.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/toposort.h b/kernel/toposort.h index 7e978c1e2..4226e270e 100644 --- a/kernel/toposort.h +++ b/kernel/toposort.h @@ -46,7 +46,7 @@ struct TopoSort database[right].insert(left); } - void sort_worker(T n, std::set<T> &marked_cells, std::set<T> &active_cells, std::vector<T> active_stack) + void sort_worker(const T &n, std::set<T> &marked_cells, std::set<T> &active_cells, std::vector<T> &active_stack) { if (active_cells.count(n)) { found_loops = false; @@ -96,6 +96,7 @@ struct TopoSort for (auto &it : database) sort_worker(it.first, marked_cells, active_cells, active_stack); + log_assert(SIZE(sorted) == SIZE(database)); return !found_loops; } }; |