Add warning when too many parameter overrides are provided for a module instantiation
This commit is contained in:
parent
956f6ccf4c
commit
7e40f5ac52
|
|
@ -1534,8 +1534,21 @@ void PGModule::elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*s
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (jdx == overrides_->end())
|
if (jdx == overrides_->end())
|
||||||
break;
|
break;
|
||||||
if (cur == mod->param_names.end())
|
// If we reached here we have more overrides than
|
||||||
|
// module parameters, so print a warning.
|
||||||
|
if (cur == mod->param_names.end()) {
|
||||||
|
cerr << get_fileline() << ": warning: "
|
||||||
|
"ignoring "
|
||||||
|
<< overrides_->size() -
|
||||||
|
mod->param_names.size()
|
||||||
|
<< " extra parameter override(s) for "
|
||||||
|
"instance '" << use_name
|
||||||
|
<< "' of module '" << mod->mod_name()
|
||||||
|
<< "' which expects "
|
||||||
|
<< mod->param_names.size()
|
||||||
|
<< " parameter(s)." << endl;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// No expression means that the parameter is not
|
// No expression means that the parameter is not
|
||||||
// replaced at all.
|
// replaced at all.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue