From 98b84695bf4382ec09c95a0d9d5e5be93bce0a1e Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 20 Feb 2026 15:18:47 +0100 Subject: [PATCH] Prepare for instance parameter 'dtemp', required by commercial PDKs. Not yet support in the model, silently ignored. --- src/spicelib/devices/bsim4v6/b4v6.c | 2 +- src/spicelib/devices/bsim4v6/b4v6ask.c | 3 +++ src/spicelib/devices/bsim4v6/b4v6par.c | 4 ++++ src/spicelib/devices/bsim4v6/b4v6set.c | 3 ++- src/spicelib/devices/bsim4v6/bsim4v6def.h | 3 +++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/spicelib/devices/bsim4v6/b4v6.c b/src/spicelib/devices/bsim4v6/b4v6.c index 1ecb91625..ee160010d 100644 --- a/src/spicelib/devices/bsim4v6/b4v6.c +++ b/src/spicelib/devices/bsim4v6/b4v6.c @@ -55,7 +55,7 @@ IOPR( "delvt0", BSIM4v6_DELVTO, IF_REAL , "Zero bias threshold voltage variat IOP( "mulu0", BSIM4v6_MULU0, IF_REAL, "Low field mobility multiplier"), IOP( "xgw", BSIM4v6_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "ngcon", BSIM4v6_NGCON, IF_REAL, "Number of gate contacts"), - +IOPU("dtemp", BSIM4v6_DTEMP, IF_REAL, "Instance temperature difference"), IOP( "trnqsmod", BSIM4v6_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4v6_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), diff --git a/src/spicelib/devices/bsim4v6/b4v6ask.c b/src/spicelib/devices/bsim4v6/b4v6ask.c index 64ce8b7bc..d9a025f0e 100644 --- a/src/spicelib/devices/bsim4v6/b4v6ask.c +++ b/src/spicelib/devices/bsim4v6/b4v6ask.c @@ -114,6 +114,9 @@ BSIM4v6instance *here = (BSIM4v6instance*)inst; case BSIM4v6_MULU0: value->rValue = here->BSIM4v6mulu0; return(OK); + case BSIM4v6_DTEMP: + value->rValue = here->BSIM4v6dtemp; + return(OK); case BSIM4v6_XGW: value->rValue = here->BSIM4v6xgw; return(OK); diff --git a/src/spicelib/devices/bsim4v6/b4v6par.c b/src/spicelib/devices/bsim4v6/b4v6par.c index 795fdc77c..f9430ab78 100644 --- a/src/spicelib/devices/bsim4v6/b4v6par.c +++ b/src/spicelib/devices/bsim4v6/b4v6par.c @@ -141,6 +141,10 @@ IFvalue *select) here->BSIM4v6mulu0 = value->rValue; here->BSIM4v6mulu0Given = TRUE; break; + case BSIM4v6_DTEMP: + here->BSIM4v6dtemp = value->rValue; + here->BSIM4v6dtempGiven = TRUE; + return(OK); case BSIM4v6_XGW: here->BSIM4v6xgw = value->rValue; here->BSIM4v6xgwGiven = TRUE; diff --git a/src/spicelib/devices/bsim4v6/b4v6set.c b/src/spicelib/devices/bsim4v6/b4v6set.c index 4ad739c34..3bf919304 100644 --- a/src/spicelib/devices/bsim4v6/b4v6set.c +++ b/src/spicelib/devices/bsim4v6/b4v6set.c @@ -2105,8 +2105,9 @@ BSIM4v6instance **InstArray; here->BSIM4v6xgw = model->BSIM4v6xgw; if (!here->BSIM4v6ngconGiven) here->BSIM4v6ngcon = model->BSIM4v6ngcon; + if (!here->BSIM4v6dtempGiven) + here->BSIM4v6dtemp = 0; - /* Process instance model selectors, some * may override their global counterparts */ diff --git a/src/spicelib/devices/bsim4v6/bsim4v6def.h b/src/spicelib/devices/bsim4v6/bsim4v6def.h index 94ee3b0c0..28f2aba35 100644 --- a/src/spicelib/devices/bsim4v6/bsim4v6def.h +++ b/src/spicelib/devices/bsim4v6/bsim4v6def.h @@ -114,6 +114,7 @@ typedef struct sBSIM4v6instance double BSIM4v6mulu0; double BSIM4v6xgw; double BSIM4v6ngcon; + double BSIM4v6dtemp; /* added here to account stress effect instance dependence */ double BSIM4v6u0temp; @@ -297,6 +298,7 @@ typedef struct sBSIM4v6instance unsigned BSIM4v6mulu0Given :1; unsigned BSIM4v6xgwGiven :1; unsigned BSIM4v6ngconGiven :1; + unsigned BSIM4v6dtempGiven : 1; unsigned BSIM4v6icVDSGiven :1; unsigned BSIM4v6icVGSGiven :1; unsigned BSIM4v6icVBSGiven :1; @@ -2713,6 +2715,7 @@ typedef struct sBSIM4v6model #define BSIM4v6_SC 37 #define BSIM4v6_M 38 #define BSIM4v6_MULU0 39 +#define BSIM4v6_DTEMP 40 /* Global parameters */ #define BSIM4v6_MOD_TEMPEOT 65