From 8f4e712a1182fadf44dc9280f8c01e5ab9de11f5 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 16 May 2022 16:29:08 +0200 Subject: [PATCH] Preliminary fix to enable the core model with hysteresis. Make error message more verbose. --- src/xspice/mif/mif_inp2.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xspice/mif/mif_inp2.c b/src/xspice/mif/mif_inp2.c index bb603f78a..ef990afa3 100644 --- a/src/xspice/mif/mif_inp2.c +++ b/src/xspice/mif/mif_inp2.c @@ -567,9 +567,13 @@ MIF_INP2A ( param_info = &(DEVices[type]->DEVpublic.param[i]); - if(mdfast->param[i]->is_null) { - if(! param_info->has_default) { - LITERR("Parameter on model has no default"); + /* Don't check for model iron core with hysteresis (type 110) due to always missing defaults */ + /* FIXME: preliminary, bug is generated elsewhere */ + if (mdfast->param[i]->is_null && type != 110) { + if (!param_info->has_default) { + char* 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)) {