From 698c5ad77e2b5888f6c27b0baea4c55a6c344506 Mon Sep 17 00:00:00 2001 From: dwarning Date: Wed, 21 Nov 2007 16:56:57 +0000 Subject: [PATCH] accept version 3.xx form --- src/spicelib/devices/bsim3/b3check.c | 32 ++++++++++++++-------------- src/spicelib/devices/bsim3/b3set.c | 8 +++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/spicelib/devices/bsim3/b3check.c b/src/spicelib/devices/bsim3/b3check.c index 3d424c110..2faededff 100644 --- a/src/spicelib/devices/bsim3/b3check.c +++ b/src/spicelib/devices/bsim3/b3check.c @@ -30,32 +30,32 @@ FILE *fplog; { pParam = here->pParam; fprintf (fplog, - "BSIM3v3.2 Model (Supports: v3.2 and v3.2.{2,3,4}).\n"); + "BSIM3 Model (Supports: v3.2, v3.2.2, v3.2.3, v3.2.4)\n"); fprintf (fplog, "Parameter Checking.\n"); fprintf (fplog, "Model = %s\n", model->BSIM3modName); fprintf (fplog, "W = %g, L = %g, M = %g\n", here->BSIM3w, here->BSIM3l, here->BSIM3m); - if ((strcmp (model->BSIM3version, "3.2.4")) - && (strcmp (model->BSIM3version, "3.2.3")) - && (strcmp (model->BSIM3version, "3.2.2")) - && (strcmp (model->BSIM3version, "3.2"))) + if ((strcmp(model->BSIM3version, "3.2.4")) && (strcmp(model->BSIM3version, "3.24")) + && (strcmp(model->BSIM3version, "3.2.3")) && (strcmp(model->BSIM3version, "3.23")) + && (strcmp(model->BSIM3version, "3.2.2")) && (strcmp(model->BSIM3version, "3.22")) + && (strcmp(model->BSIM3version, "3.2")) && (strcmp(model->BSIM3version, "3.20"))) { - fprintf (fplog, - "Warning: This model supports BSIM3v3.2 and BSIM3v3.2.{2,3,4}\n"); - fprintf (fplog, - "You specified a wrong version number.\n"); - printf ("Warning: This model supports BSIM3v3.2 and BSIM3v3.2.{2,3,4}\n"); - printf ("You specified a wrong version number.\n"); + fprintf (fplog, + "Warning: This model supports BSIM3v3.2, BSIM3v3.2.2, BSIM3v3.2.3, BSIM3v3.2.4\n"); + fprintf (fplog, + "You specified a wrong version number. Working now with BSIM3v3.2.4.\n"); + printf ("Warning: This model supports BSIM3v3.2, BSIM3v3.2.2, BSIM3v3.2.3, BSIM3v3.2.4\n"); + printf ("You specified a wrong version number. Working now with BSIM3v3.2.4.\n"); } - if (pParam->BSIM3nlx < -pParam->BSIM3leff) - { fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n", + if (pParam->BSIM3nlx < -pParam->BSIM3leff) + { fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n", pParam->BSIM3nlx); - printf("Fatal: Nlx = %g is less than -Leff.\n", + printf("Fatal: Nlx = %g is less than -Leff.\n", pParam->BSIM3nlx); - Fatal_Flag = 1; - } + Fatal_Flag = 1; + } if (model->BSIM3tox <= 0.0) { fprintf(fplog, "Fatal: Tox = %g is not positive.\n", diff --git a/src/spicelib/devices/bsim3/b3set.c b/src/spicelib/devices/bsim3/b3set.c index be2ad4b72..853a3e6d9 100644 --- a/src/spicelib/devices/bsim3/b3set.c +++ b/src/spicelib/devices/bsim3/b3set.c @@ -69,13 +69,13 @@ IFuid tmpName; * is faster than comparing strings. * Paolo Nenzi 2002 */ - if (!strcmp (model->BSIM3version, "3.2.4")) + if ((!strcmp(model->BSIM3version, "3.2.4"))||(!strcmp(model->BSIM3version, "3.24"))) model->BSIM3intVersion = BSIM3V324; - else if (!strcmp (model->BSIM3version, "3.2.3")) + else if ((!strcmp(model->BSIM3version, "3.2.3"))||(!strcmp(model->BSIM3version, "3.23"))) model->BSIM3intVersion = BSIM3V323; - else if (!strcmp (model->BSIM3version, "3.2.2")) + else if ((!strcmp(model->BSIM3version, "3.2.2"))||(!strcmp(model->BSIM3version, "3.22"))) model->BSIM3intVersion = BSIM3V322; - else if (!strcmp (model->BSIM3version, "3.2")) + else if ((!strcmp(model->BSIM3version, "3.2"))||(!strcmp(model->BSIM3version, "3.20"))) model->BSIM3intVersion = BSIM3V32; else model->BSIM3intVersion = BSIM3V3OLD;