3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-04 10:20:24 +00:00

Preparations for RTLIL::IdString redesign: cleanup of existing code

This commit is contained in:
Clifford Wolf 2014-08-02 00:45:25 +02:00
parent 75ffd1643c
commit 14412e6c95
12 changed files with 71 additions and 32 deletions

View file

@ -193,7 +193,7 @@ static void extract_cell(RTLIL::Cell *cell, bool keepff)
}
}
static std::string remap_name(std::string abc_name)
static std::string remap_name(RTLIL::IdString abc_name)
{
std::stringstream sstr;
sstr << "$abc$" << map_autoidx << "$" << abc_name.substr(1);

View file

@ -64,7 +64,7 @@ struct DeletePass : public Pass {
}
extra_args(args, argidx, design);
std::vector<std::string> delete_mods;
std::vector<RTLIL::IdString> delete_mods;
for (auto &mod_it : design->modules_)
{
@ -92,8 +92,8 @@ struct DeletePass : public Pass {
std::set<RTLIL::Wire*> delete_wires;
std::set<RTLIL::Cell*> delete_cells;
std::set<std::string> delete_procs;
std::set<std::string> delete_mems;
std::set<RTLIL::IdString> delete_procs;
std::set<RTLIL::IdString> delete_mems;
for (auto &it : module->wires_)
if (design->selected(module, it.second))

View file

@ -192,7 +192,7 @@ struct DesignPass : public Pass {
for (auto mod : copy_src_modules)
{
std::string trg_name = as_name.empty() ? mod->name : RTLIL::escape_id(as_name);
std::string trg_name = as_name.empty() ? std::string(mod->name) : RTLIL::escape_id(as_name);
if (copy_to_design->modules_.count(trg_name))
delete copy_to_design->modules_.at(trg_name);

View file

@ -547,7 +547,7 @@ static void select_filter_active_mod(RTLIL::Design *design, RTLIL::Selection &se
return;
}
std::vector<std::string> del_list;
std::vector<RTLIL::IdString> del_list;
for (auto mod_name : sel.selected_modules)
if (mod_name != design->selected_active_module)
del_list.push_back(mod_name);
@ -1322,7 +1322,7 @@ struct CdPass : public Pass {
template<typename T>
static int log_matches(const char *title, std::string pattern, T list)
{
std::vector<std::string> matches;
std::vector<RTLIL::IdString> matches;
for (auto &it : list)
if (pattern.empty() || match_ids(it.first, pattern))