Allow string-valued parameters to XSPICE device models with no default.

The code model then sees the value NULL.  Needed for the "family"
parameter on logic models, used by automatic bridge insertion.
This commit is contained in:
Giles Atkinson 2022-11-05 21:07:46 +00:00 committed by Holger Vogt
parent 8c69ada5b5
commit 2d0561f386
1 changed files with 8 additions and 1 deletions

View File

@ -568,8 +568,15 @@ MIF_INP2A (
param_info = &(DEVices[type]->DEVpublic.param[i]);
if(mdfast->param[i]->is_null) {
char* emessage;
if(! param_info->has_default) {
LITERR("Parameter on model has no default");
if (param_info->type == MIF_STRING)
continue; // Allow NULL
emessage = tprintf("Parameter %s on model %s has no default",
param_info->name, mdfast->gen.GENmodName);
LITERR(emessage);
tfree(emessage);
gc_end();
return;
} else if((param_info->is_array) && (! param_info->has_conn_ref)) {