mirror of https://github.com/YosysHQ/yosys.git
verific: Handle crash when using empty box option
This commit is contained in:
parent
3c67d9f779
commit
912b38eedb
|
@ -1471,7 +1471,8 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
|
|||
FOREACH_PARAMETER_OF_NETLIST(nl, mi, param_name, param_value) {
|
||||
module->avail_parameters(RTLIL::escape_id(param_name));
|
||||
const TypeRange *tr = nl->GetTypeRange(param_name) ;
|
||||
module->parameter_default_values[RTLIL::escape_id(param_name)] = verific_const(tr->GetTypeName(), param_value, nl);
|
||||
const char* type_name = (tr) ? tr->GetTypeName() : nullptr;
|
||||
module->parameter_default_values[RTLIL::escape_id(param_name)] = verific_const(type_name, param_value, nl);
|
||||
}
|
||||
|
||||
SetIter si;
|
||||
|
@ -2171,7 +2172,8 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
|
|||
if (is_blackbox(inst->View())) {
|
||||
FOREACH_PARAMETER_OF_INST(inst, mi2, param_name, param_value) {
|
||||
const TypeRange *tr = inst->View()->GetTypeRange(param_name) ;
|
||||
cell->setParam(RTLIL::escape_id(param_name), verific_const(tr->GetTypeName(), param_value, inst->View()));
|
||||
const char* type_name = (tr) ? tr->GetTypeName() : nullptr;
|
||||
cell->setParam(RTLIL::escape_id(param_name), verific_const(type_name, param_value, inst->View()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue