mirror of https://github.com/YosysHQ/yosys.git
Bugfix in chparam
This commit is contained in:
parent
caa274ada6
commit
77e89399a6
|
@ -45,7 +45,7 @@ struct setunset_t
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void do_setunset(dict<RTLIL::IdString, RTLIL::Const> &attrs, std::vector<setunset_t> &list)
|
static void do_setunset(dict<RTLIL::IdString, RTLIL::Const> &attrs, const std::vector<setunset_t> &list)
|
||||||
{
|
{
|
||||||
for (auto &item : list)
|
for (auto &item : list)
|
||||||
if (item.unset)
|
if (item.unset)
|
||||||
|
@ -217,6 +217,8 @@ struct ChparamPass : public Pass {
|
||||||
}
|
}
|
||||||
extra_args(args, argidx, design);
|
extra_args(args, argidx, design);
|
||||||
|
|
||||||
|
do_setunset(new_parameters, setunset_list);
|
||||||
|
|
||||||
if (list_mode) {
|
if (list_mode) {
|
||||||
if (!new_parameters.empty())
|
if (!new_parameters.empty())
|
||||||
log_cmd_error("The options -set and -list cannot be used together.\n");
|
log_cmd_error("The options -set and -list cannot be used together.\n");
|
||||||
|
@ -229,11 +231,8 @@ struct ChparamPass : public Pass {
|
||||||
}
|
}
|
||||||
|
|
||||||
pool<IdString> modnames, old_modnames;
|
pool<IdString> modnames, old_modnames;
|
||||||
for (auto module : design->selected_modules()) {
|
for (auto module : design->selected_whole_modules_warn()) {
|
||||||
if (design->selected_whole_module(module))
|
modnames.insert(module->name);
|
||||||
modnames.insert(module->name);
|
|
||||||
else
|
|
||||||
log_warning("Ignoring partially selected module %s.\n", log_id(module));
|
|
||||||
old_modnames.insert(module->name);
|
old_modnames.insert(module->name);
|
||||||
}
|
}
|
||||||
modnames.sort();
|
modnames.sort();
|
||||||
|
|
Loading…
Reference in New Issue