From 151fed608443b5dc6839ff357b278c972783552e Mon Sep 17 00:00:00 2001 From: h_vogt Date: Fri, 8 Jul 2016 18:15:35 +0200 Subject: [PATCH] bsim3v3.24: add model parameter lmlt (Channel length scaling) --- src/spicelib/devices/bsim3v32/b3v32.c | 2 ++ src/spicelib/devices/bsim3v32/b3v32ask.c | 2 ++ src/spicelib/devices/bsim3v32/b3v32mask.c | 4 ++++ src/spicelib/devices/bsim3v32/b3v32mpar.c | 6 ++++++ src/spicelib/devices/bsim3v32/b3v32set.c | 8 ++++++++ src/spicelib/devices/bsim3v32/bsim3v32def.h | 6 ++++++ 6 files changed, 28 insertions(+) diff --git a/src/spicelib/devices/bsim3v32/b3v32.c b/src/spicelib/devices/bsim3v32/b3v32.c index 0e026cd56..2209f6a97 100644 --- a/src/spicelib/devices/bsim3v32/b3v32.c +++ b/src/spicelib/devices/bsim3v32/b3v32.c @@ -225,6 +225,8 @@ IOP( "rdc", BSIM3v32_MOD_RDC, IF_REAL, "ACM Parameter: Resistance contact drain IOP( "rsc", BSIM3v32_MOD_RSC, IF_REAL, "ACM Parameter: Resistance contact source side"), IOP( "wmlt", BSIM3v32_MOD_WMLT, IF_REAL, "ACM Parameter: Width shrink factor"), +IOP( "lmlt", BSIM3v32_MOD_LMLT, IF_REAL, "Channel length shrink factor"), + IOP( "alpha0", BSIM3v32_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", BSIM3v32_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM3v32_MOD_BETA0, IF_REAL, "substrate current model parameter"), diff --git a/src/spicelib/devices/bsim3v32/b3v32ask.c b/src/spicelib/devices/bsim3v32/b3v32ask.c index 7d405a936..aa85e5f11 100644 --- a/src/spicelib/devices/bsim3v32/b3v32ask.c +++ b/src/spicelib/devices/bsim3v32/b3v32ask.c @@ -22,12 +22,14 @@ BSIM3v32ask (CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { BSIM3v32instance *here = (BSIM3v32instance*)inst; +BSIM3v32model *model = here->BSIM3v32modPtr; /* for lmlt */ NG_IGNORE(select); switch(which) { case BSIM3v32_L: value->rValue = here->BSIM3v32l; + value->rValue *= model->BSIM3v32lmlt; return(OK); case BSIM3v32_W: value->rValue = here->BSIM3v32w; diff --git a/src/spicelib/devices/bsim3v32/b3v32mask.c b/src/spicelib/devices/bsim3v32/b3v32mask.c index 729801ada..02cb252ab 100644 --- a/src/spicelib/devices/bsim3v32/b3v32mask.c +++ b/src/spicelib/devices/bsim3v32/b3v32mask.c @@ -366,6 +366,10 @@ BSIM3v32mAsk (CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) value->rValue = model->BSIM3v32wmlt; return(OK); + case BSIM3v32_MOD_LMLT: + value->rValue = model->BSIM3v32lmlt; + return(OK); + /* Length dependence */ case BSIM3v32_MOD_LCDSC : value->rValue = model->BSIM3v32lcdsc; diff --git a/src/spicelib/devices/bsim3v32/b3v32mpar.c b/src/spicelib/devices/bsim3v32/b3v32mpar.c index ed5442cf7..a0664a8db 100644 --- a/src/spicelib/devices/bsim3v32/b3v32mpar.c +++ b/src/spicelib/devices/bsim3v32/b3v32mpar.c @@ -478,6 +478,12 @@ BSIM3v32mParam(int param, IFvalue *value, GENmodel *inMod) mod->BSIM3v32wmltGiven = TRUE; break; + /* Length shrink */ + case BSIM3v32_MOD_LMLT: + mod->BSIM3v32lmlt = value->rValue; + mod->BSIM3v32lmltGiven = TRUE; + break; + /* Length dependence */ case BSIM3v32_MOD_LCDSC : mod->BSIM3v32lcdsc = value->rValue; diff --git a/src/spicelib/devices/bsim3v32/b3v32set.c b/src/spicelib/devices/bsim3v32/b3v32set.c index 5f9d90e23..5b7107567 100644 --- a/src/spicelib/devices/bsim3v32/b3v32set.c +++ b/src/spicelib/devices/bsim3v32/b3v32set.c @@ -285,6 +285,9 @@ IFuid tmpName; if (!model->BSIM3v32wmltGiven) model->BSIM3v32wmlt = 1.0; + if (!model->BSIM3v32lmltGiven) + model->BSIM3v32lmlt = 1.0; + /* Length dependence */ if (!model->BSIM3v32lcdscGiven) model->BSIM3v32lcdsc = 0.0; @@ -1039,6 +1042,11 @@ IFuid tmpName; { here->BSIM3v32qNode = 0; } + /* Channel length scaling with lmlt model parameter */ + + if (model->BSIM3v32lmltGiven) + here->BSIM3v32l *= model->BSIM3v32lmlt; + /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ diff --git a/src/spicelib/devices/bsim3v32/bsim3v32def.h b/src/spicelib/devices/bsim3v32/bsim3v32def.h index a913d02df..ba63f0b07 100644 --- a/src/spicelib/devices/bsim3v32/bsim3v32def.h +++ b/src/spicelib/devices/bsim3v32/bsim3v32def.h @@ -490,6 +490,8 @@ typedef struct sBSIM3v32model double BSIM3v32rsc; double BSIM3v32wmlt; + double BSIM3v32lmlt; + /* Length Dependence */ double BSIM3v32lcdsc; double BSIM3v32lcdscb; @@ -954,6 +956,8 @@ typedef struct sBSIM3v32model unsigned BSIM3v32rscGiven :1; unsigned BSIM3v32wmltGiven :1; + unsigned BSIM3v32lmltGiven :1; + /* Length dependence */ unsigned BSIM3v32lcdscGiven :1; unsigned BSIM3v32lcdscbGiven :1; @@ -1786,6 +1790,8 @@ typedef struct sBSIM3v32model #define BSIM3v32_MOD_RSC 717 #define BSIM3v32_MOD_WMLT 718 +#define BSIM3v32_MOD_LMLT 719 + /* device questions */ #define BSIM3v32_DNODE 751 #define BSIM3v32_GNODE 752