Browse Source

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.
pre-master-46
Giles Atkinson 3 years ago
committed by Holger Vogt
parent
commit
2d0561f386
  1. 9
      src/xspice/mif/mif_inp2.c

9
src/xspice/mif/mif_inp2.c

@ -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)) {

Loading…
Cancel
Save