sort cell types in "stat" output by name
authorClifford Wolf <clifford@clifford.at>
Fri, 3 Oct 2014 17:21:04 +0000 (19:21 +0200)
committerClifford Wolf <clifford@clifford.at>
Fri, 3 Oct 2014 17:21:04 +0000 (19:21 +0200)
passes/cmds/stat.cc

index b21ba01bac4c0379b78953a5c8fa3753c85d9cbf..51f1f0ca126035ca3c8706d3feb4addb6462a44a 100644 (file)
@@ -33,7 +33,7 @@ struct statdata_t
        STAT_INT_MEMBERS
        #undef X
 
-       std::map<RTLIL::IdString, int> num_cells_by_type;
+       std::map<RTLIL::IdString, int, RTLIL::sort_by_id_str> num_cells_by_type;
 
        statdata_t operator+(const statdata_t &other) const
        {
@@ -147,7 +147,7 @@ struct statdata_t
 statdata_t hierarchy_worker(std::map<RTLIL::IdString, statdata_t> &mod_stat, RTLIL::IdString mod, int level)
 {
        statdata_t mod_data = mod_stat.at(mod);
-       std::map<RTLIL::IdString, int> num_cells_by_type;
+       std::map<RTLIL::IdString, int, RTLIL::sort_by_id_str> num_cells_by_type;
        num_cells_by_type.swap(mod_data.num_cells_by_type);
 
        for (auto &it : num_cells_by_type)