From a4fd01b7af06687dcc562478208f903e85d2a204 Mon Sep 17 00:00:00 2001 From: Florian Ballenegger Date: Wed, 29 Jul 2020 19:12:40 +0200 Subject: [PATCH] setting modsimd in spinit will automatically use simd model without changing level or version --- src/spicelib/parser/inpdomod.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/spicelib/parser/inpdomod.c b/src/spicelib/parser/inpdomod.c index 324d994c4..03422cf91 100644 --- a/src/spicelib/parser/inpdomod.c +++ b/src/spicelib/parser/inpdomod.c @@ -7,7 +7,9 @@ Author: 1985 Thomas L. Quarles #include "ngspice/iferrmsg.h" #include "ngspice/inpdefs.h" #include "inpxx.h" - +#ifdef BSIM3v32SIMD +#include "ngspice/cpextern.h" +#endif /*-------------------------------------------------------------- * This fcn takes the model card & examines it. Depending upon * model type, it parses the model line, and then calls @@ -300,15 +302,16 @@ char *INPdomodel(CKTcircuit *ckt, struct card *image, INPtables * tab) } if (prefix("3.2", ver)) { /* version string ver has to start with 3.2 */ #ifdef BSIM3v32SIMD - if((strlen(ver)>5) && (strcmp(&ver[strlen(ver)-4],"simd")==0)) + if(((strlen(ver)>5) && (strcmp(&ver[strlen(ver)-4],"simd")==0)) + || cp_getvar("modsimd", CP_BOOL, NULL, 0) + #if defined(MODSIMD_ALWAYS) + || 1 + #endif + ) type = INPtypelook("BSIM3v32simd"); else - #endif - #if defined(MODSIMD_ALWAYS) - type = INPtypelook("BSIM3v32simd"); - #else - type = INPtypelook("BSIM3v32"); - #endif + #endif /* BSIM3v32SIMD */ + type = INPtypelook("BSIM3v32"); } if ( (strstr(ver, "default")) || (prefix("3.3", ver)) ) { type = INPtypelook("BSIM3");