3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-05-01 08:03:46 +00:00

cxxrtl: stable TopoSort

This commit is contained in:
Emil J. Tywoniak 2026-04-06 15:09:33 +02:00
parent 41b41fefb3
commit cd49dc7be8

View file

@ -2776,7 +2776,8 @@ struct CxxrtlWorker {
{ {
RTLIL::Module *top_module = nullptr; RTLIL::Module *top_module = nullptr;
std::vector<RTLIL::Module*> modules; std::vector<RTLIL::Module*> modules;
TopoSort<RTLIL::Module*> topo_design; using Order = IdString::compare_ptr_by_name<RTLIL::NamedObject>;
TopoSort<RTLIL::Module*, Order> topo_design;
for (auto module : design->modules()) { for (auto module : design->modules()) {
if (!design->selected_module(module)) if (!design->selected_module(module))
continue; continue;