3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

functional backend: topological sort starts with the output and next states nodes, other nodes get deleted

This commit is contained in:
Emily Schmidt 2024-07-25 10:35:32 +01:00
parent 7ac0e92d35
commit 8c0f625c3a
5 changed files with 62 additions and 28 deletions

View file

@ -183,7 +183,7 @@ struct ExampleDtPass : public Pass
std::vector<int> perm;
topo_sorted_sccs(compute_graph_scc, [&](int *begin, int *end) {
TopoSortedSccs(compute_graph_scc, [&](int *begin, int *end) {
perm.insert(perm.end(), begin, end);
if (end > begin + 1)
{
@ -192,7 +192,7 @@ struct ExampleDtPass : public Pass
log(" %d", *i);
log("\n");
}
}, /* sources_first */ true);
}).process_sources().process_all();
compute_graph.permute(perm);