Refactoring: Renamed RTLIL::Module::cells to cells_
authorClifford Wolf <clifford@clifford.at>
Sat, 26 Jul 2014 23:51:45 +0000 (01:51 +0200)
committerClifford Wolf <clifford@clifford.at>
Sat, 26 Jul 2014 23:51:45 +0000 (01:51 +0200)
61 files changed:
backends/blif/blif.cc
backends/btor/btor.cc
backends/edif/edif.cc
backends/ilang/ilang_backend.cc
backends/intersynth/intersynth.cc
backends/spice/spice.cc
backends/verilog/verilog_backend.cc
frontends/liberty/liberty.cc
kernel/consteval.h
kernel/driver.cc
kernel/modwalker.h
kernel/rtlil.cc
kernel/rtlil.h
manual/CHAPTER_Prog/stubnets.cc
manual/PRESENTATION_Prog/my_cmd.cc
passes/abc/abc.cc
passes/cmds/add.cc
passes/cmds/connect.cc
passes/cmds/connwrappers.cc
passes/cmds/delete.cc
passes/cmds/rename.cc
passes/cmds/scatter.cc
passes/cmds/scc.cc
passes/cmds/select.cc
passes/cmds/setattr.cc
passes/cmds/setundef.cc
passes/cmds/show.cc
passes/cmds/splice.cc
passes/cmds/splitnets.cc
passes/cmds/stat.cc
passes/fsm/fsm_detect.cc
passes/fsm/fsm_expand.cc
passes/fsm/fsm_export.cc
passes/fsm/fsm_extract.cc
passes/fsm/fsm_info.cc
passes/fsm/fsm_map.cc
passes/fsm/fsm_opt.cc
passes/fsm/fsm_recode.cc
passes/hierarchy/hierarchy.cc
passes/hierarchy/submod.cc
passes/memory/memory_collect.cc
passes/memory/memory_dff.cc
passes/memory/memory_map.cc
passes/memory/memory_share.cc
passes/memory/memory_unpack.cc
passes/opt/opt_clean.cc
passes/opt/opt_const.cc
passes/opt/opt_muxtree.cc
passes/opt/opt_reduce.cc
passes/opt/opt_rmdff.cc
passes/opt/opt_share.cc
passes/proc/proc_arst.cc
passes/sat/eval.cc
passes/sat/expose.cc
passes/sat/freduce.cc
passes/sat/sat.cc
passes/sat/share.cc
passes/techmap/dfflibmap.cc
passes/techmap/extract.cc
passes/techmap/simplemap.cc
passes/techmap/techmap.cc

index 7ae9965d5cbf69e9ae4c17aff7b1a6d174c4c2ff..936dea023ecb60cf8556ff8925583427414ae4fe 100644 (file)
@@ -140,7 +140,7 @@ struct BlifDumper
                                fprintf(f, ".names $true\n1\n");
                }
 
-               for (auto &cell_it : module->cells)
+               for (auto &cell_it : module->cells_)
                {
                        RTLIL::Cell *cell = cell_it.second;
 
index f1e95ee1502d4fc8a195273e2338375b0710694f..ef0f0dd8c6b6184d66ae74cebf65e338222273c5 100644 (file)
@@ -192,7 +192,7 @@ struct BtorDumper
                                        if(cell_id == curr_cell)
                                                break;
                                        log(" -- found cell %s\n", cstr(cell_id));
-                                       RTLIL::Cell* cell = module->cells.at(cell_id);
+                                       RTLIL::Cell* cell = module->cells_.at(cell_id);
                                        const RTLIL::SigSpec* cell_output = get_cell_output(cell);
                                        int cell_line = dump_cell(cell);                                
 
@@ -832,7 +832,7 @@ struct BtorDumper
                
                log("creating intermediate wires map\n");
                //creating map of intermediate wires as output of some cell
-               for (auto it = module->cells.begin(); it != module->cells.end(); ++it)
+               for (auto it = module->cells_.begin(); it != module->cells_.end(); ++it)
                {
                        RTLIL::Cell *cell = it->second;
                        const RTLIL::SigSpec* output_sig = get_cell_output(cell);
@@ -911,7 +911,7 @@ struct BtorDumper
                }
 
                log("writing cells\n");
-               for(auto cell_it = module->cells.begin(); cell_it != module->cells.end(); ++cell_it)
+               for(auto cell_it = module->cells_.begin(); cell_it != module->cells_.end(); ++cell_it)
                {
                        dump_cell(cell_it->second);     
                }
index e99d094f70f6382a84abae6b6b79355f264e251c..d23e99e7e82bd5576f37ebedc25485d9296aaac7 100644 (file)
@@ -143,7 +143,7 @@ struct EdifBackend : public Backend {
                        if (module->memories.size() != 0)
                                log_error("Found munmapped emories in module %s: unmapped memories are not supported in EDIF backend!\n", RTLIL::id2cstr(module->name));
 
-                       for (auto cell_it : module->cells)
+                       for (auto cell_it : module->cells_)
                        {
                                RTLIL::Cell *cell = cell_it.second;
                                if (!design->modules.count(cell->type) || design->modules.at(cell->type)->get_bool_attribute("\\blackbox")) {
@@ -215,7 +215,7 @@ struct EdifBackend : public Backend {
                std::map<RTLIL::Module*, std::set<RTLIL::Module*>> module_deps;
                for (auto &mod_it : design->modules) {
                        module_deps[mod_it.second] = std::set<RTLIL::Module*>();
-                       for (auto &cell_it : mod_it.second->cells)
+                       for (auto &cell_it : mod_it.second->cells_)
                                if (design->modules.count(cell_it.second->type) > 0)
                                        module_deps[mod_it.second].insert(design->modules.at(cell_it.second->type));
                }
@@ -280,7 +280,7 @@ struct EdifBackend : public Backend {
                        fprintf(f, "        (contents\n");
                        fprintf(f, "          (instance GND (viewRef VIEW_NETLIST (cellRef GND (libraryRef LIB))))\n");
                        fprintf(f, "          (instance VCC (viewRef VIEW_NETLIST (cellRef VCC (libraryRef LIB))))\n");
-                       for (auto &cell_it : module->cells) {
+                       for (auto &cell_it : module->cells_) {
                                RTLIL::Cell *cell = cell_it.second;
                                fprintf(f, "          (instance %s\n", EDIF_DEF(cell->name));
                                fprintf(f, "            (viewRef VIEW_NETLIST (cellRef %s%s))", EDIF_REF(cell->type),
index c0b7dab9a8b7714fd836bc3f0c3f85c3861f73a2..be4e2777c02729a6801144bcd4e7a7f956af2ed7 100644 (file)
@@ -294,7 +294,7 @@ void ILANG_BACKEND::dump_module(FILE *f, std::string indent, const RTLIL::Module
                                dump_memory(f, indent + "  ", it->second);
                        }
 
-               for (auto it = module->cells.begin(); it != module->cells.end(); it++)
+               for (auto it = module->cells_.begin(); it != module->cells_.end(); it++)
                        if (!only_selected || design->selected(module, it->second)) {
                                if (only_selected)
                                        fprintf(f, "\n");
index 4e8c321bb7ac6fb95873462e3f5a6b437f587a58..a463f5ece74c476fa6b5384f3ee0d9c62333423b 100644 (file)
@@ -128,7 +128,7 @@ struct IntersynthBackend : public Backend {
 
                        if (module->get_bool_attribute("\\blackbox"))
                                continue;
-                       if (module->memories.size() == 0 && module->processes.size() == 0 && module->cells.size() == 0)
+                       if (module->memories.size() == 0 && module->processes.size() == 0 && module->cells_.size() == 0)
                                continue;
 
                        if (selected && !design->selected_whole_module(module->name)) {
@@ -159,7 +159,7 @@ struct IntersynthBackend : public Backend {
                        }
 
                        // Submodules: "std::set<string> celltypes_code" prevents duplicate cell types 
-                       for (auto cell_it : module->cells)
+                       for (auto cell_it : module->cells_)
                        {
                                RTLIL::Cell *cell = cell_it.second;
                                std::string celltype_code, node_code;
index ef31e06a94c942b949b0bf6533a5ab5b588a4fa2..c58e4bec5cfb3a48938d887b8db12ab994ee5348 100644 (file)
@@ -47,7 +47,7 @@ static void print_spice_module(FILE *f, RTLIL::Module *module, RTLIL::Design *de
        SigMap sigmap(module);
        int cell_counter = 0, conn_counter = 0, nc_counter = 0;
 
-       for (auto &cell_it : module->cells)
+       for (auto &cell_it : module->cells_)
        {
                RTLIL::Cell *cell = cell_it.second;
                fprintf(f, "X%d", cell_counter++);
index 5e98a4c546d1b9041e3ec499b4ce891b1757e4ca..098e29f925fa2175554cd35cfddae54ccb4d51ac 100644 (file)
@@ -79,7 +79,7 @@ void reset_auto_counter(RTLIL::Module *module)
        for (auto it = module->wires_.begin(); it != module->wires_.end(); it++)
                reset_auto_counter_id(it->second->name, true);
 
-       for (auto it = module->cells.begin(); it != module->cells.end(); it++) {
+       for (auto it = module->cells_.begin(); it != module->cells_.end(); it++) {
                reset_auto_counter_id(it->second->name, true);
                reset_auto_counter_id(it->second->type, false);
        }
@@ -905,7 +905,7 @@ void dump_module(FILE *f, std::string indent, RTLIL::Module *module)
        if (!noexpr)
        {
                std::set<std::pair<RTLIL::Wire*,int>> reg_bits;
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                {
                        RTLIL::Cell *cell = it.second;
                        if (!reg_ct.cell_known(cell->type) || !cell->has("\\Q"))
@@ -955,7 +955,7 @@ void dump_module(FILE *f, std::string indent, RTLIL::Module *module)
        for (auto it = module->memories.begin(); it != module->memories.end(); it++)
                dump_memory(f, indent + "  ", it->second);
 
-       for (auto it = module->cells.begin(); it != module->cells.end(); it++)
+       for (auto it = module->cells_.begin(); it != module->cells_.end(); it++)
                dump_cell(f, indent + "  ", it->second);
 
        for (auto it = module->processes.begin(); it != module->processes.end(); it++)
index c476de87ad8d6506ed2ffc7238da096963275c1a..0107b974a2b4800ac8eb394844d42eaea2de23ac 100644 (file)
@@ -239,7 +239,7 @@ static void create_ff(RTLIL::Module *module, LibertyAst *node)
        {
                rerun_invert_rollback = false;
 
-               for (auto &it : module->cells) {
+               for (auto &it : module->cells_) {
                        if (it.second->type == "$_INV_" && it.second->get("\\Y") == clk_sig) {
                                clk_sig = it.second->get("\\A");
                                clk_polarity = !clk_polarity;
@@ -316,7 +316,7 @@ static void create_latch(RTLIL::Module *module, LibertyAst *node)
        {
                rerun_invert_rollback = false;
 
-               for (auto &it : module->cells) {
+               for (auto &it : module->cells_) {
                        if (it.second->type == "$_INV_" && it.second->get("\\Y") == enable_sig) {
                                enable_sig = it.second->get("\\A");
                                enable_polarity = !enable_polarity;
index 3a5c5347cfc732b509865c8b3966bf9dc5a486c3..1727d91cf51dd6a91593a9db52b70aba8c25a5df 100644 (file)
@@ -40,7 +40,7 @@ struct ConstEval
                ct.setup_internals();
                ct.setup_stdcells();
 
-               for (auto &it : module->cells) {
+               for (auto &it : module->cells_) {
                        if (!ct.cell_known(it.second->type))
                                continue;
                        for (auto &it2 : it.second->connections())
index 3fbb96580b41df9117db2d75a69e4f4e475ff475..edf23cd20556db9ecefb5f377065d62bded928e5 100644 (file)
@@ -251,7 +251,7 @@ static char *readline_obj_generator(const char *text, int state)
                                if (RTLIL::unescape_id(it.first).substr(0, len) == text)
                                        obj_names.push_back(strdup(RTLIL::id2cstr(it.first.c_str())));
 
-                       for (auto &it : module->cells)
+                       for (auto &it : module->cells_)
                                if (RTLIL::unescape_id(it.first).substr(0, len) == text)
                                        obj_names.push_back(strdup(RTLIL::id2cstr(it.first.c_str())));
 
index a90d739ebdbbda42f1cc386d77b8e2b71091b06e..09f815b8315b15e6714c375c70e88f3487085c8e 100644 (file)
@@ -123,7 +123,7 @@ struct ModWalker
 
                for (auto &it : module->wires_)
                        add_wire(it.second);
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                        if (filter_ct == NULL || filter_ct->cell_known(it.second->type))
                                add_cell(it.second);
        }
index 0cfcf018c68f63fa1c60b04776aaa51abd966688..f307be43e3e7c19f82392f4a56d1be2b35020d40 100644 (file)
@@ -204,7 +204,7 @@ void RTLIL::Selection::optimize(RTLIL::Design *design)
                if (it.second.size() == 0)
                        del_list.push_back(it.first);
                else if (it.second.size() == design->modules[it.first]->wires_.size() + design->modules[it.first]->memories.size() +
-                               design->modules[it.first]->cells.size() + design->modules[it.first]->processes.size())
+                               design->modules[it.first]->cells_.size() + design->modules[it.first]->processes.size())
                        add_list.push_back(it.first);
        for (auto mod_name : del_list)
                selected_members.erase(mod_name);
@@ -280,7 +280,7 @@ RTLIL::Module::~Module()
                delete it->second;
        for (auto it = memories.begin(); it != memories.end(); it++)
                delete it->second;
-       for (auto it = cells.begin(); it != cells.end(); it++)
+       for (auto it = cells_.begin(); it != cells_.end(); it++)
                delete it->second;
        for (auto it = processes.begin(); it != processes.end(); it++)
                delete it->second;
@@ -293,7 +293,7 @@ RTLIL::IdString RTLIL::Module::derive(RTLIL::Design*, std::map<RTLIL::IdString,
 
 size_t RTLIL::Module::count_id(RTLIL::IdString id)
 {
-       return wires_.count(id) + memories.count(id) + cells.count(id) + processes.count(id);
+       return wires_.count(id) + memories.count(id) + cells_.count(id) + processes.count(id);
 }
 
 #ifndef NDEBUG
@@ -730,7 +730,7 @@ void RTLIL::Module::check()
                }
        }
 
-       for (auto &it : cells) {
+       for (auto &it : cells_) {
                assert(it.first == it.second->name);
                assert(it.first.size() > 0 && (it.first[0] == '\\' || it.first[0] == '$'));
                assert(it.second->type.size() > 0 && (it.second->type[0] == '\\' || it.second->type[0] == '$'));
@@ -782,7 +782,7 @@ void RTLIL::Module::cloneInto(RTLIL::Module *new_mod) const
        for (auto &it : memories)
                new_mod->memories[it.first] = new RTLIL::Memory(*it.second);
 
-       for (auto &it : cells)
+       for (auto &it : cells_)
                new_mod->addCell(it.first, it.second);
 
        for (auto &it : processes)
@@ -824,7 +824,7 @@ void RTLIL::Module::add(RTLIL::Cell *cell)
 {
        assert(!cell->name.empty());
        assert(count_id(cell->name) == 0);
-       cells[cell->name] = cell;
+       cells_[cell->name] = cell;
 }
 
 namespace {
@@ -869,8 +869,8 @@ void RTLIL::Module::remove(const std::set<RTLIL::Wire*> &wires)
 
 void RTLIL::Module::remove(RTLIL::Cell *cell)
 {
-       assert(cells.count(cell->name) != 0);
-       cells.erase(cell->name);
+       assert(cells_.count(cell->name) != 0);
+       cells_.erase(cell->name);
        delete cell;
 }
 
@@ -884,8 +884,8 @@ void RTLIL::Module::rename(RTLIL::Wire *wire, RTLIL::IdString new_name)
 
 void RTLIL::Module::rename(RTLIL::Cell *cell, RTLIL::IdString new_name)
 {
-       assert(cells[cell->name] == cell);
-       cells.erase(cell->name);
+       assert(cells_[cell->name] == cell);
+       cells_.erase(cell->name);
        cell->name = new_name;
        add(cell);
 }
@@ -895,8 +895,8 @@ void RTLIL::Module::rename(RTLIL::IdString old_name, RTLIL::IdString new_name)
        assert(count_id(old_name) != 0);
        if (wires_.count(old_name))
                rename(wires_.at(old_name), new_name);
-       else if (cells.count(old_name))
-               rename(cells.at(old_name), new_name);
+       else if (cells_.count(old_name))
+               rename(cells_.at(old_name), new_name);
        else
                log_abort();
 }
index 1d040975bf977d9f52f61a88b52a0675c1d59174..f8d2892f812b4ae62070497fe0d916f1337d3e7f 100644 (file)
@@ -282,7 +282,7 @@ public:
        std::set<RTLIL::IdString> avail_parameters;
        std::map<RTLIL::IdString, RTLIL::Wire*> wires_;
        std::map<RTLIL::IdString, RTLIL::Memory*> memories;
-       std::map<RTLIL::IdString, RTLIL::Cell*> cells;
+       std::map<RTLIL::IdString, RTLIL::Cell*> cells_;
        std::map<RTLIL::IdString, RTLIL::Process*> processes;
        std::vector<RTLIL::SigSig> connections_;
        RTLIL_ATTRIBUTE_MEMBERS
@@ -719,7 +719,7 @@ struct RTLIL::Process {
 template<typename T>
 void RTLIL::Module::rewrite_sigspecs(T functor)
 {
-       for (auto &it : cells)
+       for (auto &it : cells_)
                it.second->rewrite_sigspecs(functor);
        for (auto &it : processes)
                it.second->rewrite_sigspecs(functor);
index 9eacfbcb5830ef8fe6154b39503069906309f1ac..a579074357443470d4d6b3d8aea3a65e652485e8 100644 (file)
@@ -29,7 +29,7 @@ static void find_stub_nets(RTLIL::Design *design, RTLIL::Module *module, bool re
        log("Looking for stub wires in module %s:\n", RTLIL::id2cstr(module->name));
 
        // For all ports on all cells
-       for (auto &cell_iter : module->cells)
+       for (auto &cell_iter : module->cells_)
        for (auto &conn : cell_iter.second->connections())
        {
                // Get the signals on the port
index 0cd1da8082736768bcf7b561ab2c41ff432b8fec..c724ce375928b0e707dc319bded5fe61d3943edd 100644 (file)
@@ -14,7 +14,7 @@ struct MyPass : public Pass {
         log("Modules in current design:\n");
         for (auto &mod : design->modules)
             log("  %s (%zd wires, %zd cells)\n", RTLIL::id2cstr(mod.first),
-                    mod.second->wires_.size(), mod.second->cells.size());
+                    mod.second->wires_.size(), mod.second->cells_.size());
     }
 } MyPass;
 
index 184f143a1f0ffe66397ac2c3ef32167be3a7665e..7ba9424e8502ac1536c1c7f0aac443f43682af13 100644 (file)
@@ -462,7 +462,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
                int best_dff_counter = 0;
                std::map<std::pair<bool, RTLIL::SigSpec>, int> dff_counters;
 
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                {
                        RTLIL::Cell *cell = it.second;
                        if (cell->type != "$_DFF_N_" && cell->type != "$_DFF_P_")
@@ -488,8 +488,8 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
                mark_port(clk_sig);
 
        std::vector<RTLIL::Cell*> cells;
-       cells.reserve(module->cells.size());
-       for (auto &it : module->cells)
+       cells.reserve(module->cells_.size());
+       for (auto &it : module->cells_)
                if (design->selected(current_module, it.second))
                        cells.push_back(it.second);
        for (auto c : cells)
@@ -500,7 +500,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
                        mark_port(RTLIL::SigSpec(wire_it.second));
        }
 
-       for (auto &cell_it : module->cells)
+       for (auto &cell_it : module->cells_)
        for (auto &port_it : cell_it.second->connections())
                mark_port(port_it.second);
        
@@ -696,7 +696,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
                std::map<std::string, int> cell_stats;
                if (builtin_lib)
                {
-                       for (auto &it : mapped_mod->cells) {
+                       for (auto &it : mapped_mod->cells_) {
                                RTLIL::Cell *c = it.second;
                                cell_stats[RTLIL::unescape_id(c->type)]++;
                                if (c->type == "\\ZERO" || c->type == "\\ONE") {
@@ -751,7 +751,7 @@ static void abc_module(RTLIL::Design *design, RTLIL::Module *current_module, std
                }
                else
                {
-                       for (auto &it : mapped_mod->cells)
+                       for (auto &it : mapped_mod->cells_)
                        {
                                RTLIL::Cell *c = it.second;
                                cell_stats[RTLIL::unescape_id(c->type)]++;
index e97bf8fc1fcd42c295d9a2611ec44547c94fc80d..49aa7c98d34127dda31904ea52a7fb178cf08ea0 100644 (file)
@@ -62,7 +62,7 @@ static void add_wire(RTLIL::Design *design, RTLIL::Module *module, std::string n
        if (!flag_global)
                return;
 
-       for (auto &it : module->cells)
+       for (auto &it : module->cells_)
        {
                if (design->modules.count(it.second->type) == 0)
                        continue;
index 99a28d4a0b25fa8a5575c660280d39daa3a57b28..6494ea6f604953b52aadc3458174572f39278162 100644 (file)
@@ -29,7 +29,7 @@ static void unset_drivers(RTLIL::Design *design, RTLIL::Module *module, SigMap &
 
        RTLIL::Wire *dummy_wire = module->addWire(NEW_ID, sig.size());
 
-       for (auto &it : module->cells)
+       for (auto &it : module->cells_)
        for (auto &port : it.second->connections_)
                if (ct.cell_output(it.second->type, port.first))
                        sigmap(port.second).replace(sig, dummy_wire, &port.second);
@@ -169,14 +169,14 @@ struct ConnectPass : public Pass {
                        if (flag_nounset)
                                log_cmd_error("Cant use -port together with -nounset.\n");
 
-                       if (module->cells.count(RTLIL::escape_id(port_cell)) == 0)
+                       if (module->cells_.count(RTLIL::escape_id(port_cell)) == 0)
                                log_cmd_error("Can't find cell %s.\n", port_cell.c_str());
 
                        RTLIL::SigSpec sig;
                        if (!RTLIL::SigSpec::parse_sel(sig, design, module, port_expr))
                                log_cmd_error("Failed to parse port expression `%s'.\n", port_expr.c_str());
 
-                       module->cells.at(RTLIL::escape_id(port_cell))->set(RTLIL::escape_id(port_port), sigmap(sig));
+                       module->cells_.at(RTLIL::escape_id(port_cell))->set(RTLIL::escape_id(port_port), sigmap(sig));
                }
                else
                        log_cmd_error("Expected -set, -unset, or -port.\n");
index 9faeffafac09282ded8d5cd9c92e494784f4c07f..cc8147c53b8f168986700b20a594b1e941729533 100644 (file)
@@ -67,7 +67,7 @@ struct ConnwrappersWorker
                std::map<RTLIL::SigBit, std::pair<bool, RTLIL::SigSpec>> extend_map;
                SigMap sigmap(module);
 
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                {
                        RTLIL::Cell *cell = it.second;
 
@@ -102,7 +102,7 @@ struct ConnwrappersWorker
                        }
                }
 
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                {
                        RTLIL::Cell *cell = it.second;
 
index 460dd96634adaa34530ad3bd6d42b5081ce7264b..2c2c370dd63da214fcc19ba8dc7b1780d4e8c54f 100644 (file)
@@ -103,7 +103,7 @@ struct DeletePass : public Pass {
                                if (design->selected(module, it.second))
                                        delete_mems.insert(it.first);
 
-                       for (auto &it : module->cells) {
+                       for (auto &it : module->cells_) {
                                if (design->selected(module, it.second))
                                        delete_cells.insert(it.second);
                                if ((it.second->type == "$memrd" || it.second->type == "$memwr") &&
index e163e72433dc99ed4bd72f6224ea646b4ff6b445..c8b8160f14857945e3c0c3cd20c88b446ce126a5 100644 (file)
@@ -36,7 +36,7 @@ static void rename_in_module(RTLIL::Module *module, std::string from_name, std::
                        return;
                }
 
-       for (auto &it : module->cells)
+       for (auto &it : module->cells_)
                if (it.first == from_name) {
                        log("Renaming cell %s to %s in module %s.\n", log_id(it.second), log_id(to_name), log_id(module));
                        module->rename(it.second, to_name);
@@ -114,13 +114,13 @@ struct RenamePass : public Pass {
                                module->wires_.swap(new_wires);
 
                                std::map<RTLIL::IdString, RTLIL::Cell*> new_cells;
-                               for (auto &it : module->cells) {
+                               for (auto &it : module->cells_) {
                                        if (it.first[0] == '$' && design->selected(module, it.second))
                                                do it.second->name = stringf("\\_%d_", counter++);
                                                while (module->count_id(it.second->name) > 0);
                                        new_cells[it.second->name] = it.second;
                                }
-                               module->cells.swap(new_cells);
+                               module->cells_.swap(new_cells);
                        }
                }
                else
@@ -144,13 +144,13 @@ struct RenamePass : public Pass {
                                module->wires_.swap(new_wires);
 
                                std::map<RTLIL::IdString, RTLIL::Cell*> new_cells;
-                               for (auto &it : module->cells) {
+                               for (auto &it : module->cells_) {
                                        if (design->selected(module, it.second))
                                                if (it.first[0] == '\\')
                                                        it.second->name = NEW_ID;
                                        new_cells[it.second->name] = it.second;
                                }
-                               module->cells.swap(new_cells);
+                               module->cells_.swap(new_cells);
                        }
                }
                else
index 0b95fe02487885c8a6e85def0da0b4a727b87e90..a1c12f1eead7455a1e4c0f8cb4d92f1053da8846 100644 (file)
@@ -48,7 +48,7 @@ struct ScatterPass : public Pass {
                        if (!design->selected(mod_it.second))
                                continue;
 
-                       for (auto &c : mod_it.second->cells)
+                       for (auto &c : mod_it.second->cells_)
                        for (auto &p : c.second->connections_)
                        {
                                RTLIL::Wire *wire = mod_it.second->addWire(NEW_ID, p.second.size());
index 7e2b2fc9fb350e6bf71c52afa582ad9e22da89ae..c9504341728d6f324169fa15d18a2c85cebfe068 100644 (file)
@@ -118,7 +118,7 @@ struct SccWorker
                        if (design->selected(module, it.second))
                                selectedSignals.add(sigmap(RTLIL::SigSpec(it.second)));
 
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                {
                        RTLIL::Cell *cell = it.second;
 
index 0cabdc06bb999b3936bf64eae97f9e4c1cd85688..306b7a5b18ae08ac0cceec1de201269a53b3b1ad 100644 (file)
@@ -167,7 +167,7 @@ static void select_op_neg(RTLIL::Design *design, RTLIL::Selection &lhs)
                for (auto &it : mod->memories)
                        if (!lhs.selected_member(mod_it.first, it.first))
                                new_sel.selected_members[mod->name].insert(it.first);
-               for (auto &it : mod->cells)
+               for (auto &it : mod->cells_)
                        if (!lhs.selected_member(mod_it.first, it.first))
                                new_sel.selected_members[mod->name].insert(it.first);
                for (auto &it : mod->processes)
@@ -185,7 +185,7 @@ static void select_op_submod(RTLIL::Design *design, RTLIL::Selection &lhs)
        {
                if (lhs.selected_whole_module(mod_it.first))
                {
-                       for (auto &cell_it : mod_it.second->cells)
+                       for (auto &cell_it : mod_it.second->cells_)
                        {
                                if (design->modules.count(cell_it.second->type) == 0)
                                        continue;
@@ -282,7 +282,7 @@ static void select_op_diff(RTLIL::Design *design, RTLIL::Selection &lhs, const R
                                lhs.selected_members[mod->name].insert(it.first);
                        for (auto &it : mod->memories)
                                lhs.selected_members[mod->name].insert(it.first);
-                       for (auto &it : mod->cells)
+                       for (auto &it : mod->cells_)
                                lhs.selected_members[mod->name].insert(it.first);
                        for (auto &it : mod->processes)
                                lhs.selected_members[mod->name].insert(it.first);
@@ -395,7 +395,7 @@ static int select_op_expand(RTLIL::Design *design, RTLIL::Selection &lhs, std::v
                        }
                }
 
-               for (auto &cell : mod->cells)
+               for (auto &cell : mod->cells_)
                for (auto &conn : cell.second->connections())
                {
                        char last_mode = '-';
@@ -742,12 +742,12 @@ static void select_stmt(RTLIL::Design *design, std::string arg)
                                        sel.selected_members[mod->name].insert(it.first);
                } else
                if (arg_memb.substr(0, 2) == "c:") {
-                       for (auto &it : mod->cells)
+                       for (auto &it : mod->cells_)
                                if (match_ids(it.first, arg_memb.substr(2)))
                                        sel.selected_members[mod->name].insert(it.first);
                } else
                if (arg_memb.substr(0, 2) == "t:") {
-                       for (auto &it : mod->cells)
+                       for (auto &it : mod->cells_)
                                if (match_ids(it.second->type, arg_memb.substr(2)))
                                        sel.selected_members[mod->name].insert(it.first);
                } else
@@ -763,7 +763,7 @@ static void select_stmt(RTLIL::Design *design, std::string arg)
                        for (auto &it : mod->memories)
                                if (match_attr(it.second->attributes, arg_memb.substr(2)))
                                        sel.selected_members[mod->name].insert(it.first);
-                       for (auto &it : mod->cells)
+                       for (auto &it : mod->cells_)
                                if (match_attr(it.second->attributes, arg_memb.substr(2)))
                                        sel.selected_members[mod->name].insert(it.first);
                        for (auto &it : mod->processes)
@@ -771,7 +771,7 @@ static void select_stmt(RTLIL::Design *design, std::string arg)
                                        sel.selected_members[mod->name].insert(it.first);
                } else
                if (arg_memb.substr(0, 2) == "r:") {
-                       for (auto &it : mod->cells)
+                       for (auto &it : mod->cells_)
                                if (match_attr(it.second->parameters, arg_memb.substr(2)))
                                        sel.selected_members[mod->name].insert(it.first);
                } else {
@@ -783,7 +783,7 @@ static void select_stmt(RTLIL::Design *design, std::string arg)
                        for (auto &it : mod->memories)
                                if (match_ids(it.first, arg_memb))
                                        sel.selected_members[mod->name].insert(it.first);
-                       for (auto &it : mod->cells)
+                       for (auto &it : mod->cells_)
                                if (match_ids(it.first, arg_memb))
                                        sel.selected_members[mod->name].insert(it.first);
                        for (auto &it : mod->processes)
@@ -1158,7 +1158,7 @@ struct SelectPass : public Pass {
                                        for (auto &it : mod_it.second->memories)
                                                if (sel->selected_member(mod_it.first, it.first))
                                                        LOG_OBJECT("%s/%s\n", id2cstr(mod_it.first), id2cstr(it.first));
-                                       for (auto &it : mod_it.second->cells)
+                                       for (auto &it : mod_it.second->cells_)
                                                if (sel->selected_member(mod_it.first, it.first))
                                                        LOG_OBJECT("%s/%s\n", id2cstr(mod_it.first), id2cstr(it.first));
                                        for (auto &it : mod_it.second->processes)
@@ -1225,7 +1225,7 @@ struct SelectPass : public Pass {
                                        for (auto &it : mod_it.second->memories)
                                                if (sel->selected_member(mod_it.first, it.first))
                                                        total_count++;
-                                       for (auto &it : mod_it.second->cells)
+                                       for (auto &it : mod_it.second->cells_)
                                                if (sel->selected_member(mod_it.first, it.first))
                                                        total_count++;
                                        for (auto &it : mod_it.second->processes)
@@ -1303,8 +1303,8 @@ struct CdPass : public Pass {
                        RTLIL::Module *module = NULL;
                        if (design->modules.count(design->selected_active_module) > 0)
                                module = design->modules.at(design->selected_active_module);
-                       if (module != NULL && module->cells.count(modname) > 0)
-                               modname = module->cells.at(modname)->type;
+                       if (module != NULL && module->cells_.count(modname) > 0)
+                               modname = module->cells_.at(modname)->type;
                }
 
                if (design->modules.count(modname) > 0) {
@@ -1376,7 +1376,7 @@ struct LsPass : public Pass {
                        RTLIL::Module *module = design->modules.at(design->selected_active_module);
                        counter += log_matches("wires", pattern, module->wires_);
                        counter += log_matches("memories", pattern, module->memories);
-                       counter += log_matches("cells", pattern, module->cells);
+                       counter += log_matches("cells", pattern, module->cells_);
                        counter += log_matches("processes", pattern, module->processes);
                }
 
index 0b4f2a8a2741249db69ebe23434a47d2b1ab09a8..ea5221f6db334c64467a0c26af4776e0691fe4e2 100644 (file)
@@ -119,7 +119,7 @@ struct SetattrPass : public Pass {
                                if (design->selected(module, it.second))
                                        do_setunset(it.second->attributes, setunset_list);
 
-                       for (auto &it : module->cells)
+                       for (auto &it : module->cells_)
                                if (design->selected(module, it.second))
                                        do_setunset(it.second->attributes, setunset_list);
 
@@ -171,7 +171,7 @@ struct SetparamPass : public Pass {
                        if (!design->selected(module))
                                continue;
 
-                       for (auto &it : module->cells)
+                       for (auto &it : module->cells_)
                                if (design->selected(module, it.second))
                                        do_setunset(it.second->parameters, setunset_list);
                }
index 82dc1d999f9261ffa922fad67d06f062b12e4165..e7779415d7375916edd634f82d28cde5311814e8 100644 (file)
@@ -134,7 +134,7 @@ struct SetundefPass : public Pass {
                                                undriven_signals.add(sigmap(it.second));
 
                                CellTypes ct(design);
-                               for (auto &it : module->cells)
+                               for (auto &it : module->cells_)
                                for (auto &conn : it.second->connections())
                                        if (!ct.cell_known(it.second->type) || ct.cell_output(it.second->type, conn.first))
                                                undriven_signals.del(sigmap(conn.second));
index 1feb90afbf6ede3365572a38fe8a4dcff96b23fe..18af8dfce325ddd7d1d2e38be5eb6f06a3661535 100644 (file)
@@ -337,7 +337,7 @@ struct ShowWorker
                        fprintf(f, "}\n");
                }
 
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                {
                        if (!design->selected_member(module->name, it.first))
                                continue;
@@ -516,7 +516,7 @@ struct ShowWorker
                                        log("Skipping blackbox module %s.\n", id2cstr(module->name));
                                        continue;
                                } else
-                               if (module->cells.empty() && module->connections().empty() && module->processes.empty()) {
+                               if (module->cells_.empty() && module->connections().empty() && module->processes.empty()) {
                                        log("Skipping empty module %s.\n", id2cstr(module->name));
                                        continue;
                                } else
@@ -695,7 +695,7 @@ struct ShowPass : public Pass {
                        for (auto &mod_it : design->modules) {
                                if (mod_it.second->get_bool_attribute("\\blackbox"))
                                        continue;
-                               if (mod_it.second->cells.empty() && mod_it.second->connections().empty())
+                               if (mod_it.second->cells_.empty() && mod_it.second->connections().empty())
                                        continue;
                                if (design->selected_module(mod_it.first))
                                        modcount++;
index 691d972cfe1d150a2c932a3e3a4c7e82903bfe2a..dcd2f819f5d8dd66d6df68c15b6f1df0ad0d4a01 100644 (file)
@@ -158,7 +158,7 @@ struct SpliceWorker
                                driven_bits.push_back(RTLIL::State::Sm);
                        }
 
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                for (auto &conn : it.second->connections())
                        if (!ct.cell_known(it.second->type) || ct.cell_output(it.second->type, conn.first)) {
                                RTLIL::SigSpec sig = sigmap(conn.second);
@@ -179,7 +179,7 @@ struct SpliceWorker
                                if (design->selected(module, it.second))
                                        selected_bits.add(sigmap(it.second));
 
-               for (auto &it : module->cells) {
+               for (auto &it : module->cells_) {
                        if (!sel_by_wire && !design->selected(module, it.second))
                                continue;
                        for (auto &conn : it.second->connections_)
index accb178ba98fd17b46d25ac57bc6295a90b03390..0998a1622d26dd9ed244e825829998aaccf98999 100644 (file)
@@ -131,7 +131,7 @@ struct SplitnetsPass : public Pass {
 
                                std::map<RTLIL::Wire*, std::set<int>> split_wires_at;
 
-                               for (auto &c : module->cells)
+                               for (auto &c : module->cells_)
                                for (auto &p : c.second->connections())
                                {
                                        if (!ct.cell_known(c.second->type))
index fabf1a73f787c593ab0c3bdd3a24e8c0ddde671b..153226ab5b873f09a95e28245dbf7b1b1bdac8bc 100644 (file)
@@ -90,7 +90,7 @@ namespace
                                num_memory_bits += it.second->width * it.second->size;
                        }
 
-                       for (auto &it : mod->cells) {
+                       for (auto &it : mod->cells_) {
                                if (!design->selected(mod, it.second))
                                        continue;
                                num_cells++;
index cb420f90a7af6f8fda8ba7de7ff03efc1f62e571..e1528f31d2889f713b642b4cec3308489879b66f 100644 (file)
@@ -159,7 +159,7 @@ struct FsmDetectPass : public Pass {
                        sig2driver.clear();
                        sig2user.clear();
                        sig_at_port.clear();
-                       for (auto &cell_it : module->cells)
+                       for (auto &cell_it : module->cells_)
                                for (auto &conn_it : cell_it.second->connections()) {
                                        if (ct.cell_output(cell_it.second->type, conn_it.first) || !ct.cell_known(cell_it.second->type)) {
                                                RTLIL::SigSpec sig = conn_it.second;
index 186ea2fd4f3318d871c9b1b0842f5a88dc103a7b..40ec55c11ca1492201860f764a238f43cce255a0 100644 (file)
@@ -205,7 +205,7 @@ struct FsmExpand
                assign_map.set(module);
                ct.setup_internals();
 
-               for (auto &cell_it : module->cells) {
+               for (auto &cell_it : module->cells_) {
                        RTLIL::Cell *c = cell_it.second;
                        if (ct.cell_known(c->type) && design->selected(mod, c))
                                for (auto &p : c->connections()) {
@@ -262,7 +262,7 @@ struct FsmExpandPass : public Pass {
                        if (!design->selected(mod_it.second))
                                continue;
                        std::vector<RTLIL::Cell*> fsm_cells;
-                       for (auto &cell_it : mod_it.second->cells)
+                       for (auto &cell_it : mod_it.second->cells_)
                                if (cell_it.second->type == "$fsm" && design->selected(mod_it.second, cell_it.second))
                                        fsm_cells.push_back(cell_it.second);
                        for (auto c : fsm_cells) {
index cc328ce34e81b9bfb5dd3afd5813c945c8344947..129e7f9a652812789fab5d50991a164437cad69f 100644 (file)
@@ -176,7 +176,7 @@ struct FsmExportPass : public Pass {
 
                for (auto &mod_it : design->modules)
                        if (design->selected(mod_it.second))
-                               for (auto &cell_it : mod_it.second->cells)
+                               for (auto &cell_it : mod_it.second->cells_)
                                        if (cell_it.second->type == "$fsm" && design->selected(mod_it.second, cell_it.second)) {
                                                attr_it = cell_it.second->attributes.find("\\fsm_export");
                                                if (!flag_noauto || (attr_it != cell_it.second->attributes.end())) {
index 85ff4af2a2cbbf277ba83ea12459ac9a6fae4ca3..64b01064a769e3363693946ad0af070cbc3283df 100644 (file)
@@ -53,7 +53,7 @@ static bool find_states(RTLIL::SigSpec sig, const RTLIL::SigSpec &dff_out, RTLIL
        std::set<sig2driver_entry_t> cellport_list;
        sig2driver.find(sig, cellport_list);
        for (auto &cellport : cellport_list) {
-               RTLIL::Cell *cell = module->cells.at(cellport.first);
+               RTLIL::Cell *cell = module->cells_.at(cellport.first);
                if ((cell->type != "$mux" && cell->type != "$pmux" && cell->type != "$safe_pmux") || cellport.second != "\\Y") {
                        log("  unexpected cell type %s (%s) found in state selection tree.\n", cell->type.c_str(), cell->name.c_str());
                        return false;
@@ -179,7 +179,7 @@ static void extract_fsm(RTLIL::Wire *wire)
        std::set<sig2driver_entry_t> cellport_list;
        sig2driver.find(dff_out, cellport_list);
        for (auto &cellport : cellport_list) {
-               RTLIL::Cell *cell = module->cells.at(cellport.first);
+               RTLIL::Cell *cell = module->cells_.at(cellport.first);
                if ((cell->type != "$dff" && cell->type != "$adff") || cellport.second != "\\Q")
                        continue;
                log("  found %s cell for state register: %s\n", cell->type.c_str(), cell->name.c_str());
@@ -223,7 +223,7 @@ static void extract_fsm(RTLIL::Wire *wire)
        cellport_list.clear();
        sig2trigger.find(dff_out, cellport_list);
        for (auto &cellport : cellport_list) {
-               RTLIL::Cell *cell = module->cells.at(cellport.first);
+               RTLIL::Cell *cell = module->cells_.at(cellport.first);
                RTLIL::SigSpec sig_a = assign_map(cell->get("\\A"));
                RTLIL::SigSpec sig_b = assign_map(cell->get("\\B"));
                RTLIL::SigSpec sig_y = assign_map(cell->get("\\Y"));
@@ -293,7 +293,7 @@ static void extract_fsm(RTLIL::Wire *wire)
        cellport_list.clear();
        sig2driver.find(ctrl_out, cellport_list);
        for (auto &cellport : cellport_list) {
-               RTLIL::Cell *cell = module->cells.at(cellport.first);
+               RTLIL::Cell *cell = module->cells_.at(cellport.first);
                RTLIL::SigSpec port_sig = assign_map(cell->get(cellport.second));
                RTLIL::SigSpec unconn_sig = port_sig.extract(ctrl_out);
                RTLIL::Wire *unconn_wire = module->addWire(stringf("$fsm_unconnect$%s$%d", log_signal(unconn_sig), RTLIL::autoidx++), unconn_sig.size());
@@ -340,7 +340,7 @@ struct FsmExtractPass : public Pass {
 
                        sig2driver.clear();
                        sig2trigger.clear();
-                       for (auto &cell_it : module->cells)
+                       for (auto &cell_it : module->cells_)
                                for (auto &conn_it : cell_it.second->connections()) {
                                        if (ct.cell_output(cell_it.second->type, conn_it.first) || !ct.cell_known(cell_it.second->type)) {
                                                RTLIL::SigSpec sig = conn_it.second;
index f2d0c1a81a62e2050386deef8f4f3d5e55d2cdad..4526939cefd1c6550a81b0aee0e1bbc2da160555 100644 (file)
@@ -45,7 +45,7 @@ struct FsmInfoPass : public Pass {
 
                for (auto &mod_it : design->modules)
                        if (design->selected(mod_it.second))
-                               for (auto &cell_it : mod_it.second->cells)
+                               for (auto &cell_it : mod_it.second->cells_)
                                        if (cell_it.second->type == "$fsm" && design->selected(mod_it.second, cell_it.second)) {
                                                log("\n");
                                                log("FSM `%s' from module `%s':\n", cell_it.second->name.c_str(), mod_it.first.c_str());
index 7ab15954034e75f50986f30d9b26f59af84dcf5c..f6ef12a7a2784342581c6edb0618446275e511bc 100644 (file)
@@ -313,7 +313,7 @@ struct FsmMapPass : public Pass {
                        if (!design->selected(mod_it.second))
                                continue;
                        std::vector<RTLIL::Cell*> fsm_cells;
-                       for (auto &cell_it : mod_it.second->cells)
+                       for (auto &cell_it : mod_it.second->cells_)
                                if (cell_it.second->type == "$fsm" && design->selected(mod_it.second, cell_it.second))
                                        fsm_cells.push_back(cell_it.second);
                        for (auto cell : fsm_cells)
index 1441378a0b6ef3a86d0f6472335523aec463bdeb..165b097478cfc9255a866c483c70b651298038c1 100644 (file)
@@ -290,7 +290,7 @@ struct FsmOptPass : public Pass {
 
                for (auto &mod_it : design->modules) {
                        if (design->selected(mod_it.second))
-                               for (auto &cell_it : mod_it.second->cells)
+                               for (auto &cell_it : mod_it.second->cells_)
                                        if (cell_it.second->type == "$fsm" and design->selected(mod_it.second, cell_it.second))
                                                FsmData::optimize_fsm(cell_it.second, mod_it.second);
                }
index b02287962a158adf6bd30a9b6cdb59166624c8f8..1b2eeb237854d214518f1145c0fddb62b8f26bdd 100644 (file)
@@ -146,7 +146,7 @@ struct FsmRecodePass : public Pass {
 
                for (auto &mod_it : design->modules)
                        if (design->selected(mod_it.second))
-                               for (auto &cell_it : mod_it.second->cells)
+                               for (auto &cell_it : mod_it.second->cells_)
                                        if (cell_it.second->type == "$fsm" && design->selected(mod_it.second, cell_it.second))
                                                fsm_recode(cell_it.second, mod_it.second, fm_set_fsm_file, default_encoding);
 
index a266c3445d6ff387d4875efbe72a8cf9da74dd68..550ec39f0bbd4678d7c3bc956faccb207b1aa90a 100644 (file)
@@ -38,7 +38,7 @@ static void generate(RTLIL::Design *design, const std::vector<std::string> &cell
        std::set<std::string> found_celltypes;
 
        for (auto i1 : design->modules)
-       for (auto i2 : i1.second->cells)
+       for (auto i2 : i1.second->cells_)
        {
                RTLIL::Cell *cell = i2.second;
                if (cell->type[0] == '$' || design->modules.count(cell->type) > 0)
@@ -56,7 +56,7 @@ static void generate(RTLIL::Design *design, const std::vector<std::string> &cell
                log("Generate module for cell type %s:\n", celltype.c_str());
 
                for (auto i1 : design->modules)
-               for (auto i2 : i1.second->cells)
+               for (auto i2 : i1.second->cells_)
                        if (i2.second->type == celltype) {
                                for (auto &conn : i2.second->connections()) {
                                        if (conn.first[0] != '$')
@@ -137,7 +137,7 @@ static bool expand_module(RTLIL::Design *design, RTLIL::Module *module, bool fla
        std::map<RTLIL::Cell*, std::pair<int, int>> array_cells;
        std::string filename;
 
-       for (auto &cell_it : module->cells)
+       for (auto &cell_it : module->cells_)
        {
                RTLIL::Cell *cell = cell_it.second;
 
@@ -252,7 +252,7 @@ static void hierarchy_worker(RTLIL::Design *design, std::set<RTLIL::Module*> &us
                log("Used module: %*s%s\n", indent, "", mod->name.c_str());
        used.insert(mod);
 
-       for (auto &it : mod->cells) {
+       for (auto &it : mod->cells_) {
                if (design->modules.count(it.second->type) > 0)
                        hierarchy_worker(design, used, design->modules[it.second->type], indent+4);
        }
@@ -479,7 +479,7 @@ struct HierarchyPass : public Pass {
                        std::vector<std::pair<RTLIL::Module*,RTLIL::Cell*>> pos_work;
 
                        for (auto &mod_it : design->modules)
-                       for (auto &cell_it : mod_it.second->cells) {
+                       for (auto &cell_it : mod_it.second->cells_) {
                                RTLIL::Cell *cell = cell_it.second;
                                if (design->modules.count(cell->type) == 0)
                                        continue;
index 774aabae123388a0eb8a1d1f4311036f5722e0ec..37410275602e4bdc269a23946642b15d662ed240 100644 (file)
@@ -87,7 +87,7 @@ struct SubmodWorker
                                        flag_signal(conn.second, true, true, true, false, false);
                        }
                }
-               for (auto &it : module->cells) {
+               for (auto &it : module->cells_) {
                        RTLIL::Cell *cell = it.second;
                        if (submod.cells.count(cell) > 0)
                                continue;
@@ -215,7 +215,7 @@ struct SubmodWorker
                        for (auto &it : module->wires_)
                                it.second->attributes.erase("\\submod");
 
-                       for (auto &it : module->cells)
+                       for (auto &it : module->cells_)
                        {
                                RTLIL::Cell *cell = it.second;
                                if (cell->attributes.count("\\submod") == 0 || cell->attributes["\\submod"].bits.size() == 0) {
@@ -239,7 +239,7 @@ struct SubmodWorker
                }
                else
                {
-                       for (auto &it : module->cells)
+                       for (auto &it : module->cells_)
                        {
                                RTLIL::Cell *cell = it.second;
                                if (!design->selected(module, cell))
index a8caf883fe45e82accccc4333a4982f0416ce053..d5995ee0eeca728e280eddafa3b940c7e9e68322 100644 (file)
@@ -61,7 +61,7 @@ static void handle_memory(RTLIL::Module *module, RTLIL::Memory *memory)
        std::vector<RTLIL::Cell*> del_cells;
        std::vector<RTLIL::Cell*> memcells;
 
-       for (auto &cell_it : module->cells) {
+       for (auto &cell_it : module->cells_) {
                RTLIL::Cell *cell = cell_it.second;
                if ((cell->type == "$memwr" || cell->type == "$memrd") && cell->parameters["\\MEMID"].decode_string() == memory->name)
                        memcells.push_back(cell);
index b63b3aec669875b4bddadae0d03ac32e6afeeb0d..bb8b052dcf6ca7977a1601e73e9c0808be894a90 100644 (file)
@@ -38,7 +38,7 @@ static bool find_sig_before_dff(RTLIL::Module *module, RTLIL::SigSpec &sig, RTLI
                if (bit.wire == NULL)
                        continue;
 
-               for (auto &cell_it : module->cells)
+               for (auto &cell_it : module->cells_)
                {
                        RTLIL::Cell *cell = cell_it.second;
 
@@ -120,7 +120,7 @@ static void disconnect_dff(RTLIL::Module *module, RTLIL::SigSpec sig)
 
        RTLIL::SigSpec new_sig = module->addWire(sstr.str(), sig.size());
 
-       for (auto &cell_it : module->cells) {
+       for (auto &cell_it : module->cells_) {
                RTLIL::Cell *cell = cell_it.second;
                if (cell->type == "$dff") {
                        RTLIL::SigSpec new_q = cell->get("\\Q");
@@ -170,7 +170,7 @@ static void handle_rd_cell(RTLIL::Module *module, RTLIL::Cell *cell)
 
 static void handle_module(RTLIL::Design *design, RTLIL::Module *module, bool flag_wr_only)
 {
-       for (auto &cell_it : module->cells) {
+       for (auto &cell_it : module->cells_) {
                if (!design->selected(module, cell_it.second))
                        continue;
                if (cell_it.second->type == "$memwr" && !cell_it.second->parameters["\\CLK_ENABLE"].as_bool())
index 4f166653326020b7c43e80bc4b7aae7d0e82f6a4..4bb0c8ccd24c7627005d9c371c1f0a7328d61687 100644 (file)
@@ -295,7 +295,7 @@ static void handle_cell(RTLIL::Module *module, RTLIL::Cell *cell)
 static void handle_module(RTLIL::Design *design, RTLIL::Module *module)
 {
        std::vector<RTLIL::Cell*> cells;
-       for (auto &it : module->cells)
+       for (auto &it : module->cells_)
                if (it.second->type == "$mem" && design->selected(module, it.second))
                        cells.push_back(it.second);
        for (auto cell : cells)
index 35a28d17d14e3822e566e8c4907b6764161b8666..b25cf73a7e85229078eb3ca4094e18e2f8043ccd 100644 (file)
@@ -143,7 +143,7 @@ struct MemoryShareWorker
                                non_feedback_nets.insert(bits.begin(), bits.end());
                        }
 
-               for (auto cell_it : module->cells)
+               for (auto cell_it : module->cells_)
                {
                        RTLIL::Cell *cell = cell_it.second;
                        bool ignore_data_port = false;
@@ -650,7 +650,7 @@ struct MemoryShareWorker
                std::map<std::string, std::pair<std::vector<RTLIL::Cell*>, std::vector<RTLIL::Cell*>>> memindex;
 
                sigmap_xmux = sigmap;
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                {
                        RTLIL::Cell *cell = it.second;
 
index f08350768f8b451b5aea75f5b0649626c955a3a4..48b83f5fac165a05ac5e3234c6173d0a1f429d69 100644 (file)
@@ -80,11 +80,11 @@ static void handle_memory(RTLIL::Module *module, RTLIL::Cell *memory)
 static void handle_module(RTLIL::Design *design, RTLIL::Module *module)
 {
        std::vector<RTLIL::IdString> memcells;
-       for (auto &cell_it : module->cells)
+       for (auto &cell_it : module->cells_)
                if (cell_it.second->type == "$mem" && design->selected(module, cell_it.second))
                        memcells.push_back(cell_it.first);
        for (auto &it : memcells)
-               handle_memory(module, module->cells.at(it));
+               handle_memory(module, module->cells_.at(it));
 }
 
 struct MemoryUnpackPass : public Pass {
index 9542e10df8433916e2ce10120e94253d60eeb4fe..4cc5fc89a84781c772535f7ddc9a5719f6fc69d2 100644 (file)
@@ -38,7 +38,7 @@ static void rmunused_module_cells(RTLIL::Module *module, bool verbose)
        std::set<RTLIL::Cell*, RTLIL::sort_by_name<RTLIL::Cell>> queue, unused;
 
        SigSet<RTLIL::Cell*> wire2driver;
-       for (auto &it : module->cells) {
+       for (auto &it : module->cells_) {
                RTLIL::Cell *cell = it.second;
                for (auto &it2 : cell->connections()) {
                        if (!ct.cell_input(cell->type, it2.first)) {
@@ -155,7 +155,7 @@ static void rmunused_module_signals(RTLIL::Module *module, bool purge_mode, bool
        SigPool connected_signals;
 
        if (!purge_mode)
-               for (auto &it : module->cells) {
+               for (auto &it : module->cells_) {
                        RTLIL::Cell *cell = it.second;
                        if (ct_reg.cell_known(cell->type))
                                for (auto &it2 : cell->connections())
@@ -168,7 +168,7 @@ static void rmunused_module_signals(RTLIL::Module *module, bool purge_mode, bool
        SigMap assign_map(module);
        std::set<RTLIL::SigSpec> direct_sigs;
        std::set<RTLIL::Wire*> direct_wires;
-       for (auto &it : module->cells) {
+       for (auto &it : module->cells_) {
                RTLIL::Cell *cell = it.second;
                if (ct_all.cell_known(cell->type))
                        for (auto &it2 : cell->connections())
@@ -193,7 +193,7 @@ static void rmunused_module_signals(RTLIL::Module *module, bool purge_mode, bool
 
        SigPool used_signals;
        SigPool used_signals_nodrivers;
-       for (auto &it : module->cells) {
+       for (auto &it : module->cells_) {
                RTLIL::Cell *cell = it.second;
                for (auto &it2 : cell->connections_) {
                        assign_map.apply(it2.second);
index 290d4ffd9c3a7af6cf650f8bb437929955ab5c5e..39e2254e0a6f87faddfd654c9b432a8049004d9d 100644 (file)
@@ -37,7 +37,7 @@ static void replace_undriven(RTLIL::Design *design, RTLIL::Module *module)
        SigPool used_signals;
        SigPool all_signals;
 
-       for (auto &it : module->cells)
+       for (auto &it : module->cells_)
        for (auto &conn : it.second->connections()) {
                if (!ct.cell_known(it.second->type) || ct.cell_output(it.second->type, conn.first))
                        driven_signals.add(sigmap(conn.second));
@@ -199,8 +199,8 @@ static void replace_const_cells(RTLIL::Design *design, RTLIL::Module *module, bo
        std::map<RTLIL::SigSpec, RTLIL::SigSpec> invert_map;
 
        std::vector<RTLIL::Cell*> cells;
-       cells.reserve(module->cells.size());
-       for (auto &cell_it : module->cells)
+       cells.reserve(module->cells_.size());
+       for (auto &cell_it : module->cells_)
                if (design->selected(module, cell_it.second)) {
                        if ((cell_it.second->type == "$_INV_" || cell_it.second->type == "$not" || cell_it.second->type == "$logic_not") &&
                                        cell_it.second->get("\\A").size() == 1 && cell_it.second->get("\\Y").size() == 1)
index 16dedef5833fd1369f4fadaf4ede38bf9bc5a23a..1d4916b5662f7d083769a5ba78309359f485fda3 100644 (file)
@@ -83,7 +83,7 @@ struct OptMuxtreeWorker
                //      .ctrl_sigs
                //      .input_sigs
                //      .const_activated
-               for (auto &cell_it : module->cells)
+               for (auto &cell_it : module->cells_)
                {
                        RTLIL::Cell *cell = cell_it.second;
                        if (cell->type == "$mux" || cell->type == "$pmux" || cell->type == "$safe_pmux")
index 1f8648c45e07efd20738c646ab8c38b78d29bcc4..d7de723537fa3df69d415b2ff8651c5df3547344 100644 (file)
@@ -254,14 +254,14 @@ struct OptReduceWorker
                did_something = true;
 
                SigPool mem_wren_sigs;
-               for (auto &cell_it : module->cells) {
+               for (auto &cell_it : module->cells_) {
                        RTLIL::Cell *cell = cell_it.second;
                        if (cell->type == "$mem")
                                mem_wren_sigs.add(assign_map(cell->get("\\WR_EN")));
                        if (cell->type == "$memwr")
                                mem_wren_sigs.add(assign_map(cell->get("\\EN")));
                }
-               for (auto &cell_it : module->cells) {
+               for (auto &cell_it : module->cells_) {
                        RTLIL::Cell *cell = cell_it.second;
                        if (cell->type == "$dff" && mem_wren_sigs.check_any(assign_map(cell->get("\\Q"))))
                                mem_wren_sigs.add(assign_map(cell->get("\\D")));
@@ -270,7 +270,7 @@ struct OptReduceWorker
                bool keep_expanding_mem_wren_sigs = true;
                while (keep_expanding_mem_wren_sigs) {
                        keep_expanding_mem_wren_sigs = false;
-                       for (auto &cell_it : module->cells) {
+                       for (auto &cell_it : module->cells_) {
                                RTLIL::Cell *cell = cell_it.second;
                                if (cell->type == "$mux" && mem_wren_sigs.check_any(assign_map(cell->get("\\Y")))) {
                                        if (!mem_wren_sigs.check_all(assign_map(cell->get("\\A"))) ||
@@ -295,7 +295,7 @@ struct OptReduceWorker
                                SigSet<RTLIL::Cell*> drivers;
                                std::set<RTLIL::Cell*> cells;
 
-                               for (auto &cell_it : module->cells) {
+                               for (auto &cell_it : module->cells_) {
                                        RTLIL::Cell *cell = cell_it.second;
                                        if (cell->type != type || !design->selected(module, cell))
                                                continue;
@@ -313,7 +313,7 @@ struct OptReduceWorker
 
                        std::vector<RTLIL::Cell*> cells;
 
-                       for (auto &it : module->cells)
+                       for (auto &it : module->cells_)
                                if ((it.second->type == "$mux" || it.second->type == "$pmux" || it.second->type == "$safe_pmux") && design->selected(module, it.second))
                                        cells.push_back(it.second);
 
index b26e8b37e263b081c1ed8b8357d2a882a0c3d785..14b734d7d8f9ddc04a0a655b96a677dbd4d95ca0 100644 (file)
@@ -179,7 +179,7 @@ struct OptRmdffPass : public Pass {
                        mux_drivers.clear();
 
                        std::vector<std::string> dff_list;
-                       for (auto &it : mod_it.second->cells) {
+                       for (auto &it : mod_it.second->cells_) {
                                if (it.second->type == "$mux" || it.second->type == "$pmux") {
                                        if (it.second->get("\\A").size() == it.second->get("\\B").size())
                                                mux_drivers.insert(assign_map(it.second->get("\\Y")), it.second);
@@ -202,8 +202,8 @@ struct OptRmdffPass : public Pass {
                        }
 
                        for (auto &id : dff_list) {
-                               if (mod_it.second->cells.count(id) > 0 &&
-                                               handle_dff(mod_it.second, mod_it.second->cells[id]))
+                               if (mod_it.second->cells_.count(id) > 0 &&
+                                               handle_dff(mod_it.second, mod_it.second->cells_[id]))
                                        total_count++;
                        }
                }
index c91f037d491e9ccfd5a9cd47382b32644bca748c..304ba9f83b481da8c6adbc58470f048efcbd6daa 100644 (file)
@@ -248,8 +248,8 @@ struct OptShareWorker
                        cell_hash_cache.clear();
 #endif
                        std::vector<RTLIL::Cell*> cells;
-                       cells.reserve(module->cells.size());
-                       for (auto &it : module->cells) {
+                       cells.reserve(module->cells_.size());
+                       for (auto &it : module->cells_) {
                                if (ct.cell_known(it.second->type) && design->selected(module, it.second))
                                        cells.push_back(it.second);
                        }
index 565d86a7238d573eebcf9e92fac8853389c31741..63d04d35176d1f6f3c609effe2a450bbca304a51 100644 (file)
@@ -33,7 +33,7 @@ static bool check_signal(RTLIL::Module *mod, RTLIL::SigSpec signal, RTLIL::SigSp
        if (signal == ref)
                return true;
 
-       for (auto &cell_it : mod->cells) {
+       for (auto &cell_it : mod->cells_) {
                RTLIL::Cell *cell = cell_it.second;
                if (cell->type == "$reduce_or" && cell->get("\\Y") == signal)
                        return check_signal(mod, cell->get("\\A"), ref, polarity);
index d4ff2a86c48a9c7f54f7c4c19fe912f72bb850ac..454233267adcc3e3ebb76bb63d1eabac285171d2 100644 (file)
@@ -147,7 +147,7 @@ struct VlogHammerReporter
                SatGen satgen(&ez, &sigmap);
                satgen.model_undef = model_undef;
 
-               for (auto &c : module->cells)
+               for (auto &c : module->cells_)
                        if (!satgen.importCell(c.second))
                                log_error("Failed to import cell %s (type %s) to SAT database.\n", RTLIL::id2cstr(c.first), RTLIL::id2cstr(c.second->type));
 
index c30e6e0c8209260cfb390ab16f74dc46928ba766..24b812bb2782310612b1e2549e69bc737a495381 100644 (file)
@@ -82,7 +82,7 @@ static void find_dff_wires(std::set<std::string> &dff_wires, RTLIL::Module *modu
        SigMap sigmap(module);
        SigPool dffsignals;
 
-       for (auto &it : module->cells) {
+       for (auto &it : module->cells_) {
                if (ct.cell_known(it.second->type) && it.second->has("\\Q"))
                        dffsignals.add(sigmap(it.second->get("\\Q")));
        }
@@ -98,7 +98,7 @@ static void create_dff_dq_map(std::map<std::string, dff_map_info_t> &map, RTLIL:
        std::map<RTLIL::SigBit, dff_map_bit_info_t> bit_info;
        SigMap sigmap(module);
 
-       for (auto &it : module->cells)
+       for (auto &it : module->cells_)
        {
                if (!design->selected(module, it.second))
                        continue;
@@ -371,7 +371,7 @@ struct ExposePass : public Pass {
                                                                shared_wires.insert(it.first);
 
                                        if (flag_evert)
-                                               for (auto &it : module->cells)
+                                               for (auto &it : module->cells_)
                                                        if (design->selected(module, it.second) && consider_cell(design, dff_cells[module], it.second))
                                                                shared_cells.insert(it.first);
 
@@ -409,16 +409,16 @@ struct ExposePass : public Pass {
                                                {
                                                        RTLIL::Cell *cell;
 
-                                                       if (module->cells.count(it) == 0)
+                                                       if (module->cells_.count(it) == 0)
                                                                goto delete_shared_cell;
 
-                                                       cell = module->cells.at(it);
+                                                       cell = module->cells_.at(it);
 
                                                        if (!design->selected(module, cell))
                                                                goto delete_shared_cell;
                                                        if (!consider_cell(design, dff_cells[module], cell))
                                                                goto delete_shared_cell;
-                                                       if (!compare_cells(first_module->cells.at(it), cell))
+                                                       if (!compare_cells(first_module->cells_.at(it), cell))
                                                                goto delete_shared_cell;
 
                                                        if (0)
@@ -475,7 +475,7 @@ struct ExposePass : public Pass {
 
                        if (flag_cut)
                        {
-                               for (auto &it : module->cells) {
+                               for (auto &it : module->cells_) {
                                        if (!ct.cell_known(it.second->type))
                                                continue;
                                        for (auto &conn : it.second->connections_)
@@ -503,7 +503,7 @@ struct ExposePass : public Pass {
                                RTLIL::Wire *wire_dummy_q = add_new_wire(module, NEW_ID, 0);
 
                                for (auto &cell_name : info.cells) {
-                                       RTLIL::Cell *cell = module->cells.at(cell_name);
+                                       RTLIL::Cell *cell = module->cells_.at(cell_name);
                                        std::vector<RTLIL::SigBit> cell_q_bits = sigmap(cell->get("\\Q")).to_sigbit_vector();
                                        for (auto &bit : cell_q_bits)
                                                if (wire_bits_set.count(bit))
@@ -571,7 +571,7 @@ struct ExposePass : public Pass {
                        {
                                std::vector<RTLIL::Cell*> delete_cells;
 
-                               for (auto &it : module->cells)
+                               for (auto &it : module->cells_)
                                {
                                        if (flag_shared) {
                                                if (shared_cells.count(it.first) == 0)
index 5d23318cea8668e756edc7971156898a23f43ffa..f8d5cf6c43dba9e1fc74e0849847159c82e91f2e 100644 (file)
@@ -607,7 +607,7 @@ struct FreduceWorker
                                batches.push_back(sigmap(it.second).to_sigbit_set());
                                bits_full_total += it.second->width;
                        }
-               for (auto &it : module->cells) {
+               for (auto &it : module->cells_) {
                        if (ct.cell_known(it.second->type)) {
                                std::set<RTLIL::SigBit> inputs, outputs;
                                for (auto &port : it.second->connections()) {
index 90c671165c1a6d85cb48cbfcb38baac323ae5d37..3e1c722243a44ec6a08bf60e7e6b6c43834ec113 100644 (file)
@@ -317,7 +317,7 @@ struct SatHelper
                }
 
                int import_cell_counter = 0;
-               for (auto &c : module->cells)
+               for (auto &c : module->cells_)
                        if (design->selected(module, c.second)) {
                                // log("Import cell: %s\n", RTLIL::id2cstr(c.first));
                                if (satgen.importCell(c.second, timestep)) {
index 0ee5af1863bd2bc275ee59a96ed398bc09cc4470..facacf1960ba5a2f044ffa1e943637748c5f2907 100644 (file)
@@ -61,7 +61,7 @@ struct ShareWorker
 
                queue_bits.insert(modwalker.signal_outputs.begin(), modwalker.signal_outputs.end());
 
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                        if (!fwd_ct.cell_known(it.second->type)) {
                                std::set<RTLIL::SigBit> &bits = modwalker.cell_inputs[it.second];
                                queue_bits.insert(bits.begin(), bits.end());
@@ -101,7 +101,7 @@ struct ShareWorker
 
        void find_shareable_cells()
        {
-               for (auto &it : module->cells)
+               for (auto &it : module->cells_)
                {
                        RTLIL::Cell *cell = it.second;
 
index eabc56bd2102f4977d451cfd1c2c556e00d1991c..01284656d03fed1d196fa3bcd8ec0ddce684b993 100644 (file)
@@ -388,7 +388,7 @@ static void dfflibmap(RTLIL::Design *design, RTLIL::Module *module)
        log("Mapping DFF cells in module `%s':\n", module->name.c_str());
 
        std::vector<RTLIL::Cell*> cell_list;
-       for (auto &it : module->cells) {
+       for (auto &it : module->cells_) {
                if (design->selected(module, it.second) && cell_mappings.count(it.second->type) > 0)
                        cell_list.push_back(it.second);
        }
index 813e0e3e1b7c8d38e6ef00cdbd66ffbc678ee947..b66a11b8555f6f034279cf8c461f2222835ed004 100644 (file)
@@ -182,7 +182,7 @@ namespace
 
                std::map<std::pair<RTLIL::Wire*, int>, int> sig_use_count;
                if (max_fanout > 0)
-                       for (auto &cell_it : mod->cells)
+                       for (auto &cell_it : mod->cells_)
                        {
                                RTLIL::Cell *cell = cell_it.second;
                                if (!sel || sel->selected(mod, cell))
@@ -196,7 +196,7 @@ namespace
                        }
 
                // create graph nodes from cells
-               for (auto &cell_it : mod->cells)
+               for (auto &cell_it : mod->cells_)
                {
                        RTLIL::Cell *cell = cell_it.second;
                        if (sel && !sel->selected(mod, cell))
@@ -253,7 +253,7 @@ namespace
                }
 
                // mark external signals (used in non-selected cells)
-               for (auto &cell_it : mod->cells)
+               for (auto &cell_it : mod->cells_)
                {
                        RTLIL::Cell *cell = cell_it.second;
                        if (sel && !sel->selected(mod, cell))
index 355c07c840089f75cc90d981f9c339b9bbcdd678..8c7f64230063a83066e006fca4cb1d28526faf64 100644 (file)
@@ -439,7 +439,7 @@ struct SimplemapPass : public Pass {
                        if (!design->selected(mod_it.second))
                                continue;
                        std::vector<RTLIL::Cell*> delete_cells;
-                       for (auto &cell_it : mod_it.second->cells) {
+                       for (auto &cell_it : mod_it.second->cells_) {
                                if (mappers.count(cell_it.second->type) == 0)
                                        continue;
                                if (!design->selected(mod_it.second, cell_it.second))
index 03aac6693cd7cc869f388438d58a965147f1080f..86d9e73ae3c2e954d449f52b0d1fe1a69f4f777d 100644 (file)
@@ -116,7 +116,7 @@ struct TechmapWorker
 
                std::string orig_cell_name;
                if (!flatten_mode)
-                       for (auto &it : tpl->cells)
+                       for (auto &it : tpl->cells_)
                                if (it.first == "\\_TECHMAP_REPLACE_") {
                                        orig_cell_name = cell->name;
                                        module->rename(cell, stringf("$techmap%d", RTLIL::autoidx++) + cell->name);
@@ -180,7 +180,7 @@ struct TechmapWorker
                        }
                }
 
-               for (auto &it : tpl->cells)
+               for (auto &it : tpl->cells_)
                {
                        RTLIL::IdString c_name = it.second->name;
 
@@ -224,15 +224,15 @@ struct TechmapWorker
                std::vector<std::string> cell_names;
 
                SigMap sigmap(module);
-               for (auto &cell_it : module->cells)
+               for (auto &cell_it : module->cells_)
                        cell_names.push_back(cell_it.first);
 
                for (auto &cell_name : cell_names)
                {
-                       if (module->cells.count(cell_name) == 0)
+                       if (module->cells_.count(cell_name) == 0)
                                continue;
 
-                       RTLIL::Cell *cell = module->cells[cell_name];
+                       RTLIL::Cell *cell = module->cells_[cell_name];
 
                        if (!design->selected(module, cell) || handled_cells.count(cell) > 0)
                                continue;