From e7fbeb6705659eb70cf99dcb1d82ee27ec77c00f Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 4 Nov 2007 19:39:46 +0000 Subject: [PATCH] consistent naming convention 4v4 --- src/spicelib/devices/bsim4v4/B4TERMS_OF_USE | 33 + src/spicelib/devices/bsim4v4/Makefile.am | 2 +- src/spicelib/devices/bsim4v4/b4v4.c | 1582 +++--- src/spicelib/devices/bsim4v4/b4v4acld.c | 666 +-- src/spicelib/devices/bsim4v4/b4v4ask.c | 384 +- src/spicelib/devices/bsim4v4/b4v4check.c | 685 ++- src/spicelib/devices/bsim4v4/b4v4cvtest.c | 194 +- src/spicelib/devices/bsim4v4/b4v4del.c | 20 +- src/spicelib/devices/bsim4v4/b4v4dest.c | 18 +- src/spicelib/devices/bsim4v4/b4v4geo.c | 44 +- src/spicelib/devices/bsim4v4/b4v4getic.c | 30 +- src/spicelib/devices/bsim4v4/b4v4ld.c | 3206 +++++------ src/spicelib/devices/bsim4v4/b4v4mask.c | 2564 ++++----- src/spicelib/devices/bsim4v4/b4v4mdel.c | 20 +- src/spicelib/devices/bsim4v4/b4v4mpar.c | 4356 +++++++------- src/spicelib/devices/bsim4v4/b4v4noi.c | 418 +- src/spicelib/devices/bsim4v4/b4v4par.c | 190 +- src/spicelib/devices/bsim4v4/b4v4pzld.c | 884 +-- src/spicelib/devices/bsim4v4/b4v4set.c | 3250 +++++------ src/spicelib/devices/bsim4v4/b4v4temp.c | 2354 ++++---- src/spicelib/devices/bsim4v4/b4v4trunc.c | 36 +- src/spicelib/devices/bsim4v4/bsim4v4def.h | 5612 +++++++++---------- src/spicelib/devices/bsim4v4/bsim4v4ext.h | 36 +- src/spicelib/devices/bsim4v4/bsim4v4init.c | 58 +- src/spicelib/devices/bsim4v4/bsim4v4init.h | 16 +- 25 files changed, 13345 insertions(+), 13313 deletions(-) create mode 100644 src/spicelib/devices/bsim4v4/B4TERMS_OF_USE diff --git a/src/spicelib/devices/bsim4v4/B4TERMS_OF_USE b/src/spicelib/devices/bsim4v4/B4TERMS_OF_USE new file mode 100644 index 000000000..42d4bfe4e --- /dev/null +++ b/src/spicelib/devices/bsim4v4/B4TERMS_OF_USE @@ -0,0 +1,33 @@ + +The terms under which the software is provided are as the following. + +Software is distributed as is, completely without warranty or service +support. The University of California and its employees are not liable +for the condition or performance of the software. + +The University owns the copyright but shall not be liable for any +infringement of copyright or other proprietary rights brought by third +parties against the users of the software. + +The University of California hereby disclaims all implied warranties. + +The University of California grants the users the right to modify, copy, +and redistribute the software and documentation, both within the user's +organization and externally, subject to the following restrictions: + +1. The users agree not to charge for the University of California code + itself but may charge for additions, extensions, or support. + +2. In any product based on the software, the users agree to acknowledge + the UC Berkeley BSIM Research Group that developed the software. This + acknowledgment shall appear in the product documentation. + +3. The users agree to obey all U.S. Government restrictions governing + redistribution or export of the software. + +4. The users agree to reproduce any copyright notice which appears on + the software on any copy or modification of such made available + to others. + +Chenming Hu, and Jane Xuemei Xi +April. 2003 diff --git a/src/spicelib/devices/bsim4v4/Makefile.am b/src/spicelib/devices/bsim4v4/Makefile.am index 57180eb55..d7aa6c304 100644 --- a/src/spicelib/devices/bsim4v4/Makefile.am +++ b/src/spicelib/devices/bsim4v4/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -pkglib_LIBRARIES = libbsim4v4.a +noinst_LIBRARIES = libbsim4v4.a libbsim4v4_a_SOURCES = \ b4v4.c \ diff --git a/src/spicelib/devices/bsim4v4/b4v4.c b/src/spicelib/devices/bsim4v4/b4v4.c index 71ae71d6b..fd0f5b316 100644 --- a/src/spicelib/devices/bsim4v4/b4v4.c +++ b/src/spicelib/devices/bsim4v4/b4v4.c @@ -18,798 +18,798 @@ #include "bsim4v4def.h" #include "suffix.h" -IFparm BSIM4V4pTable[] = { /* parameters */ -IOP( "l", BSIM4V4_L, IF_REAL , "Length"), -IOP( "w", BSIM4V4_W, IF_REAL , "Width"), -IOP( "m", BSIM4V4_M, IF_REAL , "Separate Parallel multiplier"), -IOP( "nf", BSIM4V4_NF, IF_REAL , "Number of fingers"), -IOP( "sa", BSIM4V4_SA, IF_REAL , "distance between OD edge to poly of one side "), -IOP( "sb", BSIM4V4_SB, IF_REAL , "distance between OD edge to poly of the other side"), -IOP( "sd", BSIM4V4_SD, IF_REAL , "distance between neighbour fingers"), -IOP( "min", BSIM4V4_MIN, IF_INTEGER , "Minimize either D or S"), -IOP( "ad", BSIM4V4_AD, IF_REAL , "Drain area"), -IOP( "as", BSIM4V4_AS, IF_REAL , "Source area"), -IOP( "pd", BSIM4V4_PD, IF_REAL , "Drain perimeter"), -IOP( "ps", BSIM4V4_PS, IF_REAL , "Source perimeter"), -IOP( "nrd", BSIM4V4_NRD, IF_REAL , "Number of squares in drain"), -IOP( "nrs", BSIM4V4_NRS, IF_REAL , "Number of squares in source"), -IOP( "off", BSIM4V4_OFF, IF_FLAG , "Device is initially off"), -IOP( "rbdb", BSIM4V4_RBDB, IF_REAL , "Body resistance"), -IOP( "rbsb", BSIM4V4_RBSB, IF_REAL , "Body resistance"), -IOP( "rbpb", BSIM4V4_RBPB, IF_REAL , "Body resistance"), -IOP( "rbps", BSIM4V4_RBPS, IF_REAL , "Body resistance"), -IOP( "rbpd", BSIM4V4_RBPD, IF_REAL , "Body resistance"), -IOP( "trnqsmod", BSIM4V4_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), -IOP( "acnqsmod", BSIM4V4_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), -IOP( "rbodymod", BSIM4V4_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), -IOP( "rgatemod", BSIM4V4_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), -IOP( "geomod", BSIM4V4_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), -IOP( "rgeomod", BSIM4V4_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), -IP( "ic", BSIM4V4_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), -OP( "gmbs", BSIM4V4_GMBS, IF_REAL, "Gmb"), -OP( "gm", BSIM4V4_GM, IF_REAL, "Gm"), -OP( "gds", BSIM4V4_GDS, IF_REAL, "Gds"), -OP( "vdsat", BSIM4V4_VDSAT, IF_REAL, "Vdsat"), -OP( "vth", BSIM4V4_VON, IF_REAL, "Vth"), -OP( "id", BSIM4V4_CD, IF_REAL, "Ids"), -OP( "ibd", BSIM4V4_CBD, IF_REAL, "Ibd"), -OP( "ibs", BSIM4V4_CBS, IF_REAL, "Ibs"), -OP( "gbd", BSIM4V4_GBD, IF_REAL, "gbd"), -OP( "gbs", BSIM4V4_GBS, IF_REAL, "gbs"), -OP( "isub", BSIM4V4_CSUB, IF_REAL, "Isub"), -OP( "igidl", BSIM4V4_IGIDL, IF_REAL, "Igidl"), -OP( "igisl", BSIM4V4_IGISL, IF_REAL, "Igisl"), -OP( "igs", BSIM4V4_IGS, IF_REAL, "Igs"), -OP( "igd", BSIM4V4_IGD, IF_REAL, "Igd"), -OP( "igb", BSIM4V4_IGB, IF_REAL, "Igb"), -OP( "igcs", BSIM4V4_IGCS, IF_REAL, "Igcs"), -OP( "igcd", BSIM4V4_IGCD, IF_REAL, "Igcd"), -OP( "vbs", BSIM4V4_VBS, IF_REAL, "Vbs"), -OP( "vgs", BSIM4V4_VGS, IF_REAL, "Vgs"), -OP( "vds", BSIM4V4_VDS, IF_REAL, "Vds"), -OP( "cgg", BSIM4V4_CGGB, IF_REAL, "Cggb"), -OP( "cgs", BSIM4V4_CGSB, IF_REAL, "Cgsb"), -OP( "cgd", BSIM4V4_CGDB, IF_REAL, "Cgdb"), -OP( "cbg", BSIM4V4_CBGB, IF_REAL, "Cbgb"), -OP( "cbd", BSIM4V4_CBDB, IF_REAL, "Cbdb"), -OP( "cbs", BSIM4V4_CBSB, IF_REAL, "Cbsb"), -OP( "cdg", BSIM4V4_CDGB, IF_REAL, "Cdgb"), -OP( "cdd", BSIM4V4_CDDB, IF_REAL, "Cddb"), -OP( "cds", BSIM4V4_CDSB, IF_REAL, "Cdsb"), -OP( "csg", BSIM4V4_CSGB, IF_REAL, "Csgb"), -OP( "csd", BSIM4V4_CSDB, IF_REAL, "Csdb"), -OP( "css", BSIM4V4_CSSB, IF_REAL, "Cssb"), -OP( "cgb", BSIM4V4_CGBB, IF_REAL, "Cgbb"), -OP( "cdb", BSIM4V4_CDBB, IF_REAL, "Cdbb"), -OP( "csb", BSIM4V4_CSBB, IF_REAL, "Csbb"), -OP( "cbb", BSIM4V4_CBBB, IF_REAL, "Cbbb"), -OP( "capbd", BSIM4V4_CAPBD, IF_REAL, "Capbd"), -OP( "capbs", BSIM4V4_CAPBS, IF_REAL, "Capbs"), -OP( "qg", BSIM4V4_QG, IF_REAL, "Qgate"), -OP( "qb", BSIM4V4_QB, IF_REAL, "Qbulk"), -OP( "qd", BSIM4V4_QD, IF_REAL, "Qdrain"), -OP( "qs", BSIM4V4_QS, IF_REAL, "Qsource"), -OP( "qinv", BSIM4V4_QINV, IF_REAL, "Qinversion"), +IFparm BSIM4v4pTable[] = { /* parameters */ +IOP( "l", BSIM4v4_L, IF_REAL , "Length"), +IOP( "w", BSIM4v4_W, IF_REAL , "Width"), +IOP( "m", BSIM4v4_M, IF_REAL , "Separate Parallel multiplier"), +IOP( "nf", BSIM4v4_NF, IF_REAL , "Number of fingers"), +IOP( "sa", BSIM4v4_SA, IF_REAL , "distance between OD edge to poly of one side "), +IOP( "sb", BSIM4v4_SB, IF_REAL , "distance between OD edge to poly of the other side"), +IOP( "sd", BSIM4v4_SD, IF_REAL , "distance between neighbour fingers"), +IOP( "min", BSIM4v4_MIN, IF_INTEGER , "Minimize either D or S"), +IOP( "ad", BSIM4v4_AD, IF_REAL , "Drain area"), +IOP( "as", BSIM4v4_AS, IF_REAL , "Source area"), +IOP( "pd", BSIM4v4_PD, IF_REAL , "Drain perimeter"), +IOP( "ps", BSIM4v4_PS, IF_REAL , "Source perimeter"), +IOP( "nrd", BSIM4v4_NRD, IF_REAL , "Number of squares in drain"), +IOP( "nrs", BSIM4v4_NRS, IF_REAL , "Number of squares in source"), +IOP( "off", BSIM4v4_OFF, IF_FLAG , "Device is initially off"), +IOP( "rbdb", BSIM4v4_RBDB, IF_REAL , "Body resistance"), +IOP( "rbsb", BSIM4v4_RBSB, IF_REAL , "Body resistance"), +IOP( "rbpb", BSIM4v4_RBPB, IF_REAL , "Body resistance"), +IOP( "rbps", BSIM4v4_RBPS, IF_REAL , "Body resistance"), +IOP( "rbpd", BSIM4v4_RBPD, IF_REAL , "Body resistance"), +IOP( "trnqsmod", BSIM4v4_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), +IOP( "acnqsmod", BSIM4v4_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), +IOP( "rbodymod", BSIM4v4_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), +IOP( "rgatemod", BSIM4v4_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), +IOP( "geomod", BSIM4v4_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), +IOP( "rgeomod", BSIM4v4_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), +IP( "ic", BSIM4v4_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), +OP( "gmbs", BSIM4v4_GMBS, IF_REAL, "Gmb"), +OP( "gm", BSIM4v4_GM, IF_REAL, "Gm"), +OP( "gds", BSIM4v4_GDS, IF_REAL, "Gds"), +OP( "vdsat", BSIM4v4_VDSAT, IF_REAL, "Vdsat"), +OP( "vth", BSIM4v4_VON, IF_REAL, "Vth"), +OP( "id", BSIM4v4_CD, IF_REAL, "Ids"), +OP( "ibd", BSIM4v4_CBD, IF_REAL, "Ibd"), +OP( "ibs", BSIM4v4_CBS, IF_REAL, "Ibs"), +OP( "gbd", BSIM4v4_GBD, IF_REAL, "gbd"), +OP( "gbs", BSIM4v4_GBS, IF_REAL, "gbs"), +OP( "isub", BSIM4v4_CSUB, IF_REAL, "Isub"), +OP( "igidl", BSIM4v4_IGIDL, IF_REAL, "Igidl"), +OP( "igisl", BSIM4v4_IGISL, IF_REAL, "Igisl"), +OP( "igs", BSIM4v4_IGS, IF_REAL, "Igs"), +OP( "igd", BSIM4v4_IGD, IF_REAL, "Igd"), +OP( "igb", BSIM4v4_IGB, IF_REAL, "Igb"), +OP( "igcs", BSIM4v4_IGCS, IF_REAL, "Igcs"), +OP( "igcd", BSIM4v4_IGCD, IF_REAL, "Igcd"), +OP( "vbs", BSIM4v4_VBS, IF_REAL, "Vbs"), +OP( "vgs", BSIM4v4_VGS, IF_REAL, "Vgs"), +OP( "vds", BSIM4v4_VDS, IF_REAL, "Vds"), +OP( "cgg", BSIM4v4_CGGB, IF_REAL, "Cggb"), +OP( "cgs", BSIM4v4_CGSB, IF_REAL, "Cgsb"), +OP( "cgd", BSIM4v4_CGDB, IF_REAL, "Cgdb"), +OP( "cbg", BSIM4v4_CBGB, IF_REAL, "Cbgb"), +OP( "cbd", BSIM4v4_CBDB, IF_REAL, "Cbdb"), +OP( "cbs", BSIM4v4_CBSB, IF_REAL, "Cbsb"), +OP( "cdg", BSIM4v4_CDGB, IF_REAL, "Cdgb"), +OP( "cdd", BSIM4v4_CDDB, IF_REAL, "Cddb"), +OP( "cds", BSIM4v4_CDSB, IF_REAL, "Cdsb"), +OP( "csg", BSIM4v4_CSGB, IF_REAL, "Csgb"), +OP( "csd", BSIM4v4_CSDB, IF_REAL, "Csdb"), +OP( "css", BSIM4v4_CSSB, IF_REAL, "Cssb"), +OP( "cgb", BSIM4v4_CGBB, IF_REAL, "Cgbb"), +OP( "cdb", BSIM4v4_CDBB, IF_REAL, "Cdbb"), +OP( "csb", BSIM4v4_CSBB, IF_REAL, "Csbb"), +OP( "cbb", BSIM4v4_CBBB, IF_REAL, "Cbbb"), +OP( "capbd", BSIM4v4_CAPBD, IF_REAL, "Capbd"), +OP( "capbs", BSIM4v4_CAPBS, IF_REAL, "Capbs"), +OP( "qg", BSIM4v4_QG, IF_REAL, "Qgate"), +OP( "qb", BSIM4v4_QB, IF_REAL, "Qbulk"), +OP( "qd", BSIM4v4_QD, IF_REAL, "Qdrain"), +OP( "qs", BSIM4v4_QS, IF_REAL, "Qsource"), +OP( "qinv", BSIM4v4_QINV, IF_REAL, "Qinversion"), }; -IFparm BSIM4V4mPTable[] = { /* model parameters */ -IOP( "rgeomod", BSIM4V4_MOD_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), -IOP( "capmod", BSIM4V4_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), -IOP( "diomod", BSIM4V4_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), -IOP( "rdsmod", BSIM4V4_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), -IOP( "trnqsmod", BSIM4V4_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), -IOP( "acnqsmod", BSIM4V4_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), -IOP( "mobmod", BSIM4V4_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), -IOP( "rbodymod", BSIM4V4_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), -IOP( "rgatemod", BSIM4V4_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), -IOP( "permod", BSIM4V4_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), -IOP( "geomod", BSIM4V4_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), -IOP( "fnoimod", BSIM4V4_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), -IOP( "tnoimod", BSIM4V4_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), -IOP( "igcmod", BSIM4V4_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), -IOP( "igbmod", BSIM4V4_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), -IOP( "tempmod", BSIM4V4_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"), -IOP( "paramchk", BSIM4V4_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), -IOP( "binunit", BSIM4V4_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), -IOP( "version", BSIM4V4_MOD_VERSION, IF_STRING, "parameter for model version"), -IOP( "toxe", BSIM4V4_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), -IOP( "toxp", BSIM4V4_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), -IOP( "toxm", BSIM4V4_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), -IOP( "toxref", BSIM4V4_MOD_TOXREF, IF_REAL, "Target tox value"), -IOP( "dtox", BSIM4V4_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), -IOP( "epsrox", BSIM4V4_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), -IOP( "cdsc", BSIM4V4_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), -IOP( "cdscb", BSIM4V4_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), -IOP( "cdscd", BSIM4V4_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), -IOP( "cit", BSIM4V4_MOD_CIT, IF_REAL, "Interface state capacitance"), -IOP( "nfactor", BSIM4V4_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), -IOP( "xj", BSIM4V4_MOD_XJ, IF_REAL, "Junction depth in meters"), -IOP( "vsat", BSIM4V4_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), -IOP( "at", BSIM4V4_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), -IOP( "a0", BSIM4V4_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), -IOP( "ags", BSIM4V4_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), -IOP( "a1", BSIM4V4_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), -IOP( "a2", BSIM4V4_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), -IOP( "keta", BSIM4V4_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), -IOP( "nsub", BSIM4V4_MOD_NSUB, IF_REAL, "Substrate doping concentration"), -IOP( "ndep", BSIM4V4_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), -IOP( "nsd", BSIM4V4_MOD_NSD, IF_REAL, "S/D doping concentration"), -IOP( "phin", BSIM4V4_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), -IOP( "ngate", BSIM4V4_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), -IOP( "gamma1", BSIM4V4_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), -IOP( "gamma2", BSIM4V4_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), -IOP( "vbx", BSIM4V4_MOD_VBX, IF_REAL, "Vth transition body Voltage"), -IOP( "vbm", BSIM4V4_MOD_VBM, IF_REAL, "Maximum body voltage"), - -IOP( "xt", BSIM4V4_MOD_XT, IF_REAL, "Doping depth"), -IOP( "k1", BSIM4V4_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), -IOP( "kt1", BSIM4V4_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), -IOP( "kt1l", BSIM4V4_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), -IOP( "kt2", BSIM4V4_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), -IOP( "k2", BSIM4V4_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), -IOP( "k3", BSIM4V4_MOD_K3, IF_REAL, "Narrow width effect coefficient"), -IOP( "k3b", BSIM4V4_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), -IOP( "w0", BSIM4V4_MOD_W0, IF_REAL, "Narrow width effect parameter"), -IOP( "dvtp0", BSIM4V4_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), -IOP( "dvtp1", BSIM4V4_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), -IOP( "lpe0", BSIM4V4_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), -IOP( "lpeb", BSIM4V4_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), -IOP( "dvt0", BSIM4V4_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), -IOP( "dvt1", BSIM4V4_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), -IOP( "dvt2", BSIM4V4_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), -IOP( "dvt0w", BSIM4V4_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), -IOP( "dvt1w", BSIM4V4_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), -IOP( "dvt2w", BSIM4V4_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), -IOP( "drout", BSIM4V4_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), -IOP( "dsub", BSIM4V4_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), -IOP( "vth0", BSIM4V4_MOD_VTH0, IF_REAL,"Threshold voltage"), -IOP( "vtho", BSIM4V4_MOD_VTH0, IF_REAL,"Threshold voltage"), -IOP( "ua", BSIM4V4_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), -IOP( "ua1", BSIM4V4_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), -IOP( "ub", BSIM4V4_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), -IOP( "ub1", BSIM4V4_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), -IOP( "uc", BSIM4V4_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), -IOP( "uc1", BSIM4V4_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), -IOP( "u0", BSIM4V4_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), -IOP( "eu", BSIM4V4_MOD_EU, IF_REAL, "Mobility exponent"), -IOP( "ute", BSIM4V4_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), -IOP( "voff", BSIM4V4_MOD_VOFF, IF_REAL, "Threshold voltage offset"), -IOP( "minv", BSIM4V4_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"), -IOP( "voffl", BSIM4V4_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), -IOP( "tnom", BSIM4V4_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), -IOP( "cgso", BSIM4V4_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), -IOP( "cgdo", BSIM4V4_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), -IOP( "cgbo", BSIM4V4_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), -IOP( "xpart", BSIM4V4_MOD_XPART, IF_REAL, "Channel charge partitioning"), -IOP( "delta", BSIM4V4_MOD_DELTA, IF_REAL, "Effective Vds parameter"), -IOP( "rsh", BSIM4V4_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), -IOP( "rdsw", BSIM4V4_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), -IOP( "rdswmin", BSIM4V4_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), -IOP( "rsw", BSIM4V4_MOD_RSW, IF_REAL, "Source resistance per width"), -IOP( "rdw", BSIM4V4_MOD_RDW, IF_REAL, "Drain resistance per width"), -IOP( "rdwmin", BSIM4V4_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), -IOP( "rswmin", BSIM4V4_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), - -IOP( "prwg", BSIM4V4_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), -IOP( "prwb", BSIM4V4_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), - -IOP( "prt", BSIM4V4_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), -IOP( "eta0", BSIM4V4_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), -IOP( "etab", BSIM4V4_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), -IOP( "pclm", BSIM4V4_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), -IOP( "pdiblc1", BSIM4V4_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), -IOP( "pdiblc2", BSIM4V4_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), -IOP( "pdiblcb", BSIM4V4_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), -IOP( "fprout", BSIM4V4_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), -IOP( "pdits", BSIM4V4_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), -IOP( "pditsl", BSIM4V4_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), -IOP( "pditsd", BSIM4V4_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), -IOP( "pscbe1", BSIM4V4_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), -IOP( "pscbe2", BSIM4V4_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), -IOP( "pvag", BSIM4V4_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), - -IOP( "jss", BSIM4V4_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), -IOP( "jsws", BSIM4V4_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), -IOP( "jswgs", BSIM4V4_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), -IOP( "pbs", BSIM4V4_MOD_PBS, IF_REAL, "Source junction built-in potential"), -IOP( "njs", BSIM4V4_MOD_NJS, IF_REAL, "Source junction emission coefficient"), -IOP( "xtis", BSIM4V4_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), -IOP( "mjs", BSIM4V4_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), -IOP( "pbsws", BSIM4V4_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), -IOP( "mjsws", BSIM4V4_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), -IOP( "pbswgs", BSIM4V4_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), -IOP( "mjswgs", BSIM4V4_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), -IOP( "cjs", BSIM4V4_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), -IOP( "cjsws", BSIM4V4_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), -IOP( "cjswgs", BSIM4V4_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), - -IOP( "jsd", BSIM4V4_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), -IOP( "jswd", BSIM4V4_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), -IOP( "jswgd", BSIM4V4_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), -IOP( "pbd", BSIM4V4_MOD_PBD, IF_REAL, "Drain junction built-in potential"), -IOP( "njd", BSIM4V4_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), -IOP( "xtid", BSIM4V4_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), -IOP( "mjd", BSIM4V4_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), -IOP( "pbswd", BSIM4V4_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), -IOP( "mjswd", BSIM4V4_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), -IOP( "pbswgd", BSIM4V4_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), -IOP( "mjswgd", BSIM4V4_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), -IOP( "cjd", BSIM4V4_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), -IOP( "cjswd", BSIM4V4_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), -IOP( "cjswgd", BSIM4V4_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), - -IOP( "vfbcv", BSIM4V4_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), -IOP( "vfb", BSIM4V4_MOD_VFB, IF_REAL, "Flat Band Voltage"), -IOP( "tpb", BSIM4V4_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), -IOP( "tcj", BSIM4V4_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), -IOP( "tpbsw", BSIM4V4_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), -IOP( "tcjsw", BSIM4V4_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), -IOP( "tpbswg", BSIM4V4_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), -IOP( "tcjswg", BSIM4V4_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), -IOP( "acde", BSIM4V4_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), -IOP( "moin", BSIM4V4_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), -IOP( "noff", BSIM4V4_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), -IOP( "voffcv", BSIM4V4_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), -IOP( "dmcg", BSIM4V4_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), -IOP( "dmci", BSIM4V4_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), -IOP( "dmdg", BSIM4V4_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), -IOP( "dmcgt", BSIM4V4_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), -IOP( "xgw", BSIM4V4_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), -IOP( "xgl", BSIM4V4_MOD_XGL, IF_REAL, "Variation in Ldrawn"), -IOP( "rshg", BSIM4V4_MOD_RSHG, IF_REAL, "Gate sheet resistance"), -IOP( "ngcon", BSIM4V4_MOD_NGCON, IF_REAL, "Number of gate contacts"), -IOP( "xrcrg1", BSIM4V4_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), -IOP( "xrcrg2", BSIM4V4_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), -IOP( "lambda", BSIM4V4_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"), -IOP( "vtl", BSIM4V4_MOD_VTL, IF_REAL, " thermal velocity"), -IOP( "lc", BSIM4V4_MOD_LC, IF_REAL, " back scattering parameter"), -IOP( "xn", BSIM4V4_MOD_XN, IF_REAL, " back scattering parameter"), -IOP( "vfbsdoff", BSIM4V4_MOD_VFBSDOFF, IF_REAL, "S/D flatband voltage offset"), -IOP( "lintnoi", BSIM4V4_MOD_LINTNOI, IF_REAL, "lint offset for noise calculation"), -IOP( "lint", BSIM4V4_MOD_LINT, IF_REAL, "Length reduction parameter"), -IOP( "ll", BSIM4V4_MOD_LL, IF_REAL, "Length reduction parameter"), -IOP( "llc", BSIM4V4_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), -IOP( "lln", BSIM4V4_MOD_LLN, IF_REAL, "Length reduction parameter"), -IOP( "lw", BSIM4V4_MOD_LW, IF_REAL, "Length reduction parameter"), -IOP( "lwc", BSIM4V4_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), -IOP( "lwn", BSIM4V4_MOD_LWN, IF_REAL, "Length reduction parameter"), -IOP( "lwl", BSIM4V4_MOD_LWL, IF_REAL, "Length reduction parameter"), -IOP( "lwlc", BSIM4V4_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), -IOP( "lmin", BSIM4V4_MOD_LMIN, IF_REAL, "Minimum length for the model"), -IOP( "lmax", BSIM4V4_MOD_LMAX, IF_REAL, "Maximum length for the model"), - -IOP( "wr", BSIM4V4_MOD_WR, IF_REAL, "Width dependence of rds"), -IOP( "wint", BSIM4V4_MOD_WINT, IF_REAL, "Width reduction parameter"), -IOP( "dwg", BSIM4V4_MOD_DWG, IF_REAL, "Width reduction parameter"), -IOP( "dwb", BSIM4V4_MOD_DWB, IF_REAL, "Width reduction parameter"), - -IOP( "wl", BSIM4V4_MOD_WL, IF_REAL, "Width reduction parameter"), -IOP( "wlc", BSIM4V4_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), -IOP( "wln", BSIM4V4_MOD_WLN, IF_REAL, "Width reduction parameter"), -IOP( "ww", BSIM4V4_MOD_WW, IF_REAL, "Width reduction parameter"), -IOP( "wwc", BSIM4V4_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), -IOP( "wwn", BSIM4V4_MOD_WWN, IF_REAL, "Width reduction parameter"), -IOP( "wwl", BSIM4V4_MOD_WWL, IF_REAL, "Width reduction parameter"), -IOP( "wwlc", BSIM4V4_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), -IOP( "wmin", BSIM4V4_MOD_WMIN, IF_REAL, "Minimum width for the model"), -IOP( "wmax", BSIM4V4_MOD_WMAX, IF_REAL, "Maximum width for the model"), - -IOP( "b0", BSIM4V4_MOD_B0, IF_REAL, "Abulk narrow width parameter"), -IOP( "b1", BSIM4V4_MOD_B1, IF_REAL, "Abulk narrow width parameter"), - -IOP( "cgsl", BSIM4V4_MOD_CGSL, IF_REAL, "New C-V model parameter"), -IOP( "cgdl", BSIM4V4_MOD_CGDL, IF_REAL, "New C-V model parameter"), -IOP( "ckappas", BSIM4V4_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), -IOP( "ckappad", BSIM4V4_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), -IOP( "cf", BSIM4V4_MOD_CF, IF_REAL, "Fringe capacitance parameter"), -IOP( "clc", BSIM4V4_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), -IOP( "cle", BSIM4V4_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), -IOP( "dwc", BSIM4V4_MOD_DWC, IF_REAL, "Delta W for C-V model"), -IOP( "dlc", BSIM4V4_MOD_DLC, IF_REAL, "Delta L for C-V model"), -IOP( "xw", BSIM4V4_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), -IOP( "xl", BSIM4V4_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), -IOP( "dlcig", BSIM4V4_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), -IOP( "dwj", BSIM4V4_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), - -IOP( "alpha0", BSIM4V4_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), -IOP( "alpha1", BSIM4V4_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), -IOP( "beta0", BSIM4V4_MOD_BETA0, IF_REAL, "substrate current model parameter"), -IOP( "agidl", BSIM4V4_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), -IOP( "bgidl", BSIM4V4_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), -IOP( "cgidl", BSIM4V4_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), -IOP( "egidl", BSIM4V4_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), -IOP( "aigc", BSIM4V4_MOD_AIGC, IF_REAL, "Parameter for Igc"), -IOP( "bigc", BSIM4V4_MOD_BIGC, IF_REAL, "Parameter for Igc"), -IOP( "cigc", BSIM4V4_MOD_CIGC, IF_REAL, "Parameter for Igc"), -IOP( "aigsd", BSIM4V4_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), -IOP( "bigsd", BSIM4V4_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), -IOP( "cigsd", BSIM4V4_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), -IOP( "aigbacc", BSIM4V4_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), -IOP( "bigbacc", BSIM4V4_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), -IOP( "cigbacc", BSIM4V4_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), -IOP( "aigbinv", BSIM4V4_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), -IOP( "bigbinv", BSIM4V4_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), -IOP( "cigbinv", BSIM4V4_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), -IOP( "nigc", BSIM4V4_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), -IOP( "nigbinv", BSIM4V4_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), -IOP( "nigbacc", BSIM4V4_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), -IOP( "ntox", BSIM4V4_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), -IOP( "eigbinv", BSIM4V4_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), -IOP( "pigcd", BSIM4V4_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), -IOP( "poxedge", BSIM4V4_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), - -IOP( "ijthdfwd", BSIM4V4_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), -IOP( "ijthsfwd", BSIM4V4_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), -IOP( "ijthdrev", BSIM4V4_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), -IOP( "ijthsrev", BSIM4V4_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), -IOP( "xjbvd", BSIM4V4_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), -IOP( "xjbvs", BSIM4V4_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), -IOP( "bvd", BSIM4V4_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), -IOP( "bvs", BSIM4V4_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), - -IOP( "jtss", BSIM4V4_MOD_JTSS, IF_REAL, "Source bottom trap-assisted saturation current density"), -IOP( "jtsd", BSIM4V4_MOD_JTSD, IF_REAL, "Drain bottom trap-assisted saturation current density"), -IOP( "jtssws", BSIM4V4_MOD_JTSSWS, IF_REAL, "Source STI sidewall trap-assisted saturation current density"), -IOP( "jtsswd", BSIM4V4_MOD_JTSSWD, IF_REAL, "Drain STI sidewall trap-assisted saturation current density"), -IOP( "jtsswgs", BSIM4V4_MOD_JTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted saturation current density"), -IOP( "jtsswgd", BSIM4V4_MOD_JTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted saturation current density"), -IOP( "njts", BSIM4V4_MOD_NJTS, IF_REAL, "Non-ideality factor for bottom junction"), -IOP( "njtssw", BSIM4V4_MOD_NJTSSW, IF_REAL, "Non-ideality factor for STI sidewall junction"), -IOP( "njtsswg", BSIM4V4_MOD_NJTSSWG, IF_REAL, "Non-ideality factor for gate-edge sidewall junction"), -IOP( "xtss", BSIM4V4_MOD_XTSS, IF_REAL, "Power dependence of JTSS on temperature"), -IOP( "xtsd", BSIM4V4_MOD_XTSD, IF_REAL, "Power dependence of JTSD on temperature"), -IOP( "xtssws", BSIM4V4_MOD_XTSSWS, IF_REAL, "Power dependence of JTSSWS on temperature"), -IOP( "xtsswd", BSIM4V4_MOD_XTSSWD, IF_REAL, "Power dependence of JTSSWD on temperature"), -IOP( "xtsswgs", BSIM4V4_MOD_XTSSWGS, IF_REAL, "Power dependence of JTSSWGS on temperature"), -IOP( "xtsswgd", BSIM4V4_MOD_XTSSWGD, IF_REAL, "Power dependence of JTSSWGD on temperature"), -IOP( "tnjts", BSIM4V4_MOD_TNJTS, IF_REAL, "Temperature coefficient for NJTS"), -IOP( "tnjtssw", BSIM4V4_MOD_TNJTSSW, IF_REAL, "Temperature coefficient for NJTSSW"), -IOP( "tnjtsswg", BSIM4V4_MOD_TNJTSSWG, IF_REAL, "Temperature coefficient for NJTSSWG"), -IOP( "vtss", BSIM4V4_MOD_VTSS, IF_REAL, "Source bottom trap-assisted voltage dependent parameter"), -IOP( "vtsd", BSIM4V4_MOD_VTSD, IF_REAL, "Drain bottom trap-assisted voltage dependent parameter"), -IOP( "vtssws", BSIM4V4_MOD_VTSSWS, IF_REAL, "Source STI sidewall trap-assisted voltage dependent parameter"), -IOP( "vtsswd", BSIM4V4_MOD_VTSSWD, IF_REAL, "Drain STI sidewall trap-assisted voltage dependent parameter"), -IOP( "vtsswgs", BSIM4V4_MOD_VTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted voltage dependent parameter"), -IOP( "vtsswgd", BSIM4V4_MOD_VTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted voltage dependent parameter"), - -IOP( "gbmin", BSIM4V4_MOD_GBMIN, IF_REAL, "Minimum body conductance"), -IOP( "rbdb", BSIM4V4_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), -IOP( "rbpb", BSIM4V4_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), -IOP( "rbsb", BSIM4V4_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), -IOP( "rbps", BSIM4V4_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), -IOP( "rbpd", BSIM4V4_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), - -IOP( "lcdsc", BSIM4V4_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), -IOP( "lcdscb", BSIM4V4_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), -IOP( "lcdscd", BSIM4V4_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), -IOP( "lcit", BSIM4V4_MOD_LCIT, IF_REAL, "Length dependence of cit"), -IOP( "lnfactor", BSIM4V4_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), -IOP( "lxj", BSIM4V4_MOD_LXJ, IF_REAL, "Length dependence of xj"), -IOP( "lvsat", BSIM4V4_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), -IOP( "lat", BSIM4V4_MOD_LAT, IF_REAL, "Length dependence of at"), -IOP( "la0", BSIM4V4_MOD_LA0, IF_REAL, "Length dependence of a0"), -IOP( "lags", BSIM4V4_MOD_LAGS, IF_REAL, "Length dependence of ags"), -IOP( "la1", BSIM4V4_MOD_LA1, IF_REAL, "Length dependence of a1"), -IOP( "la2", BSIM4V4_MOD_LA2, IF_REAL, "Length dependence of a2"), -IOP( "lketa", BSIM4V4_MOD_LKETA, IF_REAL, "Length dependence of keta"), -IOP( "lnsub", BSIM4V4_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), -IOP( "lndep", BSIM4V4_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), -IOP( "lnsd", BSIM4V4_MOD_LNSD, IF_REAL, "Length dependence of nsd"), -IOP( "lphin", BSIM4V4_MOD_LPHIN, IF_REAL, "Length dependence of phin"), -IOP( "lngate", BSIM4V4_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), -IOP( "lgamma1", BSIM4V4_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), -IOP( "lgamma2", BSIM4V4_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), -IOP( "lvbx", BSIM4V4_MOD_LVBX, IF_REAL, "Length dependence of vbx"), -IOP( "lvbm", BSIM4V4_MOD_LVBM, IF_REAL, "Length dependence of vbm"), -IOP( "lxt", BSIM4V4_MOD_LXT, IF_REAL, "Length dependence of xt"), -IOP( "lk1", BSIM4V4_MOD_LK1, IF_REAL, "Length dependence of k1"), -IOP( "lkt1", BSIM4V4_MOD_LKT1, IF_REAL, "Length dependence of kt1"), -IOP( "lkt1l", BSIM4V4_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), -IOP( "lkt2", BSIM4V4_MOD_LKT2, IF_REAL, "Length dependence of kt2"), -IOP( "lk2", BSIM4V4_MOD_LK2, IF_REAL, "Length dependence of k2"), -IOP( "lk3", BSIM4V4_MOD_LK3, IF_REAL, "Length dependence of k3"), -IOP( "lk3b", BSIM4V4_MOD_LK3B, IF_REAL, "Length dependence of k3b"), -IOP( "lw0", BSIM4V4_MOD_LW0, IF_REAL, "Length dependence of w0"), -IOP( "ldvtp0", BSIM4V4_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), -IOP( "ldvtp1", BSIM4V4_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), -IOP( "llpe0", BSIM4V4_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), -IOP( "llpeb", BSIM4V4_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), -IOP( "ldvt0", BSIM4V4_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), -IOP( "ldvt1", BSIM4V4_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), -IOP( "ldvt2", BSIM4V4_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), -IOP( "ldvt0w", BSIM4V4_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), -IOP( "ldvt1w", BSIM4V4_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), -IOP( "ldvt2w", BSIM4V4_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), -IOP( "ldrout", BSIM4V4_MOD_LDROUT, IF_REAL, "Length dependence of drout"), -IOP( "ldsub", BSIM4V4_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), -IOP( "lvth0", BSIM4V4_MOD_LVTH0, IF_REAL,"Length dependence of vto"), -IOP( "lvtho", BSIM4V4_MOD_LVTH0, IF_REAL,"Length dependence of vto"), -IOP( "lua", BSIM4V4_MOD_LUA, IF_REAL, "Length dependence of ua"), -IOP( "lua1", BSIM4V4_MOD_LUA1, IF_REAL, "Length dependence of ua1"), -IOP( "lub", BSIM4V4_MOD_LUB, IF_REAL, "Length dependence of ub"), -IOP( "lub1", BSIM4V4_MOD_LUB1, IF_REAL, "Length dependence of ub1"), -IOP( "luc", BSIM4V4_MOD_LUC, IF_REAL, "Length dependence of uc"), -IOP( "luc1", BSIM4V4_MOD_LUC1, IF_REAL, "Length dependence of uc1"), -IOP( "lu0", BSIM4V4_MOD_LU0, IF_REAL, "Length dependence of u0"), -IOP( "lute", BSIM4V4_MOD_LUTE, IF_REAL, "Length dependence of ute"), -IOP( "lvoff", BSIM4V4_MOD_LVOFF, IF_REAL, "Length dependence of voff"), -IOP( "lminv", BSIM4V4_MOD_LMINV, IF_REAL, "Length dependence of minv"), -IOP( "ldelta", BSIM4V4_MOD_LDELTA, IF_REAL, "Length dependence of delta"), -IOP( "lrdsw", BSIM4V4_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), -IOP( "lrsw", BSIM4V4_MOD_LRSW, IF_REAL, "Length dependence of rsw"), -IOP( "lrdw", BSIM4V4_MOD_LRDW, IF_REAL, "Length dependence of rdw"), - -IOP( "lprwg", BSIM4V4_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), -IOP( "lprwb", BSIM4V4_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), - -IOP( "lprt", BSIM4V4_MOD_LPRT, IF_REAL, "Length dependence of prt "), -IOP( "leta0", BSIM4V4_MOD_LETA0, IF_REAL, "Length dependence of eta0"), -IOP( "letab", BSIM4V4_MOD_LETAB, IF_REAL, "Length dependence of etab"), -IOP( "lpclm", BSIM4V4_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), -IOP( "lpdiblc1", BSIM4V4_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), -IOP( "lpdiblc2", BSIM4V4_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), -IOP( "lpdiblcb", BSIM4V4_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), -IOP( "lfprout", BSIM4V4_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), -IOP( "lpdits", BSIM4V4_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), -IOP( "lpditsd", BSIM4V4_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), -IOP( "lpscbe1", BSIM4V4_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), -IOP( "lpscbe2", BSIM4V4_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), -IOP( "lpvag", BSIM4V4_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), -IOP( "lwr", BSIM4V4_MOD_LWR, IF_REAL, "Length dependence of wr"), -IOP( "ldwg", BSIM4V4_MOD_LDWG, IF_REAL, "Length dependence of dwg"), -IOP( "ldwb", BSIM4V4_MOD_LDWB, IF_REAL, "Length dependence of dwb"), -IOP( "lb0", BSIM4V4_MOD_LB0, IF_REAL, "Length dependence of b0"), -IOP( "lb1", BSIM4V4_MOD_LB1, IF_REAL, "Length dependence of b1"), -IOP( "lcgsl", BSIM4V4_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), -IOP( "lcgdl", BSIM4V4_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), -IOP( "lckappas", BSIM4V4_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), -IOP( "lckappad", BSIM4V4_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), -IOP( "lcf", BSIM4V4_MOD_LCF, IF_REAL, "Length dependence of cf"), -IOP( "lclc", BSIM4V4_MOD_LCLC, IF_REAL, "Length dependence of clc"), -IOP( "lcle", BSIM4V4_MOD_LCLE, IF_REAL, "Length dependence of cle"), -IOP( "lalpha0", BSIM4V4_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), -IOP( "lalpha1", BSIM4V4_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), -IOP( "lbeta0", BSIM4V4_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), -IOP( "lagidl", BSIM4V4_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), -IOP( "lbgidl", BSIM4V4_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), -IOP( "lcgidl", BSIM4V4_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), -IOP( "legidl", BSIM4V4_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), -IOP( "laigc", BSIM4V4_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), -IOP( "lbigc", BSIM4V4_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), -IOP( "lcigc", BSIM4V4_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), -IOP( "laigsd", BSIM4V4_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), -IOP( "lbigsd", BSIM4V4_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), -IOP( "lcigsd", BSIM4V4_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), -IOP( "laigbacc", BSIM4V4_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), -IOP( "lbigbacc", BSIM4V4_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), -IOP( "lcigbacc", BSIM4V4_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), -IOP( "laigbinv", BSIM4V4_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), -IOP( "lbigbinv", BSIM4V4_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), -IOP( "lcigbinv", BSIM4V4_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), -IOP( "lnigc", BSIM4V4_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), -IOP( "lnigbinv", BSIM4V4_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), -IOP( "lnigbacc", BSIM4V4_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), -IOP( "lntox", BSIM4V4_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), -IOP( "leigbinv", BSIM4V4_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), -IOP( "lpigcd", BSIM4V4_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), -IOP( "lpoxedge", BSIM4V4_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), - -IOP( "lvfbcv", BSIM4V4_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), -IOP( "lvfb", BSIM4V4_MOD_LVFB, IF_REAL, "Length dependence of vfb"), -IOP( "lacde", BSIM4V4_MOD_LACDE, IF_REAL, "Length dependence of acde"), -IOP( "lmoin", BSIM4V4_MOD_LMOIN, IF_REAL, "Length dependence of moin"), -IOP( "lnoff", BSIM4V4_MOD_LNOFF, IF_REAL, "Length dependence of noff"), -IOP( "lvoffcv", BSIM4V4_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), -IOP( "lxrcrg1", BSIM4V4_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), -IOP( "lxrcrg2", BSIM4V4_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), -IOP( "llambda", BSIM4V4_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"), -IOP( "lvtl", BSIM4V4_MOD_LVTL, IF_REAL, " Length dependence of vtl"), -IOP( "lxn", BSIM4V4_MOD_LXN, IF_REAL, " Length dependence of xn"), -IOP( "leu", BSIM4V4_MOD_LEU, IF_REAL, " Length dependence of eu"), -IOP( "lvfbsdoff", BSIM4V4_MOD_LVFBSDOFF, IF_REAL, "Length dependence of vfbsdoff"), - -IOP( "wcdsc", BSIM4V4_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), -IOP( "wcdscb", BSIM4V4_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), -IOP( "wcdscd", BSIM4V4_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), -IOP( "wcit", BSIM4V4_MOD_WCIT, IF_REAL, "Width dependence of cit"), -IOP( "wnfactor", BSIM4V4_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), -IOP( "wxj", BSIM4V4_MOD_WXJ, IF_REAL, "Width dependence of xj"), -IOP( "wvsat", BSIM4V4_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), -IOP( "wat", BSIM4V4_MOD_WAT, IF_REAL, "Width dependence of at"), -IOP( "wa0", BSIM4V4_MOD_WA0, IF_REAL, "Width dependence of a0"), -IOP( "wags", BSIM4V4_MOD_WAGS, IF_REAL, "Width dependence of ags"), -IOP( "wa1", BSIM4V4_MOD_WA1, IF_REAL, "Width dependence of a1"), -IOP( "wa2", BSIM4V4_MOD_WA2, IF_REAL, "Width dependence of a2"), -IOP( "wketa", BSIM4V4_MOD_WKETA, IF_REAL, "Width dependence of keta"), -IOP( "wnsub", BSIM4V4_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), -IOP( "wndep", BSIM4V4_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), -IOP( "wnsd", BSIM4V4_MOD_WNSD, IF_REAL, "Width dependence of nsd"), -IOP( "wphin", BSIM4V4_MOD_WPHIN, IF_REAL, "Width dependence of phin"), -IOP( "wngate", BSIM4V4_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), -IOP( "wgamma1", BSIM4V4_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), -IOP( "wgamma2", BSIM4V4_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), -IOP( "wvbx", BSIM4V4_MOD_WVBX, IF_REAL, "Width dependence of vbx"), -IOP( "wvbm", BSIM4V4_MOD_WVBM, IF_REAL, "Width dependence of vbm"), -IOP( "wxt", BSIM4V4_MOD_WXT, IF_REAL, "Width dependence of xt"), -IOP( "wk1", BSIM4V4_MOD_WK1, IF_REAL, "Width dependence of k1"), -IOP( "wkt1", BSIM4V4_MOD_WKT1, IF_REAL, "Width dependence of kt1"), -IOP( "wkt1l", BSIM4V4_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), -IOP( "wkt2", BSIM4V4_MOD_WKT2, IF_REAL, "Width dependence of kt2"), -IOP( "wk2", BSIM4V4_MOD_WK2, IF_REAL, "Width dependence of k2"), -IOP( "wk3", BSIM4V4_MOD_WK3, IF_REAL, "Width dependence of k3"), -IOP( "wk3b", BSIM4V4_MOD_WK3B, IF_REAL, "Width dependence of k3b"), -IOP( "ww0", BSIM4V4_MOD_WW0, IF_REAL, "Width dependence of w0"), -IOP( "wdvtp0", BSIM4V4_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), -IOP( "wdvtp1", BSIM4V4_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), -IOP( "wlpe0", BSIM4V4_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), -IOP( "wlpeb", BSIM4V4_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), -IOP( "wdvt0", BSIM4V4_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), -IOP( "wdvt1", BSIM4V4_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), -IOP( "wdvt2", BSIM4V4_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), -IOP( "wdvt0w", BSIM4V4_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), -IOP( "wdvt1w", BSIM4V4_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), -IOP( "wdvt2w", BSIM4V4_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), -IOP( "wdrout", BSIM4V4_MOD_WDROUT, IF_REAL, "Width dependence of drout"), -IOP( "wdsub", BSIM4V4_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), -IOP( "wvth0", BSIM4V4_MOD_WVTH0, IF_REAL,"Width dependence of vto"), -IOP( "wvtho", BSIM4V4_MOD_WVTH0, IF_REAL,"Width dependence of vto"), -IOP( "wua", BSIM4V4_MOD_WUA, IF_REAL, "Width dependence of ua"), -IOP( "wua1", BSIM4V4_MOD_WUA1, IF_REAL, "Width dependence of ua1"), -IOP( "wub", BSIM4V4_MOD_WUB, IF_REAL, "Width dependence of ub"), -IOP( "wub1", BSIM4V4_MOD_WUB1, IF_REAL, "Width dependence of ub1"), -IOP( "wuc", BSIM4V4_MOD_WUC, IF_REAL, "Width dependence of uc"), -IOP( "wuc1", BSIM4V4_MOD_WUC1, IF_REAL, "Width dependence of uc1"), -IOP( "wu0", BSIM4V4_MOD_WU0, IF_REAL, "Width dependence of u0"), -IOP( "wute", BSIM4V4_MOD_WUTE, IF_REAL, "Width dependence of ute"), -IOP( "wvoff", BSIM4V4_MOD_WVOFF, IF_REAL, "Width dependence of voff"), -IOP( "wminv", BSIM4V4_MOD_WMINV, IF_REAL, "Width dependence of minv"), -IOP( "wdelta", BSIM4V4_MOD_WDELTA, IF_REAL, "Width dependence of delta"), -IOP( "wrdsw", BSIM4V4_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), -IOP( "wrsw", BSIM4V4_MOD_WRSW, IF_REAL, "Width dependence of rsw"), -IOP( "wrdw", BSIM4V4_MOD_WRDW, IF_REAL, "Width dependence of rdw"), - -IOP( "wprwg", BSIM4V4_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), -IOP( "wprwb", BSIM4V4_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), - -IOP( "wprt", BSIM4V4_MOD_WPRT, IF_REAL, "Width dependence of prt"), -IOP( "weta0", BSIM4V4_MOD_WETA0, IF_REAL, "Width dependence of eta0"), -IOP( "wetab", BSIM4V4_MOD_WETAB, IF_REAL, "Width dependence of etab"), -IOP( "wpclm", BSIM4V4_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), -IOP( "wpdiblc1", BSIM4V4_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), -IOP( "wpdiblc2", BSIM4V4_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), -IOP( "wpdiblcb", BSIM4V4_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), -IOP( "wfprout", BSIM4V4_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), -IOP( "wpdits", BSIM4V4_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), -IOP( "wpditsd", BSIM4V4_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), -IOP( "wpscbe1", BSIM4V4_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), -IOP( "wpscbe2", BSIM4V4_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), -IOP( "wpvag", BSIM4V4_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), -IOP( "wwr", BSIM4V4_MOD_WWR, IF_REAL, "Width dependence of wr"), -IOP( "wdwg", BSIM4V4_MOD_WDWG, IF_REAL, "Width dependence of dwg"), -IOP( "wdwb", BSIM4V4_MOD_WDWB, IF_REAL, "Width dependence of dwb"), -IOP( "wb0", BSIM4V4_MOD_WB0, IF_REAL, "Width dependence of b0"), -IOP( "wb1", BSIM4V4_MOD_WB1, IF_REAL, "Width dependence of b1"), -IOP( "wcgsl", BSIM4V4_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), -IOP( "wcgdl", BSIM4V4_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), -IOP( "wckappas", BSIM4V4_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), -IOP( "wckappad", BSIM4V4_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), -IOP( "wcf", BSIM4V4_MOD_WCF, IF_REAL, "Width dependence of cf"), -IOP( "wclc", BSIM4V4_MOD_WCLC, IF_REAL, "Width dependence of clc"), -IOP( "wcle", BSIM4V4_MOD_WCLE, IF_REAL, "Width dependence of cle"), -IOP( "walpha0", BSIM4V4_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), -IOP( "walpha1", BSIM4V4_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), -IOP( "wbeta0", BSIM4V4_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), -IOP( "wagidl", BSIM4V4_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), -IOP( "wbgidl", BSIM4V4_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), -IOP( "wcgidl", BSIM4V4_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), -IOP( "wegidl", BSIM4V4_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), -IOP( "waigc", BSIM4V4_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), -IOP( "wbigc", BSIM4V4_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), -IOP( "wcigc", BSIM4V4_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), -IOP( "waigsd", BSIM4V4_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), -IOP( "wbigsd", BSIM4V4_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), -IOP( "wcigsd", BSIM4V4_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), -IOP( "waigbacc", BSIM4V4_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), -IOP( "wbigbacc", BSIM4V4_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), -IOP( "wcigbacc", BSIM4V4_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), -IOP( "waigbinv", BSIM4V4_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), -IOP( "wbigbinv", BSIM4V4_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), -IOP( "wcigbinv", BSIM4V4_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), -IOP( "wnigc", BSIM4V4_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), -IOP( "wnigbinv", BSIM4V4_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), -IOP( "wnigbacc", BSIM4V4_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), -IOP( "wntox", BSIM4V4_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), -IOP( "weigbinv", BSIM4V4_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), -IOP( "wpigcd", BSIM4V4_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), -IOP( "wpoxedge", BSIM4V4_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), -IOP( "wvfbcv", BSIM4V4_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), -IOP( "wvfb", BSIM4V4_MOD_WVFB, IF_REAL, "Width dependence of vfb"), -IOP( "wacde", BSIM4V4_MOD_WACDE, IF_REAL, "Width dependence of acde"), -IOP( "wmoin", BSIM4V4_MOD_WMOIN, IF_REAL, "Width dependence of moin"), -IOP( "wnoff", BSIM4V4_MOD_WNOFF, IF_REAL, "Width dependence of noff"), -IOP( "wvoffcv", BSIM4V4_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), -IOP( "wxrcrg1", BSIM4V4_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), -IOP( "wxrcrg2", BSIM4V4_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), -IOP( "wlambda", BSIM4V4_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"), -IOP( "wvtl", BSIM4V4_MOD_WVTL, IF_REAL, "Width dependence of vtl"), -IOP( "wxn", BSIM4V4_MOD_WXN, IF_REAL, "Width dependence of xn"), -IOP( "weu", BSIM4V4_MOD_WEU, IF_REAL, "Width dependence of eu"), -IOP( "wvfbsdoff", BSIM4V4_MOD_WVFBSDOFF, IF_REAL, "Width dependence of vfbsdoff"), - -IOP( "pcdsc", BSIM4V4_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), -IOP( "pcdscb", BSIM4V4_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), -IOP( "pcdscd", BSIM4V4_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), -IOP( "pcit", BSIM4V4_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), -IOP( "pnfactor", BSIM4V4_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), -IOP( "pxj", BSIM4V4_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), -IOP( "pvsat", BSIM4V4_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), -IOP( "pat", BSIM4V4_MOD_PAT, IF_REAL, "Cross-term dependence of at"), -IOP( "pa0", BSIM4V4_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), -IOP( "pags", BSIM4V4_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), -IOP( "pa1", BSIM4V4_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), -IOP( "pa2", BSIM4V4_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), -IOP( "pketa", BSIM4V4_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), -IOP( "pnsub", BSIM4V4_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), -IOP( "pndep", BSIM4V4_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), -IOP( "pnsd", BSIM4V4_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), -IOP( "pphin", BSIM4V4_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), -IOP( "pngate", BSIM4V4_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), -IOP( "pgamma1", BSIM4V4_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), -IOP( "pgamma2", BSIM4V4_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), -IOP( "pvbx", BSIM4V4_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), -IOP( "pvbm", BSIM4V4_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), -IOP( "pxt", BSIM4V4_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), -IOP( "pk1", BSIM4V4_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), -IOP( "pkt1", BSIM4V4_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), -IOP( "pkt1l", BSIM4V4_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), -IOP( "pkt2", BSIM4V4_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), -IOP( "pk2", BSIM4V4_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), -IOP( "pk3", BSIM4V4_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), -IOP( "pk3b", BSIM4V4_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), -IOP( "pw0", BSIM4V4_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), -IOP( "pdvtp0", BSIM4V4_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), -IOP( "pdvtp1", BSIM4V4_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), -IOP( "plpe0", BSIM4V4_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), -IOP( "plpeb", BSIM4V4_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), -IOP( "pdvt0", BSIM4V4_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), -IOP( "pdvt1", BSIM4V4_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), -IOP( "pdvt2", BSIM4V4_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), -IOP( "pdvt0w", BSIM4V4_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), -IOP( "pdvt1w", BSIM4V4_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), -IOP( "pdvt2w", BSIM4V4_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), -IOP( "pdrout", BSIM4V4_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), -IOP( "pdsub", BSIM4V4_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), -IOP( "pvth0", BSIM4V4_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), -IOP( "pvtho", BSIM4V4_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), -IOP( "pua", BSIM4V4_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), -IOP( "pua1", BSIM4V4_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), -IOP( "pub", BSIM4V4_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), -IOP( "pub1", BSIM4V4_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), -IOP( "puc", BSIM4V4_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), -IOP( "puc1", BSIM4V4_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), -IOP( "pu0", BSIM4V4_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), -IOP( "pute", BSIM4V4_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), -IOP( "pvoff", BSIM4V4_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), -IOP( "pminv", BSIM4V4_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), -IOP( "pdelta", BSIM4V4_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), -IOP( "prdsw", BSIM4V4_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), -IOP( "prsw", BSIM4V4_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), -IOP( "prdw", BSIM4V4_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), - -IOP( "pprwg", BSIM4V4_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), -IOP( "pprwb", BSIM4V4_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), - -IOP( "pprt", BSIM4V4_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), -IOP( "peta0", BSIM4V4_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), -IOP( "petab", BSIM4V4_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), -IOP( "ppclm", BSIM4V4_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), -IOP( "ppdiblc1", BSIM4V4_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), -IOP( "ppdiblc2", BSIM4V4_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), -IOP( "ppdiblcb", BSIM4V4_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), -IOP( "pfprout", BSIM4V4_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), -IOP( "ppdits", BSIM4V4_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), -IOP( "ppditsd", BSIM4V4_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), -IOP( "ppscbe1", BSIM4V4_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), -IOP( "ppscbe2", BSIM4V4_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), -IOP( "ppvag", BSIM4V4_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), -IOP( "pwr", BSIM4V4_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), -IOP( "pdwg", BSIM4V4_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), -IOP( "pdwb", BSIM4V4_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), -IOP( "pb0", BSIM4V4_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), -IOP( "pb1", BSIM4V4_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), -IOP( "pcgsl", BSIM4V4_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), -IOP( "pcgdl", BSIM4V4_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), -IOP( "pckappas", BSIM4V4_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), -IOP( "pckappad", BSIM4V4_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), -IOP( "pcf", BSIM4V4_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), -IOP( "pclc", BSIM4V4_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), -IOP( "pcle", BSIM4V4_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), -IOP( "palpha0", BSIM4V4_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), -IOP( "palpha1", BSIM4V4_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), -IOP( "pbeta0", BSIM4V4_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), -IOP( "pagidl", BSIM4V4_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), -IOP( "pbgidl", BSIM4V4_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), -IOP( "pcgidl", BSIM4V4_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), -IOP( "pegidl", BSIM4V4_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), -IOP( "paigc", BSIM4V4_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), -IOP( "pbigc", BSIM4V4_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), -IOP( "pcigc", BSIM4V4_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), -IOP( "paigsd", BSIM4V4_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), -IOP( "pbigsd", BSIM4V4_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), -IOP( "pcigsd", BSIM4V4_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), -IOP( "paigbacc", BSIM4V4_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), -IOP( "pbigbacc", BSIM4V4_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), -IOP( "pcigbacc", BSIM4V4_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), -IOP( "paigbinv", BSIM4V4_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), -IOP( "pbigbinv", BSIM4V4_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), -IOP( "pcigbinv", BSIM4V4_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), -IOP( "pnigc", BSIM4V4_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), -IOP( "pnigbinv", BSIM4V4_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), -IOP( "pnigbacc", BSIM4V4_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), -IOP( "pntox", BSIM4V4_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), -IOP( "peigbinv", BSIM4V4_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), -IOP( "ppigcd", BSIM4V4_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), -IOP( "ppoxedge", BSIM4V4_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), -IOP( "pvfbcv", BSIM4V4_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), -IOP( "pvfb", BSIM4V4_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), -IOP( "pacde", BSIM4V4_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), -IOP( "pmoin", BSIM4V4_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), -IOP( "pnoff", BSIM4V4_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), -IOP( "pvoffcv", BSIM4V4_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), -IOP( "pxrcrg1", BSIM4V4_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), -IOP( "pxrcrg2", BSIM4V4_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), -IOP( "plambda", BSIM4V4_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"), -IOP( "pvtl", BSIM4V4_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"), -IOP( "pxn", BSIM4V4_MOD_PXN, IF_REAL, "Cross-term dependence of xn"), -IOP( "peu", BSIM4V4_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), -IOP( "pvfbsdoff", BSIM4V4_MOD_PVFBSDOFF, IF_REAL, "Cross-term dependence of vfbsdoff"), +IFparm BSIM4v4mPTable[] = { /* model parameters */ +IOP( "rgeomod", BSIM4v4_MOD_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), +IOP( "capmod", BSIM4v4_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), +IOP( "diomod", BSIM4v4_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), +IOP( "rdsmod", BSIM4v4_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), +IOP( "trnqsmod", BSIM4v4_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), +IOP( "acnqsmod", BSIM4v4_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), +IOP( "mobmod", BSIM4v4_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), +IOP( "rbodymod", BSIM4v4_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), +IOP( "rgatemod", BSIM4v4_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), +IOP( "permod", BSIM4v4_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), +IOP( "geomod", BSIM4v4_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), +IOP( "fnoimod", BSIM4v4_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), +IOP( "tnoimod", BSIM4v4_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), +IOP( "igcmod", BSIM4v4_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), +IOP( "igbmod", BSIM4v4_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), +IOP( "tempmod", BSIM4v4_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"), +IOP( "paramchk", BSIM4v4_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), +IOP( "binunit", BSIM4v4_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), +IOP( "version", BSIM4v4_MOD_VERSION, IF_STRING, "parameter for model version"), +IOP( "toxe", BSIM4v4_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), +IOP( "toxp", BSIM4v4_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), +IOP( "toxm", BSIM4v4_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), +IOP( "toxref", BSIM4v4_MOD_TOXREF, IF_REAL, "Target tox value"), +IOP( "dtox", BSIM4v4_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), +IOP( "epsrox", BSIM4v4_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), +IOP( "cdsc", BSIM4v4_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), +IOP( "cdscb", BSIM4v4_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), +IOP( "cdscd", BSIM4v4_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), +IOP( "cit", BSIM4v4_MOD_CIT, IF_REAL, "Interface state capacitance"), +IOP( "nfactor", BSIM4v4_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), +IOP( "xj", BSIM4v4_MOD_XJ, IF_REAL, "Junction depth in meters"), +IOP( "vsat", BSIM4v4_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), +IOP( "at", BSIM4v4_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), +IOP( "a0", BSIM4v4_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), +IOP( "ags", BSIM4v4_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), +IOP( "a1", BSIM4v4_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), +IOP( "a2", BSIM4v4_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), +IOP( "keta", BSIM4v4_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), +IOP( "nsub", BSIM4v4_MOD_NSUB, IF_REAL, "Substrate doping concentration"), +IOP( "ndep", BSIM4v4_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), +IOP( "nsd", BSIM4v4_MOD_NSD, IF_REAL, "S/D doping concentration"), +IOP( "phin", BSIM4v4_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), +IOP( "ngate", BSIM4v4_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), +IOP( "gamma1", BSIM4v4_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), +IOP( "gamma2", BSIM4v4_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), +IOP( "vbx", BSIM4v4_MOD_VBX, IF_REAL, "Vth transition body Voltage"), +IOP( "vbm", BSIM4v4_MOD_VBM, IF_REAL, "Maximum body voltage"), + +IOP( "xt", BSIM4v4_MOD_XT, IF_REAL, "Doping depth"), +IOP( "k1", BSIM4v4_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), +IOP( "kt1", BSIM4v4_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), +IOP( "kt1l", BSIM4v4_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), +IOP( "kt2", BSIM4v4_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), +IOP( "k2", BSIM4v4_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), +IOP( "k3", BSIM4v4_MOD_K3, IF_REAL, "Narrow width effect coefficient"), +IOP( "k3b", BSIM4v4_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), +IOP( "w0", BSIM4v4_MOD_W0, IF_REAL, "Narrow width effect parameter"), +IOP( "dvtp0", BSIM4v4_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), +IOP( "dvtp1", BSIM4v4_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), +IOP( "lpe0", BSIM4v4_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), +IOP( "lpeb", BSIM4v4_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), +IOP( "dvt0", BSIM4v4_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), +IOP( "dvt1", BSIM4v4_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), +IOP( "dvt2", BSIM4v4_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), +IOP( "dvt0w", BSIM4v4_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), +IOP( "dvt1w", BSIM4v4_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), +IOP( "dvt2w", BSIM4v4_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), +IOP( "drout", BSIM4v4_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), +IOP( "dsub", BSIM4v4_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), +IOP( "vth0", BSIM4v4_MOD_VTH0, IF_REAL,"Threshold voltage"), +IOP( "vtho", BSIM4v4_MOD_VTH0, IF_REAL,"Threshold voltage"), +IOP( "ua", BSIM4v4_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), +IOP( "ua1", BSIM4v4_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), +IOP( "ub", BSIM4v4_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), +IOP( "ub1", BSIM4v4_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), +IOP( "uc", BSIM4v4_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), +IOP( "uc1", BSIM4v4_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), +IOP( "u0", BSIM4v4_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), +IOP( "eu", BSIM4v4_MOD_EU, IF_REAL, "Mobility exponent"), +IOP( "ute", BSIM4v4_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), +IOP( "voff", BSIM4v4_MOD_VOFF, IF_REAL, "Threshold voltage offset"), +IOP( "minv", BSIM4v4_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"), +IOP( "voffl", BSIM4v4_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), +IOP( "tnom", BSIM4v4_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), +IOP( "cgso", BSIM4v4_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), +IOP( "cgdo", BSIM4v4_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), +IOP( "cgbo", BSIM4v4_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), +IOP( "xpart", BSIM4v4_MOD_XPART, IF_REAL, "Channel charge partitioning"), +IOP( "delta", BSIM4v4_MOD_DELTA, IF_REAL, "Effective Vds parameter"), +IOP( "rsh", BSIM4v4_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), +IOP( "rdsw", BSIM4v4_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), +IOP( "rdswmin", BSIM4v4_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), +IOP( "rsw", BSIM4v4_MOD_RSW, IF_REAL, "Source resistance per width"), +IOP( "rdw", BSIM4v4_MOD_RDW, IF_REAL, "Drain resistance per width"), +IOP( "rdwmin", BSIM4v4_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), +IOP( "rswmin", BSIM4v4_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), + +IOP( "prwg", BSIM4v4_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), +IOP( "prwb", BSIM4v4_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), + +IOP( "prt", BSIM4v4_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), +IOP( "eta0", BSIM4v4_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), +IOP( "etab", BSIM4v4_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), +IOP( "pclm", BSIM4v4_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), +IOP( "pdiblc1", BSIM4v4_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), +IOP( "pdiblc2", BSIM4v4_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), +IOP( "pdiblcb", BSIM4v4_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), +IOP( "fprout", BSIM4v4_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), +IOP( "pdits", BSIM4v4_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), +IOP( "pditsl", BSIM4v4_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), +IOP( "pditsd", BSIM4v4_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), +IOP( "pscbe1", BSIM4v4_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), +IOP( "pscbe2", BSIM4v4_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), +IOP( "pvag", BSIM4v4_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), + +IOP( "jss", BSIM4v4_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), +IOP( "jsws", BSIM4v4_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), +IOP( "jswgs", BSIM4v4_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), +IOP( "pbs", BSIM4v4_MOD_PBS, IF_REAL, "Source junction built-in potential"), +IOP( "njs", BSIM4v4_MOD_NJS, IF_REAL, "Source junction emission coefficient"), +IOP( "xtis", BSIM4v4_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), +IOP( "mjs", BSIM4v4_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), +IOP( "pbsws", BSIM4v4_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), +IOP( "mjsws", BSIM4v4_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), +IOP( "pbswgs", BSIM4v4_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), +IOP( "mjswgs", BSIM4v4_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), +IOP( "cjs", BSIM4v4_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), +IOP( "cjsws", BSIM4v4_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), +IOP( "cjswgs", BSIM4v4_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), + +IOP( "jsd", BSIM4v4_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), +IOP( "jswd", BSIM4v4_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), +IOP( "jswgd", BSIM4v4_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), +IOP( "pbd", BSIM4v4_MOD_PBD, IF_REAL, "Drain junction built-in potential"), +IOP( "njd", BSIM4v4_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), +IOP( "xtid", BSIM4v4_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), +IOP( "mjd", BSIM4v4_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), +IOP( "pbswd", BSIM4v4_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), +IOP( "mjswd", BSIM4v4_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), +IOP( "pbswgd", BSIM4v4_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), +IOP( "mjswgd", BSIM4v4_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), +IOP( "cjd", BSIM4v4_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), +IOP( "cjswd", BSIM4v4_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), +IOP( "cjswgd", BSIM4v4_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), + +IOP( "vfbcv", BSIM4v4_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), +IOP( "vfb", BSIM4v4_MOD_VFB, IF_REAL, "Flat Band Voltage"), +IOP( "tpb", BSIM4v4_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), +IOP( "tcj", BSIM4v4_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), +IOP( "tpbsw", BSIM4v4_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), +IOP( "tcjsw", BSIM4v4_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), +IOP( "tpbswg", BSIM4v4_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), +IOP( "tcjswg", BSIM4v4_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), +IOP( "acde", BSIM4v4_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), +IOP( "moin", BSIM4v4_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), +IOP( "noff", BSIM4v4_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), +IOP( "voffcv", BSIM4v4_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), +IOP( "dmcg", BSIM4v4_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), +IOP( "dmci", BSIM4v4_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), +IOP( "dmdg", BSIM4v4_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), +IOP( "dmcgt", BSIM4v4_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), +IOP( "xgw", BSIM4v4_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), +IOP( "xgl", BSIM4v4_MOD_XGL, IF_REAL, "Variation in Ldrawn"), +IOP( "rshg", BSIM4v4_MOD_RSHG, IF_REAL, "Gate sheet resistance"), +IOP( "ngcon", BSIM4v4_MOD_NGCON, IF_REAL, "Number of gate contacts"), +IOP( "xrcrg1", BSIM4v4_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), +IOP( "xrcrg2", BSIM4v4_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), +IOP( "lambda", BSIM4v4_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"), +IOP( "vtl", BSIM4v4_MOD_VTL, IF_REAL, " thermal velocity"), +IOP( "lc", BSIM4v4_MOD_LC, IF_REAL, " back scattering parameter"), +IOP( "xn", BSIM4v4_MOD_XN, IF_REAL, " back scattering parameter"), +IOP( "vfbsdoff", BSIM4v4_MOD_VFBSDOFF, IF_REAL, "S/D flatband voltage offset"), +IOP( "lintnoi", BSIM4v4_MOD_LINTNOI, IF_REAL, "lint offset for noise calculation"), +IOP( "lint", BSIM4v4_MOD_LINT, IF_REAL, "Length reduction parameter"), +IOP( "ll", BSIM4v4_MOD_LL, IF_REAL, "Length reduction parameter"), +IOP( "llc", BSIM4v4_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), +IOP( "lln", BSIM4v4_MOD_LLN, IF_REAL, "Length reduction parameter"), +IOP( "lw", BSIM4v4_MOD_LW, IF_REAL, "Length reduction parameter"), +IOP( "lwc", BSIM4v4_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), +IOP( "lwn", BSIM4v4_MOD_LWN, IF_REAL, "Length reduction parameter"), +IOP( "lwl", BSIM4v4_MOD_LWL, IF_REAL, "Length reduction parameter"), +IOP( "lwlc", BSIM4v4_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), +IOP( "lmin", BSIM4v4_MOD_LMIN, IF_REAL, "Minimum length for the model"), +IOP( "lmax", BSIM4v4_MOD_LMAX, IF_REAL, "Maximum length for the model"), + +IOP( "wr", BSIM4v4_MOD_WR, IF_REAL, "Width dependence of rds"), +IOP( "wint", BSIM4v4_MOD_WINT, IF_REAL, "Width reduction parameter"), +IOP( "dwg", BSIM4v4_MOD_DWG, IF_REAL, "Width reduction parameter"), +IOP( "dwb", BSIM4v4_MOD_DWB, IF_REAL, "Width reduction parameter"), + +IOP( "wl", BSIM4v4_MOD_WL, IF_REAL, "Width reduction parameter"), +IOP( "wlc", BSIM4v4_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), +IOP( "wln", BSIM4v4_MOD_WLN, IF_REAL, "Width reduction parameter"), +IOP( "ww", BSIM4v4_MOD_WW, IF_REAL, "Width reduction parameter"), +IOP( "wwc", BSIM4v4_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), +IOP( "wwn", BSIM4v4_MOD_WWN, IF_REAL, "Width reduction parameter"), +IOP( "wwl", BSIM4v4_MOD_WWL, IF_REAL, "Width reduction parameter"), +IOP( "wwlc", BSIM4v4_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), +IOP( "wmin", BSIM4v4_MOD_WMIN, IF_REAL, "Minimum width for the model"), +IOP( "wmax", BSIM4v4_MOD_WMAX, IF_REAL, "Maximum width for the model"), + +IOP( "b0", BSIM4v4_MOD_B0, IF_REAL, "Abulk narrow width parameter"), +IOP( "b1", BSIM4v4_MOD_B1, IF_REAL, "Abulk narrow width parameter"), + +IOP( "cgsl", BSIM4v4_MOD_CGSL, IF_REAL, "New C-V model parameter"), +IOP( "cgdl", BSIM4v4_MOD_CGDL, IF_REAL, "New C-V model parameter"), +IOP( "ckappas", BSIM4v4_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), +IOP( "ckappad", BSIM4v4_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), +IOP( "cf", BSIM4v4_MOD_CF, IF_REAL, "Fringe capacitance parameter"), +IOP( "clc", BSIM4v4_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), +IOP( "cle", BSIM4v4_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), +IOP( "dwc", BSIM4v4_MOD_DWC, IF_REAL, "Delta W for C-V model"), +IOP( "dlc", BSIM4v4_MOD_DLC, IF_REAL, "Delta L for C-V model"), +IOP( "xw", BSIM4v4_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), +IOP( "xl", BSIM4v4_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), +IOP( "dlcig", BSIM4v4_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), +IOP( "dwj", BSIM4v4_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), + +IOP( "alpha0", BSIM4v4_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), +IOP( "alpha1", BSIM4v4_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), +IOP( "beta0", BSIM4v4_MOD_BETA0, IF_REAL, "substrate current model parameter"), +IOP( "agidl", BSIM4v4_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), +IOP( "bgidl", BSIM4v4_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), +IOP( "cgidl", BSIM4v4_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), +IOP( "egidl", BSIM4v4_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), +IOP( "aigc", BSIM4v4_MOD_AIGC, IF_REAL, "Parameter for Igc"), +IOP( "bigc", BSIM4v4_MOD_BIGC, IF_REAL, "Parameter for Igc"), +IOP( "cigc", BSIM4v4_MOD_CIGC, IF_REAL, "Parameter for Igc"), +IOP( "aigsd", BSIM4v4_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), +IOP( "bigsd", BSIM4v4_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), +IOP( "cigsd", BSIM4v4_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), +IOP( "aigbacc", BSIM4v4_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), +IOP( "bigbacc", BSIM4v4_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), +IOP( "cigbacc", BSIM4v4_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), +IOP( "aigbinv", BSIM4v4_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), +IOP( "bigbinv", BSIM4v4_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), +IOP( "cigbinv", BSIM4v4_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), +IOP( "nigc", BSIM4v4_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), +IOP( "nigbinv", BSIM4v4_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), +IOP( "nigbacc", BSIM4v4_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), +IOP( "ntox", BSIM4v4_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), +IOP( "eigbinv", BSIM4v4_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), +IOP( "pigcd", BSIM4v4_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), +IOP( "poxedge", BSIM4v4_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), + +IOP( "ijthdfwd", BSIM4v4_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), +IOP( "ijthsfwd", BSIM4v4_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), +IOP( "ijthdrev", BSIM4v4_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), +IOP( "ijthsrev", BSIM4v4_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), +IOP( "xjbvd", BSIM4v4_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), +IOP( "xjbvs", BSIM4v4_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), +IOP( "bvd", BSIM4v4_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), +IOP( "bvs", BSIM4v4_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), + +IOP( "jtss", BSIM4v4_MOD_JTSS, IF_REAL, "Source bottom trap-assisted saturation current density"), +IOP( "jtsd", BSIM4v4_MOD_JTSD, IF_REAL, "Drain bottom trap-assisted saturation current density"), +IOP( "jtssws", BSIM4v4_MOD_JTSSWS, IF_REAL, "Source STI sidewall trap-assisted saturation current density"), +IOP( "jtsswd", BSIM4v4_MOD_JTSSWD, IF_REAL, "Drain STI sidewall trap-assisted saturation current density"), +IOP( "jtsswgs", BSIM4v4_MOD_JTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted saturation current density"), +IOP( "jtsswgd", BSIM4v4_MOD_JTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted saturation current density"), +IOP( "njts", BSIM4v4_MOD_NJTS, IF_REAL, "Non-ideality factor for bottom junction"), +IOP( "njtssw", BSIM4v4_MOD_NJTSSW, IF_REAL, "Non-ideality factor for STI sidewall junction"), +IOP( "njtsswg", BSIM4v4_MOD_NJTSSWG, IF_REAL, "Non-ideality factor for gate-edge sidewall junction"), +IOP( "xtss", BSIM4v4_MOD_XTSS, IF_REAL, "Power dependence of JTSS on temperature"), +IOP( "xtsd", BSIM4v4_MOD_XTSD, IF_REAL, "Power dependence of JTSD on temperature"), +IOP( "xtssws", BSIM4v4_MOD_XTSSWS, IF_REAL, "Power dependence of JTSSWS on temperature"), +IOP( "xtsswd", BSIM4v4_MOD_XTSSWD, IF_REAL, "Power dependence of JTSSWD on temperature"), +IOP( "xtsswgs", BSIM4v4_MOD_XTSSWGS, IF_REAL, "Power dependence of JTSSWGS on temperature"), +IOP( "xtsswgd", BSIM4v4_MOD_XTSSWGD, IF_REAL, "Power dependence of JTSSWGD on temperature"), +IOP( "tnjts", BSIM4v4_MOD_TNJTS, IF_REAL, "Temperature coefficient for NJTS"), +IOP( "tnjtssw", BSIM4v4_MOD_TNJTSSW, IF_REAL, "Temperature coefficient for NJTSSW"), +IOP( "tnjtsswg", BSIM4v4_MOD_TNJTSSWG, IF_REAL, "Temperature coefficient for NJTSSWG"), +IOP( "vtss", BSIM4v4_MOD_VTSS, IF_REAL, "Source bottom trap-assisted voltage dependent parameter"), +IOP( "vtsd", BSIM4v4_MOD_VTSD, IF_REAL, "Drain bottom trap-assisted voltage dependent parameter"), +IOP( "vtssws", BSIM4v4_MOD_VTSSWS, IF_REAL, "Source STI sidewall trap-assisted voltage dependent parameter"), +IOP( "vtsswd", BSIM4v4_MOD_VTSSWD, IF_REAL, "Drain STI sidewall trap-assisted voltage dependent parameter"), +IOP( "vtsswgs", BSIM4v4_MOD_VTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted voltage dependent parameter"), +IOP( "vtsswgd", BSIM4v4_MOD_VTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted voltage dependent parameter"), + +IOP( "gbmin", BSIM4v4_MOD_GBMIN, IF_REAL, "Minimum body conductance"), +IOP( "rbdb", BSIM4v4_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), +IOP( "rbpb", BSIM4v4_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), +IOP( "rbsb", BSIM4v4_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), +IOP( "rbps", BSIM4v4_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), +IOP( "rbpd", BSIM4v4_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), + +IOP( "lcdsc", BSIM4v4_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), +IOP( "lcdscb", BSIM4v4_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), +IOP( "lcdscd", BSIM4v4_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), +IOP( "lcit", BSIM4v4_MOD_LCIT, IF_REAL, "Length dependence of cit"), +IOP( "lnfactor", BSIM4v4_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), +IOP( "lxj", BSIM4v4_MOD_LXJ, IF_REAL, "Length dependence of xj"), +IOP( "lvsat", BSIM4v4_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), +IOP( "lat", BSIM4v4_MOD_LAT, IF_REAL, "Length dependence of at"), +IOP( "la0", BSIM4v4_MOD_LA0, IF_REAL, "Length dependence of a0"), +IOP( "lags", BSIM4v4_MOD_LAGS, IF_REAL, "Length dependence of ags"), +IOP( "la1", BSIM4v4_MOD_LA1, IF_REAL, "Length dependence of a1"), +IOP( "la2", BSIM4v4_MOD_LA2, IF_REAL, "Length dependence of a2"), +IOP( "lketa", BSIM4v4_MOD_LKETA, IF_REAL, "Length dependence of keta"), +IOP( "lnsub", BSIM4v4_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), +IOP( "lndep", BSIM4v4_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), +IOP( "lnsd", BSIM4v4_MOD_LNSD, IF_REAL, "Length dependence of nsd"), +IOP( "lphin", BSIM4v4_MOD_LPHIN, IF_REAL, "Length dependence of phin"), +IOP( "lngate", BSIM4v4_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), +IOP( "lgamma1", BSIM4v4_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), +IOP( "lgamma2", BSIM4v4_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), +IOP( "lvbx", BSIM4v4_MOD_LVBX, IF_REAL, "Length dependence of vbx"), +IOP( "lvbm", BSIM4v4_MOD_LVBM, IF_REAL, "Length dependence of vbm"), +IOP( "lxt", BSIM4v4_MOD_LXT, IF_REAL, "Length dependence of xt"), +IOP( "lk1", BSIM4v4_MOD_LK1, IF_REAL, "Length dependence of k1"), +IOP( "lkt1", BSIM4v4_MOD_LKT1, IF_REAL, "Length dependence of kt1"), +IOP( "lkt1l", BSIM4v4_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), +IOP( "lkt2", BSIM4v4_MOD_LKT2, IF_REAL, "Length dependence of kt2"), +IOP( "lk2", BSIM4v4_MOD_LK2, IF_REAL, "Length dependence of k2"), +IOP( "lk3", BSIM4v4_MOD_LK3, IF_REAL, "Length dependence of k3"), +IOP( "lk3b", BSIM4v4_MOD_LK3B, IF_REAL, "Length dependence of k3b"), +IOP( "lw0", BSIM4v4_MOD_LW0, IF_REAL, "Length dependence of w0"), +IOP( "ldvtp0", BSIM4v4_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), +IOP( "ldvtp1", BSIM4v4_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), +IOP( "llpe0", BSIM4v4_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), +IOP( "llpeb", BSIM4v4_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), +IOP( "ldvt0", BSIM4v4_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), +IOP( "ldvt1", BSIM4v4_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), +IOP( "ldvt2", BSIM4v4_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), +IOP( "ldvt0w", BSIM4v4_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), +IOP( "ldvt1w", BSIM4v4_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), +IOP( "ldvt2w", BSIM4v4_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), +IOP( "ldrout", BSIM4v4_MOD_LDROUT, IF_REAL, "Length dependence of drout"), +IOP( "ldsub", BSIM4v4_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), +IOP( "lvth0", BSIM4v4_MOD_LVTH0, IF_REAL,"Length dependence of vto"), +IOP( "lvtho", BSIM4v4_MOD_LVTH0, IF_REAL,"Length dependence of vto"), +IOP( "lua", BSIM4v4_MOD_LUA, IF_REAL, "Length dependence of ua"), +IOP( "lua1", BSIM4v4_MOD_LUA1, IF_REAL, "Length dependence of ua1"), +IOP( "lub", BSIM4v4_MOD_LUB, IF_REAL, "Length dependence of ub"), +IOP( "lub1", BSIM4v4_MOD_LUB1, IF_REAL, "Length dependence of ub1"), +IOP( "luc", BSIM4v4_MOD_LUC, IF_REAL, "Length dependence of uc"), +IOP( "luc1", BSIM4v4_MOD_LUC1, IF_REAL, "Length dependence of uc1"), +IOP( "lu0", BSIM4v4_MOD_LU0, IF_REAL, "Length dependence of u0"), +IOP( "lute", BSIM4v4_MOD_LUTE, IF_REAL, "Length dependence of ute"), +IOP( "lvoff", BSIM4v4_MOD_LVOFF, IF_REAL, "Length dependence of voff"), +IOP( "lminv", BSIM4v4_MOD_LMINV, IF_REAL, "Length dependence of minv"), +IOP( "ldelta", BSIM4v4_MOD_LDELTA, IF_REAL, "Length dependence of delta"), +IOP( "lrdsw", BSIM4v4_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), +IOP( "lrsw", BSIM4v4_MOD_LRSW, IF_REAL, "Length dependence of rsw"), +IOP( "lrdw", BSIM4v4_MOD_LRDW, IF_REAL, "Length dependence of rdw"), + +IOP( "lprwg", BSIM4v4_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), +IOP( "lprwb", BSIM4v4_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), + +IOP( "lprt", BSIM4v4_MOD_LPRT, IF_REAL, "Length dependence of prt "), +IOP( "leta0", BSIM4v4_MOD_LETA0, IF_REAL, "Length dependence of eta0"), +IOP( "letab", BSIM4v4_MOD_LETAB, IF_REAL, "Length dependence of etab"), +IOP( "lpclm", BSIM4v4_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), +IOP( "lpdiblc1", BSIM4v4_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), +IOP( "lpdiblc2", BSIM4v4_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), +IOP( "lpdiblcb", BSIM4v4_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), +IOP( "lfprout", BSIM4v4_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), +IOP( "lpdits", BSIM4v4_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), +IOP( "lpditsd", BSIM4v4_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), +IOP( "lpscbe1", BSIM4v4_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), +IOP( "lpscbe2", BSIM4v4_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), +IOP( "lpvag", BSIM4v4_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), +IOP( "lwr", BSIM4v4_MOD_LWR, IF_REAL, "Length dependence of wr"), +IOP( "ldwg", BSIM4v4_MOD_LDWG, IF_REAL, "Length dependence of dwg"), +IOP( "ldwb", BSIM4v4_MOD_LDWB, IF_REAL, "Length dependence of dwb"), +IOP( "lb0", BSIM4v4_MOD_LB0, IF_REAL, "Length dependence of b0"), +IOP( "lb1", BSIM4v4_MOD_LB1, IF_REAL, "Length dependence of b1"), +IOP( "lcgsl", BSIM4v4_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), +IOP( "lcgdl", BSIM4v4_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), +IOP( "lckappas", BSIM4v4_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), +IOP( "lckappad", BSIM4v4_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), +IOP( "lcf", BSIM4v4_MOD_LCF, IF_REAL, "Length dependence of cf"), +IOP( "lclc", BSIM4v4_MOD_LCLC, IF_REAL, "Length dependence of clc"), +IOP( "lcle", BSIM4v4_MOD_LCLE, IF_REAL, "Length dependence of cle"), +IOP( "lalpha0", BSIM4v4_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), +IOP( "lalpha1", BSIM4v4_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), +IOP( "lbeta0", BSIM4v4_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), +IOP( "lagidl", BSIM4v4_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), +IOP( "lbgidl", BSIM4v4_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), +IOP( "lcgidl", BSIM4v4_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), +IOP( "legidl", BSIM4v4_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), +IOP( "laigc", BSIM4v4_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), +IOP( "lbigc", BSIM4v4_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), +IOP( "lcigc", BSIM4v4_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), +IOP( "laigsd", BSIM4v4_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), +IOP( "lbigsd", BSIM4v4_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), +IOP( "lcigsd", BSIM4v4_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), +IOP( "laigbacc", BSIM4v4_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), +IOP( "lbigbacc", BSIM4v4_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), +IOP( "lcigbacc", BSIM4v4_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), +IOP( "laigbinv", BSIM4v4_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), +IOP( "lbigbinv", BSIM4v4_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), +IOP( "lcigbinv", BSIM4v4_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), +IOP( "lnigc", BSIM4v4_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), +IOP( "lnigbinv", BSIM4v4_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), +IOP( "lnigbacc", BSIM4v4_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), +IOP( "lntox", BSIM4v4_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), +IOP( "leigbinv", BSIM4v4_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), +IOP( "lpigcd", BSIM4v4_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), +IOP( "lpoxedge", BSIM4v4_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), + +IOP( "lvfbcv", BSIM4v4_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), +IOP( "lvfb", BSIM4v4_MOD_LVFB, IF_REAL, "Length dependence of vfb"), +IOP( "lacde", BSIM4v4_MOD_LACDE, IF_REAL, "Length dependence of acde"), +IOP( "lmoin", BSIM4v4_MOD_LMOIN, IF_REAL, "Length dependence of moin"), +IOP( "lnoff", BSIM4v4_MOD_LNOFF, IF_REAL, "Length dependence of noff"), +IOP( "lvoffcv", BSIM4v4_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), +IOP( "lxrcrg1", BSIM4v4_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), +IOP( "lxrcrg2", BSIM4v4_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), +IOP( "llambda", BSIM4v4_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"), +IOP( "lvtl", BSIM4v4_MOD_LVTL, IF_REAL, " Length dependence of vtl"), +IOP( "lxn", BSIM4v4_MOD_LXN, IF_REAL, " Length dependence of xn"), +IOP( "leu", BSIM4v4_MOD_LEU, IF_REAL, " Length dependence of eu"), +IOP( "lvfbsdoff", BSIM4v4_MOD_LVFBSDOFF, IF_REAL, "Length dependence of vfbsdoff"), + +IOP( "wcdsc", BSIM4v4_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), +IOP( "wcdscb", BSIM4v4_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), +IOP( "wcdscd", BSIM4v4_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), +IOP( "wcit", BSIM4v4_MOD_WCIT, IF_REAL, "Width dependence of cit"), +IOP( "wnfactor", BSIM4v4_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), +IOP( "wxj", BSIM4v4_MOD_WXJ, IF_REAL, "Width dependence of xj"), +IOP( "wvsat", BSIM4v4_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), +IOP( "wat", BSIM4v4_MOD_WAT, IF_REAL, "Width dependence of at"), +IOP( "wa0", BSIM4v4_MOD_WA0, IF_REAL, "Width dependence of a0"), +IOP( "wags", BSIM4v4_MOD_WAGS, IF_REAL, "Width dependence of ags"), +IOP( "wa1", BSIM4v4_MOD_WA1, IF_REAL, "Width dependence of a1"), +IOP( "wa2", BSIM4v4_MOD_WA2, IF_REAL, "Width dependence of a2"), +IOP( "wketa", BSIM4v4_MOD_WKETA, IF_REAL, "Width dependence of keta"), +IOP( "wnsub", BSIM4v4_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), +IOP( "wndep", BSIM4v4_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), +IOP( "wnsd", BSIM4v4_MOD_WNSD, IF_REAL, "Width dependence of nsd"), +IOP( "wphin", BSIM4v4_MOD_WPHIN, IF_REAL, "Width dependence of phin"), +IOP( "wngate", BSIM4v4_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), +IOP( "wgamma1", BSIM4v4_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), +IOP( "wgamma2", BSIM4v4_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), +IOP( "wvbx", BSIM4v4_MOD_WVBX, IF_REAL, "Width dependence of vbx"), +IOP( "wvbm", BSIM4v4_MOD_WVBM, IF_REAL, "Width dependence of vbm"), +IOP( "wxt", BSIM4v4_MOD_WXT, IF_REAL, "Width dependence of xt"), +IOP( "wk1", BSIM4v4_MOD_WK1, IF_REAL, "Width dependence of k1"), +IOP( "wkt1", BSIM4v4_MOD_WKT1, IF_REAL, "Width dependence of kt1"), +IOP( "wkt1l", BSIM4v4_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), +IOP( "wkt2", BSIM4v4_MOD_WKT2, IF_REAL, "Width dependence of kt2"), +IOP( "wk2", BSIM4v4_MOD_WK2, IF_REAL, "Width dependence of k2"), +IOP( "wk3", BSIM4v4_MOD_WK3, IF_REAL, "Width dependence of k3"), +IOP( "wk3b", BSIM4v4_MOD_WK3B, IF_REAL, "Width dependence of k3b"), +IOP( "ww0", BSIM4v4_MOD_WW0, IF_REAL, "Width dependence of w0"), +IOP( "wdvtp0", BSIM4v4_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), +IOP( "wdvtp1", BSIM4v4_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), +IOP( "wlpe0", BSIM4v4_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), +IOP( "wlpeb", BSIM4v4_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), +IOP( "wdvt0", BSIM4v4_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), +IOP( "wdvt1", BSIM4v4_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), +IOP( "wdvt2", BSIM4v4_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), +IOP( "wdvt0w", BSIM4v4_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), +IOP( "wdvt1w", BSIM4v4_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), +IOP( "wdvt2w", BSIM4v4_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), +IOP( "wdrout", BSIM4v4_MOD_WDROUT, IF_REAL, "Width dependence of drout"), +IOP( "wdsub", BSIM4v4_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), +IOP( "wvth0", BSIM4v4_MOD_WVTH0, IF_REAL,"Width dependence of vto"), +IOP( "wvtho", BSIM4v4_MOD_WVTH0, IF_REAL,"Width dependence of vto"), +IOP( "wua", BSIM4v4_MOD_WUA, IF_REAL, "Width dependence of ua"), +IOP( "wua1", BSIM4v4_MOD_WUA1, IF_REAL, "Width dependence of ua1"), +IOP( "wub", BSIM4v4_MOD_WUB, IF_REAL, "Width dependence of ub"), +IOP( "wub1", BSIM4v4_MOD_WUB1, IF_REAL, "Width dependence of ub1"), +IOP( "wuc", BSIM4v4_MOD_WUC, IF_REAL, "Width dependence of uc"), +IOP( "wuc1", BSIM4v4_MOD_WUC1, IF_REAL, "Width dependence of uc1"), +IOP( "wu0", BSIM4v4_MOD_WU0, IF_REAL, "Width dependence of u0"), +IOP( "wute", BSIM4v4_MOD_WUTE, IF_REAL, "Width dependence of ute"), +IOP( "wvoff", BSIM4v4_MOD_WVOFF, IF_REAL, "Width dependence of voff"), +IOP( "wminv", BSIM4v4_MOD_WMINV, IF_REAL, "Width dependence of minv"), +IOP( "wdelta", BSIM4v4_MOD_WDELTA, IF_REAL, "Width dependence of delta"), +IOP( "wrdsw", BSIM4v4_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), +IOP( "wrsw", BSIM4v4_MOD_WRSW, IF_REAL, "Width dependence of rsw"), +IOP( "wrdw", BSIM4v4_MOD_WRDW, IF_REAL, "Width dependence of rdw"), + +IOP( "wprwg", BSIM4v4_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), +IOP( "wprwb", BSIM4v4_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), + +IOP( "wprt", BSIM4v4_MOD_WPRT, IF_REAL, "Width dependence of prt"), +IOP( "weta0", BSIM4v4_MOD_WETA0, IF_REAL, "Width dependence of eta0"), +IOP( "wetab", BSIM4v4_MOD_WETAB, IF_REAL, "Width dependence of etab"), +IOP( "wpclm", BSIM4v4_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), +IOP( "wpdiblc1", BSIM4v4_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), +IOP( "wpdiblc2", BSIM4v4_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), +IOP( "wpdiblcb", BSIM4v4_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), +IOP( "wfprout", BSIM4v4_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), +IOP( "wpdits", BSIM4v4_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), +IOP( "wpditsd", BSIM4v4_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), +IOP( "wpscbe1", BSIM4v4_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), +IOP( "wpscbe2", BSIM4v4_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), +IOP( "wpvag", BSIM4v4_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), +IOP( "wwr", BSIM4v4_MOD_WWR, IF_REAL, "Width dependence of wr"), +IOP( "wdwg", BSIM4v4_MOD_WDWG, IF_REAL, "Width dependence of dwg"), +IOP( "wdwb", BSIM4v4_MOD_WDWB, IF_REAL, "Width dependence of dwb"), +IOP( "wb0", BSIM4v4_MOD_WB0, IF_REAL, "Width dependence of b0"), +IOP( "wb1", BSIM4v4_MOD_WB1, IF_REAL, "Width dependence of b1"), +IOP( "wcgsl", BSIM4v4_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), +IOP( "wcgdl", BSIM4v4_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), +IOP( "wckappas", BSIM4v4_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), +IOP( "wckappad", BSIM4v4_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), +IOP( "wcf", BSIM4v4_MOD_WCF, IF_REAL, "Width dependence of cf"), +IOP( "wclc", BSIM4v4_MOD_WCLC, IF_REAL, "Width dependence of clc"), +IOP( "wcle", BSIM4v4_MOD_WCLE, IF_REAL, "Width dependence of cle"), +IOP( "walpha0", BSIM4v4_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), +IOP( "walpha1", BSIM4v4_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), +IOP( "wbeta0", BSIM4v4_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), +IOP( "wagidl", BSIM4v4_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), +IOP( "wbgidl", BSIM4v4_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), +IOP( "wcgidl", BSIM4v4_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), +IOP( "wegidl", BSIM4v4_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), +IOP( "waigc", BSIM4v4_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), +IOP( "wbigc", BSIM4v4_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), +IOP( "wcigc", BSIM4v4_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), +IOP( "waigsd", BSIM4v4_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), +IOP( "wbigsd", BSIM4v4_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), +IOP( "wcigsd", BSIM4v4_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), +IOP( "waigbacc", BSIM4v4_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), +IOP( "wbigbacc", BSIM4v4_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), +IOP( "wcigbacc", BSIM4v4_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), +IOP( "waigbinv", BSIM4v4_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), +IOP( "wbigbinv", BSIM4v4_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), +IOP( "wcigbinv", BSIM4v4_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), +IOP( "wnigc", BSIM4v4_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), +IOP( "wnigbinv", BSIM4v4_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), +IOP( "wnigbacc", BSIM4v4_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), +IOP( "wntox", BSIM4v4_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), +IOP( "weigbinv", BSIM4v4_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), +IOP( "wpigcd", BSIM4v4_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), +IOP( "wpoxedge", BSIM4v4_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), +IOP( "wvfbcv", BSIM4v4_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), +IOP( "wvfb", BSIM4v4_MOD_WVFB, IF_REAL, "Width dependence of vfb"), +IOP( "wacde", BSIM4v4_MOD_WACDE, IF_REAL, "Width dependence of acde"), +IOP( "wmoin", BSIM4v4_MOD_WMOIN, IF_REAL, "Width dependence of moin"), +IOP( "wnoff", BSIM4v4_MOD_WNOFF, IF_REAL, "Width dependence of noff"), +IOP( "wvoffcv", BSIM4v4_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), +IOP( "wxrcrg1", BSIM4v4_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), +IOP( "wxrcrg2", BSIM4v4_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), +IOP( "wlambda", BSIM4v4_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"), +IOP( "wvtl", BSIM4v4_MOD_WVTL, IF_REAL, "Width dependence of vtl"), +IOP( "wxn", BSIM4v4_MOD_WXN, IF_REAL, "Width dependence of xn"), +IOP( "weu", BSIM4v4_MOD_WEU, IF_REAL, "Width dependence of eu"), +IOP( "wvfbsdoff", BSIM4v4_MOD_WVFBSDOFF, IF_REAL, "Width dependence of vfbsdoff"), + +IOP( "pcdsc", BSIM4v4_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), +IOP( "pcdscb", BSIM4v4_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), +IOP( "pcdscd", BSIM4v4_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), +IOP( "pcit", BSIM4v4_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), +IOP( "pnfactor", BSIM4v4_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), +IOP( "pxj", BSIM4v4_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), +IOP( "pvsat", BSIM4v4_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), +IOP( "pat", BSIM4v4_MOD_PAT, IF_REAL, "Cross-term dependence of at"), +IOP( "pa0", BSIM4v4_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), +IOP( "pags", BSIM4v4_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), +IOP( "pa1", BSIM4v4_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), +IOP( "pa2", BSIM4v4_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), +IOP( "pketa", BSIM4v4_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), +IOP( "pnsub", BSIM4v4_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), +IOP( "pndep", BSIM4v4_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), +IOP( "pnsd", BSIM4v4_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), +IOP( "pphin", BSIM4v4_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), +IOP( "pngate", BSIM4v4_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), +IOP( "pgamma1", BSIM4v4_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), +IOP( "pgamma2", BSIM4v4_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), +IOP( "pvbx", BSIM4v4_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), +IOP( "pvbm", BSIM4v4_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), +IOP( "pxt", BSIM4v4_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), +IOP( "pk1", BSIM4v4_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), +IOP( "pkt1", BSIM4v4_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), +IOP( "pkt1l", BSIM4v4_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), +IOP( "pkt2", BSIM4v4_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), +IOP( "pk2", BSIM4v4_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), +IOP( "pk3", BSIM4v4_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), +IOP( "pk3b", BSIM4v4_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), +IOP( "pw0", BSIM4v4_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), +IOP( "pdvtp0", BSIM4v4_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), +IOP( "pdvtp1", BSIM4v4_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), +IOP( "plpe0", BSIM4v4_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), +IOP( "plpeb", BSIM4v4_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), +IOP( "pdvt0", BSIM4v4_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), +IOP( "pdvt1", BSIM4v4_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), +IOP( "pdvt2", BSIM4v4_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), +IOP( "pdvt0w", BSIM4v4_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), +IOP( "pdvt1w", BSIM4v4_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), +IOP( "pdvt2w", BSIM4v4_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), +IOP( "pdrout", BSIM4v4_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), +IOP( "pdsub", BSIM4v4_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), +IOP( "pvth0", BSIM4v4_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), +IOP( "pvtho", BSIM4v4_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), +IOP( "pua", BSIM4v4_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), +IOP( "pua1", BSIM4v4_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), +IOP( "pub", BSIM4v4_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), +IOP( "pub1", BSIM4v4_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), +IOP( "puc", BSIM4v4_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), +IOP( "puc1", BSIM4v4_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), +IOP( "pu0", BSIM4v4_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), +IOP( "pute", BSIM4v4_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), +IOP( "pvoff", BSIM4v4_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), +IOP( "pminv", BSIM4v4_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), +IOP( "pdelta", BSIM4v4_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), +IOP( "prdsw", BSIM4v4_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), +IOP( "prsw", BSIM4v4_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), +IOP( "prdw", BSIM4v4_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), + +IOP( "pprwg", BSIM4v4_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), +IOP( "pprwb", BSIM4v4_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), + +IOP( "pprt", BSIM4v4_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), +IOP( "peta0", BSIM4v4_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), +IOP( "petab", BSIM4v4_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), +IOP( "ppclm", BSIM4v4_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), +IOP( "ppdiblc1", BSIM4v4_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), +IOP( "ppdiblc2", BSIM4v4_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), +IOP( "ppdiblcb", BSIM4v4_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), +IOP( "pfprout", BSIM4v4_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), +IOP( "ppdits", BSIM4v4_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), +IOP( "ppditsd", BSIM4v4_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), +IOP( "ppscbe1", BSIM4v4_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), +IOP( "ppscbe2", BSIM4v4_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), +IOP( "ppvag", BSIM4v4_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), +IOP( "pwr", BSIM4v4_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), +IOP( "pdwg", BSIM4v4_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), +IOP( "pdwb", BSIM4v4_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), +IOP( "pb0", BSIM4v4_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), +IOP( "pb1", BSIM4v4_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), +IOP( "pcgsl", BSIM4v4_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), +IOP( "pcgdl", BSIM4v4_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), +IOP( "pckappas", BSIM4v4_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), +IOP( "pckappad", BSIM4v4_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), +IOP( "pcf", BSIM4v4_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), +IOP( "pclc", BSIM4v4_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), +IOP( "pcle", BSIM4v4_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), +IOP( "palpha0", BSIM4v4_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), +IOP( "palpha1", BSIM4v4_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), +IOP( "pbeta0", BSIM4v4_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), +IOP( "pagidl", BSIM4v4_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), +IOP( "pbgidl", BSIM4v4_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), +IOP( "pcgidl", BSIM4v4_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), +IOP( "pegidl", BSIM4v4_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), +IOP( "paigc", BSIM4v4_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), +IOP( "pbigc", BSIM4v4_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), +IOP( "pcigc", BSIM4v4_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), +IOP( "paigsd", BSIM4v4_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), +IOP( "pbigsd", BSIM4v4_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), +IOP( "pcigsd", BSIM4v4_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), +IOP( "paigbacc", BSIM4v4_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), +IOP( "pbigbacc", BSIM4v4_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), +IOP( "pcigbacc", BSIM4v4_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), +IOP( "paigbinv", BSIM4v4_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), +IOP( "pbigbinv", BSIM4v4_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), +IOP( "pcigbinv", BSIM4v4_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), +IOP( "pnigc", BSIM4v4_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), +IOP( "pnigbinv", BSIM4v4_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), +IOP( "pnigbacc", BSIM4v4_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), +IOP( "pntox", BSIM4v4_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), +IOP( "peigbinv", BSIM4v4_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), +IOP( "ppigcd", BSIM4v4_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), +IOP( "ppoxedge", BSIM4v4_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), +IOP( "pvfbcv", BSIM4v4_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), +IOP( "pvfb", BSIM4v4_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), +IOP( "pacde", BSIM4v4_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), +IOP( "pmoin", BSIM4v4_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), +IOP( "pnoff", BSIM4v4_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), +IOP( "pvoffcv", BSIM4v4_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), +IOP( "pxrcrg1", BSIM4v4_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), +IOP( "pxrcrg2", BSIM4v4_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), +IOP( "plambda", BSIM4v4_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"), +IOP( "pvtl", BSIM4v4_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"), +IOP( "pxn", BSIM4v4_MOD_PXN, IF_REAL, "Cross-term dependence of xn"), +IOP( "peu", BSIM4v4_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), +IOP( "pvfbsdoff", BSIM4v4_MOD_PVFBSDOFF, IF_REAL, "Cross-term dependence of vfbsdoff"), /* stress effect*/ -IOP( "saref", BSIM4V4_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), -IOP( "sbref", BSIM4V4_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), -IOP( "wlod", BSIM4V4_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), -IOP( "ku0", BSIM4V4_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), -IOP( "kvsat", BSIM4V4_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), -IOP( "kvth0", BSIM4V4_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), -IOP( "tku0", BSIM4V4_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), -IOP( "llodku0", BSIM4V4_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), -IOP( "wlodku0", BSIM4V4_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), -IOP( "llodvth", BSIM4V4_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), -IOP( "wlodvth", BSIM4V4_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), -IOP( "lku0", BSIM4V4_MOD_LKU0, IF_REAL, "Length dependence of ku0"), -IOP( "wku0", BSIM4V4_MOD_WKU0, IF_REAL, "Width dependence of ku0"), -IOP( "pku0", BSIM4V4_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), -IOP( "lkvth0", BSIM4V4_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), -IOP( "wkvth0", BSIM4V4_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), -IOP( "pkvth0", BSIM4V4_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), -IOP( "stk2", BSIM4V4_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), -IOP( "lodk2", BSIM4V4_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), -IOP( "steta0", BSIM4V4_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), -IOP( "lodeta0", BSIM4V4_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), - - -IOP( "noia", BSIM4V4_MOD_NOIA, IF_REAL, "Flicker noise parameter"), -IOP( "noib", BSIM4V4_MOD_NOIB, IF_REAL, "Flicker noise parameter"), -IOP( "noic", BSIM4V4_MOD_NOIC, IF_REAL, "Flicker noise parameter"), -IOP( "tnoia", BSIM4V4_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), -IOP( "tnoib", BSIM4V4_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), -IOP( "rnoia", BSIM4V4_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), -IOP( "rnoib", BSIM4V4_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), -IOP( "ntnoi", BSIM4V4_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), -IOP( "em", BSIM4V4_MOD_EM, IF_REAL, "Flicker noise parameter"), -IOP( "ef", BSIM4V4_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), -IOP( "af", BSIM4V4_MOD_AF, IF_REAL, "Flicker noise exponent"), -IOP( "kf", BSIM4V4_MOD_KF, IF_REAL, "Flicker noise coefficient"), - -IOP( "stimod", BSIM4V4_MOD_STIMOD, IF_REAL, "Stress effect model selector"), -IOP( "sa0", BSIM4V4_MOD_SA0, IF_REAL, "Distance between OD edge to poly of one side"), -IOP( "sb0", BSIM4V4_MOD_SB0, IF_REAL, "Distance between OD edge to poly of other side"), - -IP( "nmos", BSIM4V4_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), -IP( "pmos", BSIM4V4_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), +IOP( "saref", BSIM4v4_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), +IOP( "sbref", BSIM4v4_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), +IOP( "wlod", BSIM4v4_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), +IOP( "ku0", BSIM4v4_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), +IOP( "kvsat", BSIM4v4_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), +IOP( "kvth0", BSIM4v4_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), +IOP( "tku0", BSIM4v4_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), +IOP( "llodku0", BSIM4v4_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), +IOP( "wlodku0", BSIM4v4_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), +IOP( "llodvth", BSIM4v4_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), +IOP( "wlodvth", BSIM4v4_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), +IOP( "lku0", BSIM4v4_MOD_LKU0, IF_REAL, "Length dependence of ku0"), +IOP( "wku0", BSIM4v4_MOD_WKU0, IF_REAL, "Width dependence of ku0"), +IOP( "pku0", BSIM4v4_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), +IOP( "lkvth0", BSIM4v4_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), +IOP( "wkvth0", BSIM4v4_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), +IOP( "pkvth0", BSIM4v4_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), +IOP( "stk2", BSIM4v4_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), +IOP( "lodk2", BSIM4v4_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), +IOP( "steta0", BSIM4v4_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), +IOP( "lodeta0", BSIM4v4_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), + + +IOP( "noia", BSIM4v4_MOD_NOIA, IF_REAL, "Flicker noise parameter"), +IOP( "noib", BSIM4v4_MOD_NOIB, IF_REAL, "Flicker noise parameter"), +IOP( "noic", BSIM4v4_MOD_NOIC, IF_REAL, "Flicker noise parameter"), +IOP( "tnoia", BSIM4v4_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), +IOP( "tnoib", BSIM4v4_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), +IOP( "rnoia", BSIM4v4_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), +IOP( "rnoib", BSIM4v4_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), +IOP( "ntnoi", BSIM4v4_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), +IOP( "em", BSIM4v4_MOD_EM, IF_REAL, "Flicker noise parameter"), +IOP( "ef", BSIM4v4_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), +IOP( "af", BSIM4v4_MOD_AF, IF_REAL, "Flicker noise exponent"), +IOP( "kf", BSIM4v4_MOD_KF, IF_REAL, "Flicker noise coefficient"), + +IOP( "stimod", BSIM4v4_MOD_STIMOD, IF_REAL, "Stress effect model selector"), +IOP( "sa0", BSIM4v4_MOD_SA0, IF_REAL, "Distance between OD edge to poly of one side"), +IOP( "sb0", BSIM4v4_MOD_SB0, IF_REAL, "Distance between OD edge to poly of other side"), + +IP( "nmos", BSIM4v4_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), +IP( "pmos", BSIM4v4_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; -char *BSIM4V4names[] = { +char *BSIM4v4names[] = { "Drain", "Gate", "Source", @@ -817,8 +817,8 @@ char *BSIM4V4names[] = { "Charge" }; -int BSIM4V4nSize = NUMELEMS(BSIM4V4names); -int BSIM4V4pTSize = NUMELEMS(BSIM4V4pTable); -int BSIM4V4mPTSize = NUMELEMS(BSIM4V4mPTable); -int BSIM4V4iSize = sizeof(BSIM4V4instance); -int BSIM4V4mSize = sizeof(BSIM4V4model); +int BSIM4v4nSize = NUMELEMS(BSIM4v4names); +int BSIM4v4pTSize = NUMELEMS(BSIM4v4pTable); +int BSIM4v4mPTSize = NUMELEMS(BSIM4v4mPTable); +int BSIM4v4iSize = sizeof(BSIM4v4instance); +int BSIM4v4mSize = sizeof(BSIM4v4model); diff --git a/src/spicelib/devices/bsim4v4/b4v4acld.c b/src/spicelib/devices/bsim4v4/b4v4acld.c index 6f85cc7de..e3e202647 100644 --- a/src/spicelib/devices/bsim4v4/b4v4acld.c +++ b/src/spicelib/devices/bsim4v4/b4v4acld.c @@ -17,12 +17,12 @@ int -BSIM4V4acLoad(inModel,ckt) +BSIM4v4acLoad(inModel,ckt) GENmodel *inModel; CKTcircuit *ckt; { -BSIM4V4model *model = (BSIM4V4model*)inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model*)inModel; +BSIM4v4instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcbgb, xcbdb, xcbsb, xcbbb; @@ -55,44 +55,44 @@ double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; omega = ckt->CKTomega; - for (; model != NULL; model = model->BSIM4V4nextModel) - { for (here = model->BSIM4V4instances; here!= NULL; - here = here->BSIM4V4nextInstance) - { if (here->BSIM4V4owner != ARCHme) continue; + for (; model != NULL; model = model->BSIM4v4nextModel) + { for (here = model->BSIM4v4instances; here!= NULL; + here = here->BSIM4v4nextInstance) + { if (here->BSIM4v4owner != ARCHme) continue; pParam = here->pParam; - capbd = here->BSIM4V4capbd; - capbs = here->BSIM4V4capbs; - cgso = here->BSIM4V4cgso; - cgdo = here->BSIM4V4cgdo; - cgbo = pParam->BSIM4V4cgbo; - - Csd = -(here->BSIM4V4cddb + here->BSIM4V4cgdb + here->BSIM4V4cbdb); - Csg = -(here->BSIM4V4cdgb + here->BSIM4V4cggb + here->BSIM4V4cbgb); - Css = -(here->BSIM4V4cdsb + here->BSIM4V4cgsb + here->BSIM4V4cbsb); - - if (here->BSIM4V4acnqsMod) - { T0 = omega * here->BSIM4V4taunet; + capbd = here->BSIM4v4capbd; + capbs = here->BSIM4v4capbs; + cgso = here->BSIM4v4cgso; + cgdo = here->BSIM4v4cgdo; + cgbo = pParam->BSIM4v4cgbo; + + Csd = -(here->BSIM4v4cddb + here->BSIM4v4cgdb + here->BSIM4v4cbdb); + Csg = -(here->BSIM4v4cdgb + here->BSIM4v4cggb + here->BSIM4v4cbgb); + Css = -(here->BSIM4v4cdsb + here->BSIM4v4cgsb + here->BSIM4v4cbsb); + + if (here->BSIM4v4acnqsMod) + { T0 = omega * here->BSIM4v4taunet; T1 = T0 * T0; T2 = 1.0 / (1.0 + T1); T3 = T0 * T2; - gmr = here->BSIM4V4gm * T2; - gmbsr = here->BSIM4V4gmbs * T2; - gdsr = here->BSIM4V4gds * T2; + gmr = here->BSIM4v4gm * T2; + gmbsr = here->BSIM4v4gmbs * T2; + gdsr = here->BSIM4v4gds * T2; - gmi = -here->BSIM4V4gm * T3; - gmbsi = -here->BSIM4V4gmbs * T3; - gdsi = -here->BSIM4V4gds * T3; + gmi = -here->BSIM4v4gm * T3; + gmbsi = -here->BSIM4v4gmbs * T3; + gdsi = -here->BSIM4v4gds * T3; - Cddr = here->BSIM4V4cddb * T2; - Cdgr = here->BSIM4V4cdgb * T2; - Cdsr = here->BSIM4V4cdsb * T2; + Cddr = here->BSIM4v4cddb * T2; + Cdgr = here->BSIM4v4cdgb * T2; + Cdsr = here->BSIM4v4cdsb * T2; Cdbr = -(Cddr + Cdgr + Cdsr); /* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */ - Cddi = here->BSIM4V4cddb * T3 * omega; - Cdgi = here->BSIM4V4cdgb * T3 * omega; - Cdsi = here->BSIM4V4cdsb * T3 * omega; + Cddi = here->BSIM4v4cddb * T3 * omega; + Cdgi = here->BSIM4v4cdgb * T3 * omega; + Cdsi = here->BSIM4v4cdsb * T3 * omega; Cdbi = -(Cddi + Cdgi + Cdsi); Csdr = Csd * T2; @@ -105,9 +105,9 @@ double m; Cssi = Css * T3 * omega; Csbi = -(Csdi + Csgi + Cssi); - Cgdr = -(Cddr + Csdr + here->BSIM4V4cbdb); - Cggr = -(Cdgr + Csgr + here->BSIM4V4cbgb); - Cgsr = -(Cdsr + Cssr + here->BSIM4V4cbsb); + Cgdr = -(Cddr + Csdr + here->BSIM4v4cbdb); + Cggr = -(Cdgr + Csgr + here->BSIM4v4cbgb); + Cgsr = -(Cdsr + Cssr + here->BSIM4v4cbsb); Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = -(Cddi + Csdi); @@ -116,14 +116,14 @@ double m; Cgbi = -(Cgdi + Cggi + Cgsi); } else /* QS */ - { gmr = here->BSIM4V4gm; - gmbsr = here->BSIM4V4gmbs; - gdsr = here->BSIM4V4gds; + { gmr = here->BSIM4v4gm; + gmbsr = here->BSIM4v4gmbs; + gdsr = here->BSIM4v4gds; gmi = gmbsi = gdsi = 0.0; - Cddr = here->BSIM4V4cddb; - Cdgr = here->BSIM4V4cdgb; - Cdsr = here->BSIM4V4cdsb; + Cddr = here->BSIM4v4cddb; + Cdgr = here->BSIM4v4cdgb; + Cdsr = here->BSIM4v4cdsb; Cdbr = -(Cddr + Cdgr + Cdsr); Cddi = Cdgi = Cdsi = Cdbi = 0.0; @@ -133,15 +133,15 @@ double m; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csgi = Cssi = Csbi = 0.0; - Cgdr = here->BSIM4V4cgdb; - Cggr = here->BSIM4V4cggb; - Cgsr = here->BSIM4V4cgsb; + Cgdr = here->BSIM4v4cgdb; + Cggr = here->BSIM4v4cggb; + Cgsr = here->BSIM4v4cgsb; Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = Cggi = Cgsi = Cgbi = 0.0; } - if (here->BSIM4V4mode >= 0) + if (here->BSIM4v4mode >= 0) { Gmr = gmr; Gmbsr = gmbsr; FwdSumr = Gmr + Gmbsr; @@ -151,11 +151,11 @@ double m; FwdSumi = Gmi + Gmbsi; RevSumi = 0.0; - gbbdp = -(here->BSIM4V4gbds); - gbbsp = here->BSIM4V4gbds + here->BSIM4V4gbgs + here->BSIM4V4gbbs; - gbdpg = here->BSIM4V4gbgs; - gbdpdp = here->BSIM4V4gbds; - gbdpb = here->BSIM4V4gbbs; + gbbdp = -(here->BSIM4v4gbds); + gbbsp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; + gbdpg = here->BSIM4v4gbgs; + gbdpdp = here->BSIM4v4gbds; + gbdpb = here->BSIM4v4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; @@ -163,32 +163,32 @@ double m; gbspb = 0.0; gbspsp = 0.0; - if (model->BSIM4V4igcMod) - { gIstotg = here->BSIM4V4gIgsg + here->BSIM4V4gIgcsg; - gIstotd = here->BSIM4V4gIgcsd; - gIstots = here->BSIM4V4gIgss + here->BSIM4V4gIgcss; - gIstotb = here->BSIM4V4gIgcsb; + if (model->BSIM4v4igcMod) + { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg; + gIstotd = here->BSIM4v4gIgcsd; + gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcss; + gIstotb = here->BSIM4v4gIgcsb; - gIdtotg = here->BSIM4V4gIgdg + here->BSIM4V4gIgcdg; - gIdtotd = here->BSIM4V4gIgdd + here->BSIM4V4gIgcdd; - gIdtots = here->BSIM4V4gIgcds; - gIdtotb = here->BSIM4V4gIgcdb; + gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcdg; + gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcdd; + gIdtots = here->BSIM4v4gIgcds; + gIdtotb = here->BSIM4v4gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } - if (model->BSIM4V4igbMod) - { gIbtotg = here->BSIM4V4gIgbg; - gIbtotd = here->BSIM4V4gIgbd; - gIbtots = here->BSIM4V4gIgbs; - gIbtotb = here->BSIM4V4gIgbb; + if (model->BSIM4v4igbMod) + { gIbtotg = here->BSIM4v4gIgbg; + gIbtotd = here->BSIM4v4gIgbd; + gIbtots = here->BSIM4v4gIgbs; + gIbtotb = here->BSIM4v4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; - if ((model->BSIM4V4igcMod != 0) || (model->BSIM4V4igbMod != 0)) + if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; @@ -197,28 +197,28 @@ double m; else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; - if (here->BSIM4V4rgateMod == 2) - T0 = *(ckt->CKTstates[0] + here->BSIM4V4vges) - - *(ckt->CKTstates[0] + here->BSIM4V4vgs); - else if (here->BSIM4V4rgateMod == 3) - T0 = *(ckt->CKTstates[0] + here->BSIM4V4vgms) - - *(ckt->CKTstates[0] + here->BSIM4V4vgs); - if (here->BSIM4V4rgateMod > 1) - { gcrgd = here->BSIM4V4gcrgd * T0; - gcrgg = here->BSIM4V4gcrgg * T0; - gcrgs = here->BSIM4V4gcrgs * T0; - gcrgb = here->BSIM4V4gcrgb * T0; - gcrgg -= here->BSIM4V4gcrg; - gcrg = here->BSIM4V4gcrg; + if (here->BSIM4v4rgateMod == 2) + T0 = *(ckt->CKTstates[0] + here->BSIM4v4vges) + - *(ckt->CKTstates[0] + here->BSIM4v4vgs); + else if (here->BSIM4v4rgateMod == 3) + T0 = *(ckt->CKTstates[0] + here->BSIM4v4vgms) + - *(ckt->CKTstates[0] + here->BSIM4v4vgs); + if (here->BSIM4v4rgateMod > 1) + { gcrgd = here->BSIM4v4gcrgd * T0; + gcrgg = here->BSIM4v4gcrgg * T0; + gcrgs = here->BSIM4v4gcrgs * T0; + gcrgb = here->BSIM4v4gcrgb * T0; + gcrgg -= here->BSIM4v4gcrg; + gcrg = here->BSIM4v4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; - if (here->BSIM4V4rgateMod == 3) - { xcgmgmb = (cgdo + cgso + pParam->BSIM4V4cgbo) * omega; + if (here->BSIM4v4rgateMod == 3) + { xcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; - xcgmbb = -pParam->BSIM4V4cgbo * omega; + xcgmbb = -pParam->BSIM4v4cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; @@ -231,43 +231,43 @@ double m; xcdgbr = Cdgr * omega; xcsgbr = Csgr * omega; - xcbgb = here->BSIM4V4cbgb * omega; + xcbgb = here->BSIM4v4cbgb * omega; } else - { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4V4cgbo ) * omega; + { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v4cgbo ) * omega; xcgdbr = (Cgdr - cgdo) * omega; xcgsbr = (Cgsr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Cdgr - cgdo) * omega; xcsgbr = (Csgr - cgso) * omega; - xcbgb = (here->BSIM4V4cbgb - pParam->BSIM4V4cgbo) * omega; + xcbgb = (here->BSIM4v4cbgb - pParam->BSIM4v4cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } - xcddbr = (Cddr + here->BSIM4V4capbd + cgdo) * omega; + xcddbr = (Cddr + here->BSIM4v4capbd + cgdo) * omega; xcdsbr = Cdsr * omega; xcsdbr = Csdr * omega; - xcssbr = (here->BSIM4V4capbs + cgso + Cssr) * omega; + xcssbr = (here->BSIM4v4capbs + cgso + Cssr) * omega; - if (!here->BSIM4V4rbodyMod) + if (!here->BSIM4v4rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); - xcbdb = (here->BSIM4V4cbdb - here->BSIM4V4capbd) * omega; - xcbsb = (here->BSIM4V4cbsb - here->BSIM4V4capbs) * omega; + xcbdb = (here->BSIM4v4cbdb - here->BSIM4v4capbd) * omega; + xcbsb = (here->BSIM4v4cbsb - here->BSIM4v4capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = Cdbr * omega; xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb) - + here->BSIM4V4capbs * omega; + + here->BSIM4v4capbs * omega; - xcbdb = here->BSIM4V4cbdb * omega; - xcbsb = here->BSIM4V4cbsb * omega; + xcbdb = here->BSIM4v4cbdb * omega; + xcbsb = here->BSIM4v4cbsb * omega; - xcdbdb = -here->BSIM4V4capbd * omega; - xcsbsb = -here->BSIM4V4capbs * omega; + xcdbdb = -here->BSIM4v4capbd * omega; + xcsbsb = -here->BSIM4v4capbs * omega; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); @@ -294,45 +294,45 @@ double m; FwdSumi = 0.0; RevSumi = -(Gmi + Gmbsi); - gbbsp = -(here->BSIM4V4gbds); - gbbdp = here->BSIM4V4gbds + here->BSIM4V4gbgs + here->BSIM4V4gbbs; + gbbsp = -(here->BSIM4v4gbds); + gbbdp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; - gbspg = here->BSIM4V4gbgs; - gbspsp = here->BSIM4V4gbds; - gbspb = here->BSIM4V4gbbs; + gbspg = here->BSIM4v4gbgs; + gbspsp = here->BSIM4v4gbds; + gbspb = here->BSIM4v4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); - if (model->BSIM4V4igcMod) - { gIstotg = here->BSIM4V4gIgsg + here->BSIM4V4gIgcdg; - gIstotd = here->BSIM4V4gIgcds; - gIstots = here->BSIM4V4gIgss + here->BSIM4V4gIgcdd; - gIstotb = here->BSIM4V4gIgcdb; + if (model->BSIM4v4igcMod) + { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcdg; + gIstotd = here->BSIM4v4gIgcds; + gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcdd; + gIstotb = here->BSIM4v4gIgcdb; - gIdtotg = here->BSIM4V4gIgdg + here->BSIM4V4gIgcsg; - gIdtotd = here->BSIM4V4gIgdd + here->BSIM4V4gIgcss; - gIdtots = here->BSIM4V4gIgcsd; - gIdtotb = here->BSIM4V4gIgcsb; + gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg; + gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcss; + gIdtots = here->BSIM4v4gIgcsd; + gIdtotb = here->BSIM4v4gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } - if (model->BSIM4V4igbMod) - { gIbtotg = here->BSIM4V4gIgbg; - gIbtotd = here->BSIM4V4gIgbs; - gIbtots = here->BSIM4V4gIgbd; - gIbtotb = here->BSIM4V4gIgbb; + if (model->BSIM4v4igbMod) + { gIbtotg = here->BSIM4v4gIgbg; + gIbtotd = here->BSIM4v4gIgbs; + gIbtots = here->BSIM4v4gIgbd; + gIbtotb = here->BSIM4v4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; - if ((model->BSIM4V4igcMod != 0) || (model->BSIM4V4igbMod != 0)) + if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; @@ -341,28 +341,28 @@ double m; else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; - if (here->BSIM4V4rgateMod == 2) - T0 = *(ckt->CKTstates[0] + here->BSIM4V4vges) - - *(ckt->CKTstates[0] + here->BSIM4V4vgs); - else if (here->BSIM4V4rgateMod == 3) - T0 = *(ckt->CKTstates[0] + here->BSIM4V4vgms) - - *(ckt->CKTstates[0] + here->BSIM4V4vgs); - if (here->BSIM4V4rgateMod > 1) - { gcrgd = here->BSIM4V4gcrgs * T0; - gcrgg = here->BSIM4V4gcrgg * T0; - gcrgs = here->BSIM4V4gcrgd * T0; - gcrgb = here->BSIM4V4gcrgb * T0; - gcrgg -= here->BSIM4V4gcrg; - gcrg = here->BSIM4V4gcrg; + if (here->BSIM4v4rgateMod == 2) + T0 = *(ckt->CKTstates[0] + here->BSIM4v4vges) + - *(ckt->CKTstates[0] + here->BSIM4v4vgs); + else if (here->BSIM4v4rgateMod == 3) + T0 = *(ckt->CKTstates[0] + here->BSIM4v4vgms) + - *(ckt->CKTstates[0] + here->BSIM4v4vgs); + if (here->BSIM4v4rgateMod > 1) + { gcrgd = here->BSIM4v4gcrgs * T0; + gcrgg = here->BSIM4v4gcrgg * T0; + gcrgs = here->BSIM4v4gcrgd * T0; + gcrgb = here->BSIM4v4gcrgb * T0; + gcrgg -= here->BSIM4v4gcrg; + gcrg = here->BSIM4v4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; - if (here->BSIM4V4rgateMod == 3) - { xcgmgmb = (cgdo + cgso + pParam->BSIM4V4cgbo) * omega; + if (here->BSIM4v4rgateMod == 3) + { xcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; - xcgmbb = -pParam->BSIM4V4cgbo * omega; + xcgmbb = -pParam->BSIM4v4cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; @@ -375,42 +375,42 @@ double m; xcdgbr = Csgr * omega; xcsgbr = Cdgr * omega; - xcbgb = here->BSIM4V4cbgb * omega; + xcbgb = here->BSIM4v4cbgb * omega; } else - { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4V4cgbo ) * omega; + { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v4cgbo ) * omega; xcgdbr = (Cgsr - cgdo) * omega; xcgsbr = (Cgdr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Csgr - cgdo) * omega; xcsgbr = (Cdgr - cgso) * omega; - xcbgb = (here->BSIM4V4cbgb - pParam->BSIM4V4cgbo) * omega; + xcbgb = (here->BSIM4v4cbgb - pParam->BSIM4v4cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } - xcddbr = (here->BSIM4V4capbd + cgdo + Cssr) * omega; + xcddbr = (here->BSIM4v4capbd + cgdo + Cssr) * omega; xcdsbr = Csdr * omega; xcsdbr = Cdsr * omega; - xcssbr = (Cddr + here->BSIM4V4capbs + cgso) * omega; + xcssbr = (Cddr + here->BSIM4v4capbs + cgso) * omega; - if (!here->BSIM4V4rbodyMod) + if (!here->BSIM4v4rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); - xcbdb = (here->BSIM4V4cbsb - here->BSIM4V4capbd) * omega; - xcbsb = (here->BSIM4V4cbdb - here->BSIM4V4capbs) * omega; + xcbdb = (here->BSIM4v4cbsb - here->BSIM4v4capbd) * omega; + xcbsb = (here->BSIM4v4cbdb - here->BSIM4v4capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb) - + here->BSIM4V4capbd * omega; + + here->BSIM4v4capbd * omega; xcsbbr = Cdbr * omega; - xcbdb = here->BSIM4V4cbsb * omega; - xcbsb = here->BSIM4V4cbdb * omega; - xcdbdb = -here->BSIM4V4capbd * omega; - xcsbsb = -here->BSIM4V4capbs * omega; + xcbdb = here->BSIM4v4cbsb * omega; + xcbsb = here->BSIM4v4cbdb * omega; + xcdbdb = -here->BSIM4v4capbd * omega; + xcsbsb = -here->BSIM4v4capbs * omega; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); @@ -428,18 +428,18 @@ double m; xcgbbi = Cgbi; } - if (model->BSIM4V4rdsMod == 1) - { gstot = here->BSIM4V4gstot; - gstotd = here->BSIM4V4gstotd; - gstotg = here->BSIM4V4gstotg; - gstots = here->BSIM4V4gstots - gstot; - gstotb = here->BSIM4V4gstotb; - - gdtot = here->BSIM4V4gdtot; - gdtotd = here->BSIM4V4gdtotd - gdtot; - gdtotg = here->BSIM4V4gdtotg; - gdtots = here->BSIM4V4gdtots; - gdtotb = here->BSIM4V4gdtotb; + if (model->BSIM4v4rdsMod == 1) + { gstot = here->BSIM4v4gstot; + gstotd = here->BSIM4v4gstotd; + gstotg = here->BSIM4v4gstotg; + gstots = here->BSIM4v4gstots - gstot; + gstotb = here->BSIM4v4gstotb; + + gdtot = here->BSIM4v4gdtot; + gdtotd = here->BSIM4v4gdtotd - gdtot; + gdtotg = here->BSIM4v4gdtotg; + gdtots = here->BSIM4v4gdtots; + gdtotb = here->BSIM4v4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; @@ -451,201 +451,201 @@ double m; * Loading AC matrix */ - m = here->BSIM4V4m; + m = here->BSIM4v4m; - if (!model->BSIM4V4rdsMod) - { gdpr = here->BSIM4V4drainConductance; - gspr = here->BSIM4V4sourceConductance; + if (!model->BSIM4v4rdsMod) + { gdpr = here->BSIM4v4drainConductance; + gspr = here->BSIM4v4sourceConductance; } else gdpr = gspr = 0.0; - if (!here->BSIM4V4rbodyMod) - { gjbd = here->BSIM4V4gbd; - gjbs = here->BSIM4V4gbs; + if (!here->BSIM4v4rbodyMod) + { gjbd = here->BSIM4v4gbd; + gjbs = here->BSIM4v4gbs; } else gjbd = gjbs = 0.0; - geltd = here->BSIM4V4grgeltd; - - if (here->BSIM4V4rgateMod == 1) - { *(here->BSIM4V4GEgePtr) += m * geltd; - *(here->BSIM4V4GPgePtr) -= m * geltd; - *(here->BSIM4V4GEgpPtr) -= m * geltd; - - *(here->BSIM4V4GPgpPtr +1) += m * xcggbr; - *(here->BSIM4V4GPgpPtr) += m * (geltd + xcggbi + gIgtotg); - *(here->BSIM4V4GPdpPtr +1) += m * xcgdbr; - *(here->BSIM4V4GPdpPtr) += m * (xcgdbi + gIgtotd); - *(here->BSIM4V4GPspPtr +1) += m * xcgsbr; - *(here->BSIM4V4GPspPtr) += m * (xcgsbi + gIgtots); - *(here->BSIM4V4GPbpPtr +1) += m * xcgbbr; - *(here->BSIM4V4GPbpPtr) += m * (xcgbbi + gIgtotb); + geltd = here->BSIM4v4grgeltd; + + if (here->BSIM4v4rgateMod == 1) + { *(here->BSIM4v4GEgePtr) += m * geltd; + *(here->BSIM4v4GPgePtr) -= m * geltd; + *(here->BSIM4v4GEgpPtr) -= m * geltd; + + *(here->BSIM4v4GPgpPtr +1) += m * xcggbr; + *(here->BSIM4v4GPgpPtr) += m * (geltd + xcggbi + gIgtotg); + *(here->BSIM4v4GPdpPtr +1) += m * xcgdbr; + *(here->BSIM4v4GPdpPtr) += m * (xcgdbi + gIgtotd); + *(here->BSIM4v4GPspPtr +1) += m * xcgsbr; + *(here->BSIM4v4GPspPtr) += m * (xcgsbi + gIgtots); + *(here->BSIM4v4GPbpPtr +1) += m * xcgbbr; + *(here->BSIM4v4GPbpPtr) += m * (xcgbbi + gIgtotb); } /* WDLiu: gcrg already subtracted from all gcrgg below */ - else if (here->BSIM4V4rgateMod == 2) - { *(here->BSIM4V4GEgePtr) += m * gcrg; - *(here->BSIM4V4GEgpPtr) += m * gcrgg; - *(here->BSIM4V4GEdpPtr) += m * gcrgd; - *(here->BSIM4V4GEspPtr) += m * gcrgs; - *(here->BSIM4V4GEbpPtr) += m * gcrgb; - - *(here->BSIM4V4GPgePtr) -= m * gcrg; - *(here->BSIM4V4GPgpPtr +1) += m * xcggbr; - *(here->BSIM4V4GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); - *(here->BSIM4V4GPdpPtr +1) += m * xcgdbr; - *(here->BSIM4V4GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); - *(here->BSIM4V4GPspPtr +1) += m * xcgsbr; - *(here->BSIM4V4GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); - *(here->BSIM4V4GPbpPtr +1) += m * xcgbbr; - *(here->BSIM4V4GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); + else if (here->BSIM4v4rgateMod == 2) + { *(here->BSIM4v4GEgePtr) += m * gcrg; + *(here->BSIM4v4GEgpPtr) += m * gcrgg; + *(here->BSIM4v4GEdpPtr) += m * gcrgd; + *(here->BSIM4v4GEspPtr) += m * gcrgs; + *(here->BSIM4v4GEbpPtr) += m * gcrgb; + + *(here->BSIM4v4GPgePtr) -= m * gcrg; + *(here->BSIM4v4GPgpPtr +1) += m * xcggbr; + *(here->BSIM4v4GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); + *(here->BSIM4v4GPdpPtr +1) += m * xcgdbr; + *(here->BSIM4v4GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); + *(here->BSIM4v4GPspPtr +1) += m * xcgsbr; + *(here->BSIM4v4GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); + *(here->BSIM4v4GPbpPtr +1) += m * xcgbbr; + *(here->BSIM4v4GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); } - else if (here->BSIM4V4rgateMod == 3) - { *(here->BSIM4V4GEgePtr) += m * geltd; - *(here->BSIM4V4GEgmPtr) -= m * geltd; - *(here->BSIM4V4GMgePtr) -= m * geltd; - *(here->BSIM4V4GMgmPtr) += m * (geltd + gcrg); - *(here->BSIM4V4GMgmPtr +1) += m * xcgmgmb; + else if (here->BSIM4v4rgateMod == 3) + { *(here->BSIM4v4GEgePtr) += m * geltd; + *(here->BSIM4v4GEgmPtr) -= m * geltd; + *(here->BSIM4v4GMgePtr) -= m * geltd; + *(here->BSIM4v4GMgmPtr) += m * (geltd + gcrg); + *(here->BSIM4v4GMgmPtr +1) += m * xcgmgmb; - *(here->BSIM4V4GMdpPtr) += m * gcrgd; - *(here->BSIM4V4GMdpPtr +1) += m * xcgmdb; - *(here->BSIM4V4GMgpPtr) += m * gcrgg; - *(here->BSIM4V4GMspPtr) += m * gcrgs; - *(here->BSIM4V4GMspPtr +1) += m * xcgmsb; - *(here->BSIM4V4GMbpPtr) += m * gcrgb; - *(here->BSIM4V4GMbpPtr +1) += m * xcgmbb; + *(here->BSIM4v4GMdpPtr) += m * gcrgd; + *(here->BSIM4v4GMdpPtr +1) += m * xcgmdb; + *(here->BSIM4v4GMgpPtr) += m * gcrgg; + *(here->BSIM4v4GMspPtr) += m * gcrgs; + *(here->BSIM4v4GMspPtr +1) += m * xcgmsb; + *(here->BSIM4v4GMbpPtr) += m * gcrgb; + *(here->BSIM4v4GMbpPtr +1) += m * xcgmbb; - *(here->BSIM4V4DPgmPtr +1) += m * xcdgmb; - *(here->BSIM4V4GPgmPtr) -= m * gcrg; - *(here->BSIM4V4SPgmPtr +1) += m * xcsgmb; - *(here->BSIM4V4BPgmPtr +1) += m * xcbgmb; + *(here->BSIM4v4DPgmPtr +1) += m * xcdgmb; + *(here->BSIM4v4GPgmPtr) -= m * gcrg; + *(here->BSIM4v4SPgmPtr +1) += m * xcsgmb; + *(here->BSIM4v4BPgmPtr +1) += m * xcbgmb; - *(here->BSIM4V4GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); - *(here->BSIM4V4GPgpPtr +1) += m * xcggbr; - *(here->BSIM4V4GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); - *(here->BSIM4V4GPdpPtr +1) += m * xcgdbr; - *(here->BSIM4V4GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); - *(here->BSIM4V4GPspPtr +1) += m * xcgsbr; - *(here->BSIM4V4GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); - *(here->BSIM4V4GPbpPtr +1) += m * xcgbbr; + *(here->BSIM4v4GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); + *(here->BSIM4v4GPgpPtr +1) += m * xcggbr; + *(here->BSIM4v4GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); + *(here->BSIM4v4GPdpPtr +1) += m * xcgdbr; + *(here->BSIM4v4GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); + *(here->BSIM4v4GPspPtr +1) += m * xcgsbr; + *(here->BSIM4v4GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); + *(here->BSIM4v4GPbpPtr +1) += m * xcgbbr; } else - { *(here->BSIM4V4GPgpPtr +1) += m * xcggbr; - *(here->BSIM4V4GPgpPtr) += m * (xcggbi + gIgtotg); - *(here->BSIM4V4GPdpPtr +1) += m * xcgdbr; - *(here->BSIM4V4GPdpPtr) += m * (xcgdbi + gIgtotd); - *(here->BSIM4V4GPspPtr +1) += m * xcgsbr; - *(here->BSIM4V4GPspPtr) += m * (xcgsbi + gIgtots); - *(here->BSIM4V4GPbpPtr +1) += m * xcgbbr; - *(here->BSIM4V4GPbpPtr) += m * (xcgbbi + gIgtotb); + { *(here->BSIM4v4GPgpPtr +1) += m * xcggbr; + *(here->BSIM4v4GPgpPtr) += m * (xcggbi + gIgtotg); + *(here->BSIM4v4GPdpPtr +1) += m * xcgdbr; + *(here->BSIM4v4GPdpPtr) += m * (xcgdbi + gIgtotd); + *(here->BSIM4v4GPspPtr +1) += m * xcgsbr; + *(here->BSIM4v4GPspPtr) += m * (xcgsbi + gIgtots); + *(here->BSIM4v4GPbpPtr +1) += m * xcgbbr; + *(here->BSIM4v4GPbpPtr) += m * (xcgbbi + gIgtotb); } - if (model->BSIM4V4rdsMod) - { (*(here->BSIM4V4DgpPtr) += m * gdtotg); - (*(here->BSIM4V4DspPtr) += m * gdtots); - (*(here->BSIM4V4DbpPtr) += m * gdtotb); - (*(here->BSIM4V4SdpPtr) += m * gstotd); - (*(here->BSIM4V4SgpPtr) += m * gstotg); - (*(here->BSIM4V4SbpPtr) += m * gstotb); + if (model->BSIM4v4rdsMod) + { (*(here->BSIM4v4DgpPtr) += m * gdtotg); + (*(here->BSIM4v4DspPtr) += m * gdtots); + (*(here->BSIM4v4DbpPtr) += m * gdtotb); + (*(here->BSIM4v4SdpPtr) += m * gstotd); + (*(here->BSIM4v4SgpPtr) += m * gstotg); + (*(here->BSIM4v4SbpPtr) += m * gstotb); } - *(here->BSIM4V4DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi); - *(here->BSIM4V4DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4V4gbd + *(here->BSIM4v4DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi); + *(here->BSIM4v4DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4v4gbd - gdtotd + RevSumr + gbdpdp - gIdtotd); - *(here->BSIM4V4DPdPtr) -= m * (gdpr + gdtot); - *(here->BSIM4V4DPgpPtr +1) += m * (xcdgbr + Gmi); - *(here->BSIM4V4DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg); - *(here->BSIM4V4DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi); - *(here->BSIM4V4DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots); - *(here->BSIM4V4DPbpPtr +1) += m * (xcdbbr + Gmbsi); - *(here->BSIM4V4DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb); - - *(here->BSIM4V4DdpPtr) -= m * (gdpr - gdtotd); - *(here->BSIM4V4DdPtr) += m * (gdpr + gdtot); - - *(here->BSIM4V4SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi); - *(here->BSIM4V4SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd); - *(here->BSIM4V4SPgpPtr +1) += m * (xcsgbr - Gmi); - *(here->BSIM4V4SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg); - *(here->BSIM4V4SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi); - *(here->BSIM4V4SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4V4gbs + *(here->BSIM4v4DPdPtr) -= m * (gdpr + gdtot); + *(here->BSIM4v4DPgpPtr +1) += m * (xcdgbr + Gmi); + *(here->BSIM4v4DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg); + *(here->BSIM4v4DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi); + *(here->BSIM4v4DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots); + *(here->BSIM4v4DPbpPtr +1) += m * (xcdbbr + Gmbsi); + *(here->BSIM4v4DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb); + + *(here->BSIM4v4DdpPtr) -= m * (gdpr - gdtotd); + *(here->BSIM4v4DdPtr) += m * (gdpr + gdtot); + + *(here->BSIM4v4SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi); + *(here->BSIM4v4SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd); + *(here->BSIM4v4SPgpPtr +1) += m * (xcsgbr - Gmi); + *(here->BSIM4v4SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg); + *(here->BSIM4v4SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi); + *(here->BSIM4v4SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4v4gbs - gstots + FwdSumr + gbspsp - gIstots); - *(here->BSIM4V4SPsPtr) -= m * (gspr + gstot); - *(here->BSIM4V4SPbpPtr +1) += m * (xcsbbr - Gmbsi); - *(here->BSIM4V4SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb); - - *(here->BSIM4V4SspPtr) -= m * (gspr - gstots); - *(here->BSIM4V4SsPtr) += m * (gspr + gstot); - - *(here->BSIM4V4BPdpPtr +1) += m * xcbdb; - *(here->BSIM4V4BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); - *(here->BSIM4V4BPgpPtr +1) += m * xcbgb; - *(here->BSIM4V4BPgpPtr) -= m * (here->BSIM4V4gbgs + gIbtotg); - *(here->BSIM4V4BPspPtr +1) += m * xcbsb; - *(here->BSIM4V4BPspPtr) -= m * (gjbs - gbbsp + gIbtots); - *(here->BSIM4V4BPbpPtr +1) += m * xcbbb; - *(here->BSIM4V4BPbpPtr) += m * (gjbd + gjbs - here->BSIM4V4gbbs + *(here->BSIM4v4SPsPtr) -= m * (gspr + gstot); + *(here->BSIM4v4SPbpPtr +1) += m * (xcsbbr - Gmbsi); + *(here->BSIM4v4SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb); + + *(here->BSIM4v4SspPtr) -= m * (gspr - gstots); + *(here->BSIM4v4SsPtr) += m * (gspr + gstot); + + *(here->BSIM4v4BPdpPtr +1) += m * xcbdb; + *(here->BSIM4v4BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); + *(here->BSIM4v4BPgpPtr +1) += m * xcbgb; + *(here->BSIM4v4BPgpPtr) -= m * (here->BSIM4v4gbgs + gIbtotg); + *(here->BSIM4v4BPspPtr +1) += m * xcbsb; + *(here->BSIM4v4BPspPtr) -= m * (gjbs - gbbsp + gIbtots); + *(here->BSIM4v4BPbpPtr +1) += m * xcbbb; + *(here->BSIM4v4BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v4gbbs - gIbtotb); - ggidld = here->BSIM4V4ggidld; - ggidlg = here->BSIM4V4ggidlg; - ggidlb = here->BSIM4V4ggidlb; - ggislg = here->BSIM4V4ggislg; - ggisls = here->BSIM4V4ggisls; - ggislb = here->BSIM4V4ggislb; + ggidld = here->BSIM4v4ggidld; + ggidlg = here->BSIM4v4ggidlg; + ggidlb = here->BSIM4v4ggidlb; + ggislg = here->BSIM4v4ggislg; + ggisls = here->BSIM4v4ggisls; + ggislb = here->BSIM4v4ggislb; /* stamp gidl */ - (*(here->BSIM4V4DPdpPtr) += m * ggidld); - (*(here->BSIM4V4DPgpPtr) += m * ggidlg); - (*(here->BSIM4V4DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); - (*(here->BSIM4V4DPbpPtr) += m * ggidlb); - (*(here->BSIM4V4BPdpPtr) -= m * ggidld); - (*(here->BSIM4V4BPgpPtr) -= m * ggidlg); - (*(here->BSIM4V4BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); - (*(here->BSIM4V4BPbpPtr) -= m * ggidlb); + (*(here->BSIM4v4DPdpPtr) += m * ggidld); + (*(here->BSIM4v4DPgpPtr) += m * ggidlg); + (*(here->BSIM4v4DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); + (*(here->BSIM4v4DPbpPtr) += m * ggidlb); + (*(here->BSIM4v4BPdpPtr) -= m * ggidld); + (*(here->BSIM4v4BPgpPtr) -= m * ggidlg); + (*(here->BSIM4v4BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); + (*(here->BSIM4v4BPbpPtr) -= m * ggidlb); /* stamp gisl */ - (*(here->BSIM4V4SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); - (*(here->BSIM4V4SPgpPtr) += m * ggislg); - (*(here->BSIM4V4SPspPtr) += m * ggisls); - (*(here->BSIM4V4SPbpPtr) += m * ggislb); - (*(here->BSIM4V4BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); - (*(here->BSIM4V4BPgpPtr) -= m * ggislg); - (*(here->BSIM4V4BPspPtr) -= m * ggisls); - (*(here->BSIM4V4BPbpPtr) -= m * ggislb); - - if (here->BSIM4V4rbodyMod) - { (*(here->BSIM4V4DPdbPtr +1) += m * xcdbdb); - (*(here->BSIM4V4DPdbPtr) -= m * here->BSIM4V4gbd); - (*(here->BSIM4V4SPsbPtr +1) += m * xcsbsb); - (*(here->BSIM4V4SPsbPtr) -= m * here->BSIM4V4gbs); - - (*(here->BSIM4V4DBdpPtr +1) += m * xcdbdb); - (*(here->BSIM4V4DBdpPtr) -= m * here->BSIM4V4gbd); - (*(here->BSIM4V4DBdbPtr +1) -= m * xcdbdb); - (*(here->BSIM4V4DBdbPtr) += m * (here->BSIM4V4gbd + here->BSIM4V4grbpd - + here->BSIM4V4grbdb)); - (*(here->BSIM4V4DBbpPtr) -= m * here->BSIM4V4grbpd); - (*(here->BSIM4V4DBbPtr) -= m * here->BSIM4V4grbdb); - - (*(here->BSIM4V4BPdbPtr) -= m * here->BSIM4V4grbpd); - (*(here->BSIM4V4BPbPtr) -= m * here->BSIM4V4grbpb); - (*(here->BSIM4V4BPsbPtr) -= m * here->BSIM4V4grbps); - (*(here->BSIM4V4BPbpPtr) += m * (here->BSIM4V4grbpd + here->BSIM4V4grbps - + here->BSIM4V4grbpb)); - /* WDLiu: (-here->BSIM4V4gbbs) already added to BPbpPtr */ - - (*(here->BSIM4V4SBspPtr +1) += m * xcsbsb); - (*(here->BSIM4V4SBspPtr) -= m * here->BSIM4V4gbs); - (*(here->BSIM4V4SBbpPtr) -= m * here->BSIM4V4grbps); - (*(here->BSIM4V4SBbPtr) -= m * here->BSIM4V4grbsb); - (*(here->BSIM4V4SBsbPtr +1) -= m * xcsbsb); - (*(here->BSIM4V4SBsbPtr) += m * (here->BSIM4V4gbs - + here->BSIM4V4grbps + here->BSIM4V4grbsb)); - - (*(here->BSIM4V4BdbPtr) -= m * here->BSIM4V4grbdb); - (*(here->BSIM4V4BbpPtr) -= m * here->BSIM4V4grbpb); - (*(here->BSIM4V4BsbPtr) -= m * here->BSIM4V4grbsb); - (*(here->BSIM4V4BbPtr) += m * (here->BSIM4V4grbsb + here->BSIM4V4grbdb - + here->BSIM4V4grbpb)); + (*(here->BSIM4v4SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); + (*(here->BSIM4v4SPgpPtr) += m * ggislg); + (*(here->BSIM4v4SPspPtr) += m * ggisls); + (*(here->BSIM4v4SPbpPtr) += m * ggislb); + (*(here->BSIM4v4BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); + (*(here->BSIM4v4BPgpPtr) -= m * ggislg); + (*(here->BSIM4v4BPspPtr) -= m * ggisls); + (*(here->BSIM4v4BPbpPtr) -= m * ggislb); + + if (here->BSIM4v4rbodyMod) + { (*(here->BSIM4v4DPdbPtr +1) += m * xcdbdb); + (*(here->BSIM4v4DPdbPtr) -= m * here->BSIM4v4gbd); + (*(here->BSIM4v4SPsbPtr +1) += m * xcsbsb); + (*(here->BSIM4v4SPsbPtr) -= m * here->BSIM4v4gbs); + + (*(here->BSIM4v4DBdpPtr +1) += m * xcdbdb); + (*(here->BSIM4v4DBdpPtr) -= m * here->BSIM4v4gbd); + (*(here->BSIM4v4DBdbPtr +1) -= m * xcdbdb); + (*(here->BSIM4v4DBdbPtr) += m * (here->BSIM4v4gbd + here->BSIM4v4grbpd + + here->BSIM4v4grbdb)); + (*(here->BSIM4v4DBbpPtr) -= m * here->BSIM4v4grbpd); + (*(here->BSIM4v4DBbPtr) -= m * here->BSIM4v4grbdb); + + (*(here->BSIM4v4BPdbPtr) -= m * here->BSIM4v4grbpd); + (*(here->BSIM4v4BPbPtr) -= m * here->BSIM4v4grbpb); + (*(here->BSIM4v4BPsbPtr) -= m * here->BSIM4v4grbps); + (*(here->BSIM4v4BPbpPtr) += m * (here->BSIM4v4grbpd + here->BSIM4v4grbps + + here->BSIM4v4grbpb)); + /* WDLiu: (-here->BSIM4v4gbbs) already added to BPbpPtr */ + + (*(here->BSIM4v4SBspPtr +1) += m * xcsbsb); + (*(here->BSIM4v4SBspPtr) -= m * here->BSIM4v4gbs); + (*(here->BSIM4v4SBbpPtr) -= m * here->BSIM4v4grbps); + (*(here->BSIM4v4SBbPtr) -= m * here->BSIM4v4grbsb); + (*(here->BSIM4v4SBsbPtr +1) -= m * xcsbsb); + (*(here->BSIM4v4SBsbPtr) += m * (here->BSIM4v4gbs + + here->BSIM4v4grbps + here->BSIM4v4grbsb)); + + (*(here->BSIM4v4BdbPtr) -= m * here->BSIM4v4grbdb); + (*(here->BSIM4v4BbpPtr) -= m * here->BSIM4v4grbpb); + (*(here->BSIM4v4BsbPtr) -= m * here->BSIM4v4grbsb); + (*(here->BSIM4v4BbPtr) += m * (here->BSIM4v4grbsb + here->BSIM4v4grbdb + + here->BSIM4v4grbpb)); } @@ -655,16 +655,16 @@ double m; * otherwise a singular AC NQS matrix may occur if the transient NQS is on. * The charge node is isolated from the instance. */ - if (here->BSIM4V4trnqsMod) - { (*(here->BSIM4V4QqPtr) += m * 1.0); - (*(here->BSIM4V4QgpPtr) += 0.0); - (*(here->BSIM4V4QdpPtr) += 0.0); - (*(here->BSIM4V4QspPtr) += 0.0); - (*(here->BSIM4V4QbpPtr) += 0.0); - - (*(here->BSIM4V4DPqPtr) += 0.0); - (*(here->BSIM4V4SPqPtr) += 0.0); - (*(here->BSIM4V4GPqPtr) += 0.0); + if (here->BSIM4v4trnqsMod) + { (*(here->BSIM4v4QqPtr) += m * 1.0); + (*(here->BSIM4v4QgpPtr) += 0.0); + (*(here->BSIM4v4QdpPtr) += 0.0); + (*(here->BSIM4v4QspPtr) += 0.0); + (*(here->BSIM4v4QbpPtr) += 0.0); + + (*(here->BSIM4v4DPqPtr) += 0.0); + (*(here->BSIM4v4SPqPtr) += 0.0); + (*(here->BSIM4v4GPqPtr) += 0.0); } } } diff --git a/src/spicelib/devices/bsim4v4/b4v4ask.c b/src/spicelib/devices/bsim4v4/b4v4ask.c index 34cb0afa7..89d121600 100644 --- a/src/spicelib/devices/bsim4v4/b4v4ask.c +++ b/src/spicelib/devices/bsim4v4/b4v4ask.c @@ -20,300 +20,300 @@ #include "suffix.h" int -BSIM4V4ask(ckt,inst,which,value,select) +BSIM4v4ask(ckt,inst,which,value,select) CKTcircuit *ckt; GENinstance *inst; int which; IFvalue *value; IFvalue *select; { -BSIM4V4instance *here = (BSIM4V4instance*)inst; +BSIM4v4instance *here = (BSIM4v4instance*)inst; switch(which) - { case BSIM4V4_L: - value->rValue = here->BSIM4V4l; + { case BSIM4v4_L: + value->rValue = here->BSIM4v4l; return(OK); - case BSIM4V4_W: - value->rValue = here->BSIM4V4w; + case BSIM4v4_W: + value->rValue = here->BSIM4v4w; return(OK); - case BSIM4V4_M: - value->rValue = here->BSIM4V4m; + case BSIM4v4_M: + value->rValue = here->BSIM4v4m; return(OK); - case BSIM4V4_NF: - value->rValue = here->BSIM4V4nf; + case BSIM4v4_NF: + value->rValue = here->BSIM4v4nf; return(OK); - case BSIM4V4_MIN: - value->iValue = here->BSIM4V4min; + case BSIM4v4_MIN: + value->iValue = here->BSIM4v4min; return(OK); - case BSIM4V4_AS: - value->rValue = here->BSIM4V4sourceArea; + case BSIM4v4_AS: + value->rValue = here->BSIM4v4sourceArea; return(OK); - case BSIM4V4_AD: - value->rValue = here->BSIM4V4drainArea; + case BSIM4v4_AD: + value->rValue = here->BSIM4v4drainArea; return(OK); - case BSIM4V4_PS: - value->rValue = here->BSIM4V4sourcePerimeter; + case BSIM4v4_PS: + value->rValue = here->BSIM4v4sourcePerimeter; return(OK); - case BSIM4V4_PD: - value->rValue = here->BSIM4V4drainPerimeter; + case BSIM4v4_PD: + value->rValue = here->BSIM4v4drainPerimeter; return(OK); - case BSIM4V4_NRS: - value->rValue = here->BSIM4V4sourceSquares; + case BSIM4v4_NRS: + value->rValue = here->BSIM4v4sourceSquares; return(OK); - case BSIM4V4_NRD: - value->rValue = here->BSIM4V4drainSquares; + case BSIM4v4_NRD: + value->rValue = here->BSIM4v4drainSquares; return(OK); - case BSIM4V4_OFF: - value->rValue = here->BSIM4V4off; + case BSIM4v4_OFF: + value->rValue = here->BSIM4v4off; return(OK); - case BSIM4V4_SA: - value->rValue = here->BSIM4V4sa ; + case BSIM4v4_SA: + value->rValue = here->BSIM4v4sa ; return(OK); - case BSIM4V4_SB: - value->rValue = here->BSIM4V4sb ; + case BSIM4v4_SB: + value->rValue = here->BSIM4v4sb ; return(OK); - case BSIM4V4_SD: - value->rValue = here->BSIM4V4sd ; + case BSIM4v4_SD: + value->rValue = here->BSIM4v4sd ; return(OK); - case BSIM4V4_RBSB: - value->rValue = here->BSIM4V4rbsb; + case BSIM4v4_RBSB: + value->rValue = here->BSIM4v4rbsb; return(OK); - case BSIM4V4_RBDB: - value->rValue = here->BSIM4V4rbdb; + case BSIM4v4_RBDB: + value->rValue = here->BSIM4v4rbdb; return(OK); - case BSIM4V4_RBPB: - value->rValue = here->BSIM4V4rbpb; + case BSIM4v4_RBPB: + value->rValue = here->BSIM4v4rbpb; return(OK); - case BSIM4V4_RBPS: - value->rValue = here->BSIM4V4rbps; + case BSIM4v4_RBPS: + value->rValue = here->BSIM4v4rbps; return(OK); - case BSIM4V4_RBPD: - value->rValue = here->BSIM4V4rbpd; + case BSIM4v4_RBPD: + value->rValue = here->BSIM4v4rbpd; return(OK); - case BSIM4V4_TRNQSMOD: - value->iValue = here->BSIM4V4trnqsMod; + case BSIM4v4_TRNQSMOD: + value->iValue = here->BSIM4v4trnqsMod; return(OK); - case BSIM4V4_ACNQSMOD: - value->iValue = here->BSIM4V4acnqsMod; + case BSIM4v4_ACNQSMOD: + value->iValue = here->BSIM4v4acnqsMod; return(OK); - case BSIM4V4_RBODYMOD: - value->iValue = here->BSIM4V4rbodyMod; + case BSIM4v4_RBODYMOD: + value->iValue = here->BSIM4v4rbodyMod; return(OK); - case BSIM4V4_RGATEMOD: - value->iValue = here->BSIM4V4rgateMod; + case BSIM4v4_RGATEMOD: + value->iValue = here->BSIM4v4rgateMod; return(OK); - case BSIM4V4_GEOMOD: - value->iValue = here->BSIM4V4geoMod; + case BSIM4v4_GEOMOD: + value->iValue = here->BSIM4v4geoMod; return(OK); - case BSIM4V4_RGEOMOD: - value->iValue = here->BSIM4V4rgeoMod; + case BSIM4v4_RGEOMOD: + value->iValue = here->BSIM4v4rgeoMod; return(OK); - case BSIM4V4_IC_VDS: - value->rValue = here->BSIM4V4icVDS; + case BSIM4v4_IC_VDS: + value->rValue = here->BSIM4v4icVDS; return(OK); - case BSIM4V4_IC_VGS: - value->rValue = here->BSIM4V4icVGS; + case BSIM4v4_IC_VGS: + value->rValue = here->BSIM4v4icVGS; return(OK); - case BSIM4V4_IC_VBS: - value->rValue = here->BSIM4V4icVBS; + case BSIM4v4_IC_VBS: + value->rValue = here->BSIM4v4icVBS; return(OK); - case BSIM4V4_DNODE: - value->iValue = here->BSIM4V4dNode; + case BSIM4v4_DNODE: + value->iValue = here->BSIM4v4dNode; return(OK); - case BSIM4V4_GNODEEXT: - value->iValue = here->BSIM4V4gNodeExt; + case BSIM4v4_GNODEEXT: + value->iValue = here->BSIM4v4gNodeExt; return(OK); - case BSIM4V4_SNODE: - value->iValue = here->BSIM4V4sNode; + case BSIM4v4_SNODE: + value->iValue = here->BSIM4v4sNode; return(OK); - case BSIM4V4_BNODE: - value->iValue = here->BSIM4V4bNode; + case BSIM4v4_BNODE: + value->iValue = here->BSIM4v4bNode; return(OK); - case BSIM4V4_DNODEPRIME: - value->iValue = here->BSIM4V4dNodePrime; + case BSIM4v4_DNODEPRIME: + value->iValue = here->BSIM4v4dNodePrime; return(OK); - case BSIM4V4_GNODEPRIME: - value->iValue = here->BSIM4V4gNodePrime; + case BSIM4v4_GNODEPRIME: + value->iValue = here->BSIM4v4gNodePrime; return(OK); - case BSIM4V4_GNODEMID: - value->iValue = here->BSIM4V4gNodeMid; + case BSIM4v4_GNODEMID: + value->iValue = here->BSIM4v4gNodeMid; return(OK); - case BSIM4V4_SNODEPRIME: - value->iValue = here->BSIM4V4sNodePrime; + case BSIM4v4_SNODEPRIME: + value->iValue = here->BSIM4v4sNodePrime; return(OK); - case BSIM4V4_DBNODE: - value->iValue = here->BSIM4V4dbNode; + case BSIM4v4_DBNODE: + value->iValue = here->BSIM4v4dbNode; return(OK); - case BSIM4V4_BNODEPRIME: - value->iValue = here->BSIM4V4bNodePrime; + case BSIM4v4_BNODEPRIME: + value->iValue = here->BSIM4v4bNodePrime; return(OK); - case BSIM4V4_SBNODE: - value->iValue = here->BSIM4V4sbNode; + case BSIM4v4_SBNODE: + value->iValue = here->BSIM4v4sbNode; return(OK); - case BSIM4V4_SOURCECONDUCT: - value->rValue = here->BSIM4V4sourceConductance; + case BSIM4v4_SOURCECONDUCT: + value->rValue = here->BSIM4v4sourceConductance; return(OK); - case BSIM4V4_DRAINCONDUCT: - value->rValue = here->BSIM4V4drainConductance; + case BSIM4v4_DRAINCONDUCT: + value->rValue = here->BSIM4v4drainConductance; return(OK); - case BSIM4V4_VBD: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4vbd); + case BSIM4v4_VBD: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4vbd); return(OK); - case BSIM4V4_VBS: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4vbs); + case BSIM4v4_VBS: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4vbs); return(OK); - case BSIM4V4_VGS: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4vgs); + case BSIM4v4_VGS: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4vgs); return(OK); - case BSIM4V4_VDS: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4vds); + case BSIM4v4_VDS: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4vds); return(OK); - case BSIM4V4_CD: - value->rValue = here->BSIM4V4cd; + case BSIM4v4_CD: + value->rValue = here->BSIM4v4cd; return(OK); - case BSIM4V4_CBS: - value->rValue = here->BSIM4V4cbs; + case BSIM4v4_CBS: + value->rValue = here->BSIM4v4cbs; return(OK); - case BSIM4V4_CBD: - value->rValue = here->BSIM4V4cbd; + case BSIM4v4_CBD: + value->rValue = here->BSIM4v4cbd; return(OK); - case BSIM4V4_CSUB: - value->rValue = here->BSIM4V4csub; + case BSIM4v4_CSUB: + value->rValue = here->BSIM4v4csub; return(OK); - case BSIM4V4_IGIDL: - value->rValue = here->BSIM4V4Igidl; + case BSIM4v4_IGIDL: + value->rValue = here->BSIM4v4Igidl; return(OK); - case BSIM4V4_IGISL: - value->rValue = here->BSIM4V4Igisl; + case BSIM4v4_IGISL: + value->rValue = here->BSIM4v4Igisl; return(OK); - case BSIM4V4_IGS: - value->rValue = here->BSIM4V4Igs; + case BSIM4v4_IGS: + value->rValue = here->BSIM4v4Igs; return(OK); - case BSIM4V4_IGD: - value->rValue = here->BSIM4V4Igd; + case BSIM4v4_IGD: + value->rValue = here->BSIM4v4Igd; return(OK); - case BSIM4V4_IGB: - value->rValue = here->BSIM4V4Igb; + case BSIM4v4_IGB: + value->rValue = here->BSIM4v4Igb; return(OK); - case BSIM4V4_IGCS: - value->rValue = here->BSIM4V4Igcs; + case BSIM4v4_IGCS: + value->rValue = here->BSIM4v4Igcs; return(OK); - case BSIM4V4_IGCD: - value->rValue = here->BSIM4V4Igcd; + case BSIM4v4_IGCD: + value->rValue = here->BSIM4v4Igcd; return(OK); - case BSIM4V4_GM: - value->rValue = here->BSIM4V4gm; + case BSIM4v4_GM: + value->rValue = here->BSIM4v4gm; return(OK); - case BSIM4V4_GDS: - value->rValue = here->BSIM4V4gds; + case BSIM4v4_GDS: + value->rValue = here->BSIM4v4gds; return(OK); - case BSIM4V4_GMBS: - value->rValue = here->BSIM4V4gmbs; + case BSIM4v4_GMBS: + value->rValue = here->BSIM4v4gmbs; return(OK); - case BSIM4V4_GBD: - value->rValue = here->BSIM4V4gbd; + case BSIM4v4_GBD: + value->rValue = here->BSIM4v4gbd; return(OK); - case BSIM4V4_GBS: - value->rValue = here->BSIM4V4gbs; + case BSIM4v4_GBS: + value->rValue = here->BSIM4v4gbs; return(OK); -/* case BSIM4V4_QB: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4qb); +/* case BSIM4v4_QB: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qb); return(OK); */ - case BSIM4V4_CQB: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4cqb); + case BSIM4v4_CQB: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4cqb); return(OK); -/* case BSIM4V4_QG: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4qg); +/* case BSIM4v4_QG: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qg); return(OK); */ - case BSIM4V4_CQG: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4cqg); + case BSIM4v4_CQG: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4cqg); return(OK); -/* case BSIM4V4_QD: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4qd); +/* case BSIM4v4_QD: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qd); return(OK); */ - case BSIM4V4_CQD: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4cqd); + case BSIM4v4_CQD: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4cqd); return(OK); -/* case BSIM4V4_QS: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4qs); +/* case BSIM4v4_QS: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qs); return(OK); */ - case BSIM4V4_QB: - value->rValue = here->BSIM4V4qbulk; + case BSIM4v4_QB: + value->rValue = here->BSIM4v4qbulk; return(OK); - case BSIM4V4_QG: - value->rValue = here->BSIM4V4qgate; + case BSIM4v4_QG: + value->rValue = here->BSIM4v4qgate; return(OK); - case BSIM4V4_QS: - value->rValue = here->BSIM4V4qsrc; + case BSIM4v4_QS: + value->rValue = here->BSIM4v4qsrc; return(OK); - case BSIM4V4_QD: - value->rValue = here->BSIM4V4qdrn; + case BSIM4v4_QD: + value->rValue = here->BSIM4v4qdrn; return(OK); - case BSIM4V4_CGGB: - value->rValue = here->BSIM4V4cggb; + case BSIM4v4_CGGB: + value->rValue = here->BSIM4v4cggb; return(OK); - case BSIM4V4_CGDB: - value->rValue = here->BSIM4V4cgdb; + case BSIM4v4_CGDB: + value->rValue = here->BSIM4v4cgdb; return(OK); - case BSIM4V4_CGSB: - value->rValue = here->BSIM4V4cgsb; + case BSIM4v4_CGSB: + value->rValue = here->BSIM4v4cgsb; return(OK); - case BSIM4V4_CDGB: - value->rValue = here->BSIM4V4cdgb; + case BSIM4v4_CDGB: + value->rValue = here->BSIM4v4cdgb; return(OK); - case BSIM4V4_CDDB: - value->rValue = here->BSIM4V4cddb; + case BSIM4v4_CDDB: + value->rValue = here->BSIM4v4cddb; return(OK); - case BSIM4V4_CDSB: - value->rValue = here->BSIM4V4cdsb; + case BSIM4v4_CDSB: + value->rValue = here->BSIM4v4cdsb; return(OK); - case BSIM4V4_CBGB: - value->rValue = here->BSIM4V4cbgb; + case BSIM4v4_CBGB: + value->rValue = here->BSIM4v4cbgb; return(OK); - case BSIM4V4_CBDB: - value->rValue = here->BSIM4V4cbdb; + case BSIM4v4_CBDB: + value->rValue = here->BSIM4v4cbdb; return(OK); - case BSIM4V4_CBSB: - value->rValue = here->BSIM4V4cbsb; + case BSIM4v4_CBSB: + value->rValue = here->BSIM4v4cbsb; return(OK); - case BSIM4V4_CSGB: - value->rValue = here->BSIM4V4csgb; + case BSIM4v4_CSGB: + value->rValue = here->BSIM4v4csgb; return(OK); - case BSIM4V4_CSDB: - value->rValue = here->BSIM4V4csdb; + case BSIM4v4_CSDB: + value->rValue = here->BSIM4v4csdb; return(OK); - case BSIM4V4_CSSB: - value->rValue = here->BSIM4V4cssb; + case BSIM4v4_CSSB: + value->rValue = here->BSIM4v4cssb; return(OK); - case BSIM4V4_CGBB: - value->rValue = here->BSIM4V4cgbb; + case BSIM4v4_CGBB: + value->rValue = here->BSIM4v4cgbb; return(OK); - case BSIM4V4_CDBB: - value->rValue = here->BSIM4V4cdbb; + case BSIM4v4_CDBB: + value->rValue = here->BSIM4v4cdbb; return(OK); - case BSIM4V4_CSBB: - value->rValue = here->BSIM4V4csbb; + case BSIM4v4_CSBB: + value->rValue = here->BSIM4v4csbb; return(OK); - case BSIM4V4_CBBB: - value->rValue = here->BSIM4V4cbbb; + case BSIM4v4_CBBB: + value->rValue = here->BSIM4v4cbbb; return(OK); - case BSIM4V4_CAPBD: - value->rValue = here->BSIM4V4capbd; + case BSIM4v4_CAPBD: + value->rValue = here->BSIM4v4capbd; return(OK); - case BSIM4V4_CAPBS: - value->rValue = here->BSIM4V4capbs; + case BSIM4v4_CAPBS: + value->rValue = here->BSIM4v4capbs; return(OK); - case BSIM4V4_VON: - value->rValue = here->BSIM4V4von; + case BSIM4v4_VON: + value->rValue = here->BSIM4v4von; return(OK); - case BSIM4V4_VDSAT: - value->rValue = here->BSIM4V4vdsat; + case BSIM4v4_VDSAT: + value->rValue = here->BSIM4v4vdsat; return(OK); - case BSIM4V4_QBS: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4qbs); + case BSIM4v4_QBS: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qbs); return(OK); - case BSIM4V4_QBD: - value->rValue = *(ckt->CKTstate0 + here->BSIM4V4qbd); + case BSIM4v4_QBD: + value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qbd); return(OK); default: return(E_BADPARM); diff --git a/src/spicelib/devices/bsim4v4/b4v4check.c b/src/spicelib/devices/bsim4v4/b4v4check.c index 631a53074..1298601b1 100644 --- a/src/spicelib/devices/bsim4v4/b4v4check.c +++ b/src/spicelib/devices/bsim4v4/b4v4check.c @@ -23,716 +23,715 @@ #include "suffix.h" int -BSIM4V4checkModel(model, here, ckt) -BSIM4V4model *model; -BSIM4V4instance *here; +BSIM4v4checkModel(model, here, ckt) +BSIM4v4model *model; +BSIM4v4instance *here; CKTcircuit *ckt; { struct bsim4SizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; -double model_version = atof(model->BSIM4V4version); if ((fplog = fopen("bsim4.out", "w")) != NULL) { pParam = here->pParam; - fprintf(fplog, "BSIM4V4: Berkeley Short Channel IGFET Model-4\n"); + fprintf(fplog, "BSIM4v4: Berkeley Short Channel IGFET Model-4\n"); fprintf(fplog, "Developed by Xuemei (Jane) Xi, Jin He, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n"); fprintf(fplog, "\n"); - fprintf(fplog, "++++++++++ BSIM4V4 PARAMETER CHECKING BELOW ++++++++++\n"); + fprintf(fplog, "++++++++++ BSIM4v4 PARAMETER CHECKING BELOW ++++++++++\n"); - if ( !strstr( model->BSIM4V4version, "4.4" ) ) - { fprintf(fplog, "Warning: This model is BSIM4V4.4.0; you specified a wrong version number '%s'.\n",model->BSIM4V4version); - printf("Warning: This model is BSIM4V4.4.0; you specified a wrong version number '%s'.\n",model->BSIM4V4version); + if ( !strstr( model->BSIM4v4version, "4.4" ) ) + { fprintf(fplog, "Warning: This model is BSIM4.4.0; you specified a wrong version number '%s'.\n",model->BSIM4v4version); + printf("Warning: This model is BSIM4.4.0; you specified a wrong version number '%s'.\n",model->BSIM4v4version); } - fprintf(fplog, "Model = %s\n", model->BSIM4V4modName); + fprintf(fplog, "Model = %s\n", model->BSIM4v4modName); - if ((here->BSIM4V4rgateMod == 2) || (here->BSIM4V4rgateMod == 3)) - { if ((here->BSIM4V4trnqsMod == 1) || (here->BSIM4V4acnqsMod == 1)) + if ((here->BSIM4v4rgateMod == 2) || (here->BSIM4v4rgateMod == 3)) + { if ((here->BSIM4v4trnqsMod == 1) || (here->BSIM4v4acnqsMod == 1)) { fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); } } - if (model->BSIM4V4toxe <= 0.0) + if (model->BSIM4v4toxe <= 0.0) { fprintf(fplog, "Fatal: Toxe = %g is not positive.\n", - model->BSIM4V4toxe); - printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4V4toxe); + model->BSIM4v4toxe); + printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v4toxe); Fatal_Flag = 1; } - if (model->BSIM4V4toxp <= 0.0) + if (model->BSIM4v4toxp <= 0.0) { fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", - model->BSIM4V4toxp); - printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4V4toxp); + model->BSIM4v4toxp); + printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v4toxp); Fatal_Flag = 1; } - if (model->BSIM4V4toxm <= 0.0) + if (model->BSIM4v4toxm <= 0.0) { fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", - model->BSIM4V4toxm); - printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4V4toxm); + model->BSIM4v4toxm); + printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v4toxm); Fatal_Flag = 1; } - if (model->BSIM4V4toxref <= 0.0) + if (model->BSIM4v4toxref <= 0.0) { fprintf(fplog, "Fatal: Toxref = %g is not positive.\n", - model->BSIM4V4toxref); - printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4V4toxref); + model->BSIM4v4toxref); + printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v4toxref); Fatal_Flag = 1; } - if (pParam->BSIM4V4lpe0 < -pParam->BSIM4V4leff) + if (pParam->BSIM4v4lpe0 < -pParam->BSIM4v4leff) { fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", - pParam->BSIM4V4lpe0); + pParam->BSIM4v4lpe0); printf("Fatal: Lpe0 = %g is less than -Leff.\n", - pParam->BSIM4V4lpe0); + pParam->BSIM4v4lpe0); Fatal_Flag = 1; } - if (model->BSIM4V4lintnoi > pParam->BSIM4V4leff/2) + if (model->BSIM4v4lintnoi > pParam->BSIM4v4leff/2) { fprintf(fplog, "Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", - model->BSIM4V4lintnoi); + model->BSIM4v4lintnoi); printf("Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", - model->BSIM4V4lintnoi); + model->BSIM4v4lintnoi); Fatal_Flag = 1; } - if (pParam->BSIM4V4lpeb < -pParam->BSIM4V4leff) + if (pParam->BSIM4v4lpeb < -pParam->BSIM4v4leff) { fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", - pParam->BSIM4V4lpeb); + pParam->BSIM4v4lpeb); printf("Fatal: Lpeb = %g is less than -Leff.\n", - pParam->BSIM4V4lpeb); + pParam->BSIM4v4lpeb); Fatal_Flag = 1; } - if (pParam->BSIM4V4ndep <= 0.0) + if (pParam->BSIM4v4ndep <= 0.0) { fprintf(fplog, "Fatal: Ndep = %g is not positive.\n", - pParam->BSIM4V4ndep); + pParam->BSIM4v4ndep); printf("Fatal: Ndep = %g is not positive.\n", - pParam->BSIM4V4ndep); + pParam->BSIM4v4ndep); Fatal_Flag = 1; } - if (pParam->BSIM4V4phi <= 0.0) + if (pParam->BSIM4v4phi <= 0.0) { fprintf(fplog, "Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", - pParam->BSIM4V4phi); + pParam->BSIM4v4phi); fprintf(fplog, " Phin = %g Ndep = %g \n", - pParam->BSIM4V4phin, pParam->BSIM4V4ndep); + pParam->BSIM4v4phin, pParam->BSIM4v4ndep); printf("Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", - pParam->BSIM4V4phi); + pParam->BSIM4v4phi); printf(" Phin = %g Ndep = %g \n", - pParam->BSIM4V4phin, pParam->BSIM4V4ndep); + pParam->BSIM4v4phin, pParam->BSIM4v4ndep); Fatal_Flag = 1; } - if (pParam->BSIM4V4nsub <= 0.0) + if (pParam->BSIM4v4nsub <= 0.0) { fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", - pParam->BSIM4V4nsub); + pParam->BSIM4v4nsub); printf("Fatal: Nsub = %g is not positive.\n", - pParam->BSIM4V4nsub); + pParam->BSIM4v4nsub); Fatal_Flag = 1; } - if (pParam->BSIM4V4ngate < 0.0) + if (pParam->BSIM4v4ngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", - pParam->BSIM4V4ngate); + pParam->BSIM4v4ngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", - pParam->BSIM4V4ngate); + pParam->BSIM4v4ngate); Fatal_Flag = 1; } - if (pParam->BSIM4V4ngate > 1.e25) + if (pParam->BSIM4v4ngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", - pParam->BSIM4V4ngate); + pParam->BSIM4v4ngate); printf("Fatal: Ngate = %g Ngate is too high\n", - pParam->BSIM4V4ngate); + pParam->BSIM4v4ngate); Fatal_Flag = 1; } - if (pParam->BSIM4V4xj <= 0.0) + if (pParam->BSIM4v4xj <= 0.0) { fprintf(fplog, "Fatal: Xj = %g is not positive.\n", - pParam->BSIM4V4xj); - printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4V4xj); + pParam->BSIM4v4xj); + printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v4xj); Fatal_Flag = 1; } - if (pParam->BSIM4V4dvt1 < 0.0) + if (pParam->BSIM4v4dvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", - pParam->BSIM4V4dvt1); - printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4V4dvt1); + pParam->BSIM4v4dvt1); + printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v4dvt1); Fatal_Flag = 1; } - if (pParam->BSIM4V4dvt1w < 0.0) + if (pParam->BSIM4v4dvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", - pParam->BSIM4V4dvt1w); - printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4V4dvt1w); + pParam->BSIM4v4dvt1w); + printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v4dvt1w); Fatal_Flag = 1; } - if (pParam->BSIM4V4w0 == -pParam->BSIM4V4weff) + if (pParam->BSIM4v4w0 == -pParam->BSIM4v4weff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } - if (pParam->BSIM4V4dsub < 0.0) - { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4V4dsub); - printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4V4dsub); + if (pParam->BSIM4v4dsub < 0.0) + { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v4dsub); + printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v4dsub); Fatal_Flag = 1; } - if (pParam->BSIM4V4b1 == -pParam->BSIM4V4weff) + if (pParam->BSIM4v4b1 == -pParam->BSIM4v4weff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } - if (here->BSIM4V4u0temp <= 0.0) - { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4V4u0temp); + if (here->BSIM4v4u0temp <= 0.0) + { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4v4u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", - here->BSIM4V4u0temp); + here->BSIM4v4u0temp); Fatal_Flag = 1; } - if (pParam->BSIM4V4delta < 0.0) + if (pParam->BSIM4v4delta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", - pParam->BSIM4V4delta); - printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4V4delta); + pParam->BSIM4v4delta); + printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v4delta); Fatal_Flag = 1; } - if (here->BSIM4V4vsattemp <= 0.0) - { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4V4vsattemp); + if (here->BSIM4v4vsattemp <= 0.0) + { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4v4vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", - here->BSIM4V4vsattemp); + here->BSIM4v4vsattemp); Fatal_Flag = 1; } - if (pParam->BSIM4V4pclm <= 0.0) - { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4V4pclm); - printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4V4pclm); + if (pParam->BSIM4v4pclm <= 0.0) + { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v4pclm); + printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v4pclm); Fatal_Flag = 1; } - if (pParam->BSIM4V4drout < 0.0) - { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4V4drout); - printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4V4drout); + if (pParam->BSIM4v4drout < 0.0) + { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v4drout); + printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v4drout); Fatal_Flag = 1; } - if (here->BSIM4V4m <= 0.0) - { fprintf(fplog, "Fatal: multiplier = %g is not positive.\n", here->BSIM4V4m); - printf("Fatal: multiplier = %g is not positive.\n", here->BSIM4V4m); + if (here->BSIM4v4m <= 0.0) + { fprintf(fplog, "Fatal: multiplier = %g is not positive.\n", here->BSIM4v4m); + printf("Fatal: multiplier = %g is not positive.\n", here->BSIM4v4m); Fatal_Flag = 1; } - if (here->BSIM4V4nf < 1.0) - { fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4V4nf); - printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4V4nf); + if (here->BSIM4v4nf < 1.0) + { fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v4nf); + printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v4nf); Fatal_Flag = 1; } - if((here->BSIM4V4sa > 0.0) && (here->BSIM4V4sb > 0.0) && - ((here->BSIM4V4nf == 1.0) || ((here->BSIM4V4nf > 1.0) && (here->BSIM4V4sd > 0.0))) ) - { if (model->BSIM4V4saref <= 0.0) - { fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4V4saref); - printf("Fatal: SAref = %g is not positive.\n",model->BSIM4V4saref); + if((here->BSIM4v4sa > 0.0) && (here->BSIM4v4sb > 0.0) && + ((here->BSIM4v4nf == 1.0) || ((here->BSIM4v4nf > 1.0) && (here->BSIM4v4sd > 0.0))) ) + { if (model->BSIM4v4saref <= 0.0) + { fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4v4saref); + printf("Fatal: SAref = %g is not positive.\n",model->BSIM4v4saref); Fatal_Flag = 1; } - if (model->BSIM4V4sbref <= 0.0) - { fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4V4sbref); - printf("Fatal: SBref = %g is not positive.\n",model->BSIM4V4sbref); + if (model->BSIM4v4sbref <= 0.0) + { fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4v4sbref); + printf("Fatal: SBref = %g is not positive.\n",model->BSIM4v4sbref); Fatal_Flag = 1; } } - if ((here->BSIM4V4l + model->BSIM4V4xl) <= model->BSIM4V4xgl) + if ((here->BSIM4v4l + model->BSIM4v4xl) <= model->BSIM4v4xgl) { fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); Fatal_Flag = 1; } - if (model->BSIM4V4ngcon < 1.0) + if (model->BSIM4v4ngcon < 1.0) { fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n"); printf("Fatal: The parameter ngcon cannot be smaller than one.\n"); Fatal_Flag = 1; } - if ((model->BSIM4V4ngcon != 1.0) && (model->BSIM4V4ngcon != 2.0)) - { model->BSIM4V4ngcon = 1.0; + if ((model->BSIM4v4ngcon != 1.0) && (model->BSIM4v4ngcon != 2.0)) + { model->BSIM4v4ngcon = 1.0; fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); } - if (model->BSIM4V4gbmin < 1.0e-20) + if (model->BSIM4v4gbmin < 1.0e-20) { fprintf(fplog, "Warning: Gbmin = %g is too small.\n", - model->BSIM4V4gbmin); - printf("Warning: Gbmin = %g is too small.\n", model->BSIM4V4gbmin); + model->BSIM4v4gbmin); + printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v4gbmin); } /* Check saturation parameters */ - if (pParam->BSIM4V4fprout < 0.0) + if (pParam->BSIM4v4fprout < 0.0) { fprintf(fplog, "Fatal: fprout = %g is negative.\n", - pParam->BSIM4V4fprout); - printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4V4fprout); + pParam->BSIM4v4fprout); + printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v4fprout); Fatal_Flag = 1; } - if (pParam->BSIM4V4pdits < 0.0) + if (pParam->BSIM4v4pdits < 0.0) { fprintf(fplog, "Fatal: pdits = %g is negative.\n", - pParam->BSIM4V4pdits); - printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4V4pdits); + pParam->BSIM4v4pdits); + printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v4pdits); Fatal_Flag = 1; } - if (model->BSIM4V4pditsl < 0.0) + if (model->BSIM4v4pditsl < 0.0) { fprintf(fplog, "Fatal: pditsl = %g is negative.\n", - model->BSIM4V4pditsl); - printf("Fatal: pditsl = %g is negative.\n", model->BSIM4V4pditsl); + model->BSIM4v4pditsl); + printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v4pditsl); Fatal_Flag = 1; } /* Check gate current parameters */ - if (model->BSIM4V4igbMod) { - if (pParam->BSIM4V4nigbinv <= 0.0) + if (model->BSIM4v4igbMod) { + if (pParam->BSIM4v4nigbinv <= 0.0) { fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", - pParam->BSIM4V4nigbinv); - printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4V4nigbinv); + pParam->BSIM4v4nigbinv); + printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v4nigbinv); Fatal_Flag = 1; } - if (pParam->BSIM4V4nigbacc <= 0.0) + if (pParam->BSIM4v4nigbacc <= 0.0) { fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", - pParam->BSIM4V4nigbacc); - printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4V4nigbacc); + pParam->BSIM4v4nigbacc); + printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v4nigbacc); Fatal_Flag = 1; } } - if (model->BSIM4V4igcMod) { - if (pParam->BSIM4V4nigc <= 0.0) + if (model->BSIM4v4igcMod) { + if (pParam->BSIM4v4nigc <= 0.0) { fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", - pParam->BSIM4V4nigc); - printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4V4nigc); + pParam->BSIM4v4nigc); + printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v4nigc); Fatal_Flag = 1; } - if (pParam->BSIM4V4poxedge <= 0.0) + if (pParam->BSIM4v4poxedge <= 0.0) { fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", - pParam->BSIM4V4poxedge); - printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4V4poxedge); + pParam->BSIM4v4poxedge); + printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v4poxedge); Fatal_Flag = 1; } - if (pParam->BSIM4V4pigcd <= 0.0) + if (pParam->BSIM4v4pigcd <= 0.0) { fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", - pParam->BSIM4V4pigcd); - printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4V4pigcd); + pParam->BSIM4v4pigcd); + printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v4pigcd); Fatal_Flag = 1; } } /* Check capacitance parameters */ - if (pParam->BSIM4V4clc < 0.0) - { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4V4clc); - printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4V4clc); + if (pParam->BSIM4v4clc < 0.0) + { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v4clc); + printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v4clc); Fatal_Flag = 1; } /* Check overlap capacitance parameters */ - if (pParam->BSIM4V4ckappas < 0.02) + if (pParam->BSIM4v4ckappas < 0.02) { fprintf(fplog, "Warning: ckappas = %g is too small. Set to 0.02\n", - pParam->BSIM4V4ckappas); - printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4V4ckappas); - pParam->BSIM4V4ckappas = 0.02; + pParam->BSIM4v4ckappas); + printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4v4ckappas); + pParam->BSIM4v4ckappas = 0.02; } - if (pParam->BSIM4V4ckappad < 0.02) + if (pParam->BSIM4v4ckappad < 0.02) { fprintf(fplog, "Warning: ckappad = %g is too small. Set to 0.02\n", - pParam->BSIM4V4ckappad); - printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4V4ckappad); - pParam->BSIM4V4ckappad = 0.02; + pParam->BSIM4v4ckappad); + printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4v4ckappad); + pParam->BSIM4v4ckappad = 0.02; } - if (model->BSIM4V4paramChk ==1) + if (model->BSIM4v4paramChk ==1) { /* Check L and W parameters */ - if (pParam->BSIM4V4leff <= 1.0e-9) + if (pParam->BSIM4v4leff <= 1.0e-9) { fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", - pParam->BSIM4V4leff); + pParam->BSIM4v4leff); printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", - pParam->BSIM4V4leff); + pParam->BSIM4v4leff); } - if (pParam->BSIM4V4leffCV <= 1.0e-9) + if (pParam->BSIM4v4leffCV <= 1.0e-9) { fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", - pParam->BSIM4V4leffCV); + pParam->BSIM4v4leffCV); printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", - pParam->BSIM4V4leffCV); + pParam->BSIM4v4leffCV); } - if (pParam->BSIM4V4weff <= 1.0e-9) + if (pParam->BSIM4v4weff <= 1.0e-9) { fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", - pParam->BSIM4V4weff); + pParam->BSIM4v4weff); printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", - pParam->BSIM4V4weff); + pParam->BSIM4v4weff); } - if (pParam->BSIM4V4weffCV <= 1.0e-9) + if (pParam->BSIM4v4weffCV <= 1.0e-9) { fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", - pParam->BSIM4V4weffCV); + pParam->BSIM4v4weffCV); printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", - pParam->BSIM4V4weffCV); + pParam->BSIM4v4weffCV); } /* Check threshold voltage parameters */ - if (model->BSIM4V4toxe < 1.0e-10) + if (model->BSIM4v4toxe < 1.0e-10) { fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", - model->BSIM4V4toxe); - printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4V4toxe); + model->BSIM4v4toxe); + printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v4toxe); } - if (model->BSIM4V4toxp < 1.0e-10) + if (model->BSIM4v4toxp < 1.0e-10) { fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", - model->BSIM4V4toxp); - printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4V4toxp); + model->BSIM4v4toxp); + printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v4toxp); } - if (model->BSIM4V4toxm < 1.0e-10) + if (model->BSIM4v4toxm < 1.0e-10) { fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", - model->BSIM4V4toxm); - printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4V4toxm); + model->BSIM4v4toxm); + printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v4toxm); } - if (pParam->BSIM4V4ndep <= 1.0e12) + if (pParam->BSIM4v4ndep <= 1.0e12) { fprintf(fplog, "Warning: Ndep = %g may be too small.\n", - pParam->BSIM4V4ndep); + pParam->BSIM4v4ndep); printf("Warning: Ndep = %g may be too small.\n", - pParam->BSIM4V4ndep); + pParam->BSIM4v4ndep); } - else if (pParam->BSIM4V4ndep >= 1.0e21) + else if (pParam->BSIM4v4ndep >= 1.0e21) { fprintf(fplog, "Warning: Ndep = %g may be too large.\n", - pParam->BSIM4V4ndep); + pParam->BSIM4v4ndep); printf("Warning: Ndep = %g may be too large.\n", - pParam->BSIM4V4ndep); + pParam->BSIM4v4ndep); } - if (pParam->BSIM4V4nsub <= 1.0e14) + if (pParam->BSIM4v4nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", - pParam->BSIM4V4nsub); + pParam->BSIM4v4nsub); printf("Warning: Nsub = %g may be too small.\n", - pParam->BSIM4V4nsub); + pParam->BSIM4v4nsub); } - else if (pParam->BSIM4V4nsub >= 1.0e21) + else if (pParam->BSIM4v4nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", - pParam->BSIM4V4nsub); + pParam->BSIM4v4nsub); printf("Warning: Nsub = %g may be too large.\n", - pParam->BSIM4V4nsub); + pParam->BSIM4v4nsub); } - if ((pParam->BSIM4V4ngate > 0.0) && - (pParam->BSIM4V4ngate <= 1.e18)) + if ((pParam->BSIM4v4ngate > 0.0) && + (pParam->BSIM4v4ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", - pParam->BSIM4V4ngate); + pParam->BSIM4v4ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", - pParam->BSIM4V4ngate); + pParam->BSIM4v4ngate); } - if (pParam->BSIM4V4dvt0 < 0.0) + if (pParam->BSIM4v4dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", - pParam->BSIM4V4dvt0); - printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4V4dvt0); + pParam->BSIM4v4dvt0); + printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v4dvt0); } - if (fabs(1.0e-8 / (pParam->BSIM4V4w0 + pParam->BSIM4V4weff)) > 10.0) + if (fabs(1.0e-8 / (pParam->BSIM4v4w0 + pParam->BSIM4v4weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ - if (pParam->BSIM4V4nfactor < 0.0) + if (pParam->BSIM4v4nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", - pParam->BSIM4V4nfactor); - printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4V4nfactor); + pParam->BSIM4v4nfactor); + printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v4nfactor); } - if (pParam->BSIM4V4cdsc < 0.0) + if (pParam->BSIM4v4cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", - pParam->BSIM4V4cdsc); - printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4V4cdsc); + pParam->BSIM4v4cdsc); + printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v4cdsc); } - if (pParam->BSIM4V4cdscd < 0.0) + if (pParam->BSIM4v4cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", - pParam->BSIM4V4cdscd); - printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4V4cdscd); + pParam->BSIM4v4cdscd); + printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v4cdscd); } /* Check DIBL parameters */ -/* if (here->BSIM4V4eta0 < 0.0) +/* if (here->BSIM4v4eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", - here->BSIM4V4eta0); - printf("Warning: Eta0 = %g is negative.\n", here->BSIM4V4eta0); + here->BSIM4v4eta0); + printf("Warning: Eta0 = %g is negative.\n", here->BSIM4v4eta0); } */ /* Check Abulk parameters */ - if (fabs(1.0e-8 / (pParam->BSIM4V4b1 + pParam->BSIM4V4weff)) > 10.0) + if (fabs(1.0e-8 / (pParam->BSIM4v4b1 + pParam->BSIM4v4weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ - if (pParam->BSIM4V4a2 < 0.01) - { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4V4a2); + if (pParam->BSIM4v4a2 < 0.01) + { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v4a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", - pParam->BSIM4V4a2); - pParam->BSIM4V4a2 = 0.01; + pParam->BSIM4v4a2); + pParam->BSIM4v4a2 = 0.01; } - else if (pParam->BSIM4V4a2 > 1.0) + else if (pParam->BSIM4v4a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", - pParam->BSIM4V4a2); + pParam->BSIM4v4a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", - pParam->BSIM4V4a2); - pParam->BSIM4V4a2 = 1.0; - pParam->BSIM4V4a1 = 0.0; + pParam->BSIM4v4a2); + pParam->BSIM4v4a2 = 1.0; + pParam->BSIM4v4a1 = 0.0; } - if (pParam->BSIM4V4prwg < 0.0) + if (pParam->BSIM4v4prwg < 0.0) { fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", - pParam->BSIM4V4prwg); + pParam->BSIM4v4prwg); printf("Warning: Prwg = %g is negative. Set to zero.\n", - pParam->BSIM4V4prwg); - pParam->BSIM4V4prwg = 0.0; + pParam->BSIM4v4prwg); + pParam->BSIM4v4prwg = 0.0; } - if (pParam->BSIM4V4rdsw < 0.0) + if (pParam->BSIM4v4rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", - pParam->BSIM4V4rdsw); + pParam->BSIM4v4rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", - pParam->BSIM4V4rdsw); - pParam->BSIM4V4rdsw = 0.0; - pParam->BSIM4V4rds0 = 0.0; + pParam->BSIM4v4rdsw); + pParam->BSIM4v4rdsw = 0.0; + pParam->BSIM4v4rds0 = 0.0; } - if (pParam->BSIM4V4rds0 < 0.0) + if (pParam->BSIM4v4rds0 < 0.0) { fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", - pParam->BSIM4V4rds0); + pParam->BSIM4v4rds0); printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", - pParam->BSIM4V4rds0); - pParam->BSIM4V4rds0 = 0.0; + pParam->BSIM4v4rds0); + pParam->BSIM4v4rds0 = 0.0; } - if (pParam->BSIM4V4rdswmin < 0.0) + if (pParam->BSIM4v4rdswmin < 0.0) { fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", - pParam->BSIM4V4rdswmin); + pParam->BSIM4v4rdswmin); printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", - pParam->BSIM4V4rdswmin); - pParam->BSIM4V4rdswmin = 0.0; + pParam->BSIM4v4rdswmin); + pParam->BSIM4v4rdswmin = 0.0; } - if (pParam->BSIM4V4pscbe2 <= 0.0) + if (pParam->BSIM4v4pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", - pParam->BSIM4V4pscbe2); - printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4V4pscbe2); + pParam->BSIM4v4pscbe2); + printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v4pscbe2); } - if (pParam->BSIM4V4vsattemp < 1.0e3) - { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4V4vsattemp); - printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4V4vsattemp); + if (pParam->BSIM4v4vsattemp < 1.0e3) + { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v4vsattemp); + printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v4vsattemp); } - if((model->BSIM4V4lambdaGiven) && (pParam->BSIM4V4lambda > 0.0) ) + if((model->BSIM4v4lambdaGiven) && (pParam->BSIM4v4lambda > 0.0) ) { - if (pParam->BSIM4V4lambda > 1.0e-9) - { fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4V4lambda); - printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4V4lambda); + if (pParam->BSIM4v4lambda > 1.0e-9) + { fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4v4lambda); + printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4v4lambda); } } - if((model->BSIM4V4vtlGiven) && (pParam->BSIM4V4vtl > 0.0) ) + if((model->BSIM4v4vtlGiven) && (pParam->BSIM4v4vtl > 0.0) ) { - if (pParam->BSIM4V4vtl < 6.0e4) - { fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4V4vtl); - printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4V4vtl); + if (pParam->BSIM4v4vtl < 6.0e4) + { fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v4vtl); + printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v4vtl); } - if (pParam->BSIM4V4xn < 3.0) - { fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4V4xn); - printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4V4xn); - pParam->BSIM4V4xn = 3.0; + if (pParam->BSIM4v4xn < 3.0) + { fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4v4xn); + printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4v4xn); + pParam->BSIM4v4xn = 3.0; } - if (model->BSIM4V4lc < 0.0) - { fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4V4lc); - printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4V4lc); - pParam->BSIM4V4lc = 0.0; + if (model->BSIM4v4lc < 0.0) + { fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4v4lc); + printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4v4lc); + pParam->BSIM4v4lc = 0.0; } } - if (pParam->BSIM4V4pdibl1 < 0.0) + if (pParam->BSIM4v4pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", - pParam->BSIM4V4pdibl1); - printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4V4pdibl1); + pParam->BSIM4v4pdibl1); + printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v4pdibl1); } -/* if (pParam->BSIM4V4pdibl2 < 0.0) +/* if (pParam->BSIM4v4pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", - pParam->BSIM4V4pdibl2); - printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4V4pdibl2); + pParam->BSIM4v4pdibl2); + printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v4pdibl2); } */ /* Check stress effect parameters */ - if((here->BSIM4V4sa > 0.0) && (here->BSIM4V4sb > 0.0) && - ((here->BSIM4V4nf == 1.0) || ((here->BSIM4V4nf > 1.0) && (here->BSIM4V4sd > 0.0))) ) - { if (model->BSIM4V4lodk2 <= 0.0) - { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4V4lodk2); - printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4V4lodk2); + if((here->BSIM4v4sa > 0.0) && (here->BSIM4v4sb > 0.0) && + ((here->BSIM4v4nf == 1.0) || ((here->BSIM4v4nf > 1.0) && (here->BSIM4v4sd > 0.0))) ) + { if (model->BSIM4v4lodk2 <= 0.0) + { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4v4lodk2); + printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4v4lodk2); } - if (model->BSIM4V4lodeta0 <= 0.0) - { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4V4lodeta0); - printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4V4lodeta0); + if (model->BSIM4v4lodeta0 <= 0.0) + { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4v4lodeta0); + printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4v4lodeta0); } } /* Check gate resistance parameters */ - if (here->BSIM4V4rgateMod == 1) - { if (model->BSIM4V4rshg <= 0.0) + if (here->BSIM4v4rgateMod == 1) + { if (model->BSIM4v4rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 1.\n"); } - else if (here->BSIM4V4rgateMod == 2) - { if (model->BSIM4V4rshg <= 0.0) + else if (here->BSIM4v4rgateMod == 2) + { if (model->BSIM4v4rshg <= 0.0) printf("Warning: rshg <= 0.0 for rgateMod = 2.\n"); - else if (pParam->BSIM4V4xrcrg1 <= 0.0) + else if (pParam->BSIM4v4xrcrg1 <= 0.0) printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n"); } - if (here->BSIM4V4rgateMod == 3) - { if (model->BSIM4V4rshg <= 0.0) + if (here->BSIM4v4rgateMod == 3) + { if (model->BSIM4v4rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 3.\n"); - else if (pParam->BSIM4V4xrcrg1 <= 0.0) + else if (pParam->BSIM4v4xrcrg1 <= 0.0) printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n"); } /* Check capacitance parameters */ - if (pParam->BSIM4V4noff < 0.1) + if (pParam->BSIM4v4noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", - pParam->BSIM4V4noff); - printf("Warning: Noff = %g is too small.\n", pParam->BSIM4V4noff); + pParam->BSIM4v4noff); + printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v4noff); } - if (pParam->BSIM4V4voffcv < -0.5) + if (pParam->BSIM4v4voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", - pParam->BSIM4V4voffcv); - printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4V4voffcv); + pParam->BSIM4v4voffcv); + printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v4voffcv); } - if (pParam->BSIM4V4moin < 5.0) + if (pParam->BSIM4v4moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", - pParam->BSIM4V4moin); - printf("Warning: Moin = %g is too small.\n", pParam->BSIM4V4moin); + pParam->BSIM4v4moin); + printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v4moin); } - if (pParam->BSIM4V4moin > 25.0) + if (pParam->BSIM4v4moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", - pParam->BSIM4V4moin); - printf("Warning: Moin = %g is too large.\n", pParam->BSIM4V4moin); + pParam->BSIM4v4moin); + printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v4moin); } - if(model->BSIM4V4capMod ==2) { - if (pParam->BSIM4V4acde < 0.1) + if(model->BSIM4v4capMod ==2) { + if (pParam->BSIM4v4acde < 0.1) { fprintf(fplog, "Warning: Acde = %g is too small.\n", - pParam->BSIM4V4acde); - printf("Warning: Acde = %g is too small.\n", pParam->BSIM4V4acde); + pParam->BSIM4v4acde); + printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v4acde); } - if (pParam->BSIM4V4acde > 1.6) + if (pParam->BSIM4v4acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", - pParam->BSIM4V4acde); - printf("Warning: Acde = %g is too large.\n", pParam->BSIM4V4acde); + pParam->BSIM4v4acde); + printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v4acde); } } /* Check overlap capacitance parameters */ - if (model->BSIM4V4cgdo < 0.0) - { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4V4cgdo); - printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4V4cgdo); - model->BSIM4V4cgdo = 0.0; + if (model->BSIM4v4cgdo < 0.0) + { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v4cgdo); + printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v4cgdo); + model->BSIM4v4cgdo = 0.0; } - if (model->BSIM4V4cgso < 0.0) - { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4V4cgso); - printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4V4cgso); - model->BSIM4V4cgso = 0.0; + if (model->BSIM4v4cgso < 0.0) + { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v4cgso); + printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v4cgso); + model->BSIM4v4cgso = 0.0; } - if (model->BSIM4V4tnoiMod == 1) { - if (model->BSIM4V4tnoia < 0.0) - { fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4V4tnoia); - printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4V4tnoia); - model->BSIM4V4tnoia = 0.0; + if (model->BSIM4v4tnoiMod == 1) { + if (model->BSIM4v4tnoia < 0.0) + { fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v4tnoia); + printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v4tnoia); + model->BSIM4v4tnoia = 0.0; } - if (model->BSIM4V4tnoib < 0.0) - { fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4V4tnoib); - printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4V4tnoib); - model->BSIM4V4tnoib = 0.0; + if (model->BSIM4v4tnoib < 0.0) + { fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v4tnoib); + printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v4tnoib); + model->BSIM4v4tnoib = 0.0; } - if (model->BSIM4V4rnoia < 0.0) - { fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4V4rnoia); - printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4V4rnoia); - model->BSIM4V4rnoia = 0.0; + if (model->BSIM4v4rnoia < 0.0) + { fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v4rnoia); + printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v4rnoia); + model->BSIM4v4rnoia = 0.0; } - if (model->BSIM4V4rnoib < 0.0) - { fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4V4rnoib); - printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4V4rnoib); - model->BSIM4V4rnoib = 0.0; + if (model->BSIM4v4rnoib < 0.0) + { fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v4rnoib); + printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v4rnoib); + model->BSIM4v4rnoib = 0.0; } } - if (model->BSIM4V4SjctEmissionCoeff < 0.0) + if (model->BSIM4v4SjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njs = %g is negative.\n", - model->BSIM4V4SjctEmissionCoeff); + model->BSIM4v4SjctEmissionCoeff); printf("Warning: Njs = %g is negative.\n", - model->BSIM4V4SjctEmissionCoeff); + model->BSIM4v4SjctEmissionCoeff); } - if (model->BSIM4V4DjctEmissionCoeff < 0.0) + if (model->BSIM4v4DjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njd = %g is negative.\n", - model->BSIM4V4DjctEmissionCoeff); + model->BSIM4v4DjctEmissionCoeff); printf("Warning: Njd = %g is negative.\n", - model->BSIM4V4DjctEmissionCoeff); + model->BSIM4v4DjctEmissionCoeff); } - if (model->BSIM4V4njtstemp < 0.0) + if (model->BSIM4v4njtstemp < 0.0) { fprintf(fplog, "Warning: Njts = %g is negative at temperature = %g.\n", - model->BSIM4V4njtstemp, ckt->CKTtemp); + model->BSIM4v4njtstemp, ckt->CKTtemp); printf("Warning: Njts = %g is negative at temperature = %g.\n", - model->BSIM4V4njtstemp, ckt->CKTtemp); + model->BSIM4v4njtstemp, ckt->CKTtemp); } - if (model->BSIM4V4njtsswtemp < 0.0) + if (model->BSIM4v4njtsswtemp < 0.0) { fprintf(fplog, "Warning: Njtssw = %g is negative at temperature = %g.\n", - model->BSIM4V4njtsswtemp, ckt->CKTtemp); + model->BSIM4v4njtsswtemp, ckt->CKTtemp); printf("Warning: Njtssw = %g is negative at temperature = %g.\n", - model->BSIM4V4njtsswtemp, ckt->CKTtemp); + model->BSIM4v4njtsswtemp, ckt->CKTtemp); } - if (model->BSIM4V4njtsswgtemp < 0.0) + if (model->BSIM4v4njtsswgtemp < 0.0) { fprintf(fplog, "Warning: Njtsswg = %g is negative at temperature = %g.\n", - model->BSIM4V4njtsswgtemp, ckt->CKTtemp); + model->BSIM4v4njtsswgtemp, ckt->CKTtemp); printf("Warning: Njtsswg = %g is negative at temperature = %g.\n", - model->BSIM4V4njtsswgtemp, ckt->CKTtemp); + model->BSIM4v4njtsswgtemp, ckt->CKTtemp); } - if (model->BSIM4V4vtss < 0.0) + if (model->BSIM4v4vtss < 0.0) { fprintf(fplog, "Warning: Vtss = %g is negative.\n", - model->BSIM4V4vtss); + model->BSIM4v4vtss); printf("Warning: Vtss = %g is negative.\n", - model->BSIM4V4vtss); + model->BSIM4v4vtss); } - if (model->BSIM4V4vtsd < 0.0) + if (model->BSIM4v4vtsd < 0.0) { fprintf(fplog, "Warning: Vtsd = %g is negative.\n", - model->BSIM4V4vtsd); + model->BSIM4v4vtsd); printf("Warning: Vtsd = %g is negative.\n", - model->BSIM4V4vtsd); + model->BSIM4v4vtsd); } - if (model->BSIM4V4vtssws < 0.0) + if (model->BSIM4v4vtssws < 0.0) { fprintf(fplog, "Warning: Vtssws = %g is negative.\n", - model->BSIM4V4vtssws); + model->BSIM4v4vtssws); printf("Warning: Vtssws = %g is negative.\n", - model->BSIM4V4vtssws); + model->BSIM4v4vtssws); } - if (model->BSIM4V4vtsswd < 0.0) + if (model->BSIM4v4vtsswd < 0.0) { fprintf(fplog, "Warning: Vtsswd = %g is negative.\n", - model->BSIM4V4vtsswd); + model->BSIM4v4vtsswd); printf("Warning: Vtsswd = %g is negative.\n", - model->BSIM4V4vtsswd); + model->BSIM4v4vtsswd); } - if (model->BSIM4V4vtsswgs < 0.0) + if (model->BSIM4v4vtsswgs < 0.0) { fprintf(fplog, "Warning: Vtsswgs = %g is negative.\n", - model->BSIM4V4vtsswgs); + model->BSIM4v4vtsswgs); printf("Warning: Vtsswgs = %g is negative.\n", - model->BSIM4V4vtsswgs); + model->BSIM4v4vtsswgs); } - if (model->BSIM4V4vtsswgd < 0.0) + if (model->BSIM4v4vtsswgd < 0.0) { fprintf(fplog, "Warning: Vtsswgd = %g is negative.\n", - model->BSIM4V4vtsswgd); + model->BSIM4v4vtsswgd); printf("Warning: Vtsswgd = %g is negative.\n", - model->BSIM4V4vtsswgd); + model->BSIM4v4vtsswgd); } - if (model->BSIM4V4ntnoi < 0.0) - { fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4V4ntnoi); - printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4V4ntnoi); - model->BSIM4V4ntnoi = 0.0; + if (model->BSIM4v4ntnoi < 0.0) + { fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v4ntnoi); + printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v4ntnoi); + model->BSIM4v4ntnoi = 0.0; } }/* loop for the parameter check for warning messages */ diff --git a/src/spicelib/devices/bsim4v4/b4v4cvtest.c b/src/spicelib/devices/bsim4v4/b4v4cvtest.c index c62598cc9..9c05309db 100644 --- a/src/spicelib/devices/bsim4v4/b4v4cvtest.c +++ b/src/spicelib/devices/bsim4v4/b4v4cvtest.c @@ -22,12 +22,12 @@ int -BSIM4V4convTest(inModel,ckt) +BSIM4v4convTest(inModel,ckt) GENmodel *inModel; CKTcircuit *ckt; { -BSIM4V4model *model = (BSIM4V4model*)inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model*)inModel; +BSIM4v4instance *here; double delvbd, delvbs, delvds, delvgd, delvgs; double delvdbd, delvsbs; double delvbd_jct, delvbs_jct; @@ -39,112 +39,112 @@ double Isestot, cseshat, Idedtot, cdedhat; double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; double tol0, tol1, tol2, tol3, tol4, tol5, tol6; - for (; model != NULL; model = model->BSIM4V4nextModel) - { for (here = model->BSIM4V4instances; here != NULL ; - here=here->BSIM4V4nextInstance) + for (; model != NULL; model = model->BSIM4v4nextModel) + { for (here = model->BSIM4v4instances; here != NULL ; + here=here->BSIM4v4nextInstance) { - if (here->BSIM4V4owner != ARCHme) continue; - vds = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4dNodePrime) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vgs = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4gNodePrime) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vbs = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4bNodePrime) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vdbs = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4dbNode) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vsbs = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4sbNode) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vses = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4sNode) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vdes = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4dNode) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); + if (here->BSIM4v4owner != ARCHme) continue; + vds = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4dNodePrime) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vgs = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4gNodePrime) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vbs = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4bNodePrime) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vdbs = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4dbNode) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vsbs = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4sbNode) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vses = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4sNode) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vdes = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4dNode) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); - vgdo = *(ckt->CKTstate0 + here->BSIM4V4vgs) - - *(ckt->CKTstate0 + here->BSIM4V4vds); + vgdo = *(ckt->CKTstate0 + here->BSIM4v4vgs) + - *(ckt->CKTstate0 + here->BSIM4v4vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; - delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4V4vbd); - delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4V4vdbd); + delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v4vbd); + delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v4vdbd); delvgd = vgd - vgdo; - delvds = vds - *(ckt->CKTstate0 + here->BSIM4V4vds); - delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4V4vgs); - delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4V4vbs); - delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4V4vsbs); + delvds = vds - *(ckt->CKTstate0 + here->BSIM4v4vds); + delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v4vgs); + delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v4vbs); + delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v4vsbs); - delvses = vses - (*(ckt->CKTstate0 + here->BSIM4V4vses)); - vdedo = *(ckt->CKTstate0 + here->BSIM4V4vdes) - - *(ckt->CKTstate0 + here->BSIM4V4vds); - delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4V4vdes); + delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v4vses)); + vdedo = *(ckt->CKTstate0 + here->BSIM4v4vdes) + - *(ckt->CKTstate0 + here->BSIM4v4vds); + delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v4vdes); delvded = vdes - vds - vdedo; - delvbd_jct = (!here->BSIM4V4rbodyMod) ? delvbd : delvdbd; - delvbs_jct = (!here->BSIM4V4rbodyMod) ? delvbs : delvsbs; + delvbd_jct = (!here->BSIM4v4rbodyMod) ? delvbd : delvdbd; + delvbs_jct = (!here->BSIM4v4rbodyMod) ? delvbs : delvsbs; - if (here->BSIM4V4mode >= 0) - { Idtot = here->BSIM4V4cd + here->BSIM4V4csub - here->BSIM4V4cbd - + here->BSIM4V4Igidl; - cdhat = Idtot - here->BSIM4V4gbd * delvbd_jct - + (here->BSIM4V4gmbs + here->BSIM4V4gbbs + here->BSIM4V4ggidlb) * delvbs - + (here->BSIM4V4gm + here->BSIM4V4gbgs + here->BSIM4V4ggidlg) * delvgs - + (here->BSIM4V4gds + here->BSIM4V4gbds + here->BSIM4V4ggidld) * delvds; + if (here->BSIM4v4mode >= 0) + { Idtot = here->BSIM4v4cd + here->BSIM4v4csub - here->BSIM4v4cbd + + here->BSIM4v4Igidl; + cdhat = Idtot - here->BSIM4v4gbd * delvbd_jct + + (here->BSIM4v4gmbs + here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * delvbs + + (here->BSIM4v4gm + here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs + + (here->BSIM4v4gds + here->BSIM4v4gbds + here->BSIM4v4ggidld) * delvds; - Igstot = here->BSIM4V4Igs + here->BSIM4V4Igcs; - cgshat = Igstot + (here->BSIM4V4gIgsg + here->BSIM4V4gIgcsg) * delvgs - + here->BSIM4V4gIgcsd * delvds + here->BSIM4V4gIgcsb * delvbs; + Igstot = here->BSIM4v4Igs + here->BSIM4v4Igcs; + cgshat = Igstot + (here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg) * delvgs + + here->BSIM4v4gIgcsd * delvds + here->BSIM4v4gIgcsb * delvbs; - Igdtot = here->BSIM4V4Igd + here->BSIM4V4Igcd; - cgdhat = Igdtot + here->BSIM4V4gIgdg * delvgd + here->BSIM4V4gIgcdg * delvgs - + here->BSIM4V4gIgcdd * delvds + here->BSIM4V4gIgcdb * delvbs; + Igdtot = here->BSIM4v4Igd + here->BSIM4v4Igcd; + cgdhat = Igdtot + here->BSIM4v4gIgdg * delvgd + here->BSIM4v4gIgcdg * delvgs + + here->BSIM4v4gIgcdd * delvds + here->BSIM4v4gIgcdb * delvbs; - Igbtot = here->BSIM4V4Igb; - cgbhat = here->BSIM4V4Igb + here->BSIM4V4gIgbg * delvgs + here->BSIM4V4gIgbd - * delvds + here->BSIM4V4gIgbb * delvbs; + Igbtot = here->BSIM4v4Igb; + cgbhat = here->BSIM4v4Igb + here->BSIM4v4gIgbg * delvgs + here->BSIM4v4gIgbd + * delvds + here->BSIM4v4gIgbb * delvbs; } else - { Idtot = here->BSIM4V4cd + here->BSIM4V4cbd - here->BSIM4V4Igidl; /* bugfix */ - cdhat = Idtot + here->BSIM4V4gbd * delvbd_jct + here->BSIM4V4gmbs - * delvbd + here->BSIM4V4gm * delvgd - - (here->BSIM4V4gds + here->BSIM4V4ggidls) * delvds - - here->BSIM4V4ggidlg * delvgs - here->BSIM4V4ggidlb * delvbs; - - Igstot = here->BSIM4V4Igs + here->BSIM4V4Igcd; - cgshat = Igstot + here->BSIM4V4gIgsg * delvgs + here->BSIM4V4gIgcdg * delvgd - - here->BSIM4V4gIgcdd * delvds + here->BSIM4V4gIgcdb * delvbd; - - Igdtot = here->BSIM4V4Igd + here->BSIM4V4Igcs; - cgdhat = Igdtot + (here->BSIM4V4gIgdg + here->BSIM4V4gIgcsg) * delvgd - - here->BSIM4V4gIgcsd * delvds + here->BSIM4V4gIgcsb * delvbd; - - Igbtot = here->BSIM4V4Igb; - cgbhat = here->BSIM4V4Igb + here->BSIM4V4gIgbg * delvgd - here->BSIM4V4gIgbd - * delvds + here->BSIM4V4gIgbb * delvbd; + { Idtot = here->BSIM4v4cd + here->BSIM4v4cbd - here->BSIM4v4Igidl; /* bugfix */ + cdhat = Idtot + here->BSIM4v4gbd * delvbd_jct + here->BSIM4v4gmbs + * delvbd + here->BSIM4v4gm * delvgd + - (here->BSIM4v4gds + here->BSIM4v4ggidls) * delvds + - here->BSIM4v4ggidlg * delvgs - here->BSIM4v4ggidlb * delvbs; + + Igstot = here->BSIM4v4Igs + here->BSIM4v4Igcd; + cgshat = Igstot + here->BSIM4v4gIgsg * delvgs + here->BSIM4v4gIgcdg * delvgd + - here->BSIM4v4gIgcdd * delvds + here->BSIM4v4gIgcdb * delvbd; + + Igdtot = here->BSIM4v4Igd + here->BSIM4v4Igcs; + cgdhat = Igdtot + (here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg) * delvgd + - here->BSIM4v4gIgcsd * delvds + here->BSIM4v4gIgcsb * delvbd; + + Igbtot = here->BSIM4v4Igb; + cgbhat = here->BSIM4v4Igb + here->BSIM4v4gIgbg * delvgd - here->BSIM4v4gIgbd + * delvds + here->BSIM4v4gIgbb * delvbd; } - Isestot = here->BSIM4V4gstot * (*(ckt->CKTstate0 + here->BSIM4V4vses)); - cseshat = Isestot + here->BSIM4V4gstot * delvses - + here->BSIM4V4gstotd * delvds + here->BSIM4V4gstotg * delvgs - + here->BSIM4V4gstotb * delvbs; + Isestot = here->BSIM4v4gstot * (*(ckt->CKTstate0 + here->BSIM4v4vses)); + cseshat = Isestot + here->BSIM4v4gstot * delvses + + here->BSIM4v4gstotd * delvds + here->BSIM4v4gstotg * delvgs + + here->BSIM4v4gstotb * delvbs; - Idedtot = here->BSIM4V4gdtot * vdedo; - cdedhat = Idedtot + here->BSIM4V4gdtot * delvded - + here->BSIM4V4gdtotd * delvds + here->BSIM4V4gdtotg * delvgs - + here->BSIM4V4gdtotb * delvbs; + Idedtot = here->BSIM4v4gdtot * vdedo; + cdedhat = Idedtot + here->BSIM4v4gdtot * delvded + + here->BSIM4v4gdtotd * delvds + here->BSIM4v4gdtotg * delvgs + + here->BSIM4v4gdtotb * delvbs; /* * Check convergence */ - if ((here->BSIM4V4off == 0) || (!(ckt->CKTmode & MODEINITFIX))) + if ((here->BSIM4v4off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) @@ -170,21 +170,21 @@ double tol0, tol1, tol2, tol3, tol4, tol5, tol6; return(OK); } - Ibtot = here->BSIM4V4cbs + here->BSIM4V4cbd - - here->BSIM4V4Igidl - here->BSIM4V4Igisl - here->BSIM4V4csub; - if (here->BSIM4V4mode >= 0) - { cbhat = Ibtot + here->BSIM4V4gbd * delvbd_jct - + here->BSIM4V4gbs * delvbs_jct - (here->BSIM4V4gbbs + here->BSIM4V4ggidlb) - * delvbs - (here->BSIM4V4gbgs + here->BSIM4V4ggidlg) * delvgs - - (here->BSIM4V4gbds + here->BSIM4V4ggidld) * delvds - - here->BSIM4V4ggislg * delvgd - here->BSIM4V4ggislb* delvbd + here->BSIM4V4ggisls * delvds ; + Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd + - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; + if (here->BSIM4v4mode >= 0) + { cbhat = Ibtot + here->BSIM4v4gbd * delvbd_jct + + here->BSIM4v4gbs * delvbs_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggidlb) + * delvbs - (here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs + - (here->BSIM4v4gbds + here->BSIM4v4ggidld) * delvds + - here->BSIM4v4ggislg * delvgd - here->BSIM4v4ggislb* delvbd + here->BSIM4v4ggisls * delvds ; } else - { cbhat = Ibtot + here->BSIM4V4gbs * delvbs_jct + here->BSIM4V4gbd - * delvbd_jct - (here->BSIM4V4gbbs + here->BSIM4V4ggislb) * delvbd - - (here->BSIM4V4gbgs + here->BSIM4V4ggislg) * delvgd - + (here->BSIM4V4gbds + here->BSIM4V4ggisld - here->BSIM4V4ggidls) * delvds - - here->BSIM4V4ggidlg * delvgs - here->BSIM4V4ggidlb * delvbs; + { cbhat = Ibtot + here->BSIM4v4gbs * delvbs_jct + here->BSIM4v4gbd + * delvbd_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggislb) * delvbd + - (here->BSIM4v4gbgs + here->BSIM4v4ggislg) * delvgd + + (here->BSIM4v4gbds + here->BSIM4v4ggisld - here->BSIM4v4ggidls) * delvds + - here->BSIM4v4ggidlg * delvgs - here->BSIM4v4ggidlb * delvbs; } tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; diff --git a/src/spicelib/devices/bsim4v4/b4v4del.c b/src/spicelib/devices/bsim4v4/b4v4del.c index 914e21cbc..032988feb 100644 --- a/src/spicelib/devices/bsim4v4/b4v4del.c +++ b/src/spicelib/devices/bsim4v4/b4v4del.c @@ -16,25 +16,25 @@ int -BSIM4V4delete(inModel,name,inInst) +BSIM4v4delete(inModel,name,inInst) GENmodel *inModel; IFuid name; GENinstance **inInst; { -BSIM4V4instance **fast = (BSIM4V4instance**)inInst; -BSIM4V4model *model = (BSIM4V4model*)inModel; -BSIM4V4instance **prev = NULL; -BSIM4V4instance *here; +BSIM4v4instance **fast = (BSIM4v4instance**)inInst; +BSIM4v4model *model = (BSIM4v4model*)inModel; +BSIM4v4instance **prev = NULL; +BSIM4v4instance *here; - for (; model ; model = model->BSIM4V4nextModel) - { prev = &(model->BSIM4V4instances); + for (; model ; model = model->BSIM4v4nextModel) + { prev = &(model->BSIM4v4instances); for (here = *prev; here ; here = *prev) - { if (here->BSIM4V4name == name || (fast && here==*fast)) - { *prev= here->BSIM4V4nextInstance; + { if (here->BSIM4v4name == name || (fast && here==*fast)) + { *prev= here->BSIM4v4nextInstance; FREE(here); return(OK); } - prev = &(here->BSIM4V4nextInstance); + prev = &(here->BSIM4v4nextInstance); } } return(E_NODEV); diff --git a/src/spicelib/devices/bsim4v4/b4v4dest.c b/src/spicelib/devices/bsim4v4/b4v4dest.c index 1b8cfb59b..028d78c14 100644 --- a/src/spicelib/devices/bsim4v4/b4v4dest.c +++ b/src/spicelib/devices/bsim4v4/b4v4dest.c @@ -13,20 +13,20 @@ #include "suffix.h" void -BSIM4V4destroy(inModel) +BSIM4v4destroy(inModel) GENmodel **inModel; { -BSIM4V4model **model = (BSIM4V4model**)inModel; -BSIM4V4instance *here; -BSIM4V4instance *prev = NULL; -BSIM4V4model *mod = *model; -BSIM4V4model *oldmod = NULL; +BSIM4v4model **model = (BSIM4v4model**)inModel; +BSIM4v4instance *here; +BSIM4v4instance *prev = NULL; +BSIM4v4model *mod = *model; +BSIM4v4model *oldmod = NULL; - for (; mod ; mod = mod->BSIM4V4nextModel) + for (; mod ; mod = mod->BSIM4v4nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; - prev = (BSIM4V4instance *)NULL; - for (here = mod->BSIM4V4instances; here; here = here->BSIM4V4nextInstance) + prev = (BSIM4v4instance *)NULL; + for (here = mod->BSIM4v4instances; here; here = here->BSIM4v4nextInstance) { if(prev) FREE(prev); prev = here; } diff --git a/src/spicelib/devices/bsim4v4/b4v4geo.c b/src/spicelib/devices/bsim4v4/b4v4geo.c index e5050c37d..50cf19297 100644 --- a/src/spicelib/devices/bsim4v4/b4v4geo.c +++ b/src/spicelib/devices/bsim4v4/b4v4geo.c @@ -13,17 +13,17 @@ /* * WDLiu: * This subrutine is a special module to process the geometry dependent - * parasitics for BSIM4V4, which calculates Ps, Pd, As, Ad, and Rs and Rd + * parasitics for BSIM4v4, which calculates Ps, Pd, As, Ad, and Rs and Rd * for multi-fingers and varous GEO and RGEO options. */ int -BSIM4V4RdsEndIso(double, double, double, double, double, double, int, int, double *); +BSIM4v4RdsEndIso(double, double, double, double, double, double, int, int, double *); int -BSIM4V4RdsEndSha(double, double, double, double, double, double, int, int, double *); +BSIM4v4RdsEndSha(double, double, double, double, double, double, int, int, double *); int -BSIM4V4NumFingerDiff(nf, minSD, nuIntD, nuEndD, nuIntS, nuEndS) +BSIM4v4NumFingerDiff(nf, minSD, nuIntD, nuEndD, nuIntS, nuEndS) int minSD; double nf, *nuIntD, *nuEndD, *nuIntS, *nuEndS; { @@ -52,7 +52,7 @@ return 0; int -BSIM4V4PAeffGeo(nf, geo, minSD, Weffcj, DMCG, DMCI, DMDG, Ps, Pd, As, Ad) +BSIM4v4PAeffGeo(nf, geo, minSD, Weffcj, DMCG, DMCI, DMDG, Ps, Pd, As, Ad) int geo, minSD; double Weffcj, DMCG, DMCI, DMDG; double nf, *Ps, *Pd, *As, *Ad; @@ -63,7 +63,7 @@ double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */ - BSIM4V4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); + BSIM4v4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); T0 = DMCG + DMCI; T1 = DMCG + DMCG; @@ -152,7 +152,7 @@ return 0; int -BSIM4V4RdseffGeo(nf, geo, rgeo, minSD, Weffcj, Rsh, DMCG, DMCI, DMDG, Type, Rtot) +BSIM4v4RdseffGeo(nf, geo, rgeo, minSD, Weffcj, Rsh, DMCG, DMCI, DMDG, Type, Rtot) int geo, rgeo, minSD, Type; double nf, Weffcj, Rsh, DMCG, DMCI, DMDG; double *Rtot; @@ -161,7 +161,7 @@ double Rint=0.0, Rend = 0.0; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */ - { BSIM4V4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); + { BSIM4v4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); /* Internal S/D resistance -- assume shared S or D and all wide contacts */ if (Type == 1) @@ -181,47 +181,47 @@ double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; /* End S/D resistance -- geo dependent */ switch(geo) { case 0: - if (Type == 1) BSIM4V4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, + if (Type == 1) BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); - else BSIM4V4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, + else BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 1: - if (Type == 1) BSIM4V4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, + if (Type == 1) BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); - else BSIM4V4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, + else BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 2: - if (Type == 1) BSIM4V4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, + if (Type == 1) BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); - else BSIM4V4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, + else BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 3: - if (Type == 1) BSIM4V4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, + if (Type == 1) BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); - else BSIM4V4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, + else BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 4: - if (Type == 1) BSIM4V4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, + if (Type == 1) BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / Weffcj; break; case 5: - if (Type == 1) BSIM4V4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, + if (Type == 1) BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / (Weffcj * nuEndD); break; case 6: if (Type == 1) Rend = Rsh * DMDG / Weffcj; - else BSIM4V4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, + else BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 7: if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS); - else BSIM4V4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, + else BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 8: @@ -270,7 +270,7 @@ return 0; int -BSIM4V4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) +BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) double Weffcj, Rsh, DMCG, DMCI, DMDG; int rgeo, Type; double nuEnd, *Rend; @@ -328,7 +328,7 @@ return 0; int -BSIM4V4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) +BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) double Weffcj, Rsh, DMCG, DMCI, DMDG; int rgeo, Type; double nuEnd, *Rend; diff --git a/src/spicelib/devices/bsim4v4/b4v4getic.c b/src/spicelib/devices/bsim4v4/b4v4getic.c index 681711726..a516d034a 100644 --- a/src/spicelib/devices/bsim4v4/b4v4getic.c +++ b/src/spicelib/devices/bsim4v4/b4v4getic.c @@ -16,27 +16,27 @@ int -BSIM4V4getic(inModel,ckt) +BSIM4v4getic(inModel,ckt) GENmodel *inModel; CKTcircuit *ckt; { -BSIM4V4model *model = (BSIM4V4model*)inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model*)inModel; +BSIM4v4instance *here; - for (; model ; model = model->BSIM4V4nextModel) - { for (here = model->BSIM4V4instances; here; here = here->BSIM4V4nextInstance) - { if (here->BSIM4V4owner != ARCHme) continue; - if (!here->BSIM4V4icVDSGiven) - { here->BSIM4V4icVDS = *(ckt->CKTrhs + here->BSIM4V4dNode) - - *(ckt->CKTrhs + here->BSIM4V4sNode); + for (; model ; model = model->BSIM4v4nextModel) + { for (here = model->BSIM4v4instances; here; here = here->BSIM4v4nextInstance) + { if (here->BSIM4v4owner != ARCHme) continue; + if (!here->BSIM4v4icVDSGiven) + { here->BSIM4v4icVDS = *(ckt->CKTrhs + here->BSIM4v4dNode) + - *(ckt->CKTrhs + here->BSIM4v4sNode); } - if (!here->BSIM4V4icVGSGiven) - { here->BSIM4V4icVGS = *(ckt->CKTrhs + here->BSIM4V4gNodeExt) - - *(ckt->CKTrhs + here->BSIM4V4sNode); + if (!here->BSIM4v4icVGSGiven) + { here->BSIM4v4icVGS = *(ckt->CKTrhs + here->BSIM4v4gNodeExt) + - *(ckt->CKTrhs + here->BSIM4v4sNode); } - if(!here->BSIM4V4icVBSGiven) - { here->BSIM4V4icVBS = *(ckt->CKTrhs + here->BSIM4V4bNode) - - *(ckt->CKTrhs + here->BSIM4V4sNode); + if(!here->BSIM4v4icVBSGiven) + { here->BSIM4v4icVBS = *(ckt->CKTrhs + here->BSIM4v4bNode) + - *(ckt->CKTrhs + here->BSIM4v4sNode); } } } diff --git a/src/spicelib/devices/bsim4v4/b4v4ld.c b/src/spicelib/devices/bsim4v4/b4v4ld.c index 98a4ac3a7..226e77537 100644 --- a/src/spicelib/devices/bsim4v4/b4v4ld.c +++ b/src/spicelib/devices/bsim4v4/b4v4ld.c @@ -48,15 +48,15 @@ } \ } -int BSIM4V4polyDepletion(double phi, double ngate,double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg); +int BSIM4v4polyDepletion(double phi, double ngate,double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg); int -BSIM4V4load(inModel,ckt) +BSIM4v4load(inModel,ckt) GENmodel *inModel; CKTcircuit *ckt; { -BSIM4V4model *model = (BSIM4V4model*)inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model*)inModel; +BSIM4v4instance *here; double ceqgstot, dgstot_dvd, dgstot_dvg, dgstot_dvs, dgstot_dvb; double ceqgdtot, dgdtot_dvd, dgdtot_dvg, dgdtot_dvs, dgdtot_dvb; @@ -201,44 +201,44 @@ ChargeComputationNeeded = ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; -for (; model != NULL; model = model->BSIM4V4nextModel) -{ for (here = model->BSIM4V4instances; here != NULL; - here = here->BSIM4V4nextInstance) - { if (here->BSIM4V4owner != ARCHme) continue; +for (; model != NULL; model = model->BSIM4v4nextModel) +{ for (here = model->BSIM4v4instances; here != NULL; + here = here->BSIM4v4nextInstance) + { if (here->BSIM4v4owner != ARCHme) continue; Check = Check1 = Check2 = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) - { vds = *(ckt->CKTstate0 + here->BSIM4V4vds); - vgs = *(ckt->CKTstate0 + here->BSIM4V4vgs); - vbs = *(ckt->CKTstate0 + here->BSIM4V4vbs); - vges = *(ckt->CKTstate0 + here->BSIM4V4vges); - vgms = *(ckt->CKTstate0 + here->BSIM4V4vgms); - vdbs = *(ckt->CKTstate0 + here->BSIM4V4vdbs); - vsbs = *(ckt->CKTstate0 + here->BSIM4V4vsbs); - vses = *(ckt->CKTstate0 + here->BSIM4V4vses); - vdes = *(ckt->CKTstate0 + here->BSIM4V4vdes); - - qdef = *(ckt->CKTstate0 + here->BSIM4V4qdef); + { vds = *(ckt->CKTstate0 + here->BSIM4v4vds); + vgs = *(ckt->CKTstate0 + here->BSIM4v4vgs); + vbs = *(ckt->CKTstate0 + here->BSIM4v4vbs); + vges = *(ckt->CKTstate0 + here->BSIM4v4vges); + vgms = *(ckt->CKTstate0 + here->BSIM4v4vgms); + vdbs = *(ckt->CKTstate0 + here->BSIM4v4vdbs); + vsbs = *(ckt->CKTstate0 + here->BSIM4v4vsbs); + vses = *(ckt->CKTstate0 + here->BSIM4v4vses); + vdes = *(ckt->CKTstate0 + here->BSIM4v4vdes); + + qdef = *(ckt->CKTstate0 + here->BSIM4v4qdef); } else if ((ckt->CKTmode & MODEINITTRAN)) - { vds = *(ckt->CKTstate1 + here->BSIM4V4vds); - vgs = *(ckt->CKTstate1 + here->BSIM4V4vgs); - vbs = *(ckt->CKTstate1 + here->BSIM4V4vbs); - vges = *(ckt->CKTstate1 + here->BSIM4V4vges); - vgms = *(ckt->CKTstate1 + here->BSIM4V4vgms); - vdbs = *(ckt->CKTstate1 + here->BSIM4V4vdbs); - vsbs = *(ckt->CKTstate1 + here->BSIM4V4vsbs); - vses = *(ckt->CKTstate1 + here->BSIM4V4vses); - vdes = *(ckt->CKTstate1 + here->BSIM4V4vdes); - - qdef = *(ckt->CKTstate1 + here->BSIM4V4qdef); + { vds = *(ckt->CKTstate1 + here->BSIM4v4vds); + vgs = *(ckt->CKTstate1 + here->BSIM4v4vgs); + vbs = *(ckt->CKTstate1 + here->BSIM4v4vbs); + vges = *(ckt->CKTstate1 + here->BSIM4v4vges); + vgms = *(ckt->CKTstate1 + here->BSIM4v4vgms); + vdbs = *(ckt->CKTstate1 + here->BSIM4v4vdbs); + vsbs = *(ckt->CKTstate1 + here->BSIM4v4vsbs); + vses = *(ckt->CKTstate1 + here->BSIM4v4vses); + vdes = *(ckt->CKTstate1 + here->BSIM4v4vdes); + + qdef = *(ckt->CKTstate1 + here->BSIM4v4qdef); } - else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM4V4off) - { vds = model->BSIM4V4type * here->BSIM4V4icVDS; - vgs = vges = vgms = model->BSIM4V4type * here->BSIM4V4icVGS; - vbs = vdbs = vsbs = model->BSIM4V4type * here->BSIM4V4icVBS; + else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM4v4off) + { vds = model->BSIM4v4type * here->BSIM4v4icVDS; + vgs = vges = vgms = model->BSIM4v4type * here->BSIM4v4icVGS; + vbs = vdbs = vsbs = model->BSIM4v4type * here->BSIM4v4icVBS; if (vds > 0.0) { vdes = vds + 0.01; vses = -0.01; @@ -258,13 +258,13 @@ for (; model != NULL; model = model->BSIM4V4nextModel) { vds = 0.1; vdes = 0.11; vses = -0.01; - vgs = vges = vgms = model->BSIM4V4type - * here->BSIM4V4vth0 + 0.1; + vgs = vges = vgms = model->BSIM4v4type + * here->BSIM4v4vth0 + 0.1; vbs = vdbs = vsbs = 0.0; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && - (here->BSIM4V4off)) + (here->BSIM4v4off)) { vds = vgs = vbs = vges = vgms = 0.0; vdbs = vsbs = vdes = vses = qdef = 0.0; } @@ -273,96 +273,96 @@ for (; model != NULL; model = model->BSIM4V4nextModel) #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; - *(ckt->CKTstate0 + here->BSIM4V4vds) = - *(ckt->CKTstate1 + here->BSIM4V4vds); - vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vds)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vds))); - *(ckt->CKTstate0 + here->BSIM4V4vgs) = - *(ckt->CKTstate1 + here->BSIM4V4vgs); - vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vgs)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vgs))); - *(ckt->CKTstate0 + here->BSIM4V4vges) = - *(ckt->CKTstate1 + here->BSIM4V4vges); - vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vges)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vges))); - *(ckt->CKTstate0 + here->BSIM4V4vgms) = - *(ckt->CKTstate1 + here->BSIM4V4vgms); - vgms = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vgms)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vgms))); - *(ckt->CKTstate0 + here->BSIM4V4vbs) = - *(ckt->CKTstate1 + here->BSIM4V4vbs); - vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vbs)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vbs))); - *(ckt->CKTstate0 + here->BSIM4V4vbd) = - *(ckt->CKTstate0 + here->BSIM4V4vbs) - - *(ckt->CKTstate0 + here->BSIM4V4vds); - *(ckt->CKTstate0 + here->BSIM4V4vdbs) = - *(ckt->CKTstate1 + here->BSIM4V4vdbs); - vdbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vdbs)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vdbs))); - *(ckt->CKTstate0 + here->BSIM4V4vdbd) = - *(ckt->CKTstate0 + here->BSIM4V4vdbs) - - *(ckt->CKTstate0 + here->BSIM4V4vds); - *(ckt->CKTstate0 + here->BSIM4V4vsbs) = - *(ckt->CKTstate1 + here->BSIM4V4vsbs); - vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vsbs)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vsbs))); - *(ckt->CKTstate0 + here->BSIM4V4vses) = - *(ckt->CKTstate1 + here->BSIM4V4vses); - vses = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vses)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vses))); - *(ckt->CKTstate0 + here->BSIM4V4vdes) = - *(ckt->CKTstate1 + here->BSIM4V4vdes); - vdes = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4vdes)) - - (xfact * (*(ckt->CKTstate2 + here->BSIM4V4vdes))); - - *(ckt->CKTstate0 + here->BSIM4V4qdef) = - *(ckt->CKTstate1 + here->BSIM4V4qdef); - qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4V4qdef)) - -(xfact * (*(ckt->CKTstate2 + here->BSIM4V4qdef))); + *(ckt->CKTstate0 + here->BSIM4v4vds) = + *(ckt->CKTstate1 + here->BSIM4v4vds); + vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vds)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vds))); + *(ckt->CKTstate0 + here->BSIM4v4vgs) = + *(ckt->CKTstate1 + here->BSIM4v4vgs); + vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vgs)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vgs))); + *(ckt->CKTstate0 + here->BSIM4v4vges) = + *(ckt->CKTstate1 + here->BSIM4v4vges); + vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vges)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vges))); + *(ckt->CKTstate0 + here->BSIM4v4vgms) = + *(ckt->CKTstate1 + here->BSIM4v4vgms); + vgms = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vgms)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vgms))); + *(ckt->CKTstate0 + here->BSIM4v4vbs) = + *(ckt->CKTstate1 + here->BSIM4v4vbs); + vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vbs)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vbs))); + *(ckt->CKTstate0 + here->BSIM4v4vbd) = + *(ckt->CKTstate0 + here->BSIM4v4vbs) + - *(ckt->CKTstate0 + here->BSIM4v4vds); + *(ckt->CKTstate0 + here->BSIM4v4vdbs) = + *(ckt->CKTstate1 + here->BSIM4v4vdbs); + vdbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vdbs)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vdbs))); + *(ckt->CKTstate0 + here->BSIM4v4vdbd) = + *(ckt->CKTstate0 + here->BSIM4v4vdbs) + - *(ckt->CKTstate0 + here->BSIM4v4vds); + *(ckt->CKTstate0 + here->BSIM4v4vsbs) = + *(ckt->CKTstate1 + here->BSIM4v4vsbs); + vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vsbs)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vsbs))); + *(ckt->CKTstate0 + here->BSIM4v4vses) = + *(ckt->CKTstate1 + here->BSIM4v4vses); + vses = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vses)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vses))); + *(ckt->CKTstate0 + here->BSIM4v4vdes) = + *(ckt->CKTstate1 + here->BSIM4v4vdes); + vdes = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vdes)) + - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vdes))); + + *(ckt->CKTstate0 + here->BSIM4v4qdef) = + *(ckt->CKTstate1 + here->BSIM4v4qdef); + qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4qdef)) + -(xfact * (*(ckt->CKTstate2 + here->BSIM4v4qdef))); } else { #endif /* PREDICTOR */ - vds = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4dNodePrime) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vgs = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4gNodePrime) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vbs = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4bNodePrime) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vges = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4gNodeExt) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vgms = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4gNodeMid) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vdbs = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4dbNode) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vsbs = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4sbNode) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vses = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4sNode) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - vdes = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4dNode) - - *(ckt->CKTrhsOld + here->BSIM4V4sNodePrime)); - qdef = model->BSIM4V4type - * (*(ckt->CKTrhsOld + here->BSIM4V4qNode)); + vds = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4dNodePrime) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vgs = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4gNodePrime) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vbs = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4bNodePrime) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vges = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4gNodeExt) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vgms = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4gNodeMid) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vdbs = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4dbNode) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vsbs = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4sbNode) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vses = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4sNode) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + vdes = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4dNode) + - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); + qdef = model->BSIM4v4type + * (*(ckt->CKTrhsOld + here->BSIM4v4qNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ - vgdo = *(ckt->CKTstate0 + here->BSIM4V4vgs) - - *(ckt->CKTstate0 + here->BSIM4V4vds); - vgedo = *(ckt->CKTstate0 + here->BSIM4V4vges) - - *(ckt->CKTstate0 + here->BSIM4V4vds); - vgmdo = *(ckt->CKTstate0 + here->BSIM4V4vgms) - - *(ckt->CKTstate0 + here->BSIM4V4vds); + vgdo = *(ckt->CKTstate0 + here->BSIM4v4vgs) + - *(ckt->CKTstate0 + here->BSIM4v4vds); + vgedo = *(ckt->CKTstate0 + here->BSIM4v4vges) + - *(ckt->CKTstate0 + here->BSIM4v4vds); + vgmdo = *(ckt->CKTstate0 + here->BSIM4v4vgms) + - *(ckt->CKTstate0 + here->BSIM4v4vds); vbd = vbs - vds; vdbd = vdbs - vds; @@ -370,91 +370,91 @@ for (; model != NULL; model = model->BSIM4V4nextModel) vged = vges - vds; vgmd = vgms - vds; - delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4V4vbd); - delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4V4vdbd); + delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v4vbd); + delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v4vdbd); delvgd = vgd - vgdo; delvged = vged - vgedo; delvgmd = vgmd - vgmdo; - delvds = vds - *(ckt->CKTstate0 + here->BSIM4V4vds); - delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4V4vgs); - delvges = vges - *(ckt->CKTstate0 + here->BSIM4V4vges); - delvgms = vgms - *(ckt->CKTstate0 + here->BSIM4V4vgms); - delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4V4vbs); - delvdbs = vdbs - *(ckt->CKTstate0 + here->BSIM4V4vdbs); - delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4V4vsbs); - - delvses = vses - (*(ckt->CKTstate0 + here->BSIM4V4vses)); - vdedo = *(ckt->CKTstate0 + here->BSIM4V4vdes) - - *(ckt->CKTstate0 + here->BSIM4V4vds); - delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4V4vdes); + delvds = vds - *(ckt->CKTstate0 + here->BSIM4v4vds); + delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v4vgs); + delvges = vges - *(ckt->CKTstate0 + here->BSIM4v4vges); + delvgms = vgms - *(ckt->CKTstate0 + here->BSIM4v4vgms); + delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v4vbs); + delvdbs = vdbs - *(ckt->CKTstate0 + here->BSIM4v4vdbs); + delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v4vsbs); + + delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v4vses)); + vdedo = *(ckt->CKTstate0 + here->BSIM4v4vdes) + - *(ckt->CKTstate0 + here->BSIM4v4vds); + delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v4vdes); delvded = vdes - vds - vdedo; - delvbd_jct = (!here->BSIM4V4rbodyMod) ? delvbd : delvdbd; - delvbs_jct = (!here->BSIM4V4rbodyMod) ? delvbs : delvsbs; - if (here->BSIM4V4mode >= 0) - { Idtot = here->BSIM4V4cd + here->BSIM4V4csub - here->BSIM4V4cbd - + here->BSIM4V4Igidl; - cdhat = Idtot - here->BSIM4V4gbd * delvbd_jct - + (here->BSIM4V4gmbs + here->BSIM4V4gbbs + here->BSIM4V4ggidlb) * delvbs - + (here->BSIM4V4gm + here->BSIM4V4gbgs + here->BSIM4V4ggidlg) * delvgs - + (here->BSIM4V4gds + here->BSIM4V4gbds + here->BSIM4V4ggidld) * delvds; - Ibtot = here->BSIM4V4cbs + here->BSIM4V4cbd - - here->BSIM4V4Igidl - here->BSIM4V4Igisl - here->BSIM4V4csub; - cbhat = Ibtot + here->BSIM4V4gbd * delvbd_jct - + here->BSIM4V4gbs * delvbs_jct - (here->BSIM4V4gbbs + here->BSIM4V4ggidlb) - * delvbs - (here->BSIM4V4gbgs + here->BSIM4V4ggidlg) * delvgs - - (here->BSIM4V4gbds + here->BSIM4V4ggidld - here->BSIM4V4ggisls) * delvds - - here->BSIM4V4ggislg * delvgd - here->BSIM4V4ggislb* delvbd; - - Igstot = here->BSIM4V4Igs + here->BSIM4V4Igcs; - cgshat = Igstot + (here->BSIM4V4gIgsg + here->BSIM4V4gIgcsg) * delvgs - + here->BSIM4V4gIgcsd * delvds + here->BSIM4V4gIgcsb * delvbs; - - Igdtot = here->BSIM4V4Igd + here->BSIM4V4Igcd; - cgdhat = Igdtot + here->BSIM4V4gIgdg * delvgd + here->BSIM4V4gIgcdg * delvgs - + here->BSIM4V4gIgcdd * delvds + here->BSIM4V4gIgcdb * delvbs; - - Igbtot = here->BSIM4V4Igb; - cgbhat = here->BSIM4V4Igb + here->BSIM4V4gIgbg * delvgs + here->BSIM4V4gIgbd - * delvds + here->BSIM4V4gIgbb * delvbs; + delvbd_jct = (!here->BSIM4v4rbodyMod) ? delvbd : delvdbd; + delvbs_jct = (!here->BSIM4v4rbodyMod) ? delvbs : delvsbs; + if (here->BSIM4v4mode >= 0) + { Idtot = here->BSIM4v4cd + here->BSIM4v4csub - here->BSIM4v4cbd + + here->BSIM4v4Igidl; + cdhat = Idtot - here->BSIM4v4gbd * delvbd_jct + + (here->BSIM4v4gmbs + here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * delvbs + + (here->BSIM4v4gm + here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs + + (here->BSIM4v4gds + here->BSIM4v4gbds + here->BSIM4v4ggidld) * delvds; + Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd + - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; + cbhat = Ibtot + here->BSIM4v4gbd * delvbd_jct + + here->BSIM4v4gbs * delvbs_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggidlb) + * delvbs - (here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs + - (here->BSIM4v4gbds + here->BSIM4v4ggidld - here->BSIM4v4ggisls) * delvds + - here->BSIM4v4ggislg * delvgd - here->BSIM4v4ggislb* delvbd; + + Igstot = here->BSIM4v4Igs + here->BSIM4v4Igcs; + cgshat = Igstot + (here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg) * delvgs + + here->BSIM4v4gIgcsd * delvds + here->BSIM4v4gIgcsb * delvbs; + + Igdtot = here->BSIM4v4Igd + here->BSIM4v4Igcd; + cgdhat = Igdtot + here->BSIM4v4gIgdg * delvgd + here->BSIM4v4gIgcdg * delvgs + + here->BSIM4v4gIgcdd * delvds + here->BSIM4v4gIgcdb * delvbs; + + Igbtot = here->BSIM4v4Igb; + cgbhat = here->BSIM4v4Igb + here->BSIM4v4gIgbg * delvgs + here->BSIM4v4gIgbd + * delvds + here->BSIM4v4gIgbb * delvbs; } else - { Idtot = here->BSIM4V4cd + here->BSIM4V4cbd - here->BSIM4V4Igidl; /* bugfix */ - cdhat = Idtot + here->BSIM4V4gbd * delvbd_jct + here->BSIM4V4gmbs - * delvbd + here->BSIM4V4gm * delvgd - - (here->BSIM4V4gds + here->BSIM4V4ggidls) * delvds - - here->BSIM4V4ggidlg * delvgs - here->BSIM4V4ggidlb * delvbs; - Ibtot = here->BSIM4V4cbs + here->BSIM4V4cbd - - here->BSIM4V4Igidl - here->BSIM4V4Igisl - here->BSIM4V4csub; - cbhat = Ibtot + here->BSIM4V4gbs * delvbs_jct + here->BSIM4V4gbd - * delvbd_jct - (here->BSIM4V4gbbs + here->BSIM4V4ggislb) * delvbd - - (here->BSIM4V4gbgs + here->BSIM4V4ggislg) * delvgd - + (here->BSIM4V4gbds + here->BSIM4V4ggisld - here->BSIM4V4ggidls) * delvds - - here->BSIM4V4ggidlg * delvgs - here->BSIM4V4ggidlb * delvbs; - - Igstot = here->BSIM4V4Igs + here->BSIM4V4Igcd; - cgshat = Igstot + here->BSIM4V4gIgsg * delvgs + here->BSIM4V4gIgcdg * delvgd - - here->BSIM4V4gIgcdd * delvds + here->BSIM4V4gIgcdb * delvbd; - - Igdtot = here->BSIM4V4Igd + here->BSIM4V4Igcs; - cgdhat = Igdtot + (here->BSIM4V4gIgdg + here->BSIM4V4gIgcsg) * delvgd - - here->BSIM4V4gIgcsd * delvds + here->BSIM4V4gIgcsb * delvbd; - - Igbtot = here->BSIM4V4Igb; - cgbhat = here->BSIM4V4Igb + here->BSIM4V4gIgbg * delvgd - here->BSIM4V4gIgbd - * delvds + here->BSIM4V4gIgbb * delvbd; + { Idtot = here->BSIM4v4cd + here->BSIM4v4cbd - here->BSIM4v4Igidl; /* bugfix */ + cdhat = Idtot + here->BSIM4v4gbd * delvbd_jct + here->BSIM4v4gmbs + * delvbd + here->BSIM4v4gm * delvgd + - (here->BSIM4v4gds + here->BSIM4v4ggidls) * delvds + - here->BSIM4v4ggidlg * delvgs - here->BSIM4v4ggidlb * delvbs; + Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd + - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; + cbhat = Ibtot + here->BSIM4v4gbs * delvbs_jct + here->BSIM4v4gbd + * delvbd_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggislb) * delvbd + - (here->BSIM4v4gbgs + here->BSIM4v4ggislg) * delvgd + + (here->BSIM4v4gbds + here->BSIM4v4ggisld - here->BSIM4v4ggidls) * delvds + - here->BSIM4v4ggidlg * delvgs - here->BSIM4v4ggidlb * delvbs; + + Igstot = here->BSIM4v4Igs + here->BSIM4v4Igcd; + cgshat = Igstot + here->BSIM4v4gIgsg * delvgs + here->BSIM4v4gIgcdg * delvgd + - here->BSIM4v4gIgcdd * delvds + here->BSIM4v4gIgcdb * delvbd; + + Igdtot = here->BSIM4v4Igd + here->BSIM4v4Igcs; + cgdhat = Igdtot + (here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg) * delvgd + - here->BSIM4v4gIgcsd * delvds + here->BSIM4v4gIgcsb * delvbd; + + Igbtot = here->BSIM4v4Igb; + cgbhat = here->BSIM4v4Igb + here->BSIM4v4gIgbg * delvgd - here->BSIM4v4gIgbd + * delvds + here->BSIM4v4gIgbb * delvbd; } - Isestot = here->BSIM4V4gstot * (*(ckt->CKTstate0 + here->BSIM4V4vses)); - cseshat = Isestot + here->BSIM4V4gstot * delvses - + here->BSIM4V4gstotd * delvds + here->BSIM4V4gstotg * delvgs - + here->BSIM4V4gstotb * delvbs; + Isestot = here->BSIM4v4gstot * (*(ckt->CKTstate0 + here->BSIM4v4vses)); + cseshat = Isestot + here->BSIM4v4gstot * delvses + + here->BSIM4v4gstotd * delvds + here->BSIM4v4gstotg * delvgs + + here->BSIM4v4gstotb * delvbs; - Idedtot = here->BSIM4V4gdtot * vdedo; - cdedhat = Idedtot + here->BSIM4V4gdtot * delvded - + here->BSIM4V4gdtotd * delvds + here->BSIM4V4gdtotg * delvgs - + here->BSIM4V4gdtotb * delvbs; + Idedtot = here->BSIM4v4gdtot * vdedo; + cdedhat = Idedtot + here->BSIM4v4gdtot * delvded + + here->BSIM4v4gdtotd * delvds + here->BSIM4v4gdtotg * delvgs + + here->BSIM4v4gdtotb * delvbs; #ifndef NOBYPASS @@ -464,60 +464,60 @@ for (; model != NULL; model = model->BSIM4V4nextModel) if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), - fabs(*(ckt->CKTstate0 + here->BSIM4V4vds))) + ckt->CKTvoltTol))) + fabs(*(ckt->CKTstate0 + here->BSIM4v4vds))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), - fabs(*(ckt->CKTstate0 + here->BSIM4V4vgs))) + ckt->CKTvoltTol))) + fabs(*(ckt->CKTstate0 + here->BSIM4v4vgs))) + ckt->CKTvoltTol))) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), - fabs(*(ckt->CKTstate0 + here->BSIM4V4vbs))) + ckt->CKTvoltTol))) + fabs(*(ckt->CKTstate0 + here->BSIM4v4vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), - fabs(*(ckt->CKTstate0 + here->BSIM4V4vbd))) + ckt->CKTvoltTol))) - if ((here->BSIM4V4rgateMod == 0) || (here->BSIM4V4rgateMod == 1) + fabs(*(ckt->CKTstate0 + here->BSIM4v4vbd))) + ckt->CKTvoltTol))) + if ((here->BSIM4v4rgateMod == 0) || (here->BSIM4v4rgateMod == 1) || (fabs(delvges) < (ckt->CKTreltol * MAX(fabs(vges), - fabs(*(ckt->CKTstate0 + here->BSIM4V4vges))) + ckt->CKTvoltTol))) - if ((here->BSIM4V4rgateMod != 3) || (fabs(delvgms) < (ckt->CKTreltol - * MAX(fabs(vgms), fabs(*(ckt->CKTstate0 + here->BSIM4V4vgms))) + fabs(*(ckt->CKTstate0 + here->BSIM4v4vges))) + ckt->CKTvoltTol))) + if ((here->BSIM4v4rgateMod != 3) || (fabs(delvgms) < (ckt->CKTreltol + * MAX(fabs(vgms), fabs(*(ckt->CKTstate0 + here->BSIM4v4vgms))) + ckt->CKTvoltTol))) - if ((!here->BSIM4V4rbodyMod) || (fabs(delvdbs) < (ckt->CKTreltol - * MAX(fabs(vdbs), fabs(*(ckt->CKTstate0 + here->BSIM4V4vdbs))) + if ((!here->BSIM4v4rbodyMod) || (fabs(delvdbs) < (ckt->CKTreltol + * MAX(fabs(vdbs), fabs(*(ckt->CKTstate0 + here->BSIM4v4vdbs))) + ckt->CKTvoltTol))) - if ((!here->BSIM4V4rbodyMod) || (fabs(delvdbd) < (ckt->CKTreltol - * MAX(fabs(vdbd), fabs(*(ckt->CKTstate0 + here->BSIM4V4vdbd))) + if ((!here->BSIM4v4rbodyMod) || (fabs(delvdbd) < (ckt->CKTreltol + * MAX(fabs(vdbd), fabs(*(ckt->CKTstate0 + here->BSIM4v4vdbd))) + ckt->CKTvoltTol))) - if ((!here->BSIM4V4rbodyMod) || (fabs(delvsbs) < (ckt->CKTreltol - * MAX(fabs(vsbs), fabs(*(ckt->CKTstate0 + here->BSIM4V4vsbs))) + if ((!here->BSIM4v4rbodyMod) || (fabs(delvsbs) < (ckt->CKTreltol + * MAX(fabs(vsbs), fabs(*(ckt->CKTstate0 + here->BSIM4v4vsbs))) + ckt->CKTvoltTol))) - if ((!model->BSIM4V4rdsMod) || (fabs(delvses) < (ckt->CKTreltol - * MAX(fabs(vses), fabs(*(ckt->CKTstate0 + here->BSIM4V4vses))) + if ((!model->BSIM4v4rdsMod) || (fabs(delvses) < (ckt->CKTreltol + * MAX(fabs(vses), fabs(*(ckt->CKTstate0 + here->BSIM4v4vses))) + ckt->CKTvoltTol))) - if ((!model->BSIM4V4rdsMod) || (fabs(delvdes) < (ckt->CKTreltol - * MAX(fabs(vdes), fabs(*(ckt->CKTstate0 + here->BSIM4V4vdes))) + if ((!model->BSIM4v4rdsMod) || (fabs(delvdes) < (ckt->CKTreltol + * MAX(fabs(vdes), fabs(*(ckt->CKTstate0 + here->BSIM4v4vdes))) + ckt->CKTvoltTol))) if ((fabs(cdhat - Idtot) < ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol)) if ((fabs(cbhat - Ibtot) < ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol)) - if ((!model->BSIM4V4igcMod) || ((fabs(cgshat - Igstot) < ckt->CKTreltol + if ((!model->BSIM4v4igcMod) || ((fabs(cgshat - Igstot) < ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol))) - if ((!model->BSIM4V4igcMod) || ((fabs(cgdhat - Igdtot) < ckt->CKTreltol + if ((!model->BSIM4v4igcMod) || ((fabs(cgdhat - Igdtot) < ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol))) - if ((!model->BSIM4V4igbMod) || ((fabs(cgbhat - Igbtot) < ckt->CKTreltol + if ((!model->BSIM4v4igbMod) || ((fabs(cgbhat - Igbtot) < ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol))) - if ((!model->BSIM4V4rdsMod) || ((fabs(cseshat - Isestot) < ckt->CKTreltol + if ((!model->BSIM4v4rdsMod) || ((fabs(cseshat - Isestot) < ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol))) - if ((!model->BSIM4V4rdsMod) || ((fabs(cdedhat - Idedtot) < ckt->CKTreltol + if ((!model->BSIM4v4rdsMod) || ((fabs(cdedhat - Idedtot) < ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol))) - { vds = *(ckt->CKTstate0 + here->BSIM4V4vds); - vgs = *(ckt->CKTstate0 + here->BSIM4V4vgs); - vbs = *(ckt->CKTstate0 + here->BSIM4V4vbs); - vges = *(ckt->CKTstate0 + here->BSIM4V4vges); - vgms = *(ckt->CKTstate0 + here->BSIM4V4vgms); - - vbd = *(ckt->CKTstate0 + here->BSIM4V4vbd); - vdbs = *(ckt->CKTstate0 + here->BSIM4V4vdbs); - vdbd = *(ckt->CKTstate0 + here->BSIM4V4vdbd); - vsbs = *(ckt->CKTstate0 + here->BSIM4V4vsbs); - vses = *(ckt->CKTstate0 + here->BSIM4V4vses); - vdes = *(ckt->CKTstate0 + here->BSIM4V4vdes); + { vds = *(ckt->CKTstate0 + here->BSIM4v4vds); + vgs = *(ckt->CKTstate0 + here->BSIM4v4vgs); + vbs = *(ckt->CKTstate0 + here->BSIM4v4vbs); + vges = *(ckt->CKTstate0 + here->BSIM4v4vges); + vgms = *(ckt->CKTstate0 + here->BSIM4v4vgms); + + vbd = *(ckt->CKTstate0 + here->BSIM4v4vbd); + vdbs = *(ckt->CKTstate0 + here->BSIM4v4vdbs); + vdbd = *(ckt->CKTstate0 + here->BSIM4v4vdbd); + vsbs = *(ckt->CKTstate0 + here->BSIM4v4vsbs); + vses = *(ckt->CKTstate0 + here->BSIM4v4vses); + vdes = *(ckt->CKTstate0 + here->BSIM4v4vdes); vgd = vgs - vds; vgb = vgs - vbs; @@ -525,26 +525,26 @@ for (; model != NULL; model = model->BSIM4V4nextModel) vgmd = vgms - vds; vgmb = vgms - vbs; - vbs_jct = (!here->BSIM4V4rbodyMod) ? vbs : vsbs; - vbd_jct = (!here->BSIM4V4rbodyMod) ? vbd : vdbd; + vbs_jct = (!here->BSIM4v4rbodyMod) ? vbs : vsbs; + vbd_jct = (!here->BSIM4v4rbodyMod) ? vbd : vdbd; /*** qdef should not be kept fixed even if vgs, vds & vbs has converged -**** qdef = *(ckt->CKTstate0 + here->BSIM4V4qdef); +**** qdef = *(ckt->CKTstate0 + here->BSIM4v4qdef); ***/ - cdrain = here->BSIM4V4cd; + cdrain = here->BSIM4v4cd; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; - qgate = here->BSIM4V4qgate; - qbulk = here->BSIM4V4qbulk; - qdrn = here->BSIM4V4qdrn; - cgdo = here->BSIM4V4cgdo; - qgdo = here->BSIM4V4qgdo; - cgso = here->BSIM4V4cgso; - qgso = here->BSIM4V4qgso; + qgate = here->BSIM4v4qgate; + qbulk = here->BSIM4v4qbulk; + qdrn = here->BSIM4v4qdrn; + cgdo = here->BSIM4v4cgdo; + qgdo = here->BSIM4v4qgdo; + cgso = here->BSIM4v4cgso; + qgso = here->BSIM4v4qgso; goto line755; } @@ -553,62 +553,62 @@ for (; model != NULL; model = model->BSIM4V4nextModel) } #endif /*NOBYPASS*/ - von = here->BSIM4V4von; - if (*(ckt->CKTstate0 + here->BSIM4V4vds) >= 0.0) - { vgs = DEVfetlim(vgs, *(ckt->CKTstate0 + here->BSIM4V4vgs), von); + von = here->BSIM4v4von; + if (*(ckt->CKTstate0 + here->BSIM4v4vds) >= 0.0) + { vgs = DEVfetlim(vgs, *(ckt->CKTstate0 + here->BSIM4v4vgs), von); vds = vgs - vgd; - vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM4V4vds)); + vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM4v4vds)); vgd = vgs - vds; - if (here->BSIM4V4rgateMod == 3) - { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4V4vges), von); - vgms = DEVfetlim(vgms, *(ckt->CKTstate0 + here->BSIM4V4vgms), von); + if (here->BSIM4v4rgateMod == 3) + { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4v4vges), von); + vgms = DEVfetlim(vgms, *(ckt->CKTstate0 + here->BSIM4v4vgms), von); vged = vges - vds; vgmd = vgms - vds; } - else if ((here->BSIM4V4rgateMod == 1) || (here->BSIM4V4rgateMod == 2)) - { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4V4vges), von); + else if ((here->BSIM4v4rgateMod == 1) || (here->BSIM4v4rgateMod == 2)) + { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4v4vges), von); vged = vges - vds; } - if (model->BSIM4V4rdsMod) - { vdes = DEVlimvds(vdes, *(ckt->CKTstate0 + here->BSIM4V4vdes)); - vses = -DEVlimvds(-vses, -(*(ckt->CKTstate0 + here->BSIM4V4vses))); + if (model->BSIM4v4rdsMod) + { vdes = DEVlimvds(vdes, *(ckt->CKTstate0 + here->BSIM4v4vdes)); + vses = -DEVlimvds(-vses, -(*(ckt->CKTstate0 + here->BSIM4v4vses))); } } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; - vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0 + here->BSIM4V4vds))); + vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0 + here->BSIM4v4vds))); vgs = vgd + vds; - if (here->BSIM4V4rgateMod == 3) + if (here->BSIM4v4rgateMod == 3) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; vgmd = DEVfetlim(vgmd, vgmdo, von); vgms = vgmd + vds; } - if ((here->BSIM4V4rgateMod == 1) || (here->BSIM4V4rgateMod == 2)) + if ((here->BSIM4v4rgateMod == 1) || (here->BSIM4v4rgateMod == 2)) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; } - if (model->BSIM4V4rdsMod) - { vdes = -DEVlimvds(-vdes, -(*(ckt->CKTstate0 + here->BSIM4V4vdes))); - vses = DEVlimvds(vses, *(ckt->CKTstate0 + here->BSIM4V4vses)); + if (model->BSIM4v4rdsMod) + { vdes = -DEVlimvds(-vdes, -(*(ckt->CKTstate0 + here->BSIM4v4vdes))); + vses = DEVlimvds(vses, *(ckt->CKTstate0 + here->BSIM4v4vses)); } } if (vds >= 0.0) - { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM4V4vbs), - CONSTvt0, model->BSIM4V4vcrit, &Check); + { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM4v4vbs), + CONSTvt0, model->BSIM4v4vcrit, &Check); vbd = vbs - vds; - if (here->BSIM4V4rbodyMod) - { vdbs = DEVpnjlim(vdbs, *(ckt->CKTstate0 + here->BSIM4V4vdbs), - CONSTvt0, model->BSIM4V4vcrit, &Check1); + if (here->BSIM4v4rbodyMod) + { vdbs = DEVpnjlim(vdbs, *(ckt->CKTstate0 + here->BSIM4v4vdbs), + CONSTvt0, model->BSIM4v4vcrit, &Check1); vdbd = vdbs - vds; - vsbs = DEVpnjlim(vsbs, *(ckt->CKTstate0 + here->BSIM4V4vsbs), - CONSTvt0, model->BSIM4V4vcrit, &Check2); + vsbs = DEVpnjlim(vsbs, *(ckt->CKTstate0 + here->BSIM4v4vsbs), + CONSTvt0, model->BSIM4v4vcrit, &Check2); if ((Check1 == 0) && (Check2 == 0)) Check = 0; else @@ -616,17 +616,17 @@ for (; model != NULL; model = model->BSIM4V4nextModel) } } else - { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM4V4vbd), - CONSTvt0, model->BSIM4V4vcrit, &Check); + { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM4v4vbd), + CONSTvt0, model->BSIM4v4vcrit, &Check); vbs = vbd + vds; - if (here->BSIM4V4rbodyMod) - { vdbd = DEVpnjlim(vdbd, *(ckt->CKTstate0 + here->BSIM4V4vdbd), - CONSTvt0, model->BSIM4V4vcrit, &Check1); + if (here->BSIM4v4rbodyMod) + { vdbd = DEVpnjlim(vdbd, *(ckt->CKTstate0 + here->BSIM4v4vdbd), + CONSTvt0, model->BSIM4v4vcrit, &Check1); vdbs = vdbd + vds; - vsbdo = *(ckt->CKTstate0 + here->BSIM4V4vsbs) - - *(ckt->CKTstate0 + here->BSIM4V4vds); + vsbdo = *(ckt->CKTstate0 + here->BSIM4v4vsbs) + - *(ckt->CKTstate0 + here->BSIM4v4vds); vsbd = vsbs - vds; - vsbd = DEVpnjlim(vsbd, vsbdo, CONSTvt0, model->BSIM4V4vcrit, &Check2); + vsbd = DEVpnjlim(vsbd, vsbdo, CONSTvt0, model->BSIM4v4vcrit, &Check2); vsbs = vsbd + vds; if ((Check1 == 0) && (Check2 == 0)) Check = 0; @@ -645,57 +645,57 @@ for (; model != NULL; model = model->BSIM4V4nextModel) vgmb = vgms - vbs; vdbd = vdbs - vds; - vbs_jct = (!here->BSIM4V4rbodyMod) ? vbs : vsbs; - vbd_jct = (!here->BSIM4V4rbodyMod) ? vbd : vdbd; + vbs_jct = (!here->BSIM4v4rbodyMod) ? vbs : vsbs; + vbd_jct = (!here->BSIM4v4rbodyMod) ? vbd : vdbd; /* Source/drain junction diode DC model begins */ - Nvtms = model->BSIM4V4vtm * model->BSIM4V4SjctEmissionCoeff; - if ((here->BSIM4V4Aseff <= 0.0) && (here->BSIM4V4Pseff <= 0.0)) + Nvtms = model->BSIM4v4vtm * model->BSIM4v4SjctEmissionCoeff; + if ((here->BSIM4v4Aseff <= 0.0) && (here->BSIM4v4Pseff <= 0.0)) { SourceSatCurrent = 1.0e-14; } else - { SourceSatCurrent = here->BSIM4V4Aseff * model->BSIM4V4SjctTempSatCurDensity - + here->BSIM4V4Pseff * model->BSIM4V4SjctSidewallTempSatCurDensity - + pParam->BSIM4V4weffCJ * here->BSIM4V4nf - * model->BSIM4V4SjctGateSidewallTempSatCurDensity; + { SourceSatCurrent = here->BSIM4v4Aseff * model->BSIM4v4SjctTempSatCurDensity + + here->BSIM4v4Pseff * model->BSIM4v4SjctSidewallTempSatCurDensity + + pParam->BSIM4v4weffCJ * here->BSIM4v4nf + * model->BSIM4v4SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent <= 0.0) - { here->BSIM4V4gbs = ckt->CKTgmin; - here->BSIM4V4cbs = here->BSIM4V4gbs * vbs_jct; + { here->BSIM4v4gbs = ckt->CKTgmin; + here->BSIM4v4cbs = here->BSIM4v4gbs * vbs_jct; } else - { switch(model->BSIM4V4dioMod) + { switch(model->BSIM4v4dioMod) { case 0: evbs = exp(vbs_jct / Nvtms); - T1 = model->BSIM4V4xjbvs * exp(-(model->BSIM4V4bvs + vbs_jct) / Nvtms); - /* WDLiu: Magic T1 in this form; different from BSIM4V4 beta. */ - here->BSIM4V4gbs = SourceSatCurrent * (evbs + T1) / Nvtms + ckt->CKTgmin; - here->BSIM4V4cbs = SourceSatCurrent * (evbs + here->BSIM4V4XExpBVS + T1 = model->BSIM4v4xjbvs * exp(-(model->BSIM4v4bvs + vbs_jct) / Nvtms); + /* WDLiu: Magic T1 in this form; different from BSIM4v4 beta. */ + here->BSIM4v4gbs = SourceSatCurrent * (evbs + T1) / Nvtms + ckt->CKTgmin; + here->BSIM4v4cbs = SourceSatCurrent * (evbs + here->BSIM4v4XExpBVS - T1 - 1.0) + ckt->CKTgmin * vbs_jct; break; case 1: T2 = vbs_jct / Nvtms; if (T2 < -EXP_THRESHOLD) - { here->BSIM4V4gbs = ckt->CKTgmin; - here->BSIM4V4cbs = SourceSatCurrent * (MIN_EXP - 1.0) + { here->BSIM4v4gbs = ckt->CKTgmin; + here->BSIM4v4cbs = SourceSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbs_jct; } - else if (vbs_jct <= here->BSIM4V4vjsmFwd) + else if (vbs_jct <= here->BSIM4v4vjsmFwd) { evbs = exp(T2); - here->BSIM4V4gbs = SourceSatCurrent * evbs / Nvtms + ckt->CKTgmin; - here->BSIM4V4cbs = SourceSatCurrent * (evbs - 1.0) + here->BSIM4v4gbs = SourceSatCurrent * evbs / Nvtms + ckt->CKTgmin; + here->BSIM4v4cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs_jct; } else - { T0 = here->BSIM4V4IVjsmFwd / Nvtms; - here->BSIM4V4gbs = T0 + ckt->CKTgmin; - here->BSIM4V4cbs = here->BSIM4V4IVjsmFwd - SourceSatCurrent + T0 - * (vbs_jct - here->BSIM4V4vjsmFwd) + ckt->CKTgmin * vbs_jct; + { T0 = here->BSIM4v4IVjsmFwd / Nvtms; + here->BSIM4v4gbs = T0 + ckt->CKTgmin; + here->BSIM4v4cbs = here->BSIM4v4IVjsmFwd - SourceSatCurrent + T0 + * (vbs_jct - here->BSIM4v4vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; case 2: - if (vbs_jct < here->BSIM4V4vjsmRev) + if (vbs_jct < here->BSIM4v4vjsmRev) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; @@ -707,12 +707,12 @@ for (; model != NULL; model = model->BSIM4V4nextModel) } T1 = evbs - 1.0; - T2 = here->BSIM4V4IVjsmRev + here->BSIM4V4SslpRev - * (vbs_jct - here->BSIM4V4vjsmRev); - here->BSIM4V4gbs = devbs_dvb * T2 + T1 * here->BSIM4V4SslpRev + ckt->CKTgmin; - here->BSIM4V4cbs = T1 * T2 + ckt->CKTgmin * vbs_jct; + T2 = here->BSIM4v4IVjsmRev + here->BSIM4v4SslpRev + * (vbs_jct - here->BSIM4v4vjsmRev); + here->BSIM4v4gbs = devbs_dvb * T2 + T1 * here->BSIM4v4SslpRev + ckt->CKTgmin; + here->BSIM4v4cbs = T1 * T2 + ckt->CKTgmin * vbs_jct; } - else if (vbs_jct <= here->BSIM4V4vjsmFwd) + else if (vbs_jct <= here->BSIM4v4vjsmFwd) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; @@ -723,7 +723,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) devbs_dvb = evbs / Nvtms; } - T1 = (model->BSIM4V4bvs + vbs_jct) / Nvtms; + T1 = (model->BSIM4v4bvs + vbs_jct) / Nvtms; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; @@ -732,68 +732,68 @@ for (; model != NULL; model = model->BSIM4V4nextModel) { T2 = exp(-T1); T3 = -T2 /Nvtms; } - here->BSIM4V4gbs = SourceSatCurrent * (devbs_dvb - model->BSIM4V4xjbvs * T3) + here->BSIM4v4gbs = SourceSatCurrent * (devbs_dvb - model->BSIM4v4xjbvs * T3) + ckt->CKTgmin; - here->BSIM4V4cbs = SourceSatCurrent * (evbs + here->BSIM4V4XExpBVS - 1.0 - - model->BSIM4V4xjbvs * T2) + ckt->CKTgmin * vbs_jct; + here->BSIM4v4cbs = SourceSatCurrent * (evbs + here->BSIM4v4XExpBVS - 1.0 + - model->BSIM4v4xjbvs * T2) + ckt->CKTgmin * vbs_jct; } else - { here->BSIM4V4gbs = here->BSIM4V4SslpFwd + ckt->CKTgmin; - here->BSIM4V4cbs = here->BSIM4V4IVjsmFwd + here->BSIM4V4SslpFwd * (vbs_jct - - here->BSIM4V4vjsmFwd) + ckt->CKTgmin * vbs_jct; + { here->BSIM4v4gbs = here->BSIM4v4SslpFwd + ckt->CKTgmin; + here->BSIM4v4cbs = here->BSIM4v4IVjsmFwd + here->BSIM4v4SslpFwd * (vbs_jct + - here->BSIM4v4vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; default: break; } } - Nvtmd = model->BSIM4V4vtm * model->BSIM4V4DjctEmissionCoeff; - if ((here->BSIM4V4Adeff <= 0.0) && (here->BSIM4V4Pdeff <= 0.0)) + Nvtmd = model->BSIM4v4vtm * model->BSIM4v4DjctEmissionCoeff; + if ((here->BSIM4v4Adeff <= 0.0) && (here->BSIM4v4Pdeff <= 0.0)) { DrainSatCurrent = 1.0e-14; } else - { DrainSatCurrent = here->BSIM4V4Adeff * model->BSIM4V4DjctTempSatCurDensity - + here->BSIM4V4Pdeff * model->BSIM4V4DjctSidewallTempSatCurDensity - + pParam->BSIM4V4weffCJ * here->BSIM4V4nf - * model->BSIM4V4DjctGateSidewallTempSatCurDensity; + { DrainSatCurrent = here->BSIM4v4Adeff * model->BSIM4v4DjctTempSatCurDensity + + here->BSIM4v4Pdeff * model->BSIM4v4DjctSidewallTempSatCurDensity + + pParam->BSIM4v4weffCJ * here->BSIM4v4nf + * model->BSIM4v4DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent <= 0.0) - { here->BSIM4V4gbd = ckt->CKTgmin; - here->BSIM4V4cbd = here->BSIM4V4gbd * vbd_jct; + { here->BSIM4v4gbd = ckt->CKTgmin; + here->BSIM4v4cbd = here->BSIM4v4gbd * vbd_jct; } else - { switch(model->BSIM4V4dioMod) + { switch(model->BSIM4v4dioMod) { case 0: evbd = exp(vbd_jct / Nvtmd); - T1 = model->BSIM4V4xjbvd * exp(-(model->BSIM4V4bvd + vbd_jct) / Nvtmd); - /* WDLiu: Magic T1 in this form; different from BSIM4V4 beta. */ - here->BSIM4V4gbd = DrainSatCurrent * (evbd + T1) / Nvtmd + ckt->CKTgmin; - here->BSIM4V4cbd = DrainSatCurrent * (evbd + here->BSIM4V4XExpBVD + T1 = model->BSIM4v4xjbvd * exp(-(model->BSIM4v4bvd + vbd_jct) / Nvtmd); + /* WDLiu: Magic T1 in this form; different from BSIM4v4 beta. */ + here->BSIM4v4gbd = DrainSatCurrent * (evbd + T1) / Nvtmd + ckt->CKTgmin; + here->BSIM4v4cbd = DrainSatCurrent * (evbd + here->BSIM4v4XExpBVD - T1 - 1.0) + ckt->CKTgmin * vbd_jct; break; case 1: T2 = vbd_jct / Nvtmd; if (T2 < -EXP_THRESHOLD) - { here->BSIM4V4gbd = ckt->CKTgmin; - here->BSIM4V4cbd = DrainSatCurrent * (MIN_EXP - 1.0) + { here->BSIM4v4gbd = ckt->CKTgmin; + here->BSIM4v4cbd = DrainSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbd_jct; } - else if (vbd_jct <= here->BSIM4V4vjdmFwd) + else if (vbd_jct <= here->BSIM4v4vjdmFwd) { evbd = exp(T2); - here->BSIM4V4gbd = DrainSatCurrent * evbd / Nvtmd + ckt->CKTgmin; - here->BSIM4V4cbd = DrainSatCurrent * (evbd - 1.0) + here->BSIM4v4gbd = DrainSatCurrent * evbd / Nvtmd + ckt->CKTgmin; + here->BSIM4v4cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd_jct; } else - { T0 = here->BSIM4V4IVjdmFwd / Nvtmd; - here->BSIM4V4gbd = T0 + ckt->CKTgmin; - here->BSIM4V4cbd = here->BSIM4V4IVjdmFwd - DrainSatCurrent + T0 - * (vbd_jct - here->BSIM4V4vjdmFwd) + ckt->CKTgmin * vbd_jct; + { T0 = here->BSIM4v4IVjdmFwd / Nvtmd; + here->BSIM4v4gbd = T0 + ckt->CKTgmin; + here->BSIM4v4cbd = here->BSIM4v4IVjdmFwd - DrainSatCurrent + T0 + * (vbd_jct - here->BSIM4v4vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; case 2: - if (vbd_jct < here->BSIM4V4vjdmRev) + if (vbd_jct < here->BSIM4v4vjdmRev) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; @@ -805,12 +805,12 @@ for (; model != NULL; model = model->BSIM4V4nextModel) } T1 = evbd - 1.0; - T2 = here->BSIM4V4IVjdmRev + here->BSIM4V4DslpRev - * (vbd_jct - here->BSIM4V4vjdmRev); - here->BSIM4V4gbd = devbd_dvb * T2 + T1 * here->BSIM4V4DslpRev + ckt->CKTgmin; - here->BSIM4V4cbd = T1 * T2 + ckt->CKTgmin * vbd_jct; + T2 = here->BSIM4v4IVjdmRev + here->BSIM4v4DslpRev + * (vbd_jct - here->BSIM4v4vjdmRev); + here->BSIM4v4gbd = devbd_dvb * T2 + T1 * here->BSIM4v4DslpRev + ckt->CKTgmin; + here->BSIM4v4cbd = T1 * T2 + ckt->CKTgmin * vbd_jct; } - else if (vbd_jct <= here->BSIM4V4vjdmFwd) + else if (vbd_jct <= here->BSIM4v4vjdmFwd) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; @@ -821,7 +821,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) devbd_dvb = evbd / Nvtmd; } - T1 = (model->BSIM4V4bvd + vbd_jct) / Nvtmd; + T1 = (model->BSIM4v4bvd + vbd_jct) / Nvtmd; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; @@ -830,15 +830,15 @@ for (; model != NULL; model = model->BSIM4V4nextModel) { T2 = exp(-T1); T3 = -T2 /Nvtmd; } - here->BSIM4V4gbd = DrainSatCurrent * (devbd_dvb - model->BSIM4V4xjbvd * T3) + here->BSIM4v4gbd = DrainSatCurrent * (devbd_dvb - model->BSIM4v4xjbvd * T3) + ckt->CKTgmin; - here->BSIM4V4cbd = DrainSatCurrent * (evbd + here->BSIM4V4XExpBVD - 1.0 - - model->BSIM4V4xjbvd * T2) + ckt->CKTgmin * vbd_jct; + here->BSIM4v4cbd = DrainSatCurrent * (evbd + here->BSIM4v4XExpBVD - 1.0 + - model->BSIM4v4xjbvd * T2) + ckt->CKTgmin * vbd_jct; } else - { here->BSIM4V4gbd = here->BSIM4V4DslpFwd + ckt->CKTgmin; - here->BSIM4V4cbd = here->BSIM4V4IVjdmFwd + here->BSIM4V4DslpFwd * (vbd_jct - - here->BSIM4V4vjdmFwd) + ckt->CKTgmin * vbd_jct; + { here->BSIM4v4gbd = here->BSIM4v4DslpFwd + ckt->CKTgmin; + here->BSIM4v4cbd = here->BSIM4v4IVjdmFwd + here->BSIM4v4DslpFwd * (vbd_jct + - here->BSIM4v4vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; default: break; @@ -846,179 +846,179 @@ for (; model != NULL; model = model->BSIM4V4nextModel) } /* trap-assisted tunneling and recombination current for reverse bias */ - Nvtmrssw = model->BSIM4V4vtm0 * model->BSIM4V4njtsswtemp; - Nvtmrsswg = model->BSIM4V4vtm0 * model->BSIM4V4njtsswgtemp; - Nvtmrs = model->BSIM4V4vtm0 * model->BSIM4V4njtstemp; + Nvtmrssw = model->BSIM4v4vtm0 * model->BSIM4v4njtsswtemp; + Nvtmrsswg = model->BSIM4v4vtm0 * model->BSIM4v4njtsswgtemp; + Nvtmrs = model->BSIM4v4vtm0 * model->BSIM4v4njtstemp; - if ((model->BSIM4V4vtss - vbs) < 1e-3) + if ((model->BSIM4v4vtss - vbs) < 1e-3) { T9 = 1.0e3; T0 = - vbs / Nvtmrs * T9; DEXP(T0, T1, T10); dT1_dVb = T10 / Nvtmrs * T9; } else { - T9 = 1.0 / (model->BSIM4V4vtss - vbs); - T0 = -vbs / Nvtmrs * model->BSIM4V4vtss * T9; - dT0_dVb = model->BSIM4V4vtss / Nvtmrs * (T9 + vbs * T9 * T9) ; + T9 = 1.0 / (model->BSIM4v4vtss - vbs); + T0 = -vbs / Nvtmrs * model->BSIM4v4vtss * T9; + dT0_dVb = model->BSIM4v4vtss / Nvtmrs * (T9 + vbs * T9 * T9) ; DEXP(T0, T1, T10); dT1_dVb = T10 * dT0_dVb; } - if ((model->BSIM4V4vtsd - vbd) < 1e-3) + if ((model->BSIM4v4vtsd - vbd) < 1e-3) { T9 = 1.0e3; T0 = -vbd / Nvtmrs * T9; DEXP(T0, T2, T10); dT2_dVb = T10 / Nvtmrs * T9; } else { - T9 = 1.0 / (model->BSIM4V4vtsd - vbd); - T0 = -vbd / Nvtmrs * model->BSIM4V4vtsd * T9; - dT0_dVb = model->BSIM4V4vtsd / Nvtmrs * (T9 + vbd * T9 * T9) ; + T9 = 1.0 / (model->BSIM4v4vtsd - vbd); + T0 = -vbd / Nvtmrs * model->BSIM4v4vtsd * T9; + dT0_dVb = model->BSIM4v4vtsd / Nvtmrs * (T9 + vbd * T9 * T9) ; DEXP(T0, T2, T10); dT2_dVb = T10 * dT0_dVb; } - if ((model->BSIM4V4vtssws - vbs) < 1e-3) + if ((model->BSIM4v4vtssws - vbs) < 1e-3) { T9 = 1.0e3; T0 = -vbs / Nvtmrssw * T9; DEXP(T0, T3, T10); dT3_dVb = T10 / Nvtmrssw * T9; } else { - T9 = 1.0 / (model->BSIM4V4vtssws - vbs); - T0 = -vbs / Nvtmrssw * model->BSIM4V4vtssws * T9; - dT0_dVb = model->BSIM4V4vtssws / Nvtmrssw * (T9 + vbs * T9 * T9) ; + T9 = 1.0 / (model->BSIM4v4vtssws - vbs); + T0 = -vbs / Nvtmrssw * model->BSIM4v4vtssws * T9; + dT0_dVb = model->BSIM4v4vtssws / Nvtmrssw * (T9 + vbs * T9 * T9) ; DEXP(T0, T3, T10); dT3_dVb = T10 * dT0_dVb; } - if ((model->BSIM4V4vtsswd - vbd) < 1e-3) + if ((model->BSIM4v4vtsswd - vbd) < 1e-3) { T9 = 1.0e3; T0 = -vbd / Nvtmrssw * T9; DEXP(T0, T4, T10); dT4_dVb = T10 / Nvtmrssw * T9; } else { - T9 = 1.0 / (model->BSIM4V4vtsswd - vbd); - T0 = -vbd / Nvtmrssw * model->BSIM4V4vtsswd * T9; - dT0_dVb = model->BSIM4V4vtsswd / Nvtmrssw * (T9 + vbd * T9 * T9) ; + T9 = 1.0 / (model->BSIM4v4vtsswd - vbd); + T0 = -vbd / Nvtmrssw * model->BSIM4v4vtsswd * T9; + dT0_dVb = model->BSIM4v4vtsswd / Nvtmrssw * (T9 + vbd * T9 * T9) ; DEXP(T0, T4, T10); dT4_dVb = T10 * dT0_dVb; } - if ((model->BSIM4V4vtsswgs - vbs) < 1e-3) + if ((model->BSIM4v4vtsswgs - vbs) < 1e-3) { T9 = 1.0e3; T0 = -vbs / Nvtmrsswg * T9; DEXP(T0, T5, T10); dT5_dVb = T10 / Nvtmrsswg * T9; } else { - T9 = 1.0 / (model->BSIM4V4vtsswgs - vbs); - T0 = -vbs / Nvtmrsswg * model->BSIM4V4vtsswgs * T9; - dT0_dVb = model->BSIM4V4vtsswgs / Nvtmrsswg * (T9 + vbs * T9 * T9) ; + T9 = 1.0 / (model->BSIM4v4vtsswgs - vbs); + T0 = -vbs / Nvtmrsswg * model->BSIM4v4vtsswgs * T9; + dT0_dVb = model->BSIM4v4vtsswgs / Nvtmrsswg * (T9 + vbs * T9 * T9) ; DEXP(T0, T5, T10); dT5_dVb = T10 * dT0_dVb; } - if ((model->BSIM4V4vtsswgd - vbd) < 1e-3) + if ((model->BSIM4v4vtsswgd - vbd) < 1e-3) { T9 = 1.0e3; T0 = -vbd / Nvtmrsswg * T9; DEXP(T0, T4, T10); dT6_dVb = T10 / Nvtmrsswg * T9; } else { - T9 = 1.0 / (model->BSIM4V4vtsswgd - vbd); - T0 = -vbd / Nvtmrsswg * model->BSIM4V4vtsswgd * T9; - dT0_dVb = model->BSIM4V4vtsswgd / Nvtmrsswg * (T9 + vbd * T9 * T9) ; + T9 = 1.0 / (model->BSIM4v4vtsswgd - vbd); + T0 = -vbd / Nvtmrsswg * model->BSIM4v4vtsswgd * T9; + dT0_dVb = model->BSIM4v4vtsswgd / Nvtmrsswg * (T9 + vbd * T9 * T9) ; DEXP(T0, T6, T10); dT6_dVb = T10 * dT0_dVb; } - here->BSIM4V4gbs += here->BSIM4V4SjctTempRevSatCur * dT1_dVb - + here->BSIM4V4SswTempRevSatCur * dT3_dVb - + here->BSIM4V4SswgTempRevSatCur * dT5_dVb; - here->BSIM4V4cbs -= here->BSIM4V4SjctTempRevSatCur * (T1 - 1.0) - + here->BSIM4V4SswTempRevSatCur * (T3 - 1.0) - + here->BSIM4V4SswgTempRevSatCur * (T5 - 1.0); - here->BSIM4V4gbd += here->BSIM4V4DjctTempRevSatCur * dT2_dVb - + here->BSIM4V4DswTempRevSatCur * dT4_dVb - + here->BSIM4V4DswgTempRevSatCur * dT6_dVb; - here->BSIM4V4cbd -= here->BSIM4V4DjctTempRevSatCur * (T2 - 1.0) - + here->BSIM4V4DswTempRevSatCur * (T4 - 1.0) - + here->BSIM4V4DswgTempRevSatCur * (T6 - 1.0); + here->BSIM4v4gbs += here->BSIM4v4SjctTempRevSatCur * dT1_dVb + + here->BSIM4v4SswTempRevSatCur * dT3_dVb + + here->BSIM4v4SswgTempRevSatCur * dT5_dVb; + here->BSIM4v4cbs -= here->BSIM4v4SjctTempRevSatCur * (T1 - 1.0) + + here->BSIM4v4SswTempRevSatCur * (T3 - 1.0) + + here->BSIM4v4SswgTempRevSatCur * (T5 - 1.0); + here->BSIM4v4gbd += here->BSIM4v4DjctTempRevSatCur * dT2_dVb + + here->BSIM4v4DswTempRevSatCur * dT4_dVb + + here->BSIM4v4DswgTempRevSatCur * dT6_dVb; + here->BSIM4v4cbd -= here->BSIM4v4DjctTempRevSatCur * (T2 - 1.0) + + here->BSIM4v4DswTempRevSatCur * (T4 - 1.0) + + here->BSIM4v4DswgTempRevSatCur * (T6 - 1.0); /* End of diode DC model */ if (vds >= 0.0) - { here->BSIM4V4mode = 1; + { here->BSIM4v4mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vdb = vds - vbs; /* WDLiu: for GIDL */ } else - { here->BSIM4V4mode = -1; + { here->BSIM4v4mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vdb = -vbs; } - T0 = Vbs - here->BSIM4V4vbsc - 0.001; - T1 = sqrt(T0 * T0 - 0.004 * here->BSIM4V4vbsc); + T0 = Vbs - here->BSIM4v4vbsc - 0.001; + T1 = sqrt(T0 * T0 - 0.004 * here->BSIM4v4vbsc); if (T0 >= 0.0) - { Vbseff = here->BSIM4V4vbsc + 0.5 * (T0 + T1); + { Vbseff = here->BSIM4v4vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); } else { T2 = -0.002 / (T1 - T0); - Vbseff = here->BSIM4V4vbsc * (1.0 + T2); - dVbseff_dVb = T2 * here->BSIM4V4vbsc / T1; + Vbseff = here->BSIM4v4vbsc * (1.0 + T2); + dVbseff_dVb = T2 * here->BSIM4v4vbsc / T1; } /* JX: Correction to forward body bias */ - T9 = 0.95 * pParam->BSIM4V4phi; + T9 = 0.95 * pParam->BSIM4v4phi; T0 = T9 - Vbseff - 0.001; T1 = sqrt(T0 * T0 + 0.004 * T9); Vbseff = T9 - 0.5 * (T0 + T1); dVbseff_dVb *= 0.5 * (1.0 + T0 / T1); - Phis = pParam->BSIM4V4phi - Vbseff; + Phis = pParam->BSIM4v4phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; - Xdep = pParam->BSIM4V4Xdep0 * sqrtPhis / pParam->BSIM4V4sqrtPhi; - dXdep_dVb = (pParam->BSIM4V4Xdep0 / pParam->BSIM4V4sqrtPhi) + Xdep = pParam->BSIM4v4Xdep0 * sqrtPhis / pParam->BSIM4v4sqrtPhi; + dXdep_dVb = (pParam->BSIM4v4Xdep0 / pParam->BSIM4v4sqrtPhi) * dsqrtPhis_dVb; - Leff = pParam->BSIM4V4leff; - Vtm = model->BSIM4V4vtm; + Leff = pParam->BSIM4v4leff; + Vtm = model->BSIM4v4vtm; /* Vth Calculation */ T3 = sqrt(Xdep); - V0 = pParam->BSIM4V4vbi - pParam->BSIM4V4phi; + V0 = pParam->BSIM4v4vbi - pParam->BSIM4v4phi; - T0 = pParam->BSIM4V4dvt2 * Vbseff; + T0 = pParam->BSIM4v4dvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; - T2 = pParam->BSIM4V4dvt2; + T2 = pParam->BSIM4v4dvt2; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; - T2 = pParam->BSIM4V4dvt2 * T4 * T4; + T2 = pParam->BSIM4v4dvt2 * T4 * T4; } - lt1 = model->BSIM4V4factor1 * T3 * T1; - dlt1_dVb = model->BSIM4V4factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); + lt1 = model->BSIM4v4factor1 * T3 * T1; + dlt1_dVb = model->BSIM4v4factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); - T0 = pParam->BSIM4V4dvt2w * Vbseff; + T0 = pParam->BSIM4v4dvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; - T2 = pParam->BSIM4V4dvt2w; + T2 = pParam->BSIM4v4dvt2w; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; - T2 = pParam->BSIM4V4dvt2w * T4 * T4; + T2 = pParam->BSIM4v4dvt2w * T4 * T4; } - ltw = model->BSIM4V4factor1 * T3 * T1; - dltw_dVb = model->BSIM4V4factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); + ltw = model->BSIM4v4factor1 * T3 * T1; + dltw_dVb = model->BSIM4v4factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); - T0 = pParam->BSIM4V4dvt1 * Leff / lt1; + T0 = pParam->BSIM4v4dvt1 * Leff / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; @@ -1032,11 +1032,11 @@ for (; model != NULL; model = model->BSIM4V4nextModel) { Theta0 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dTheta0_dVb = 0.0; } - here->BSIM4V4thetavth = pParam->BSIM4V4dvt0 * Theta0; - Delt_vth = here->BSIM4V4thetavth * V0; - dDelt_vth_dVb = pParam->BSIM4V4dvt0 * dTheta0_dVb * V0; + here->BSIM4v4thetavth = pParam->BSIM4v4dvt0 * Theta0; + Delt_vth = here->BSIM4v4thetavth * V0; + dDelt_vth_dVb = pParam->BSIM4v4dvt0 * dTheta0_dVb * V0; - T0 = pParam->BSIM4V4dvt1w * pParam->BSIM4V4weff * Leff / ltw; + T0 = pParam->BSIM4v4dvt1w * pParam->BSIM4v4weff * Leff / ltw; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; @@ -1050,19 +1050,19 @@ for (; model != NULL; model = model->BSIM4V4nextModel) { T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dT5_dVb = 0.0; } - T0 = pParam->BSIM4V4dvt0w * T5; + T0 = pParam->BSIM4v4dvt0w * T5; T2 = T0 * V0; - dT2_dVb = pParam->BSIM4V4dvt0w * dT5_dVb * V0; + dT2_dVb = pParam->BSIM4v4dvt0w * dT5_dVb * V0; - TempRatio = ckt->CKTtemp / model->BSIM4V4tnom - 1.0; - T0 = sqrt(1.0 + pParam->BSIM4V4lpe0 / Leff); - T1 = pParam->BSIM4V4k1ox * (T0 - 1.0) * pParam->BSIM4V4sqrtPhi - + (pParam->BSIM4V4kt1 + pParam->BSIM4V4kt1l / Leff - + pParam->BSIM4V4kt2 * Vbseff) * TempRatio; - Vth_NarrowW = model->BSIM4V4toxe * pParam->BSIM4V4phi - / (pParam->BSIM4V4weff + pParam->BSIM4V4w0); + TempRatio = ckt->CKTtemp / model->BSIM4v4tnom - 1.0; + T0 = sqrt(1.0 + pParam->BSIM4v4lpe0 / Leff); + T1 = pParam->BSIM4v4k1ox * (T0 - 1.0) * pParam->BSIM4v4sqrtPhi + + (pParam->BSIM4v4kt1 + pParam->BSIM4v4kt1l / Leff + + pParam->BSIM4v4kt2 * Vbseff) * TempRatio; + Vth_NarrowW = model->BSIM4v4toxe * pParam->BSIM4v4phi + / (pParam->BSIM4v4weff + pParam->BSIM4v4w0); - T3 = here->BSIM4V4eta0 + pParam->BSIM4V4etab * Vbseff; + T3 = here->BSIM4v4eta0 + pParam->BSIM4v4etab * Vbseff; if (T3 < 1.0e-4) { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; @@ -1071,61 +1071,61 @@ for (; model != NULL; model = model->BSIM4V4nextModel) else { T4 = 1.0; } - dDIBL_Sft_dVd = T3 * pParam->BSIM4V4theta0vb0; + dDIBL_Sft_dVd = T3 * pParam->BSIM4v4theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; - Lpe_Vb = sqrt(1.0 + pParam->BSIM4V4lpeb / Leff); + Lpe_Vb = sqrt(1.0 + pParam->BSIM4v4lpeb / Leff); - Vth = model->BSIM4V4type * here->BSIM4V4vth0 + (pParam->BSIM4V4k1ox * sqrtPhis - - pParam->BSIM4V4k1 * pParam->BSIM4V4sqrtPhi) * Lpe_Vb - - here->BSIM4V4k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM4V4k3 - + pParam->BSIM4V4k3b * Vbseff) * Vth_NarrowW + T1 - DIBL_Sft; + Vth = model->BSIM4v4type * here->BSIM4v4vth0 + (pParam->BSIM4v4k1ox * sqrtPhis + - pParam->BSIM4v4k1 * pParam->BSIM4v4sqrtPhi) * Lpe_Vb + - here->BSIM4v4k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM4v4k3 + + pParam->BSIM4v4k3b * Vbseff) * Vth_NarrowW + T1 - DIBL_Sft; - dVth_dVb = Lpe_Vb * pParam->BSIM4V4k1ox * dsqrtPhis_dVb - here->BSIM4V4k2ox - - dDelt_vth_dVb - dT2_dVb + pParam->BSIM4V4k3b * Vth_NarrowW - - pParam->BSIM4V4etab * Vds * pParam->BSIM4V4theta0vb0 * T4 - + pParam->BSIM4V4kt2 * TempRatio; + dVth_dVb = Lpe_Vb * pParam->BSIM4v4k1ox * dsqrtPhis_dVb - here->BSIM4v4k2ox + - dDelt_vth_dVb - dT2_dVb + pParam->BSIM4v4k3b * Vth_NarrowW + - pParam->BSIM4v4etab * Vds * pParam->BSIM4v4theta0vb0 * T4 + + pParam->BSIM4v4kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; /* Calculate n */ tmp1 = EPSSI / Xdep; - here->BSIM4V4nstar = model->BSIM4V4vtm / Charge_q * (model->BSIM4V4coxe - + tmp1 + pParam->BSIM4V4cit); - tmp2 = pParam->BSIM4V4nfactor * tmp1; - tmp3 = pParam->BSIM4V4cdsc + pParam->BSIM4V4cdscb * Vbseff - + pParam->BSIM4V4cdscd * Vds; - tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM4V4cit) / model->BSIM4V4coxe; + here->BSIM4v4nstar = model->BSIM4v4vtm / Charge_q * (model->BSIM4v4coxe + + tmp1 + pParam->BSIM4v4cit); + tmp2 = pParam->BSIM4v4nfactor * tmp1; + tmp3 = pParam->BSIM4v4cdsc + pParam->BSIM4v4cdscb * Vbseff + + pParam->BSIM4v4cdscd * Vds; + tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM4v4cit) / model->BSIM4v4coxe; if (tmp4 >= -0.5) { n = 1.0 + tmp4; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb - + pParam->BSIM4V4cdscb * Theta0) / model->BSIM4V4coxe; - dn_dVd = pParam->BSIM4V4cdscd * Theta0 / model->BSIM4V4coxe; + + pParam->BSIM4v4cdscb * Theta0) / model->BSIM4v4coxe; + dn_dVd = pParam->BSIM4v4cdscd * Theta0 / model->BSIM4v4coxe; } else { T0 = 1.0 / (3.0 + 8.0 * tmp4); n = (1.0 + 3.0 * tmp4) * T0; T0 *= T0; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb - + pParam->BSIM4V4cdscb * Theta0) / model->BSIM4V4coxe * T0; - dn_dVd = pParam->BSIM4V4cdscd * Theta0 / model->BSIM4V4coxe * T0; + + pParam->BSIM4v4cdscb * Theta0) / model->BSIM4v4coxe * T0; + dn_dVd = pParam->BSIM4v4cdscd * Theta0 / model->BSIM4v4coxe * T0; } /* Vth correction for Pocket implant */ - if (pParam->BSIM4V4dvtp0 > 0.0) - { T0 = -pParam->BSIM4V4dvtp1 * Vds; + if (pParam->BSIM4v4dvtp0 > 0.0) + { T0 = -pParam->BSIM4v4dvtp1 * Vds; if (T0 < -EXP_THRESHOLD) { T2 = MIN_EXP; dT2_dVd = 0.0; } else { T2 = exp(T0); - dT2_dVd = -pParam->BSIM4V4dvtp1 * T2; + dT2_dVd = -pParam->BSIM4v4dvtp1 * T2; } - T3 = Leff + pParam->BSIM4V4dvtp0 * (1.0 + T2); - dT3_dVd = pParam->BSIM4V4dvtp0 * dT2_dVd; + T3 = Leff + pParam->BSIM4v4dvtp0 * (1.0 + T2); + dT3_dVd = pParam->BSIM4v4dvtp0 * dT2_dVd; T4 = Vtm * log(Leff / T3); dT4_dVd = -Vtm * dT3_dVd / T3; dDITS_Sft_dVd = dn_dVd * T4 + n * dT4_dVd; @@ -1135,40 +1135,40 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dVth_dVd -= dDITS_Sft_dVd; dVth_dVb -= dDITS_Sft_dVb; } - here->BSIM4V4von = Vth; + here->BSIM4v4von = Vth; /* Poly Gate Si Depletion Effect */ - T0 = here->BSIM4V4vfb + pParam->BSIM4V4phi; + T0 = here->BSIM4v4vfb + pParam->BSIM4v4phi; - BSIM4V4polyDepletion(T0, pParam->BSIM4V4ngate, model->BSIM4V4coxe, vgs, &vgs_eff, &dvgs_eff_dvg); + BSIM4v4polyDepletion(T0, pParam->BSIM4v4ngate, model->BSIM4v4coxe, vgs, &vgs_eff, &dvgs_eff_dvg); - BSIM4V4polyDepletion(T0, pParam->BSIM4V4ngate, model->BSIM4V4coxe, vgd, &vgd_eff, &dvgd_eff_dvg); + BSIM4v4polyDepletion(T0, pParam->BSIM4v4ngate, model->BSIM4v4coxe, vgd, &vgd_eff, &dvgd_eff_dvg); - if(here->BSIM4V4mode>0) { + if(here->BSIM4v4mode>0) { Vgs_eff = vgs_eff; dVgs_eff_dVg = dvgs_eff_dvg; } else { Vgs_eff = vgd_eff; dVgs_eff_dVg = dvgd_eff_dvg; } - here->BSIM4V4vgs_eff = vgs_eff; - here->BSIM4V4vgd_eff = vgd_eff; - here->BSIM4V4dvgs_eff_dvg = dvgs_eff_dvg; - here->BSIM4V4dvgd_eff_dvg = dvgd_eff_dvg; + here->BSIM4v4vgs_eff = vgs_eff; + here->BSIM4v4vgd_eff = vgd_eff; + here->BSIM4v4dvgs_eff_dvg = dvgs_eff_dvg; + here->BSIM4v4dvgd_eff_dvg = dvgd_eff_dvg; Vgst = Vgs_eff - Vth; /* Calculate Vgsteff */ T0 = n * Vtm; - T1 = pParam->BSIM4V4mstar * Vgst; + T1 = pParam->BSIM4v4mstar * Vgst; T2 = T1 / T0; if (T2 > EXP_THRESHOLD) { T10 = T1; - dT10_dVg = pParam->BSIM4V4mstar * dVgs_eff_dVg; - dT10_dVd = -dVth_dVd * pParam->BSIM4V4mstar; - dT10_dVb = -dVth_dVb * pParam->BSIM4V4mstar; + dT10_dVg = pParam->BSIM4v4mstar * dVgs_eff_dVg; + dT10_dVd = -dVth_dVd * pParam->BSIM4v4mstar; + dT10_dVb = -dVth_dVb * pParam->BSIM4v4mstar; } else if (T2 < -EXP_THRESHOLD) { T10 = Vtm * log(1.0 + MIN_EXP); @@ -1181,52 +1181,52 @@ for (; model != NULL; model = model->BSIM4V4nextModel) { ExpVgst = exp(T2); T3 = Vtm * log(1.0 + ExpVgst); T10 = n * T3; - dT10_dVg = pParam->BSIM4V4mstar * ExpVgst / (1.0 + ExpVgst); + dT10_dVg = pParam->BSIM4v4mstar * ExpVgst / (1.0 + ExpVgst); dT10_dVb = T3 * dn_dVb - dT10_dVg * (dVth_dVb + Vgst * dn_dVb / n); dT10_dVd = T3 * dn_dVd - dT10_dVg * (dVth_dVd + Vgst * dn_dVd / n); dT10_dVg *= dVgs_eff_dVg; } - T1 = pParam->BSIM4V4voffcbn - (1.0 - pParam->BSIM4V4mstar) * Vgst; + T1 = pParam->BSIM4v4voffcbn - (1.0 - pParam->BSIM4v4mstar) * Vgst; T2 = T1 / T0; if (T2 < -EXP_THRESHOLD) - { T3 = model->BSIM4V4coxe * MIN_EXP / pParam->BSIM4V4cdep0; - T9 = pParam->BSIM4V4mstar + T3 * n; + { T3 = model->BSIM4v4coxe * MIN_EXP / pParam->BSIM4v4cdep0; + T9 = pParam->BSIM4v4mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else if (T2 > EXP_THRESHOLD) - { T3 = model->BSIM4V4coxe * MAX_EXP / pParam->BSIM4V4cdep0; - T9 = pParam->BSIM4V4mstar + T3 * n; + { T3 = model->BSIM4v4coxe * MAX_EXP / pParam->BSIM4v4cdep0; + T9 = pParam->BSIM4v4mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else { ExpVgst = exp(T2); - T3 = model->BSIM4V4coxe / pParam->BSIM4V4cdep0; + T3 = model->BSIM4v4coxe / pParam->BSIM4v4cdep0; T4 = T3 * ExpVgst; T5 = T1 * T4 / T0; - T9 = pParam->BSIM4V4mstar + n * T4; - dT9_dVg = T3 * (pParam->BSIM4V4mstar - 1.0) * ExpVgst / Vtm; + T9 = pParam->BSIM4v4mstar + n * T4; + dT9_dVg = T3 * (pParam->BSIM4v4mstar - 1.0) * ExpVgst / Vtm; dT9_dVb = T4 * dn_dVb - dT9_dVg * dVth_dVb - T5 * dn_dVb; dT9_dVd = T4 * dn_dVd - dT9_dVg * dVth_dVd - T5 * dn_dVd; dT9_dVg *= dVgs_eff_dVg; } - here->BSIM4V4Vgsteff = Vgsteff = T10 / T9; + here->BSIM4v4Vgsteff = Vgsteff = T10 / T9; T11 = T9 * T9; dVgsteff_dVg = (T9 * dT10_dVg - T10 * dT9_dVg) / T11; dVgsteff_dVd = (T9 * dT10_dVd - T10 * dT9_dVd) / T11; dVgsteff_dVb = (T9 * dT10_dVb - T10 * dT9_dVb) / T11; /* Calculate Effective Channel Geometry */ - T9 = sqrtPhis - pParam->BSIM4V4sqrtPhi; - Weff = pParam->BSIM4V4weff - 2.0 * (pParam->BSIM4V4dwg * Vgsteff - + pParam->BSIM4V4dwb * T9); - dWeff_dVg = -2.0 * pParam->BSIM4V4dwg; - dWeff_dVb = -2.0 * pParam->BSIM4V4dwb * dsqrtPhis_dVb; + T9 = sqrtPhis - pParam->BSIM4v4sqrtPhi; + Weff = pParam->BSIM4v4weff - 2.0 * (pParam->BSIM4v4dwg * Vgsteff + + pParam->BSIM4v4dwb * T9); + dWeff_dVg = -2.0 * pParam->BSIM4v4dwg; + dWeff_dVb = -2.0 * pParam->BSIM4v4dwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); @@ -1236,13 +1236,13 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dWeff_dVb *= T0; } - if (model->BSIM4V4rdsMod == 1) + if (model->BSIM4v4rdsMod == 1) Rds = dRds_dVg = dRds_dVb = 0.0; else - { T0 = 1.0 + pParam->BSIM4V4prwg * Vgsteff; - dT0_dVg = -pParam->BSIM4V4prwg / T0 / T0; - T1 = pParam->BSIM4V4prwb * T9; - dT1_dVb = pParam->BSIM4V4prwb * dsqrtPhis_dVb; + { T0 = 1.0 + pParam->BSIM4v4prwg * Vgsteff; + dT0_dVg = -pParam->BSIM4v4prwg / T0 / T0; + T1 = pParam->BSIM4v4prwb * T9; + dT1_dVb = pParam->BSIM4v4prwb * dsqrtPhis_dVb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); /* 0.01 = 4.0 * 0.05 * 0.05 */ @@ -1250,28 +1250,28 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dT3_dVb = dT3_dVg * dT1_dVb; dT3_dVg *= dT0_dVg; - T4 = pParam->BSIM4V4rds0 * 0.5; - Rds = pParam->BSIM4V4rdswmin + T3 * T4; + T4 = pParam->BSIM4v4rds0 * 0.5; + Rds = pParam->BSIM4v4rdswmin + T3 * T4; dRds_dVg = T4 * dT3_dVg; dRds_dVb = T4 * dT3_dVb; if (Rds > 0.0) - here->BSIM4V4grdsw = 1.0 / Rds; + here->BSIM4v4grdsw = 1.0 / Rds; else - here->BSIM4V4grdsw = 0.0; + here->BSIM4v4grdsw = 0.0; } /* Calculate Abulk */ - T9 = 0.5 * pParam->BSIM4V4k1ox * Lpe_Vb / sqrtPhis; - T1 = T9 + here->BSIM4V4k2ox - pParam->BSIM4V4k3b * Vth_NarrowW; + T9 = 0.5 * pParam->BSIM4v4k1ox * Lpe_Vb / sqrtPhis; + T1 = T9 + here->BSIM4v4k2ox - pParam->BSIM4v4k3b * Vth_NarrowW; dT1_dVb = -T9 / sqrtPhis * dsqrtPhis_dVb; - T9 = sqrt(pParam->BSIM4V4xj * Xdep); + T9 = sqrt(pParam->BSIM4v4xj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; - tmp2 = pParam->BSIM4V4a0 * T5; - tmp3 = pParam->BSIM4V4weff + pParam->BSIM4V4b1; - tmp4 = pParam->BSIM4V4b0 / tmp3; + tmp2 = pParam->BSIM4v4a0 * T5; + tmp3 = pParam->BSIM4v4weff + pParam->BSIM4v4b1; + tmp4 = pParam->BSIM4v4b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; @@ -1280,7 +1280,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) Abulk0 = 1.0 + T1 * T2; dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb; - T8 = pParam->BSIM4V4ags * pParam->BSIM4V4a0 * T7; + T8 = pParam->BSIM4v4ags * pParam->BSIM4v4a0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb @@ -1299,17 +1299,17 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dAbulk_dVb *= T10; dAbulk_dVg *= T10; } - here->BSIM4V4Abulk = Abulk; + here->BSIM4v4Abulk = Abulk; - T2 = pParam->BSIM4V4keta * Vbseff; + T2 = pParam->BSIM4v4keta * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); - dT0_dVb = -pParam->BSIM4V4keta * T0 * T0; + dT0_dVb = -pParam->BSIM4v4keta * T0 * T0; } else { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; - dT0_dVb = -pParam->BSIM4V4keta * T1 * T1; + dT0_dVb = -pParam->BSIM4v4keta * T1 * T1; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; @@ -1318,35 +1318,35 @@ for (; model != NULL; model = model->BSIM4V4nextModel) Abulk0 *= T0; /* Mobility calculation */ - if (model->BSIM4V4mobMod == 0) + if (model->BSIM4v4mobMod == 0) { T0 = Vgsteff + Vth + Vth; - T2 = pParam->BSIM4V4ua + pParam->BSIM4V4uc * Vbseff; - T3 = T0 / model->BSIM4V4toxe; - T5 = T3 * (T2 + pParam->BSIM4V4ub * T3); - dDenomi_dVg = (T2 + 2.0 * pParam->BSIM4V4ub * T3) / model->BSIM4V4toxe; + T2 = pParam->BSIM4v4ua + pParam->BSIM4v4uc * Vbseff; + T3 = T0 / model->BSIM4v4toxe; + T5 = T3 * (T2 + pParam->BSIM4v4ub * T3); + dDenomi_dVg = (T2 + 2.0 * pParam->BSIM4v4ub * T3) / model->BSIM4v4toxe; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; - dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM4V4uc * T3; + dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM4v4uc * T3; } - else if (model->BSIM4V4mobMod == 1) + else if (model->BSIM4v4mobMod == 1) { T0 = Vgsteff + Vth + Vth; - T2 = 1.0 + pParam->BSIM4V4uc * Vbseff; - T3 = T0 / model->BSIM4V4toxe; - T4 = T3 * (pParam->BSIM4V4ua + pParam->BSIM4V4ub * T3); + T2 = 1.0 + pParam->BSIM4v4uc * Vbseff; + T3 = T0 / model->BSIM4v4toxe; + T4 = T3 * (pParam->BSIM4v4ua + pParam->BSIM4v4ub * T3); T5 = T4 * T2; - dDenomi_dVg = (pParam->BSIM4V4ua + 2.0 * pParam->BSIM4V4ub * T3) * T2 - / model->BSIM4V4toxe; + dDenomi_dVg = (pParam->BSIM4v4ua + 2.0 * pParam->BSIM4v4ub * T3) * T2 + / model->BSIM4v4toxe; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; - dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM4V4uc * T4; + dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM4v4uc * T4; } else - { T0 = (Vgsteff + here->BSIM4V4vtfbphi1) / model->BSIM4V4toxe; - T1 = exp(pParam->BSIM4V4eu * log(T0)); - dT1_dVg = T1 * pParam->BSIM4V4eu / T0 / model->BSIM4V4toxe; - T2 = pParam->BSIM4V4ua + pParam->BSIM4V4uc * Vbseff; + { T0 = (Vgsteff + here->BSIM4v4vtfbphi1) / model->BSIM4v4toxe; + T1 = exp(pParam->BSIM4v4eu * log(T0)); + dT1_dVg = T1 * pParam->BSIM4v4eu / T0 / model->BSIM4v4toxe; + T2 = pParam->BSIM4v4ua + pParam->BSIM4v4uc * Vbseff; T5 = T1 * T2; dDenomi_dVg = T2 * dT1_dVg; dDenomi_dVd = 0.0; - dDenomi_dVb = T1 * pParam->BSIM4V4uc; + dDenomi_dVb = T1 * pParam->BSIM4v4uc; } if (T5 >= -0.8) @@ -1361,41 +1361,41 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dDenomi_dVb *= T9; } - here->BSIM4V4ueff = ueff = here->BSIM4V4u0temp / Denomi; + here->BSIM4v4ueff = ueff = here->BSIM4v4u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ - WVCox = Weff * here->BSIM4V4vsattemp * model->BSIM4V4coxe; + WVCox = Weff * here->BSIM4v4vsattemp * model->BSIM4v4coxe; WVCoxRds = WVCox * Rds; - Esat = 2.0 * here->BSIM4V4vsattemp / ueff; - here->BSIM4V4EsatL = EsatL = Esat * Leff; + Esat = 2.0 * here->BSIM4v4vsattemp / ueff; + here->BSIM4v4EsatL = EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; /* Sqrt() */ - a1 = pParam->BSIM4V4a1; + a1 = pParam->BSIM4v4a1; if (a1 == 0.0) - { Lambda = pParam->BSIM4V4a2; + { Lambda = pParam->BSIM4v4a2; dLambda_dVg = 0.0; } else if (a1 > 0.0) - { T0 = 1.0 - pParam->BSIM4V4a2; - T1 = T0 - pParam->BSIM4V4a1 * Vgsteff - 0.0001; + { T0 = 1.0 - pParam->BSIM4v4a2; + T1 = T0 - pParam->BSIM4v4a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); - Lambda = pParam->BSIM4V4a2 + T0 - 0.5 * (T1 + T2); - dLambda_dVg = 0.5 * pParam->BSIM4V4a1 * (1.0 + T1 / T2); + Lambda = pParam->BSIM4v4a2 + T0 - 0.5 * (T1 + T2); + dLambda_dVg = 0.5 * pParam->BSIM4v4a1 * (1.0 + T1 / T2); } else - { T1 = pParam->BSIM4V4a2 + pParam->BSIM4V4a1 * Vgsteff - 0.0001; - T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM4V4a2); + { T1 = pParam->BSIM4v4a2 + pParam->BSIM4v4a1 * Vgsteff - 0.0001; + T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM4v4a2); Lambda = 0.5 * (T1 + T2); - dLambda_dVg = 0.5 * pParam->BSIM4V4a1 * (1.0 + T1 / T2); + dLambda_dVg = 0.5 * pParam->BSIM4v4a1 * (1.0 + T1 / T2); } Vgst2Vtm = Vgsteff + 2.0 * Vtm; @@ -1467,17 +1467,17 @@ for (; model != NULL; model = model->BSIM4V4nextModel) - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } - here->BSIM4V4vdsat = Vdsat; + here->BSIM4v4vdsat = Vdsat; /* Calculate Vdseff */ - T1 = Vdsat - Vds - pParam->BSIM4V4delta; + T1 = Vdsat - Vds - pParam->BSIM4v4delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; - T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM4V4delta * Vdsat); + T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM4v4delta * Vdsat); T0 = T1 / T2; - T9 = 2.0 * pParam->BSIM4V4delta; + T9 = 2.0 * pParam->BSIM4v4delta; T3 = T9 / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; @@ -1508,18 +1508,18 @@ for (; model != NULL; model = model->BSIM4V4nextModel) if (Vdseff > Vds) Vdseff = Vds; diffVds = Vds - Vdseff; - here->BSIM4V4Vdseff = Vdseff; + here->BSIM4v4Vdseff = Vdseff; /* Velocity Overshoot */ - if((model->BSIM4V4lambdaGiven) && (model->BSIM4V4lambda > 0.0) ) + if((model->BSIM4v4lambdaGiven) && (model->BSIM4v4lambda > 0.0) ) { T1 = Leff * ueff; - T2 = pParam->BSIM4V4lambda / T1; + T2 = pParam->BSIM4v4lambda / T1; T3 = -T2 / T1 * Leff; dT2_dVd = T3 * dueff_dVd; dT2_dVg = T3 * dueff_dVg; dT2_dVb = T3 * dueff_dVb; - T5 = 1.0 / (Esat * pParam->BSIM4V4litl); + T5 = 1.0 / (Esat * pParam->BSIM4v4litl); T4 = -T5 / EsatL; dT5_dVg = dEsatL_dVg * T4; dT5_dVd = dEsatL_dVd * T4; @@ -1548,7 +1548,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dEsatL_dVb *= T10; dEsatL_dVb += EsatL * dT10_dVb; EsatL *= T10; - here->BSIM4V4EsatL = EsatL; + here->BSIM4v4EsatL = EsatL; } /* Calculate Vasat */ @@ -1577,8 +1577,8 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dVasat_dVd = dT0_dVd / T1; /* Calculate Idl first */ - tmp1 = here->BSIM4V4vtfbphi2; - tmp2 = 2.0e8 * model->BSIM4V4toxp; + tmp1 = here->BSIM4v4vtfbphi2; + tmp2 = 2.0e8 * model->BSIM4v4toxp; dT0_dVg = 1.0 / tmp2; T0 = (Vgsteff + tmp1) * dT0_dVg; @@ -1588,8 +1588,8 @@ for (; model != NULL; model = model->BSIM4V4nextModel) Tcen = 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 * dT0_dVg / T1; - Coxeff = EPSSI * model->BSIM4V4coxp - / (EPSSI + model->BSIM4V4coxp * Tcen); + Coxeff = EPSSI * model->BSIM4v4coxp + / (EPSSI + model->BSIM4v4coxp * Tcen); dCoxeff_dVg = -Coxeff * Coxeff * dTcen_dVg / EPSSI; CoxeffWovL = Coxeff * Weff / Leff; @@ -1600,8 +1600,8 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dbeta_dVd = CoxeffWovL * dueff_dVd; dbeta_dVb = CoxeffWovL * dueff_dVb + T3 * Coxeff * dWeff_dVb; - here->BSIM4V4AbovVgst2Vtm = Abulk / Vgst2Vtm; - T0 = 1.0 - 0.5 * Vdseff * here->BSIM4V4AbovVgst2Vtm; + here->BSIM4v4AbovVgst2Vtm = Abulk / Vgst2Vtm; + T0 = 1.0 - 0.5 * Vdseff * here->BSIM4v4AbovVgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; @@ -1637,18 +1637,18 @@ for (; model != NULL; model = model->BSIM4V4nextModel) /* Calculate degradation factor due to pocket implant */ - if (pParam->BSIM4V4fprout <= 0.0) + if (pParam->BSIM4v4fprout <= 0.0) { FP = 1.0; dFP_dVg = 0.0; } else - { T9 = pParam->BSIM4V4fprout * sqrt(Leff) / Vgst2Vtm; + { T9 = pParam->BSIM4v4fprout * sqrt(Leff) / Vgst2Vtm; FP = 1.0 / (1.0 + T9); dFP_dVg = FP * FP * T9 / Vgst2Vtm; } /* Calculate VACLM */ - T8 = pParam->BSIM4V4pvag / EsatL; + T8 = pParam->BSIM4v4pvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { PvagTerm = 1.0 + T9; @@ -1666,7 +1666,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dPvagTerm_dVd = -T9 * dEsatL_dVd; } - if ((pParam->BSIM4V4pclm > MIN_EXP) && (diffVds > 1.0e-10)) + if ((pParam->BSIM4v4pclm > MIN_EXP) && (diffVds > 1.0e-10)) { T0 = 1.0 + Rds * Idl; dT0_dVg = dRds_dVg * Idl + Rds * dIdl_dVg; dT0_dVd = Rds * dIdl_dVd; @@ -1678,7 +1678,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dT1_dVd = (dVdsat_dVd - T2 * dEsatL_dVd / Leff) / Esat; dT1_dVb = (dVdsat_dVb - T2 * dEsatL_dVb / Leff) / Esat; - Cclm = FP * PvagTerm * T0 * T1 / (pParam->BSIM4V4pclm * pParam->BSIM4V4litl); + Cclm = FP * PvagTerm * T0 * T1 / (pParam->BSIM4v4pclm * pParam->BSIM4v4litl); dCclm_dVg = Cclm * (dFP_dVg / FP + dPvagTerm_dVg / PvagTerm + dT0_dVg / T0 + dT1_dVg / T1); dCclm_dVb = Cclm * (dPvagTerm_dVb / PvagTerm + dT0_dVb / T0 @@ -1698,7 +1698,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) } /* Calculate VADIBL */ - if (pParam->BSIM4V4thetaRout > MIN_EXP) + if (pParam->BSIM4v4thetaRout > MIN_EXP) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 @@ -1712,18 +1712,18 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dT1_dVd = Abulk * dVdsat_dVd; T9 = T1 * T1; - T2 = pParam->BSIM4V4thetaRout; + T2 = pParam->BSIM4v4thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; - T7 = pParam->BSIM4V4pdiblb * Vbseff; + T7 = pParam->BSIM4v4pdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; - dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM4V4pdiblb) + dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM4v4pdiblb) * T3; dVADIBL_dVd *= T3; } @@ -1732,7 +1732,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - - VADIBL * pParam->BSIM4V4pdiblb * T4 * T4; + - VADIBL * pParam->BSIM4v4pdiblb * T4 * T4; dVADIBL_dVd *= T3; VADIBL *= T3; } @@ -1754,21 +1754,21 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dVa_dVd = dVasat_dVd + dVACLM_dVd; /* Calculate VADITS */ - T0 = pParam->BSIM4V4pditsd * Vds; + T0 = pParam->BSIM4v4pditsd * Vds; if (T0 > EXP_THRESHOLD) { T1 = MAX_EXP; dT1_dVd = 0; } else { T1 = exp(T0); - dT1_dVd = T1 * pParam->BSIM4V4pditsd; + dT1_dVd = T1 * pParam->BSIM4v4pditsd; } - if (pParam->BSIM4V4pdits > MIN_EXP) - { T2 = 1.0 + model->BSIM4V4pditsl * Leff; - VADITS = (1.0 + T2 * T1) / pParam->BSIM4V4pdits; + if (pParam->BSIM4v4pdits > MIN_EXP) + { T2 = 1.0 + model->BSIM4v4pditsl * Leff; + VADITS = (1.0 + T2 * T1) / pParam->BSIM4v4pdits; dVADITS_dVg = VADITS * dFP_dVg; - dVADITS_dVd = FP * T2 * dT1_dVd / pParam->BSIM4V4pdits; + dVADITS_dVd = FP * T2 * dT1_dVd / pParam->BSIM4v4pdits; VADITS *= FP; } else @@ -1777,18 +1777,18 @@ for (; model != NULL; model = model->BSIM4V4nextModel) } /* Calculate VASCBE */ - if (pParam->BSIM4V4pscbe2 > 0.0) - { if (diffVds > pParam->BSIM4V4pscbe1 * pParam->BSIM4V4litl + if (pParam->BSIM4v4pscbe2 > 0.0) + { if (diffVds > pParam->BSIM4v4pscbe1 * pParam->BSIM4v4litl / EXP_THRESHOLD) - { T0 = pParam->BSIM4V4pscbe1 * pParam->BSIM4V4litl / diffVds; - VASCBE = Leff * exp(T0) / pParam->BSIM4V4pscbe2; + { T0 = pParam->BSIM4v4pscbe1 * pParam->BSIM4v4litl / diffVds; + VASCBE = Leff * exp(T0) / pParam->BSIM4v4pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else - { VASCBE = MAX_EXP * Leff/pParam->BSIM4V4pscbe2; + { VASCBE = MAX_EXP * Leff/pParam->BSIM4v4pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } } @@ -1832,14 +1832,14 @@ for (; model != NULL; model = model->BSIM4V4nextModel) Idsa *= T9; /* Substrate current begins */ - tmp = pParam->BSIM4V4alpha0 + pParam->BSIM4V4alpha1 * Leff; - if ((tmp <= 0.0) || (pParam->BSIM4V4beta0 <= 0.0)) + tmp = pParam->BSIM4v4alpha0 + pParam->BSIM4v4alpha1 * Leff; + if ((tmp <= 0.0) || (pParam->BSIM4v4beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = tmp / Leff; - if (diffVds > pParam->BSIM4V4beta0 / EXP_THRESHOLD) - { T0 = -pParam->BSIM4V4beta0 / diffVds; + if (diffVds > pParam->BSIM4v4beta0 / EXP_THRESHOLD) + { T0 = -pParam->BSIM4v4beta0 / diffVds; T1 = T2 * diffVds * exp(T0); T3 = T1 / diffVds * (T0 - 1.0); dT1_dVg = T3 * dVdseff_dVg; @@ -1867,10 +1867,10 @@ for (; model != NULL; model = model->BSIM4V4nextModel) Gbg *= dVgsteff_dVg; Gbb *= dVbseff_dVb; } - here->BSIM4V4csub = Isub; - here->BSIM4V4gbbs = Gbb; - here->BSIM4V4gbgs = Gbg; - here->BSIM4V4gbds = Gbd; + here->BSIM4v4csub = Isub; + here->BSIM4v4gbbs = Gbb; + here->BSIM4v4gbgs = Gbg; + here->BSIM4v4gbds = Gbd; /* Add SCBE to Ids */ T9 = diffVds / VASCBE; @@ -1898,7 +1898,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) cdrain = Ids * Vdseff; /* Source End Velocity Limit */ - if((model->BSIM4V4vtlGiven) && (model->BSIM4V4vtl > 0.0) ) { + if((model->BSIM4v4vtlGiven) && (model->BSIM4v4vtl > 0.0) ) { T12 = 1.0 / Leff / CoxeffWovL; T11 = T12 / Vgsteff; T10 = -T11 / Vgsteff; @@ -1907,7 +1907,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dvs_dVd = Gds * T11 + cdrain * T10 * dVgsteff_dVd; dvs_dVb = Gmb * T11 + cdrain * T10 * dVgsteff_dVb; T0 = 2 * MM; - T1 = vs / (pParam->BSIM4V4vtl * pParam->BSIM4V4tfactor); + T1 = vs / (pParam->BSIM4v4vtl * pParam->BSIM4v4tfactor); if(T1 > 0.0) { T2 = 1.0 + exp(T0 * log(T1)); T3 = (T2 - 1.0) * T0 / vs; @@ -1935,61 +1935,61 @@ for (; model != NULL; model = model->BSIM4V4nextModel) cdrain *= Fsevl; } - here->BSIM4V4gds = Gds; - here->BSIM4V4gm = Gm; - here->BSIM4V4gmbs = Gmb; - here->BSIM4V4IdovVds = Ids; - if( here->BSIM4V4IdovVds <= 1.0e-9) here->BSIM4V4IdovVds = 1.0e-9; + here->BSIM4v4gds = Gds; + here->BSIM4v4gm = Gm; + here->BSIM4v4gmbs = Gmb; + here->BSIM4v4IdovVds = Ids; + if( here->BSIM4v4IdovVds <= 1.0e-9) here->BSIM4v4IdovVds = 1.0e-9; /* Calculate Rg */ - if ((here->BSIM4V4rgateMod > 1) || - (here->BSIM4V4trnqsMod != 0) || (here->BSIM4V4acnqsMod != 0)) - { T9 = pParam->BSIM4V4xrcrg2 * model->BSIM4V4vtm; + if ((here->BSIM4v4rgateMod > 1) || + (here->BSIM4v4trnqsMod != 0) || (here->BSIM4v4acnqsMod != 0)) + { T9 = pParam->BSIM4v4xrcrg2 * model->BSIM4v4vtm; T0 = T9 * beta; dT0_dVd = (dbeta_dVd + dbeta_dVg * dVgsteff_dVd) * T9; dT0_dVb = (dbeta_dVb + dbeta_dVg * dVgsteff_dVb) * T9; dT0_dVg = dbeta_dVg * T9; - here->BSIM4V4gcrg = pParam->BSIM4V4xrcrg1 * ( T0 + Ids); - here->BSIM4V4gcrgd = pParam->BSIM4V4xrcrg1 * (dT0_dVd + tmp1); - here->BSIM4V4gcrgb = pParam->BSIM4V4xrcrg1 * (dT0_dVb + tmp2) + here->BSIM4v4gcrg = pParam->BSIM4v4xrcrg1 * ( T0 + Ids); + here->BSIM4v4gcrgd = pParam->BSIM4v4xrcrg1 * (dT0_dVd + tmp1); + here->BSIM4v4gcrgb = pParam->BSIM4v4xrcrg1 * (dT0_dVb + tmp2) * dVbseff_dVb; - here->BSIM4V4gcrgg = pParam->BSIM4V4xrcrg1 * (dT0_dVg + tmp3) + here->BSIM4v4gcrgg = pParam->BSIM4v4xrcrg1 * (dT0_dVg + tmp3) * dVgsteff_dVg; - if (here->BSIM4V4nf != 1.0) - { here->BSIM4V4gcrg *= here->BSIM4V4nf; - here->BSIM4V4gcrgg *= here->BSIM4V4nf; - here->BSIM4V4gcrgd *= here->BSIM4V4nf; - here->BSIM4V4gcrgb *= here->BSIM4V4nf; + if (here->BSIM4v4nf != 1.0) + { here->BSIM4v4gcrg *= here->BSIM4v4nf; + here->BSIM4v4gcrgg *= here->BSIM4v4nf; + here->BSIM4v4gcrgd *= here->BSIM4v4nf; + here->BSIM4v4gcrgb *= here->BSIM4v4nf; } - if (here->BSIM4V4rgateMod == 2) - { T10 = here->BSIM4V4grgeltd * here->BSIM4V4grgeltd; - T11 = here->BSIM4V4grgeltd + here->BSIM4V4gcrg; - here->BSIM4V4gcrg = here->BSIM4V4grgeltd * here->BSIM4V4gcrg / T11; + if (here->BSIM4v4rgateMod == 2) + { T10 = here->BSIM4v4grgeltd * here->BSIM4v4grgeltd; + T11 = here->BSIM4v4grgeltd + here->BSIM4v4gcrg; + here->BSIM4v4gcrg = here->BSIM4v4grgeltd * here->BSIM4v4gcrg / T11; T12 = T10 / T11 / T11; - here->BSIM4V4gcrgg *= T12; - here->BSIM4V4gcrgd *= T12; - here->BSIM4V4gcrgb *= T12; + here->BSIM4v4gcrgg *= T12; + here->BSIM4v4gcrgd *= T12; + here->BSIM4v4gcrgb *= T12; } - here->BSIM4V4gcrgs = -(here->BSIM4V4gcrgg + here->BSIM4V4gcrgd - + here->BSIM4V4gcrgb); + here->BSIM4v4gcrgs = -(here->BSIM4v4gcrgg + here->BSIM4v4gcrgd + + here->BSIM4v4gcrgb); } /* Calculate bias-dependent external S/D resistance */ - if (model->BSIM4V4rdsMod) + if (model->BSIM4v4rdsMod) { /* Rs(V) */ - T0 = vgs - pParam->BSIM4V4vfbsd; + T0 = vgs - pParam->BSIM4v4vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgs_eff = 0.5 * (T0 + T1); dvgs_eff_dvg = vgs_eff / T1; - T0 = 1.0 + pParam->BSIM4V4prwg * vgs_eff; - dT0_dvg = -pParam->BSIM4V4prwg / T0 / T0 * dvgs_eff_dvg; - T1 = -pParam->BSIM4V4prwb * vbs; - dT1_dvb = -pParam->BSIM4V4prwb; + T0 = 1.0 + pParam->BSIM4v4prwg * vgs_eff; + dT0_dvg = -pParam->BSIM4v4prwg / T0 / T0 * dvgs_eff_dvg; + T1 = -pParam->BSIM4v4prwb * vbs; + dT1_dvb = -pParam->BSIM4v4prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); @@ -1997,29 +1997,29 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; - T4 = pParam->BSIM4V4rs0 * 0.5; - Rs = pParam->BSIM4V4rswmin + T3 * T4; + T4 = pParam->BSIM4v4rs0 * 0.5; + Rs = pParam->BSIM4v4rswmin + T3 * T4; dRs_dvg = T4 * dT3_dvg; dRs_dvb = T4 * dT3_dvb; - T0 = 1.0 + here->BSIM4V4sourceConductance * Rs; - here->BSIM4V4gstot = here->BSIM4V4sourceConductance / T0; - T0 = -here->BSIM4V4gstot * here->BSIM4V4gstot; + T0 = 1.0 + here->BSIM4v4sourceConductance * Rs; + here->BSIM4v4gstot = here->BSIM4v4sourceConductance / T0; + T0 = -here->BSIM4v4gstot * here->BSIM4v4gstot; dgstot_dvd = 0.0; /* place holder */ dgstot_dvg = T0 * dRs_dvg; dgstot_dvb = T0 * dRs_dvb; dgstot_dvs = -(dgstot_dvg + dgstot_dvb + dgstot_dvd); /* Rd(V) */ - T0 = vgd - pParam->BSIM4V4vfbsd; + T0 = vgd - pParam->BSIM4v4vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgd_eff = 0.5 * (T0 + T1); dvgd_eff_dvg = vgd_eff / T1; - T0 = 1.0 + pParam->BSIM4V4prwg * vgd_eff; - dT0_dvg = -pParam->BSIM4V4prwg / T0 / T0 * dvgd_eff_dvg; - T1 = -pParam->BSIM4V4prwb * vbd; - dT1_dvb = -pParam->BSIM4V4prwb; + T0 = 1.0 + pParam->BSIM4v4prwg * vgd_eff; + dT0_dvg = -pParam->BSIM4v4prwg / T0 / T0 * dvgd_eff_dvg; + T1 = -pParam->BSIM4v4prwb * vbd; + dT1_dvb = -pParam->BSIM4v4prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); @@ -2027,58 +2027,58 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; - T4 = pParam->BSIM4V4rd0 * 0.5; - Rd = pParam->BSIM4V4rdwmin + T3 * T4; + T4 = pParam->BSIM4v4rd0 * 0.5; + Rd = pParam->BSIM4v4rdwmin + T3 * T4; dRd_dvg = T4 * dT3_dvg; dRd_dvb = T4 * dT3_dvb; - T0 = 1.0 + here->BSIM4V4drainConductance * Rd; - here->BSIM4V4gdtot = here->BSIM4V4drainConductance / T0; - T0 = -here->BSIM4V4gdtot * here->BSIM4V4gdtot; + T0 = 1.0 + here->BSIM4v4drainConductance * Rd; + here->BSIM4v4gdtot = here->BSIM4v4drainConductance / T0; + T0 = -here->BSIM4v4gdtot * here->BSIM4v4gdtot; dgdtot_dvs = 0.0; dgdtot_dvg = T0 * dRd_dvg; dgdtot_dvb = T0 * dRd_dvb; dgdtot_dvd = -(dgdtot_dvg + dgdtot_dvb + dgdtot_dvs); - here->BSIM4V4gstotd = vses * dgstot_dvd; - here->BSIM4V4gstotg = vses * dgstot_dvg; - here->BSIM4V4gstots = vses * dgstot_dvs; - here->BSIM4V4gstotb = vses * dgstot_dvb; + here->BSIM4v4gstotd = vses * dgstot_dvd; + here->BSIM4v4gstotg = vses * dgstot_dvg; + here->BSIM4v4gstots = vses * dgstot_dvs; + here->BSIM4v4gstotb = vses * dgstot_dvb; T2 = vdes - vds; - here->BSIM4V4gdtotd = T2 * dgdtot_dvd; - here->BSIM4V4gdtotg = T2 * dgdtot_dvg; - here->BSIM4V4gdtots = T2 * dgdtot_dvs; - here->BSIM4V4gdtotb = T2 * dgdtot_dvb; + here->BSIM4v4gdtotd = T2 * dgdtot_dvd; + here->BSIM4v4gdtotg = T2 * dgdtot_dvg; + here->BSIM4v4gdtots = T2 * dgdtot_dvs; + here->BSIM4v4gdtotb = T2 * dgdtot_dvb; } else /* WDLiu: for bypass */ - { here->BSIM4V4gstot = here->BSIM4V4gstotd = here->BSIM4V4gstotg = 0.0; - here->BSIM4V4gstots = here->BSIM4V4gstotb = 0.0; - here->BSIM4V4gdtot = here->BSIM4V4gdtotd = here->BSIM4V4gdtotg = 0.0; - here->BSIM4V4gdtots = here->BSIM4V4gdtotb = 0.0; + { here->BSIM4v4gstot = here->BSIM4v4gstotd = here->BSIM4v4gstotg = 0.0; + here->BSIM4v4gstots = here->BSIM4v4gstotb = 0.0; + here->BSIM4v4gdtot = here->BSIM4v4gdtotd = here->BSIM4v4gdtotg = 0.0; + here->BSIM4v4gdtots = here->BSIM4v4gdtotb = 0.0; } /* Calculate GIDL current */ - vgs_eff = here->BSIM4V4vgs_eff; - dvgs_eff_dvg = here->BSIM4V4dvgs_eff_dvg; - T0 = 3.0 * model->BSIM4V4toxe; + vgs_eff = here->BSIM4v4vgs_eff; + dvgs_eff_dvg = here->BSIM4v4dvgs_eff_dvg; + T0 = 3.0 * model->BSIM4v4toxe; - T1 = (vds - vgs_eff - pParam->BSIM4V4egidl ) / T0; - if ((pParam->BSIM4V4agidl <= 0.0) || (pParam->BSIM4V4bgidl <= 0.0) - || (T1 <= 0.0) || (pParam->BSIM4V4cgidl <= 0.0) || (vbd > 0.0)) + T1 = (vds - vgs_eff - pParam->BSIM4v4egidl ) / T0; + if ((pParam->BSIM4v4agidl <= 0.0) || (pParam->BSIM4v4bgidl <= 0.0) + || (T1 <= 0.0) || (pParam->BSIM4v4cgidl <= 0.0) || (vbd > 0.0)) Igidl = Ggidld = Ggidlg = Ggidlb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgs_eff_dvg * dT1_dVd; - T2 = pParam->BSIM4V4bgidl / T1; + T2 = pParam->BSIM4v4bgidl / T1; if (T2 < 100.0) - { Igidl = pParam->BSIM4V4agidl * pParam->BSIM4V4weffCJ * T1 * exp(-T2); + { Igidl = pParam->BSIM4v4agidl * pParam->BSIM4v4weffCJ * T1 * exp(-T2); T3 = Igidl * (1.0 + T2) / T1; Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; } else - { Igidl = pParam->BSIM4V4agidl * pParam->BSIM4V4weffCJ * 3.720075976e-44; + { Igidl = pParam->BSIM4v4agidl * pParam->BSIM4v4weffCJ * 3.720075976e-44; Ggidld = Igidl * dT1_dVd; Ggidlg = Igidl * dT1_dVg; Igidl *= T1; @@ -2086,40 +2086,40 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T4 = vbd * vbd; T5 = -vbd * T4; - T6 = pParam->BSIM4V4cgidl + T5; + T6 = pParam->BSIM4v4cgidl + T5; T7 = T5 / T6; - T8 = 3.0 * pParam->BSIM4V4cgidl * T4 / T6 / T6; + T8 = 3.0 * pParam->BSIM4v4cgidl * T4 / T6 / T6; Ggidld = Ggidld * T7 + Igidl * T8; Ggidlg = Ggidlg * T7; Ggidlb = -Igidl * T8; Igidl *= T7; } - here->BSIM4V4Igidl = Igidl; - here->BSIM4V4ggidld = Ggidld; - here->BSIM4V4ggidlg = Ggidlg; - here->BSIM4V4ggidlb = Ggidlb; + here->BSIM4v4Igidl = Igidl; + here->BSIM4v4ggidld = Ggidld; + here->BSIM4v4ggidlg = Ggidlg; + here->BSIM4v4ggidlb = Ggidlb; /* Calculate GISL current */ - vgd_eff = here->BSIM4V4vgd_eff; - dvgd_eff_dvg = here->BSIM4V4dvgd_eff_dvg; + vgd_eff = here->BSIM4v4vgd_eff; + dvgd_eff_dvg = here->BSIM4v4dvgd_eff_dvg; - T1 = (-vds - vgd_eff - pParam->BSIM4V4egidl ) / T0; + T1 = (-vds - vgd_eff - pParam->BSIM4v4egidl ) / T0; - if ((pParam->BSIM4V4agidl <= 0.0) || (pParam->BSIM4V4bgidl <= 0.0) - || (T1 <= 0.0) || (pParam->BSIM4V4cgidl <= 0.0) || (vbs > 0.0)) + if ((pParam->BSIM4v4agidl <= 0.0) || (pParam->BSIM4v4bgidl <= 0.0) + || (T1 <= 0.0) || (pParam->BSIM4v4cgidl <= 0.0) || (vbs > 0.0)) Igisl = Ggisls = Ggislg = Ggislb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgd_eff_dvg * dT1_dVd; - T2 = pParam->BSIM4V4bgidl / T1; + T2 = pParam->BSIM4v4bgidl / T1; if (T2 < 100.0) - { Igisl = pParam->BSIM4V4agidl * pParam->BSIM4V4weffCJ * T1 * exp(-T2); + { Igisl = pParam->BSIM4v4agidl * pParam->BSIM4v4weffCJ * T1 * exp(-T2); T3 = Igisl * (1.0 + T2) / T1; Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; } else - { Igisl = pParam->BSIM4V4agidl * pParam->BSIM4V4weffCJ * 3.720075976e-44; + { Igisl = pParam->BSIM4v4agidl * pParam->BSIM4v4weffCJ * 3.720075976e-44; Ggisls = Igisl * dT1_dVd; Ggislg = Igisl * dT1_dVg; Igisl *= T1; @@ -2127,23 +2127,23 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T4 = vbs * vbs; T5 = -vbs * T4; - T6 = pParam->BSIM4V4cgidl + T5; + T6 = pParam->BSIM4v4cgidl + T5; T7 = T5 / T6; - T8 = 3.0 * pParam->BSIM4V4cgidl * T4 / T6 / T6; + T8 = 3.0 * pParam->BSIM4v4cgidl * T4 / T6 / T6; Ggisls = Ggisls * T7 + Igisl * T8; Ggislg = Ggislg * T7; Ggislb = -Igisl * T8; Igisl *= T7; } - here->BSIM4V4Igisl = Igisl; - here->BSIM4V4ggisls = Ggisls; - here->BSIM4V4ggislg = Ggislg; - here->BSIM4V4ggislb = Ggislb; + here->BSIM4v4Igisl = Igisl; + here->BSIM4v4ggisls = Ggisls; + here->BSIM4v4ggislg = Ggislg; + here->BSIM4v4ggislb = Ggislb; /* Calculate gate tunneling current */ - if ((model->BSIM4V4igcMod != 0) || (model->BSIM4V4igbMod != 0)) - { Vfb = here->BSIM4V4vfbzb; + if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) + { Vfb = here->BSIM4v4vfbzb; V3 = Vfb - Vgs_eff + Vbseff - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); @@ -2160,9 +2160,9 @@ for (; model != NULL; model = model->BSIM4V4nextModel) if (Voxacc < 0.0) /* WDLiu: Avoiding numerical instability. */ Voxacc = dVoxacc_dVg = dVoxacc_dVb = 0.0; - T0 = 0.5 * pParam->BSIM4V4k1ox; + T0 = 0.5 * pParam->BSIM4v4k1ox; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; - if (pParam->BSIM4V4k1ox == 0.0) + if (pParam->BSIM4v4k1ox == 0.0) Voxdepinv = dVoxdepinv_dVg = dVoxdepinv_dVd = dVoxdepinv_dVb = 0.0; else if (T3 < 0.0) @@ -2175,7 +2175,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) else { T1 = sqrt(T0 * T0 + T3); T2 = T0 / T1; - Voxdepinv = pParam->BSIM4V4k1ox * (T1 - T0); + Voxdepinv = pParam->BSIM4v4k1ox * (T1 - T0); dVoxdepinv_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dVoxdepinv_dVd = -T2 * dVgsteff_dVd; @@ -2188,11 +2188,11 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dVoxdepinv_dVb += dVgsteff_dVb; } - if (model->BSIM4V4igcMod) - { T0 = Vtm * pParam->BSIM4V4nigc; - VxNVt = (Vgs_eff - model->BSIM4V4type * here->BSIM4V4vth0) / T0; + if (model->BSIM4v4igcMod) + { T0 = Vtm * pParam->BSIM4v4nigc; + VxNVt = (Vgs_eff - model->BSIM4v4type * here->BSIM4v4vth0) / T0; if (VxNVt > EXP_THRESHOLD) - { Vaux = Vgs_eff - model->BSIM4V4type * here->BSIM4V4vth0; + { Vaux = Vgs_eff - model->BSIM4v4type * here->BSIM4v4vth0; dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = 0.0; dVaux_dVb = 0.0; @@ -2215,12 +2215,12 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dT2_dVd = Vgs_eff * dVaux_dVd; dT2_dVb = Vgs_eff * dVaux_dVb; - T11 = pParam->BSIM4V4Aechvb; - T12 = pParam->BSIM4V4Bechvb; - T3 = pParam->BSIM4V4aigc * pParam->BSIM4V4cigc - - pParam->BSIM4V4bigc; - T4 = pParam->BSIM4V4bigc * pParam->BSIM4V4cigc; - T5 = T12 * (pParam->BSIM4V4aigc + T3 * Voxdepinv + T11 = pParam->BSIM4v4Aechvb; + T12 = pParam->BSIM4v4Bechvb; + T3 = pParam->BSIM4v4aigc * pParam->BSIM4v4cigc + - pParam->BSIM4v4bigc; + T4 = pParam->BSIM4v4bigc * pParam->BSIM4v4cigc; + T5 = T12 * (pParam->BSIM4v4aigc + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) @@ -2244,12 +2244,12 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dIgc_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); - if (model->BSIM4V4pigcdGiven) - { Pigcd = pParam->BSIM4V4pigcd; + if (model->BSIM4v4pigcdGiven) + { Pigcd = pParam->BSIM4v4pigcd; dPigcd_dVg = dPigcd_dVd = dPigcd_dVb = 0.0; } else - { T11 = pParam->BSIM4V4Bechvb * model->BSIM4V4toxe; + { T11 = pParam->BSIM4v4Bechvb * model->BSIM4v4toxe; T12 = Vgsteff + 1.0e-20; T13 = T11 / T12 / T12; T14 = -T13 / T12; @@ -2315,27 +2315,27 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dIgcd_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcd_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; - here->BSIM4V4Igcs = Igcs; - here->BSIM4V4gIgcsg = dIgcs_dVg; - here->BSIM4V4gIgcsd = dIgcs_dVd; - here->BSIM4V4gIgcsb = dIgcs_dVb * dVbseff_dVb; - here->BSIM4V4Igcd = Igcd; - here->BSIM4V4gIgcdg = dIgcd_dVg; - here->BSIM4V4gIgcdd = dIgcd_dVd; - here->BSIM4V4gIgcdb = dIgcd_dVb * dVbseff_dVb; + here->BSIM4v4Igcs = Igcs; + here->BSIM4v4gIgcsg = dIgcs_dVg; + here->BSIM4v4gIgcsd = dIgcs_dVd; + here->BSIM4v4gIgcsb = dIgcs_dVb * dVbseff_dVb; + here->BSIM4v4Igcd = Igcd; + here->BSIM4v4gIgcdg = dIgcd_dVg; + here->BSIM4v4gIgcdd = dIgcd_dVd; + here->BSIM4v4gIgcdb = dIgcd_dVb * dVbseff_dVb; - T0 = vgs - (pParam->BSIM4V4vfbsd + pParam->BSIM4V4vfbsdoff); + T0 = vgs - (pParam->BSIM4v4vfbsd + pParam->BSIM4v4vfbsdoff); vgs_eff = sqrt(T0 * T0 + 1.0e-4); dvgs_eff_dvg = T0 / vgs_eff; T2 = vgs * vgs_eff; dT2_dVg = vgs * dvgs_eff_dvg + vgs_eff; - T11 = pParam->BSIM4V4AechvbEdge; - T12 = pParam->BSIM4V4BechvbEdge; - T3 = pParam->BSIM4V4aigsd * pParam->BSIM4V4cigsd - - pParam->BSIM4V4bigsd; - T4 = pParam->BSIM4V4bigsd * pParam->BSIM4V4cigsd; - T5 = T12 * (pParam->BSIM4V4aigsd + T3 * vgs_eff + T11 = pParam->BSIM4v4AechvbEdge; + T12 = pParam->BSIM4v4BechvbEdge; + T3 = pParam->BSIM4v4aigsd * pParam->BSIM4v4cigsd + - pParam->BSIM4v4bigsd; + T4 = pParam->BSIM4v4bigsd * pParam->BSIM4v4cigsd; + T5 = T12 * (pParam->BSIM4v4aigsd + T3 * vgs_eff - T4 * vgs_eff * vgs_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; @@ -2355,13 +2355,13 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dIgs_dVs = -dIgs_dVg; - T0 = vgd - (pParam->BSIM4V4vfbsd + pParam->BSIM4V4vfbsdoff); + T0 = vgd - (pParam->BSIM4v4vfbsd + pParam->BSIM4v4vfbsdoff); vgd_eff = sqrt(T0 * T0 + 1.0e-4); dvgd_eff_dvg = T0 / vgd_eff; T2 = vgd * vgd_eff; dT2_dVg = vgd * dvgd_eff_dvg + vgd_eff; - T5 = T12 * (pParam->BSIM4V4aigsd + T3 * vgd_eff + T5 = T12 * (pParam->BSIM4v4aigsd + T3 * vgd_eff - T4 * vgd_eff * vgd_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; @@ -2380,24 +2380,24 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dIgd_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgd_dVd = -dIgd_dVg; - here->BSIM4V4Igs = Igs; - here->BSIM4V4gIgsg = dIgs_dVg; - here->BSIM4V4gIgss = dIgs_dVs; - here->BSIM4V4Igd = Igd; - here->BSIM4V4gIgdg = dIgd_dVg; - here->BSIM4V4gIgdd = dIgd_dVd; + here->BSIM4v4Igs = Igs; + here->BSIM4v4gIgsg = dIgs_dVg; + here->BSIM4v4gIgss = dIgs_dVs; + here->BSIM4v4Igd = Igd; + here->BSIM4v4gIgdg = dIgd_dVg; + here->BSIM4v4gIgdd = dIgd_dVd; } else - { here->BSIM4V4Igcs = here->BSIM4V4gIgcsg = here->BSIM4V4gIgcsd - = here->BSIM4V4gIgcsb = 0.0; - here->BSIM4V4Igcd = here->BSIM4V4gIgcdg = here->BSIM4V4gIgcdd - = here->BSIM4V4gIgcdb = 0.0; - here->BSIM4V4Igs = here->BSIM4V4gIgsg = here->BSIM4V4gIgss = 0.0; - here->BSIM4V4Igd = here->BSIM4V4gIgdg = here->BSIM4V4gIgdd = 0.0; + { here->BSIM4v4Igcs = here->BSIM4v4gIgcsg = here->BSIM4v4gIgcsd + = here->BSIM4v4gIgcsb = 0.0; + here->BSIM4v4Igcd = here->BSIM4v4gIgcdg = here->BSIM4v4gIgcdd + = here->BSIM4v4gIgcdb = 0.0; + here->BSIM4v4Igs = here->BSIM4v4gIgsg = here->BSIM4v4gIgss = 0.0; + here->BSIM4v4Igd = here->BSIM4v4gIgdg = here->BSIM4v4gIgdd = 0.0; } - if (model->BSIM4V4igbMod) - { T0 = Vtm * pParam->BSIM4V4nigbacc; + if (model->BSIM4v4igbMod) + { T0 = Vtm * pParam->BSIM4v4nigbacc; T1 = -Vgs_eff + Vbseff + Vfb; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) @@ -2420,13 +2420,13 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; - T11 = 4.97232e-7 * pParam->BSIM4V4weff - * pParam->BSIM4V4leff * pParam->BSIM4V4ToxRatio; - T12 = -7.45669e11 * model->BSIM4V4toxe; - T3 = pParam->BSIM4V4aigbacc * pParam->BSIM4V4cigbacc - - pParam->BSIM4V4bigbacc; - T4 = pParam->BSIM4V4bigbacc * pParam->BSIM4V4cigbacc; - T5 = T12 * (pParam->BSIM4V4aigbacc + T3 * Voxacc + T11 = 4.97232e-7 * pParam->BSIM4v4weff + * pParam->BSIM4v4leff * pParam->BSIM4v4ToxRatio; + T12 = -7.45669e11 * model->BSIM4v4toxe; + T3 = pParam->BSIM4v4aigbacc * pParam->BSIM4v4cigbacc + - pParam->BSIM4v4bigbacc; + T4 = pParam->BSIM4v4bigbacc * pParam->BSIM4v4cigbacc; + T5 = T12 * (pParam->BSIM4v4aigbacc + T3 * Voxacc - T4 * Voxacc * Voxacc); if (T5 > EXP_THRESHOLD) @@ -2449,8 +2449,8 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dIgbacc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); - T0 = Vtm * pParam->BSIM4V4nigbinv; - T1 = Voxdepinv - pParam->BSIM4V4eigbinv; + T0 = Vtm * pParam->BSIM4v4nigbinv; + T1 = Voxdepinv - pParam->BSIM4v4eigbinv; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; @@ -2478,10 +2478,10 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T11 *= 0.75610; T12 *= 1.31724; - T3 = pParam->BSIM4V4aigbinv * pParam->BSIM4V4cigbinv - - pParam->BSIM4V4bigbinv; - T4 = pParam->BSIM4V4bigbinv * pParam->BSIM4V4cigbinv; - T5 = T12 * (pParam->BSIM4V4aigbinv + T3 * Voxdepinv + T3 = pParam->BSIM4v4aigbinv * pParam->BSIM4v4cigbinv + - pParam->BSIM4v4bigbinv; + T4 = pParam->BSIM4v4bigbinv * pParam->BSIM4v4cigbinv; + T5 = T12 * (pParam->BSIM4v4aigbinv + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) @@ -2505,75 +2505,75 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dIgbinv_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgbinv_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); - here->BSIM4V4Igb = Igbinv + Igbacc; - here->BSIM4V4gIgbg = dIgbinv_dVg + dIgbacc_dVg; - here->BSIM4V4gIgbd = dIgbinv_dVd; - here->BSIM4V4gIgbb = (dIgbinv_dVb + dIgbacc_dVb) * dVbseff_dVb; + here->BSIM4v4Igb = Igbinv + Igbacc; + here->BSIM4v4gIgbg = dIgbinv_dVg + dIgbacc_dVg; + here->BSIM4v4gIgbd = dIgbinv_dVd; + here->BSIM4v4gIgbb = (dIgbinv_dVb + dIgbacc_dVb) * dVbseff_dVb; } else - { here->BSIM4V4Igb = here->BSIM4V4gIgbg = here->BSIM4V4gIgbd - = here->BSIM4V4gIgbs = here->BSIM4V4gIgbb = 0.0; + { here->BSIM4v4Igb = here->BSIM4v4gIgbg = here->BSIM4v4gIgbd + = here->BSIM4v4gIgbs = here->BSIM4v4gIgbb = 0.0; } /* End of Gate current */ - if (here->BSIM4V4nf != 1.0) - { cdrain *= here->BSIM4V4nf; - here->BSIM4V4gds *= here->BSIM4V4nf; - here->BSIM4V4gm *= here->BSIM4V4nf; - here->BSIM4V4gmbs *= here->BSIM4V4nf; - here->BSIM4V4IdovVds *= here->BSIM4V4nf; + if (here->BSIM4v4nf != 1.0) + { cdrain *= here->BSIM4v4nf; + here->BSIM4v4gds *= here->BSIM4v4nf; + here->BSIM4v4gm *= here->BSIM4v4nf; + here->BSIM4v4gmbs *= here->BSIM4v4nf; + here->BSIM4v4IdovVds *= here->BSIM4v4nf; - here->BSIM4V4gbbs *= here->BSIM4V4nf; - here->BSIM4V4gbgs *= here->BSIM4V4nf; - here->BSIM4V4gbds *= here->BSIM4V4nf; - here->BSIM4V4csub *= here->BSIM4V4nf; - - here->BSIM4V4Igidl *= here->BSIM4V4nf; - here->BSIM4V4ggidld *= here->BSIM4V4nf; - here->BSIM4V4ggidlg *= here->BSIM4V4nf; - here->BSIM4V4ggidlb *= here->BSIM4V4nf; + here->BSIM4v4gbbs *= here->BSIM4v4nf; + here->BSIM4v4gbgs *= here->BSIM4v4nf; + here->BSIM4v4gbds *= here->BSIM4v4nf; + here->BSIM4v4csub *= here->BSIM4v4nf; + + here->BSIM4v4Igidl *= here->BSIM4v4nf; + here->BSIM4v4ggidld *= here->BSIM4v4nf; + here->BSIM4v4ggidlg *= here->BSIM4v4nf; + here->BSIM4v4ggidlb *= here->BSIM4v4nf; - here->BSIM4V4Igisl *= here->BSIM4V4nf; - here->BSIM4V4ggisls *= here->BSIM4V4nf; - here->BSIM4V4ggislg *= here->BSIM4V4nf; - here->BSIM4V4ggislb *= here->BSIM4V4nf; - - here->BSIM4V4Igcs *= here->BSIM4V4nf; - here->BSIM4V4gIgcsg *= here->BSIM4V4nf; - here->BSIM4V4gIgcsd *= here->BSIM4V4nf; - here->BSIM4V4gIgcsb *= here->BSIM4V4nf; - here->BSIM4V4Igcd *= here->BSIM4V4nf; - here->BSIM4V4gIgcdg *= here->BSIM4V4nf; - here->BSIM4V4gIgcdd *= here->BSIM4V4nf; - here->BSIM4V4gIgcdb *= here->BSIM4V4nf; - - here->BSIM4V4Igs *= here->BSIM4V4nf; - here->BSIM4V4gIgsg *= here->BSIM4V4nf; - here->BSIM4V4gIgss *= here->BSIM4V4nf; - here->BSIM4V4Igd *= here->BSIM4V4nf; - here->BSIM4V4gIgdg *= here->BSIM4V4nf; - here->BSIM4V4gIgdd *= here->BSIM4V4nf; - - here->BSIM4V4Igb *= here->BSIM4V4nf; - here->BSIM4V4gIgbg *= here->BSIM4V4nf; - here->BSIM4V4gIgbd *= here->BSIM4V4nf; - here->BSIM4V4gIgbb *= here->BSIM4V4nf; + here->BSIM4v4Igisl *= here->BSIM4v4nf; + here->BSIM4v4ggisls *= here->BSIM4v4nf; + here->BSIM4v4ggislg *= here->BSIM4v4nf; + here->BSIM4v4ggislb *= here->BSIM4v4nf; + + here->BSIM4v4Igcs *= here->BSIM4v4nf; + here->BSIM4v4gIgcsg *= here->BSIM4v4nf; + here->BSIM4v4gIgcsd *= here->BSIM4v4nf; + here->BSIM4v4gIgcsb *= here->BSIM4v4nf; + here->BSIM4v4Igcd *= here->BSIM4v4nf; + here->BSIM4v4gIgcdg *= here->BSIM4v4nf; + here->BSIM4v4gIgcdd *= here->BSIM4v4nf; + here->BSIM4v4gIgcdb *= here->BSIM4v4nf; + + here->BSIM4v4Igs *= here->BSIM4v4nf; + here->BSIM4v4gIgsg *= here->BSIM4v4nf; + here->BSIM4v4gIgss *= here->BSIM4v4nf; + here->BSIM4v4Igd *= here->BSIM4v4nf; + here->BSIM4v4gIgdg *= here->BSIM4v4nf; + here->BSIM4v4gIgdd *= here->BSIM4v4nf; + + here->BSIM4v4Igb *= here->BSIM4v4nf; + here->BSIM4v4gIgbg *= here->BSIM4v4nf; + here->BSIM4v4gIgbd *= here->BSIM4v4nf; + here->BSIM4v4gIgbb *= here->BSIM4v4nf; } - here->BSIM4V4ggidls = -(here->BSIM4V4ggidld + here->BSIM4V4ggidlg - + here->BSIM4V4ggidlb); - here->BSIM4V4ggisld = -(here->BSIM4V4ggisls + here->BSIM4V4ggislg - + here->BSIM4V4ggislb); - here->BSIM4V4gIgbs = -(here->BSIM4V4gIgbg + here->BSIM4V4gIgbd - + here->BSIM4V4gIgbb); - here->BSIM4V4gIgcss = -(here->BSIM4V4gIgcsg + here->BSIM4V4gIgcsd - + here->BSIM4V4gIgcsb); - here->BSIM4V4gIgcds = -(here->BSIM4V4gIgcdg + here->BSIM4V4gIgcdd - + here->BSIM4V4gIgcdb); - here->BSIM4V4cd = cdrain; - - - if (model->BSIM4V4tnoiMod == 0) - { Abulk = Abulk0 * pParam->BSIM4V4abulkCVfactor; + here->BSIM4v4ggidls = -(here->BSIM4v4ggidld + here->BSIM4v4ggidlg + + here->BSIM4v4ggidlb); + here->BSIM4v4ggisld = -(here->BSIM4v4ggisls + here->BSIM4v4ggislg + + here->BSIM4v4ggislb); + here->BSIM4v4gIgbs = -(here->BSIM4v4gIgbg + here->BSIM4v4gIgbd + + here->BSIM4v4gIgbb); + here->BSIM4v4gIgcss = -(here->BSIM4v4gIgcsg + here->BSIM4v4gIgcsd + + here->BSIM4v4gIgcsb); + here->BSIM4v4gIgcds = -(here->BSIM4v4gIgcdg + here->BSIM4v4gIgcdd + + here->BSIM4v4gIgcdb); + here->BSIM4v4cd = cdrain; + + + if (model->BSIM4v4tnoiMod == 0) + { Abulk = Abulk0 * pParam->BSIM4v4abulkCVfactor; Vdsat = Vgsteff / Abulk; T0 = Vdsat - Vds - DELTA_4; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * Vdsat); @@ -2592,47 +2592,47 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = Vdseff / T1; T3 = T0 * T2; - here->BSIM4V4qinv = Coxeff * pParam->BSIM4V4weffCV * here->BSIM4V4nf - * pParam->BSIM4V4leffCV + here->BSIM4v4qinv = Coxeff * pParam->BSIM4v4weffCV * here->BSIM4v4nf + * pParam->BSIM4v4leffCV * (Vgsteff - 0.5 * T0 + Abulk * T3); } /* - * BSIM4V4 C-V begins + * BSIM4v4 C-V begins */ - if ((model->BSIM4V4xpart < 0) || (!ChargeComputationNeeded)) + if ((model->BSIM4v4xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; - here->BSIM4V4cggb = here->BSIM4V4cgsb = here->BSIM4V4cgdb = 0.0; - here->BSIM4V4cdgb = here->BSIM4V4cdsb = here->BSIM4V4cddb = 0.0; - here->BSIM4V4cbgb = here->BSIM4V4cbsb = here->BSIM4V4cbdb = 0.0; - here->BSIM4V4csgb = here->BSIM4V4cssb = here->BSIM4V4csdb = 0.0; - here->BSIM4V4cgbb = here->BSIM4V4csbb = here->BSIM4V4cdbb = here->BSIM4V4cbbb = 0.0; - here->BSIM4V4cqdb = here->BSIM4V4cqsb = here->BSIM4V4cqgb - = here->BSIM4V4cqbb = 0.0; - here->BSIM4V4gtau = 0.0; + here->BSIM4v4cggb = here->BSIM4v4cgsb = here->BSIM4v4cgdb = 0.0; + here->BSIM4v4cdgb = here->BSIM4v4cdsb = here->BSIM4v4cddb = 0.0; + here->BSIM4v4cbgb = here->BSIM4v4cbsb = here->BSIM4v4cbdb = 0.0; + here->BSIM4v4csgb = here->BSIM4v4cssb = here->BSIM4v4csdb = 0.0; + here->BSIM4v4cgbb = here->BSIM4v4csbb = here->BSIM4v4cdbb = here->BSIM4v4cbbb = 0.0; + here->BSIM4v4cqdb = here->BSIM4v4cqsb = here->BSIM4v4cqgb + = here->BSIM4v4cqbb = 0.0; + here->BSIM4v4gtau = 0.0; goto finished; } - else if (model->BSIM4V4capMod == 0) + else if (model->BSIM4v4capMod == 0) { if (Vbseff < 0.0) { Vbseff = Vbs; dVbseff_dVb = 1.0; } else - { Vbseff = pParam->BSIM4V4phi - Phis; + { Vbseff = pParam->BSIM4v4phi - Phis; dVbseff_dVb = -dPhis_dVb; } - Vfb = pParam->BSIM4V4vfbcv; - Vth = Vfb + pParam->BSIM4V4phi + pParam->BSIM4V4k1ox * sqrtPhis; + Vfb = pParam->BSIM4v4vfbcv; + Vth = Vfb + pParam->BSIM4v4phi + pParam->BSIM4v4k1ox * sqrtPhis; Vgst = Vgs_eff - Vth; - dVth_dVb = pParam->BSIM4V4k1ox * dsqrtPhis_dVb; + dVth_dVb = pParam->BSIM4v4k1ox * dsqrtPhis_dVb; dVgst_dVb = -dVth_dVb; dVgst_dVg = dVgs_eff_dVg; - CoxWL = model->BSIM4V4coxe * pParam->BSIM4V4weffCV - * pParam->BSIM4V4leffCV * here->BSIM4V4nf; + CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV + * pParam->BSIM4v4leffCV * here->BSIM4v4nf; Arg1 = Vgs_eff - Vbseff - Vfb; if (Arg1 <= 0.0) @@ -2640,74 +2640,74 @@ for (; model != NULL; model = model->BSIM4V4nextModel) qbulk = -qgate; qdrn = 0.0; - here->BSIM4V4cggb = CoxWL * dVgs_eff_dVg; - here->BSIM4V4cgdb = 0.0; - here->BSIM4V4cgsb = CoxWL * (dVbseff_dVb - dVgs_eff_dVg); + here->BSIM4v4cggb = CoxWL * dVgs_eff_dVg; + here->BSIM4v4cgdb = 0.0; + here->BSIM4v4cgsb = CoxWL * (dVbseff_dVb - dVgs_eff_dVg); - here->BSIM4V4cdgb = 0.0; - here->BSIM4V4cddb = 0.0; - here->BSIM4V4cdsb = 0.0; + here->BSIM4v4cdgb = 0.0; + here->BSIM4v4cddb = 0.0; + here->BSIM4v4cdsb = 0.0; - here->BSIM4V4cbgb = -CoxWL * dVgs_eff_dVg; - here->BSIM4V4cbdb = 0.0; - here->BSIM4V4cbsb = -here->BSIM4V4cgsb; + here->BSIM4v4cbgb = -CoxWL * dVgs_eff_dVg; + here->BSIM4v4cbdb = 0.0; + here->BSIM4v4cbsb = -here->BSIM4v4cgsb; } /* Arg1 <= 0.0, end of accumulation */ else if (Vgst <= 0.0) - { T1 = 0.5 * pParam->BSIM4V4k1ox; + { T1 = 0.5 * pParam->BSIM4v4k1ox; T2 = sqrt(T1 * T1 + Arg1); - qgate = CoxWL * pParam->BSIM4V4k1ox * (T2 - T1); + qgate = CoxWL * pParam->BSIM4v4k1ox * (T2 - T1); qbulk = -qgate; qdrn = 0.0; T0 = CoxWL * T1 / T2; - here->BSIM4V4cggb = T0 * dVgs_eff_dVg; - here->BSIM4V4cgdb = 0.0; - here->BSIM4V4cgsb = T0 * (dVbseff_dVb - dVgs_eff_dVg); + here->BSIM4v4cggb = T0 * dVgs_eff_dVg; + here->BSIM4v4cgdb = 0.0; + here->BSIM4v4cgsb = T0 * (dVbseff_dVb - dVgs_eff_dVg); - here->BSIM4V4cdgb = 0.0; - here->BSIM4V4cddb = 0.0; - here->BSIM4V4cdsb = 0.0; + here->BSIM4v4cdgb = 0.0; + here->BSIM4v4cddb = 0.0; + here->BSIM4v4cdsb = 0.0; - here->BSIM4V4cbgb = -here->BSIM4V4cggb; - here->BSIM4V4cbdb = 0.0; - here->BSIM4V4cbsb = -here->BSIM4V4cgsb; + here->BSIM4v4cbgb = -here->BSIM4v4cggb; + here->BSIM4v4cbdb = 0.0; + here->BSIM4v4cbsb = -here->BSIM4v4cgsb; } /* Vgst <= 0.0, end of depletion */ else { One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; - AbulkCV = Abulk0 * pParam->BSIM4V4abulkCVfactor; - dAbulkCV_dVb = pParam->BSIM4V4abulkCVfactor * dAbulk0_dVb; + AbulkCV = Abulk0 * pParam->BSIM4v4abulkCVfactor; + dAbulkCV_dVb = pParam->BSIM4v4abulkCVfactor * dAbulk0_dVb; Vdsat = Vgst / AbulkCV; dVdsat_dVg = dVgs_eff_dVg / AbulkCV; dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)/ AbulkCV; - if (model->BSIM4V4xpart > 0.5) + if (model->BSIM4v4xpart > 0.5) { /* 0/100 Charge partition model */ if (Vdsat <= Vds) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - - pParam->BSIM4V4phi - T1); + - pParam->BSIM4v4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.0; - here->BSIM4V4cggb = One_Third_CoxWL * (3.0 + here->BSIM4v4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; - here->BSIM4V4cgsb = -(here->BSIM4V4cggb + T2); - here->BSIM4V4cgdb = 0.0; + here->BSIM4v4cgsb = -(here->BSIM4v4cggb + T2); + here->BSIM4v4cgdb = 0.0; - here->BSIM4V4cdgb = 0.0; - here->BSIM4V4cddb = 0.0; - here->BSIM4V4cdsb = 0.0; + here->BSIM4v4cdgb = 0.0; + here->BSIM4v4cddb = 0.0; + here->BSIM4v4cdsb = 0.0; - here->BSIM4V4cbgb = -(here->BSIM4V4cggb + here->BSIM4v4cbgb = -(here->BSIM4v4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); - here->BSIM4V4cbsb = -(here->BSIM4V4cbgb + T3); - here->BSIM4V4cbdb = 0.0; + here->BSIM4v4cbsb = -(here->BSIM4v4cbgb + T3); + here->BSIM4v4cbdb = 0.0; } else { /* linear region */ @@ -2720,30 +2720,30 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T7 = 2.0 * Vds - T1 - 3.0 * T3; T8 = T3 - T1 - 2.0 * Vds; qgate = CoxWL * (Vgs_eff - Vfb - - pParam->BSIM4V4phi - 0.5 * (Vds - T3)); + - pParam->BSIM4v4phi - 0.5 * (Vds - T3)); T10 = T4 * T8; qdrn = T4 * T7; qbulk = -(qgate + qdrn + T10); T5 = T3 / T1; - here->BSIM4V4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) + here->BSIM4v4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -CoxWL * T5 * dVdsat_dVb; - here->BSIM4V4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); - here->BSIM4V4cgsb = -(here->BSIM4V4cggb + T11 - + here->BSIM4V4cgdb); + here->BSIM4v4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); + here->BSIM4v4cgsb = -(here->BSIM4v4cggb + T11 + + here->BSIM4v4cgdb); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T9 * T7; T8 = T9 * T8; T9 = 2.0 * T4 * (1.0 - 3.0 * T5); - here->BSIM4V4cdgb = (T7 * dAlphaz_dVg - T9 + here->BSIM4v4cdgb = (T7 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb; - here->BSIM4V4cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); - here->BSIM4V4cdsb = -(here->BSIM4V4cdgb + T12 - + here->BSIM4V4cddb); + here->BSIM4v4cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); + here->BSIM4v4cdsb = -(here->BSIM4v4cdgb + T12 + + here->BSIM4v4cddb); T9 = 2.0 * T4 * (1.0 + T5); T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) @@ -2752,42 +2752,42 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T12 = T4 * (2.0 * T2 + T5 - 1.0); T0 = -(T10 + T11 + T12); - here->BSIM4V4cbgb = -(here->BSIM4V4cggb - + here->BSIM4V4cdgb + T10); - here->BSIM4V4cbdb = -(here->BSIM4V4cgdb - + here->BSIM4V4cddb + T12); - here->BSIM4V4cbsb = -(here->BSIM4V4cgsb - + here->BSIM4V4cdsb + T0); + here->BSIM4v4cbgb = -(here->BSIM4v4cggb + + here->BSIM4v4cdgb + T10); + here->BSIM4v4cbdb = -(here->BSIM4v4cgdb + + here->BSIM4v4cddb + T12); + here->BSIM4v4cbsb = -(here->BSIM4v4cgsb + + here->BSIM4v4cdsb + T0); } } - else if (model->BSIM4V4xpart < 0.5) + else if (model->BSIM4v4xpart < 0.5) { /* 40/60 Charge partition model */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - - pParam->BSIM4V4phi - T1); + - pParam->BSIM4v4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.4 * T2; - here->BSIM4V4cggb = One_Third_CoxWL * (3.0 + here->BSIM4v4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; - here->BSIM4V4cgsb = -(here->BSIM4V4cggb + T2); - here->BSIM4V4cgdb = 0.0; + here->BSIM4v4cgsb = -(here->BSIM4v4cggb + T2); + here->BSIM4v4cgdb = 0.0; T3 = 0.4 * Two_Third_CoxWL; - here->BSIM4V4cdgb = -T3 * dVgs_eff_dVg; - here->BSIM4V4cddb = 0.0; + here->BSIM4v4cdgb = -T3 * dVgs_eff_dVg; + here->BSIM4v4cddb = 0.0; T4 = T3 * dVth_dVb; - here->BSIM4V4cdsb = -(T4 + here->BSIM4V4cdgb); + here->BSIM4v4cdsb = -(T4 + here->BSIM4v4cdgb); - here->BSIM4V4cbgb = -(here->BSIM4V4cggb + here->BSIM4v4cbgb = -(here->BSIM4v4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); - here->BSIM4V4cbsb = -(here->BSIM4V4cbgb + T3); - here->BSIM4V4cbdb = 0.0; + here->BSIM4v4cbsb = -(here->BSIM4v4cbgb + T3); + here->BSIM4v4cbdb = 0.0; } else { /* linear region */ @@ -2797,16 +2797,16 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; - qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4V4phi + qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v4phi - 0.5 * (Vds - T3)); T5 = T3 / T1; - here->BSIM4V4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) + here->BSIM4v4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; - here->BSIM4V4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); - here->BSIM4V4cgsb = -(here->BSIM4V4cggb - + here->BSIM4V4cgdb + tmp); + here->BSIM4v4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); + here->BSIM4v4cgsb = -(here->BSIM4v4cggb + + here->BSIM4v4cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); @@ -2822,32 +2822,32 @@ for (; model != NULL; model = model->BSIM4V4nextModel) tmp1 = T4 * (2.0 - 4.0 * tmp * T6 + T8 * (16.0 * Vdsat - 6.0 * Vds)); - here->BSIM4V4cdgb = (T7 * dAlphaz_dVg - tmp1 + here->BSIM4v4cdgb = (T7 * dAlphaz_dVg - tmp1 * dVdsat_dVg) * dVgs_eff_dVg; T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb; - here->BSIM4V4cddb = T4 * (2.0 - (1.0 / (3.0 * T1 + here->BSIM4v4cddb = T4 * (2.0 - (1.0 / (3.0 * T1 * T1) + 2.0 * tmp) * T6 + T8 * (6.0 * Vdsat - 2.4 * Vds)); - here->BSIM4V4cdsb = -(here->BSIM4V4cdgb - + T10 + here->BSIM4V4cddb); + here->BSIM4v4cdsb = -(here->BSIM4v4cdgb + + T10 + here->BSIM4v4cddb); T7 = 2.0 * (T1 + T3); qbulk = -(qgate - T4 * T7); T7 *= T9; T0 = 4.0 * T4 * (1.0 - T5); - T12 = (-T7 * dAlphaz_dVg - here->BSIM4V4cdgb + T12 = (-T7 * dAlphaz_dVg - here->BSIM4v4cdgb - T0 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb; T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5) - - here->BSIM4V4cddb; + - here->BSIM4v4cddb; tmp = -(T10 + T11 + T12); - here->BSIM4V4cbgb = -(here->BSIM4V4cggb - + here->BSIM4V4cdgb + T12); - here->BSIM4V4cbdb = -(here->BSIM4V4cgdb - + here->BSIM4V4cddb + T10); - here->BSIM4V4cbsb = -(here->BSIM4V4cgsb - + here->BSIM4V4cdsb + tmp); + here->BSIM4v4cbgb = -(here->BSIM4v4cggb + + here->BSIM4v4cdgb + T12); + here->BSIM4v4cbdb = -(here->BSIM4v4cgdb + + here->BSIM4v4cddb + T10); + here->BSIM4v4cbsb = -(here->BSIM4v4cgsb + + here->BSIM4v4cdsb + tmp); } } else @@ -2856,27 +2856,27 @@ for (; model != NULL; model = model->BSIM4V4nextModel) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - - pParam->BSIM4V4phi - T1); + - pParam->BSIM4v4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.5 * T2; - here->BSIM4V4cggb = One_Third_CoxWL * (3.0 + here->BSIM4v4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; - here->BSIM4V4cgsb = -(here->BSIM4V4cggb + T2); - here->BSIM4V4cgdb = 0.0; + here->BSIM4v4cgsb = -(here->BSIM4v4cggb + T2); + here->BSIM4v4cgdb = 0.0; - here->BSIM4V4cdgb = -One_Third_CoxWL * dVgs_eff_dVg; - here->BSIM4V4cddb = 0.0; + here->BSIM4v4cdgb = -One_Third_CoxWL * dVgs_eff_dVg; + here->BSIM4v4cddb = 0.0; T4 = One_Third_CoxWL * dVth_dVb; - here->BSIM4V4cdsb = -(T4 + here->BSIM4V4cdgb); + here->BSIM4v4cdsb = -(T4 + here->BSIM4v4cdgb); - here->BSIM4V4cbgb = -(here->BSIM4V4cggb + here->BSIM4v4cbgb = -(here->BSIM4v4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); - here->BSIM4V4cbsb = -(here->BSIM4V4cbgb + T3); - here->BSIM4V4cbdb = 0.0; + here->BSIM4v4cbsb = -(here->BSIM4v4cbgb + T3); + here->BSIM4v4cbdb = 0.0; } else { /* linear region */ @@ -2886,16 +2886,16 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; - qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4V4phi + qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v4phi - 0.5 * (Vds - T3)); T5 = T3 / T1; - here->BSIM4V4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) + here->BSIM4v4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; - here->BSIM4V4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); - here->BSIM4V4cgsb = -(here->BSIM4V4cggb - + here->BSIM4V4cgdb + tmp); + here->BSIM4v4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); + here->BSIM4v4cgsb = -(here->BSIM4v4cggb + + here->BSIM4v4cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); @@ -2907,19 +2907,19 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T7 *= T9; T0 = T4 * (2.0 * T5 - 2.0); - here->BSIM4V4cdgb = (T0 * dVdsat_dVg - T7 + here->BSIM4v4cdgb = (T0 * dVdsat_dVg - T7 * dAlphaz_dVg) * dVgs_eff_dVg; T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb; - here->BSIM4V4cddb = T4 * (1.0 - 2.0 * T2 - T5); - here->BSIM4V4cdsb = -(here->BSIM4V4cdgb + T12 - + here->BSIM4V4cddb); - - here->BSIM4V4cbgb = -(here->BSIM4V4cggb - + 2.0 * here->BSIM4V4cdgb); - here->BSIM4V4cbdb = -(here->BSIM4V4cgdb - + 2.0 * here->BSIM4V4cddb); - here->BSIM4V4cbsb = -(here->BSIM4V4cgsb - + 2.0 * here->BSIM4V4cdsb); + here->BSIM4v4cddb = T4 * (1.0 - 2.0 * T2 - T5); + here->BSIM4v4cdsb = -(here->BSIM4v4cdgb + T12 + + here->BSIM4v4cddb); + + here->BSIM4v4cbgb = -(here->BSIM4v4cggb + + 2.0 * here->BSIM4v4cdgb); + here->BSIM4v4cbdb = -(here->BSIM4v4cgdb + + 2.0 * here->BSIM4v4cddb); + here->BSIM4v4cbsb = -(here->BSIM4v4cgsb + + 2.0 * here->BSIM4v4cdsb); } /* end of linear region */ } /* end of 50/50 partition */ } /* end of inversion */ @@ -2930,19 +2930,19 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dVbseffCV_dVb = 1.0; } else - { VbseffCV = pParam->BSIM4V4phi - Phis; + { VbseffCV = pParam->BSIM4v4phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } - CoxWL = model->BSIM4V4coxe * pParam->BSIM4V4weffCV - * pParam->BSIM4V4leffCV * here->BSIM4V4nf; + CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV + * pParam->BSIM4v4leffCV * here->BSIM4v4nf; /* Seperate VgsteffCV with noff and voffcv */ - noff = n * pParam->BSIM4V4noff; - dnoff_dVd = pParam->BSIM4V4noff * dn_dVd; - dnoff_dVb = pParam->BSIM4V4noff * dn_dVb; + noff = n * pParam->BSIM4v4noff; + dnoff_dVd = pParam->BSIM4v4noff * dn_dVd; + dnoff_dVb = pParam->BSIM4v4noff * dn_dVb; T0 = Vtm * noff; - voffcv = pParam->BSIM4V4voffcv; + voffcv = pParam->BSIM4v4voffcv; VgstNVt = (Vgst - voffcv) / T0; if (VgstNVt > EXP_THRESHOLD) @@ -2970,8 +2970,8 @@ for (; model != NULL; model = model->BSIM4V4nextModel) } /* End of VgsteffCV */ - if (model->BSIM4V4capMod == 1) - { Vfb = here->BSIM4V4vfbzb; + if (model->BSIM4v4capMod == 1) + { Vfb = here->BSIM4v4vfbzb; V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); @@ -2986,14 +2986,14 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dQac0_dVg = CoxWL * dVfbeff_dVg; dQac0_dVb = CoxWL * dVfbeff_dVb; - T0 = 0.5 * pParam->BSIM4V4k1ox; + T0 = 0.5 * pParam->BSIM4v4k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; - if (pParam->BSIM4V4k1ox == 0.0) + if (pParam->BSIM4v4k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) - { T1 = T0 + T3 / pParam->BSIM4V4k1ox; + { T1 = T0 + T3 / pParam->BSIM4v4k1ox; T2 = CoxWL; } else @@ -3001,15 +3001,15 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T2 = CoxWL * T0 / T1; } - Qsub0 = CoxWL * pParam->BSIM4V4k1ox * (T1 - T0); + Qsub0 = CoxWL * pParam->BSIM4v4k1ox * (T1 - T0); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); - AbulkCV = Abulk0 * pParam->BSIM4V4abulkCVfactor; - dAbulkCV_dVb = pParam->BSIM4V4abulkCVfactor * dAbulk0_dVb; + AbulkCV = Abulk0 * pParam->BSIM4v4abulkCVfactor; + dAbulkCV_dVb = pParam->BSIM4v4abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; @@ -3069,7 +3069,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; - if (model->BSIM4V4xpart > 0.5) + if (model->BSIM4v4xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 @@ -3084,7 +3084,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } - else if (model->BSIM4V4xpart < 0.5) + else if (model->BSIM4v4xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); @@ -3129,57 +3129,57 @@ for (; model != NULL; model = model->BSIM4V4nextModel) Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; - here->BSIM4V4cggb = Cgg; - here->BSIM4V4cgsb = -(Cgg + Cgd + Cgb); - here->BSIM4V4cgdb = Cgd; - here->BSIM4V4cdgb = -(Cgg + Cbg + Csg); - here->BSIM4V4cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + here->BSIM4v4cggb = Cgg; + here->BSIM4v4cgsb = -(Cgg + Cgd + Cgb); + here->BSIM4v4cgdb = Cgd; + here->BSIM4v4cdgb = -(Cgg + Cbg + Csg); + here->BSIM4v4cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); - here->BSIM4V4cddb = -(Cgd + Cbd + Csd); - here->BSIM4V4cbgb = Cbg; - here->BSIM4V4cbsb = -(Cbg + Cbd + Cbb); - here->BSIM4V4cbdb = Cbd; + here->BSIM4v4cddb = -(Cgd + Cbd + Csd); + here->BSIM4v4cbgb = Cbg; + here->BSIM4v4cbsb = -(Cbg + Cbd + Cbb); + here->BSIM4v4cbdb = Cbd; } /* Charge-Thickness capMod (CTM) begins */ - else if (model->BSIM4V4capMod == 2) - { V3 = here->BSIM4V4vfbzb - Vgs_eff + VbseffCV - DELTA_3; - if (here->BSIM4V4vfbzb <= 0.0) - T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * here->BSIM4V4vfbzb); + else if (model->BSIM4v4capMod == 2) + { V3 = here->BSIM4v4vfbzb - Vgs_eff + VbseffCV - DELTA_3; + if (here->BSIM4v4vfbzb <= 0.0) + T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * here->BSIM4v4vfbzb); else - T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * here->BSIM4V4vfbzb); + T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * here->BSIM4v4vfbzb); T1 = 0.5 * (1.0 + V3 / T0); - Vfbeff = here->BSIM4V4vfbzb - 0.5 * (V3 + T0); + Vfbeff = here->BSIM4v4vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; - Cox = model->BSIM4V4coxp; - Tox = 1.0e8 * model->BSIM4V4toxp; - T0 = (Vgs_eff - VbseffCV - here->BSIM4V4vfbzb) / Tox; + Cox = model->BSIM4v4coxp; + Tox = 1.0e8 * model->BSIM4v4toxp; + T0 = (Vgs_eff - VbseffCV - here->BSIM4v4vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -dVbseffCV_dVb / Tox; - tmp = T0 * pParam->BSIM4V4acde; + tmp = T0 * pParam->BSIM4v4acde; if ((-EXP_THRESHOLD < tmp) && (tmp < EXP_THRESHOLD)) - { Tcen = pParam->BSIM4V4ldeb * exp(tmp); - dTcen_dVg = pParam->BSIM4V4acde * Tcen; + { Tcen = pParam->BSIM4v4ldeb * exp(tmp); + dTcen_dVg = pParam->BSIM4v4acde * Tcen; dTcen_dVb = dTcen_dVg * dT0_dVb; dTcen_dVg *= dT0_dVg; } else if (tmp <= -EXP_THRESHOLD) - { Tcen = pParam->BSIM4V4ldeb * MIN_EXP; + { Tcen = pParam->BSIM4v4ldeb * MIN_EXP; dTcen_dVg = dTcen_dVb = 0.0; } else - { Tcen = pParam->BSIM4V4ldeb * MAX_EXP; + { Tcen = pParam->BSIM4v4ldeb * MAX_EXP; dTcen_dVg = dTcen_dVb = 0.0; } - LINK = 1.0e-3 * model->BSIM4V4toxp; - V3 = pParam->BSIM4V4ldeb - Tcen - LINK; - V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->BSIM4V4ldeb); - Tcen = pParam->BSIM4V4ldeb - 0.5 * (V3 + V4); + LINK = 1.0e-3 * model->BSIM4v4toxp; + V3 = pParam->BSIM4v4ldeb - Tcen - LINK; + V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->BSIM4v4ldeb); + Tcen = pParam->BSIM4v4ldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); dTcen_dVg *= T1; dTcen_dVb *= T1; @@ -3191,23 +3191,23 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dCoxeff_dVg = T2 * T2 * T3; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; - CoxWLcen = CoxWL * Coxeff / model->BSIM4V4coxe; + CoxWLcen = CoxWL * Coxeff / model->BSIM4v4coxe; - Qac0 = CoxWLcen * (Vfbeff - here->BSIM4V4vfbzb); + Qac0 = CoxWLcen * (Vfbeff - here->BSIM4v4vfbzb); QovCox = Qac0 / Coxeff; dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb; - T0 = 0.5 * pParam->BSIM4V4k1ox; + T0 = 0.5 * pParam->BSIM4v4k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; - if (pParam->BSIM4V4k1ox == 0.0) + if (pParam->BSIM4v4k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) - { T1 = T0 + T3 / pParam->BSIM4V4k1ox; + { T1 = T0 + T3 / pParam->BSIM4v4k1ox; T2 = CoxWLcen; } else @@ -3215,7 +3215,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) T2 = CoxWLcen * T0 / T1; } - Qsub0 = CoxWLcen * pParam->BSIM4V4k1ox * (T1 - T0); + Qsub0 = CoxWLcen * pParam->BSIM4v4k1ox * (T1 - T0); QovCox = Qsub0 / Coxeff; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; @@ -3224,14 +3224,14 @@ for (; model != NULL; model = model->BSIM4V4nextModel) + QovCox * dCoxeff_dVb; /* Gate-bias dependent delta Phis begins */ - if (pParam->BSIM4V4k1ox <= 0.0) - { Denomi = 0.25 * pParam->BSIM4V4moin * Vtm; - T0 = 0.5 * pParam->BSIM4V4sqrtPhi; + if (pParam->BSIM4v4k1ox <= 0.0) + { Denomi = 0.25 * pParam->BSIM4v4moin * Vtm; + T0 = 0.5 * pParam->BSIM4v4sqrtPhi; } else - { Denomi = pParam->BSIM4V4moin * Vtm - * pParam->BSIM4V4k1ox * pParam->BSIM4V4k1ox; - T0 = pParam->BSIM4V4k1ox * pParam->BSIM4V4sqrtPhi; + { Denomi = pParam->BSIM4v4moin * Vtm + * pParam->BSIM4v4k1ox * pParam->BSIM4v4k1ox; + T0 = pParam->BSIM4v4k1ox * pParam->BSIM4v4sqrtPhi; } T1 = 2.0 * T0 + Vgsteff; @@ -3240,7 +3240,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) /* End of delta Phis */ Tox += Tox; /* WDLiu: Tcen reevaluated below due to different Vgsteff */ - T0 = (Vgsteff + here->BSIM4V4vtfbphi2) / Tox; + T0 = (Vgsteff + here->BSIM4v4vtfbphi2) / Tox; tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); @@ -3258,10 +3258,10 @@ for (; model != NULL; model = model->BSIM4V4nextModel) dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; - CoxWLcen = CoxWL * Coxeff / model->BSIM4V4coxe; + CoxWLcen = CoxWL * Coxeff / model->BSIM4v4coxe; - AbulkCV = Abulk0 * pParam->BSIM4V4abulkCVfactor; - dAbulkCV_dVb = pParam->BSIM4V4abulkCVfactor * dAbulk0_dVb; + AbulkCV = Abulk0 * pParam->BSIM4v4abulkCVfactor; + dAbulkCV_dVb = pParam->BSIM4v4abulkCVfactor * dAbulk0_dVb; VdsatCV = (Vgsteff - DeltaPhi) / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; @@ -3329,7 +3329,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; - if (model->BSIM4V4xpart > 0.5) + if (model->BSIM4v4xpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); @@ -3348,7 +3348,7 @@ for (; model != NULL; model = model->BSIM4V4nextModel) + Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } - else if (model->BSIM4V4xpart < 0.5) + else if (model->BSIM4v4xpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); @@ -3393,54 +3393,54 @@ for (; model != NULL; model = model->BSIM4V4nextModel) Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; - here->BSIM4V4cggb = Cgg; - here->BSIM4V4cgsb = -(Cgg + Cgd + Cgb); - here->BSIM4V4cgdb = Cgd; - here->BSIM4V4cdgb = -(Cgg + Cbg + Csg); - here->BSIM4V4cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + here->BSIM4v4cggb = Cgg; + here->BSIM4v4cgsb = -(Cgg + Cgd + Cgb); + here->BSIM4v4cgdb = Cgd; + here->BSIM4v4cdgb = -(Cgg + Cbg + Csg); + here->BSIM4v4cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); - here->BSIM4V4cddb = -(Cgd + Cbd + Csd); - here->BSIM4V4cbgb = Cbg; - here->BSIM4V4cbsb = -(Cbg + Cbd + Cbb); - here->BSIM4V4cbdb = Cbd; + here->BSIM4v4cddb = -(Cgd + Cbd + Csd); + here->BSIM4v4cbgb = Cbg; + here->BSIM4v4cbsb = -(Cbg + Cbd + Cbb); + here->BSIM4v4cbdb = Cbd; } /* End of CTM */ } - here->BSIM4V4csgb = - here->BSIM4V4cggb - here->BSIM4V4cdgb - here->BSIM4V4cbgb; - here->BSIM4V4csdb = - here->BSIM4V4cgdb - here->BSIM4V4cddb - here->BSIM4V4cbdb; - here->BSIM4V4cssb = - here->BSIM4V4cgsb - here->BSIM4V4cdsb - here->BSIM4V4cbsb; - here->BSIM4V4cgbb = - here->BSIM4V4cgdb - here->BSIM4V4cggb - here->BSIM4V4cgsb; - here->BSIM4V4cdbb = - here->BSIM4V4cddb - here->BSIM4V4cdgb - here->BSIM4V4cdsb; - here->BSIM4V4cbbb = - here->BSIM4V4cbgb - here->BSIM4V4cbdb - here->BSIM4V4cbsb; - here->BSIM4V4csbb = - here->BSIM4V4cgbb - here->BSIM4V4cdbb - here->BSIM4V4cbbb; - here->BSIM4V4qgate = qgate; - here->BSIM4V4qbulk = qbulk; - here->BSIM4V4qdrn = qdrn; - here->BSIM4V4qsrc = -(qgate + qbulk + qdrn); + here->BSIM4v4csgb = - here->BSIM4v4cggb - here->BSIM4v4cdgb - here->BSIM4v4cbgb; + here->BSIM4v4csdb = - here->BSIM4v4cgdb - here->BSIM4v4cddb - here->BSIM4v4cbdb; + here->BSIM4v4cssb = - here->BSIM4v4cgsb - here->BSIM4v4cdsb - here->BSIM4v4cbsb; + here->BSIM4v4cgbb = - here->BSIM4v4cgdb - here->BSIM4v4cggb - here->BSIM4v4cgsb; + here->BSIM4v4cdbb = - here->BSIM4v4cddb - here->BSIM4v4cdgb - here->BSIM4v4cdsb; + here->BSIM4v4cbbb = - here->BSIM4v4cbgb - here->BSIM4v4cbdb - here->BSIM4v4cbsb; + here->BSIM4v4csbb = - here->BSIM4v4cgbb - here->BSIM4v4cdbb - here->BSIM4v4cbbb; + here->BSIM4v4qgate = qgate; + here->BSIM4v4qbulk = qbulk; + here->BSIM4v4qdrn = qdrn; + here->BSIM4v4qsrc = -(qgate + qbulk + qdrn); /* NQS begins */ - if ((here->BSIM4V4trnqsMod) || (here->BSIM4V4acnqsMod)) - { here->BSIM4V4qchqs = qcheq = -(qbulk + qgate); - here->BSIM4V4cqgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb); - here->BSIM4V4cqdb = -(here->BSIM4V4cgdb + here->BSIM4V4cbdb); - here->BSIM4V4cqsb = -(here->BSIM4V4cgsb + here->BSIM4V4cbsb); - here->BSIM4V4cqbb = -(here->BSIM4V4cqgb + here->BSIM4V4cqdb - + here->BSIM4V4cqsb); - - CoxWL = model->BSIM4V4coxe * pParam->BSIM4V4weffCV * here->BSIM4V4nf - * pParam->BSIM4V4leffCV; - T1 = here->BSIM4V4gcrg / CoxWL; /* 1 / tau */ - here->BSIM4V4gtau = T1 * ScalingFactor; - - if (here->BSIM4V4acnqsMod) - here->BSIM4V4taunet = 1.0 / T1; - - *(ckt->CKTstate0 + here->BSIM4V4qcheq) = qcheq; + if ((here->BSIM4v4trnqsMod) || (here->BSIM4v4acnqsMod)) + { here->BSIM4v4qchqs = qcheq = -(qbulk + qgate); + here->BSIM4v4cqgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb); + here->BSIM4v4cqdb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb); + here->BSIM4v4cqsb = -(here->BSIM4v4cgsb + here->BSIM4v4cbsb); + here->BSIM4v4cqbb = -(here->BSIM4v4cqgb + here->BSIM4v4cqdb + + here->BSIM4v4cqsb); + + CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * here->BSIM4v4nf + * pParam->BSIM4v4leffCV; + T1 = here->BSIM4v4gcrg / CoxWL; /* 1 / tau */ + here->BSIM4v4gtau = T1 * ScalingFactor; + + if (here->BSIM4v4acnqsMod) + here->BSIM4v4taunet = 1.0 / T1; + + *(ckt->CKTstate0 + here->BSIM4v4qcheq) = qcheq; if (ckt->CKTmode & MODEINITTRAN) - *(ckt->CKTstate1 + here->BSIM4V4qcheq) = - *(ckt->CKTstate0 + here->BSIM4V4qcheq); - if (here->BSIM4V4trnqsMod) - { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4V4qcheq); + *(ckt->CKTstate1 + here->BSIM4v4qcheq) = + *(ckt->CKTstate0 + here->BSIM4v4qcheq); + if (here->BSIM4v4trnqsMod) + { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qcheq); if (error) return(error); } @@ -3451,120 +3451,120 @@ finished: /* Calculate junction C-V */ if (ChargeComputationNeeded) - { czbd = model->BSIM4V4DunitAreaTempJctCap * here->BSIM4V4Adeff; /* bug fix */ - czbs = model->BSIM4V4SunitAreaTempJctCap * here->BSIM4V4Aseff; - czbdsw = model->BSIM4V4DunitLengthSidewallTempJctCap * here->BSIM4V4Pdeff; - czbdswg = model->BSIM4V4DunitLengthGateSidewallTempJctCap - * pParam->BSIM4V4weffCJ * here->BSIM4V4nf; - czbssw = model->BSIM4V4SunitLengthSidewallTempJctCap * here->BSIM4V4Pseff; - czbsswg = model->BSIM4V4SunitLengthGateSidewallTempJctCap - * pParam->BSIM4V4weffCJ * here->BSIM4V4nf; - - MJS = model->BSIM4V4SbulkJctBotGradingCoeff; - MJSWS = model->BSIM4V4SbulkJctSideGradingCoeff; - MJSWGS = model->BSIM4V4SbulkJctGateSideGradingCoeff; - - MJD = model->BSIM4V4DbulkJctBotGradingCoeff; - MJSWD = model->BSIM4V4DbulkJctSideGradingCoeff; - MJSWGD = model->BSIM4V4DbulkJctGateSideGradingCoeff; + { czbd = model->BSIM4v4DunitAreaTempJctCap * here->BSIM4v4Adeff; /* bug fix */ + czbs = model->BSIM4v4SunitAreaTempJctCap * here->BSIM4v4Aseff; + czbdsw = model->BSIM4v4DunitLengthSidewallTempJctCap * here->BSIM4v4Pdeff; + czbdswg = model->BSIM4v4DunitLengthGateSidewallTempJctCap + * pParam->BSIM4v4weffCJ * here->BSIM4v4nf; + czbssw = model->BSIM4v4SunitLengthSidewallTempJctCap * here->BSIM4v4Pseff; + czbsswg = model->BSIM4v4SunitLengthGateSidewallTempJctCap + * pParam->BSIM4v4weffCJ * here->BSIM4v4nf; + + MJS = model->BSIM4v4SbulkJctBotGradingCoeff; + MJSWS = model->BSIM4v4SbulkJctSideGradingCoeff; + MJSWGS = model->BSIM4v4SbulkJctGateSideGradingCoeff; + + MJD = model->BSIM4v4DbulkJctBotGradingCoeff; + MJSWD = model->BSIM4v4DbulkJctSideGradingCoeff; + MJSWGD = model->BSIM4v4DbulkJctGateSideGradingCoeff; /* Source Bulk Junction */ if (vbs_jct == 0.0) - { *(ckt->CKTstate0 + here->BSIM4V4qbs) = 0.0; - here->BSIM4V4capbs = czbs + czbssw + czbsswg; + { *(ckt->CKTstate0 + here->BSIM4v4qbs) = 0.0; + here->BSIM4v4capbs = czbs + czbssw + czbsswg; } else if (vbs_jct < 0.0) { if (czbs > 0.0) - { arg = 1.0 - vbs_jct / model->BSIM4V4PhiBS; + { arg = 1.0 - vbs_jct / model->BSIM4v4PhiBS; if (MJS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJS * log(arg)); - *(ckt->CKTstate0 + here->BSIM4V4qbs) = model->BSIM4V4PhiBS * czbs + *(ckt->CKTstate0 + here->BSIM4v4qbs) = model->BSIM4v4PhiBS * czbs * (1.0 - arg * sarg) / (1.0 - MJS); - here->BSIM4V4capbs = czbs * sarg; + here->BSIM4v4capbs = czbs * sarg; } else - { *(ckt->CKTstate0 + here->BSIM4V4qbs) = 0.0; - here->BSIM4V4capbs = 0.0; + { *(ckt->CKTstate0 + here->BSIM4v4qbs) = 0.0; + here->BSIM4v4capbs = 0.0; } if (czbssw > 0.0) - { arg = 1.0 - vbs_jct / model->BSIM4V4PhiBSWS; + { arg = 1.0 - vbs_jct / model->BSIM4v4PhiBSWS; if (MJSWS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWS * log(arg)); - *(ckt->CKTstate0 + here->BSIM4V4qbs) += model->BSIM4V4PhiBSWS * czbssw + *(ckt->CKTstate0 + here->BSIM4v4qbs) += model->BSIM4v4PhiBSWS * czbssw * (1.0 - arg * sarg) / (1.0 - MJSWS); - here->BSIM4V4capbs += czbssw * sarg; + here->BSIM4v4capbs += czbssw * sarg; } if (czbsswg > 0.0) - { arg = 1.0 - vbs_jct / model->BSIM4V4PhiBSWGS; + { arg = 1.0 - vbs_jct / model->BSIM4v4PhiBSWGS; if (MJSWGS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGS * log(arg)); - *(ckt->CKTstate0 + here->BSIM4V4qbs) += model->BSIM4V4PhiBSWGS * czbsswg + *(ckt->CKTstate0 + here->BSIM4v4qbs) += model->BSIM4v4PhiBSWGS * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWGS); - here->BSIM4V4capbs += czbsswg * sarg; + here->BSIM4v4capbs += czbsswg * sarg; } } else { T0 = czbs + czbssw + czbsswg; - T1 = vbs_jct * (czbs * MJS / model->BSIM4V4PhiBS + czbssw * MJSWS - / model->BSIM4V4PhiBSWS + czbsswg * MJSWGS / model->BSIM4V4PhiBSWGS); - *(ckt->CKTstate0 + here->BSIM4V4qbs) = vbs_jct * (T0 + 0.5 * T1); - here->BSIM4V4capbs = T0 + T1; + T1 = vbs_jct * (czbs * MJS / model->BSIM4v4PhiBS + czbssw * MJSWS + / model->BSIM4v4PhiBSWS + czbsswg * MJSWGS / model->BSIM4v4PhiBSWGS); + *(ckt->CKTstate0 + here->BSIM4v4qbs) = vbs_jct * (T0 + 0.5 * T1); + here->BSIM4v4capbs = T0 + T1; } /* Drain Bulk Junction */ if (vbd_jct == 0.0) - { *(ckt->CKTstate0 + here->BSIM4V4qbd) = 0.0; - here->BSIM4V4capbd = czbd + czbdsw + czbdswg; + { *(ckt->CKTstate0 + here->BSIM4v4qbd) = 0.0; + here->BSIM4v4capbd = czbd + czbdsw + czbdswg; } else if (vbd_jct < 0.0) { if (czbd > 0.0) - { arg = 1.0 - vbd_jct / model->BSIM4V4PhiBD; + { arg = 1.0 - vbd_jct / model->BSIM4v4PhiBD; if (MJD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJD * log(arg)); - *(ckt->CKTstate0 + here->BSIM4V4qbd) = model->BSIM4V4PhiBD* czbd + *(ckt->CKTstate0 + here->BSIM4v4qbd) = model->BSIM4v4PhiBD* czbd * (1.0 - arg * sarg) / (1.0 - MJD); - here->BSIM4V4capbd = czbd * sarg; + here->BSIM4v4capbd = czbd * sarg; } else - { *(ckt->CKTstate0 + here->BSIM4V4qbd) = 0.0; - here->BSIM4V4capbd = 0.0; + { *(ckt->CKTstate0 + here->BSIM4v4qbd) = 0.0; + here->BSIM4v4capbd = 0.0; } if (czbdsw > 0.0) - { arg = 1.0 - vbd_jct / model->BSIM4V4PhiBSWD; + { arg = 1.0 - vbd_jct / model->BSIM4v4PhiBSWD; if (MJSWD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWD * log(arg)); - *(ckt->CKTstate0 + here->BSIM4V4qbd) += model->BSIM4V4PhiBSWD * czbdsw + *(ckt->CKTstate0 + here->BSIM4v4qbd) += model->BSIM4v4PhiBSWD * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSWD); - here->BSIM4V4capbd += czbdsw * sarg; + here->BSIM4v4capbd += czbdsw * sarg; } if (czbdswg > 0.0) - { arg = 1.0 - vbd_jct / model->BSIM4V4PhiBSWGD; + { arg = 1.0 - vbd_jct / model->BSIM4v4PhiBSWGD; if (MJSWGD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGD * log(arg)); - *(ckt->CKTstate0 + here->BSIM4V4qbd) += model->BSIM4V4PhiBSWGD * czbdswg + *(ckt->CKTstate0 + here->BSIM4v4qbd) += model->BSIM4v4PhiBSWGD * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWGD); - here->BSIM4V4capbd += czbdswg * sarg; + here->BSIM4v4capbd += czbdswg * sarg; } } else { T0 = czbd + czbdsw + czbdswg; - T1 = vbd_jct * (czbd * MJD / model->BSIM4V4PhiBD + czbdsw * MJSWD - / model->BSIM4V4PhiBSWD + czbdswg * MJSWGD / model->BSIM4V4PhiBSWGD); - *(ckt->CKTstate0 + here->BSIM4V4qbd) = vbd_jct * (T0 + 0.5 * T1); - here->BSIM4V4capbd = T0 + T1; + T1 = vbd_jct * (czbd * MJD / model->BSIM4v4PhiBD + czbdsw * MJSWD + / model->BSIM4v4PhiBSWD + czbdswg * MJSWGD / model->BSIM4v4PhiBSWGD); + *(ckt->CKTstate0 + here->BSIM4v4qbd) = vbd_jct * (T0 + 0.5 * T1); + here->BSIM4v4capbd = T0 + T1; } } @@ -3573,18 +3573,18 @@ finished: * check convergence */ - if ((here->BSIM4V4off == 0) || (!(ckt->CKTmode & MODEINITFIX))) + if ((here->BSIM4v4off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; // #ifndef NEWCONV // } // else -// { if (here->BSIM4V4mode >= 0) -// { Idtot = here->BSIM4V4cd + here->BSIM4V4csub -// + here->BSIM4V4Igidl - here->BSIM4V4cbd; +// { if (here->BSIM4v4mode >= 0) +// { Idtot = here->BSIM4v4cd + here->BSIM4v4csub +// + here->BSIM4v4Igidl - here->BSIM4v4cbd; // } // else -// { Idtot = here->BSIM4V4cd + here->BSIM4V4cbd - here->BSIM4V4Igidl; /* bugfix */ +// { Idtot = here->BSIM4v4cd + here->BSIM4v4cbd - here->BSIM4v4Igidl; /* bugfix */ // } // tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) // + ckt->CKTabstol; @@ -3607,8 +3607,8 @@ finished: // { ckt->CKTnoncon++; // } // else -// { Ibtot = here->BSIM4V4cbs + here->BSIM4V4cbd -// - here->BSIM4V4Igidl - here->BSIM4V4Igisl - here->BSIM4V4csub; +// { Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd +// - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; // tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) // + ckt->CKTabstol; // if (fabs(cbhat - Ibtot) > tol6) @@ -3618,24 +3618,24 @@ finished: // #endif /* NEWCONV */ } } - *(ckt->CKTstate0 + here->BSIM4V4vds) = vds; - *(ckt->CKTstate0 + here->BSIM4V4vgs) = vgs; - *(ckt->CKTstate0 + here->BSIM4V4vbs) = vbs; - *(ckt->CKTstate0 + here->BSIM4V4vbd) = vbd; - *(ckt->CKTstate0 + here->BSIM4V4vges) = vges; - *(ckt->CKTstate0 + here->BSIM4V4vgms) = vgms; - *(ckt->CKTstate0 + here->BSIM4V4vdbs) = vdbs; - *(ckt->CKTstate0 + here->BSIM4V4vdbd) = vdbd; - *(ckt->CKTstate0 + here->BSIM4V4vsbs) = vsbs; - *(ckt->CKTstate0 + here->BSIM4V4vses) = vses; - *(ckt->CKTstate0 + here->BSIM4V4vdes) = vdes; - *(ckt->CKTstate0 + here->BSIM4V4qdef) = qdef; + *(ckt->CKTstate0 + here->BSIM4v4vds) = vds; + *(ckt->CKTstate0 + here->BSIM4v4vgs) = vgs; + *(ckt->CKTstate0 + here->BSIM4v4vbs) = vbs; + *(ckt->CKTstate0 + here->BSIM4v4vbd) = vbd; + *(ckt->CKTstate0 + here->BSIM4v4vges) = vges; + *(ckt->CKTstate0 + here->BSIM4v4vgms) = vgms; + *(ckt->CKTstate0 + here->BSIM4v4vdbs) = vdbs; + *(ckt->CKTstate0 + here->BSIM4v4vdbd) = vdbd; + *(ckt->CKTstate0 + here->BSIM4v4vsbs) = vsbs; + *(ckt->CKTstate0 + here->BSIM4v4vses) = vses; + *(ckt->CKTstate0 + here->BSIM4v4vdes) = vdes; + *(ckt->CKTstate0 + here->BSIM4v4qdef) = qdef; if (!ChargeComputationNeeded) goto line850; - if (here->BSIM4V4rgateMod == 3) + if (here->BSIM4v4rgateMod == 3) { vgdx = vgmd; vgsx = vgms; @@ -3645,122 +3645,122 @@ finished: vgdx = vgd; vgsx = vgs; } - if (model->BSIM4V4capMod == 0) + if (model->BSIM4v4capMod == 0) { - cgdo = pParam->BSIM4V4cgdo; - qgdo = pParam->BSIM4V4cgdo * vgdx; - cgso = pParam->BSIM4V4cgso; - qgso = pParam->BSIM4V4cgso * vgsx; + cgdo = pParam->BSIM4v4cgdo; + qgdo = pParam->BSIM4v4cgdo * vgdx; + cgso = pParam->BSIM4v4cgso; + qgso = pParam->BSIM4v4cgso * vgsx; } else /* For both capMod == 1 and 2 */ { T0 = vgdx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); - T3 = pParam->BSIM4V4weffCV * pParam->BSIM4V4cgdl; - T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4V4ckappad); - cgdo = pParam->BSIM4V4cgdo + T3 - T3 * (1.0 - 1.0 / T4) + T3 = pParam->BSIM4v4weffCV * pParam->BSIM4v4cgdl; + T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v4ckappad); + cgdo = pParam->BSIM4v4cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); - qgdo = (pParam->BSIM4V4cgdo + T3) * vgdx - T3 * (T2 - + 0.5 * pParam->BSIM4V4ckappad * (T4 - 1.0)); + qgdo = (pParam->BSIM4v4cgdo + T3) * vgdx - T3 * (T2 + + 0.5 * pParam->BSIM4v4ckappad * (T4 - 1.0)); T0 = vgsx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); - T3 = pParam->BSIM4V4weffCV * pParam->BSIM4V4cgsl; - T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4V4ckappas); - cgso = pParam->BSIM4V4cgso + T3 - T3 * (1.0 - 1.0 / T4) + T3 = pParam->BSIM4v4weffCV * pParam->BSIM4v4cgsl; + T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v4ckappas); + cgso = pParam->BSIM4v4cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); - qgso = (pParam->BSIM4V4cgso + T3) * vgsx - T3 * (T2 - + 0.5 * pParam->BSIM4V4ckappas * (T4 - 1.0)); + qgso = (pParam->BSIM4v4cgso + T3) * vgsx - T3 * (T2 + + 0.5 * pParam->BSIM4v4ckappas * (T4 - 1.0)); } - if (here->BSIM4V4nf != 1.0) - { cgdo *= here->BSIM4V4nf; - cgso *= here->BSIM4V4nf; - qgdo *= here->BSIM4V4nf; - qgso *= here->BSIM4V4nf; + if (here->BSIM4v4nf != 1.0) + { cgdo *= here->BSIM4v4nf; + cgso *= here->BSIM4v4nf; + qgdo *= here->BSIM4v4nf; + qgso *= here->BSIM4v4nf; } - here->BSIM4V4cgdo = cgdo; - here->BSIM4V4qgdo = qgdo; - here->BSIM4V4cgso = cgso; - here->BSIM4V4qgso = qgso; + here->BSIM4v4cgdo = cgdo; + here->BSIM4v4qgdo = qgdo; + here->BSIM4v4cgso = cgso; + here->BSIM4v4qgso = qgso; line755: ag0 = ckt->CKTag[0]; - if (here->BSIM4V4mode > 0) - { if (here->BSIM4V4trnqsMod == 0) + if (here->BSIM4v4mode > 0) + { if (here->BSIM4v4trnqsMod == 0) { qdrn -= qgdo; - if (here->BSIM4V4rgateMod == 3) - { gcgmgmb = (cgdo + cgso + pParam->BSIM4V4cgbo) * ag0; + if (here->BSIM4v4rgateMod == 3) + { gcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; - gcgmbb = -pParam->BSIM4V4cgbo * ag0; + gcgmbb = -pParam->BSIM4v4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; - gcggb = here->BSIM4V4cggb * ag0; - gcgdb = here->BSIM4V4cgdb * ag0; - gcgsb = here->BSIM4V4cgsb * ag0; + gcggb = here->BSIM4v4cggb * ag0; + gcgdb = here->BSIM4v4cgdb * ag0; + gcgsb = here->BSIM4v4cgsb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); - gcdgb = here->BSIM4V4cdgb * ag0; - gcsgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb - + here->BSIM4V4cdgb) * ag0; - gcbgb = here->BSIM4V4cbgb * ag0; + gcdgb = here->BSIM4v4cdgb * ag0; + gcsgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + + here->BSIM4v4cdgb) * ag0; + gcbgb = here->BSIM4v4cbgb * ag0; - qgmb = pParam->BSIM4V4cgbo * vgmb; + qgmb = pParam->BSIM4v4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qsrc = -(qgate + qgmid + qbulk + qdrn); } else - { gcggb = (here->BSIM4V4cggb + cgdo + cgso - + pParam->BSIM4V4cgbo ) * ag0; - gcgdb = (here->BSIM4V4cgdb - cgdo) * ag0; - gcgsb = (here->BSIM4V4cgsb - cgso) * ag0; + { gcggb = (here->BSIM4v4cggb + cgdo + cgso + + pParam->BSIM4v4cgbo ) * ag0; + gcgdb = (here->BSIM4v4cgdb - cgdo) * ag0; + gcgsb = (here->BSIM4v4cgsb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); - gcdgb = (here->BSIM4V4cdgb - cgdo) * ag0; - gcsgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb - + here->BSIM4V4cdgb + cgso) * ag0; - gcbgb = (here->BSIM4V4cbgb - pParam->BSIM4V4cgbo) * ag0; + gcdgb = (here->BSIM4v4cdgb - cgdo) * ag0; + gcsgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + + here->BSIM4v4cdgb + cgso) * ag0; + gcbgb = (here->BSIM4v4cbgb - pParam->BSIM4v4cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; - qgb = pParam->BSIM4V4cgbo * vgb; + qgb = pParam->BSIM4v4cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qsrc = -(qgate + qbulk + qdrn); } - gcddb = (here->BSIM4V4cddb + here->BSIM4V4capbd + cgdo) * ag0; - gcdsb = here->BSIM4V4cdsb * ag0; + gcddb = (here->BSIM4v4cddb + here->BSIM4v4capbd + cgdo) * ag0; + gcdsb = here->BSIM4v4cdsb * ag0; - gcsdb = -(here->BSIM4V4cgdb + here->BSIM4V4cbdb - + here->BSIM4V4cddb) * ag0; - gcssb = (here->BSIM4V4capbs + cgso - (here->BSIM4V4cgsb - + here->BSIM4V4cbsb + here->BSIM4V4cdsb)) * ag0; + gcsdb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb + + here->BSIM4v4cddb) * ag0; + gcssb = (here->BSIM4v4capbs + cgso - (here->BSIM4v4cgsb + + here->BSIM4v4cbsb + here->BSIM4v4cdsb)) * ag0; - if (!here->BSIM4V4rbodyMod) + if (!here->BSIM4v4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); - gcbdb = (here->BSIM4V4cbdb - here->BSIM4V4capbd) * ag0; - gcbsb = (here->BSIM4V4cbsb - here->BSIM4V4capbs) * ag0; + gcbdb = (here->BSIM4v4cbdb - here->BSIM4v4capbd) * ag0; + gcbsb = (here->BSIM4v4cbsb - here->BSIM4v4capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else - { gcdbb = -(here->BSIM4V4cddb + here->BSIM4V4cdgb - + here->BSIM4V4cdsb) * ag0; + { gcdbb = -(here->BSIM4v4cddb + here->BSIM4v4cdgb + + here->BSIM4v4cdsb) * ag0; gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb) - + here->BSIM4V4capbs * ag0; - gcbdb = here->BSIM4V4cbdb * ag0; - gcbsb = here->BSIM4V4cbsb * ag0; + + here->BSIM4v4capbs * ag0; + gcbdb = here->BSIM4v4cbdb * ag0; + gcbsb = here->BSIM4v4cbsb * ag0; - gcdbdb = -here->BSIM4V4capbd * ag0; - gcsbsb = -here->BSIM4V4capbs * ag0; + gcdbdb = -here->BSIM4v4capbd * ag0; + gcsbsb = -here->BSIM4v4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); @@ -3771,27 +3771,27 @@ line755: dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else - { qcheq = here->BSIM4V4qchqs; - CoxWL = model->BSIM4V4coxe * pParam->BSIM4V4weffCV * here->BSIM4V4nf - * pParam->BSIM4V4leffCV; + { qcheq = here->BSIM4v4qchqs; + CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * here->BSIM4v4nf + * pParam->BSIM4v4leffCV; T0 = qdef * ScalingFactor / CoxWL; - ggtg = here->BSIM4V4gtg = T0 * here->BSIM4V4gcrgg; - ggtd = here->BSIM4V4gtd = T0 * here->BSIM4V4gcrgd; - ggts = here->BSIM4V4gts = T0 * here->BSIM4V4gcrgs; - ggtb = here->BSIM4V4gtb = T0 * here->BSIM4V4gcrgb; + ggtg = here->BSIM4v4gtg = T0 * here->BSIM4v4gcrgg; + ggtd = here->BSIM4v4gtd = T0 * here->BSIM4v4gcrgd; + ggts = here->BSIM4v4gts = T0 * here->BSIM4v4gcrgs; + ggtb = here->BSIM4v4gtb = T0 * here->BSIM4v4gcrgb; gqdef = ScalingFactor * ag0; - gcqgb = here->BSIM4V4cqgb * ag0; - gcqdb = here->BSIM4V4cqdb * ag0; - gcqsb = here->BSIM4V4cqsb * ag0; - gcqbb = here->BSIM4V4cqbb * ag0; + gcqgb = here->BSIM4v4cqgb * ag0; + gcqdb = here->BSIM4v4cqdb * ag0; + gcqsb = here->BSIM4v4cqsb * ag0; + gcqbb = here->BSIM4v4cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) - { if (model->BSIM4V4xpart < 0.5) + { if (model->BSIM4v4xpart < 0.5) { dxpart = 0.4; } - else if (model->BSIM4V4xpart > 0.5) + else if (model->BSIM4v4xpart > 0.5) { dxpart = 0.0; } else @@ -3802,18 +3802,18 @@ line755: } else { dxpart = qdrn / qcheq; - Cdd = here->BSIM4V4cddb; - Csd = -(here->BSIM4V4cgdb + here->BSIM4V4cddb - + here->BSIM4V4cbdb); + Cdd = here->BSIM4v4cddb; + Csd = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + + here->BSIM4v4cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; - Cdg = here->BSIM4V4cdgb; - Csg = -(here->BSIM4V4cggb + here->BSIM4V4cdgb - + here->BSIM4V4cbgb); + Cdg = here->BSIM4v4cdgb; + Csg = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + + here->BSIM4v4cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; - Cds = here->BSIM4V4cdsb; - Css = -(here->BSIM4V4cgsb + here->BSIM4V4cdsb - + here->BSIM4V4cbsb); + Cds = here->BSIM4v4cdsb; + Css = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + + here->BSIM4v4cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); @@ -3824,11 +3824,11 @@ line755: dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); - if (here->BSIM4V4rgateMod == 3) - { gcgmgmb = (cgdo + cgso + pParam->BSIM4V4cgbo) * ag0; + if (here->BSIM4v4rgateMod == 3) + { gcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; - gcgmbb = -pParam->BSIM4V4cgbo * ag0; + gcgmbb = -pParam->BSIM4v4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; @@ -3837,7 +3837,7 @@ line755: gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; - qgmb = pParam->BSIM4V4cgbo * vgmb; + qgmb = pParam->BSIM4v4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; @@ -3845,113 +3845,113 @@ line755: qsrc = -(qgmid + qbulk + qdrn); } else - { gcggb = (cgdo + cgso + pParam->BSIM4V4cgbo ) * ag0; + { gcggb = (cgdo + cgso + pParam->BSIM4v4cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; - gcgbb = -pParam->BSIM4V4cgbo * ag0; + gcgbb = -pParam->BSIM4v4cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; - qgb = pParam->BSIM4V4cgbo * vgb; + qgb = pParam->BSIM4v4cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -(qgate + qbulk + qdrn); } - gcddb = (here->BSIM4V4capbd + cgdo) * ag0; + gcddb = (here->BSIM4v4capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; - gcssb = (here->BSIM4V4capbs + cgso) * ag0; + gcssb = (here->BSIM4v4capbs + cgso) * ag0; - if (!here->BSIM4V4rbodyMod) + if (!here->BSIM4v4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); - gcbdb = -here->BSIM4V4capbd * ag0; - gcbsb = -here->BSIM4V4capbs * ag0; + gcbdb = -here->BSIM4v4capbd * ag0; + gcbsb = -here->BSIM4v4capbs * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; - gcdbdb = -here->BSIM4V4capbd * ag0; - gcsbsb = -here->BSIM4V4capbs * ag0; + gcdbdb = -here->BSIM4v4capbd * ag0; + gcsbsb = -here->BSIM4v4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } else - { if (here->BSIM4V4trnqsMod == 0) + { if (here->BSIM4v4trnqsMod == 0) { qsrc = qdrn - qgso; - if (here->BSIM4V4rgateMod == 3) - { gcgmgmb = (cgdo + cgso + pParam->BSIM4V4cgbo) * ag0; + if (here->BSIM4v4rgateMod == 3) + { gcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; - gcgmbb = -pParam->BSIM4V4cgbo * ag0; + gcgmbb = -pParam->BSIM4v4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; - gcggb = here->BSIM4V4cggb * ag0; - gcgdb = here->BSIM4V4cgsb * ag0; - gcgsb = here->BSIM4V4cgdb * ag0; + gcggb = here->BSIM4v4cggb * ag0; + gcgdb = here->BSIM4v4cgsb * ag0; + gcgsb = here->BSIM4v4cgdb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); - gcdgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb - + here->BSIM4V4cdgb) * ag0; - gcsgb = here->BSIM4V4cdgb * ag0; - gcbgb = here->BSIM4V4cbgb * ag0; + gcdgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + + here->BSIM4v4cdgb) * ag0; + gcsgb = here->BSIM4v4cdgb * ag0; + gcbgb = here->BSIM4v4cbgb * ag0; - qgmb = pParam->BSIM4V4cgbo * vgmb; + qgmb = pParam->BSIM4v4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qdrn = -(qgate + qgmid + qbulk + qsrc); } else - { gcggb = (here->BSIM4V4cggb + cgdo + cgso - + pParam->BSIM4V4cgbo ) * ag0; - gcgdb = (here->BSIM4V4cgsb - cgdo) * ag0; - gcgsb = (here->BSIM4V4cgdb - cgso) * ag0; + { gcggb = (here->BSIM4v4cggb + cgdo + cgso + + pParam->BSIM4v4cgbo ) * ag0; + gcgdb = (here->BSIM4v4cgsb - cgdo) * ag0; + gcgsb = (here->BSIM4v4cgdb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); - gcdgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb - + here->BSIM4V4cdgb + cgdo) * ag0; - gcsgb = (here->BSIM4V4cdgb - cgso) * ag0; - gcbgb = (here->BSIM4V4cbgb - pParam->BSIM4V4cgbo) * ag0; + gcdgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + + here->BSIM4v4cdgb + cgdo) * ag0; + gcsgb = (here->BSIM4v4cdgb - cgso) * ag0; + gcbgb = (here->BSIM4v4cbgb - pParam->BSIM4v4cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; - qgb = pParam->BSIM4V4cgbo * vgb; + qgb = pParam->BSIM4v4cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qdrn = -(qgate + qbulk + qsrc); } - gcddb = (here->BSIM4V4capbd + cgdo - (here->BSIM4V4cgsb - + here->BSIM4V4cbsb + here->BSIM4V4cdsb)) * ag0; - gcdsb = -(here->BSIM4V4cgdb + here->BSIM4V4cbdb - + here->BSIM4V4cddb) * ag0; + gcddb = (here->BSIM4v4capbd + cgdo - (here->BSIM4v4cgsb + + here->BSIM4v4cbsb + here->BSIM4v4cdsb)) * ag0; + gcdsb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb + + here->BSIM4v4cddb) * ag0; - gcsdb = here->BSIM4V4cdsb * ag0; - gcssb = (here->BSIM4V4cddb + here->BSIM4V4capbs + cgso) * ag0; + gcsdb = here->BSIM4v4cdsb * ag0; + gcssb = (here->BSIM4v4cddb + here->BSIM4v4capbs + cgso) * ag0; - if (!here->BSIM4V4rbodyMod) + if (!here->BSIM4v4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); - gcbdb = (here->BSIM4V4cbsb - here->BSIM4V4capbd) * ag0; - gcbsb = (here->BSIM4V4cbdb - here->BSIM4V4capbs) * ag0; + gcbdb = (here->BSIM4v4cbsb - here->BSIM4v4capbd) * ag0; + gcbsb = (here->BSIM4v4cbdb - here->BSIM4v4capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb) - + here->BSIM4V4capbd * ag0; - gcsbb = -(here->BSIM4V4cddb + here->BSIM4V4cdgb - + here->BSIM4V4cdsb) * ag0; - gcbdb = here->BSIM4V4cbsb * ag0; - gcbsb = here->BSIM4V4cbdb * ag0; - gcdbdb = -here->BSIM4V4capbd * ag0; - gcsbsb = -here->BSIM4V4capbs * ag0; + + here->BSIM4v4capbd * ag0; + gcsbb = -(here->BSIM4v4cddb + here->BSIM4v4cdgb + + here->BSIM4v4cdsb) * ag0; + gcbdb = here->BSIM4v4cbsb * ag0; + gcbsb = here->BSIM4v4cbdb * ag0; + gcdbdb = -here->BSIM4v4capbd * ag0; + gcsbsb = -here->BSIM4v4capbs * ag0; } gcbbb = -(gcbgb + gcbdb + gcbsb + gcbgmb); @@ -3962,26 +3962,26 @@ line755: dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else - { qcheq = here->BSIM4V4qchqs; - CoxWL = model->BSIM4V4coxe * pParam->BSIM4V4weffCV * here->BSIM4V4nf - * pParam->BSIM4V4leffCV; + { qcheq = here->BSIM4v4qchqs; + CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * here->BSIM4v4nf + * pParam->BSIM4v4leffCV; T0 = qdef * ScalingFactor / CoxWL; - ggtg = here->BSIM4V4gtg = T0 * here->BSIM4V4gcrgg; - ggts = here->BSIM4V4gtd = T0 * here->BSIM4V4gcrgs; - ggtd = here->BSIM4V4gts = T0 * here->BSIM4V4gcrgd; - ggtb = here->BSIM4V4gtb = T0 * here->BSIM4V4gcrgb; + ggtg = here->BSIM4v4gtg = T0 * here->BSIM4v4gcrgg; + ggts = here->BSIM4v4gtd = T0 * here->BSIM4v4gcrgs; + ggtd = here->BSIM4v4gts = T0 * here->BSIM4v4gcrgd; + ggtb = here->BSIM4v4gtb = T0 * here->BSIM4v4gcrgb; gqdef = ScalingFactor * ag0; - gcqgb = here->BSIM4V4cqgb * ag0; - gcqdb = here->BSIM4V4cqsb * ag0; - gcqsb = here->BSIM4V4cqdb * ag0; - gcqbb = here->BSIM4V4cqbb * ag0; + gcqgb = here->BSIM4v4cqgb * ag0; + gcqdb = here->BSIM4v4cqsb * ag0; + gcqsb = here->BSIM4v4cqdb * ag0; + gcqbb = here->BSIM4v4cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) - { if (model->BSIM4V4xpart < 0.5) + { if (model->BSIM4v4xpart < 0.5) { sxpart = 0.4; } - else if (model->BSIM4V4xpart > 0.5) + else if (model->BSIM4v4xpart > 0.5) { sxpart = 0.0; } else @@ -3992,18 +3992,18 @@ line755: } else { sxpart = qdrn / qcheq; - Css = here->BSIM4V4cddb; - Cds = -(here->BSIM4V4cgdb + here->BSIM4V4cddb - + here->BSIM4V4cbdb); + Css = here->BSIM4v4cddb; + Cds = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + + here->BSIM4v4cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; - Csg = here->BSIM4V4cdgb; - Cdg = -(here->BSIM4V4cggb + here->BSIM4V4cdgb - + here->BSIM4V4cbgb); + Csg = here->BSIM4v4cdgb; + Cdg = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + + here->BSIM4v4cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; - Csd = here->BSIM4V4cdsb; - Cdd = -(here->BSIM4V4cgsb + here->BSIM4V4cdsb - + here->BSIM4V4cbsb); + Csd = here->BSIM4v4cdsb; + Cdd = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + + here->BSIM4v4cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); @@ -4014,11 +4014,11 @@ line755: ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); - if (here->BSIM4V4rgateMod == 3) - { gcgmgmb = (cgdo + cgso + pParam->BSIM4V4cgbo) * ag0; + if (here->BSIM4v4rgateMod == 3) + { gcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; - gcgmbb = -pParam->BSIM4V4cgbo * ag0; + gcgmbb = -pParam->BSIM4v4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; @@ -4027,7 +4027,7 @@ line755: gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; - qgmb = pParam->BSIM4V4cgbo * vgmb; + qgmb = pParam->BSIM4v4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; @@ -4035,70 +4035,70 @@ line755: qsrc = -qgso; } else - { gcggb = (cgdo + cgso + pParam->BSIM4V4cgbo ) * ag0; + { gcggb = (cgdo + cgso + pParam->BSIM4v4cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; - gcgbb = -pParam->BSIM4V4cgbo * ag0; + gcgbb = -pParam->BSIM4v4cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; - qgb = pParam->BSIM4V4cgbo * vgb; + qgb = pParam->BSIM4v4cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -qgso; } - gcddb = (here->BSIM4V4capbd + cgdo) * ag0; + gcddb = (here->BSIM4v4capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; - gcssb = (here->BSIM4V4capbs + cgso) * ag0; - if (!here->BSIM4V4rbodyMod) + gcssb = (here->BSIM4v4capbs + cgso) * ag0; + if (!here->BSIM4v4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); - gcbdb = -here->BSIM4V4capbd * ag0; - gcbsb = -here->BSIM4V4capbs * ag0; + gcbdb = -here->BSIM4v4capbd * ag0; + gcbsb = -here->BSIM4v4capbs * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; - gcdbdb = -here->BSIM4V4capbd * ag0; - gcsbsb = -here->BSIM4V4capbs * ag0; + gcdbdb = -here->BSIM4v4capbd * ag0; + gcsbsb = -here->BSIM4v4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } - if (here->BSIM4V4trnqsMod) - { *(ckt->CKTstate0 + here->BSIM4V4qcdump) = qdef * ScalingFactor; + if (here->BSIM4v4trnqsMod) + { *(ckt->CKTstate0 + here->BSIM4v4qcdump) = qdef * ScalingFactor; if (ckt->CKTmode & MODEINITTRAN) - *(ckt->CKTstate1 + here->BSIM4V4qcdump) = - *(ckt->CKTstate0 + here->BSIM4V4qcdump); - error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4V4qcdump); + *(ckt->CKTstate1 + here->BSIM4v4qcdump) = + *(ckt->CKTstate0 + here->BSIM4v4qcdump); + error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qcdump); if (error) return(error); } if (ByPass) goto line860; - *(ckt->CKTstate0 + here->BSIM4V4qg) = qgate; - *(ckt->CKTstate0 + here->BSIM4V4qd) = qdrn - - *(ckt->CKTstate0 + here->BSIM4V4qbd); - *(ckt->CKTstate0 + here->BSIM4V4qs) = qsrc - - *(ckt->CKTstate0 + here->BSIM4V4qbs); - if (here->BSIM4V4rgateMod == 3) - *(ckt->CKTstate0 + here->BSIM4V4qgmid) = qgmid; - - if (!here->BSIM4V4rbodyMod) - { *(ckt->CKTstate0 + here->BSIM4V4qb) = qbulk - + *(ckt->CKTstate0 + here->BSIM4V4qbd) - + *(ckt->CKTstate0 + here->BSIM4V4qbs); + *(ckt->CKTstate0 + here->BSIM4v4qg) = qgate; + *(ckt->CKTstate0 + here->BSIM4v4qd) = qdrn + - *(ckt->CKTstate0 + here->BSIM4v4qbd); + *(ckt->CKTstate0 + here->BSIM4v4qs) = qsrc + - *(ckt->CKTstate0 + here->BSIM4v4qbs); + if (here->BSIM4v4rgateMod == 3) + *(ckt->CKTstate0 + here->BSIM4v4qgmid) = qgmid; + + if (!here->BSIM4v4rbodyMod) + { *(ckt->CKTstate0 + here->BSIM4v4qb) = qbulk + + *(ckt->CKTstate0 + here->BSIM4v4qbd) + + *(ckt->CKTstate0 + here->BSIM4v4qbs); } else - *(ckt->CKTstate0 + here->BSIM4V4qb) = qbulk; + *(ckt->CKTstate0 + here->BSIM4v4qb) = qbulk; /* Store small signal parameters */ @@ -4110,43 +4110,43 @@ line755: goto line850; if (ckt->CKTmode & MODEINITTRAN) - { *(ckt->CKTstate1 + here->BSIM4V4qb) = - *(ckt->CKTstate0 + here->BSIM4V4qb); - *(ckt->CKTstate1 + here->BSIM4V4qg) = - *(ckt->CKTstate0 + here->BSIM4V4qg); - *(ckt->CKTstate1 + here->BSIM4V4qd) = - *(ckt->CKTstate0 + here->BSIM4V4qd); - if (here->BSIM4V4rgateMod == 3) - *(ckt->CKTstate1 + here->BSIM4V4qgmid) = - *(ckt->CKTstate0 + here->BSIM4V4qgmid); - if (here->BSIM4V4rbodyMod) - { *(ckt->CKTstate1 + here->BSIM4V4qbs) = - *(ckt->CKTstate0 + here->BSIM4V4qbs); - *(ckt->CKTstate1 + here->BSIM4V4qbd) = - *(ckt->CKTstate0 + here->BSIM4V4qbd); + { *(ckt->CKTstate1 + here->BSIM4v4qb) = + *(ckt->CKTstate0 + here->BSIM4v4qb); + *(ckt->CKTstate1 + here->BSIM4v4qg) = + *(ckt->CKTstate0 + here->BSIM4v4qg); + *(ckt->CKTstate1 + here->BSIM4v4qd) = + *(ckt->CKTstate0 + here->BSIM4v4qd); + if (here->BSIM4v4rgateMod == 3) + *(ckt->CKTstate1 + here->BSIM4v4qgmid) = + *(ckt->CKTstate0 + here->BSIM4v4qgmid); + if (here->BSIM4v4rbodyMod) + { *(ckt->CKTstate1 + here->BSIM4v4qbs) = + *(ckt->CKTstate0 + here->BSIM4v4qbs); + *(ckt->CKTstate1 + here->BSIM4v4qbd) = + *(ckt->CKTstate0 + here->BSIM4v4qbd); } } - error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4V4qb); + error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qb); if (error) return(error); - error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4V4qg); + error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qg); if (error) return(error); - error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4V4qd); + error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qd); if (error) return(error); - if (here->BSIM4V4rgateMod == 3) - { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4V4qgmid); + if (here->BSIM4v4rgateMod == 3) + { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qgmid); if (error) return(error); } - if (here->BSIM4V4rbodyMod) - { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4V4qbs); + if (here->BSIM4v4rbodyMod) + { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qbs); if (error) return(error); - error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4V4qbd); + error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qbd); if (error) return(error); } @@ -4171,18 +4171,18 @@ line850: gqdef = gcqgb = gcqdb = gcqsb = gcqbb = 0.0; ggtg = ggtd = ggtb = ggts = 0.0; - sxpart = (1.0 - (dxpart = (here->BSIM4V4mode > 0) ? 0.4 : 0.6)); + sxpart = (1.0 - (dxpart = (here->BSIM4v4mode > 0) ? 0.4 : 0.6)); ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; - if (here->BSIM4V4trnqsMod) - { CoxWL = model->BSIM4V4coxe * pParam->BSIM4V4weffCV * here->BSIM4V4nf - * pParam->BSIM4V4leffCV; - T1 = here->BSIM4V4gcrg / CoxWL; - here->BSIM4V4gtau = T1 * ScalingFactor; + if (here->BSIM4v4trnqsMod) + { CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * here->BSIM4v4nf + * pParam->BSIM4v4leffCV; + T1 = here->BSIM4v4gcrg / CoxWL; + here->BSIM4v4gtau = T1 * ScalingFactor; } else - here->BSIM4V4gtau = 0.0; + here->BSIM4v4gtau = 0.0; goto line900; @@ -4190,9 +4190,9 @@ line850: line860: /* Calculate equivalent charge current */ - cqgate = *(ckt->CKTstate0 + here->BSIM4V4cqg); - cqbody = *(ckt->CKTstate0 + here->BSIM4V4cqb); - cqdrn = *(ckt->CKTstate0 + here->BSIM4V4cqd); + cqgate = *(ckt->CKTstate0 + here->BSIM4v4cqg); + cqbody = *(ckt->CKTstate0 + here->BSIM4v4cqb); + cqdrn = *(ckt->CKTstate0 + here->BSIM4v4cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqd = cqdrn - gcdgb * vgb - gcdgmb * vgmb + (gcddb + gcdbdb) @@ -4201,45 +4201,45 @@ line860: + gcbdb * vbd + gcbsb * vbs; - if (here->BSIM4V4rgateMod == 3) - ceqqgmid = *(ckt->CKTstate0 + here->BSIM4V4cqgmid) + if (here->BSIM4v4rgateMod == 3) + ceqqgmid = *(ckt->CKTstate0 + here->BSIM4v4cqgmid) + gcgmdb * vbd + gcgmsb * vbs - gcgmgmb * vgmb; else ceqqgmid = 0.0; - if (here->BSIM4V4rbodyMod) - { ceqqjs = *(ckt->CKTstate0 + here->BSIM4V4cqbs) + gcsbsb * vbs_jct; - ceqqjd = *(ckt->CKTstate0 + here->BSIM4V4cqbd) + gcdbdb * vbd_jct; + if (here->BSIM4v4rbodyMod) + { ceqqjs = *(ckt->CKTstate0 + here->BSIM4v4cqbs) + gcsbsb * vbs_jct; + ceqqjd = *(ckt->CKTstate0 + here->BSIM4v4cqbd) + gcdbdb * vbd_jct; } - if (here->BSIM4V4trnqsMod) + if (here->BSIM4v4trnqsMod) { T0 = ggtg * vgb - ggtd * vbd - ggts * vbs; ceqqg += T0; - T1 = qdef * here->BSIM4V4gtau; + T1 = qdef * here->BSIM4v4gtau; ceqqd -= dxpart * T0 + T1 * (ddxpart_dVg * vgb - ddxpart_dVd * vbd - ddxpart_dVs * vbs); - cqdef = *(ckt->CKTstate0 + here->BSIM4V4cqcdump) - gqdef * qdef; - cqcheq = *(ckt->CKTstate0 + here->BSIM4V4cqcheq) + cqdef = *(ckt->CKTstate0 + here->BSIM4v4cqcdump) - gqdef * qdef; + cqcheq = *(ckt->CKTstate0 + here->BSIM4v4cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + T0; } if (ckt->CKTmode & MODEINITTRAN) - { *(ckt->CKTstate1 + here->BSIM4V4cqb) = - *(ckt->CKTstate0 + here->BSIM4V4cqb); - *(ckt->CKTstate1 + here->BSIM4V4cqg) = - *(ckt->CKTstate0 + here->BSIM4V4cqg); - *(ckt->CKTstate1 + here->BSIM4V4cqd) = - *(ckt->CKTstate0 + here->BSIM4V4cqd); - - if (here->BSIM4V4rgateMod == 3) - *(ckt->CKTstate1 + here->BSIM4V4cqgmid) = - *(ckt->CKTstate0 + here->BSIM4V4cqgmid); - - if (here->BSIM4V4rbodyMod) - { *(ckt->CKTstate1 + here->BSIM4V4cqbs) = - *(ckt->CKTstate0 + here->BSIM4V4cqbs); - *(ckt->CKTstate1 + here->BSIM4V4cqbd) = - *(ckt->CKTstate0 + here->BSIM4V4cqbd); + { *(ckt->CKTstate1 + here->BSIM4v4cqb) = + *(ckt->CKTstate0 + here->BSIM4v4cqb); + *(ckt->CKTstate1 + here->BSIM4v4cqg) = + *(ckt->CKTstate0 + here->BSIM4v4cqg); + *(ckt->CKTstate1 + here->BSIM4v4cqd) = + *(ckt->CKTstate0 + here->BSIM4v4cqd); + + if (here->BSIM4v4rgateMod == 3) + *(ckt->CKTstate1 + here->BSIM4v4cqgmid) = + *(ckt->CKTstate0 + here->BSIM4v4cqgmid); + + if (here->BSIM4v4rbodyMod) + { *(ckt->CKTstate1 + here->BSIM4v4cqbs) = + *(ckt->CKTstate0 + here->BSIM4v4cqbs); + *(ckt->CKTstate1 + here->BSIM4v4cqbd) = + *(ckt->CKTstate0 + here->BSIM4v4cqbd); } } @@ -4249,27 +4249,27 @@ line860: */ line900: - if (here->BSIM4V4mode >= 0) - { Gm = here->BSIM4V4gm; - Gmbs = here->BSIM4V4gmbs; + if (here->BSIM4v4mode >= 0) + { Gm = here->BSIM4v4gm; + Gmbs = here->BSIM4v4gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; - ceqdrn = model->BSIM4V4type * (cdrain - here->BSIM4V4gds * vds + ceqdrn = model->BSIM4v4type * (cdrain - here->BSIM4v4gds * vds - Gm * vgs - Gmbs * vbs); - ceqbd = model->BSIM4V4type * (here->BSIM4V4csub + here->BSIM4V4Igidl - - (here->BSIM4V4gbds + here->BSIM4V4ggidld) * vds - - (here->BSIM4V4gbgs + here->BSIM4V4ggidlg) * vgs - - (here->BSIM4V4gbbs + here->BSIM4V4ggidlb) * vbs); - ceqbs = model->BSIM4V4type * (here->BSIM4V4Igisl + here->BSIM4V4ggisls * vds - - here->BSIM4V4ggislg * vgd - here->BSIM4V4ggislb * vbd); - - gbbdp = -(here->BSIM4V4gbds); - gbbsp = here->BSIM4V4gbds + here->BSIM4V4gbgs + here->BSIM4V4gbbs; + ceqbd = model->BSIM4v4type * (here->BSIM4v4csub + here->BSIM4v4Igidl + - (here->BSIM4v4gbds + here->BSIM4v4ggidld) * vds + - (here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * vgs + - (here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * vbs); + ceqbs = model->BSIM4v4type * (here->BSIM4v4Igisl + here->BSIM4v4ggisls * vds + - here->BSIM4v4ggislg * vgd - here->BSIM4v4ggislb * vbd); + + gbbdp = -(here->BSIM4v4gbds); + gbbsp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; - gbdpg = here->BSIM4V4gbgs; - gbdpdp = here->BSIM4V4gbds; - gbdpb = here->BSIM4V4gbbs; + gbdpg = here->BSIM4v4gbgs; + gbdpdp = here->BSIM4v4gbds; + gbdpb = here->BSIM4v4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; @@ -4277,41 +4277,41 @@ line900: gbspb = 0.0; gbspsp = 0.0; - if (model->BSIM4V4igcMod) - { gIstotg = here->BSIM4V4gIgsg + here->BSIM4V4gIgcsg; - gIstotd = here->BSIM4V4gIgcsd; - gIstots = here->BSIM4V4gIgss + here->BSIM4V4gIgcss; - gIstotb = here->BSIM4V4gIgcsb; - Istoteq = model->BSIM4V4type * (here->BSIM4V4Igs + here->BSIM4V4Igcs - - gIstotg * vgs - here->BSIM4V4gIgcsd * vds - - here->BSIM4V4gIgcsb * vbs); - - gIdtotg = here->BSIM4V4gIgdg + here->BSIM4V4gIgcdg; - gIdtotd = here->BSIM4V4gIgdd + here->BSIM4V4gIgcdd; - gIdtots = here->BSIM4V4gIgcds; - gIdtotb = here->BSIM4V4gIgcdb; - Idtoteq = model->BSIM4V4type * (here->BSIM4V4Igd + here->BSIM4V4Igcd - - here->BSIM4V4gIgdg * vgd - here->BSIM4V4gIgcdg * vgs - - here->BSIM4V4gIgcdd * vds - here->BSIM4V4gIgcdb * vbs); + if (model->BSIM4v4igcMod) + { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg; + gIstotd = here->BSIM4v4gIgcsd; + gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcss; + gIstotb = here->BSIM4v4gIgcsb; + Istoteq = model->BSIM4v4type * (here->BSIM4v4Igs + here->BSIM4v4Igcs + - gIstotg * vgs - here->BSIM4v4gIgcsd * vds + - here->BSIM4v4gIgcsb * vbs); + + gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcdg; + gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcdd; + gIdtots = here->BSIM4v4gIgcds; + gIdtotb = here->BSIM4v4gIgcdb; + Idtoteq = model->BSIM4v4type * (here->BSIM4v4Igd + here->BSIM4v4Igcd + - here->BSIM4v4gIgdg * vgd - here->BSIM4v4gIgcdg * vgs + - here->BSIM4v4gIgcdd * vds - here->BSIM4v4gIgcdb * vbs); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } - if (model->BSIM4V4igbMod) - { gIbtotg = here->BSIM4V4gIgbg; - gIbtotd = here->BSIM4V4gIgbd; - gIbtots = here->BSIM4V4gIgbs; - gIbtotb = here->BSIM4V4gIgbb; - Ibtoteq = model->BSIM4V4type * (here->BSIM4V4Igb - - here->BSIM4V4gIgbg * vgs - here->BSIM4V4gIgbd * vds - - here->BSIM4V4gIgbb * vbs); + if (model->BSIM4v4igbMod) + { gIbtotg = here->BSIM4v4gIgbg; + gIbtotd = here->BSIM4v4gIgbd; + gIbtots = here->BSIM4v4gIgbs; + gIbtotb = here->BSIM4v4gIgbb; + Ibtoteq = model->BSIM4v4type * (here->BSIM4v4Igb + - here->BSIM4v4gIgbg * vgs - here->BSIM4v4gIgbd * vds + - here->BSIM4v4gIgbb * vbs); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; - if ((model->BSIM4V4igcMod != 0) || (model->BSIM4V4igbMod != 0)) + if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; @@ -4322,87 +4322,87 @@ line900: gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; - if (here->BSIM4V4rgateMod == 2) + if (here->BSIM4v4rgateMod == 2) T0 = vges - vgs; - else if (here->BSIM4V4rgateMod == 3) + else if (here->BSIM4v4rgateMod == 3) T0 = vgms - vgs; - if (here->BSIM4V4rgateMod > 1) - { gcrgd = here->BSIM4V4gcrgd * T0; - gcrgg = here->BSIM4V4gcrgg * T0; - gcrgs = here->BSIM4V4gcrgs * T0; - gcrgb = here->BSIM4V4gcrgb * T0; + if (here->BSIM4v4rgateMod > 1) + { gcrgd = here->BSIM4v4gcrgd * T0; + gcrgg = here->BSIM4v4gcrgg * T0; + gcrgs = here->BSIM4v4gcrgs * T0; + gcrgb = here->BSIM4v4gcrgb * T0; ceqgcrg = -(gcrgd * vds + gcrgg * vgs + gcrgb * vbs); - gcrgg -= here->BSIM4V4gcrg; - gcrg = here->BSIM4V4gcrg; + gcrgg -= here->BSIM4v4gcrg; + gcrg = here->BSIM4v4gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } else - { Gm = -here->BSIM4V4gm; - Gmbs = -here->BSIM4V4gmbs; + { Gm = -here->BSIM4v4gm; + Gmbs = -here->BSIM4v4gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); - ceqdrn = -model->BSIM4V4type * (cdrain + here->BSIM4V4gds * vds + ceqdrn = -model->BSIM4v4type * (cdrain + here->BSIM4v4gds * vds + Gm * vgd + Gmbs * vbd); - ceqbs = model->BSIM4V4type * (here->BSIM4V4csub + here->BSIM4V4Igisl - + (here->BSIM4V4gbds + here->BSIM4V4ggisls) * vds - - (here->BSIM4V4gbgs + here->BSIM4V4ggislg) * vgd - - (here->BSIM4V4gbbs + here->BSIM4V4ggislb) * vbd); - ceqbd = model->BSIM4V4type * (here->BSIM4V4Igidl - here->BSIM4V4ggidld * vds - - here->BSIM4V4ggidlg * vgs - here->BSIM4V4ggidlb * vbs); + ceqbs = model->BSIM4v4type * (here->BSIM4v4csub + here->BSIM4v4Igisl + + (here->BSIM4v4gbds + here->BSIM4v4ggisls) * vds + - (here->BSIM4v4gbgs + here->BSIM4v4ggislg) * vgd + - (here->BSIM4v4gbbs + here->BSIM4v4ggislb) * vbd); + ceqbd = model->BSIM4v4type * (here->BSIM4v4Igidl - here->BSIM4v4ggidld * vds + - here->BSIM4v4ggidlg * vgs - here->BSIM4v4ggidlb * vbs); - gbbsp = -(here->BSIM4V4gbds); - gbbdp = here->BSIM4V4gbds + here->BSIM4V4gbgs + here->BSIM4V4gbbs; + gbbsp = -(here->BSIM4v4gbds); + gbbdp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; - gbspg = here->BSIM4V4gbgs; - gbspsp = here->BSIM4V4gbds; - gbspb = here->BSIM4V4gbbs; + gbspg = here->BSIM4v4gbgs; + gbspsp = here->BSIM4v4gbds; + gbspb = here->BSIM4v4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); - if (model->BSIM4V4igcMod) - { gIstotg = here->BSIM4V4gIgsg + here->BSIM4V4gIgcdg; - gIstotd = here->BSIM4V4gIgcds; - gIstots = here->BSIM4V4gIgss + here->BSIM4V4gIgcdd; - gIstotb = here->BSIM4V4gIgcdb; - Istoteq = model->BSIM4V4type * (here->BSIM4V4Igs + here->BSIM4V4Igcd - - here->BSIM4V4gIgsg * vgs - here->BSIM4V4gIgcdg * vgd - + here->BSIM4V4gIgcdd * vds - here->BSIM4V4gIgcdb * vbd); - - gIdtotg = here->BSIM4V4gIgdg + here->BSIM4V4gIgcsg; - gIdtotd = here->BSIM4V4gIgdd + here->BSIM4V4gIgcss; - gIdtots = here->BSIM4V4gIgcsd; - gIdtotb = here->BSIM4V4gIgcsb; - Idtoteq = model->BSIM4V4type * (here->BSIM4V4Igd + here->BSIM4V4Igcs - - (here->BSIM4V4gIgdg + here->BSIM4V4gIgcsg) * vgd - + here->BSIM4V4gIgcsd * vds - here->BSIM4V4gIgcsb * vbd); + if (model->BSIM4v4igcMod) + { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcdg; + gIstotd = here->BSIM4v4gIgcds; + gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcdd; + gIstotb = here->BSIM4v4gIgcdb; + Istoteq = model->BSIM4v4type * (here->BSIM4v4Igs + here->BSIM4v4Igcd + - here->BSIM4v4gIgsg * vgs - here->BSIM4v4gIgcdg * vgd + + here->BSIM4v4gIgcdd * vds - here->BSIM4v4gIgcdb * vbd); + + gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg; + gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcss; + gIdtots = here->BSIM4v4gIgcsd; + gIdtotb = here->BSIM4v4gIgcsb; + Idtoteq = model->BSIM4v4type * (here->BSIM4v4Igd + here->BSIM4v4Igcs + - (here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg) * vgd + + here->BSIM4v4gIgcsd * vds - here->BSIM4v4gIgcsb * vbd); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } - if (model->BSIM4V4igbMod) - { gIbtotg = here->BSIM4V4gIgbg; - gIbtotd = here->BSIM4V4gIgbs; - gIbtots = here->BSIM4V4gIgbd; - gIbtotb = here->BSIM4V4gIgbb; - Ibtoteq = model->BSIM4V4type * (here->BSIM4V4Igb - - here->BSIM4V4gIgbg * vgd + here->BSIM4V4gIgbd * vds - - here->BSIM4V4gIgbb * vbd); + if (model->BSIM4v4igbMod) + { gIbtotg = here->BSIM4v4gIgbg; + gIbtotd = here->BSIM4v4gIgbs; + gIbtots = here->BSIM4v4gIgbd; + gIbtotb = here->BSIM4v4gIgbb; + Ibtoteq = model->BSIM4v4type * (here->BSIM4v4Igb + - here->BSIM4v4gIgbg * vgd + here->BSIM4v4gIgbd * vds + - here->BSIM4v4gIgbb * vbd); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; - if ((model->BSIM4V4igcMod != 0) || (model->BSIM4V4igbMod != 0)) + if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; @@ -4413,71 +4413,71 @@ line900: gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; - if (here->BSIM4V4rgateMod == 2) + if (here->BSIM4v4rgateMod == 2) T0 = vges - vgs; - else if (here->BSIM4V4rgateMod == 3) + else if (here->BSIM4v4rgateMod == 3) T0 = vgms - vgs; - if (here->BSIM4V4rgateMod > 1) - { gcrgd = here->BSIM4V4gcrgs * T0; - gcrgg = here->BSIM4V4gcrgg * T0; - gcrgs = here->BSIM4V4gcrgd * T0; - gcrgb = here->BSIM4V4gcrgb * T0; + if (here->BSIM4v4rgateMod > 1) + { gcrgd = here->BSIM4v4gcrgs * T0; + gcrgg = here->BSIM4v4gcrgg * T0; + gcrgs = here->BSIM4v4gcrgd * T0; + gcrgb = here->BSIM4v4gcrgb * T0; ceqgcrg = -(gcrgg * vgd - gcrgs * vds + gcrgb * vbd); - gcrgg -= here->BSIM4V4gcrg; - gcrg = here->BSIM4V4gcrg; + gcrgg -= here->BSIM4v4gcrg; + gcrg = here->BSIM4v4gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } - if (model->BSIM4V4rdsMod == 1) - { ceqgstot = model->BSIM4V4type * (here->BSIM4V4gstotd * vds - + here->BSIM4V4gstotg * vgs + here->BSIM4V4gstotb * vbs); + if (model->BSIM4v4rdsMod == 1) + { ceqgstot = model->BSIM4v4type * (here->BSIM4v4gstotd * vds + + here->BSIM4v4gstotg * vgs + here->BSIM4v4gstotb * vbs); /* WDLiu: ceqgstot flowing away from sNodePrime */ - gstot = here->BSIM4V4gstot; - gstotd = here->BSIM4V4gstotd; - gstotg = here->BSIM4V4gstotg; - gstots = here->BSIM4V4gstots - gstot; - gstotb = here->BSIM4V4gstotb; - - ceqgdtot = -model->BSIM4V4type * (here->BSIM4V4gdtotd * vds - + here->BSIM4V4gdtotg * vgs + here->BSIM4V4gdtotb * vbs); + gstot = here->BSIM4v4gstot; + gstotd = here->BSIM4v4gstotd; + gstotg = here->BSIM4v4gstotg; + gstots = here->BSIM4v4gstots - gstot; + gstotb = here->BSIM4v4gstotb; + + ceqgdtot = -model->BSIM4v4type * (here->BSIM4v4gdtotd * vds + + here->BSIM4v4gdtotg * vgs + here->BSIM4v4gdtotb * vbs); /* WDLiu: ceqgdtot defined as flowing into dNodePrime */ - gdtot = here->BSIM4V4gdtot; - gdtotd = here->BSIM4V4gdtotd - gdtot; - gdtotg = here->BSIM4V4gdtotg; - gdtots = here->BSIM4V4gdtots; - gdtotb = here->BSIM4V4gdtotb; + gdtot = here->BSIM4v4gdtot; + gdtotd = here->BSIM4v4gdtotd - gdtot; + gdtotg = here->BSIM4v4gdtotg; + gdtots = here->BSIM4v4gdtots; + gdtotb = here->BSIM4v4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = ceqgstot = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = ceqgdtot = 0.0; } - if (model->BSIM4V4type > 0) - { ceqjs = (here->BSIM4V4cbs - here->BSIM4V4gbs * vbs_jct); - ceqjd = (here->BSIM4V4cbd - here->BSIM4V4gbd * vbd_jct); + if (model->BSIM4v4type > 0) + { ceqjs = (here->BSIM4v4cbs - here->BSIM4v4gbs * vbs_jct); + ceqjd = (here->BSIM4v4cbd - here->BSIM4v4gbd * vbd_jct); } else - { ceqjs = -(here->BSIM4V4cbs - here->BSIM4V4gbs * vbs_jct); - ceqjd = -(here->BSIM4V4cbd - here->BSIM4V4gbd * vbd_jct); + { ceqjs = -(here->BSIM4v4cbs - here->BSIM4v4gbs * vbs_jct); + ceqjd = -(here->BSIM4v4cbd - here->BSIM4v4gbd * vbd_jct); ceqqg = -ceqqg; ceqqd = -ceqqd; ceqqb = -ceqqb; ceqgcrg = -ceqgcrg; - if (here->BSIM4V4trnqsMod) + if (here->BSIM4v4trnqsMod) { cqdef = -cqdef; cqcheq = -cqcheq; } - if (here->BSIM4V4rbodyMod) + if (here->BSIM4v4rbodyMod) { ceqqjs = -ceqqjs; ceqqjd = -ceqqjd; } - if (here->BSIM4V4rgateMod == 3) + if (here->BSIM4v4rgateMod == 3) ceqqgmid = -ceqqgmid; } @@ -4486,220 +4486,220 @@ line900: * Loading RHS */ - m = here->BSIM4V4m; + m = here->BSIM4v4m; - (*(ckt->CKTrhs + here->BSIM4V4dNodePrime) += m * (ceqjd - ceqbd + ceqgdtot + (*(ckt->CKTrhs + here->BSIM4v4dNodePrime) += m * (ceqjd - ceqbd + ceqgdtot - ceqdrn - ceqqd + Idtoteq)); - (*(ckt->CKTrhs + here->BSIM4V4gNodePrime) -= m * (ceqqg - ceqgcrg + Igtoteq)); + (*(ckt->CKTrhs + here->BSIM4v4gNodePrime) -= m * (ceqqg - ceqgcrg + Igtoteq)); - if (here->BSIM4V4rgateMod == 2) - (*(ckt->CKTrhs + here->BSIM4V4gNodeExt) -= m * ceqgcrg); - else if (here->BSIM4V4rgateMod == 3) - (*(ckt->CKTrhs + here->BSIM4V4gNodeMid) -= m * (ceqqgmid + ceqgcrg)); + if (here->BSIM4v4rgateMod == 2) + (*(ckt->CKTrhs + here->BSIM4v4gNodeExt) -= m * ceqgcrg); + else if (here->BSIM4v4rgateMod == 3) + (*(ckt->CKTrhs + here->BSIM4v4gNodeMid) -= m * (ceqqgmid + ceqgcrg)); - if (!here->BSIM4V4rbodyMod) - { (*(ckt->CKTrhs + here->BSIM4V4bNodePrime) += m * (ceqbd + ceqbs - ceqjd + if (!here->BSIM4v4rbodyMod) + { (*(ckt->CKTrhs + here->BSIM4v4bNodePrime) += m * (ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq)); - (*(ckt->CKTrhs + here->BSIM4V4sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + (*(ckt->CKTrhs + here->BSIM4v4sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + ceqqgmid - ceqgstot + Istoteq)); } else - { (*(ckt->CKTrhs + here->BSIM4V4dbNode) -= m * (ceqjd + ceqqjd)); - (*(ckt->CKTrhs + here->BSIM4V4bNodePrime) += m * (ceqbd + ceqbs - ceqqb + Ibtoteq)); - (*(ckt->CKTrhs + here->BSIM4V4sbNode) -= m * (ceqjs + ceqqjs)); - (*(ckt->CKTrhs + here->BSIM4V4sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqd + { (*(ckt->CKTrhs + here->BSIM4v4dbNode) -= m * (ceqjd + ceqqjd)); + (*(ckt->CKTrhs + here->BSIM4v4bNodePrime) += m * (ceqbd + ceqbs - ceqqb + Ibtoteq)); + (*(ckt->CKTrhs + here->BSIM4v4sbNode) -= m * (ceqjs + ceqqjs)); + (*(ckt->CKTrhs + here->BSIM4v4sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqd + ceqqg + ceqqb + ceqqjd + ceqqjs + ceqqgmid - ceqgstot + Istoteq)); } - if (model->BSIM4V4rdsMod) - { (*(ckt->CKTrhs + here->BSIM4V4dNode) -= m * ceqgdtot); - (*(ckt->CKTrhs + here->BSIM4V4sNode) += m * ceqgstot); + if (model->BSIM4v4rdsMod) + { (*(ckt->CKTrhs + here->BSIM4v4dNode) -= m * ceqgdtot); + (*(ckt->CKTrhs + here->BSIM4v4sNode) += m * ceqgstot); } - if (here->BSIM4V4trnqsMod) - *(ckt->CKTrhs + here->BSIM4V4qNode) += m * (cqcheq - cqdef); + if (here->BSIM4v4trnqsMod) + *(ckt->CKTrhs + here->BSIM4v4qNode) += m * (cqcheq - cqdef); /* * Loading matrix */ - if (!here->BSIM4V4rbodyMod) - { gjbd = here->BSIM4V4gbd; - gjbs = here->BSIM4V4gbs; + if (!here->BSIM4v4rbodyMod) + { gjbd = here->BSIM4v4gbd; + gjbs = here->BSIM4v4gbs; } else gjbd = gjbs = 0.0; - if (!model->BSIM4V4rdsMod) - { gdpr = here->BSIM4V4drainConductance; - gspr = here->BSIM4V4sourceConductance; + if (!model->BSIM4v4rdsMod) + { gdpr = here->BSIM4v4drainConductance; + gspr = here->BSIM4v4sourceConductance; } else gdpr = gspr = 0.0; - geltd = here->BSIM4V4grgeltd; + geltd = here->BSIM4v4grgeltd; - T1 = qdef * here->BSIM4V4gtau; + T1 = qdef * here->BSIM4v4gtau; - if (here->BSIM4V4rgateMod == 1) - { (*(here->BSIM4V4GEgePtr) += m * geltd); - (*(here->BSIM4V4GPgePtr) -= m * geltd); - (*(here->BSIM4V4GEgpPtr) -= m * geltd); - (*(here->BSIM4V4GPgpPtr) += m * (gcggb + geltd - ggtg + gIgtotg)); - (*(here->BSIM4V4GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); - (*(here->BSIM4V4GPspPtr) += m * (gcgsb - ggts + gIgtots)); - (*(here->BSIM4V4GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); + if (here->BSIM4v4rgateMod == 1) + { (*(here->BSIM4v4GEgePtr) += m * geltd); + (*(here->BSIM4v4GPgePtr) -= m * geltd); + (*(here->BSIM4v4GEgpPtr) -= m * geltd); + (*(here->BSIM4v4GPgpPtr) += m * (gcggb + geltd - ggtg + gIgtotg)); + (*(here->BSIM4v4GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); + (*(here->BSIM4v4GPspPtr) += m * (gcgsb - ggts + gIgtots)); + (*(here->BSIM4v4GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } /* WDLiu: gcrg already subtracted from all gcrgg below */ - else if (here->BSIM4V4rgateMod == 2) - { (*(here->BSIM4V4GEgePtr) += m * gcrg); - (*(here->BSIM4V4GEgpPtr) += m * gcrgg); - (*(here->BSIM4V4GEdpPtr) += m * gcrgd); - (*(here->BSIM4V4GEspPtr) += m * gcrgs); - (*(here->BSIM4V4GEbpPtr) += m * gcrgb); - - (*(here->BSIM4V4GPgePtr) -= m * gcrg); - (*(here->BSIM4V4GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); - (*(here->BSIM4V4GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); - (*(here->BSIM4V4GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); - (*(here->BSIM4V4GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); + else if (here->BSIM4v4rgateMod == 2) + { (*(here->BSIM4v4GEgePtr) += m * gcrg); + (*(here->BSIM4v4GEgpPtr) += m * gcrgg); + (*(here->BSIM4v4GEdpPtr) += m * gcrgd); + (*(here->BSIM4v4GEspPtr) += m * gcrgs); + (*(here->BSIM4v4GEbpPtr) += m * gcrgb); + + (*(here->BSIM4v4GPgePtr) -= m * gcrg); + (*(here->BSIM4v4GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); + (*(here->BSIM4v4GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); + (*(here->BSIM4v4GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); + (*(here->BSIM4v4GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } - else if (here->BSIM4V4rgateMod == 3) - { (*(here->BSIM4V4GEgePtr) += m * geltd); - (*(here->BSIM4V4GEgmPtr) -= m * geltd); - (*(here->BSIM4V4GMgePtr) -= m * geltd); - (*(here->BSIM4V4GMgmPtr) += m * (geltd + gcrg + gcgmgmb)); - - (*(here->BSIM4V4GMdpPtr) += m * (gcrgd + gcgmdb)); - (*(here->BSIM4V4GMgpPtr) += m * gcrgg); - (*(here->BSIM4V4GMspPtr) += m * (gcrgs + gcgmsb)); - (*(here->BSIM4V4GMbpPtr) += m * (gcrgb + gcgmbb)); - - (*(here->BSIM4V4DPgmPtr) += m * gcdgmb); - (*(here->BSIM4V4GPgmPtr) -= m * gcrg); - (*(here->BSIM4V4SPgmPtr) += m * gcsgmb); - (*(here->BSIM4V4BPgmPtr) += m * gcbgmb); - - (*(here->BSIM4V4GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); - (*(here->BSIM4V4GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); - (*(here->BSIM4V4GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); - (*(here->BSIM4V4GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); + else if (here->BSIM4v4rgateMod == 3) + { (*(here->BSIM4v4GEgePtr) += m * geltd); + (*(here->BSIM4v4GEgmPtr) -= m * geltd); + (*(here->BSIM4v4GMgePtr) -= m * geltd); + (*(here->BSIM4v4GMgmPtr) += m * (geltd + gcrg + gcgmgmb)); + + (*(here->BSIM4v4GMdpPtr) += m * (gcrgd + gcgmdb)); + (*(here->BSIM4v4GMgpPtr) += m * gcrgg); + (*(here->BSIM4v4GMspPtr) += m * (gcrgs + gcgmsb)); + (*(here->BSIM4v4GMbpPtr) += m * (gcrgb + gcgmbb)); + + (*(here->BSIM4v4DPgmPtr) += m * gcdgmb); + (*(here->BSIM4v4GPgmPtr) -= m * gcrg); + (*(here->BSIM4v4SPgmPtr) += m * gcsgmb); + (*(here->BSIM4v4BPgmPtr) += m * gcbgmb); + + (*(here->BSIM4v4GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); + (*(here->BSIM4v4GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); + (*(here->BSIM4v4GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); + (*(here->BSIM4v4GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else - { (*(here->BSIM4V4GPgpPtr) += m * (gcggb - ggtg + gIgtotg)); - (*(here->BSIM4V4GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); - (*(here->BSIM4V4GPspPtr) += m * (gcgsb - ggts + gIgtots)); - (*(here->BSIM4V4GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); + { (*(here->BSIM4v4GPgpPtr) += m * (gcggb - ggtg + gIgtotg)); + (*(here->BSIM4v4GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); + (*(here->BSIM4v4GPspPtr) += m * (gcgsb - ggts + gIgtots)); + (*(here->BSIM4v4GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } - if (model->BSIM4V4rdsMod) - { (*(here->BSIM4V4DgpPtr) += m * gdtotg); - (*(here->BSIM4V4DspPtr) += m * gdtots); - (*(here->BSIM4V4DbpPtr) += m * gdtotb); - (*(here->BSIM4V4SdpPtr) += m * gstotd); - (*(here->BSIM4V4SgpPtr) += m * gstotg); - (*(here->BSIM4V4SbpPtr) += m * gstotb); + if (model->BSIM4v4rdsMod) + { (*(here->BSIM4v4DgpPtr) += m * gdtotg); + (*(here->BSIM4v4DspPtr) += m * gdtots); + (*(here->BSIM4v4DbpPtr) += m * gdtotb); + (*(here->BSIM4v4SdpPtr) += m * gstotd); + (*(here->BSIM4v4SgpPtr) += m * gstotg); + (*(here->BSIM4v4SbpPtr) += m * gstotb); } - (*(here->BSIM4V4DPdpPtr) += m * (gdpr + here->BSIM4V4gds + here->BSIM4V4gbd + T1 * ddxpart_dVd + (*(here->BSIM4v4DPdpPtr) += m * (gdpr + here->BSIM4v4gds + here->BSIM4v4gbd + T1 * ddxpart_dVd - gdtotd + RevSum + gcddb + gbdpdp + dxpart * ggtd - gIdtotd)); - (*(here->BSIM4V4DPdPtr) -= m * (gdpr + gdtot)); - (*(here->BSIM4V4DPgpPtr) += m * (Gm + gcdgb - gdtotg + gbdpg - gIdtotg + (*(here->BSIM4v4DPdPtr) -= m * (gdpr + gdtot)); + (*(here->BSIM4v4DPgpPtr) += m * (Gm + gcdgb - gdtotg + gbdpg - gIdtotg + dxpart * ggtg + T1 * ddxpart_dVg)); - (*(here->BSIM4V4DPspPtr) -= m * (here->BSIM4V4gds + gdtots - dxpart * ggts + gIdtots + (*(here->BSIM4v4DPspPtr) -= m * (here->BSIM4v4gds + gdtots - dxpart * ggts + gIdtots - T1 * ddxpart_dVs + FwdSum - gcdsb - gbdpsp)); - (*(here->BSIM4V4DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gcdbb - gbdpb + gIdtotb + (*(here->BSIM4v4DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gcdbb - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * ggtb)); - (*(here->BSIM4V4DdpPtr) -= m * (gdpr - gdtotd)); - (*(here->BSIM4V4DdPtr) += m * (gdpr + gdtot)); + (*(here->BSIM4v4DdpPtr) -= m * (gdpr - gdtotd)); + (*(here->BSIM4v4DdPtr) += m * (gdpr + gdtot)); - (*(here->BSIM4V4SPdpPtr) -= m * (here->BSIM4V4gds + gstotd + RevSum - gcsdb - gbspdp + (*(here->BSIM4v4SPdpPtr) -= m * (here->BSIM4v4gds + gstotd + RevSum - gcsdb - gbspdp - T1 * dsxpart_dVd - sxpart * ggtd + gIstotd)); - (*(here->BSIM4V4SPgpPtr) += m * (gcsgb - Gm - gstotg + gbspg + sxpart * ggtg + (*(here->BSIM4v4SPgpPtr) += m * (gcsgb - Gm - gstotg + gbspg + sxpart * ggtg + T1 * dsxpart_dVg - gIstotg)); - (*(here->BSIM4V4SPspPtr) += m * (gspr + here->BSIM4V4gds + here->BSIM4V4gbs + T1 * dsxpart_dVs + (*(here->BSIM4v4SPspPtr) += m * (gspr + here->BSIM4v4gds + here->BSIM4v4gbs + T1 * dsxpart_dVs - gstots + FwdSum + gcssb + gbspsp + sxpart * ggts - gIstots)); - (*(here->BSIM4V4SPsPtr) -= m * (gspr + gstot)); - (*(here->BSIM4V4SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gcsbb - gbspb - sxpart * ggtb + (*(here->BSIM4v4SPsPtr) -= m * (gspr + gstot)); + (*(here->BSIM4v4SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gcsbb - gbspb - sxpart * ggtb - T1 * dsxpart_dVb + gIstotb)); - (*(here->BSIM4V4SspPtr) -= m * (gspr - gstots)); - (*(here->BSIM4V4SsPtr) += m * (gspr + gstot)); + (*(here->BSIM4v4SspPtr) -= m * (gspr - gstots)); + (*(here->BSIM4v4SsPtr) += m * (gspr + gstot)); - (*(here->BSIM4V4BPdpPtr) += m * (gcbdb - gjbd + gbbdp - gIbtotd)); - (*(here->BSIM4V4BPgpPtr) += m * (gcbgb - here->BSIM4V4gbgs - gIbtotg)); - (*(here->BSIM4V4BPspPtr) += m * (gcbsb - gjbs + gbbsp - gIbtots)); - (*(here->BSIM4V4BPbpPtr) += m * (gjbd + gjbs + gcbbb - here->BSIM4V4gbbs + (*(here->BSIM4v4BPdpPtr) += m * (gcbdb - gjbd + gbbdp - gIbtotd)); + (*(here->BSIM4v4BPgpPtr) += m * (gcbgb - here->BSIM4v4gbgs - gIbtotg)); + (*(here->BSIM4v4BPspPtr) += m * (gcbsb - gjbs + gbbsp - gIbtots)); + (*(here->BSIM4v4BPbpPtr) += m * (gjbd + gjbs + gcbbb - here->BSIM4v4gbbs - gIbtotb)); - ggidld = here->BSIM4V4ggidld; - ggidlg = here->BSIM4V4ggidlg; - ggidlb = here->BSIM4V4ggidlb; - ggislg = here->BSIM4V4ggislg; - ggisls = here->BSIM4V4ggisls; - ggislb = here->BSIM4V4ggislb; + ggidld = here->BSIM4v4ggidld; + ggidlg = here->BSIM4v4ggidlg; + ggidlb = here->BSIM4v4ggidlb; + ggislg = here->BSIM4v4ggislg; + ggisls = here->BSIM4v4ggisls; + ggislb = here->BSIM4v4ggislb; /* stamp gidl */ - (*(here->BSIM4V4DPdpPtr) += m * ggidld); - (*(here->BSIM4V4DPgpPtr) += m * ggidlg); - (*(here->BSIM4V4DPspPtr) -= m * (ggidlg + ggidld + ggidlb)); - (*(here->BSIM4V4DPbpPtr) += m * ggidlb); - (*(here->BSIM4V4BPdpPtr) -= m * ggidld); - (*(here->BSIM4V4BPgpPtr) -= m * ggidlg); - (*(here->BSIM4V4BPspPtr) += m * (ggidlg + ggidld + ggidlb)); - (*(here->BSIM4V4BPbpPtr) -= m * ggidlb); + (*(here->BSIM4v4DPdpPtr) += m * ggidld); + (*(here->BSIM4v4DPgpPtr) += m * ggidlg); + (*(here->BSIM4v4DPspPtr) -= m * (ggidlg + ggidld + ggidlb)); + (*(here->BSIM4v4DPbpPtr) += m * ggidlb); + (*(here->BSIM4v4BPdpPtr) -= m * ggidld); + (*(here->BSIM4v4BPgpPtr) -= m * ggidlg); + (*(here->BSIM4v4BPspPtr) += m * (ggidlg + ggidld + ggidlb)); + (*(here->BSIM4v4BPbpPtr) -= m * ggidlb); /* stamp gisl */ - (*(here->BSIM4V4SPdpPtr) -= m * (ggisls + ggislg + ggislb)); - (*(here->BSIM4V4SPgpPtr) += m * ggislg); - (*(here->BSIM4V4SPspPtr) += m * ggisls); - (*(here->BSIM4V4SPbpPtr) += m * ggislb); - (*(here->BSIM4V4BPdpPtr) += m * (ggislg + ggisls + ggislb)); - (*(here->BSIM4V4BPgpPtr) -= m * ggislg); - (*(here->BSIM4V4BPspPtr) -= m * ggisls); - (*(here->BSIM4V4BPbpPtr) -= m * ggislb); - - - if (here->BSIM4V4rbodyMod) - { (*(here->BSIM4V4DPdbPtr) += m * (gcdbdb - here->BSIM4V4gbd)); - (*(here->BSIM4V4SPsbPtr) -= m * (here->BSIM4V4gbs - gcsbsb)); - - (*(here->BSIM4V4DBdpPtr) += m * (gcdbdb - here->BSIM4V4gbd)); - (*(here->BSIM4V4DBdbPtr) += m * (here->BSIM4V4gbd - gcdbdb - + here->BSIM4V4grbpd + here->BSIM4V4grbdb)); - (*(here->BSIM4V4DBbpPtr) -= m * here->BSIM4V4grbpd); - (*(here->BSIM4V4DBbPtr) -= m * here->BSIM4V4grbdb); - - (*(here->BSIM4V4BPdbPtr) -= m * here->BSIM4V4grbpd); - (*(here->BSIM4V4BPbPtr) -= m * here->BSIM4V4grbpb); - (*(here->BSIM4V4BPsbPtr) -= m * here->BSIM4V4grbps); - (*(here->BSIM4V4BPbpPtr) += m * (here->BSIM4V4grbpd + here->BSIM4V4grbps - + here->BSIM4V4grbpb)); - /* WDLiu: (gcbbb - here->BSIM4V4gbbs) already added to BPbpPtr */ - - (*(here->BSIM4V4SBspPtr) += m * (gcsbsb - here->BSIM4V4gbs)); - (*(here->BSIM4V4SBbpPtr) -= m * here->BSIM4V4grbps); - (*(here->BSIM4V4SBbPtr) -= m * here->BSIM4V4grbsb); - (*(here->BSIM4V4SBsbPtr) += m * (here->BSIM4V4gbs - gcsbsb - + here->BSIM4V4grbps + here->BSIM4V4grbsb)); - - (*(here->BSIM4V4BdbPtr) -= m * here->BSIM4V4grbdb); - (*(here->BSIM4V4BbpPtr) -= m * here->BSIM4V4grbpb); - (*(here->BSIM4V4BsbPtr) -= m * here->BSIM4V4grbsb); - (*(here->BSIM4V4BbPtr) += m * (here->BSIM4V4grbsb + here->BSIM4V4grbdb - + here->BSIM4V4grbpb)); + (*(here->BSIM4v4SPdpPtr) -= m * (ggisls + ggislg + ggislb)); + (*(here->BSIM4v4SPgpPtr) += m * ggislg); + (*(here->BSIM4v4SPspPtr) += m * ggisls); + (*(here->BSIM4v4SPbpPtr) += m * ggislb); + (*(here->BSIM4v4BPdpPtr) += m * (ggislg + ggisls + ggislb)); + (*(here->BSIM4v4BPgpPtr) -= m * ggislg); + (*(here->BSIM4v4BPspPtr) -= m * ggisls); + (*(here->BSIM4v4BPbpPtr) -= m * ggislb); + + + if (here->BSIM4v4rbodyMod) + { (*(here->BSIM4v4DPdbPtr) += m * (gcdbdb - here->BSIM4v4gbd)); + (*(here->BSIM4v4SPsbPtr) -= m * (here->BSIM4v4gbs - gcsbsb)); + + (*(here->BSIM4v4DBdpPtr) += m * (gcdbdb - here->BSIM4v4gbd)); + (*(here->BSIM4v4DBdbPtr) += m * (here->BSIM4v4gbd - gcdbdb + + here->BSIM4v4grbpd + here->BSIM4v4grbdb)); + (*(here->BSIM4v4DBbpPtr) -= m * here->BSIM4v4grbpd); + (*(here->BSIM4v4DBbPtr) -= m * here->BSIM4v4grbdb); + + (*(here->BSIM4v4BPdbPtr) -= m * here->BSIM4v4grbpd); + (*(here->BSIM4v4BPbPtr) -= m * here->BSIM4v4grbpb); + (*(here->BSIM4v4BPsbPtr) -= m * here->BSIM4v4grbps); + (*(here->BSIM4v4BPbpPtr) += m * (here->BSIM4v4grbpd + here->BSIM4v4grbps + + here->BSIM4v4grbpb)); + /* WDLiu: (gcbbb - here->BSIM4v4gbbs) already added to BPbpPtr */ + + (*(here->BSIM4v4SBspPtr) += m * (gcsbsb - here->BSIM4v4gbs)); + (*(here->BSIM4v4SBbpPtr) -= m * here->BSIM4v4grbps); + (*(here->BSIM4v4SBbPtr) -= m * here->BSIM4v4grbsb); + (*(here->BSIM4v4SBsbPtr) += m * (here->BSIM4v4gbs - gcsbsb + + here->BSIM4v4grbps + here->BSIM4v4grbsb)); + + (*(here->BSIM4v4BdbPtr) -= m * here->BSIM4v4grbdb); + (*(here->BSIM4v4BbpPtr) -= m * here->BSIM4v4grbpb); + (*(here->BSIM4v4BsbPtr) -= m * here->BSIM4v4grbsb); + (*(here->BSIM4v4BbPtr) += m * (here->BSIM4v4grbsb + here->BSIM4v4grbdb + + here->BSIM4v4grbpb)); } - if (here->BSIM4V4trnqsMod) - { (*(here->BSIM4V4QqPtr) += m * (gqdef + here->BSIM4V4gtau)); - (*(here->BSIM4V4QgpPtr) += m * (ggtg - gcqgb)); - (*(here->BSIM4V4QdpPtr) += m * (ggtd - gcqdb)); - (*(here->BSIM4V4QspPtr) += m * (ggts - gcqsb)); - (*(here->BSIM4V4QbpPtr) += m * (ggtb - gcqbb)); + if (here->BSIM4v4trnqsMod) + { (*(here->BSIM4v4QqPtr) += m * (gqdef + here->BSIM4v4gtau)); + (*(here->BSIM4v4QgpPtr) += m * (ggtg - gcqgb)); + (*(here->BSIM4v4QdpPtr) += m * (ggtd - gcqdb)); + (*(here->BSIM4v4QspPtr) += m * (ggts - gcqsb)); + (*(here->BSIM4v4QbpPtr) += m * (ggtb - gcqbb)); - (*(here->BSIM4V4DPqPtr) += m * dxpart * here->BSIM4V4gtau); - (*(here->BSIM4V4SPqPtr) += m * sxpart * here->BSIM4V4gtau); - (*(here->BSIM4V4GPqPtr) -= m * here->BSIM4V4gtau); + (*(here->BSIM4v4DPqPtr) += m * dxpart * here->BSIM4v4gtau); + (*(here->BSIM4v4SPqPtr) += m * sxpart * here->BSIM4v4gtau); + (*(here->BSIM4v4GPqPtr) -= m * here->BSIM4v4gtau); } line1000: ; @@ -4711,7 +4711,7 @@ return(OK); } /* function to compute poly depletion effect */ -int BSIM4V4polyDepletion( +int BSIM4v4polyDepletion( double phi, double ngate, double coxe, diff --git a/src/spicelib/devices/bsim4v4/b4v4mask.c b/src/spicelib/devices/bsim4v4/b4v4mask.c index 68bc863f7..137c0925b 100644 --- a/src/spicelib/devices/bsim4v4/b4v4mask.c +++ b/src/spicelib/devices/bsim4v4/b4v4mask.c @@ -22,1952 +22,1952 @@ #include "suffix.h" int -BSIM4V4mAsk(ckt,inst,which,value) +BSIM4v4mAsk(ckt,inst,which,value) CKTcircuit *ckt; GENmodel *inst; int which; IFvalue *value; { - BSIM4V4model *model = (BSIM4V4model *)inst; + BSIM4v4model *model = (BSIM4v4model *)inst; switch(which) - { case BSIM4V4_MOD_MOBMOD : - value->iValue = model->BSIM4V4mobMod; + { case BSIM4v4_MOD_MOBMOD : + value->iValue = model->BSIM4v4mobMod; return(OK); - case BSIM4V4_MOD_PARAMCHK : - value->iValue = model->BSIM4V4paramChk; + case BSIM4v4_MOD_PARAMCHK : + value->iValue = model->BSIM4v4paramChk; return(OK); - case BSIM4V4_MOD_BINUNIT : - value->iValue = model->BSIM4V4binUnit; + case BSIM4v4_MOD_BINUNIT : + value->iValue = model->BSIM4v4binUnit; return(OK); - case BSIM4V4_MOD_CAPMOD : - value->iValue = model->BSIM4V4capMod; + case BSIM4v4_MOD_CAPMOD : + value->iValue = model->BSIM4v4capMod; return(OK); - case BSIM4V4_MOD_DIOMOD : - value->iValue = model->BSIM4V4dioMod; + case BSIM4v4_MOD_DIOMOD : + value->iValue = model->BSIM4v4dioMod; return(OK); - case BSIM4V4_MOD_TRNQSMOD : - value->iValue = model->BSIM4V4trnqsMod; + case BSIM4v4_MOD_TRNQSMOD : + value->iValue = model->BSIM4v4trnqsMod; return(OK); - case BSIM4V4_MOD_ACNQSMOD : - value->iValue = model->BSIM4V4acnqsMod; + case BSIM4v4_MOD_ACNQSMOD : + value->iValue = model->BSIM4v4acnqsMod; return(OK); - case BSIM4V4_MOD_FNOIMOD : - value->iValue = model->BSIM4V4fnoiMod; + case BSIM4v4_MOD_FNOIMOD : + value->iValue = model->BSIM4v4fnoiMod; return(OK); - case BSIM4V4_MOD_TNOIMOD : - value->iValue = model->BSIM4V4tnoiMod; + case BSIM4v4_MOD_TNOIMOD : + value->iValue = model->BSIM4v4tnoiMod; return(OK); - case BSIM4V4_MOD_RDSMOD : - value->iValue = model->BSIM4V4rdsMod; + case BSIM4v4_MOD_RDSMOD : + value->iValue = model->BSIM4v4rdsMod; return(OK); - case BSIM4V4_MOD_RBODYMOD : - value->iValue = model->BSIM4V4rbodyMod; + case BSIM4v4_MOD_RBODYMOD : + value->iValue = model->BSIM4v4rbodyMod; return(OK); - case BSIM4V4_MOD_RGATEMOD : - value->iValue = model->BSIM4V4rgateMod; + case BSIM4v4_MOD_RGATEMOD : + value->iValue = model->BSIM4v4rgateMod; return(OK); - case BSIM4V4_MOD_PERMOD : - value->iValue = model->BSIM4V4perMod; + case BSIM4v4_MOD_PERMOD : + value->iValue = model->BSIM4v4perMod; return(OK); - case BSIM4V4_MOD_GEOMOD : - value->iValue = model->BSIM4V4geoMod; + case BSIM4v4_MOD_GEOMOD : + value->iValue = model->BSIM4v4geoMod; return(OK); - case BSIM4V4_MOD_IGCMOD : - value->iValue = model->BSIM4V4igcMod; + case BSIM4v4_MOD_IGCMOD : + value->iValue = model->BSIM4v4igcMod; return(OK); - case BSIM4V4_MOD_IGBMOD : - value->iValue = model->BSIM4V4igbMod; + case BSIM4v4_MOD_IGBMOD : + value->iValue = model->BSIM4v4igbMod; return(OK); - case BSIM4V4_MOD_TEMPMOD : - value->iValue = model->BSIM4V4tempMod; + case BSIM4v4_MOD_TEMPMOD : + value->iValue = model->BSIM4v4tempMod; return(OK); - case BSIM4V4_MOD_VERSION : - value->sValue = model->BSIM4V4version; + case BSIM4v4_MOD_VERSION : + value->sValue = model->BSIM4v4version; return(OK); - case BSIM4V4_MOD_TOXREF : - value->rValue = model->BSIM4V4toxref; + case BSIM4v4_MOD_TOXREF : + value->rValue = model->BSIM4v4toxref; return(OK); - case BSIM4V4_MOD_TOXE : - value->rValue = model->BSIM4V4toxe; + case BSIM4v4_MOD_TOXE : + value->rValue = model->BSIM4v4toxe; return(OK); - case BSIM4V4_MOD_TOXP : - value->rValue = model->BSIM4V4toxp; + case BSIM4v4_MOD_TOXP : + value->rValue = model->BSIM4v4toxp; return(OK); - case BSIM4V4_MOD_TOXM : - value->rValue = model->BSIM4V4toxm; + case BSIM4v4_MOD_TOXM : + value->rValue = model->BSIM4v4toxm; return(OK); - case BSIM4V4_MOD_DTOX : - value->rValue = model->BSIM4V4dtox; + case BSIM4v4_MOD_DTOX : + value->rValue = model->BSIM4v4dtox; return(OK); - case BSIM4V4_MOD_EPSROX : - value->rValue = model->BSIM4V4epsrox; + case BSIM4v4_MOD_EPSROX : + value->rValue = model->BSIM4v4epsrox; return(OK); - case BSIM4V4_MOD_CDSC : - value->rValue = model->BSIM4V4cdsc; + case BSIM4v4_MOD_CDSC : + value->rValue = model->BSIM4v4cdsc; return(OK); - case BSIM4V4_MOD_CDSCB : - value->rValue = model->BSIM4V4cdscb; + case BSIM4v4_MOD_CDSCB : + value->rValue = model->BSIM4v4cdscb; return(OK); - case BSIM4V4_MOD_CDSCD : - value->rValue = model->BSIM4V4cdscd; + case BSIM4v4_MOD_CDSCD : + value->rValue = model->BSIM4v4cdscd; return(OK); - case BSIM4V4_MOD_CIT : - value->rValue = model->BSIM4V4cit; + case BSIM4v4_MOD_CIT : + value->rValue = model->BSIM4v4cit; return(OK); - case BSIM4V4_MOD_NFACTOR : - value->rValue = model->BSIM4V4nfactor; + case BSIM4v4_MOD_NFACTOR : + value->rValue = model->BSIM4v4nfactor; return(OK); - case BSIM4V4_MOD_XJ: - value->rValue = model->BSIM4V4xj; + case BSIM4v4_MOD_XJ: + value->rValue = model->BSIM4v4xj; return(OK); - case BSIM4V4_MOD_VSAT: - value->rValue = model->BSIM4V4vsat; + case BSIM4v4_MOD_VSAT: + value->rValue = model->BSIM4v4vsat; return(OK); - case BSIM4V4_MOD_VTL: - value->rValue = model->BSIM4V4vtl; + case BSIM4v4_MOD_VTL: + value->rValue = model->BSIM4v4vtl; return(OK); - case BSIM4V4_MOD_XN: - value->rValue = model->BSIM4V4xn; + case BSIM4v4_MOD_XN: + value->rValue = model->BSIM4v4xn; return(OK); - case BSIM4V4_MOD_LC: - value->rValue = model->BSIM4V4lc; + case BSIM4v4_MOD_LC: + value->rValue = model->BSIM4v4lc; return(OK); - case BSIM4V4_MOD_LAMBDA: - value->rValue = model->BSIM4V4lambda; + case BSIM4v4_MOD_LAMBDA: + value->rValue = model->BSIM4v4lambda; return(OK); - case BSIM4V4_MOD_AT: - value->rValue = model->BSIM4V4at; + case BSIM4v4_MOD_AT: + value->rValue = model->BSIM4v4at; return(OK); - case BSIM4V4_MOD_A0: - value->rValue = model->BSIM4V4a0; + case BSIM4v4_MOD_A0: + value->rValue = model->BSIM4v4a0; return(OK); - case BSIM4V4_MOD_AGS: - value->rValue = model->BSIM4V4ags; + case BSIM4v4_MOD_AGS: + value->rValue = model->BSIM4v4ags; return(OK); - case BSIM4V4_MOD_A1: - value->rValue = model->BSIM4V4a1; + case BSIM4v4_MOD_A1: + value->rValue = model->BSIM4v4a1; return(OK); - case BSIM4V4_MOD_A2: - value->rValue = model->BSIM4V4a2; + case BSIM4v4_MOD_A2: + value->rValue = model->BSIM4v4a2; return(OK); - case BSIM4V4_MOD_KETA: - value->rValue = model->BSIM4V4keta; + case BSIM4v4_MOD_KETA: + value->rValue = model->BSIM4v4keta; return(OK); - case BSIM4V4_MOD_NSUB: - value->rValue = model->BSIM4V4nsub; + case BSIM4v4_MOD_NSUB: + value->rValue = model->BSIM4v4nsub; return(OK); - case BSIM4V4_MOD_NDEP: - value->rValue = model->BSIM4V4ndep; + case BSIM4v4_MOD_NDEP: + value->rValue = model->BSIM4v4ndep; return(OK); - case BSIM4V4_MOD_NSD: - value->rValue = model->BSIM4V4nsd; + case BSIM4v4_MOD_NSD: + value->rValue = model->BSIM4v4nsd; return(OK); - case BSIM4V4_MOD_NGATE: - value->rValue = model->BSIM4V4ngate; + case BSIM4v4_MOD_NGATE: + value->rValue = model->BSIM4v4ngate; return(OK); - case BSIM4V4_MOD_GAMMA1: - value->rValue = model->BSIM4V4gamma1; + case BSIM4v4_MOD_GAMMA1: + value->rValue = model->BSIM4v4gamma1; return(OK); - case BSIM4V4_MOD_GAMMA2: - value->rValue = model->BSIM4V4gamma2; + case BSIM4v4_MOD_GAMMA2: + value->rValue = model->BSIM4v4gamma2; return(OK); - case BSIM4V4_MOD_VBX: - value->rValue = model->BSIM4V4vbx; + case BSIM4v4_MOD_VBX: + value->rValue = model->BSIM4v4vbx; return(OK); - case BSIM4V4_MOD_VBM: - value->rValue = model->BSIM4V4vbm; + case BSIM4v4_MOD_VBM: + value->rValue = model->BSIM4v4vbm; return(OK); - case BSIM4V4_MOD_XT: - value->rValue = model->BSIM4V4xt; + case BSIM4v4_MOD_XT: + value->rValue = model->BSIM4v4xt; return(OK); - case BSIM4V4_MOD_K1: - value->rValue = model->BSIM4V4k1; + case BSIM4v4_MOD_K1: + value->rValue = model->BSIM4v4k1; return(OK); - case BSIM4V4_MOD_KT1: - value->rValue = model->BSIM4V4kt1; + case BSIM4v4_MOD_KT1: + value->rValue = model->BSIM4v4kt1; return(OK); - case BSIM4V4_MOD_KT1L: - value->rValue = model->BSIM4V4kt1l; + case BSIM4v4_MOD_KT1L: + value->rValue = model->BSIM4v4kt1l; return(OK); - case BSIM4V4_MOD_KT2 : - value->rValue = model->BSIM4V4kt2; + case BSIM4v4_MOD_KT2 : + value->rValue = model->BSIM4v4kt2; return(OK); - case BSIM4V4_MOD_K2 : - value->rValue = model->BSIM4V4k2; + case BSIM4v4_MOD_K2 : + value->rValue = model->BSIM4v4k2; return(OK); - case BSIM4V4_MOD_K3: - value->rValue = model->BSIM4V4k3; + case BSIM4v4_MOD_K3: + value->rValue = model->BSIM4v4k3; return(OK); - case BSIM4V4_MOD_K3B: - value->rValue = model->BSIM4V4k3b; + case BSIM4v4_MOD_K3B: + value->rValue = model->BSIM4v4k3b; return(OK); - case BSIM4V4_MOD_W0: - value->rValue = model->BSIM4V4w0; + case BSIM4v4_MOD_W0: + value->rValue = model->BSIM4v4w0; return(OK); - case BSIM4V4_MOD_LPE0: - value->rValue = model->BSIM4V4lpe0; + case BSIM4v4_MOD_LPE0: + value->rValue = model->BSIM4v4lpe0; return(OK); - case BSIM4V4_MOD_LPEB: - value->rValue = model->BSIM4V4lpeb; + case BSIM4v4_MOD_LPEB: + value->rValue = model->BSIM4v4lpeb; return(OK); - case BSIM4V4_MOD_DVTP0: - value->rValue = model->BSIM4V4dvtp0; + case BSIM4v4_MOD_DVTP0: + value->rValue = model->BSIM4v4dvtp0; return(OK); - case BSIM4V4_MOD_DVTP1: - value->rValue = model->BSIM4V4dvtp1; + case BSIM4v4_MOD_DVTP1: + value->rValue = model->BSIM4v4dvtp1; return(OK); - case BSIM4V4_MOD_DVT0 : - value->rValue = model->BSIM4V4dvt0; + case BSIM4v4_MOD_DVT0 : + value->rValue = model->BSIM4v4dvt0; return(OK); - case BSIM4V4_MOD_DVT1 : - value->rValue = model->BSIM4V4dvt1; + case BSIM4v4_MOD_DVT1 : + value->rValue = model->BSIM4v4dvt1; return(OK); - case BSIM4V4_MOD_DVT2 : - value->rValue = model->BSIM4V4dvt2; + case BSIM4v4_MOD_DVT2 : + value->rValue = model->BSIM4v4dvt2; return(OK); - case BSIM4V4_MOD_DVT0W : - value->rValue = model->BSIM4V4dvt0w; + case BSIM4v4_MOD_DVT0W : + value->rValue = model->BSIM4v4dvt0w; return(OK); - case BSIM4V4_MOD_DVT1W : - value->rValue = model->BSIM4V4dvt1w; + case BSIM4v4_MOD_DVT1W : + value->rValue = model->BSIM4v4dvt1w; return(OK); - case BSIM4V4_MOD_DVT2W : - value->rValue = model->BSIM4V4dvt2w; + case BSIM4v4_MOD_DVT2W : + value->rValue = model->BSIM4v4dvt2w; return(OK); - case BSIM4V4_MOD_DROUT : - value->rValue = model->BSIM4V4drout; + case BSIM4v4_MOD_DROUT : + value->rValue = model->BSIM4v4drout; return(OK); - case BSIM4V4_MOD_DSUB : - value->rValue = model->BSIM4V4dsub; + case BSIM4v4_MOD_DSUB : + value->rValue = model->BSIM4v4dsub; return(OK); - case BSIM4V4_MOD_VTH0: - value->rValue = model->BSIM4V4vth0; + case BSIM4v4_MOD_VTH0: + value->rValue = model->BSIM4v4vth0; return(OK); - case BSIM4V4_MOD_EU: - value->rValue = model->BSIM4V4eu; + case BSIM4v4_MOD_EU: + value->rValue = model->BSIM4v4eu; return(OK); - case BSIM4V4_MOD_UA: - value->rValue = model->BSIM4V4ua; + case BSIM4v4_MOD_UA: + value->rValue = model->BSIM4v4ua; return(OK); - case BSIM4V4_MOD_UA1: - value->rValue = model->BSIM4V4ua1; + case BSIM4v4_MOD_UA1: + value->rValue = model->BSIM4v4ua1; return(OK); - case BSIM4V4_MOD_UB: - value->rValue = model->BSIM4V4ub; + case BSIM4v4_MOD_UB: + value->rValue = model->BSIM4v4ub; return(OK); - case BSIM4V4_MOD_UB1: - value->rValue = model->BSIM4V4ub1; + case BSIM4v4_MOD_UB1: + value->rValue = model->BSIM4v4ub1; return(OK); - case BSIM4V4_MOD_UC: - value->rValue = model->BSIM4V4uc; + case BSIM4v4_MOD_UC: + value->rValue = model->BSIM4v4uc; return(OK); - case BSIM4V4_MOD_UC1: - value->rValue = model->BSIM4V4uc1; + case BSIM4v4_MOD_UC1: + value->rValue = model->BSIM4v4uc1; return(OK); - case BSIM4V4_MOD_U0: - value->rValue = model->BSIM4V4u0; + case BSIM4v4_MOD_U0: + value->rValue = model->BSIM4v4u0; return(OK); - case BSIM4V4_MOD_UTE: - value->rValue = model->BSIM4V4ute; + case BSIM4v4_MOD_UTE: + value->rValue = model->BSIM4v4ute; return(OK); - case BSIM4V4_MOD_VOFF: - value->rValue = model->BSIM4V4voff; + case BSIM4v4_MOD_VOFF: + value->rValue = model->BSIM4v4voff; return(OK); - case BSIM4V4_MOD_VOFFL: - value->rValue = model->BSIM4V4voffl; + case BSIM4v4_MOD_VOFFL: + value->rValue = model->BSIM4v4voffl; return(OK); - case BSIM4V4_MOD_MINV: - value->rValue = model->BSIM4V4minv; + case BSIM4v4_MOD_MINV: + value->rValue = model->BSIM4v4minv; return(OK); - case BSIM4V4_MOD_FPROUT: - value->rValue = model->BSIM4V4fprout; + case BSIM4v4_MOD_FPROUT: + value->rValue = model->BSIM4v4fprout; return(OK); - case BSIM4V4_MOD_PDITS: - value->rValue = model->BSIM4V4pdits; + case BSIM4v4_MOD_PDITS: + value->rValue = model->BSIM4v4pdits; return(OK); - case BSIM4V4_MOD_PDITSD: - value->rValue = model->BSIM4V4pditsd; + case BSIM4v4_MOD_PDITSD: + value->rValue = model->BSIM4v4pditsd; return(OK); - case BSIM4V4_MOD_PDITSL: - value->rValue = model->BSIM4V4pditsl; + case BSIM4v4_MOD_PDITSL: + value->rValue = model->BSIM4v4pditsl; return(OK); - case BSIM4V4_MOD_DELTA: - value->rValue = model->BSIM4V4delta; + case BSIM4v4_MOD_DELTA: + value->rValue = model->BSIM4v4delta; return(OK); - case BSIM4V4_MOD_RDSW: - value->rValue = model->BSIM4V4rdsw; + case BSIM4v4_MOD_RDSW: + value->rValue = model->BSIM4v4rdsw; return(OK); - case BSIM4V4_MOD_RDSWMIN: - value->rValue = model->BSIM4V4rdswmin; + case BSIM4v4_MOD_RDSWMIN: + value->rValue = model->BSIM4v4rdswmin; return(OK); - case BSIM4V4_MOD_RDWMIN: - value->rValue = model->BSIM4V4rdwmin; + case BSIM4v4_MOD_RDWMIN: + value->rValue = model->BSIM4v4rdwmin; return(OK); - case BSIM4V4_MOD_RSWMIN: - value->rValue = model->BSIM4V4rswmin; + case BSIM4v4_MOD_RSWMIN: + value->rValue = model->BSIM4v4rswmin; return(OK); - case BSIM4V4_MOD_RDW: - value->rValue = model->BSIM4V4rdw; + case BSIM4v4_MOD_RDW: + value->rValue = model->BSIM4v4rdw; return(OK); - case BSIM4V4_MOD_RSW: - value->rValue = model->BSIM4V4rsw; + case BSIM4v4_MOD_RSW: + value->rValue = model->BSIM4v4rsw; return(OK); - case BSIM4V4_MOD_PRWG: - value->rValue = model->BSIM4V4prwg; + case BSIM4v4_MOD_PRWG: + value->rValue = model->BSIM4v4prwg; return(OK); - case BSIM4V4_MOD_PRWB: - value->rValue = model->BSIM4V4prwb; + case BSIM4v4_MOD_PRWB: + value->rValue = model->BSIM4v4prwb; return(OK); - case BSIM4V4_MOD_PRT: - value->rValue = model->BSIM4V4prt; + case BSIM4v4_MOD_PRT: + value->rValue = model->BSIM4v4prt; return(OK); - case BSIM4V4_MOD_ETA0: - value->rValue = model->BSIM4V4eta0; + case BSIM4v4_MOD_ETA0: + value->rValue = model->BSIM4v4eta0; return(OK); - case BSIM4V4_MOD_ETAB: - value->rValue = model->BSIM4V4etab; + case BSIM4v4_MOD_ETAB: + value->rValue = model->BSIM4v4etab; return(OK); - case BSIM4V4_MOD_PCLM: - value->rValue = model->BSIM4V4pclm; + case BSIM4v4_MOD_PCLM: + value->rValue = model->BSIM4v4pclm; return(OK); - case BSIM4V4_MOD_PDIBL1: - value->rValue = model->BSIM4V4pdibl1; + case BSIM4v4_MOD_PDIBL1: + value->rValue = model->BSIM4v4pdibl1; return(OK); - case BSIM4V4_MOD_PDIBL2: - value->rValue = model->BSIM4V4pdibl2; + case BSIM4v4_MOD_PDIBL2: + value->rValue = model->BSIM4v4pdibl2; return(OK); - case BSIM4V4_MOD_PDIBLB: - value->rValue = model->BSIM4V4pdiblb; + case BSIM4v4_MOD_PDIBLB: + value->rValue = model->BSIM4v4pdiblb; return(OK); - case BSIM4V4_MOD_PSCBE1: - value->rValue = model->BSIM4V4pscbe1; + case BSIM4v4_MOD_PSCBE1: + value->rValue = model->BSIM4v4pscbe1; return(OK); - case BSIM4V4_MOD_PSCBE2: - value->rValue = model->BSIM4V4pscbe2; + case BSIM4v4_MOD_PSCBE2: + value->rValue = model->BSIM4v4pscbe2; return(OK); - case BSIM4V4_MOD_PVAG: - value->rValue = model->BSIM4V4pvag; + case BSIM4v4_MOD_PVAG: + value->rValue = model->BSIM4v4pvag; return(OK); - case BSIM4V4_MOD_WR: - value->rValue = model->BSIM4V4wr; + case BSIM4v4_MOD_WR: + value->rValue = model->BSIM4v4wr; return(OK); - case BSIM4V4_MOD_DWG: - value->rValue = model->BSIM4V4dwg; + case BSIM4v4_MOD_DWG: + value->rValue = model->BSIM4v4dwg; return(OK); - case BSIM4V4_MOD_DWB: - value->rValue = model->BSIM4V4dwb; + case BSIM4v4_MOD_DWB: + value->rValue = model->BSIM4v4dwb; return(OK); - case BSIM4V4_MOD_B0: - value->rValue = model->BSIM4V4b0; + case BSIM4v4_MOD_B0: + value->rValue = model->BSIM4v4b0; return(OK); - case BSIM4V4_MOD_B1: - value->rValue = model->BSIM4V4b1; + case BSIM4v4_MOD_B1: + value->rValue = model->BSIM4v4b1; return(OK); - case BSIM4V4_MOD_ALPHA0: - value->rValue = model->BSIM4V4alpha0; + case BSIM4v4_MOD_ALPHA0: + value->rValue = model->BSIM4v4alpha0; return(OK); - case BSIM4V4_MOD_ALPHA1: - value->rValue = model->BSIM4V4alpha1; + case BSIM4v4_MOD_ALPHA1: + value->rValue = model->BSIM4v4alpha1; return(OK); - case BSIM4V4_MOD_BETA0: - value->rValue = model->BSIM4V4beta0; + case BSIM4v4_MOD_BETA0: + value->rValue = model->BSIM4v4beta0; return(OK); - case BSIM4V4_MOD_AGIDL: - value->rValue = model->BSIM4V4agidl; + case BSIM4v4_MOD_AGIDL: + value->rValue = model->BSIM4v4agidl; return(OK); - case BSIM4V4_MOD_BGIDL: - value->rValue = model->BSIM4V4bgidl; + case BSIM4v4_MOD_BGIDL: + value->rValue = model->BSIM4v4bgidl; return(OK); - case BSIM4V4_MOD_CGIDL: - value->rValue = model->BSIM4V4cgidl; + case BSIM4v4_MOD_CGIDL: + value->rValue = model->BSIM4v4cgidl; return(OK); - case BSIM4V4_MOD_EGIDL: - value->rValue = model->BSIM4V4egidl; + case BSIM4v4_MOD_EGIDL: + value->rValue = model->BSIM4v4egidl; return(OK); - case BSIM4V4_MOD_AIGC: - value->rValue = model->BSIM4V4aigc; + case BSIM4v4_MOD_AIGC: + value->rValue = model->BSIM4v4aigc; return(OK); - case BSIM4V4_MOD_BIGC: - value->rValue = model->BSIM4V4bigc; + case BSIM4v4_MOD_BIGC: + value->rValue = model->BSIM4v4bigc; return(OK); - case BSIM4V4_MOD_CIGC: - value->rValue = model->BSIM4V4cigc; + case BSIM4v4_MOD_CIGC: + value->rValue = model->BSIM4v4cigc; return(OK); - case BSIM4V4_MOD_AIGSD: - value->rValue = model->BSIM4V4aigsd; + case BSIM4v4_MOD_AIGSD: + value->rValue = model->BSIM4v4aigsd; return(OK); - case BSIM4V4_MOD_BIGSD: - value->rValue = model->BSIM4V4bigsd; + case BSIM4v4_MOD_BIGSD: + value->rValue = model->BSIM4v4bigsd; return(OK); - case BSIM4V4_MOD_CIGSD: - value->rValue = model->BSIM4V4cigsd; + case BSIM4v4_MOD_CIGSD: + value->rValue = model->BSIM4v4cigsd; return(OK); - case BSIM4V4_MOD_AIGBACC: - value->rValue = model->BSIM4V4aigbacc; + case BSIM4v4_MOD_AIGBACC: + value->rValue = model->BSIM4v4aigbacc; return(OK); - case BSIM4V4_MOD_BIGBACC: - value->rValue = model->BSIM4V4bigbacc; + case BSIM4v4_MOD_BIGBACC: + value->rValue = model->BSIM4v4bigbacc; return(OK); - case BSIM4V4_MOD_CIGBACC: - value->rValue = model->BSIM4V4cigbacc; + case BSIM4v4_MOD_CIGBACC: + value->rValue = model->BSIM4v4cigbacc; return(OK); - case BSIM4V4_MOD_AIGBINV: - value->rValue = model->BSIM4V4aigbinv; + case BSIM4v4_MOD_AIGBINV: + value->rValue = model->BSIM4v4aigbinv; return(OK); - case BSIM4V4_MOD_BIGBINV: - value->rValue = model->BSIM4V4bigbinv; + case BSIM4v4_MOD_BIGBINV: + value->rValue = model->BSIM4v4bigbinv; return(OK); - case BSIM4V4_MOD_CIGBINV: - value->rValue = model->BSIM4V4cigbinv; + case BSIM4v4_MOD_CIGBINV: + value->rValue = model->BSIM4v4cigbinv; return(OK); - case BSIM4V4_MOD_NIGC: - value->rValue = model->BSIM4V4nigc; + case BSIM4v4_MOD_NIGC: + value->rValue = model->BSIM4v4nigc; return(OK); - case BSIM4V4_MOD_NIGBACC: - value->rValue = model->BSIM4V4nigbacc; + case BSIM4v4_MOD_NIGBACC: + value->rValue = model->BSIM4v4nigbacc; return(OK); - case BSIM4V4_MOD_NIGBINV: - value->rValue = model->BSIM4V4nigbinv; + case BSIM4v4_MOD_NIGBINV: + value->rValue = model->BSIM4v4nigbinv; return(OK); - case BSIM4V4_MOD_NTOX: - value->rValue = model->BSIM4V4ntox; + case BSIM4v4_MOD_NTOX: + value->rValue = model->BSIM4v4ntox; return(OK); - case BSIM4V4_MOD_EIGBINV: - value->rValue = model->BSIM4V4eigbinv; + case BSIM4v4_MOD_EIGBINV: + value->rValue = model->BSIM4v4eigbinv; return(OK); - case BSIM4V4_MOD_PIGCD: - value->rValue = model->BSIM4V4pigcd; + case BSIM4v4_MOD_PIGCD: + value->rValue = model->BSIM4v4pigcd; return(OK); - case BSIM4V4_MOD_POXEDGE: - value->rValue = model->BSIM4V4poxedge; + case BSIM4v4_MOD_POXEDGE: + value->rValue = model->BSIM4v4poxedge; return(OK); - case BSIM4V4_MOD_PHIN: - value->rValue = model->BSIM4V4phin; + case BSIM4v4_MOD_PHIN: + value->rValue = model->BSIM4v4phin; return(OK); - case BSIM4V4_MOD_XRCRG1: - value->rValue = model->BSIM4V4xrcrg1; + case BSIM4v4_MOD_XRCRG1: + value->rValue = model->BSIM4v4xrcrg1; return(OK); - case BSIM4V4_MOD_XRCRG2: - value->rValue = model->BSIM4V4xrcrg2; + case BSIM4v4_MOD_XRCRG2: + value->rValue = model->BSIM4v4xrcrg2; return(OK); - case BSIM4V4_MOD_TNOIA: - value->rValue = model->BSIM4V4tnoia; + case BSIM4v4_MOD_TNOIA: + value->rValue = model->BSIM4v4tnoia; return(OK); - case BSIM4V4_MOD_TNOIB: - value->rValue = model->BSIM4V4tnoib; + case BSIM4v4_MOD_TNOIB: + value->rValue = model->BSIM4v4tnoib; return(OK); - case BSIM4V4_MOD_RNOIA: - value->rValue = model->BSIM4V4rnoia; + case BSIM4v4_MOD_RNOIA: + value->rValue = model->BSIM4v4rnoia; return(OK); - case BSIM4V4_MOD_RNOIB: - value->rValue = model->BSIM4V4rnoib; + case BSIM4v4_MOD_RNOIB: + value->rValue = model->BSIM4v4rnoib; return(OK); - case BSIM4V4_MOD_NTNOI: - value->rValue = model->BSIM4V4ntnoi; + case BSIM4v4_MOD_NTNOI: + value->rValue = model->BSIM4v4ntnoi; return(OK); - case BSIM4V4_MOD_IJTHDFWD: - value->rValue = model->BSIM4V4ijthdfwd; + case BSIM4v4_MOD_IJTHDFWD: + value->rValue = model->BSIM4v4ijthdfwd; return(OK); - case BSIM4V4_MOD_IJTHSFWD: - value->rValue = model->BSIM4V4ijthsfwd; + case BSIM4v4_MOD_IJTHSFWD: + value->rValue = model->BSIM4v4ijthsfwd; return(OK); - case BSIM4V4_MOD_IJTHDREV: - value->rValue = model->BSIM4V4ijthdrev; + case BSIM4v4_MOD_IJTHDREV: + value->rValue = model->BSIM4v4ijthdrev; return(OK); - case BSIM4V4_MOD_IJTHSREV: - value->rValue = model->BSIM4V4ijthsrev; + case BSIM4v4_MOD_IJTHSREV: + value->rValue = model->BSIM4v4ijthsrev; return(OK); - case BSIM4V4_MOD_XJBVD: - value->rValue = model->BSIM4V4xjbvd; + case BSIM4v4_MOD_XJBVD: + value->rValue = model->BSIM4v4xjbvd; return(OK); - case BSIM4V4_MOD_XJBVS: - value->rValue = model->BSIM4V4xjbvs; + case BSIM4v4_MOD_XJBVS: + value->rValue = model->BSIM4v4xjbvs; return(OK); - case BSIM4V4_MOD_BVD: - value->rValue = model->BSIM4V4bvd; + case BSIM4v4_MOD_BVD: + value->rValue = model->BSIM4v4bvd; return(OK); - case BSIM4V4_MOD_BVS: - value->rValue = model->BSIM4V4bvs; + case BSIM4v4_MOD_BVS: + value->rValue = model->BSIM4v4bvs; return(OK); - case BSIM4V4_MOD_VFB: - value->rValue = model->BSIM4V4vfb; + case BSIM4v4_MOD_VFB: + value->rValue = model->BSIM4v4vfb; return(OK); - case BSIM4V4_MOD_GBMIN: - value->rValue = model->BSIM4V4gbmin; + case BSIM4v4_MOD_GBMIN: + value->rValue = model->BSIM4v4gbmin; return(OK); - case BSIM4V4_MOD_RBDB: - value->rValue = model->BSIM4V4rbdb; + case BSIM4v4_MOD_RBDB: + value->rValue = model->BSIM4v4rbdb; return(OK); - case BSIM4V4_MOD_RBPB: - value->rValue = model->BSIM4V4rbpb; + case BSIM4v4_MOD_RBPB: + value->rValue = model->BSIM4v4rbpb; return(OK); - case BSIM4V4_MOD_RBSB: - value->rValue = model->BSIM4V4rbsb; + case BSIM4v4_MOD_RBSB: + value->rValue = model->BSIM4v4rbsb; return(OK); - case BSIM4V4_MOD_RBPS: - value->rValue = model->BSIM4V4rbps; + case BSIM4v4_MOD_RBPS: + value->rValue = model->BSIM4v4rbps; return(OK); - case BSIM4V4_MOD_RBPD: - value->rValue = model->BSIM4V4rbpd; + case BSIM4v4_MOD_RBPD: + value->rValue = model->BSIM4v4rbpd; return(OK); - case BSIM4V4_MOD_CGSL: - value->rValue = model->BSIM4V4cgsl; + case BSIM4v4_MOD_CGSL: + value->rValue = model->BSIM4v4cgsl; return(OK); - case BSIM4V4_MOD_CGDL: - value->rValue = model->BSIM4V4cgdl; + case BSIM4v4_MOD_CGDL: + value->rValue = model->BSIM4v4cgdl; return(OK); - case BSIM4V4_MOD_CKAPPAS: - value->rValue = model->BSIM4V4ckappas; + case BSIM4v4_MOD_CKAPPAS: + value->rValue = model->BSIM4v4ckappas; return(OK); - case BSIM4V4_MOD_CKAPPAD: - value->rValue = model->BSIM4V4ckappad; + case BSIM4v4_MOD_CKAPPAD: + value->rValue = model->BSIM4v4ckappad; return(OK); - case BSIM4V4_MOD_CF: - value->rValue = model->BSIM4V4cf; + case BSIM4v4_MOD_CF: + value->rValue = model->BSIM4v4cf; return(OK); - case BSIM4V4_MOD_CLC: - value->rValue = model->BSIM4V4clc; + case BSIM4v4_MOD_CLC: + value->rValue = model->BSIM4v4clc; return(OK); - case BSIM4V4_MOD_CLE: - value->rValue = model->BSIM4V4cle; + case BSIM4v4_MOD_CLE: + value->rValue = model->BSIM4v4cle; return(OK); - case BSIM4V4_MOD_DWC: - value->rValue = model->BSIM4V4dwc; + case BSIM4v4_MOD_DWC: + value->rValue = model->BSIM4v4dwc; return(OK); - case BSIM4V4_MOD_DLC: - value->rValue = model->BSIM4V4dlc; + case BSIM4v4_MOD_DLC: + value->rValue = model->BSIM4v4dlc; return(OK); - case BSIM4V4_MOD_XW: - value->rValue = model->BSIM4V4xw; + case BSIM4v4_MOD_XW: + value->rValue = model->BSIM4v4xw; return(OK); - case BSIM4V4_MOD_XL: - value->rValue = model->BSIM4V4xl; + case BSIM4v4_MOD_XL: + value->rValue = model->BSIM4v4xl; return(OK); - case BSIM4V4_MOD_DLCIG: - value->rValue = model->BSIM4V4dlcig; + case BSIM4v4_MOD_DLCIG: + value->rValue = model->BSIM4v4dlcig; return(OK); - case BSIM4V4_MOD_DWJ: - value->rValue = model->BSIM4V4dwj; + case BSIM4v4_MOD_DWJ: + value->rValue = model->BSIM4v4dwj; return(OK); - case BSIM4V4_MOD_VFBCV: - value->rValue = model->BSIM4V4vfbcv; + case BSIM4v4_MOD_VFBCV: + value->rValue = model->BSIM4v4vfbcv; return(OK); - case BSIM4V4_MOD_ACDE: - value->rValue = model->BSIM4V4acde; + case BSIM4v4_MOD_ACDE: + value->rValue = model->BSIM4v4acde; return(OK); - case BSIM4V4_MOD_MOIN: - value->rValue = model->BSIM4V4moin; + case BSIM4v4_MOD_MOIN: + value->rValue = model->BSIM4v4moin; return(OK); - case BSIM4V4_MOD_NOFF: - value->rValue = model->BSIM4V4noff; + case BSIM4v4_MOD_NOFF: + value->rValue = model->BSIM4v4noff; return(OK); - case BSIM4V4_MOD_VOFFCV: - value->rValue = model->BSIM4V4voffcv; + case BSIM4v4_MOD_VOFFCV: + value->rValue = model->BSIM4v4voffcv; return(OK); - case BSIM4V4_MOD_DMCG: - value->rValue = model->BSIM4V4dmcg; + case BSIM4v4_MOD_DMCG: + value->rValue = model->BSIM4v4dmcg; return(OK); - case BSIM4V4_MOD_DMCI: - value->rValue = model->BSIM4V4dmci; + case BSIM4v4_MOD_DMCI: + value->rValue = model->BSIM4v4dmci; return(OK); - case BSIM4V4_MOD_DMDG: - value->rValue = model->BSIM4V4dmdg; + case BSIM4v4_MOD_DMDG: + value->rValue = model->BSIM4v4dmdg; return(OK); - case BSIM4V4_MOD_DMCGT: - value->rValue = model->BSIM4V4dmcgt; + case BSIM4v4_MOD_DMCGT: + value->rValue = model->BSIM4v4dmcgt; return(OK); - case BSIM4V4_MOD_XGW: - value->rValue = model->BSIM4V4xgw; + case BSIM4v4_MOD_XGW: + value->rValue = model->BSIM4v4xgw; return(OK); - case BSIM4V4_MOD_XGL: - value->rValue = model->BSIM4V4xgl; + case BSIM4v4_MOD_XGL: + value->rValue = model->BSIM4v4xgl; return(OK); - case BSIM4V4_MOD_RSHG: - value->rValue = model->BSIM4V4rshg; + case BSIM4v4_MOD_RSHG: + value->rValue = model->BSIM4v4rshg; return(OK); - case BSIM4V4_MOD_NGCON: - value->rValue = model->BSIM4V4ngcon; + case BSIM4v4_MOD_NGCON: + value->rValue = model->BSIM4v4ngcon; return(OK); - case BSIM4V4_MOD_TCJ: - value->rValue = model->BSIM4V4tcj; + case BSIM4v4_MOD_TCJ: + value->rValue = model->BSIM4v4tcj; return(OK); - case BSIM4V4_MOD_TPB: - value->rValue = model->BSIM4V4tpb; + case BSIM4v4_MOD_TPB: + value->rValue = model->BSIM4v4tpb; return(OK); - case BSIM4V4_MOD_TCJSW: - value->rValue = model->BSIM4V4tcjsw; + case BSIM4v4_MOD_TCJSW: + value->rValue = model->BSIM4v4tcjsw; return(OK); - case BSIM4V4_MOD_TPBSW: - value->rValue = model->BSIM4V4tpbsw; + case BSIM4v4_MOD_TPBSW: + value->rValue = model->BSIM4v4tpbsw; return(OK); - case BSIM4V4_MOD_TCJSWG: - value->rValue = model->BSIM4V4tcjswg; + case BSIM4v4_MOD_TCJSWG: + value->rValue = model->BSIM4v4tcjswg; return(OK); - case BSIM4V4_MOD_TPBSWG: - value->rValue = model->BSIM4V4tpbswg; + case BSIM4v4_MOD_TPBSWG: + value->rValue = model->BSIM4v4tpbswg; return(OK); /* Length dependence */ - case BSIM4V4_MOD_LCDSC : - value->rValue = model->BSIM4V4lcdsc; + case BSIM4v4_MOD_LCDSC : + value->rValue = model->BSIM4v4lcdsc; return(OK); - case BSIM4V4_MOD_LCDSCB : - value->rValue = model->BSIM4V4lcdscb; + case BSIM4v4_MOD_LCDSCB : + value->rValue = model->BSIM4v4lcdscb; return(OK); - case BSIM4V4_MOD_LCDSCD : - value->rValue = model->BSIM4V4lcdscd; + case BSIM4v4_MOD_LCDSCD : + value->rValue = model->BSIM4v4lcdscd; return(OK); - case BSIM4V4_MOD_LCIT : - value->rValue = model->BSIM4V4lcit; + case BSIM4v4_MOD_LCIT : + value->rValue = model->BSIM4v4lcit; return(OK); - case BSIM4V4_MOD_LNFACTOR : - value->rValue = model->BSIM4V4lnfactor; + case BSIM4v4_MOD_LNFACTOR : + value->rValue = model->BSIM4v4lnfactor; return(OK); - case BSIM4V4_MOD_LXJ: - value->rValue = model->BSIM4V4lxj; + case BSIM4v4_MOD_LXJ: + value->rValue = model->BSIM4v4lxj; return(OK); - case BSIM4V4_MOD_LVSAT: - value->rValue = model->BSIM4V4lvsat; + case BSIM4v4_MOD_LVSAT: + value->rValue = model->BSIM4v4lvsat; return(OK); - case BSIM4V4_MOD_LAT: - value->rValue = model->BSIM4V4lat; + case BSIM4v4_MOD_LAT: + value->rValue = model->BSIM4v4lat; return(OK); - case BSIM4V4_MOD_LA0: - value->rValue = model->BSIM4V4la0; + case BSIM4v4_MOD_LA0: + value->rValue = model->BSIM4v4la0; return(OK); - case BSIM4V4_MOD_LAGS: - value->rValue = model->BSIM4V4lags; + case BSIM4v4_MOD_LAGS: + value->rValue = model->BSIM4v4lags; return(OK); - case BSIM4V4_MOD_LA1: - value->rValue = model->BSIM4V4la1; + case BSIM4v4_MOD_LA1: + value->rValue = model->BSIM4v4la1; return(OK); - case BSIM4V4_MOD_LA2: - value->rValue = model->BSIM4V4la2; + case BSIM4v4_MOD_LA2: + value->rValue = model->BSIM4v4la2; return(OK); - case BSIM4V4_MOD_LKETA: - value->rValue = model->BSIM4V4lketa; + case BSIM4v4_MOD_LKETA: + value->rValue = model->BSIM4v4lketa; return(OK); - case BSIM4V4_MOD_LNSUB: - value->rValue = model->BSIM4V4lnsub; + case BSIM4v4_MOD_LNSUB: + value->rValue = model->BSIM4v4lnsub; return(OK); - case BSIM4V4_MOD_LNDEP: - value->rValue = model->BSIM4V4lndep; + case BSIM4v4_MOD_LNDEP: + value->rValue = model->BSIM4v4lndep; return(OK); - case BSIM4V4_MOD_LNSD: - value->rValue = model->BSIM4V4lnsd; + case BSIM4v4_MOD_LNSD: + value->rValue = model->BSIM4v4lnsd; return(OK); - case BSIM4V4_MOD_LNGATE: - value->rValue = model->BSIM4V4lngate; + case BSIM4v4_MOD_LNGATE: + value->rValue = model->BSIM4v4lngate; return(OK); - case BSIM4V4_MOD_LGAMMA1: - value->rValue = model->BSIM4V4lgamma1; + case BSIM4v4_MOD_LGAMMA1: + value->rValue = model->BSIM4v4lgamma1; return(OK); - case BSIM4V4_MOD_LGAMMA2: - value->rValue = model->BSIM4V4lgamma2; + case BSIM4v4_MOD_LGAMMA2: + value->rValue = model->BSIM4v4lgamma2; return(OK); - case BSIM4V4_MOD_LVBX: - value->rValue = model->BSIM4V4lvbx; + case BSIM4v4_MOD_LVBX: + value->rValue = model->BSIM4v4lvbx; return(OK); - case BSIM4V4_MOD_LVBM: - value->rValue = model->BSIM4V4lvbm; + case BSIM4v4_MOD_LVBM: + value->rValue = model->BSIM4v4lvbm; return(OK); - case BSIM4V4_MOD_LXT: - value->rValue = model->BSIM4V4lxt; + case BSIM4v4_MOD_LXT: + value->rValue = model->BSIM4v4lxt; return(OK); - case BSIM4V4_MOD_LK1: - value->rValue = model->BSIM4V4lk1; + case BSIM4v4_MOD_LK1: + value->rValue = model->BSIM4v4lk1; return(OK); - case BSIM4V4_MOD_LKT1: - value->rValue = model->BSIM4V4lkt1; + case BSIM4v4_MOD_LKT1: + value->rValue = model->BSIM4v4lkt1; return(OK); - case BSIM4V4_MOD_LKT1L: - value->rValue = model->BSIM4V4lkt1l; + case BSIM4v4_MOD_LKT1L: + value->rValue = model->BSIM4v4lkt1l; return(OK); - case BSIM4V4_MOD_LKT2 : - value->rValue = model->BSIM4V4lkt2; + case BSIM4v4_MOD_LKT2 : + value->rValue = model->BSIM4v4lkt2; return(OK); - case BSIM4V4_MOD_LK2 : - value->rValue = model->BSIM4V4lk2; + case BSIM4v4_MOD_LK2 : + value->rValue = model->BSIM4v4lk2; return(OK); - case BSIM4V4_MOD_LK3: - value->rValue = model->BSIM4V4lk3; + case BSIM4v4_MOD_LK3: + value->rValue = model->BSIM4v4lk3; return(OK); - case BSIM4V4_MOD_LK3B: - value->rValue = model->BSIM4V4lk3b; + case BSIM4v4_MOD_LK3B: + value->rValue = model->BSIM4v4lk3b; return(OK); - case BSIM4V4_MOD_LW0: - value->rValue = model->BSIM4V4lw0; + case BSIM4v4_MOD_LW0: + value->rValue = model->BSIM4v4lw0; return(OK); - case BSIM4V4_MOD_LLPE0: - value->rValue = model->BSIM4V4llpe0; + case BSIM4v4_MOD_LLPE0: + value->rValue = model->BSIM4v4llpe0; return(OK); - case BSIM4V4_MOD_LLPEB: - value->rValue = model->BSIM4V4llpeb; + case BSIM4v4_MOD_LLPEB: + value->rValue = model->BSIM4v4llpeb; return(OK); - case BSIM4V4_MOD_LDVTP0: - value->rValue = model->BSIM4V4ldvtp0; + case BSIM4v4_MOD_LDVTP0: + value->rValue = model->BSIM4v4ldvtp0; return(OK); - case BSIM4V4_MOD_LDVTP1: - value->rValue = model->BSIM4V4ldvtp1; + case BSIM4v4_MOD_LDVTP1: + value->rValue = model->BSIM4v4ldvtp1; return(OK); - case BSIM4V4_MOD_LDVT0: - value->rValue = model->BSIM4V4ldvt0; + case BSIM4v4_MOD_LDVT0: + value->rValue = model->BSIM4v4ldvt0; return(OK); - case BSIM4V4_MOD_LDVT1 : - value->rValue = model->BSIM4V4ldvt1; + case BSIM4v4_MOD_LDVT1 : + value->rValue = model->BSIM4v4ldvt1; return(OK); - case BSIM4V4_MOD_LDVT2 : - value->rValue = model->BSIM4V4ldvt2; + case BSIM4v4_MOD_LDVT2 : + value->rValue = model->BSIM4v4ldvt2; return(OK); - case BSIM4V4_MOD_LDVT0W : - value->rValue = model->BSIM4V4ldvt0w; + case BSIM4v4_MOD_LDVT0W : + value->rValue = model->BSIM4v4ldvt0w; return(OK); - case BSIM4V4_MOD_LDVT1W : - value->rValue = model->BSIM4V4ldvt1w; + case BSIM4v4_MOD_LDVT1W : + value->rValue = model->BSIM4v4ldvt1w; return(OK); - case BSIM4V4_MOD_LDVT2W : - value->rValue = model->BSIM4V4ldvt2w; + case BSIM4v4_MOD_LDVT2W : + value->rValue = model->BSIM4v4ldvt2w; return(OK); - case BSIM4V4_MOD_LDROUT : - value->rValue = model->BSIM4V4ldrout; + case BSIM4v4_MOD_LDROUT : + value->rValue = model->BSIM4v4ldrout; return(OK); - case BSIM4V4_MOD_LDSUB : - value->rValue = model->BSIM4V4ldsub; + case BSIM4v4_MOD_LDSUB : + value->rValue = model->BSIM4v4ldsub; return(OK); - case BSIM4V4_MOD_LVTH0: - value->rValue = model->BSIM4V4lvth0; + case BSIM4v4_MOD_LVTH0: + value->rValue = model->BSIM4v4lvth0; return(OK); - case BSIM4V4_MOD_LUA: - value->rValue = model->BSIM4V4lua; + case BSIM4v4_MOD_LUA: + value->rValue = model->BSIM4v4lua; return(OK); - case BSIM4V4_MOD_LUA1: - value->rValue = model->BSIM4V4lua1; + case BSIM4v4_MOD_LUA1: + value->rValue = model->BSIM4v4lua1; return(OK); - case BSIM4V4_MOD_LUB: - value->rValue = model->BSIM4V4lub; + case BSIM4v4_MOD_LUB: + value->rValue = model->BSIM4v4lub; return(OK); - case BSIM4V4_MOD_LUB1: - value->rValue = model->BSIM4V4lub1; + case BSIM4v4_MOD_LUB1: + value->rValue = model->BSIM4v4lub1; return(OK); - case BSIM4V4_MOD_LUC: - value->rValue = model->BSIM4V4luc; + case BSIM4v4_MOD_LUC: + value->rValue = model->BSIM4v4luc; return(OK); - case BSIM4V4_MOD_LUC1: - value->rValue = model->BSIM4V4luc1; + case BSIM4v4_MOD_LUC1: + value->rValue = model->BSIM4v4luc1; return(OK); - case BSIM4V4_MOD_LU0: - value->rValue = model->BSIM4V4lu0; + case BSIM4v4_MOD_LU0: + value->rValue = model->BSIM4v4lu0; return(OK); - case BSIM4V4_MOD_LUTE: - value->rValue = model->BSIM4V4lute; + case BSIM4v4_MOD_LUTE: + value->rValue = model->BSIM4v4lute; return(OK); - case BSIM4V4_MOD_LVOFF: - value->rValue = model->BSIM4V4lvoff; + case BSIM4v4_MOD_LVOFF: + value->rValue = model->BSIM4v4lvoff; return(OK); - case BSIM4V4_MOD_LMINV: - value->rValue = model->BSIM4V4lminv; + case BSIM4v4_MOD_LMINV: + value->rValue = model->BSIM4v4lminv; return(OK); - case BSIM4V4_MOD_LFPROUT: - value->rValue = model->BSIM4V4lfprout; + case BSIM4v4_MOD_LFPROUT: + value->rValue = model->BSIM4v4lfprout; return(OK); - case BSIM4V4_MOD_LPDITS: - value->rValue = model->BSIM4V4lpdits; + case BSIM4v4_MOD_LPDITS: + value->rValue = model->BSIM4v4lpdits; return(OK); - case BSIM4V4_MOD_LPDITSD: - value->rValue = model->BSIM4V4lpditsd; + case BSIM4v4_MOD_LPDITSD: + value->rValue = model->BSIM4v4lpditsd; return(OK); - case BSIM4V4_MOD_LDELTA: - value->rValue = model->BSIM4V4ldelta; + case BSIM4v4_MOD_LDELTA: + value->rValue = model->BSIM4v4ldelta; return(OK); - case BSIM4V4_MOD_LRDSW: - value->rValue = model->BSIM4V4lrdsw; + case BSIM4v4_MOD_LRDSW: + value->rValue = model->BSIM4v4lrdsw; return(OK); - case BSIM4V4_MOD_LRDW: - value->rValue = model->BSIM4V4lrdw; + case BSIM4v4_MOD_LRDW: + value->rValue = model->BSIM4v4lrdw; return(OK); - case BSIM4V4_MOD_LRSW: - value->rValue = model->BSIM4V4lrsw; + case BSIM4v4_MOD_LRSW: + value->rValue = model->BSIM4v4lrsw; return(OK); - case BSIM4V4_MOD_LPRWB: - value->rValue = model->BSIM4V4lprwb; + case BSIM4v4_MOD_LPRWB: + value->rValue = model->BSIM4v4lprwb; return(OK); - case BSIM4V4_MOD_LPRWG: - value->rValue = model->BSIM4V4lprwg; + case BSIM4v4_MOD_LPRWG: + value->rValue = model->BSIM4v4lprwg; return(OK); - case BSIM4V4_MOD_LPRT: - value->rValue = model->BSIM4V4lprt; + case BSIM4v4_MOD_LPRT: + value->rValue = model->BSIM4v4lprt; return(OK); - case BSIM4V4_MOD_LETA0: - value->rValue = model->BSIM4V4leta0; + case BSIM4v4_MOD_LETA0: + value->rValue = model->BSIM4v4leta0; return(OK); - case BSIM4V4_MOD_LETAB: - value->rValue = model->BSIM4V4letab; + case BSIM4v4_MOD_LETAB: + value->rValue = model->BSIM4v4letab; return(OK); - case BSIM4V4_MOD_LPCLM: - value->rValue = model->BSIM4V4lpclm; + case BSIM4v4_MOD_LPCLM: + value->rValue = model->BSIM4v4lpclm; return(OK); - case BSIM4V4_MOD_LPDIBL1: - value->rValue = model->BSIM4V4lpdibl1; + case BSIM4v4_MOD_LPDIBL1: + value->rValue = model->BSIM4v4lpdibl1; return(OK); - case BSIM4V4_MOD_LPDIBL2: - value->rValue = model->BSIM4V4lpdibl2; + case BSIM4v4_MOD_LPDIBL2: + value->rValue = model->BSIM4v4lpdibl2; return(OK); - case BSIM4V4_MOD_LPDIBLB: - value->rValue = model->BSIM4V4lpdiblb; + case BSIM4v4_MOD_LPDIBLB: + value->rValue = model->BSIM4v4lpdiblb; return(OK); - case BSIM4V4_MOD_LPSCBE1: - value->rValue = model->BSIM4V4lpscbe1; + case BSIM4v4_MOD_LPSCBE1: + value->rValue = model->BSIM4v4lpscbe1; return(OK); - case BSIM4V4_MOD_LPSCBE2: - value->rValue = model->BSIM4V4lpscbe2; + case BSIM4v4_MOD_LPSCBE2: + value->rValue = model->BSIM4v4lpscbe2; return(OK); - case BSIM4V4_MOD_LPVAG: - value->rValue = model->BSIM4V4lpvag; + case BSIM4v4_MOD_LPVAG: + value->rValue = model->BSIM4v4lpvag; return(OK); - case BSIM4V4_MOD_LWR: - value->rValue = model->BSIM4V4lwr; + case BSIM4v4_MOD_LWR: + value->rValue = model->BSIM4v4lwr; return(OK); - case BSIM4V4_MOD_LDWG: - value->rValue = model->BSIM4V4ldwg; + case BSIM4v4_MOD_LDWG: + value->rValue = model->BSIM4v4ldwg; return(OK); - case BSIM4V4_MOD_LDWB: - value->rValue = model->BSIM4V4ldwb; + case BSIM4v4_MOD_LDWB: + value->rValue = model->BSIM4v4ldwb; return(OK); - case BSIM4V4_MOD_LB0: - value->rValue = model->BSIM4V4lb0; + case BSIM4v4_MOD_LB0: + value->rValue = model->BSIM4v4lb0; return(OK); - case BSIM4V4_MOD_LB1: - value->rValue = model->BSIM4V4lb1; + case BSIM4v4_MOD_LB1: + value->rValue = model->BSIM4v4lb1; return(OK); - case BSIM4V4_MOD_LALPHA0: - value->rValue = model->BSIM4V4lalpha0; + case BSIM4v4_MOD_LALPHA0: + value->rValue = model->BSIM4v4lalpha0; return(OK); - case BSIM4V4_MOD_LALPHA1: - value->rValue = model->BSIM4V4lalpha1; + case BSIM4v4_MOD_LALPHA1: + value->rValue = model->BSIM4v4lalpha1; return(OK); - case BSIM4V4_MOD_LBETA0: - value->rValue = model->BSIM4V4lbeta0; + case BSIM4v4_MOD_LBETA0: + value->rValue = model->BSIM4v4lbeta0; return(OK); - case BSIM4V4_MOD_LAGIDL: - value->rValue = model->BSIM4V4lagidl; + case BSIM4v4_MOD_LAGIDL: + value->rValue = model->BSIM4v4lagidl; return(OK); - case BSIM4V4_MOD_LBGIDL: - value->rValue = model->BSIM4V4lbgidl; + case BSIM4v4_MOD_LBGIDL: + value->rValue = model->BSIM4v4lbgidl; return(OK); - case BSIM4V4_MOD_LCGIDL: - value->rValue = model->BSIM4V4lcgidl; + case BSIM4v4_MOD_LCGIDL: + value->rValue = model->BSIM4v4lcgidl; return(OK); - case BSIM4V4_MOD_LEGIDL: - value->rValue = model->BSIM4V4legidl; + case BSIM4v4_MOD_LEGIDL: + value->rValue = model->BSIM4v4legidl; return(OK); - case BSIM4V4_MOD_LAIGC: - value->rValue = model->BSIM4V4laigc; + case BSIM4v4_MOD_LAIGC: + value->rValue = model->BSIM4v4laigc; return(OK); - case BSIM4V4_MOD_LBIGC: - value->rValue = model->BSIM4V4lbigc; + case BSIM4v4_MOD_LBIGC: + value->rValue = model->BSIM4v4lbigc; return(OK); - case BSIM4V4_MOD_LCIGC: - value->rValue = model->BSIM4V4lcigc; + case BSIM4v4_MOD_LCIGC: + value->rValue = model->BSIM4v4lcigc; return(OK); - case BSIM4V4_MOD_LAIGSD: - value->rValue = model->BSIM4V4laigsd; + case BSIM4v4_MOD_LAIGSD: + value->rValue = model->BSIM4v4laigsd; return(OK); - case BSIM4V4_MOD_LBIGSD: - value->rValue = model->BSIM4V4lbigsd; + case BSIM4v4_MOD_LBIGSD: + value->rValue = model->BSIM4v4lbigsd; return(OK); - case BSIM4V4_MOD_LCIGSD: - value->rValue = model->BSIM4V4lcigsd; + case BSIM4v4_MOD_LCIGSD: + value->rValue = model->BSIM4v4lcigsd; return(OK); - case BSIM4V4_MOD_LAIGBACC: - value->rValue = model->BSIM4V4laigbacc; + case BSIM4v4_MOD_LAIGBACC: + value->rValue = model->BSIM4v4laigbacc; return(OK); - case BSIM4V4_MOD_LBIGBACC: - value->rValue = model->BSIM4V4lbigbacc; + case BSIM4v4_MOD_LBIGBACC: + value->rValue = model->BSIM4v4lbigbacc; return(OK); - case BSIM4V4_MOD_LCIGBACC: - value->rValue = model->BSIM4V4lcigbacc; + case BSIM4v4_MOD_LCIGBACC: + value->rValue = model->BSIM4v4lcigbacc; return(OK); - case BSIM4V4_MOD_LAIGBINV: - value->rValue = model->BSIM4V4laigbinv; + case BSIM4v4_MOD_LAIGBINV: + value->rValue = model->BSIM4v4laigbinv; return(OK); - case BSIM4V4_MOD_LBIGBINV: - value->rValue = model->BSIM4V4lbigbinv; + case BSIM4v4_MOD_LBIGBINV: + value->rValue = model->BSIM4v4lbigbinv; return(OK); - case BSIM4V4_MOD_LCIGBINV: - value->rValue = model->BSIM4V4lcigbinv; + case BSIM4v4_MOD_LCIGBINV: + value->rValue = model->BSIM4v4lcigbinv; return(OK); - case BSIM4V4_MOD_LNIGC: - value->rValue = model->BSIM4V4lnigc; + case BSIM4v4_MOD_LNIGC: + value->rValue = model->BSIM4v4lnigc; return(OK); - case BSIM4V4_MOD_LNIGBACC: - value->rValue = model->BSIM4V4lnigbacc; + case BSIM4v4_MOD_LNIGBACC: + value->rValue = model->BSIM4v4lnigbacc; return(OK); - case BSIM4V4_MOD_LNIGBINV: - value->rValue = model->BSIM4V4lnigbinv; + case BSIM4v4_MOD_LNIGBINV: + value->rValue = model->BSIM4v4lnigbinv; return(OK); - case BSIM4V4_MOD_LNTOX: - value->rValue = model->BSIM4V4lntox; + case BSIM4v4_MOD_LNTOX: + value->rValue = model->BSIM4v4lntox; return(OK); - case BSIM4V4_MOD_LEIGBINV: - value->rValue = model->BSIM4V4leigbinv; + case BSIM4v4_MOD_LEIGBINV: + value->rValue = model->BSIM4v4leigbinv; return(OK); - case BSIM4V4_MOD_LPIGCD: - value->rValue = model->BSIM4V4lpigcd; + case BSIM4v4_MOD_LPIGCD: + value->rValue = model->BSIM4v4lpigcd; return(OK); - case BSIM4V4_MOD_LPOXEDGE: - value->rValue = model->BSIM4V4lpoxedge; + case BSIM4v4_MOD_LPOXEDGE: + value->rValue = model->BSIM4v4lpoxedge; return(OK); - case BSIM4V4_MOD_LPHIN: - value->rValue = model->BSIM4V4lphin; + case BSIM4v4_MOD_LPHIN: + value->rValue = model->BSIM4v4lphin; return(OK); - case BSIM4V4_MOD_LXRCRG1: - value->rValue = model->BSIM4V4lxrcrg1; + case BSIM4v4_MOD_LXRCRG1: + value->rValue = model->BSIM4v4lxrcrg1; return(OK); - case BSIM4V4_MOD_LXRCRG2: - value->rValue = model->BSIM4V4lxrcrg2; + case BSIM4v4_MOD_LXRCRG2: + value->rValue = model->BSIM4v4lxrcrg2; return(OK); - case BSIM4V4_MOD_LEU: - value->rValue = model->BSIM4V4leu; + case BSIM4v4_MOD_LEU: + value->rValue = model->BSIM4v4leu; return(OK); - case BSIM4V4_MOD_LVFB: - value->rValue = model->BSIM4V4lvfb; + case BSIM4v4_MOD_LVFB: + value->rValue = model->BSIM4v4lvfb; return(OK); - case BSIM4V4_MOD_LCGSL: - value->rValue = model->BSIM4V4lcgsl; + case BSIM4v4_MOD_LCGSL: + value->rValue = model->BSIM4v4lcgsl; return(OK); - case BSIM4V4_MOD_LCGDL: - value->rValue = model->BSIM4V4lcgdl; + case BSIM4v4_MOD_LCGDL: + value->rValue = model->BSIM4v4lcgdl; return(OK); - case BSIM4V4_MOD_LCKAPPAS: - value->rValue = model->BSIM4V4lckappas; + case BSIM4v4_MOD_LCKAPPAS: + value->rValue = model->BSIM4v4lckappas; return(OK); - case BSIM4V4_MOD_LCKAPPAD: - value->rValue = model->BSIM4V4lckappad; + case BSIM4v4_MOD_LCKAPPAD: + value->rValue = model->BSIM4v4lckappad; return(OK); - case BSIM4V4_MOD_LCF: - value->rValue = model->BSIM4V4lcf; + case BSIM4v4_MOD_LCF: + value->rValue = model->BSIM4v4lcf; return(OK); - case BSIM4V4_MOD_LCLC: - value->rValue = model->BSIM4V4lclc; + case BSIM4v4_MOD_LCLC: + value->rValue = model->BSIM4v4lclc; return(OK); - case BSIM4V4_MOD_LCLE: - value->rValue = model->BSIM4V4lcle; + case BSIM4v4_MOD_LCLE: + value->rValue = model->BSIM4v4lcle; return(OK); - case BSIM4V4_MOD_LVFBCV: - value->rValue = model->BSIM4V4lvfbcv; + case BSIM4v4_MOD_LVFBCV: + value->rValue = model->BSIM4v4lvfbcv; return(OK); - case BSIM4V4_MOD_LACDE: - value->rValue = model->BSIM4V4lacde; + case BSIM4v4_MOD_LACDE: + value->rValue = model->BSIM4v4lacde; return(OK); - case BSIM4V4_MOD_LMOIN: - value->rValue = model->BSIM4V4lmoin; + case BSIM4v4_MOD_LMOIN: + value->rValue = model->BSIM4v4lmoin; return(OK); - case BSIM4V4_MOD_LNOFF: - value->rValue = model->BSIM4V4lnoff; + case BSIM4v4_MOD_LNOFF: + value->rValue = model->BSIM4v4lnoff; return(OK); - case BSIM4V4_MOD_LVOFFCV: - value->rValue = model->BSIM4V4lvoffcv; + case BSIM4v4_MOD_LVOFFCV: + value->rValue = model->BSIM4v4lvoffcv; return(OK); /* Width dependence */ - case BSIM4V4_MOD_WCDSC : - value->rValue = model->BSIM4V4wcdsc; + case BSIM4v4_MOD_WCDSC : + value->rValue = model->BSIM4v4wcdsc; return(OK); - case BSIM4V4_MOD_WCDSCB : - value->rValue = model->BSIM4V4wcdscb; + case BSIM4v4_MOD_WCDSCB : + value->rValue = model->BSIM4v4wcdscb; return(OK); - case BSIM4V4_MOD_WCDSCD : - value->rValue = model->BSIM4V4wcdscd; + case BSIM4v4_MOD_WCDSCD : + value->rValue = model->BSIM4v4wcdscd; return(OK); - case BSIM4V4_MOD_WCIT : - value->rValue = model->BSIM4V4wcit; + case BSIM4v4_MOD_WCIT : + value->rValue = model->BSIM4v4wcit; return(OK); - case BSIM4V4_MOD_WNFACTOR : - value->rValue = model->BSIM4V4wnfactor; + case BSIM4v4_MOD_WNFACTOR : + value->rValue = model->BSIM4v4wnfactor; return(OK); - case BSIM4V4_MOD_WXJ: - value->rValue = model->BSIM4V4wxj; + case BSIM4v4_MOD_WXJ: + value->rValue = model->BSIM4v4wxj; return(OK); - case BSIM4V4_MOD_WVSAT: - value->rValue = model->BSIM4V4wvsat; + case BSIM4v4_MOD_WVSAT: + value->rValue = model->BSIM4v4wvsat; return(OK); - case BSIM4V4_MOD_WAT: - value->rValue = model->BSIM4V4wat; + case BSIM4v4_MOD_WAT: + value->rValue = model->BSIM4v4wat; return(OK); - case BSIM4V4_MOD_WA0: - value->rValue = model->BSIM4V4wa0; + case BSIM4v4_MOD_WA0: + value->rValue = model->BSIM4v4wa0; return(OK); - case BSIM4V4_MOD_WAGS: - value->rValue = model->BSIM4V4wags; + case BSIM4v4_MOD_WAGS: + value->rValue = model->BSIM4v4wags; return(OK); - case BSIM4V4_MOD_WA1: - value->rValue = model->BSIM4V4wa1; + case BSIM4v4_MOD_WA1: + value->rValue = model->BSIM4v4wa1; return(OK); - case BSIM4V4_MOD_WA2: - value->rValue = model->BSIM4V4wa2; + case BSIM4v4_MOD_WA2: + value->rValue = model->BSIM4v4wa2; return(OK); - case BSIM4V4_MOD_WKETA: - value->rValue = model->BSIM4V4wketa; + case BSIM4v4_MOD_WKETA: + value->rValue = model->BSIM4v4wketa; return(OK); - case BSIM4V4_MOD_WNSUB: - value->rValue = model->BSIM4V4wnsub; + case BSIM4v4_MOD_WNSUB: + value->rValue = model->BSIM4v4wnsub; return(OK); - case BSIM4V4_MOD_WNDEP: - value->rValue = model->BSIM4V4wndep; + case BSIM4v4_MOD_WNDEP: + value->rValue = model->BSIM4v4wndep; return(OK); - case BSIM4V4_MOD_WNSD: - value->rValue = model->BSIM4V4wnsd; + case BSIM4v4_MOD_WNSD: + value->rValue = model->BSIM4v4wnsd; return(OK); - case BSIM4V4_MOD_WNGATE: - value->rValue = model->BSIM4V4wngate; + case BSIM4v4_MOD_WNGATE: + value->rValue = model->BSIM4v4wngate; return(OK); - case BSIM4V4_MOD_WGAMMA1: - value->rValue = model->BSIM4V4wgamma1; + case BSIM4v4_MOD_WGAMMA1: + value->rValue = model->BSIM4v4wgamma1; return(OK); - case BSIM4V4_MOD_WGAMMA2: - value->rValue = model->BSIM4V4wgamma2; + case BSIM4v4_MOD_WGAMMA2: + value->rValue = model->BSIM4v4wgamma2; return(OK); - case BSIM4V4_MOD_WVBX: - value->rValue = model->BSIM4V4wvbx; + case BSIM4v4_MOD_WVBX: + value->rValue = model->BSIM4v4wvbx; return(OK); - case BSIM4V4_MOD_WVBM: - value->rValue = model->BSIM4V4wvbm; + case BSIM4v4_MOD_WVBM: + value->rValue = model->BSIM4v4wvbm; return(OK); - case BSIM4V4_MOD_WXT: - value->rValue = model->BSIM4V4wxt; + case BSIM4v4_MOD_WXT: + value->rValue = model->BSIM4v4wxt; return(OK); - case BSIM4V4_MOD_WK1: - value->rValue = model->BSIM4V4wk1; + case BSIM4v4_MOD_WK1: + value->rValue = model->BSIM4v4wk1; return(OK); - case BSIM4V4_MOD_WKT1: - value->rValue = model->BSIM4V4wkt1; + case BSIM4v4_MOD_WKT1: + value->rValue = model->BSIM4v4wkt1; return(OK); - case BSIM4V4_MOD_WKT1L: - value->rValue = model->BSIM4V4wkt1l; + case BSIM4v4_MOD_WKT1L: + value->rValue = model->BSIM4v4wkt1l; return(OK); - case BSIM4V4_MOD_WKT2 : - value->rValue = model->BSIM4V4wkt2; + case BSIM4v4_MOD_WKT2 : + value->rValue = model->BSIM4v4wkt2; return(OK); - case BSIM4V4_MOD_WK2 : - value->rValue = model->BSIM4V4wk2; + case BSIM4v4_MOD_WK2 : + value->rValue = model->BSIM4v4wk2; return(OK); - case BSIM4V4_MOD_WK3: - value->rValue = model->BSIM4V4wk3; + case BSIM4v4_MOD_WK3: + value->rValue = model->BSIM4v4wk3; return(OK); - case BSIM4V4_MOD_WK3B: - value->rValue = model->BSIM4V4wk3b; + case BSIM4v4_MOD_WK3B: + value->rValue = model->BSIM4v4wk3b; return(OK); - case BSIM4V4_MOD_WW0: - value->rValue = model->BSIM4V4ww0; + case BSIM4v4_MOD_WW0: + value->rValue = model->BSIM4v4ww0; return(OK); - case BSIM4V4_MOD_WLPE0: - value->rValue = model->BSIM4V4wlpe0; + case BSIM4v4_MOD_WLPE0: + value->rValue = model->BSIM4v4wlpe0; return(OK); - case BSIM4V4_MOD_WDVTP0: - value->rValue = model->BSIM4V4wdvtp0; + case BSIM4v4_MOD_WDVTP0: + value->rValue = model->BSIM4v4wdvtp0; return(OK); - case BSIM4V4_MOD_WDVTP1: - value->rValue = model->BSIM4V4wdvtp1; + case BSIM4v4_MOD_WDVTP1: + value->rValue = model->BSIM4v4wdvtp1; return(OK); - case BSIM4V4_MOD_WLPEB: - value->rValue = model->BSIM4V4wlpeb; + case BSIM4v4_MOD_WLPEB: + value->rValue = model->BSIM4v4wlpeb; return(OK); - case BSIM4V4_MOD_WDVT0: - value->rValue = model->BSIM4V4wdvt0; + case BSIM4v4_MOD_WDVT0: + value->rValue = model->BSIM4v4wdvt0; return(OK); - case BSIM4V4_MOD_WDVT1 : - value->rValue = model->BSIM4V4wdvt1; + case BSIM4v4_MOD_WDVT1 : + value->rValue = model->BSIM4v4wdvt1; return(OK); - case BSIM4V4_MOD_WDVT2 : - value->rValue = model->BSIM4V4wdvt2; + case BSIM4v4_MOD_WDVT2 : + value->rValue = model->BSIM4v4wdvt2; return(OK); - case BSIM4V4_MOD_WDVT0W : - value->rValue = model->BSIM4V4wdvt0w; + case BSIM4v4_MOD_WDVT0W : + value->rValue = model->BSIM4v4wdvt0w; return(OK); - case BSIM4V4_MOD_WDVT1W : - value->rValue = model->BSIM4V4wdvt1w; + case BSIM4v4_MOD_WDVT1W : + value->rValue = model->BSIM4v4wdvt1w; return(OK); - case BSIM4V4_MOD_WDVT2W : - value->rValue = model->BSIM4V4wdvt2w; + case BSIM4v4_MOD_WDVT2W : + value->rValue = model->BSIM4v4wdvt2w; return(OK); - case BSIM4V4_MOD_WDROUT : - value->rValue = model->BSIM4V4wdrout; + case BSIM4v4_MOD_WDROUT : + value->rValue = model->BSIM4v4wdrout; return(OK); - case BSIM4V4_MOD_WDSUB : - value->rValue = model->BSIM4V4wdsub; + case BSIM4v4_MOD_WDSUB : + value->rValue = model->BSIM4v4wdsub; return(OK); - case BSIM4V4_MOD_WVTH0: - value->rValue = model->BSIM4V4wvth0; + case BSIM4v4_MOD_WVTH0: + value->rValue = model->BSIM4v4wvth0; return(OK); - case BSIM4V4_MOD_WUA: - value->rValue = model->BSIM4V4wua; + case BSIM4v4_MOD_WUA: + value->rValue = model->BSIM4v4wua; return(OK); - case BSIM4V4_MOD_WUA1: - value->rValue = model->BSIM4V4wua1; + case BSIM4v4_MOD_WUA1: + value->rValue = model->BSIM4v4wua1; return(OK); - case BSIM4V4_MOD_WUB: - value->rValue = model->BSIM4V4wub; + case BSIM4v4_MOD_WUB: + value->rValue = model->BSIM4v4wub; return(OK); - case BSIM4V4_MOD_WUB1: - value->rValue = model->BSIM4V4wub1; + case BSIM4v4_MOD_WUB1: + value->rValue = model->BSIM4v4wub1; return(OK); - case BSIM4V4_MOD_WUC: - value->rValue = model->BSIM4V4wuc; + case BSIM4v4_MOD_WUC: + value->rValue = model->BSIM4v4wuc; return(OK); - case BSIM4V4_MOD_WUC1: - value->rValue = model->BSIM4V4wuc1; + case BSIM4v4_MOD_WUC1: + value->rValue = model->BSIM4v4wuc1; return(OK); - case BSIM4V4_MOD_WU0: - value->rValue = model->BSIM4V4wu0; + case BSIM4v4_MOD_WU0: + value->rValue = model->BSIM4v4wu0; return(OK); - case BSIM4V4_MOD_WUTE: - value->rValue = model->BSIM4V4wute; + case BSIM4v4_MOD_WUTE: + value->rValue = model->BSIM4v4wute; return(OK); - case BSIM4V4_MOD_WVOFF: - value->rValue = model->BSIM4V4wvoff; + case BSIM4v4_MOD_WVOFF: + value->rValue = model->BSIM4v4wvoff; return(OK); - case BSIM4V4_MOD_WMINV: - value->rValue = model->BSIM4V4wminv; + case BSIM4v4_MOD_WMINV: + value->rValue = model->BSIM4v4wminv; return(OK); - case BSIM4V4_MOD_WFPROUT: - value->rValue = model->BSIM4V4wfprout; + case BSIM4v4_MOD_WFPROUT: + value->rValue = model->BSIM4v4wfprout; return(OK); - case BSIM4V4_MOD_WPDITS: - value->rValue = model->BSIM4V4wpdits; + case BSIM4v4_MOD_WPDITS: + value->rValue = model->BSIM4v4wpdits; return(OK); - case BSIM4V4_MOD_WPDITSD: - value->rValue = model->BSIM4V4wpditsd; + case BSIM4v4_MOD_WPDITSD: + value->rValue = model->BSIM4v4wpditsd; return(OK); - case BSIM4V4_MOD_WDELTA: - value->rValue = model->BSIM4V4wdelta; + case BSIM4v4_MOD_WDELTA: + value->rValue = model->BSIM4v4wdelta; return(OK); - case BSIM4V4_MOD_WRDSW: - value->rValue = model->BSIM4V4wrdsw; + case BSIM4v4_MOD_WRDSW: + value->rValue = model->BSIM4v4wrdsw; return(OK); - case BSIM4V4_MOD_WRDW: - value->rValue = model->BSIM4V4wrdw; + case BSIM4v4_MOD_WRDW: + value->rValue = model->BSIM4v4wrdw; return(OK); - case BSIM4V4_MOD_WRSW: - value->rValue = model->BSIM4V4wrsw; + case BSIM4v4_MOD_WRSW: + value->rValue = model->BSIM4v4wrsw; return(OK); - case BSIM4V4_MOD_WPRWB: - value->rValue = model->BSIM4V4wprwb; + case BSIM4v4_MOD_WPRWB: + value->rValue = model->BSIM4v4wprwb; return(OK); - case BSIM4V4_MOD_WPRWG: - value->rValue = model->BSIM4V4wprwg; + case BSIM4v4_MOD_WPRWG: + value->rValue = model->BSIM4v4wprwg; return(OK); - case BSIM4V4_MOD_WPRT: - value->rValue = model->BSIM4V4wprt; + case BSIM4v4_MOD_WPRT: + value->rValue = model->BSIM4v4wprt; return(OK); - case BSIM4V4_MOD_WETA0: - value->rValue = model->BSIM4V4weta0; + case BSIM4v4_MOD_WETA0: + value->rValue = model->BSIM4v4weta0; return(OK); - case BSIM4V4_MOD_WETAB: - value->rValue = model->BSIM4V4wetab; + case BSIM4v4_MOD_WETAB: + value->rValue = model->BSIM4v4wetab; return(OK); - case BSIM4V4_MOD_WPCLM: - value->rValue = model->BSIM4V4wpclm; + case BSIM4v4_MOD_WPCLM: + value->rValue = model->BSIM4v4wpclm; return(OK); - case BSIM4V4_MOD_WPDIBL1: - value->rValue = model->BSIM4V4wpdibl1; + case BSIM4v4_MOD_WPDIBL1: + value->rValue = model->BSIM4v4wpdibl1; return(OK); - case BSIM4V4_MOD_WPDIBL2: - value->rValue = model->BSIM4V4wpdibl2; + case BSIM4v4_MOD_WPDIBL2: + value->rValue = model->BSIM4v4wpdibl2; return(OK); - case BSIM4V4_MOD_WPDIBLB: - value->rValue = model->BSIM4V4wpdiblb; + case BSIM4v4_MOD_WPDIBLB: + value->rValue = model->BSIM4v4wpdiblb; return(OK); - case BSIM4V4_MOD_WPSCBE1: - value->rValue = model->BSIM4V4wpscbe1; + case BSIM4v4_MOD_WPSCBE1: + value->rValue = model->BSIM4v4wpscbe1; return(OK); - case BSIM4V4_MOD_WPSCBE2: - value->rValue = model->BSIM4V4wpscbe2; + case BSIM4v4_MOD_WPSCBE2: + value->rValue = model->BSIM4v4wpscbe2; return(OK); - case BSIM4V4_MOD_WPVAG: - value->rValue = model->BSIM4V4wpvag; + case BSIM4v4_MOD_WPVAG: + value->rValue = model->BSIM4v4wpvag; return(OK); - case BSIM4V4_MOD_WWR: - value->rValue = model->BSIM4V4wwr; + case BSIM4v4_MOD_WWR: + value->rValue = model->BSIM4v4wwr; return(OK); - case BSIM4V4_MOD_WDWG: - value->rValue = model->BSIM4V4wdwg; + case BSIM4v4_MOD_WDWG: + value->rValue = model->BSIM4v4wdwg; return(OK); - case BSIM4V4_MOD_WDWB: - value->rValue = model->BSIM4V4wdwb; + case BSIM4v4_MOD_WDWB: + value->rValue = model->BSIM4v4wdwb; return(OK); - case BSIM4V4_MOD_WB0: - value->rValue = model->BSIM4V4wb0; + case BSIM4v4_MOD_WB0: + value->rValue = model->BSIM4v4wb0; return(OK); - case BSIM4V4_MOD_WB1: - value->rValue = model->BSIM4V4wb1; + case BSIM4v4_MOD_WB1: + value->rValue = model->BSIM4v4wb1; return(OK); - case BSIM4V4_MOD_WALPHA0: - value->rValue = model->BSIM4V4walpha0; + case BSIM4v4_MOD_WALPHA0: + value->rValue = model->BSIM4v4walpha0; return(OK); - case BSIM4V4_MOD_WALPHA1: - value->rValue = model->BSIM4V4walpha1; + case BSIM4v4_MOD_WALPHA1: + value->rValue = model->BSIM4v4walpha1; return(OK); - case BSIM4V4_MOD_WBETA0: - value->rValue = model->BSIM4V4wbeta0; + case BSIM4v4_MOD_WBETA0: + value->rValue = model->BSIM4v4wbeta0; return(OK); - case BSIM4V4_MOD_WAGIDL: - value->rValue = model->BSIM4V4wagidl; + case BSIM4v4_MOD_WAGIDL: + value->rValue = model->BSIM4v4wagidl; return(OK); - case BSIM4V4_MOD_WBGIDL: - value->rValue = model->BSIM4V4wbgidl; + case BSIM4v4_MOD_WBGIDL: + value->rValue = model->BSIM4v4wbgidl; return(OK); - case BSIM4V4_MOD_WCGIDL: - value->rValue = model->BSIM4V4wcgidl; + case BSIM4v4_MOD_WCGIDL: + value->rValue = model->BSIM4v4wcgidl; return(OK); - case BSIM4V4_MOD_WEGIDL: - value->rValue = model->BSIM4V4wegidl; + case BSIM4v4_MOD_WEGIDL: + value->rValue = model->BSIM4v4wegidl; return(OK); - case BSIM4V4_MOD_WAIGC: - value->rValue = model->BSIM4V4waigc; + case BSIM4v4_MOD_WAIGC: + value->rValue = model->BSIM4v4waigc; return(OK); - case BSIM4V4_MOD_WBIGC: - value->rValue = model->BSIM4V4wbigc; + case BSIM4v4_MOD_WBIGC: + value->rValue = model->BSIM4v4wbigc; return(OK); - case BSIM4V4_MOD_WCIGC: - value->rValue = model->BSIM4V4wcigc; + case BSIM4v4_MOD_WCIGC: + value->rValue = model->BSIM4v4wcigc; return(OK); - case BSIM4V4_MOD_WAIGSD: - value->rValue = model->BSIM4V4waigsd; + case BSIM4v4_MOD_WAIGSD: + value->rValue = model->BSIM4v4waigsd; return(OK); - case BSIM4V4_MOD_WBIGSD: - value->rValue = model->BSIM4V4wbigsd; + case BSIM4v4_MOD_WBIGSD: + value->rValue = model->BSIM4v4wbigsd; return(OK); - case BSIM4V4_MOD_WCIGSD: - value->rValue = model->BSIM4V4wcigsd; + case BSIM4v4_MOD_WCIGSD: + value->rValue = model->BSIM4v4wcigsd; return(OK); - case BSIM4V4_MOD_WAIGBACC: - value->rValue = model->BSIM4V4waigbacc; + case BSIM4v4_MOD_WAIGBACC: + value->rValue = model->BSIM4v4waigbacc; return(OK); - case BSIM4V4_MOD_WBIGBACC: - value->rValue = model->BSIM4V4wbigbacc; + case BSIM4v4_MOD_WBIGBACC: + value->rValue = model->BSIM4v4wbigbacc; return(OK); - case BSIM4V4_MOD_WCIGBACC: - value->rValue = model->BSIM4V4wcigbacc; + case BSIM4v4_MOD_WCIGBACC: + value->rValue = model->BSIM4v4wcigbacc; return(OK); - case BSIM4V4_MOD_WAIGBINV: - value->rValue = model->BSIM4V4waigbinv; + case BSIM4v4_MOD_WAIGBINV: + value->rValue = model->BSIM4v4waigbinv; return(OK); - case BSIM4V4_MOD_WBIGBINV: - value->rValue = model->BSIM4V4wbigbinv; + case BSIM4v4_MOD_WBIGBINV: + value->rValue = model->BSIM4v4wbigbinv; return(OK); - case BSIM4V4_MOD_WCIGBINV: - value->rValue = model->BSIM4V4wcigbinv; + case BSIM4v4_MOD_WCIGBINV: + value->rValue = model->BSIM4v4wcigbinv; return(OK); - case BSIM4V4_MOD_WNIGC: - value->rValue = model->BSIM4V4wnigc; + case BSIM4v4_MOD_WNIGC: + value->rValue = model->BSIM4v4wnigc; return(OK); - case BSIM4V4_MOD_WNIGBACC: - value->rValue = model->BSIM4V4wnigbacc; + case BSIM4v4_MOD_WNIGBACC: + value->rValue = model->BSIM4v4wnigbacc; return(OK); - case BSIM4V4_MOD_WNIGBINV: - value->rValue = model->BSIM4V4wnigbinv; + case BSIM4v4_MOD_WNIGBINV: + value->rValue = model->BSIM4v4wnigbinv; return(OK); - case BSIM4V4_MOD_WNTOX: - value->rValue = model->BSIM4V4wntox; + case BSIM4v4_MOD_WNTOX: + value->rValue = model->BSIM4v4wntox; return(OK); - case BSIM4V4_MOD_WEIGBINV: - value->rValue = model->BSIM4V4weigbinv; + case BSIM4v4_MOD_WEIGBINV: + value->rValue = model->BSIM4v4weigbinv; return(OK); - case BSIM4V4_MOD_WPIGCD: - value->rValue = model->BSIM4V4wpigcd; + case BSIM4v4_MOD_WPIGCD: + value->rValue = model->BSIM4v4wpigcd; return(OK); - case BSIM4V4_MOD_WPOXEDGE: - value->rValue = model->BSIM4V4wpoxedge; + case BSIM4v4_MOD_WPOXEDGE: + value->rValue = model->BSIM4v4wpoxedge; return(OK); - case BSIM4V4_MOD_WPHIN: - value->rValue = model->BSIM4V4wphin; + case BSIM4v4_MOD_WPHIN: + value->rValue = model->BSIM4v4wphin; return(OK); - case BSIM4V4_MOD_WXRCRG1: - value->rValue = model->BSIM4V4wxrcrg1; + case BSIM4v4_MOD_WXRCRG1: + value->rValue = model->BSIM4v4wxrcrg1; return(OK); - case BSIM4V4_MOD_WXRCRG2: - value->rValue = model->BSIM4V4wxrcrg2; + case BSIM4v4_MOD_WXRCRG2: + value->rValue = model->BSIM4v4wxrcrg2; return(OK); - case BSIM4V4_MOD_WEU: - value->rValue = model->BSIM4V4weu; + case BSIM4v4_MOD_WEU: + value->rValue = model->BSIM4v4weu; return(OK); - case BSIM4V4_MOD_WVFB: - value->rValue = model->BSIM4V4wvfb; + case BSIM4v4_MOD_WVFB: + value->rValue = model->BSIM4v4wvfb; return(OK); - case BSIM4V4_MOD_WCGSL: - value->rValue = model->BSIM4V4wcgsl; + case BSIM4v4_MOD_WCGSL: + value->rValue = model->BSIM4v4wcgsl; return(OK); - case BSIM4V4_MOD_WCGDL: - value->rValue = model->BSIM4V4wcgdl; + case BSIM4v4_MOD_WCGDL: + value->rValue = model->BSIM4v4wcgdl; return(OK); - case BSIM4V4_MOD_WCKAPPAS: - value->rValue = model->BSIM4V4wckappas; + case BSIM4v4_MOD_WCKAPPAS: + value->rValue = model->BSIM4v4wckappas; return(OK); - case BSIM4V4_MOD_WCKAPPAD: - value->rValue = model->BSIM4V4wckappad; + case BSIM4v4_MOD_WCKAPPAD: + value->rValue = model->BSIM4v4wckappad; return(OK); - case BSIM4V4_MOD_WCF: - value->rValue = model->BSIM4V4wcf; + case BSIM4v4_MOD_WCF: + value->rValue = model->BSIM4v4wcf; return(OK); - case BSIM4V4_MOD_WCLC: - value->rValue = model->BSIM4V4wclc; + case BSIM4v4_MOD_WCLC: + value->rValue = model->BSIM4v4wclc; return(OK); - case BSIM4V4_MOD_WCLE: - value->rValue = model->BSIM4V4wcle; + case BSIM4v4_MOD_WCLE: + value->rValue = model->BSIM4v4wcle; return(OK); - case BSIM4V4_MOD_WVFBCV: - value->rValue = model->BSIM4V4wvfbcv; + case BSIM4v4_MOD_WVFBCV: + value->rValue = model->BSIM4v4wvfbcv; return(OK); - case BSIM4V4_MOD_WACDE: - value->rValue = model->BSIM4V4wacde; + case BSIM4v4_MOD_WACDE: + value->rValue = model->BSIM4v4wacde; return(OK); - case BSIM4V4_MOD_WMOIN: - value->rValue = model->BSIM4V4wmoin; + case BSIM4v4_MOD_WMOIN: + value->rValue = model->BSIM4v4wmoin; return(OK); - case BSIM4V4_MOD_WNOFF: - value->rValue = model->BSIM4V4wnoff; + case BSIM4v4_MOD_WNOFF: + value->rValue = model->BSIM4v4wnoff; return(OK); - case BSIM4V4_MOD_WVOFFCV: - value->rValue = model->BSIM4V4wvoffcv; + case BSIM4v4_MOD_WVOFFCV: + value->rValue = model->BSIM4v4wvoffcv; return(OK); /* Cross-term dependence */ - case BSIM4V4_MOD_PCDSC : - value->rValue = model->BSIM4V4pcdsc; + case BSIM4v4_MOD_PCDSC : + value->rValue = model->BSIM4v4pcdsc; return(OK); - case BSIM4V4_MOD_PCDSCB : - value->rValue = model->BSIM4V4pcdscb; + case BSIM4v4_MOD_PCDSCB : + value->rValue = model->BSIM4v4pcdscb; return(OK); - case BSIM4V4_MOD_PCDSCD : - value->rValue = model->BSIM4V4pcdscd; + case BSIM4v4_MOD_PCDSCD : + value->rValue = model->BSIM4v4pcdscd; return(OK); - case BSIM4V4_MOD_PCIT : - value->rValue = model->BSIM4V4pcit; + case BSIM4v4_MOD_PCIT : + value->rValue = model->BSIM4v4pcit; return(OK); - case BSIM4V4_MOD_PNFACTOR : - value->rValue = model->BSIM4V4pnfactor; + case BSIM4v4_MOD_PNFACTOR : + value->rValue = model->BSIM4v4pnfactor; return(OK); - case BSIM4V4_MOD_PXJ: - value->rValue = model->BSIM4V4pxj; + case BSIM4v4_MOD_PXJ: + value->rValue = model->BSIM4v4pxj; return(OK); - case BSIM4V4_MOD_PVSAT: - value->rValue = model->BSIM4V4pvsat; + case BSIM4v4_MOD_PVSAT: + value->rValue = model->BSIM4v4pvsat; return(OK); - case BSIM4V4_MOD_PAT: - value->rValue = model->BSIM4V4pat; + case BSIM4v4_MOD_PAT: + value->rValue = model->BSIM4v4pat; return(OK); - case BSIM4V4_MOD_PA0: - value->rValue = model->BSIM4V4pa0; + case BSIM4v4_MOD_PA0: + value->rValue = model->BSIM4v4pa0; return(OK); - case BSIM4V4_MOD_PAGS: - value->rValue = model->BSIM4V4pags; + case BSIM4v4_MOD_PAGS: + value->rValue = model->BSIM4v4pags; return(OK); - case BSIM4V4_MOD_PA1: - value->rValue = model->BSIM4V4pa1; + case BSIM4v4_MOD_PA1: + value->rValue = model->BSIM4v4pa1; return(OK); - case BSIM4V4_MOD_PA2: - value->rValue = model->BSIM4V4pa2; + case BSIM4v4_MOD_PA2: + value->rValue = model->BSIM4v4pa2; return(OK); - case BSIM4V4_MOD_PKETA: - value->rValue = model->BSIM4V4pketa; + case BSIM4v4_MOD_PKETA: + value->rValue = model->BSIM4v4pketa; return(OK); - case BSIM4V4_MOD_PNSUB: - value->rValue = model->BSIM4V4pnsub; + case BSIM4v4_MOD_PNSUB: + value->rValue = model->BSIM4v4pnsub; return(OK); - case BSIM4V4_MOD_PNDEP: - value->rValue = model->BSIM4V4pndep; + case BSIM4v4_MOD_PNDEP: + value->rValue = model->BSIM4v4pndep; return(OK); - case BSIM4V4_MOD_PNSD: - value->rValue = model->BSIM4V4pnsd; + case BSIM4v4_MOD_PNSD: + value->rValue = model->BSIM4v4pnsd; return(OK); - case BSIM4V4_MOD_PNGATE: - value->rValue = model->BSIM4V4pngate; + case BSIM4v4_MOD_PNGATE: + value->rValue = model->BSIM4v4pngate; return(OK); - case BSIM4V4_MOD_PGAMMA1: - value->rValue = model->BSIM4V4pgamma1; + case BSIM4v4_MOD_PGAMMA1: + value->rValue = model->BSIM4v4pgamma1; return(OK); - case BSIM4V4_MOD_PGAMMA2: - value->rValue = model->BSIM4V4pgamma2; + case BSIM4v4_MOD_PGAMMA2: + value->rValue = model->BSIM4v4pgamma2; return(OK); - case BSIM4V4_MOD_PVBX: - value->rValue = model->BSIM4V4pvbx; + case BSIM4v4_MOD_PVBX: + value->rValue = model->BSIM4v4pvbx; return(OK); - case BSIM4V4_MOD_PVBM: - value->rValue = model->BSIM4V4pvbm; + case BSIM4v4_MOD_PVBM: + value->rValue = model->BSIM4v4pvbm; return(OK); - case BSIM4V4_MOD_PXT: - value->rValue = model->BSIM4V4pxt; + case BSIM4v4_MOD_PXT: + value->rValue = model->BSIM4v4pxt; return(OK); - case BSIM4V4_MOD_PK1: - value->rValue = model->BSIM4V4pk1; + case BSIM4v4_MOD_PK1: + value->rValue = model->BSIM4v4pk1; return(OK); - case BSIM4V4_MOD_PKT1: - value->rValue = model->BSIM4V4pkt1; + case BSIM4v4_MOD_PKT1: + value->rValue = model->BSIM4v4pkt1; return(OK); - case BSIM4V4_MOD_PKT1L: - value->rValue = model->BSIM4V4pkt1l; + case BSIM4v4_MOD_PKT1L: + value->rValue = model->BSIM4v4pkt1l; return(OK); - case BSIM4V4_MOD_PKT2 : - value->rValue = model->BSIM4V4pkt2; + case BSIM4v4_MOD_PKT2 : + value->rValue = model->BSIM4v4pkt2; return(OK); - case BSIM4V4_MOD_PK2 : - value->rValue = model->BSIM4V4pk2; + case BSIM4v4_MOD_PK2 : + value->rValue = model->BSIM4v4pk2; return(OK); - case BSIM4V4_MOD_PK3: - value->rValue = model->BSIM4V4pk3; + case BSIM4v4_MOD_PK3: + value->rValue = model->BSIM4v4pk3; return(OK); - case BSIM4V4_MOD_PK3B: - value->rValue = model->BSIM4V4pk3b; + case BSIM4v4_MOD_PK3B: + value->rValue = model->BSIM4v4pk3b; return(OK); - case BSIM4V4_MOD_PW0: - value->rValue = model->BSIM4V4pw0; + case BSIM4v4_MOD_PW0: + value->rValue = model->BSIM4v4pw0; return(OK); - case BSIM4V4_MOD_PLPE0: - value->rValue = model->BSIM4V4plpe0; + case BSIM4v4_MOD_PLPE0: + value->rValue = model->BSIM4v4plpe0; return(OK); - case BSIM4V4_MOD_PLPEB: - value->rValue = model->BSIM4V4plpeb; + case BSIM4v4_MOD_PLPEB: + value->rValue = model->BSIM4v4plpeb; return(OK); - case BSIM4V4_MOD_PDVTP0: - value->rValue = model->BSIM4V4pdvtp0; + case BSIM4v4_MOD_PDVTP0: + value->rValue = model->BSIM4v4pdvtp0; return(OK); - case BSIM4V4_MOD_PDVTP1: - value->rValue = model->BSIM4V4pdvtp1; + case BSIM4v4_MOD_PDVTP1: + value->rValue = model->BSIM4v4pdvtp1; return(OK); - case BSIM4V4_MOD_PDVT0 : - value->rValue = model->BSIM4V4pdvt0; + case BSIM4v4_MOD_PDVT0 : + value->rValue = model->BSIM4v4pdvt0; return(OK); - case BSIM4V4_MOD_PDVT1 : - value->rValue = model->BSIM4V4pdvt1; + case BSIM4v4_MOD_PDVT1 : + value->rValue = model->BSIM4v4pdvt1; return(OK); - case BSIM4V4_MOD_PDVT2 : - value->rValue = model->BSIM4V4pdvt2; + case BSIM4v4_MOD_PDVT2 : + value->rValue = model->BSIM4v4pdvt2; return(OK); - case BSIM4V4_MOD_PDVT0W : - value->rValue = model->BSIM4V4pdvt0w; + case BSIM4v4_MOD_PDVT0W : + value->rValue = model->BSIM4v4pdvt0w; return(OK); - case BSIM4V4_MOD_PDVT1W : - value->rValue = model->BSIM4V4pdvt1w; + case BSIM4v4_MOD_PDVT1W : + value->rValue = model->BSIM4v4pdvt1w; return(OK); - case BSIM4V4_MOD_PDVT2W : - value->rValue = model->BSIM4V4pdvt2w; + case BSIM4v4_MOD_PDVT2W : + value->rValue = model->BSIM4v4pdvt2w; return(OK); - case BSIM4V4_MOD_PDROUT : - value->rValue = model->BSIM4V4pdrout; + case BSIM4v4_MOD_PDROUT : + value->rValue = model->BSIM4v4pdrout; return(OK); - case BSIM4V4_MOD_PDSUB : - value->rValue = model->BSIM4V4pdsub; + case BSIM4v4_MOD_PDSUB : + value->rValue = model->BSIM4v4pdsub; return(OK); - case BSIM4V4_MOD_PVTH0: - value->rValue = model->BSIM4V4pvth0; + case BSIM4v4_MOD_PVTH0: + value->rValue = model->BSIM4v4pvth0; return(OK); - case BSIM4V4_MOD_PUA: - value->rValue = model->BSIM4V4pua; + case BSIM4v4_MOD_PUA: + value->rValue = model->BSIM4v4pua; return(OK); - case BSIM4V4_MOD_PUA1: - value->rValue = model->BSIM4V4pua1; + case BSIM4v4_MOD_PUA1: + value->rValue = model->BSIM4v4pua1; return(OK); - case BSIM4V4_MOD_PUB: - value->rValue = model->BSIM4V4pub; + case BSIM4v4_MOD_PUB: + value->rValue = model->BSIM4v4pub; return(OK); - case BSIM4V4_MOD_PUB1: - value->rValue = model->BSIM4V4pub1; + case BSIM4v4_MOD_PUB1: + value->rValue = model->BSIM4v4pub1; return(OK); - case BSIM4V4_MOD_PUC: - value->rValue = model->BSIM4V4puc; + case BSIM4v4_MOD_PUC: + value->rValue = model->BSIM4v4puc; return(OK); - case BSIM4V4_MOD_PUC1: - value->rValue = model->BSIM4V4puc1; + case BSIM4v4_MOD_PUC1: + value->rValue = model->BSIM4v4puc1; return(OK); - case BSIM4V4_MOD_PU0: - value->rValue = model->BSIM4V4pu0; + case BSIM4v4_MOD_PU0: + value->rValue = model->BSIM4v4pu0; return(OK); - case BSIM4V4_MOD_PUTE: - value->rValue = model->BSIM4V4pute; + case BSIM4v4_MOD_PUTE: + value->rValue = model->BSIM4v4pute; return(OK); - case BSIM4V4_MOD_PVOFF: - value->rValue = model->BSIM4V4pvoff; + case BSIM4v4_MOD_PVOFF: + value->rValue = model->BSIM4v4pvoff; return(OK); - case BSIM4V4_MOD_PMINV: - value->rValue = model->BSIM4V4pminv; + case BSIM4v4_MOD_PMINV: + value->rValue = model->BSIM4v4pminv; return(OK); - case BSIM4V4_MOD_PFPROUT: - value->rValue = model->BSIM4V4pfprout; + case BSIM4v4_MOD_PFPROUT: + value->rValue = model->BSIM4v4pfprout; return(OK); - case BSIM4V4_MOD_PPDITS: - value->rValue = model->BSIM4V4ppdits; + case BSIM4v4_MOD_PPDITS: + value->rValue = model->BSIM4v4ppdits; return(OK); - case BSIM4V4_MOD_PPDITSD: - value->rValue = model->BSIM4V4ppditsd; + case BSIM4v4_MOD_PPDITSD: + value->rValue = model->BSIM4v4ppditsd; return(OK); - case BSIM4V4_MOD_PDELTA: - value->rValue = model->BSIM4V4pdelta; + case BSIM4v4_MOD_PDELTA: + value->rValue = model->BSIM4v4pdelta; return(OK); - case BSIM4V4_MOD_PRDSW: - value->rValue = model->BSIM4V4prdsw; + case BSIM4v4_MOD_PRDSW: + value->rValue = model->BSIM4v4prdsw; return(OK); - case BSIM4V4_MOD_PRDW: - value->rValue = model->BSIM4V4prdw; + case BSIM4v4_MOD_PRDW: + value->rValue = model->BSIM4v4prdw; return(OK); - case BSIM4V4_MOD_PRSW: - value->rValue = model->BSIM4V4prsw; + case BSIM4v4_MOD_PRSW: + value->rValue = model->BSIM4v4prsw; return(OK); - case BSIM4V4_MOD_PPRWB: - value->rValue = model->BSIM4V4pprwb; + case BSIM4v4_MOD_PPRWB: + value->rValue = model->BSIM4v4pprwb; return(OK); - case BSIM4V4_MOD_PPRWG: - value->rValue = model->BSIM4V4pprwg; + case BSIM4v4_MOD_PPRWG: + value->rValue = model->BSIM4v4pprwg; return(OK); - case BSIM4V4_MOD_PPRT: - value->rValue = model->BSIM4V4pprt; + case BSIM4v4_MOD_PPRT: + value->rValue = model->BSIM4v4pprt; return(OK); - case BSIM4V4_MOD_PETA0: - value->rValue = model->BSIM4V4peta0; + case BSIM4v4_MOD_PETA0: + value->rValue = model->BSIM4v4peta0; return(OK); - case BSIM4V4_MOD_PETAB: - value->rValue = model->BSIM4V4petab; + case BSIM4v4_MOD_PETAB: + value->rValue = model->BSIM4v4petab; return(OK); - case BSIM4V4_MOD_PPCLM: - value->rValue = model->BSIM4V4ppclm; + case BSIM4v4_MOD_PPCLM: + value->rValue = model->BSIM4v4ppclm; return(OK); - case BSIM4V4_MOD_PPDIBL1: - value->rValue = model->BSIM4V4ppdibl1; + case BSIM4v4_MOD_PPDIBL1: + value->rValue = model->BSIM4v4ppdibl1; return(OK); - case BSIM4V4_MOD_PPDIBL2: - value->rValue = model->BSIM4V4ppdibl2; + case BSIM4v4_MOD_PPDIBL2: + value->rValue = model->BSIM4v4ppdibl2; return(OK); - case BSIM4V4_MOD_PPDIBLB: - value->rValue = model->BSIM4V4ppdiblb; + case BSIM4v4_MOD_PPDIBLB: + value->rValue = model->BSIM4v4ppdiblb; return(OK); - case BSIM4V4_MOD_PPSCBE1: - value->rValue = model->BSIM4V4ppscbe1; + case BSIM4v4_MOD_PPSCBE1: + value->rValue = model->BSIM4v4ppscbe1; return(OK); - case BSIM4V4_MOD_PPSCBE2: - value->rValue = model->BSIM4V4ppscbe2; + case BSIM4v4_MOD_PPSCBE2: + value->rValue = model->BSIM4v4ppscbe2; return(OK); - case BSIM4V4_MOD_PPVAG: - value->rValue = model->BSIM4V4ppvag; + case BSIM4v4_MOD_PPVAG: + value->rValue = model->BSIM4v4ppvag; return(OK); - case BSIM4V4_MOD_PWR: - value->rValue = model->BSIM4V4pwr; + case BSIM4v4_MOD_PWR: + value->rValue = model->BSIM4v4pwr; return(OK); - case BSIM4V4_MOD_PDWG: - value->rValue = model->BSIM4V4pdwg; + case BSIM4v4_MOD_PDWG: + value->rValue = model->BSIM4v4pdwg; return(OK); - case BSIM4V4_MOD_PDWB: - value->rValue = model->BSIM4V4pdwb; + case BSIM4v4_MOD_PDWB: + value->rValue = model->BSIM4v4pdwb; return(OK); - case BSIM4V4_MOD_PB0: - value->rValue = model->BSIM4V4pb0; + case BSIM4v4_MOD_PB0: + value->rValue = model->BSIM4v4pb0; return(OK); - case BSIM4V4_MOD_PB1: - value->rValue = model->BSIM4V4pb1; + case BSIM4v4_MOD_PB1: + value->rValue = model->BSIM4v4pb1; return(OK); - case BSIM4V4_MOD_PALPHA0: - value->rValue = model->BSIM4V4palpha0; + case BSIM4v4_MOD_PALPHA0: + value->rValue = model->BSIM4v4palpha0; return(OK); - case BSIM4V4_MOD_PALPHA1: - value->rValue = model->BSIM4V4palpha1; + case BSIM4v4_MOD_PALPHA1: + value->rValue = model->BSIM4v4palpha1; return(OK); - case BSIM4V4_MOD_PBETA0: - value->rValue = model->BSIM4V4pbeta0; + case BSIM4v4_MOD_PBETA0: + value->rValue = model->BSIM4v4pbeta0; return(OK); - case BSIM4V4_MOD_PAGIDL: - value->rValue = model->BSIM4V4pagidl; + case BSIM4v4_MOD_PAGIDL: + value->rValue = model->BSIM4v4pagidl; return(OK); - case BSIM4V4_MOD_PBGIDL: - value->rValue = model->BSIM4V4pbgidl; + case BSIM4v4_MOD_PBGIDL: + value->rValue = model->BSIM4v4pbgidl; return(OK); - case BSIM4V4_MOD_PCGIDL: - value->rValue = model->BSIM4V4pcgidl; + case BSIM4v4_MOD_PCGIDL: + value->rValue = model->BSIM4v4pcgidl; return(OK); - case BSIM4V4_MOD_PEGIDL: - value->rValue = model->BSIM4V4pegidl; + case BSIM4v4_MOD_PEGIDL: + value->rValue = model->BSIM4v4pegidl; return(OK); - case BSIM4V4_MOD_PAIGC: - value->rValue = model->BSIM4V4paigc; + case BSIM4v4_MOD_PAIGC: + value->rValue = model->BSIM4v4paigc; return(OK); - case BSIM4V4_MOD_PBIGC: - value->rValue = model->BSIM4V4pbigc; + case BSIM4v4_MOD_PBIGC: + value->rValue = model->BSIM4v4pbigc; return(OK); - case BSIM4V4_MOD_PCIGC: - value->rValue = model->BSIM4V4pcigc; + case BSIM4v4_MOD_PCIGC: + value->rValue = model->BSIM4v4pcigc; return(OK); - case BSIM4V4_MOD_PAIGSD: - value->rValue = model->BSIM4V4paigsd; + case BSIM4v4_MOD_PAIGSD: + value->rValue = model->BSIM4v4paigsd; return(OK); - case BSIM4V4_MOD_PBIGSD: - value->rValue = model->BSIM4V4pbigsd; + case BSIM4v4_MOD_PBIGSD: + value->rValue = model->BSIM4v4pbigsd; return(OK); - case BSIM4V4_MOD_PCIGSD: - value->rValue = model->BSIM4V4pcigsd; + case BSIM4v4_MOD_PCIGSD: + value->rValue = model->BSIM4v4pcigsd; return(OK); - case BSIM4V4_MOD_PAIGBACC: - value->rValue = model->BSIM4V4paigbacc; + case BSIM4v4_MOD_PAIGBACC: + value->rValue = model->BSIM4v4paigbacc; return(OK); - case BSIM4V4_MOD_PBIGBACC: - value->rValue = model->BSIM4V4pbigbacc; + case BSIM4v4_MOD_PBIGBACC: + value->rValue = model->BSIM4v4pbigbacc; return(OK); - case BSIM4V4_MOD_PCIGBACC: - value->rValue = model->BSIM4V4pcigbacc; + case BSIM4v4_MOD_PCIGBACC: + value->rValue = model->BSIM4v4pcigbacc; return(OK); - case BSIM4V4_MOD_PAIGBINV: - value->rValue = model->BSIM4V4paigbinv; + case BSIM4v4_MOD_PAIGBINV: + value->rValue = model->BSIM4v4paigbinv; return(OK); - case BSIM4V4_MOD_PBIGBINV: - value->rValue = model->BSIM4V4pbigbinv; + case BSIM4v4_MOD_PBIGBINV: + value->rValue = model->BSIM4v4pbigbinv; return(OK); - case BSIM4V4_MOD_PCIGBINV: - value->rValue = model->BSIM4V4pcigbinv; + case BSIM4v4_MOD_PCIGBINV: + value->rValue = model->BSIM4v4pcigbinv; return(OK); - case BSIM4V4_MOD_PNIGC: - value->rValue = model->BSIM4V4pnigc; + case BSIM4v4_MOD_PNIGC: + value->rValue = model->BSIM4v4pnigc; return(OK); - case BSIM4V4_MOD_PNIGBACC: - value->rValue = model->BSIM4V4pnigbacc; + case BSIM4v4_MOD_PNIGBACC: + value->rValue = model->BSIM4v4pnigbacc; return(OK); - case BSIM4V4_MOD_PNIGBINV: - value->rValue = model->BSIM4V4pnigbinv; + case BSIM4v4_MOD_PNIGBINV: + value->rValue = model->BSIM4v4pnigbinv; return(OK); - case BSIM4V4_MOD_PNTOX: - value->rValue = model->BSIM4V4pntox; + case BSIM4v4_MOD_PNTOX: + value->rValue = model->BSIM4v4pntox; return(OK); - case BSIM4V4_MOD_PEIGBINV: - value->rValue = model->BSIM4V4peigbinv; + case BSIM4v4_MOD_PEIGBINV: + value->rValue = model->BSIM4v4peigbinv; return(OK); - case BSIM4V4_MOD_PPIGCD: - value->rValue = model->BSIM4V4ppigcd; + case BSIM4v4_MOD_PPIGCD: + value->rValue = model->BSIM4v4ppigcd; return(OK); - case BSIM4V4_MOD_PPOXEDGE: - value->rValue = model->BSIM4V4ppoxedge; + case BSIM4v4_MOD_PPOXEDGE: + value->rValue = model->BSIM4v4ppoxedge; return(OK); - case BSIM4V4_MOD_PPHIN: - value->rValue = model->BSIM4V4pphin; + case BSIM4v4_MOD_PPHIN: + value->rValue = model->BSIM4v4pphin; return(OK); - case BSIM4V4_MOD_PXRCRG1: - value->rValue = model->BSIM4V4pxrcrg1; + case BSIM4v4_MOD_PXRCRG1: + value->rValue = model->BSIM4v4pxrcrg1; return(OK); - case BSIM4V4_MOD_PXRCRG2: - value->rValue = model->BSIM4V4pxrcrg2; + case BSIM4v4_MOD_PXRCRG2: + value->rValue = model->BSIM4v4pxrcrg2; return(OK); - case BSIM4V4_MOD_PEU: - value->rValue = model->BSIM4V4peu; + case BSIM4v4_MOD_PEU: + value->rValue = model->BSIM4v4peu; return(OK); - case BSIM4V4_MOD_PVFB: - value->rValue = model->BSIM4V4pvfb; + case BSIM4v4_MOD_PVFB: + value->rValue = model->BSIM4v4pvfb; return(OK); - case BSIM4V4_MOD_PCGSL: - value->rValue = model->BSIM4V4pcgsl; + case BSIM4v4_MOD_PCGSL: + value->rValue = model->BSIM4v4pcgsl; return(OK); - case BSIM4V4_MOD_PCGDL: - value->rValue = model->BSIM4V4pcgdl; + case BSIM4v4_MOD_PCGDL: + value->rValue = model->BSIM4v4pcgdl; return(OK); - case BSIM4V4_MOD_PCKAPPAS: - value->rValue = model->BSIM4V4pckappas; + case BSIM4v4_MOD_PCKAPPAS: + value->rValue = model->BSIM4v4pckappas; return(OK); - case BSIM4V4_MOD_PCKAPPAD: - value->rValue = model->BSIM4V4pckappad; + case BSIM4v4_MOD_PCKAPPAD: + value->rValue = model->BSIM4v4pckappad; return(OK); - case BSIM4V4_MOD_PCF: - value->rValue = model->BSIM4V4pcf; + case BSIM4v4_MOD_PCF: + value->rValue = model->BSIM4v4pcf; return(OK); - case BSIM4V4_MOD_PCLC: - value->rValue = model->BSIM4V4pclc; + case BSIM4v4_MOD_PCLC: + value->rValue = model->BSIM4v4pclc; return(OK); - case BSIM4V4_MOD_PCLE: - value->rValue = model->BSIM4V4pcle; + case BSIM4v4_MOD_PCLE: + value->rValue = model->BSIM4v4pcle; return(OK); - case BSIM4V4_MOD_PVFBCV: - value->rValue = model->BSIM4V4pvfbcv; + case BSIM4v4_MOD_PVFBCV: + value->rValue = model->BSIM4v4pvfbcv; return(OK); - case BSIM4V4_MOD_PACDE: - value->rValue = model->BSIM4V4pacde; + case BSIM4v4_MOD_PACDE: + value->rValue = model->BSIM4v4pacde; return(OK); - case BSIM4V4_MOD_PMOIN: - value->rValue = model->BSIM4V4pmoin; + case BSIM4v4_MOD_PMOIN: + value->rValue = model->BSIM4v4pmoin; return(OK); - case BSIM4V4_MOD_PNOFF: - value->rValue = model->BSIM4V4pnoff; + case BSIM4v4_MOD_PNOFF: + value->rValue = model->BSIM4v4pnoff; return(OK); - case BSIM4V4_MOD_PVOFFCV: - value->rValue = model->BSIM4V4pvoffcv; + case BSIM4v4_MOD_PVOFFCV: + value->rValue = model->BSIM4v4pvoffcv; return(OK); - case BSIM4V4_MOD_TNOM : - value->rValue = model->BSIM4V4tnom; + case BSIM4v4_MOD_TNOM : + value->rValue = model->BSIM4v4tnom; return(OK); - case BSIM4V4_MOD_CGSO: - value->rValue = model->BSIM4V4cgso; + case BSIM4v4_MOD_CGSO: + value->rValue = model->BSIM4v4cgso; return(OK); - case BSIM4V4_MOD_CGDO: - value->rValue = model->BSIM4V4cgdo; + case BSIM4v4_MOD_CGDO: + value->rValue = model->BSIM4v4cgdo; return(OK); - case BSIM4V4_MOD_CGBO: - value->rValue = model->BSIM4V4cgbo; + case BSIM4v4_MOD_CGBO: + value->rValue = model->BSIM4v4cgbo; return(OK); - case BSIM4V4_MOD_XPART: - value->rValue = model->BSIM4V4xpart; + case BSIM4v4_MOD_XPART: + value->rValue = model->BSIM4v4xpart; return(OK); - case BSIM4V4_MOD_RSH: - value->rValue = model->BSIM4V4sheetResistance; + case BSIM4v4_MOD_RSH: + value->rValue = model->BSIM4v4sheetResistance; return(OK); - case BSIM4V4_MOD_JSS: - value->rValue = model->BSIM4V4SjctSatCurDensity; + case BSIM4v4_MOD_JSS: + value->rValue = model->BSIM4v4SjctSatCurDensity; return(OK); - case BSIM4V4_MOD_JSWS: - value->rValue = model->BSIM4V4SjctSidewallSatCurDensity; + case BSIM4v4_MOD_JSWS: + value->rValue = model->BSIM4v4SjctSidewallSatCurDensity; return(OK); - case BSIM4V4_MOD_JSWGS: - value->rValue = model->BSIM4V4SjctGateSidewallSatCurDensity; + case BSIM4v4_MOD_JSWGS: + value->rValue = model->BSIM4v4SjctGateSidewallSatCurDensity; return(OK); - case BSIM4V4_MOD_PBS: - value->rValue = model->BSIM4V4SbulkJctPotential; + case BSIM4v4_MOD_PBS: + value->rValue = model->BSIM4v4SbulkJctPotential; return(OK); - case BSIM4V4_MOD_MJS: - value->rValue = model->BSIM4V4SbulkJctBotGradingCoeff; + case BSIM4v4_MOD_MJS: + value->rValue = model->BSIM4v4SbulkJctBotGradingCoeff; return(OK); - case BSIM4V4_MOD_PBSWS: - value->rValue = model->BSIM4V4SsidewallJctPotential; + case BSIM4v4_MOD_PBSWS: + value->rValue = model->BSIM4v4SsidewallJctPotential; return(OK); - case BSIM4V4_MOD_MJSWS: - value->rValue = model->BSIM4V4SbulkJctSideGradingCoeff; + case BSIM4v4_MOD_MJSWS: + value->rValue = model->BSIM4v4SbulkJctSideGradingCoeff; return(OK); - case BSIM4V4_MOD_CJS: - value->rValue = model->BSIM4V4SunitAreaJctCap; + case BSIM4v4_MOD_CJS: + value->rValue = model->BSIM4v4SunitAreaJctCap; return(OK); - case BSIM4V4_MOD_CJSWS: - value->rValue = model->BSIM4V4SunitLengthSidewallJctCap; + case BSIM4v4_MOD_CJSWS: + value->rValue = model->BSIM4v4SunitLengthSidewallJctCap; return(OK); - case BSIM4V4_MOD_PBSWGS: - value->rValue = model->BSIM4V4SGatesidewallJctPotential; + case BSIM4v4_MOD_PBSWGS: + value->rValue = model->BSIM4v4SGatesidewallJctPotential; return(OK); - case BSIM4V4_MOD_MJSWGS: - value->rValue = model->BSIM4V4SbulkJctGateSideGradingCoeff; + case BSIM4v4_MOD_MJSWGS: + value->rValue = model->BSIM4v4SbulkJctGateSideGradingCoeff; return(OK); - case BSIM4V4_MOD_CJSWGS: - value->rValue = model->BSIM4V4SunitLengthGateSidewallJctCap; + case BSIM4v4_MOD_CJSWGS: + value->rValue = model->BSIM4v4SunitLengthGateSidewallJctCap; return(OK); - case BSIM4V4_MOD_NJS: - value->rValue = model->BSIM4V4SjctEmissionCoeff; + case BSIM4v4_MOD_NJS: + value->rValue = model->BSIM4v4SjctEmissionCoeff; return(OK); - case BSIM4V4_MOD_XTIS: - value->rValue = model->BSIM4V4SjctTempExponent; + case BSIM4v4_MOD_XTIS: + value->rValue = model->BSIM4v4SjctTempExponent; return(OK); - case BSIM4V4_MOD_JSD: - value->rValue = model->BSIM4V4DjctSatCurDensity; + case BSIM4v4_MOD_JSD: + value->rValue = model->BSIM4v4DjctSatCurDensity; return(OK); - case BSIM4V4_MOD_JSWD: - value->rValue = model->BSIM4V4DjctSidewallSatCurDensity; + case BSIM4v4_MOD_JSWD: + value->rValue = model->BSIM4v4DjctSidewallSatCurDensity; return(OK); - case BSIM4V4_MOD_JSWGD: - value->rValue = model->BSIM4V4DjctGateSidewallSatCurDensity; + case BSIM4v4_MOD_JSWGD: + value->rValue = model->BSIM4v4DjctGateSidewallSatCurDensity; return(OK); - case BSIM4V4_MOD_PBD: - value->rValue = model->BSIM4V4DbulkJctPotential; + case BSIM4v4_MOD_PBD: + value->rValue = model->BSIM4v4DbulkJctPotential; return(OK); - case BSIM4V4_MOD_MJD: - value->rValue = model->BSIM4V4DbulkJctBotGradingCoeff; + case BSIM4v4_MOD_MJD: + value->rValue = model->BSIM4v4DbulkJctBotGradingCoeff; return(OK); - case BSIM4V4_MOD_PBSWD: - value->rValue = model->BSIM4V4DsidewallJctPotential; + case BSIM4v4_MOD_PBSWD: + value->rValue = model->BSIM4v4DsidewallJctPotential; return(OK); - case BSIM4V4_MOD_MJSWD: - value->rValue = model->BSIM4V4DbulkJctSideGradingCoeff; + case BSIM4v4_MOD_MJSWD: + value->rValue = model->BSIM4v4DbulkJctSideGradingCoeff; return(OK); - case BSIM4V4_MOD_CJD: - value->rValue = model->BSIM4V4DunitAreaJctCap; + case BSIM4v4_MOD_CJD: + value->rValue = model->BSIM4v4DunitAreaJctCap; return(OK); - case BSIM4V4_MOD_CJSWD: - value->rValue = model->BSIM4V4DunitLengthSidewallJctCap; + case BSIM4v4_MOD_CJSWD: + value->rValue = model->BSIM4v4DunitLengthSidewallJctCap; return(OK); - case BSIM4V4_MOD_PBSWGD: - value->rValue = model->BSIM4V4DGatesidewallJctPotential; + case BSIM4v4_MOD_PBSWGD: + value->rValue = model->BSIM4v4DGatesidewallJctPotential; return(OK); - case BSIM4V4_MOD_MJSWGD: - value->rValue = model->BSIM4V4DbulkJctGateSideGradingCoeff; + case BSIM4v4_MOD_MJSWGD: + value->rValue = model->BSIM4v4DbulkJctGateSideGradingCoeff; return(OK); - case BSIM4V4_MOD_CJSWGD: - value->rValue = model->BSIM4V4DunitLengthGateSidewallJctCap; + case BSIM4v4_MOD_CJSWGD: + value->rValue = model->BSIM4v4DunitLengthGateSidewallJctCap; return(OK); - case BSIM4V4_MOD_NJD: - value->rValue = model->BSIM4V4DjctEmissionCoeff; + case BSIM4v4_MOD_NJD: + value->rValue = model->BSIM4v4DjctEmissionCoeff; return(OK); - case BSIM4V4_MOD_XTID: - value->rValue = model->BSIM4V4DjctTempExponent; + case BSIM4v4_MOD_XTID: + value->rValue = model->BSIM4v4DjctTempExponent; return(OK); - case BSIM4V4_MOD_LINT: - value->rValue = model->BSIM4V4Lint; + case BSIM4v4_MOD_LINT: + value->rValue = model->BSIM4v4Lint; return(OK); - case BSIM4V4_MOD_LL: - value->rValue = model->BSIM4V4Ll; + case BSIM4v4_MOD_LL: + value->rValue = model->BSIM4v4Ll; return(OK); - case BSIM4V4_MOD_LLC: - value->rValue = model->BSIM4V4Llc; + case BSIM4v4_MOD_LLC: + value->rValue = model->BSIM4v4Llc; return(OK); - case BSIM4V4_MOD_LLN: - value->rValue = model->BSIM4V4Lln; + case BSIM4v4_MOD_LLN: + value->rValue = model->BSIM4v4Lln; return(OK); - case BSIM4V4_MOD_LW: - value->rValue = model->BSIM4V4Lw; + case BSIM4v4_MOD_LW: + value->rValue = model->BSIM4v4Lw; return(OK); - case BSIM4V4_MOD_LWC: - value->rValue = model->BSIM4V4Lwc; + case BSIM4v4_MOD_LWC: + value->rValue = model->BSIM4v4Lwc; return(OK); - case BSIM4V4_MOD_LWN: - value->rValue = model->BSIM4V4Lwn; + case BSIM4v4_MOD_LWN: + value->rValue = model->BSIM4v4Lwn; return(OK); - case BSIM4V4_MOD_LWL: - value->rValue = model->BSIM4V4Lwl; + case BSIM4v4_MOD_LWL: + value->rValue = model->BSIM4v4Lwl; return(OK); - case BSIM4V4_MOD_LWLC: - value->rValue = model->BSIM4V4Lwlc; + case BSIM4v4_MOD_LWLC: + value->rValue = model->BSIM4v4Lwlc; return(OK); - case BSIM4V4_MOD_LMIN: - value->rValue = model->BSIM4V4Lmin; + case BSIM4v4_MOD_LMIN: + value->rValue = model->BSIM4v4Lmin; return(OK); - case BSIM4V4_MOD_LMAX: - value->rValue = model->BSIM4V4Lmax; + case BSIM4v4_MOD_LMAX: + value->rValue = model->BSIM4v4Lmax; return(OK); - case BSIM4V4_MOD_WINT: - value->rValue = model->BSIM4V4Wint; + case BSIM4v4_MOD_WINT: + value->rValue = model->BSIM4v4Wint; return(OK); - case BSIM4V4_MOD_WL: - value->rValue = model->BSIM4V4Wl; + case BSIM4v4_MOD_WL: + value->rValue = model->BSIM4v4Wl; return(OK); - case BSIM4V4_MOD_WLC: - value->rValue = model->BSIM4V4Wlc; + case BSIM4v4_MOD_WLC: + value->rValue = model->BSIM4v4Wlc; return(OK); - case BSIM4V4_MOD_WLN: - value->rValue = model->BSIM4V4Wln; + case BSIM4v4_MOD_WLN: + value->rValue = model->BSIM4v4Wln; return(OK); - case BSIM4V4_MOD_WW: - value->rValue = model->BSIM4V4Ww; + case BSIM4v4_MOD_WW: + value->rValue = model->BSIM4v4Ww; return(OK); - case BSIM4V4_MOD_WWC: - value->rValue = model->BSIM4V4Wwc; + case BSIM4v4_MOD_WWC: + value->rValue = model->BSIM4v4Wwc; return(OK); - case BSIM4V4_MOD_WWN: - value->rValue = model->BSIM4V4Wwn; + case BSIM4v4_MOD_WWN: + value->rValue = model->BSIM4v4Wwn; return(OK); - case BSIM4V4_MOD_WWL: - value->rValue = model->BSIM4V4Wwl; + case BSIM4v4_MOD_WWL: + value->rValue = model->BSIM4v4Wwl; return(OK); - case BSIM4V4_MOD_WWLC: - value->rValue = model->BSIM4V4Wwlc; + case BSIM4v4_MOD_WWLC: + value->rValue = model->BSIM4v4Wwlc; return(OK); - case BSIM4V4_MOD_WMIN: - value->rValue = model->BSIM4V4Wmin; + case BSIM4v4_MOD_WMIN: + value->rValue = model->BSIM4v4Wmin; return(OK); - case BSIM4V4_MOD_WMAX: - value->rValue = model->BSIM4V4Wmax; + case BSIM4v4_MOD_WMAX: + value->rValue = model->BSIM4v4Wmax; return(OK); /* stress effect */ - case BSIM4V4_MOD_SAREF: - value->rValue = model->BSIM4V4saref; + case BSIM4v4_MOD_SAREF: + value->rValue = model->BSIM4v4saref; return(OK); - case BSIM4V4_MOD_SBREF: - value->rValue = model->BSIM4V4sbref; + case BSIM4v4_MOD_SBREF: + value->rValue = model->BSIM4v4sbref; return(OK); - case BSIM4V4_MOD_WLOD: - value->rValue = model->BSIM4V4wlod; + case BSIM4v4_MOD_WLOD: + value->rValue = model->BSIM4v4wlod; return(OK); - case BSIM4V4_MOD_KU0: - value->rValue = model->BSIM4V4ku0; + case BSIM4v4_MOD_KU0: + value->rValue = model->BSIM4v4ku0; return(OK); - case BSIM4V4_MOD_KVSAT: - value->rValue = model->BSIM4V4kvsat; + case BSIM4v4_MOD_KVSAT: + value->rValue = model->BSIM4v4kvsat; return(OK); - case BSIM4V4_MOD_KVTH0: - value->rValue = model->BSIM4V4kvth0; + case BSIM4v4_MOD_KVTH0: + value->rValue = model->BSIM4v4kvth0; return(OK); - case BSIM4V4_MOD_TKU0: - value->rValue = model->BSIM4V4tku0; + case BSIM4v4_MOD_TKU0: + value->rValue = model->BSIM4v4tku0; return(OK); - case BSIM4V4_MOD_LLODKU0: - value->rValue = model->BSIM4V4llodku0; + case BSIM4v4_MOD_LLODKU0: + value->rValue = model->BSIM4v4llodku0; return(OK); - case BSIM4V4_MOD_WLODKU0: - value->rValue = model->BSIM4V4wlodku0; + case BSIM4v4_MOD_WLODKU0: + value->rValue = model->BSIM4v4wlodku0; return(OK); - case BSIM4V4_MOD_LLODVTH: - value->rValue = model->BSIM4V4llodvth; + case BSIM4v4_MOD_LLODVTH: + value->rValue = model->BSIM4v4llodvth; return(OK); - case BSIM4V4_MOD_WLODVTH: - value->rValue = model->BSIM4V4wlodvth; + case BSIM4v4_MOD_WLODVTH: + value->rValue = model->BSIM4v4wlodvth; return(OK); - case BSIM4V4_MOD_LKU0: - value->rValue = model->BSIM4V4lku0; + case BSIM4v4_MOD_LKU0: + value->rValue = model->BSIM4v4lku0; return(OK); - case BSIM4V4_MOD_WKU0: - value->rValue = model->BSIM4V4wku0; + case BSIM4v4_MOD_WKU0: + value->rValue = model->BSIM4v4wku0; return(OK); - case BSIM4V4_MOD_PKU0: - value->rValue = model->BSIM4V4pku0; + case BSIM4v4_MOD_PKU0: + value->rValue = model->BSIM4v4pku0; return(OK); - case BSIM4V4_MOD_LKVTH0: - value->rValue = model->BSIM4V4lkvth0; + case BSIM4v4_MOD_LKVTH0: + value->rValue = model->BSIM4v4lkvth0; return(OK); - case BSIM4V4_MOD_WKVTH0: - value->rValue = model->BSIM4V4wkvth0; + case BSIM4v4_MOD_WKVTH0: + value->rValue = model->BSIM4v4wkvth0; return(OK); - case BSIM4V4_MOD_PKVTH0: - value->rValue = model->BSIM4V4pkvth0; + case BSIM4v4_MOD_PKVTH0: + value->rValue = model->BSIM4v4pkvth0; return(OK); - case BSIM4V4_MOD_STK2: - value->rValue = model->BSIM4V4stk2; + case BSIM4v4_MOD_STK2: + value->rValue = model->BSIM4v4stk2; return(OK); - case BSIM4V4_MOD_LODK2: - value->rValue = model->BSIM4V4lodk2; + case BSIM4v4_MOD_LODK2: + value->rValue = model->BSIM4v4lodk2; return(OK); - case BSIM4V4_MOD_STETA0: - value->rValue = model->BSIM4V4steta0; + case BSIM4v4_MOD_STETA0: + value->rValue = model->BSIM4v4steta0; return(OK); - case BSIM4V4_MOD_LODETA0: - value->rValue = model->BSIM4V4lodeta0; + case BSIM4v4_MOD_LODETA0: + value->rValue = model->BSIM4v4lodeta0; return(OK); - case BSIM4V4_MOD_NOIA: - value->rValue = model->BSIM4V4oxideTrapDensityA; + case BSIM4v4_MOD_NOIA: + value->rValue = model->BSIM4v4oxideTrapDensityA; return(OK); - case BSIM4V4_MOD_NOIB: - value->rValue = model->BSIM4V4oxideTrapDensityB; + case BSIM4v4_MOD_NOIB: + value->rValue = model->BSIM4v4oxideTrapDensityB; return(OK); - case BSIM4V4_MOD_NOIC: - value->rValue = model->BSIM4V4oxideTrapDensityC; + case BSIM4v4_MOD_NOIC: + value->rValue = model->BSIM4v4oxideTrapDensityC; return(OK); - case BSIM4V4_MOD_EM: - value->rValue = model->BSIM4V4em; + case BSIM4v4_MOD_EM: + value->rValue = model->BSIM4v4em; return(OK); - case BSIM4V4_MOD_EF: - value->rValue = model->BSIM4V4ef; + case BSIM4v4_MOD_EF: + value->rValue = model->BSIM4v4ef; return(OK); - case BSIM4V4_MOD_AF: - value->rValue = model->BSIM4V4af; + case BSIM4v4_MOD_AF: + value->rValue = model->BSIM4v4af; return(OK); - case BSIM4V4_MOD_KF: - value->rValue = model->BSIM4V4kf; + case BSIM4v4_MOD_KF: + value->rValue = model->BSIM4v4kf; return(OK); - case BSIM4V4_MOD_STIMOD: - value->rValue = model->BSIM4V4stimod; + case BSIM4v4_MOD_STIMOD: + value->rValue = model->BSIM4v4stimod; return(OK); - case BSIM4V4_MOD_RGEOMOD: - value->rValue = model->BSIM4V4rgeomod; + case BSIM4v4_MOD_RGEOMOD: + value->rValue = model->BSIM4v4rgeomod; return(OK); - case BSIM4V4_MOD_SA0: - value->rValue = model->BSIM4V4sa0; + case BSIM4v4_MOD_SA0: + value->rValue = model->BSIM4v4sa0; return(OK); - case BSIM4V4_MOD_SB0: - value->rValue = model->BSIM4V4sb0; + case BSIM4v4_MOD_SB0: + value->rValue = model->BSIM4v4sb0; return(OK); default: return(E_BADPARM); diff --git a/src/spicelib/devices/bsim4v4/b4v4mdel.c b/src/spicelib/devices/bsim4v4/b4v4mdel.c index f6b42a9e8..c3e323e3e 100644 --- a/src/spicelib/devices/bsim4v4/b4v4mdel.c +++ b/src/spicelib/devices/bsim4v4/b4v4mdel.c @@ -14,20 +14,20 @@ #include "suffix.h" int -BSIM4V4mDelete(inModel,modname,kill) +BSIM4v4mDelete(inModel,modname,kill) GENmodel **inModel; IFuid modname; GENmodel *kill; { -BSIM4V4model **model = (BSIM4V4model**)inModel; -BSIM4V4model *modfast = (BSIM4V4model*)kill; -BSIM4V4instance *here; -BSIM4V4instance *prev = NULL; -BSIM4V4model **oldmod; +BSIM4v4model **model = (BSIM4v4model**)inModel; +BSIM4v4model *modfast = (BSIM4v4model*)kill; +BSIM4v4instance *here; +BSIM4v4instance *prev = NULL; +BSIM4v4model **oldmod; oldmod = model; - for (; *model ; model = &((*model)->BSIM4V4nextModel)) - { if ((*model)->BSIM4V4modName == modname || + for (; *model ; model = &((*model)->BSIM4v4nextModel)) + { if ((*model)->BSIM4v4modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; @@ -35,8 +35,8 @@ BSIM4V4model **oldmod; return(E_NOMOD); delgot: - *oldmod = (*model)->BSIM4V4nextModel; /* cut deleted device out of list */ - for (here = (*model)->BSIM4V4instances; here; here = here->BSIM4V4nextInstance) + *oldmod = (*model)->BSIM4v4nextModel; /* cut deleted device out of list */ + for (here = (*model)->BSIM4v4instances; here; here = here->BSIM4v4nextInstance) { if(prev) FREE(prev); prev = here; } diff --git a/src/spicelib/devices/bsim4v4/b4v4mpar.c b/src/spicelib/devices/bsim4v4/b4v4mpar.c index f658bebc8..656e7ded1 100644 --- a/src/spicelib/devices/bsim4v4/b4v4mpar.c +++ b/src/spicelib/devices/bsim4v4/b4v4mpar.c @@ -20,2792 +20,2792 @@ #include "suffix.h" int -BSIM4V4mParam(param,value,inMod) +BSIM4v4mParam(param,value,inMod) int param; IFvalue *value; GENmodel *inMod; { - BSIM4V4model *mod = (BSIM4V4model*)inMod; + BSIM4v4model *mod = (BSIM4v4model*)inMod; switch(param) - { case BSIM4V4_MOD_MOBMOD : - mod->BSIM4V4mobMod = value->iValue; - mod->BSIM4V4mobModGiven = TRUE; + { case BSIM4v4_MOD_MOBMOD : + mod->BSIM4v4mobMod = value->iValue; + mod->BSIM4v4mobModGiven = TRUE; break; - case BSIM4V4_MOD_BINUNIT : - mod->BSIM4V4binUnit = value->iValue; - mod->BSIM4V4binUnitGiven = TRUE; + case BSIM4v4_MOD_BINUNIT : + mod->BSIM4v4binUnit = value->iValue; + mod->BSIM4v4binUnitGiven = TRUE; break; - case BSIM4V4_MOD_PARAMCHK : - mod->BSIM4V4paramChk = value->iValue; - mod->BSIM4V4paramChkGiven = TRUE; + case BSIM4v4_MOD_PARAMCHK : + mod->BSIM4v4paramChk = value->iValue; + mod->BSIM4v4paramChkGiven = TRUE; break; - case BSIM4V4_MOD_CAPMOD : - mod->BSIM4V4capMod = value->iValue; - mod->BSIM4V4capModGiven = TRUE; + case BSIM4v4_MOD_CAPMOD : + mod->BSIM4v4capMod = value->iValue; + mod->BSIM4v4capModGiven = TRUE; break; - case BSIM4V4_MOD_DIOMOD : - mod->BSIM4V4dioMod = value->iValue; - mod->BSIM4V4dioModGiven = TRUE; + case BSIM4v4_MOD_DIOMOD : + mod->BSIM4v4dioMod = value->iValue; + mod->BSIM4v4dioModGiven = TRUE; break; - case BSIM4V4_MOD_RDSMOD : - mod->BSIM4V4rdsMod = value->iValue; - mod->BSIM4V4rdsModGiven = TRUE; + case BSIM4v4_MOD_RDSMOD : + mod->BSIM4v4rdsMod = value->iValue; + mod->BSIM4v4rdsModGiven = TRUE; break; - case BSIM4V4_MOD_TRNQSMOD : - mod->BSIM4V4trnqsMod = value->iValue; - mod->BSIM4V4trnqsModGiven = TRUE; + case BSIM4v4_MOD_TRNQSMOD : + mod->BSIM4v4trnqsMod = value->iValue; + mod->BSIM4v4trnqsModGiven = TRUE; break; - case BSIM4V4_MOD_ACNQSMOD : - mod->BSIM4V4acnqsMod = value->iValue; - mod->BSIM4V4acnqsModGiven = TRUE; + case BSIM4v4_MOD_ACNQSMOD : + mod->BSIM4v4acnqsMod = value->iValue; + mod->BSIM4v4acnqsModGiven = TRUE; break; - case BSIM4V4_MOD_RBODYMOD : - mod->BSIM4V4rbodyMod = value->iValue; - mod->BSIM4V4rbodyModGiven = TRUE; + case BSIM4v4_MOD_RBODYMOD : + mod->BSIM4v4rbodyMod = value->iValue; + mod->BSIM4v4rbodyModGiven = TRUE; break; - case BSIM4V4_MOD_RGATEMOD : - mod->BSIM4V4rgateMod = value->iValue; - mod->BSIM4V4rgateModGiven = TRUE; + case BSIM4v4_MOD_RGATEMOD : + mod->BSIM4v4rgateMod = value->iValue; + mod->BSIM4v4rgateModGiven = TRUE; break; - case BSIM4V4_MOD_PERMOD : - mod->BSIM4V4perMod = value->iValue; - mod->BSIM4V4perModGiven = TRUE; + case BSIM4v4_MOD_PERMOD : + mod->BSIM4v4perMod = value->iValue; + mod->BSIM4v4perModGiven = TRUE; break; - case BSIM4V4_MOD_GEOMOD : - mod->BSIM4V4geoMod = value->iValue; - mod->BSIM4V4geoModGiven = TRUE; + case BSIM4v4_MOD_GEOMOD : + mod->BSIM4v4geoMod = value->iValue; + mod->BSIM4v4geoModGiven = TRUE; break; - case BSIM4V4_MOD_FNOIMOD : - mod->BSIM4V4fnoiMod = value->iValue; - mod->BSIM4V4fnoiModGiven = TRUE; + case BSIM4v4_MOD_FNOIMOD : + mod->BSIM4v4fnoiMod = value->iValue; + mod->BSIM4v4fnoiModGiven = TRUE; break; - case BSIM4V4_MOD_TNOIMOD : - mod->BSIM4V4tnoiMod = value->iValue; - mod->BSIM4V4tnoiModGiven = TRUE; + case BSIM4v4_MOD_TNOIMOD : + mod->BSIM4v4tnoiMod = value->iValue; + mod->BSIM4v4tnoiModGiven = TRUE; break; - case BSIM4V4_MOD_IGCMOD : - mod->BSIM4V4igcMod = value->iValue; - mod->BSIM4V4igcModGiven = TRUE; + case BSIM4v4_MOD_IGCMOD : + mod->BSIM4v4igcMod = value->iValue; + mod->BSIM4v4igcModGiven = TRUE; break; - case BSIM4V4_MOD_IGBMOD : - mod->BSIM4V4igbMod = value->iValue; - mod->BSIM4V4igbModGiven = TRUE; + case BSIM4v4_MOD_IGBMOD : + mod->BSIM4v4igbMod = value->iValue; + mod->BSIM4v4igbModGiven = TRUE; break; - case BSIM4V4_MOD_TEMPMOD : - mod->BSIM4V4tempMod = value->iValue; - mod->BSIM4V4tempModGiven = TRUE; + case BSIM4v4_MOD_TEMPMOD : + mod->BSIM4v4tempMod = value->iValue; + mod->BSIM4v4tempModGiven = TRUE; break; - case BSIM4V4_MOD_VERSION : - mod->BSIM4V4version = value->sValue; - mod->BSIM4V4versionGiven = TRUE; + case BSIM4v4_MOD_VERSION : + mod->BSIM4v4version = value->sValue; + mod->BSIM4v4versionGiven = TRUE; break; - case BSIM4V4_MOD_TOXREF : - mod->BSIM4V4toxref = value->rValue; - mod->BSIM4V4toxrefGiven = TRUE; + case BSIM4v4_MOD_TOXREF : + mod->BSIM4v4toxref = value->rValue; + mod->BSIM4v4toxrefGiven = TRUE; break; - case BSIM4V4_MOD_TOXE : - mod->BSIM4V4toxe = value->rValue; - mod->BSIM4V4toxeGiven = TRUE; + case BSIM4v4_MOD_TOXE : + mod->BSIM4v4toxe = value->rValue; + mod->BSIM4v4toxeGiven = TRUE; break; - case BSIM4V4_MOD_TOXP : - mod->BSIM4V4toxp = value->rValue; - mod->BSIM4V4toxpGiven = TRUE; + case BSIM4v4_MOD_TOXP : + mod->BSIM4v4toxp = value->rValue; + mod->BSIM4v4toxpGiven = TRUE; break; - case BSIM4V4_MOD_TOXM : - mod->BSIM4V4toxm = value->rValue; - mod->BSIM4V4toxmGiven = TRUE; + case BSIM4v4_MOD_TOXM : + mod->BSIM4v4toxm = value->rValue; + mod->BSIM4v4toxmGiven = TRUE; break; - case BSIM4V4_MOD_DTOX : - mod->BSIM4V4dtox = value->rValue; - mod->BSIM4V4dtoxGiven = TRUE; + case BSIM4v4_MOD_DTOX : + mod->BSIM4v4dtox = value->rValue; + mod->BSIM4v4dtoxGiven = TRUE; break; - case BSIM4V4_MOD_EPSROX : - mod->BSIM4V4epsrox = value->rValue; - mod->BSIM4V4epsroxGiven = TRUE; + case BSIM4v4_MOD_EPSROX : + mod->BSIM4v4epsrox = value->rValue; + mod->BSIM4v4epsroxGiven = TRUE; break; - case BSIM4V4_MOD_CDSC : - mod->BSIM4V4cdsc = value->rValue; - mod->BSIM4V4cdscGiven = TRUE; + case BSIM4v4_MOD_CDSC : + mod->BSIM4v4cdsc = value->rValue; + mod->BSIM4v4cdscGiven = TRUE; break; - case BSIM4V4_MOD_CDSCB : - mod->BSIM4V4cdscb = value->rValue; - mod->BSIM4V4cdscbGiven = TRUE; + case BSIM4v4_MOD_CDSCB : + mod->BSIM4v4cdscb = value->rValue; + mod->BSIM4v4cdscbGiven = TRUE; break; - case BSIM4V4_MOD_CDSCD : - mod->BSIM4V4cdscd = value->rValue; - mod->BSIM4V4cdscdGiven = TRUE; + case BSIM4v4_MOD_CDSCD : + mod->BSIM4v4cdscd = value->rValue; + mod->BSIM4v4cdscdGiven = TRUE; break; - case BSIM4V4_MOD_CIT : - mod->BSIM4V4cit = value->rValue; - mod->BSIM4V4citGiven = TRUE; + case BSIM4v4_MOD_CIT : + mod->BSIM4v4cit = value->rValue; + mod->BSIM4v4citGiven = TRUE; break; - case BSIM4V4_MOD_NFACTOR : - mod->BSIM4V4nfactor = value->rValue; - mod->BSIM4V4nfactorGiven = TRUE; + case BSIM4v4_MOD_NFACTOR : + mod->BSIM4v4nfactor = value->rValue; + mod->BSIM4v4nfactorGiven = TRUE; break; - case BSIM4V4_MOD_XJ: - mod->BSIM4V4xj = value->rValue; - mod->BSIM4V4xjGiven = TRUE; + case BSIM4v4_MOD_XJ: + mod->BSIM4v4xj = value->rValue; + mod->BSIM4v4xjGiven = TRUE; break; - case BSIM4V4_MOD_VSAT: - mod->BSIM4V4vsat = value->rValue; - mod->BSIM4V4vsatGiven = TRUE; + case BSIM4v4_MOD_VSAT: + mod->BSIM4v4vsat = value->rValue; + mod->BSIM4v4vsatGiven = TRUE; break; - case BSIM4V4_MOD_A0: - mod->BSIM4V4a0 = value->rValue; - mod->BSIM4V4a0Given = TRUE; + case BSIM4v4_MOD_A0: + mod->BSIM4v4a0 = value->rValue; + mod->BSIM4v4a0Given = TRUE; break; - case BSIM4V4_MOD_AGS: - mod->BSIM4V4ags= value->rValue; - mod->BSIM4V4agsGiven = TRUE; + case BSIM4v4_MOD_AGS: + mod->BSIM4v4ags= value->rValue; + mod->BSIM4v4agsGiven = TRUE; break; - case BSIM4V4_MOD_A1: - mod->BSIM4V4a1 = value->rValue; - mod->BSIM4V4a1Given = TRUE; + case BSIM4v4_MOD_A1: + mod->BSIM4v4a1 = value->rValue; + mod->BSIM4v4a1Given = TRUE; break; - case BSIM4V4_MOD_A2: - mod->BSIM4V4a2 = value->rValue; - mod->BSIM4V4a2Given = TRUE; + case BSIM4v4_MOD_A2: + mod->BSIM4v4a2 = value->rValue; + mod->BSIM4v4a2Given = TRUE; break; - case BSIM4V4_MOD_AT: - mod->BSIM4V4at = value->rValue; - mod->BSIM4V4atGiven = TRUE; + case BSIM4v4_MOD_AT: + mod->BSIM4v4at = value->rValue; + mod->BSIM4v4atGiven = TRUE; break; - case BSIM4V4_MOD_KETA: - mod->BSIM4V4keta = value->rValue; - mod->BSIM4V4ketaGiven = TRUE; + case BSIM4v4_MOD_KETA: + mod->BSIM4v4keta = value->rValue; + mod->BSIM4v4ketaGiven = TRUE; break; - case BSIM4V4_MOD_NSUB: - mod->BSIM4V4nsub = value->rValue; - mod->BSIM4V4nsubGiven = TRUE; - break; - case BSIM4V4_MOD_NDEP: - mod->BSIM4V4ndep = value->rValue; - mod->BSIM4V4ndepGiven = TRUE; - if (mod->BSIM4V4ndep > 1.0e20) - mod->BSIM4V4ndep *= 1.0e-6; - break; - case BSIM4V4_MOD_NSD: - mod->BSIM4V4nsd = value->rValue; - mod->BSIM4V4nsdGiven = TRUE; - if (mod->BSIM4V4nsd > 1.0e23) - mod->BSIM4V4nsd *= 1.0e-6; - break; - case BSIM4V4_MOD_NGATE: - mod->BSIM4V4ngate = value->rValue; - mod->BSIM4V4ngateGiven = TRUE; - if (mod->BSIM4V4ngate > 1.0e23) - mod->BSIM4V4ngate *= 1.0e-6; - break; - case BSIM4V4_MOD_GAMMA1: - mod->BSIM4V4gamma1 = value->rValue; - mod->BSIM4V4gamma1Given = TRUE; - break; - case BSIM4V4_MOD_GAMMA2: - mod->BSIM4V4gamma2 = value->rValue; - mod->BSIM4V4gamma2Given = TRUE; - break; - case BSIM4V4_MOD_VBX: - mod->BSIM4V4vbx = value->rValue; - mod->BSIM4V4vbxGiven = TRUE; - break; - case BSIM4V4_MOD_VBM: - mod->BSIM4V4vbm = value->rValue; - mod->BSIM4V4vbmGiven = TRUE; - break; - case BSIM4V4_MOD_XT: - mod->BSIM4V4xt = value->rValue; - mod->BSIM4V4xtGiven = TRUE; - break; - case BSIM4V4_MOD_K1: - mod->BSIM4V4k1 = value->rValue; - mod->BSIM4V4k1Given = TRUE; - break; - case BSIM4V4_MOD_KT1: - mod->BSIM4V4kt1 = value->rValue; - mod->BSIM4V4kt1Given = TRUE; - break; - case BSIM4V4_MOD_KT1L: - mod->BSIM4V4kt1l = value->rValue; - mod->BSIM4V4kt1lGiven = TRUE; - break; - case BSIM4V4_MOD_KT2: - mod->BSIM4V4kt2 = value->rValue; - mod->BSIM4V4kt2Given = TRUE; - break; - case BSIM4V4_MOD_K2: - mod->BSIM4V4k2 = value->rValue; - mod->BSIM4V4k2Given = TRUE; - break; - case BSIM4V4_MOD_K3: - mod->BSIM4V4k3 = value->rValue; - mod->BSIM4V4k3Given = TRUE; - break; - case BSIM4V4_MOD_K3B: - mod->BSIM4V4k3b = value->rValue; - mod->BSIM4V4k3bGiven = TRUE; - break; - case BSIM4V4_MOD_LPE0: - mod->BSIM4V4lpe0 = value->rValue; - mod->BSIM4V4lpe0Given = TRUE; - break; - case BSIM4V4_MOD_LPEB: - mod->BSIM4V4lpeb = value->rValue; - mod->BSIM4V4lpebGiven = TRUE; - break; - case BSIM4V4_MOD_DVTP0: - mod->BSIM4V4dvtp0 = value->rValue; - mod->BSIM4V4dvtp0Given = TRUE; - break; - case BSIM4V4_MOD_DVTP1: - mod->BSIM4V4dvtp1 = value->rValue; - mod->BSIM4V4dvtp1Given = TRUE; - break; - case BSIM4V4_MOD_W0: - mod->BSIM4V4w0 = value->rValue; - mod->BSIM4V4w0Given = TRUE; - break; - case BSIM4V4_MOD_DVT0: - mod->BSIM4V4dvt0 = value->rValue; - mod->BSIM4V4dvt0Given = TRUE; - break; - case BSIM4V4_MOD_DVT1: - mod->BSIM4V4dvt1 = value->rValue; - mod->BSIM4V4dvt1Given = TRUE; - break; - case BSIM4V4_MOD_DVT2: - mod->BSIM4V4dvt2 = value->rValue; - mod->BSIM4V4dvt2Given = TRUE; - break; - case BSIM4V4_MOD_DVT0W: - mod->BSIM4V4dvt0w = value->rValue; - mod->BSIM4V4dvt0wGiven = TRUE; - break; - case BSIM4V4_MOD_DVT1W: - mod->BSIM4V4dvt1w = value->rValue; - mod->BSIM4V4dvt1wGiven = TRUE; - break; - case BSIM4V4_MOD_DVT2W: - mod->BSIM4V4dvt2w = value->rValue; - mod->BSIM4V4dvt2wGiven = TRUE; - break; - case BSIM4V4_MOD_DROUT: - mod->BSIM4V4drout = value->rValue; - mod->BSIM4V4droutGiven = TRUE; - break; - case BSIM4V4_MOD_DSUB: - mod->BSIM4V4dsub = value->rValue; - mod->BSIM4V4dsubGiven = TRUE; + case BSIM4v4_MOD_NSUB: + mod->BSIM4v4nsub = value->rValue; + mod->BSIM4v4nsubGiven = TRUE; + break; + case BSIM4v4_MOD_NDEP: + mod->BSIM4v4ndep = value->rValue; + mod->BSIM4v4ndepGiven = TRUE; + if (mod->BSIM4v4ndep > 1.0e20) + mod->BSIM4v4ndep *= 1.0e-6; + break; + case BSIM4v4_MOD_NSD: + mod->BSIM4v4nsd = value->rValue; + mod->BSIM4v4nsdGiven = TRUE; + if (mod->BSIM4v4nsd > 1.0e23) + mod->BSIM4v4nsd *= 1.0e-6; + break; + case BSIM4v4_MOD_NGATE: + mod->BSIM4v4ngate = value->rValue; + mod->BSIM4v4ngateGiven = TRUE; + if (mod->BSIM4v4ngate > 1.0e23) + mod->BSIM4v4ngate *= 1.0e-6; + break; + case BSIM4v4_MOD_GAMMA1: + mod->BSIM4v4gamma1 = value->rValue; + mod->BSIM4v4gamma1Given = TRUE; + break; + case BSIM4v4_MOD_GAMMA2: + mod->BSIM4v4gamma2 = value->rValue; + mod->BSIM4v4gamma2Given = TRUE; + break; + case BSIM4v4_MOD_VBX: + mod->BSIM4v4vbx = value->rValue; + mod->BSIM4v4vbxGiven = TRUE; + break; + case BSIM4v4_MOD_VBM: + mod->BSIM4v4vbm = value->rValue; + mod->BSIM4v4vbmGiven = TRUE; + break; + case BSIM4v4_MOD_XT: + mod->BSIM4v4xt = value->rValue; + mod->BSIM4v4xtGiven = TRUE; + break; + case BSIM4v4_MOD_K1: + mod->BSIM4v4k1 = value->rValue; + mod->BSIM4v4k1Given = TRUE; + break; + case BSIM4v4_MOD_KT1: + mod->BSIM4v4kt1 = value->rValue; + mod->BSIM4v4kt1Given = TRUE; + break; + case BSIM4v4_MOD_KT1L: + mod->BSIM4v4kt1l = value->rValue; + mod->BSIM4v4kt1lGiven = TRUE; + break; + case BSIM4v4_MOD_KT2: + mod->BSIM4v4kt2 = value->rValue; + mod->BSIM4v4kt2Given = TRUE; + break; + case BSIM4v4_MOD_K2: + mod->BSIM4v4k2 = value->rValue; + mod->BSIM4v4k2Given = TRUE; + break; + case BSIM4v4_MOD_K3: + mod->BSIM4v4k3 = value->rValue; + mod->BSIM4v4k3Given = TRUE; + break; + case BSIM4v4_MOD_K3B: + mod->BSIM4v4k3b = value->rValue; + mod->BSIM4v4k3bGiven = TRUE; + break; + case BSIM4v4_MOD_LPE0: + mod->BSIM4v4lpe0 = value->rValue; + mod->BSIM4v4lpe0Given = TRUE; + break; + case BSIM4v4_MOD_LPEB: + mod->BSIM4v4lpeb = value->rValue; + mod->BSIM4v4lpebGiven = TRUE; + break; + case BSIM4v4_MOD_DVTP0: + mod->BSIM4v4dvtp0 = value->rValue; + mod->BSIM4v4dvtp0Given = TRUE; + break; + case BSIM4v4_MOD_DVTP1: + mod->BSIM4v4dvtp1 = value->rValue; + mod->BSIM4v4dvtp1Given = TRUE; + break; + case BSIM4v4_MOD_W0: + mod->BSIM4v4w0 = value->rValue; + mod->BSIM4v4w0Given = TRUE; + break; + case BSIM4v4_MOD_DVT0: + mod->BSIM4v4dvt0 = value->rValue; + mod->BSIM4v4dvt0Given = TRUE; + break; + case BSIM4v4_MOD_DVT1: + mod->BSIM4v4dvt1 = value->rValue; + mod->BSIM4v4dvt1Given = TRUE; + break; + case BSIM4v4_MOD_DVT2: + mod->BSIM4v4dvt2 = value->rValue; + mod->BSIM4v4dvt2Given = TRUE; + break; + case BSIM4v4_MOD_DVT0W: + mod->BSIM4v4dvt0w = value->rValue; + mod->BSIM4v4dvt0wGiven = TRUE; + break; + case BSIM4v4_MOD_DVT1W: + mod->BSIM4v4dvt1w = value->rValue; + mod->BSIM4v4dvt1wGiven = TRUE; + break; + case BSIM4v4_MOD_DVT2W: + mod->BSIM4v4dvt2w = value->rValue; + mod->BSIM4v4dvt2wGiven = TRUE; + break; + case BSIM4v4_MOD_DROUT: + mod->BSIM4v4drout = value->rValue; + mod->BSIM4v4droutGiven = TRUE; + break; + case BSIM4v4_MOD_DSUB: + mod->BSIM4v4dsub = value->rValue; + mod->BSIM4v4dsubGiven = TRUE; break; - case BSIM4V4_MOD_VTH0: - mod->BSIM4V4vth0 = value->rValue; - mod->BSIM4V4vth0Given = TRUE; + case BSIM4v4_MOD_VTH0: + mod->BSIM4v4vth0 = value->rValue; + mod->BSIM4v4vth0Given = TRUE; break; - case BSIM4V4_MOD_EU: - mod->BSIM4V4eu = value->rValue; - mod->BSIM4V4euGiven = TRUE; + case BSIM4v4_MOD_EU: + mod->BSIM4v4eu = value->rValue; + mod->BSIM4v4euGiven = TRUE; break; - case BSIM4V4_MOD_UA: - mod->BSIM4V4ua = value->rValue; - mod->BSIM4V4uaGiven = TRUE; + case BSIM4v4_MOD_UA: + mod->BSIM4v4ua = value->rValue; + mod->BSIM4v4uaGiven = TRUE; break; - case BSIM4V4_MOD_UA1: - mod->BSIM4V4ua1 = value->rValue; - mod->BSIM4V4ua1Given = TRUE; + case BSIM4v4_MOD_UA1: + mod->BSIM4v4ua1 = value->rValue; + mod->BSIM4v4ua1Given = TRUE; break; - case BSIM4V4_MOD_UB: - mod->BSIM4V4ub = value->rValue; - mod->BSIM4V4ubGiven = TRUE; + case BSIM4v4_MOD_UB: + mod->BSIM4v4ub = value->rValue; + mod->BSIM4v4ubGiven = TRUE; break; - case BSIM4V4_MOD_UB1: - mod->BSIM4V4ub1 = value->rValue; - mod->BSIM4V4ub1Given = TRUE; + case BSIM4v4_MOD_UB1: + mod->BSIM4v4ub1 = value->rValue; + mod->BSIM4v4ub1Given = TRUE; break; - case BSIM4V4_MOD_UC: - mod->BSIM4V4uc = value->rValue; - mod->BSIM4V4ucGiven = TRUE; + case BSIM4v4_MOD_UC: + mod->BSIM4v4uc = value->rValue; + mod->BSIM4v4ucGiven = TRUE; break; - case BSIM4V4_MOD_UC1: - mod->BSIM4V4uc1 = value->rValue; - mod->BSIM4V4uc1Given = TRUE; + case BSIM4v4_MOD_UC1: + mod->BSIM4v4uc1 = value->rValue; + mod->BSIM4v4uc1Given = TRUE; break; - case BSIM4V4_MOD_U0 : - mod->BSIM4V4u0 = value->rValue; - mod->BSIM4V4u0Given = TRUE; + case BSIM4v4_MOD_U0 : + mod->BSIM4v4u0 = value->rValue; + mod->BSIM4v4u0Given = TRUE; break; - case BSIM4V4_MOD_UTE : - mod->BSIM4V4ute = value->rValue; - mod->BSIM4V4uteGiven = TRUE; + case BSIM4v4_MOD_UTE : + mod->BSIM4v4ute = value->rValue; + mod->BSIM4v4uteGiven = TRUE; break; - case BSIM4V4_MOD_VOFF: - mod->BSIM4V4voff = value->rValue; - mod->BSIM4V4voffGiven = TRUE; + case BSIM4v4_MOD_VOFF: + mod->BSIM4v4voff = value->rValue; + mod->BSIM4v4voffGiven = TRUE; break; - case BSIM4V4_MOD_VOFFL: - mod->BSIM4V4voffl = value->rValue; - mod->BSIM4V4vofflGiven = TRUE; + case BSIM4v4_MOD_VOFFL: + mod->BSIM4v4voffl = value->rValue; + mod->BSIM4v4vofflGiven = TRUE; break; - case BSIM4V4_MOD_MINV: - mod->BSIM4V4minv = value->rValue; - mod->BSIM4V4minvGiven = TRUE; + case BSIM4v4_MOD_MINV: + mod->BSIM4v4minv = value->rValue; + mod->BSIM4v4minvGiven = TRUE; break; - case BSIM4V4_MOD_FPROUT: - mod->BSIM4V4fprout = value->rValue; - mod->BSIM4V4fproutGiven = TRUE; + case BSIM4v4_MOD_FPROUT: + mod->BSIM4v4fprout = value->rValue; + mod->BSIM4v4fproutGiven = TRUE; break; - case BSIM4V4_MOD_PDITS: - mod->BSIM4V4pdits = value->rValue; - mod->BSIM4V4pditsGiven = TRUE; + case BSIM4v4_MOD_PDITS: + mod->BSIM4v4pdits = value->rValue; + mod->BSIM4v4pditsGiven = TRUE; break; - case BSIM4V4_MOD_PDITSD: - mod->BSIM4V4pditsd = value->rValue; - mod->BSIM4V4pditsdGiven = TRUE; + case BSIM4v4_MOD_PDITSD: + mod->BSIM4v4pditsd = value->rValue; + mod->BSIM4v4pditsdGiven = TRUE; break; - case BSIM4V4_MOD_PDITSL: - mod->BSIM4V4pditsl = value->rValue; - mod->BSIM4V4pditslGiven = TRUE; + case BSIM4v4_MOD_PDITSL: + mod->BSIM4v4pditsl = value->rValue; + mod->BSIM4v4pditslGiven = TRUE; break; - case BSIM4V4_MOD_DELTA : - mod->BSIM4V4delta = value->rValue; - mod->BSIM4V4deltaGiven = TRUE; + case BSIM4v4_MOD_DELTA : + mod->BSIM4v4delta = value->rValue; + mod->BSIM4v4deltaGiven = TRUE; break; - case BSIM4V4_MOD_RDSW: - mod->BSIM4V4rdsw = value->rValue; - mod->BSIM4V4rdswGiven = TRUE; + case BSIM4v4_MOD_RDSW: + mod->BSIM4v4rdsw = value->rValue; + mod->BSIM4v4rdswGiven = TRUE; break; - case BSIM4V4_MOD_RDSWMIN: - mod->BSIM4V4rdswmin = value->rValue; - mod->BSIM4V4rdswminGiven = TRUE; + case BSIM4v4_MOD_RDSWMIN: + mod->BSIM4v4rdswmin = value->rValue; + mod->BSIM4v4rdswminGiven = TRUE; break; - case BSIM4V4_MOD_RDWMIN: - mod->BSIM4V4rdwmin = value->rValue; - mod->BSIM4V4rdwminGiven = TRUE; + case BSIM4v4_MOD_RDWMIN: + mod->BSIM4v4rdwmin = value->rValue; + mod->BSIM4v4rdwminGiven = TRUE; break; - case BSIM4V4_MOD_RSWMIN: - mod->BSIM4V4rswmin = value->rValue; - mod->BSIM4V4rswminGiven = TRUE; + case BSIM4v4_MOD_RSWMIN: + mod->BSIM4v4rswmin = value->rValue; + mod->BSIM4v4rswminGiven = TRUE; break; - case BSIM4V4_MOD_RDW: - mod->BSIM4V4rdw = value->rValue; - mod->BSIM4V4rdwGiven = TRUE; + case BSIM4v4_MOD_RDW: + mod->BSIM4v4rdw = value->rValue; + mod->BSIM4v4rdwGiven = TRUE; break; - case BSIM4V4_MOD_RSW: - mod->BSIM4V4rsw = value->rValue; - mod->BSIM4V4rswGiven = TRUE; + case BSIM4v4_MOD_RSW: + mod->BSIM4v4rsw = value->rValue; + mod->BSIM4v4rswGiven = TRUE; break; - case BSIM4V4_MOD_PRWG: - mod->BSIM4V4prwg = value->rValue; - mod->BSIM4V4prwgGiven = TRUE; + case BSIM4v4_MOD_PRWG: + mod->BSIM4v4prwg = value->rValue; + mod->BSIM4v4prwgGiven = TRUE; break; - case BSIM4V4_MOD_PRWB: - mod->BSIM4V4prwb = value->rValue; - mod->BSIM4V4prwbGiven = TRUE; + case BSIM4v4_MOD_PRWB: + mod->BSIM4v4prwb = value->rValue; + mod->BSIM4v4prwbGiven = TRUE; break; - case BSIM4V4_MOD_PRT: - mod->BSIM4V4prt = value->rValue; - mod->BSIM4V4prtGiven = TRUE; + case BSIM4v4_MOD_PRT: + mod->BSIM4v4prt = value->rValue; + mod->BSIM4v4prtGiven = TRUE; break; - case BSIM4V4_MOD_ETA0: - mod->BSIM4V4eta0 = value->rValue; - mod->BSIM4V4eta0Given = TRUE; + case BSIM4v4_MOD_ETA0: + mod->BSIM4v4eta0 = value->rValue; + mod->BSIM4v4eta0Given = TRUE; break; - case BSIM4V4_MOD_ETAB: - mod->BSIM4V4etab = value->rValue; - mod->BSIM4V4etabGiven = TRUE; + case BSIM4v4_MOD_ETAB: + mod->BSIM4v4etab = value->rValue; + mod->BSIM4v4etabGiven = TRUE; break; - case BSIM4V4_MOD_PCLM: - mod->BSIM4V4pclm = value->rValue; - mod->BSIM4V4pclmGiven = TRUE; + case BSIM4v4_MOD_PCLM: + mod->BSIM4v4pclm = value->rValue; + mod->BSIM4v4pclmGiven = TRUE; break; - case BSIM4V4_MOD_PDIBL1: - mod->BSIM4V4pdibl1 = value->rValue; - mod->BSIM4V4pdibl1Given = TRUE; + case BSIM4v4_MOD_PDIBL1: + mod->BSIM4v4pdibl1 = value->rValue; + mod->BSIM4v4pdibl1Given = TRUE; break; - case BSIM4V4_MOD_PDIBL2: - mod->BSIM4V4pdibl2 = value->rValue; - mod->BSIM4V4pdibl2Given = TRUE; + case BSIM4v4_MOD_PDIBL2: + mod->BSIM4v4pdibl2 = value->rValue; + mod->BSIM4v4pdibl2Given = TRUE; break; - case BSIM4V4_MOD_PDIBLB: - mod->BSIM4V4pdiblb = value->rValue; - mod->BSIM4V4pdiblbGiven = TRUE; + case BSIM4v4_MOD_PDIBLB: + mod->BSIM4v4pdiblb = value->rValue; + mod->BSIM4v4pdiblbGiven = TRUE; break; - case BSIM4V4_MOD_PSCBE1: - mod->BSIM4V4pscbe1 = value->rValue; - mod->BSIM4V4pscbe1Given = TRUE; + case BSIM4v4_MOD_PSCBE1: + mod->BSIM4v4pscbe1 = value->rValue; + mod->BSIM4v4pscbe1Given = TRUE; break; - case BSIM4V4_MOD_PSCBE2: - mod->BSIM4V4pscbe2 = value->rValue; - mod->BSIM4V4pscbe2Given = TRUE; + case BSIM4v4_MOD_PSCBE2: + mod->BSIM4v4pscbe2 = value->rValue; + mod->BSIM4v4pscbe2Given = TRUE; break; - case BSIM4V4_MOD_PVAG: - mod->BSIM4V4pvag = value->rValue; - mod->BSIM4V4pvagGiven = TRUE; + case BSIM4v4_MOD_PVAG: + mod->BSIM4v4pvag = value->rValue; + mod->BSIM4v4pvagGiven = TRUE; break; - case BSIM4V4_MOD_WR : - mod->BSIM4V4wr = value->rValue; - mod->BSIM4V4wrGiven = TRUE; + case BSIM4v4_MOD_WR : + mod->BSIM4v4wr = value->rValue; + mod->BSIM4v4wrGiven = TRUE; break; - case BSIM4V4_MOD_DWG : - mod->BSIM4V4dwg = value->rValue; - mod->BSIM4V4dwgGiven = TRUE; + case BSIM4v4_MOD_DWG : + mod->BSIM4v4dwg = value->rValue; + mod->BSIM4v4dwgGiven = TRUE; break; - case BSIM4V4_MOD_DWB : - mod->BSIM4V4dwb = value->rValue; - mod->BSIM4V4dwbGiven = TRUE; + case BSIM4v4_MOD_DWB : + mod->BSIM4v4dwb = value->rValue; + mod->BSIM4v4dwbGiven = TRUE; break; - case BSIM4V4_MOD_B0 : - mod->BSIM4V4b0 = value->rValue; - mod->BSIM4V4b0Given = TRUE; + case BSIM4v4_MOD_B0 : + mod->BSIM4v4b0 = value->rValue; + mod->BSIM4v4b0Given = TRUE; break; - case BSIM4V4_MOD_B1 : - mod->BSIM4V4b1 = value->rValue; - mod->BSIM4V4b1Given = TRUE; + case BSIM4v4_MOD_B1 : + mod->BSIM4v4b1 = value->rValue; + mod->BSIM4v4b1Given = TRUE; break; - case BSIM4V4_MOD_ALPHA0 : - mod->BSIM4V4alpha0 = value->rValue; - mod->BSIM4V4alpha0Given = TRUE; + case BSIM4v4_MOD_ALPHA0 : + mod->BSIM4v4alpha0 = value->rValue; + mod->BSIM4v4alpha0Given = TRUE; break; - case BSIM4V4_MOD_ALPHA1 : - mod->BSIM4V4alpha1 = value->rValue; - mod->BSIM4V4alpha1Given = TRUE; + case BSIM4v4_MOD_ALPHA1 : + mod->BSIM4v4alpha1 = value->rValue; + mod->BSIM4v4alpha1Given = TRUE; break; - case BSIM4V4_MOD_AGIDL : - mod->BSIM4V4agidl = value->rValue; - mod->BSIM4V4agidlGiven = TRUE; + case BSIM4v4_MOD_AGIDL : + mod->BSIM4v4agidl = value->rValue; + mod->BSIM4v4agidlGiven = TRUE; break; - case BSIM4V4_MOD_BGIDL : - mod->BSIM4V4bgidl = value->rValue; - mod->BSIM4V4bgidlGiven = TRUE; + case BSIM4v4_MOD_BGIDL : + mod->BSIM4v4bgidl = value->rValue; + mod->BSIM4v4bgidlGiven = TRUE; break; - case BSIM4V4_MOD_CGIDL : - mod->BSIM4V4cgidl = value->rValue; - mod->BSIM4V4cgidlGiven = TRUE; + case BSIM4v4_MOD_CGIDL : + mod->BSIM4v4cgidl = value->rValue; + mod->BSIM4v4cgidlGiven = TRUE; break; - case BSIM4V4_MOD_PHIN : - mod->BSIM4V4phin = value->rValue; - mod->BSIM4V4phinGiven = TRUE; + case BSIM4v4_MOD_PHIN : + mod->BSIM4v4phin = value->rValue; + mod->BSIM4v4phinGiven = TRUE; break; - case BSIM4V4_MOD_EGIDL : - mod->BSIM4V4egidl = value->rValue; - mod->BSIM4V4egidlGiven = TRUE; + case BSIM4v4_MOD_EGIDL : + mod->BSIM4v4egidl = value->rValue; + mod->BSIM4v4egidlGiven = TRUE; break; - case BSIM4V4_MOD_AIGC : - mod->BSIM4V4aigc = value->rValue; - mod->BSIM4V4aigcGiven = TRUE; + case BSIM4v4_MOD_AIGC : + mod->BSIM4v4aigc = value->rValue; + mod->BSIM4v4aigcGiven = TRUE; break; - case BSIM4V4_MOD_BIGC : - mod->BSIM4V4bigc = value->rValue; - mod->BSIM4V4bigcGiven = TRUE; + case BSIM4v4_MOD_BIGC : + mod->BSIM4v4bigc = value->rValue; + mod->BSIM4v4bigcGiven = TRUE; break; - case BSIM4V4_MOD_CIGC : - mod->BSIM4V4cigc = value->rValue; - mod->BSIM4V4cigcGiven = TRUE; + case BSIM4v4_MOD_CIGC : + mod->BSIM4v4cigc = value->rValue; + mod->BSIM4v4cigcGiven = TRUE; break; - case BSIM4V4_MOD_AIGSD : - mod->BSIM4V4aigsd = value->rValue; - mod->BSIM4V4aigsdGiven = TRUE; + case BSIM4v4_MOD_AIGSD : + mod->BSIM4v4aigsd = value->rValue; + mod->BSIM4v4aigsdGiven = TRUE; break; - case BSIM4V4_MOD_BIGSD : - mod->BSIM4V4bigsd = value->rValue; - mod->BSIM4V4bigsdGiven = TRUE; + case BSIM4v4_MOD_BIGSD : + mod->BSIM4v4bigsd = value->rValue; + mod->BSIM4v4bigsdGiven = TRUE; break; - case BSIM4V4_MOD_CIGSD : - mod->BSIM4V4cigsd = value->rValue; - mod->BSIM4V4cigsdGiven = TRUE; + case BSIM4v4_MOD_CIGSD : + mod->BSIM4v4cigsd = value->rValue; + mod->BSIM4v4cigsdGiven = TRUE; break; - case BSIM4V4_MOD_AIGBACC : - mod->BSIM4V4aigbacc = value->rValue; - mod->BSIM4V4aigbaccGiven = TRUE; + case BSIM4v4_MOD_AIGBACC : + mod->BSIM4v4aigbacc = value->rValue; + mod->BSIM4v4aigbaccGiven = TRUE; break; - case BSIM4V4_MOD_BIGBACC : - mod->BSIM4V4bigbacc = value->rValue; - mod->BSIM4V4bigbaccGiven = TRUE; + case BSIM4v4_MOD_BIGBACC : + mod->BSIM4v4bigbacc = value->rValue; + mod->BSIM4v4bigbaccGiven = TRUE; break; - case BSIM4V4_MOD_CIGBACC : - mod->BSIM4V4cigbacc = value->rValue; - mod->BSIM4V4cigbaccGiven = TRUE; + case BSIM4v4_MOD_CIGBACC : + mod->BSIM4v4cigbacc = value->rValue; + mod->BSIM4v4cigbaccGiven = TRUE; break; - case BSIM4V4_MOD_AIGBINV : - mod->BSIM4V4aigbinv = value->rValue; - mod->BSIM4V4aigbinvGiven = TRUE; + case BSIM4v4_MOD_AIGBINV : + mod->BSIM4v4aigbinv = value->rValue; + mod->BSIM4v4aigbinvGiven = TRUE; break; - case BSIM4V4_MOD_BIGBINV : - mod->BSIM4V4bigbinv = value->rValue; - mod->BSIM4V4bigbinvGiven = TRUE; + case BSIM4v4_MOD_BIGBINV : + mod->BSIM4v4bigbinv = value->rValue; + mod->BSIM4v4bigbinvGiven = TRUE; break; - case BSIM4V4_MOD_CIGBINV : - mod->BSIM4V4cigbinv = value->rValue; - mod->BSIM4V4cigbinvGiven = TRUE; + case BSIM4v4_MOD_CIGBINV : + mod->BSIM4v4cigbinv = value->rValue; + mod->BSIM4v4cigbinvGiven = TRUE; break; - case BSIM4V4_MOD_NIGC : - mod->BSIM4V4nigc = value->rValue; - mod->BSIM4V4nigcGiven = TRUE; + case BSIM4v4_MOD_NIGC : + mod->BSIM4v4nigc = value->rValue; + mod->BSIM4v4nigcGiven = TRUE; break; - case BSIM4V4_MOD_NIGBINV : - mod->BSIM4V4nigbinv = value->rValue; - mod->BSIM4V4nigbinvGiven = TRUE; + case BSIM4v4_MOD_NIGBINV : + mod->BSIM4v4nigbinv = value->rValue; + mod->BSIM4v4nigbinvGiven = TRUE; break; - case BSIM4V4_MOD_NIGBACC : - mod->BSIM4V4nigbacc = value->rValue; - mod->BSIM4V4nigbaccGiven = TRUE; + case BSIM4v4_MOD_NIGBACC : + mod->BSIM4v4nigbacc = value->rValue; + mod->BSIM4v4nigbaccGiven = TRUE; break; - case BSIM4V4_MOD_NTOX : - mod->BSIM4V4ntox = value->rValue; - mod->BSIM4V4ntoxGiven = TRUE; + case BSIM4v4_MOD_NTOX : + mod->BSIM4v4ntox = value->rValue; + mod->BSIM4v4ntoxGiven = TRUE; break; - case BSIM4V4_MOD_EIGBINV : - mod->BSIM4V4eigbinv = value->rValue; - mod->BSIM4V4eigbinvGiven = TRUE; + case BSIM4v4_MOD_EIGBINV : + mod->BSIM4v4eigbinv = value->rValue; + mod->BSIM4v4eigbinvGiven = TRUE; break; - case BSIM4V4_MOD_PIGCD : - mod->BSIM4V4pigcd = value->rValue; - mod->BSIM4V4pigcdGiven = TRUE; + case BSIM4v4_MOD_PIGCD : + mod->BSIM4v4pigcd = value->rValue; + mod->BSIM4v4pigcdGiven = TRUE; break; - case BSIM4V4_MOD_POXEDGE : - mod->BSIM4V4poxedge = value->rValue; - mod->BSIM4V4poxedgeGiven = TRUE; + case BSIM4v4_MOD_POXEDGE : + mod->BSIM4v4poxedge = value->rValue; + mod->BSIM4v4poxedgeGiven = TRUE; break; - case BSIM4V4_MOD_XRCRG1 : - mod->BSIM4V4xrcrg1 = value->rValue; - mod->BSIM4V4xrcrg1Given = TRUE; + case BSIM4v4_MOD_XRCRG1 : + mod->BSIM4v4xrcrg1 = value->rValue; + mod->BSIM4v4xrcrg1Given = TRUE; break; - case BSIM4V4_MOD_XRCRG2 : - mod->BSIM4V4xrcrg2 = value->rValue; - mod->BSIM4V4xrcrg2Given = TRUE; + case BSIM4v4_MOD_XRCRG2 : + mod->BSIM4v4xrcrg2 = value->rValue; + mod->BSIM4v4xrcrg2Given = TRUE; break; - case BSIM4V4_MOD_LAMBDA : - mod->BSIM4V4lambda = value->rValue; - mod->BSIM4V4lambdaGiven = TRUE; + case BSIM4v4_MOD_LAMBDA : + mod->BSIM4v4lambda = value->rValue; + mod->BSIM4v4lambdaGiven = TRUE; break; - case BSIM4V4_MOD_VTL : - mod->BSIM4V4vtl = value->rValue; - mod->BSIM4V4vtlGiven = TRUE; + case BSIM4v4_MOD_VTL : + mod->BSIM4v4vtl = value->rValue; + mod->BSIM4v4vtlGiven = TRUE; break; - case BSIM4V4_MOD_XN: - mod->BSIM4V4xn = value->rValue; - mod->BSIM4V4xnGiven = TRUE; + case BSIM4v4_MOD_XN: + mod->BSIM4v4xn = value->rValue; + mod->BSIM4v4xnGiven = TRUE; break; - case BSIM4V4_MOD_LC: - mod->BSIM4V4lc = value->rValue; - mod->BSIM4V4lcGiven = TRUE; + case BSIM4v4_MOD_LC: + mod->BSIM4v4lc = value->rValue; + mod->BSIM4v4lcGiven = TRUE; break; - case BSIM4V4_MOD_TNOIA : - mod->BSIM4V4tnoia = value->rValue; - mod->BSIM4V4tnoiaGiven = TRUE; + case BSIM4v4_MOD_TNOIA : + mod->BSIM4v4tnoia = value->rValue; + mod->BSIM4v4tnoiaGiven = TRUE; break; - case BSIM4V4_MOD_TNOIB : - mod->BSIM4V4tnoib = value->rValue; - mod->BSIM4V4tnoibGiven = TRUE; + case BSIM4v4_MOD_TNOIB : + mod->BSIM4v4tnoib = value->rValue; + mod->BSIM4v4tnoibGiven = TRUE; break; - case BSIM4V4_MOD_RNOIA : - mod->BSIM4V4rnoia = value->rValue; - mod->BSIM4V4rnoiaGiven = TRUE; + case BSIM4v4_MOD_RNOIA : + mod->BSIM4v4rnoia = value->rValue; + mod->BSIM4v4rnoiaGiven = TRUE; break; - case BSIM4V4_MOD_RNOIB : - mod->BSIM4V4rnoib = value->rValue; - mod->BSIM4V4rnoibGiven = TRUE; + case BSIM4v4_MOD_RNOIB : + mod->BSIM4v4rnoib = value->rValue; + mod->BSIM4v4rnoibGiven = TRUE; break; - case BSIM4V4_MOD_NTNOI : - mod->BSIM4V4ntnoi = value->rValue; - mod->BSIM4V4ntnoiGiven = TRUE; + case BSIM4v4_MOD_NTNOI : + mod->BSIM4v4ntnoi = value->rValue; + mod->BSIM4v4ntnoiGiven = TRUE; break; - case BSIM4V4_MOD_VFBSDOFF: - mod->BSIM4V4vfbsdoff = value->rValue; - mod->BSIM4V4vfbsdoffGiven = TRUE; + case BSIM4v4_MOD_VFBSDOFF: + mod->BSIM4v4vfbsdoff = value->rValue; + mod->BSIM4v4vfbsdoffGiven = TRUE; break; - case BSIM4V4_MOD_LINTNOI: - mod->BSIM4V4lintnoi = value->rValue; - mod->BSIM4V4lintnoiGiven = TRUE; + case BSIM4v4_MOD_LINTNOI: + mod->BSIM4v4lintnoi = value->rValue; + mod->BSIM4v4lintnoiGiven = TRUE; break; /* stress effect */ - case BSIM4V4_MOD_SAREF : - mod->BSIM4V4saref = value->rValue; - mod->BSIM4V4sarefGiven = TRUE; + case BSIM4v4_MOD_SAREF : + mod->BSIM4v4saref = value->rValue; + mod->BSIM4v4sarefGiven = TRUE; break; - case BSIM4V4_MOD_SBREF : - mod->BSIM4V4sbref = value->rValue; - mod->BSIM4V4sbrefGiven = TRUE; + case BSIM4v4_MOD_SBREF : + mod->BSIM4v4sbref = value->rValue; + mod->BSIM4v4sbrefGiven = TRUE; break; - case BSIM4V4_MOD_WLOD : - mod->BSIM4V4wlod = value->rValue; - mod->BSIM4V4wlodGiven = TRUE; + case BSIM4v4_MOD_WLOD : + mod->BSIM4v4wlod = value->rValue; + mod->BSIM4v4wlodGiven = TRUE; break; - case BSIM4V4_MOD_KU0 : - mod->BSIM4V4ku0 = value->rValue; - mod->BSIM4V4ku0Given = TRUE; + case BSIM4v4_MOD_KU0 : + mod->BSIM4v4ku0 = value->rValue; + mod->BSIM4v4ku0Given = TRUE; break; - case BSIM4V4_MOD_KVSAT : - mod->BSIM4V4kvsat = value->rValue; - mod->BSIM4V4kvsatGiven = TRUE; + case BSIM4v4_MOD_KVSAT : + mod->BSIM4v4kvsat = value->rValue; + mod->BSIM4v4kvsatGiven = TRUE; break; - case BSIM4V4_MOD_KVTH0 : - mod->BSIM4V4kvth0 = value->rValue; - mod->BSIM4V4kvth0Given = TRUE; + case BSIM4v4_MOD_KVTH0 : + mod->BSIM4v4kvth0 = value->rValue; + mod->BSIM4v4kvth0Given = TRUE; break; - case BSIM4V4_MOD_TKU0 : - mod->BSIM4V4tku0 = value->rValue; - mod->BSIM4V4tku0Given = TRUE; + case BSIM4v4_MOD_TKU0 : + mod->BSIM4v4tku0 = value->rValue; + mod->BSIM4v4tku0Given = TRUE; break; - case BSIM4V4_MOD_LLODKU0 : - mod->BSIM4V4llodku0 = value->rValue; - mod->BSIM4V4llodku0Given = TRUE; + case BSIM4v4_MOD_LLODKU0 : + mod->BSIM4v4llodku0 = value->rValue; + mod->BSIM4v4llodku0Given = TRUE; break; - case BSIM4V4_MOD_WLODKU0 : - mod->BSIM4V4wlodku0 = value->rValue; - mod->BSIM4V4wlodku0Given = TRUE; + case BSIM4v4_MOD_WLODKU0 : + mod->BSIM4v4wlodku0 = value->rValue; + mod->BSIM4v4wlodku0Given = TRUE; break; - case BSIM4V4_MOD_LLODVTH : - mod->BSIM4V4llodvth = value->rValue; - mod->BSIM4V4llodvthGiven = TRUE; + case BSIM4v4_MOD_LLODVTH : + mod->BSIM4v4llodvth = value->rValue; + mod->BSIM4v4llodvthGiven = TRUE; break; - case BSIM4V4_MOD_WLODVTH : - mod->BSIM4V4wlodvth = value->rValue; - mod->BSIM4V4wlodvthGiven = TRUE; + case BSIM4v4_MOD_WLODVTH : + mod->BSIM4v4wlodvth = value->rValue; + mod->BSIM4v4wlodvthGiven = TRUE; break; - case BSIM4V4_MOD_LKU0 : - mod->BSIM4V4lku0 = value->rValue; - mod->BSIM4V4lku0Given = TRUE; + case BSIM4v4_MOD_LKU0 : + mod->BSIM4v4lku0 = value->rValue; + mod->BSIM4v4lku0Given = TRUE; break; - case BSIM4V4_MOD_WKU0 : - mod->BSIM4V4wku0 = value->rValue; - mod->BSIM4V4wku0Given = TRUE; + case BSIM4v4_MOD_WKU0 : + mod->BSIM4v4wku0 = value->rValue; + mod->BSIM4v4wku0Given = TRUE; break; - case BSIM4V4_MOD_PKU0 : - mod->BSIM4V4pku0 = value->rValue; - mod->BSIM4V4pku0Given = TRUE; + case BSIM4v4_MOD_PKU0 : + mod->BSIM4v4pku0 = value->rValue; + mod->BSIM4v4pku0Given = TRUE; break; - case BSIM4V4_MOD_LKVTH0 : - mod->BSIM4V4lkvth0 = value->rValue; - mod->BSIM4V4lkvth0Given = TRUE; + case BSIM4v4_MOD_LKVTH0 : + mod->BSIM4v4lkvth0 = value->rValue; + mod->BSIM4v4lkvth0Given = TRUE; break; - case BSIM4V4_MOD_WKVTH0 : - mod->BSIM4V4wkvth0 = value->rValue; - mod->BSIM4V4wkvth0Given = TRUE; + case BSIM4v4_MOD_WKVTH0 : + mod->BSIM4v4wkvth0 = value->rValue; + mod->BSIM4v4wkvth0Given = TRUE; break; - case BSIM4V4_MOD_PKVTH0 : - mod->BSIM4V4pkvth0 = value->rValue; - mod->BSIM4V4pkvth0Given = TRUE; + case BSIM4v4_MOD_PKVTH0 : + mod->BSIM4v4pkvth0 = value->rValue; + mod->BSIM4v4pkvth0Given = TRUE; break; - case BSIM4V4_MOD_STK2 : - mod->BSIM4V4stk2 = value->rValue; - mod->BSIM4V4stk2Given = TRUE; + case BSIM4v4_MOD_STK2 : + mod->BSIM4v4stk2 = value->rValue; + mod->BSIM4v4stk2Given = TRUE; break; - case BSIM4V4_MOD_LODK2 : - mod->BSIM4V4lodk2 = value->rValue; - mod->BSIM4V4lodk2Given = TRUE; + case BSIM4v4_MOD_LODK2 : + mod->BSIM4v4lodk2 = value->rValue; + mod->BSIM4v4lodk2Given = TRUE; break; - case BSIM4V4_MOD_STETA0 : - mod->BSIM4V4steta0 = value->rValue; - mod->BSIM4V4steta0Given = TRUE; + case BSIM4v4_MOD_STETA0 : + mod->BSIM4v4steta0 = value->rValue; + mod->BSIM4v4steta0Given = TRUE; break; - case BSIM4V4_MOD_LODETA0 : - mod->BSIM4V4lodeta0 = value->rValue; - mod->BSIM4V4lodeta0Given = TRUE; + case BSIM4v4_MOD_LODETA0 : + mod->BSIM4v4lodeta0 = value->rValue; + mod->BSIM4v4lodeta0Given = TRUE; break; - case BSIM4V4_MOD_BETA0 : - mod->BSIM4V4beta0 = value->rValue; - mod->BSIM4V4beta0Given = TRUE; + case BSIM4v4_MOD_BETA0 : + mod->BSIM4v4beta0 = value->rValue; + mod->BSIM4v4beta0Given = TRUE; break; - case BSIM4V4_MOD_IJTHDFWD : - mod->BSIM4V4ijthdfwd = value->rValue; - mod->BSIM4V4ijthdfwdGiven = TRUE; + case BSIM4v4_MOD_IJTHDFWD : + mod->BSIM4v4ijthdfwd = value->rValue; + mod->BSIM4v4ijthdfwdGiven = TRUE; break; - case BSIM4V4_MOD_IJTHSFWD : - mod->BSIM4V4ijthsfwd = value->rValue; - mod->BSIM4V4ijthsfwdGiven = TRUE; + case BSIM4v4_MOD_IJTHSFWD : + mod->BSIM4v4ijthsfwd = value->rValue; + mod->BSIM4v4ijthsfwdGiven = TRUE; break; - case BSIM4V4_MOD_IJTHDREV : - mod->BSIM4V4ijthdrev = value->rValue; - mod->BSIM4V4ijthdrevGiven = TRUE; + case BSIM4v4_MOD_IJTHDREV : + mod->BSIM4v4ijthdrev = value->rValue; + mod->BSIM4v4ijthdrevGiven = TRUE; break; - case BSIM4V4_MOD_IJTHSREV : - mod->BSIM4V4ijthsrev = value->rValue; - mod->BSIM4V4ijthsrevGiven = TRUE; + case BSIM4v4_MOD_IJTHSREV : + mod->BSIM4v4ijthsrev = value->rValue; + mod->BSIM4v4ijthsrevGiven = TRUE; break; - case BSIM4V4_MOD_XJBVD : - mod->BSIM4V4xjbvd = value->rValue; - mod->BSIM4V4xjbvdGiven = TRUE; + case BSIM4v4_MOD_XJBVD : + mod->BSIM4v4xjbvd = value->rValue; + mod->BSIM4v4xjbvdGiven = TRUE; break; - case BSIM4V4_MOD_XJBVS : - mod->BSIM4V4xjbvs = value->rValue; - mod->BSIM4V4xjbvsGiven = TRUE; + case BSIM4v4_MOD_XJBVS : + mod->BSIM4v4xjbvs = value->rValue; + mod->BSIM4v4xjbvsGiven = TRUE; break; - case BSIM4V4_MOD_BVD : - mod->BSIM4V4bvd = value->rValue; - mod->BSIM4V4bvdGiven = TRUE; + case BSIM4v4_MOD_BVD : + mod->BSIM4v4bvd = value->rValue; + mod->BSIM4v4bvdGiven = TRUE; break; - case BSIM4V4_MOD_BVS : - mod->BSIM4V4bvs = value->rValue; - mod->BSIM4V4bvsGiven = TRUE; + case BSIM4v4_MOD_BVS : + mod->BSIM4v4bvs = value->rValue; + mod->BSIM4v4bvsGiven = TRUE; break; /* reverse diode */ - case BSIM4V4_MOD_JTSS : - mod->BSIM4V4jtss = value->rValue; - mod->BSIM4V4jtssGiven = TRUE; + case BSIM4v4_MOD_JTSS : + mod->BSIM4v4jtss = value->rValue; + mod->BSIM4v4jtssGiven = TRUE; break; - case BSIM4V4_MOD_JTSD : - mod->BSIM4V4jtsd = value->rValue; - mod->BSIM4V4jtsdGiven = TRUE; + case BSIM4v4_MOD_JTSD : + mod->BSIM4v4jtsd = value->rValue; + mod->BSIM4v4jtsdGiven = TRUE; break; - case BSIM4V4_MOD_JTSSWS : - mod->BSIM4V4jtssws = value->rValue; - mod->BSIM4V4jtsswsGiven = TRUE; + case BSIM4v4_MOD_JTSSWS : + mod->BSIM4v4jtssws = value->rValue; + mod->BSIM4v4jtsswsGiven = TRUE; break; - case BSIM4V4_MOD_JTSSWD : - mod->BSIM4V4jtsswd = value->rValue; - mod->BSIM4V4jtsswdGiven = TRUE; + case BSIM4v4_MOD_JTSSWD : + mod->BSIM4v4jtsswd = value->rValue; + mod->BSIM4v4jtsswdGiven = TRUE; break; - case BSIM4V4_MOD_JTSSWGS : - mod->BSIM4V4jtsswgs = value->rValue; - mod->BSIM4V4jtsswgsGiven = TRUE; + case BSIM4v4_MOD_JTSSWGS : + mod->BSIM4v4jtsswgs = value->rValue; + mod->BSIM4v4jtsswgsGiven = TRUE; break; - case BSIM4V4_MOD_JTSSWGD : - mod->BSIM4V4jtsswgd = value->rValue; - mod->BSIM4V4jtsswgdGiven = TRUE; + case BSIM4v4_MOD_JTSSWGD : + mod->BSIM4v4jtsswgd = value->rValue; + mod->BSIM4v4jtsswgdGiven = TRUE; break; - case BSIM4V4_MOD_NJTS : - mod->BSIM4V4njts = value->rValue; - mod->BSIM4V4njtsGiven = TRUE; + case BSIM4v4_MOD_NJTS : + mod->BSIM4v4njts = value->rValue; + mod->BSIM4v4njtsGiven = TRUE; break; - case BSIM4V4_MOD_NJTSSW : - mod->BSIM4V4njtssw = value->rValue; - mod->BSIM4V4njtsswGiven = TRUE; + case BSIM4v4_MOD_NJTSSW : + mod->BSIM4v4njtssw = value->rValue; + mod->BSIM4v4njtsswGiven = TRUE; break; - case BSIM4V4_MOD_NJTSSWG : - mod->BSIM4V4njtsswg = value->rValue; - mod->BSIM4V4njtsswgGiven = TRUE; + case BSIM4v4_MOD_NJTSSWG : + mod->BSIM4v4njtsswg = value->rValue; + mod->BSIM4v4njtsswgGiven = TRUE; break; - case BSIM4V4_MOD_XTSS : - mod->BSIM4V4xtss = value->rValue; - mod->BSIM4V4xtssGiven = TRUE; + case BSIM4v4_MOD_XTSS : + mod->BSIM4v4xtss = value->rValue; + mod->BSIM4v4xtssGiven = TRUE; break; - case BSIM4V4_MOD_XTSD : - mod->BSIM4V4xtsd = value->rValue; - mod->BSIM4V4xtsdGiven = TRUE; + case BSIM4v4_MOD_XTSD : + mod->BSIM4v4xtsd = value->rValue; + mod->BSIM4v4xtsdGiven = TRUE; break; - case BSIM4V4_MOD_XTSSWS : - mod->BSIM4V4xtssws = value->rValue; - mod->BSIM4V4xtsswsGiven = TRUE; + case BSIM4v4_MOD_XTSSWS : + mod->BSIM4v4xtssws = value->rValue; + mod->BSIM4v4xtsswsGiven = TRUE; break; - case BSIM4V4_MOD_XTSSWD : - mod->BSIM4V4xtsswd = value->rValue; - mod->BSIM4V4xtsswdGiven = TRUE; + case BSIM4v4_MOD_XTSSWD : + mod->BSIM4v4xtsswd = value->rValue; + mod->BSIM4v4xtsswdGiven = TRUE; break; - case BSIM4V4_MOD_XTSSWGS : - mod->BSIM4V4xtsswgs = value->rValue; - mod->BSIM4V4xtsswgsGiven = TRUE; + case BSIM4v4_MOD_XTSSWGS : + mod->BSIM4v4xtsswgs = value->rValue; + mod->BSIM4v4xtsswgsGiven = TRUE; break; - case BSIM4V4_MOD_XTSSWGD : - mod->BSIM4V4xtsswgd = value->rValue; - mod->BSIM4V4xtsswgdGiven = TRUE; + case BSIM4v4_MOD_XTSSWGD : + mod->BSIM4v4xtsswgd = value->rValue; + mod->BSIM4v4xtsswgdGiven = TRUE; break; - case BSIM4V4_MOD_TNJTS : - mod->BSIM4V4tnjts = value->rValue; - mod->BSIM4V4tnjtsGiven = TRUE; + case BSIM4v4_MOD_TNJTS : + mod->BSIM4v4tnjts = value->rValue; + mod->BSIM4v4tnjtsGiven = TRUE; break; - case BSIM4V4_MOD_TNJTSSW : - mod->BSIM4V4tnjtssw = value->rValue; - mod->BSIM4V4tnjtsswGiven = TRUE; + case BSIM4v4_MOD_TNJTSSW : + mod->BSIM4v4tnjtssw = value->rValue; + mod->BSIM4v4tnjtsswGiven = TRUE; break; - case BSIM4V4_MOD_TNJTSSWG : - mod->BSIM4V4tnjtsswg = value->rValue; - mod->BSIM4V4tnjtsswgGiven = TRUE; + case BSIM4v4_MOD_TNJTSSWG : + mod->BSIM4v4tnjtsswg = value->rValue; + mod->BSIM4v4tnjtsswgGiven = TRUE; break; - case BSIM4V4_MOD_VTSS : - mod->BSIM4V4vtss = value->rValue; - mod->BSIM4V4vtssGiven = TRUE; + case BSIM4v4_MOD_VTSS : + mod->BSIM4v4vtss = value->rValue; + mod->BSIM4v4vtssGiven = TRUE; break; - case BSIM4V4_MOD_VTSD : - mod->BSIM4V4vtsd = value->rValue; - mod->BSIM4V4vtsdGiven = TRUE; + case BSIM4v4_MOD_VTSD : + mod->BSIM4v4vtsd = value->rValue; + mod->BSIM4v4vtsdGiven = TRUE; break; - case BSIM4V4_MOD_VTSSWS : - mod->BSIM4V4vtssws = value->rValue; - mod->BSIM4V4vtsswsGiven = TRUE; + case BSIM4v4_MOD_VTSSWS : + mod->BSIM4v4vtssws = value->rValue; + mod->BSIM4v4vtsswsGiven = TRUE; break; - case BSIM4V4_MOD_VTSSWD : - mod->BSIM4V4vtsswd = value->rValue; - mod->BSIM4V4vtsswdGiven = TRUE; + case BSIM4v4_MOD_VTSSWD : + mod->BSIM4v4vtsswd = value->rValue; + mod->BSIM4v4vtsswdGiven = TRUE; break; - case BSIM4V4_MOD_VTSSWGS : - mod->BSIM4V4vtsswgs = value->rValue; - mod->BSIM4V4vtsswgsGiven = TRUE; + case BSIM4v4_MOD_VTSSWGS : + mod->BSIM4v4vtsswgs = value->rValue; + mod->BSIM4v4vtsswgsGiven = TRUE; break; - case BSIM4V4_MOD_VTSSWGD : - mod->BSIM4V4vtsswgd = value->rValue; - mod->BSIM4V4vtsswgdGiven = TRUE; + case BSIM4v4_MOD_VTSSWGD : + mod->BSIM4v4vtsswgd = value->rValue; + mod->BSIM4v4vtsswgdGiven = TRUE; break; - case BSIM4V4_MOD_VFB : - mod->BSIM4V4vfb = value->rValue; - mod->BSIM4V4vfbGiven = TRUE; + case BSIM4v4_MOD_VFB : + mod->BSIM4v4vfb = value->rValue; + mod->BSIM4v4vfbGiven = TRUE; break; - case BSIM4V4_MOD_GBMIN : - mod->BSIM4V4gbmin = value->rValue; - mod->BSIM4V4gbminGiven = TRUE; + case BSIM4v4_MOD_GBMIN : + mod->BSIM4v4gbmin = value->rValue; + mod->BSIM4v4gbminGiven = TRUE; break; - case BSIM4V4_MOD_RBDB : - mod->BSIM4V4rbdb = value->rValue; - mod->BSIM4V4rbdbGiven = TRUE; + case BSIM4v4_MOD_RBDB : + mod->BSIM4v4rbdb = value->rValue; + mod->BSIM4v4rbdbGiven = TRUE; break; - case BSIM4V4_MOD_RBPB : - mod->BSIM4V4rbpb = value->rValue; - mod->BSIM4V4rbpbGiven = TRUE; + case BSIM4v4_MOD_RBPB : + mod->BSIM4v4rbpb = value->rValue; + mod->BSIM4v4rbpbGiven = TRUE; break; - case BSIM4V4_MOD_RBSB : - mod->BSIM4V4rbsb = value->rValue; - mod->BSIM4V4rbsbGiven = TRUE; + case BSIM4v4_MOD_RBSB : + mod->BSIM4v4rbsb = value->rValue; + mod->BSIM4v4rbsbGiven = TRUE; break; - case BSIM4V4_MOD_RBPS : - mod->BSIM4V4rbps = value->rValue; - mod->BSIM4V4rbpsGiven = TRUE; + case BSIM4v4_MOD_RBPS : + mod->BSIM4v4rbps = value->rValue; + mod->BSIM4v4rbpsGiven = TRUE; break; - case BSIM4V4_MOD_RBPD : - mod->BSIM4V4rbpd = value->rValue; - mod->BSIM4V4rbpdGiven = TRUE; + case BSIM4v4_MOD_RBPD : + mod->BSIM4v4rbpd = value->rValue; + mod->BSIM4v4rbpdGiven = TRUE; break; - case BSIM4V4_MOD_CGSL : - mod->BSIM4V4cgsl = value->rValue; - mod->BSIM4V4cgslGiven = TRUE; + case BSIM4v4_MOD_CGSL : + mod->BSIM4v4cgsl = value->rValue; + mod->BSIM4v4cgslGiven = TRUE; break; - case BSIM4V4_MOD_CGDL : - mod->BSIM4V4cgdl = value->rValue; - mod->BSIM4V4cgdlGiven = TRUE; + case BSIM4v4_MOD_CGDL : + mod->BSIM4v4cgdl = value->rValue; + mod->BSIM4v4cgdlGiven = TRUE; break; - case BSIM4V4_MOD_CKAPPAS : - mod->BSIM4V4ckappas = value->rValue; - mod->BSIM4V4ckappasGiven = TRUE; + case BSIM4v4_MOD_CKAPPAS : + mod->BSIM4v4ckappas = value->rValue; + mod->BSIM4v4ckappasGiven = TRUE; break; - case BSIM4V4_MOD_CKAPPAD : - mod->BSIM4V4ckappad = value->rValue; - mod->BSIM4V4ckappadGiven = TRUE; + case BSIM4v4_MOD_CKAPPAD : + mod->BSIM4v4ckappad = value->rValue; + mod->BSIM4v4ckappadGiven = TRUE; break; - case BSIM4V4_MOD_CF : - mod->BSIM4V4cf = value->rValue; - mod->BSIM4V4cfGiven = TRUE; + case BSIM4v4_MOD_CF : + mod->BSIM4v4cf = value->rValue; + mod->BSIM4v4cfGiven = TRUE; break; - case BSIM4V4_MOD_CLC : - mod->BSIM4V4clc = value->rValue; - mod->BSIM4V4clcGiven = TRUE; + case BSIM4v4_MOD_CLC : + mod->BSIM4v4clc = value->rValue; + mod->BSIM4v4clcGiven = TRUE; break; - case BSIM4V4_MOD_CLE : - mod->BSIM4V4cle = value->rValue; - mod->BSIM4V4cleGiven = TRUE; + case BSIM4v4_MOD_CLE : + mod->BSIM4v4cle = value->rValue; + mod->BSIM4v4cleGiven = TRUE; break; - case BSIM4V4_MOD_DWC : - mod->BSIM4V4dwc = value->rValue; - mod->BSIM4V4dwcGiven = TRUE; + case BSIM4v4_MOD_DWC : + mod->BSIM4v4dwc = value->rValue; + mod->BSIM4v4dwcGiven = TRUE; break; - case BSIM4V4_MOD_DLC : - mod->BSIM4V4dlc = value->rValue; - mod->BSIM4V4dlcGiven = TRUE; + case BSIM4v4_MOD_DLC : + mod->BSIM4v4dlc = value->rValue; + mod->BSIM4v4dlcGiven = TRUE; break; - case BSIM4V4_MOD_XW : - mod->BSIM4V4xw = value->rValue; - mod->BSIM4V4xwGiven = TRUE; + case BSIM4v4_MOD_XW : + mod->BSIM4v4xw = value->rValue; + mod->BSIM4v4xwGiven = TRUE; break; - case BSIM4V4_MOD_XL : - mod->BSIM4V4xl = value->rValue; - mod->BSIM4V4xlGiven = TRUE; + case BSIM4v4_MOD_XL : + mod->BSIM4v4xl = value->rValue; + mod->BSIM4v4xlGiven = TRUE; break; - case BSIM4V4_MOD_DLCIG : - mod->BSIM4V4dlcig = value->rValue; - mod->BSIM4V4dlcigGiven = TRUE; + case BSIM4v4_MOD_DLCIG : + mod->BSIM4v4dlcig = value->rValue; + mod->BSIM4v4dlcigGiven = TRUE; break; - case BSIM4V4_MOD_DWJ : - mod->BSIM4V4dwj = value->rValue; - mod->BSIM4V4dwjGiven = TRUE; + case BSIM4v4_MOD_DWJ : + mod->BSIM4v4dwj = value->rValue; + mod->BSIM4v4dwjGiven = TRUE; break; - case BSIM4V4_MOD_VFBCV : - mod->BSIM4V4vfbcv = value->rValue; - mod->BSIM4V4vfbcvGiven = TRUE; + case BSIM4v4_MOD_VFBCV : + mod->BSIM4v4vfbcv = value->rValue; + mod->BSIM4v4vfbcvGiven = TRUE; break; - case BSIM4V4_MOD_ACDE : - mod->BSIM4V4acde = value->rValue; - mod->BSIM4V4acdeGiven = TRUE; + case BSIM4v4_MOD_ACDE : + mod->BSIM4v4acde = value->rValue; + mod->BSIM4v4acdeGiven = TRUE; break; - case BSIM4V4_MOD_MOIN : - mod->BSIM4V4moin = value->rValue; - mod->BSIM4V4moinGiven = TRUE; + case BSIM4v4_MOD_MOIN : + mod->BSIM4v4moin = value->rValue; + mod->BSIM4v4moinGiven = TRUE; break; - case BSIM4V4_MOD_NOFF : - mod->BSIM4V4noff = value->rValue; - mod->BSIM4V4noffGiven = TRUE; + case BSIM4v4_MOD_NOFF : + mod->BSIM4v4noff = value->rValue; + mod->BSIM4v4noffGiven = TRUE; break; - case BSIM4V4_MOD_VOFFCV : - mod->BSIM4V4voffcv = value->rValue; - mod->BSIM4V4voffcvGiven = TRUE; + case BSIM4v4_MOD_VOFFCV : + mod->BSIM4v4voffcv = value->rValue; + mod->BSIM4v4voffcvGiven = TRUE; break; - case BSIM4V4_MOD_DMCG : - mod->BSIM4V4dmcg = value->rValue; - mod->BSIM4V4dmcgGiven = TRUE; + case BSIM4v4_MOD_DMCG : + mod->BSIM4v4dmcg = value->rValue; + mod->BSIM4v4dmcgGiven = TRUE; break; - case BSIM4V4_MOD_DMCI : - mod->BSIM4V4dmci = value->rValue; - mod->BSIM4V4dmciGiven = TRUE; + case BSIM4v4_MOD_DMCI : + mod->BSIM4v4dmci = value->rValue; + mod->BSIM4v4dmciGiven = TRUE; break; - case BSIM4V4_MOD_DMDG : - mod->BSIM4V4dmdg = value->rValue; - mod->BSIM4V4dmdgGiven = TRUE; + case BSIM4v4_MOD_DMDG : + mod->BSIM4v4dmdg = value->rValue; + mod->BSIM4v4dmdgGiven = TRUE; break; - case BSIM4V4_MOD_DMCGT : - mod->BSIM4V4dmcgt = value->rValue; - mod->BSIM4V4dmcgtGiven = TRUE; + case BSIM4v4_MOD_DMCGT : + mod->BSIM4v4dmcgt = value->rValue; + mod->BSIM4v4dmcgtGiven = TRUE; break; - case BSIM4V4_MOD_XGW : - mod->BSIM4V4xgw = value->rValue; - mod->BSIM4V4xgwGiven = TRUE; + case BSIM4v4_MOD_XGW : + mod->BSIM4v4xgw = value->rValue; + mod->BSIM4v4xgwGiven = TRUE; break; - case BSIM4V4_MOD_XGL : - mod->BSIM4V4xgl = value->rValue; - mod->BSIM4V4xglGiven = TRUE; + case BSIM4v4_MOD_XGL : + mod->BSIM4v4xgl = value->rValue; + mod->BSIM4v4xglGiven = TRUE; break; - case BSIM4V4_MOD_RSHG : - mod->BSIM4V4rshg = value->rValue; - mod->BSIM4V4rshgGiven = TRUE; + case BSIM4v4_MOD_RSHG : + mod->BSIM4v4rshg = value->rValue; + mod->BSIM4v4rshgGiven = TRUE; break; - case BSIM4V4_MOD_NGCON : - mod->BSIM4V4ngcon = value->rValue; - mod->BSIM4V4ngconGiven = TRUE; + case BSIM4v4_MOD_NGCON : + mod->BSIM4v4ngcon = value->rValue; + mod->BSIM4v4ngconGiven = TRUE; break; - case BSIM4V4_MOD_TCJ : - mod->BSIM4V4tcj = value->rValue; - mod->BSIM4V4tcjGiven = TRUE; + case BSIM4v4_MOD_TCJ : + mod->BSIM4v4tcj = value->rValue; + mod->BSIM4v4tcjGiven = TRUE; break; - case BSIM4V4_MOD_TPB : - mod->BSIM4V4tpb = value->rValue; - mod->BSIM4V4tpbGiven = TRUE; + case BSIM4v4_MOD_TPB : + mod->BSIM4v4tpb = value->rValue; + mod->BSIM4v4tpbGiven = TRUE; break; - case BSIM4V4_MOD_TCJSW : - mod->BSIM4V4tcjsw = value->rValue; - mod->BSIM4V4tcjswGiven = TRUE; + case BSIM4v4_MOD_TCJSW : + mod->BSIM4v4tcjsw = value->rValue; + mod->BSIM4v4tcjswGiven = TRUE; break; - case BSIM4V4_MOD_TPBSW : - mod->BSIM4V4tpbsw = value->rValue; - mod->BSIM4V4tpbswGiven = TRUE; + case BSIM4v4_MOD_TPBSW : + mod->BSIM4v4tpbsw = value->rValue; + mod->BSIM4v4tpbswGiven = TRUE; break; - case BSIM4V4_MOD_TCJSWG : - mod->BSIM4V4tcjswg = value->rValue; - mod->BSIM4V4tcjswgGiven = TRUE; + case BSIM4v4_MOD_TCJSWG : + mod->BSIM4v4tcjswg = value->rValue; + mod->BSIM4v4tcjswgGiven = TRUE; break; - case BSIM4V4_MOD_TPBSWG : - mod->BSIM4V4tpbswg = value->rValue; - mod->BSIM4V4tpbswgGiven = TRUE; + case BSIM4v4_MOD_TPBSWG : + mod->BSIM4v4tpbswg = value->rValue; + mod->BSIM4v4tpbswgGiven = TRUE; break; /* Length dependence */ - case BSIM4V4_MOD_LCDSC : - mod->BSIM4V4lcdsc = value->rValue; - mod->BSIM4V4lcdscGiven = TRUE; + case BSIM4v4_MOD_LCDSC : + mod->BSIM4v4lcdsc = value->rValue; + mod->BSIM4v4lcdscGiven = TRUE; break; - case BSIM4V4_MOD_LCDSCB : - mod->BSIM4V4lcdscb = value->rValue; - mod->BSIM4V4lcdscbGiven = TRUE; + case BSIM4v4_MOD_LCDSCB : + mod->BSIM4v4lcdscb = value->rValue; + mod->BSIM4v4lcdscbGiven = TRUE; break; - case BSIM4V4_MOD_LCDSCD : - mod->BSIM4V4lcdscd = value->rValue; - mod->BSIM4V4lcdscdGiven = TRUE; + case BSIM4v4_MOD_LCDSCD : + mod->BSIM4v4lcdscd = value->rValue; + mod->BSIM4v4lcdscdGiven = TRUE; break; - case BSIM4V4_MOD_LCIT : - mod->BSIM4V4lcit = value->rValue; - mod->BSIM4V4lcitGiven = TRUE; + case BSIM4v4_MOD_LCIT : + mod->BSIM4v4lcit = value->rValue; + mod->BSIM4v4lcitGiven = TRUE; break; - case BSIM4V4_MOD_LNFACTOR : - mod->BSIM4V4lnfactor = value->rValue; - mod->BSIM4V4lnfactorGiven = TRUE; + case BSIM4v4_MOD_LNFACTOR : + mod->BSIM4v4lnfactor = value->rValue; + mod->BSIM4v4lnfactorGiven = TRUE; break; - case BSIM4V4_MOD_LXJ: - mod->BSIM4V4lxj = value->rValue; - mod->BSIM4V4lxjGiven = TRUE; + case BSIM4v4_MOD_LXJ: + mod->BSIM4v4lxj = value->rValue; + mod->BSIM4v4lxjGiven = TRUE; break; - case BSIM4V4_MOD_LVSAT: - mod->BSIM4V4lvsat = value->rValue; - mod->BSIM4V4lvsatGiven = TRUE; + case BSIM4v4_MOD_LVSAT: + mod->BSIM4v4lvsat = value->rValue; + mod->BSIM4v4lvsatGiven = TRUE; break; - case BSIM4V4_MOD_LA0: - mod->BSIM4V4la0 = value->rValue; - mod->BSIM4V4la0Given = TRUE; + case BSIM4v4_MOD_LA0: + mod->BSIM4v4la0 = value->rValue; + mod->BSIM4v4la0Given = TRUE; break; - case BSIM4V4_MOD_LAGS: - mod->BSIM4V4lags = value->rValue; - mod->BSIM4V4lagsGiven = TRUE; + case BSIM4v4_MOD_LAGS: + mod->BSIM4v4lags = value->rValue; + mod->BSIM4v4lagsGiven = TRUE; break; - case BSIM4V4_MOD_LA1: - mod->BSIM4V4la1 = value->rValue; - mod->BSIM4V4la1Given = TRUE; + case BSIM4v4_MOD_LA1: + mod->BSIM4v4la1 = value->rValue; + mod->BSIM4v4la1Given = TRUE; break; - case BSIM4V4_MOD_LA2: - mod->BSIM4V4la2 = value->rValue; - mod->BSIM4V4la2Given = TRUE; + case BSIM4v4_MOD_LA2: + mod->BSIM4v4la2 = value->rValue; + mod->BSIM4v4la2Given = TRUE; break; - case BSIM4V4_MOD_LAT: - mod->BSIM4V4lat = value->rValue; - mod->BSIM4V4latGiven = TRUE; + case BSIM4v4_MOD_LAT: + mod->BSIM4v4lat = value->rValue; + mod->BSIM4v4latGiven = TRUE; break; - case BSIM4V4_MOD_LKETA: - mod->BSIM4V4lketa = value->rValue; - mod->BSIM4V4lketaGiven = TRUE; + case BSIM4v4_MOD_LKETA: + mod->BSIM4v4lketa = value->rValue; + mod->BSIM4v4lketaGiven = TRUE; break; - case BSIM4V4_MOD_LNSUB: - mod->BSIM4V4lnsub = value->rValue; - mod->BSIM4V4lnsubGiven = TRUE; - break; - case BSIM4V4_MOD_LNDEP: - mod->BSIM4V4lndep = value->rValue; - mod->BSIM4V4lndepGiven = TRUE; - if (mod->BSIM4V4lndep > 1.0e20) - mod->BSIM4V4lndep *= 1.0e-6; - break; - case BSIM4V4_MOD_LNSD: - mod->BSIM4V4lnsd = value->rValue; - mod->BSIM4V4lnsdGiven = TRUE; - if (mod->BSIM4V4lnsd > 1.0e23) - mod->BSIM4V4lnsd *= 1.0e-6; - break; - case BSIM4V4_MOD_LNGATE: - mod->BSIM4V4lngate = value->rValue; - mod->BSIM4V4lngateGiven = TRUE; - if (mod->BSIM4V4lngate > 1.0e23) - mod->BSIM4V4lngate *= 1.0e-6; - break; - case BSIM4V4_MOD_LGAMMA1: - mod->BSIM4V4lgamma1 = value->rValue; - mod->BSIM4V4lgamma1Given = TRUE; - break; - case BSIM4V4_MOD_LGAMMA2: - mod->BSIM4V4lgamma2 = value->rValue; - mod->BSIM4V4lgamma2Given = TRUE; - break; - case BSIM4V4_MOD_LVBX: - mod->BSIM4V4lvbx = value->rValue; - mod->BSIM4V4lvbxGiven = TRUE; - break; - case BSIM4V4_MOD_LVBM: - mod->BSIM4V4lvbm = value->rValue; - mod->BSIM4V4lvbmGiven = TRUE; - break; - case BSIM4V4_MOD_LXT: - mod->BSIM4V4lxt = value->rValue; - mod->BSIM4V4lxtGiven = TRUE; - break; - case BSIM4V4_MOD_LK1: - mod->BSIM4V4lk1 = value->rValue; - mod->BSIM4V4lk1Given = TRUE; - break; - case BSIM4V4_MOD_LKT1: - mod->BSIM4V4lkt1 = value->rValue; - mod->BSIM4V4lkt1Given = TRUE; - break; - case BSIM4V4_MOD_LKT1L: - mod->BSIM4V4lkt1l = value->rValue; - mod->BSIM4V4lkt1lGiven = TRUE; - break; - case BSIM4V4_MOD_LKT2: - mod->BSIM4V4lkt2 = value->rValue; - mod->BSIM4V4lkt2Given = TRUE; - break; - case BSIM4V4_MOD_LK2: - mod->BSIM4V4lk2 = value->rValue; - mod->BSIM4V4lk2Given = TRUE; - break; - case BSIM4V4_MOD_LK3: - mod->BSIM4V4lk3 = value->rValue; - mod->BSIM4V4lk3Given = TRUE; - break; - case BSIM4V4_MOD_LK3B: - mod->BSIM4V4lk3b = value->rValue; - mod->BSIM4V4lk3bGiven = TRUE; - break; - case BSIM4V4_MOD_LLPE0: - mod->BSIM4V4llpe0 = value->rValue; - mod->BSIM4V4llpe0Given = TRUE; - break; - case BSIM4V4_MOD_LLPEB: - mod->BSIM4V4llpeb = value->rValue; - mod->BSIM4V4llpebGiven = TRUE; - break; - case BSIM4V4_MOD_LDVTP0: - mod->BSIM4V4ldvtp0 = value->rValue; - mod->BSIM4V4ldvtp0Given = TRUE; - break; - case BSIM4V4_MOD_LDVTP1: - mod->BSIM4V4ldvtp1 = value->rValue; - mod->BSIM4V4ldvtp1Given = TRUE; - break; - case BSIM4V4_MOD_LW0: - mod->BSIM4V4lw0 = value->rValue; - mod->BSIM4V4lw0Given = TRUE; - break; - case BSIM4V4_MOD_LDVT0: - mod->BSIM4V4ldvt0 = value->rValue; - mod->BSIM4V4ldvt0Given = TRUE; - break; - case BSIM4V4_MOD_LDVT1: - mod->BSIM4V4ldvt1 = value->rValue; - mod->BSIM4V4ldvt1Given = TRUE; - break; - case BSIM4V4_MOD_LDVT2: - mod->BSIM4V4ldvt2 = value->rValue; - mod->BSIM4V4ldvt2Given = TRUE; - break; - case BSIM4V4_MOD_LDVT0W: - mod->BSIM4V4ldvt0w = value->rValue; - mod->BSIM4V4ldvt0wGiven = TRUE; - break; - case BSIM4V4_MOD_LDVT1W: - mod->BSIM4V4ldvt1w = value->rValue; - mod->BSIM4V4ldvt1wGiven = TRUE; - break; - case BSIM4V4_MOD_LDVT2W: - mod->BSIM4V4ldvt2w = value->rValue; - mod->BSIM4V4ldvt2wGiven = TRUE; - break; - case BSIM4V4_MOD_LDROUT: - mod->BSIM4V4ldrout = value->rValue; - mod->BSIM4V4ldroutGiven = TRUE; - break; - case BSIM4V4_MOD_LDSUB: - mod->BSIM4V4ldsub = value->rValue; - mod->BSIM4V4ldsubGiven = TRUE; + case BSIM4v4_MOD_LNSUB: + mod->BSIM4v4lnsub = value->rValue; + mod->BSIM4v4lnsubGiven = TRUE; + break; + case BSIM4v4_MOD_LNDEP: + mod->BSIM4v4lndep = value->rValue; + mod->BSIM4v4lndepGiven = TRUE; + if (mod->BSIM4v4lndep > 1.0e20) + mod->BSIM4v4lndep *= 1.0e-6; + break; + case BSIM4v4_MOD_LNSD: + mod->BSIM4v4lnsd = value->rValue; + mod->BSIM4v4lnsdGiven = TRUE; + if (mod->BSIM4v4lnsd > 1.0e23) + mod->BSIM4v4lnsd *= 1.0e-6; + break; + case BSIM4v4_MOD_LNGATE: + mod->BSIM4v4lngate = value->rValue; + mod->BSIM4v4lngateGiven = TRUE; + if (mod->BSIM4v4lngate > 1.0e23) + mod->BSIM4v4lngate *= 1.0e-6; + break; + case BSIM4v4_MOD_LGAMMA1: + mod->BSIM4v4lgamma1 = value->rValue; + mod->BSIM4v4lgamma1Given = TRUE; + break; + case BSIM4v4_MOD_LGAMMA2: + mod->BSIM4v4lgamma2 = value->rValue; + mod->BSIM4v4lgamma2Given = TRUE; + break; + case BSIM4v4_MOD_LVBX: + mod->BSIM4v4lvbx = value->rValue; + mod->BSIM4v4lvbxGiven = TRUE; + break; + case BSIM4v4_MOD_LVBM: + mod->BSIM4v4lvbm = value->rValue; + mod->BSIM4v4lvbmGiven = TRUE; + break; + case BSIM4v4_MOD_LXT: + mod->BSIM4v4lxt = value->rValue; + mod->BSIM4v4lxtGiven = TRUE; + break; + case BSIM4v4_MOD_LK1: + mod->BSIM4v4lk1 = value->rValue; + mod->BSIM4v4lk1Given = TRUE; + break; + case BSIM4v4_MOD_LKT1: + mod->BSIM4v4lkt1 = value->rValue; + mod->BSIM4v4lkt1Given = TRUE; + break; + case BSIM4v4_MOD_LKT1L: + mod->BSIM4v4lkt1l = value->rValue; + mod->BSIM4v4lkt1lGiven = TRUE; + break; + case BSIM4v4_MOD_LKT2: + mod->BSIM4v4lkt2 = value->rValue; + mod->BSIM4v4lkt2Given = TRUE; + break; + case BSIM4v4_MOD_LK2: + mod->BSIM4v4lk2 = value->rValue; + mod->BSIM4v4lk2Given = TRUE; + break; + case BSIM4v4_MOD_LK3: + mod->BSIM4v4lk3 = value->rValue; + mod->BSIM4v4lk3Given = TRUE; + break; + case BSIM4v4_MOD_LK3B: + mod->BSIM4v4lk3b = value->rValue; + mod->BSIM4v4lk3bGiven = TRUE; + break; + case BSIM4v4_MOD_LLPE0: + mod->BSIM4v4llpe0 = value->rValue; + mod->BSIM4v4llpe0Given = TRUE; + break; + case BSIM4v4_MOD_LLPEB: + mod->BSIM4v4llpeb = value->rValue; + mod->BSIM4v4llpebGiven = TRUE; + break; + case BSIM4v4_MOD_LDVTP0: + mod->BSIM4v4ldvtp0 = value->rValue; + mod->BSIM4v4ldvtp0Given = TRUE; + break; + case BSIM4v4_MOD_LDVTP1: + mod->BSIM4v4ldvtp1 = value->rValue; + mod->BSIM4v4ldvtp1Given = TRUE; + break; + case BSIM4v4_MOD_LW0: + mod->BSIM4v4lw0 = value->rValue; + mod->BSIM4v4lw0Given = TRUE; + break; + case BSIM4v4_MOD_LDVT0: + mod->BSIM4v4ldvt0 = value->rValue; + mod->BSIM4v4ldvt0Given = TRUE; + break; + case BSIM4v4_MOD_LDVT1: + mod->BSIM4v4ldvt1 = value->rValue; + mod->BSIM4v4ldvt1Given = TRUE; + break; + case BSIM4v4_MOD_LDVT2: + mod->BSIM4v4ldvt2 = value->rValue; + mod->BSIM4v4ldvt2Given = TRUE; + break; + case BSIM4v4_MOD_LDVT0W: + mod->BSIM4v4ldvt0w = value->rValue; + mod->BSIM4v4ldvt0wGiven = TRUE; + break; + case BSIM4v4_MOD_LDVT1W: + mod->BSIM4v4ldvt1w = value->rValue; + mod->BSIM4v4ldvt1wGiven = TRUE; + break; + case BSIM4v4_MOD_LDVT2W: + mod->BSIM4v4ldvt2w = value->rValue; + mod->BSIM4v4ldvt2wGiven = TRUE; + break; + case BSIM4v4_MOD_LDROUT: + mod->BSIM4v4ldrout = value->rValue; + mod->BSIM4v4ldroutGiven = TRUE; + break; + case BSIM4v4_MOD_LDSUB: + mod->BSIM4v4ldsub = value->rValue; + mod->BSIM4v4ldsubGiven = TRUE; break; - case BSIM4V4_MOD_LVTH0: - mod->BSIM4V4lvth0 = value->rValue; - mod->BSIM4V4lvth0Given = TRUE; + case BSIM4v4_MOD_LVTH0: + mod->BSIM4v4lvth0 = value->rValue; + mod->BSIM4v4lvth0Given = TRUE; break; - case BSIM4V4_MOD_LUA: - mod->BSIM4V4lua = value->rValue; - mod->BSIM4V4luaGiven = TRUE; + case BSIM4v4_MOD_LUA: + mod->BSIM4v4lua = value->rValue; + mod->BSIM4v4luaGiven = TRUE; break; - case BSIM4V4_MOD_LUA1: - mod->BSIM4V4lua1 = value->rValue; - mod->BSIM4V4lua1Given = TRUE; + case BSIM4v4_MOD_LUA1: + mod->BSIM4v4lua1 = value->rValue; + mod->BSIM4v4lua1Given = TRUE; break; - case BSIM4V4_MOD_LUB: - mod->BSIM4V4lub = value->rValue; - mod->BSIM4V4lubGiven = TRUE; + case BSIM4v4_MOD_LUB: + mod->BSIM4v4lub = value->rValue; + mod->BSIM4v4lubGiven = TRUE; break; - case BSIM4V4_MOD_LUB1: - mod->BSIM4V4lub1 = value->rValue; - mod->BSIM4V4lub1Given = TRUE; + case BSIM4v4_MOD_LUB1: + mod->BSIM4v4lub1 = value->rValue; + mod->BSIM4v4lub1Given = TRUE; break; - case BSIM4V4_MOD_LUC: - mod->BSIM4V4luc = value->rValue; - mod->BSIM4V4lucGiven = TRUE; + case BSIM4v4_MOD_LUC: + mod->BSIM4v4luc = value->rValue; + mod->BSIM4v4lucGiven = TRUE; break; - case BSIM4V4_MOD_LUC1: - mod->BSIM4V4luc1 = value->rValue; - mod->BSIM4V4luc1Given = TRUE; + case BSIM4v4_MOD_LUC1: + mod->BSIM4v4luc1 = value->rValue; + mod->BSIM4v4luc1Given = TRUE; break; - case BSIM4V4_MOD_LU0 : - mod->BSIM4V4lu0 = value->rValue; - mod->BSIM4V4lu0Given = TRUE; + case BSIM4v4_MOD_LU0 : + mod->BSIM4v4lu0 = value->rValue; + mod->BSIM4v4lu0Given = TRUE; break; - case BSIM4V4_MOD_LUTE : - mod->BSIM4V4lute = value->rValue; - mod->BSIM4V4luteGiven = TRUE; + case BSIM4v4_MOD_LUTE : + mod->BSIM4v4lute = value->rValue; + mod->BSIM4v4luteGiven = TRUE; break; - case BSIM4V4_MOD_LVOFF: - mod->BSIM4V4lvoff = value->rValue; - mod->BSIM4V4lvoffGiven = TRUE; + case BSIM4v4_MOD_LVOFF: + mod->BSIM4v4lvoff = value->rValue; + mod->BSIM4v4lvoffGiven = TRUE; break; - case BSIM4V4_MOD_LMINV: - mod->BSIM4V4lminv = value->rValue; - mod->BSIM4V4lminvGiven = TRUE; + case BSIM4v4_MOD_LMINV: + mod->BSIM4v4lminv = value->rValue; + mod->BSIM4v4lminvGiven = TRUE; break; - case BSIM4V4_MOD_LFPROUT: - mod->BSIM4V4lfprout = value->rValue; - mod->BSIM4V4lfproutGiven = TRUE; + case BSIM4v4_MOD_LFPROUT: + mod->BSIM4v4lfprout = value->rValue; + mod->BSIM4v4lfproutGiven = TRUE; break; - case BSIM4V4_MOD_LPDITS: - mod->BSIM4V4lpdits = value->rValue; - mod->BSIM4V4lpditsGiven = TRUE; + case BSIM4v4_MOD_LPDITS: + mod->BSIM4v4lpdits = value->rValue; + mod->BSIM4v4lpditsGiven = TRUE; break; - case BSIM4V4_MOD_LPDITSD: - mod->BSIM4V4lpditsd = value->rValue; - mod->BSIM4V4lpditsdGiven = TRUE; + case BSIM4v4_MOD_LPDITSD: + mod->BSIM4v4lpditsd = value->rValue; + mod->BSIM4v4lpditsdGiven = TRUE; break; - case BSIM4V4_MOD_LDELTA : - mod->BSIM4V4ldelta = value->rValue; - mod->BSIM4V4ldeltaGiven = TRUE; + case BSIM4v4_MOD_LDELTA : + mod->BSIM4v4ldelta = value->rValue; + mod->BSIM4v4ldeltaGiven = TRUE; break; - case BSIM4V4_MOD_LRDSW: - mod->BSIM4V4lrdsw = value->rValue; - mod->BSIM4V4lrdswGiven = TRUE; + case BSIM4v4_MOD_LRDSW: + mod->BSIM4v4lrdsw = value->rValue; + mod->BSIM4v4lrdswGiven = TRUE; break; - case BSIM4V4_MOD_LRDW: - mod->BSIM4V4lrdw = value->rValue; - mod->BSIM4V4lrdwGiven = TRUE; + case BSIM4v4_MOD_LRDW: + mod->BSIM4v4lrdw = value->rValue; + mod->BSIM4v4lrdwGiven = TRUE; break; - case BSIM4V4_MOD_LRSW: - mod->BSIM4V4lrsw = value->rValue; - mod->BSIM4V4lrswGiven = TRUE; + case BSIM4v4_MOD_LRSW: + mod->BSIM4v4lrsw = value->rValue; + mod->BSIM4v4lrswGiven = TRUE; break; - case BSIM4V4_MOD_LPRWB: - mod->BSIM4V4lprwb = value->rValue; - mod->BSIM4V4lprwbGiven = TRUE; + case BSIM4v4_MOD_LPRWB: + mod->BSIM4v4lprwb = value->rValue; + mod->BSIM4v4lprwbGiven = TRUE; break; - case BSIM4V4_MOD_LPRWG: - mod->BSIM4V4lprwg = value->rValue; - mod->BSIM4V4lprwgGiven = TRUE; + case BSIM4v4_MOD_LPRWG: + mod->BSIM4v4lprwg = value->rValue; + mod->BSIM4v4lprwgGiven = TRUE; break; - case BSIM4V4_MOD_LPRT: - mod->BSIM4V4lprt = value->rValue; - mod->BSIM4V4lprtGiven = TRUE; + case BSIM4v4_MOD_LPRT: + mod->BSIM4v4lprt = value->rValue; + mod->BSIM4v4lprtGiven = TRUE; break; - case BSIM4V4_MOD_LETA0: - mod->BSIM4V4leta0 = value->rValue; - mod->BSIM4V4leta0Given = TRUE; + case BSIM4v4_MOD_LETA0: + mod->BSIM4v4leta0 = value->rValue; + mod->BSIM4v4leta0Given = TRUE; break; - case BSIM4V4_MOD_LETAB: - mod->BSIM4V4letab = value->rValue; - mod->BSIM4V4letabGiven = TRUE; + case BSIM4v4_MOD_LETAB: + mod->BSIM4v4letab = value->rValue; + mod->BSIM4v4letabGiven = TRUE; break; - case BSIM4V4_MOD_LPCLM: - mod->BSIM4V4lpclm = value->rValue; - mod->BSIM4V4lpclmGiven = TRUE; + case BSIM4v4_MOD_LPCLM: + mod->BSIM4v4lpclm = value->rValue; + mod->BSIM4v4lpclmGiven = TRUE; break; - case BSIM4V4_MOD_LPDIBL1: - mod->BSIM4V4lpdibl1 = value->rValue; - mod->BSIM4V4lpdibl1Given = TRUE; + case BSIM4v4_MOD_LPDIBL1: + mod->BSIM4v4lpdibl1 = value->rValue; + mod->BSIM4v4lpdibl1Given = TRUE; break; - case BSIM4V4_MOD_LPDIBL2: - mod->BSIM4V4lpdibl2 = value->rValue; - mod->BSIM4V4lpdibl2Given = TRUE; + case BSIM4v4_MOD_LPDIBL2: + mod->BSIM4v4lpdibl2 = value->rValue; + mod->BSIM4v4lpdibl2Given = TRUE; break; - case BSIM4V4_MOD_LPDIBLB: - mod->BSIM4V4lpdiblb = value->rValue; - mod->BSIM4V4lpdiblbGiven = TRUE; + case BSIM4v4_MOD_LPDIBLB: + mod->BSIM4v4lpdiblb = value->rValue; + mod->BSIM4v4lpdiblbGiven = TRUE; break; - case BSIM4V4_MOD_LPSCBE1: - mod->BSIM4V4lpscbe1 = value->rValue; - mod->BSIM4V4lpscbe1Given = TRUE; + case BSIM4v4_MOD_LPSCBE1: + mod->BSIM4v4lpscbe1 = value->rValue; + mod->BSIM4v4lpscbe1Given = TRUE; break; - case BSIM4V4_MOD_LPSCBE2: - mod->BSIM4V4lpscbe2 = value->rValue; - mod->BSIM4V4lpscbe2Given = TRUE; + case BSIM4v4_MOD_LPSCBE2: + mod->BSIM4v4lpscbe2 = value->rValue; + mod->BSIM4v4lpscbe2Given = TRUE; break; - case BSIM4V4_MOD_LPVAG: - mod->BSIM4V4lpvag = value->rValue; - mod->BSIM4V4lpvagGiven = TRUE; + case BSIM4v4_MOD_LPVAG: + mod->BSIM4v4lpvag = value->rValue; + mod->BSIM4v4lpvagGiven = TRUE; break; - case BSIM4V4_MOD_LWR : - mod->BSIM4V4lwr = value->rValue; - mod->BSIM4V4lwrGiven = TRUE; + case BSIM4v4_MOD_LWR : + mod->BSIM4v4lwr = value->rValue; + mod->BSIM4v4lwrGiven = TRUE; break; - case BSIM4V4_MOD_LDWG : - mod->BSIM4V4ldwg = value->rValue; - mod->BSIM4V4ldwgGiven = TRUE; + case BSIM4v4_MOD_LDWG : + mod->BSIM4v4ldwg = value->rValue; + mod->BSIM4v4ldwgGiven = TRUE; break; - case BSIM4V4_MOD_LDWB : - mod->BSIM4V4ldwb = value->rValue; - mod->BSIM4V4ldwbGiven = TRUE; + case BSIM4v4_MOD_LDWB : + mod->BSIM4v4ldwb = value->rValue; + mod->BSIM4v4ldwbGiven = TRUE; break; - case BSIM4V4_MOD_LB0 : - mod->BSIM4V4lb0 = value->rValue; - mod->BSIM4V4lb0Given = TRUE; + case BSIM4v4_MOD_LB0 : + mod->BSIM4v4lb0 = value->rValue; + mod->BSIM4v4lb0Given = TRUE; break; - case BSIM4V4_MOD_LB1 : - mod->BSIM4V4lb1 = value->rValue; - mod->BSIM4V4lb1Given = TRUE; + case BSIM4v4_MOD_LB1 : + mod->BSIM4v4lb1 = value->rValue; + mod->BSIM4v4lb1Given = TRUE; break; - case BSIM4V4_MOD_LALPHA0 : - mod->BSIM4V4lalpha0 = value->rValue; - mod->BSIM4V4lalpha0Given = TRUE; + case BSIM4v4_MOD_LALPHA0 : + mod->BSIM4v4lalpha0 = value->rValue; + mod->BSIM4v4lalpha0Given = TRUE; break; - case BSIM4V4_MOD_LALPHA1 : - mod->BSIM4V4lalpha1 = value->rValue; - mod->BSIM4V4lalpha1Given = TRUE; + case BSIM4v4_MOD_LALPHA1 : + mod->BSIM4v4lalpha1 = value->rValue; + mod->BSIM4v4lalpha1Given = TRUE; break; - case BSIM4V4_MOD_LBETA0 : - mod->BSIM4V4lbeta0 = value->rValue; - mod->BSIM4V4lbeta0Given = TRUE; + case BSIM4v4_MOD_LBETA0 : + mod->BSIM4v4lbeta0 = value->rValue; + mod->BSIM4v4lbeta0Given = TRUE; break; - case BSIM4V4_MOD_LAGIDL : - mod->BSIM4V4lagidl = value->rValue; - mod->BSIM4V4lagidlGiven = TRUE; + case BSIM4v4_MOD_LAGIDL : + mod->BSIM4v4lagidl = value->rValue; + mod->BSIM4v4lagidlGiven = TRUE; break; - case BSIM4V4_MOD_LBGIDL : - mod->BSIM4V4lbgidl = value->rValue; - mod->BSIM4V4lbgidlGiven = TRUE; + case BSIM4v4_MOD_LBGIDL : + mod->BSIM4v4lbgidl = value->rValue; + mod->BSIM4v4lbgidlGiven = TRUE; break; - case BSIM4V4_MOD_LCGIDL : - mod->BSIM4V4lcgidl = value->rValue; - mod->BSIM4V4lcgidlGiven = TRUE; + case BSIM4v4_MOD_LCGIDL : + mod->BSIM4v4lcgidl = value->rValue; + mod->BSIM4v4lcgidlGiven = TRUE; break; - case BSIM4V4_MOD_LPHIN : - mod->BSIM4V4lphin = value->rValue; - mod->BSIM4V4lphinGiven = TRUE; + case BSIM4v4_MOD_LPHIN : + mod->BSIM4v4lphin = value->rValue; + mod->BSIM4v4lphinGiven = TRUE; break; - case BSIM4V4_MOD_LEGIDL : - mod->BSIM4V4legidl = value->rValue; - mod->BSIM4V4legidlGiven = TRUE; + case BSIM4v4_MOD_LEGIDL : + mod->BSIM4v4legidl = value->rValue; + mod->BSIM4v4legidlGiven = TRUE; break; - case BSIM4V4_MOD_LAIGC : - mod->BSIM4V4laigc = value->rValue; - mod->BSIM4V4laigcGiven = TRUE; + case BSIM4v4_MOD_LAIGC : + mod->BSIM4v4laigc = value->rValue; + mod->BSIM4v4laigcGiven = TRUE; break; - case BSIM4V4_MOD_LBIGC : - mod->BSIM4V4lbigc = value->rValue; - mod->BSIM4V4lbigcGiven = TRUE; + case BSIM4v4_MOD_LBIGC : + mod->BSIM4v4lbigc = value->rValue; + mod->BSIM4v4lbigcGiven = TRUE; break; - case BSIM4V4_MOD_LCIGC : - mod->BSIM4V4lcigc = value->rValue; - mod->BSIM4V4lcigcGiven = TRUE; + case BSIM4v4_MOD_LCIGC : + mod->BSIM4v4lcigc = value->rValue; + mod->BSIM4v4lcigcGiven = TRUE; break; - case BSIM4V4_MOD_LAIGSD : - mod->BSIM4V4laigsd = value->rValue; - mod->BSIM4V4laigsdGiven = TRUE; + case BSIM4v4_MOD_LAIGSD : + mod->BSIM4v4laigsd = value->rValue; + mod->BSIM4v4laigsdGiven = TRUE; break; - case BSIM4V4_MOD_LBIGSD : - mod->BSIM4V4lbigsd = value->rValue; - mod->BSIM4V4lbigsdGiven = TRUE; + case BSIM4v4_MOD_LBIGSD : + mod->BSIM4v4lbigsd = value->rValue; + mod->BSIM4v4lbigsdGiven = TRUE; break; - case BSIM4V4_MOD_LCIGSD : - mod->BSIM4V4lcigsd = value->rValue; - mod->BSIM4V4lcigsdGiven = TRUE; + case BSIM4v4_MOD_LCIGSD : + mod->BSIM4v4lcigsd = value->rValue; + mod->BSIM4v4lcigsdGiven = TRUE; break; - case BSIM4V4_MOD_LAIGBACC : - mod->BSIM4V4laigbacc = value->rValue; - mod->BSIM4V4laigbaccGiven = TRUE; + case BSIM4v4_MOD_LAIGBACC : + mod->BSIM4v4laigbacc = value->rValue; + mod->BSIM4v4laigbaccGiven = TRUE; break; - case BSIM4V4_MOD_LBIGBACC : - mod->BSIM4V4lbigbacc = value->rValue; - mod->BSIM4V4lbigbaccGiven = TRUE; + case BSIM4v4_MOD_LBIGBACC : + mod->BSIM4v4lbigbacc = value->rValue; + mod->BSIM4v4lbigbaccGiven = TRUE; break; - case BSIM4V4_MOD_LCIGBACC : - mod->BSIM4V4lcigbacc = value->rValue; - mod->BSIM4V4lcigbaccGiven = TRUE; + case BSIM4v4_MOD_LCIGBACC : + mod->BSIM4v4lcigbacc = value->rValue; + mod->BSIM4v4lcigbaccGiven = TRUE; break; - case BSIM4V4_MOD_LAIGBINV : - mod->BSIM4V4laigbinv = value->rValue; - mod->BSIM4V4laigbinvGiven = TRUE; + case BSIM4v4_MOD_LAIGBINV : + mod->BSIM4v4laigbinv = value->rValue; + mod->BSIM4v4laigbinvGiven = TRUE; break; - case BSIM4V4_MOD_LBIGBINV : - mod->BSIM4V4lbigbinv = value->rValue; - mod->BSIM4V4lbigbinvGiven = TRUE; + case BSIM4v4_MOD_LBIGBINV : + mod->BSIM4v4lbigbinv = value->rValue; + mod->BSIM4v4lbigbinvGiven = TRUE; break; - case BSIM4V4_MOD_LCIGBINV : - mod->BSIM4V4lcigbinv = value->rValue; - mod->BSIM4V4lcigbinvGiven = TRUE; + case BSIM4v4_MOD_LCIGBINV : + mod->BSIM4v4lcigbinv = value->rValue; + mod->BSIM4v4lcigbinvGiven = TRUE; break; - case BSIM4V4_MOD_LNIGC : - mod->BSIM4V4lnigc = value->rValue; - mod->BSIM4V4lnigcGiven = TRUE; + case BSIM4v4_MOD_LNIGC : + mod->BSIM4v4lnigc = value->rValue; + mod->BSIM4v4lnigcGiven = TRUE; break; - case BSIM4V4_MOD_LNIGBINV : - mod->BSIM4V4lnigbinv = value->rValue; - mod->BSIM4V4lnigbinvGiven = TRUE; + case BSIM4v4_MOD_LNIGBINV : + mod->BSIM4v4lnigbinv = value->rValue; + mod->BSIM4v4lnigbinvGiven = TRUE; break; - case BSIM4V4_MOD_LNIGBACC : - mod->BSIM4V4lnigbacc = value->rValue; - mod->BSIM4V4lnigbaccGiven = TRUE; + case BSIM4v4_MOD_LNIGBACC : + mod->BSIM4v4lnigbacc = value->rValue; + mod->BSIM4v4lnigbaccGiven = TRUE; break; - case BSIM4V4_MOD_LNTOX : - mod->BSIM4V4lntox = value->rValue; - mod->BSIM4V4lntoxGiven = TRUE; + case BSIM4v4_MOD_LNTOX : + mod->BSIM4v4lntox = value->rValue; + mod->BSIM4v4lntoxGiven = TRUE; break; - case BSIM4V4_MOD_LEIGBINV : - mod->BSIM4V4leigbinv = value->rValue; - mod->BSIM4V4leigbinvGiven = TRUE; + case BSIM4v4_MOD_LEIGBINV : + mod->BSIM4v4leigbinv = value->rValue; + mod->BSIM4v4leigbinvGiven = TRUE; break; - case BSIM4V4_MOD_LPIGCD : - mod->BSIM4V4lpigcd = value->rValue; - mod->BSIM4V4lpigcdGiven = TRUE; + case BSIM4v4_MOD_LPIGCD : + mod->BSIM4v4lpigcd = value->rValue; + mod->BSIM4v4lpigcdGiven = TRUE; break; - case BSIM4V4_MOD_LPOXEDGE : - mod->BSIM4V4lpoxedge = value->rValue; - mod->BSIM4V4lpoxedgeGiven = TRUE; + case BSIM4v4_MOD_LPOXEDGE : + mod->BSIM4v4lpoxedge = value->rValue; + mod->BSIM4v4lpoxedgeGiven = TRUE; break; - case BSIM4V4_MOD_LXRCRG1 : - mod->BSIM4V4lxrcrg1 = value->rValue; - mod->BSIM4V4lxrcrg1Given = TRUE; + case BSIM4v4_MOD_LXRCRG1 : + mod->BSIM4v4lxrcrg1 = value->rValue; + mod->BSIM4v4lxrcrg1Given = TRUE; break; - case BSIM4V4_MOD_LXRCRG2 : - mod->BSIM4V4lxrcrg2 = value->rValue; - mod->BSIM4V4lxrcrg2Given = TRUE; + case BSIM4v4_MOD_LXRCRG2 : + mod->BSIM4v4lxrcrg2 = value->rValue; + mod->BSIM4v4lxrcrg2Given = TRUE; break; - case BSIM4V4_MOD_LLAMBDA : - mod->BSIM4V4llambda = value->rValue; - mod->BSIM4V4llambdaGiven = TRUE; + case BSIM4v4_MOD_LLAMBDA : + mod->BSIM4v4llambda = value->rValue; + mod->BSIM4v4llambdaGiven = TRUE; break; - case BSIM4V4_MOD_LVTL : - mod->BSIM4V4lvtl = value->rValue; - mod->BSIM4V4lvtlGiven = TRUE; + case BSIM4v4_MOD_LVTL : + mod->BSIM4v4lvtl = value->rValue; + mod->BSIM4v4lvtlGiven = TRUE; break; - case BSIM4V4_MOD_LXN: - mod->BSIM4V4lxn = value->rValue; - mod->BSIM4V4lxnGiven = TRUE; + case BSIM4v4_MOD_LXN: + mod->BSIM4v4lxn = value->rValue; + mod->BSIM4v4lxnGiven = TRUE; break; - case BSIM4V4_MOD_LVFBSDOFF: - mod->BSIM4V4lvfbsdoff = value->rValue; - mod->BSIM4V4lvfbsdoffGiven = TRUE; + case BSIM4v4_MOD_LVFBSDOFF: + mod->BSIM4v4lvfbsdoff = value->rValue; + mod->BSIM4v4lvfbsdoffGiven = TRUE; break; - case BSIM4V4_MOD_LEU : - mod->BSIM4V4leu = value->rValue; - mod->BSIM4V4leuGiven = TRUE; + case BSIM4v4_MOD_LEU : + mod->BSIM4v4leu = value->rValue; + mod->BSIM4v4leuGiven = TRUE; break; - case BSIM4V4_MOD_LVFB : - mod->BSIM4V4lvfb = value->rValue; - mod->BSIM4V4lvfbGiven = TRUE; + case BSIM4v4_MOD_LVFB : + mod->BSIM4v4lvfb = value->rValue; + mod->BSIM4v4lvfbGiven = TRUE; break; - case BSIM4V4_MOD_LCGSL : - mod->BSIM4V4lcgsl = value->rValue; - mod->BSIM4V4lcgslGiven = TRUE; + case BSIM4v4_MOD_LCGSL : + mod->BSIM4v4lcgsl = value->rValue; + mod->BSIM4v4lcgslGiven = TRUE; break; - case BSIM4V4_MOD_LCGDL : - mod->BSIM4V4lcgdl = value->rValue; - mod->BSIM4V4lcgdlGiven = TRUE; + case BSIM4v4_MOD_LCGDL : + mod->BSIM4v4lcgdl = value->rValue; + mod->BSIM4v4lcgdlGiven = TRUE; break; - case BSIM4V4_MOD_LCKAPPAS : - mod->BSIM4V4lckappas = value->rValue; - mod->BSIM4V4lckappasGiven = TRUE; + case BSIM4v4_MOD_LCKAPPAS : + mod->BSIM4v4lckappas = value->rValue; + mod->BSIM4v4lckappasGiven = TRUE; break; - case BSIM4V4_MOD_LCKAPPAD : - mod->BSIM4V4lckappad = value->rValue; - mod->BSIM4V4lckappadGiven = TRUE; + case BSIM4v4_MOD_LCKAPPAD : + mod->BSIM4v4lckappad = value->rValue; + mod->BSIM4v4lckappadGiven = TRUE; break; - case BSIM4V4_MOD_LCF : - mod->BSIM4V4lcf = value->rValue; - mod->BSIM4V4lcfGiven = TRUE; + case BSIM4v4_MOD_LCF : + mod->BSIM4v4lcf = value->rValue; + mod->BSIM4v4lcfGiven = TRUE; break; - case BSIM4V4_MOD_LCLC : - mod->BSIM4V4lclc = value->rValue; - mod->BSIM4V4lclcGiven = TRUE; + case BSIM4v4_MOD_LCLC : + mod->BSIM4v4lclc = value->rValue; + mod->BSIM4v4lclcGiven = TRUE; break; - case BSIM4V4_MOD_LCLE : - mod->BSIM4V4lcle = value->rValue; - mod->BSIM4V4lcleGiven = TRUE; + case BSIM4v4_MOD_LCLE : + mod->BSIM4v4lcle = value->rValue; + mod->BSIM4v4lcleGiven = TRUE; break; - case BSIM4V4_MOD_LVFBCV : - mod->BSIM4V4lvfbcv = value->rValue; - mod->BSIM4V4lvfbcvGiven = TRUE; + case BSIM4v4_MOD_LVFBCV : + mod->BSIM4v4lvfbcv = value->rValue; + mod->BSIM4v4lvfbcvGiven = TRUE; break; - case BSIM4V4_MOD_LACDE : - mod->BSIM4V4lacde = value->rValue; - mod->BSIM4V4lacdeGiven = TRUE; + case BSIM4v4_MOD_LACDE : + mod->BSIM4v4lacde = value->rValue; + mod->BSIM4v4lacdeGiven = TRUE; break; - case BSIM4V4_MOD_LMOIN : - mod->BSIM4V4lmoin = value->rValue; - mod->BSIM4V4lmoinGiven = TRUE; + case BSIM4v4_MOD_LMOIN : + mod->BSIM4v4lmoin = value->rValue; + mod->BSIM4v4lmoinGiven = TRUE; break; - case BSIM4V4_MOD_LNOFF : - mod->BSIM4V4lnoff = value->rValue; - mod->BSIM4V4lnoffGiven = TRUE; + case BSIM4v4_MOD_LNOFF : + mod->BSIM4v4lnoff = value->rValue; + mod->BSIM4v4lnoffGiven = TRUE; break; - case BSIM4V4_MOD_LVOFFCV : - mod->BSIM4V4lvoffcv = value->rValue; - mod->BSIM4V4lvoffcvGiven = TRUE; + case BSIM4v4_MOD_LVOFFCV : + mod->BSIM4v4lvoffcv = value->rValue; + mod->BSIM4v4lvoffcvGiven = TRUE; break; /* Width dependence */ - case BSIM4V4_MOD_WCDSC : - mod->BSIM4V4wcdsc = value->rValue; - mod->BSIM4V4wcdscGiven = TRUE; + case BSIM4v4_MOD_WCDSC : + mod->BSIM4v4wcdsc = value->rValue; + mod->BSIM4v4wcdscGiven = TRUE; break; - case BSIM4V4_MOD_WCDSCB : - mod->BSIM4V4wcdscb = value->rValue; - mod->BSIM4V4wcdscbGiven = TRUE; + case BSIM4v4_MOD_WCDSCB : + mod->BSIM4v4wcdscb = value->rValue; + mod->BSIM4v4wcdscbGiven = TRUE; break; - case BSIM4V4_MOD_WCDSCD : - mod->BSIM4V4wcdscd = value->rValue; - mod->BSIM4V4wcdscdGiven = TRUE; + case BSIM4v4_MOD_WCDSCD : + mod->BSIM4v4wcdscd = value->rValue; + mod->BSIM4v4wcdscdGiven = TRUE; break; - case BSIM4V4_MOD_WCIT : - mod->BSIM4V4wcit = value->rValue; - mod->BSIM4V4wcitGiven = TRUE; + case BSIM4v4_MOD_WCIT : + mod->BSIM4v4wcit = value->rValue; + mod->BSIM4v4wcitGiven = TRUE; break; - case BSIM4V4_MOD_WNFACTOR : - mod->BSIM4V4wnfactor = value->rValue; - mod->BSIM4V4wnfactorGiven = TRUE; + case BSIM4v4_MOD_WNFACTOR : + mod->BSIM4v4wnfactor = value->rValue; + mod->BSIM4v4wnfactorGiven = TRUE; break; - case BSIM4V4_MOD_WXJ: - mod->BSIM4V4wxj = value->rValue; - mod->BSIM4V4wxjGiven = TRUE; + case BSIM4v4_MOD_WXJ: + mod->BSIM4v4wxj = value->rValue; + mod->BSIM4v4wxjGiven = TRUE; break; - case BSIM4V4_MOD_WVSAT: - mod->BSIM4V4wvsat = value->rValue; - mod->BSIM4V4wvsatGiven = TRUE; + case BSIM4v4_MOD_WVSAT: + mod->BSIM4v4wvsat = value->rValue; + mod->BSIM4v4wvsatGiven = TRUE; break; - case BSIM4V4_MOD_WA0: - mod->BSIM4V4wa0 = value->rValue; - mod->BSIM4V4wa0Given = TRUE; + case BSIM4v4_MOD_WA0: + mod->BSIM4v4wa0 = value->rValue; + mod->BSIM4v4wa0Given = TRUE; break; - case BSIM4V4_MOD_WAGS: - mod->BSIM4V4wags = value->rValue; - mod->BSIM4V4wagsGiven = TRUE; + case BSIM4v4_MOD_WAGS: + mod->BSIM4v4wags = value->rValue; + mod->BSIM4v4wagsGiven = TRUE; break; - case BSIM4V4_MOD_WA1: - mod->BSIM4V4wa1 = value->rValue; - mod->BSIM4V4wa1Given = TRUE; + case BSIM4v4_MOD_WA1: + mod->BSIM4v4wa1 = value->rValue; + mod->BSIM4v4wa1Given = TRUE; break; - case BSIM4V4_MOD_WA2: - mod->BSIM4V4wa2 = value->rValue; - mod->BSIM4V4wa2Given = TRUE; + case BSIM4v4_MOD_WA2: + mod->BSIM4v4wa2 = value->rValue; + mod->BSIM4v4wa2Given = TRUE; break; - case BSIM4V4_MOD_WAT: - mod->BSIM4V4wat = value->rValue; - mod->BSIM4V4watGiven = TRUE; + case BSIM4v4_MOD_WAT: + mod->BSIM4v4wat = value->rValue; + mod->BSIM4v4watGiven = TRUE; break; - case BSIM4V4_MOD_WKETA: - mod->BSIM4V4wketa = value->rValue; - mod->BSIM4V4wketaGiven = TRUE; + case BSIM4v4_MOD_WKETA: + mod->BSIM4v4wketa = value->rValue; + mod->BSIM4v4wketaGiven = TRUE; break; - case BSIM4V4_MOD_WNSUB: - mod->BSIM4V4wnsub = value->rValue; - mod->BSIM4V4wnsubGiven = TRUE; - break; - case BSIM4V4_MOD_WNDEP: - mod->BSIM4V4wndep = value->rValue; - mod->BSIM4V4wndepGiven = TRUE; - if (mod->BSIM4V4wndep > 1.0e20) - mod->BSIM4V4wndep *= 1.0e-6; - break; - case BSIM4V4_MOD_WNSD: - mod->BSIM4V4wnsd = value->rValue; - mod->BSIM4V4wnsdGiven = TRUE; - if (mod->BSIM4V4wnsd > 1.0e23) - mod->BSIM4V4wnsd *= 1.0e-6; - break; - case BSIM4V4_MOD_WNGATE: - mod->BSIM4V4wngate = value->rValue; - mod->BSIM4V4wngateGiven = TRUE; - if (mod->BSIM4V4wngate > 1.0e23) - mod->BSIM4V4wngate *= 1.0e-6; - break; - case BSIM4V4_MOD_WGAMMA1: - mod->BSIM4V4wgamma1 = value->rValue; - mod->BSIM4V4wgamma1Given = TRUE; - break; - case BSIM4V4_MOD_WGAMMA2: - mod->BSIM4V4wgamma2 = value->rValue; - mod->BSIM4V4wgamma2Given = TRUE; - break; - case BSIM4V4_MOD_WVBX: - mod->BSIM4V4wvbx = value->rValue; - mod->BSIM4V4wvbxGiven = TRUE; - break; - case BSIM4V4_MOD_WVBM: - mod->BSIM4V4wvbm = value->rValue; - mod->BSIM4V4wvbmGiven = TRUE; - break; - case BSIM4V4_MOD_WXT: - mod->BSIM4V4wxt = value->rValue; - mod->BSIM4V4wxtGiven = TRUE; - break; - case BSIM4V4_MOD_WK1: - mod->BSIM4V4wk1 = value->rValue; - mod->BSIM4V4wk1Given = TRUE; - break; - case BSIM4V4_MOD_WKT1: - mod->BSIM4V4wkt1 = value->rValue; - mod->BSIM4V4wkt1Given = TRUE; - break; - case BSIM4V4_MOD_WKT1L: - mod->BSIM4V4wkt1l = value->rValue; - mod->BSIM4V4wkt1lGiven = TRUE; - break; - case BSIM4V4_MOD_WKT2: - mod->BSIM4V4wkt2 = value->rValue; - mod->BSIM4V4wkt2Given = TRUE; - break; - case BSIM4V4_MOD_WK2: - mod->BSIM4V4wk2 = value->rValue; - mod->BSIM4V4wk2Given = TRUE; - break; - case BSIM4V4_MOD_WK3: - mod->BSIM4V4wk3 = value->rValue; - mod->BSIM4V4wk3Given = TRUE; - break; - case BSIM4V4_MOD_WK3B: - mod->BSIM4V4wk3b = value->rValue; - mod->BSIM4V4wk3bGiven = TRUE; - break; - case BSIM4V4_MOD_WLPE0: - mod->BSIM4V4wlpe0 = value->rValue; - mod->BSIM4V4wlpe0Given = TRUE; - break; - case BSIM4V4_MOD_WLPEB: - mod->BSIM4V4wlpeb = value->rValue; - mod->BSIM4V4wlpebGiven = TRUE; - break; - case BSIM4V4_MOD_WDVTP0: - mod->BSIM4V4wdvtp0 = value->rValue; - mod->BSIM4V4wdvtp0Given = TRUE; - break; - case BSIM4V4_MOD_WDVTP1: - mod->BSIM4V4wdvtp1 = value->rValue; - mod->BSIM4V4wdvtp1Given = TRUE; - break; - case BSIM4V4_MOD_WW0: - mod->BSIM4V4ww0 = value->rValue; - mod->BSIM4V4ww0Given = TRUE; - break; - case BSIM4V4_MOD_WDVT0: - mod->BSIM4V4wdvt0 = value->rValue; - mod->BSIM4V4wdvt0Given = TRUE; - break; - case BSIM4V4_MOD_WDVT1: - mod->BSIM4V4wdvt1 = value->rValue; - mod->BSIM4V4wdvt1Given = TRUE; - break; - case BSIM4V4_MOD_WDVT2: - mod->BSIM4V4wdvt2 = value->rValue; - mod->BSIM4V4wdvt2Given = TRUE; - break; - case BSIM4V4_MOD_WDVT0W: - mod->BSIM4V4wdvt0w = value->rValue; - mod->BSIM4V4wdvt0wGiven = TRUE; - break; - case BSIM4V4_MOD_WDVT1W: - mod->BSIM4V4wdvt1w = value->rValue; - mod->BSIM4V4wdvt1wGiven = TRUE; - break; - case BSIM4V4_MOD_WDVT2W: - mod->BSIM4V4wdvt2w = value->rValue; - mod->BSIM4V4wdvt2wGiven = TRUE; - break; - case BSIM4V4_MOD_WDROUT: - mod->BSIM4V4wdrout = value->rValue; - mod->BSIM4V4wdroutGiven = TRUE; - break; - case BSIM4V4_MOD_WDSUB: - mod->BSIM4V4wdsub = value->rValue; - mod->BSIM4V4wdsubGiven = TRUE; + case BSIM4v4_MOD_WNSUB: + mod->BSIM4v4wnsub = value->rValue; + mod->BSIM4v4wnsubGiven = TRUE; + break; + case BSIM4v4_MOD_WNDEP: + mod->BSIM4v4wndep = value->rValue; + mod->BSIM4v4wndepGiven = TRUE; + if (mod->BSIM4v4wndep > 1.0e20) + mod->BSIM4v4wndep *= 1.0e-6; + break; + case BSIM4v4_MOD_WNSD: + mod->BSIM4v4wnsd = value->rValue; + mod->BSIM4v4wnsdGiven = TRUE; + if (mod->BSIM4v4wnsd > 1.0e23) + mod->BSIM4v4wnsd *= 1.0e-6; + break; + case BSIM4v4_MOD_WNGATE: + mod->BSIM4v4wngate = value->rValue; + mod->BSIM4v4wngateGiven = TRUE; + if (mod->BSIM4v4wngate > 1.0e23) + mod->BSIM4v4wngate *= 1.0e-6; + break; + case BSIM4v4_MOD_WGAMMA1: + mod->BSIM4v4wgamma1 = value->rValue; + mod->BSIM4v4wgamma1Given = TRUE; + break; + case BSIM4v4_MOD_WGAMMA2: + mod->BSIM4v4wgamma2 = value->rValue; + mod->BSIM4v4wgamma2Given = TRUE; + break; + case BSIM4v4_MOD_WVBX: + mod->BSIM4v4wvbx = value->rValue; + mod->BSIM4v4wvbxGiven = TRUE; + break; + case BSIM4v4_MOD_WVBM: + mod->BSIM4v4wvbm = value->rValue; + mod->BSIM4v4wvbmGiven = TRUE; + break; + case BSIM4v4_MOD_WXT: + mod->BSIM4v4wxt = value->rValue; + mod->BSIM4v4wxtGiven = TRUE; + break; + case BSIM4v4_MOD_WK1: + mod->BSIM4v4wk1 = value->rValue; + mod->BSIM4v4wk1Given = TRUE; + break; + case BSIM4v4_MOD_WKT1: + mod->BSIM4v4wkt1 = value->rValue; + mod->BSIM4v4wkt1Given = TRUE; + break; + case BSIM4v4_MOD_WKT1L: + mod->BSIM4v4wkt1l = value->rValue; + mod->BSIM4v4wkt1lGiven = TRUE; + break; + case BSIM4v4_MOD_WKT2: + mod->BSIM4v4wkt2 = value->rValue; + mod->BSIM4v4wkt2Given = TRUE; + break; + case BSIM4v4_MOD_WK2: + mod->BSIM4v4wk2 = value->rValue; + mod->BSIM4v4wk2Given = TRUE; + break; + case BSIM4v4_MOD_WK3: + mod->BSIM4v4wk3 = value->rValue; + mod->BSIM4v4wk3Given = TRUE; + break; + case BSIM4v4_MOD_WK3B: + mod->BSIM4v4wk3b = value->rValue; + mod->BSIM4v4wk3bGiven = TRUE; + break; + case BSIM4v4_MOD_WLPE0: + mod->BSIM4v4wlpe0 = value->rValue; + mod->BSIM4v4wlpe0Given = TRUE; + break; + case BSIM4v4_MOD_WLPEB: + mod->BSIM4v4wlpeb = value->rValue; + mod->BSIM4v4wlpebGiven = TRUE; + break; + case BSIM4v4_MOD_WDVTP0: + mod->BSIM4v4wdvtp0 = value->rValue; + mod->BSIM4v4wdvtp0Given = TRUE; + break; + case BSIM4v4_MOD_WDVTP1: + mod->BSIM4v4wdvtp1 = value->rValue; + mod->BSIM4v4wdvtp1Given = TRUE; + break; + case BSIM4v4_MOD_WW0: + mod->BSIM4v4ww0 = value->rValue; + mod->BSIM4v4ww0Given = TRUE; + break; + case BSIM4v4_MOD_WDVT0: + mod->BSIM4v4wdvt0 = value->rValue; + mod->BSIM4v4wdvt0Given = TRUE; + break; + case BSIM4v4_MOD_WDVT1: + mod->BSIM4v4wdvt1 = value->rValue; + mod->BSIM4v4wdvt1Given = TRUE; + break; + case BSIM4v4_MOD_WDVT2: + mod->BSIM4v4wdvt2 = value->rValue; + mod->BSIM4v4wdvt2Given = TRUE; + break; + case BSIM4v4_MOD_WDVT0W: + mod->BSIM4v4wdvt0w = value->rValue; + mod->BSIM4v4wdvt0wGiven = TRUE; + break; + case BSIM4v4_MOD_WDVT1W: + mod->BSIM4v4wdvt1w = value->rValue; + mod->BSIM4v4wdvt1wGiven = TRUE; + break; + case BSIM4v4_MOD_WDVT2W: + mod->BSIM4v4wdvt2w = value->rValue; + mod->BSIM4v4wdvt2wGiven = TRUE; + break; + case BSIM4v4_MOD_WDROUT: + mod->BSIM4v4wdrout = value->rValue; + mod->BSIM4v4wdroutGiven = TRUE; + break; + case BSIM4v4_MOD_WDSUB: + mod->BSIM4v4wdsub = value->rValue; + mod->BSIM4v4wdsubGiven = TRUE; break; - case BSIM4V4_MOD_WVTH0: - mod->BSIM4V4wvth0 = value->rValue; - mod->BSIM4V4wvth0Given = TRUE; + case BSIM4v4_MOD_WVTH0: + mod->BSIM4v4wvth0 = value->rValue; + mod->BSIM4v4wvth0Given = TRUE; break; - case BSIM4V4_MOD_WUA: - mod->BSIM4V4wua = value->rValue; - mod->BSIM4V4wuaGiven = TRUE; + case BSIM4v4_MOD_WUA: + mod->BSIM4v4wua = value->rValue; + mod->BSIM4v4wuaGiven = TRUE; break; - case BSIM4V4_MOD_WUA1: - mod->BSIM4V4wua1 = value->rValue; - mod->BSIM4V4wua1Given = TRUE; + case BSIM4v4_MOD_WUA1: + mod->BSIM4v4wua1 = value->rValue; + mod->BSIM4v4wua1Given = TRUE; break; - case BSIM4V4_MOD_WUB: - mod->BSIM4V4wub = value->rValue; - mod->BSIM4V4wubGiven = TRUE; + case BSIM4v4_MOD_WUB: + mod->BSIM4v4wub = value->rValue; + mod->BSIM4v4wubGiven = TRUE; break; - case BSIM4V4_MOD_WUB1: - mod->BSIM4V4wub1 = value->rValue; - mod->BSIM4V4wub1Given = TRUE; + case BSIM4v4_MOD_WUB1: + mod->BSIM4v4wub1 = value->rValue; + mod->BSIM4v4wub1Given = TRUE; break; - case BSIM4V4_MOD_WUC: - mod->BSIM4V4wuc = value->rValue; - mod->BSIM4V4wucGiven = TRUE; + case BSIM4v4_MOD_WUC: + mod->BSIM4v4wuc = value->rValue; + mod->BSIM4v4wucGiven = TRUE; break; - case BSIM4V4_MOD_WUC1: - mod->BSIM4V4wuc1 = value->rValue; - mod->BSIM4V4wuc1Given = TRUE; + case BSIM4v4_MOD_WUC1: + mod->BSIM4v4wuc1 = value->rValue; + mod->BSIM4v4wuc1Given = TRUE; break; - case BSIM4V4_MOD_WU0 : - mod->BSIM4V4wu0 = value->rValue; - mod->BSIM4V4wu0Given = TRUE; + case BSIM4v4_MOD_WU0 : + mod->BSIM4v4wu0 = value->rValue; + mod->BSIM4v4wu0Given = TRUE; break; - case BSIM4V4_MOD_WUTE : - mod->BSIM4V4wute = value->rValue; - mod->BSIM4V4wuteGiven = TRUE; + case BSIM4v4_MOD_WUTE : + mod->BSIM4v4wute = value->rValue; + mod->BSIM4v4wuteGiven = TRUE; break; - case BSIM4V4_MOD_WVOFF: - mod->BSIM4V4wvoff = value->rValue; - mod->BSIM4V4wvoffGiven = TRUE; + case BSIM4v4_MOD_WVOFF: + mod->BSIM4v4wvoff = value->rValue; + mod->BSIM4v4wvoffGiven = TRUE; break; - case BSIM4V4_MOD_WMINV: - mod->BSIM4V4wminv = value->rValue; - mod->BSIM4V4wminvGiven = TRUE; + case BSIM4v4_MOD_WMINV: + mod->BSIM4v4wminv = value->rValue; + mod->BSIM4v4wminvGiven = TRUE; break; - case BSIM4V4_MOD_WFPROUT: - mod->BSIM4V4wfprout = value->rValue; - mod->BSIM4V4wfproutGiven = TRUE; + case BSIM4v4_MOD_WFPROUT: + mod->BSIM4v4wfprout = value->rValue; + mod->BSIM4v4wfproutGiven = TRUE; break; - case BSIM4V4_MOD_WPDITS: - mod->BSIM4V4wpdits = value->rValue; - mod->BSIM4V4wpditsGiven = TRUE; + case BSIM4v4_MOD_WPDITS: + mod->BSIM4v4wpdits = value->rValue; + mod->BSIM4v4wpditsGiven = TRUE; break; - case BSIM4V4_MOD_WPDITSD: - mod->BSIM4V4wpditsd = value->rValue; - mod->BSIM4V4wpditsdGiven = TRUE; + case BSIM4v4_MOD_WPDITSD: + mod->BSIM4v4wpditsd = value->rValue; + mod->BSIM4v4wpditsdGiven = TRUE; break; - case BSIM4V4_MOD_WDELTA : - mod->BSIM4V4wdelta = value->rValue; - mod->BSIM4V4wdeltaGiven = TRUE; + case BSIM4v4_MOD_WDELTA : + mod->BSIM4v4wdelta = value->rValue; + mod->BSIM4v4wdeltaGiven = TRUE; break; - case BSIM4V4_MOD_WRDSW: - mod->BSIM4V4wrdsw = value->rValue; - mod->BSIM4V4wrdswGiven = TRUE; + case BSIM4v4_MOD_WRDSW: + mod->BSIM4v4wrdsw = value->rValue; + mod->BSIM4v4wrdswGiven = TRUE; break; - case BSIM4V4_MOD_WRDW: - mod->BSIM4V4wrdw = value->rValue; - mod->BSIM4V4wrdwGiven = TRUE; + case BSIM4v4_MOD_WRDW: + mod->BSIM4v4wrdw = value->rValue; + mod->BSIM4v4wrdwGiven = TRUE; break; - case BSIM4V4_MOD_WRSW: - mod->BSIM4V4wrsw = value->rValue; - mod->BSIM4V4wrswGiven = TRUE; + case BSIM4v4_MOD_WRSW: + mod->BSIM4v4wrsw = value->rValue; + mod->BSIM4v4wrswGiven = TRUE; break; - case BSIM4V4_MOD_WPRWB: - mod->BSIM4V4wprwb = value->rValue; - mod->BSIM4V4wprwbGiven = TRUE; + case BSIM4v4_MOD_WPRWB: + mod->BSIM4v4wprwb = value->rValue; + mod->BSIM4v4wprwbGiven = TRUE; break; - case BSIM4V4_MOD_WPRWG: - mod->BSIM4V4wprwg = value->rValue; - mod->BSIM4V4wprwgGiven = TRUE; + case BSIM4v4_MOD_WPRWG: + mod->BSIM4v4wprwg = value->rValue; + mod->BSIM4v4wprwgGiven = TRUE; break; - case BSIM4V4_MOD_WPRT: - mod->BSIM4V4wprt = value->rValue; - mod->BSIM4V4wprtGiven = TRUE; + case BSIM4v4_MOD_WPRT: + mod->BSIM4v4wprt = value->rValue; + mod->BSIM4v4wprtGiven = TRUE; break; - case BSIM4V4_MOD_WETA0: - mod->BSIM4V4weta0 = value->rValue; - mod->BSIM4V4weta0Given = TRUE; + case BSIM4v4_MOD_WETA0: + mod->BSIM4v4weta0 = value->rValue; + mod->BSIM4v4weta0Given = TRUE; break; - case BSIM4V4_MOD_WETAB: - mod->BSIM4V4wetab = value->rValue; - mod->BSIM4V4wetabGiven = TRUE; + case BSIM4v4_MOD_WETAB: + mod->BSIM4v4wetab = value->rValue; + mod->BSIM4v4wetabGiven = TRUE; break; - case BSIM4V4_MOD_WPCLM: - mod->BSIM4V4wpclm = value->rValue; - mod->BSIM4V4wpclmGiven = TRUE; + case BSIM4v4_MOD_WPCLM: + mod->BSIM4v4wpclm = value->rValue; + mod->BSIM4v4wpclmGiven = TRUE; break; - case BSIM4V4_MOD_WPDIBL1: - mod->BSIM4V4wpdibl1 = value->rValue; - mod->BSIM4V4wpdibl1Given = TRUE; + case BSIM4v4_MOD_WPDIBL1: + mod->BSIM4v4wpdibl1 = value->rValue; + mod->BSIM4v4wpdibl1Given = TRUE; break; - case BSIM4V4_MOD_WPDIBL2: - mod->BSIM4V4wpdibl2 = value->rValue; - mod->BSIM4V4wpdibl2Given = TRUE; + case BSIM4v4_MOD_WPDIBL2: + mod->BSIM4v4wpdibl2 = value->rValue; + mod->BSIM4v4wpdibl2Given = TRUE; break; - case BSIM4V4_MOD_WPDIBLB: - mod->BSIM4V4wpdiblb = value->rValue; - mod->BSIM4V4wpdiblbGiven = TRUE; + case BSIM4v4_MOD_WPDIBLB: + mod->BSIM4v4wpdiblb = value->rValue; + mod->BSIM4v4wpdiblbGiven = TRUE; break; - case BSIM4V4_MOD_WPSCBE1: - mod->BSIM4V4wpscbe1 = value->rValue; - mod->BSIM4V4wpscbe1Given = TRUE; + case BSIM4v4_MOD_WPSCBE1: + mod->BSIM4v4wpscbe1 = value->rValue; + mod->BSIM4v4wpscbe1Given = TRUE; break; - case BSIM4V4_MOD_WPSCBE2: - mod->BSIM4V4wpscbe2 = value->rValue; - mod->BSIM4V4wpscbe2Given = TRUE; + case BSIM4v4_MOD_WPSCBE2: + mod->BSIM4v4wpscbe2 = value->rValue; + mod->BSIM4v4wpscbe2Given = TRUE; break; - case BSIM4V4_MOD_WPVAG: - mod->BSIM4V4wpvag = value->rValue; - mod->BSIM4V4wpvagGiven = TRUE; + case BSIM4v4_MOD_WPVAG: + mod->BSIM4v4wpvag = value->rValue; + mod->BSIM4v4wpvagGiven = TRUE; break; - case BSIM4V4_MOD_WWR : - mod->BSIM4V4wwr = value->rValue; - mod->BSIM4V4wwrGiven = TRUE; + case BSIM4v4_MOD_WWR : + mod->BSIM4v4wwr = value->rValue; + mod->BSIM4v4wwrGiven = TRUE; break; - case BSIM4V4_MOD_WDWG : - mod->BSIM4V4wdwg = value->rValue; - mod->BSIM4V4wdwgGiven = TRUE; + case BSIM4v4_MOD_WDWG : + mod->BSIM4v4wdwg = value->rValue; + mod->BSIM4v4wdwgGiven = TRUE; break; - case BSIM4V4_MOD_WDWB : - mod->BSIM4V4wdwb = value->rValue; - mod->BSIM4V4wdwbGiven = TRUE; + case BSIM4v4_MOD_WDWB : + mod->BSIM4v4wdwb = value->rValue; + mod->BSIM4v4wdwbGiven = TRUE; break; - case BSIM4V4_MOD_WB0 : - mod->BSIM4V4wb0 = value->rValue; - mod->BSIM4V4wb0Given = TRUE; + case BSIM4v4_MOD_WB0 : + mod->BSIM4v4wb0 = value->rValue; + mod->BSIM4v4wb0Given = TRUE; break; - case BSIM4V4_MOD_WB1 : - mod->BSIM4V4wb1 = value->rValue; - mod->BSIM4V4wb1Given = TRUE; + case BSIM4v4_MOD_WB1 : + mod->BSIM4v4wb1 = value->rValue; + mod->BSIM4v4wb1Given = TRUE; break; - case BSIM4V4_MOD_WALPHA0 : - mod->BSIM4V4walpha0 = value->rValue; - mod->BSIM4V4walpha0Given = TRUE; + case BSIM4v4_MOD_WALPHA0 : + mod->BSIM4v4walpha0 = value->rValue; + mod->BSIM4v4walpha0Given = TRUE; break; - case BSIM4V4_MOD_WALPHA1 : - mod->BSIM4V4walpha1 = value->rValue; - mod->BSIM4V4walpha1Given = TRUE; + case BSIM4v4_MOD_WALPHA1 : + mod->BSIM4v4walpha1 = value->rValue; + mod->BSIM4v4walpha1Given = TRUE; break; - case BSIM4V4_MOD_WBETA0 : - mod->BSIM4V4wbeta0 = value->rValue; - mod->BSIM4V4wbeta0Given = TRUE; + case BSIM4v4_MOD_WBETA0 : + mod->BSIM4v4wbeta0 = value->rValue; + mod->BSIM4v4wbeta0Given = TRUE; break; - case BSIM4V4_MOD_WAGIDL : - mod->BSIM4V4wagidl = value->rValue; - mod->BSIM4V4wagidlGiven = TRUE; + case BSIM4v4_MOD_WAGIDL : + mod->BSIM4v4wagidl = value->rValue; + mod->BSIM4v4wagidlGiven = TRUE; break; - case BSIM4V4_MOD_WBGIDL : - mod->BSIM4V4wbgidl = value->rValue; - mod->BSIM4V4wbgidlGiven = TRUE; + case BSIM4v4_MOD_WBGIDL : + mod->BSIM4v4wbgidl = value->rValue; + mod->BSIM4v4wbgidlGiven = TRUE; break; - case BSIM4V4_MOD_WCGIDL : - mod->BSIM4V4wcgidl = value->rValue; - mod->BSIM4V4wcgidlGiven = TRUE; + case BSIM4v4_MOD_WCGIDL : + mod->BSIM4v4wcgidl = value->rValue; + mod->BSIM4v4wcgidlGiven = TRUE; break; - case BSIM4V4_MOD_WPHIN : - mod->BSIM4V4wphin = value->rValue; - mod->BSIM4V4wphinGiven = TRUE; + case BSIM4v4_MOD_WPHIN : + mod->BSIM4v4wphin = value->rValue; + mod->BSIM4v4wphinGiven = TRUE; break; - case BSIM4V4_MOD_WEGIDL : - mod->BSIM4V4wegidl = value->rValue; - mod->BSIM4V4wegidlGiven = TRUE; + case BSIM4v4_MOD_WEGIDL : + mod->BSIM4v4wegidl = value->rValue; + mod->BSIM4v4wegidlGiven = TRUE; break; - case BSIM4V4_MOD_WAIGC : - mod->BSIM4V4waigc = value->rValue; - mod->BSIM4V4waigcGiven = TRUE; + case BSIM4v4_MOD_WAIGC : + mod->BSIM4v4waigc = value->rValue; + mod->BSIM4v4waigcGiven = TRUE; break; - case BSIM4V4_MOD_WBIGC : - mod->BSIM4V4wbigc = value->rValue; - mod->BSIM4V4wbigcGiven = TRUE; + case BSIM4v4_MOD_WBIGC : + mod->BSIM4v4wbigc = value->rValue; + mod->BSIM4v4wbigcGiven = TRUE; break; - case BSIM4V4_MOD_WCIGC : - mod->BSIM4V4wcigc = value->rValue; - mod->BSIM4V4wcigcGiven = TRUE; + case BSIM4v4_MOD_WCIGC : + mod->BSIM4v4wcigc = value->rValue; + mod->BSIM4v4wcigcGiven = TRUE; break; - case BSIM4V4_MOD_WAIGSD : - mod->BSIM4V4waigsd = value->rValue; - mod->BSIM4V4waigsdGiven = TRUE; + case BSIM4v4_MOD_WAIGSD : + mod->BSIM4v4waigsd = value->rValue; + mod->BSIM4v4waigsdGiven = TRUE; break; - case BSIM4V4_MOD_WBIGSD : - mod->BSIM4V4wbigsd = value->rValue; - mod->BSIM4V4wbigsdGiven = TRUE; + case BSIM4v4_MOD_WBIGSD : + mod->BSIM4v4wbigsd = value->rValue; + mod->BSIM4v4wbigsdGiven = TRUE; break; - case BSIM4V4_MOD_WCIGSD : - mod->BSIM4V4wcigsd = value->rValue; - mod->BSIM4V4wcigsdGiven = TRUE; + case BSIM4v4_MOD_WCIGSD : + mod->BSIM4v4wcigsd = value->rValue; + mod->BSIM4v4wcigsdGiven = TRUE; break; - case BSIM4V4_MOD_WAIGBACC : - mod->BSIM4V4waigbacc = value->rValue; - mod->BSIM4V4waigbaccGiven = TRUE; + case BSIM4v4_MOD_WAIGBACC : + mod->BSIM4v4waigbacc = value->rValue; + mod->BSIM4v4waigbaccGiven = TRUE; break; - case BSIM4V4_MOD_WBIGBACC : - mod->BSIM4V4wbigbacc = value->rValue; - mod->BSIM4V4wbigbaccGiven = TRUE; + case BSIM4v4_MOD_WBIGBACC : + mod->BSIM4v4wbigbacc = value->rValue; + mod->BSIM4v4wbigbaccGiven = TRUE; break; - case BSIM4V4_MOD_WCIGBACC : - mod->BSIM4V4wcigbacc = value->rValue; - mod->BSIM4V4wcigbaccGiven = TRUE; + case BSIM4v4_MOD_WCIGBACC : + mod->BSIM4v4wcigbacc = value->rValue; + mod->BSIM4v4wcigbaccGiven = TRUE; break; - case BSIM4V4_MOD_WAIGBINV : - mod->BSIM4V4waigbinv = value->rValue; - mod->BSIM4V4waigbinvGiven = TRUE; + case BSIM4v4_MOD_WAIGBINV : + mod->BSIM4v4waigbinv = value->rValue; + mod->BSIM4v4waigbinvGiven = TRUE; break; - case BSIM4V4_MOD_WBIGBINV : - mod->BSIM4V4wbigbinv = value->rValue; - mod->BSIM4V4wbigbinvGiven = TRUE; + case BSIM4v4_MOD_WBIGBINV : + mod->BSIM4v4wbigbinv = value->rValue; + mod->BSIM4v4wbigbinvGiven = TRUE; break; - case BSIM4V4_MOD_WCIGBINV : - mod->BSIM4V4wcigbinv = value->rValue; - mod->BSIM4V4wcigbinvGiven = TRUE; + case BSIM4v4_MOD_WCIGBINV : + mod->BSIM4v4wcigbinv = value->rValue; + mod->BSIM4v4wcigbinvGiven = TRUE; break; - case BSIM4V4_MOD_WNIGC : - mod->BSIM4V4wnigc = value->rValue; - mod->BSIM4V4wnigcGiven = TRUE; + case BSIM4v4_MOD_WNIGC : + mod->BSIM4v4wnigc = value->rValue; + mod->BSIM4v4wnigcGiven = TRUE; break; - case BSIM4V4_MOD_WNIGBINV : - mod->BSIM4V4wnigbinv = value->rValue; - mod->BSIM4V4wnigbinvGiven = TRUE; + case BSIM4v4_MOD_WNIGBINV : + mod->BSIM4v4wnigbinv = value->rValue; + mod->BSIM4v4wnigbinvGiven = TRUE; break; - case BSIM4V4_MOD_WNIGBACC : - mod->BSIM4V4wnigbacc = value->rValue; - mod->BSIM4V4wnigbaccGiven = TRUE; + case BSIM4v4_MOD_WNIGBACC : + mod->BSIM4v4wnigbacc = value->rValue; + mod->BSIM4v4wnigbaccGiven = TRUE; break; - case BSIM4V4_MOD_WNTOX : - mod->BSIM4V4wntox = value->rValue; - mod->BSIM4V4wntoxGiven = TRUE; + case BSIM4v4_MOD_WNTOX : + mod->BSIM4v4wntox = value->rValue; + mod->BSIM4v4wntoxGiven = TRUE; break; - case BSIM4V4_MOD_WEIGBINV : - mod->BSIM4V4weigbinv = value->rValue; - mod->BSIM4V4weigbinvGiven = TRUE; + case BSIM4v4_MOD_WEIGBINV : + mod->BSIM4v4weigbinv = value->rValue; + mod->BSIM4v4weigbinvGiven = TRUE; break; - case BSIM4V4_MOD_WPIGCD : - mod->BSIM4V4wpigcd = value->rValue; - mod->BSIM4V4wpigcdGiven = TRUE; + case BSIM4v4_MOD_WPIGCD : + mod->BSIM4v4wpigcd = value->rValue; + mod->BSIM4v4wpigcdGiven = TRUE; break; - case BSIM4V4_MOD_WPOXEDGE : - mod->BSIM4V4wpoxedge = value->rValue; - mod->BSIM4V4wpoxedgeGiven = TRUE; + case BSIM4v4_MOD_WPOXEDGE : + mod->BSIM4v4wpoxedge = value->rValue; + mod->BSIM4v4wpoxedgeGiven = TRUE; break; - case BSIM4V4_MOD_WXRCRG1 : - mod->BSIM4V4wxrcrg1 = value->rValue; - mod->BSIM4V4wxrcrg1Given = TRUE; + case BSIM4v4_MOD_WXRCRG1 : + mod->BSIM4v4wxrcrg1 = value->rValue; + mod->BSIM4v4wxrcrg1Given = TRUE; break; - case BSIM4V4_MOD_WXRCRG2 : - mod->BSIM4V4wxrcrg2 = value->rValue; - mod->BSIM4V4wxrcrg2Given = TRUE; + case BSIM4v4_MOD_WXRCRG2 : + mod->BSIM4v4wxrcrg2 = value->rValue; + mod->BSIM4v4wxrcrg2Given = TRUE; break; - case BSIM4V4_MOD_WLAMBDA : - mod->BSIM4V4wlambda = value->rValue; - mod->BSIM4V4wlambdaGiven = TRUE; + case BSIM4v4_MOD_WLAMBDA : + mod->BSIM4v4wlambda = value->rValue; + mod->BSIM4v4wlambdaGiven = TRUE; break; - case BSIM4V4_MOD_WVTL : - mod->BSIM4V4wvtl = value->rValue; - mod->BSIM4V4wvtlGiven = TRUE; + case BSIM4v4_MOD_WVTL : + mod->BSIM4v4wvtl = value->rValue; + mod->BSIM4v4wvtlGiven = TRUE; break; - case BSIM4V4_MOD_WXN: - mod->BSIM4V4wxn = value->rValue; - mod->BSIM4V4wxnGiven = TRUE; + case BSIM4v4_MOD_WXN: + mod->BSIM4v4wxn = value->rValue; + mod->BSIM4v4wxnGiven = TRUE; break; - case BSIM4V4_MOD_WVFBSDOFF: - mod->BSIM4V4wvfbsdoff = value->rValue; - mod->BSIM4V4wvfbsdoffGiven = TRUE; + case BSIM4v4_MOD_WVFBSDOFF: + mod->BSIM4v4wvfbsdoff = value->rValue; + mod->BSIM4v4wvfbsdoffGiven = TRUE; break; - case BSIM4V4_MOD_WEU : - mod->BSIM4V4weu = value->rValue; - mod->BSIM4V4weuGiven = TRUE; + case BSIM4v4_MOD_WEU : + mod->BSIM4v4weu = value->rValue; + mod->BSIM4v4weuGiven = TRUE; break; - case BSIM4V4_MOD_WVFB : - mod->BSIM4V4wvfb = value->rValue; - mod->BSIM4V4wvfbGiven = TRUE; + case BSIM4v4_MOD_WVFB : + mod->BSIM4v4wvfb = value->rValue; + mod->BSIM4v4wvfbGiven = TRUE; break; - case BSIM4V4_MOD_WCGSL : - mod->BSIM4V4wcgsl = value->rValue; - mod->BSIM4V4wcgslGiven = TRUE; + case BSIM4v4_MOD_WCGSL : + mod->BSIM4v4wcgsl = value->rValue; + mod->BSIM4v4wcgslGiven = TRUE; break; - case BSIM4V4_MOD_WCGDL : - mod->BSIM4V4wcgdl = value->rValue; - mod->BSIM4V4wcgdlGiven = TRUE; + case BSIM4v4_MOD_WCGDL : + mod->BSIM4v4wcgdl = value->rValue; + mod->BSIM4v4wcgdlGiven = TRUE; break; - case BSIM4V4_MOD_WCKAPPAS : - mod->BSIM4V4wckappas = value->rValue; - mod->BSIM4V4wckappasGiven = TRUE; + case BSIM4v4_MOD_WCKAPPAS : + mod->BSIM4v4wckappas = value->rValue; + mod->BSIM4v4wckappasGiven = TRUE; break; - case BSIM4V4_MOD_WCKAPPAD : - mod->BSIM4V4wckappad = value->rValue; - mod->BSIM4V4wckappadGiven = TRUE; + case BSIM4v4_MOD_WCKAPPAD : + mod->BSIM4v4wckappad = value->rValue; + mod->BSIM4v4wckappadGiven = TRUE; break; - case BSIM4V4_MOD_WCF : - mod->BSIM4V4wcf = value->rValue; - mod->BSIM4V4wcfGiven = TRUE; + case BSIM4v4_MOD_WCF : + mod->BSIM4v4wcf = value->rValue; + mod->BSIM4v4wcfGiven = TRUE; break; - case BSIM4V4_MOD_WCLC : - mod->BSIM4V4wclc = value->rValue; - mod->BSIM4V4wclcGiven = TRUE; + case BSIM4v4_MOD_WCLC : + mod->BSIM4v4wclc = value->rValue; + mod->BSIM4v4wclcGiven = TRUE; break; - case BSIM4V4_MOD_WCLE : - mod->BSIM4V4wcle = value->rValue; - mod->BSIM4V4wcleGiven = TRUE; + case BSIM4v4_MOD_WCLE : + mod->BSIM4v4wcle = value->rValue; + mod->BSIM4v4wcleGiven = TRUE; break; - case BSIM4V4_MOD_WVFBCV : - mod->BSIM4V4wvfbcv = value->rValue; - mod->BSIM4V4wvfbcvGiven = TRUE; + case BSIM4v4_MOD_WVFBCV : + mod->BSIM4v4wvfbcv = value->rValue; + mod->BSIM4v4wvfbcvGiven = TRUE; break; - case BSIM4V4_MOD_WACDE : - mod->BSIM4V4wacde = value->rValue; - mod->BSIM4V4wacdeGiven = TRUE; + case BSIM4v4_MOD_WACDE : + mod->BSIM4v4wacde = value->rValue; + mod->BSIM4v4wacdeGiven = TRUE; break; - case BSIM4V4_MOD_WMOIN : - mod->BSIM4V4wmoin = value->rValue; - mod->BSIM4V4wmoinGiven = TRUE; + case BSIM4v4_MOD_WMOIN : + mod->BSIM4v4wmoin = value->rValue; + mod->BSIM4v4wmoinGiven = TRUE; break; - case BSIM4V4_MOD_WNOFF : - mod->BSIM4V4wnoff = value->rValue; - mod->BSIM4V4wnoffGiven = TRUE; + case BSIM4v4_MOD_WNOFF : + mod->BSIM4v4wnoff = value->rValue; + mod->BSIM4v4wnoffGiven = TRUE; break; - case BSIM4V4_MOD_WVOFFCV : - mod->BSIM4V4wvoffcv = value->rValue; - mod->BSIM4V4wvoffcvGiven = TRUE; + case BSIM4v4_MOD_WVOFFCV : + mod->BSIM4v4wvoffcv = value->rValue; + mod->BSIM4v4wvoffcvGiven = TRUE; break; /* Cross-term dependence */ - case BSIM4V4_MOD_PCDSC : - mod->BSIM4V4pcdsc = value->rValue; - mod->BSIM4V4pcdscGiven = TRUE; + case BSIM4v4_MOD_PCDSC : + mod->BSIM4v4pcdsc = value->rValue; + mod->BSIM4v4pcdscGiven = TRUE; break; - case BSIM4V4_MOD_PCDSCB : - mod->BSIM4V4pcdscb = value->rValue; - mod->BSIM4V4pcdscbGiven = TRUE; + case BSIM4v4_MOD_PCDSCB : + mod->BSIM4v4pcdscb = value->rValue; + mod->BSIM4v4pcdscbGiven = TRUE; break; - case BSIM4V4_MOD_PCDSCD : - mod->BSIM4V4pcdscd = value->rValue; - mod->BSIM4V4pcdscdGiven = TRUE; + case BSIM4v4_MOD_PCDSCD : + mod->BSIM4v4pcdscd = value->rValue; + mod->BSIM4v4pcdscdGiven = TRUE; break; - case BSIM4V4_MOD_PCIT : - mod->BSIM4V4pcit = value->rValue; - mod->BSIM4V4pcitGiven = TRUE; + case BSIM4v4_MOD_PCIT : + mod->BSIM4v4pcit = value->rValue; + mod->BSIM4v4pcitGiven = TRUE; break; - case BSIM4V4_MOD_PNFACTOR : - mod->BSIM4V4pnfactor = value->rValue; - mod->BSIM4V4pnfactorGiven = TRUE; + case BSIM4v4_MOD_PNFACTOR : + mod->BSIM4v4pnfactor = value->rValue; + mod->BSIM4v4pnfactorGiven = TRUE; break; - case BSIM4V4_MOD_PXJ: - mod->BSIM4V4pxj = value->rValue; - mod->BSIM4V4pxjGiven = TRUE; + case BSIM4v4_MOD_PXJ: + mod->BSIM4v4pxj = value->rValue; + mod->BSIM4v4pxjGiven = TRUE; break; - case BSIM4V4_MOD_PVSAT: - mod->BSIM4V4pvsat = value->rValue; - mod->BSIM4V4pvsatGiven = TRUE; + case BSIM4v4_MOD_PVSAT: + mod->BSIM4v4pvsat = value->rValue; + mod->BSIM4v4pvsatGiven = TRUE; break; - case BSIM4V4_MOD_PA0: - mod->BSIM4V4pa0 = value->rValue; - mod->BSIM4V4pa0Given = TRUE; + case BSIM4v4_MOD_PA0: + mod->BSIM4v4pa0 = value->rValue; + mod->BSIM4v4pa0Given = TRUE; break; - case BSIM4V4_MOD_PAGS: - mod->BSIM4V4pags = value->rValue; - mod->BSIM4V4pagsGiven = TRUE; + case BSIM4v4_MOD_PAGS: + mod->BSIM4v4pags = value->rValue; + mod->BSIM4v4pagsGiven = TRUE; break; - case BSIM4V4_MOD_PA1: - mod->BSIM4V4pa1 = value->rValue; - mod->BSIM4V4pa1Given = TRUE; + case BSIM4v4_MOD_PA1: + mod->BSIM4v4pa1 = value->rValue; + mod->BSIM4v4pa1Given = TRUE; break; - case BSIM4V4_MOD_PA2: - mod->BSIM4V4pa2 = value->rValue; - mod->BSIM4V4pa2Given = TRUE; + case BSIM4v4_MOD_PA2: + mod->BSIM4v4pa2 = value->rValue; + mod->BSIM4v4pa2Given = TRUE; break; - case BSIM4V4_MOD_PAT: - mod->BSIM4V4pat = value->rValue; - mod->BSIM4V4patGiven = TRUE; + case BSIM4v4_MOD_PAT: + mod->BSIM4v4pat = value->rValue; + mod->BSIM4v4patGiven = TRUE; break; - case BSIM4V4_MOD_PKETA: - mod->BSIM4V4pketa = value->rValue; - mod->BSIM4V4pketaGiven = TRUE; + case BSIM4v4_MOD_PKETA: + mod->BSIM4v4pketa = value->rValue; + mod->BSIM4v4pketaGiven = TRUE; break; - case BSIM4V4_MOD_PNSUB: - mod->BSIM4V4pnsub = value->rValue; - mod->BSIM4V4pnsubGiven = TRUE; - break; - case BSIM4V4_MOD_PNDEP: - mod->BSIM4V4pndep = value->rValue; - mod->BSIM4V4pndepGiven = TRUE; - if (mod->BSIM4V4pndep > 1.0e20) - mod->BSIM4V4pndep *= 1.0e-6; - break; - case BSIM4V4_MOD_PNSD: - mod->BSIM4V4pnsd = value->rValue; - mod->BSIM4V4pnsdGiven = TRUE; - if (mod->BSIM4V4pnsd > 1.0e23) - mod->BSIM4V4pnsd *= 1.0e-6; - break; - case BSIM4V4_MOD_PNGATE: - mod->BSIM4V4pngate = value->rValue; - mod->BSIM4V4pngateGiven = TRUE; - if (mod->BSIM4V4pngate > 1.0e23) - mod->BSIM4V4pngate *= 1.0e-6; - break; - case BSIM4V4_MOD_PGAMMA1: - mod->BSIM4V4pgamma1 = value->rValue; - mod->BSIM4V4pgamma1Given = TRUE; - break; - case BSIM4V4_MOD_PGAMMA2: - mod->BSIM4V4pgamma2 = value->rValue; - mod->BSIM4V4pgamma2Given = TRUE; - break; - case BSIM4V4_MOD_PVBX: - mod->BSIM4V4pvbx = value->rValue; - mod->BSIM4V4pvbxGiven = TRUE; - break; - case BSIM4V4_MOD_PVBM: - mod->BSIM4V4pvbm = value->rValue; - mod->BSIM4V4pvbmGiven = TRUE; - break; - case BSIM4V4_MOD_PXT: - mod->BSIM4V4pxt = value->rValue; - mod->BSIM4V4pxtGiven = TRUE; - break; - case BSIM4V4_MOD_PK1: - mod->BSIM4V4pk1 = value->rValue; - mod->BSIM4V4pk1Given = TRUE; - break; - case BSIM4V4_MOD_PKT1: - mod->BSIM4V4pkt1 = value->rValue; - mod->BSIM4V4pkt1Given = TRUE; - break; - case BSIM4V4_MOD_PKT1L: - mod->BSIM4V4pkt1l = value->rValue; - mod->BSIM4V4pkt1lGiven = TRUE; - break; - case BSIM4V4_MOD_PKT2: - mod->BSIM4V4pkt2 = value->rValue; - mod->BSIM4V4pkt2Given = TRUE; - break; - case BSIM4V4_MOD_PK2: - mod->BSIM4V4pk2 = value->rValue; - mod->BSIM4V4pk2Given = TRUE; - break; - case BSIM4V4_MOD_PK3: - mod->BSIM4V4pk3 = value->rValue; - mod->BSIM4V4pk3Given = TRUE; - break; - case BSIM4V4_MOD_PK3B: - mod->BSIM4V4pk3b = value->rValue; - mod->BSIM4V4pk3bGiven = TRUE; - break; - case BSIM4V4_MOD_PLPE0: - mod->BSIM4V4plpe0 = value->rValue; - mod->BSIM4V4plpe0Given = TRUE; - break; - case BSIM4V4_MOD_PLPEB: - mod->BSIM4V4plpeb = value->rValue; - mod->BSIM4V4plpebGiven = TRUE; - break; - case BSIM4V4_MOD_PDVTP0: - mod->BSIM4V4pdvtp0 = value->rValue; - mod->BSIM4V4pdvtp0Given = TRUE; - break; - case BSIM4V4_MOD_PDVTP1: - mod->BSIM4V4pdvtp1 = value->rValue; - mod->BSIM4V4pdvtp1Given = TRUE; - break; - case BSIM4V4_MOD_PW0: - mod->BSIM4V4pw0 = value->rValue; - mod->BSIM4V4pw0Given = TRUE; - break; - case BSIM4V4_MOD_PDVT0: - mod->BSIM4V4pdvt0 = value->rValue; - mod->BSIM4V4pdvt0Given = TRUE; - break; - case BSIM4V4_MOD_PDVT1: - mod->BSIM4V4pdvt1 = value->rValue; - mod->BSIM4V4pdvt1Given = TRUE; - break; - case BSIM4V4_MOD_PDVT2: - mod->BSIM4V4pdvt2 = value->rValue; - mod->BSIM4V4pdvt2Given = TRUE; - break; - case BSIM4V4_MOD_PDVT0W: - mod->BSIM4V4pdvt0w = value->rValue; - mod->BSIM4V4pdvt0wGiven = TRUE; - break; - case BSIM4V4_MOD_PDVT1W: - mod->BSIM4V4pdvt1w = value->rValue; - mod->BSIM4V4pdvt1wGiven = TRUE; - break; - case BSIM4V4_MOD_PDVT2W: - mod->BSIM4V4pdvt2w = value->rValue; - mod->BSIM4V4pdvt2wGiven = TRUE; - break; - case BSIM4V4_MOD_PDROUT: - mod->BSIM4V4pdrout = value->rValue; - mod->BSIM4V4pdroutGiven = TRUE; - break; - case BSIM4V4_MOD_PDSUB: - mod->BSIM4V4pdsub = value->rValue; - mod->BSIM4V4pdsubGiven = TRUE; + case BSIM4v4_MOD_PNSUB: + mod->BSIM4v4pnsub = value->rValue; + mod->BSIM4v4pnsubGiven = TRUE; + break; + case BSIM4v4_MOD_PNDEP: + mod->BSIM4v4pndep = value->rValue; + mod->BSIM4v4pndepGiven = TRUE; + if (mod->BSIM4v4pndep > 1.0e20) + mod->BSIM4v4pndep *= 1.0e-6; + break; + case BSIM4v4_MOD_PNSD: + mod->BSIM4v4pnsd = value->rValue; + mod->BSIM4v4pnsdGiven = TRUE; + if (mod->BSIM4v4pnsd > 1.0e23) + mod->BSIM4v4pnsd *= 1.0e-6; + break; + case BSIM4v4_MOD_PNGATE: + mod->BSIM4v4pngate = value->rValue; + mod->BSIM4v4pngateGiven = TRUE; + if (mod->BSIM4v4pngate > 1.0e23) + mod->BSIM4v4pngate *= 1.0e-6; + break; + case BSIM4v4_MOD_PGAMMA1: + mod->BSIM4v4pgamma1 = value->rValue; + mod->BSIM4v4pgamma1Given = TRUE; + break; + case BSIM4v4_MOD_PGAMMA2: + mod->BSIM4v4pgamma2 = value->rValue; + mod->BSIM4v4pgamma2Given = TRUE; + break; + case BSIM4v4_MOD_PVBX: + mod->BSIM4v4pvbx = value->rValue; + mod->BSIM4v4pvbxGiven = TRUE; + break; + case BSIM4v4_MOD_PVBM: + mod->BSIM4v4pvbm = value->rValue; + mod->BSIM4v4pvbmGiven = TRUE; + break; + case BSIM4v4_MOD_PXT: + mod->BSIM4v4pxt = value->rValue; + mod->BSIM4v4pxtGiven = TRUE; + break; + case BSIM4v4_MOD_PK1: + mod->BSIM4v4pk1 = value->rValue; + mod->BSIM4v4pk1Given = TRUE; + break; + case BSIM4v4_MOD_PKT1: + mod->BSIM4v4pkt1 = value->rValue; + mod->BSIM4v4pkt1Given = TRUE; + break; + case BSIM4v4_MOD_PKT1L: + mod->BSIM4v4pkt1l = value->rValue; + mod->BSIM4v4pkt1lGiven = TRUE; + break; + case BSIM4v4_MOD_PKT2: + mod->BSIM4v4pkt2 = value->rValue; + mod->BSIM4v4pkt2Given = TRUE; + break; + case BSIM4v4_MOD_PK2: + mod->BSIM4v4pk2 = value->rValue; + mod->BSIM4v4pk2Given = TRUE; + break; + case BSIM4v4_MOD_PK3: + mod->BSIM4v4pk3 = value->rValue; + mod->BSIM4v4pk3Given = TRUE; + break; + case BSIM4v4_MOD_PK3B: + mod->BSIM4v4pk3b = value->rValue; + mod->BSIM4v4pk3bGiven = TRUE; + break; + case BSIM4v4_MOD_PLPE0: + mod->BSIM4v4plpe0 = value->rValue; + mod->BSIM4v4plpe0Given = TRUE; + break; + case BSIM4v4_MOD_PLPEB: + mod->BSIM4v4plpeb = value->rValue; + mod->BSIM4v4plpebGiven = TRUE; + break; + case BSIM4v4_MOD_PDVTP0: + mod->BSIM4v4pdvtp0 = value->rValue; + mod->BSIM4v4pdvtp0Given = TRUE; + break; + case BSIM4v4_MOD_PDVTP1: + mod->BSIM4v4pdvtp1 = value->rValue; + mod->BSIM4v4pdvtp1Given = TRUE; + break; + case BSIM4v4_MOD_PW0: + mod->BSIM4v4pw0 = value->rValue; + mod->BSIM4v4pw0Given = TRUE; + break; + case BSIM4v4_MOD_PDVT0: + mod->BSIM4v4pdvt0 = value->rValue; + mod->BSIM4v4pdvt0Given = TRUE; + break; + case BSIM4v4_MOD_PDVT1: + mod->BSIM4v4pdvt1 = value->rValue; + mod->BSIM4v4pdvt1Given = TRUE; + break; + case BSIM4v4_MOD_PDVT2: + mod->BSIM4v4pdvt2 = value->rValue; + mod->BSIM4v4pdvt2Given = TRUE; + break; + case BSIM4v4_MOD_PDVT0W: + mod->BSIM4v4pdvt0w = value->rValue; + mod->BSIM4v4pdvt0wGiven = TRUE; + break; + case BSIM4v4_MOD_PDVT1W: + mod->BSIM4v4pdvt1w = value->rValue; + mod->BSIM4v4pdvt1wGiven = TRUE; + break; + case BSIM4v4_MOD_PDVT2W: + mod->BSIM4v4pdvt2w = value->rValue; + mod->BSIM4v4pdvt2wGiven = TRUE; + break; + case BSIM4v4_MOD_PDROUT: + mod->BSIM4v4pdrout = value->rValue; + mod->BSIM4v4pdroutGiven = TRUE; + break; + case BSIM4v4_MOD_PDSUB: + mod->BSIM4v4pdsub = value->rValue; + mod->BSIM4v4pdsubGiven = TRUE; break; - case BSIM4V4_MOD_PVTH0: - mod->BSIM4V4pvth0 = value->rValue; - mod->BSIM4V4pvth0Given = TRUE; + case BSIM4v4_MOD_PVTH0: + mod->BSIM4v4pvth0 = value->rValue; + mod->BSIM4v4pvth0Given = TRUE; break; - case BSIM4V4_MOD_PUA: - mod->BSIM4V4pua = value->rValue; - mod->BSIM4V4puaGiven = TRUE; + case BSIM4v4_MOD_PUA: + mod->BSIM4v4pua = value->rValue; + mod->BSIM4v4puaGiven = TRUE; break; - case BSIM4V4_MOD_PUA1: - mod->BSIM4V4pua1 = value->rValue; - mod->BSIM4V4pua1Given = TRUE; + case BSIM4v4_MOD_PUA1: + mod->BSIM4v4pua1 = value->rValue; + mod->BSIM4v4pua1Given = TRUE; break; - case BSIM4V4_MOD_PUB: - mod->BSIM4V4pub = value->rValue; - mod->BSIM4V4pubGiven = TRUE; + case BSIM4v4_MOD_PUB: + mod->BSIM4v4pub = value->rValue; + mod->BSIM4v4pubGiven = TRUE; break; - case BSIM4V4_MOD_PUB1: - mod->BSIM4V4pub1 = value->rValue; - mod->BSIM4V4pub1Given = TRUE; + case BSIM4v4_MOD_PUB1: + mod->BSIM4v4pub1 = value->rValue; + mod->BSIM4v4pub1Given = TRUE; break; - case BSIM4V4_MOD_PUC: - mod->BSIM4V4puc = value->rValue; - mod->BSIM4V4pucGiven = TRUE; + case BSIM4v4_MOD_PUC: + mod->BSIM4v4puc = value->rValue; + mod->BSIM4v4pucGiven = TRUE; break; - case BSIM4V4_MOD_PUC1: - mod->BSIM4V4puc1 = value->rValue; - mod->BSIM4V4puc1Given = TRUE; + case BSIM4v4_MOD_PUC1: + mod->BSIM4v4puc1 = value->rValue; + mod->BSIM4v4puc1Given = TRUE; break; - case BSIM4V4_MOD_PU0 : - mod->BSIM4V4pu0 = value->rValue; - mod->BSIM4V4pu0Given = TRUE; + case BSIM4v4_MOD_PU0 : + mod->BSIM4v4pu0 = value->rValue; + mod->BSIM4v4pu0Given = TRUE; break; - case BSIM4V4_MOD_PUTE : - mod->BSIM4V4pute = value->rValue; - mod->BSIM4V4puteGiven = TRUE; + case BSIM4v4_MOD_PUTE : + mod->BSIM4v4pute = value->rValue; + mod->BSIM4v4puteGiven = TRUE; break; - case BSIM4V4_MOD_PVOFF: - mod->BSIM4V4pvoff = value->rValue; - mod->BSIM4V4pvoffGiven = TRUE; + case BSIM4v4_MOD_PVOFF: + mod->BSIM4v4pvoff = value->rValue; + mod->BSIM4v4pvoffGiven = TRUE; break; - case BSIM4V4_MOD_PMINV: - mod->BSIM4V4pminv = value->rValue; - mod->BSIM4V4pminvGiven = TRUE; + case BSIM4v4_MOD_PMINV: + mod->BSIM4v4pminv = value->rValue; + mod->BSIM4v4pminvGiven = TRUE; break; - case BSIM4V4_MOD_PFPROUT: - mod->BSIM4V4pfprout = value->rValue; - mod->BSIM4V4pfproutGiven = TRUE; + case BSIM4v4_MOD_PFPROUT: + mod->BSIM4v4pfprout = value->rValue; + mod->BSIM4v4pfproutGiven = TRUE; break; - case BSIM4V4_MOD_PPDITS: - mod->BSIM4V4ppdits = value->rValue; - mod->BSIM4V4ppditsGiven = TRUE; + case BSIM4v4_MOD_PPDITS: + mod->BSIM4v4ppdits = value->rValue; + mod->BSIM4v4ppditsGiven = TRUE; break; - case BSIM4V4_MOD_PPDITSD: - mod->BSIM4V4ppditsd = value->rValue; - mod->BSIM4V4ppditsdGiven = TRUE; + case BSIM4v4_MOD_PPDITSD: + mod->BSIM4v4ppditsd = value->rValue; + mod->BSIM4v4ppditsdGiven = TRUE; break; - case BSIM4V4_MOD_PDELTA : - mod->BSIM4V4pdelta = value->rValue; - mod->BSIM4V4pdeltaGiven = TRUE; + case BSIM4v4_MOD_PDELTA : + mod->BSIM4v4pdelta = value->rValue; + mod->BSIM4v4pdeltaGiven = TRUE; break; - case BSIM4V4_MOD_PRDSW: - mod->BSIM4V4prdsw = value->rValue; - mod->BSIM4V4prdswGiven = TRUE; + case BSIM4v4_MOD_PRDSW: + mod->BSIM4v4prdsw = value->rValue; + mod->BSIM4v4prdswGiven = TRUE; break; - case BSIM4V4_MOD_PRDW: - mod->BSIM4V4prdw = value->rValue; - mod->BSIM4V4prdwGiven = TRUE; + case BSIM4v4_MOD_PRDW: + mod->BSIM4v4prdw = value->rValue; + mod->BSIM4v4prdwGiven = TRUE; break; - case BSIM4V4_MOD_PRSW: - mod->BSIM4V4prsw = value->rValue; - mod->BSIM4V4prswGiven = TRUE; + case BSIM4v4_MOD_PRSW: + mod->BSIM4v4prsw = value->rValue; + mod->BSIM4v4prswGiven = TRUE; break; - case BSIM4V4_MOD_PPRWB: - mod->BSIM4V4pprwb = value->rValue; - mod->BSIM4V4pprwbGiven = TRUE; + case BSIM4v4_MOD_PPRWB: + mod->BSIM4v4pprwb = value->rValue; + mod->BSIM4v4pprwbGiven = TRUE; break; - case BSIM4V4_MOD_PPRWG: - mod->BSIM4V4pprwg = value->rValue; - mod->BSIM4V4pprwgGiven = TRUE; + case BSIM4v4_MOD_PPRWG: + mod->BSIM4v4pprwg = value->rValue; + mod->BSIM4v4pprwgGiven = TRUE; break; - case BSIM4V4_MOD_PPRT: - mod->BSIM4V4pprt = value->rValue; - mod->BSIM4V4pprtGiven = TRUE; + case BSIM4v4_MOD_PPRT: + mod->BSIM4v4pprt = value->rValue; + mod->BSIM4v4pprtGiven = TRUE; break; - case BSIM4V4_MOD_PETA0: - mod->BSIM4V4peta0 = value->rValue; - mod->BSIM4V4peta0Given = TRUE; + case BSIM4v4_MOD_PETA0: + mod->BSIM4v4peta0 = value->rValue; + mod->BSIM4v4peta0Given = TRUE; break; - case BSIM4V4_MOD_PETAB: - mod->BSIM4V4petab = value->rValue; - mod->BSIM4V4petabGiven = TRUE; + case BSIM4v4_MOD_PETAB: + mod->BSIM4v4petab = value->rValue; + mod->BSIM4v4petabGiven = TRUE; break; - case BSIM4V4_MOD_PPCLM: - mod->BSIM4V4ppclm = value->rValue; - mod->BSIM4V4ppclmGiven = TRUE; + case BSIM4v4_MOD_PPCLM: + mod->BSIM4v4ppclm = value->rValue; + mod->BSIM4v4ppclmGiven = TRUE; break; - case BSIM4V4_MOD_PPDIBL1: - mod->BSIM4V4ppdibl1 = value->rValue; - mod->BSIM4V4ppdibl1Given = TRUE; + case BSIM4v4_MOD_PPDIBL1: + mod->BSIM4v4ppdibl1 = value->rValue; + mod->BSIM4v4ppdibl1Given = TRUE; break; - case BSIM4V4_MOD_PPDIBL2: - mod->BSIM4V4ppdibl2 = value->rValue; - mod->BSIM4V4ppdibl2Given = TRUE; + case BSIM4v4_MOD_PPDIBL2: + mod->BSIM4v4ppdibl2 = value->rValue; + mod->BSIM4v4ppdibl2Given = TRUE; break; - case BSIM4V4_MOD_PPDIBLB: - mod->BSIM4V4ppdiblb = value->rValue; - mod->BSIM4V4ppdiblbGiven = TRUE; + case BSIM4v4_MOD_PPDIBLB: + mod->BSIM4v4ppdiblb = value->rValue; + mod->BSIM4v4ppdiblbGiven = TRUE; break; - case BSIM4V4_MOD_PPSCBE1: - mod->BSIM4V4ppscbe1 = value->rValue; - mod->BSIM4V4ppscbe1Given = TRUE; + case BSIM4v4_MOD_PPSCBE1: + mod->BSIM4v4ppscbe1 = value->rValue; + mod->BSIM4v4ppscbe1Given = TRUE; break; - case BSIM4V4_MOD_PPSCBE2: - mod->BSIM4V4ppscbe2 = value->rValue; - mod->BSIM4V4ppscbe2Given = TRUE; + case BSIM4v4_MOD_PPSCBE2: + mod->BSIM4v4ppscbe2 = value->rValue; + mod->BSIM4v4ppscbe2Given = TRUE; break; - case BSIM4V4_MOD_PPVAG: - mod->BSIM4V4ppvag = value->rValue; - mod->BSIM4V4ppvagGiven = TRUE; + case BSIM4v4_MOD_PPVAG: + mod->BSIM4v4ppvag = value->rValue; + mod->BSIM4v4ppvagGiven = TRUE; break; - case BSIM4V4_MOD_PWR : - mod->BSIM4V4pwr = value->rValue; - mod->BSIM4V4pwrGiven = TRUE; + case BSIM4v4_MOD_PWR : + mod->BSIM4v4pwr = value->rValue; + mod->BSIM4v4pwrGiven = TRUE; break; - case BSIM4V4_MOD_PDWG : - mod->BSIM4V4pdwg = value->rValue; - mod->BSIM4V4pdwgGiven = TRUE; + case BSIM4v4_MOD_PDWG : + mod->BSIM4v4pdwg = value->rValue; + mod->BSIM4v4pdwgGiven = TRUE; break; - case BSIM4V4_MOD_PDWB : - mod->BSIM4V4pdwb = value->rValue; - mod->BSIM4V4pdwbGiven = TRUE; + case BSIM4v4_MOD_PDWB : + mod->BSIM4v4pdwb = value->rValue; + mod->BSIM4v4pdwbGiven = TRUE; break; - case BSIM4V4_MOD_PB0 : - mod->BSIM4V4pb0 = value->rValue; - mod->BSIM4V4pb0Given = TRUE; + case BSIM4v4_MOD_PB0 : + mod->BSIM4v4pb0 = value->rValue; + mod->BSIM4v4pb0Given = TRUE; break; - case BSIM4V4_MOD_PB1 : - mod->BSIM4V4pb1 = value->rValue; - mod->BSIM4V4pb1Given = TRUE; + case BSIM4v4_MOD_PB1 : + mod->BSIM4v4pb1 = value->rValue; + mod->BSIM4v4pb1Given = TRUE; break; - case BSIM4V4_MOD_PALPHA0 : - mod->BSIM4V4palpha0 = value->rValue; - mod->BSIM4V4palpha0Given = TRUE; + case BSIM4v4_MOD_PALPHA0 : + mod->BSIM4v4palpha0 = value->rValue; + mod->BSIM4v4palpha0Given = TRUE; break; - case BSIM4V4_MOD_PALPHA1 : - mod->BSIM4V4palpha1 = value->rValue; - mod->BSIM4V4palpha1Given = TRUE; + case BSIM4v4_MOD_PALPHA1 : + mod->BSIM4v4palpha1 = value->rValue; + mod->BSIM4v4palpha1Given = TRUE; break; - case BSIM4V4_MOD_PBETA0 : - mod->BSIM4V4pbeta0 = value->rValue; - mod->BSIM4V4pbeta0Given = TRUE; + case BSIM4v4_MOD_PBETA0 : + mod->BSIM4v4pbeta0 = value->rValue; + mod->BSIM4v4pbeta0Given = TRUE; break; - case BSIM4V4_MOD_PAGIDL : - mod->BSIM4V4pagidl = value->rValue; - mod->BSIM4V4pagidlGiven = TRUE; + case BSIM4v4_MOD_PAGIDL : + mod->BSIM4v4pagidl = value->rValue; + mod->BSIM4v4pagidlGiven = TRUE; break; - case BSIM4V4_MOD_PBGIDL : - mod->BSIM4V4pbgidl = value->rValue; - mod->BSIM4V4pbgidlGiven = TRUE; + case BSIM4v4_MOD_PBGIDL : + mod->BSIM4v4pbgidl = value->rValue; + mod->BSIM4v4pbgidlGiven = TRUE; break; - case BSIM4V4_MOD_PCGIDL : - mod->BSIM4V4pcgidl = value->rValue; - mod->BSIM4V4pcgidlGiven = TRUE; + case BSIM4v4_MOD_PCGIDL : + mod->BSIM4v4pcgidl = value->rValue; + mod->BSIM4v4pcgidlGiven = TRUE; break; - case BSIM4V4_MOD_PPHIN : - mod->BSIM4V4pphin = value->rValue; - mod->BSIM4V4pphinGiven = TRUE; + case BSIM4v4_MOD_PPHIN : + mod->BSIM4v4pphin = value->rValue; + mod->BSIM4v4pphinGiven = TRUE; break; - case BSIM4V4_MOD_PEGIDL : - mod->BSIM4V4pegidl = value->rValue; - mod->BSIM4V4pegidlGiven = TRUE; + case BSIM4v4_MOD_PEGIDL : + mod->BSIM4v4pegidl = value->rValue; + mod->BSIM4v4pegidlGiven = TRUE; break; - case BSIM4V4_MOD_PAIGC : - mod->BSIM4V4paigc = value->rValue; - mod->BSIM4V4paigcGiven = TRUE; + case BSIM4v4_MOD_PAIGC : + mod->BSIM4v4paigc = value->rValue; + mod->BSIM4v4paigcGiven = TRUE; break; - case BSIM4V4_MOD_PBIGC : - mod->BSIM4V4pbigc = value->rValue; - mod->BSIM4V4pbigcGiven = TRUE; + case BSIM4v4_MOD_PBIGC : + mod->BSIM4v4pbigc = value->rValue; + mod->BSIM4v4pbigcGiven = TRUE; break; - case BSIM4V4_MOD_PCIGC : - mod->BSIM4V4pcigc = value->rValue; - mod->BSIM4V4pcigcGiven = TRUE; + case BSIM4v4_MOD_PCIGC : + mod->BSIM4v4pcigc = value->rValue; + mod->BSIM4v4pcigcGiven = TRUE; break; - case BSIM4V4_MOD_PAIGSD : - mod->BSIM4V4paigsd = value->rValue; - mod->BSIM4V4paigsdGiven = TRUE; + case BSIM4v4_MOD_PAIGSD : + mod->BSIM4v4paigsd = value->rValue; + mod->BSIM4v4paigsdGiven = TRUE; break; - case BSIM4V4_MOD_PBIGSD : - mod->BSIM4V4pbigsd = value->rValue; - mod->BSIM4V4pbigsdGiven = TRUE; + case BSIM4v4_MOD_PBIGSD : + mod->BSIM4v4pbigsd = value->rValue; + mod->BSIM4v4pbigsdGiven = TRUE; break; - case BSIM4V4_MOD_PCIGSD : - mod->BSIM4V4pcigsd = value->rValue; - mod->BSIM4V4pcigsdGiven = TRUE; + case BSIM4v4_MOD_PCIGSD : + mod->BSIM4v4pcigsd = value->rValue; + mod->BSIM4v4pcigsdGiven = TRUE; break; - case BSIM4V4_MOD_PAIGBACC : - mod->BSIM4V4paigbacc = value->rValue; - mod->BSIM4V4paigbaccGiven = TRUE; + case BSIM4v4_MOD_PAIGBACC : + mod->BSIM4v4paigbacc = value->rValue; + mod->BSIM4v4paigbaccGiven = TRUE; break; - case BSIM4V4_MOD_PBIGBACC : - mod->BSIM4V4pbigbacc = value->rValue; - mod->BSIM4V4pbigbaccGiven = TRUE; + case BSIM4v4_MOD_PBIGBACC : + mod->BSIM4v4pbigbacc = value->rValue; + mod->BSIM4v4pbigbaccGiven = TRUE; break; - case BSIM4V4_MOD_PCIGBACC : - mod->BSIM4V4pcigbacc = value->rValue; - mod->BSIM4V4pcigbaccGiven = TRUE; + case BSIM4v4_MOD_PCIGBACC : + mod->BSIM4v4pcigbacc = value->rValue; + mod->BSIM4v4pcigbaccGiven = TRUE; break; - case BSIM4V4_MOD_PAIGBINV : - mod->BSIM4V4paigbinv = value->rValue; - mod->BSIM4V4paigbinvGiven = TRUE; + case BSIM4v4_MOD_PAIGBINV : + mod->BSIM4v4paigbinv = value->rValue; + mod->BSIM4v4paigbinvGiven = TRUE; break; - case BSIM4V4_MOD_PBIGBINV : - mod->BSIM4V4pbigbinv = value->rValue; - mod->BSIM4V4pbigbinvGiven = TRUE; + case BSIM4v4_MOD_PBIGBINV : + mod->BSIM4v4pbigbinv = value->rValue; + mod->BSIM4v4pbigbinvGiven = TRUE; break; - case BSIM4V4_MOD_PCIGBINV : - mod->BSIM4V4pcigbinv = value->rValue; - mod->BSIM4V4pcigbinvGiven = TRUE; + case BSIM4v4_MOD_PCIGBINV : + mod->BSIM4v4pcigbinv = value->rValue; + mod->BSIM4v4pcigbinvGiven = TRUE; break; - case BSIM4V4_MOD_PNIGC : - mod->BSIM4V4pnigc = value->rValue; - mod->BSIM4V4pnigcGiven = TRUE; + case BSIM4v4_MOD_PNIGC : + mod->BSIM4v4pnigc = value->rValue; + mod->BSIM4v4pnigcGiven = TRUE; break; - case BSIM4V4_MOD_PNIGBINV : - mod->BSIM4V4pnigbinv = value->rValue; - mod->BSIM4V4pnigbinvGiven = TRUE; + case BSIM4v4_MOD_PNIGBINV : + mod->BSIM4v4pnigbinv = value->rValue; + mod->BSIM4v4pnigbinvGiven = TRUE; break; - case BSIM4V4_MOD_PNIGBACC : - mod->BSIM4V4pnigbacc = value->rValue; - mod->BSIM4V4pnigbaccGiven = TRUE; + case BSIM4v4_MOD_PNIGBACC : + mod->BSIM4v4pnigbacc = value->rValue; + mod->BSIM4v4pnigbaccGiven = TRUE; break; - case BSIM4V4_MOD_PNTOX : - mod->BSIM4V4pntox = value->rValue; - mod->BSIM4V4pntoxGiven = TRUE; + case BSIM4v4_MOD_PNTOX : + mod->BSIM4v4pntox = value->rValue; + mod->BSIM4v4pntoxGiven = TRUE; break; - case BSIM4V4_MOD_PEIGBINV : - mod->BSIM4V4peigbinv = value->rValue; - mod->BSIM4V4peigbinvGiven = TRUE; + case BSIM4v4_MOD_PEIGBINV : + mod->BSIM4v4peigbinv = value->rValue; + mod->BSIM4v4peigbinvGiven = TRUE; break; - case BSIM4V4_MOD_PPIGCD : - mod->BSIM4V4ppigcd = value->rValue; - mod->BSIM4V4ppigcdGiven = TRUE; + case BSIM4v4_MOD_PPIGCD : + mod->BSIM4v4ppigcd = value->rValue; + mod->BSIM4v4ppigcdGiven = TRUE; break; - case BSIM4V4_MOD_PPOXEDGE : - mod->BSIM4V4ppoxedge = value->rValue; - mod->BSIM4V4ppoxedgeGiven = TRUE; + case BSIM4v4_MOD_PPOXEDGE : + mod->BSIM4v4ppoxedge = value->rValue; + mod->BSIM4v4ppoxedgeGiven = TRUE; break; - case BSIM4V4_MOD_PXRCRG1 : - mod->BSIM4V4pxrcrg1 = value->rValue; - mod->BSIM4V4pxrcrg1Given = TRUE; + case BSIM4v4_MOD_PXRCRG1 : + mod->BSIM4v4pxrcrg1 = value->rValue; + mod->BSIM4v4pxrcrg1Given = TRUE; break; - case BSIM4V4_MOD_PXRCRG2 : - mod->BSIM4V4pxrcrg2 = value->rValue; - mod->BSIM4V4pxrcrg2Given = TRUE; + case BSIM4v4_MOD_PXRCRG2 : + mod->BSIM4v4pxrcrg2 = value->rValue; + mod->BSIM4v4pxrcrg2Given = TRUE; break; - case BSIM4V4_MOD_PLAMBDA : - mod->BSIM4V4plambda = value->rValue; - mod->BSIM4V4plambdaGiven = TRUE; + case BSIM4v4_MOD_PLAMBDA : + mod->BSIM4v4plambda = value->rValue; + mod->BSIM4v4plambdaGiven = TRUE; break; - case BSIM4V4_MOD_PVTL : - mod->BSIM4V4pvtl = value->rValue; - mod->BSIM4V4pvtlGiven = TRUE; + case BSIM4v4_MOD_PVTL : + mod->BSIM4v4pvtl = value->rValue; + mod->BSIM4v4pvtlGiven = TRUE; break; - case BSIM4V4_MOD_PXN: - mod->BSIM4V4pxn = value->rValue; - mod->BSIM4V4pxnGiven = TRUE; + case BSIM4v4_MOD_PXN: + mod->BSIM4v4pxn = value->rValue; + mod->BSIM4v4pxnGiven = TRUE; break; - case BSIM4V4_MOD_PVFBSDOFF: - mod->BSIM4V4pvfbsdoff = value->rValue; - mod->BSIM4V4pvfbsdoffGiven = TRUE; + case BSIM4v4_MOD_PVFBSDOFF: + mod->BSIM4v4pvfbsdoff = value->rValue; + mod->BSIM4v4pvfbsdoffGiven = TRUE; break; - case BSIM4V4_MOD_PEU : - mod->BSIM4V4peu = value->rValue; - mod->BSIM4V4peuGiven = TRUE; + case BSIM4v4_MOD_PEU : + mod->BSIM4v4peu = value->rValue; + mod->BSIM4v4peuGiven = TRUE; break; - case BSIM4V4_MOD_PVFB : - mod->BSIM4V4pvfb = value->rValue; - mod->BSIM4V4pvfbGiven = TRUE; + case BSIM4v4_MOD_PVFB : + mod->BSIM4v4pvfb = value->rValue; + mod->BSIM4v4pvfbGiven = TRUE; break; - case BSIM4V4_MOD_PCGSL : - mod->BSIM4V4pcgsl = value->rValue; - mod->BSIM4V4pcgslGiven = TRUE; + case BSIM4v4_MOD_PCGSL : + mod->BSIM4v4pcgsl = value->rValue; + mod->BSIM4v4pcgslGiven = TRUE; break; - case BSIM4V4_MOD_PCGDL : - mod->BSIM4V4pcgdl = value->rValue; - mod->BSIM4V4pcgdlGiven = TRUE; + case BSIM4v4_MOD_PCGDL : + mod->BSIM4v4pcgdl = value->rValue; + mod->BSIM4v4pcgdlGiven = TRUE; break; - case BSIM4V4_MOD_PCKAPPAS : - mod->BSIM4V4pckappas = value->rValue; - mod->BSIM4V4pckappasGiven = TRUE; + case BSIM4v4_MOD_PCKAPPAS : + mod->BSIM4v4pckappas = value->rValue; + mod->BSIM4v4pckappasGiven = TRUE; break; - case BSIM4V4_MOD_PCKAPPAD : - mod->BSIM4V4pckappad = value->rValue; - mod->BSIM4V4pckappadGiven = TRUE; + case BSIM4v4_MOD_PCKAPPAD : + mod->BSIM4v4pckappad = value->rValue; + mod->BSIM4v4pckappadGiven = TRUE; break; - case BSIM4V4_MOD_PCF : - mod->BSIM4V4pcf = value->rValue; - mod->BSIM4V4pcfGiven = TRUE; + case BSIM4v4_MOD_PCF : + mod->BSIM4v4pcf = value->rValue; + mod->BSIM4v4pcfGiven = TRUE; break; - case BSIM4V4_MOD_PCLC : - mod->BSIM4V4pclc = value->rValue; - mod->BSIM4V4pclcGiven = TRUE; + case BSIM4v4_MOD_PCLC : + mod->BSIM4v4pclc = value->rValue; + mod->BSIM4v4pclcGiven = TRUE; break; - case BSIM4V4_MOD_PCLE : - mod->BSIM4V4pcle = value->rValue; - mod->BSIM4V4pcleGiven = TRUE; + case BSIM4v4_MOD_PCLE : + mod->BSIM4v4pcle = value->rValue; + mod->BSIM4v4pcleGiven = TRUE; break; - case BSIM4V4_MOD_PVFBCV : - mod->BSIM4V4pvfbcv = value->rValue; - mod->BSIM4V4pvfbcvGiven = TRUE; + case BSIM4v4_MOD_PVFBCV : + mod->BSIM4v4pvfbcv = value->rValue; + mod->BSIM4v4pvfbcvGiven = TRUE; break; - case BSIM4V4_MOD_PACDE : - mod->BSIM4V4pacde = value->rValue; - mod->BSIM4V4pacdeGiven = TRUE; + case BSIM4v4_MOD_PACDE : + mod->BSIM4v4pacde = value->rValue; + mod->BSIM4v4pacdeGiven = TRUE; break; - case BSIM4V4_MOD_PMOIN : - mod->BSIM4V4pmoin = value->rValue; - mod->BSIM4V4pmoinGiven = TRUE; + case BSIM4v4_MOD_PMOIN : + mod->BSIM4v4pmoin = value->rValue; + mod->BSIM4v4pmoinGiven = TRUE; break; - case BSIM4V4_MOD_PNOFF : - mod->BSIM4V4pnoff = value->rValue; - mod->BSIM4V4pnoffGiven = TRUE; + case BSIM4v4_MOD_PNOFF : + mod->BSIM4v4pnoff = value->rValue; + mod->BSIM4v4pnoffGiven = TRUE; break; - case BSIM4V4_MOD_PVOFFCV : - mod->BSIM4V4pvoffcv = value->rValue; - mod->BSIM4V4pvoffcvGiven = TRUE; + case BSIM4v4_MOD_PVOFFCV : + mod->BSIM4v4pvoffcv = value->rValue; + mod->BSIM4v4pvoffcvGiven = TRUE; break; - case BSIM4V4_MOD_TNOM : - mod->BSIM4V4tnom = value->rValue + CONSTCtoK; - mod->BSIM4V4tnomGiven = TRUE; + case BSIM4v4_MOD_TNOM : + mod->BSIM4v4tnom = value->rValue + CONSTCtoK; + mod->BSIM4v4tnomGiven = TRUE; break; - case BSIM4V4_MOD_CGSO : - mod->BSIM4V4cgso = value->rValue; - mod->BSIM4V4cgsoGiven = TRUE; + case BSIM4v4_MOD_CGSO : + mod->BSIM4v4cgso = value->rValue; + mod->BSIM4v4cgsoGiven = TRUE; break; - case BSIM4V4_MOD_CGDO : - mod->BSIM4V4cgdo = value->rValue; - mod->BSIM4V4cgdoGiven = TRUE; + case BSIM4v4_MOD_CGDO : + mod->BSIM4v4cgdo = value->rValue; + mod->BSIM4v4cgdoGiven = TRUE; break; - case BSIM4V4_MOD_CGBO : - mod->BSIM4V4cgbo = value->rValue; - mod->BSIM4V4cgboGiven = TRUE; + case BSIM4v4_MOD_CGBO : + mod->BSIM4v4cgbo = value->rValue; + mod->BSIM4v4cgboGiven = TRUE; break; - case BSIM4V4_MOD_XPART : - mod->BSIM4V4xpart = value->rValue; - mod->BSIM4V4xpartGiven = TRUE; + case BSIM4v4_MOD_XPART : + mod->BSIM4v4xpart = value->rValue; + mod->BSIM4v4xpartGiven = TRUE; break; - case BSIM4V4_MOD_RSH : - mod->BSIM4V4sheetResistance = value->rValue; - mod->BSIM4V4sheetResistanceGiven = TRUE; + case BSIM4v4_MOD_RSH : + mod->BSIM4v4sheetResistance = value->rValue; + mod->BSIM4v4sheetResistanceGiven = TRUE; break; - case BSIM4V4_MOD_JSS : - mod->BSIM4V4SjctSatCurDensity = value->rValue; - mod->BSIM4V4SjctSatCurDensityGiven = TRUE; + case BSIM4v4_MOD_JSS : + mod->BSIM4v4SjctSatCurDensity = value->rValue; + mod->BSIM4v4SjctSatCurDensityGiven = TRUE; break; - case BSIM4V4_MOD_JSWS : - mod->BSIM4V4SjctSidewallSatCurDensity = value->rValue; - mod->BSIM4V4SjctSidewallSatCurDensityGiven = TRUE; + case BSIM4v4_MOD_JSWS : + mod->BSIM4v4SjctSidewallSatCurDensity = value->rValue; + mod->BSIM4v4SjctSidewallSatCurDensityGiven = TRUE; break; - case BSIM4V4_MOD_JSWGS : - mod->BSIM4V4SjctGateSidewallSatCurDensity = value->rValue; - mod->BSIM4V4SjctGateSidewallSatCurDensityGiven = TRUE; + case BSIM4v4_MOD_JSWGS : + mod->BSIM4v4SjctGateSidewallSatCurDensity = value->rValue; + mod->BSIM4v4SjctGateSidewallSatCurDensityGiven = TRUE; break; - case BSIM4V4_MOD_PBS : - mod->BSIM4V4SbulkJctPotential = value->rValue; - mod->BSIM4V4SbulkJctPotentialGiven = TRUE; + case BSIM4v4_MOD_PBS : + mod->BSIM4v4SbulkJctPotential = value->rValue; + mod->BSIM4v4SbulkJctPotentialGiven = TRUE; break; - case BSIM4V4_MOD_MJS : - mod->BSIM4V4SbulkJctBotGradingCoeff = value->rValue; - mod->BSIM4V4SbulkJctBotGradingCoeffGiven = TRUE; + case BSIM4v4_MOD_MJS : + mod->BSIM4v4SbulkJctBotGradingCoeff = value->rValue; + mod->BSIM4v4SbulkJctBotGradingCoeffGiven = TRUE; break; - case BSIM4V4_MOD_PBSWS : - mod->BSIM4V4SsidewallJctPotential = value->rValue; - mod->BSIM4V4SsidewallJctPotentialGiven = TRUE; + case BSIM4v4_MOD_PBSWS : + mod->BSIM4v4SsidewallJctPotential = value->rValue; + mod->BSIM4v4SsidewallJctPotentialGiven = TRUE; break; - case BSIM4V4_MOD_MJSWS : - mod->BSIM4V4SbulkJctSideGradingCoeff = value->rValue; - mod->BSIM4V4SbulkJctSideGradingCoeffGiven = TRUE; + case BSIM4v4_MOD_MJSWS : + mod->BSIM4v4SbulkJctSideGradingCoeff = value->rValue; + mod->BSIM4v4SbulkJctSideGradingCoeffGiven = TRUE; break; - case BSIM4V4_MOD_CJS : - mod->BSIM4V4SunitAreaJctCap = value->rValue; - mod->BSIM4V4SunitAreaJctCapGiven = TRUE; + case BSIM4v4_MOD_CJS : + mod->BSIM4v4SunitAreaJctCap = value->rValue; + mod->BSIM4v4SunitAreaJctCapGiven = TRUE; break; - case BSIM4V4_MOD_CJSWS : - mod->BSIM4V4SunitLengthSidewallJctCap = value->rValue; - mod->BSIM4V4SunitLengthSidewallJctCapGiven = TRUE; + case BSIM4v4_MOD_CJSWS : + mod->BSIM4v4SunitLengthSidewallJctCap = value->rValue; + mod->BSIM4v4SunitLengthSidewallJctCapGiven = TRUE; break; - case BSIM4V4_MOD_NJS : - mod->BSIM4V4SjctEmissionCoeff = value->rValue; - mod->BSIM4V4SjctEmissionCoeffGiven = TRUE; + case BSIM4v4_MOD_NJS : + mod->BSIM4v4SjctEmissionCoeff = value->rValue; + mod->BSIM4v4SjctEmissionCoeffGiven = TRUE; break; - case BSIM4V4_MOD_PBSWGS : - mod->BSIM4V4SGatesidewallJctPotential = value->rValue; - mod->BSIM4V4SGatesidewallJctPotentialGiven = TRUE; + case BSIM4v4_MOD_PBSWGS : + mod->BSIM4v4SGatesidewallJctPotential = value->rValue; + mod->BSIM4v4SGatesidewallJctPotentialGiven = TRUE; break; - case BSIM4V4_MOD_MJSWGS : - mod->BSIM4V4SbulkJctGateSideGradingCoeff = value->rValue; - mod->BSIM4V4SbulkJctGateSideGradingCoeffGiven = TRUE; + case BSIM4v4_MOD_MJSWGS : + mod->BSIM4v4SbulkJctGateSideGradingCoeff = value->rValue; + mod->BSIM4v4SbulkJctGateSideGradingCoeffGiven = TRUE; break; - case BSIM4V4_MOD_CJSWGS : - mod->BSIM4V4SunitLengthGateSidewallJctCap = value->rValue; - mod->BSIM4V4SunitLengthGateSidewallJctCapGiven = TRUE; + case BSIM4v4_MOD_CJSWGS : + mod->BSIM4v4SunitLengthGateSidewallJctCap = value->rValue; + mod->BSIM4v4SunitLengthGateSidewallJctCapGiven = TRUE; break; - case BSIM4V4_MOD_XTIS : - mod->BSIM4V4SjctTempExponent = value->rValue; - mod->BSIM4V4SjctTempExponentGiven = TRUE; + case BSIM4v4_MOD_XTIS : + mod->BSIM4v4SjctTempExponent = value->rValue; + mod->BSIM4v4SjctTempExponentGiven = TRUE; break; - case BSIM4V4_MOD_JSD : - mod->BSIM4V4DjctSatCurDensity = value->rValue; - mod->BSIM4V4DjctSatCurDensityGiven = TRUE; + case BSIM4v4_MOD_JSD : + mod->BSIM4v4DjctSatCurDensity = value->rValue; + mod->BSIM4v4DjctSatCurDensityGiven = TRUE; break; - case BSIM4V4_MOD_JSWD : - mod->BSIM4V4DjctSidewallSatCurDensity = value->rValue; - mod->BSIM4V4DjctSidewallSatCurDensityGiven = TRUE; + case BSIM4v4_MOD_JSWD : + mod->BSIM4v4DjctSidewallSatCurDensity = value->rValue; + mod->BSIM4v4DjctSidewallSatCurDensityGiven = TRUE; break; - case BSIM4V4_MOD_JSWGD : - mod->BSIM4V4DjctGateSidewallSatCurDensity = value->rValue; - mod->BSIM4V4DjctGateSidewallSatCurDensityGiven = TRUE; + case BSIM4v4_MOD_JSWGD : + mod->BSIM4v4DjctGateSidewallSatCurDensity = value->rValue; + mod->BSIM4v4DjctGateSidewallSatCurDensityGiven = TRUE; break; - case BSIM4V4_MOD_PBD : - mod->BSIM4V4DbulkJctPotential = value->rValue; - mod->BSIM4V4DbulkJctPotentialGiven = TRUE; + case BSIM4v4_MOD_PBD : + mod->BSIM4v4DbulkJctPotential = value->rValue; + mod->BSIM4v4DbulkJctPotentialGiven = TRUE; break; - case BSIM4V4_MOD_MJD : - mod->BSIM4V4DbulkJctBotGradingCoeff = value->rValue; - mod->BSIM4V4DbulkJctBotGradingCoeffGiven = TRUE; + case BSIM4v4_MOD_MJD : + mod->BSIM4v4DbulkJctBotGradingCoeff = value->rValue; + mod->BSIM4v4DbulkJctBotGradingCoeffGiven = TRUE; break; - case BSIM4V4_MOD_PBSWD : - mod->BSIM4V4DsidewallJctPotential = value->rValue; - mod->BSIM4V4DsidewallJctPotentialGiven = TRUE; + case BSIM4v4_MOD_PBSWD : + mod->BSIM4v4DsidewallJctPotential = value->rValue; + mod->BSIM4v4DsidewallJctPotentialGiven = TRUE; break; - case BSIM4V4_MOD_MJSWD : - mod->BSIM4V4DbulkJctSideGradingCoeff = value->rValue; - mod->BSIM4V4DbulkJctSideGradingCoeffGiven = TRUE; + case BSIM4v4_MOD_MJSWD : + mod->BSIM4v4DbulkJctSideGradingCoeff = value->rValue; + mod->BSIM4v4DbulkJctSideGradingCoeffGiven = TRUE; break; - case BSIM4V4_MOD_CJD : - mod->BSIM4V4DunitAreaJctCap = value->rValue; - mod->BSIM4V4DunitAreaJctCapGiven = TRUE; + case BSIM4v4_MOD_CJD : + mod->BSIM4v4DunitAreaJctCap = value->rValue; + mod->BSIM4v4DunitAreaJctCapGiven = TRUE; break; - case BSIM4V4_MOD_CJSWD : - mod->BSIM4V4DunitLengthSidewallJctCap = value->rValue; - mod->BSIM4V4DunitLengthSidewallJctCapGiven = TRUE; + case BSIM4v4_MOD_CJSWD : + mod->BSIM4v4DunitLengthSidewallJctCap = value->rValue; + mod->BSIM4v4DunitLengthSidewallJctCapGiven = TRUE; break; - case BSIM4V4_MOD_NJD : - mod->BSIM4V4DjctEmissionCoeff = value->rValue; - mod->BSIM4V4DjctEmissionCoeffGiven = TRUE; + case BSIM4v4_MOD_NJD : + mod->BSIM4v4DjctEmissionCoeff = value->rValue; + mod->BSIM4v4DjctEmissionCoeffGiven = TRUE; break; - case BSIM4V4_MOD_PBSWGD : - mod->BSIM4V4DGatesidewallJctPotential = value->rValue; - mod->BSIM4V4DGatesidewallJctPotentialGiven = TRUE; + case BSIM4v4_MOD_PBSWGD : + mod->BSIM4v4DGatesidewallJctPotential = value->rValue; + mod->BSIM4v4DGatesidewallJctPotentialGiven = TRUE; break; - case BSIM4V4_MOD_MJSWGD : - mod->BSIM4V4DbulkJctGateSideGradingCoeff = value->rValue; - mod->BSIM4V4DbulkJctGateSideGradingCoeffGiven = TRUE; + case BSIM4v4_MOD_MJSWGD : + mod->BSIM4v4DbulkJctGateSideGradingCoeff = value->rValue; + mod->BSIM4v4DbulkJctGateSideGradingCoeffGiven = TRUE; break; - case BSIM4V4_MOD_CJSWGD : - mod->BSIM4V4DunitLengthGateSidewallJctCap = value->rValue; - mod->BSIM4V4DunitLengthGateSidewallJctCapGiven = TRUE; + case BSIM4v4_MOD_CJSWGD : + mod->BSIM4v4DunitLengthGateSidewallJctCap = value->rValue; + mod->BSIM4v4DunitLengthGateSidewallJctCapGiven = TRUE; break; - case BSIM4V4_MOD_XTID : - mod->BSIM4V4DjctTempExponent = value->rValue; - mod->BSIM4V4DjctTempExponentGiven = TRUE; + case BSIM4v4_MOD_XTID : + mod->BSIM4v4DjctTempExponent = value->rValue; + mod->BSIM4v4DjctTempExponentGiven = TRUE; break; - case BSIM4V4_MOD_LINT : - mod->BSIM4V4Lint = value->rValue; - mod->BSIM4V4LintGiven = TRUE; + case BSIM4v4_MOD_LINT : + mod->BSIM4v4Lint = value->rValue; + mod->BSIM4v4LintGiven = TRUE; break; - case BSIM4V4_MOD_LL : - mod->BSIM4V4Ll = value->rValue; - mod->BSIM4V4LlGiven = TRUE; + case BSIM4v4_MOD_LL : + mod->BSIM4v4Ll = value->rValue; + mod->BSIM4v4LlGiven = TRUE; break; - case BSIM4V4_MOD_LLC : - mod->BSIM4V4Llc = value->rValue; - mod->BSIM4V4LlcGiven = TRUE; + case BSIM4v4_MOD_LLC : + mod->BSIM4v4Llc = value->rValue; + mod->BSIM4v4LlcGiven = TRUE; break; - case BSIM4V4_MOD_LLN : - mod->BSIM4V4Lln = value->rValue; - mod->BSIM4V4LlnGiven = TRUE; + case BSIM4v4_MOD_LLN : + mod->BSIM4v4Lln = value->rValue; + mod->BSIM4v4LlnGiven = TRUE; break; - case BSIM4V4_MOD_LW : - mod->BSIM4V4Lw = value->rValue; - mod->BSIM4V4LwGiven = TRUE; + case BSIM4v4_MOD_LW : + mod->BSIM4v4Lw = value->rValue; + mod->BSIM4v4LwGiven = TRUE; break; - case BSIM4V4_MOD_LWC : - mod->BSIM4V4Lwc = value->rValue; - mod->BSIM4V4LwcGiven = TRUE; + case BSIM4v4_MOD_LWC : + mod->BSIM4v4Lwc = value->rValue; + mod->BSIM4v4LwcGiven = TRUE; break; - case BSIM4V4_MOD_LWN : - mod->BSIM4V4Lwn = value->rValue; - mod->BSIM4V4LwnGiven = TRUE; + case BSIM4v4_MOD_LWN : + mod->BSIM4v4Lwn = value->rValue; + mod->BSIM4v4LwnGiven = TRUE; break; - case BSIM4V4_MOD_LWL : - mod->BSIM4V4Lwl = value->rValue; - mod->BSIM4V4LwlGiven = TRUE; + case BSIM4v4_MOD_LWL : + mod->BSIM4v4Lwl = value->rValue; + mod->BSIM4v4LwlGiven = TRUE; break; - case BSIM4V4_MOD_LWLC : - mod->BSIM4V4Lwlc = value->rValue; - mod->BSIM4V4LwlcGiven = TRUE; + case BSIM4v4_MOD_LWLC : + mod->BSIM4v4Lwlc = value->rValue; + mod->BSIM4v4LwlcGiven = TRUE; break; - case BSIM4V4_MOD_LMIN : - mod->BSIM4V4Lmin = value->rValue; - mod->BSIM4V4LminGiven = TRUE; + case BSIM4v4_MOD_LMIN : + mod->BSIM4v4Lmin = value->rValue; + mod->BSIM4v4LminGiven = TRUE; break; - case BSIM4V4_MOD_LMAX : - mod->BSIM4V4Lmax = value->rValue; - mod->BSIM4V4LmaxGiven = TRUE; + case BSIM4v4_MOD_LMAX : + mod->BSIM4v4Lmax = value->rValue; + mod->BSIM4v4LmaxGiven = TRUE; break; - case BSIM4V4_MOD_WINT : - mod->BSIM4V4Wint = value->rValue; - mod->BSIM4V4WintGiven = TRUE; + case BSIM4v4_MOD_WINT : + mod->BSIM4v4Wint = value->rValue; + mod->BSIM4v4WintGiven = TRUE; break; - case BSIM4V4_MOD_WL : - mod->BSIM4V4Wl = value->rValue; - mod->BSIM4V4WlGiven = TRUE; + case BSIM4v4_MOD_WL : + mod->BSIM4v4Wl = value->rValue; + mod->BSIM4v4WlGiven = TRUE; break; - case BSIM4V4_MOD_WLC : - mod->BSIM4V4Wlc = value->rValue; - mod->BSIM4V4WlcGiven = TRUE; + case BSIM4v4_MOD_WLC : + mod->BSIM4v4Wlc = value->rValue; + mod->BSIM4v4WlcGiven = TRUE; break; - case BSIM4V4_MOD_WLN : - mod->BSIM4V4Wln = value->rValue; - mod->BSIM4V4WlnGiven = TRUE; + case BSIM4v4_MOD_WLN : + mod->BSIM4v4Wln = value->rValue; + mod->BSIM4v4WlnGiven = TRUE; break; - case BSIM4V4_MOD_WW : - mod->BSIM4V4Ww = value->rValue; - mod->BSIM4V4WwGiven = TRUE; + case BSIM4v4_MOD_WW : + mod->BSIM4v4Ww = value->rValue; + mod->BSIM4v4WwGiven = TRUE; break; - case BSIM4V4_MOD_WWC : - mod->BSIM4V4Wwc = value->rValue; - mod->BSIM4V4WwcGiven = TRUE; + case BSIM4v4_MOD_WWC : + mod->BSIM4v4Wwc = value->rValue; + mod->BSIM4v4WwcGiven = TRUE; break; - case BSIM4V4_MOD_WWN : - mod->BSIM4V4Wwn = value->rValue; - mod->BSIM4V4WwnGiven = TRUE; + case BSIM4v4_MOD_WWN : + mod->BSIM4v4Wwn = value->rValue; + mod->BSIM4v4WwnGiven = TRUE; break; - case BSIM4V4_MOD_WWL : - mod->BSIM4V4Wwl = value->rValue; - mod->BSIM4V4WwlGiven = TRUE; + case BSIM4v4_MOD_WWL : + mod->BSIM4v4Wwl = value->rValue; + mod->BSIM4v4WwlGiven = TRUE; break; - case BSIM4V4_MOD_WWLC : - mod->BSIM4V4Wwlc = value->rValue; - mod->BSIM4V4WwlcGiven = TRUE; + case BSIM4v4_MOD_WWLC : + mod->BSIM4v4Wwlc = value->rValue; + mod->BSIM4v4WwlcGiven = TRUE; break; - case BSIM4V4_MOD_WMIN : - mod->BSIM4V4Wmin = value->rValue; - mod->BSIM4V4WminGiven = TRUE; + case BSIM4v4_MOD_WMIN : + mod->BSIM4v4Wmin = value->rValue; + mod->BSIM4v4WminGiven = TRUE; break; - case BSIM4V4_MOD_WMAX : - mod->BSIM4V4Wmax = value->rValue; - mod->BSIM4V4WmaxGiven = TRUE; + case BSIM4v4_MOD_WMAX : + mod->BSIM4v4Wmax = value->rValue; + mod->BSIM4v4WmaxGiven = TRUE; break; - case BSIM4V4_MOD_NOIA : - mod->BSIM4V4oxideTrapDensityA = value->rValue; - mod->BSIM4V4oxideTrapDensityAGiven = TRUE; + case BSIM4v4_MOD_NOIA : + mod->BSIM4v4oxideTrapDensityA = value->rValue; + mod->BSIM4v4oxideTrapDensityAGiven = TRUE; break; - case BSIM4V4_MOD_NOIB : - mod->BSIM4V4oxideTrapDensityB = value->rValue; - mod->BSIM4V4oxideTrapDensityBGiven = TRUE; + case BSIM4v4_MOD_NOIB : + mod->BSIM4v4oxideTrapDensityB = value->rValue; + mod->BSIM4v4oxideTrapDensityBGiven = TRUE; break; - case BSIM4V4_MOD_NOIC : - mod->BSIM4V4oxideTrapDensityC = value->rValue; - mod->BSIM4V4oxideTrapDensityCGiven = TRUE; + case BSIM4v4_MOD_NOIC : + mod->BSIM4v4oxideTrapDensityC = value->rValue; + mod->BSIM4v4oxideTrapDensityCGiven = TRUE; break; - case BSIM4V4_MOD_EM : - mod->BSIM4V4em = value->rValue; - mod->BSIM4V4emGiven = TRUE; + case BSIM4v4_MOD_EM : + mod->BSIM4v4em = value->rValue; + mod->BSIM4v4emGiven = TRUE; break; - case BSIM4V4_MOD_EF : - mod->BSIM4V4ef = value->rValue; - mod->BSIM4V4efGiven = TRUE; + case BSIM4v4_MOD_EF : + mod->BSIM4v4ef = value->rValue; + mod->BSIM4v4efGiven = TRUE; break; - case BSIM4V4_MOD_AF : - mod->BSIM4V4af = value->rValue; - mod->BSIM4V4afGiven = TRUE; + case BSIM4v4_MOD_AF : + mod->BSIM4v4af = value->rValue; + mod->BSIM4v4afGiven = TRUE; break; - case BSIM4V4_MOD_KF : - mod->BSIM4V4kf = value->rValue; - mod->BSIM4V4kfGiven = TRUE; + case BSIM4v4_MOD_KF : + mod->BSIM4v4kf = value->rValue; + mod->BSIM4v4kfGiven = TRUE; break; - case BSIM4V4_MOD_STIMOD : - mod->BSIM4V4stimod = value->rValue; - mod->BSIM4V4stimodGiven = TRUE; + case BSIM4v4_MOD_STIMOD : + mod->BSIM4v4stimod = value->rValue; + mod->BSIM4v4stimodGiven = TRUE; break; - case BSIM4V4_MOD_RGEOMOD : - mod->BSIM4V4rgeomod = value->rValue; - mod->BSIM4V4rgeomodGiven = TRUE; + case BSIM4v4_MOD_RGEOMOD : + mod->BSIM4v4rgeomod = value->rValue; + mod->BSIM4v4rgeomodGiven = TRUE; break; - case BSIM4V4_MOD_SA0 : - mod->BSIM4V4sa0 = value->rValue; - mod->BSIM4V4sa0Given = TRUE; + case BSIM4v4_MOD_SA0 : + mod->BSIM4v4sa0 = value->rValue; + mod->BSIM4v4sa0Given = TRUE; break; - case BSIM4V4_MOD_SB0 : - mod->BSIM4V4sb0 = value->rValue; - mod->BSIM4V4sb0Given = TRUE; + case BSIM4v4_MOD_SB0 : + mod->BSIM4v4sb0 = value->rValue; + mod->BSIM4v4sb0Given = TRUE; break; - case BSIM4V4_MOD_NMOS : + case BSIM4v4_MOD_NMOS : if(value->iValue) { - mod->BSIM4V4type = 1; - mod->BSIM4V4typeGiven = TRUE; + mod->BSIM4v4type = 1; + mod->BSIM4v4typeGiven = TRUE; } break; - case BSIM4V4_MOD_PMOS : + case BSIM4v4_MOD_PMOS : if(value->iValue) { - mod->BSIM4V4type = - 1; - mod->BSIM4V4typeGiven = TRUE; + mod->BSIM4v4type = - 1; + mod->BSIM4v4typeGiven = TRUE; } break; default: diff --git a/src/spicelib/devices/bsim4v4/b4v4noi.c b/src/spicelib/devices/bsim4v4/b4v4noi.c index d1791d704..50732b5ab 100644 --- a/src/spicelib/devices/bsim4v4/b4v4noi.c +++ b/src/spicelib/devices/bsim4v4/b4v4noi.c @@ -32,64 +32,64 @@ extern double Nintegrate(); */ static double -Eval1ovFNoise(Vds, model, here, freq, temp) +BSIM4v4Eval1ovFNoise(Vds, model, here, freq, temp) double Vds, freq, temp; -BSIM4V4model *model; -BSIM4V4instance *here; +BSIM4v4model *model; +BSIM4v4instance *here; { struct bsim4SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Leff, Leffsq; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; - cd = fabs(here->BSIM4V4cd); - Leff = pParam->BSIM4V4leff - 2.0 * model->BSIM4V4lintnoi; + cd = fabs(here->BSIM4v4cd); + Leff = pParam->BSIM4v4leff - 2.0 * model->BSIM4v4lintnoi; Leffsq = Leff * Leff; - esat = 2.0 * here->BSIM4V4vsattemp / here->BSIM4V4ueff; - if(model->BSIM4V4em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ + esat = 2.0 * here->BSIM4v4vsattemp / here->BSIM4v4ueff; + if(model->BSIM4v4em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ else { - T0 = ((((Vds - here->BSIM4V4Vdseff) / pParam->BSIM4V4litl) - + model->BSIM4V4em) / esat); - DelClm = pParam->BSIM4V4litl * log (MAX(T0, N_MINLOG)); + T0 = ((((Vds - here->BSIM4v4Vdseff) / pParam->BSIM4v4litl) + + model->BSIM4v4em) / esat); + DelClm = pParam->BSIM4v4litl * log (MAX(T0, N_MINLOG)); } - EffFreq = pow(freq, model->BSIM4V4ef); - T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4V4ueff; - T2 = 1.0e10 * EffFreq * here->BSIM4V4Abulk * model->BSIM4V4coxe * Leffsq; - N0 = model->BSIM4V4coxe * here->BSIM4V4Vgsteff / CHARGE; - Nl = model->BSIM4V4coxe * here->BSIM4V4Vgsteff - * (1.0 - here->BSIM4V4AbovVgst2Vtm * here->BSIM4V4Vdseff) / CHARGE; - - T3 = model->BSIM4V4oxideTrapDensityA - * log(MAX(((N0 + here->BSIM4V4nstar) / (Nl + here->BSIM4V4nstar)), N_MINLOG)); - T4 = model->BSIM4V4oxideTrapDensityB * (N0 - Nl); - T5 = model->BSIM4V4oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); + EffFreq = pow(freq, model->BSIM4v4ef); + T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v4ueff; + T2 = 1.0e10 * EffFreq * here->BSIM4v4Abulk * model->BSIM4v4coxe * Leffsq; + N0 = model->BSIM4v4coxe * here->BSIM4v4Vgsteff / CHARGE; + Nl = model->BSIM4v4coxe * here->BSIM4v4Vgsteff + * (1.0 - here->BSIM4v4AbovVgst2Vtm * here->BSIM4v4Vdseff) / CHARGE; + + T3 = model->BSIM4v4oxideTrapDensityA + * log(MAX(((N0 + here->BSIM4v4nstar) / (Nl + here->BSIM4v4nstar)), N_MINLOG)); + T4 = model->BSIM4v4oxideTrapDensityB * (N0 - Nl); + T5 = model->BSIM4v4oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = CONSTboltz * temp * cd * cd; - T7 = 1.0e10 * EffFreq * Leffsq * pParam->BSIM4V4weff; - T8 = model->BSIM4V4oxideTrapDensityA + model->BSIM4V4oxideTrapDensityB * Nl - + model->BSIM4V4oxideTrapDensityC * Nl * Nl; - T9 = (Nl + here->BSIM4V4nstar) * (Nl + here->BSIM4V4nstar); + T7 = 1.0e10 * EffFreq * Leffsq * pParam->BSIM4v4weff; + T8 = model->BSIM4v4oxideTrapDensityA + model->BSIM4v4oxideTrapDensityB * Nl + + model->BSIM4v4oxideTrapDensityC * Nl * Nl; + T9 = (Nl + here->BSIM4v4nstar) * (Nl + here->BSIM4v4nstar); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int -BSIM4V4noise (mode, operation, inModel, ckt, data, OnDens) +BSIM4v4noise (mode, operation, inModel, ckt, data, OnDens) int mode, operation; GENmodel *inModel; CKTcircuit *ckt; Ndata *data; double *OnDens; { -BSIM4V4model *model = (BSIM4V4model *)inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model *)inModel; +BSIM4v4instance *here; struct bsim4SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; -double noizDens[BSIM4V4NSRCS]; -double lnNdens[BSIM4V4NSRCS]; +double noizDens[BSIM4v4NSRCS]; +double lnNdens[BSIM4v4NSRCS]; double T0, T1, T2, T5, T10, T11; double Vds, Ssi, Swi; @@ -100,7 +100,7 @@ double m; int i; /* define the names of the noise sources */ - static char *BSIM4V4nNames[BSIM4V4NSRCS] = + static char *BSIM4v4nNames[BSIM4v4NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ ".rs", /* noise due to rs */ @@ -118,9 +118,9 @@ int i; "" /* total transistor noise */ }; - for (; model != NULL; model = model->BSIM4V4nextModel) - { for (here = model->BSIM4V4instances; here != NULL; - here = here->BSIM4V4nextInstance) + for (; model != NULL; model = model->BSIM4v4nextModel) + { for (here = model->BSIM4v4instances; here != NULL; + here = here->BSIM4v4nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: @@ -130,10 +130,10 @@ int i; if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) { switch (mode) { case N_DENS: - for (i = 0; i < BSIM4V4NSRCS; i++) + for (i = 0; i < BSIM4v4NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", - here->BSIM4V4name, - BSIM4V4nNames[i]); + here->BSIM4v4name, + BSIM4v4nNames[i]); data->namelist = (IFuid *) trealloc( (char *) data->namelist, (data->numPlots + 1) @@ -148,10 +148,10 @@ int i; } break; case INT_NOIZ: - for (i = 0; i < BSIM4V4NSRCS; i++) + for (i = 0; i < BSIM4v4NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", - here->BSIM4V4name, - BSIM4V4nNames[i]); + here->BSIM4v4name, + BSIM4v4nNames[i]); data->namelist = (IFuid *) trealloc( (char *) data->namelist, (data->numPlots + 1) @@ -165,8 +165,8 @@ int i; /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", - here->BSIM4V4name, - BSIM4V4nNames[i]); + here->BSIM4v4name, + BSIM4v4nNames[i]); data->namelist = (IFuid *) trealloc( (char *) data->namelist, (data->numPlots + 1) @@ -184,221 +184,221 @@ int i; } break; case N_CALC: - m = here->BSIM4V4m; + m = here->BSIM4v4m; switch (mode) { case N_DENS: - if (model->BSIM4V4tnoiMod == 0) - { if (model->BSIM4V4rdsMod == 0) - { gspr = here->BSIM4V4sourceConductance; - gdpr = here->BSIM4V4drainConductance; - if (here->BSIM4V4grdsw > 0.0) - tmp = 1.0 / here->BSIM4V4grdsw; /* tmp used below */ + if (model->BSIM4v4tnoiMod == 0) + { if (model->BSIM4v4rdsMod == 0) + { gspr = here->BSIM4v4sourceConductance; + gdpr = here->BSIM4v4drainConductance; + if (here->BSIM4v4grdsw > 0.0) + tmp = 1.0 / here->BSIM4v4grdsw; /* tmp used below */ else tmp = 0.0; } else - { gspr = here->BSIM4V4gstot; - gdpr = here->BSIM4V4gdtot; + { gspr = here->BSIM4v4gstot; + gdpr = here->BSIM4v4gdtot; tmp = 0.0; } } else - { T5 = here->BSIM4V4Vgsteff / here->BSIM4V4EsatL; + { T5 = here->BSIM4v4Vgsteff / here->BSIM4v4EsatL; T5 *= T5; - npart_beta = model->BSIM4V4rnoia * (1.0 + T5 - * model->BSIM4V4tnoia * pParam->BSIM4V4leff); - npart_theta = model->BSIM4V4rnoib * (1.0 + T5 - * model->BSIM4V4tnoib * pParam->BSIM4V4leff); - - if (model->BSIM4V4rdsMod == 0) - { gspr = here->BSIM4V4sourceConductance; - gdpr = here->BSIM4V4drainConductance; + npart_beta = model->BSIM4v4rnoia * (1.0 + T5 + * model->BSIM4v4tnoia * pParam->BSIM4v4leff); + npart_theta = model->BSIM4v4rnoib * (1.0 + T5 + * model->BSIM4v4tnoib * pParam->BSIM4v4leff); + + if (model->BSIM4v4rdsMod == 0) + { gspr = here->BSIM4v4sourceConductance; + gdpr = here->BSIM4v4drainConductance; } else - { gspr = here->BSIM4V4gstot; - gdpr = here->BSIM4V4gdtot; + { gspr = here->BSIM4v4gstot; + gdpr = here->BSIM4v4gdtot; } - if ((*(ckt->CKTstates[0] + here->BSIM4V4vds)) >= 0.0) + if ((*(ckt->CKTstates[0] + here->BSIM4v4vds)) >= 0.0) gspr = gspr / (1.0 + npart_theta * npart_theta * gspr - / here->BSIM4V4IdovVds); /* bugfix */ + / here->BSIM4v4IdovVds); /* bugfix */ else gdpr = gdpr / (1.0 + npart_theta * npart_theta * gdpr - / here->BSIM4V4IdovVds); + / here->BSIM4v4IdovVds); } - NevalSrc(&noizDens[BSIM4V4RDNOIZ], - &lnNdens[BSIM4V4RDNOIZ], ckt, THERMNOISE, - here->BSIM4V4dNodePrime, here->BSIM4V4dNode, + NevalSrc(&noizDens[BSIM4v4RDNOIZ], + &lnNdens[BSIM4v4RDNOIZ], ckt, THERMNOISE, + here->BSIM4v4dNodePrime, here->BSIM4v4dNode, gdpr * m); - NevalSrc(&noizDens[BSIM4V4RSNOIZ], - &lnNdens[BSIM4V4RSNOIZ], ckt, THERMNOISE, - here->BSIM4V4sNodePrime, here->BSIM4V4sNode, + NevalSrc(&noizDens[BSIM4v4RSNOIZ], + &lnNdens[BSIM4v4RSNOIZ], ckt, THERMNOISE, + here->BSIM4v4sNodePrime, here->BSIM4v4sNode, gspr * m); - if ((here->BSIM4V4rgateMod == 1) || (here->BSIM4V4rgateMod == 2)) - { NevalSrc(&noizDens[BSIM4V4RGNOIZ], - &lnNdens[BSIM4V4RGNOIZ], ckt, THERMNOISE, - here->BSIM4V4gNodePrime, here->BSIM4V4gNodeExt, - here->BSIM4V4grgeltd * m); + if ((here->BSIM4v4rgateMod == 1) || (here->BSIM4v4rgateMod == 2)) + { NevalSrc(&noizDens[BSIM4v4RGNOIZ], + &lnNdens[BSIM4v4RGNOIZ], ckt, THERMNOISE, + here->BSIM4v4gNodePrime, here->BSIM4v4gNodeExt, + here->BSIM4v4grgeltd * m); } - else if (here->BSIM4V4rgateMod == 3) - { NevalSrc(&noizDens[BSIM4V4RGNOIZ], - &lnNdens[BSIM4V4RGNOIZ], ckt, THERMNOISE, - here->BSIM4V4gNodeMid, here->BSIM4V4gNodeExt, - here->BSIM4V4grgeltd * m); + else if (here->BSIM4v4rgateMod == 3) + { NevalSrc(&noizDens[BSIM4v4RGNOIZ], + &lnNdens[BSIM4v4RGNOIZ], ckt, THERMNOISE, + here->BSIM4v4gNodeMid, here->BSIM4v4gNodeExt, + here->BSIM4v4grgeltd * m); } else - { noizDens[BSIM4V4RGNOIZ] = 0.0; - lnNdens[BSIM4V4RGNOIZ] = - log(MAX(noizDens[BSIM4V4RGNOIZ], N_MINLOG)); + { noizDens[BSIM4v4RGNOIZ] = 0.0; + lnNdens[BSIM4v4RGNOIZ] = + log(MAX(noizDens[BSIM4v4RGNOIZ], N_MINLOG)); } - if (here->BSIM4V4rbodyMod) - { NevalSrc(&noizDens[BSIM4V4RBPSNOIZ], - &lnNdens[BSIM4V4RBPSNOIZ], ckt, THERMNOISE, - here->BSIM4V4bNodePrime, here->BSIM4V4sbNode, - here->BSIM4V4grbps * m); - NevalSrc(&noizDens[BSIM4V4RBPDNOIZ], - &lnNdens[BSIM4V4RBPDNOIZ], ckt, THERMNOISE, - here->BSIM4V4bNodePrime, here->BSIM4V4dbNode, - here->BSIM4V4grbpd * m); - NevalSrc(&noizDens[BSIM4V4RBPBNOIZ], - &lnNdens[BSIM4V4RBPBNOIZ], ckt, THERMNOISE, - here->BSIM4V4bNodePrime, here->BSIM4V4bNode, - here->BSIM4V4grbpb * m); - NevalSrc(&noizDens[BSIM4V4RBSBNOIZ], - &lnNdens[BSIM4V4RBSBNOIZ], ckt, THERMNOISE, - here->BSIM4V4bNode, here->BSIM4V4sbNode, - here->BSIM4V4grbsb * m); - NevalSrc(&noizDens[BSIM4V4RBDBNOIZ], - &lnNdens[BSIM4V4RBDBNOIZ], ckt, THERMNOISE, - here->BSIM4V4bNode, here->BSIM4V4dbNode, - here->BSIM4V4grbdb * m); + if (here->BSIM4v4rbodyMod) + { NevalSrc(&noizDens[BSIM4v4RBPSNOIZ], + &lnNdens[BSIM4v4RBPSNOIZ], ckt, THERMNOISE, + here->BSIM4v4bNodePrime, here->BSIM4v4sbNode, + here->BSIM4v4grbps * m); + NevalSrc(&noizDens[BSIM4v4RBPDNOIZ], + &lnNdens[BSIM4v4RBPDNOIZ], ckt, THERMNOISE, + here->BSIM4v4bNodePrime, here->BSIM4v4dbNode, + here->BSIM4v4grbpd * m); + NevalSrc(&noizDens[BSIM4v4RBPBNOIZ], + &lnNdens[BSIM4v4RBPBNOIZ], ckt, THERMNOISE, + here->BSIM4v4bNodePrime, here->BSIM4v4bNode, + here->BSIM4v4grbpb * m); + NevalSrc(&noizDens[BSIM4v4RBSBNOIZ], + &lnNdens[BSIM4v4RBSBNOIZ], ckt, THERMNOISE, + here->BSIM4v4bNode, here->BSIM4v4sbNode, + here->BSIM4v4grbsb * m); + NevalSrc(&noizDens[BSIM4v4RBDBNOIZ], + &lnNdens[BSIM4v4RBDBNOIZ], ckt, THERMNOISE, + here->BSIM4v4bNode, here->BSIM4v4dbNode, + here->BSIM4v4grbdb * m); } else - { noizDens[BSIM4V4RBPSNOIZ] = noizDens[BSIM4V4RBPDNOIZ] = 0.0; - noizDens[BSIM4V4RBPBNOIZ] = 0.0; - noizDens[BSIM4V4RBSBNOIZ] = noizDens[BSIM4V4RBDBNOIZ] = 0.0; - lnNdens[BSIM4V4RBPSNOIZ] = - log(MAX(noizDens[BSIM4V4RBPSNOIZ], N_MINLOG)); - lnNdens[BSIM4V4RBPDNOIZ] = - log(MAX(noizDens[BSIM4V4RBPDNOIZ], N_MINLOG)); - lnNdens[BSIM4V4RBPBNOIZ] = - log(MAX(noizDens[BSIM4V4RBPBNOIZ], N_MINLOG)); - lnNdens[BSIM4V4RBSBNOIZ] = - log(MAX(noizDens[BSIM4V4RBSBNOIZ], N_MINLOG)); - lnNdens[BSIM4V4RBDBNOIZ] = - log(MAX(noizDens[BSIM4V4RBDBNOIZ], N_MINLOG)); + { noizDens[BSIM4v4RBPSNOIZ] = noizDens[BSIM4v4RBPDNOIZ] = 0.0; + noizDens[BSIM4v4RBPBNOIZ] = 0.0; + noizDens[BSIM4v4RBSBNOIZ] = noizDens[BSIM4v4RBDBNOIZ] = 0.0; + lnNdens[BSIM4v4RBPSNOIZ] = + log(MAX(noizDens[BSIM4v4RBPSNOIZ], N_MINLOG)); + lnNdens[BSIM4v4RBPDNOIZ] = + log(MAX(noizDens[BSIM4v4RBPDNOIZ], N_MINLOG)); + lnNdens[BSIM4v4RBPBNOIZ] = + log(MAX(noizDens[BSIM4v4RBPBNOIZ], N_MINLOG)); + lnNdens[BSIM4v4RBSBNOIZ] = + log(MAX(noizDens[BSIM4v4RBSBNOIZ], N_MINLOG)); + lnNdens[BSIM4v4RBDBNOIZ] = + log(MAX(noizDens[BSIM4v4RBDBNOIZ], N_MINLOG)); } - switch(model->BSIM4V4tnoiMod) + switch(model->BSIM4v4tnoiMod) { case 0: - T0 = m * here->BSIM4V4ueff * fabs(here->BSIM4V4qinv); - T1 = T0 * tmp + pParam->BSIM4V4leff - * pParam->BSIM4V4leff; - NevalSrc(&noizDens[BSIM4V4IDNOIZ], - &lnNdens[BSIM4V4IDNOIZ], ckt, - THERMNOISE, here->BSIM4V4dNodePrime, - here->BSIM4V4sNodePrime, - (T0 / T1) * model->BSIM4V4ntnoi); + T0 = m * here->BSIM4v4ueff * fabs(here->BSIM4v4qinv); + T1 = T0 * tmp + pParam->BSIM4v4leff + * pParam->BSIM4v4leff; + NevalSrc(&noizDens[BSIM4v4IDNOIZ], + &lnNdens[BSIM4v4IDNOIZ], ckt, + THERMNOISE, here->BSIM4v4dNodePrime, + here->BSIM4v4sNodePrime, + (T0 / T1) * model->BSIM4v4ntnoi); break; case 1: - T0 = m * (here->BSIM4V4gm + here->BSIM4V4gmbs + here->BSIM4V4gds); + T0 = m * (here->BSIM4v4gm + here->BSIM4v4gmbs + here->BSIM4v4gds); T0 *= T0; - igsquare = npart_theta * npart_theta * T0 / here->BSIM4V4IdovVds; - T1 = npart_beta * (here->BSIM4V4gm - + here->BSIM4V4gmbs) + here->BSIM4V4gds; - T2 = T1 * T1 / here->BSIM4V4IdovVds; - NevalSrc(&noizDens[BSIM4V4IDNOIZ], - &lnNdens[BSIM4V4IDNOIZ], ckt, - THERMNOISE, here->BSIM4V4dNodePrime, - here->BSIM4V4sNodePrime, (T2 - igsquare)); + igsquare = npart_theta * npart_theta * T0 / here->BSIM4v4IdovVds; + T1 = npart_beta * (here->BSIM4v4gm + + here->BSIM4v4gmbs) + here->BSIM4v4gds; + T2 = T1 * T1 / here->BSIM4v4IdovVds; + NevalSrc(&noizDens[BSIM4v4IDNOIZ], + &lnNdens[BSIM4v4IDNOIZ], ckt, + THERMNOISE, here->BSIM4v4dNodePrime, + here->BSIM4v4sNodePrime, (T2 - igsquare)); break; } - NevalSrc(&noizDens[BSIM4V4FLNOIZ], (double*) NULL, - ckt, N_GAIN, here->BSIM4V4dNodePrime, - here->BSIM4V4sNodePrime, (double) 0.0); + NevalSrc(&noizDens[BSIM4v4FLNOIZ], (double*) NULL, + ckt, N_GAIN, here->BSIM4v4dNodePrime, + here->BSIM4v4sNodePrime, (double) 0.0); - switch(model->BSIM4V4fnoiMod) + switch(model->BSIM4v4fnoiMod) { case 0: - noizDens[BSIM4V4FLNOIZ] *= m * model->BSIM4V4kf - * exp(model->BSIM4V4af - * log(MAX(fabs(here->BSIM4V4cd), + noizDens[BSIM4v4FLNOIZ] *= m * model->BSIM4v4kf + * exp(model->BSIM4v4af + * log(MAX(fabs(here->BSIM4v4cd), N_MINLOG))) - / (pow(data->freq, model->BSIM4V4ef) - * pParam->BSIM4V4leff - * pParam->BSIM4V4leff - * model->BSIM4V4coxe); + / (pow(data->freq, model->BSIM4v4ef) + * pParam->BSIM4v4leff + * pParam->BSIM4v4leff + * model->BSIM4v4coxe); break; case 1: - Vds = *(ckt->CKTstates[0] + here->BSIM4V4vds); + Vds = *(ckt->CKTstates[0] + here->BSIM4v4vds); if (Vds < 0.0) Vds = -Vds; - Ssi = Eval1ovFNoise(Vds, model, here, + Ssi = BSIM4v4Eval1ovFNoise(Vds, model, here, data->freq, ckt->CKTtemp); - T10 = model->BSIM4V4oxideTrapDensityA + T10 = model->BSIM4v4oxideTrapDensityA * CONSTboltz * ckt->CKTtemp; - T11 = pParam->BSIM4V4weff * pParam->BSIM4V4leff - * pow(data->freq, model->BSIM4V4ef) * 1.0e10 - * here->BSIM4V4nstar * here->BSIM4V4nstar; - Swi = T10 / T11 * here->BSIM4V4cd - * here->BSIM4V4cd; + T11 = pParam->BSIM4v4weff * pParam->BSIM4v4leff + * pow(data->freq, model->BSIM4v4ef) * 1.0e10 + * here->BSIM4v4nstar * here->BSIM4v4nstar; + Swi = T10 / T11 * here->BSIM4v4cd + * here->BSIM4v4cd; T1 = Swi + Ssi; if (T1 > 0.0) - noizDens[BSIM4V4FLNOIZ] *= m * (Ssi * Swi) / T1; + noizDens[BSIM4v4FLNOIZ] *= m * (Ssi * Swi) / T1; else - noizDens[BSIM4V4FLNOIZ] *= 0.0; + noizDens[BSIM4v4FLNOIZ] *= 0.0; break; } - lnNdens[BSIM4V4FLNOIZ] = - log(MAX(noizDens[BSIM4V4FLNOIZ], N_MINLOG)); + lnNdens[BSIM4v4FLNOIZ] = + log(MAX(noizDens[BSIM4v4FLNOIZ], N_MINLOG)); - if(here->BSIM4V4mode >= 0) { /* bugfix */ - NevalSrc(&noizDens[BSIM4V4IGSNOIZ], - &lnNdens[BSIM4V4IGSNOIZ], ckt, SHOTNOISE, - here->BSIM4V4gNodePrime, here->BSIM4V4sNodePrime, - m * (here->BSIM4V4Igs + here->BSIM4V4Igcs)); - NevalSrc(&noizDens[BSIM4V4IGDNOIZ], - &lnNdens[BSIM4V4IGDNOIZ], ckt, SHOTNOISE, - here->BSIM4V4gNodePrime, here->BSIM4V4dNodePrime, - m * (here->BSIM4V4Igd + here->BSIM4V4Igcd)); + if(here->BSIM4v4mode >= 0) { /* bugfix */ + NevalSrc(&noizDens[BSIM4v4IGSNOIZ], + &lnNdens[BSIM4v4IGSNOIZ], ckt, SHOTNOISE, + here->BSIM4v4gNodePrime, here->BSIM4v4sNodePrime, + m * (here->BSIM4v4Igs + here->BSIM4v4Igcs)); + NevalSrc(&noizDens[BSIM4v4IGDNOIZ], + &lnNdens[BSIM4v4IGDNOIZ], ckt, SHOTNOISE, + here->BSIM4v4gNodePrime, here->BSIM4v4dNodePrime, + m * (here->BSIM4v4Igd + here->BSIM4v4Igcd)); } else { - NevalSrc(&noizDens[BSIM4V4IGSNOIZ], - &lnNdens[BSIM4V4IGSNOIZ], ckt, SHOTNOISE, - here->BSIM4V4gNodePrime, here->BSIM4V4sNodePrime, - m * (here->BSIM4V4Igs + here->BSIM4V4Igcd)); - NevalSrc(&noizDens[BSIM4V4IGDNOIZ], - &lnNdens[BSIM4V4IGDNOIZ], ckt, SHOTNOISE, - here->BSIM4V4gNodePrime, here->BSIM4V4dNodePrime, - m * (here->BSIM4V4Igd + here->BSIM4V4Igcs)); + NevalSrc(&noizDens[BSIM4v4IGSNOIZ], + &lnNdens[BSIM4v4IGSNOIZ], ckt, SHOTNOISE, + here->BSIM4v4gNodePrime, here->BSIM4v4sNodePrime, + m * (here->BSIM4v4Igs + here->BSIM4v4Igcd)); + NevalSrc(&noizDens[BSIM4v4IGDNOIZ], + &lnNdens[BSIM4v4IGDNOIZ], ckt, SHOTNOISE, + here->BSIM4v4gNodePrime, here->BSIM4v4dNodePrime, + m * (here->BSIM4v4Igd + here->BSIM4v4Igcs)); } - NevalSrc(&noizDens[BSIM4V4IGBNOIZ], - &lnNdens[BSIM4V4IGBNOIZ], ckt, SHOTNOISE, - here->BSIM4V4gNodePrime, here->BSIM4V4bNodePrime, - m * here->BSIM4V4Igb); + NevalSrc(&noizDens[BSIM4v4IGBNOIZ], + &lnNdens[BSIM4v4IGBNOIZ], ckt, SHOTNOISE, + here->BSIM4v4gNodePrime, here->BSIM4v4bNodePrime, + m * here->BSIM4v4Igb); - noizDens[BSIM4V4TOTNOIZ] = noizDens[BSIM4V4RDNOIZ] - + noizDens[BSIM4V4RSNOIZ] + noizDens[BSIM4V4RGNOIZ] - + noizDens[BSIM4V4RBPSNOIZ] + noizDens[BSIM4V4RBPDNOIZ] - + noizDens[BSIM4V4RBPBNOIZ] - + noizDens[BSIM4V4RBSBNOIZ] + noizDens[BSIM4V4RBDBNOIZ] - + noizDens[BSIM4V4IDNOIZ] + noizDens[BSIM4V4FLNOIZ] - + noizDens[BSIM4V4IGSNOIZ] + noizDens[BSIM4V4IGDNOIZ] - + noizDens[BSIM4V4IGBNOIZ]; - lnNdens[BSIM4V4TOTNOIZ] = - log(MAX(noizDens[BSIM4V4TOTNOIZ], N_MINLOG)); + noizDens[BSIM4v4TOTNOIZ] = noizDens[BSIM4v4RDNOIZ] + + noizDens[BSIM4v4RSNOIZ] + noizDens[BSIM4v4RGNOIZ] + + noizDens[BSIM4v4RBPSNOIZ] + noizDens[BSIM4v4RBPDNOIZ] + + noizDens[BSIM4v4RBPBNOIZ] + + noizDens[BSIM4v4RBSBNOIZ] + noizDens[BSIM4v4RBDBNOIZ] + + noizDens[BSIM4v4IDNOIZ] + noizDens[BSIM4v4FLNOIZ] + + noizDens[BSIM4v4IGSNOIZ] + noizDens[BSIM4v4IGDNOIZ] + + noizDens[BSIM4v4IGBNOIZ]; + lnNdens[BSIM4v4TOTNOIZ] = + log(MAX(noizDens[BSIM4v4TOTNOIZ], N_MINLOG)); - *OnDens += noizDens[BSIM4V4TOTNOIZ]; + *OnDens += noizDens[BSIM4v4TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous @@ -406,8 +406,8 @@ int i; "history" variables. */ - for (i = 0; i < BSIM4V4NSRCS; i++) - { here->BSIM4V4nVar[LNLSTDENS][i] = + for (i = 0; i < BSIM4v4NSRCS; i++) + { here->BSIM4v4nVar[LNLSTDENS][i] = lnNdens[i]; } @@ -416,9 +416,9 @@ int i; */ if (data->freq == ((NOISEAN*) ckt->CKTcurJob)->NstartFreq) - { for (i = 0; i < BSIM4V4NSRCS; i++) - { here->BSIM4V4nVar[OUTNOIZ][i] = 0.0; - here->BSIM4V4nVar[INNOIZ][i] = 0.0; + { for (i = 0; i < BSIM4v4NSRCS; i++) + { here->BSIM4v4nVar[OUTNOIZ][i] = 0.0; + here->BSIM4v4nVar[INNOIZ][i] = 0.0; } } } @@ -426,37 +426,37 @@ int i; { /* data->delFreq != 0.0, we have to integrate. */ - for (i = 0; i < BSIM4V4NSRCS; i++) - { if (i != BSIM4V4TOTNOIZ) + for (i = 0; i < BSIM4v4NSRCS; i++) + { if (i != BSIM4v4TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], - here->BSIM4V4nVar[LNLSTDENS][i], + here->BSIM4v4nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, - here->BSIM4V4nVar[LNLSTDENS][i] + here->BSIM4v4nVar[LNLSTDENS][i] + data->lnGainInv, data); - here->BSIM4V4nVar[LNLSTDENS][i] = + here->BSIM4v4nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (((NOISEAN*) ckt->CKTcurJob)->NStpsSm != 0) - { here->BSIM4V4nVar[OUTNOIZ][i] + { here->BSIM4v4nVar[OUTNOIZ][i] += tempOnoise; - here->BSIM4V4nVar[OUTNOIZ][BSIM4V4TOTNOIZ] + here->BSIM4v4nVar[OUTNOIZ][BSIM4v4TOTNOIZ] += tempOnoise; - here->BSIM4V4nVar[INNOIZ][i] + here->BSIM4v4nVar[INNOIZ][i] += tempInoise; - here->BSIM4V4nVar[INNOIZ][BSIM4V4TOTNOIZ] + here->BSIM4v4nVar[INNOIZ][BSIM4v4TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) - { for (i = 0; i < BSIM4V4NSRCS; i++) + { for (i = 0; i < BSIM4v4NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; @@ -466,11 +466,11 @@ int i; case INT_NOIZ: /* already calculated, just output */ if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) - { for (i = 0; i < BSIM4V4NSRCS; i++) + { for (i = 0; i < BSIM4v4NSRCS; i++) { data->outpVector[data->outNumber++] - = here->BSIM4V4nVar[OUTNOIZ][i]; + = here->BSIM4v4nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] - = here->BSIM4V4nVar[INNOIZ][i]; + = here->BSIM4v4nVar[INNOIZ][i]; } } break; diff --git a/src/spicelib/devices/bsim4v4/b4v4par.c b/src/spicelib/devices/bsim4v4/b4v4par.c index dbc7f1ddd..ed2d1f3c1 100644 --- a/src/spicelib/devices/bsim4v4/b4v4par.c +++ b/src/spicelib/devices/bsim4v4/b4v4par.c @@ -19,7 +19,7 @@ #include "fteext.h" int -BSIM4V4param(param,value,inst,select) +BSIM4v4param(param,value,inst,select) int param; IFvalue *value; GENinstance *inst; @@ -29,134 +29,134 @@ IFvalue *select; if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1; - BSIM4V4instance *here = (BSIM4V4instance*)inst; + BSIM4v4instance *here = (BSIM4v4instance*)inst; switch(param) - { case BSIM4V4_W: - here->BSIM4V4w = value->rValue*scale; - here->BSIM4V4wGiven = TRUE; + { case BSIM4v4_W: + here->BSIM4v4w = value->rValue*scale; + here->BSIM4v4wGiven = TRUE; break; - case BSIM4V4_L: - here->BSIM4V4l = value->rValue*scale; - here->BSIM4V4lGiven = TRUE; + case BSIM4v4_L: + here->BSIM4v4l = value->rValue*scale; + here->BSIM4v4lGiven = TRUE; break; - case BSIM4V4_M: - here->BSIM4V4m = value->rValue; - here->BSIM4V4mGiven = TRUE; + case BSIM4v4_M: + here->BSIM4v4m = value->rValue; + here->BSIM4v4mGiven = TRUE; break; - case BSIM4V4_NF: - here->BSIM4V4nf = value->rValue; - here->BSIM4V4nfGiven = TRUE; + case BSIM4v4_NF: + here->BSIM4v4nf = value->rValue; + here->BSIM4v4nfGiven = TRUE; break; - case BSIM4V4_MIN: - here->BSIM4V4min = value->iValue; - here->BSIM4V4minGiven = TRUE; + case BSIM4v4_MIN: + here->BSIM4v4min = value->iValue; + here->BSIM4v4minGiven = TRUE; break; - case BSIM4V4_AS: - here->BSIM4V4sourceArea = value->rValue*scale*scale; - here->BSIM4V4sourceAreaGiven = TRUE; + case BSIM4v4_AS: + here->BSIM4v4sourceArea = value->rValue*scale*scale; + here->BSIM4v4sourceAreaGiven = TRUE; break; - case BSIM4V4_AD: - here->BSIM4V4drainArea = value->rValue*scale*scale; - here->BSIM4V4drainAreaGiven = TRUE; + case BSIM4v4_AD: + here->BSIM4v4drainArea = value->rValue*scale*scale; + here->BSIM4v4drainAreaGiven = TRUE; break; - case BSIM4V4_PS: - here->BSIM4V4sourcePerimeter = value->rValue*scale; - here->BSIM4V4sourcePerimeterGiven = TRUE; + case BSIM4v4_PS: + here->BSIM4v4sourcePerimeter = value->rValue*scale; + here->BSIM4v4sourcePerimeterGiven = TRUE; break; - case BSIM4V4_PD: - here->BSIM4V4drainPerimeter = value->rValue*scale; - here->BSIM4V4drainPerimeterGiven = TRUE; + case BSIM4v4_PD: + here->BSIM4v4drainPerimeter = value->rValue*scale; + here->BSIM4v4drainPerimeterGiven = TRUE; break; - case BSIM4V4_NRS: - here->BSIM4V4sourceSquares = value->rValue; - here->BSIM4V4sourceSquaresGiven = TRUE; + case BSIM4v4_NRS: + here->BSIM4v4sourceSquares = value->rValue; + here->BSIM4v4sourceSquaresGiven = TRUE; break; - case BSIM4V4_NRD: - here->BSIM4V4drainSquares = value->rValue; - here->BSIM4V4drainSquaresGiven = TRUE; + case BSIM4v4_NRD: + here->BSIM4v4drainSquares = value->rValue; + here->BSIM4v4drainSquaresGiven = TRUE; break; - case BSIM4V4_OFF: - here->BSIM4V4off = value->iValue; + case BSIM4v4_OFF: + here->BSIM4v4off = value->iValue; break; - case BSIM4V4_SA: - here->BSIM4V4sa = value->rValue*scale; - here->BSIM4V4saGiven = TRUE; + case BSIM4v4_SA: + here->BSIM4v4sa = value->rValue*scale; + here->BSIM4v4saGiven = TRUE; break; - case BSIM4V4_SB: - here->BSIM4V4sb = value->rValue*scale; - here->BSIM4V4sbGiven = TRUE; + case BSIM4v4_SB: + here->BSIM4v4sb = value->rValue*scale; + here->BSIM4v4sbGiven = TRUE; break; - case BSIM4V4_SD: - here->BSIM4V4sd = value->rValue*scale; - here->BSIM4V4sdGiven = TRUE; + case BSIM4v4_SD: + here->BSIM4v4sd = value->rValue*scale; + here->BSIM4v4sdGiven = TRUE; break; - case BSIM4V4_RBSB: - here->BSIM4V4rbsb = value->rValue; - here->BSIM4V4rbsbGiven = TRUE; + case BSIM4v4_RBSB: + here->BSIM4v4rbsb = value->rValue; + here->BSIM4v4rbsbGiven = TRUE; break; - case BSIM4V4_RBDB: - here->BSIM4V4rbdb = value->rValue; - here->BSIM4V4rbdbGiven = TRUE; + case BSIM4v4_RBDB: + here->BSIM4v4rbdb = value->rValue; + here->BSIM4v4rbdbGiven = TRUE; break; - case BSIM4V4_RBPB: - here->BSIM4V4rbpb = value->rValue; - here->BSIM4V4rbpbGiven = TRUE; + case BSIM4v4_RBPB: + here->BSIM4v4rbpb = value->rValue; + here->BSIM4v4rbpbGiven = TRUE; break; - case BSIM4V4_RBPS: - here->BSIM4V4rbps = value->rValue; - here->BSIM4V4rbpsGiven = TRUE; + case BSIM4v4_RBPS: + here->BSIM4v4rbps = value->rValue; + here->BSIM4v4rbpsGiven = TRUE; break; - case BSIM4V4_RBPD: - here->BSIM4V4rbpd = value->rValue; - here->BSIM4V4rbpdGiven = TRUE; + case BSIM4v4_RBPD: + here->BSIM4v4rbpd = value->rValue; + here->BSIM4v4rbpdGiven = TRUE; break; - case BSIM4V4_TRNQSMOD: - here->BSIM4V4trnqsMod = value->iValue; - here->BSIM4V4trnqsModGiven = TRUE; + case BSIM4v4_TRNQSMOD: + here->BSIM4v4trnqsMod = value->iValue; + here->BSIM4v4trnqsModGiven = TRUE; break; - case BSIM4V4_ACNQSMOD: - here->BSIM4V4acnqsMod = value->iValue; - here->BSIM4V4acnqsModGiven = TRUE; + case BSIM4v4_ACNQSMOD: + here->BSIM4v4acnqsMod = value->iValue; + here->BSIM4v4acnqsModGiven = TRUE; break; - case BSIM4V4_RBODYMOD: - here->BSIM4V4rbodyMod = value->iValue; - here->BSIM4V4rbodyModGiven = TRUE; + case BSIM4v4_RBODYMOD: + here->BSIM4v4rbodyMod = value->iValue; + here->BSIM4v4rbodyModGiven = TRUE; break; - case BSIM4V4_RGATEMOD: - here->BSIM4V4rgateMod = value->iValue; - here->BSIM4V4rgateModGiven = TRUE; + case BSIM4v4_RGATEMOD: + here->BSIM4v4rgateMod = value->iValue; + here->BSIM4v4rgateModGiven = TRUE; break; - case BSIM4V4_GEOMOD: - here->BSIM4V4geoMod = value->iValue; - here->BSIM4V4geoModGiven = TRUE; + case BSIM4v4_GEOMOD: + here->BSIM4v4geoMod = value->iValue; + here->BSIM4v4geoModGiven = TRUE; break; - case BSIM4V4_RGEOMOD: - here->BSIM4V4rgeoMod = value->iValue; - here->BSIM4V4rgeoModGiven = TRUE; + case BSIM4v4_RGEOMOD: + here->BSIM4v4rgeoMod = value->iValue; + here->BSIM4v4rgeoModGiven = TRUE; break; - case BSIM4V4_IC_VDS: - here->BSIM4V4icVDS = value->rValue; - here->BSIM4V4icVDSGiven = TRUE; + case BSIM4v4_IC_VDS: + here->BSIM4v4icVDS = value->rValue; + here->BSIM4v4icVDSGiven = TRUE; break; - case BSIM4V4_IC_VGS: - here->BSIM4V4icVGS = value->rValue; - here->BSIM4V4icVGSGiven = TRUE; + case BSIM4v4_IC_VGS: + here->BSIM4v4icVGS = value->rValue; + here->BSIM4v4icVGSGiven = TRUE; break; - case BSIM4V4_IC_VBS: - here->BSIM4V4icVBS = value->rValue; - here->BSIM4V4icVBSGiven = TRUE; + case BSIM4v4_IC_VBS: + here->BSIM4v4icVBS = value->rValue; + here->BSIM4v4icVBSGiven = TRUE; break; - case BSIM4V4_IC: + case BSIM4v4_IC: switch(value->v.numValue) { case 3: - here->BSIM4V4icVBS = *(value->v.vec.rVec+2); - here->BSIM4V4icVBSGiven = TRUE; + here->BSIM4v4icVBS = *(value->v.vec.rVec+2); + here->BSIM4v4icVBSGiven = TRUE; case 2: - here->BSIM4V4icVGS = *(value->v.vec.rVec+1); - here->BSIM4V4icVGSGiven = TRUE; + here->BSIM4v4icVGS = *(value->v.vec.rVec+1); + here->BSIM4v4icVGSGiven = TRUE; case 1: - here->BSIM4V4icVDS = *(value->v.vec.rVec); - here->BSIM4V4icVDSGiven = TRUE; + here->BSIM4v4icVDS = *(value->v.vec.rVec); + here->BSIM4v4icVDSGiven = TRUE; break; default: return(E_BADPARM); diff --git a/src/spicelib/devices/bsim4v4/b4v4pzld.c b/src/spicelib/devices/bsim4v4/b4v4pzld.c index cfd534d4e..fad9cb4db 100644 --- a/src/spicelib/devices/bsim4v4/b4v4pzld.c +++ b/src/spicelib/devices/bsim4v4/b4v4pzld.c @@ -17,13 +17,13 @@ #include "suffix.h" int -BSIM4V4pzLoad(inModel,ckt,s) +BSIM4v4pzLoad(inModel,ckt,s) GENmodel *inModel; CKTcircuit *ckt; SPcomplex *s; { -BSIM4V4model *model = (BSIM4V4model*)inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model*)inModel; +BSIM4v4instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; @@ -50,28 +50,28 @@ double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; - for (; model != NULL; model = model->BSIM4V4nextModel) - { for (here = model->BSIM4V4instances; here!= NULL; - here = here->BSIM4V4nextInstance) - { if (here->BSIM4V4owner != ARCHme) continue; + for (; model != NULL; model = model->BSIM4v4nextModel) + { for (here = model->BSIM4v4instances; here!= NULL; + here = here->BSIM4v4nextInstance) + { if (here->BSIM4v4owner != ARCHme) continue; pParam = here->pParam; - capbd = here->BSIM4V4capbd; - capbs = here->BSIM4V4capbs; - cgso = here->BSIM4V4cgso; - cgdo = here->BSIM4V4cgdo; - cgbo = pParam->BSIM4V4cgbo; - - if (here->BSIM4V4mode >= 0) - { Gm = here->BSIM4V4gm; - Gmbs = here->BSIM4V4gmbs; + capbd = here->BSIM4v4capbd; + capbs = here->BSIM4v4capbs; + cgso = here->BSIM4v4cgso; + cgdo = here->BSIM4v4cgdo; + cgbo = pParam->BSIM4v4cgbo; + + if (here->BSIM4v4mode >= 0) + { Gm = here->BSIM4v4gm; + Gmbs = here->BSIM4v4gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; - gbbdp = -(here->BSIM4V4gbds); - gbbsp = here->BSIM4V4gbds + here->BSIM4V4gbgs + here->BSIM4V4gbbs; - gbdpg = here->BSIM4V4gbgs; - gbdpdp = here->BSIM4V4gbds; - gbdpb = here->BSIM4V4gbbs; + gbbdp = -(here->BSIM4v4gbds); + gbbsp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; + gbdpg = here->BSIM4v4gbgs; + gbdpdp = here->BSIM4v4gbds; + gbdpb = here->BSIM4v4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; @@ -79,32 +79,32 @@ double m; gbspb = 0.0; gbspsp = 0.0; - if (model->BSIM4V4igcMod) - { gIstotg = here->BSIM4V4gIgsg + here->BSIM4V4gIgcsg; - gIstotd = here->BSIM4V4gIgcsd; - gIstots = here->BSIM4V4gIgss + here->BSIM4V4gIgcss; - gIstotb = here->BSIM4V4gIgcsb; + if (model->BSIM4v4igcMod) + { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg; + gIstotd = here->BSIM4v4gIgcsd; + gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcss; + gIstotb = here->BSIM4v4gIgcsb; - gIdtotg = here->BSIM4V4gIgdg + here->BSIM4V4gIgcdg; - gIdtotd = here->BSIM4V4gIgdd + here->BSIM4V4gIgcdd; - gIdtots = here->BSIM4V4gIgcds; - gIdtotb = here->BSIM4V4gIgcdb; + gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcdg; + gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcdd; + gIdtots = here->BSIM4v4gIgcds; + gIdtotb = here->BSIM4v4gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } - if (model->BSIM4V4igbMod) - { gIbtotg = here->BSIM4V4gIgbg; - gIbtotd = here->BSIM4V4gIgbd; - gIbtots = here->BSIM4V4gIgbs; - gIbtotb = here->BSIM4V4gIgbb; + if (model->BSIM4v4igbMod) + { gIbtotg = here->BSIM4v4gIgbg; + gIbtotd = here->BSIM4v4gIgbd; + gIbtots = here->BSIM4v4gIgbs; + gIbtotb = here->BSIM4v4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; - if ((model->BSIM4V4igcMod != 0) || (model->BSIM4V4igbMod != 0)) + if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; @@ -113,83 +113,83 @@ double m; else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; - if (here->BSIM4V4rgateMod == 2) - T0 = *(ckt->CKTstates[0] + here->BSIM4V4vges) - - *(ckt->CKTstates[0] + here->BSIM4V4vgs); - else if (here->BSIM4V4rgateMod == 3) - T0 = *(ckt->CKTstates[0] + here->BSIM4V4vgms) - - *(ckt->CKTstates[0] + here->BSIM4V4vgs); - if (here->BSIM4V4rgateMod > 1) - { gcrgd = here->BSIM4V4gcrgd * T0; - gcrgg = here->BSIM4V4gcrgg * T0; - gcrgs = here->BSIM4V4gcrgs * T0; - gcrgb = here->BSIM4V4gcrgb * T0; - gcrgg -= here->BSIM4V4gcrg; - gcrg = here->BSIM4V4gcrg; + if (here->BSIM4v4rgateMod == 2) + T0 = *(ckt->CKTstates[0] + here->BSIM4v4vges) + - *(ckt->CKTstates[0] + here->BSIM4v4vgs); + else if (here->BSIM4v4rgateMod == 3) + T0 = *(ckt->CKTstates[0] + here->BSIM4v4vgms) + - *(ckt->CKTstates[0] + here->BSIM4v4vgs); + if (here->BSIM4v4rgateMod > 1) + { gcrgd = here->BSIM4v4gcrgd * T0; + gcrgg = here->BSIM4v4gcrgg * T0; + gcrgs = here->BSIM4v4gcrgs * T0; + gcrgb = here->BSIM4v4gcrgb * T0; + gcrgg -= here->BSIM4v4gcrg; + gcrg = here->BSIM4v4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; - if (here->BSIM4V4acnqsMod == 0) - { if (here->BSIM4V4rgateMod == 3) - { xcgmgmb = cgdo + cgso + pParam->BSIM4V4cgbo; + if (here->BSIM4v4acnqsMod == 0) + { if (here->BSIM4v4rgateMod == 3) + { xcgmgmb = cgdo + cgso + pParam->BSIM4v4cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; - xcgmbb = -pParam->BSIM4V4cgbo; + xcgmbb = -pParam->BSIM4v4cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; - xcggb = here->BSIM4V4cggb; - xcgdb = here->BSIM4V4cgdb; - xcgsb = here->BSIM4V4cgsb; + xcggb = here->BSIM4v4cggb; + xcgdb = here->BSIM4v4cgdb; + xcgsb = here->BSIM4v4cgsb; xcgbb = -(xcggb + xcgdb + xcgsb); - xcdgb = here->BSIM4V4cdgb; - xcsgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb - + here->BSIM4V4cdgb); - xcbgb = here->BSIM4V4cbgb; + xcdgb = here->BSIM4v4cdgb; + xcsgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + + here->BSIM4v4cdgb); + xcbgb = here->BSIM4v4cbgb; } else - { xcggb = here->BSIM4V4cggb + cgdo + cgso - + pParam->BSIM4V4cgbo; - xcgdb = here->BSIM4V4cgdb - cgdo; - xcgsb = here->BSIM4V4cgsb - cgso; + { xcggb = here->BSIM4v4cggb + cgdo + cgso + + pParam->BSIM4v4cgbo; + xcgdb = here->BSIM4v4cgdb - cgdo; + xcgsb = here->BSIM4v4cgsb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); - xcdgb = here->BSIM4V4cdgb - cgdo; - xcsgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb - + here->BSIM4V4cdgb + cgso); - xcbgb = here->BSIM4V4cbgb - pParam->BSIM4V4cgbo; + xcdgb = here->BSIM4v4cdgb - cgdo; + xcsgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + + here->BSIM4v4cdgb + cgso); + xcbgb = here->BSIM4v4cbgb - pParam->BSIM4v4cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } - xcddb = here->BSIM4V4cddb + here->BSIM4V4capbd + cgdo; - xcdsb = here->BSIM4V4cdsb; + xcddb = here->BSIM4v4cddb + here->BSIM4v4capbd + cgdo; + xcdsb = here->BSIM4v4cdsb; - xcsdb = -(here->BSIM4V4cgdb + here->BSIM4V4cbdb - + here->BSIM4V4cddb); - xcssb = here->BSIM4V4capbs + cgso - (here->BSIM4V4cgsb - + here->BSIM4V4cbsb + here->BSIM4V4cdsb); + xcsdb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb + + here->BSIM4v4cddb); + xcssb = here->BSIM4v4capbs + cgso - (here->BSIM4v4cgsb + + here->BSIM4v4cbsb + here->BSIM4v4cdsb); - if (!here->BSIM4V4rbodyMod) + if (!here->BSIM4v4rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); - xcbdb = here->BSIM4V4cbdb - here->BSIM4V4capbd; - xcbsb = here->BSIM4V4cbsb - here->BSIM4V4capbs; + xcbdb = here->BSIM4v4cbdb - here->BSIM4v4capbd; + xcbsb = here->BSIM4v4cbsb - here->BSIM4v4capbs; xcdbdb = 0.0; } else - { xcdbb = -(here->BSIM4V4cddb + here->BSIM4V4cdgb - + here->BSIM4V4cdsb); + { xcdbb = -(here->BSIM4v4cddb + here->BSIM4v4cdgb + + here->BSIM4v4cdsb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb) - + here->BSIM4V4capbs; - xcbdb = here->BSIM4V4cbdb; - xcbsb = here->BSIM4V4cbsb; + + here->BSIM4v4capbs; + xcbdb = here->BSIM4v4cbdb; + xcbsb = here->BSIM4v4cbsb; - xcdbdb = -here->BSIM4V4capbd; - xcsbsb = -here->BSIM4V4capbs; + xcdbdb = -here->BSIM4v4capbd; + xcsbsb = -here->BSIM4v4capbs; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); @@ -207,24 +207,24 @@ double m; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; - xgtg = here->BSIM4V4gtg; - xgtd = here->BSIM4V4gtd; - xgts = here->BSIM4V4gts; - xgtb = here->BSIM4V4gtb; + xgtg = here->BSIM4v4gtg; + xgtd = here->BSIM4v4gtd; + xgts = here->BSIM4v4gts; + xgtb = here->BSIM4v4gtb; - xcqgb = here->BSIM4V4cqgb; - xcqdb = here->BSIM4V4cqdb; - xcqsb = here->BSIM4V4cqsb; - xcqbb = here->BSIM4V4cqbb; + xcqgb = here->BSIM4v4cqgb; + xcqdb = here->BSIM4v4cqdb; + xcqsb = here->BSIM4v4cqsb; + xcqbb = here->BSIM4v4cqbb; - CoxWL = model->BSIM4V4coxe * here->pParam->BSIM4V4weffCV - * here->BSIM4V4nf * here->pParam->BSIM4V4leffCV; - qcheq = -(here->BSIM4V4qgate + here->BSIM4V4qbulk); + CoxWL = model->BSIM4v4coxe * here->pParam->BSIM4v4weffCV + * here->BSIM4v4nf * here->pParam->BSIM4v4leffCV; + qcheq = -(here->BSIM4v4qgate + here->BSIM4v4qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) - { if (model->BSIM4V4xpart < 0.5) + { if (model->BSIM4v4xpart < 0.5) { dxpart = 0.4; } - else if (model->BSIM4V4xpart > 0.5) + else if (model->BSIM4v4xpart > 0.5) { dxpart = 0.0; } else @@ -234,19 +234,19 @@ double m; = ddxpart_dVs = 0.0; } else - { dxpart = here->BSIM4V4qdrn / qcheq; - Cdd = here->BSIM4V4cddb; - Csd = -(here->BSIM4V4cgdb + here->BSIM4V4cddb - + here->BSIM4V4cbdb); + { dxpart = here->BSIM4v4qdrn / qcheq; + Cdd = here->BSIM4v4cddb; + Csd = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + + here->BSIM4v4cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; - Cdg = here->BSIM4V4cdgb; - Csg = -(here->BSIM4V4cggb + here->BSIM4V4cdgb - + here->BSIM4V4cbgb); + Cdg = here->BSIM4v4cdgb; + Csg = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + + here->BSIM4v4cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; - Cds = here->BSIM4V4cdsb; - Css = -(here->BSIM4V4cgsb + here->BSIM4V4cdsb - + here->BSIM4V4cbsb); + Cds = here->BSIM4v4cdsb; + Css = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + + here->BSIM4v4cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg @@ -260,50 +260,50 @@ double m; } } else - { Gm = -here->BSIM4V4gm; - Gmbs = -here->BSIM4V4gmbs; + { Gm = -here->BSIM4v4gm; + Gmbs = -here->BSIM4v4gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); - gbbsp = -(here->BSIM4V4gbds); - gbbdp = here->BSIM4V4gbds + here->BSIM4V4gbgs + here->BSIM4V4gbbs; + gbbsp = -(here->BSIM4v4gbds); + gbbdp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; - gbspg = here->BSIM4V4gbgs; - gbspsp = here->BSIM4V4gbds; - gbspb = here->BSIM4V4gbbs; + gbspg = here->BSIM4v4gbgs; + gbspsp = here->BSIM4v4gbds; + gbspb = here->BSIM4v4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); - if (model->BSIM4V4igcMod) - { gIstotg = here->BSIM4V4gIgsg + here->BSIM4V4gIgcdg; - gIstotd = here->BSIM4V4gIgcds; - gIstots = here->BSIM4V4gIgss + here->BSIM4V4gIgcdd; - gIstotb = here->BSIM4V4gIgcdb; + if (model->BSIM4v4igcMod) + { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcdg; + gIstotd = here->BSIM4v4gIgcds; + gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcdd; + gIstotb = here->BSIM4v4gIgcdb; - gIdtotg = here->BSIM4V4gIgdg + here->BSIM4V4gIgcsg; - gIdtotd = here->BSIM4V4gIgdd + here->BSIM4V4gIgcss; - gIdtots = here->BSIM4V4gIgcsd; - gIdtotb = here->BSIM4V4gIgcsb; + gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg; + gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcss; + gIdtots = here->BSIM4v4gIgcsd; + gIdtotb = here->BSIM4v4gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } - if (model->BSIM4V4igbMod) - { gIbtotg = here->BSIM4V4gIgbg; - gIbtotd = here->BSIM4V4gIgbs; - gIbtots = here->BSIM4V4gIgbd; - gIbtotb = here->BSIM4V4gIgbb; + if (model->BSIM4v4igbMod) + { gIbtotg = here->BSIM4v4gIgbg; + gIbtotd = here->BSIM4v4gIgbs; + gIbtots = here->BSIM4v4gIgbd; + gIbtotb = here->BSIM4v4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; - if ((model->BSIM4V4igcMod != 0) || (model->BSIM4V4igbMod != 0)) + if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; @@ -312,82 +312,82 @@ double m; else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; - if (here->BSIM4V4rgateMod == 2) - T0 = *(ckt->CKTstates[0] + here->BSIM4V4vges) - - *(ckt->CKTstates[0] + here->BSIM4V4vgs); - else if (here->BSIM4V4rgateMod == 3) - T0 = *(ckt->CKTstates[0] + here->BSIM4V4vgms) - - *(ckt->CKTstates[0] + here->BSIM4V4vgs); - if (here->BSIM4V4rgateMod > 1) - { gcrgd = here->BSIM4V4gcrgs * T0; - gcrgg = here->BSIM4V4gcrgg * T0; - gcrgs = here->BSIM4V4gcrgd * T0; - gcrgb = here->BSIM4V4gcrgb * T0; - gcrgg -= here->BSIM4V4gcrg; - gcrg = here->BSIM4V4gcrg; + if (here->BSIM4v4rgateMod == 2) + T0 = *(ckt->CKTstates[0] + here->BSIM4v4vges) + - *(ckt->CKTstates[0] + here->BSIM4v4vgs); + else if (here->BSIM4v4rgateMod == 3) + T0 = *(ckt->CKTstates[0] + here->BSIM4v4vgms) + - *(ckt->CKTstates[0] + here->BSIM4v4vgs); + if (here->BSIM4v4rgateMod > 1) + { gcrgd = here->BSIM4v4gcrgs * T0; + gcrgg = here->BSIM4v4gcrgg * T0; + gcrgs = here->BSIM4v4gcrgd * T0; + gcrgb = here->BSIM4v4gcrgb * T0; + gcrgg -= here->BSIM4v4gcrg; + gcrg = here->BSIM4v4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; - if (here->BSIM4V4acnqsMod == 0) - { if (here->BSIM4V4rgateMod == 3) - { xcgmgmb = cgdo + cgso + pParam->BSIM4V4cgbo; + if (here->BSIM4v4acnqsMod == 0) + { if (here->BSIM4v4rgateMod == 3) + { xcgmgmb = cgdo + cgso + pParam->BSIM4v4cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; - xcgmbb = -pParam->BSIM4V4cgbo; + xcgmbb = -pParam->BSIM4v4cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; - xcggb = here->BSIM4V4cggb; - xcgdb = here->BSIM4V4cgsb; - xcgsb = here->BSIM4V4cgdb; + xcggb = here->BSIM4v4cggb; + xcgdb = here->BSIM4v4cgsb; + xcgsb = here->BSIM4v4cgdb; xcgbb = -(xcggb + xcgdb + xcgsb); - xcdgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb - + here->BSIM4V4cdgb); - xcsgb = here->BSIM4V4cdgb; - xcbgb = here->BSIM4V4cbgb; + xcdgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + + here->BSIM4v4cdgb); + xcsgb = here->BSIM4v4cdgb; + xcbgb = here->BSIM4v4cbgb; } else - { xcggb = here->BSIM4V4cggb + cgdo + cgso - + pParam->BSIM4V4cgbo; - xcgdb = here->BSIM4V4cgsb - cgdo; - xcgsb = here->BSIM4V4cgdb - cgso; + { xcggb = here->BSIM4v4cggb + cgdo + cgso + + pParam->BSIM4v4cgbo; + xcgdb = here->BSIM4v4cgsb - cgdo; + xcgsb = here->BSIM4v4cgdb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); - xcdgb = -(here->BSIM4V4cggb + here->BSIM4V4cbgb - + here->BSIM4V4cdgb + cgdo); - xcsgb = here->BSIM4V4cdgb - cgso; - xcbgb = here->BSIM4V4cbgb - pParam->BSIM4V4cgbo; + xcdgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + + here->BSIM4v4cdgb + cgdo); + xcsgb = here->BSIM4v4cdgb - cgso; + xcbgb = here->BSIM4v4cbgb - pParam->BSIM4v4cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } - xcddb = here->BSIM4V4capbd + cgdo - (here->BSIM4V4cgsb - + here->BSIM4V4cbsb + here->BSIM4V4cdsb); - xcdsb = -(here->BSIM4V4cgdb + here->BSIM4V4cbdb - + here->BSIM4V4cddb); + xcddb = here->BSIM4v4capbd + cgdo - (here->BSIM4v4cgsb + + here->BSIM4v4cbsb + here->BSIM4v4cdsb); + xcdsb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb + + here->BSIM4v4cddb); - xcsdb = here->BSIM4V4cdsb; - xcssb = here->BSIM4V4cddb + here->BSIM4V4capbs + cgso; + xcsdb = here->BSIM4v4cdsb; + xcssb = here->BSIM4v4cddb + here->BSIM4v4capbs + cgso; - if (!here->BSIM4V4rbodyMod) + if (!here->BSIM4v4rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); - xcbdb = here->BSIM4V4cbsb - here->BSIM4V4capbd; - xcbsb = here->BSIM4V4cbdb - here->BSIM4V4capbs; + xcbdb = here->BSIM4v4cbsb - here->BSIM4v4capbd; + xcbsb = here->BSIM4v4cbdb - here->BSIM4v4capbs; xcdbdb = 0.0; } else { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) - + here->BSIM4V4capbd; - xcsbb = -(here->BSIM4V4cddb + here->BSIM4V4cdgb - + here->BSIM4V4cdsb); - xcbdb = here->BSIM4V4cbsb; - xcbsb = here->BSIM4V4cbdb; - xcdbdb = -here->BSIM4V4capbd; - xcsbsb = -here->BSIM4V4capbs; + + here->BSIM4v4capbd; + xcsbb = -(here->BSIM4v4cddb + here->BSIM4v4cdgb + + here->BSIM4v4cdsb); + xcbdb = here->BSIM4v4cbsb; + xcbsb = here->BSIM4v4cbdb; + xcdbdb = -here->BSIM4v4capbd; + xcsbsb = -here->BSIM4v4capbs; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); @@ -405,24 +405,24 @@ double m; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; - xgtg = here->BSIM4V4gtg; - xgtd = here->BSIM4V4gts; - xgts = here->BSIM4V4gtd; - xgtb = here->BSIM4V4gtb; + xgtg = here->BSIM4v4gtg; + xgtd = here->BSIM4v4gts; + xgts = here->BSIM4v4gtd; + xgtb = here->BSIM4v4gtb; - xcqgb = here->BSIM4V4cqgb; - xcqdb = here->BSIM4V4cqsb; - xcqsb = here->BSIM4V4cqdb; - xcqbb = here->BSIM4V4cqbb; + xcqgb = here->BSIM4v4cqgb; + xcqdb = here->BSIM4v4cqsb; + xcqsb = here->BSIM4v4cqdb; + xcqbb = here->BSIM4v4cqbb; - CoxWL = model->BSIM4V4coxe * here->pParam->BSIM4V4weffCV - * here->BSIM4V4nf * here->pParam->BSIM4V4leffCV; - qcheq = -(here->BSIM4V4qgate + here->BSIM4V4qbulk); + CoxWL = model->BSIM4v4coxe * here->pParam->BSIM4v4weffCV + * here->BSIM4v4nf * here->pParam->BSIM4v4leffCV; + qcheq = -(here->BSIM4v4qgate + here->BSIM4v4qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) - { if (model->BSIM4V4xpart < 0.5) + { if (model->BSIM4v4xpart < 0.5) { sxpart = 0.4; } - else if (model->BSIM4V4xpart > 0.5) + else if (model->BSIM4v4xpart > 0.5) { sxpart = 0.0; } else @@ -432,19 +432,19 @@ double m; = dsxpart_dVs = 0.0; } else - { sxpart = here->BSIM4V4qdrn / qcheq; - Css = here->BSIM4V4cddb; - Cds = -(here->BSIM4V4cgdb + here->BSIM4V4cddb - + here->BSIM4V4cbdb); + { sxpart = here->BSIM4v4qdrn / qcheq; + Css = here->BSIM4v4cddb; + Cds = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + + here->BSIM4v4cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; - Csg = here->BSIM4V4cdgb; - Cdg = -(here->BSIM4V4cggb + here->BSIM4V4cdgb - + here->BSIM4V4cbgb); + Csg = here->BSIM4v4cdgb; + Cdg = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + + here->BSIM4v4cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; - Csd = here->BSIM4V4cdsb; - Cdd = -(here->BSIM4V4cgsb + here->BSIM4V4cdsb - + here->BSIM4V4cbsb); + Csd = here->BSIM4v4cdsb; + Cdd = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + + here->BSIM4v4cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg @@ -458,18 +458,18 @@ double m; } } - if (model->BSIM4V4rdsMod == 1) - { gstot = here->BSIM4V4gstot; - gstotd = here->BSIM4V4gstotd; - gstotg = here->BSIM4V4gstotg; - gstots = here->BSIM4V4gstots - gstot; - gstotb = here->BSIM4V4gstotb; - - gdtot = here->BSIM4V4gdtot; - gdtotd = here->BSIM4V4gdtotd - gdtot; - gdtotg = here->BSIM4V4gdtotg; - gdtots = here->BSIM4V4gdtots; - gdtotb = here->BSIM4V4gdtotb; + if (model->BSIM4v4rdsMod == 1) + { gstot = here->BSIM4v4gstot; + gstotd = here->BSIM4v4gstotd; + gstotg = here->BSIM4v4gstotg; + gstots = here->BSIM4v4gstots - gstot; + gstotb = here->BSIM4v4gstotb; + + gdtot = here->BSIM4v4gdtot; + gdtotd = here->BSIM4v4gdtotd - gdtot; + gdtotg = here->BSIM4v4gdtotg; + gdtots = here->BSIM4v4gdtots; + gdtotb = here->BSIM4v4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; @@ -477,280 +477,280 @@ double m; } - T1 = *(ckt->CKTstate0 + here->BSIM4V4qdef) * here->BSIM4V4gtau; - gds = here->BSIM4V4gds; + T1 = *(ckt->CKTstate0 + here->BSIM4v4qdef) * here->BSIM4v4gtau; + gds = here->BSIM4v4gds; /* * Loading PZ matrix */ - m = here->BSIM4V4m; + m = here->BSIM4v4m; - if (!model->BSIM4V4rdsMod) - { gdpr = here->BSIM4V4drainConductance; - gspr = here->BSIM4V4sourceConductance; + if (!model->BSIM4v4rdsMod) + { gdpr = here->BSIM4v4drainConductance; + gspr = here->BSIM4v4sourceConductance; } else gdpr = gspr = 0.0; - if (!here->BSIM4V4rbodyMod) - { gjbd = here->BSIM4V4gbd; - gjbs = here->BSIM4V4gbs; + if (!here->BSIM4v4rbodyMod) + { gjbd = here->BSIM4v4gbd; + gjbs = here->BSIM4v4gbs; } else gjbd = gjbs = 0.0; - geltd = here->BSIM4V4grgeltd; - - if (here->BSIM4V4rgateMod == 1) - { *(here->BSIM4V4GEgePtr) += m * geltd; - *(here->BSIM4V4GPgePtr) -= m * geltd; - *(here->BSIM4V4GEgpPtr) -= m * geltd; - - *(here->BSIM4V4GPgpPtr ) += m * xcggb * s->real; - *(here->BSIM4V4GPgpPtr +1) += m * xcggb * s->imag; - *(here->BSIM4V4GPgpPtr) += m * (geltd - xgtg + gIgtotg); - *(here->BSIM4V4GPdpPtr ) += m * xcgdb * s->real; - *(here->BSIM4V4GPdpPtr +1) += m * xcgdb * s->imag; - *(here->BSIM4V4GPdpPtr) -= m * (xgtd - gIgtotd); - *(here->BSIM4V4GPspPtr ) += m * xcgsb * s->real; - *(here->BSIM4V4GPspPtr +1) += m * xcgsb * s->imag; - *(here->BSIM4V4GPspPtr) -= m * (xgts - gIgtots); - *(here->BSIM4V4GPbpPtr ) += m * xcgbb * s->real; - *(here->BSIM4V4GPbpPtr +1) += m * xcgbb * s->imag; - *(here->BSIM4V4GPbpPtr) -= m * (xgtb - gIgtotb); + geltd = here->BSIM4v4grgeltd; + + if (here->BSIM4v4rgateMod == 1) + { *(here->BSIM4v4GEgePtr) += m * geltd; + *(here->BSIM4v4GPgePtr) -= m * geltd; + *(here->BSIM4v4GEgpPtr) -= m * geltd; + + *(here->BSIM4v4GPgpPtr ) += m * xcggb * s->real; + *(here->BSIM4v4GPgpPtr +1) += m * xcggb * s->imag; + *(here->BSIM4v4GPgpPtr) += m * (geltd - xgtg + gIgtotg); + *(here->BSIM4v4GPdpPtr ) += m * xcgdb * s->real; + *(here->BSIM4v4GPdpPtr +1) += m * xcgdb * s->imag; + *(here->BSIM4v4GPdpPtr) -= m * (xgtd - gIgtotd); + *(here->BSIM4v4GPspPtr ) += m * xcgsb * s->real; + *(here->BSIM4v4GPspPtr +1) += m * xcgsb * s->imag; + *(here->BSIM4v4GPspPtr) -= m * (xgts - gIgtots); + *(here->BSIM4v4GPbpPtr ) += m * xcgbb * s->real; + *(here->BSIM4v4GPbpPtr +1) += m * xcgbb * s->imag; + *(here->BSIM4v4GPbpPtr) -= m * (xgtb - gIgtotb); } - else if (here->BSIM4V4rgateMod == 2) - { *(here->BSIM4V4GEgePtr) += m * gcrg; - *(here->BSIM4V4GEgpPtr) += m * gcrgg; - *(here->BSIM4V4GEdpPtr) += m * gcrgd; - *(here->BSIM4V4GEspPtr) += m * gcrgs; - *(here->BSIM4V4GEbpPtr) += m * gcrgb; - - *(here->BSIM4V4GPgePtr) -= m * gcrg; - *(here->BSIM4V4GPgpPtr ) += m * xcggb * s->real; - *(here->BSIM4V4GPgpPtr +1) += m * xcggb * s->imag; - *(here->BSIM4V4GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); - *(here->BSIM4V4GPdpPtr ) += m * xcgdb * s->real; - *(here->BSIM4V4GPdpPtr +1) += m * xcgdb * s->imag; - *(here->BSIM4V4GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); - *(here->BSIM4V4GPspPtr ) += m * xcgsb * s->real; - *(here->BSIM4V4GPspPtr +1) += m * xcgsb * s->imag; - *(here->BSIM4V4GPspPtr) -= m * (gcrgs + xgts - gIgtots); - *(here->BSIM4V4GPbpPtr ) += m * xcgbb * s->real; - *(here->BSIM4V4GPbpPtr +1) += m * xcgbb * s->imag; - *(here->BSIM4V4GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); + else if (here->BSIM4v4rgateMod == 2) + { *(here->BSIM4v4GEgePtr) += m * gcrg; + *(here->BSIM4v4GEgpPtr) += m * gcrgg; + *(here->BSIM4v4GEdpPtr) += m * gcrgd; + *(here->BSIM4v4GEspPtr) += m * gcrgs; + *(here->BSIM4v4GEbpPtr) += m * gcrgb; + + *(here->BSIM4v4GPgePtr) -= m * gcrg; + *(here->BSIM4v4GPgpPtr ) += m * xcggb * s->real; + *(here->BSIM4v4GPgpPtr +1) += m * xcggb * s->imag; + *(here->BSIM4v4GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); + *(here->BSIM4v4GPdpPtr ) += m * xcgdb * s->real; + *(here->BSIM4v4GPdpPtr +1) += m * xcgdb * s->imag; + *(here->BSIM4v4GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); + *(here->BSIM4v4GPspPtr ) += m * xcgsb * s->real; + *(here->BSIM4v4GPspPtr +1) += m * xcgsb * s->imag; + *(here->BSIM4v4GPspPtr) -= m * (gcrgs + xgts - gIgtots); + *(here->BSIM4v4GPbpPtr ) += m * xcgbb * s->real; + *(here->BSIM4v4GPbpPtr +1) += m * xcgbb * s->imag; + *(here->BSIM4v4GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); } - else if (here->BSIM4V4rgateMod == 3) - { *(here->BSIM4V4GEgePtr) += m * geltd; - *(here->BSIM4V4GEgmPtr) -= m * geltd; - *(here->BSIM4V4GMgePtr) -= m * geltd; - *(here->BSIM4V4GMgmPtr) += m * (geltd + gcrg); - *(here->BSIM4V4GMgmPtr ) += m * xcgmgmb * s->real; - *(here->BSIM4V4GMgmPtr +1) += m * xcgmgmb * s->imag; + else if (here->BSIM4v4rgateMod == 3) + { *(here->BSIM4v4GEgePtr) += m * geltd; + *(here->BSIM4v4GEgmPtr) -= m * geltd; + *(here->BSIM4v4GMgePtr) -= m * geltd; + *(here->BSIM4v4GMgmPtr) += m * (geltd + gcrg); + *(here->BSIM4v4GMgmPtr ) += m * xcgmgmb * s->real; + *(here->BSIM4v4GMgmPtr +1) += m * xcgmgmb * s->imag; - *(here->BSIM4V4GMdpPtr) += m * gcrgd; - *(here->BSIM4V4GMdpPtr ) += m * xcgmdb * s->real; - *(here->BSIM4V4GMdpPtr +1) += m * xcgmdb * s->imag; - *(here->BSIM4V4GMgpPtr) += m * gcrgg; - *(here->BSIM4V4GMspPtr) += m * gcrgs; - *(here->BSIM4V4GMspPtr ) += m * xcgmsb * s->real; - *(here->BSIM4V4GMspPtr +1) += m * xcgmsb * s->imag; - *(here->BSIM4V4GMbpPtr) += m * gcrgb; - *(here->BSIM4V4GMbpPtr ) += m * xcgmbb * s->real; - *(here->BSIM4V4GMbpPtr +1) += m * xcgmbb * s->imag; + *(here->BSIM4v4GMdpPtr) += m * gcrgd; + *(here->BSIM4v4GMdpPtr ) += m * xcgmdb * s->real; + *(here->BSIM4v4GMdpPtr +1) += m * xcgmdb * s->imag; + *(here->BSIM4v4GMgpPtr) += m * gcrgg; + *(here->BSIM4v4GMspPtr) += m * gcrgs; + *(here->BSIM4v4GMspPtr ) += m * xcgmsb * s->real; + *(here->BSIM4v4GMspPtr +1) += m * xcgmsb * s->imag; + *(here->BSIM4v4GMbpPtr) += m * gcrgb; + *(here->BSIM4v4GMbpPtr ) += m * xcgmbb * s->real; + *(here->BSIM4v4GMbpPtr +1) += m * xcgmbb * s->imag; - *(here->BSIM4V4DPgmPtr ) += m * xcdgmb * s->real; - *(here->BSIM4V4DPgmPtr +1) += m * xcdgmb * s->imag; - *(here->BSIM4V4GPgmPtr) -= m * gcrg; - *(here->BSIM4V4SPgmPtr ) += m * xcsgmb * s->real; - *(here->BSIM4V4SPgmPtr +1) += m * xcsgmb * s->imag; - *(here->BSIM4V4BPgmPtr ) += m * xcbgmb * s->real; - *(here->BSIM4V4BPgmPtr +1) += m * xcbgmb * s->imag; + *(here->BSIM4v4DPgmPtr ) += m * xcdgmb * s->real; + *(here->BSIM4v4DPgmPtr +1) += m * xcdgmb * s->imag; + *(here->BSIM4v4GPgmPtr) -= m * gcrg; + *(here->BSIM4v4SPgmPtr ) += m * xcsgmb * s->real; + *(here->BSIM4v4SPgmPtr +1) += m * xcsgmb * s->imag; + *(here->BSIM4v4BPgmPtr ) += m * xcbgmb * s->real; + *(here->BSIM4v4BPgmPtr +1) += m * xcbgmb * s->imag; - *(here->BSIM4V4GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); - *(here->BSIM4V4GPgpPtr ) += m * xcggb * s->real; - *(here->BSIM4V4GPgpPtr +1) += m * xcggb * s->imag; - *(here->BSIM4V4GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); - *(here->BSIM4V4GPdpPtr ) += m * xcgdb * s->real; - *(here->BSIM4V4GPdpPtr +1) += m * xcgdb * s->imag; - *(here->BSIM4V4GPspPtr) -= m * (gcrgs + xgts - gIgtots); - *(here->BSIM4V4GPspPtr ) += m * xcgsb * s->real; - *(here->BSIM4V4GPspPtr +1) += m * xcgsb * s->imag; - *(here->BSIM4V4GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); - *(here->BSIM4V4GPbpPtr ) += m * xcgbb * s->real; - *(here->BSIM4V4GPbpPtr +1) += m * xcgbb * s->imag; + *(here->BSIM4v4GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); + *(here->BSIM4v4GPgpPtr ) += m * xcggb * s->real; + *(here->BSIM4v4GPgpPtr +1) += m * xcggb * s->imag; + *(here->BSIM4v4GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); + *(here->BSIM4v4GPdpPtr ) += m * xcgdb * s->real; + *(here->BSIM4v4GPdpPtr +1) += m * xcgdb * s->imag; + *(here->BSIM4v4GPspPtr) -= m * (gcrgs + xgts - gIgtots); + *(here->BSIM4v4GPspPtr ) += m * xcgsb * s->real; + *(here->BSIM4v4GPspPtr +1) += m * xcgsb * s->imag; + *(here->BSIM4v4GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); + *(here->BSIM4v4GPbpPtr ) += m * xcgbb * s->real; + *(here->BSIM4v4GPbpPtr +1) += m * xcgbb * s->imag; } else - { *(here->BSIM4V4GPdpPtr ) += m * xcgdb * s->real; - *(here->BSIM4V4GPdpPtr +1) += m * xcgdb * s->imag; - *(here->BSIM4V4GPdpPtr) -= m * (xgtd - gIgtotd); - *(here->BSIM4V4GPgpPtr ) += m * xcggb * s->real; - *(here->BSIM4V4GPgpPtr +1) += m * xcggb * s->imag; - *(here->BSIM4V4GPgpPtr) -= m * (xgtg - gIgtotg); - *(here->BSIM4V4GPspPtr ) += m * xcgsb * s->real; - *(here->BSIM4V4GPspPtr +1) += m * xcgsb * s->imag; - *(here->BSIM4V4GPspPtr) -= m * (xgts - gIgtots); - *(here->BSIM4V4GPbpPtr ) += m * xcgbb * s->real; - *(here->BSIM4V4GPbpPtr +1) += m * xcgbb * s->imag; - *(here->BSIM4V4GPbpPtr) -= m * (xgtb - gIgtotb); + { *(here->BSIM4v4GPdpPtr ) += m * xcgdb * s->real; + *(here->BSIM4v4GPdpPtr +1) += m * xcgdb * s->imag; + *(here->BSIM4v4GPdpPtr) -= m * (xgtd - gIgtotd); + *(here->BSIM4v4GPgpPtr ) += m * xcggb * s->real; + *(here->BSIM4v4GPgpPtr +1) += m * xcggb * s->imag; + *(here->BSIM4v4GPgpPtr) -= m * (xgtg - gIgtotg); + *(here->BSIM4v4GPspPtr ) += m * xcgsb * s->real; + *(here->BSIM4v4GPspPtr +1) += m * xcgsb * s->imag; + *(here->BSIM4v4GPspPtr) -= m * (xgts - gIgtots); + *(here->BSIM4v4GPbpPtr ) += m * xcgbb * s->real; + *(here->BSIM4v4GPbpPtr +1) += m * xcgbb * s->imag; + *(here->BSIM4v4GPbpPtr) -= m * (xgtb - gIgtotb); } - if (model->BSIM4V4rdsMod) - { (*(here->BSIM4V4DgpPtr) += m * gdtotg); - (*(here->BSIM4V4DspPtr) += m * gdtots); - (*(here->BSIM4V4DbpPtr) += m * gdtotb); - (*(here->BSIM4V4SdpPtr) += m * gstotd); - (*(here->BSIM4V4SgpPtr) += m * gstotg); - (*(here->BSIM4V4SbpPtr) += m * gstotb); + if (model->BSIM4v4rdsMod) + { (*(here->BSIM4v4DgpPtr) += m * gdtotg); + (*(here->BSIM4v4DspPtr) += m * gdtots); + (*(here->BSIM4v4DbpPtr) += m * gdtotb); + (*(here->BSIM4v4SdpPtr) += m * gstotd); + (*(here->BSIM4v4SgpPtr) += m * gstotg); + (*(here->BSIM4v4SbpPtr) += m * gstotb); } - *(here->BSIM4V4DPdpPtr ) += m * xcddb * s->real; - *(here->BSIM4V4DPdpPtr +1) += m * xcddb * s->imag; - *(here->BSIM4V4DPdpPtr) += m * (gdpr + gds + here->BSIM4V4gbd + *(here->BSIM4v4DPdpPtr ) += m * xcddb * s->real; + *(here->BSIM4v4DPdpPtr +1) += m * xcddb * s->imag; + *(here->BSIM4v4DPdpPtr) += m * (gdpr + gds + here->BSIM4v4gbd - gdtotd + RevSum + gbdpdp - gIdtotd + dxpart * xgtd + T1 * ddxpart_dVd); - *(here->BSIM4V4DPdPtr) -= m * (gdpr + gdtot); - *(here->BSIM4V4DPgpPtr ) += m * xcdgb * s->real; - *(here->BSIM4V4DPgpPtr +1) += m * xcdgb * s->imag; - *(here->BSIM4V4DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg + *(here->BSIM4v4DPdPtr) -= m * (gdpr + gdtot); + *(here->BSIM4v4DPgpPtr ) += m * xcdgb * s->real; + *(here->BSIM4v4DPgpPtr +1) += m * xcdgb * s->imag; + *(here->BSIM4v4DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg + T1 * ddxpart_dVg + dxpart * xgtg); - *(here->BSIM4V4DPspPtr ) += m * xcdsb * s->real; - *(here->BSIM4V4DPspPtr +1) += m * xcdsb * s->imag; - *(here->BSIM4V4DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots + *(here->BSIM4v4DPspPtr ) += m * xcdsb * s->real; + *(here->BSIM4v4DPspPtr +1) += m * xcdsb * s->imag; + *(here->BSIM4v4DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots - T1 * ddxpart_dVs - dxpart * xgts); - *(here->BSIM4V4DPbpPtr ) += m * xcdbb * s->real; - *(here->BSIM4V4DPbpPtr +1) += m * xcdbb * s->imag; - *(here->BSIM4V4DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb + *(here->BSIM4v4DPbpPtr ) += m * xcdbb * s->real; + *(here->BSIM4v4DPbpPtr +1) += m * xcdbb * s->imag; + *(here->BSIM4v4DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * xgtb); - *(here->BSIM4V4DdpPtr) -= m * (gdpr - gdtotd); - *(here->BSIM4V4DdPtr) += m * (gdpr + gdtot); + *(here->BSIM4v4DdpPtr) -= m * (gdpr - gdtotd); + *(here->BSIM4v4DdPtr) += m * (gdpr + gdtot); - *(here->BSIM4V4SPdpPtr ) += m * xcsdb * s->real; - *(here->BSIM4V4SPdpPtr +1) += m * xcsdb * s->imag; - *(here->BSIM4V4SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd + *(here->BSIM4v4SPdpPtr ) += m * xcsdb * s->real; + *(here->BSIM4v4SPdpPtr +1) += m * xcsdb * s->imag; + *(here->BSIM4v4SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd - T1 * dsxpart_dVd - sxpart * xgtd); - *(here->BSIM4V4SPgpPtr ) += m * xcsgb * s->real; - *(here->BSIM4V4SPgpPtr +1) += m * xcsgb * s->imag; - *(here->BSIM4V4SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg + *(here->BSIM4v4SPgpPtr ) += m * xcsgb * s->real; + *(here->BSIM4v4SPgpPtr +1) += m * xcsgb * s->imag; + *(here->BSIM4v4SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg - T1 * dsxpart_dVg - sxpart * xgtg); - *(here->BSIM4V4SPspPtr ) += m * xcssb * s->real; - *(here->BSIM4V4SPspPtr +1) += m * xcssb * s->imag; - *(here->BSIM4V4SPspPtr) += m * (gspr + gds + here->BSIM4V4gbs - gIstots + *(here->BSIM4v4SPspPtr ) += m * xcssb * s->real; + *(here->BSIM4v4SPspPtr +1) += m * xcssb * s->imag; + *(here->BSIM4v4SPspPtr) += m * (gspr + gds + here->BSIM4v4gbs - gIstots - gstots + FwdSum + gbspsp + sxpart * xgts + T1 * dsxpart_dVs); - *(here->BSIM4V4SPsPtr) -= m * (gspr + gstot); - *(here->BSIM4V4SPbpPtr ) += m * xcsbb * s->real; - *(here->BSIM4V4SPbpPtr +1) += m * xcsbb * s->imag; - *(here->BSIM4V4SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb + *(here->BSIM4v4SPsPtr) -= m * (gspr + gstot); + *(here->BSIM4v4SPbpPtr ) += m * xcsbb * s->real; + *(here->BSIM4v4SPbpPtr +1) += m * xcsbb * s->imag; + *(here->BSIM4v4SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb - T1 * dsxpart_dVb - sxpart * xgtb); - *(here->BSIM4V4SspPtr) -= m * (gspr - gstots); - *(here->BSIM4V4SsPtr) += m * (gspr + gstot); - - *(here->BSIM4V4BPdpPtr ) += m * xcbdb * s->real; - *(here->BSIM4V4BPdpPtr +1) += m * xcbdb * s->imag; - *(here->BSIM4V4BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); - *(here->BSIM4V4BPgpPtr ) += m * xcbgb * s->real; - *(here->BSIM4V4BPgpPtr +1) += m * xcbgb * s->imag; - *(here->BSIM4V4BPgpPtr) -= m * (here->BSIM4V4gbgs + gIbtotg); - *(here->BSIM4V4BPspPtr ) += m * xcbsb * s->real; - *(here->BSIM4V4BPspPtr +1) += m * xcbsb * s->imag; - *(here->BSIM4V4BPspPtr) -= m * (gjbs - gbbsp + gIbtots); - *(here->BSIM4V4BPbpPtr ) += m * xcbbb * s->real; - *(here->BSIM4V4BPbpPtr +1) += m * xcbbb * s->imag; - *(here->BSIM4V4BPbpPtr) += m * (gjbd + gjbs - here->BSIM4V4gbbs + *(here->BSIM4v4SspPtr) -= m * (gspr - gstots); + *(here->BSIM4v4SsPtr) += m * (gspr + gstot); + + *(here->BSIM4v4BPdpPtr ) += m * xcbdb * s->real; + *(here->BSIM4v4BPdpPtr +1) += m * xcbdb * s->imag; + *(here->BSIM4v4BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); + *(here->BSIM4v4BPgpPtr ) += m * xcbgb * s->real; + *(here->BSIM4v4BPgpPtr +1) += m * xcbgb * s->imag; + *(here->BSIM4v4BPgpPtr) -= m * (here->BSIM4v4gbgs + gIbtotg); + *(here->BSIM4v4BPspPtr ) += m * xcbsb * s->real; + *(here->BSIM4v4BPspPtr +1) += m * xcbsb * s->imag; + *(here->BSIM4v4BPspPtr) -= m * (gjbs - gbbsp + gIbtots); + *(here->BSIM4v4BPbpPtr ) += m * xcbbb * s->real; + *(here->BSIM4v4BPbpPtr +1) += m * xcbbb * s->imag; + *(here->BSIM4v4BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v4gbbs - gIbtotb); - ggidld = here->BSIM4V4ggidld; - ggidlg = here->BSIM4V4ggidlg; - ggidlb = here->BSIM4V4ggidlb; - ggislg = here->BSIM4V4ggislg; - ggisls = here->BSIM4V4ggisls; - ggislb = here->BSIM4V4ggislb; + ggidld = here->BSIM4v4ggidld; + ggidlg = here->BSIM4v4ggidlg; + ggidlb = here->BSIM4v4ggidlb; + ggislg = here->BSIM4v4ggislg; + ggisls = here->BSIM4v4ggisls; + ggislb = here->BSIM4v4ggislb; /* stamp gidl */ - (*(here->BSIM4V4DPdpPtr) += m * ggidld); - (*(here->BSIM4V4DPgpPtr) += m * ggidlg); - (*(here->BSIM4V4DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); - (*(here->BSIM4V4DPbpPtr) += m * ggidlb); - (*(here->BSIM4V4BPdpPtr) -= m * ggidld); - (*(here->BSIM4V4BPgpPtr) -= m * ggidlg); - (*(here->BSIM4V4BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); - (*(here->BSIM4V4BPbpPtr) -= m * ggidlb); + (*(here->BSIM4v4DPdpPtr) += m * ggidld); + (*(here->BSIM4v4DPgpPtr) += m * ggidlg); + (*(here->BSIM4v4DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); + (*(here->BSIM4v4DPbpPtr) += m * ggidlb); + (*(here->BSIM4v4BPdpPtr) -= m * ggidld); + (*(here->BSIM4v4BPgpPtr) -= m * ggidlg); + (*(here->BSIM4v4BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); + (*(here->BSIM4v4BPbpPtr) -= m * ggidlb); /* stamp gisl */ - (*(here->BSIM4V4SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); - (*(here->BSIM4V4SPgpPtr) += m * ggislg); - (*(here->BSIM4V4SPspPtr) += m * ggisls); - (*(here->BSIM4V4SPbpPtr) += m * ggislb); - (*(here->BSIM4V4BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); - (*(here->BSIM4V4BPgpPtr) -= m * ggislg); - (*(here->BSIM4V4BPspPtr) -= m * ggisls); - (*(here->BSIM4V4BPbpPtr) -= m * ggislb); - - if (here->BSIM4V4rbodyMod) - { (*(here->BSIM4V4DPdbPtr ) += m * xcdbdb * s->real); - (*(here->BSIM4V4DPdbPtr +1) += m * xcdbdb * s->imag); - (*(here->BSIM4V4DPdbPtr) -= m * here->BSIM4V4gbd); - (*(here->BSIM4V4SPsbPtr ) += m * xcsbsb * s->real); - (*(here->BSIM4V4SPsbPtr +1) += m * xcsbsb * s->imag); - (*(here->BSIM4V4SPsbPtr) -= m * here->BSIM4V4gbs); - - (*(here->BSIM4V4DBdpPtr ) += m * xcdbdb * s->real); - (*(here->BSIM4V4DBdpPtr +1) += m * xcdbdb * s->imag); - (*(here->BSIM4V4DBdpPtr) -= m * here->BSIM4V4gbd); - (*(here->BSIM4V4DBdbPtr ) -= m * xcdbdb * s->real); - (*(here->BSIM4V4DBdbPtr +1) -= m * xcdbdb * s->imag); - (*(here->BSIM4V4DBdbPtr) += m * (here->BSIM4V4gbd + here->BSIM4V4grbpd - + here->BSIM4V4grbdb)); - (*(here->BSIM4V4DBbpPtr) -= m * here->BSIM4V4grbpd); - (*(here->BSIM4V4DBbPtr) -= m * here->BSIM4V4grbdb); - - (*(here->BSIM4V4BPdbPtr) -= m * here->BSIM4V4grbpd); - (*(here->BSIM4V4BPbPtr) -= m * here->BSIM4V4grbpb); - (*(here->BSIM4V4BPsbPtr) -= m * here->BSIM4V4grbps); - (*(here->BSIM4V4BPbpPtr) += m * (here->BSIM4V4grbpd + here->BSIM4V4grbps - + here->BSIM4V4grbpb)); - /* WDL: (-here->BSIM4V4gbbs) already added to BPbpPtr */ - - (*(here->BSIM4V4SBspPtr ) += m * xcsbsb * s->real); - (*(here->BSIM4V4SBspPtr +1) += m * xcsbsb * s->imag); - (*(here->BSIM4V4SBspPtr) -= m * here->BSIM4V4gbs); - (*(here->BSIM4V4SBbpPtr) -= m * here->BSIM4V4grbps); - (*(here->BSIM4V4SBbPtr) -= m * here->BSIM4V4grbsb); - (*(here->BSIM4V4SBsbPtr ) -= m * xcsbsb * s->real); - (*(here->BSIM4V4SBsbPtr +1) -= m * xcsbsb * s->imag); - (*(here->BSIM4V4SBsbPtr) += m * (here->BSIM4V4gbs - + here->BSIM4V4grbps + here->BSIM4V4grbsb)); - - (*(here->BSIM4V4BdbPtr) -= m * here->BSIM4V4grbdb); - (*(here->BSIM4V4BbpPtr) -= m * here->BSIM4V4grbpb); - (*(here->BSIM4V4BsbPtr) -= m * here->BSIM4V4grbsb); - (*(here->BSIM4V4BbPtr) += m * (here->BSIM4V4grbsb + here->BSIM4V4grbdb - + here->BSIM4V4grbpb)); + (*(here->BSIM4v4SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); + (*(here->BSIM4v4SPgpPtr) += m * ggislg); + (*(here->BSIM4v4SPspPtr) += m * ggisls); + (*(here->BSIM4v4SPbpPtr) += m * ggislb); + (*(here->BSIM4v4BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); + (*(here->BSIM4v4BPgpPtr) -= m * ggislg); + (*(here->BSIM4v4BPspPtr) -= m * ggisls); + (*(here->BSIM4v4BPbpPtr) -= m * ggislb); + + if (here->BSIM4v4rbodyMod) + { (*(here->BSIM4v4DPdbPtr ) += m * xcdbdb * s->real); + (*(here->BSIM4v4DPdbPtr +1) += m * xcdbdb * s->imag); + (*(here->BSIM4v4DPdbPtr) -= m * here->BSIM4v4gbd); + (*(here->BSIM4v4SPsbPtr ) += m * xcsbsb * s->real); + (*(here->BSIM4v4SPsbPtr +1) += m * xcsbsb * s->imag); + (*(here->BSIM4v4SPsbPtr) -= m * here->BSIM4v4gbs); + + (*(here->BSIM4v4DBdpPtr ) += m * xcdbdb * s->real); + (*(here->BSIM4v4DBdpPtr +1) += m * xcdbdb * s->imag); + (*(here->BSIM4v4DBdpPtr) -= m * here->BSIM4v4gbd); + (*(here->BSIM4v4DBdbPtr ) -= m * xcdbdb * s->real); + (*(here->BSIM4v4DBdbPtr +1) -= m * xcdbdb * s->imag); + (*(here->BSIM4v4DBdbPtr) += m * (here->BSIM4v4gbd + here->BSIM4v4grbpd + + here->BSIM4v4grbdb)); + (*(here->BSIM4v4DBbpPtr) -= m * here->BSIM4v4grbpd); + (*(here->BSIM4v4DBbPtr) -= m * here->BSIM4v4grbdb); + + (*(here->BSIM4v4BPdbPtr) -= m * here->BSIM4v4grbpd); + (*(here->BSIM4v4BPbPtr) -= m * here->BSIM4v4grbpb); + (*(here->BSIM4v4BPsbPtr) -= m * here->BSIM4v4grbps); + (*(here->BSIM4v4BPbpPtr) += m * (here->BSIM4v4grbpd + here->BSIM4v4grbps + + here->BSIM4v4grbpb)); + /* WDL: (-here->BSIM4v4gbbs) already added to BPbpPtr */ + + (*(here->BSIM4v4SBspPtr ) += m * xcsbsb * s->real); + (*(here->BSIM4v4SBspPtr +1) += m * xcsbsb * s->imag); + (*(here->BSIM4v4SBspPtr) -= m * here->BSIM4v4gbs); + (*(here->BSIM4v4SBbpPtr) -= m * here->BSIM4v4grbps); + (*(here->BSIM4v4SBbPtr) -= m * here->BSIM4v4grbsb); + (*(here->BSIM4v4SBsbPtr ) -= m * xcsbsb * s->real); + (*(here->BSIM4v4SBsbPtr +1) -= m * xcsbsb * s->imag); + (*(here->BSIM4v4SBsbPtr) += m * (here->BSIM4v4gbs + + here->BSIM4v4grbps + here->BSIM4v4grbsb)); + + (*(here->BSIM4v4BdbPtr) -= m * here->BSIM4v4grbdb); + (*(here->BSIM4v4BbpPtr) -= m * here->BSIM4v4grbpb); + (*(here->BSIM4v4BsbPtr) -= m * here->BSIM4v4grbsb); + (*(here->BSIM4v4BbPtr) += m * (here->BSIM4v4grbsb + here->BSIM4v4grbdb + + here->BSIM4v4grbpb)); } - if (here->BSIM4V4acnqsMod) - { *(here->BSIM4V4QqPtr ) += m * s->real * ScalingFactor; - *(here->BSIM4V4QqPtr +1) += m * s->imag * ScalingFactor; - *(here->BSIM4V4QgpPtr ) -= m * xcqgb * s->real; - *(here->BSIM4V4QgpPtr +1) -= m * xcqgb * s->imag; - *(here->BSIM4V4QdpPtr ) -= m * xcqdb * s->real; - *(here->BSIM4V4QdpPtr +1) -= m * xcqdb * s->imag; - *(here->BSIM4V4QbpPtr ) -= m * xcqbb * s->real; - *(here->BSIM4V4QbpPtr +1) -= m * xcqbb * s->imag; - *(here->BSIM4V4QspPtr ) -= m * xcqsb * s->real; - *(here->BSIM4V4QspPtr +1) -= m * xcqsb * s->imag; - - *(here->BSIM4V4GPqPtr) -= m * here->BSIM4V4gtau; - *(here->BSIM4V4DPqPtr) += m * dxpart * here->BSIM4V4gtau; - *(here->BSIM4V4SPqPtr) += m * sxpart * here->BSIM4V4gtau; - - *(here->BSIM4V4QqPtr) += m * here->BSIM4V4gtau; - *(here->BSIM4V4QgpPtr) += m * xgtg; - *(here->BSIM4V4QdpPtr) += m * xgtd; - *(here->BSIM4V4QbpPtr) += m * xgtb; - *(here->BSIM4V4QspPtr) += m * xgts; + if (here->BSIM4v4acnqsMod) + { *(here->BSIM4v4QqPtr ) += m * s->real * ScalingFactor; + *(here->BSIM4v4QqPtr +1) += m * s->imag * ScalingFactor; + *(here->BSIM4v4QgpPtr ) -= m * xcqgb * s->real; + *(here->BSIM4v4QgpPtr +1) -= m * xcqgb * s->imag; + *(here->BSIM4v4QdpPtr ) -= m * xcqdb * s->real; + *(here->BSIM4v4QdpPtr +1) -= m * xcqdb * s->imag; + *(here->BSIM4v4QbpPtr ) -= m * xcqbb * s->real; + *(here->BSIM4v4QbpPtr +1) -= m * xcqbb * s->imag; + *(here->BSIM4v4QspPtr ) -= m * xcqsb * s->real; + *(here->BSIM4v4QspPtr +1) -= m * xcqsb * s->imag; + + *(here->BSIM4v4GPqPtr) -= m * here->BSIM4v4gtau; + *(here->BSIM4v4DPqPtr) += m * dxpart * here->BSIM4v4gtau; + *(here->BSIM4v4SPqPtr) += m * sxpart * here->BSIM4v4gtau; + + *(here->BSIM4v4QqPtr) += m * here->BSIM4v4gtau; + *(here->BSIM4v4QgpPtr) += m * xgtg; + *(here->BSIM4v4QdpPtr) += m * xgtd; + *(here->BSIM4v4QbpPtr) += m * xgtb; + *(here->BSIM4v4QspPtr) += m * xgts; } } } diff --git a/src/spicelib/devices/bsim4v4/b4v4set.c b/src/spicelib/devices/bsim4v4/b4v4set.c index 9b9a14400..74f5ece5b 100644 --- a/src/spicelib/devices/bsim4v4/b4v4set.c +++ b/src/spicelib/devices/bsim4v4/b4v4set.c @@ -33,19 +33,19 @@ #define Charge_q 1.60219e-19 int -BSIM4V4PAeffGeo(double, int, int, double, double, double, double, double *, double *, double *, double *); +BSIM4v4PAeffGeo(double, int, int, double, double, double, double, double *, double *, double *, double *); int -BSIM4V4RdseffGeo(double, int, int, int, double, double, double, double, double, int, double *); +BSIM4v4RdseffGeo(double, int, int, int, double, double, double, double, double, int, double *); int -BSIM4V4setup(matrix,inModel,ckt,states) +BSIM4v4setup(matrix,inModel,ckt,states) SMPmatrix *matrix; GENmodel *inModel; CKTcircuit *ckt; int *states; { -BSIM4V4model *model = (BSIM4V4model*)inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model*)inModel; +BSIM4v4instance *here; int error; CKTnode *tmp; int noiseAnalGiven = 0, createNode; /* Criteria for new node creation */ @@ -60,1593 +60,1593 @@ JOB *job; } } - /* loop through all the BSIM4V4 device models */ - for( ; model != NULL; model = model->BSIM4V4nextModel ) + /* loop through all the BSIM4v4 device models */ + for( ; model != NULL; model = model->BSIM4v4nextModel ) { /* process defaults of model parameters */ - if (!model->BSIM4V4typeGiven) - model->BSIM4V4type = NMOS; - - if (!model->BSIM4V4mobModGiven) - model->BSIM4V4mobMod = 0; - else if ((model->BSIM4V4mobMod != 0) && (model->BSIM4V4mobMod != 1) - && (model->BSIM4V4mobMod != 2)) - { model->BSIM4V4mobMod = 0; + if (!model->BSIM4v4typeGiven) + model->BSIM4v4type = NMOS; + + if (!model->BSIM4v4mobModGiven) + model->BSIM4v4mobMod = 0; + else if ((model->BSIM4v4mobMod != 0) && (model->BSIM4v4mobMod != 1) + && (model->BSIM4v4mobMod != 2)) + { model->BSIM4v4mobMod = 0; printf("Warning: mobMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4binUnitGiven) - model->BSIM4V4binUnit = 1; - if (!model->BSIM4V4paramChkGiven) - model->BSIM4V4paramChk = 1; + if (!model->BSIM4v4binUnitGiven) + model->BSIM4v4binUnit = 1; + if (!model->BSIM4v4paramChkGiven) + model->BSIM4v4paramChk = 1; - if (!model->BSIM4V4dioModGiven) - model->BSIM4V4dioMod = 1; - else if ((model->BSIM4V4dioMod != 0) && (model->BSIM4V4dioMod != 1) - && (model->BSIM4V4dioMod != 2)) - { model->BSIM4V4dioMod = 1; + if (!model->BSIM4v4dioModGiven) + model->BSIM4v4dioMod = 1; + else if ((model->BSIM4v4dioMod != 0) && (model->BSIM4v4dioMod != 1) + && (model->BSIM4v4dioMod != 2)) + { model->BSIM4v4dioMod = 1; printf("Warning: dioMod has been set to its default value: 1.\n"); } - if (!model->BSIM4V4capModGiven) - model->BSIM4V4capMod = 2; - else if ((model->BSIM4V4capMod != 0) && (model->BSIM4V4capMod != 1) - && (model->BSIM4V4capMod != 2)) - { model->BSIM4V4capMod = 2; + if (!model->BSIM4v4capModGiven) + model->BSIM4v4capMod = 2; + else if ((model->BSIM4v4capMod != 0) && (model->BSIM4v4capMod != 1) + && (model->BSIM4v4capMod != 2)) + { model->BSIM4v4capMod = 2; printf("Warning: capMod has been set to its default value: 2.\n"); } - if (!model->BSIM4V4rdsModGiven) - model->BSIM4V4rdsMod = 0; - else if ((model->BSIM4V4rdsMod != 0) && (model->BSIM4V4rdsMod != 1)) - { model->BSIM4V4rdsMod = 0; + if (!model->BSIM4v4rdsModGiven) + model->BSIM4v4rdsMod = 0; + else if ((model->BSIM4v4rdsMod != 0) && (model->BSIM4v4rdsMod != 1)) + { model->BSIM4v4rdsMod = 0; printf("Warning: rdsMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4rbodyModGiven) - model->BSIM4V4rbodyMod = 0; - else if ((model->BSIM4V4rbodyMod != 0) && (model->BSIM4V4rbodyMod != 1)) - { model->BSIM4V4rbodyMod = 0; + if (!model->BSIM4v4rbodyModGiven) + model->BSIM4v4rbodyMod = 0; + else if ((model->BSIM4v4rbodyMod != 0) && (model->BSIM4v4rbodyMod != 1)) + { model->BSIM4v4rbodyMod = 0; printf("Warning: rbodyMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4rgateModGiven) - model->BSIM4V4rgateMod = 0; - else if ((model->BSIM4V4rgateMod != 0) && (model->BSIM4V4rgateMod != 1) - && (model->BSIM4V4rgateMod != 2) && (model->BSIM4V4rgateMod != 3)) - { model->BSIM4V4rgateMod = 0; + if (!model->BSIM4v4rgateModGiven) + model->BSIM4v4rgateMod = 0; + else if ((model->BSIM4v4rgateMod != 0) && (model->BSIM4v4rgateMod != 1) + && (model->BSIM4v4rgateMod != 2) && (model->BSIM4v4rgateMod != 3)) + { model->BSIM4v4rgateMod = 0; printf("Warning: rgateMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4perModGiven) - model->BSIM4V4perMod = 1; - else if ((model->BSIM4V4perMod != 0) && (model->BSIM4V4perMod != 1)) - { model->BSIM4V4perMod = 1; + if (!model->BSIM4v4perModGiven) + model->BSIM4v4perMod = 1; + else if ((model->BSIM4v4perMod != 0) && (model->BSIM4v4perMod != 1)) + { model->BSIM4v4perMod = 1; printf("Warning: perMod has been set to its default value: 1.\n"); } - if (!model->BSIM4V4geoModGiven) - model->BSIM4V4geoMod = 0; + if (!model->BSIM4v4geoModGiven) + model->BSIM4v4geoMod = 0; - if (!model->BSIM4V4fnoiModGiven) - model->BSIM4V4fnoiMod = 1; - else if ((model->BSIM4V4fnoiMod != 0) && (model->BSIM4V4fnoiMod != 1)) - { model->BSIM4V4fnoiMod = 1; + if (!model->BSIM4v4fnoiModGiven) + model->BSIM4v4fnoiMod = 1; + else if ((model->BSIM4v4fnoiMod != 0) && (model->BSIM4v4fnoiMod != 1)) + { model->BSIM4v4fnoiMod = 1; printf("Warning: fnoiMod has been set to its default value: 1.\n"); } - if (!model->BSIM4V4tnoiModGiven) - model->BSIM4V4tnoiMod = 0; /* WDLiu: tnoiMod=1 needs to set internal S/D nodes */ - else if ((model->BSIM4V4tnoiMod != 0) && (model->BSIM4V4tnoiMod != 1)) - { model->BSIM4V4tnoiMod = 0; + if (!model->BSIM4v4tnoiModGiven) + model->BSIM4v4tnoiMod = 0; /* WDLiu: tnoiMod=1 needs to set internal S/D nodes */ + else if ((model->BSIM4v4tnoiMod != 0) && (model->BSIM4v4tnoiMod != 1)) + { model->BSIM4v4tnoiMod = 0; printf("Warning: tnoiMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4trnqsModGiven) - model->BSIM4V4trnqsMod = 0; - else if ((model->BSIM4V4trnqsMod != 0) && (model->BSIM4V4trnqsMod != 1)) - { model->BSIM4V4trnqsMod = 0; + if (!model->BSIM4v4trnqsModGiven) + model->BSIM4v4trnqsMod = 0; + else if ((model->BSIM4v4trnqsMod != 0) && (model->BSIM4v4trnqsMod != 1)) + { model->BSIM4v4trnqsMod = 0; printf("Warning: trnqsMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4acnqsModGiven) - model->BSIM4V4acnqsMod = 0; - else if ((model->BSIM4V4acnqsMod != 0) && (model->BSIM4V4acnqsMod != 1)) - { model->BSIM4V4acnqsMod = 0; + if (!model->BSIM4v4acnqsModGiven) + model->BSIM4v4acnqsMod = 0; + else if ((model->BSIM4v4acnqsMod != 0) && (model->BSIM4v4acnqsMod != 1)) + { model->BSIM4v4acnqsMod = 0; printf("Warning: acnqsMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4igcModGiven) - model->BSIM4V4igcMod = 0; - else if ((model->BSIM4V4igcMod != 0) && (model->BSIM4V4igcMod != 1)) - { model->BSIM4V4igcMod = 0; + if (!model->BSIM4v4igcModGiven) + model->BSIM4v4igcMod = 0; + else if ((model->BSIM4v4igcMod != 0) && (model->BSIM4v4igcMod != 1)) + { model->BSIM4v4igcMod = 0; printf("Warning: igcMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4igbModGiven) - model->BSIM4V4igbMod = 0; - else if ((model->BSIM4V4igbMod != 0) && (model->BSIM4V4igbMod != 1)) - { model->BSIM4V4igbMod = 0; + if (!model->BSIM4v4igbModGiven) + model->BSIM4v4igbMod = 0; + else if ((model->BSIM4v4igbMod != 0) && (model->BSIM4v4igbMod != 1)) + { model->BSIM4v4igbMod = 0; printf("Warning: igbMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4tempModGiven) - model->BSIM4V4tempMod = 0; - else if ((model->BSIM4V4tempMod != 0) && (model->BSIM4V4tempMod != 1)) - { model->BSIM4V4tempMod = 0; + if (!model->BSIM4v4tempModGiven) + model->BSIM4v4tempMod = 0; + else if ((model->BSIM4v4tempMod != 0) && (model->BSIM4v4tempMod != 1)) + { model->BSIM4v4tempMod = 0; printf("Warning: tempMod has been set to its default value: 0.\n"); } - if (!model->BSIM4V4versionGiven) - model->BSIM4V4version = "4.4.0"; - if (!model->BSIM4V4toxrefGiven) - model->BSIM4V4toxref = 30.0e-10; - if (!model->BSIM4V4toxeGiven) - model->BSIM4V4toxe = 30.0e-10; - if (!model->BSIM4V4toxpGiven) - model->BSIM4V4toxp = model->BSIM4V4toxe; - if (!model->BSIM4V4toxmGiven) - model->BSIM4V4toxm = model->BSIM4V4toxe; - if (!model->BSIM4V4dtoxGiven) - model->BSIM4V4dtox = 0.0; - if (!model->BSIM4V4epsroxGiven) - model->BSIM4V4epsrox = 3.9; - - if (!model->BSIM4V4cdscGiven) - model->BSIM4V4cdsc = 2.4e-4; /* unit Q/V/m^2 */ - if (!model->BSIM4V4cdscbGiven) - model->BSIM4V4cdscb = 0.0; /* unit Q/V/m^2 */ - if (!model->BSIM4V4cdscdGiven) - model->BSIM4V4cdscd = 0.0; /* unit Q/V/m^2 */ - if (!model->BSIM4V4citGiven) - model->BSIM4V4cit = 0.0; /* unit Q/V/m^2 */ - if (!model->BSIM4V4nfactorGiven) - model->BSIM4V4nfactor = 1.0; - if (!model->BSIM4V4xjGiven) - model->BSIM4V4xj = .15e-6; - if (!model->BSIM4V4vsatGiven) - model->BSIM4V4vsat = 8.0e4; /* unit m/s */ - if (!model->BSIM4V4atGiven) - model->BSIM4V4at = 3.3e4; /* unit m/s */ - if (!model->BSIM4V4a0Given) - model->BSIM4V4a0 = 1.0; - if (!model->BSIM4V4agsGiven) - model->BSIM4V4ags = 0.0; - if (!model->BSIM4V4a1Given) - model->BSIM4V4a1 = 0.0; - if (!model->BSIM4V4a2Given) - model->BSIM4V4a2 = 1.0; - if (!model->BSIM4V4ketaGiven) - model->BSIM4V4keta = -0.047; /* unit / V */ - if (!model->BSIM4V4nsubGiven) - model->BSIM4V4nsub = 6.0e16; /* unit 1/cm3 */ - if (!model->BSIM4V4ndepGiven) - model->BSIM4V4ndep = 1.7e17; /* unit 1/cm3 */ - if (!model->BSIM4V4nsdGiven) - model->BSIM4V4nsd = 1.0e20; /* unit 1/cm3 */ - if (!model->BSIM4V4phinGiven) - model->BSIM4V4phin = 0.0; /* unit V */ - if (!model->BSIM4V4ngateGiven) - model->BSIM4V4ngate = 0; /* unit 1/cm3 */ - if (!model->BSIM4V4vbmGiven) - model->BSIM4V4vbm = -3.0; - if (!model->BSIM4V4xtGiven) - model->BSIM4V4xt = 1.55e-7; - if (!model->BSIM4V4kt1Given) - model->BSIM4V4kt1 = -0.11; /* unit V */ - if (!model->BSIM4V4kt1lGiven) - model->BSIM4V4kt1l = 0.0; /* unit V*m */ - if (!model->BSIM4V4kt2Given) - model->BSIM4V4kt2 = 0.022; /* No unit */ - if (!model->BSIM4V4k3Given) - model->BSIM4V4k3 = 80.0; - if (!model->BSIM4V4k3bGiven) - model->BSIM4V4k3b = 0.0; - if (!model->BSIM4V4w0Given) - model->BSIM4V4w0 = 2.5e-6; - if (!model->BSIM4V4lpe0Given) - model->BSIM4V4lpe0 = 1.74e-7; - if (!model->BSIM4V4lpebGiven) - model->BSIM4V4lpeb = 0.0; - if (!model->BSIM4V4dvtp0Given) - model->BSIM4V4dvtp0 = 0.0; - if (!model->BSIM4V4dvtp1Given) - model->BSIM4V4dvtp1 = 0.0; - if (!model->BSIM4V4dvt0Given) - model->BSIM4V4dvt0 = 2.2; - if (!model->BSIM4V4dvt1Given) - model->BSIM4V4dvt1 = 0.53; - if (!model->BSIM4V4dvt2Given) - model->BSIM4V4dvt2 = -0.032; /* unit 1 / V */ - - if (!model->BSIM4V4dvt0wGiven) - model->BSIM4V4dvt0w = 0.0; - if (!model->BSIM4V4dvt1wGiven) - model->BSIM4V4dvt1w = 5.3e6; - if (!model->BSIM4V4dvt2wGiven) - model->BSIM4V4dvt2w = -0.032; - - if (!model->BSIM4V4droutGiven) - model->BSIM4V4drout = 0.56; - if (!model->BSIM4V4dsubGiven) - model->BSIM4V4dsub = model->BSIM4V4drout; - if (!model->BSIM4V4vth0Given) - model->BSIM4V4vth0 = (model->BSIM4V4type == NMOS) ? 0.7 : -0.7; - if (!model->BSIM4V4euGiven) - model->BSIM4V4eu = (model->BSIM4V4type == NMOS) ? 1.67 : 1.0;; - if (!model->BSIM4V4uaGiven) - model->BSIM4V4ua = (model->BSIM4V4mobMod == 2) ? 1.0e-15 : 1.0e-9; /* unit m/V */ - if (!model->BSIM4V4ua1Given) - model->BSIM4V4ua1 = 1.0e-9; /* unit m/V */ - if (!model->BSIM4V4ubGiven) - model->BSIM4V4ub = 1.0e-19; /* unit (m/V)**2 */ - if (!model->BSIM4V4ub1Given) - model->BSIM4V4ub1 = -1.0e-18; /* unit (m/V)**2 */ - if (!model->BSIM4V4ucGiven) - model->BSIM4V4uc = (model->BSIM4V4mobMod == 1) ? -0.0465 : -0.0465e-9; - if (!model->BSIM4V4uc1Given) - model->BSIM4V4uc1 = (model->BSIM4V4mobMod == 1) ? -0.056 : -0.056e-9; - if (!model->BSIM4V4u0Given) - model->BSIM4V4u0 = (model->BSIM4V4type == NMOS) ? 0.067 : 0.025; - if (!model->BSIM4V4uteGiven) - model->BSIM4V4ute = -1.5; - if (!model->BSIM4V4voffGiven) - model->BSIM4V4voff = -0.08; - if (!model->BSIM4V4vofflGiven) - model->BSIM4V4voffl = 0.0; - if (!model->BSIM4V4minvGiven) - model->BSIM4V4minv = 0.0; - if (!model->BSIM4V4fproutGiven) - model->BSIM4V4fprout = 0.0; - if (!model->BSIM4V4pditsGiven) - model->BSIM4V4pdits = 0.0; - if (!model->BSIM4V4pditsdGiven) - model->BSIM4V4pditsd = 0.0; - if (!model->BSIM4V4pditslGiven) - model->BSIM4V4pditsl = 0.0; - if (!model->BSIM4V4deltaGiven) - model->BSIM4V4delta = 0.01; - if (!model->BSIM4V4rdswminGiven) - model->BSIM4V4rdswmin = 0.0; - if (!model->BSIM4V4rdwminGiven) - model->BSIM4V4rdwmin = 0.0; - if (!model->BSIM4V4rswminGiven) - model->BSIM4V4rswmin = 0.0; - if (!model->BSIM4V4rdswGiven) - model->BSIM4V4rdsw = 200.0; /* in ohm*um */ - if (!model->BSIM4V4rdwGiven) - model->BSIM4V4rdw = 100.0; - if (!model->BSIM4V4rswGiven) - model->BSIM4V4rsw = 100.0; - if (!model->BSIM4V4prwgGiven) - model->BSIM4V4prwg = 1.0; /* in 1/V */ - if (!model->BSIM4V4prwbGiven) - model->BSIM4V4prwb = 0.0; - if (!model->BSIM4V4prtGiven) - if (!model->BSIM4V4prtGiven) - model->BSIM4V4prt = 0.0; - if (!model->BSIM4V4eta0Given) - model->BSIM4V4eta0 = 0.08; /* no unit */ - if (!model->BSIM4V4etabGiven) - model->BSIM4V4etab = -0.07; /* unit 1/V */ - if (!model->BSIM4V4pclmGiven) - model->BSIM4V4pclm = 1.3; /* no unit */ - if (!model->BSIM4V4pdibl1Given) - model->BSIM4V4pdibl1 = 0.39; /* no unit */ - if (!model->BSIM4V4pdibl2Given) - model->BSIM4V4pdibl2 = 0.0086; /* no unit */ - if (!model->BSIM4V4pdiblbGiven) - model->BSIM4V4pdiblb = 0.0; /* 1/V */ - if (!model->BSIM4V4pscbe1Given) - model->BSIM4V4pscbe1 = 4.24e8; - if (!model->BSIM4V4pscbe2Given) - model->BSIM4V4pscbe2 = 1.0e-5; - if (!model->BSIM4V4pvagGiven) - model->BSIM4V4pvag = 0.0; - if (!model->BSIM4V4wrGiven) - model->BSIM4V4wr = 1.0; - if (!model->BSIM4V4dwgGiven) - model->BSIM4V4dwg = 0.0; - if (!model->BSIM4V4dwbGiven) - model->BSIM4V4dwb = 0.0; - if (!model->BSIM4V4b0Given) - model->BSIM4V4b0 = 0.0; - if (!model->BSIM4V4b1Given) - model->BSIM4V4b1 = 0.0; - if (!model->BSIM4V4alpha0Given) - model->BSIM4V4alpha0 = 0.0; - if (!model->BSIM4V4alpha1Given) - model->BSIM4V4alpha1 = 0.0; - if (!model->BSIM4V4beta0Given) - model->BSIM4V4beta0 = 30.0; - if (!model->BSIM4V4agidlGiven) - model->BSIM4V4agidl = 0.0; - if (!model->BSIM4V4bgidlGiven) - model->BSIM4V4bgidl = 2.3e9; /* V/m */ - if (!model->BSIM4V4cgidlGiven) - model->BSIM4V4cgidl = 0.5; /* V^3 */ - if (!model->BSIM4V4egidlGiven) - model->BSIM4V4egidl = 0.8; /* V */ - if (!model->BSIM4V4aigcGiven) - model->BSIM4V4aigc = (model->BSIM4V4type == NMOS) ? 0.43 : 0.31; - if (!model->BSIM4V4bigcGiven) - model->BSIM4V4bigc = (model->BSIM4V4type == NMOS) ? 0.054 : 0.024; - if (!model->BSIM4V4cigcGiven) - model->BSIM4V4cigc = (model->BSIM4V4type == NMOS) ? 0.075 : 0.03; - if (!model->BSIM4V4aigsdGiven) - model->BSIM4V4aigsd = (model->BSIM4V4type == NMOS) ? 0.43 : 0.31; - if (!model->BSIM4V4bigsdGiven) - model->BSIM4V4bigsd = (model->BSIM4V4type == NMOS) ? 0.054 : 0.024; - if (!model->BSIM4V4cigsdGiven) - model->BSIM4V4cigsd = (model->BSIM4V4type == NMOS) ? 0.075 : 0.03; - if (!model->BSIM4V4aigbaccGiven) - model->BSIM4V4aigbacc = 0.43; - if (!model->BSIM4V4bigbaccGiven) - model->BSIM4V4bigbacc = 0.054; - if (!model->BSIM4V4cigbaccGiven) - model->BSIM4V4cigbacc = 0.075; - if (!model->BSIM4V4aigbinvGiven) - model->BSIM4V4aigbinv = 0.35; - if (!model->BSIM4V4bigbinvGiven) - model->BSIM4V4bigbinv = 0.03; - if (!model->BSIM4V4cigbinvGiven) - model->BSIM4V4cigbinv = 0.006; - if (!model->BSIM4V4nigcGiven) - model->BSIM4V4nigc = 1.0; - if (!model->BSIM4V4nigbinvGiven) - model->BSIM4V4nigbinv = 3.0; - if (!model->BSIM4V4nigbaccGiven) - model->BSIM4V4nigbacc = 1.0; - if (!model->BSIM4V4ntoxGiven) - model->BSIM4V4ntox = 1.0; - if (!model->BSIM4V4eigbinvGiven) - model->BSIM4V4eigbinv = 1.1; - if (!model->BSIM4V4pigcdGiven) - model->BSIM4V4pigcd = 1.0; - if (!model->BSIM4V4poxedgeGiven) - model->BSIM4V4poxedge = 1.0; - if (!model->BSIM4V4xrcrg1Given) - model->BSIM4V4xrcrg1 = 12.0; - if (!model->BSIM4V4xrcrg2Given) - model->BSIM4V4xrcrg2 = 1.0; - if (!model->BSIM4V4ijthsfwdGiven) - model->BSIM4V4ijthsfwd = 0.1; /* unit A */ - if (!model->BSIM4V4ijthdfwdGiven) - model->BSIM4V4ijthdfwd = model->BSIM4V4ijthsfwd; - if (!model->BSIM4V4ijthsrevGiven) - model->BSIM4V4ijthsrev = 0.1; /* unit A */ - if (!model->BSIM4V4ijthdrevGiven) - model->BSIM4V4ijthdrev = model->BSIM4V4ijthsrev; - if (!model->BSIM4V4tnoiaGiven) - model->BSIM4V4tnoia = 1.5; - if (!model->BSIM4V4tnoibGiven) - model->BSIM4V4tnoib = 3.5; - if (!model->BSIM4V4rnoiaGiven) - model->BSIM4V4rnoia = 0.577; - if (!model->BSIM4V4rnoibGiven) - model->BSIM4V4rnoib = 0.5164; - if (!model->BSIM4V4ntnoiGiven) - model->BSIM4V4ntnoi = 1.0; - if (!model->BSIM4V4lambdaGiven) - model->BSIM4V4lambda = 0.0; - if (!model->BSIM4V4vtlGiven) - model->BSIM4V4vtl = 2.0e5; /* unit m/s */ - if (!model->BSIM4V4xnGiven) - model->BSIM4V4xn = 3.0; - if (!model->BSIM4V4lcGiven) - model->BSIM4V4lc = 5.0e-9; - if (!model->BSIM4V4vfbsdoffGiven) - model->BSIM4V4vfbsdoff = 0.0; /* unit v */ - if (!model->BSIM4V4lintnoiGiven) - model->BSIM4V4lintnoi = 0.0; /* unit m */ - - if (!model->BSIM4V4xjbvsGiven) - model->BSIM4V4xjbvs = 1.0; /* no unit */ - if (!model->BSIM4V4xjbvdGiven) - model->BSIM4V4xjbvd = model->BSIM4V4xjbvs; - if (!model->BSIM4V4bvsGiven) - model->BSIM4V4bvs = 10.0; /* V */ - if (!model->BSIM4V4bvdGiven) - model->BSIM4V4bvd = model->BSIM4V4bvs; - - if (!model->BSIM4V4gbminGiven) - model->BSIM4V4gbmin = 1.0e-12; /* in mho */ - if (!model->BSIM4V4rbdbGiven) - model->BSIM4V4rbdb = 50.0; /* in ohm */ - if (!model->BSIM4V4rbpbGiven) - model->BSIM4V4rbpb = 50.0; - if (!model->BSIM4V4rbsbGiven) - model->BSIM4V4rbsb = 50.0; - if (!model->BSIM4V4rbpsGiven) - model->BSIM4V4rbps = 50.0; - if (!model->BSIM4V4rbpdGiven) - model->BSIM4V4rbpd = 50.0; - - if (!model->BSIM4V4cgslGiven) - model->BSIM4V4cgsl = 0.0; - if (!model->BSIM4V4cgdlGiven) - model->BSIM4V4cgdl = 0.0; - if (!model->BSIM4V4ckappasGiven) - model->BSIM4V4ckappas = 0.6; - if (!model->BSIM4V4ckappadGiven) - model->BSIM4V4ckappad = model->BSIM4V4ckappas; - if (!model->BSIM4V4clcGiven) - model->BSIM4V4clc = 0.1e-6; - if (!model->BSIM4V4cleGiven) - model->BSIM4V4cle = 0.6; - if (!model->BSIM4V4vfbcvGiven) - model->BSIM4V4vfbcv = -1.0; - if (!model->BSIM4V4acdeGiven) - model->BSIM4V4acde = 1.0; - if (!model->BSIM4V4moinGiven) - model->BSIM4V4moin = 15.0; - if (!model->BSIM4V4noffGiven) - model->BSIM4V4noff = 1.0; - if (!model->BSIM4V4voffcvGiven) - model->BSIM4V4voffcv = 0.0; - if (!model->BSIM4V4dmcgGiven) - model->BSIM4V4dmcg = 0.0; - if (!model->BSIM4V4dmciGiven) - model->BSIM4V4dmci = model->BSIM4V4dmcg; - if (!model->BSIM4V4dmdgGiven) - model->BSIM4V4dmdg = 0.0; - if (!model->BSIM4V4dmcgtGiven) - model->BSIM4V4dmcgt = 0.0; - if (!model->BSIM4V4xgwGiven) - model->BSIM4V4xgw = 0.0; - if (!model->BSIM4V4xglGiven) - model->BSIM4V4xgl = 0.0; - if (!model->BSIM4V4rshgGiven) - model->BSIM4V4rshg = 0.1; - if (!model->BSIM4V4ngconGiven) - model->BSIM4V4ngcon = 1.0; - if (!model->BSIM4V4tcjGiven) - model->BSIM4V4tcj = 0.0; - if (!model->BSIM4V4tpbGiven) - model->BSIM4V4tpb = 0.0; - if (!model->BSIM4V4tcjswGiven) - model->BSIM4V4tcjsw = 0.0; - if (!model->BSIM4V4tpbswGiven) - model->BSIM4V4tpbsw = 0.0; - if (!model->BSIM4V4tcjswgGiven) - model->BSIM4V4tcjswg = 0.0; - if (!model->BSIM4V4tpbswgGiven) - model->BSIM4V4tpbswg = 0.0; + if (!model->BSIM4v4versionGiven) + model->BSIM4v4version = "4.4.0"; + if (!model->BSIM4v4toxrefGiven) + model->BSIM4v4toxref = 30.0e-10; + if (!model->BSIM4v4toxeGiven) + model->BSIM4v4toxe = 30.0e-10; + if (!model->BSIM4v4toxpGiven) + model->BSIM4v4toxp = model->BSIM4v4toxe; + if (!model->BSIM4v4toxmGiven) + model->BSIM4v4toxm = model->BSIM4v4toxe; + if (!model->BSIM4v4dtoxGiven) + model->BSIM4v4dtox = 0.0; + if (!model->BSIM4v4epsroxGiven) + model->BSIM4v4epsrox = 3.9; + + if (!model->BSIM4v4cdscGiven) + model->BSIM4v4cdsc = 2.4e-4; /* unit Q/V/m^2 */ + if (!model->BSIM4v4cdscbGiven) + model->BSIM4v4cdscb = 0.0; /* unit Q/V/m^2 */ + if (!model->BSIM4v4cdscdGiven) + model->BSIM4v4cdscd = 0.0; /* unit Q/V/m^2 */ + if (!model->BSIM4v4citGiven) + model->BSIM4v4cit = 0.0; /* unit Q/V/m^2 */ + if (!model->BSIM4v4nfactorGiven) + model->BSIM4v4nfactor = 1.0; + if (!model->BSIM4v4xjGiven) + model->BSIM4v4xj = .15e-6; + if (!model->BSIM4v4vsatGiven) + model->BSIM4v4vsat = 8.0e4; /* unit m/s */ + if (!model->BSIM4v4atGiven) + model->BSIM4v4at = 3.3e4; /* unit m/s */ + if (!model->BSIM4v4a0Given) + model->BSIM4v4a0 = 1.0; + if (!model->BSIM4v4agsGiven) + model->BSIM4v4ags = 0.0; + if (!model->BSIM4v4a1Given) + model->BSIM4v4a1 = 0.0; + if (!model->BSIM4v4a2Given) + model->BSIM4v4a2 = 1.0; + if (!model->BSIM4v4ketaGiven) + model->BSIM4v4keta = -0.047; /* unit / V */ + if (!model->BSIM4v4nsubGiven) + model->BSIM4v4nsub = 6.0e16; /* unit 1/cm3 */ + if (!model->BSIM4v4ndepGiven) + model->BSIM4v4ndep = 1.7e17; /* unit 1/cm3 */ + if (!model->BSIM4v4nsdGiven) + model->BSIM4v4nsd = 1.0e20; /* unit 1/cm3 */ + if (!model->BSIM4v4phinGiven) + model->BSIM4v4phin = 0.0; /* unit V */ + if (!model->BSIM4v4ngateGiven) + model->BSIM4v4ngate = 0; /* unit 1/cm3 */ + if (!model->BSIM4v4vbmGiven) + model->BSIM4v4vbm = -3.0; + if (!model->BSIM4v4xtGiven) + model->BSIM4v4xt = 1.55e-7; + if (!model->BSIM4v4kt1Given) + model->BSIM4v4kt1 = -0.11; /* unit V */ + if (!model->BSIM4v4kt1lGiven) + model->BSIM4v4kt1l = 0.0; /* unit V*m */ + if (!model->BSIM4v4kt2Given) + model->BSIM4v4kt2 = 0.022; /* No unit */ + if (!model->BSIM4v4k3Given) + model->BSIM4v4k3 = 80.0; + if (!model->BSIM4v4k3bGiven) + model->BSIM4v4k3b = 0.0; + if (!model->BSIM4v4w0Given) + model->BSIM4v4w0 = 2.5e-6; + if (!model->BSIM4v4lpe0Given) + model->BSIM4v4lpe0 = 1.74e-7; + if (!model->BSIM4v4lpebGiven) + model->BSIM4v4lpeb = 0.0; + if (!model->BSIM4v4dvtp0Given) + model->BSIM4v4dvtp0 = 0.0; + if (!model->BSIM4v4dvtp1Given) + model->BSIM4v4dvtp1 = 0.0; + if (!model->BSIM4v4dvt0Given) + model->BSIM4v4dvt0 = 2.2; + if (!model->BSIM4v4dvt1Given) + model->BSIM4v4dvt1 = 0.53; + if (!model->BSIM4v4dvt2Given) + model->BSIM4v4dvt2 = -0.032; /* unit 1 / V */ + + if (!model->BSIM4v4dvt0wGiven) + model->BSIM4v4dvt0w = 0.0; + if (!model->BSIM4v4dvt1wGiven) + model->BSIM4v4dvt1w = 5.3e6; + if (!model->BSIM4v4dvt2wGiven) + model->BSIM4v4dvt2w = -0.032; + + if (!model->BSIM4v4droutGiven) + model->BSIM4v4drout = 0.56; + if (!model->BSIM4v4dsubGiven) + model->BSIM4v4dsub = model->BSIM4v4drout; + if (!model->BSIM4v4vth0Given) + model->BSIM4v4vth0 = (model->BSIM4v4type == NMOS) ? 0.7 : -0.7; + if (!model->BSIM4v4euGiven) + model->BSIM4v4eu = (model->BSIM4v4type == NMOS) ? 1.67 : 1.0;; + if (!model->BSIM4v4uaGiven) + model->BSIM4v4ua = (model->BSIM4v4mobMod == 2) ? 1.0e-15 : 1.0e-9; /* unit m/V */ + if (!model->BSIM4v4ua1Given) + model->BSIM4v4ua1 = 1.0e-9; /* unit m/V */ + if (!model->BSIM4v4ubGiven) + model->BSIM4v4ub = 1.0e-19; /* unit (m/V)**2 */ + if (!model->BSIM4v4ub1Given) + model->BSIM4v4ub1 = -1.0e-18; /* unit (m/V)**2 */ + if (!model->BSIM4v4ucGiven) + model->BSIM4v4uc = (model->BSIM4v4mobMod == 1) ? -0.0465 : -0.0465e-9; + if (!model->BSIM4v4uc1Given) + model->BSIM4v4uc1 = (model->BSIM4v4mobMod == 1) ? -0.056 : -0.056e-9; + if (!model->BSIM4v4u0Given) + model->BSIM4v4u0 = (model->BSIM4v4type == NMOS) ? 0.067 : 0.025; + if (!model->BSIM4v4uteGiven) + model->BSIM4v4ute = -1.5; + if (!model->BSIM4v4voffGiven) + model->BSIM4v4voff = -0.08; + if (!model->BSIM4v4vofflGiven) + model->BSIM4v4voffl = 0.0; + if (!model->BSIM4v4minvGiven) + model->BSIM4v4minv = 0.0; + if (!model->BSIM4v4fproutGiven) + model->BSIM4v4fprout = 0.0; + if (!model->BSIM4v4pditsGiven) + model->BSIM4v4pdits = 0.0; + if (!model->BSIM4v4pditsdGiven) + model->BSIM4v4pditsd = 0.0; + if (!model->BSIM4v4pditslGiven) + model->BSIM4v4pditsl = 0.0; + if (!model->BSIM4v4deltaGiven) + model->BSIM4v4delta = 0.01; + if (!model->BSIM4v4rdswminGiven) + model->BSIM4v4rdswmin = 0.0; + if (!model->BSIM4v4rdwminGiven) + model->BSIM4v4rdwmin = 0.0; + if (!model->BSIM4v4rswminGiven) + model->BSIM4v4rswmin = 0.0; + if (!model->BSIM4v4rdswGiven) + model->BSIM4v4rdsw = 200.0; /* in ohm*um */ + if (!model->BSIM4v4rdwGiven) + model->BSIM4v4rdw = 100.0; + if (!model->BSIM4v4rswGiven) + model->BSIM4v4rsw = 100.0; + if (!model->BSIM4v4prwgGiven) + model->BSIM4v4prwg = 1.0; /* in 1/V */ + if (!model->BSIM4v4prwbGiven) + model->BSIM4v4prwb = 0.0; + if (!model->BSIM4v4prtGiven) + if (!model->BSIM4v4prtGiven) + model->BSIM4v4prt = 0.0; + if (!model->BSIM4v4eta0Given) + model->BSIM4v4eta0 = 0.08; /* no unit */ + if (!model->BSIM4v4etabGiven) + model->BSIM4v4etab = -0.07; /* unit 1/V */ + if (!model->BSIM4v4pclmGiven) + model->BSIM4v4pclm = 1.3; /* no unit */ + if (!model->BSIM4v4pdibl1Given) + model->BSIM4v4pdibl1 = 0.39; /* no unit */ + if (!model->BSIM4v4pdibl2Given) + model->BSIM4v4pdibl2 = 0.0086; /* no unit */ + if (!model->BSIM4v4pdiblbGiven) + model->BSIM4v4pdiblb = 0.0; /* 1/V */ + if (!model->BSIM4v4pscbe1Given) + model->BSIM4v4pscbe1 = 4.24e8; + if (!model->BSIM4v4pscbe2Given) + model->BSIM4v4pscbe2 = 1.0e-5; + if (!model->BSIM4v4pvagGiven) + model->BSIM4v4pvag = 0.0; + if (!model->BSIM4v4wrGiven) + model->BSIM4v4wr = 1.0; + if (!model->BSIM4v4dwgGiven) + model->BSIM4v4dwg = 0.0; + if (!model->BSIM4v4dwbGiven) + model->BSIM4v4dwb = 0.0; + if (!model->BSIM4v4b0Given) + model->BSIM4v4b0 = 0.0; + if (!model->BSIM4v4b1Given) + model->BSIM4v4b1 = 0.0; + if (!model->BSIM4v4alpha0Given) + model->BSIM4v4alpha0 = 0.0; + if (!model->BSIM4v4alpha1Given) + model->BSIM4v4alpha1 = 0.0; + if (!model->BSIM4v4beta0Given) + model->BSIM4v4beta0 = 30.0; + if (!model->BSIM4v4agidlGiven) + model->BSIM4v4agidl = 0.0; + if (!model->BSIM4v4bgidlGiven) + model->BSIM4v4bgidl = 2.3e9; /* V/m */ + if (!model->BSIM4v4cgidlGiven) + model->BSIM4v4cgidl = 0.5; /* V^3 */ + if (!model->BSIM4v4egidlGiven) + model->BSIM4v4egidl = 0.8; /* V */ + if (!model->BSIM4v4aigcGiven) + model->BSIM4v4aigc = (model->BSIM4v4type == NMOS) ? 0.43 : 0.31; + if (!model->BSIM4v4bigcGiven) + model->BSIM4v4bigc = (model->BSIM4v4type == NMOS) ? 0.054 : 0.024; + if (!model->BSIM4v4cigcGiven) + model->BSIM4v4cigc = (model->BSIM4v4type == NMOS) ? 0.075 : 0.03; + if (!model->BSIM4v4aigsdGiven) + model->BSIM4v4aigsd = (model->BSIM4v4type == NMOS) ? 0.43 : 0.31; + if (!model->BSIM4v4bigsdGiven) + model->BSIM4v4bigsd = (model->BSIM4v4type == NMOS) ? 0.054 : 0.024; + if (!model->BSIM4v4cigsdGiven) + model->BSIM4v4cigsd = (model->BSIM4v4type == NMOS) ? 0.075 : 0.03; + if (!model->BSIM4v4aigbaccGiven) + model->BSIM4v4aigbacc = 0.43; + if (!model->BSIM4v4bigbaccGiven) + model->BSIM4v4bigbacc = 0.054; + if (!model->BSIM4v4cigbaccGiven) + model->BSIM4v4cigbacc = 0.075; + if (!model->BSIM4v4aigbinvGiven) + model->BSIM4v4aigbinv = 0.35; + if (!model->BSIM4v4bigbinvGiven) + model->BSIM4v4bigbinv = 0.03; + if (!model->BSIM4v4cigbinvGiven) + model->BSIM4v4cigbinv = 0.006; + if (!model->BSIM4v4nigcGiven) + model->BSIM4v4nigc = 1.0; + if (!model->BSIM4v4nigbinvGiven) + model->BSIM4v4nigbinv = 3.0; + if (!model->BSIM4v4nigbaccGiven) + model->BSIM4v4nigbacc = 1.0; + if (!model->BSIM4v4ntoxGiven) + model->BSIM4v4ntox = 1.0; + if (!model->BSIM4v4eigbinvGiven) + model->BSIM4v4eigbinv = 1.1; + if (!model->BSIM4v4pigcdGiven) + model->BSIM4v4pigcd = 1.0; + if (!model->BSIM4v4poxedgeGiven) + model->BSIM4v4poxedge = 1.0; + if (!model->BSIM4v4xrcrg1Given) + model->BSIM4v4xrcrg1 = 12.0; + if (!model->BSIM4v4xrcrg2Given) + model->BSIM4v4xrcrg2 = 1.0; + if (!model->BSIM4v4ijthsfwdGiven) + model->BSIM4v4ijthsfwd = 0.1; /* unit A */ + if (!model->BSIM4v4ijthdfwdGiven) + model->BSIM4v4ijthdfwd = model->BSIM4v4ijthsfwd; + if (!model->BSIM4v4ijthsrevGiven) + model->BSIM4v4ijthsrev = 0.1; /* unit A */ + if (!model->BSIM4v4ijthdrevGiven) + model->BSIM4v4ijthdrev = model->BSIM4v4ijthsrev; + if (!model->BSIM4v4tnoiaGiven) + model->BSIM4v4tnoia = 1.5; + if (!model->BSIM4v4tnoibGiven) + model->BSIM4v4tnoib = 3.5; + if (!model->BSIM4v4rnoiaGiven) + model->BSIM4v4rnoia = 0.577; + if (!model->BSIM4v4rnoibGiven) + model->BSIM4v4rnoib = 0.5164; + if (!model->BSIM4v4ntnoiGiven) + model->BSIM4v4ntnoi = 1.0; + if (!model->BSIM4v4lambdaGiven) + model->BSIM4v4lambda = 0.0; + if (!model->BSIM4v4vtlGiven) + model->BSIM4v4vtl = 2.0e5; /* unit m/s */ + if (!model->BSIM4v4xnGiven) + model->BSIM4v4xn = 3.0; + if (!model->BSIM4v4lcGiven) + model->BSIM4v4lc = 5.0e-9; + if (!model->BSIM4v4vfbsdoffGiven) + model->BSIM4v4vfbsdoff = 0.0; /* unit v */ + if (!model->BSIM4v4lintnoiGiven) + model->BSIM4v4lintnoi = 0.0; /* unit m */ + + if (!model->BSIM4v4xjbvsGiven) + model->BSIM4v4xjbvs = 1.0; /* no unit */ + if (!model->BSIM4v4xjbvdGiven) + model->BSIM4v4xjbvd = model->BSIM4v4xjbvs; + if (!model->BSIM4v4bvsGiven) + model->BSIM4v4bvs = 10.0; /* V */ + if (!model->BSIM4v4bvdGiven) + model->BSIM4v4bvd = model->BSIM4v4bvs; + + if (!model->BSIM4v4gbminGiven) + model->BSIM4v4gbmin = 1.0e-12; /* in mho */ + if (!model->BSIM4v4rbdbGiven) + model->BSIM4v4rbdb = 50.0; /* in ohm */ + if (!model->BSIM4v4rbpbGiven) + model->BSIM4v4rbpb = 50.0; + if (!model->BSIM4v4rbsbGiven) + model->BSIM4v4rbsb = 50.0; + if (!model->BSIM4v4rbpsGiven) + model->BSIM4v4rbps = 50.0; + if (!model->BSIM4v4rbpdGiven) + model->BSIM4v4rbpd = 50.0; + + if (!model->BSIM4v4cgslGiven) + model->BSIM4v4cgsl = 0.0; + if (!model->BSIM4v4cgdlGiven) + model->BSIM4v4cgdl = 0.0; + if (!model->BSIM4v4ckappasGiven) + model->BSIM4v4ckappas = 0.6; + if (!model->BSIM4v4ckappadGiven) + model->BSIM4v4ckappad = model->BSIM4v4ckappas; + if (!model->BSIM4v4clcGiven) + model->BSIM4v4clc = 0.1e-6; + if (!model->BSIM4v4cleGiven) + model->BSIM4v4cle = 0.6; + if (!model->BSIM4v4vfbcvGiven) + model->BSIM4v4vfbcv = -1.0; + if (!model->BSIM4v4acdeGiven) + model->BSIM4v4acde = 1.0; + if (!model->BSIM4v4moinGiven) + model->BSIM4v4moin = 15.0; + if (!model->BSIM4v4noffGiven) + model->BSIM4v4noff = 1.0; + if (!model->BSIM4v4voffcvGiven) + model->BSIM4v4voffcv = 0.0; + if (!model->BSIM4v4dmcgGiven) + model->BSIM4v4dmcg = 0.0; + if (!model->BSIM4v4dmciGiven) + model->BSIM4v4dmci = model->BSIM4v4dmcg; + if (!model->BSIM4v4dmdgGiven) + model->BSIM4v4dmdg = 0.0; + if (!model->BSIM4v4dmcgtGiven) + model->BSIM4v4dmcgt = 0.0; + if (!model->BSIM4v4xgwGiven) + model->BSIM4v4xgw = 0.0; + if (!model->BSIM4v4xglGiven) + model->BSIM4v4xgl = 0.0; + if (!model->BSIM4v4rshgGiven) + model->BSIM4v4rshg = 0.1; + if (!model->BSIM4v4ngconGiven) + model->BSIM4v4ngcon = 1.0; + if (!model->BSIM4v4tcjGiven) + model->BSIM4v4tcj = 0.0; + if (!model->BSIM4v4tpbGiven) + model->BSIM4v4tpb = 0.0; + if (!model->BSIM4v4tcjswGiven) + model->BSIM4v4tcjsw = 0.0; + if (!model->BSIM4v4tpbswGiven) + model->BSIM4v4tpbsw = 0.0; + if (!model->BSIM4v4tcjswgGiven) + model->BSIM4v4tcjswg = 0.0; + if (!model->BSIM4v4tpbswgGiven) + model->BSIM4v4tpbswg = 0.0; /* Length dependence */ - if (!model->BSIM4V4lcdscGiven) - model->BSIM4V4lcdsc = 0.0; - if (!model->BSIM4V4lcdscbGiven) - model->BSIM4V4lcdscb = 0.0; - if (!model->BSIM4V4lcdscdGiven) - model->BSIM4V4lcdscd = 0.0; - if (!model->BSIM4V4lcitGiven) - model->BSIM4V4lcit = 0.0; - if (!model->BSIM4V4lnfactorGiven) - model->BSIM4V4lnfactor = 0.0; - if (!model->BSIM4V4lxjGiven) - model->BSIM4V4lxj = 0.0; - if (!model->BSIM4V4lvsatGiven) - model->BSIM4V4lvsat = 0.0; - if (!model->BSIM4V4latGiven) - model->BSIM4V4lat = 0.0; - if (!model->BSIM4V4la0Given) - model->BSIM4V4la0 = 0.0; - if (!model->BSIM4V4lagsGiven) - model->BSIM4V4lags = 0.0; - if (!model->BSIM4V4la1Given) - model->BSIM4V4la1 = 0.0; - if (!model->BSIM4V4la2Given) - model->BSIM4V4la2 = 0.0; - if (!model->BSIM4V4lketaGiven) - model->BSIM4V4lketa = 0.0; - if (!model->BSIM4V4lnsubGiven) - model->BSIM4V4lnsub = 0.0; - if (!model->BSIM4V4lndepGiven) - model->BSIM4V4lndep = 0.0; - if (!model->BSIM4V4lnsdGiven) - model->BSIM4V4lnsd = 0.0; - if (!model->BSIM4V4lphinGiven) - model->BSIM4V4lphin = 0.0; - if (!model->BSIM4V4lngateGiven) - model->BSIM4V4lngate = 0.0; - if (!model->BSIM4V4lvbmGiven) - model->BSIM4V4lvbm = 0.0; - if (!model->BSIM4V4lxtGiven) - model->BSIM4V4lxt = 0.0; - if (!model->BSIM4V4lkt1Given) - model->BSIM4V4lkt1 = 0.0; - if (!model->BSIM4V4lkt1lGiven) - model->BSIM4V4lkt1l = 0.0; - if (!model->BSIM4V4lkt2Given) - model->BSIM4V4lkt2 = 0.0; - if (!model->BSIM4V4lk3Given) - model->BSIM4V4lk3 = 0.0; - if (!model->BSIM4V4lk3bGiven) - model->BSIM4V4lk3b = 0.0; - if (!model->BSIM4V4lw0Given) - model->BSIM4V4lw0 = 0.0; - if (!model->BSIM4V4llpe0Given) - model->BSIM4V4llpe0 = 0.0; - if (!model->BSIM4V4llpebGiven) - model->BSIM4V4llpeb = 0.0; - if (!model->BSIM4V4ldvtp0Given) - model->BSIM4V4ldvtp0 = 0.0; - if (!model->BSIM4V4ldvtp1Given) - model->BSIM4V4ldvtp1 = 0.0; - if (!model->BSIM4V4ldvt0Given) - model->BSIM4V4ldvt0 = 0.0; - if (!model->BSIM4V4ldvt1Given) - model->BSIM4V4ldvt1 = 0.0; - if (!model->BSIM4V4ldvt2Given) - model->BSIM4V4ldvt2 = 0.0; - if (!model->BSIM4V4ldvt0wGiven) - model->BSIM4V4ldvt0w = 0.0; - if (!model->BSIM4V4ldvt1wGiven) - model->BSIM4V4ldvt1w = 0.0; - if (!model->BSIM4V4ldvt2wGiven) - model->BSIM4V4ldvt2w = 0.0; - if (!model->BSIM4V4ldroutGiven) - model->BSIM4V4ldrout = 0.0; - if (!model->BSIM4V4ldsubGiven) - model->BSIM4V4ldsub = 0.0; - if (!model->BSIM4V4lvth0Given) - model->BSIM4V4lvth0 = 0.0; - if (!model->BSIM4V4luaGiven) - model->BSIM4V4lua = 0.0; - if (!model->BSIM4V4lua1Given) - model->BSIM4V4lua1 = 0.0; - if (!model->BSIM4V4lubGiven) - model->BSIM4V4lub = 0.0; - if (!model->BSIM4V4lub1Given) - model->BSIM4V4lub1 = 0.0; - if (!model->BSIM4V4lucGiven) - model->BSIM4V4luc = 0.0; - if (!model->BSIM4V4luc1Given) - model->BSIM4V4luc1 = 0.0; - if (!model->BSIM4V4lu0Given) - model->BSIM4V4lu0 = 0.0; - if (!model->BSIM4V4luteGiven) - model->BSIM4V4lute = 0.0; - if (!model->BSIM4V4lvoffGiven) - model->BSIM4V4lvoff = 0.0; - if (!model->BSIM4V4lminvGiven) - model->BSIM4V4lminv = 0.0; - if (!model->BSIM4V4lfproutGiven) - model->BSIM4V4lfprout = 0.0; - if (!model->BSIM4V4lpditsGiven) - model->BSIM4V4lpdits = 0.0; - if (!model->BSIM4V4lpditsdGiven) - model->BSIM4V4lpditsd = 0.0; - if (!model->BSIM4V4ldeltaGiven) - model->BSIM4V4ldelta = 0.0; - if (!model->BSIM4V4lrdswGiven) - model->BSIM4V4lrdsw = 0.0; - if (!model->BSIM4V4lrdwGiven) - model->BSIM4V4lrdw = 0.0; - if (!model->BSIM4V4lrswGiven) - model->BSIM4V4lrsw = 0.0; - if (!model->BSIM4V4lprwbGiven) - model->BSIM4V4lprwb = 0.0; - if (!model->BSIM4V4lprwgGiven) - model->BSIM4V4lprwg = 0.0; - if (!model->BSIM4V4lprtGiven) - model->BSIM4V4lprt = 0.0; - if (!model->BSIM4V4leta0Given) - model->BSIM4V4leta0 = 0.0; - if (!model->BSIM4V4letabGiven) - model->BSIM4V4letab = -0.0; - if (!model->BSIM4V4lpclmGiven) - model->BSIM4V4lpclm = 0.0; - if (!model->BSIM4V4lpdibl1Given) - model->BSIM4V4lpdibl1 = 0.0; - if (!model->BSIM4V4lpdibl2Given) - model->BSIM4V4lpdibl2 = 0.0; - if (!model->BSIM4V4lpdiblbGiven) - model->BSIM4V4lpdiblb = 0.0; - if (!model->BSIM4V4lpscbe1Given) - model->BSIM4V4lpscbe1 = 0.0; - if (!model->BSIM4V4lpscbe2Given) - model->BSIM4V4lpscbe2 = 0.0; - if (!model->BSIM4V4lpvagGiven) - model->BSIM4V4lpvag = 0.0; - if (!model->BSIM4V4lwrGiven) - model->BSIM4V4lwr = 0.0; - if (!model->BSIM4V4ldwgGiven) - model->BSIM4V4ldwg = 0.0; - if (!model->BSIM4V4ldwbGiven) - model->BSIM4V4ldwb = 0.0; - if (!model->BSIM4V4lb0Given) - model->BSIM4V4lb0 = 0.0; - if (!model->BSIM4V4lb1Given) - model->BSIM4V4lb1 = 0.0; - if (!model->BSIM4V4lalpha0Given) - model->BSIM4V4lalpha0 = 0.0; - if (!model->BSIM4V4lalpha1Given) - model->BSIM4V4lalpha1 = 0.0; - if (!model->BSIM4V4lbeta0Given) - model->BSIM4V4lbeta0 = 0.0; - if (!model->BSIM4V4lagidlGiven) - model->BSIM4V4lagidl = 0.0; - if (!model->BSIM4V4lbgidlGiven) - model->BSIM4V4lbgidl = 0.0; - if (!model->BSIM4V4lcgidlGiven) - model->BSIM4V4lcgidl = 0.0; - if (!model->BSIM4V4legidlGiven) - model->BSIM4V4legidl = 0.0; - if (!model->BSIM4V4laigcGiven) - model->BSIM4V4laigc = 0.0; - if (!model->BSIM4V4lbigcGiven) - model->BSIM4V4lbigc = 0.0; - if (!model->BSIM4V4lcigcGiven) - model->BSIM4V4lcigc = 0.0; - if (!model->BSIM4V4laigsdGiven) - model->BSIM4V4laigsd = 0.0; - if (!model->BSIM4V4lbigsdGiven) - model->BSIM4V4lbigsd = 0.0; - if (!model->BSIM4V4lcigsdGiven) - model->BSIM4V4lcigsd = 0.0; - if (!model->BSIM4V4laigbaccGiven) - model->BSIM4V4laigbacc = 0.0; - if (!model->BSIM4V4lbigbaccGiven) - model->BSIM4V4lbigbacc = 0.0; - if (!model->BSIM4V4lcigbaccGiven) - model->BSIM4V4lcigbacc = 0.0; - if (!model->BSIM4V4laigbinvGiven) - model->BSIM4V4laigbinv = 0.0; - if (!model->BSIM4V4lbigbinvGiven) - model->BSIM4V4lbigbinv = 0.0; - if (!model->BSIM4V4lcigbinvGiven) - model->BSIM4V4lcigbinv = 0.0; - if (!model->BSIM4V4lnigcGiven) - model->BSIM4V4lnigc = 0.0; - if (!model->BSIM4V4lnigbinvGiven) - model->BSIM4V4lnigbinv = 0.0; - if (!model->BSIM4V4lnigbaccGiven) - model->BSIM4V4lnigbacc = 0.0; - if (!model->BSIM4V4lntoxGiven) - model->BSIM4V4lntox = 0.0; - if (!model->BSIM4V4leigbinvGiven) - model->BSIM4V4leigbinv = 0.0; - if (!model->BSIM4V4lpigcdGiven) - model->BSIM4V4lpigcd = 0.0; - if (!model->BSIM4V4lpoxedgeGiven) - model->BSIM4V4lpoxedge = 0.0; - if (!model->BSIM4V4lxrcrg1Given) - model->BSIM4V4lxrcrg1 = 0.0; - if (!model->BSIM4V4lxrcrg2Given) - model->BSIM4V4lxrcrg2 = 0.0; - if (!model->BSIM4V4leuGiven) - model->BSIM4V4leu = 0.0; - if (!model->BSIM4V4lvfbGiven) - model->BSIM4V4lvfb = 0.0; - if (!model->BSIM4V4llambdaGiven) - model->BSIM4V4llambda = 0.0; - if (!model->BSIM4V4lvtlGiven) - model->BSIM4V4lvtl = 0.0; - if (!model->BSIM4V4lxnGiven) - model->BSIM4V4lxn = 0.0; - if (!model->BSIM4V4lvfbsdoffGiven) - model->BSIM4V4lvfbsdoff = 0.0; - - if (!model->BSIM4V4lcgslGiven) - model->BSIM4V4lcgsl = 0.0; - if (!model->BSIM4V4lcgdlGiven) - model->BSIM4V4lcgdl = 0.0; - if (!model->BSIM4V4lckappasGiven) - model->BSIM4V4lckappas = 0.0; - if (!model->BSIM4V4lckappadGiven) - model->BSIM4V4lckappad = 0.0; - if (!model->BSIM4V4lclcGiven) - model->BSIM4V4lclc = 0.0; - if (!model->BSIM4V4lcleGiven) - model->BSIM4V4lcle = 0.0; - if (!model->BSIM4V4lcfGiven) - model->BSIM4V4lcf = 0.0; - if (!model->BSIM4V4lvfbcvGiven) - model->BSIM4V4lvfbcv = 0.0; - if (!model->BSIM4V4lacdeGiven) - model->BSIM4V4lacde = 0.0; - if (!model->BSIM4V4lmoinGiven) - model->BSIM4V4lmoin = 0.0; - if (!model->BSIM4V4lnoffGiven) - model->BSIM4V4lnoff = 0.0; - if (!model->BSIM4V4lvoffcvGiven) - model->BSIM4V4lvoffcv = 0.0; + if (!model->BSIM4v4lcdscGiven) + model->BSIM4v4lcdsc = 0.0; + if (!model->BSIM4v4lcdscbGiven) + model->BSIM4v4lcdscb = 0.0; + if (!model->BSIM4v4lcdscdGiven) + model->BSIM4v4lcdscd = 0.0; + if (!model->BSIM4v4lcitGiven) + model->BSIM4v4lcit = 0.0; + if (!model->BSIM4v4lnfactorGiven) + model->BSIM4v4lnfactor = 0.0; + if (!model->BSIM4v4lxjGiven) + model->BSIM4v4lxj = 0.0; + if (!model->BSIM4v4lvsatGiven) + model->BSIM4v4lvsat = 0.0; + if (!model->BSIM4v4latGiven) + model->BSIM4v4lat = 0.0; + if (!model->BSIM4v4la0Given) + model->BSIM4v4la0 = 0.0; + if (!model->BSIM4v4lagsGiven) + model->BSIM4v4lags = 0.0; + if (!model->BSIM4v4la1Given) + model->BSIM4v4la1 = 0.0; + if (!model->BSIM4v4la2Given) + model->BSIM4v4la2 = 0.0; + if (!model->BSIM4v4lketaGiven) + model->BSIM4v4lketa = 0.0; + if (!model->BSIM4v4lnsubGiven) + model->BSIM4v4lnsub = 0.0; + if (!model->BSIM4v4lndepGiven) + model->BSIM4v4lndep = 0.0; + if (!model->BSIM4v4lnsdGiven) + model->BSIM4v4lnsd = 0.0; + if (!model->BSIM4v4lphinGiven) + model->BSIM4v4lphin = 0.0; + if (!model->BSIM4v4lngateGiven) + model->BSIM4v4lngate = 0.0; + if (!model->BSIM4v4lvbmGiven) + model->BSIM4v4lvbm = 0.0; + if (!model->BSIM4v4lxtGiven) + model->BSIM4v4lxt = 0.0; + if (!model->BSIM4v4lkt1Given) + model->BSIM4v4lkt1 = 0.0; + if (!model->BSIM4v4lkt1lGiven) + model->BSIM4v4lkt1l = 0.0; + if (!model->BSIM4v4lkt2Given) + model->BSIM4v4lkt2 = 0.0; + if (!model->BSIM4v4lk3Given) + model->BSIM4v4lk3 = 0.0; + if (!model->BSIM4v4lk3bGiven) + model->BSIM4v4lk3b = 0.0; + if (!model->BSIM4v4lw0Given) + model->BSIM4v4lw0 = 0.0; + if (!model->BSIM4v4llpe0Given) + model->BSIM4v4llpe0 = 0.0; + if (!model->BSIM4v4llpebGiven) + model->BSIM4v4llpeb = 0.0; + if (!model->BSIM4v4ldvtp0Given) + model->BSIM4v4ldvtp0 = 0.0; + if (!model->BSIM4v4ldvtp1Given) + model->BSIM4v4ldvtp1 = 0.0; + if (!model->BSIM4v4ldvt0Given) + model->BSIM4v4ldvt0 = 0.0; + if (!model->BSIM4v4ldvt1Given) + model->BSIM4v4ldvt1 = 0.0; + if (!model->BSIM4v4ldvt2Given) + model->BSIM4v4ldvt2 = 0.0; + if (!model->BSIM4v4ldvt0wGiven) + model->BSIM4v4ldvt0w = 0.0; + if (!model->BSIM4v4ldvt1wGiven) + model->BSIM4v4ldvt1w = 0.0; + if (!model->BSIM4v4ldvt2wGiven) + model->BSIM4v4ldvt2w = 0.0; + if (!model->BSIM4v4ldroutGiven) + model->BSIM4v4ldrout = 0.0; + if (!model->BSIM4v4ldsubGiven) + model->BSIM4v4ldsub = 0.0; + if (!model->BSIM4v4lvth0Given) + model->BSIM4v4lvth0 = 0.0; + if (!model->BSIM4v4luaGiven) + model->BSIM4v4lua = 0.0; + if (!model->BSIM4v4lua1Given) + model->BSIM4v4lua1 = 0.0; + if (!model->BSIM4v4lubGiven) + model->BSIM4v4lub = 0.0; + if (!model->BSIM4v4lub1Given) + model->BSIM4v4lub1 = 0.0; + if (!model->BSIM4v4lucGiven) + model->BSIM4v4luc = 0.0; + if (!model->BSIM4v4luc1Given) + model->BSIM4v4luc1 = 0.0; + if (!model->BSIM4v4lu0Given) + model->BSIM4v4lu0 = 0.0; + if (!model->BSIM4v4luteGiven) + model->BSIM4v4lute = 0.0; + if (!model->BSIM4v4lvoffGiven) + model->BSIM4v4lvoff = 0.0; + if (!model->BSIM4v4lminvGiven) + model->BSIM4v4lminv = 0.0; + if (!model->BSIM4v4lfproutGiven) + model->BSIM4v4lfprout = 0.0; + if (!model->BSIM4v4lpditsGiven) + model->BSIM4v4lpdits = 0.0; + if (!model->BSIM4v4lpditsdGiven) + model->BSIM4v4lpditsd = 0.0; + if (!model->BSIM4v4ldeltaGiven) + model->BSIM4v4ldelta = 0.0; + if (!model->BSIM4v4lrdswGiven) + model->BSIM4v4lrdsw = 0.0; + if (!model->BSIM4v4lrdwGiven) + model->BSIM4v4lrdw = 0.0; + if (!model->BSIM4v4lrswGiven) + model->BSIM4v4lrsw = 0.0; + if (!model->BSIM4v4lprwbGiven) + model->BSIM4v4lprwb = 0.0; + if (!model->BSIM4v4lprwgGiven) + model->BSIM4v4lprwg = 0.0; + if (!model->BSIM4v4lprtGiven) + model->BSIM4v4lprt = 0.0; + if (!model->BSIM4v4leta0Given) + model->BSIM4v4leta0 = 0.0; + if (!model->BSIM4v4letabGiven) + model->BSIM4v4letab = -0.0; + if (!model->BSIM4v4lpclmGiven) + model->BSIM4v4lpclm = 0.0; + if (!model->BSIM4v4lpdibl1Given) + model->BSIM4v4lpdibl1 = 0.0; + if (!model->BSIM4v4lpdibl2Given) + model->BSIM4v4lpdibl2 = 0.0; + if (!model->BSIM4v4lpdiblbGiven) + model->BSIM4v4lpdiblb = 0.0; + if (!model->BSIM4v4lpscbe1Given) + model->BSIM4v4lpscbe1 = 0.0; + if (!model->BSIM4v4lpscbe2Given) + model->BSIM4v4lpscbe2 = 0.0; + if (!model->BSIM4v4lpvagGiven) + model->BSIM4v4lpvag = 0.0; + if (!model->BSIM4v4lwrGiven) + model->BSIM4v4lwr = 0.0; + if (!model->BSIM4v4ldwgGiven) + model->BSIM4v4ldwg = 0.0; + if (!model->BSIM4v4ldwbGiven) + model->BSIM4v4ldwb = 0.0; + if (!model->BSIM4v4lb0Given) + model->BSIM4v4lb0 = 0.0; + if (!model->BSIM4v4lb1Given) + model->BSIM4v4lb1 = 0.0; + if (!model->BSIM4v4lalpha0Given) + model->BSIM4v4lalpha0 = 0.0; + if (!model->BSIM4v4lalpha1Given) + model->BSIM4v4lalpha1 = 0.0; + if (!model->BSIM4v4lbeta0Given) + model->BSIM4v4lbeta0 = 0.0; + if (!model->BSIM4v4lagidlGiven) + model->BSIM4v4lagidl = 0.0; + if (!model->BSIM4v4lbgidlGiven) + model->BSIM4v4lbgidl = 0.0; + if (!model->BSIM4v4lcgidlGiven) + model->BSIM4v4lcgidl = 0.0; + if (!model->BSIM4v4legidlGiven) + model->BSIM4v4legidl = 0.0; + if (!model->BSIM4v4laigcGiven) + model->BSIM4v4laigc = 0.0; + if (!model->BSIM4v4lbigcGiven) + model->BSIM4v4lbigc = 0.0; + if (!model->BSIM4v4lcigcGiven) + model->BSIM4v4lcigc = 0.0; + if (!model->BSIM4v4laigsdGiven) + model->BSIM4v4laigsd = 0.0; + if (!model->BSIM4v4lbigsdGiven) + model->BSIM4v4lbigsd = 0.0; + if (!model->BSIM4v4lcigsdGiven) + model->BSIM4v4lcigsd = 0.0; + if (!model->BSIM4v4laigbaccGiven) + model->BSIM4v4laigbacc = 0.0; + if (!model->BSIM4v4lbigbaccGiven) + model->BSIM4v4lbigbacc = 0.0; + if (!model->BSIM4v4lcigbaccGiven) + model->BSIM4v4lcigbacc = 0.0; + if (!model->BSIM4v4laigbinvGiven) + model->BSIM4v4laigbinv = 0.0; + if (!model->BSIM4v4lbigbinvGiven) + model->BSIM4v4lbigbinv = 0.0; + if (!model->BSIM4v4lcigbinvGiven) + model->BSIM4v4lcigbinv = 0.0; + if (!model->BSIM4v4lnigcGiven) + model->BSIM4v4lnigc = 0.0; + if (!model->BSIM4v4lnigbinvGiven) + model->BSIM4v4lnigbinv = 0.0; + if (!model->BSIM4v4lnigbaccGiven) + model->BSIM4v4lnigbacc = 0.0; + if (!model->BSIM4v4lntoxGiven) + model->BSIM4v4lntox = 0.0; + if (!model->BSIM4v4leigbinvGiven) + model->BSIM4v4leigbinv = 0.0; + if (!model->BSIM4v4lpigcdGiven) + model->BSIM4v4lpigcd = 0.0; + if (!model->BSIM4v4lpoxedgeGiven) + model->BSIM4v4lpoxedge = 0.0; + if (!model->BSIM4v4lxrcrg1Given) + model->BSIM4v4lxrcrg1 = 0.0; + if (!model->BSIM4v4lxrcrg2Given) + model->BSIM4v4lxrcrg2 = 0.0; + if (!model->BSIM4v4leuGiven) + model->BSIM4v4leu = 0.0; + if (!model->BSIM4v4lvfbGiven) + model->BSIM4v4lvfb = 0.0; + if (!model->BSIM4v4llambdaGiven) + model->BSIM4v4llambda = 0.0; + if (!model->BSIM4v4lvtlGiven) + model->BSIM4v4lvtl = 0.0; + if (!model->BSIM4v4lxnGiven) + model->BSIM4v4lxn = 0.0; + if (!model->BSIM4v4lvfbsdoffGiven) + model->BSIM4v4lvfbsdoff = 0.0; + + if (!model->BSIM4v4lcgslGiven) + model->BSIM4v4lcgsl = 0.0; + if (!model->BSIM4v4lcgdlGiven) + model->BSIM4v4lcgdl = 0.0; + if (!model->BSIM4v4lckappasGiven) + model->BSIM4v4lckappas = 0.0; + if (!model->BSIM4v4lckappadGiven) + model->BSIM4v4lckappad = 0.0; + if (!model->BSIM4v4lclcGiven) + model->BSIM4v4lclc = 0.0; + if (!model->BSIM4v4lcleGiven) + model->BSIM4v4lcle = 0.0; + if (!model->BSIM4v4lcfGiven) + model->BSIM4v4lcf = 0.0; + if (!model->BSIM4v4lvfbcvGiven) + model->BSIM4v4lvfbcv = 0.0; + if (!model->BSIM4v4lacdeGiven) + model->BSIM4v4lacde = 0.0; + if (!model->BSIM4v4lmoinGiven) + model->BSIM4v4lmoin = 0.0; + if (!model->BSIM4v4lnoffGiven) + model->BSIM4v4lnoff = 0.0; + if (!model->BSIM4v4lvoffcvGiven) + model->BSIM4v4lvoffcv = 0.0; /* Width dependence */ - if (!model->BSIM4V4wcdscGiven) - model->BSIM4V4wcdsc = 0.0; - if (!model->BSIM4V4wcdscbGiven) - model->BSIM4V4wcdscb = 0.0; - if (!model->BSIM4V4wcdscdGiven) - model->BSIM4V4wcdscd = 0.0; - if (!model->BSIM4V4wcitGiven) - model->BSIM4V4wcit = 0.0; - if (!model->BSIM4V4wnfactorGiven) - model->BSIM4V4wnfactor = 0.0; - if (!model->BSIM4V4wxjGiven) - model->BSIM4V4wxj = 0.0; - if (!model->BSIM4V4wvsatGiven) - model->BSIM4V4wvsat = 0.0; - if (!model->BSIM4V4watGiven) - model->BSIM4V4wat = 0.0; - if (!model->BSIM4V4wa0Given) - model->BSIM4V4wa0 = 0.0; - if (!model->BSIM4V4wagsGiven) - model->BSIM4V4wags = 0.0; - if (!model->BSIM4V4wa1Given) - model->BSIM4V4wa1 = 0.0; - if (!model->BSIM4V4wa2Given) - model->BSIM4V4wa2 = 0.0; - if (!model->BSIM4V4wketaGiven) - model->BSIM4V4wketa = 0.0; - if (!model->BSIM4V4wnsubGiven) - model->BSIM4V4wnsub = 0.0; - if (!model->BSIM4V4wndepGiven) - model->BSIM4V4wndep = 0.0; - if (!model->BSIM4V4wnsdGiven) - model->BSIM4V4wnsd = 0.0; - if (!model->BSIM4V4wphinGiven) - model->BSIM4V4wphin = 0.0; - if (!model->BSIM4V4wngateGiven) - model->BSIM4V4wngate = 0.0; - if (!model->BSIM4V4wvbmGiven) - model->BSIM4V4wvbm = 0.0; - if (!model->BSIM4V4wxtGiven) - model->BSIM4V4wxt = 0.0; - if (!model->BSIM4V4wkt1Given) - model->BSIM4V4wkt1 = 0.0; - if (!model->BSIM4V4wkt1lGiven) - model->BSIM4V4wkt1l = 0.0; - if (!model->BSIM4V4wkt2Given) - model->BSIM4V4wkt2 = 0.0; - if (!model->BSIM4V4wk3Given) - model->BSIM4V4wk3 = 0.0; - if (!model->BSIM4V4wk3bGiven) - model->BSIM4V4wk3b = 0.0; - if (!model->BSIM4V4ww0Given) - model->BSIM4V4ww0 = 0.0; - if (!model->BSIM4V4wlpe0Given) - model->BSIM4V4wlpe0 = 0.0; - if (!model->BSIM4V4wlpebGiven) - model->BSIM4V4wlpeb = 0.0; - if (!model->BSIM4V4wdvtp0Given) - model->BSIM4V4wdvtp0 = 0.0; - if (!model->BSIM4V4wdvtp1Given) - model->BSIM4V4wdvtp1 = 0.0; - if (!model->BSIM4V4wdvt0Given) - model->BSIM4V4wdvt0 = 0.0; - if (!model->BSIM4V4wdvt1Given) - model->BSIM4V4wdvt1 = 0.0; - if (!model->BSIM4V4wdvt2Given) - model->BSIM4V4wdvt2 = 0.0; - if (!model->BSIM4V4wdvt0wGiven) - model->BSIM4V4wdvt0w = 0.0; - if (!model->BSIM4V4wdvt1wGiven) - model->BSIM4V4wdvt1w = 0.0; - if (!model->BSIM4V4wdvt2wGiven) - model->BSIM4V4wdvt2w = 0.0; - if (!model->BSIM4V4wdroutGiven) - model->BSIM4V4wdrout = 0.0; - if (!model->BSIM4V4wdsubGiven) - model->BSIM4V4wdsub = 0.0; - if (!model->BSIM4V4wvth0Given) - model->BSIM4V4wvth0 = 0.0; - if (!model->BSIM4V4wuaGiven) - model->BSIM4V4wua = 0.0; - if (!model->BSIM4V4wua1Given) - model->BSIM4V4wua1 = 0.0; - if (!model->BSIM4V4wubGiven) - model->BSIM4V4wub = 0.0; - if (!model->BSIM4V4wub1Given) - model->BSIM4V4wub1 = 0.0; - if (!model->BSIM4V4wucGiven) - model->BSIM4V4wuc = 0.0; - if (!model->BSIM4V4wuc1Given) - model->BSIM4V4wuc1 = 0.0; - if (!model->BSIM4V4wu0Given) - model->BSIM4V4wu0 = 0.0; - if (!model->BSIM4V4wuteGiven) - model->BSIM4V4wute = 0.0; - if (!model->BSIM4V4wvoffGiven) - model->BSIM4V4wvoff = 0.0; - if (!model->BSIM4V4wminvGiven) - model->BSIM4V4wminv = 0.0; - if (!model->BSIM4V4wfproutGiven) - model->BSIM4V4wfprout = 0.0; - if (!model->BSIM4V4wpditsGiven) - model->BSIM4V4wpdits = 0.0; - if (!model->BSIM4V4wpditsdGiven) - model->BSIM4V4wpditsd = 0.0; - if (!model->BSIM4V4wdeltaGiven) - model->BSIM4V4wdelta = 0.0; - if (!model->BSIM4V4wrdswGiven) - model->BSIM4V4wrdsw = 0.0; - if (!model->BSIM4V4wrdwGiven) - model->BSIM4V4wrdw = 0.0; - if (!model->BSIM4V4wrswGiven) - model->BSIM4V4wrsw = 0.0; - if (!model->BSIM4V4wprwbGiven) - model->BSIM4V4wprwb = 0.0; - if (!model->BSIM4V4wprwgGiven) - model->BSIM4V4wprwg = 0.0; - if (!model->BSIM4V4wprtGiven) - model->BSIM4V4wprt = 0.0; - if (!model->BSIM4V4weta0Given) - model->BSIM4V4weta0 = 0.0; - if (!model->BSIM4V4wetabGiven) - model->BSIM4V4wetab = 0.0; - if (!model->BSIM4V4wpclmGiven) - model->BSIM4V4wpclm = 0.0; - if (!model->BSIM4V4wpdibl1Given) - model->BSIM4V4wpdibl1 = 0.0; - if (!model->BSIM4V4wpdibl2Given) - model->BSIM4V4wpdibl2 = 0.0; - if (!model->BSIM4V4wpdiblbGiven) - model->BSIM4V4wpdiblb = 0.0; - if (!model->BSIM4V4wpscbe1Given) - model->BSIM4V4wpscbe1 = 0.0; - if (!model->BSIM4V4wpscbe2Given) - model->BSIM4V4wpscbe2 = 0.0; - if (!model->BSIM4V4wpvagGiven) - model->BSIM4V4wpvag = 0.0; - if (!model->BSIM4V4wwrGiven) - model->BSIM4V4wwr = 0.0; - if (!model->BSIM4V4wdwgGiven) - model->BSIM4V4wdwg = 0.0; - if (!model->BSIM4V4wdwbGiven) - model->BSIM4V4wdwb = 0.0; - if (!model->BSIM4V4wb0Given) - model->BSIM4V4wb0 = 0.0; - if (!model->BSIM4V4wb1Given) - model->BSIM4V4wb1 = 0.0; - if (!model->BSIM4V4walpha0Given) - model->BSIM4V4walpha0 = 0.0; - if (!model->BSIM4V4walpha1Given) - model->BSIM4V4walpha1 = 0.0; - if (!model->BSIM4V4wbeta0Given) - model->BSIM4V4wbeta0 = 0.0; - if (!model->BSIM4V4wagidlGiven) - model->BSIM4V4wagidl = 0.0; - if (!model->BSIM4V4wbgidlGiven) - model->BSIM4V4wbgidl = 0.0; - if (!model->BSIM4V4wcgidlGiven) - model->BSIM4V4wcgidl = 0.0; - if (!model->BSIM4V4wegidlGiven) - model->BSIM4V4wegidl = 0.0; - if (!model->BSIM4V4waigcGiven) - model->BSIM4V4waigc = 0.0; - if (!model->BSIM4V4wbigcGiven) - model->BSIM4V4wbigc = 0.0; - if (!model->BSIM4V4wcigcGiven) - model->BSIM4V4wcigc = 0.0; - if (!model->BSIM4V4waigsdGiven) - model->BSIM4V4waigsd = 0.0; - if (!model->BSIM4V4wbigsdGiven) - model->BSIM4V4wbigsd = 0.0; - if (!model->BSIM4V4wcigsdGiven) - model->BSIM4V4wcigsd = 0.0; - if (!model->BSIM4V4waigbaccGiven) - model->BSIM4V4waigbacc = 0.0; - if (!model->BSIM4V4wbigbaccGiven) - model->BSIM4V4wbigbacc = 0.0; - if (!model->BSIM4V4wcigbaccGiven) - model->BSIM4V4wcigbacc = 0.0; - if (!model->BSIM4V4waigbinvGiven) - model->BSIM4V4waigbinv = 0.0; - if (!model->BSIM4V4wbigbinvGiven) - model->BSIM4V4wbigbinv = 0.0; - if (!model->BSIM4V4wcigbinvGiven) - model->BSIM4V4wcigbinv = 0.0; - if (!model->BSIM4V4wnigcGiven) - model->BSIM4V4wnigc = 0.0; - if (!model->BSIM4V4wnigbinvGiven) - model->BSIM4V4wnigbinv = 0.0; - if (!model->BSIM4V4wnigbaccGiven) - model->BSIM4V4wnigbacc = 0.0; - if (!model->BSIM4V4wntoxGiven) - model->BSIM4V4wntox = 0.0; - if (!model->BSIM4V4weigbinvGiven) - model->BSIM4V4weigbinv = 0.0; - if (!model->BSIM4V4wpigcdGiven) - model->BSIM4V4wpigcd = 0.0; - if (!model->BSIM4V4wpoxedgeGiven) - model->BSIM4V4wpoxedge = 0.0; - if (!model->BSIM4V4wxrcrg1Given) - model->BSIM4V4wxrcrg1 = 0.0; - if (!model->BSIM4V4wxrcrg2Given) - model->BSIM4V4wxrcrg2 = 0.0; - if (!model->BSIM4V4weuGiven) - model->BSIM4V4weu = 0.0; - if (!model->BSIM4V4wvfbGiven) - model->BSIM4V4wvfb = 0.0; - if (!model->BSIM4V4wlambdaGiven) - model->BSIM4V4wlambda = 0.0; - if (!model->BSIM4V4wvtlGiven) - model->BSIM4V4wvtl = 0.0; - if (!model->BSIM4V4wxnGiven) - model->BSIM4V4wxn = 0.0; - if (!model->BSIM4V4wvfbsdoffGiven) - model->BSIM4V4wvfbsdoff = 0.0; - - if (!model->BSIM4V4wcgslGiven) - model->BSIM4V4wcgsl = 0.0; - if (!model->BSIM4V4wcgdlGiven) - model->BSIM4V4wcgdl = 0.0; - if (!model->BSIM4V4wckappasGiven) - model->BSIM4V4wckappas = 0.0; - if (!model->BSIM4V4wckappadGiven) - model->BSIM4V4wckappad = 0.0; - if (!model->BSIM4V4wcfGiven) - model->BSIM4V4wcf = 0.0; - if (!model->BSIM4V4wclcGiven) - model->BSIM4V4wclc = 0.0; - if (!model->BSIM4V4wcleGiven) - model->BSIM4V4wcle = 0.0; - if (!model->BSIM4V4wvfbcvGiven) - model->BSIM4V4wvfbcv = 0.0; - if (!model->BSIM4V4wacdeGiven) - model->BSIM4V4wacde = 0.0; - if (!model->BSIM4V4wmoinGiven) - model->BSIM4V4wmoin = 0.0; - if (!model->BSIM4V4wnoffGiven) - model->BSIM4V4wnoff = 0.0; - if (!model->BSIM4V4wvoffcvGiven) - model->BSIM4V4wvoffcv = 0.0; + if (!model->BSIM4v4wcdscGiven) + model->BSIM4v4wcdsc = 0.0; + if (!model->BSIM4v4wcdscbGiven) + model->BSIM4v4wcdscb = 0.0; + if (!model->BSIM4v4wcdscdGiven) + model->BSIM4v4wcdscd = 0.0; + if (!model->BSIM4v4wcitGiven) + model->BSIM4v4wcit = 0.0; + if (!model->BSIM4v4wnfactorGiven) + model->BSIM4v4wnfactor = 0.0; + if (!model->BSIM4v4wxjGiven) + model->BSIM4v4wxj = 0.0; + if (!model->BSIM4v4wvsatGiven) + model->BSIM4v4wvsat = 0.0; + if (!model->BSIM4v4watGiven) + model->BSIM4v4wat = 0.0; + if (!model->BSIM4v4wa0Given) + model->BSIM4v4wa0 = 0.0; + if (!model->BSIM4v4wagsGiven) + model->BSIM4v4wags = 0.0; + if (!model->BSIM4v4wa1Given) + model->BSIM4v4wa1 = 0.0; + if (!model->BSIM4v4wa2Given) + model->BSIM4v4wa2 = 0.0; + if (!model->BSIM4v4wketaGiven) + model->BSIM4v4wketa = 0.0; + if (!model->BSIM4v4wnsubGiven) + model->BSIM4v4wnsub = 0.0; + if (!model->BSIM4v4wndepGiven) + model->BSIM4v4wndep = 0.0; + if (!model->BSIM4v4wnsdGiven) + model->BSIM4v4wnsd = 0.0; + if (!model->BSIM4v4wphinGiven) + model->BSIM4v4wphin = 0.0; + if (!model->BSIM4v4wngateGiven) + model->BSIM4v4wngate = 0.0; + if (!model->BSIM4v4wvbmGiven) + model->BSIM4v4wvbm = 0.0; + if (!model->BSIM4v4wxtGiven) + model->BSIM4v4wxt = 0.0; + if (!model->BSIM4v4wkt1Given) + model->BSIM4v4wkt1 = 0.0; + if (!model->BSIM4v4wkt1lGiven) + model->BSIM4v4wkt1l = 0.0; + if (!model->BSIM4v4wkt2Given) + model->BSIM4v4wkt2 = 0.0; + if (!model->BSIM4v4wk3Given) + model->BSIM4v4wk3 = 0.0; + if (!model->BSIM4v4wk3bGiven) + model->BSIM4v4wk3b = 0.0; + if (!model->BSIM4v4ww0Given) + model->BSIM4v4ww0 = 0.0; + if (!model->BSIM4v4wlpe0Given) + model->BSIM4v4wlpe0 = 0.0; + if (!model->BSIM4v4wlpebGiven) + model->BSIM4v4wlpeb = 0.0; + if (!model->BSIM4v4wdvtp0Given) + model->BSIM4v4wdvtp0 = 0.0; + if (!model->BSIM4v4wdvtp1Given) + model->BSIM4v4wdvtp1 = 0.0; + if (!model->BSIM4v4wdvt0Given) + model->BSIM4v4wdvt0 = 0.0; + if (!model->BSIM4v4wdvt1Given) + model->BSIM4v4wdvt1 = 0.0; + if (!model->BSIM4v4wdvt2Given) + model->BSIM4v4wdvt2 = 0.0; + if (!model->BSIM4v4wdvt0wGiven) + model->BSIM4v4wdvt0w = 0.0; + if (!model->BSIM4v4wdvt1wGiven) + model->BSIM4v4wdvt1w = 0.0; + if (!model->BSIM4v4wdvt2wGiven) + model->BSIM4v4wdvt2w = 0.0; + if (!model->BSIM4v4wdroutGiven) + model->BSIM4v4wdrout = 0.0; + if (!model->BSIM4v4wdsubGiven) + model->BSIM4v4wdsub = 0.0; + if (!model->BSIM4v4wvth0Given) + model->BSIM4v4wvth0 = 0.0; + if (!model->BSIM4v4wuaGiven) + model->BSIM4v4wua = 0.0; + if (!model->BSIM4v4wua1Given) + model->BSIM4v4wua1 = 0.0; + if (!model->BSIM4v4wubGiven) + model->BSIM4v4wub = 0.0; + if (!model->BSIM4v4wub1Given) + model->BSIM4v4wub1 = 0.0; + if (!model->BSIM4v4wucGiven) + model->BSIM4v4wuc = 0.0; + if (!model->BSIM4v4wuc1Given) + model->BSIM4v4wuc1 = 0.0; + if (!model->BSIM4v4wu0Given) + model->BSIM4v4wu0 = 0.0; + if (!model->BSIM4v4wuteGiven) + model->BSIM4v4wute = 0.0; + if (!model->BSIM4v4wvoffGiven) + model->BSIM4v4wvoff = 0.0; + if (!model->BSIM4v4wminvGiven) + model->BSIM4v4wminv = 0.0; + if (!model->BSIM4v4wfproutGiven) + model->BSIM4v4wfprout = 0.0; + if (!model->BSIM4v4wpditsGiven) + model->BSIM4v4wpdits = 0.0; + if (!model->BSIM4v4wpditsdGiven) + model->BSIM4v4wpditsd = 0.0; + if (!model->BSIM4v4wdeltaGiven) + model->BSIM4v4wdelta = 0.0; + if (!model->BSIM4v4wrdswGiven) + model->BSIM4v4wrdsw = 0.0; + if (!model->BSIM4v4wrdwGiven) + model->BSIM4v4wrdw = 0.0; + if (!model->BSIM4v4wrswGiven) + model->BSIM4v4wrsw = 0.0; + if (!model->BSIM4v4wprwbGiven) + model->BSIM4v4wprwb = 0.0; + if (!model->BSIM4v4wprwgGiven) + model->BSIM4v4wprwg = 0.0; + if (!model->BSIM4v4wprtGiven) + model->BSIM4v4wprt = 0.0; + if (!model->BSIM4v4weta0Given) + model->BSIM4v4weta0 = 0.0; + if (!model->BSIM4v4wetabGiven) + model->BSIM4v4wetab = 0.0; + if (!model->BSIM4v4wpclmGiven) + model->BSIM4v4wpclm = 0.0; + if (!model->BSIM4v4wpdibl1Given) + model->BSIM4v4wpdibl1 = 0.0; + if (!model->BSIM4v4wpdibl2Given) + model->BSIM4v4wpdibl2 = 0.0; + if (!model->BSIM4v4wpdiblbGiven) + model->BSIM4v4wpdiblb = 0.0; + if (!model->BSIM4v4wpscbe1Given) + model->BSIM4v4wpscbe1 = 0.0; + if (!model->BSIM4v4wpscbe2Given) + model->BSIM4v4wpscbe2 = 0.0; + if (!model->BSIM4v4wpvagGiven) + model->BSIM4v4wpvag = 0.0; + if (!model->BSIM4v4wwrGiven) + model->BSIM4v4wwr = 0.0; + if (!model->BSIM4v4wdwgGiven) + model->BSIM4v4wdwg = 0.0; + if (!model->BSIM4v4wdwbGiven) + model->BSIM4v4wdwb = 0.0; + if (!model->BSIM4v4wb0Given) + model->BSIM4v4wb0 = 0.0; + if (!model->BSIM4v4wb1Given) + model->BSIM4v4wb1 = 0.0; + if (!model->BSIM4v4walpha0Given) + model->BSIM4v4walpha0 = 0.0; + if (!model->BSIM4v4walpha1Given) + model->BSIM4v4walpha1 = 0.0; + if (!model->BSIM4v4wbeta0Given) + model->BSIM4v4wbeta0 = 0.0; + if (!model->BSIM4v4wagidlGiven) + model->BSIM4v4wagidl = 0.0; + if (!model->BSIM4v4wbgidlGiven) + model->BSIM4v4wbgidl = 0.0; + if (!model->BSIM4v4wcgidlGiven) + model->BSIM4v4wcgidl = 0.0; + if (!model->BSIM4v4wegidlGiven) + model->BSIM4v4wegidl = 0.0; + if (!model->BSIM4v4waigcGiven) + model->BSIM4v4waigc = 0.0; + if (!model->BSIM4v4wbigcGiven) + model->BSIM4v4wbigc = 0.0; + if (!model->BSIM4v4wcigcGiven) + model->BSIM4v4wcigc = 0.0; + if (!model->BSIM4v4waigsdGiven) + model->BSIM4v4waigsd = 0.0; + if (!model->BSIM4v4wbigsdGiven) + model->BSIM4v4wbigsd = 0.0; + if (!model->BSIM4v4wcigsdGiven) + model->BSIM4v4wcigsd = 0.0; + if (!model->BSIM4v4waigbaccGiven) + model->BSIM4v4waigbacc = 0.0; + if (!model->BSIM4v4wbigbaccGiven) + model->BSIM4v4wbigbacc = 0.0; + if (!model->BSIM4v4wcigbaccGiven) + model->BSIM4v4wcigbacc = 0.0; + if (!model->BSIM4v4waigbinvGiven) + model->BSIM4v4waigbinv = 0.0; + if (!model->BSIM4v4wbigbinvGiven) + model->BSIM4v4wbigbinv = 0.0; + if (!model->BSIM4v4wcigbinvGiven) + model->BSIM4v4wcigbinv = 0.0; + if (!model->BSIM4v4wnigcGiven) + model->BSIM4v4wnigc = 0.0; + if (!model->BSIM4v4wnigbinvGiven) + model->BSIM4v4wnigbinv = 0.0; + if (!model->BSIM4v4wnigbaccGiven) + model->BSIM4v4wnigbacc = 0.0; + if (!model->BSIM4v4wntoxGiven) + model->BSIM4v4wntox = 0.0; + if (!model->BSIM4v4weigbinvGiven) + model->BSIM4v4weigbinv = 0.0; + if (!model->BSIM4v4wpigcdGiven) + model->BSIM4v4wpigcd = 0.0; + if (!model->BSIM4v4wpoxedgeGiven) + model->BSIM4v4wpoxedge = 0.0; + if (!model->BSIM4v4wxrcrg1Given) + model->BSIM4v4wxrcrg1 = 0.0; + if (!model->BSIM4v4wxrcrg2Given) + model->BSIM4v4wxrcrg2 = 0.0; + if (!model->BSIM4v4weuGiven) + model->BSIM4v4weu = 0.0; + if (!model->BSIM4v4wvfbGiven) + model->BSIM4v4wvfb = 0.0; + if (!model->BSIM4v4wlambdaGiven) + model->BSIM4v4wlambda = 0.0; + if (!model->BSIM4v4wvtlGiven) + model->BSIM4v4wvtl = 0.0; + if (!model->BSIM4v4wxnGiven) + model->BSIM4v4wxn = 0.0; + if (!model->BSIM4v4wvfbsdoffGiven) + model->BSIM4v4wvfbsdoff = 0.0; + + if (!model->BSIM4v4wcgslGiven) + model->BSIM4v4wcgsl = 0.0; + if (!model->BSIM4v4wcgdlGiven) + model->BSIM4v4wcgdl = 0.0; + if (!model->BSIM4v4wckappasGiven) + model->BSIM4v4wckappas = 0.0; + if (!model->BSIM4v4wckappadGiven) + model->BSIM4v4wckappad = 0.0; + if (!model->BSIM4v4wcfGiven) + model->BSIM4v4wcf = 0.0; + if (!model->BSIM4v4wclcGiven) + model->BSIM4v4wclc = 0.0; + if (!model->BSIM4v4wcleGiven) + model->BSIM4v4wcle = 0.0; + if (!model->BSIM4v4wvfbcvGiven) + model->BSIM4v4wvfbcv = 0.0; + if (!model->BSIM4v4wacdeGiven) + model->BSIM4v4wacde = 0.0; + if (!model->BSIM4v4wmoinGiven) + model->BSIM4v4wmoin = 0.0; + if (!model->BSIM4v4wnoffGiven) + model->BSIM4v4wnoff = 0.0; + if (!model->BSIM4v4wvoffcvGiven) + model->BSIM4v4wvoffcv = 0.0; /* Cross-term dependence */ - if (!model->BSIM4V4pcdscGiven) - model->BSIM4V4pcdsc = 0.0; - if (!model->BSIM4V4pcdscbGiven) - model->BSIM4V4pcdscb = 0.0; - if (!model->BSIM4V4pcdscdGiven) - model->BSIM4V4pcdscd = 0.0; - if (!model->BSIM4V4pcitGiven) - model->BSIM4V4pcit = 0.0; - if (!model->BSIM4V4pnfactorGiven) - model->BSIM4V4pnfactor = 0.0; - if (!model->BSIM4V4pxjGiven) - model->BSIM4V4pxj = 0.0; - if (!model->BSIM4V4pvsatGiven) - model->BSIM4V4pvsat = 0.0; - if (!model->BSIM4V4patGiven) - model->BSIM4V4pat = 0.0; - if (!model->BSIM4V4pa0Given) - model->BSIM4V4pa0 = 0.0; + if (!model->BSIM4v4pcdscGiven) + model->BSIM4v4pcdsc = 0.0; + if (!model->BSIM4v4pcdscbGiven) + model->BSIM4v4pcdscb = 0.0; + if (!model->BSIM4v4pcdscdGiven) + model->BSIM4v4pcdscd = 0.0; + if (!model->BSIM4v4pcitGiven) + model->BSIM4v4pcit = 0.0; + if (!model->BSIM4v4pnfactorGiven) + model->BSIM4v4pnfactor = 0.0; + if (!model->BSIM4v4pxjGiven) + model->BSIM4v4pxj = 0.0; + if (!model->BSIM4v4pvsatGiven) + model->BSIM4v4pvsat = 0.0; + if (!model->BSIM4v4patGiven) + model->BSIM4v4pat = 0.0; + if (!model->BSIM4v4pa0Given) + model->BSIM4v4pa0 = 0.0; - if (!model->BSIM4V4pagsGiven) - model->BSIM4V4pags = 0.0; - if (!model->BSIM4V4pa1Given) - model->BSIM4V4pa1 = 0.0; - if (!model->BSIM4V4pa2Given) - model->BSIM4V4pa2 = 0.0; - if (!model->BSIM4V4pketaGiven) - model->BSIM4V4pketa = 0.0; - if (!model->BSIM4V4pnsubGiven) - model->BSIM4V4pnsub = 0.0; - if (!model->BSIM4V4pndepGiven) - model->BSIM4V4pndep = 0.0; - if (!model->BSIM4V4pnsdGiven) - model->BSIM4V4pnsd = 0.0; - if (!model->BSIM4V4pphinGiven) - model->BSIM4V4pphin = 0.0; - if (!model->BSIM4V4pngateGiven) - model->BSIM4V4pngate = 0.0; - if (!model->BSIM4V4pvbmGiven) - model->BSIM4V4pvbm = 0.0; - if (!model->BSIM4V4pxtGiven) - model->BSIM4V4pxt = 0.0; - if (!model->BSIM4V4pkt1Given) - model->BSIM4V4pkt1 = 0.0; - if (!model->BSIM4V4pkt1lGiven) - model->BSIM4V4pkt1l = 0.0; - if (!model->BSIM4V4pkt2Given) - model->BSIM4V4pkt2 = 0.0; - if (!model->BSIM4V4pk3Given) - model->BSIM4V4pk3 = 0.0; - if (!model->BSIM4V4pk3bGiven) - model->BSIM4V4pk3b = 0.0; - if (!model->BSIM4V4pw0Given) - model->BSIM4V4pw0 = 0.0; - if (!model->BSIM4V4plpe0Given) - model->BSIM4V4plpe0 = 0.0; - if (!model->BSIM4V4plpebGiven) - model->BSIM4V4plpeb = 0.0; - if (!model->BSIM4V4pdvtp0Given) - model->BSIM4V4pdvtp0 = 0.0; - if (!model->BSIM4V4pdvtp1Given) - model->BSIM4V4pdvtp1 = 0.0; - if (!model->BSIM4V4pdvt0Given) - model->BSIM4V4pdvt0 = 0.0; - if (!model->BSIM4V4pdvt1Given) - model->BSIM4V4pdvt1 = 0.0; - if (!model->BSIM4V4pdvt2Given) - model->BSIM4V4pdvt2 = 0.0; - if (!model->BSIM4V4pdvt0wGiven) - model->BSIM4V4pdvt0w = 0.0; - if (!model->BSIM4V4pdvt1wGiven) - model->BSIM4V4pdvt1w = 0.0; - if (!model->BSIM4V4pdvt2wGiven) - model->BSIM4V4pdvt2w = 0.0; - if (!model->BSIM4V4pdroutGiven) - model->BSIM4V4pdrout = 0.0; - if (!model->BSIM4V4pdsubGiven) - model->BSIM4V4pdsub = 0.0; - if (!model->BSIM4V4pvth0Given) - model->BSIM4V4pvth0 = 0.0; - if (!model->BSIM4V4puaGiven) - model->BSIM4V4pua = 0.0; - if (!model->BSIM4V4pua1Given) - model->BSIM4V4pua1 = 0.0; - if (!model->BSIM4V4pubGiven) - model->BSIM4V4pub = 0.0; - if (!model->BSIM4V4pub1Given) - model->BSIM4V4pub1 = 0.0; - if (!model->BSIM4V4pucGiven) - model->BSIM4V4puc = 0.0; - if (!model->BSIM4V4puc1Given) - model->BSIM4V4puc1 = 0.0; - if (!model->BSIM4V4pu0Given) - model->BSIM4V4pu0 = 0.0; - if (!model->BSIM4V4puteGiven) - model->BSIM4V4pute = 0.0; - if (!model->BSIM4V4pvoffGiven) - model->BSIM4V4pvoff = 0.0; - if (!model->BSIM4V4pminvGiven) - model->BSIM4V4pminv = 0.0; - if (!model->BSIM4V4pfproutGiven) - model->BSIM4V4pfprout = 0.0; - if (!model->BSIM4V4ppditsGiven) - model->BSIM4V4ppdits = 0.0; - if (!model->BSIM4V4ppditsdGiven) - model->BSIM4V4ppditsd = 0.0; - if (!model->BSIM4V4pdeltaGiven) - model->BSIM4V4pdelta = 0.0; - if (!model->BSIM4V4prdswGiven) - model->BSIM4V4prdsw = 0.0; - if (!model->BSIM4V4prdwGiven) - model->BSIM4V4prdw = 0.0; - if (!model->BSIM4V4prswGiven) - model->BSIM4V4prsw = 0.0; - if (!model->BSIM4V4pprwbGiven) - model->BSIM4V4pprwb = 0.0; - if (!model->BSIM4V4pprwgGiven) - model->BSIM4V4pprwg = 0.0; - if (!model->BSIM4V4pprtGiven) - model->BSIM4V4pprt = 0.0; - if (!model->BSIM4V4peta0Given) - model->BSIM4V4peta0 = 0.0; - if (!model->BSIM4V4petabGiven) - model->BSIM4V4petab = 0.0; - if (!model->BSIM4V4ppclmGiven) - model->BSIM4V4ppclm = 0.0; - if (!model->BSIM4V4ppdibl1Given) - model->BSIM4V4ppdibl1 = 0.0; - if (!model->BSIM4V4ppdibl2Given) - model->BSIM4V4ppdibl2 = 0.0; - if (!model->BSIM4V4ppdiblbGiven) - model->BSIM4V4ppdiblb = 0.0; - if (!model->BSIM4V4ppscbe1Given) - model->BSIM4V4ppscbe1 = 0.0; - if (!model->BSIM4V4ppscbe2Given) - model->BSIM4V4ppscbe2 = 0.0; - if (!model->BSIM4V4ppvagGiven) - model->BSIM4V4ppvag = 0.0; - if (!model->BSIM4V4pwrGiven) - model->BSIM4V4pwr = 0.0; - if (!model->BSIM4V4pdwgGiven) - model->BSIM4V4pdwg = 0.0; - if (!model->BSIM4V4pdwbGiven) - model->BSIM4V4pdwb = 0.0; - if (!model->BSIM4V4pb0Given) - model->BSIM4V4pb0 = 0.0; - if (!model->BSIM4V4pb1Given) - model->BSIM4V4pb1 = 0.0; - if (!model->BSIM4V4palpha0Given) - model->BSIM4V4palpha0 = 0.0; - if (!model->BSIM4V4palpha1Given) - model->BSIM4V4palpha1 = 0.0; - if (!model->BSIM4V4pbeta0Given) - model->BSIM4V4pbeta0 = 0.0; - if (!model->BSIM4V4pagidlGiven) - model->BSIM4V4pagidl = 0.0; - if (!model->BSIM4V4pbgidlGiven) - model->BSIM4V4pbgidl = 0.0; - if (!model->BSIM4V4pcgidlGiven) - model->BSIM4V4pcgidl = 0.0; - if (!model->BSIM4V4pegidlGiven) - model->BSIM4V4pegidl = 0.0; - if (!model->BSIM4V4paigcGiven) - model->BSIM4V4paigc = 0.0; - if (!model->BSIM4V4pbigcGiven) - model->BSIM4V4pbigc = 0.0; - if (!model->BSIM4V4pcigcGiven) - model->BSIM4V4pcigc = 0.0; - if (!model->BSIM4V4paigsdGiven) - model->BSIM4V4paigsd = 0.0; - if (!model->BSIM4V4pbigsdGiven) - model->BSIM4V4pbigsd = 0.0; - if (!model->BSIM4V4pcigsdGiven) - model->BSIM4V4pcigsd = 0.0; - if (!model->BSIM4V4paigbaccGiven) - model->BSIM4V4paigbacc = 0.0; - if (!model->BSIM4V4pbigbaccGiven) - model->BSIM4V4pbigbacc = 0.0; - if (!model->BSIM4V4pcigbaccGiven) - model->BSIM4V4pcigbacc = 0.0; - if (!model->BSIM4V4paigbinvGiven) - model->BSIM4V4paigbinv = 0.0; - if (!model->BSIM4V4pbigbinvGiven) - model->BSIM4V4pbigbinv = 0.0; - if (!model->BSIM4V4pcigbinvGiven) - model->BSIM4V4pcigbinv = 0.0; - if (!model->BSIM4V4pnigcGiven) - model->BSIM4V4pnigc = 0.0; - if (!model->BSIM4V4pnigbinvGiven) - model->BSIM4V4pnigbinv = 0.0; - if (!model->BSIM4V4pnigbaccGiven) - model->BSIM4V4pnigbacc = 0.0; - if (!model->BSIM4V4pntoxGiven) - model->BSIM4V4pntox = 0.0; - if (!model->BSIM4V4peigbinvGiven) - model->BSIM4V4peigbinv = 0.0; - if (!model->BSIM4V4ppigcdGiven) - model->BSIM4V4ppigcd = 0.0; - if (!model->BSIM4V4ppoxedgeGiven) - model->BSIM4V4ppoxedge = 0.0; - if (!model->BSIM4V4pxrcrg1Given) - model->BSIM4V4pxrcrg1 = 0.0; - if (!model->BSIM4V4pxrcrg2Given) - model->BSIM4V4pxrcrg2 = 0.0; - if (!model->BSIM4V4peuGiven) - model->BSIM4V4peu = 0.0; - if (!model->BSIM4V4pvfbGiven) - model->BSIM4V4pvfb = 0.0; - if (!model->BSIM4V4plambdaGiven) - model->BSIM4V4plambda = 0.0; - if (!model->BSIM4V4pvtlGiven) - model->BSIM4V4pvtl = 0.0; - if (!model->BSIM4V4pxnGiven) - model->BSIM4V4pxn = 0.0; - if (!model->BSIM4V4pvfbsdoffGiven) - model->BSIM4V4pvfbsdoff = 0.0; - - if (!model->BSIM4V4pcgslGiven) - model->BSIM4V4pcgsl = 0.0; - if (!model->BSIM4V4pcgdlGiven) - model->BSIM4V4pcgdl = 0.0; - if (!model->BSIM4V4pckappasGiven) - model->BSIM4V4pckappas = 0.0; - if (!model->BSIM4V4pckappadGiven) - model->BSIM4V4pckappad = 0.0; - if (!model->BSIM4V4pcfGiven) - model->BSIM4V4pcf = 0.0; - if (!model->BSIM4V4pclcGiven) - model->BSIM4V4pclc = 0.0; - if (!model->BSIM4V4pcleGiven) - model->BSIM4V4pcle = 0.0; - if (!model->BSIM4V4pvfbcvGiven) - model->BSIM4V4pvfbcv = 0.0; - if (!model->BSIM4V4pacdeGiven) - model->BSIM4V4pacde = 0.0; - if (!model->BSIM4V4pmoinGiven) - model->BSIM4V4pmoin = 0.0; - if (!model->BSIM4V4pnoffGiven) - model->BSIM4V4pnoff = 0.0; - if (!model->BSIM4V4pvoffcvGiven) - model->BSIM4V4pvoffcv = 0.0; - - if (!model->BSIM4V4gamma1Given) - model->BSIM4V4gamma1 = 0.0; - if (!model->BSIM4V4lgamma1Given) - model->BSIM4V4lgamma1 = 0.0; - if (!model->BSIM4V4wgamma1Given) - model->BSIM4V4wgamma1 = 0.0; - if (!model->BSIM4V4pgamma1Given) - model->BSIM4V4pgamma1 = 0.0; - if (!model->BSIM4V4gamma2Given) - model->BSIM4V4gamma2 = 0.0; - if (!model->BSIM4V4lgamma2Given) - model->BSIM4V4lgamma2 = 0.0; - if (!model->BSIM4V4wgamma2Given) - model->BSIM4V4wgamma2 = 0.0; - if (!model->BSIM4V4pgamma2Given) - model->BSIM4V4pgamma2 = 0.0; - if (!model->BSIM4V4vbxGiven) - model->BSIM4V4vbx = 0.0; - if (!model->BSIM4V4lvbxGiven) - model->BSIM4V4lvbx = 0.0; - if (!model->BSIM4V4wvbxGiven) - model->BSIM4V4wvbx = 0.0; - if (!model->BSIM4V4pvbxGiven) - model->BSIM4V4pvbx = 0.0; + if (!model->BSIM4v4pagsGiven) + model->BSIM4v4pags = 0.0; + if (!model->BSIM4v4pa1Given) + model->BSIM4v4pa1 = 0.0; + if (!model->BSIM4v4pa2Given) + model->BSIM4v4pa2 = 0.0; + if (!model->BSIM4v4pketaGiven) + model->BSIM4v4pketa = 0.0; + if (!model->BSIM4v4pnsubGiven) + model->BSIM4v4pnsub = 0.0; + if (!model->BSIM4v4pndepGiven) + model->BSIM4v4pndep = 0.0; + if (!model->BSIM4v4pnsdGiven) + model->BSIM4v4pnsd = 0.0; + if (!model->BSIM4v4pphinGiven) + model->BSIM4v4pphin = 0.0; + if (!model->BSIM4v4pngateGiven) + model->BSIM4v4pngate = 0.0; + if (!model->BSIM4v4pvbmGiven) + model->BSIM4v4pvbm = 0.0; + if (!model->BSIM4v4pxtGiven) + model->BSIM4v4pxt = 0.0; + if (!model->BSIM4v4pkt1Given) + model->BSIM4v4pkt1 = 0.0; + if (!model->BSIM4v4pkt1lGiven) + model->BSIM4v4pkt1l = 0.0; + if (!model->BSIM4v4pkt2Given) + model->BSIM4v4pkt2 = 0.0; + if (!model->BSIM4v4pk3Given) + model->BSIM4v4pk3 = 0.0; + if (!model->BSIM4v4pk3bGiven) + model->BSIM4v4pk3b = 0.0; + if (!model->BSIM4v4pw0Given) + model->BSIM4v4pw0 = 0.0; + if (!model->BSIM4v4plpe0Given) + model->BSIM4v4plpe0 = 0.0; + if (!model->BSIM4v4plpebGiven) + model->BSIM4v4plpeb = 0.0; + if (!model->BSIM4v4pdvtp0Given) + model->BSIM4v4pdvtp0 = 0.0; + if (!model->BSIM4v4pdvtp1Given) + model->BSIM4v4pdvtp1 = 0.0; + if (!model->BSIM4v4pdvt0Given) + model->BSIM4v4pdvt0 = 0.0; + if (!model->BSIM4v4pdvt1Given) + model->BSIM4v4pdvt1 = 0.0; + if (!model->BSIM4v4pdvt2Given) + model->BSIM4v4pdvt2 = 0.0; + if (!model->BSIM4v4pdvt0wGiven) + model->BSIM4v4pdvt0w = 0.0; + if (!model->BSIM4v4pdvt1wGiven) + model->BSIM4v4pdvt1w = 0.0; + if (!model->BSIM4v4pdvt2wGiven) + model->BSIM4v4pdvt2w = 0.0; + if (!model->BSIM4v4pdroutGiven) + model->BSIM4v4pdrout = 0.0; + if (!model->BSIM4v4pdsubGiven) + model->BSIM4v4pdsub = 0.0; + if (!model->BSIM4v4pvth0Given) + model->BSIM4v4pvth0 = 0.0; + if (!model->BSIM4v4puaGiven) + model->BSIM4v4pua = 0.0; + if (!model->BSIM4v4pua1Given) + model->BSIM4v4pua1 = 0.0; + if (!model->BSIM4v4pubGiven) + model->BSIM4v4pub = 0.0; + if (!model->BSIM4v4pub1Given) + model->BSIM4v4pub1 = 0.0; + if (!model->BSIM4v4pucGiven) + model->BSIM4v4puc = 0.0; + if (!model->BSIM4v4puc1Given) + model->BSIM4v4puc1 = 0.0; + if (!model->BSIM4v4pu0Given) + model->BSIM4v4pu0 = 0.0; + if (!model->BSIM4v4puteGiven) + model->BSIM4v4pute = 0.0; + if (!model->BSIM4v4pvoffGiven) + model->BSIM4v4pvoff = 0.0; + if (!model->BSIM4v4pminvGiven) + model->BSIM4v4pminv = 0.0; + if (!model->BSIM4v4pfproutGiven) + model->BSIM4v4pfprout = 0.0; + if (!model->BSIM4v4ppditsGiven) + model->BSIM4v4ppdits = 0.0; + if (!model->BSIM4v4ppditsdGiven) + model->BSIM4v4ppditsd = 0.0; + if (!model->BSIM4v4pdeltaGiven) + model->BSIM4v4pdelta = 0.0; + if (!model->BSIM4v4prdswGiven) + model->BSIM4v4prdsw = 0.0; + if (!model->BSIM4v4prdwGiven) + model->BSIM4v4prdw = 0.0; + if (!model->BSIM4v4prswGiven) + model->BSIM4v4prsw = 0.0; + if (!model->BSIM4v4pprwbGiven) + model->BSIM4v4pprwb = 0.0; + if (!model->BSIM4v4pprwgGiven) + model->BSIM4v4pprwg = 0.0; + if (!model->BSIM4v4pprtGiven) + model->BSIM4v4pprt = 0.0; + if (!model->BSIM4v4peta0Given) + model->BSIM4v4peta0 = 0.0; + if (!model->BSIM4v4petabGiven) + model->BSIM4v4petab = 0.0; + if (!model->BSIM4v4ppclmGiven) + model->BSIM4v4ppclm = 0.0; + if (!model->BSIM4v4ppdibl1Given) + model->BSIM4v4ppdibl1 = 0.0; + if (!model->BSIM4v4ppdibl2Given) + model->BSIM4v4ppdibl2 = 0.0; + if (!model->BSIM4v4ppdiblbGiven) + model->BSIM4v4ppdiblb = 0.0; + if (!model->BSIM4v4ppscbe1Given) + model->BSIM4v4ppscbe1 = 0.0; + if (!model->BSIM4v4ppscbe2Given) + model->BSIM4v4ppscbe2 = 0.0; + if (!model->BSIM4v4ppvagGiven) + model->BSIM4v4ppvag = 0.0; + if (!model->BSIM4v4pwrGiven) + model->BSIM4v4pwr = 0.0; + if (!model->BSIM4v4pdwgGiven) + model->BSIM4v4pdwg = 0.0; + if (!model->BSIM4v4pdwbGiven) + model->BSIM4v4pdwb = 0.0; + if (!model->BSIM4v4pb0Given) + model->BSIM4v4pb0 = 0.0; + if (!model->BSIM4v4pb1Given) + model->BSIM4v4pb1 = 0.0; + if (!model->BSIM4v4palpha0Given) + model->BSIM4v4palpha0 = 0.0; + if (!model->BSIM4v4palpha1Given) + model->BSIM4v4palpha1 = 0.0; + if (!model->BSIM4v4pbeta0Given) + model->BSIM4v4pbeta0 = 0.0; + if (!model->BSIM4v4pagidlGiven) + model->BSIM4v4pagidl = 0.0; + if (!model->BSIM4v4pbgidlGiven) + model->BSIM4v4pbgidl = 0.0; + if (!model->BSIM4v4pcgidlGiven) + model->BSIM4v4pcgidl = 0.0; + if (!model->BSIM4v4pegidlGiven) + model->BSIM4v4pegidl = 0.0; + if (!model->BSIM4v4paigcGiven) + model->BSIM4v4paigc = 0.0; + if (!model->BSIM4v4pbigcGiven) + model->BSIM4v4pbigc = 0.0; + if (!model->BSIM4v4pcigcGiven) + model->BSIM4v4pcigc = 0.0; + if (!model->BSIM4v4paigsdGiven) + model->BSIM4v4paigsd = 0.0; + if (!model->BSIM4v4pbigsdGiven) + model->BSIM4v4pbigsd = 0.0; + if (!model->BSIM4v4pcigsdGiven) + model->BSIM4v4pcigsd = 0.0; + if (!model->BSIM4v4paigbaccGiven) + model->BSIM4v4paigbacc = 0.0; + if (!model->BSIM4v4pbigbaccGiven) + model->BSIM4v4pbigbacc = 0.0; + if (!model->BSIM4v4pcigbaccGiven) + model->BSIM4v4pcigbacc = 0.0; + if (!model->BSIM4v4paigbinvGiven) + model->BSIM4v4paigbinv = 0.0; + if (!model->BSIM4v4pbigbinvGiven) + model->BSIM4v4pbigbinv = 0.0; + if (!model->BSIM4v4pcigbinvGiven) + model->BSIM4v4pcigbinv = 0.0; + if (!model->BSIM4v4pnigcGiven) + model->BSIM4v4pnigc = 0.0; + if (!model->BSIM4v4pnigbinvGiven) + model->BSIM4v4pnigbinv = 0.0; + if (!model->BSIM4v4pnigbaccGiven) + model->BSIM4v4pnigbacc = 0.0; + if (!model->BSIM4v4pntoxGiven) + model->BSIM4v4pntox = 0.0; + if (!model->BSIM4v4peigbinvGiven) + model->BSIM4v4peigbinv = 0.0; + if (!model->BSIM4v4ppigcdGiven) + model->BSIM4v4ppigcd = 0.0; + if (!model->BSIM4v4ppoxedgeGiven) + model->BSIM4v4ppoxedge = 0.0; + if (!model->BSIM4v4pxrcrg1Given) + model->BSIM4v4pxrcrg1 = 0.0; + if (!model->BSIM4v4pxrcrg2Given) + model->BSIM4v4pxrcrg2 = 0.0; + if (!model->BSIM4v4peuGiven) + model->BSIM4v4peu = 0.0; + if (!model->BSIM4v4pvfbGiven) + model->BSIM4v4pvfb = 0.0; + if (!model->BSIM4v4plambdaGiven) + model->BSIM4v4plambda = 0.0; + if (!model->BSIM4v4pvtlGiven) + model->BSIM4v4pvtl = 0.0; + if (!model->BSIM4v4pxnGiven) + model->BSIM4v4pxn = 0.0; + if (!model->BSIM4v4pvfbsdoffGiven) + model->BSIM4v4pvfbsdoff = 0.0; + + if (!model->BSIM4v4pcgslGiven) + model->BSIM4v4pcgsl = 0.0; + if (!model->BSIM4v4pcgdlGiven) + model->BSIM4v4pcgdl = 0.0; + if (!model->BSIM4v4pckappasGiven) + model->BSIM4v4pckappas = 0.0; + if (!model->BSIM4v4pckappadGiven) + model->BSIM4v4pckappad = 0.0; + if (!model->BSIM4v4pcfGiven) + model->BSIM4v4pcf = 0.0; + if (!model->BSIM4v4pclcGiven) + model->BSIM4v4pclc = 0.0; + if (!model->BSIM4v4pcleGiven) + model->BSIM4v4pcle = 0.0; + if (!model->BSIM4v4pvfbcvGiven) + model->BSIM4v4pvfbcv = 0.0; + if (!model->BSIM4v4pacdeGiven) + model->BSIM4v4pacde = 0.0; + if (!model->BSIM4v4pmoinGiven) + model->BSIM4v4pmoin = 0.0; + if (!model->BSIM4v4pnoffGiven) + model->BSIM4v4pnoff = 0.0; + if (!model->BSIM4v4pvoffcvGiven) + model->BSIM4v4pvoffcv = 0.0; + + if (!model->BSIM4v4gamma1Given) + model->BSIM4v4gamma1 = 0.0; + if (!model->BSIM4v4lgamma1Given) + model->BSIM4v4lgamma1 = 0.0; + if (!model->BSIM4v4wgamma1Given) + model->BSIM4v4wgamma1 = 0.0; + if (!model->BSIM4v4pgamma1Given) + model->BSIM4v4pgamma1 = 0.0; + if (!model->BSIM4v4gamma2Given) + model->BSIM4v4gamma2 = 0.0; + if (!model->BSIM4v4lgamma2Given) + model->BSIM4v4lgamma2 = 0.0; + if (!model->BSIM4v4wgamma2Given) + model->BSIM4v4wgamma2 = 0.0; + if (!model->BSIM4v4pgamma2Given) + model->BSIM4v4pgamma2 = 0.0; + if (!model->BSIM4v4vbxGiven) + model->BSIM4v4vbx = 0.0; + if (!model->BSIM4v4lvbxGiven) + model->BSIM4v4lvbx = 0.0; + if (!model->BSIM4v4wvbxGiven) + model->BSIM4v4wvbx = 0.0; + if (!model->BSIM4v4pvbxGiven) + model->BSIM4v4pvbx = 0.0; /* unit degree celcius */ - if (!model->BSIM4V4tnomGiven) - model->BSIM4V4tnom = ckt->CKTnomTemp; - if (!model->BSIM4V4LintGiven) - model->BSIM4V4Lint = 0.0; - if (!model->BSIM4V4LlGiven) - model->BSIM4V4Ll = 0.0; - if (!model->BSIM4V4LlcGiven) - model->BSIM4V4Llc = model->BSIM4V4Ll; - if (!model->BSIM4V4LlnGiven) - model->BSIM4V4Lln = 1.0; - if (!model->BSIM4V4LwGiven) - model->BSIM4V4Lw = 0.0; - if (!model->BSIM4V4LwcGiven) - model->BSIM4V4Lwc = model->BSIM4V4Lw; - if (!model->BSIM4V4LwnGiven) - model->BSIM4V4Lwn = 1.0; - if (!model->BSIM4V4LwlGiven) - model->BSIM4V4Lwl = 0.0; - if (!model->BSIM4V4LwlcGiven) - model->BSIM4V4Lwlc = model->BSIM4V4Lwl; - if (!model->BSIM4V4LminGiven) - model->BSIM4V4Lmin = 0.0; - if (!model->BSIM4V4LmaxGiven) - model->BSIM4V4Lmax = 1.0; - if (!model->BSIM4V4WintGiven) - model->BSIM4V4Wint = 0.0; - if (!model->BSIM4V4WlGiven) - model->BSIM4V4Wl = 0.0; - if (!model->BSIM4V4WlcGiven) - model->BSIM4V4Wlc = model->BSIM4V4Wl; - if (!model->BSIM4V4WlnGiven) - model->BSIM4V4Wln = 1.0; - if (!model->BSIM4V4WwGiven) - model->BSIM4V4Ww = 0.0; - if (!model->BSIM4V4WwcGiven) - model->BSIM4V4Wwc = model->BSIM4V4Ww; - if (!model->BSIM4V4WwnGiven) - model->BSIM4V4Wwn = 1.0; - if (!model->BSIM4V4WwlGiven) - model->BSIM4V4Wwl = 0.0; - if (!model->BSIM4V4WwlcGiven) - model->BSIM4V4Wwlc = model->BSIM4V4Wwl; - if (!model->BSIM4V4WminGiven) - model->BSIM4V4Wmin = 0.0; - if (!model->BSIM4V4WmaxGiven) - model->BSIM4V4Wmax = 1.0; - if (!model->BSIM4V4dwcGiven) - model->BSIM4V4dwc = model->BSIM4V4Wint; - if (!model->BSIM4V4dlcGiven) - model->BSIM4V4dlc = model->BSIM4V4Lint; - if (!model->BSIM4V4xlGiven) - model->BSIM4V4xl = 0.0; - if (!model->BSIM4V4xwGiven) - model->BSIM4V4xw = 0.0; - if (!model->BSIM4V4dlcigGiven) - model->BSIM4V4dlcig = model->BSIM4V4Lint; - if (!model->BSIM4V4dwjGiven) - model->BSIM4V4dwj = model->BSIM4V4dwc; - if (!model->BSIM4V4cfGiven) - model->BSIM4V4cf = 2.0 * model->BSIM4V4epsrox * EPS0 / PI - * log(1.0 + 0.4e-6 / model->BSIM4V4toxe); - - if (!model->BSIM4V4xpartGiven) - model->BSIM4V4xpart = 0.0; - if (!model->BSIM4V4sheetResistanceGiven) - model->BSIM4V4sheetResistance = 0.0; - - if (!model->BSIM4V4SunitAreaJctCapGiven) - model->BSIM4V4SunitAreaJctCap = 5.0E-4; - if (!model->BSIM4V4DunitAreaJctCapGiven) - model->BSIM4V4DunitAreaJctCap = model->BSIM4V4SunitAreaJctCap; - if (!model->BSIM4V4SunitLengthSidewallJctCapGiven) - model->BSIM4V4SunitLengthSidewallJctCap = 5.0E-10; - if (!model->BSIM4V4DunitLengthSidewallJctCapGiven) - model->BSIM4V4DunitLengthSidewallJctCap = model->BSIM4V4SunitLengthSidewallJctCap; - if (!model->BSIM4V4SunitLengthGateSidewallJctCapGiven) - model->BSIM4V4SunitLengthGateSidewallJctCap = model->BSIM4V4SunitLengthSidewallJctCap ; - if (!model->BSIM4V4DunitLengthGateSidewallJctCapGiven) - model->BSIM4V4DunitLengthGateSidewallJctCap = model->BSIM4V4SunitLengthGateSidewallJctCap; - if (!model->BSIM4V4SjctSatCurDensityGiven) - model->BSIM4V4SjctSatCurDensity = 1.0E-4; - if (!model->BSIM4V4DjctSatCurDensityGiven) - model->BSIM4V4DjctSatCurDensity = model->BSIM4V4SjctSatCurDensity; - if (!model->BSIM4V4SjctSidewallSatCurDensityGiven) - model->BSIM4V4SjctSidewallSatCurDensity = 0.0; - if (!model->BSIM4V4DjctSidewallSatCurDensityGiven) - model->BSIM4V4DjctSidewallSatCurDensity = model->BSIM4V4SjctSidewallSatCurDensity; - if (!model->BSIM4V4SjctGateSidewallSatCurDensityGiven) - model->BSIM4V4SjctGateSidewallSatCurDensity = 0.0; - if (!model->BSIM4V4DjctGateSidewallSatCurDensityGiven) - model->BSIM4V4DjctGateSidewallSatCurDensity = model->BSIM4V4SjctGateSidewallSatCurDensity; - if (!model->BSIM4V4SbulkJctPotentialGiven) - model->BSIM4V4SbulkJctPotential = 1.0; - if (!model->BSIM4V4DbulkJctPotentialGiven) - model->BSIM4V4DbulkJctPotential = model->BSIM4V4SbulkJctPotential; - if (!model->BSIM4V4SsidewallJctPotentialGiven) - model->BSIM4V4SsidewallJctPotential = 1.0; - if (!model->BSIM4V4DsidewallJctPotentialGiven) - model->BSIM4V4DsidewallJctPotential = model->BSIM4V4SsidewallJctPotential; - if (!model->BSIM4V4SGatesidewallJctPotentialGiven) - model->BSIM4V4SGatesidewallJctPotential = model->BSIM4V4SsidewallJctPotential; - if (!model->BSIM4V4DGatesidewallJctPotentialGiven) - model->BSIM4V4DGatesidewallJctPotential = model->BSIM4V4SGatesidewallJctPotential; - if (!model->BSIM4V4SbulkJctBotGradingCoeffGiven) - model->BSIM4V4SbulkJctBotGradingCoeff = 0.5; - if (!model->BSIM4V4DbulkJctBotGradingCoeffGiven) - model->BSIM4V4DbulkJctBotGradingCoeff = model->BSIM4V4SbulkJctBotGradingCoeff; - if (!model->BSIM4V4SbulkJctSideGradingCoeffGiven) - model->BSIM4V4SbulkJctSideGradingCoeff = 0.33; - if (!model->BSIM4V4DbulkJctSideGradingCoeffGiven) - model->BSIM4V4DbulkJctSideGradingCoeff = model->BSIM4V4SbulkJctSideGradingCoeff; - if (!model->BSIM4V4SbulkJctGateSideGradingCoeffGiven) - model->BSIM4V4SbulkJctGateSideGradingCoeff = model->BSIM4V4SbulkJctSideGradingCoeff; - if (!model->BSIM4V4DbulkJctGateSideGradingCoeffGiven) - model->BSIM4V4DbulkJctGateSideGradingCoeff = model->BSIM4V4SbulkJctGateSideGradingCoeff; - if (!model->BSIM4V4SjctEmissionCoeffGiven) - model->BSIM4V4SjctEmissionCoeff = 1.0; - if (!model->BSIM4V4DjctEmissionCoeffGiven) - model->BSIM4V4DjctEmissionCoeff = model->BSIM4V4SjctEmissionCoeff; - if (!model->BSIM4V4SjctTempExponentGiven) - model->BSIM4V4SjctTempExponent = 3.0; - if (!model->BSIM4V4DjctTempExponentGiven) - model->BSIM4V4DjctTempExponent = model->BSIM4V4SjctTempExponent; - - if (!model->BSIM4V4jtssGiven) - model->BSIM4V4jtss = 0.0; - if (!model->BSIM4V4jtsdGiven) - model->BSIM4V4jtsd = model->BSIM4V4jtss; - if (!model->BSIM4V4jtsswsGiven) - model->BSIM4V4jtssws = 0.0; - if (!model->BSIM4V4jtsswdGiven) - model->BSIM4V4jtsswd = model->BSIM4V4jtssws; - if (!model->BSIM4V4jtsswgsGiven) - model->BSIM4V4jtsswgs = 0.0; - if (!model->BSIM4V4jtsswgdGiven) - model->BSIM4V4jtsswgd = model->BSIM4V4jtsswgs; - if (!model->BSIM4V4njtsGiven) - model->BSIM4V4njts = 20.0; - if (!model->BSIM4V4njtsswGiven) - model->BSIM4V4njtssw = 20.0; - if (!model->BSIM4V4njtsswgGiven) - model->BSIM4V4njtsswg = 20.0; - if (!model->BSIM4V4xtssGiven) - model->BSIM4V4xtss = 0.02; - if (!model->BSIM4V4xtsdGiven) - model->BSIM4V4xtsd = model->BSIM4V4xtss; - if (!model->BSIM4V4xtsswsGiven) - model->BSIM4V4xtssws = 0.02; - if (!model->BSIM4V4jtsswdGiven) - model->BSIM4V4xtsswd = model->BSIM4V4xtssws; - if (!model->BSIM4V4xtsswgsGiven) - model->BSIM4V4xtsswgs = 0.02; - if (!model->BSIM4V4xtsswgdGiven) - model->BSIM4V4xtsswgd = model->BSIM4V4xtsswgs; - if (!model->BSIM4V4tnjtsGiven) - model->BSIM4V4tnjts = 0.0; - if (!model->BSIM4V4tnjtsswGiven) - model->BSIM4V4tnjtssw = 0.0; - if (!model->BSIM4V4tnjtsswgGiven) - model->BSIM4V4tnjtsswg = 0.0; - if (!model->BSIM4V4vtssGiven) - model->BSIM4V4vtss = 10.0; - if (!model->BSIM4V4vtsdGiven) - model->BSIM4V4vtsd = model->BSIM4V4vtss; - if (!model->BSIM4V4vtsswsGiven) - model->BSIM4V4vtssws = 10.0; - if (!model->BSIM4V4vtsswdGiven) - model->BSIM4V4vtsswd = model->BSIM4V4vtssws; - if (!model->BSIM4V4vtsswgsGiven) - model->BSIM4V4vtsswgs = 10.0; - if (!model->BSIM4V4vtsswgdGiven) - model->BSIM4V4vtsswgd = model->BSIM4V4vtsswgs; - - if (!model->BSIM4V4oxideTrapDensityAGiven) - { if (model->BSIM4V4type == NMOS) - model->BSIM4V4oxideTrapDensityA = 6.25e41; + if (!model->BSIM4v4tnomGiven) + model->BSIM4v4tnom = ckt->CKTnomTemp; + if (!model->BSIM4v4LintGiven) + model->BSIM4v4Lint = 0.0; + if (!model->BSIM4v4LlGiven) + model->BSIM4v4Ll = 0.0; + if (!model->BSIM4v4LlcGiven) + model->BSIM4v4Llc = model->BSIM4v4Ll; + if (!model->BSIM4v4LlnGiven) + model->BSIM4v4Lln = 1.0; + if (!model->BSIM4v4LwGiven) + model->BSIM4v4Lw = 0.0; + if (!model->BSIM4v4LwcGiven) + model->BSIM4v4Lwc = model->BSIM4v4Lw; + if (!model->BSIM4v4LwnGiven) + model->BSIM4v4Lwn = 1.0; + if (!model->BSIM4v4LwlGiven) + model->BSIM4v4Lwl = 0.0; + if (!model->BSIM4v4LwlcGiven) + model->BSIM4v4Lwlc = model->BSIM4v4Lwl; + if (!model->BSIM4v4LminGiven) + model->BSIM4v4Lmin = 0.0; + if (!model->BSIM4v4LmaxGiven) + model->BSIM4v4Lmax = 1.0; + if (!model->BSIM4v4WintGiven) + model->BSIM4v4Wint = 0.0; + if (!model->BSIM4v4WlGiven) + model->BSIM4v4Wl = 0.0; + if (!model->BSIM4v4WlcGiven) + model->BSIM4v4Wlc = model->BSIM4v4Wl; + if (!model->BSIM4v4WlnGiven) + model->BSIM4v4Wln = 1.0; + if (!model->BSIM4v4WwGiven) + model->BSIM4v4Ww = 0.0; + if (!model->BSIM4v4WwcGiven) + model->BSIM4v4Wwc = model->BSIM4v4Ww; + if (!model->BSIM4v4WwnGiven) + model->BSIM4v4Wwn = 1.0; + if (!model->BSIM4v4WwlGiven) + model->BSIM4v4Wwl = 0.0; + if (!model->BSIM4v4WwlcGiven) + model->BSIM4v4Wwlc = model->BSIM4v4Wwl; + if (!model->BSIM4v4WminGiven) + model->BSIM4v4Wmin = 0.0; + if (!model->BSIM4v4WmaxGiven) + model->BSIM4v4Wmax = 1.0; + if (!model->BSIM4v4dwcGiven) + model->BSIM4v4dwc = model->BSIM4v4Wint; + if (!model->BSIM4v4dlcGiven) + model->BSIM4v4dlc = model->BSIM4v4Lint; + if (!model->BSIM4v4xlGiven) + model->BSIM4v4xl = 0.0; + if (!model->BSIM4v4xwGiven) + model->BSIM4v4xw = 0.0; + if (!model->BSIM4v4dlcigGiven) + model->BSIM4v4dlcig = model->BSIM4v4Lint; + if (!model->BSIM4v4dwjGiven) + model->BSIM4v4dwj = model->BSIM4v4dwc; + if (!model->BSIM4v4cfGiven) + model->BSIM4v4cf = 2.0 * model->BSIM4v4epsrox * EPS0 / PI + * log(1.0 + 0.4e-6 / model->BSIM4v4toxe); + + if (!model->BSIM4v4xpartGiven) + model->BSIM4v4xpart = 0.0; + if (!model->BSIM4v4sheetResistanceGiven) + model->BSIM4v4sheetResistance = 0.0; + + if (!model->BSIM4v4SunitAreaJctCapGiven) + model->BSIM4v4SunitAreaJctCap = 5.0E-4; + if (!model->BSIM4v4DunitAreaJctCapGiven) + model->BSIM4v4DunitAreaJctCap = model->BSIM4v4SunitAreaJctCap; + if (!model->BSIM4v4SunitLengthSidewallJctCapGiven) + model->BSIM4v4SunitLengthSidewallJctCap = 5.0E-10; + if (!model->BSIM4v4DunitLengthSidewallJctCapGiven) + model->BSIM4v4DunitLengthSidewallJctCap = model->BSIM4v4SunitLengthSidewallJctCap; + if (!model->BSIM4v4SunitLengthGateSidewallJctCapGiven) + model->BSIM4v4SunitLengthGateSidewallJctCap = model->BSIM4v4SunitLengthSidewallJctCap ; + if (!model->BSIM4v4DunitLengthGateSidewallJctCapGiven) + model->BSIM4v4DunitLengthGateSidewallJctCap = model->BSIM4v4SunitLengthGateSidewallJctCap; + if (!model->BSIM4v4SjctSatCurDensityGiven) + model->BSIM4v4SjctSatCurDensity = 1.0E-4; + if (!model->BSIM4v4DjctSatCurDensityGiven) + model->BSIM4v4DjctSatCurDensity = model->BSIM4v4SjctSatCurDensity; + if (!model->BSIM4v4SjctSidewallSatCurDensityGiven) + model->BSIM4v4SjctSidewallSatCurDensity = 0.0; + if (!model->BSIM4v4DjctSidewallSatCurDensityGiven) + model->BSIM4v4DjctSidewallSatCurDensity = model->BSIM4v4SjctSidewallSatCurDensity; + if (!model->BSIM4v4SjctGateSidewallSatCurDensityGiven) + model->BSIM4v4SjctGateSidewallSatCurDensity = 0.0; + if (!model->BSIM4v4DjctGateSidewallSatCurDensityGiven) + model->BSIM4v4DjctGateSidewallSatCurDensity = model->BSIM4v4SjctGateSidewallSatCurDensity; + if (!model->BSIM4v4SbulkJctPotentialGiven) + model->BSIM4v4SbulkJctPotential = 1.0; + if (!model->BSIM4v4DbulkJctPotentialGiven) + model->BSIM4v4DbulkJctPotential = model->BSIM4v4SbulkJctPotential; + if (!model->BSIM4v4SsidewallJctPotentialGiven) + model->BSIM4v4SsidewallJctPotential = 1.0; + if (!model->BSIM4v4DsidewallJctPotentialGiven) + model->BSIM4v4DsidewallJctPotential = model->BSIM4v4SsidewallJctPotential; + if (!model->BSIM4v4SGatesidewallJctPotentialGiven) + model->BSIM4v4SGatesidewallJctPotential = model->BSIM4v4SsidewallJctPotential; + if (!model->BSIM4v4DGatesidewallJctPotentialGiven) + model->BSIM4v4DGatesidewallJctPotential = model->BSIM4v4SGatesidewallJctPotential; + if (!model->BSIM4v4SbulkJctBotGradingCoeffGiven) + model->BSIM4v4SbulkJctBotGradingCoeff = 0.5; + if (!model->BSIM4v4DbulkJctBotGradingCoeffGiven) + model->BSIM4v4DbulkJctBotGradingCoeff = model->BSIM4v4SbulkJctBotGradingCoeff; + if (!model->BSIM4v4SbulkJctSideGradingCoeffGiven) + model->BSIM4v4SbulkJctSideGradingCoeff = 0.33; + if (!model->BSIM4v4DbulkJctSideGradingCoeffGiven) + model->BSIM4v4DbulkJctSideGradingCoeff = model->BSIM4v4SbulkJctSideGradingCoeff; + if (!model->BSIM4v4SbulkJctGateSideGradingCoeffGiven) + model->BSIM4v4SbulkJctGateSideGradingCoeff = model->BSIM4v4SbulkJctSideGradingCoeff; + if (!model->BSIM4v4DbulkJctGateSideGradingCoeffGiven) + model->BSIM4v4DbulkJctGateSideGradingCoeff = model->BSIM4v4SbulkJctGateSideGradingCoeff; + if (!model->BSIM4v4SjctEmissionCoeffGiven) + model->BSIM4v4SjctEmissionCoeff = 1.0; + if (!model->BSIM4v4DjctEmissionCoeffGiven) + model->BSIM4v4DjctEmissionCoeff = model->BSIM4v4SjctEmissionCoeff; + if (!model->BSIM4v4SjctTempExponentGiven) + model->BSIM4v4SjctTempExponent = 3.0; + if (!model->BSIM4v4DjctTempExponentGiven) + model->BSIM4v4DjctTempExponent = model->BSIM4v4SjctTempExponent; + + if (!model->BSIM4v4jtssGiven) + model->BSIM4v4jtss = 0.0; + if (!model->BSIM4v4jtsdGiven) + model->BSIM4v4jtsd = model->BSIM4v4jtss; + if (!model->BSIM4v4jtsswsGiven) + model->BSIM4v4jtssws = 0.0; + if (!model->BSIM4v4jtsswdGiven) + model->BSIM4v4jtsswd = model->BSIM4v4jtssws; + if (!model->BSIM4v4jtsswgsGiven) + model->BSIM4v4jtsswgs = 0.0; + if (!model->BSIM4v4jtsswgdGiven) + model->BSIM4v4jtsswgd = model->BSIM4v4jtsswgs; + if (!model->BSIM4v4njtsGiven) + model->BSIM4v4njts = 20.0; + if (!model->BSIM4v4njtsswGiven) + model->BSIM4v4njtssw = 20.0; + if (!model->BSIM4v4njtsswgGiven) + model->BSIM4v4njtsswg = 20.0; + if (!model->BSIM4v4xtssGiven) + model->BSIM4v4xtss = 0.02; + if (!model->BSIM4v4xtsdGiven) + model->BSIM4v4xtsd = model->BSIM4v4xtss; + if (!model->BSIM4v4xtsswsGiven) + model->BSIM4v4xtssws = 0.02; + if (!model->BSIM4v4jtsswdGiven) + model->BSIM4v4xtsswd = model->BSIM4v4xtssws; + if (!model->BSIM4v4xtsswgsGiven) + model->BSIM4v4xtsswgs = 0.02; + if (!model->BSIM4v4xtsswgdGiven) + model->BSIM4v4xtsswgd = model->BSIM4v4xtsswgs; + if (!model->BSIM4v4tnjtsGiven) + model->BSIM4v4tnjts = 0.0; + if (!model->BSIM4v4tnjtsswGiven) + model->BSIM4v4tnjtssw = 0.0; + if (!model->BSIM4v4tnjtsswgGiven) + model->BSIM4v4tnjtsswg = 0.0; + if (!model->BSIM4v4vtssGiven) + model->BSIM4v4vtss = 10.0; + if (!model->BSIM4v4vtsdGiven) + model->BSIM4v4vtsd = model->BSIM4v4vtss; + if (!model->BSIM4v4vtsswsGiven) + model->BSIM4v4vtssws = 10.0; + if (!model->BSIM4v4vtsswdGiven) + model->BSIM4v4vtsswd = model->BSIM4v4vtssws; + if (!model->BSIM4v4vtsswgsGiven) + model->BSIM4v4vtsswgs = 10.0; + if (!model->BSIM4v4vtsswgdGiven) + model->BSIM4v4vtsswgd = model->BSIM4v4vtsswgs; + + if (!model->BSIM4v4oxideTrapDensityAGiven) + { if (model->BSIM4v4type == NMOS) + model->BSIM4v4oxideTrapDensityA = 6.25e41; else - model->BSIM4V4oxideTrapDensityA= 6.188e40; + model->BSIM4v4oxideTrapDensityA= 6.188e40; } - if (!model->BSIM4V4oxideTrapDensityBGiven) - { if (model->BSIM4V4type == NMOS) - model->BSIM4V4oxideTrapDensityB = 3.125e26; + if (!model->BSIM4v4oxideTrapDensityBGiven) + { if (model->BSIM4v4type == NMOS) + model->BSIM4v4oxideTrapDensityB = 3.125e26; else - model->BSIM4V4oxideTrapDensityB = 1.5e25; + model->BSIM4v4oxideTrapDensityB = 1.5e25; } - if (!model->BSIM4V4oxideTrapDensityCGiven) - model->BSIM4V4oxideTrapDensityC = 8.75e9; - if (!model->BSIM4V4emGiven) - model->BSIM4V4em = 4.1e7; /* V/m */ - if (!model->BSIM4V4efGiven) - model->BSIM4V4ef = 1.0; - if (!model->BSIM4V4afGiven) - model->BSIM4V4af = 1.0; - if (!model->BSIM4V4kfGiven) - model->BSIM4V4kf = 0.0; - if (!model->BSIM4V4stimodGiven) - model->BSIM4V4stimod = 0.0; - if (!model->BSIM4V4rgeomodGiven) - model->BSIM4V4rgeomod = 0; - if (!model->BSIM4V4sa0Given) - model->BSIM4V4sa0 = 0.0; - if (!model->BSIM4V4sb0Given) - model->BSIM4V4sb0 = 0.0; + if (!model->BSIM4v4oxideTrapDensityCGiven) + model->BSIM4v4oxideTrapDensityC = 8.75e9; + if (!model->BSIM4v4emGiven) + model->BSIM4v4em = 4.1e7; /* V/m */ + if (!model->BSIM4v4efGiven) + model->BSIM4v4ef = 1.0; + if (!model->BSIM4v4afGiven) + model->BSIM4v4af = 1.0; + if (!model->BSIM4v4kfGiven) + model->BSIM4v4kf = 0.0; + if (!model->BSIM4v4stimodGiven) + model->BSIM4v4stimod = 0.0; + if (!model->BSIM4v4rgeomodGiven) + model->BSIM4v4rgeomod = 0; + if (!model->BSIM4v4sa0Given) + model->BSIM4v4sa0 = 0.0; + if (!model->BSIM4v4sb0Given) + model->BSIM4v4sb0 = 0.0; /* stress effect */ - if (!model->BSIM4V4sarefGiven) - model->BSIM4V4saref = 1e-6; /* m */ - if (!model->BSIM4V4sbrefGiven) - model->BSIM4V4sbref = 1e-6; /* m */ - if (!model->BSIM4V4wlodGiven) - model->BSIM4V4wlod = 0; /* m */ - if (!model->BSIM4V4ku0Given) - model->BSIM4V4ku0 = 0; /* 1/m */ - if (!model->BSIM4V4kvsatGiven) - model->BSIM4V4kvsat = 0; - if (!model->BSIM4V4kvth0Given) /* m */ - model->BSIM4V4kvth0 = 0; - if (!model->BSIM4V4tku0Given) - model->BSIM4V4tku0 = 0; - if (!model->BSIM4V4llodku0Given) - model->BSIM4V4llodku0 = 0; - if (!model->BSIM4V4wlodku0Given) - model->BSIM4V4wlodku0 = 0; - if (!model->BSIM4V4llodvthGiven) - model->BSIM4V4llodvth = 0; - if (!model->BSIM4V4wlodvthGiven) - model->BSIM4V4wlodvth = 0; - if (!model->BSIM4V4lku0Given) - model->BSIM4V4lku0 = 0; - if (!model->BSIM4V4wku0Given) - model->BSIM4V4wku0 = 0; - if (!model->BSIM4V4pku0Given) - model->BSIM4V4pku0 = 0; - if (!model->BSIM4V4lkvth0Given) - model->BSIM4V4lkvth0 = 0; - if (!model->BSIM4V4wkvth0Given) - model->BSIM4V4wkvth0 = 0; - if (!model->BSIM4V4pkvth0Given) - model->BSIM4V4pkvth0 = 0; - if (!model->BSIM4V4stk2Given) - model->BSIM4V4stk2 = 0; - if (!model->BSIM4V4lodk2Given) - model->BSIM4V4lodk2 = 1.0; - if (!model->BSIM4V4steta0Given) - model->BSIM4V4steta0 = 0; - if (!model->BSIM4V4lodeta0Given) - model->BSIM4V4lodeta0 = 1.0; - - DMCGeff = model->BSIM4V4dmcg - model->BSIM4V4dmcgt; - DMCIeff = model->BSIM4V4dmci; - DMDGeff = model->BSIM4V4dmdg - model->BSIM4V4dmcgt; + if (!model->BSIM4v4sarefGiven) + model->BSIM4v4saref = 1e-6; /* m */ + if (!model->BSIM4v4sbrefGiven) + model->BSIM4v4sbref = 1e-6; /* m */ + if (!model->BSIM4v4wlodGiven) + model->BSIM4v4wlod = 0; /* m */ + if (!model->BSIM4v4ku0Given) + model->BSIM4v4ku0 = 0; /* 1/m */ + if (!model->BSIM4v4kvsatGiven) + model->BSIM4v4kvsat = 0; + if (!model->BSIM4v4kvth0Given) /* m */ + model->BSIM4v4kvth0 = 0; + if (!model->BSIM4v4tku0Given) + model->BSIM4v4tku0 = 0; + if (!model->BSIM4v4llodku0Given) + model->BSIM4v4llodku0 = 0; + if (!model->BSIM4v4wlodku0Given) + model->BSIM4v4wlodku0 = 0; + if (!model->BSIM4v4llodvthGiven) + model->BSIM4v4llodvth = 0; + if (!model->BSIM4v4wlodvthGiven) + model->BSIM4v4wlodvth = 0; + if (!model->BSIM4v4lku0Given) + model->BSIM4v4lku0 = 0; + if (!model->BSIM4v4wku0Given) + model->BSIM4v4wku0 = 0; + if (!model->BSIM4v4pku0Given) + model->BSIM4v4pku0 = 0; + if (!model->BSIM4v4lkvth0Given) + model->BSIM4v4lkvth0 = 0; + if (!model->BSIM4v4wkvth0Given) + model->BSIM4v4wkvth0 = 0; + if (!model->BSIM4v4pkvth0Given) + model->BSIM4v4pkvth0 = 0; + if (!model->BSIM4v4stk2Given) + model->BSIM4v4stk2 = 0; + if (!model->BSIM4v4lodk2Given) + model->BSIM4v4lodk2 = 1.0; + if (!model->BSIM4v4steta0Given) + model->BSIM4v4steta0 = 0; + if (!model->BSIM4v4lodeta0Given) + model->BSIM4v4lodeta0 = 1.0; + + DMCGeff = model->BSIM4v4dmcg - model->BSIM4v4dmcgt; + DMCIeff = model->BSIM4v4dmci; + DMDGeff = model->BSIM4v4dmdg - model->BSIM4v4dmcgt; /* * End processing models and begin to loop * through all the instances of the model */ - for (here = model->BSIM4V4instances; here != NULL ; - here=here->BSIM4V4nextInstance) + for (here = model->BSIM4v4instances; here != NULL ; + here=here->BSIM4v4nextInstance) { - if (here->BSIM4V4owner == ARCHme) { + if (here->BSIM4v4owner == ARCHme) { /* allocate a chunk of the state vector */ - here->BSIM4V4states = *states; - *states += BSIM4V4numStates; + here->BSIM4v4states = *states; + *states += BSIM4v4numStates; } /* perform the parameter defaulting */ - if (!here->BSIM4V4lGiven) - here->BSIM4V4l = 5.0e-6; - if (!here->BSIM4V4wGiven) - here->BSIM4V4w = 5.0e-6; - if (!here->BSIM4V4mGiven) - here->BSIM4V4m = 1.0; - if (!here->BSIM4V4nfGiven) - here->BSIM4V4nf = 1.0; - if (!here->BSIM4V4minGiven) - here->BSIM4V4min = 0; /* integer */ - if (!here->BSIM4V4icVDSGiven) - here->BSIM4V4icVDS = 0.0; - if (!here->BSIM4V4icVGSGiven) - here->BSIM4V4icVGS = 0.0; - if (!here->BSIM4V4icVBSGiven) - here->BSIM4V4icVBS = 0.0; - if (!here->BSIM4V4drainAreaGiven) - here->BSIM4V4drainArea = 0.0; - if (!here->BSIM4V4drainPerimeterGiven) - here->BSIM4V4drainPerimeter = 0.0; - if (!here->BSIM4V4drainSquaresGiven) - here->BSIM4V4drainSquares = 1.0; - if (!here->BSIM4V4sourceAreaGiven) - here->BSIM4V4sourceArea = 0.0; - if (!here->BSIM4V4sourcePerimeterGiven) - here->BSIM4V4sourcePerimeter = 0.0; - if (!here->BSIM4V4sourceSquaresGiven) - here->BSIM4V4sourceSquares = 1.0; - - if (!here->BSIM4V4saGiven) - here->BSIM4V4sa = 0.0; - if (!here->BSIM4V4sbGiven) - here->BSIM4V4sb = 0.0; - if (!here->BSIM4V4sdGiven) - here->BSIM4V4sd = 0.0; - - if (!here->BSIM4V4rbdbGiven) - here->BSIM4V4rbdb = model->BSIM4V4rbdb; /* in ohm */ - if (!here->BSIM4V4rbsbGiven) - here->BSIM4V4rbsb = model->BSIM4V4rbsb; - if (!here->BSIM4V4rbpbGiven) - here->BSIM4V4rbpb = model->BSIM4V4rbpb; - if (!here->BSIM4V4rbpsGiven) - here->BSIM4V4rbps = model->BSIM4V4rbps; - if (!here->BSIM4V4rbpdGiven) - here->BSIM4V4rbpd = model->BSIM4V4rbpd; + if (!here->BSIM4v4lGiven) + here->BSIM4v4l = 5.0e-6; + if (!here->BSIM4v4wGiven) + here->BSIM4v4w = 5.0e-6; + if (!here->BSIM4v4mGiven) + here->BSIM4v4m = 1.0; + if (!here->BSIM4v4nfGiven) + here->BSIM4v4nf = 1.0; + if (!here->BSIM4v4minGiven) + here->BSIM4v4min = 0; /* integer */ + if (!here->BSIM4v4icVDSGiven) + here->BSIM4v4icVDS = 0.0; + if (!here->BSIM4v4icVGSGiven) + here->BSIM4v4icVGS = 0.0; + if (!here->BSIM4v4icVBSGiven) + here->BSIM4v4icVBS = 0.0; + if (!here->BSIM4v4drainAreaGiven) + here->BSIM4v4drainArea = 0.0; + if (!here->BSIM4v4drainPerimeterGiven) + here->BSIM4v4drainPerimeter = 0.0; + if (!here->BSIM4v4drainSquaresGiven) + here->BSIM4v4drainSquares = 1.0; + if (!here->BSIM4v4sourceAreaGiven) + here->BSIM4v4sourceArea = 0.0; + if (!here->BSIM4v4sourcePerimeterGiven) + here->BSIM4v4sourcePerimeter = 0.0; + if (!here->BSIM4v4sourceSquaresGiven) + here->BSIM4v4sourceSquares = 1.0; + + if (!here->BSIM4v4saGiven) + here->BSIM4v4sa = 0.0; + if (!here->BSIM4v4sbGiven) + here->BSIM4v4sb = 0.0; + if (!here->BSIM4v4sdGiven) + here->BSIM4v4sd = 0.0; + + if (!here->BSIM4v4rbdbGiven) + here->BSIM4v4rbdb = model->BSIM4v4rbdb; /* in ohm */ + if (!here->BSIM4v4rbsbGiven) + here->BSIM4v4rbsb = model->BSIM4v4rbsb; + if (!here->BSIM4v4rbpbGiven) + here->BSIM4v4rbpb = model->BSIM4v4rbpb; + if (!here->BSIM4v4rbpsGiven) + here->BSIM4v4rbps = model->BSIM4v4rbps; + if (!here->BSIM4v4rbpdGiven) + here->BSIM4v4rbpd = model->BSIM4v4rbpd; /* Process instance model selectors, some * may override their global counterparts */ - if (!here->BSIM4V4rbodyModGiven) - here->BSIM4V4rbodyMod = model->BSIM4V4rbodyMod; - else if ((here->BSIM4V4rbodyMod != 0) && (here->BSIM4V4rbodyMod != 1)) - { here->BSIM4V4rbodyMod = model->BSIM4V4rbodyMod; + if (!here->BSIM4v4rbodyModGiven) + here->BSIM4v4rbodyMod = model->BSIM4v4rbodyMod; + else if ((here->BSIM4v4rbodyMod != 0) && (here->BSIM4v4rbodyMod != 1)) + { here->BSIM4v4rbodyMod = model->BSIM4v4rbodyMod; printf("Warning: rbodyMod has been set to its global value %d.\n", - model->BSIM4V4rbodyMod); + model->BSIM4v4rbodyMod); } - if (!here->BSIM4V4rgateModGiven) - here->BSIM4V4rgateMod = model->BSIM4V4rgateMod; - else if ((here->BSIM4V4rgateMod != 0) && (here->BSIM4V4rgateMod != 1) - && (here->BSIM4V4rgateMod != 2) && (here->BSIM4V4rgateMod != 3)) - { here->BSIM4V4rgateMod = model->BSIM4V4rgateMod; + if (!here->BSIM4v4rgateModGiven) + here->BSIM4v4rgateMod = model->BSIM4v4rgateMod; + else if ((here->BSIM4v4rgateMod != 0) && (here->BSIM4v4rgateMod != 1) + && (here->BSIM4v4rgateMod != 2) && (here->BSIM4v4rgateMod != 3)) + { here->BSIM4v4rgateMod = model->BSIM4v4rgateMod; printf("Warning: rgateMod has been set to its global value %d.\n", - model->BSIM4V4rgateMod); + model->BSIM4v4rgateMod); } - if (!here->BSIM4V4geoModGiven) - here->BSIM4V4geoMod = model->BSIM4V4geoMod; - if (!here->BSIM4V4rgeoModGiven) - here->BSIM4V4rgeoMod = model->BSIM4V4rgeomod; - if (!here->BSIM4V4trnqsModGiven) - here->BSIM4V4trnqsMod = model->BSIM4V4trnqsMod; - else if ((here->BSIM4V4trnqsMod != 0) && (here->BSIM4V4trnqsMod != 1)) - { here->BSIM4V4trnqsMod = model->BSIM4V4trnqsMod; + if (!here->BSIM4v4geoModGiven) + here->BSIM4v4geoMod = model->BSIM4v4geoMod; + if (!here->BSIM4v4rgeoModGiven) + here->BSIM4v4rgeoMod = model->BSIM4v4rgeomod; + if (!here->BSIM4v4trnqsModGiven) + here->BSIM4v4trnqsMod = model->BSIM4v4trnqsMod; + else if ((here->BSIM4v4trnqsMod != 0) && (here->BSIM4v4trnqsMod != 1)) + { here->BSIM4v4trnqsMod = model->BSIM4v4trnqsMod; printf("Warning: trnqsMod has been set to its global value %d.\n", - model->BSIM4V4trnqsMod); + model->BSIM4v4trnqsMod); } - if (!here->BSIM4V4acnqsModGiven) - here->BSIM4V4acnqsMod = model->BSIM4V4acnqsMod; - else if ((here->BSIM4V4acnqsMod != 0) && (here->BSIM4V4acnqsMod != 1)) - { here->BSIM4V4acnqsMod = model->BSIM4V4acnqsMod; + if (!here->BSIM4v4acnqsModGiven) + here->BSIM4v4acnqsMod = model->BSIM4v4acnqsMod; + else if ((here->BSIM4v4acnqsMod != 0) && (here->BSIM4v4acnqsMod != 1)) + { here->BSIM4v4acnqsMod = model->BSIM4v4acnqsMod; printf("Warning: acnqsMod has been set to its global value %d.\n", - model->BSIM4V4acnqsMod); + model->BSIM4v4acnqsMod); } /* stress effect */ - if (!here->BSIM4V4saGiven) - here->BSIM4V4sa = 0.0; - if (!here->BSIM4V4sbGiven) - here->BSIM4V4sb = 0.0; - if (!here->BSIM4V4sdGiven) - here->BSIM4V4sd = 0.0; + if (!here->BSIM4v4saGiven) + here->BSIM4v4sa = 0.0; + if (!here->BSIM4v4sbGiven) + here->BSIM4v4sb = 0.0; + if (!here->BSIM4v4sdGiven) + here->BSIM4v4sd = 0.0; /* process drain series resistance */ createNode = 0; - if ( (model->BSIM4V4rdsMod != 0) - || (model->BSIM4V4tnoiMod != 0 && noiseAnalGiven)) + if ( (model->BSIM4v4rdsMod != 0) + || (model->BSIM4v4tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; - } else if (model->BSIM4V4sheetResistance > 0) + } else if (model->BSIM4v4sheetResistance > 0) { - if (here->BSIM4V4drainSquaresGiven - && here->BSIM4V4drainSquares > 0) + if (here->BSIM4v4drainSquaresGiven + && here->BSIM4v4drainSquares > 0) { createNode = 1; - } else if (!here->BSIM4V4drainSquaresGiven - && (here->BSIM4V4rgeoMod != 0)) + } else if (!here->BSIM4v4drainSquaresGiven + && (here->BSIM4v4rgeoMod != 0)) { - BSIM4V4RdseffGeo(here->BSIM4V4nf*here->BSIM4V4m, here->BSIM4V4geoMod, - here->BSIM4V4rgeoMod, here->BSIM4V4min, - here->BSIM4V4w, model->BSIM4V4sheetResistance, + BSIM4v4RdseffGeo(here->BSIM4v4nf*here->BSIM4v4m, here->BSIM4v4geoMod, + here->BSIM4v4rgeoMod, here->BSIM4v4min, + here->BSIM4v4w, model->BSIM4v4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &Rtot); if(Rtot > 0) createNode = 1; } } - if ( createNode != 0 && (here->BSIM4V4dNodePrime == 0)) - { error = CKTmkVolt(ckt,&tmp,here->BSIM4V4name,"drain"); + if ( createNode != 0 && (here->BSIM4v4dNodePrime == 0)) + { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"drain"); if(error) return(error); - here->BSIM4V4dNodePrime = tmp->number; + here->BSIM4v4dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; @@ -1662,36 +1662,36 @@ JOB *job; } else - { here->BSIM4V4dNodePrime = here->BSIM4V4dNode; + { here->BSIM4v4dNodePrime = here->BSIM4v4dNode; } /* process source series resistance */ createNode = 0; - if ( (model->BSIM4V4rdsMod != 0) - || (model->BSIM4V4tnoiMod != 0 && noiseAnalGiven)) + if ( (model->BSIM4v4rdsMod != 0) + || (model->BSIM4v4tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; - } else if (model->BSIM4V4sheetResistance > 0) + } else if (model->BSIM4v4sheetResistance > 0) { - if (here->BSIM4V4sourceSquaresGiven - && here->BSIM4V4sourceSquares > 0) + if (here->BSIM4v4sourceSquaresGiven + && here->BSIM4v4sourceSquares > 0) { createNode = 1; - } else if (!here->BSIM4V4sourceSquaresGiven - && (here->BSIM4V4rgeoMod != 0)) + } else if (!here->BSIM4v4sourceSquaresGiven + && (here->BSIM4v4rgeoMod != 0)) { - BSIM4V4RdseffGeo(here->BSIM4V4nf*here->BSIM4V4m, here->BSIM4V4geoMod, - here->BSIM4V4rgeoMod, here->BSIM4V4min, - here->BSIM4V4w, model->BSIM4V4sheetResistance, + BSIM4v4RdseffGeo(here->BSIM4v4nf*here->BSIM4v4m, here->BSIM4v4geoMod, + here->BSIM4v4rgeoMod, here->BSIM4v4min, + here->BSIM4v4w, model->BSIM4v4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &Rtot); if(Rtot > 0) createNode = 1; } } - if ( createNode != 0 && here->BSIM4V4sNodePrime == 0) - { error = CKTmkVolt(ckt,&tmp,here->BSIM4V4name,"source"); + if ( createNode != 0 && here->BSIM4v4sNodePrime == 0) + { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"source"); if(error) return(error); - here->BSIM4V4sNodePrime = tmp->number; + here->BSIM4v4sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; @@ -1706,12 +1706,12 @@ JOB *job; } else - here->BSIM4V4sNodePrime = here->BSIM4V4sNode; + here->BSIM4v4sNodePrime = here->BSIM4v4sNode; - if ((here->BSIM4V4rgateMod > 0) && (here->BSIM4V4gNodePrime == 0)) - { error = CKTmkVolt(ckt,&tmp,here->BSIM4V4name,"gate"); + if ((here->BSIM4v4rgateMod > 0) && (here->BSIM4v4gNodePrime == 0)) + { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"gate"); if(error) return(error); - here->BSIM4V4gNodePrime = tmp->number; + here->BSIM4v4gNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; @@ -1726,23 +1726,23 @@ JOB *job; } else - here->BSIM4V4gNodePrime = here->BSIM4V4gNodeExt; + here->BSIM4v4gNodePrime = here->BSIM4v4gNodeExt; - if ((here->BSIM4V4rgateMod == 3) && (here->BSIM4V4gNodeMid == 0)) - { error = CKTmkVolt(ckt,&tmp,here->BSIM4V4name,"midgate"); + if ((here->BSIM4v4rgateMod == 3) && (here->BSIM4v4gNodeMid == 0)) + { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"midgate"); if(error) return(error); - here->BSIM4V4gNodeMid = tmp->number; + here->BSIM4v4gNodeMid = tmp->number; } else - here->BSIM4V4gNodeMid = here->BSIM4V4gNodeExt; + here->BSIM4v4gNodeMid = here->BSIM4v4gNodeExt; /* internal body nodes for body resistance model */ - if (here->BSIM4V4rbodyMod) - { if (here->BSIM4V4dbNode == 0) - { error = CKTmkVolt(ckt,&tmp,here->BSIM4V4name,"dbody"); + if (here->BSIM4v4rbodyMod) + { if (here->BSIM4v4dbNode == 0) + { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"dbody"); if(error) return(error); - here->BSIM4V4dbNode = tmp->number; + here->BSIM4v4dbNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; @@ -1755,26 +1755,26 @@ JOB *job; } } } - if (here->BSIM4V4bNodePrime == 0) - { error = CKTmkVolt(ckt,&tmp,here->BSIM4V4name,"body"); + if (here->BSIM4v4bNodePrime == 0) + { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"body"); if(error) return(error); - here->BSIM4V4bNodePrime = tmp->number; + here->BSIM4v4bNodePrime = tmp->number; } - if (here->BSIM4V4sbNode == 0) - { error = CKTmkVolt(ckt,&tmp,here->BSIM4V4name,"sbody"); + if (here->BSIM4v4sbNode == 0) + { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"sbody"); if(error) return(error); - here->BSIM4V4sbNode = tmp->number; + here->BSIM4v4sbNode = tmp->number; } } else - here->BSIM4V4dbNode = here->BSIM4V4bNodePrime = here->BSIM4V4sbNode - = here->BSIM4V4bNode; + here->BSIM4v4dbNode = here->BSIM4v4bNodePrime = here->BSIM4v4sbNode + = here->BSIM4v4bNode; /* NQS node */ - if ((here->BSIM4V4trnqsMod) && (here->BSIM4V4qNode == 0)) - { error = CKTmkVolt(ckt,&tmp,here->BSIM4V4name,"charge"); + if ((here->BSIM4v4trnqsMod) && (here->BSIM4v4qNode == 0)) + { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"charge"); if(error) return(error); - here->BSIM4V4qNode = tmp->number; + here->BSIM4v4qNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; @@ -1788,7 +1788,7 @@ JOB *job; } } else - here->BSIM4V4qNode = 0; + here->BSIM4v4qNode = 0; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ @@ -1797,92 +1797,92 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ return(E_NOMEM);\ } - TSTALLOC(BSIM4V4DPbpPtr, BSIM4V4dNodePrime, BSIM4V4bNodePrime) - TSTALLOC(BSIM4V4GPbpPtr, BSIM4V4gNodePrime, BSIM4V4bNodePrime) - TSTALLOC(BSIM4V4SPbpPtr, BSIM4V4sNodePrime, BSIM4V4bNodePrime) - - TSTALLOC(BSIM4V4BPdpPtr, BSIM4V4bNodePrime, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4BPgpPtr, BSIM4V4bNodePrime, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4BPspPtr, BSIM4V4bNodePrime, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4BPbpPtr, BSIM4V4bNodePrime, BSIM4V4bNodePrime) - - TSTALLOC(BSIM4V4DdPtr, BSIM4V4dNode, BSIM4V4dNode) - TSTALLOC(BSIM4V4GPgpPtr, BSIM4V4gNodePrime, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4SsPtr, BSIM4V4sNode, BSIM4V4sNode) - TSTALLOC(BSIM4V4DPdpPtr, BSIM4V4dNodePrime, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4SPspPtr, BSIM4V4sNodePrime, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4DdpPtr, BSIM4V4dNode, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4GPdpPtr, BSIM4V4gNodePrime, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4GPspPtr, BSIM4V4gNodePrime, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4SspPtr, BSIM4V4sNode, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4DPspPtr, BSIM4V4dNodePrime, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4DPdPtr, BSIM4V4dNodePrime, BSIM4V4dNode) - TSTALLOC(BSIM4V4DPgpPtr, BSIM4V4dNodePrime, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4SPgpPtr, BSIM4V4sNodePrime, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4SPsPtr, BSIM4V4sNodePrime, BSIM4V4sNode) - TSTALLOC(BSIM4V4SPdpPtr, BSIM4V4sNodePrime, BSIM4V4dNodePrime) - - TSTALLOC(BSIM4V4QqPtr, BSIM4V4qNode, BSIM4V4qNode) - TSTALLOC(BSIM4V4QbpPtr, BSIM4V4qNode, BSIM4V4bNodePrime) - TSTALLOC(BSIM4V4QdpPtr, BSIM4V4qNode, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4QspPtr, BSIM4V4qNode, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4QgpPtr, BSIM4V4qNode, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4DPqPtr, BSIM4V4dNodePrime, BSIM4V4qNode) - TSTALLOC(BSIM4V4SPqPtr, BSIM4V4sNodePrime, BSIM4V4qNode) - TSTALLOC(BSIM4V4GPqPtr, BSIM4V4gNodePrime, BSIM4V4qNode) - - if (here->BSIM4V4rgateMod != 0) - { TSTALLOC(BSIM4V4GEgePtr, BSIM4V4gNodeExt, BSIM4V4gNodeExt) - TSTALLOC(BSIM4V4GEgpPtr, BSIM4V4gNodeExt, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4GPgePtr, BSIM4V4gNodePrime, BSIM4V4gNodeExt) - TSTALLOC(BSIM4V4GEdpPtr, BSIM4V4gNodeExt, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4GEspPtr, BSIM4V4gNodeExt, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4GEbpPtr, BSIM4V4gNodeExt, BSIM4V4bNodePrime) - - TSTALLOC(BSIM4V4GMdpPtr, BSIM4V4gNodeMid, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4GMgpPtr, BSIM4V4gNodeMid, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4GMgmPtr, BSIM4V4gNodeMid, BSIM4V4gNodeMid) - TSTALLOC(BSIM4V4GMgePtr, BSIM4V4gNodeMid, BSIM4V4gNodeExt) - TSTALLOC(BSIM4V4GMspPtr, BSIM4V4gNodeMid, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4GMbpPtr, BSIM4V4gNodeMid, BSIM4V4bNodePrime) - TSTALLOC(BSIM4V4DPgmPtr, BSIM4V4dNodePrime, BSIM4V4gNodeMid) - TSTALLOC(BSIM4V4GPgmPtr, BSIM4V4gNodePrime, BSIM4V4gNodeMid) - TSTALLOC(BSIM4V4GEgmPtr, BSIM4V4gNodeExt, BSIM4V4gNodeMid) - TSTALLOC(BSIM4V4SPgmPtr, BSIM4V4sNodePrime, BSIM4V4gNodeMid) - TSTALLOC(BSIM4V4BPgmPtr, BSIM4V4bNodePrime, BSIM4V4gNodeMid) + TSTALLOC(BSIM4v4DPbpPtr, BSIM4v4dNodePrime, BSIM4v4bNodePrime) + TSTALLOC(BSIM4v4GPbpPtr, BSIM4v4gNodePrime, BSIM4v4bNodePrime) + TSTALLOC(BSIM4v4SPbpPtr, BSIM4v4sNodePrime, BSIM4v4bNodePrime) + + TSTALLOC(BSIM4v4BPdpPtr, BSIM4v4bNodePrime, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4BPgpPtr, BSIM4v4bNodePrime, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4BPspPtr, BSIM4v4bNodePrime, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4BPbpPtr, BSIM4v4bNodePrime, BSIM4v4bNodePrime) + + TSTALLOC(BSIM4v4DdPtr, BSIM4v4dNode, BSIM4v4dNode) + TSTALLOC(BSIM4v4GPgpPtr, BSIM4v4gNodePrime, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4SsPtr, BSIM4v4sNode, BSIM4v4sNode) + TSTALLOC(BSIM4v4DPdpPtr, BSIM4v4dNodePrime, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4SPspPtr, BSIM4v4sNodePrime, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4DdpPtr, BSIM4v4dNode, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4GPdpPtr, BSIM4v4gNodePrime, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4GPspPtr, BSIM4v4gNodePrime, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4SspPtr, BSIM4v4sNode, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4DPspPtr, BSIM4v4dNodePrime, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4DPdPtr, BSIM4v4dNodePrime, BSIM4v4dNode) + TSTALLOC(BSIM4v4DPgpPtr, BSIM4v4dNodePrime, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4SPgpPtr, BSIM4v4sNodePrime, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4SPsPtr, BSIM4v4sNodePrime, BSIM4v4sNode) + TSTALLOC(BSIM4v4SPdpPtr, BSIM4v4sNodePrime, BSIM4v4dNodePrime) + + TSTALLOC(BSIM4v4QqPtr, BSIM4v4qNode, BSIM4v4qNode) + TSTALLOC(BSIM4v4QbpPtr, BSIM4v4qNode, BSIM4v4bNodePrime) + TSTALLOC(BSIM4v4QdpPtr, BSIM4v4qNode, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4QspPtr, BSIM4v4qNode, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4QgpPtr, BSIM4v4qNode, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4DPqPtr, BSIM4v4dNodePrime, BSIM4v4qNode) + TSTALLOC(BSIM4v4SPqPtr, BSIM4v4sNodePrime, BSIM4v4qNode) + TSTALLOC(BSIM4v4GPqPtr, BSIM4v4gNodePrime, BSIM4v4qNode) + + if (here->BSIM4v4rgateMod != 0) + { TSTALLOC(BSIM4v4GEgePtr, BSIM4v4gNodeExt, BSIM4v4gNodeExt) + TSTALLOC(BSIM4v4GEgpPtr, BSIM4v4gNodeExt, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4GPgePtr, BSIM4v4gNodePrime, BSIM4v4gNodeExt) + TSTALLOC(BSIM4v4GEdpPtr, BSIM4v4gNodeExt, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4GEspPtr, BSIM4v4gNodeExt, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4GEbpPtr, BSIM4v4gNodeExt, BSIM4v4bNodePrime) + + TSTALLOC(BSIM4v4GMdpPtr, BSIM4v4gNodeMid, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4GMgpPtr, BSIM4v4gNodeMid, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4GMgmPtr, BSIM4v4gNodeMid, BSIM4v4gNodeMid) + TSTALLOC(BSIM4v4GMgePtr, BSIM4v4gNodeMid, BSIM4v4gNodeExt) + TSTALLOC(BSIM4v4GMspPtr, BSIM4v4gNodeMid, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4GMbpPtr, BSIM4v4gNodeMid, BSIM4v4bNodePrime) + TSTALLOC(BSIM4v4DPgmPtr, BSIM4v4dNodePrime, BSIM4v4gNodeMid) + TSTALLOC(BSIM4v4GPgmPtr, BSIM4v4gNodePrime, BSIM4v4gNodeMid) + TSTALLOC(BSIM4v4GEgmPtr, BSIM4v4gNodeExt, BSIM4v4gNodeMid) + TSTALLOC(BSIM4v4SPgmPtr, BSIM4v4sNodePrime, BSIM4v4gNodeMid) + TSTALLOC(BSIM4v4BPgmPtr, BSIM4v4bNodePrime, BSIM4v4gNodeMid) } - if (here->BSIM4V4rbodyMod) - { TSTALLOC(BSIM4V4DPdbPtr, BSIM4V4dNodePrime, BSIM4V4dbNode) - TSTALLOC(BSIM4V4SPsbPtr, BSIM4V4sNodePrime, BSIM4V4sbNode) + if (here->BSIM4v4rbodyMod) + { TSTALLOC(BSIM4v4DPdbPtr, BSIM4v4dNodePrime, BSIM4v4dbNode) + TSTALLOC(BSIM4v4SPsbPtr, BSIM4v4sNodePrime, BSIM4v4sbNode) - TSTALLOC(BSIM4V4DBdpPtr, BSIM4V4dbNode, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4DBdbPtr, BSIM4V4dbNode, BSIM4V4dbNode) - TSTALLOC(BSIM4V4DBbpPtr, BSIM4V4dbNode, BSIM4V4bNodePrime) - TSTALLOC(BSIM4V4DBbPtr, BSIM4V4dbNode, BSIM4V4bNode) + TSTALLOC(BSIM4v4DBdpPtr, BSIM4v4dbNode, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4DBdbPtr, BSIM4v4dbNode, BSIM4v4dbNode) + TSTALLOC(BSIM4v4DBbpPtr, BSIM4v4dbNode, BSIM4v4bNodePrime) + TSTALLOC(BSIM4v4DBbPtr, BSIM4v4dbNode, BSIM4v4bNode) - TSTALLOC(BSIM4V4BPdbPtr, BSIM4V4bNodePrime, BSIM4V4dbNode) - TSTALLOC(BSIM4V4BPbPtr, BSIM4V4bNodePrime, BSIM4V4bNode) - TSTALLOC(BSIM4V4BPsbPtr, BSIM4V4bNodePrime, BSIM4V4sbNode) + TSTALLOC(BSIM4v4BPdbPtr, BSIM4v4bNodePrime, BSIM4v4dbNode) + TSTALLOC(BSIM4v4BPbPtr, BSIM4v4bNodePrime, BSIM4v4bNode) + TSTALLOC(BSIM4v4BPsbPtr, BSIM4v4bNodePrime, BSIM4v4sbNode) - TSTALLOC(BSIM4V4SBspPtr, BSIM4V4sbNode, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4SBbpPtr, BSIM4V4sbNode, BSIM4V4bNodePrime) - TSTALLOC(BSIM4V4SBbPtr, BSIM4V4sbNode, BSIM4V4bNode) - TSTALLOC(BSIM4V4SBsbPtr, BSIM4V4sbNode, BSIM4V4sbNode) + TSTALLOC(BSIM4v4SBspPtr, BSIM4v4sbNode, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4SBbpPtr, BSIM4v4sbNode, BSIM4v4bNodePrime) + TSTALLOC(BSIM4v4SBbPtr, BSIM4v4sbNode, BSIM4v4bNode) + TSTALLOC(BSIM4v4SBsbPtr, BSIM4v4sbNode, BSIM4v4sbNode) - TSTALLOC(BSIM4V4BdbPtr, BSIM4V4bNode, BSIM4V4dbNode) - TSTALLOC(BSIM4V4BbpPtr, BSIM4V4bNode, BSIM4V4bNodePrime) - TSTALLOC(BSIM4V4BsbPtr, BSIM4V4bNode, BSIM4V4sbNode) - TSTALLOC(BSIM4V4BbPtr, BSIM4V4bNode, BSIM4V4bNode) + TSTALLOC(BSIM4v4BdbPtr, BSIM4v4bNode, BSIM4v4dbNode) + TSTALLOC(BSIM4v4BbpPtr, BSIM4v4bNode, BSIM4v4bNodePrime) + TSTALLOC(BSIM4v4BsbPtr, BSIM4v4bNode, BSIM4v4sbNode) + TSTALLOC(BSIM4v4BbPtr, BSIM4v4bNode, BSIM4v4bNode) } - if (model->BSIM4V4rdsMod) - { TSTALLOC(BSIM4V4DgpPtr, BSIM4V4dNode, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4DspPtr, BSIM4V4dNode, BSIM4V4sNodePrime) - TSTALLOC(BSIM4V4DbpPtr, BSIM4V4dNode, BSIM4V4bNodePrime) - TSTALLOC(BSIM4V4SdpPtr, BSIM4V4sNode, BSIM4V4dNodePrime) - TSTALLOC(BSIM4V4SgpPtr, BSIM4V4sNode, BSIM4V4gNodePrime) - TSTALLOC(BSIM4V4SbpPtr, BSIM4V4sNode, BSIM4V4bNodePrime) + if (model->BSIM4v4rdsMod) + { TSTALLOC(BSIM4v4DgpPtr, BSIM4v4dNode, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4DspPtr, BSIM4v4dNode, BSIM4v4sNodePrime) + TSTALLOC(BSIM4v4DbpPtr, BSIM4v4dNode, BSIM4v4bNodePrime) + TSTALLOC(BSIM4v4SdpPtr, BSIM4v4sNode, BSIM4v4dNodePrime) + TSTALLOC(BSIM4v4SgpPtr, BSIM4v4sNode, BSIM4v4gNodePrime) + TSTALLOC(BSIM4v4SbpPtr, BSIM4v4sNode, BSIM4v4bNodePrime) } } } @@ -1890,31 +1890,31 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ } int -BSIM4V4unsetup(inModel,ckt) +BSIM4v4unsetup(inModel,ckt) GENmodel *inModel; CKTcircuit *ckt; { - BSIM4V4model *model; - BSIM4V4instance *here; + BSIM4v4model *model; + BSIM4v4instance *here; - for (model = (BSIM4V4model *)inModel; model != NULL; - model = model->BSIM4V4nextModel) + for (model = (BSIM4v4model *)inModel; model != NULL; + model = model->BSIM4v4nextModel) { - for (here = model->BSIM4V4instances; here != NULL; - here=here->BSIM4V4nextInstance) + for (here = model->BSIM4v4instances; here != NULL; + here=here->BSIM4v4nextInstance) { - if (here->BSIM4V4dNodePrime - && here->BSIM4V4dNodePrime != here->BSIM4V4dNode) + if (here->BSIM4v4dNodePrime + && here->BSIM4v4dNodePrime != here->BSIM4v4dNode) { - CKTdltNNum(ckt, here->BSIM4V4dNodePrime); - here->BSIM4V4dNodePrime = 0; + CKTdltNNum(ckt, here->BSIM4v4dNodePrime); + here->BSIM4v4dNodePrime = 0; } - if (here->BSIM4V4sNodePrime - && here->BSIM4V4sNodePrime != here->BSIM4V4sNode) + if (here->BSIM4v4sNodePrime + && here->BSIM4v4sNodePrime != here->BSIM4v4sNode) { - CKTdltNNum(ckt, here->BSIM4V4sNodePrime); - here->BSIM4V4sNodePrime = 0; + CKTdltNNum(ckt, here->BSIM4v4sNodePrime); + here->BSIM4v4sNodePrime = 0; } } } diff --git a/src/spicelib/devices/bsim4v4/b4v4temp.c b/src/spicelib/devices/bsim4v4/b4v4temp.c index a4b1a4a29..944bb8cd9 100644 --- a/src/spicelib/devices/bsim4v4/b4v4temp.c +++ b/src/spicelib/devices/bsim4v4/b4v4temp.c @@ -43,12 +43,12 @@ int -BSIM4V4PAeffGeo(double, int, int, double, double, double, double, double *, double *, double *, double *); +BSIM4v4PAeffGeo(double, int, int, double, double, double, double, double *, double *, double *, double *); int -BSIM4V4RdseffGeo(double, int, int, int, double, double, double, double, double, int, double *); +BSIM4v4RdseffGeo(double, int, int, int, double, double, double, double, double, int, double *); int -BSIM4V4DioIjthVjmEval(Nvtm, Ijth, Isb, XExpBV, Vjm) +BSIM4v4DioIjthVjmEval(Nvtm, Ijth, Isb, XExpBV, Vjm) double Nvtm, Ijth, Isb, XExpBV; double *Vjm; { @@ -64,12 +64,12 @@ return 0; int -BSIM4V4temp(inModel,ckt) +BSIM4v4temp(inModel,ckt) GENmodel *inModel; CKTcircuit *ckt; { -BSIM4V4model *model = (BSIM4V4model*) inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model*) inModel; +BSIM4v4instance *here; struct bsim4SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, tmp3, Eg, Eg0, ni; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Lnew=0.0, Wnew; @@ -83,270 +83,270 @@ double W_tmp, Inv_ODeff, OD_offset, dk2_lod, deta0_lod; int Size_Not_Found, i; - /* loop through all the BSIM4V4 device models */ - for (; model != NULL; model = model->BSIM4V4nextModel) + /* loop through all the BSIM4v4 device models */ + for (; model != NULL; model = model->BSIM4v4nextModel) { Temp = ckt->CKTtemp; - if (model->BSIM4V4SbulkJctPotential < 0.1) - { model->BSIM4V4SbulkJctPotential = 0.1; + if (model->BSIM4v4SbulkJctPotential < 0.1) + { model->BSIM4v4SbulkJctPotential = 0.1; fprintf(stderr, "Given pbs is less than 0.1. Pbs is set to 0.1.\n"); } - if (model->BSIM4V4SsidewallJctPotential < 0.1) - { model->BSIM4V4SsidewallJctPotential = 0.1; + if (model->BSIM4v4SsidewallJctPotential < 0.1) + { model->BSIM4v4SsidewallJctPotential = 0.1; fprintf(stderr, "Given pbsws is less than 0.1. Pbsws is set to 0.1.\n"); } - if (model->BSIM4V4SGatesidewallJctPotential < 0.1) - { model->BSIM4V4SGatesidewallJctPotential = 0.1; + if (model->BSIM4v4SGatesidewallJctPotential < 0.1) + { model->BSIM4v4SGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgs is less than 0.1. Pbswgs is set to 0.1.\n"); } - if (model->BSIM4V4DbulkJctPotential < 0.1) - { model->BSIM4V4DbulkJctPotential = 0.1; + if (model->BSIM4v4DbulkJctPotential < 0.1) + { model->BSIM4v4DbulkJctPotential = 0.1; fprintf(stderr, "Given pbd is less than 0.1. Pbd is set to 0.1.\n"); } - if (model->BSIM4V4DsidewallJctPotential < 0.1) - { model->BSIM4V4DsidewallJctPotential = 0.1; + if (model->BSIM4v4DsidewallJctPotential < 0.1) + { model->BSIM4v4DsidewallJctPotential = 0.1; fprintf(stderr, "Given pbswd is less than 0.1. Pbswd is set to 0.1.\n"); } - if (model->BSIM4V4DGatesidewallJctPotential < 0.1) - { model->BSIM4V4DGatesidewallJctPotential = 0.1; + if (model->BSIM4v4DGatesidewallJctPotential < 0.1) + { model->BSIM4v4DGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgd is less than 0.1. Pbswgd is set to 0.1.\n"); } - if ((model->BSIM4V4toxeGiven) && (model->BSIM4V4toxpGiven) && (model->BSIM4V4dtoxGiven) - && (model->BSIM4V4toxe != (model->BSIM4V4toxp + model->BSIM4V4dtox))) + if ((model->BSIM4v4toxeGiven) && (model->BSIM4v4toxpGiven) && (model->BSIM4v4dtoxGiven) + && (model->BSIM4v4toxe != (model->BSIM4v4toxp + model->BSIM4v4dtox))) printf("Warning: toxe, toxp and dtox all given and toxe != toxp + dtox; dtox ignored.\n"); - else if ((model->BSIM4V4toxeGiven) && (!model->BSIM4V4toxpGiven)) - model->BSIM4V4toxp = model->BSIM4V4toxe - model->BSIM4V4dtox; - else if ((!model->BSIM4V4toxeGiven) && (model->BSIM4V4toxpGiven)) - model->BSIM4V4toxe = model->BSIM4V4toxp + model->BSIM4V4dtox; - - model->BSIM4V4coxe = model->BSIM4V4epsrox * EPS0 / model->BSIM4V4toxe; - model->BSIM4V4coxp = model->BSIM4V4epsrox * EPS0 / model->BSIM4V4toxp; - - if (!model->BSIM4V4cgdoGiven) - { if (model->BSIM4V4dlcGiven && (model->BSIM4V4dlc > 0.0)) - model->BSIM4V4cgdo = model->BSIM4V4dlc * model->BSIM4V4coxe - - model->BSIM4V4cgdl ; + else if ((model->BSIM4v4toxeGiven) && (!model->BSIM4v4toxpGiven)) + model->BSIM4v4toxp = model->BSIM4v4toxe - model->BSIM4v4dtox; + else if ((!model->BSIM4v4toxeGiven) && (model->BSIM4v4toxpGiven)) + model->BSIM4v4toxe = model->BSIM4v4toxp + model->BSIM4v4dtox; + + model->BSIM4v4coxe = model->BSIM4v4epsrox * EPS0 / model->BSIM4v4toxe; + model->BSIM4v4coxp = model->BSIM4v4epsrox * EPS0 / model->BSIM4v4toxp; + + if (!model->BSIM4v4cgdoGiven) + { if (model->BSIM4v4dlcGiven && (model->BSIM4v4dlc > 0.0)) + model->BSIM4v4cgdo = model->BSIM4v4dlc * model->BSIM4v4coxe + - model->BSIM4v4cgdl ; else - model->BSIM4V4cgdo = 0.6 * model->BSIM4V4xj * model->BSIM4V4coxe; + model->BSIM4v4cgdo = 0.6 * model->BSIM4v4xj * model->BSIM4v4coxe; } - if (!model->BSIM4V4cgsoGiven) - { if (model->BSIM4V4dlcGiven && (model->BSIM4V4dlc > 0.0)) - model->BSIM4V4cgso = model->BSIM4V4dlc * model->BSIM4V4coxe - - model->BSIM4V4cgsl ; + if (!model->BSIM4v4cgsoGiven) + { if (model->BSIM4v4dlcGiven && (model->BSIM4v4dlc > 0.0)) + model->BSIM4v4cgso = model->BSIM4v4dlc * model->BSIM4v4coxe + - model->BSIM4v4cgsl ; else - model->BSIM4V4cgso = 0.6 * model->BSIM4V4xj * model->BSIM4V4coxe; + model->BSIM4v4cgso = 0.6 * model->BSIM4v4xj * model->BSIM4v4coxe; } - if (!model->BSIM4V4cgboGiven) - model->BSIM4V4cgbo = 2.0 * model->BSIM4V4dwc * model->BSIM4V4coxe; + if (!model->BSIM4v4cgboGiven) + model->BSIM4v4cgbo = 2.0 * model->BSIM4v4dwc * model->BSIM4v4coxe; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; - Tnom = model->BSIM4V4tnom; + Tnom = model->BSIM4v4tnom; TRatio = Temp / Tnom; - model->BSIM4V4vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); - model->BSIM4V4factor1 = sqrt(EPSSI / (model->BSIM4V4epsrox * EPS0) - * model->BSIM4V4toxe); + model->BSIM4v4vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); + model->BSIM4v4factor1 = sqrt(EPSSI / (model->BSIM4v4epsrox * EPS0) + * model->BSIM4v4toxe); - Vtm0 = model->BSIM4V4vtm0 = KboQ * Tnom; + Vtm0 = model->BSIM4v4vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg0 / (2.0 * Vtm0)); - model->BSIM4V4vtm = KboQ * Temp; + model->BSIM4v4vtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); if (Temp != Tnom) - { T0 = Eg0 / Vtm0 - Eg / model->BSIM4V4vtm; + { T0 = Eg0 / Vtm0 - Eg / model->BSIM4v4vtm; T1 = log(Temp / Tnom); - T2 = T0 + model->BSIM4V4SjctTempExponent * T1; - T3 = exp(T2 / model->BSIM4V4SjctEmissionCoeff); - model->BSIM4V4SjctTempSatCurDensity = model->BSIM4V4SjctSatCurDensity + T2 = T0 + model->BSIM4v4SjctTempExponent * T1; + T3 = exp(T2 / model->BSIM4v4SjctEmissionCoeff); + model->BSIM4v4SjctTempSatCurDensity = model->BSIM4v4SjctSatCurDensity * T3; - model->BSIM4V4SjctSidewallTempSatCurDensity - = model->BSIM4V4SjctSidewallSatCurDensity * T3; - model->BSIM4V4SjctGateSidewallTempSatCurDensity - = model->BSIM4V4SjctGateSidewallSatCurDensity * T3; - - T2 = T0 + model->BSIM4V4DjctTempExponent * T1; - T3 = exp(T2 / model->BSIM4V4DjctEmissionCoeff); - model->BSIM4V4DjctTempSatCurDensity = model->BSIM4V4DjctSatCurDensity + model->BSIM4v4SjctSidewallTempSatCurDensity + = model->BSIM4v4SjctSidewallSatCurDensity * T3; + model->BSIM4v4SjctGateSidewallTempSatCurDensity + = model->BSIM4v4SjctGateSidewallSatCurDensity * T3; + + T2 = T0 + model->BSIM4v4DjctTempExponent * T1; + T3 = exp(T2 / model->BSIM4v4DjctEmissionCoeff); + model->BSIM4v4DjctTempSatCurDensity = model->BSIM4v4DjctSatCurDensity * T3; - model->BSIM4V4DjctSidewallTempSatCurDensity - = model->BSIM4V4DjctSidewallSatCurDensity * T3; - model->BSIM4V4DjctGateSidewallTempSatCurDensity - = model->BSIM4V4DjctGateSidewallSatCurDensity * T3; + model->BSIM4v4DjctSidewallTempSatCurDensity + = model->BSIM4v4DjctSidewallSatCurDensity * T3; + model->BSIM4v4DjctGateSidewallTempSatCurDensity + = model->BSIM4v4DjctGateSidewallSatCurDensity * T3; } else - { model->BSIM4V4SjctTempSatCurDensity = model->BSIM4V4SjctSatCurDensity; - model->BSIM4V4SjctSidewallTempSatCurDensity - = model->BSIM4V4SjctSidewallSatCurDensity; - model->BSIM4V4SjctGateSidewallTempSatCurDensity - = model->BSIM4V4SjctGateSidewallSatCurDensity; - model->BSIM4V4DjctTempSatCurDensity = model->BSIM4V4DjctSatCurDensity; - model->BSIM4V4DjctSidewallTempSatCurDensity - = model->BSIM4V4DjctSidewallSatCurDensity; - model->BSIM4V4DjctGateSidewallTempSatCurDensity - = model->BSIM4V4DjctGateSidewallSatCurDensity; + { model->BSIM4v4SjctTempSatCurDensity = model->BSIM4v4SjctSatCurDensity; + model->BSIM4v4SjctSidewallTempSatCurDensity + = model->BSIM4v4SjctSidewallSatCurDensity; + model->BSIM4v4SjctGateSidewallTempSatCurDensity + = model->BSIM4v4SjctGateSidewallSatCurDensity; + model->BSIM4v4DjctTempSatCurDensity = model->BSIM4v4DjctSatCurDensity; + model->BSIM4v4DjctSidewallTempSatCurDensity + = model->BSIM4v4DjctSidewallSatCurDensity; + model->BSIM4v4DjctGateSidewallTempSatCurDensity + = model->BSIM4v4DjctGateSidewallSatCurDensity; } - if (model->BSIM4V4SjctTempSatCurDensity < 0.0) - model->BSIM4V4SjctTempSatCurDensity = 0.0; - if (model->BSIM4V4SjctSidewallTempSatCurDensity < 0.0) - model->BSIM4V4SjctSidewallTempSatCurDensity = 0.0; - if (model->BSIM4V4SjctGateSidewallTempSatCurDensity < 0.0) - model->BSIM4V4SjctGateSidewallTempSatCurDensity = 0.0; - if (model->BSIM4V4DjctTempSatCurDensity < 0.0) - model->BSIM4V4DjctTempSatCurDensity = 0.0; - if (model->BSIM4V4DjctSidewallTempSatCurDensity < 0.0) - model->BSIM4V4DjctSidewallTempSatCurDensity = 0.0; - if (model->BSIM4V4DjctGateSidewallTempSatCurDensity < 0.0) - model->BSIM4V4DjctGateSidewallTempSatCurDensity = 0.0; + if (model->BSIM4v4SjctTempSatCurDensity < 0.0) + model->BSIM4v4SjctTempSatCurDensity = 0.0; + if (model->BSIM4v4SjctSidewallTempSatCurDensity < 0.0) + model->BSIM4v4SjctSidewallTempSatCurDensity = 0.0; + if (model->BSIM4v4SjctGateSidewallTempSatCurDensity < 0.0) + model->BSIM4v4SjctGateSidewallTempSatCurDensity = 0.0; + if (model->BSIM4v4DjctTempSatCurDensity < 0.0) + model->BSIM4v4DjctTempSatCurDensity = 0.0; + if (model->BSIM4v4DjctSidewallTempSatCurDensity < 0.0) + model->BSIM4v4DjctSidewallTempSatCurDensity = 0.0; + if (model->BSIM4v4DjctGateSidewallTempSatCurDensity < 0.0) + model->BSIM4v4DjctGateSidewallTempSatCurDensity = 0.0; /* Temperature dependence of D/B and S/B diode capacitance begins */ - delTemp = ckt->CKTtemp - model->BSIM4V4tnom; - T0 = model->BSIM4V4tcj * delTemp; + delTemp = ckt->CKTtemp - model->BSIM4v4tnom; + T0 = model->BSIM4v4tcj * delTemp; if (T0 >= -1.0) - { model->BSIM4V4SunitAreaTempJctCap = model->BSIM4V4SunitAreaJctCap *(1.0 + T0); /*bug_fix -JX */ - model->BSIM4V4DunitAreaTempJctCap = model->BSIM4V4DunitAreaJctCap *(1.0 + T0); + { model->BSIM4v4SunitAreaTempJctCap = model->BSIM4v4SunitAreaJctCap *(1.0 + T0); /*bug_fix -JX */ + model->BSIM4v4DunitAreaTempJctCap = model->BSIM4v4DunitAreaJctCap *(1.0 + T0); } else - { if (model->BSIM4V4SunitAreaJctCap > 0.0) - { model->BSIM4V4SunitAreaTempJctCap = 0.0; + { if (model->BSIM4v4SunitAreaJctCap > 0.0) + { model->BSIM4v4SunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjs to be negative. Cjs is clamped to zero.\n"); } - if (model->BSIM4V4DunitAreaJctCap > 0.0) - { model->BSIM4V4DunitAreaTempJctCap = 0.0; + if (model->BSIM4v4DunitAreaJctCap > 0.0) + { model->BSIM4v4DunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjd to be negative. Cjd is clamped to zero.\n"); } } - T0 = model->BSIM4V4tcjsw * delTemp; + T0 = model->BSIM4v4tcjsw * delTemp; if (T0 >= -1.0) - { model->BSIM4V4SunitLengthSidewallTempJctCap = model->BSIM4V4SunitLengthSidewallJctCap *(1.0 + T0); - model->BSIM4V4DunitLengthSidewallTempJctCap = model->BSIM4V4DunitLengthSidewallJctCap *(1.0 + T0); + { model->BSIM4v4SunitLengthSidewallTempJctCap = model->BSIM4v4SunitLengthSidewallJctCap *(1.0 + T0); + model->BSIM4v4DunitLengthSidewallTempJctCap = model->BSIM4v4DunitLengthSidewallJctCap *(1.0 + T0); } else - { if (model->BSIM4V4SunitLengthSidewallJctCap > 0.0) - { model->BSIM4V4SunitLengthSidewallTempJctCap = 0.0; + { if (model->BSIM4v4SunitLengthSidewallJctCap > 0.0) + { model->BSIM4v4SunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjsws to be negative. Cjsws is clamped to zero.\n"); } - if (model->BSIM4V4DunitLengthSidewallJctCap > 0.0) - { model->BSIM4V4DunitLengthSidewallTempJctCap = 0.0; + if (model->BSIM4v4DunitLengthSidewallJctCap > 0.0) + { model->BSIM4v4DunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswd to be negative. Cjswd is clamped to zero.\n"); } } - T0 = model->BSIM4V4tcjswg * delTemp; + T0 = model->BSIM4v4tcjswg * delTemp; if (T0 >= -1.0) - { model->BSIM4V4SunitLengthGateSidewallTempJctCap = model->BSIM4V4SunitLengthGateSidewallJctCap *(1.0 + T0); - model->BSIM4V4DunitLengthGateSidewallTempJctCap = model->BSIM4V4DunitLengthGateSidewallJctCap *(1.0 + T0); + { model->BSIM4v4SunitLengthGateSidewallTempJctCap = model->BSIM4v4SunitLengthGateSidewallJctCap *(1.0 + T0); + model->BSIM4v4DunitLengthGateSidewallTempJctCap = model->BSIM4v4DunitLengthGateSidewallJctCap *(1.0 + T0); } else - { if (model->BSIM4V4SunitLengthGateSidewallJctCap > 0.0) - { model->BSIM4V4SunitLengthGateSidewallTempJctCap = 0.0; + { if (model->BSIM4v4SunitLengthGateSidewallJctCap > 0.0) + { model->BSIM4v4SunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgs to be negative. Cjswgs is clamped to zero.\n"); } - if (model->BSIM4V4DunitLengthGateSidewallJctCap > 0.0) - { model->BSIM4V4DunitLengthGateSidewallTempJctCap = 0.0; + if (model->BSIM4v4DunitLengthGateSidewallJctCap > 0.0) + { model->BSIM4v4DunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgd to be negative. Cjswgd is clamped to zero.\n"); } } - model->BSIM4V4PhiBS = model->BSIM4V4SbulkJctPotential - - model->BSIM4V4tpb * delTemp; - if (model->BSIM4V4PhiBS < 0.01) - { model->BSIM4V4PhiBS = 0.01; + model->BSIM4v4PhiBS = model->BSIM4v4SbulkJctPotential + - model->BSIM4v4tpb * delTemp; + if (model->BSIM4v4PhiBS < 0.01) + { model->BSIM4v4PhiBS = 0.01; fprintf(stderr, "Temperature effect has caused pbs to be less than 0.01. Pbs is clamped to 0.01.\n"); } - model->BSIM4V4PhiBD = model->BSIM4V4DbulkJctPotential - - model->BSIM4V4tpb * delTemp; - if (model->BSIM4V4PhiBD < 0.01) - { model->BSIM4V4PhiBD = 0.01; + model->BSIM4v4PhiBD = model->BSIM4v4DbulkJctPotential + - model->BSIM4v4tpb * delTemp; + if (model->BSIM4v4PhiBD < 0.01) + { model->BSIM4v4PhiBD = 0.01; fprintf(stderr, "Temperature effect has caused pbd to be less than 0.01. Pbd is clamped to 0.01.\n"); } - model->BSIM4V4PhiBSWS = model->BSIM4V4SsidewallJctPotential - - model->BSIM4V4tpbsw * delTemp; - if (model->BSIM4V4PhiBSWS <= 0.01) - { model->BSIM4V4PhiBSWS = 0.01; + model->BSIM4v4PhiBSWS = model->BSIM4v4SsidewallJctPotential + - model->BSIM4v4tpbsw * delTemp; + if (model->BSIM4v4PhiBSWS <= 0.01) + { model->BSIM4v4PhiBSWS = 0.01; fprintf(stderr, "Temperature effect has caused pbsws to be less than 0.01. Pbsws is clamped to 0.01.\n"); } - model->BSIM4V4PhiBSWD = model->BSIM4V4DsidewallJctPotential - - model->BSIM4V4tpbsw * delTemp; - if (model->BSIM4V4PhiBSWD <= 0.01) - { model->BSIM4V4PhiBSWD = 0.01; + model->BSIM4v4PhiBSWD = model->BSIM4v4DsidewallJctPotential + - model->BSIM4v4tpbsw * delTemp; + if (model->BSIM4v4PhiBSWD <= 0.01) + { model->BSIM4v4PhiBSWD = 0.01; fprintf(stderr, "Temperature effect has caused pbswd to be less than 0.01. Pbswd is clamped to 0.01.\n"); } - model->BSIM4V4PhiBSWGS = model->BSIM4V4SGatesidewallJctPotential - - model->BSIM4V4tpbswg * delTemp; - if (model->BSIM4V4PhiBSWGS <= 0.01) - { model->BSIM4V4PhiBSWGS = 0.01; + model->BSIM4v4PhiBSWGS = model->BSIM4v4SGatesidewallJctPotential + - model->BSIM4v4tpbswg * delTemp; + if (model->BSIM4v4PhiBSWGS <= 0.01) + { model->BSIM4v4PhiBSWGS = 0.01; fprintf(stderr, "Temperature effect has caused pbswgs to be less than 0.01. Pbswgs is clamped to 0.01.\n"); } - model->BSIM4V4PhiBSWGD = model->BSIM4V4DGatesidewallJctPotential - - model->BSIM4V4tpbswg * delTemp; - if (model->BSIM4V4PhiBSWGD <= 0.01) - { model->BSIM4V4PhiBSWGD = 0.01; + model->BSIM4v4PhiBSWGD = model->BSIM4v4DGatesidewallJctPotential + - model->BSIM4v4tpbswg * delTemp; + if (model->BSIM4v4PhiBSWGD <= 0.01) + { model->BSIM4v4PhiBSWGD = 0.01; fprintf(stderr, "Temperature effect has caused pbswgd to be less than 0.01. Pbswgd is clamped to 0.01.\n"); } /* End of junction capacitance */ - if (model->BSIM4V4ijthdfwd <= 0.0) - { model->BSIM4V4ijthdfwd = 0.1; - fprintf(stderr, "Ijthdfwd reset to %g.\n", model->BSIM4V4ijthdfwd); + if (model->BSIM4v4ijthdfwd <= 0.0) + { model->BSIM4v4ijthdfwd = 0.1; + fprintf(stderr, "Ijthdfwd reset to %g.\n", model->BSIM4v4ijthdfwd); } - if (model->BSIM4V4ijthsfwd <= 0.0) - { model->BSIM4V4ijthsfwd = 0.1; - fprintf(stderr, "Ijthsfwd reset to %g.\n", model->BSIM4V4ijthsfwd); + if (model->BSIM4v4ijthsfwd <= 0.0) + { model->BSIM4v4ijthsfwd = 0.1; + fprintf(stderr, "Ijthsfwd reset to %g.\n", model->BSIM4v4ijthsfwd); } - if (model->BSIM4V4ijthdrev <= 0.0) - { model->BSIM4V4ijthdrev = 0.1; - fprintf(stderr, "Ijthdrev reset to %g.\n", model->BSIM4V4ijthdrev); + if (model->BSIM4v4ijthdrev <= 0.0) + { model->BSIM4v4ijthdrev = 0.1; + fprintf(stderr, "Ijthdrev reset to %g.\n", model->BSIM4v4ijthdrev); } - if (model->BSIM4V4ijthsrev <= 0.0) - { model->BSIM4V4ijthsrev = 0.1; - fprintf(stderr, "Ijthsrev reset to %g.\n", model->BSIM4V4ijthsrev); + if (model->BSIM4v4ijthsrev <= 0.0) + { model->BSIM4v4ijthsrev = 0.1; + fprintf(stderr, "Ijthsrev reset to %g.\n", model->BSIM4v4ijthsrev); } - if ((model->BSIM4V4xjbvd <= 0.0) && (model->BSIM4V4dioMod == 2)) - { model->BSIM4V4xjbvd = 1.0; - fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4V4xjbvd); + if ((model->BSIM4v4xjbvd <= 0.0) && (model->BSIM4v4dioMod == 2)) + { model->BSIM4v4xjbvd = 1.0; + fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4v4xjbvd); } - else if ((model->BSIM4V4xjbvd < 0.0) && (model->BSIM4V4dioMod == 0)) - { model->BSIM4V4xjbvd = 1.0; - fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4V4xjbvd); + else if ((model->BSIM4v4xjbvd < 0.0) && (model->BSIM4v4dioMod == 0)) + { model->BSIM4v4xjbvd = 1.0; + fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4v4xjbvd); } - if (model->BSIM4V4bvd <= 0.0) - { model->BSIM4V4bvd = 10.0; - fprintf(stderr, "BVD reset to %g.\n", model->BSIM4V4bvd); + if (model->BSIM4v4bvd <= 0.0) + { model->BSIM4v4bvd = 10.0; + fprintf(stderr, "BVD reset to %g.\n", model->BSIM4v4bvd); } - if ((model->BSIM4V4xjbvs <= 0.0) && (model->BSIM4V4dioMod == 2)) - { model->BSIM4V4xjbvs = 1.0; - fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4V4xjbvs); + if ((model->BSIM4v4xjbvs <= 0.0) && (model->BSIM4v4dioMod == 2)) + { model->BSIM4v4xjbvs = 1.0; + fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4v4xjbvs); } - else if ((model->BSIM4V4xjbvs < 0.0) && (model->BSIM4V4dioMod == 0)) - { model->BSIM4V4xjbvs = 1.0; - fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4V4xjbvs); + else if ((model->BSIM4v4xjbvs < 0.0) && (model->BSIM4v4dioMod == 0)) + { model->BSIM4v4xjbvs = 1.0; + fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4v4xjbvs); } - if (model->BSIM4V4bvs <= 0.0) - { model->BSIM4V4bvs = 10.0; - fprintf(stderr, "BVS reset to %g.\n", model->BSIM4V4bvs); + if (model->BSIM4v4bvs <= 0.0) + { model->BSIM4v4bvs = 10.0; + fprintf(stderr, "BVS reset to %g.\n", model->BSIM4v4bvs); } /* loop through all the instances of the model */ - for (here = model->BSIM4V4instances; here != NULL; - here = here->BSIM4V4nextInstance) - { if (here->BSIM4V4owner != ARCHme) continue; + for (here = model->BSIM4v4instances; here != NULL; + here = here->BSIM4v4nextInstance) + { if (here->BSIM4v4owner != ARCHme) continue; pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) - { if ((here->BSIM4V4l == pSizeDependParamKnot->Length) - && (here->BSIM4V4w == pSizeDependParamKnot->Width) - && (here->BSIM4V4nf == pSizeDependParamKnot->NFinger)) + { if ((here->BSIM4v4l == pSizeDependParamKnot->Length) + && (here->BSIM4v4w == pSizeDependParamKnot->Width) + && (here->BSIM4v4nf == pSizeDependParamKnot->NFinger)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /*bug-fix */ @@ -358,7 +358,7 @@ int Size_Not_Found, i; } /* stress effect */ - Ldrn = here->BSIM4V4l; + Ldrn = here->BSIM4v4l; if (Size_Not_Found) { pParam = (struct bsim4SizeDependParam *)malloc( @@ -370,649 +370,649 @@ int Size_Not_Found, i; pParam->pNext = NULL; here->pParam = pParam; - pParam->Length = here->BSIM4V4l; - pParam->Width = here->BSIM4V4w; - pParam->NFinger = here->BSIM4V4nf; - Lnew = here->BSIM4V4l + model->BSIM4V4xl ; - Wnew = here->BSIM4V4w / here->BSIM4V4nf + model->BSIM4V4xw; - - T0 = pow(Lnew, model->BSIM4V4Lln); - T1 = pow(Wnew, model->BSIM4V4Lwn); - tmp1 = model->BSIM4V4Ll / T0 + model->BSIM4V4Lw / T1 - + model->BSIM4V4Lwl / (T0 * T1); - pParam->BSIM4V4dl = model->BSIM4V4Lint + tmp1; - tmp2 = model->BSIM4V4Llc / T0 + model->BSIM4V4Lwc / T1 - + model->BSIM4V4Lwlc / (T0 * T1); - pParam->BSIM4V4dlc = model->BSIM4V4dlc + tmp2; - pParam->BSIM4V4dlcig = model->BSIM4V4dlcig; - - T2 = pow(Lnew, model->BSIM4V4Wln); - T3 = pow(Wnew, model->BSIM4V4Wwn); - tmp1 = model->BSIM4V4Wl / T2 + model->BSIM4V4Ww / T3 - + model->BSIM4V4Wwl / (T2 * T3); - pParam->BSIM4V4dw = model->BSIM4V4Wint + tmp1; - tmp2 = model->BSIM4V4Wlc / T2 + model->BSIM4V4Wwc / T3 - + model->BSIM4V4Wwlc / (T2 * T3); - pParam->BSIM4V4dwc = model->BSIM4V4dwc + tmp2; - pParam->BSIM4V4dwj = model->BSIM4V4dwj + tmp2; - - pParam->BSIM4V4leff = Lnew - 2.0 * pParam->BSIM4V4dl; - if (pParam->BSIM4V4leff <= 0.0) + pParam->Length = here->BSIM4v4l; + pParam->Width = here->BSIM4v4w; + pParam->NFinger = here->BSIM4v4nf; + Lnew = here->BSIM4v4l + model->BSIM4v4xl ; + Wnew = here->BSIM4v4w / here->BSIM4v4nf + model->BSIM4v4xw; + + T0 = pow(Lnew, model->BSIM4v4Lln); + T1 = pow(Wnew, model->BSIM4v4Lwn); + tmp1 = model->BSIM4v4Ll / T0 + model->BSIM4v4Lw / T1 + + model->BSIM4v4Lwl / (T0 * T1); + pParam->BSIM4v4dl = model->BSIM4v4Lint + tmp1; + tmp2 = model->BSIM4v4Llc / T0 + model->BSIM4v4Lwc / T1 + + model->BSIM4v4Lwlc / (T0 * T1); + pParam->BSIM4v4dlc = model->BSIM4v4dlc + tmp2; + pParam->BSIM4v4dlcig = model->BSIM4v4dlcig; + + T2 = pow(Lnew, model->BSIM4v4Wln); + T3 = pow(Wnew, model->BSIM4v4Wwn); + tmp1 = model->BSIM4v4Wl / T2 + model->BSIM4v4Ww / T3 + + model->BSIM4v4Wwl / (T2 * T3); + pParam->BSIM4v4dw = model->BSIM4v4Wint + tmp1; + tmp2 = model->BSIM4v4Wlc / T2 + model->BSIM4v4Wwc / T3 + + model->BSIM4v4Wwlc / (T2 * T3); + pParam->BSIM4v4dwc = model->BSIM4v4dwc + tmp2; + pParam->BSIM4v4dwj = model->BSIM4v4dwj + tmp2; + + pParam->BSIM4v4leff = Lnew - 2.0 * pParam->BSIM4v4dl; + if (pParam->BSIM4v4leff <= 0.0) { IFuid namarray[2]; - namarray[0] = model->BSIM4V4modName; - namarray[1] = here->BSIM4V4name; + namarray[0] = model->BSIM4v4modName; + namarray[1] = here->BSIM4v4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, - "BSIM4V4: mosfet %s, model %s: Effective channel length <= 0", + "BSIM4v4: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } - pParam->BSIM4V4weff = Wnew - 2.0 * pParam->BSIM4V4dw; - if (pParam->BSIM4V4weff <= 0.0) + pParam->BSIM4v4weff = Wnew - 2.0 * pParam->BSIM4v4dw; + if (pParam->BSIM4v4weff <= 0.0) { IFuid namarray[2]; - namarray[0] = model->BSIM4V4modName; - namarray[1] = here->BSIM4V4name; + namarray[0] = model->BSIM4v4modName; + namarray[1] = here->BSIM4v4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, - "BSIM4V4: mosfet %s, model %s: Effective channel width <= 0", + "BSIM4v4: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } - pParam->BSIM4V4leffCV = Lnew - 2.0 * pParam->BSIM4V4dlc; - if (pParam->BSIM4V4leffCV <= 0.0) + pParam->BSIM4v4leffCV = Lnew - 2.0 * pParam->BSIM4v4dlc; + if (pParam->BSIM4v4leffCV <= 0.0) { IFuid namarray[2]; - namarray[0] = model->BSIM4V4modName; - namarray[1] = here->BSIM4V4name; + namarray[0] = model->BSIM4v4modName; + namarray[1] = here->BSIM4v4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, - "BSIM4V4: mosfet %s, model %s: Effective channel length for C-V <= 0", + "BSIM4v4: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); - fprintf(stderr,"BSIM4V4: mosfet %s, model %s: Effective channel length for C-V <= 0 (Lnew - 2.0*BSIM4V4dlc == %g - 2.0*%g)\n", - model->BSIM4V4modName, here->BSIM4V4name, Lnew, pParam->BSIM4V4dlc ); + fprintf(stderr,"BSIM4v4: mosfet %s, model %s: Effective channel length for C-V <= 0 (Lnew - 2.0*BSIM4v4dlc == %g - 2.0*%g)\n", + model->BSIM4v4modName, here->BSIM4v4name, Lnew, pParam->BSIM4v4dlc ); return(E_BADPARM); } - pParam->BSIM4V4weffCV = Wnew - 2.0 * pParam->BSIM4V4dwc; - if (pParam->BSIM4V4weffCV <= 0.0) + pParam->BSIM4v4weffCV = Wnew - 2.0 * pParam->BSIM4v4dwc; + if (pParam->BSIM4v4weffCV <= 0.0) { IFuid namarray[2]; - namarray[0] = model->BSIM4V4modName; - namarray[1] = here->BSIM4V4name; + namarray[0] = model->BSIM4v4modName; + namarray[1] = here->BSIM4v4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, - "BSIM4V4: mosfet %s, model %s: Effective channel width for C-V <= 0", + "BSIM4v4: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } - pParam->BSIM4V4weffCJ = Wnew - 2.0 * pParam->BSIM4V4dwj; - if (pParam->BSIM4V4weffCJ <= 0.0) + pParam->BSIM4v4weffCJ = Wnew - 2.0 * pParam->BSIM4v4dwj; + if (pParam->BSIM4v4weffCJ <= 0.0) { IFuid namarray[2]; - namarray[0] = model->BSIM4V4modName; - namarray[1] = here->BSIM4V4name; + namarray[0] = model->BSIM4v4modName; + namarray[1] = here->BSIM4v4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, - "BSIM4V4: mosfet %s, model %s: Effective channel width for S/D junctions <= 0", + "BSIM4v4: mosfet %s, model %s: Effective channel width for S/D junctions <= 0", namarray); return(E_BADPARM); } - if (model->BSIM4V4binUnit == 1) - { Inv_L = 1.0e-6 / pParam->BSIM4V4leff; - Inv_W = 1.0e-6 / pParam->BSIM4V4weff; - Inv_LW = 1.0e-12 / (pParam->BSIM4V4leff - * pParam->BSIM4V4weff); + if (model->BSIM4v4binUnit == 1) + { Inv_L = 1.0e-6 / pParam->BSIM4v4leff; + Inv_W = 1.0e-6 / pParam->BSIM4v4weff; + Inv_LW = 1.0e-12 / (pParam->BSIM4v4leff + * pParam->BSIM4v4weff); } else - { Inv_L = 1.0 / pParam->BSIM4V4leff; - Inv_W = 1.0 / pParam->BSIM4V4weff; - Inv_LW = 1.0 / (pParam->BSIM4V4leff - * pParam->BSIM4V4weff); + { Inv_L = 1.0 / pParam->BSIM4v4leff; + Inv_W = 1.0 / pParam->BSIM4v4weff; + Inv_LW = 1.0 / (pParam->BSIM4v4leff + * pParam->BSIM4v4weff); } - pParam->BSIM4V4cdsc = model->BSIM4V4cdsc - + model->BSIM4V4lcdsc * Inv_L - + model->BSIM4V4wcdsc * Inv_W - + model->BSIM4V4pcdsc * Inv_LW; - pParam->BSIM4V4cdscb = model->BSIM4V4cdscb - + model->BSIM4V4lcdscb * Inv_L - + model->BSIM4V4wcdscb * Inv_W - + model->BSIM4V4pcdscb * Inv_LW; + pParam->BSIM4v4cdsc = model->BSIM4v4cdsc + + model->BSIM4v4lcdsc * Inv_L + + model->BSIM4v4wcdsc * Inv_W + + model->BSIM4v4pcdsc * Inv_LW; + pParam->BSIM4v4cdscb = model->BSIM4v4cdscb + + model->BSIM4v4lcdscb * Inv_L + + model->BSIM4v4wcdscb * Inv_W + + model->BSIM4v4pcdscb * Inv_LW; - pParam->BSIM4V4cdscd = model->BSIM4V4cdscd - + model->BSIM4V4lcdscd * Inv_L - + model->BSIM4V4wcdscd * Inv_W - + model->BSIM4V4pcdscd * Inv_LW; + pParam->BSIM4v4cdscd = model->BSIM4v4cdscd + + model->BSIM4v4lcdscd * Inv_L + + model->BSIM4v4wcdscd * Inv_W + + model->BSIM4v4pcdscd * Inv_LW; - pParam->BSIM4V4cit = model->BSIM4V4cit - + model->BSIM4V4lcit * Inv_L - + model->BSIM4V4wcit * Inv_W - + model->BSIM4V4pcit * Inv_LW; - pParam->BSIM4V4nfactor = model->BSIM4V4nfactor - + model->BSIM4V4lnfactor * Inv_L - + model->BSIM4V4wnfactor * Inv_W - + model->BSIM4V4pnfactor * Inv_LW; - pParam->BSIM4V4xj = model->BSIM4V4xj - + model->BSIM4V4lxj * Inv_L - + model->BSIM4V4wxj * Inv_W - + model->BSIM4V4pxj * Inv_LW; - pParam->BSIM4V4vsat = model->BSIM4V4vsat - + model->BSIM4V4lvsat * Inv_L - + model->BSIM4V4wvsat * Inv_W - + model->BSIM4V4pvsat * Inv_LW; - pParam->BSIM4V4at = model->BSIM4V4at - + model->BSIM4V4lat * Inv_L - + model->BSIM4V4wat * Inv_W - + model->BSIM4V4pat * Inv_LW; - pParam->BSIM4V4a0 = model->BSIM4V4a0 - + model->BSIM4V4la0 * Inv_L - + model->BSIM4V4wa0 * Inv_W - + model->BSIM4V4pa0 * Inv_LW; + pParam->BSIM4v4cit = model->BSIM4v4cit + + model->BSIM4v4lcit * Inv_L + + model->BSIM4v4wcit * Inv_W + + model->BSIM4v4pcit * Inv_LW; + pParam->BSIM4v4nfactor = model->BSIM4v4nfactor + + model->BSIM4v4lnfactor * Inv_L + + model->BSIM4v4wnfactor * Inv_W + + model->BSIM4v4pnfactor * Inv_LW; + pParam->BSIM4v4xj = model->BSIM4v4xj + + model->BSIM4v4lxj * Inv_L + + model->BSIM4v4wxj * Inv_W + + model->BSIM4v4pxj * Inv_LW; + pParam->BSIM4v4vsat = model->BSIM4v4vsat + + model->BSIM4v4lvsat * Inv_L + + model->BSIM4v4wvsat * Inv_W + + model->BSIM4v4pvsat * Inv_LW; + pParam->BSIM4v4at = model->BSIM4v4at + + model->BSIM4v4lat * Inv_L + + model->BSIM4v4wat * Inv_W + + model->BSIM4v4pat * Inv_LW; + pParam->BSIM4v4a0 = model->BSIM4v4a0 + + model->BSIM4v4la0 * Inv_L + + model->BSIM4v4wa0 * Inv_W + + model->BSIM4v4pa0 * Inv_LW; - pParam->BSIM4V4ags = model->BSIM4V4ags - + model->BSIM4V4lags * Inv_L - + model->BSIM4V4wags * Inv_W - + model->BSIM4V4pags * Inv_LW; + pParam->BSIM4v4ags = model->BSIM4v4ags + + model->BSIM4v4lags * Inv_L + + model->BSIM4v4wags * Inv_W + + model->BSIM4v4pags * Inv_LW; - pParam->BSIM4V4a1 = model->BSIM4V4a1 - + model->BSIM4V4la1 * Inv_L - + model->BSIM4V4wa1 * Inv_W - + model->BSIM4V4pa1 * Inv_LW; - pParam->BSIM4V4a2 = model->BSIM4V4a2 - + model->BSIM4V4la2 * Inv_L - + model->BSIM4V4wa2 * Inv_W - + model->BSIM4V4pa2 * Inv_LW; - pParam->BSIM4V4keta = model->BSIM4V4keta - + model->BSIM4V4lketa * Inv_L - + model->BSIM4V4wketa * Inv_W - + model->BSIM4V4pketa * Inv_LW; - pParam->BSIM4V4nsub = model->BSIM4V4nsub - + model->BSIM4V4lnsub * Inv_L - + model->BSIM4V4wnsub * Inv_W - + model->BSIM4V4pnsub * Inv_LW; - pParam->BSIM4V4ndep = model->BSIM4V4ndep - + model->BSIM4V4lndep * Inv_L - + model->BSIM4V4wndep * Inv_W - + model->BSIM4V4pndep * Inv_LW; - pParam->BSIM4V4nsd = model->BSIM4V4nsd - + model->BSIM4V4lnsd * Inv_L - + model->BSIM4V4wnsd * Inv_W - + model->BSIM4V4pnsd * Inv_LW; - pParam->BSIM4V4phin = model->BSIM4V4phin - + model->BSIM4V4lphin * Inv_L - + model->BSIM4V4wphin * Inv_W - + model->BSIM4V4pphin * Inv_LW; - pParam->BSIM4V4ngate = model->BSIM4V4ngate - + model->BSIM4V4lngate * Inv_L - + model->BSIM4V4wngate * Inv_W - + model->BSIM4V4pngate * Inv_LW; - pParam->BSIM4V4gamma1 = model->BSIM4V4gamma1 - + model->BSIM4V4lgamma1 * Inv_L - + model->BSIM4V4wgamma1 * Inv_W - + model->BSIM4V4pgamma1 * Inv_LW; - pParam->BSIM4V4gamma2 = model->BSIM4V4gamma2 - + model->BSIM4V4lgamma2 * Inv_L - + model->BSIM4V4wgamma2 * Inv_W - + model->BSIM4V4pgamma2 * Inv_LW; - pParam->BSIM4V4vbx = model->BSIM4V4vbx - + model->BSIM4V4lvbx * Inv_L - + model->BSIM4V4wvbx * Inv_W - + model->BSIM4V4pvbx * Inv_LW; - pParam->BSIM4V4vbm = model->BSIM4V4vbm - + model->BSIM4V4lvbm * Inv_L - + model->BSIM4V4wvbm * Inv_W - + model->BSIM4V4pvbm * Inv_LW; - pParam->BSIM4V4xt = model->BSIM4V4xt - + model->BSIM4V4lxt * Inv_L - + model->BSIM4V4wxt * Inv_W - + model->BSIM4V4pxt * Inv_LW; - pParam->BSIM4V4vfb = model->BSIM4V4vfb - + model->BSIM4V4lvfb * Inv_L - + model->BSIM4V4wvfb * Inv_W - + model->BSIM4V4pvfb * Inv_LW; - pParam->BSIM4V4k1 = model->BSIM4V4k1 - + model->BSIM4V4lk1 * Inv_L - + model->BSIM4V4wk1 * Inv_W - + model->BSIM4V4pk1 * Inv_LW; - pParam->BSIM4V4kt1 = model->BSIM4V4kt1 - + model->BSIM4V4lkt1 * Inv_L - + model->BSIM4V4wkt1 * Inv_W - + model->BSIM4V4pkt1 * Inv_LW; - pParam->BSIM4V4kt1l = model->BSIM4V4kt1l - + model->BSIM4V4lkt1l * Inv_L - + model->BSIM4V4wkt1l * Inv_W - + model->BSIM4V4pkt1l * Inv_LW; - pParam->BSIM4V4k2 = model->BSIM4V4k2 - + model->BSIM4V4lk2 * Inv_L - + model->BSIM4V4wk2 * Inv_W - + model->BSIM4V4pk2 * Inv_LW; - pParam->BSIM4V4kt2 = model->BSIM4V4kt2 - + model->BSIM4V4lkt2 * Inv_L - + model->BSIM4V4wkt2 * Inv_W - + model->BSIM4V4pkt2 * Inv_LW; - pParam->BSIM4V4k3 = model->BSIM4V4k3 - + model->BSIM4V4lk3 * Inv_L - + model->BSIM4V4wk3 * Inv_W - + model->BSIM4V4pk3 * Inv_LW; - pParam->BSIM4V4k3b = model->BSIM4V4k3b - + model->BSIM4V4lk3b * Inv_L - + model->BSIM4V4wk3b * Inv_W - + model->BSIM4V4pk3b * Inv_LW; - pParam->BSIM4V4w0 = model->BSIM4V4w0 - + model->BSIM4V4lw0 * Inv_L - + model->BSIM4V4ww0 * Inv_W - + model->BSIM4V4pw0 * Inv_LW; - pParam->BSIM4V4lpe0 = model->BSIM4V4lpe0 - + model->BSIM4V4llpe0 * Inv_L - + model->BSIM4V4wlpe0 * Inv_W - + model->BSIM4V4plpe0 * Inv_LW; - pParam->BSIM4V4lpeb = model->BSIM4V4lpeb - + model->BSIM4V4llpeb * Inv_L - + model->BSIM4V4wlpeb * Inv_W - + model->BSIM4V4plpeb * Inv_LW; - pParam->BSIM4V4dvtp0 = model->BSIM4V4dvtp0 - + model->BSIM4V4ldvtp0 * Inv_L - + model->BSIM4V4wdvtp0 * Inv_W - + model->BSIM4V4pdvtp0 * Inv_LW; - pParam->BSIM4V4dvtp1 = model->BSIM4V4dvtp1 - + model->BSIM4V4ldvtp1 * Inv_L - + model->BSIM4V4wdvtp1 * Inv_W - + model->BSIM4V4pdvtp1 * Inv_LW; - pParam->BSIM4V4dvt0 = model->BSIM4V4dvt0 - + model->BSIM4V4ldvt0 * Inv_L - + model->BSIM4V4wdvt0 * Inv_W - + model->BSIM4V4pdvt0 * Inv_LW; - pParam->BSIM4V4dvt1 = model->BSIM4V4dvt1 - + model->BSIM4V4ldvt1 * Inv_L - + model->BSIM4V4wdvt1 * Inv_W - + model->BSIM4V4pdvt1 * Inv_LW; - pParam->BSIM4V4dvt2 = model->BSIM4V4dvt2 - + model->BSIM4V4ldvt2 * Inv_L - + model->BSIM4V4wdvt2 * Inv_W - + model->BSIM4V4pdvt2 * Inv_LW; - pParam->BSIM4V4dvt0w = model->BSIM4V4dvt0w - + model->BSIM4V4ldvt0w * Inv_L - + model->BSIM4V4wdvt0w * Inv_W - + model->BSIM4V4pdvt0w * Inv_LW; - pParam->BSIM4V4dvt1w = model->BSIM4V4dvt1w - + model->BSIM4V4ldvt1w * Inv_L - + model->BSIM4V4wdvt1w * Inv_W - + model->BSIM4V4pdvt1w * Inv_LW; - pParam->BSIM4V4dvt2w = model->BSIM4V4dvt2w - + model->BSIM4V4ldvt2w * Inv_L - + model->BSIM4V4wdvt2w * Inv_W - + model->BSIM4V4pdvt2w * Inv_LW; - pParam->BSIM4V4drout = model->BSIM4V4drout - + model->BSIM4V4ldrout * Inv_L - + model->BSIM4V4wdrout * Inv_W - + model->BSIM4V4pdrout * Inv_LW; - pParam->BSIM4V4dsub = model->BSIM4V4dsub - + model->BSIM4V4ldsub * Inv_L - + model->BSIM4V4wdsub * Inv_W - + model->BSIM4V4pdsub * Inv_LW; - pParam->BSIM4V4vth0 = model->BSIM4V4vth0 - + model->BSIM4V4lvth0 * Inv_L - + model->BSIM4V4wvth0 * Inv_W - + model->BSIM4V4pvth0 * Inv_LW; - pParam->BSIM4V4ua = model->BSIM4V4ua - + model->BSIM4V4lua * Inv_L - + model->BSIM4V4wua * Inv_W - + model->BSIM4V4pua * Inv_LW; - pParam->BSIM4V4ua1 = model->BSIM4V4ua1 - + model->BSIM4V4lua1 * Inv_L - + model->BSIM4V4wua1 * Inv_W - + model->BSIM4V4pua1 * Inv_LW; - pParam->BSIM4V4ub = model->BSIM4V4ub - + model->BSIM4V4lub * Inv_L - + model->BSIM4V4wub * Inv_W - + model->BSIM4V4pub * Inv_LW; - pParam->BSIM4V4ub1 = model->BSIM4V4ub1 - + model->BSIM4V4lub1 * Inv_L - + model->BSIM4V4wub1 * Inv_W - + model->BSIM4V4pub1 * Inv_LW; - pParam->BSIM4V4uc = model->BSIM4V4uc - + model->BSIM4V4luc * Inv_L - + model->BSIM4V4wuc * Inv_W - + model->BSIM4V4puc * Inv_LW; - pParam->BSIM4V4uc1 = model->BSIM4V4uc1 - + model->BSIM4V4luc1 * Inv_L - + model->BSIM4V4wuc1 * Inv_W - + model->BSIM4V4puc1 * Inv_LW; - pParam->BSIM4V4eu = model->BSIM4V4eu - + model->BSIM4V4leu * Inv_L - + model->BSIM4V4weu * Inv_W - + model->BSIM4V4peu * Inv_LW; - pParam->BSIM4V4u0 = model->BSIM4V4u0 - + model->BSIM4V4lu0 * Inv_L - + model->BSIM4V4wu0 * Inv_W - + model->BSIM4V4pu0 * Inv_LW; - pParam->BSIM4V4ute = model->BSIM4V4ute - + model->BSIM4V4lute * Inv_L - + model->BSIM4V4wute * Inv_W - + model->BSIM4V4pute * Inv_LW; - pParam->BSIM4V4voff = model->BSIM4V4voff - + model->BSIM4V4lvoff * Inv_L - + model->BSIM4V4wvoff * Inv_W - + model->BSIM4V4pvoff * Inv_LW; - pParam->BSIM4V4minv = model->BSIM4V4minv - + model->BSIM4V4lminv * Inv_L - + model->BSIM4V4wminv * Inv_W - + model->BSIM4V4pminv * Inv_LW; - pParam->BSIM4V4fprout = model->BSIM4V4fprout - + model->BSIM4V4lfprout * Inv_L - + model->BSIM4V4wfprout * Inv_W - + model->BSIM4V4pfprout * Inv_LW; - pParam->BSIM4V4pdits = model->BSIM4V4pdits - + model->BSIM4V4lpdits * Inv_L - + model->BSIM4V4wpdits * Inv_W - + model->BSIM4V4ppdits * Inv_LW; - pParam->BSIM4V4pditsd = model->BSIM4V4pditsd - + model->BSIM4V4lpditsd * Inv_L - + model->BSIM4V4wpditsd * Inv_W - + model->BSIM4V4ppditsd * Inv_LW; - pParam->BSIM4V4delta = model->BSIM4V4delta - + model->BSIM4V4ldelta * Inv_L - + model->BSIM4V4wdelta * Inv_W - + model->BSIM4V4pdelta * Inv_LW; - pParam->BSIM4V4rdsw = model->BSIM4V4rdsw - + model->BSIM4V4lrdsw * Inv_L - + model->BSIM4V4wrdsw * Inv_W - + model->BSIM4V4prdsw * Inv_LW; - pParam->BSIM4V4rdw = model->BSIM4V4rdw - + model->BSIM4V4lrdw * Inv_L - + model->BSIM4V4wrdw * Inv_W - + model->BSIM4V4prdw * Inv_LW; - pParam->BSIM4V4rsw = model->BSIM4V4rsw - + model->BSIM4V4lrsw * Inv_L - + model->BSIM4V4wrsw * Inv_W - + model->BSIM4V4prsw * Inv_LW; - pParam->BSIM4V4prwg = model->BSIM4V4prwg - + model->BSIM4V4lprwg * Inv_L - + model->BSIM4V4wprwg * Inv_W - + model->BSIM4V4pprwg * Inv_LW; - pParam->BSIM4V4prwb = model->BSIM4V4prwb - + model->BSIM4V4lprwb * Inv_L - + model->BSIM4V4wprwb * Inv_W - + model->BSIM4V4pprwb * Inv_LW; - pParam->BSIM4V4prt = model->BSIM4V4prt - + model->BSIM4V4lprt * Inv_L - + model->BSIM4V4wprt * Inv_W - + model->BSIM4V4pprt * Inv_LW; - pParam->BSIM4V4eta0 = model->BSIM4V4eta0 - + model->BSIM4V4leta0 * Inv_L - + model->BSIM4V4weta0 * Inv_W - + model->BSIM4V4peta0 * Inv_LW; - pParam->BSIM4V4etab = model->BSIM4V4etab - + model->BSIM4V4letab * Inv_L - + model->BSIM4V4wetab * Inv_W - + model->BSIM4V4petab * Inv_LW; - pParam->BSIM4V4pclm = model->BSIM4V4pclm - + model->BSIM4V4lpclm * Inv_L - + model->BSIM4V4wpclm * Inv_W - + model->BSIM4V4ppclm * Inv_LW; - pParam->BSIM4V4pdibl1 = model->BSIM4V4pdibl1 - + model->BSIM4V4lpdibl1 * Inv_L - + model->BSIM4V4wpdibl1 * Inv_W - + model->BSIM4V4ppdibl1 * Inv_LW; - pParam->BSIM4V4pdibl2 = model->BSIM4V4pdibl2 - + model->BSIM4V4lpdibl2 * Inv_L - + model->BSIM4V4wpdibl2 * Inv_W - + model->BSIM4V4ppdibl2 * Inv_LW; - pParam->BSIM4V4pdiblb = model->BSIM4V4pdiblb - + model->BSIM4V4lpdiblb * Inv_L - + model->BSIM4V4wpdiblb * Inv_W - + model->BSIM4V4ppdiblb * Inv_LW; - pParam->BSIM4V4pscbe1 = model->BSIM4V4pscbe1 - + model->BSIM4V4lpscbe1 * Inv_L - + model->BSIM4V4wpscbe1 * Inv_W - + model->BSIM4V4ppscbe1 * Inv_LW; - pParam->BSIM4V4pscbe2 = model->BSIM4V4pscbe2 - + model->BSIM4V4lpscbe2 * Inv_L - + model->BSIM4V4wpscbe2 * Inv_W - + model->BSIM4V4ppscbe2 * Inv_LW; - pParam->BSIM4V4pvag = model->BSIM4V4pvag - + model->BSIM4V4lpvag * Inv_L - + model->BSIM4V4wpvag * Inv_W - + model->BSIM4V4ppvag * Inv_LW; - pParam->BSIM4V4wr = model->BSIM4V4wr - + model->BSIM4V4lwr * Inv_L - + model->BSIM4V4wwr * Inv_W - + model->BSIM4V4pwr * Inv_LW; - pParam->BSIM4V4dwg = model->BSIM4V4dwg - + model->BSIM4V4ldwg * Inv_L - + model->BSIM4V4wdwg * Inv_W - + model->BSIM4V4pdwg * Inv_LW; - pParam->BSIM4V4dwb = model->BSIM4V4dwb - + model->BSIM4V4ldwb * Inv_L - + model->BSIM4V4wdwb * Inv_W - + model->BSIM4V4pdwb * Inv_LW; - pParam->BSIM4V4b0 = model->BSIM4V4b0 - + model->BSIM4V4lb0 * Inv_L - + model->BSIM4V4wb0 * Inv_W - + model->BSIM4V4pb0 * Inv_LW; - pParam->BSIM4V4b1 = model->BSIM4V4b1 - + model->BSIM4V4lb1 * Inv_L - + model->BSIM4V4wb1 * Inv_W - + model->BSIM4V4pb1 * Inv_LW; - pParam->BSIM4V4alpha0 = model->BSIM4V4alpha0 - + model->BSIM4V4lalpha0 * Inv_L - + model->BSIM4V4walpha0 * Inv_W - + model->BSIM4V4palpha0 * Inv_LW; - pParam->BSIM4V4alpha1 = model->BSIM4V4alpha1 - + model->BSIM4V4lalpha1 * Inv_L - + model->BSIM4V4walpha1 * Inv_W - + model->BSIM4V4palpha1 * Inv_LW; - pParam->BSIM4V4beta0 = model->BSIM4V4beta0 - + model->BSIM4V4lbeta0 * Inv_L - + model->BSIM4V4wbeta0 * Inv_W - + model->BSIM4V4pbeta0 * Inv_LW; - pParam->BSIM4V4agidl = model->BSIM4V4agidl - + model->BSIM4V4lagidl * Inv_L - + model->BSIM4V4wagidl * Inv_W - + model->BSIM4V4pagidl * Inv_LW; - pParam->BSIM4V4bgidl = model->BSIM4V4bgidl - + model->BSIM4V4lbgidl * Inv_L - + model->BSIM4V4wbgidl * Inv_W - + model->BSIM4V4pbgidl * Inv_LW; - pParam->BSIM4V4cgidl = model->BSIM4V4cgidl - + model->BSIM4V4lcgidl * Inv_L - + model->BSIM4V4wcgidl * Inv_W - + model->BSIM4V4pcgidl * Inv_LW; - pParam->BSIM4V4egidl = model->BSIM4V4egidl - + model->BSIM4V4legidl * Inv_L - + model->BSIM4V4wegidl * Inv_W - + model->BSIM4V4pegidl * Inv_LW; - pParam->BSIM4V4aigc = model->BSIM4V4aigc - + model->BSIM4V4laigc * Inv_L - + model->BSIM4V4waigc * Inv_W - + model->BSIM4V4paigc * Inv_LW; - pParam->BSIM4V4bigc = model->BSIM4V4bigc - + model->BSIM4V4lbigc * Inv_L - + model->BSIM4V4wbigc * Inv_W - + model->BSIM4V4pbigc * Inv_LW; - pParam->BSIM4V4cigc = model->BSIM4V4cigc - + model->BSIM4V4lcigc * Inv_L - + model->BSIM4V4wcigc * Inv_W - + model->BSIM4V4pcigc * Inv_LW; - pParam->BSIM4V4aigsd = model->BSIM4V4aigsd - + model->BSIM4V4laigsd * Inv_L - + model->BSIM4V4waigsd * Inv_W - + model->BSIM4V4paigsd * Inv_LW; - pParam->BSIM4V4bigsd = model->BSIM4V4bigsd - + model->BSIM4V4lbigsd * Inv_L - + model->BSIM4V4wbigsd * Inv_W - + model->BSIM4V4pbigsd * Inv_LW; - pParam->BSIM4V4cigsd = model->BSIM4V4cigsd - + model->BSIM4V4lcigsd * Inv_L - + model->BSIM4V4wcigsd * Inv_W - + model->BSIM4V4pcigsd * Inv_LW; - pParam->BSIM4V4aigbacc = model->BSIM4V4aigbacc - + model->BSIM4V4laigbacc * Inv_L - + model->BSIM4V4waigbacc * Inv_W - + model->BSIM4V4paigbacc * Inv_LW; - pParam->BSIM4V4bigbacc = model->BSIM4V4bigbacc - + model->BSIM4V4lbigbacc * Inv_L - + model->BSIM4V4wbigbacc * Inv_W - + model->BSIM4V4pbigbacc * Inv_LW; - pParam->BSIM4V4cigbacc = model->BSIM4V4cigbacc - + model->BSIM4V4lcigbacc * Inv_L - + model->BSIM4V4wcigbacc * Inv_W - + model->BSIM4V4pcigbacc * Inv_LW; - pParam->BSIM4V4aigbinv = model->BSIM4V4aigbinv - + model->BSIM4V4laigbinv * Inv_L - + model->BSIM4V4waigbinv * Inv_W - + model->BSIM4V4paigbinv * Inv_LW; - pParam->BSIM4V4bigbinv = model->BSIM4V4bigbinv - + model->BSIM4V4lbigbinv * Inv_L - + model->BSIM4V4wbigbinv * Inv_W - + model->BSIM4V4pbigbinv * Inv_LW; - pParam->BSIM4V4cigbinv = model->BSIM4V4cigbinv - + model->BSIM4V4lcigbinv * Inv_L - + model->BSIM4V4wcigbinv * Inv_W - + model->BSIM4V4pcigbinv * Inv_LW; - pParam->BSIM4V4nigc = model->BSIM4V4nigc - + model->BSIM4V4lnigc * Inv_L - + model->BSIM4V4wnigc * Inv_W - + model->BSIM4V4pnigc * Inv_LW; - pParam->BSIM4V4nigbacc = model->BSIM4V4nigbacc - + model->BSIM4V4lnigbacc * Inv_L - + model->BSIM4V4wnigbacc * Inv_W - + model->BSIM4V4pnigbacc * Inv_LW; - pParam->BSIM4V4nigbinv = model->BSIM4V4nigbinv - + model->BSIM4V4lnigbinv * Inv_L - + model->BSIM4V4wnigbinv * Inv_W - + model->BSIM4V4pnigbinv * Inv_LW; - pParam->BSIM4V4ntox = model->BSIM4V4ntox - + model->BSIM4V4lntox * Inv_L - + model->BSIM4V4wntox * Inv_W - + model->BSIM4V4pntox * Inv_LW; - pParam->BSIM4V4eigbinv = model->BSIM4V4eigbinv - + model->BSIM4V4leigbinv * Inv_L - + model->BSIM4V4weigbinv * Inv_W - + model->BSIM4V4peigbinv * Inv_LW; - pParam->BSIM4V4pigcd = model->BSIM4V4pigcd - + model->BSIM4V4lpigcd * Inv_L - + model->BSIM4V4wpigcd * Inv_W - + model->BSIM4V4ppigcd * Inv_LW; - pParam->BSIM4V4poxedge = model->BSIM4V4poxedge - + model->BSIM4V4lpoxedge * Inv_L - + model->BSIM4V4wpoxedge * Inv_W - + model->BSIM4V4ppoxedge * Inv_LW; - pParam->BSIM4V4xrcrg1 = model->BSIM4V4xrcrg1 - + model->BSIM4V4lxrcrg1 * Inv_L - + model->BSIM4V4wxrcrg1 * Inv_W - + model->BSIM4V4pxrcrg1 * Inv_LW; - pParam->BSIM4V4xrcrg2 = model->BSIM4V4xrcrg2 - + model->BSIM4V4lxrcrg2 * Inv_L - + model->BSIM4V4wxrcrg2 * Inv_W - + model->BSIM4V4pxrcrg2 * Inv_LW; - pParam->BSIM4V4lambda = model->BSIM4V4lambda - + model->BSIM4V4llambda * Inv_L - + model->BSIM4V4wlambda * Inv_W - + model->BSIM4V4plambda * Inv_LW; - pParam->BSIM4V4vtl = model->BSIM4V4vtl - + model->BSIM4V4lvtl * Inv_L - + model->BSIM4V4wvtl * Inv_W - + model->BSIM4V4pvtl * Inv_LW; - pParam->BSIM4V4xn = model->BSIM4V4xn - + model->BSIM4V4lxn * Inv_L - + model->BSIM4V4wxn * Inv_W - + model->BSIM4V4pxn * Inv_LW; - pParam->BSIM4V4vfbsdoff = model->BSIM4V4vfbsdoff - + model->BSIM4V4lvfbsdoff * Inv_L - + model->BSIM4V4wvfbsdoff * Inv_W - + model->BSIM4V4pvfbsdoff * Inv_LW; - - pParam->BSIM4V4cgsl = model->BSIM4V4cgsl - + model->BSIM4V4lcgsl * Inv_L - + model->BSIM4V4wcgsl * Inv_W - + model->BSIM4V4pcgsl * Inv_LW; - pParam->BSIM4V4cgdl = model->BSIM4V4cgdl - + model->BSIM4V4lcgdl * Inv_L - + model->BSIM4V4wcgdl * Inv_W - + model->BSIM4V4pcgdl * Inv_LW; - pParam->BSIM4V4ckappas = model->BSIM4V4ckappas - + model->BSIM4V4lckappas * Inv_L - + model->BSIM4V4wckappas * Inv_W - + model->BSIM4V4pckappas * Inv_LW; - pParam->BSIM4V4ckappad = model->BSIM4V4ckappad - + model->BSIM4V4lckappad * Inv_L - + model->BSIM4V4wckappad * Inv_W - + model->BSIM4V4pckappad * Inv_LW; - pParam->BSIM4V4cf = model->BSIM4V4cf - + model->BSIM4V4lcf * Inv_L - + model->BSIM4V4wcf * Inv_W - + model->BSIM4V4pcf * Inv_LW; - pParam->BSIM4V4clc = model->BSIM4V4clc - + model->BSIM4V4lclc * Inv_L - + model->BSIM4V4wclc * Inv_W - + model->BSIM4V4pclc * Inv_LW; - pParam->BSIM4V4cle = model->BSIM4V4cle - + model->BSIM4V4lcle * Inv_L - + model->BSIM4V4wcle * Inv_W - + model->BSIM4V4pcle * Inv_LW; - pParam->BSIM4V4vfbcv = model->BSIM4V4vfbcv - + model->BSIM4V4lvfbcv * Inv_L - + model->BSIM4V4wvfbcv * Inv_W - + model->BSIM4V4pvfbcv * Inv_LW; - pParam->BSIM4V4acde = model->BSIM4V4acde - + model->BSIM4V4lacde * Inv_L - + model->BSIM4V4wacde * Inv_W - + model->BSIM4V4pacde * Inv_LW; - pParam->BSIM4V4moin = model->BSIM4V4moin - + model->BSIM4V4lmoin * Inv_L - + model->BSIM4V4wmoin * Inv_W - + model->BSIM4V4pmoin * Inv_LW; - pParam->BSIM4V4noff = model->BSIM4V4noff - + model->BSIM4V4lnoff * Inv_L - + model->BSIM4V4wnoff * Inv_W - + model->BSIM4V4pnoff * Inv_LW; - pParam->BSIM4V4voffcv = model->BSIM4V4voffcv - + model->BSIM4V4lvoffcv * Inv_L - + model->BSIM4V4wvoffcv * Inv_W - + model->BSIM4V4pvoffcv * Inv_LW; - - pParam->BSIM4V4abulkCVfactor = 1.0 + pow((pParam->BSIM4V4clc - / pParam->BSIM4V4leffCV), - pParam->BSIM4V4cle); + pParam->BSIM4v4a1 = model->BSIM4v4a1 + + model->BSIM4v4la1 * Inv_L + + model->BSIM4v4wa1 * Inv_W + + model->BSIM4v4pa1 * Inv_LW; + pParam->BSIM4v4a2 = model->BSIM4v4a2 + + model->BSIM4v4la2 * Inv_L + + model->BSIM4v4wa2 * Inv_W + + model->BSIM4v4pa2 * Inv_LW; + pParam->BSIM4v4keta = model->BSIM4v4keta + + model->BSIM4v4lketa * Inv_L + + model->BSIM4v4wketa * Inv_W + + model->BSIM4v4pketa * Inv_LW; + pParam->BSIM4v4nsub = model->BSIM4v4nsub + + model->BSIM4v4lnsub * Inv_L + + model->BSIM4v4wnsub * Inv_W + + model->BSIM4v4pnsub * Inv_LW; + pParam->BSIM4v4ndep = model->BSIM4v4ndep + + model->BSIM4v4lndep * Inv_L + + model->BSIM4v4wndep * Inv_W + + model->BSIM4v4pndep * Inv_LW; + pParam->BSIM4v4nsd = model->BSIM4v4nsd + + model->BSIM4v4lnsd * Inv_L + + model->BSIM4v4wnsd * Inv_W + + model->BSIM4v4pnsd * Inv_LW; + pParam->BSIM4v4phin = model->BSIM4v4phin + + model->BSIM4v4lphin * Inv_L + + model->BSIM4v4wphin * Inv_W + + model->BSIM4v4pphin * Inv_LW; + pParam->BSIM4v4ngate = model->BSIM4v4ngate + + model->BSIM4v4lngate * Inv_L + + model->BSIM4v4wngate * Inv_W + + model->BSIM4v4pngate * Inv_LW; + pParam->BSIM4v4gamma1 = model->BSIM4v4gamma1 + + model->BSIM4v4lgamma1 * Inv_L + + model->BSIM4v4wgamma1 * Inv_W + + model->BSIM4v4pgamma1 * Inv_LW; + pParam->BSIM4v4gamma2 = model->BSIM4v4gamma2 + + model->BSIM4v4lgamma2 * Inv_L + + model->BSIM4v4wgamma2 * Inv_W + + model->BSIM4v4pgamma2 * Inv_LW; + pParam->BSIM4v4vbx = model->BSIM4v4vbx + + model->BSIM4v4lvbx * Inv_L + + model->BSIM4v4wvbx * Inv_W + + model->BSIM4v4pvbx * Inv_LW; + pParam->BSIM4v4vbm = model->BSIM4v4vbm + + model->BSIM4v4lvbm * Inv_L + + model->BSIM4v4wvbm * Inv_W + + model->BSIM4v4pvbm * Inv_LW; + pParam->BSIM4v4xt = model->BSIM4v4xt + + model->BSIM4v4lxt * Inv_L + + model->BSIM4v4wxt * Inv_W + + model->BSIM4v4pxt * Inv_LW; + pParam->BSIM4v4vfb = model->BSIM4v4vfb + + model->BSIM4v4lvfb * Inv_L + + model->BSIM4v4wvfb * Inv_W + + model->BSIM4v4pvfb * Inv_LW; + pParam->BSIM4v4k1 = model->BSIM4v4k1 + + model->BSIM4v4lk1 * Inv_L + + model->BSIM4v4wk1 * Inv_W + + model->BSIM4v4pk1 * Inv_LW; + pParam->BSIM4v4kt1 = model->BSIM4v4kt1 + + model->BSIM4v4lkt1 * Inv_L + + model->BSIM4v4wkt1 * Inv_W + + model->BSIM4v4pkt1 * Inv_LW; + pParam->BSIM4v4kt1l = model->BSIM4v4kt1l + + model->BSIM4v4lkt1l * Inv_L + + model->BSIM4v4wkt1l * Inv_W + + model->BSIM4v4pkt1l * Inv_LW; + pParam->BSIM4v4k2 = model->BSIM4v4k2 + + model->BSIM4v4lk2 * Inv_L + + model->BSIM4v4wk2 * Inv_W + + model->BSIM4v4pk2 * Inv_LW; + pParam->BSIM4v4kt2 = model->BSIM4v4kt2 + + model->BSIM4v4lkt2 * Inv_L + + model->BSIM4v4wkt2 * Inv_W + + model->BSIM4v4pkt2 * Inv_LW; + pParam->BSIM4v4k3 = model->BSIM4v4k3 + + model->BSIM4v4lk3 * Inv_L + + model->BSIM4v4wk3 * Inv_W + + model->BSIM4v4pk3 * Inv_LW; + pParam->BSIM4v4k3b = model->BSIM4v4k3b + + model->BSIM4v4lk3b * Inv_L + + model->BSIM4v4wk3b * Inv_W + + model->BSIM4v4pk3b * Inv_LW; + pParam->BSIM4v4w0 = model->BSIM4v4w0 + + model->BSIM4v4lw0 * Inv_L + + model->BSIM4v4ww0 * Inv_W + + model->BSIM4v4pw0 * Inv_LW; + pParam->BSIM4v4lpe0 = model->BSIM4v4lpe0 + + model->BSIM4v4llpe0 * Inv_L + + model->BSIM4v4wlpe0 * Inv_W + + model->BSIM4v4plpe0 * Inv_LW; + pParam->BSIM4v4lpeb = model->BSIM4v4lpeb + + model->BSIM4v4llpeb * Inv_L + + model->BSIM4v4wlpeb * Inv_W + + model->BSIM4v4plpeb * Inv_LW; + pParam->BSIM4v4dvtp0 = model->BSIM4v4dvtp0 + + model->BSIM4v4ldvtp0 * Inv_L + + model->BSIM4v4wdvtp0 * Inv_W + + model->BSIM4v4pdvtp0 * Inv_LW; + pParam->BSIM4v4dvtp1 = model->BSIM4v4dvtp1 + + model->BSIM4v4ldvtp1 * Inv_L + + model->BSIM4v4wdvtp1 * Inv_W + + model->BSIM4v4pdvtp1 * Inv_LW; + pParam->BSIM4v4dvt0 = model->BSIM4v4dvt0 + + model->BSIM4v4ldvt0 * Inv_L + + model->BSIM4v4wdvt0 * Inv_W + + model->BSIM4v4pdvt0 * Inv_LW; + pParam->BSIM4v4dvt1 = model->BSIM4v4dvt1 + + model->BSIM4v4ldvt1 * Inv_L + + model->BSIM4v4wdvt1 * Inv_W + + model->BSIM4v4pdvt1 * Inv_LW; + pParam->BSIM4v4dvt2 = model->BSIM4v4dvt2 + + model->BSIM4v4ldvt2 * Inv_L + + model->BSIM4v4wdvt2 * Inv_W + + model->BSIM4v4pdvt2 * Inv_LW; + pParam->BSIM4v4dvt0w = model->BSIM4v4dvt0w + + model->BSIM4v4ldvt0w * Inv_L + + model->BSIM4v4wdvt0w * Inv_W + + model->BSIM4v4pdvt0w * Inv_LW; + pParam->BSIM4v4dvt1w = model->BSIM4v4dvt1w + + model->BSIM4v4ldvt1w * Inv_L + + model->BSIM4v4wdvt1w * Inv_W + + model->BSIM4v4pdvt1w * Inv_LW; + pParam->BSIM4v4dvt2w = model->BSIM4v4dvt2w + + model->BSIM4v4ldvt2w * Inv_L + + model->BSIM4v4wdvt2w * Inv_W + + model->BSIM4v4pdvt2w * Inv_LW; + pParam->BSIM4v4drout = model->BSIM4v4drout + + model->BSIM4v4ldrout * Inv_L + + model->BSIM4v4wdrout * Inv_W + + model->BSIM4v4pdrout * Inv_LW; + pParam->BSIM4v4dsub = model->BSIM4v4dsub + + model->BSIM4v4ldsub * Inv_L + + model->BSIM4v4wdsub * Inv_W + + model->BSIM4v4pdsub * Inv_LW; + pParam->BSIM4v4vth0 = model->BSIM4v4vth0 + + model->BSIM4v4lvth0 * Inv_L + + model->BSIM4v4wvth0 * Inv_W + + model->BSIM4v4pvth0 * Inv_LW; + pParam->BSIM4v4ua = model->BSIM4v4ua + + model->BSIM4v4lua * Inv_L + + model->BSIM4v4wua * Inv_W + + model->BSIM4v4pua * Inv_LW; + pParam->BSIM4v4ua1 = model->BSIM4v4ua1 + + model->BSIM4v4lua1 * Inv_L + + model->BSIM4v4wua1 * Inv_W + + model->BSIM4v4pua1 * Inv_LW; + pParam->BSIM4v4ub = model->BSIM4v4ub + + model->BSIM4v4lub * Inv_L + + model->BSIM4v4wub * Inv_W + + model->BSIM4v4pub * Inv_LW; + pParam->BSIM4v4ub1 = model->BSIM4v4ub1 + + model->BSIM4v4lub1 * Inv_L + + model->BSIM4v4wub1 * Inv_W + + model->BSIM4v4pub1 * Inv_LW; + pParam->BSIM4v4uc = model->BSIM4v4uc + + model->BSIM4v4luc * Inv_L + + model->BSIM4v4wuc * Inv_W + + model->BSIM4v4puc * Inv_LW; + pParam->BSIM4v4uc1 = model->BSIM4v4uc1 + + model->BSIM4v4luc1 * Inv_L + + model->BSIM4v4wuc1 * Inv_W + + model->BSIM4v4puc1 * Inv_LW; + pParam->BSIM4v4eu = model->BSIM4v4eu + + model->BSIM4v4leu * Inv_L + + model->BSIM4v4weu * Inv_W + + model->BSIM4v4peu * Inv_LW; + pParam->BSIM4v4u0 = model->BSIM4v4u0 + + model->BSIM4v4lu0 * Inv_L + + model->BSIM4v4wu0 * Inv_W + + model->BSIM4v4pu0 * Inv_LW; + pParam->BSIM4v4ute = model->BSIM4v4ute + + model->BSIM4v4lute * Inv_L + + model->BSIM4v4wute * Inv_W + + model->BSIM4v4pute * Inv_LW; + pParam->BSIM4v4voff = model->BSIM4v4voff + + model->BSIM4v4lvoff * Inv_L + + model->BSIM4v4wvoff * Inv_W + + model->BSIM4v4pvoff * Inv_LW; + pParam->BSIM4v4minv = model->BSIM4v4minv + + model->BSIM4v4lminv * Inv_L + + model->BSIM4v4wminv * Inv_W + + model->BSIM4v4pminv * Inv_LW; + pParam->BSIM4v4fprout = model->BSIM4v4fprout + + model->BSIM4v4lfprout * Inv_L + + model->BSIM4v4wfprout * Inv_W + + model->BSIM4v4pfprout * Inv_LW; + pParam->BSIM4v4pdits = model->BSIM4v4pdits + + model->BSIM4v4lpdits * Inv_L + + model->BSIM4v4wpdits * Inv_W + + model->BSIM4v4ppdits * Inv_LW; + pParam->BSIM4v4pditsd = model->BSIM4v4pditsd + + model->BSIM4v4lpditsd * Inv_L + + model->BSIM4v4wpditsd * Inv_W + + model->BSIM4v4ppditsd * Inv_LW; + pParam->BSIM4v4delta = model->BSIM4v4delta + + model->BSIM4v4ldelta * Inv_L + + model->BSIM4v4wdelta * Inv_W + + model->BSIM4v4pdelta * Inv_LW; + pParam->BSIM4v4rdsw = model->BSIM4v4rdsw + + model->BSIM4v4lrdsw * Inv_L + + model->BSIM4v4wrdsw * Inv_W + + model->BSIM4v4prdsw * Inv_LW; + pParam->BSIM4v4rdw = model->BSIM4v4rdw + + model->BSIM4v4lrdw * Inv_L + + model->BSIM4v4wrdw * Inv_W + + model->BSIM4v4prdw * Inv_LW; + pParam->BSIM4v4rsw = model->BSIM4v4rsw + + model->BSIM4v4lrsw * Inv_L + + model->BSIM4v4wrsw * Inv_W + + model->BSIM4v4prsw * Inv_LW; + pParam->BSIM4v4prwg = model->BSIM4v4prwg + + model->BSIM4v4lprwg * Inv_L + + model->BSIM4v4wprwg * Inv_W + + model->BSIM4v4pprwg * Inv_LW; + pParam->BSIM4v4prwb = model->BSIM4v4prwb + + model->BSIM4v4lprwb * Inv_L + + model->BSIM4v4wprwb * Inv_W + + model->BSIM4v4pprwb * Inv_LW; + pParam->BSIM4v4prt = model->BSIM4v4prt + + model->BSIM4v4lprt * Inv_L + + model->BSIM4v4wprt * Inv_W + + model->BSIM4v4pprt * Inv_LW; + pParam->BSIM4v4eta0 = model->BSIM4v4eta0 + + model->BSIM4v4leta0 * Inv_L + + model->BSIM4v4weta0 * Inv_W + + model->BSIM4v4peta0 * Inv_LW; + pParam->BSIM4v4etab = model->BSIM4v4etab + + model->BSIM4v4letab * Inv_L + + model->BSIM4v4wetab * Inv_W + + model->BSIM4v4petab * Inv_LW; + pParam->BSIM4v4pclm = model->BSIM4v4pclm + + model->BSIM4v4lpclm * Inv_L + + model->BSIM4v4wpclm * Inv_W + + model->BSIM4v4ppclm * Inv_LW; + pParam->BSIM4v4pdibl1 = model->BSIM4v4pdibl1 + + model->BSIM4v4lpdibl1 * Inv_L + + model->BSIM4v4wpdibl1 * Inv_W + + model->BSIM4v4ppdibl1 * Inv_LW; + pParam->BSIM4v4pdibl2 = model->BSIM4v4pdibl2 + + model->BSIM4v4lpdibl2 * Inv_L + + model->BSIM4v4wpdibl2 * Inv_W + + model->BSIM4v4ppdibl2 * Inv_LW; + pParam->BSIM4v4pdiblb = model->BSIM4v4pdiblb + + model->BSIM4v4lpdiblb * Inv_L + + model->BSIM4v4wpdiblb * Inv_W + + model->BSIM4v4ppdiblb * Inv_LW; + pParam->BSIM4v4pscbe1 = model->BSIM4v4pscbe1 + + model->BSIM4v4lpscbe1 * Inv_L + + model->BSIM4v4wpscbe1 * Inv_W + + model->BSIM4v4ppscbe1 * Inv_LW; + pParam->BSIM4v4pscbe2 = model->BSIM4v4pscbe2 + + model->BSIM4v4lpscbe2 * Inv_L + + model->BSIM4v4wpscbe2 * Inv_W + + model->BSIM4v4ppscbe2 * Inv_LW; + pParam->BSIM4v4pvag = model->BSIM4v4pvag + + model->BSIM4v4lpvag * Inv_L + + model->BSIM4v4wpvag * Inv_W + + model->BSIM4v4ppvag * Inv_LW; + pParam->BSIM4v4wr = model->BSIM4v4wr + + model->BSIM4v4lwr * Inv_L + + model->BSIM4v4wwr * Inv_W + + model->BSIM4v4pwr * Inv_LW; + pParam->BSIM4v4dwg = model->BSIM4v4dwg + + model->BSIM4v4ldwg * Inv_L + + model->BSIM4v4wdwg * Inv_W + + model->BSIM4v4pdwg * Inv_LW; + pParam->BSIM4v4dwb = model->BSIM4v4dwb + + model->BSIM4v4ldwb * Inv_L + + model->BSIM4v4wdwb * Inv_W + + model->BSIM4v4pdwb * Inv_LW; + pParam->BSIM4v4b0 = model->BSIM4v4b0 + + model->BSIM4v4lb0 * Inv_L + + model->BSIM4v4wb0 * Inv_W + + model->BSIM4v4pb0 * Inv_LW; + pParam->BSIM4v4b1 = model->BSIM4v4b1 + + model->BSIM4v4lb1 * Inv_L + + model->BSIM4v4wb1 * Inv_W + + model->BSIM4v4pb1 * Inv_LW; + pParam->BSIM4v4alpha0 = model->BSIM4v4alpha0 + + model->BSIM4v4lalpha0 * Inv_L + + model->BSIM4v4walpha0 * Inv_W + + model->BSIM4v4palpha0 * Inv_LW; + pParam->BSIM4v4alpha1 = model->BSIM4v4alpha1 + + model->BSIM4v4lalpha1 * Inv_L + + model->BSIM4v4walpha1 * Inv_W + + model->BSIM4v4palpha1 * Inv_LW; + pParam->BSIM4v4beta0 = model->BSIM4v4beta0 + + model->BSIM4v4lbeta0 * Inv_L + + model->BSIM4v4wbeta0 * Inv_W + + model->BSIM4v4pbeta0 * Inv_LW; + pParam->BSIM4v4agidl = model->BSIM4v4agidl + + model->BSIM4v4lagidl * Inv_L + + model->BSIM4v4wagidl * Inv_W + + model->BSIM4v4pagidl * Inv_LW; + pParam->BSIM4v4bgidl = model->BSIM4v4bgidl + + model->BSIM4v4lbgidl * Inv_L + + model->BSIM4v4wbgidl * Inv_W + + model->BSIM4v4pbgidl * Inv_LW; + pParam->BSIM4v4cgidl = model->BSIM4v4cgidl + + model->BSIM4v4lcgidl * Inv_L + + model->BSIM4v4wcgidl * Inv_W + + model->BSIM4v4pcgidl * Inv_LW; + pParam->BSIM4v4egidl = model->BSIM4v4egidl + + model->BSIM4v4legidl * Inv_L + + model->BSIM4v4wegidl * Inv_W + + model->BSIM4v4pegidl * Inv_LW; + pParam->BSIM4v4aigc = model->BSIM4v4aigc + + model->BSIM4v4laigc * Inv_L + + model->BSIM4v4waigc * Inv_W + + model->BSIM4v4paigc * Inv_LW; + pParam->BSIM4v4bigc = model->BSIM4v4bigc + + model->BSIM4v4lbigc * Inv_L + + model->BSIM4v4wbigc * Inv_W + + model->BSIM4v4pbigc * Inv_LW; + pParam->BSIM4v4cigc = model->BSIM4v4cigc + + model->BSIM4v4lcigc * Inv_L + + model->BSIM4v4wcigc * Inv_W + + model->BSIM4v4pcigc * Inv_LW; + pParam->BSIM4v4aigsd = model->BSIM4v4aigsd + + model->BSIM4v4laigsd * Inv_L + + model->BSIM4v4waigsd * Inv_W + + model->BSIM4v4paigsd * Inv_LW; + pParam->BSIM4v4bigsd = model->BSIM4v4bigsd + + model->BSIM4v4lbigsd * Inv_L + + model->BSIM4v4wbigsd * Inv_W + + model->BSIM4v4pbigsd * Inv_LW; + pParam->BSIM4v4cigsd = model->BSIM4v4cigsd + + model->BSIM4v4lcigsd * Inv_L + + model->BSIM4v4wcigsd * Inv_W + + model->BSIM4v4pcigsd * Inv_LW; + pParam->BSIM4v4aigbacc = model->BSIM4v4aigbacc + + model->BSIM4v4laigbacc * Inv_L + + model->BSIM4v4waigbacc * Inv_W + + model->BSIM4v4paigbacc * Inv_LW; + pParam->BSIM4v4bigbacc = model->BSIM4v4bigbacc + + model->BSIM4v4lbigbacc * Inv_L + + model->BSIM4v4wbigbacc * Inv_W + + model->BSIM4v4pbigbacc * Inv_LW; + pParam->BSIM4v4cigbacc = model->BSIM4v4cigbacc + + model->BSIM4v4lcigbacc * Inv_L + + model->BSIM4v4wcigbacc * Inv_W + + model->BSIM4v4pcigbacc * Inv_LW; + pParam->BSIM4v4aigbinv = model->BSIM4v4aigbinv + + model->BSIM4v4laigbinv * Inv_L + + model->BSIM4v4waigbinv * Inv_W + + model->BSIM4v4paigbinv * Inv_LW; + pParam->BSIM4v4bigbinv = model->BSIM4v4bigbinv + + model->BSIM4v4lbigbinv * Inv_L + + model->BSIM4v4wbigbinv * Inv_W + + model->BSIM4v4pbigbinv * Inv_LW; + pParam->BSIM4v4cigbinv = model->BSIM4v4cigbinv + + model->BSIM4v4lcigbinv * Inv_L + + model->BSIM4v4wcigbinv * Inv_W + + model->BSIM4v4pcigbinv * Inv_LW; + pParam->BSIM4v4nigc = model->BSIM4v4nigc + + model->BSIM4v4lnigc * Inv_L + + model->BSIM4v4wnigc * Inv_W + + model->BSIM4v4pnigc * Inv_LW; + pParam->BSIM4v4nigbacc = model->BSIM4v4nigbacc + + model->BSIM4v4lnigbacc * Inv_L + + model->BSIM4v4wnigbacc * Inv_W + + model->BSIM4v4pnigbacc * Inv_LW; + pParam->BSIM4v4nigbinv = model->BSIM4v4nigbinv + + model->BSIM4v4lnigbinv * Inv_L + + model->BSIM4v4wnigbinv * Inv_W + + model->BSIM4v4pnigbinv * Inv_LW; + pParam->BSIM4v4ntox = model->BSIM4v4ntox + + model->BSIM4v4lntox * Inv_L + + model->BSIM4v4wntox * Inv_W + + model->BSIM4v4pntox * Inv_LW; + pParam->BSIM4v4eigbinv = model->BSIM4v4eigbinv + + model->BSIM4v4leigbinv * Inv_L + + model->BSIM4v4weigbinv * Inv_W + + model->BSIM4v4peigbinv * Inv_LW; + pParam->BSIM4v4pigcd = model->BSIM4v4pigcd + + model->BSIM4v4lpigcd * Inv_L + + model->BSIM4v4wpigcd * Inv_W + + model->BSIM4v4ppigcd * Inv_LW; + pParam->BSIM4v4poxedge = model->BSIM4v4poxedge + + model->BSIM4v4lpoxedge * Inv_L + + model->BSIM4v4wpoxedge * Inv_W + + model->BSIM4v4ppoxedge * Inv_LW; + pParam->BSIM4v4xrcrg1 = model->BSIM4v4xrcrg1 + + model->BSIM4v4lxrcrg1 * Inv_L + + model->BSIM4v4wxrcrg1 * Inv_W + + model->BSIM4v4pxrcrg1 * Inv_LW; + pParam->BSIM4v4xrcrg2 = model->BSIM4v4xrcrg2 + + model->BSIM4v4lxrcrg2 * Inv_L + + model->BSIM4v4wxrcrg2 * Inv_W + + model->BSIM4v4pxrcrg2 * Inv_LW; + pParam->BSIM4v4lambda = model->BSIM4v4lambda + + model->BSIM4v4llambda * Inv_L + + model->BSIM4v4wlambda * Inv_W + + model->BSIM4v4plambda * Inv_LW; + pParam->BSIM4v4vtl = model->BSIM4v4vtl + + model->BSIM4v4lvtl * Inv_L + + model->BSIM4v4wvtl * Inv_W + + model->BSIM4v4pvtl * Inv_LW; + pParam->BSIM4v4xn = model->BSIM4v4xn + + model->BSIM4v4lxn * Inv_L + + model->BSIM4v4wxn * Inv_W + + model->BSIM4v4pxn * Inv_LW; + pParam->BSIM4v4vfbsdoff = model->BSIM4v4vfbsdoff + + model->BSIM4v4lvfbsdoff * Inv_L + + model->BSIM4v4wvfbsdoff * Inv_W + + model->BSIM4v4pvfbsdoff * Inv_LW; + + pParam->BSIM4v4cgsl = model->BSIM4v4cgsl + + model->BSIM4v4lcgsl * Inv_L + + model->BSIM4v4wcgsl * Inv_W + + model->BSIM4v4pcgsl * Inv_LW; + pParam->BSIM4v4cgdl = model->BSIM4v4cgdl + + model->BSIM4v4lcgdl * Inv_L + + model->BSIM4v4wcgdl * Inv_W + + model->BSIM4v4pcgdl * Inv_LW; + pParam->BSIM4v4ckappas = model->BSIM4v4ckappas + + model->BSIM4v4lckappas * Inv_L + + model->BSIM4v4wckappas * Inv_W + + model->BSIM4v4pckappas * Inv_LW; + pParam->BSIM4v4ckappad = model->BSIM4v4ckappad + + model->BSIM4v4lckappad * Inv_L + + model->BSIM4v4wckappad * Inv_W + + model->BSIM4v4pckappad * Inv_LW; + pParam->BSIM4v4cf = model->BSIM4v4cf + + model->BSIM4v4lcf * Inv_L + + model->BSIM4v4wcf * Inv_W + + model->BSIM4v4pcf * Inv_LW; + pParam->BSIM4v4clc = model->BSIM4v4clc + + model->BSIM4v4lclc * Inv_L + + model->BSIM4v4wclc * Inv_W + + model->BSIM4v4pclc * Inv_LW; + pParam->BSIM4v4cle = model->BSIM4v4cle + + model->BSIM4v4lcle * Inv_L + + model->BSIM4v4wcle * Inv_W + + model->BSIM4v4pcle * Inv_LW; + pParam->BSIM4v4vfbcv = model->BSIM4v4vfbcv + + model->BSIM4v4lvfbcv * Inv_L + + model->BSIM4v4wvfbcv * Inv_W + + model->BSIM4v4pvfbcv * Inv_LW; + pParam->BSIM4v4acde = model->BSIM4v4acde + + model->BSIM4v4lacde * Inv_L + + model->BSIM4v4wacde * Inv_W + + model->BSIM4v4pacde * Inv_LW; + pParam->BSIM4v4moin = model->BSIM4v4moin + + model->BSIM4v4lmoin * Inv_L + + model->BSIM4v4wmoin * Inv_W + + model->BSIM4v4pmoin * Inv_LW; + pParam->BSIM4v4noff = model->BSIM4v4noff + + model->BSIM4v4lnoff * Inv_L + + model->BSIM4v4wnoff * Inv_W + + model->BSIM4v4pnoff * Inv_LW; + pParam->BSIM4v4voffcv = model->BSIM4v4voffcv + + model->BSIM4v4lvoffcv * Inv_L + + model->BSIM4v4wvoffcv * Inv_W + + model->BSIM4v4pvoffcv * Inv_LW; + + pParam->BSIM4v4abulkCVfactor = 1.0 + pow((pParam->BSIM4v4clc + / pParam->BSIM4v4leffCV), + pParam->BSIM4v4cle); T0 = (TRatio - 1.0); - PowWeffWr = pow(pParam->BSIM4V4weffCJ * 1.0e6, pParam->BSIM4V4wr) * here->BSIM4V4nf; + PowWeffWr = pow(pParam->BSIM4v4weffCJ * 1.0e6, pParam->BSIM4v4wr) * here->BSIM4v4nf; T1 = T2 = T3 = T4 = 0.0; - if(model->BSIM4V4tempMod == 0) { - pParam->BSIM4V4ua = pParam->BSIM4V4ua + pParam->BSIM4V4ua1 * T0; - pParam->BSIM4V4ub = pParam->BSIM4V4ub + pParam->BSIM4V4ub1 * T0; - pParam->BSIM4V4uc = pParam->BSIM4V4uc + pParam->BSIM4V4uc1 * T0; - pParam->BSIM4V4vsattemp = pParam->BSIM4V4vsat - pParam->BSIM4V4at * T0; - T10 = pParam->BSIM4V4prt * T0; - if(model->BSIM4V4rdsMod) { + if(model->BSIM4v4tempMod == 0) { + pParam->BSIM4v4ua = pParam->BSIM4v4ua + pParam->BSIM4v4ua1 * T0; + pParam->BSIM4v4ub = pParam->BSIM4v4ub + pParam->BSIM4v4ub1 * T0; + pParam->BSIM4v4uc = pParam->BSIM4v4uc + pParam->BSIM4v4uc1 * T0; + pParam->BSIM4v4vsattemp = pParam->BSIM4v4vsat - pParam->BSIM4v4at * T0; + T10 = pParam->BSIM4v4prt * T0; + if(model->BSIM4v4rdsMod) { /* External Rd(V) */ - T1 = pParam->BSIM4V4rdw + T10; - T2 = model->BSIM4V4rdwmin + T10; + T1 = pParam->BSIM4v4rdw + T10; + T2 = model->BSIM4v4rdwmin + T10; /* External Rs(V) */ - T3 = pParam->BSIM4V4rsw + T10; - T4 = model->BSIM4V4rswmin + T10; + T3 = pParam->BSIM4v4rsw + T10; + T4 = model->BSIM4v4rswmin + T10; } /* Internal Rds(V) in IV */ - pParam->BSIM4V4rds0 = (pParam->BSIM4V4rdsw + T10) - * here->BSIM4V4nf / PowWeffWr; - pParam->BSIM4V4rdswmin = (model->BSIM4V4rdswmin + T10) - * here->BSIM4V4nf / PowWeffWr; + pParam->BSIM4v4rds0 = (pParam->BSIM4v4rdsw + T10) + * here->BSIM4v4nf / PowWeffWr; + pParam->BSIM4v4rdswmin = (model->BSIM4v4rdswmin + T10) + * here->BSIM4v4nf / PowWeffWr; } else { /* tempMod = 1 */ - pParam->BSIM4V4ua = pParam->BSIM4V4ua * (1.0 + pParam->BSIM4V4ua1 * delTemp) ; - pParam->BSIM4V4ub = pParam->BSIM4V4ub * (1.0 + pParam->BSIM4V4ub1 * delTemp); - pParam->BSIM4V4uc = pParam->BSIM4V4uc * (1.0 + pParam->BSIM4V4uc1 * delTemp); - pParam->BSIM4V4vsattemp = pParam->BSIM4V4vsat * (1.0 - pParam->BSIM4V4at * delTemp); - T10 = 1.0 + pParam->BSIM4V4prt * delTemp; - if(model->BSIM4V4rdsMod) { + pParam->BSIM4v4ua = pParam->BSIM4v4ua * (1.0 + pParam->BSIM4v4ua1 * delTemp) ; + pParam->BSIM4v4ub = pParam->BSIM4v4ub * (1.0 + pParam->BSIM4v4ub1 * delTemp); + pParam->BSIM4v4uc = pParam->BSIM4v4uc * (1.0 + pParam->BSIM4v4uc1 * delTemp); + pParam->BSIM4v4vsattemp = pParam->BSIM4v4vsat * (1.0 - pParam->BSIM4v4at * delTemp); + T10 = 1.0 + pParam->BSIM4v4prt * delTemp; + if(model->BSIM4v4rdsMod) { /* External Rd(V) */ - T1 = pParam->BSIM4V4rdw * T10; - T2 = model->BSIM4V4rdwmin * T10; + T1 = pParam->BSIM4v4rdw * T10; + T2 = model->BSIM4v4rdwmin * T10; /* External Rs(V) */ - T3 = pParam->BSIM4V4rsw * T10; - T4 = model->BSIM4V4rswmin * T10; + T3 = pParam->BSIM4v4rsw * T10; + T4 = model->BSIM4v4rswmin * T10; } /* Internal Rds(V) in IV */ - pParam->BSIM4V4rds0 = pParam->BSIM4V4rdsw * T10 * here->BSIM4V4nf / PowWeffWr; - pParam->BSIM4V4rdswmin = model->BSIM4V4rdswmin * T10 * here->BSIM4V4nf / PowWeffWr; + pParam->BSIM4v4rds0 = pParam->BSIM4v4rdsw * T10 * here->BSIM4v4nf / PowWeffWr; + pParam->BSIM4v4rdswmin = model->BSIM4v4rdswmin * T10 * here->BSIM4v4nf / PowWeffWr; } if (T1 < 0.0) { T1 = 0.0; @@ -1022,8 +1022,8 @@ int Size_Not_Found, i; { T2 = 0.0; printf("Warning: Rdwmin at current temperature is negative; set to 0.\n"); } - pParam->BSIM4V4rd0 = T1 / PowWeffWr; - pParam->BSIM4V4rdwmin = T2 / PowWeffWr; + pParam->BSIM4v4rd0 = T1 / PowWeffWr; + pParam->BSIM4v4rdwmin = T2 / PowWeffWr; if (T3 < 0.0) { T3 = 0.0; printf("Warning: Rsw at current temperature is negative; set to 0.\n"); @@ -1032,203 +1032,203 @@ int Size_Not_Found, i; { T4 = 0.0; printf("Warning: Rswmin at current temperature is negative; set to 0.\n"); } - pParam->BSIM4V4rs0 = T3 / PowWeffWr; - pParam->BSIM4V4rswmin = T4 / PowWeffWr; + pParam->BSIM4v4rs0 = T3 / PowWeffWr; + pParam->BSIM4v4rswmin = T4 / PowWeffWr; - if (pParam->BSIM4V4u0 > 1.0) - pParam->BSIM4V4u0 = pParam->BSIM4V4u0 / 1.0e4; + if (pParam->BSIM4v4u0 > 1.0) + pParam->BSIM4v4u0 = pParam->BSIM4v4u0 / 1.0e4; - pParam->BSIM4V4u0temp = pParam->BSIM4V4u0 - * pow(TRatio, pParam->BSIM4V4ute); - if (pParam->BSIM4V4eu < 0.0) - { pParam->BSIM4V4eu = 0.0; + pParam->BSIM4v4u0temp = pParam->BSIM4v4u0 + * pow(TRatio, pParam->BSIM4v4ute); + if (pParam->BSIM4v4eu < 0.0) + { pParam->BSIM4v4eu = 0.0; printf("Warning: eu has been negative; reset to 0.0.\n"); } /* Source End Velocity Limit */ - if((model->BSIM4V4vtlGiven) && (model->BSIM4V4vtl > 0.0) ) + if((model->BSIM4v4vtlGiven) && (model->BSIM4v4vtl > 0.0) ) { - if(model->BSIM4V4lc < 0.0) pParam->BSIM4V4lc = 0.0; - else pParam->BSIM4V4lc = model->BSIM4V4lc ; - T0 = pParam->BSIM4V4leff / (pParam->BSIM4V4xn * pParam->BSIM4V4leff + pParam->BSIM4V4lc); - pParam->BSIM4V4tfactor = (1.0 - T0) / (1.0 + T0 ); + if(model->BSIM4v4lc < 0.0) pParam->BSIM4v4lc = 0.0; + else pParam->BSIM4v4lc = model->BSIM4v4lc ; + T0 = pParam->BSIM4v4leff / (pParam->BSIM4v4xn * pParam->BSIM4v4leff + pParam->BSIM4v4lc); + pParam->BSIM4v4tfactor = (1.0 - T0) / (1.0 + T0 ); } - pParam->BSIM4V4cgdo = (model->BSIM4V4cgdo + pParam->BSIM4V4cf) - * pParam->BSIM4V4weffCV; - pParam->BSIM4V4cgso = (model->BSIM4V4cgso + pParam->BSIM4V4cf) - * pParam->BSIM4V4weffCV; - pParam->BSIM4V4cgbo = model->BSIM4V4cgbo * pParam->BSIM4V4leffCV * here->BSIM4V4nf; + pParam->BSIM4v4cgdo = (model->BSIM4v4cgdo + pParam->BSIM4v4cf) + * pParam->BSIM4v4weffCV; + pParam->BSIM4v4cgso = (model->BSIM4v4cgso + pParam->BSIM4v4cf) + * pParam->BSIM4v4weffCV; + pParam->BSIM4v4cgbo = model->BSIM4v4cgbo * pParam->BSIM4v4leffCV * here->BSIM4v4nf; - if (!model->BSIM4V4ndepGiven && model->BSIM4V4gamma1Given) - { T0 = pParam->BSIM4V4gamma1 * model->BSIM4V4coxe; - pParam->BSIM4V4ndep = 3.01248e22 * T0 * T0; + if (!model->BSIM4v4ndepGiven && model->BSIM4v4gamma1Given) + { T0 = pParam->BSIM4v4gamma1 * model->BSIM4v4coxe; + pParam->BSIM4v4ndep = 3.01248e22 * T0 * T0; } - pParam->BSIM4V4phi = Vtm0 * log(pParam->BSIM4V4ndep / ni) - + pParam->BSIM4V4phin + 0.4; + pParam->BSIM4v4phi = Vtm0 * log(pParam->BSIM4v4ndep / ni) + + pParam->BSIM4v4phin + 0.4; - pParam->BSIM4V4sqrtPhi = sqrt(pParam->BSIM4V4phi); - pParam->BSIM4V4phis3 = pParam->BSIM4V4sqrtPhi * pParam->BSIM4V4phi; + pParam->BSIM4v4sqrtPhi = sqrt(pParam->BSIM4v4phi); + pParam->BSIM4v4phis3 = pParam->BSIM4v4sqrtPhi * pParam->BSIM4v4phi; - pParam->BSIM4V4Xdep0 = sqrt(2.0 * EPSSI / (Charge_q - * pParam->BSIM4V4ndep * 1.0e6)) - * pParam->BSIM4V4sqrtPhi; - pParam->BSIM4V4sqrtXdep0 = sqrt(pParam->BSIM4V4Xdep0); - pParam->BSIM4V4litl = sqrt(3.0 * pParam->BSIM4V4xj - * model->BSIM4V4toxe); - pParam->BSIM4V4vbi = Vtm0 * log(pParam->BSIM4V4nsd - * pParam->BSIM4V4ndep / (ni * ni)); + pParam->BSIM4v4Xdep0 = sqrt(2.0 * EPSSI / (Charge_q + * pParam->BSIM4v4ndep * 1.0e6)) + * pParam->BSIM4v4sqrtPhi; + pParam->BSIM4v4sqrtXdep0 = sqrt(pParam->BSIM4v4Xdep0); + pParam->BSIM4v4litl = sqrt(3.0 * pParam->BSIM4v4xj + * model->BSIM4v4toxe); + pParam->BSIM4v4vbi = Vtm0 * log(pParam->BSIM4v4nsd + * pParam->BSIM4v4ndep / (ni * ni)); - if (pParam->BSIM4V4ngate > 0.0) - { pParam->BSIM4V4vfbsd = Vtm0 * log(pParam->BSIM4V4ngate - / pParam->BSIM4V4nsd); + if (pParam->BSIM4v4ngate > 0.0) + { pParam->BSIM4v4vfbsd = Vtm0 * log(pParam->BSIM4v4ngate + / pParam->BSIM4v4nsd); } else - pParam->BSIM4V4vfbsd = 0.0; - - pParam->BSIM4V4cdep0 = sqrt(Charge_q * EPSSI - * pParam->BSIM4V4ndep * 1.0e6 / 2.0 - / pParam->BSIM4V4phi); - - pParam->BSIM4V4ToxRatio = exp(pParam->BSIM4V4ntox - * log(model->BSIM4V4toxref / model->BSIM4V4toxe)) - / model->BSIM4V4toxe / model->BSIM4V4toxe; - pParam->BSIM4V4ToxRatioEdge = exp(pParam->BSIM4V4ntox - * log(model->BSIM4V4toxref - / (model->BSIM4V4toxe * pParam->BSIM4V4poxedge))) - / model->BSIM4V4toxe / model->BSIM4V4toxe - / pParam->BSIM4V4poxedge / pParam->BSIM4V4poxedge; - pParam->BSIM4V4Aechvb = (model->BSIM4V4type == NMOS) ? 4.97232e-7 : 3.42537e-7; - pParam->BSIM4V4Bechvb = (model->BSIM4V4type == NMOS) ? 7.45669e11 : 1.16645e12; - pParam->BSIM4V4AechvbEdge = pParam->BSIM4V4Aechvb * pParam->BSIM4V4weff - * pParam->BSIM4V4dlcig * pParam->BSIM4V4ToxRatioEdge; - pParam->BSIM4V4BechvbEdge = -pParam->BSIM4V4Bechvb - * model->BSIM4V4toxe * pParam->BSIM4V4poxedge; - pParam->BSIM4V4Aechvb *= pParam->BSIM4V4weff * pParam->BSIM4V4leff - * pParam->BSIM4V4ToxRatio; - pParam->BSIM4V4Bechvb *= -model->BSIM4V4toxe; - - - pParam->BSIM4V4mstar = 0.5 + atan(pParam->BSIM4V4minv) / PI; - pParam->BSIM4V4voffcbn = pParam->BSIM4V4voff + model->BSIM4V4voffl / pParam->BSIM4V4leff; - - pParam->BSIM4V4ldeb = sqrt(EPSSI * Vtm0 / (Charge_q - * pParam->BSIM4V4ndep * 1.0e6)) / 3.0; - pParam->BSIM4V4acde *= pow((pParam->BSIM4V4ndep / 2.0e16), -0.25); - - - if (model->BSIM4V4k1Given || model->BSIM4V4k2Given) - { if (!model->BSIM4V4k1Given) + pParam->BSIM4v4vfbsd = 0.0; + + pParam->BSIM4v4cdep0 = sqrt(Charge_q * EPSSI + * pParam->BSIM4v4ndep * 1.0e6 / 2.0 + / pParam->BSIM4v4phi); + + pParam->BSIM4v4ToxRatio = exp(pParam->BSIM4v4ntox + * log(model->BSIM4v4toxref / model->BSIM4v4toxe)) + / model->BSIM4v4toxe / model->BSIM4v4toxe; + pParam->BSIM4v4ToxRatioEdge = exp(pParam->BSIM4v4ntox + * log(model->BSIM4v4toxref + / (model->BSIM4v4toxe * pParam->BSIM4v4poxedge))) + / model->BSIM4v4toxe / model->BSIM4v4toxe + / pParam->BSIM4v4poxedge / pParam->BSIM4v4poxedge; + pParam->BSIM4v4Aechvb = (model->BSIM4v4type == NMOS) ? 4.97232e-7 : 3.42537e-7; + pParam->BSIM4v4Bechvb = (model->BSIM4v4type == NMOS) ? 7.45669e11 : 1.16645e12; + pParam->BSIM4v4AechvbEdge = pParam->BSIM4v4Aechvb * pParam->BSIM4v4weff + * pParam->BSIM4v4dlcig * pParam->BSIM4v4ToxRatioEdge; + pParam->BSIM4v4BechvbEdge = -pParam->BSIM4v4Bechvb + * model->BSIM4v4toxe * pParam->BSIM4v4poxedge; + pParam->BSIM4v4Aechvb *= pParam->BSIM4v4weff * pParam->BSIM4v4leff + * pParam->BSIM4v4ToxRatio; + pParam->BSIM4v4Bechvb *= -model->BSIM4v4toxe; + + + pParam->BSIM4v4mstar = 0.5 + atan(pParam->BSIM4v4minv) / PI; + pParam->BSIM4v4voffcbn = pParam->BSIM4v4voff + model->BSIM4v4voffl / pParam->BSIM4v4leff; + + pParam->BSIM4v4ldeb = sqrt(EPSSI * Vtm0 / (Charge_q + * pParam->BSIM4v4ndep * 1.0e6)) / 3.0; + pParam->BSIM4v4acde *= pow((pParam->BSIM4v4ndep / 2.0e16), -0.25); + + + if (model->BSIM4v4k1Given || model->BSIM4v4k2Given) + { if (!model->BSIM4v4k1Given) { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); - pParam->BSIM4V4k1 = 0.53; + pParam->BSIM4v4k1 = 0.53; } - if (!model->BSIM4V4k2Given) + if (!model->BSIM4v4k2Given) { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); - pParam->BSIM4V4k2 = -0.0186; + pParam->BSIM4v4k2 = -0.0186; } - if (model->BSIM4V4nsubGiven) + if (model->BSIM4v4nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); - if (model->BSIM4V4xtGiven) + if (model->BSIM4v4xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); - if (model->BSIM4V4vbxGiven) + if (model->BSIM4v4vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); - if (model->BSIM4V4gamma1Given) + if (model->BSIM4v4gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); - if (model->BSIM4V4gamma2Given) + if (model->BSIM4v4gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } else - { if (!model->BSIM4V4vbxGiven) - pParam->BSIM4V4vbx = pParam->BSIM4V4phi - 7.7348e-4 - * pParam->BSIM4V4ndep - * pParam->BSIM4V4xt * pParam->BSIM4V4xt; - if (pParam->BSIM4V4vbx > 0.0) - pParam->BSIM4V4vbx = -pParam->BSIM4V4vbx; - if (pParam->BSIM4V4vbm > 0.0) - pParam->BSIM4V4vbm = -pParam->BSIM4V4vbm; + { if (!model->BSIM4v4vbxGiven) + pParam->BSIM4v4vbx = pParam->BSIM4v4phi - 7.7348e-4 + * pParam->BSIM4v4ndep + * pParam->BSIM4v4xt * pParam->BSIM4v4xt; + if (pParam->BSIM4v4vbx > 0.0) + pParam->BSIM4v4vbx = -pParam->BSIM4v4vbx; + if (pParam->BSIM4v4vbm > 0.0) + pParam->BSIM4v4vbm = -pParam->BSIM4v4vbm; - if (!model->BSIM4V4gamma1Given) - pParam->BSIM4V4gamma1 = 5.753e-12 - * sqrt(pParam->BSIM4V4ndep) - / model->BSIM4V4coxe; - if (!model->BSIM4V4gamma2Given) - pParam->BSIM4V4gamma2 = 5.753e-12 - * sqrt(pParam->BSIM4V4nsub) - / model->BSIM4V4coxe; - - T0 = pParam->BSIM4V4gamma1 - pParam->BSIM4V4gamma2; - T1 = sqrt(pParam->BSIM4V4phi - pParam->BSIM4V4vbx) - - pParam->BSIM4V4sqrtPhi; - T2 = sqrt(pParam->BSIM4V4phi * (pParam->BSIM4V4phi - - pParam->BSIM4V4vbm)) - pParam->BSIM4V4phi; - pParam->BSIM4V4k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM4V4vbm); - pParam->BSIM4V4k1 = pParam->BSIM4V4gamma2 - 2.0 - * pParam->BSIM4V4k2 * sqrt(pParam->BSIM4V4phi - - pParam->BSIM4V4vbm); + if (!model->BSIM4v4gamma1Given) + pParam->BSIM4v4gamma1 = 5.753e-12 + * sqrt(pParam->BSIM4v4ndep) + / model->BSIM4v4coxe; + if (!model->BSIM4v4gamma2Given) + pParam->BSIM4v4gamma2 = 5.753e-12 + * sqrt(pParam->BSIM4v4nsub) + / model->BSIM4v4coxe; + + T0 = pParam->BSIM4v4gamma1 - pParam->BSIM4v4gamma2; + T1 = sqrt(pParam->BSIM4v4phi - pParam->BSIM4v4vbx) + - pParam->BSIM4v4sqrtPhi; + T2 = sqrt(pParam->BSIM4v4phi * (pParam->BSIM4v4phi + - pParam->BSIM4v4vbm)) - pParam->BSIM4v4phi; + pParam->BSIM4v4k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM4v4vbm); + pParam->BSIM4v4k1 = pParam->BSIM4v4gamma2 - 2.0 + * pParam->BSIM4v4k2 * sqrt(pParam->BSIM4v4phi + - pParam->BSIM4v4vbm); } - if (pParam->BSIM4V4k2 < 0.0) - { T0 = 0.5 * pParam->BSIM4V4k1 / pParam->BSIM4V4k2; - pParam->BSIM4V4vbsc = 0.9 * (pParam->BSIM4V4phi - T0 * T0); - if (pParam->BSIM4V4vbsc > -3.0) - pParam->BSIM4V4vbsc = -3.0; - else if (pParam->BSIM4V4vbsc < -30.0) - pParam->BSIM4V4vbsc = -30.0; + if (pParam->BSIM4v4k2 < 0.0) + { T0 = 0.5 * pParam->BSIM4v4k1 / pParam->BSIM4v4k2; + pParam->BSIM4v4vbsc = 0.9 * (pParam->BSIM4v4phi - T0 * T0); + if (pParam->BSIM4v4vbsc > -3.0) + pParam->BSIM4v4vbsc = -3.0; + else if (pParam->BSIM4v4vbsc < -30.0) + pParam->BSIM4v4vbsc = -30.0; } else - { pParam->BSIM4V4vbsc = -30.0; + { pParam->BSIM4v4vbsc = -30.0; } - if (pParam->BSIM4V4vbsc > pParam->BSIM4V4vbm) - pParam->BSIM4V4vbsc = pParam->BSIM4V4vbm; - - if (!model->BSIM4V4vfbGiven) - { if (model->BSIM4V4vth0Given) - { pParam->BSIM4V4vfb = model->BSIM4V4type * pParam->BSIM4V4vth0 - - pParam->BSIM4V4phi - pParam->BSIM4V4k1 - * pParam->BSIM4V4sqrtPhi; + if (pParam->BSIM4v4vbsc > pParam->BSIM4v4vbm) + pParam->BSIM4v4vbsc = pParam->BSIM4v4vbm; + + if (!model->BSIM4v4vfbGiven) + { if (model->BSIM4v4vth0Given) + { pParam->BSIM4v4vfb = model->BSIM4v4type * pParam->BSIM4v4vth0 + - pParam->BSIM4v4phi - pParam->BSIM4v4k1 + * pParam->BSIM4v4sqrtPhi; } else - { pParam->BSIM4V4vfb = -1.0; + { pParam->BSIM4v4vfb = -1.0; } } - if (!model->BSIM4V4vth0Given) - { pParam->BSIM4V4vth0 = model->BSIM4V4type * (pParam->BSIM4V4vfb - + pParam->BSIM4V4phi + pParam->BSIM4V4k1 - * pParam->BSIM4V4sqrtPhi); + if (!model->BSIM4v4vth0Given) + { pParam->BSIM4v4vth0 = model->BSIM4v4type * (pParam->BSIM4v4vfb + + pParam->BSIM4v4phi + pParam->BSIM4v4k1 + * pParam->BSIM4v4sqrtPhi); } - pParam->BSIM4V4k1ox = pParam->BSIM4V4k1 * model->BSIM4V4toxe - / model->BSIM4V4toxm; - pParam->BSIM4V4k2ox = pParam->BSIM4V4k2 * model->BSIM4V4toxe - / model->BSIM4V4toxm; + pParam->BSIM4v4k1ox = pParam->BSIM4v4k1 * model->BSIM4v4toxe + / model->BSIM4v4toxm; + pParam->BSIM4v4k2ox = pParam->BSIM4v4k2 * model->BSIM4v4toxe + / model->BSIM4v4toxm; - T3 = model->BSIM4V4type * pParam->BSIM4V4vth0 - - pParam->BSIM4V4vfb - pParam->BSIM4V4phi; + T3 = model->BSIM4v4type * pParam->BSIM4v4vth0 + - pParam->BSIM4v4vfb - pParam->BSIM4v4phi; T4 = T3 + T3; T5 = 2.5 * T3; - pParam->BSIM4V4vtfbphi1 = (model->BSIM4V4type == NMOS) ? T4 : T5; - if (pParam->BSIM4V4vtfbphi1 < 0.0) - pParam->BSIM4V4vtfbphi1 = 0.0; + pParam->BSIM4v4vtfbphi1 = (model->BSIM4v4type == NMOS) ? T4 : T5; + if (pParam->BSIM4v4vtfbphi1 < 0.0) + pParam->BSIM4v4vtfbphi1 = 0.0; - pParam->BSIM4V4vtfbphi2 = 4.0 * T3; - if (pParam->BSIM4V4vtfbphi2 < 0.0) - pParam->BSIM4V4vtfbphi2 = 0.0; + pParam->BSIM4v4vtfbphi2 = 4.0 * T3; + if (pParam->BSIM4v4vtfbphi2 < 0.0) + pParam->BSIM4v4vtfbphi2 = 0.0; - tmp = sqrt(EPSSI / (model->BSIM4V4epsrox * EPS0) - * model->BSIM4V4toxe * pParam->BSIM4V4Xdep0); - T0 = pParam->BSIM4V4dsub * pParam->BSIM4V4leff / tmp; + tmp = sqrt(EPSSI / (model->BSIM4v4epsrox * EPS0) + * model->BSIM4v4toxe * pParam->BSIM4v4Xdep0); + T0 = pParam->BSIM4v4dsub * pParam->BSIM4v4leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; - pParam->BSIM4V4theta0vb0 = T1 / T4; + pParam->BSIM4v4theta0vb0 = T1 / T4; } else - pParam->BSIM4V4theta0vb0 = 1.0 / (MAX_EXP - 2.0); + pParam->BSIM4v4theta0vb0 = 1.0 / (MAX_EXP - 2.0); - T0 = pParam->BSIM4V4drout * pParam->BSIM4V4leff / tmp; + T0 = pParam->BSIM4v4drout * pParam->BSIM4v4leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; @@ -1238,15 +1238,15 @@ int Size_Not_Found, i; } else T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ - pParam->BSIM4V4thetaRout = pParam->BSIM4V4pdibl1 * T5 - + pParam->BSIM4V4pdibl2; + pParam->BSIM4v4thetaRout = pParam->BSIM4v4pdibl1 * T5 + + pParam->BSIM4v4pdibl2; - tmp = sqrt(pParam->BSIM4V4Xdep0); - tmp1 = pParam->BSIM4V4vbi - pParam->BSIM4V4phi; - tmp2 = model->BSIM4V4factor1 * tmp; + tmp = sqrt(pParam->BSIM4v4Xdep0); + tmp1 = pParam->BSIM4v4vbi - pParam->BSIM4v4phi; + tmp2 = model->BSIM4v4factor1 * tmp; - T0 = pParam->BSIM4V4dvt1w * pParam->BSIM4V4weff - * pParam->BSIM4V4leff / tmp2; + T0 = pParam->BSIM4v4dvt1w * pParam->BSIM4v4weff + * pParam->BSIM4v4leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; @@ -1256,10 +1256,10 @@ int Size_Not_Found, i; } else T8 = 1.0 / (MAX_EXP - 2.0); - T0 = pParam->BSIM4V4dvt0w * T8; + T0 = pParam->BSIM4v4dvt0w * T8; T8 = T0 * tmp1; - T0 = pParam->BSIM4V4dvt1 * pParam->BSIM4V4leff / tmp2; + T0 = pParam->BSIM4v4dvt1 * pParam->BSIM4v4leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; @@ -1269,160 +1269,160 @@ int Size_Not_Found, i; } else T9 = 1.0 / (MAX_EXP - 2.0); - T9 = pParam->BSIM4V4dvt0 * T9 * tmp1; + T9 = pParam->BSIM4v4dvt0 * T9 * tmp1; - T4 = model->BSIM4V4toxe * pParam->BSIM4V4phi - / (pParam->BSIM4V4weff + pParam->BSIM4V4w0); + T4 = model->BSIM4v4toxe * pParam->BSIM4v4phi + / (pParam->BSIM4v4weff + pParam->BSIM4v4w0); - T0 = sqrt(1.0 + pParam->BSIM4V4lpe0 / pParam->BSIM4V4leff); - T5 = pParam->BSIM4V4k1ox * (T0 - 1.0) * pParam->BSIM4V4sqrtPhi - + (pParam->BSIM4V4kt1 + pParam->BSIM4V4kt1l / pParam->BSIM4V4leff) + T0 = sqrt(1.0 + pParam->BSIM4v4lpe0 / pParam->BSIM4v4leff); + T5 = pParam->BSIM4v4k1ox * (T0 - 1.0) * pParam->BSIM4v4sqrtPhi + + (pParam->BSIM4v4kt1 + pParam->BSIM4v4kt1l / pParam->BSIM4v4leff) * (TRatio - 1.0); - tmp3 = model->BSIM4V4type * pParam->BSIM4V4vth0 - - T8 - T9 + pParam->BSIM4V4k3 * T4 + T5; - pParam->BSIM4V4vfbzb = tmp3 - pParam->BSIM4V4phi - pParam->BSIM4V4k1 - * pParam->BSIM4V4sqrtPhi; /* End of vfbzb */ + tmp3 = model->BSIM4v4type * pParam->BSIM4v4vth0 + - T8 - T9 + pParam->BSIM4v4k3 * T4 + T5; + pParam->BSIM4v4vfbzb = tmp3 - pParam->BSIM4v4phi - pParam->BSIM4v4k1 + * pParam->BSIM4v4sqrtPhi; /* End of vfbzb */ /* stress effect */ - T0 = pow(Lnew, model->BSIM4V4llodku0); - W_tmp = Wnew + model->BSIM4V4wlod; - T1 = pow(W_tmp, model->BSIM4V4wlodku0); - tmp1 = model->BSIM4V4lku0 / T0 + model->BSIM4V4wku0 / T1 - + model->BSIM4V4pku0 / (T0 * T1); - pParam->BSIM4V4ku0 = 1.0 + tmp1; - - T0 = pow(Lnew, model->BSIM4V4llodvth); - T1 = pow(W_tmp, model->BSIM4V4wlodvth); - tmp1 = model->BSIM4V4lkvth0 / T0 + model->BSIM4V4wkvth0 / T1 - + model->BSIM4V4pkvth0 / (T0 * T1); - pParam->BSIM4V4kvth0 = 1.0 + tmp1; - pParam->BSIM4V4kvth0 = sqrt(pParam->BSIM4V4kvth0*pParam->BSIM4V4kvth0 + DELTA); + T0 = pow(Lnew, model->BSIM4v4llodku0); + W_tmp = Wnew + model->BSIM4v4wlod; + T1 = pow(W_tmp, model->BSIM4v4wlodku0); + tmp1 = model->BSIM4v4lku0 / T0 + model->BSIM4v4wku0 / T1 + + model->BSIM4v4pku0 / (T0 * T1); + pParam->BSIM4v4ku0 = 1.0 + tmp1; + + T0 = pow(Lnew, model->BSIM4v4llodvth); + T1 = pow(W_tmp, model->BSIM4v4wlodvth); + tmp1 = model->BSIM4v4lkvth0 / T0 + model->BSIM4v4wkvth0 / T1 + + model->BSIM4v4pkvth0 / (T0 * T1); + pParam->BSIM4v4kvth0 = 1.0 + tmp1; + pParam->BSIM4v4kvth0 = sqrt(pParam->BSIM4v4kvth0*pParam->BSIM4v4kvth0 + DELTA); T0 = (TRatio - 1.0); - pParam->BSIM4V4ku0temp = pParam->BSIM4V4ku0 * (1.0 + model->BSIM4V4tku0 *T0) + DELTA; + pParam->BSIM4v4ku0temp = pParam->BSIM4v4ku0 * (1.0 + model->BSIM4v4tku0 *T0) + DELTA; - Inv_saref = 1.0/(model->BSIM4V4saref + 0.5*Ldrn); - Inv_sbref = 1.0/(model->BSIM4V4sbref + 0.5*Ldrn); - pParam->BSIM4V4inv_od_ref = Inv_saref + Inv_sbref; - pParam->BSIM4V4rho_ref = model->BSIM4V4ku0 / pParam->BSIM4V4ku0temp * pParam->BSIM4V4inv_od_ref; + Inv_saref = 1.0/(model->BSIM4v4saref + 0.5*Ldrn); + Inv_sbref = 1.0/(model->BSIM4v4sbref + 0.5*Ldrn); + pParam->BSIM4v4inv_od_ref = Inv_saref + Inv_sbref; + pParam->BSIM4v4rho_ref = model->BSIM4v4ku0 / pParam->BSIM4v4ku0temp * pParam->BSIM4v4inv_od_ref; } /* End of SizeNotFound */ /* stress effect */ - if( (here->BSIM4V4sa > 0.0) && (here->BSIM4V4sb > 0.0) && - ((here->BSIM4V4nf == 1.0) || ((here->BSIM4V4nf > 1.0) && (here->BSIM4V4sd > 0.0))) ) + if( (here->BSIM4v4sa > 0.0) && (here->BSIM4v4sb > 0.0) && + ((here->BSIM4v4nf == 1.0) || ((here->BSIM4v4nf > 1.0) && (here->BSIM4v4sd > 0.0))) ) { Inv_sa = 0; Inv_sb = 0; - if (model->BSIM4V4wlod < 0.0) - { fprintf(stderr, "Warning: WLOD = %g is less than 0. Set to 0.0\n",model->BSIM4V4wlod); - model->BSIM4V4wlod = 0.0; + if (model->BSIM4v4wlod < 0.0) + { fprintf(stderr, "Warning: WLOD = %g is less than 0. Set to 0.0\n",model->BSIM4v4wlod); + model->BSIM4v4wlod = 0.0; } - if (model->BSIM4V4kvsat < -1.0 ) - { fprintf(stderr, "Warning: KVSAT = %g is too small; Reset to -1.0.\n",model->BSIM4V4kvsat); - model->BSIM4V4kvsat = -1.0; + if (model->BSIM4v4kvsat < -1.0 ) + { fprintf(stderr, "Warning: KVSAT = %g is too small; Reset to -1.0.\n",model->BSIM4v4kvsat); + model->BSIM4v4kvsat = -1.0; } - if (model->BSIM4V4kvsat > 1.0) - { fprintf(stderr, "Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4V4kvsat); - model->BSIM4V4kvsat = 1.0; + if (model->BSIM4v4kvsat > 1.0) + { fprintf(stderr, "Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4v4kvsat); + model->BSIM4v4kvsat = 1.0; } - for(i = 0; i < here->BSIM4V4nf; i++){ - T0 = 1.0 / here->BSIM4V4nf / (here->BSIM4V4sa + 0.5*Ldrn + i * (here->BSIM4V4sd +Ldrn)); - T1 = 1.0 / here->BSIM4V4nf / (here->BSIM4V4sb + 0.5*Ldrn + i * (here->BSIM4V4sd +Ldrn)); + for(i = 0; i < here->BSIM4v4nf; i++){ + T0 = 1.0 / here->BSIM4v4nf / (here->BSIM4v4sa + 0.5*Ldrn + i * (here->BSIM4v4sd +Ldrn)); + T1 = 1.0 / here->BSIM4v4nf / (here->BSIM4v4sb + 0.5*Ldrn + i * (here->BSIM4v4sd +Ldrn)); Inv_sa += T0; Inv_sb += T1; } Inv_ODeff = Inv_sa + Inv_sb; - rho = model->BSIM4V4ku0 / pParam->BSIM4V4ku0temp * Inv_ODeff; - T0 = (1.0 + rho)/(1.0 + pParam->BSIM4V4rho_ref); - here->BSIM4V4u0temp = pParam->BSIM4V4u0temp * T0; + rho = model->BSIM4v4ku0 / pParam->BSIM4v4ku0temp * Inv_ODeff; + T0 = (1.0 + rho)/(1.0 + pParam->BSIM4v4rho_ref); + here->BSIM4v4u0temp = pParam->BSIM4v4u0temp * T0; - T1 = (1.0 + model->BSIM4V4kvsat * rho)/(1.0 + model->BSIM4V4kvsat * pParam->BSIM4V4rho_ref); - here->BSIM4V4vsattemp = pParam->BSIM4V4vsattemp * T1; + T1 = (1.0 + model->BSIM4v4kvsat * rho)/(1.0 + model->BSIM4v4kvsat * pParam->BSIM4v4rho_ref); + here->BSIM4v4vsattemp = pParam->BSIM4v4vsattemp * T1; - OD_offset = Inv_ODeff - pParam->BSIM4V4inv_od_ref; - dvth0_lod = model->BSIM4V4kvth0 / pParam->BSIM4V4kvth0 * OD_offset; - dk2_lod = model->BSIM4V4stk2 / pow(pParam->BSIM4V4kvth0, model->BSIM4V4lodk2) * + OD_offset = Inv_ODeff - pParam->BSIM4v4inv_od_ref; + dvth0_lod = model->BSIM4v4kvth0 / pParam->BSIM4v4kvth0 * OD_offset; + dk2_lod = model->BSIM4v4stk2 / pow(pParam->BSIM4v4kvth0, model->BSIM4v4lodk2) * OD_offset; - deta0_lod = model->BSIM4V4steta0 / pow(pParam->BSIM4V4kvth0, model->BSIM4V4lodeta0) * + deta0_lod = model->BSIM4v4steta0 / pow(pParam->BSIM4v4kvth0, model->BSIM4v4lodeta0) * OD_offset; - here->BSIM4V4vth0 = pParam->BSIM4V4vth0 + dvth0_lod; + here->BSIM4v4vth0 = pParam->BSIM4v4vth0 + dvth0_lod; - if (!model->BSIM4V4vfbGiven && !model->BSIM4V4vth0Given) - here->BSIM4V4vfb = -1.0; + if (!model->BSIM4v4vfbGiven && !model->BSIM4v4vth0Given) + here->BSIM4v4vfb = -1.0; else - here->BSIM4V4vfb = pParam->BSIM4V4vfb + model->BSIM4V4type * dvth0_lod; - here->BSIM4V4vfbzb = pParam->BSIM4V4vfbzb + model->BSIM4V4type * dvth0_lod; + here->BSIM4v4vfb = pParam->BSIM4v4vfb + model->BSIM4v4type * dvth0_lod; + here->BSIM4v4vfbzb = pParam->BSIM4v4vfbzb + model->BSIM4v4type * dvth0_lod; - T3 = model->BSIM4V4type * here->BSIM4V4vth0 - - here->BSIM4V4vfb - pParam->BSIM4V4phi; + T3 = model->BSIM4v4type * here->BSIM4v4vth0 + - here->BSIM4v4vfb - pParam->BSIM4v4phi; T4 = T3 + T3; T5 = 2.5 * T3; - here->BSIM4V4vtfbphi1 = (model->BSIM4V4type == NMOS) ? T4 : T5; - if (here->BSIM4V4vtfbphi1 < 0.0) - here->BSIM4V4vtfbphi1 = 0.0; + here->BSIM4v4vtfbphi1 = (model->BSIM4v4type == NMOS) ? T4 : T5; + if (here->BSIM4v4vtfbphi1 < 0.0) + here->BSIM4v4vtfbphi1 = 0.0; - here->BSIM4V4vtfbphi2 = 4.0 * T3; - if (here->BSIM4V4vtfbphi2 < 0.0) - here->BSIM4V4vtfbphi2 = 0.0; + here->BSIM4v4vtfbphi2 = 4.0 * T3; + if (here->BSIM4v4vtfbphi2 < 0.0) + here->BSIM4v4vtfbphi2 = 0.0; - here->BSIM4V4k2 = pParam->BSIM4V4k2 + dk2_lod; - if (here->BSIM4V4k2 < 0.0) - { T0 = 0.5 * pParam->BSIM4V4k1 / here->BSIM4V4k2; - here->BSIM4V4vbsc = 0.9 * (pParam->BSIM4V4phi - T0 * T0); - if (here->BSIM4V4vbsc > -3.0) - here->BSIM4V4vbsc = -3.0; - else if (here->BSIM4V4vbsc < -30.0) - here->BSIM4V4vbsc = -30.0; + here->BSIM4v4k2 = pParam->BSIM4v4k2 + dk2_lod; + if (here->BSIM4v4k2 < 0.0) + { T0 = 0.5 * pParam->BSIM4v4k1 / here->BSIM4v4k2; + here->BSIM4v4vbsc = 0.9 * (pParam->BSIM4v4phi - T0 * T0); + if (here->BSIM4v4vbsc > -3.0) + here->BSIM4v4vbsc = -3.0; + else if (here->BSIM4v4vbsc < -30.0) + here->BSIM4v4vbsc = -30.0; } else - here->BSIM4V4vbsc = -30.0; - if (here->BSIM4V4vbsc > pParam->BSIM4V4vbm) - here->BSIM4V4vbsc = pParam->BSIM4V4vbm; - here->BSIM4V4k2ox = here->BSIM4V4k2 * model->BSIM4V4toxe - / model->BSIM4V4toxm; + here->BSIM4v4vbsc = -30.0; + if (here->BSIM4v4vbsc > pParam->BSIM4v4vbm) + here->BSIM4v4vbsc = pParam->BSIM4v4vbm; + here->BSIM4v4k2ox = here->BSIM4v4k2 * model->BSIM4v4toxe + / model->BSIM4v4toxm; - here->BSIM4V4eta0 = pParam->BSIM4V4eta0 + deta0_lod; + here->BSIM4v4eta0 = pParam->BSIM4v4eta0 + deta0_lod; } else { - here->BSIM4V4u0temp = pParam->BSIM4V4u0temp; - here->BSIM4V4vth0 = pParam->BSIM4V4vth0; - here->BSIM4V4vsattemp = pParam->BSIM4V4vsattemp; - here->BSIM4V4vfb = pParam->BSIM4V4vfb; - here->BSIM4V4vfbzb = pParam->BSIM4V4vfbzb; - here->BSIM4V4vtfbphi1 = pParam->BSIM4V4vtfbphi1; - here->BSIM4V4vtfbphi2 = pParam->BSIM4V4vtfbphi2; - here->BSIM4V4k2 = pParam->BSIM4V4k2; - here->BSIM4V4vbsc = pParam->BSIM4V4vbsc; - here->BSIM4V4k2ox = pParam->BSIM4V4k2ox; - here->BSIM4V4eta0 = pParam->BSIM4V4eta0; + here->BSIM4v4u0temp = pParam->BSIM4v4u0temp; + here->BSIM4v4vth0 = pParam->BSIM4v4vth0; + here->BSIM4v4vsattemp = pParam->BSIM4v4vsattemp; + here->BSIM4v4vfb = pParam->BSIM4v4vfb; + here->BSIM4v4vfbzb = pParam->BSIM4v4vfbzb; + here->BSIM4v4vtfbphi1 = pParam->BSIM4v4vtfbphi1; + here->BSIM4v4vtfbphi2 = pParam->BSIM4v4vtfbphi2; + here->BSIM4v4k2 = pParam->BSIM4v4k2; + here->BSIM4v4vbsc = pParam->BSIM4v4vbsc; + here->BSIM4v4k2ox = pParam->BSIM4v4k2ox; + here->BSIM4v4eta0 = pParam->BSIM4v4eta0; } - here->BSIM4V4cgso = pParam->BSIM4V4cgso; - here->BSIM4V4cgdo = pParam->BSIM4V4cgdo; + here->BSIM4v4cgso = pParam->BSIM4v4cgso; + here->BSIM4v4cgdo = pParam->BSIM4v4cgdo; - if (here->BSIM4V4rbodyMod) - { if (here->BSIM4V4rbdb < 1.0e-3) - here->BSIM4V4grbdb = 1.0e3; /* in mho */ + if (here->BSIM4v4rbodyMod) + { if (here->BSIM4v4rbdb < 1.0e-3) + here->BSIM4v4grbdb = 1.0e3; /* in mho */ else - here->BSIM4V4grbdb = model->BSIM4V4gbmin + 1.0 / here->BSIM4V4rbdb; - if (here->BSIM4V4rbpb < 1.0e-3) - here->BSIM4V4grbpb = 1.0e3; + here->BSIM4v4grbdb = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbdb; + if (here->BSIM4v4rbpb < 1.0e-3) + here->BSIM4v4grbpb = 1.0e3; else - here->BSIM4V4grbpb = model->BSIM4V4gbmin + 1.0 / here->BSIM4V4rbpb; - if (here->BSIM4V4rbps < 1.0e-3) - here->BSIM4V4grbps = 1.0e3; + here->BSIM4v4grbpb = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbpb; + if (here->BSIM4v4rbps < 1.0e-3) + here->BSIM4v4grbps = 1.0e3; else - here->BSIM4V4grbps = model->BSIM4V4gbmin + 1.0 / here->BSIM4V4rbps; - if (here->BSIM4V4rbsb < 1.0e-3) - here->BSIM4V4grbsb = 1.0e3; + here->BSIM4v4grbps = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbps; + if (here->BSIM4v4rbsb < 1.0e-3) + here->BSIM4v4grbsb = 1.0e3; else - here->BSIM4V4grbsb = model->BSIM4V4gbmin + 1.0 / here->BSIM4V4rbsb; - if (here->BSIM4V4rbpd < 1.0e-3) - here->BSIM4V4grbpd = 1.0e3; + here->BSIM4v4grbsb = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbsb; + if (here->BSIM4v4rbpd < 1.0e-3) + here->BSIM4v4grbpd = 1.0e3; else - here->BSIM4V4grbpd = model->BSIM4V4gbmin + 1.0 / here->BSIM4V4rbpd; + here->BSIM4v4grbpd = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbpd; } @@ -1430,276 +1430,276 @@ int Size_Not_Found, i; * Process geomertry dependent parasitics */ - here->BSIM4V4grgeltd = model->BSIM4V4rshg * (model->BSIM4V4xgw - + pParam->BSIM4V4weffCJ / 3.0 / model->BSIM4V4ngcon) / - (model->BSIM4V4ngcon * here->BSIM4V4nf * - (Lnew - model->BSIM4V4xgl)); - if (here->BSIM4V4grgeltd > 0.0) - here->BSIM4V4grgeltd = 1.0 / here->BSIM4V4grgeltd; + here->BSIM4v4grgeltd = model->BSIM4v4rshg * (model->BSIM4v4xgw + + pParam->BSIM4v4weffCJ / 3.0 / model->BSIM4v4ngcon) / + (model->BSIM4v4ngcon * here->BSIM4v4nf * + (Lnew - model->BSIM4v4xgl)); + if (here->BSIM4v4grgeltd > 0.0) + here->BSIM4v4grgeltd = 1.0 / here->BSIM4v4grgeltd; else - { here->BSIM4V4grgeltd = 1.0e3; /* mho */ - if (here->BSIM4V4rgateMod != 0) + { here->BSIM4v4grgeltd = 1.0e3; /* mho */ + if (here->BSIM4v4rgateMod != 0) printf("Warning: The gate conductance reset to 1.0e3 mho.\n"); } - DMCGeff = model->BSIM4V4dmcg - model->BSIM4V4dmcgt; - DMCIeff = model->BSIM4V4dmci; - DMDGeff = model->BSIM4V4dmdg - model->BSIM4V4dmcgt; + DMCGeff = model->BSIM4v4dmcg - model->BSIM4v4dmcgt; + DMCIeff = model->BSIM4v4dmci; + DMDGeff = model->BSIM4v4dmdg - model->BSIM4v4dmcgt; - if (here->BSIM4V4sourcePerimeterGiven) - { if (model->BSIM4V4perMod == 0) - here->BSIM4V4Pseff = here->BSIM4V4sourcePerimeter; + if (here->BSIM4v4sourcePerimeterGiven) + { if (model->BSIM4v4perMod == 0) + here->BSIM4v4Pseff = here->BSIM4v4sourcePerimeter; else - here->BSIM4V4Pseff = here->BSIM4V4sourcePerimeter - - pParam->BSIM4V4weffCJ * here->BSIM4V4nf; + here->BSIM4v4Pseff = here->BSIM4v4sourcePerimeter + - pParam->BSIM4v4weffCJ * here->BSIM4v4nf; } else - BSIM4V4PAeffGeo(here->BSIM4V4nf, here->BSIM4V4geoMod, here->BSIM4V4min, - pParam->BSIM4V4weffCJ, DMCGeff, DMCIeff, DMDGeff, - &(here->BSIM4V4Pseff), &dumPd, &dumAs, &dumAd); + BSIM4v4PAeffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4min, + pParam->BSIM4v4weffCJ, DMCGeff, DMCIeff, DMDGeff, + &(here->BSIM4v4Pseff), &dumPd, &dumAs, &dumAd); - if (here->BSIM4V4drainPerimeterGiven) - { if (model->BSIM4V4perMod == 0) - here->BSIM4V4Pdeff = here->BSIM4V4drainPerimeter; + if (here->BSIM4v4drainPerimeterGiven) + { if (model->BSIM4v4perMod == 0) + here->BSIM4v4Pdeff = here->BSIM4v4drainPerimeter; else - here->BSIM4V4Pdeff = here->BSIM4V4drainPerimeter - - pParam->BSIM4V4weffCJ * here->BSIM4V4nf; + here->BSIM4v4Pdeff = here->BSIM4v4drainPerimeter + - pParam->BSIM4v4weffCJ * here->BSIM4v4nf; } else - BSIM4V4PAeffGeo(here->BSIM4V4nf, here->BSIM4V4geoMod, here->BSIM4V4min, - pParam->BSIM4V4weffCJ, DMCGeff, DMCIeff, DMDGeff, - &dumPs, &(here->BSIM4V4Pdeff), &dumAs, &dumAd); + BSIM4v4PAeffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4min, + pParam->BSIM4v4weffCJ, DMCGeff, DMCIeff, DMDGeff, + &dumPs, &(here->BSIM4v4Pdeff), &dumAs, &dumAd); - if (here->BSIM4V4sourceAreaGiven) - here->BSIM4V4Aseff = here->BSIM4V4sourceArea; + if (here->BSIM4v4sourceAreaGiven) + here->BSIM4v4Aseff = here->BSIM4v4sourceArea; else - BSIM4V4PAeffGeo(here->BSIM4V4nf, here->BSIM4V4geoMod, here->BSIM4V4min, - pParam->BSIM4V4weffCJ, DMCGeff, DMCIeff, DMDGeff, - &dumPs, &dumPd, &(here->BSIM4V4Aseff), &dumAd); + BSIM4v4PAeffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4min, + pParam->BSIM4v4weffCJ, DMCGeff, DMCIeff, DMDGeff, + &dumPs, &dumPd, &(here->BSIM4v4Aseff), &dumAd); - if (here->BSIM4V4drainAreaGiven) - here->BSIM4V4Adeff = here->BSIM4V4drainArea; + if (here->BSIM4v4drainAreaGiven) + here->BSIM4v4Adeff = here->BSIM4v4drainArea; else - BSIM4V4PAeffGeo(here->BSIM4V4nf, here->BSIM4V4geoMod, here->BSIM4V4min, - pParam->BSIM4V4weffCJ, DMCGeff, DMCIeff, DMDGeff, - &dumPs, &dumPd, &dumAs, &(here->BSIM4V4Adeff)); + BSIM4v4PAeffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4min, + pParam->BSIM4v4weffCJ, DMCGeff, DMCIeff, DMDGeff, + &dumPs, &dumPd, &dumAs, &(here->BSIM4v4Adeff)); /* Processing S/D resistance and conductance below */ - if(here->BSIM4V4sNodePrime != here->BSIM4V4sNode) + if(here->BSIM4v4sNodePrime != here->BSIM4v4sNode) { - here->BSIM4V4sourceConductance = 0.0; - if(here->BSIM4V4sourceSquaresGiven) + here->BSIM4v4sourceConductance = 0.0; + if(here->BSIM4v4sourceSquaresGiven) { - here->BSIM4V4sourceConductance = model->BSIM4V4sheetResistance - * here->BSIM4V4sourceSquares; - } else if (here->BSIM4V4rgeoMod > 0) + here->BSIM4v4sourceConductance = model->BSIM4v4sheetResistance + * here->BSIM4v4sourceSquares; + } else if (here->BSIM4v4rgeoMod > 0) { - BSIM4V4RdseffGeo(here->BSIM4V4nf, here->BSIM4V4geoMod, - here->BSIM4V4rgeoMod, here->BSIM4V4min, - pParam->BSIM4V4weffCJ, model->BSIM4V4sheetResistance, - DMCGeff, DMCIeff, DMDGeff, 1, &(here->BSIM4V4sourceConductance)); + BSIM4v4RdseffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, + here->BSIM4v4rgeoMod, here->BSIM4v4min, + pParam->BSIM4v4weffCJ, model->BSIM4v4sheetResistance, + DMCGeff, DMCIeff, DMDGeff, 1, &(here->BSIM4v4sourceConductance)); } else { - here->BSIM4V4sourceConductance = 0.0; + here->BSIM4v4sourceConductance = 0.0; } - if (here->BSIM4V4sourceConductance > 0.0) - here->BSIM4V4sourceConductance = 1.0 - / here->BSIM4V4sourceConductance; + if (here->BSIM4v4sourceConductance > 0.0) + here->BSIM4v4sourceConductance = 1.0 + / here->BSIM4v4sourceConductance; else { - here->BSIM4V4sourceConductance = 1.0e3; /* mho */ + here->BSIM4v4sourceConductance = 1.0e3; /* mho */ printf ("Warning: Source conductance reset to 1.0e3 mho.\n"); } } else { - here->BSIM4V4sourceConductance = 0.0; + here->BSIM4v4sourceConductance = 0.0; } - if(here->BSIM4V4dNodePrime != here->BSIM4V4dNode) + if(here->BSIM4v4dNodePrime != here->BSIM4v4dNode) { - here->BSIM4V4drainConductance = 0.0; - if(here->BSIM4V4drainSquaresGiven) + here->BSIM4v4drainConductance = 0.0; + if(here->BSIM4v4drainSquaresGiven) { - here->BSIM4V4drainConductance = model->BSIM4V4sheetResistance - * here->BSIM4V4drainSquares; - } else if (here->BSIM4V4rgeoMod > 0) + here->BSIM4v4drainConductance = model->BSIM4v4sheetResistance + * here->BSIM4v4drainSquares; + } else if (here->BSIM4v4rgeoMod > 0) { - BSIM4V4RdseffGeo(here->BSIM4V4nf, here->BSIM4V4geoMod, - here->BSIM4V4rgeoMod, here->BSIM4V4min, - pParam->BSIM4V4weffCJ, model->BSIM4V4sheetResistance, - DMCGeff, DMCIeff, DMDGeff, 0, &(here->BSIM4V4drainConductance)); + BSIM4v4RdseffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, + here->BSIM4v4rgeoMod, here->BSIM4v4min, + pParam->BSIM4v4weffCJ, model->BSIM4v4sheetResistance, + DMCGeff, DMCIeff, DMDGeff, 0, &(here->BSIM4v4drainConductance)); } else { - here->BSIM4V4drainConductance = 0.0; + here->BSIM4v4drainConductance = 0.0; } - if (here->BSIM4V4drainConductance > 0.0) - here->BSIM4V4drainConductance = 1.0 - / here->BSIM4V4drainConductance; + if (here->BSIM4v4drainConductance > 0.0) + here->BSIM4v4drainConductance = 1.0 + / here->BSIM4v4drainConductance; else { - here->BSIM4V4drainConductance = 1.0e3; /* mho */ + here->BSIM4v4drainConductance = 1.0e3; /* mho */ printf ("Warning: Drain conductance reset to 1.0e3 mho.\n"); } } else { - here->BSIM4V4drainConductance = 0.0; + here->BSIM4v4drainConductance = 0.0; } /* End of Rsd processing */ - Nvtms = model->BSIM4V4vtm * model->BSIM4V4SjctEmissionCoeff; - if ((here->BSIM4V4Aseff <= 0.0) && (here->BSIM4V4Pseff <= 0.0)) + Nvtms = model->BSIM4v4vtm * model->BSIM4v4SjctEmissionCoeff; + if ((here->BSIM4v4Aseff <= 0.0) && (here->BSIM4v4Pseff <= 0.0)) { SourceSatCurrent = 1.0e-14; } else - { SourceSatCurrent = here->BSIM4V4Aseff * model->BSIM4V4SjctTempSatCurDensity - + here->BSIM4V4Pseff * model->BSIM4V4SjctSidewallTempSatCurDensity - + pParam->BSIM4V4weffCJ * here->BSIM4V4nf - * model->BSIM4V4SjctGateSidewallTempSatCurDensity; + { SourceSatCurrent = here->BSIM4v4Aseff * model->BSIM4v4SjctTempSatCurDensity + + here->BSIM4v4Pseff * model->BSIM4v4SjctSidewallTempSatCurDensity + + pParam->BSIM4v4weffCJ * here->BSIM4v4nf + * model->BSIM4v4SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent > 0.0) - { switch(model->BSIM4V4dioMod) + { switch(model->BSIM4v4dioMod) { case 0: - if ((model->BSIM4V4bvs / Nvtms) > EXP_THRESHOLD) - here->BSIM4V4XExpBVS = model->BSIM4V4xjbvs * MIN_EXP; + if ((model->BSIM4v4bvs / Nvtms) > EXP_THRESHOLD) + here->BSIM4v4XExpBVS = model->BSIM4v4xjbvs * MIN_EXP; else - here->BSIM4V4XExpBVS = model->BSIM4V4xjbvs * exp(-model->BSIM4V4bvs / Nvtms); + here->BSIM4v4XExpBVS = model->BSIM4v4xjbvs * exp(-model->BSIM4v4bvs / Nvtms); break; case 1: - BSIM4V4DioIjthVjmEval(Nvtms, model->BSIM4V4ijthsfwd, SourceSatCurrent, - 0.0, &(here->BSIM4V4vjsmFwd)); - here->BSIM4V4IVjsmFwd = SourceSatCurrent * exp(here->BSIM4V4vjsmFwd / Nvtms); + BSIM4v4DioIjthVjmEval(Nvtms, model->BSIM4v4ijthsfwd, SourceSatCurrent, + 0.0, &(here->BSIM4v4vjsmFwd)); + here->BSIM4v4IVjsmFwd = SourceSatCurrent * exp(here->BSIM4v4vjsmFwd / Nvtms); break; case 2: - if ((model->BSIM4V4bvs / Nvtms) > EXP_THRESHOLD) - { here->BSIM4V4XExpBVS = model->BSIM4V4xjbvs * MIN_EXP; + if ((model->BSIM4v4bvs / Nvtms) > EXP_THRESHOLD) + { here->BSIM4v4XExpBVS = model->BSIM4v4xjbvs * MIN_EXP; tmp = MIN_EXP; } else - { here->BSIM4V4XExpBVS = exp(-model->BSIM4V4bvs / Nvtms); - tmp = here->BSIM4V4XExpBVS; - here->BSIM4V4XExpBVS *= model->BSIM4V4xjbvs; + { here->BSIM4v4XExpBVS = exp(-model->BSIM4v4bvs / Nvtms); + tmp = here->BSIM4v4XExpBVS; + here->BSIM4v4XExpBVS *= model->BSIM4v4xjbvs; } - BSIM4V4DioIjthVjmEval(Nvtms, model->BSIM4V4ijthsfwd, SourceSatCurrent, - here->BSIM4V4XExpBVS, &(here->BSIM4V4vjsmFwd)); - T0 = exp(here->BSIM4V4vjsmFwd / Nvtms); - here->BSIM4V4IVjsmFwd = SourceSatCurrent * (T0 - here->BSIM4V4XExpBVS / T0 - + here->BSIM4V4XExpBVS - 1.0); - here->BSIM4V4SslpFwd = SourceSatCurrent - * (T0 + here->BSIM4V4XExpBVS / T0) / Nvtms; + BSIM4v4DioIjthVjmEval(Nvtms, model->BSIM4v4ijthsfwd, SourceSatCurrent, + here->BSIM4v4XExpBVS, &(here->BSIM4v4vjsmFwd)); + T0 = exp(here->BSIM4v4vjsmFwd / Nvtms); + here->BSIM4v4IVjsmFwd = SourceSatCurrent * (T0 - here->BSIM4v4XExpBVS / T0 + + here->BSIM4v4XExpBVS - 1.0); + here->BSIM4v4SslpFwd = SourceSatCurrent + * (T0 + here->BSIM4v4XExpBVS / T0) / Nvtms; - T2 = model->BSIM4V4ijthsrev / SourceSatCurrent; + T2 = model->BSIM4v4ijthsrev / SourceSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthsrev too small and set to 10 times IsbSat.\n"); } - here->BSIM4V4vjsmRev = -model->BSIM4V4bvs - - Nvtms * log((T2 - 1.0) / model->BSIM4V4xjbvs); - T1 = model->BSIM4V4xjbvs * exp(-(model->BSIM4V4bvs - + here->BSIM4V4vjsmRev) / Nvtms); - here->BSIM4V4IVjsmRev = SourceSatCurrent * (1.0 + T1); - here->BSIM4V4SslpRev = -SourceSatCurrent * T1 / Nvtms; + here->BSIM4v4vjsmRev = -model->BSIM4v4bvs + - Nvtms * log((T2 - 1.0) / model->BSIM4v4xjbvs); + T1 = model->BSIM4v4xjbvs * exp(-(model->BSIM4v4bvs + + here->BSIM4v4vjsmRev) / Nvtms); + here->BSIM4v4IVjsmRev = SourceSatCurrent * (1.0 + T1); + here->BSIM4v4SslpRev = -SourceSatCurrent * T1 / Nvtms; break; default: - printf("Specified dioMod = %d not matched\n", model->BSIM4V4dioMod); + printf("Specified dioMod = %d not matched\n", model->BSIM4v4dioMod); } } - Nvtmd = model->BSIM4V4vtm * model->BSIM4V4DjctEmissionCoeff; - if ((here->BSIM4V4Adeff <= 0.0) && (here->BSIM4V4Pdeff <= 0.0)) + Nvtmd = model->BSIM4v4vtm * model->BSIM4v4DjctEmissionCoeff; + if ((here->BSIM4v4Adeff <= 0.0) && (here->BSIM4v4Pdeff <= 0.0)) { DrainSatCurrent = 1.0e-14; } else - { DrainSatCurrent = here->BSIM4V4Adeff * model->BSIM4V4DjctTempSatCurDensity - + here->BSIM4V4Pdeff * model->BSIM4V4DjctSidewallTempSatCurDensity - + pParam->BSIM4V4weffCJ * here->BSIM4V4nf - * model->BSIM4V4DjctGateSidewallTempSatCurDensity; + { DrainSatCurrent = here->BSIM4v4Adeff * model->BSIM4v4DjctTempSatCurDensity + + here->BSIM4v4Pdeff * model->BSIM4v4DjctSidewallTempSatCurDensity + + pParam->BSIM4v4weffCJ * here->BSIM4v4nf + * model->BSIM4v4DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent > 0.0) - { switch(model->BSIM4V4dioMod) + { switch(model->BSIM4v4dioMod) { case 0: - if ((model->BSIM4V4bvd / Nvtmd) > EXP_THRESHOLD) - here->BSIM4V4XExpBVD = model->BSIM4V4xjbvd * MIN_EXP; + if ((model->BSIM4v4bvd / Nvtmd) > EXP_THRESHOLD) + here->BSIM4v4XExpBVD = model->BSIM4v4xjbvd * MIN_EXP; else - here->BSIM4V4XExpBVD = model->BSIM4V4xjbvd * exp(-model->BSIM4V4bvd / Nvtmd); + here->BSIM4v4XExpBVD = model->BSIM4v4xjbvd * exp(-model->BSIM4v4bvd / Nvtmd); break; case 1: - BSIM4V4DioIjthVjmEval(Nvtmd, model->BSIM4V4ijthdfwd, DrainSatCurrent, - 0.0, &(here->BSIM4V4vjdmFwd)); - here->BSIM4V4IVjdmFwd = DrainSatCurrent * exp(here->BSIM4V4vjdmFwd / Nvtmd); + BSIM4v4DioIjthVjmEval(Nvtmd, model->BSIM4v4ijthdfwd, DrainSatCurrent, + 0.0, &(here->BSIM4v4vjdmFwd)); + here->BSIM4v4IVjdmFwd = DrainSatCurrent * exp(here->BSIM4v4vjdmFwd / Nvtmd); break; case 2: - if ((model->BSIM4V4bvd / Nvtmd) > EXP_THRESHOLD) - { here->BSIM4V4XExpBVD = model->BSIM4V4xjbvd * MIN_EXP; + if ((model->BSIM4v4bvd / Nvtmd) > EXP_THRESHOLD) + { here->BSIM4v4XExpBVD = model->BSIM4v4xjbvd * MIN_EXP; tmp = MIN_EXP; } else - { here->BSIM4V4XExpBVD = exp(-model->BSIM4V4bvd / Nvtmd); - tmp = here->BSIM4V4XExpBVD; - here->BSIM4V4XExpBVD *= model->BSIM4V4xjbvd; + { here->BSIM4v4XExpBVD = exp(-model->BSIM4v4bvd / Nvtmd); + tmp = here->BSIM4v4XExpBVD; + here->BSIM4v4XExpBVD *= model->BSIM4v4xjbvd; } - BSIM4V4DioIjthVjmEval(Nvtmd, model->BSIM4V4ijthdfwd, DrainSatCurrent, - here->BSIM4V4XExpBVD, &(here->BSIM4V4vjdmFwd)); - T0 = exp(here->BSIM4V4vjdmFwd / Nvtmd); - here->BSIM4V4IVjdmFwd = DrainSatCurrent * (T0 - here->BSIM4V4XExpBVD / T0 - + here->BSIM4V4XExpBVD - 1.0); - here->BSIM4V4DslpFwd = DrainSatCurrent - * (T0 + here->BSIM4V4XExpBVD / T0) / Nvtmd; + BSIM4v4DioIjthVjmEval(Nvtmd, model->BSIM4v4ijthdfwd, DrainSatCurrent, + here->BSIM4v4XExpBVD, &(here->BSIM4v4vjdmFwd)); + T0 = exp(here->BSIM4v4vjdmFwd / Nvtmd); + here->BSIM4v4IVjdmFwd = DrainSatCurrent * (T0 - here->BSIM4v4XExpBVD / T0 + + here->BSIM4v4XExpBVD - 1.0); + here->BSIM4v4DslpFwd = DrainSatCurrent + * (T0 + here->BSIM4v4XExpBVD / T0) / Nvtmd; - T2 = model->BSIM4V4ijthdrev / DrainSatCurrent; + T2 = model->BSIM4v4ijthdrev / DrainSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthdrev too small and set to 10 times IdbSat.\n"); } - here->BSIM4V4vjdmRev = -model->BSIM4V4bvd - - Nvtmd * log((T2 - 1.0) / model->BSIM4V4xjbvd); /* bugfix */ - T1 = model->BSIM4V4xjbvd * exp(-(model->BSIM4V4bvd - + here->BSIM4V4vjdmRev) / Nvtmd); - here->BSIM4V4IVjdmRev = DrainSatCurrent * (1.0 + T1); - here->BSIM4V4DslpRev = -DrainSatCurrent * T1 / Nvtmd; + here->BSIM4v4vjdmRev = -model->BSIM4v4bvd + - Nvtmd * log((T2 - 1.0) / model->BSIM4v4xjbvd); /* bugfix */ + T1 = model->BSIM4v4xjbvd * exp(-(model->BSIM4v4bvd + + here->BSIM4v4vjdmRev) / Nvtmd); + here->BSIM4v4IVjdmRev = DrainSatCurrent * (1.0 + T1); + here->BSIM4v4DslpRev = -DrainSatCurrent * T1 / Nvtmd; break; default: - printf("Specified dioMod = %d not matched\n", model->BSIM4V4dioMod); + printf("Specified dioMod = %d not matched\n", model->BSIM4v4dioMod); } } /* GEDL current reverse bias */ T0 = (TRatio - 1.0); - model->BSIM4V4njtstemp = model->BSIM4V4njts * (1.0 + model->BSIM4V4tnjts * T0); - model->BSIM4V4njtsswtemp = model->BSIM4V4njtssw * (1.0 + model->BSIM4V4tnjtssw * T0); - model->BSIM4V4njtsswgtemp = model->BSIM4V4njtsswg * (1.0 + model->BSIM4V4tnjtsswg * T0); - T7 = Eg0 / model->BSIM4V4vtm * T0; - T9 = model->BSIM4V4xtss * T7; + model->BSIM4v4njtstemp = model->BSIM4v4njts * (1.0 + model->BSIM4v4tnjts * T0); + model->BSIM4v4njtsswtemp = model->BSIM4v4njtssw * (1.0 + model->BSIM4v4tnjtssw * T0); + model->BSIM4v4njtsswgtemp = model->BSIM4v4njtsswg * (1.0 + model->BSIM4v4tnjtsswg * T0); + T7 = Eg0 / model->BSIM4v4vtm * T0; + T9 = model->BSIM4v4xtss * T7; DEXP(T9, T1); - T9 = model->BSIM4V4xtsd * T7; + T9 = model->BSIM4v4xtsd * T7; DEXP(T9, T2); - T9 = model->BSIM4V4xtssws * T7; + T9 = model->BSIM4v4xtssws * T7; DEXP(T9, T3); - T9 = model->BSIM4V4xtsswd * T7; + T9 = model->BSIM4v4xtsswd * T7; DEXP(T9, T4); - T9 = model->BSIM4V4xtsswgs * T7; + T9 = model->BSIM4v4xtsswgs * T7; DEXP(T9, T5); - T9 = model->BSIM4V4xtsswgd * T7; + T9 = model->BSIM4v4xtsswgd * T7; DEXP(T9, T6); - T10 = pParam->BSIM4V4weffCJ * here->BSIM4V4nf; - here->BSIM4V4SjctTempRevSatCur = T1 * here->BSIM4V4Aseff * model->BSIM4V4jtss; - here->BSIM4V4DjctTempRevSatCur = T2 * here->BSIM4V4Adeff * model->BSIM4V4jtsd; - here->BSIM4V4SswTempRevSatCur = T3 * here->BSIM4V4Pseff * model->BSIM4V4jtssws; - here->BSIM4V4DswTempRevSatCur = T4 * here->BSIM4V4Pdeff * model->BSIM4V4jtsswd; - here->BSIM4V4SswgTempRevSatCur = T5 * T10 * model->BSIM4V4jtsswgs; - here->BSIM4V4DswgTempRevSatCur = T6 * T10 * model->BSIM4V4jtsswgd; + T10 = pParam->BSIM4v4weffCJ * here->BSIM4v4nf; + here->BSIM4v4SjctTempRevSatCur = T1 * here->BSIM4v4Aseff * model->BSIM4v4jtss; + here->BSIM4v4DjctTempRevSatCur = T2 * here->BSIM4v4Adeff * model->BSIM4v4jtsd; + here->BSIM4v4SswTempRevSatCur = T3 * here->BSIM4v4Pseff * model->BSIM4v4jtssws; + here->BSIM4v4DswTempRevSatCur = T4 * here->BSIM4v4Pdeff * model->BSIM4v4jtsswd; + here->BSIM4v4SswgTempRevSatCur = T5 * T10 * model->BSIM4v4jtsswgs; + here->BSIM4v4DswgTempRevSatCur = T6 * T10 * model->BSIM4v4jtsswgd; - if (BSIM4V4checkModel(model, here, ckt)) + if (BSIM4v4checkModel(model, here, ckt)) { IFuid namarray[2]; - namarray[0] = model->BSIM4V4modName; - namarray[1] = here->BSIM4V4name; + namarray[0] = model->BSIM4v4modName; + namarray[1] = here->BSIM4v4name; (*(SPfrontEnd->IFerror)) (ERR_FATAL, "Fatal error(s) detected during BSIM4.4.0 parameter checking for %s in model %s", namarray); return(E_BADPARM); } diff --git a/src/spicelib/devices/bsim4v4/b4v4trunc.c b/src/spicelib/devices/bsim4v4/b4v4trunc.c index ca4df4653..898428f78 100644 --- a/src/spicelib/devices/bsim4v4/b4v4trunc.c +++ b/src/spicelib/devices/bsim4v4/b4v4trunc.c @@ -15,41 +15,41 @@ #include "suffix.h" int -BSIM4V4trunc(inModel,ckt,timeStep) +BSIM4v4trunc(inModel,ckt,timeStep) GENmodel *inModel; CKTcircuit *ckt; double *timeStep; { -BSIM4V4model *model = (BSIM4V4model*)inModel; -BSIM4V4instance *here; +BSIM4v4model *model = (BSIM4v4model*)inModel; +BSIM4v4instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ - for (; model != NULL; model = model->BSIM4V4nextModel) - { for (here = model->BSIM4V4instances; here != NULL; - here = here->BSIM4V4nextInstance) + for (; model != NULL; model = model->BSIM4v4nextModel) + { for (here = model->BSIM4v4instances; here != NULL; + here = here->BSIM4v4nextInstance) { - if (here->BSIM4V4owner != ARCHme) continue; + if (here->BSIM4v4owner != ARCHme) continue; #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ - CKTterr(here->BSIM4V4qb,ckt,timeStep); - CKTterr(here->BSIM4V4qg,ckt,timeStep); - CKTterr(here->BSIM4V4qd,ckt,timeStep); - if (here->BSIM4V4trnqsMod) - CKTterr(here->BSIM4V4qcdump,ckt,timeStep); - if (here->BSIM4V4rbodyMod) - { CKTterr(here->BSIM4V4qbs,ckt,timeStep); - CKTterr(here->BSIM4V4qbd,ckt,timeStep); + CKTterr(here->BSIM4v4qb,ckt,timeStep); + CKTterr(here->BSIM4v4qg,ckt,timeStep); + CKTterr(here->BSIM4v4qd,ckt,timeStep); + if (here->BSIM4v4trnqsMod) + CKTterr(here->BSIM4v4qcdump,ckt,timeStep); + if (here->BSIM4v4rbodyMod) + { CKTterr(here->BSIM4v4qbs,ckt,timeStep); + CKTterr(here->BSIM4v4qbd,ckt,timeStep); } - if (here->BSIM4V4rgateMod == 3) - CKTterr(here->BSIM4V4qgmid,ckt,timeStep); + if (here->BSIM4v4rgateMod == 3) + CKTterr(here->BSIM4v4qgmid,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", - here->BSIM4V4name,debugtemp,*timeStep); + here->BSIM4v4name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } diff --git a/src/spicelib/devices/bsim4v4/bsim4v4def.h b/src/spicelib/devices/bsim4v4/bsim4v4def.h index 17bbb1c5d..7829005a6 100644 --- a/src/spicelib/devices/bsim4v4/bsim4v4def.h +++ b/src/spicelib/devices/bsim4v4/bsim4v4def.h @@ -16,412 +16,412 @@ File: bsim4v4def.h #include "complex.h" #include "noisedef.h" -typedef struct sBSIM4V4instance +typedef struct sBSIM4v4instance { - struct sBSIM4V4model *BSIM4V4modPtr; - struct sBSIM4V4instance *BSIM4V4nextInstance; - IFuid BSIM4V4name; - int BSIM4V4owner; /* Number of owner process */ - int BSIM4V4states; /* index into state table for this device */ - int BSIM4V4dNode; - int BSIM4V4gNodeExt; - int BSIM4V4sNode; - int BSIM4V4bNode; - int BSIM4V4dNodePrime; - int BSIM4V4gNodePrime; - int BSIM4V4gNodeMid; - int BSIM4V4sNodePrime; - int BSIM4V4bNodePrime; - int BSIM4V4dbNode; - int BSIM4V4sbNode; - int BSIM4V4qNode; - - double BSIM4V4ueff; - double BSIM4V4thetavth; - double BSIM4V4von; - double BSIM4V4vdsat; - double BSIM4V4cgdo; - double BSIM4V4qgdo; - double BSIM4V4cgso; - double BSIM4V4qgso; - double BSIM4V4grbsb; - double BSIM4V4grbdb; - double BSIM4V4grbpb; - double BSIM4V4grbps; - double BSIM4V4grbpd; - - double BSIM4V4vjsmFwd; - double BSIM4V4vjsmRev; - double BSIM4V4vjdmFwd; - double BSIM4V4vjdmRev; - double BSIM4V4XExpBVS; - double BSIM4V4XExpBVD; - double BSIM4V4SslpFwd; - double BSIM4V4SslpRev; - double BSIM4V4DslpFwd; - double BSIM4V4DslpRev; - double BSIM4V4IVjsmFwd; - double BSIM4V4IVjsmRev; - double BSIM4V4IVjdmFwd; - double BSIM4V4IVjdmRev; - - double BSIM4V4grgeltd; - double BSIM4V4Pseff; - double BSIM4V4Pdeff; - double BSIM4V4Aseff; - double BSIM4V4Adeff; - - double BSIM4V4l; - double BSIM4V4w; - double BSIM4V4drainArea; - double BSIM4V4sourceArea; - double BSIM4V4drainSquares; - double BSIM4V4sourceSquares; - double BSIM4V4drainPerimeter; - double BSIM4V4sourcePerimeter; - double BSIM4V4sourceConductance; - double BSIM4V4drainConductance; + struct sBSIM4v4model *BSIM4v4modPtr; + struct sBSIM4v4instance *BSIM4v4nextInstance; + IFuid BSIM4v4name; + int BSIM4v4owner; /* Number of owner process */ + int BSIM4v4states; /* index into state table for this device */ + int BSIM4v4dNode; + int BSIM4v4gNodeExt; + int BSIM4v4sNode; + int BSIM4v4bNode; + int BSIM4v4dNodePrime; + int BSIM4v4gNodePrime; + int BSIM4v4gNodeMid; + int BSIM4v4sNodePrime; + int BSIM4v4bNodePrime; + int BSIM4v4dbNode; + int BSIM4v4sbNode; + int BSIM4v4qNode; + + double BSIM4v4ueff; + double BSIM4v4thetavth; + double BSIM4v4von; + double BSIM4v4vdsat; + double BSIM4v4cgdo; + double BSIM4v4qgdo; + double BSIM4v4cgso; + double BSIM4v4qgso; + double BSIM4v4grbsb; + double BSIM4v4grbdb; + double BSIM4v4grbpb; + double BSIM4v4grbps; + double BSIM4v4grbpd; + + double BSIM4v4vjsmFwd; + double BSIM4v4vjsmRev; + double BSIM4v4vjdmFwd; + double BSIM4v4vjdmRev; + double BSIM4v4XExpBVS; + double BSIM4v4XExpBVD; + double BSIM4v4SslpFwd; + double BSIM4v4SslpRev; + double BSIM4v4DslpFwd; + double BSIM4v4DslpRev; + double BSIM4v4IVjsmFwd; + double BSIM4v4IVjsmRev; + double BSIM4v4IVjdmFwd; + double BSIM4v4IVjdmRev; + + double BSIM4v4grgeltd; + double BSIM4v4Pseff; + double BSIM4v4Pdeff; + double BSIM4v4Aseff; + double BSIM4v4Adeff; + + double BSIM4v4l; + double BSIM4v4w; + double BSIM4v4drainArea; + double BSIM4v4sourceArea; + double BSIM4v4drainSquares; + double BSIM4v4sourceSquares; + double BSIM4v4drainPerimeter; + double BSIM4v4sourcePerimeter; + double BSIM4v4sourceConductance; + double BSIM4v4drainConductance; /* stress effect instance param */ - double BSIM4V4sa; - double BSIM4V4sb; - double BSIM4V4sd; + double BSIM4v4sa; + double BSIM4v4sb; + double BSIM4v4sd; - double BSIM4V4rbdb; - double BSIM4V4rbsb; - double BSIM4V4rbpb; - double BSIM4V4rbps; - double BSIM4V4rbpd; + double BSIM4v4rbdb; + double BSIM4v4rbsb; + double BSIM4v4rbpb; + double BSIM4v4rbps; + double BSIM4v4rbpd; /* added here to account stress effect instance dependence */ - double BSIM4V4u0temp; - double BSIM4V4vsattemp; - double BSIM4V4vth0; - double BSIM4V4vfb; - double BSIM4V4vfbzb; - double BSIM4V4vtfbphi1; - double BSIM4V4vtfbphi2; - double BSIM4V4k2; - double BSIM4V4vbsc; - double BSIM4V4k2ox; - double BSIM4V4eta0; - - double BSIM4V4icVDS; - double BSIM4V4icVGS; - double BSIM4V4icVBS; - double BSIM4V4nf; - double BSIM4V4m; - int BSIM4V4off; - int BSIM4V4mode; - int BSIM4V4trnqsMod; - int BSIM4V4acnqsMod; - int BSIM4V4rbodyMod; - int BSIM4V4rgateMod; - int BSIM4V4geoMod; - int BSIM4V4rgeoMod; - int BSIM4V4min; + double BSIM4v4u0temp; + double BSIM4v4vsattemp; + double BSIM4v4vth0; + double BSIM4v4vfb; + double BSIM4v4vfbzb; + double BSIM4v4vtfbphi1; + double BSIM4v4vtfbphi2; + double BSIM4v4k2; + double BSIM4v4vbsc; + double BSIM4v4k2ox; + double BSIM4v4eta0; + + double BSIM4v4icVDS; + double BSIM4v4icVGS; + double BSIM4v4icVBS; + double BSIM4v4nf; + double BSIM4v4m; + int BSIM4v4off; + int BSIM4v4mode; + int BSIM4v4trnqsMod; + int BSIM4v4acnqsMod; + int BSIM4v4rbodyMod; + int BSIM4v4rgateMod; + int BSIM4v4geoMod; + int BSIM4v4rgeoMod; + int BSIM4v4min; /* OP point */ - double BSIM4V4Vgsteff; - double BSIM4V4vgs_eff; - double BSIM4V4vgd_eff; - double BSIM4V4dvgs_eff_dvg; - double BSIM4V4dvgd_eff_dvg; - double BSIM4V4Vdseff; - double BSIM4V4nstar; - double BSIM4V4Abulk; - double BSIM4V4EsatL; - double BSIM4V4AbovVgst2Vtm; - double BSIM4V4qinv; - double BSIM4V4cd; - double BSIM4V4cbs; - double BSIM4V4cbd; - double BSIM4V4csub; - double BSIM4V4Igidl; - double BSIM4V4Igisl; - double BSIM4V4gm; - double BSIM4V4gds; - double BSIM4V4gmbs; - double BSIM4V4gbd; - double BSIM4V4gbs; - - double BSIM4V4gbbs; - double BSIM4V4gbgs; - double BSIM4V4gbds; - double BSIM4V4ggidld; - double BSIM4V4ggidlg; - double BSIM4V4ggidls; - double BSIM4V4ggidlb; - double BSIM4V4ggisld; - double BSIM4V4ggislg; - double BSIM4V4ggisls; - double BSIM4V4ggislb; - - double BSIM4V4Igcs; - double BSIM4V4gIgcsg; - double BSIM4V4gIgcsd; - double BSIM4V4gIgcss; - double BSIM4V4gIgcsb; - double BSIM4V4Igcd; - double BSIM4V4gIgcdg; - double BSIM4V4gIgcdd; - double BSIM4V4gIgcds; - double BSIM4V4gIgcdb; - - double BSIM4V4Igs; - double BSIM4V4gIgsg; - double BSIM4V4gIgss; - double BSIM4V4Igd; - double BSIM4V4gIgdg; - double BSIM4V4gIgdd; - - double BSIM4V4Igb; - double BSIM4V4gIgbg; - double BSIM4V4gIgbd; - double BSIM4V4gIgbs; - double BSIM4V4gIgbb; - - double BSIM4V4grdsw; - double BSIM4V4IdovVds; - double BSIM4V4gcrg; - double BSIM4V4gcrgd; - double BSIM4V4gcrgg; - double BSIM4V4gcrgs; - double BSIM4V4gcrgb; - - double BSIM4V4gstot; - double BSIM4V4gstotd; - double BSIM4V4gstotg; - double BSIM4V4gstots; - double BSIM4V4gstotb; - - double BSIM4V4gdtot; - double BSIM4V4gdtotd; - double BSIM4V4gdtotg; - double BSIM4V4gdtots; - double BSIM4V4gdtotb; - - double BSIM4V4cggb; - double BSIM4V4cgdb; - double BSIM4V4cgsb; - double BSIM4V4cbgb; - double BSIM4V4cbdb; - double BSIM4V4cbsb; - double BSIM4V4cdgb; - double BSIM4V4cddb; - double BSIM4V4cdsb; - double BSIM4V4csgb; - double BSIM4V4csdb; - double BSIM4V4cssb; - double BSIM4V4cgbb; - double BSIM4V4cdbb; - double BSIM4V4csbb; - double BSIM4V4cbbb; - double BSIM4V4capbd; - double BSIM4V4capbs; - - double BSIM4V4cqgb; - double BSIM4V4cqdb; - double BSIM4V4cqsb; - double BSIM4V4cqbb; - - double BSIM4V4qgate; - double BSIM4V4qbulk; - double BSIM4V4qdrn; - double BSIM4V4qsrc; - - double BSIM4V4qchqs; - double BSIM4V4taunet; - double BSIM4V4gtau; - double BSIM4V4gtg; - double BSIM4V4gtd; - double BSIM4V4gts; - double BSIM4V4gtb; - double BSIM4V4SjctTempRevSatCur; - double BSIM4V4DjctTempRevSatCur; - double BSIM4V4SswTempRevSatCur; - double BSIM4V4DswTempRevSatCur; - double BSIM4V4SswgTempRevSatCur; - double BSIM4V4DswgTempRevSatCur; + double BSIM4v4Vgsteff; + double BSIM4v4vgs_eff; + double BSIM4v4vgd_eff; + double BSIM4v4dvgs_eff_dvg; + double BSIM4v4dvgd_eff_dvg; + double BSIM4v4Vdseff; + double BSIM4v4nstar; + double BSIM4v4Abulk; + double BSIM4v4EsatL; + double BSIM4v4AbovVgst2Vtm; + double BSIM4v4qinv; + double BSIM4v4cd; + double BSIM4v4cbs; + double BSIM4v4cbd; + double BSIM4v4csub; + double BSIM4v4Igidl; + double BSIM4v4Igisl; + double BSIM4v4gm; + double BSIM4v4gds; + double BSIM4v4gmbs; + double BSIM4v4gbd; + double BSIM4v4gbs; + + double BSIM4v4gbbs; + double BSIM4v4gbgs; + double BSIM4v4gbds; + double BSIM4v4ggidld; + double BSIM4v4ggidlg; + double BSIM4v4ggidls; + double BSIM4v4ggidlb; + double BSIM4v4ggisld; + double BSIM4v4ggislg; + double BSIM4v4ggisls; + double BSIM4v4ggislb; + + double BSIM4v4Igcs; + double BSIM4v4gIgcsg; + double BSIM4v4gIgcsd; + double BSIM4v4gIgcss; + double BSIM4v4gIgcsb; + double BSIM4v4Igcd; + double BSIM4v4gIgcdg; + double BSIM4v4gIgcdd; + double BSIM4v4gIgcds; + double BSIM4v4gIgcdb; + + double BSIM4v4Igs; + double BSIM4v4gIgsg; + double BSIM4v4gIgss; + double BSIM4v4Igd; + double BSIM4v4gIgdg; + double BSIM4v4gIgdd; + + double BSIM4v4Igb; + double BSIM4v4gIgbg; + double BSIM4v4gIgbd; + double BSIM4v4gIgbs; + double BSIM4v4gIgbb; + + double BSIM4v4grdsw; + double BSIM4v4IdovVds; + double BSIM4v4gcrg; + double BSIM4v4gcrgd; + double BSIM4v4gcrgg; + double BSIM4v4gcrgs; + double BSIM4v4gcrgb; + + double BSIM4v4gstot; + double BSIM4v4gstotd; + double BSIM4v4gstotg; + double BSIM4v4gstots; + double BSIM4v4gstotb; + + double BSIM4v4gdtot; + double BSIM4v4gdtotd; + double BSIM4v4gdtotg; + double BSIM4v4gdtots; + double BSIM4v4gdtotb; + + double BSIM4v4cggb; + double BSIM4v4cgdb; + double BSIM4v4cgsb; + double BSIM4v4cbgb; + double BSIM4v4cbdb; + double BSIM4v4cbsb; + double BSIM4v4cdgb; + double BSIM4v4cddb; + double BSIM4v4cdsb; + double BSIM4v4csgb; + double BSIM4v4csdb; + double BSIM4v4cssb; + double BSIM4v4cgbb; + double BSIM4v4cdbb; + double BSIM4v4csbb; + double BSIM4v4cbbb; + double BSIM4v4capbd; + double BSIM4v4capbs; + + double BSIM4v4cqgb; + double BSIM4v4cqdb; + double BSIM4v4cqsb; + double BSIM4v4cqbb; + + double BSIM4v4qgate; + double BSIM4v4qbulk; + double BSIM4v4qdrn; + double BSIM4v4qsrc; + + double BSIM4v4qchqs; + double BSIM4v4taunet; + double BSIM4v4gtau; + double BSIM4v4gtg; + double BSIM4v4gtd; + double BSIM4v4gts; + double BSIM4v4gtb; + double BSIM4v4SjctTempRevSatCur; + double BSIM4v4DjctTempRevSatCur; + double BSIM4v4SswTempRevSatCur; + double BSIM4v4DswTempRevSatCur; + double BSIM4v4SswgTempRevSatCur; + double BSIM4v4DswgTempRevSatCur; struct bsim4SizeDependParam *pParam; - unsigned BSIM4V4lGiven :1; - unsigned BSIM4V4wGiven :1; - unsigned BSIM4V4mGiven :1; - unsigned BSIM4V4nfGiven :1; - unsigned BSIM4V4minGiven :1; - unsigned BSIM4V4drainAreaGiven :1; - unsigned BSIM4V4sourceAreaGiven :1; - unsigned BSIM4V4drainSquaresGiven :1; - unsigned BSIM4V4sourceSquaresGiven :1; - unsigned BSIM4V4drainPerimeterGiven :1; - unsigned BSIM4V4sourcePerimeterGiven :1; - unsigned BSIM4V4saGiven :1; - unsigned BSIM4V4sbGiven :1; - unsigned BSIM4V4sdGiven :1; - unsigned BSIM4V4rbdbGiven :1; - unsigned BSIM4V4rbsbGiven :1; - unsigned BSIM4V4rbpbGiven :1; - unsigned BSIM4V4rbpdGiven :1; - unsigned BSIM4V4rbpsGiven :1; - unsigned BSIM4V4icVDSGiven :1; - unsigned BSIM4V4icVGSGiven :1; - unsigned BSIM4V4icVBSGiven :1; - unsigned BSIM4V4trnqsModGiven :1; - unsigned BSIM4V4acnqsModGiven :1; - unsigned BSIM4V4rbodyModGiven :1; - unsigned BSIM4V4rgateModGiven :1; - unsigned BSIM4V4geoModGiven :1; - unsigned BSIM4V4rgeoModGiven :1; - - - double *BSIM4V4DPdPtr; - double *BSIM4V4DPdpPtr; - double *BSIM4V4DPgpPtr; - double *BSIM4V4DPgmPtr; - double *BSIM4V4DPspPtr; - double *BSIM4V4DPbpPtr; - double *BSIM4V4DPdbPtr; - - double *BSIM4V4DdPtr; - double *BSIM4V4DdpPtr; - - double *BSIM4V4GPdpPtr; - double *BSIM4V4GPgpPtr; - double *BSIM4V4GPgmPtr; - double *BSIM4V4GPgePtr; - double *BSIM4V4GPspPtr; - double *BSIM4V4GPbpPtr; - - double *BSIM4V4GMdpPtr; - double *BSIM4V4GMgpPtr; - double *BSIM4V4GMgmPtr; - double *BSIM4V4GMgePtr; - double *BSIM4V4GMspPtr; - double *BSIM4V4GMbpPtr; - - double *BSIM4V4GEdpPtr; - double *BSIM4V4GEgpPtr; - double *BSIM4V4GEgmPtr; - double *BSIM4V4GEgePtr; - double *BSIM4V4GEspPtr; - double *BSIM4V4GEbpPtr; - - double *BSIM4V4SPdpPtr; - double *BSIM4V4SPgpPtr; - double *BSIM4V4SPgmPtr; - double *BSIM4V4SPsPtr; - double *BSIM4V4SPspPtr; - double *BSIM4V4SPbpPtr; - double *BSIM4V4SPsbPtr; - - double *BSIM4V4SspPtr; - double *BSIM4V4SsPtr; - - double *BSIM4V4BPdpPtr; - double *BSIM4V4BPgpPtr; - double *BSIM4V4BPgmPtr; - double *BSIM4V4BPspPtr; - double *BSIM4V4BPdbPtr; - double *BSIM4V4BPbPtr; - double *BSIM4V4BPsbPtr; - double *BSIM4V4BPbpPtr; - - double *BSIM4V4DBdpPtr; - double *BSIM4V4DBdbPtr; - double *BSIM4V4DBbpPtr; - double *BSIM4V4DBbPtr; - - double *BSIM4V4SBspPtr; - double *BSIM4V4SBbpPtr; - double *BSIM4V4SBbPtr; - double *BSIM4V4SBsbPtr; - - double *BSIM4V4BdbPtr; - double *BSIM4V4BbpPtr; - double *BSIM4V4BsbPtr; - double *BSIM4V4BbPtr; - - double *BSIM4V4DgpPtr; - double *BSIM4V4DspPtr; - double *BSIM4V4DbpPtr; - double *BSIM4V4SdpPtr; - double *BSIM4V4SgpPtr; - double *BSIM4V4SbpPtr; - - double *BSIM4V4QdpPtr; - double *BSIM4V4QgpPtr; - double *BSIM4V4QspPtr; - double *BSIM4V4QbpPtr; - double *BSIM4V4QqPtr; - double *BSIM4V4DPqPtr; - double *BSIM4V4GPqPtr; - double *BSIM4V4SPqPtr; - - -#define BSIM4V4vbd BSIM4V4states+ 0 -#define BSIM4V4vbs BSIM4V4states+ 1 -#define BSIM4V4vgs BSIM4V4states+ 2 -#define BSIM4V4vds BSIM4V4states+ 3 -#define BSIM4V4vdbs BSIM4V4states+ 4 -#define BSIM4V4vdbd BSIM4V4states+ 5 -#define BSIM4V4vsbs BSIM4V4states+ 6 -#define BSIM4V4vges BSIM4V4states+ 7 -#define BSIM4V4vgms BSIM4V4states+ 8 -#define BSIM4V4vses BSIM4V4states+ 9 -#define BSIM4V4vdes BSIM4V4states+ 10 - -#define BSIM4V4qb BSIM4V4states+ 11 -#define BSIM4V4cqb BSIM4V4states+ 12 -#define BSIM4V4qg BSIM4V4states+ 13 -#define BSIM4V4cqg BSIM4V4states+ 14 -#define BSIM4V4qd BSIM4V4states+ 15 -#define BSIM4V4cqd BSIM4V4states+ 16 -#define BSIM4V4qgmid BSIM4V4states+ 17 -#define BSIM4V4cqgmid BSIM4V4states+ 18 - -#define BSIM4V4qbs BSIM4V4states+ 19 -#define BSIM4V4cqbs BSIM4V4states+ 20 -#define BSIM4V4qbd BSIM4V4states+ 21 -#define BSIM4V4cqbd BSIM4V4states+ 22 - -#define BSIM4V4qcheq BSIM4V4states+ 23 -#define BSIM4V4cqcheq BSIM4V4states+ 24 -#define BSIM4V4qcdump BSIM4V4states+ 25 -#define BSIM4V4cqcdump BSIM4V4states+ 26 -#define BSIM4V4qdef BSIM4V4states+ 27 -#define BSIM4V4qs BSIM4V4states+ 28 - -#define BSIM4V4numStates 29 - - -/* indices to the array of BSIM4V4 NOISE SOURCES */ - -#define BSIM4V4RDNOIZ 0 -#define BSIM4V4RSNOIZ 1 -#define BSIM4V4RGNOIZ 2 -#define BSIM4V4RBPSNOIZ 3 -#define BSIM4V4RBPDNOIZ 4 -#define BSIM4V4RBPBNOIZ 5 -#define BSIM4V4RBSBNOIZ 6 -#define BSIM4V4RBDBNOIZ 7 -#define BSIM4V4IDNOIZ 8 -#define BSIM4V4FLNOIZ 9 -#define BSIM4V4IGSNOIZ 10 -#define BSIM4V4IGDNOIZ 11 -#define BSIM4V4IGBNOIZ 12 -#define BSIM4V4TOTNOIZ 13 - -#define BSIM4V4NSRCS 14 /* Number of BSIM4V4 noise sources */ + unsigned BSIM4v4lGiven :1; + unsigned BSIM4v4wGiven :1; + unsigned BSIM4v4mGiven :1; + unsigned BSIM4v4nfGiven :1; + unsigned BSIM4v4minGiven :1; + unsigned BSIM4v4drainAreaGiven :1; + unsigned BSIM4v4sourceAreaGiven :1; + unsigned BSIM4v4drainSquaresGiven :1; + unsigned BSIM4v4sourceSquaresGiven :1; + unsigned BSIM4v4drainPerimeterGiven :1; + unsigned BSIM4v4sourcePerimeterGiven :1; + unsigned BSIM4v4saGiven :1; + unsigned BSIM4v4sbGiven :1; + unsigned BSIM4v4sdGiven :1; + unsigned BSIM4v4rbdbGiven :1; + unsigned BSIM4v4rbsbGiven :1; + unsigned BSIM4v4rbpbGiven :1; + unsigned BSIM4v4rbpdGiven :1; + unsigned BSIM4v4rbpsGiven :1; + unsigned BSIM4v4icVDSGiven :1; + unsigned BSIM4v4icVGSGiven :1; + unsigned BSIM4v4icVBSGiven :1; + unsigned BSIM4v4trnqsModGiven :1; + unsigned BSIM4v4acnqsModGiven :1; + unsigned BSIM4v4rbodyModGiven :1; + unsigned BSIM4v4rgateModGiven :1; + unsigned BSIM4v4geoModGiven :1; + unsigned BSIM4v4rgeoModGiven :1; + + + double *BSIM4v4DPdPtr; + double *BSIM4v4DPdpPtr; + double *BSIM4v4DPgpPtr; + double *BSIM4v4DPgmPtr; + double *BSIM4v4DPspPtr; + double *BSIM4v4DPbpPtr; + double *BSIM4v4DPdbPtr; + + double *BSIM4v4DdPtr; + double *BSIM4v4DdpPtr; + + double *BSIM4v4GPdpPtr; + double *BSIM4v4GPgpPtr; + double *BSIM4v4GPgmPtr; + double *BSIM4v4GPgePtr; + double *BSIM4v4GPspPtr; + double *BSIM4v4GPbpPtr; + + double *BSIM4v4GMdpPtr; + double *BSIM4v4GMgpPtr; + double *BSIM4v4GMgmPtr; + double *BSIM4v4GMgePtr; + double *BSIM4v4GMspPtr; + double *BSIM4v4GMbpPtr; + + double *BSIM4v4GEdpPtr; + double *BSIM4v4GEgpPtr; + double *BSIM4v4GEgmPtr; + double *BSIM4v4GEgePtr; + double *BSIM4v4GEspPtr; + double *BSIM4v4GEbpPtr; + + double *BSIM4v4SPdpPtr; + double *BSIM4v4SPgpPtr; + double *BSIM4v4SPgmPtr; + double *BSIM4v4SPsPtr; + double *BSIM4v4SPspPtr; + double *BSIM4v4SPbpPtr; + double *BSIM4v4SPsbPtr; + + double *BSIM4v4SspPtr; + double *BSIM4v4SsPtr; + + double *BSIM4v4BPdpPtr; + double *BSIM4v4BPgpPtr; + double *BSIM4v4BPgmPtr; + double *BSIM4v4BPspPtr; + double *BSIM4v4BPdbPtr; + double *BSIM4v4BPbPtr; + double *BSIM4v4BPsbPtr; + double *BSIM4v4BPbpPtr; + + double *BSIM4v4DBdpPtr; + double *BSIM4v4DBdbPtr; + double *BSIM4v4DBbpPtr; + double *BSIM4v4DBbPtr; + + double *BSIM4v4SBspPtr; + double *BSIM4v4SBbpPtr; + double *BSIM4v4SBbPtr; + double *BSIM4v4SBsbPtr; + + double *BSIM4v4BdbPtr; + double *BSIM4v4BbpPtr; + double *BSIM4v4BsbPtr; + double *BSIM4v4BbPtr; + + double *BSIM4v4DgpPtr; + double *BSIM4v4DspPtr; + double *BSIM4v4DbpPtr; + double *BSIM4v4SdpPtr; + double *BSIM4v4SgpPtr; + double *BSIM4v4SbpPtr; + + double *BSIM4v4QdpPtr; + double *BSIM4v4QgpPtr; + double *BSIM4v4QspPtr; + double *BSIM4v4QbpPtr; + double *BSIM4v4QqPtr; + double *BSIM4v4DPqPtr; + double *BSIM4v4GPqPtr; + double *BSIM4v4SPqPtr; + + +#define BSIM4v4vbd BSIM4v4states+ 0 +#define BSIM4v4vbs BSIM4v4states+ 1 +#define BSIM4v4vgs BSIM4v4states+ 2 +#define BSIM4v4vds BSIM4v4states+ 3 +#define BSIM4v4vdbs BSIM4v4states+ 4 +#define BSIM4v4vdbd BSIM4v4states+ 5 +#define BSIM4v4vsbs BSIM4v4states+ 6 +#define BSIM4v4vges BSIM4v4states+ 7 +#define BSIM4v4vgms BSIM4v4states+ 8 +#define BSIM4v4vses BSIM4v4states+ 9 +#define BSIM4v4vdes BSIM4v4states+ 10 + +#define BSIM4v4qb BSIM4v4states+ 11 +#define BSIM4v4cqb BSIM4v4states+ 12 +#define BSIM4v4qg BSIM4v4states+ 13 +#define BSIM4v4cqg BSIM4v4states+ 14 +#define BSIM4v4qd BSIM4v4states+ 15 +#define BSIM4v4cqd BSIM4v4states+ 16 +#define BSIM4v4qgmid BSIM4v4states+ 17 +#define BSIM4v4cqgmid BSIM4v4states+ 18 + +#define BSIM4v4qbs BSIM4v4states+ 19 +#define BSIM4v4cqbs BSIM4v4states+ 20 +#define BSIM4v4qbd BSIM4v4states+ 21 +#define BSIM4v4cqbd BSIM4v4states+ 22 + +#define BSIM4v4qcheq BSIM4v4states+ 23 +#define BSIM4v4cqcheq BSIM4v4states+ 24 +#define BSIM4v4qcdump BSIM4v4states+ 25 +#define BSIM4v4cqcdump BSIM4v4states+ 26 +#define BSIM4v4qdef BSIM4v4states+ 27 +#define BSIM4v4qs BSIM4v4states+ 28 + +#define BSIM4v4numStates 29 + + +/* indices to the array of BSIM4v4 NOISE SOURCES */ + +#define BSIM4v4RDNOIZ 0 +#define BSIM4v4RSNOIZ 1 +#define BSIM4v4RGNOIZ 2 +#define BSIM4v4RBPSNOIZ 3 +#define BSIM4v4RBPDNOIZ 4 +#define BSIM4v4RBPBNOIZ 5 +#define BSIM4v4RBSBNOIZ 6 +#define BSIM4v4RBDBNOIZ 7 +#define BSIM4v4IDNOIZ 8 +#define BSIM4v4FLNOIZ 9 +#define BSIM4v4IGSNOIZ 10 +#define BSIM4v4IGDNOIZ 11 +#define BSIM4v4IGBNOIZ 12 +#define BSIM4v4TOTNOIZ 13 + +#define BSIM4v4NSRCS 14 /* Number of BSIM4v4 noise sources */ #ifndef NONOISE - double BSIM4V4nVar[NSTATVARS][BSIM4V4NSRCS]; + double BSIM4v4nVar[NSTATVARS][BSIM4v4NSRCS]; #else /* NONOISE */ - double **BSIM4V4nVar; + double **BSIM4v4nVar; #endif /* NONOISE */ -} BSIM4V4instance ; +} BSIM4v4instance ; struct bsim4SizeDependParam { @@ -429,1671 +429,1671 @@ struct bsim4SizeDependParam double Length; double NFinger; - double BSIM4V4cdsc; - double BSIM4V4cdscb; - double BSIM4V4cdscd; - double BSIM4V4cit; - double BSIM4V4nfactor; - double BSIM4V4xj; - double BSIM4V4vsat; - double BSIM4V4at; - double BSIM4V4a0; - double BSIM4V4ags; - double BSIM4V4a1; - double BSIM4V4a2; - double BSIM4V4keta; - double BSIM4V4nsub; - double BSIM4V4ndep; - double BSIM4V4nsd; - double BSIM4V4phin; - double BSIM4V4ngate; - double BSIM4V4gamma1; - double BSIM4V4gamma2; - double BSIM4V4vbx; - double BSIM4V4vbi; - double BSIM4V4vbm; - double BSIM4V4vbsc; - double BSIM4V4xt; - double BSIM4V4phi; - double BSIM4V4litl; - double BSIM4V4k1; - double BSIM4V4kt1; - double BSIM4V4kt1l; - double BSIM4V4kt2; - double BSIM4V4k2; - double BSIM4V4k3; - double BSIM4V4k3b; - double BSIM4V4w0; - double BSIM4V4dvtp0; - double BSIM4V4dvtp1; - double BSIM4V4lpe0; - double BSIM4V4lpeb; - double BSIM4V4dvt0; - double BSIM4V4dvt1; - double BSIM4V4dvt2; - double BSIM4V4dvt0w; - double BSIM4V4dvt1w; - double BSIM4V4dvt2w; - double BSIM4V4drout; - double BSIM4V4dsub; - double BSIM4V4vth0; - double BSIM4V4ua; - double BSIM4V4ua1; - double BSIM4V4ub; - double BSIM4V4ub1; - double BSIM4V4uc; - double BSIM4V4uc1; - double BSIM4V4u0; - double BSIM4V4eu; - double BSIM4V4ute; - double BSIM4V4voff; - double BSIM4V4minv; - double BSIM4V4vfb; - double BSIM4V4delta; - double BSIM4V4rdsw; - double BSIM4V4rds0; - double BSIM4V4rs0; - double BSIM4V4rd0; - double BSIM4V4rsw; - double BSIM4V4rdw; - double BSIM4V4prwg; - double BSIM4V4prwb; - double BSIM4V4prt; - double BSIM4V4eta0; - double BSIM4V4etab; - double BSIM4V4pclm; - double BSIM4V4pdibl1; - double BSIM4V4pdibl2; - double BSIM4V4pdiblb; - double BSIM4V4fprout; - double BSIM4V4pdits; - double BSIM4V4pditsd; - double BSIM4V4pscbe1; - double BSIM4V4pscbe2; - double BSIM4V4pvag; - double BSIM4V4wr; - double BSIM4V4dwg; - double BSIM4V4dwb; - double BSIM4V4b0; - double BSIM4V4b1; - double BSIM4V4alpha0; - double BSIM4V4alpha1; - double BSIM4V4beta0; - double BSIM4V4agidl; - double BSIM4V4bgidl; - double BSIM4V4cgidl; - double BSIM4V4egidl; - double BSIM4V4aigc; - double BSIM4V4bigc; - double BSIM4V4cigc; - double BSIM4V4aigsd; - double BSIM4V4bigsd; - double BSIM4V4cigsd; - double BSIM4V4aigbacc; - double BSIM4V4bigbacc; - double BSIM4V4cigbacc; - double BSIM4V4aigbinv; - double BSIM4V4bigbinv; - double BSIM4V4cigbinv; - double BSIM4V4nigc; - double BSIM4V4nigbacc; - double BSIM4V4nigbinv; - double BSIM4V4ntox; - double BSIM4V4eigbinv; - double BSIM4V4pigcd; - double BSIM4V4poxedge; - double BSIM4V4xrcrg1; - double BSIM4V4xrcrg2; - double BSIM4V4lambda; /* overshoot */ - double BSIM4V4vtl; /* thermal velocity limit */ - double BSIM4V4xn; /* back scattering parameter */ - double BSIM4V4lc; /* back scattering parameter */ - double BSIM4V4tfactor; /* ballistic transportation factor */ - double BSIM4V4vfbsdoff; /* S/D flatband offset voltage */ + double BSIM4v4cdsc; + double BSIM4v4cdscb; + double BSIM4v4cdscd; + double BSIM4v4cit; + double BSIM4v4nfactor; + double BSIM4v4xj; + double BSIM4v4vsat; + double BSIM4v4at; + double BSIM4v4a0; + double BSIM4v4ags; + double BSIM4v4a1; + double BSIM4v4a2; + double BSIM4v4keta; + double BSIM4v4nsub; + double BSIM4v4ndep; + double BSIM4v4nsd; + double BSIM4v4phin; + double BSIM4v4ngate; + double BSIM4v4gamma1; + double BSIM4v4gamma2; + double BSIM4v4vbx; + double BSIM4v4vbi; + double BSIM4v4vbm; + double BSIM4v4vbsc; + double BSIM4v4xt; + double BSIM4v4phi; + double BSIM4v4litl; + double BSIM4v4k1; + double BSIM4v4kt1; + double BSIM4v4kt1l; + double BSIM4v4kt2; + double BSIM4v4k2; + double BSIM4v4k3; + double BSIM4v4k3b; + double BSIM4v4w0; + double BSIM4v4dvtp0; + double BSIM4v4dvtp1; + double BSIM4v4lpe0; + double BSIM4v4lpeb; + double BSIM4v4dvt0; + double BSIM4v4dvt1; + double BSIM4v4dvt2; + double BSIM4v4dvt0w; + double BSIM4v4dvt1w; + double BSIM4v4dvt2w; + double BSIM4v4drout; + double BSIM4v4dsub; + double BSIM4v4vth0; + double BSIM4v4ua; + double BSIM4v4ua1; + double BSIM4v4ub; + double BSIM4v4ub1; + double BSIM4v4uc; + double BSIM4v4uc1; + double BSIM4v4u0; + double BSIM4v4eu; + double BSIM4v4ute; + double BSIM4v4voff; + double BSIM4v4minv; + double BSIM4v4vfb; + double BSIM4v4delta; + double BSIM4v4rdsw; + double BSIM4v4rds0; + double BSIM4v4rs0; + double BSIM4v4rd0; + double BSIM4v4rsw; + double BSIM4v4rdw; + double BSIM4v4prwg; + double BSIM4v4prwb; + double BSIM4v4prt; + double BSIM4v4eta0; + double BSIM4v4etab; + double BSIM4v4pclm; + double BSIM4v4pdibl1; + double BSIM4v4pdibl2; + double BSIM4v4pdiblb; + double BSIM4v4fprout; + double BSIM4v4pdits; + double BSIM4v4pditsd; + double BSIM4v4pscbe1; + double BSIM4v4pscbe2; + double BSIM4v4pvag; + double BSIM4v4wr; + double BSIM4v4dwg; + double BSIM4v4dwb; + double BSIM4v4b0; + double BSIM4v4b1; + double BSIM4v4alpha0; + double BSIM4v4alpha1; + double BSIM4v4beta0; + double BSIM4v4agidl; + double BSIM4v4bgidl; + double BSIM4v4cgidl; + double BSIM4v4egidl; + double BSIM4v4aigc; + double BSIM4v4bigc; + double BSIM4v4cigc; + double BSIM4v4aigsd; + double BSIM4v4bigsd; + double BSIM4v4cigsd; + double BSIM4v4aigbacc; + double BSIM4v4bigbacc; + double BSIM4v4cigbacc; + double BSIM4v4aigbinv; + double BSIM4v4bigbinv; + double BSIM4v4cigbinv; + double BSIM4v4nigc; + double BSIM4v4nigbacc; + double BSIM4v4nigbinv; + double BSIM4v4ntox; + double BSIM4v4eigbinv; + double BSIM4v4pigcd; + double BSIM4v4poxedge; + double BSIM4v4xrcrg1; + double BSIM4v4xrcrg2; + double BSIM4v4lambda; /* overshoot */ + double BSIM4v4vtl; /* thermal velocity limit */ + double BSIM4v4xn; /* back scattering parameter */ + double BSIM4v4lc; /* back scattering parameter */ + double BSIM4v4tfactor; /* ballistic transportation factor */ + double BSIM4v4vfbsdoff; /* S/D flatband offset voltage */ /* added for stress effect */ - double BSIM4V4ku0; - double BSIM4V4kvth0; - double BSIM4V4ku0temp; - double BSIM4V4rho_ref; - double BSIM4V4inv_od_ref; + double BSIM4v4ku0; + double BSIM4v4kvth0; + double BSIM4v4ku0temp; + double BSIM4v4rho_ref; + double BSIM4v4inv_od_ref; /* CV model */ - double BSIM4V4cgsl; - double BSIM4V4cgdl; - double BSIM4V4ckappas; - double BSIM4V4ckappad; - double BSIM4V4cf; - double BSIM4V4clc; - double BSIM4V4cle; - double BSIM4V4vfbcv; - double BSIM4V4noff; - double BSIM4V4voffcv; - double BSIM4V4acde; - double BSIM4V4moin; + double BSIM4v4cgsl; + double BSIM4v4cgdl; + double BSIM4v4ckappas; + double BSIM4v4ckappad; + double BSIM4v4cf; + double BSIM4v4clc; + double BSIM4v4cle; + double BSIM4v4vfbcv; + double BSIM4v4noff; + double BSIM4v4voffcv; + double BSIM4v4acde; + double BSIM4v4moin; /* Pre-calculated constants */ - double BSIM4V4dw; - double BSIM4V4dl; - double BSIM4V4leff; - double BSIM4V4weff; - - double BSIM4V4dwc; - double BSIM4V4dlc; - double BSIM4V4dlcig; - double BSIM4V4dwj; - double BSIM4V4leffCV; - double BSIM4V4weffCV; - double BSIM4V4weffCJ; - double BSIM4V4abulkCVfactor; - double BSIM4V4cgso; - double BSIM4V4cgdo; - double BSIM4V4cgbo; - - double BSIM4V4u0temp; - double BSIM4V4vsattemp; - double BSIM4V4sqrtPhi; - double BSIM4V4phis3; - double BSIM4V4Xdep0; - double BSIM4V4sqrtXdep0; - double BSIM4V4theta0vb0; - double BSIM4V4thetaRout; - double BSIM4V4mstar; - double BSIM4V4voffcbn; - double BSIM4V4rdswmin; - double BSIM4V4rdwmin; - double BSIM4V4rswmin; - double BSIM4V4vfbsd; - - double BSIM4V4cof1; - double BSIM4V4cof2; - double BSIM4V4cof3; - double BSIM4V4cof4; - double BSIM4V4cdep0; - double BSIM4V4vfbzb; - double BSIM4V4vtfbphi1; - double BSIM4V4vtfbphi2; - double BSIM4V4ToxRatio; - double BSIM4V4Aechvb; - double BSIM4V4Bechvb; - double BSIM4V4ToxRatioEdge; - double BSIM4V4AechvbEdge; - double BSIM4V4BechvbEdge; - double BSIM4V4ldeb; - double BSIM4V4k1ox; - double BSIM4V4k2ox; + double BSIM4v4dw; + double BSIM4v4dl; + double BSIM4v4leff; + double BSIM4v4weff; + + double BSIM4v4dwc; + double BSIM4v4dlc; + double BSIM4v4dlcig; + double BSIM4v4dwj; + double BSIM4v4leffCV; + double BSIM4v4weffCV; + double BSIM4v4weffCJ; + double BSIM4v4abulkCVfactor; + double BSIM4v4cgso; + double BSIM4v4cgdo; + double BSIM4v4cgbo; + + double BSIM4v4u0temp; + double BSIM4v4vsattemp; + double BSIM4v4sqrtPhi; + double BSIM4v4phis3; + double BSIM4v4Xdep0; + double BSIM4v4sqrtXdep0; + double BSIM4v4theta0vb0; + double BSIM4v4thetaRout; + double BSIM4v4mstar; + double BSIM4v4voffcbn; + double BSIM4v4rdswmin; + double BSIM4v4rdwmin; + double BSIM4v4rswmin; + double BSIM4v4vfbsd; + + double BSIM4v4cof1; + double BSIM4v4cof2; + double BSIM4v4cof3; + double BSIM4v4cof4; + double BSIM4v4cdep0; + double BSIM4v4vfbzb; + double BSIM4v4vtfbphi1; + double BSIM4v4vtfbphi2; + double BSIM4v4ToxRatio; + double BSIM4v4Aechvb; + double BSIM4v4Bechvb; + double BSIM4v4ToxRatioEdge; + double BSIM4v4AechvbEdge; + double BSIM4v4BechvbEdge; + double BSIM4v4ldeb; + double BSIM4v4k1ox; + double BSIM4v4k2ox; struct bsim4SizeDependParam *pNext; }; -typedef struct sBSIM4V4model +typedef struct sBSIM4v4model { - int BSIM4V4modType; - struct sBSIM4V4model *BSIM4V4nextModel; - BSIM4V4instance *BSIM4V4instances; - IFuid BSIM4V4modName; - int BSIM4V4type; - - int BSIM4V4mobMod; - int BSIM4V4capMod; - int BSIM4V4dioMod; - int BSIM4V4trnqsMod; - int BSIM4V4acnqsMod; - int BSIM4V4fnoiMod; - int BSIM4V4tnoiMod; - int BSIM4V4rdsMod; - int BSIM4V4rbodyMod; - int BSIM4V4rgateMod; - int BSIM4V4perMod; - int BSIM4V4geoMod; - int BSIM4V4igcMod; - int BSIM4V4igbMod; - int BSIM4V4tempMod; - int BSIM4V4binUnit; - int BSIM4V4paramChk; - char *BSIM4V4version; - double BSIM4V4toxe; - double BSIM4V4toxp; - double BSIM4V4toxm; - double BSIM4V4dtox; - double BSIM4V4epsrox; - double BSIM4V4cdsc; - double BSIM4V4cdscb; - double BSIM4V4cdscd; - double BSIM4V4cit; - double BSIM4V4nfactor; - double BSIM4V4xj; - double BSIM4V4vsat; - double BSIM4V4at; - double BSIM4V4a0; - double BSIM4V4ags; - double BSIM4V4a1; - double BSIM4V4a2; - double BSIM4V4keta; - double BSIM4V4nsub; - double BSIM4V4ndep; - double BSIM4V4nsd; - double BSIM4V4phin; - double BSIM4V4ngate; - double BSIM4V4gamma1; - double BSIM4V4gamma2; - double BSIM4V4vbx; - double BSIM4V4vbm; - double BSIM4V4xt; - double BSIM4V4k1; - double BSIM4V4kt1; - double BSIM4V4kt1l; - double BSIM4V4kt2; - double BSIM4V4k2; - double BSIM4V4k3; - double BSIM4V4k3b; - double BSIM4V4w0; - double BSIM4V4dvtp0; - double BSIM4V4dvtp1; - double BSIM4V4lpe0; - double BSIM4V4lpeb; - double BSIM4V4dvt0; - double BSIM4V4dvt1; - double BSIM4V4dvt2; - double BSIM4V4dvt0w; - double BSIM4V4dvt1w; - double BSIM4V4dvt2w; - double BSIM4V4drout; - double BSIM4V4dsub; - double BSIM4V4vth0; - double BSIM4V4eu; - double BSIM4V4ua; - double BSIM4V4ua1; - double BSIM4V4ub; - double BSIM4V4ub1; - double BSIM4V4uc; - double BSIM4V4uc1; - double BSIM4V4u0; - double BSIM4V4ute; - double BSIM4V4voff; - double BSIM4V4minv; - double BSIM4V4voffl; - double BSIM4V4delta; - double BSIM4V4rdsw; - double BSIM4V4rdswmin; - double BSIM4V4rdwmin; - double BSIM4V4rswmin; - double BSIM4V4rsw; - double BSIM4V4rdw; - double BSIM4V4prwg; - double BSIM4V4prwb; - double BSIM4V4prt; - double BSIM4V4eta0; - double BSIM4V4etab; - double BSIM4V4pclm; - double BSIM4V4pdibl1; - double BSIM4V4pdibl2; - double BSIM4V4pdiblb; - double BSIM4V4fprout; - double BSIM4V4pdits; - double BSIM4V4pditsd; - double BSIM4V4pditsl; - double BSIM4V4pscbe1; - double BSIM4V4pscbe2; - double BSIM4V4pvag; - double BSIM4V4wr; - double BSIM4V4dwg; - double BSIM4V4dwb; - double BSIM4V4b0; - double BSIM4V4b1; - double BSIM4V4alpha0; - double BSIM4V4alpha1; - double BSIM4V4beta0; - double BSIM4V4agidl; - double BSIM4V4bgidl; - double BSIM4V4cgidl; - double BSIM4V4egidl; - double BSIM4V4aigc; - double BSIM4V4bigc; - double BSIM4V4cigc; - double BSIM4V4aigsd; - double BSIM4V4bigsd; - double BSIM4V4cigsd; - double BSIM4V4aigbacc; - double BSIM4V4bigbacc; - double BSIM4V4cigbacc; - double BSIM4V4aigbinv; - double BSIM4V4bigbinv; - double BSIM4V4cigbinv; - double BSIM4V4nigc; - double BSIM4V4nigbacc; - double BSIM4V4nigbinv; - double BSIM4V4ntox; - double BSIM4V4eigbinv; - double BSIM4V4pigcd; - double BSIM4V4poxedge; - double BSIM4V4toxref; - double BSIM4V4ijthdfwd; - double BSIM4V4ijthsfwd; - double BSIM4V4ijthdrev; - double BSIM4V4ijthsrev; - double BSIM4V4xjbvd; - double BSIM4V4xjbvs; - double BSIM4V4bvd; - double BSIM4V4bvs; - - double BSIM4V4jtss; - double BSIM4V4jtsd; - double BSIM4V4jtssws; - double BSIM4V4jtsswd; - double BSIM4V4jtsswgs; - double BSIM4V4jtsswgd; - double BSIM4V4njts; - double BSIM4V4njtssw; - double BSIM4V4njtsswg; - double BSIM4V4xtss; - double BSIM4V4xtsd; - double BSIM4V4xtssws; - double BSIM4V4xtsswd; - double BSIM4V4xtsswgs; - double BSIM4V4xtsswgd; - double BSIM4V4tnjts; - double BSIM4V4tnjtssw; - double BSIM4V4tnjtsswg; - double BSIM4V4vtss; - double BSIM4V4vtsd; - double BSIM4V4vtssws; - double BSIM4V4vtsswd; - double BSIM4V4vtsswgs; - double BSIM4V4vtsswgd; - - double BSIM4V4xrcrg1; - double BSIM4V4xrcrg2; - double BSIM4V4lambda; - double BSIM4V4vtl; - double BSIM4V4lc; - double BSIM4V4xn; - double BSIM4V4vfbsdoff; /* S/D flatband offset voltage */ - double BSIM4V4lintnoi; /* lint offset for noise calculation */ - - double BSIM4V4vfb; - double BSIM4V4gbmin; - double BSIM4V4rbdb; - double BSIM4V4rbsb; - double BSIM4V4rbpb; - double BSIM4V4rbps; - double BSIM4V4rbpd; - double BSIM4V4tnoia; - double BSIM4V4tnoib; - double BSIM4V4rnoia; - double BSIM4V4rnoib; - double BSIM4V4ntnoi; + int BSIM4v4modType; + struct sBSIM4v4model *BSIM4v4nextModel; + BSIM4v4instance *BSIM4v4instances; + IFuid BSIM4v4modName; + int BSIM4v4type; + + int BSIM4v4mobMod; + int BSIM4v4capMod; + int BSIM4v4dioMod; + int BSIM4v4trnqsMod; + int BSIM4v4acnqsMod; + int BSIM4v4fnoiMod; + int BSIM4v4tnoiMod; + int BSIM4v4rdsMod; + int BSIM4v4rbodyMod; + int BSIM4v4rgateMod; + int BSIM4v4perMod; + int BSIM4v4geoMod; + int BSIM4v4igcMod; + int BSIM4v4igbMod; + int BSIM4v4tempMod; + int BSIM4v4binUnit; + int BSIM4v4paramChk; + char *BSIM4v4version; + double BSIM4v4toxe; + double BSIM4v4toxp; + double BSIM4v4toxm; + double BSIM4v4dtox; + double BSIM4v4epsrox; + double BSIM4v4cdsc; + double BSIM4v4cdscb; + double BSIM4v4cdscd; + double BSIM4v4cit; + double BSIM4v4nfactor; + double BSIM4v4xj; + double BSIM4v4vsat; + double BSIM4v4at; + double BSIM4v4a0; + double BSIM4v4ags; + double BSIM4v4a1; + double BSIM4v4a2; + double BSIM4v4keta; + double BSIM4v4nsub; + double BSIM4v4ndep; + double BSIM4v4nsd; + double BSIM4v4phin; + double BSIM4v4ngate; + double BSIM4v4gamma1; + double BSIM4v4gamma2; + double BSIM4v4vbx; + double BSIM4v4vbm; + double BSIM4v4xt; + double BSIM4v4k1; + double BSIM4v4kt1; + double BSIM4v4kt1l; + double BSIM4v4kt2; + double BSIM4v4k2; + double BSIM4v4k3; + double BSIM4v4k3b; + double BSIM4v4w0; + double BSIM4v4dvtp0; + double BSIM4v4dvtp1; + double BSIM4v4lpe0; + double BSIM4v4lpeb; + double BSIM4v4dvt0; + double BSIM4v4dvt1; + double BSIM4v4dvt2; + double BSIM4v4dvt0w; + double BSIM4v4dvt1w; + double BSIM4v4dvt2w; + double BSIM4v4drout; + double BSIM4v4dsub; + double BSIM4v4vth0; + double BSIM4v4eu; + double BSIM4v4ua; + double BSIM4v4ua1; + double BSIM4v4ub; + double BSIM4v4ub1; + double BSIM4v4uc; + double BSIM4v4uc1; + double BSIM4v4u0; + double BSIM4v4ute; + double BSIM4v4voff; + double BSIM4v4minv; + double BSIM4v4voffl; + double BSIM4v4delta; + double BSIM4v4rdsw; + double BSIM4v4rdswmin; + double BSIM4v4rdwmin; + double BSIM4v4rswmin; + double BSIM4v4rsw; + double BSIM4v4rdw; + double BSIM4v4prwg; + double BSIM4v4prwb; + double BSIM4v4prt; + double BSIM4v4eta0; + double BSIM4v4etab; + double BSIM4v4pclm; + double BSIM4v4pdibl1; + double BSIM4v4pdibl2; + double BSIM4v4pdiblb; + double BSIM4v4fprout; + double BSIM4v4pdits; + double BSIM4v4pditsd; + double BSIM4v4pditsl; + double BSIM4v4pscbe1; + double BSIM4v4pscbe2; + double BSIM4v4pvag; + double BSIM4v4wr; + double BSIM4v4dwg; + double BSIM4v4dwb; + double BSIM4v4b0; + double BSIM4v4b1; + double BSIM4v4alpha0; + double BSIM4v4alpha1; + double BSIM4v4beta0; + double BSIM4v4agidl; + double BSIM4v4bgidl; + double BSIM4v4cgidl; + double BSIM4v4egidl; + double BSIM4v4aigc; + double BSIM4v4bigc; + double BSIM4v4cigc; + double BSIM4v4aigsd; + double BSIM4v4bigsd; + double BSIM4v4cigsd; + double BSIM4v4aigbacc; + double BSIM4v4bigbacc; + double BSIM4v4cigbacc; + double BSIM4v4aigbinv; + double BSIM4v4bigbinv; + double BSIM4v4cigbinv; + double BSIM4v4nigc; + double BSIM4v4nigbacc; + double BSIM4v4nigbinv; + double BSIM4v4ntox; + double BSIM4v4eigbinv; + double BSIM4v4pigcd; + double BSIM4v4poxedge; + double BSIM4v4toxref; + double BSIM4v4ijthdfwd; + double BSIM4v4ijthsfwd; + double BSIM4v4ijthdrev; + double BSIM4v4ijthsrev; + double BSIM4v4xjbvd; + double BSIM4v4xjbvs; + double BSIM4v4bvd; + double BSIM4v4bvs; + + double BSIM4v4jtss; + double BSIM4v4jtsd; + double BSIM4v4jtssws; + double BSIM4v4jtsswd; + double BSIM4v4jtsswgs; + double BSIM4v4jtsswgd; + double BSIM4v4njts; + double BSIM4v4njtssw; + double BSIM4v4njtsswg; + double BSIM4v4xtss; + double BSIM4v4xtsd; + double BSIM4v4xtssws; + double BSIM4v4xtsswd; + double BSIM4v4xtsswgs; + double BSIM4v4xtsswgd; + double BSIM4v4tnjts; + double BSIM4v4tnjtssw; + double BSIM4v4tnjtsswg; + double BSIM4v4vtss; + double BSIM4v4vtsd; + double BSIM4v4vtssws; + double BSIM4v4vtsswd; + double BSIM4v4vtsswgs; + double BSIM4v4vtsswgd; + + double BSIM4v4xrcrg1; + double BSIM4v4xrcrg2; + double BSIM4v4lambda; + double BSIM4v4vtl; + double BSIM4v4lc; + double BSIM4v4xn; + double BSIM4v4vfbsdoff; /* S/D flatband offset voltage */ + double BSIM4v4lintnoi; /* lint offset for noise calculation */ + + double BSIM4v4vfb; + double BSIM4v4gbmin; + double BSIM4v4rbdb; + double BSIM4v4rbsb; + double BSIM4v4rbpb; + double BSIM4v4rbps; + double BSIM4v4rbpd; + double BSIM4v4tnoia; + double BSIM4v4tnoib; + double BSIM4v4rnoia; + double BSIM4v4rnoib; + double BSIM4v4ntnoi; /* CV model and Parasitics */ - double BSIM4V4cgsl; - double BSIM4V4cgdl; - double BSIM4V4ckappas; - double BSIM4V4ckappad; - double BSIM4V4cf; - double BSIM4V4vfbcv; - double BSIM4V4clc; - double BSIM4V4cle; - double BSIM4V4dwc; - double BSIM4V4dlc; - double BSIM4V4xw; - double BSIM4V4xl; - double BSIM4V4dlcig; - double BSIM4V4dwj; - double BSIM4V4noff; - double BSIM4V4voffcv; - double BSIM4V4acde; - double BSIM4V4moin; - double BSIM4V4tcj; - double BSIM4V4tcjsw; - double BSIM4V4tcjswg; - double BSIM4V4tpb; - double BSIM4V4tpbsw; - double BSIM4V4tpbswg; - double BSIM4V4dmcg; - double BSIM4V4dmci; - double BSIM4V4dmdg; - double BSIM4V4dmcgt; - double BSIM4V4xgw; - double BSIM4V4xgl; - double BSIM4V4rshg; - double BSIM4V4ngcon; + double BSIM4v4cgsl; + double BSIM4v4cgdl; + double BSIM4v4ckappas; + double BSIM4v4ckappad; + double BSIM4v4cf; + double BSIM4v4vfbcv; + double BSIM4v4clc; + double BSIM4v4cle; + double BSIM4v4dwc; + double BSIM4v4dlc; + double BSIM4v4xw; + double BSIM4v4xl; + double BSIM4v4dlcig; + double BSIM4v4dwj; + double BSIM4v4noff; + double BSIM4v4voffcv; + double BSIM4v4acde; + double BSIM4v4moin; + double BSIM4v4tcj; + double BSIM4v4tcjsw; + double BSIM4v4tcjswg; + double BSIM4v4tpb; + double BSIM4v4tpbsw; + double BSIM4v4tpbswg; + double BSIM4v4dmcg; + double BSIM4v4dmci; + double BSIM4v4dmdg; + double BSIM4v4dmcgt; + double BSIM4v4xgw; + double BSIM4v4xgl; + double BSIM4v4rshg; + double BSIM4v4ngcon; /* Length Dependence */ - double BSIM4V4lcdsc; - double BSIM4V4lcdscb; - double BSIM4V4lcdscd; - double BSIM4V4lcit; - double BSIM4V4lnfactor; - double BSIM4V4lxj; - double BSIM4V4lvsat; - double BSIM4V4lat; - double BSIM4V4la0; - double BSIM4V4lags; - double BSIM4V4la1; - double BSIM4V4la2; - double BSIM4V4lketa; - double BSIM4V4lnsub; - double BSIM4V4lndep; - double BSIM4V4lnsd; - double BSIM4V4lphin; - double BSIM4V4lngate; - double BSIM4V4lgamma1; - double BSIM4V4lgamma2; - double BSIM4V4lvbx; - double BSIM4V4lvbm; - double BSIM4V4lxt; - double BSIM4V4lk1; - double BSIM4V4lkt1; - double BSIM4V4lkt1l; - double BSIM4V4lkt2; - double BSIM4V4lk2; - double BSIM4V4lk3; - double BSIM4V4lk3b; - double BSIM4V4lw0; - double BSIM4V4ldvtp0; - double BSIM4V4ldvtp1; - double BSIM4V4llpe0; - double BSIM4V4llpeb; - double BSIM4V4ldvt0; - double BSIM4V4ldvt1; - double BSIM4V4ldvt2; - double BSIM4V4ldvt0w; - double BSIM4V4ldvt1w; - double BSIM4V4ldvt2w; - double BSIM4V4ldrout; - double BSIM4V4ldsub; - double BSIM4V4lvth0; - double BSIM4V4lua; - double BSIM4V4lua1; - double BSIM4V4lub; - double BSIM4V4lub1; - double BSIM4V4luc; - double BSIM4V4luc1; - double BSIM4V4lu0; - double BSIM4V4leu; - double BSIM4V4lute; - double BSIM4V4lvoff; - double BSIM4V4lminv; - double BSIM4V4ldelta; - double BSIM4V4lrdsw; - double BSIM4V4lrsw; - double BSIM4V4lrdw; - double BSIM4V4lprwg; - double BSIM4V4lprwb; - double BSIM4V4lprt; - double BSIM4V4leta0; - double BSIM4V4letab; - double BSIM4V4lpclm; - double BSIM4V4lpdibl1; - double BSIM4V4lpdibl2; - double BSIM4V4lpdiblb; - double BSIM4V4lfprout; - double BSIM4V4lpdits; - double BSIM4V4lpditsd; - double BSIM4V4lpscbe1; - double BSIM4V4lpscbe2; - double BSIM4V4lpvag; - double BSIM4V4lwr; - double BSIM4V4ldwg; - double BSIM4V4ldwb; - double BSIM4V4lb0; - double BSIM4V4lb1; - double BSIM4V4lalpha0; - double BSIM4V4lalpha1; - double BSIM4V4lbeta0; - double BSIM4V4lvfb; - double BSIM4V4lagidl; - double BSIM4V4lbgidl; - double BSIM4V4lcgidl; - double BSIM4V4legidl; - double BSIM4V4laigc; - double BSIM4V4lbigc; - double BSIM4V4lcigc; - double BSIM4V4laigsd; - double BSIM4V4lbigsd; - double BSIM4V4lcigsd; - double BSIM4V4laigbacc; - double BSIM4V4lbigbacc; - double BSIM4V4lcigbacc; - double BSIM4V4laigbinv; - double BSIM4V4lbigbinv; - double BSIM4V4lcigbinv; - double BSIM4V4lnigc; - double BSIM4V4lnigbacc; - double BSIM4V4lnigbinv; - double BSIM4V4lntox; - double BSIM4V4leigbinv; - double BSIM4V4lpigcd; - double BSIM4V4lpoxedge; - double BSIM4V4lxrcrg1; - double BSIM4V4lxrcrg2; - double BSIM4V4llambda; - double BSIM4V4lvtl; - double BSIM4V4lxn; - double BSIM4V4lvfbsdoff; + double BSIM4v4lcdsc; + double BSIM4v4lcdscb; + double BSIM4v4lcdscd; + double BSIM4v4lcit; + double BSIM4v4lnfactor; + double BSIM4v4lxj; + double BSIM4v4lvsat; + double BSIM4v4lat; + double BSIM4v4la0; + double BSIM4v4lags; + double BSIM4v4la1; + double BSIM4v4la2; + double BSIM4v4lketa; + double BSIM4v4lnsub; + double BSIM4v4lndep; + double BSIM4v4lnsd; + double BSIM4v4lphin; + double BSIM4v4lngate; + double BSIM4v4lgamma1; + double BSIM4v4lgamma2; + double BSIM4v4lvbx; + double BSIM4v4lvbm; + double BSIM4v4lxt; + double BSIM4v4lk1; + double BSIM4v4lkt1; + double BSIM4v4lkt1l; + double BSIM4v4lkt2; + double BSIM4v4lk2; + double BSIM4v4lk3; + double BSIM4v4lk3b; + double BSIM4v4lw0; + double BSIM4v4ldvtp0; + double BSIM4v4ldvtp1; + double BSIM4v4llpe0; + double BSIM4v4llpeb; + double BSIM4v4ldvt0; + double BSIM4v4ldvt1; + double BSIM4v4ldvt2; + double BSIM4v4ldvt0w; + double BSIM4v4ldvt1w; + double BSIM4v4ldvt2w; + double BSIM4v4ldrout; + double BSIM4v4ldsub; + double BSIM4v4lvth0; + double BSIM4v4lua; + double BSIM4v4lua1; + double BSIM4v4lub; + double BSIM4v4lub1; + double BSIM4v4luc; + double BSIM4v4luc1; + double BSIM4v4lu0; + double BSIM4v4leu; + double BSIM4v4lute; + double BSIM4v4lvoff; + double BSIM4v4lminv; + double BSIM4v4ldelta; + double BSIM4v4lrdsw; + double BSIM4v4lrsw; + double BSIM4v4lrdw; + double BSIM4v4lprwg; + double BSIM4v4lprwb; + double BSIM4v4lprt; + double BSIM4v4leta0; + double BSIM4v4letab; + double BSIM4v4lpclm; + double BSIM4v4lpdibl1; + double BSIM4v4lpdibl2; + double BSIM4v4lpdiblb; + double BSIM4v4lfprout; + double BSIM4v4lpdits; + double BSIM4v4lpditsd; + double BSIM4v4lpscbe1; + double BSIM4v4lpscbe2; + double BSIM4v4lpvag; + double BSIM4v4lwr; + double BSIM4v4ldwg; + double BSIM4v4ldwb; + double BSIM4v4lb0; + double BSIM4v4lb1; + double BSIM4v4lalpha0; + double BSIM4v4lalpha1; + double BSIM4v4lbeta0; + double BSIM4v4lvfb; + double BSIM4v4lagidl; + double BSIM4v4lbgidl; + double BSIM4v4lcgidl; + double BSIM4v4legidl; + double BSIM4v4laigc; + double BSIM4v4lbigc; + double BSIM4v4lcigc; + double BSIM4v4laigsd; + double BSIM4v4lbigsd; + double BSIM4v4lcigsd; + double BSIM4v4laigbacc; + double BSIM4v4lbigbacc; + double BSIM4v4lcigbacc; + double BSIM4v4laigbinv; + double BSIM4v4lbigbinv; + double BSIM4v4lcigbinv; + double BSIM4v4lnigc; + double BSIM4v4lnigbacc; + double BSIM4v4lnigbinv; + double BSIM4v4lntox; + double BSIM4v4leigbinv; + double BSIM4v4lpigcd; + double BSIM4v4lpoxedge; + double BSIM4v4lxrcrg1; + double BSIM4v4lxrcrg2; + double BSIM4v4llambda; + double BSIM4v4lvtl; + double BSIM4v4lxn; + double BSIM4v4lvfbsdoff; /* CV model */ - double BSIM4V4lcgsl; - double BSIM4V4lcgdl; - double BSIM4V4lckappas; - double BSIM4V4lckappad; - double BSIM4V4lcf; - double BSIM4V4lclc; - double BSIM4V4lcle; - double BSIM4V4lvfbcv; - double BSIM4V4lnoff; - double BSIM4V4lvoffcv; - double BSIM4V4lacde; - double BSIM4V4lmoin; + double BSIM4v4lcgsl; + double BSIM4v4lcgdl; + double BSIM4v4lckappas; + double BSIM4v4lckappad; + double BSIM4v4lcf; + double BSIM4v4lclc; + double BSIM4v4lcle; + double BSIM4v4lvfbcv; + double BSIM4v4lnoff; + double BSIM4v4lvoffcv; + double BSIM4v4lacde; + double BSIM4v4lmoin; /* Width Dependence */ - double BSIM4V4wcdsc; - double BSIM4V4wcdscb; - double BSIM4V4wcdscd; - double BSIM4V4wcit; - double BSIM4V4wnfactor; - double BSIM4V4wxj; - double BSIM4V4wvsat; - double BSIM4V4wat; - double BSIM4V4wa0; - double BSIM4V4wags; - double BSIM4V4wa1; - double BSIM4V4wa2; - double BSIM4V4wketa; - double BSIM4V4wnsub; - double BSIM4V4wndep; - double BSIM4V4wnsd; - double BSIM4V4wphin; - double BSIM4V4wngate; - double BSIM4V4wgamma1; - double BSIM4V4wgamma2; - double BSIM4V4wvbx; - double BSIM4V4wvbm; - double BSIM4V4wxt; - double BSIM4V4wk1; - double BSIM4V4wkt1; - double BSIM4V4wkt1l; - double BSIM4V4wkt2; - double BSIM4V4wk2; - double BSIM4V4wk3; - double BSIM4V4wk3b; - double BSIM4V4ww0; - double BSIM4V4wdvtp0; - double BSIM4V4wdvtp1; - double BSIM4V4wlpe0; - double BSIM4V4wlpeb; - double BSIM4V4wdvt0; - double BSIM4V4wdvt1; - double BSIM4V4wdvt2; - double BSIM4V4wdvt0w; - double BSIM4V4wdvt1w; - double BSIM4V4wdvt2w; - double BSIM4V4wdrout; - double BSIM4V4wdsub; - double BSIM4V4wvth0; - double BSIM4V4wua; - double BSIM4V4wua1; - double BSIM4V4wub; - double BSIM4V4wub1; - double BSIM4V4wuc; - double BSIM4V4wuc1; - double BSIM4V4wu0; - double BSIM4V4weu; - double BSIM4V4wute; - double BSIM4V4wvoff; - double BSIM4V4wminv; - double BSIM4V4wdelta; - double BSIM4V4wrdsw; - double BSIM4V4wrsw; - double BSIM4V4wrdw; - double BSIM4V4wprwg; - double BSIM4V4wprwb; - double BSIM4V4wprt; - double BSIM4V4weta0; - double BSIM4V4wetab; - double BSIM4V4wpclm; - double BSIM4V4wpdibl1; - double BSIM4V4wpdibl2; - double BSIM4V4wpdiblb; - double BSIM4V4wfprout; - double BSIM4V4wpdits; - double BSIM4V4wpditsd; - double BSIM4V4wpscbe1; - double BSIM4V4wpscbe2; - double BSIM4V4wpvag; - double BSIM4V4wwr; - double BSIM4V4wdwg; - double BSIM4V4wdwb; - double BSIM4V4wb0; - double BSIM4V4wb1; - double BSIM4V4walpha0; - double BSIM4V4walpha1; - double BSIM4V4wbeta0; - double BSIM4V4wvfb; - double BSIM4V4wagidl; - double BSIM4V4wbgidl; - double BSIM4V4wcgidl; - double BSIM4V4wegidl; - double BSIM4V4waigc; - double BSIM4V4wbigc; - double BSIM4V4wcigc; - double BSIM4V4waigsd; - double BSIM4V4wbigsd; - double BSIM4V4wcigsd; - double BSIM4V4waigbacc; - double BSIM4V4wbigbacc; - double BSIM4V4wcigbacc; - double BSIM4V4waigbinv; - double BSIM4V4wbigbinv; - double BSIM4V4wcigbinv; - double BSIM4V4wnigc; - double BSIM4V4wnigbacc; - double BSIM4V4wnigbinv; - double BSIM4V4wntox; - double BSIM4V4weigbinv; - double BSIM4V4wpigcd; - double BSIM4V4wpoxedge; - double BSIM4V4wxrcrg1; - double BSIM4V4wxrcrg2; - double BSIM4V4wlambda; - double BSIM4V4wvtl; - double BSIM4V4wxn; - double BSIM4V4wvfbsdoff; + double BSIM4v4wcdsc; + double BSIM4v4wcdscb; + double BSIM4v4wcdscd; + double BSIM4v4wcit; + double BSIM4v4wnfactor; + double BSIM4v4wxj; + double BSIM4v4wvsat; + double BSIM4v4wat; + double BSIM4v4wa0; + double BSIM4v4wags; + double BSIM4v4wa1; + double BSIM4v4wa2; + double BSIM4v4wketa; + double BSIM4v4wnsub; + double BSIM4v4wndep; + double BSIM4v4wnsd; + double BSIM4v4wphin; + double BSIM4v4wngate; + double BSIM4v4wgamma1; + double BSIM4v4wgamma2; + double BSIM4v4wvbx; + double BSIM4v4wvbm; + double BSIM4v4wxt; + double BSIM4v4wk1; + double BSIM4v4wkt1; + double BSIM4v4wkt1l; + double BSIM4v4wkt2; + double BSIM4v4wk2; + double BSIM4v4wk3; + double BSIM4v4wk3b; + double BSIM4v4ww0; + double BSIM4v4wdvtp0; + double BSIM4v4wdvtp1; + double BSIM4v4wlpe0; + double BSIM4v4wlpeb; + double BSIM4v4wdvt0; + double BSIM4v4wdvt1; + double BSIM4v4wdvt2; + double BSIM4v4wdvt0w; + double BSIM4v4wdvt1w; + double BSIM4v4wdvt2w; + double BSIM4v4wdrout; + double BSIM4v4wdsub; + double BSIM4v4wvth0; + double BSIM4v4wua; + double BSIM4v4wua1; + double BSIM4v4wub; + double BSIM4v4wub1; + double BSIM4v4wuc; + double BSIM4v4wuc1; + double BSIM4v4wu0; + double BSIM4v4weu; + double BSIM4v4wute; + double BSIM4v4wvoff; + double BSIM4v4wminv; + double BSIM4v4wdelta; + double BSIM4v4wrdsw; + double BSIM4v4wrsw; + double BSIM4v4wrdw; + double BSIM4v4wprwg; + double BSIM4v4wprwb; + double BSIM4v4wprt; + double BSIM4v4weta0; + double BSIM4v4wetab; + double BSIM4v4wpclm; + double BSIM4v4wpdibl1; + double BSIM4v4wpdibl2; + double BSIM4v4wpdiblb; + double BSIM4v4wfprout; + double BSIM4v4wpdits; + double BSIM4v4wpditsd; + double BSIM4v4wpscbe1; + double BSIM4v4wpscbe2; + double BSIM4v4wpvag; + double BSIM4v4wwr; + double BSIM4v4wdwg; + double BSIM4v4wdwb; + double BSIM4v4wb0; + double BSIM4v4wb1; + double BSIM4v4walpha0; + double BSIM4v4walpha1; + double BSIM4v4wbeta0; + double BSIM4v4wvfb; + double BSIM4v4wagidl; + double BSIM4v4wbgidl; + double BSIM4v4wcgidl; + double BSIM4v4wegidl; + double BSIM4v4waigc; + double BSIM4v4wbigc; + double BSIM4v4wcigc; + double BSIM4v4waigsd; + double BSIM4v4wbigsd; + double BSIM4v4wcigsd; + double BSIM4v4waigbacc; + double BSIM4v4wbigbacc; + double BSIM4v4wcigbacc; + double BSIM4v4waigbinv; + double BSIM4v4wbigbinv; + double BSIM4v4wcigbinv; + double BSIM4v4wnigc; + double BSIM4v4wnigbacc; + double BSIM4v4wnigbinv; + double BSIM4v4wntox; + double BSIM4v4weigbinv; + double BSIM4v4wpigcd; + double BSIM4v4wpoxedge; + double BSIM4v4wxrcrg1; + double BSIM4v4wxrcrg2; + double BSIM4v4wlambda; + double BSIM4v4wvtl; + double BSIM4v4wxn; + double BSIM4v4wvfbsdoff; /* CV model */ - double BSIM4V4wcgsl; - double BSIM4V4wcgdl; - double BSIM4V4wckappas; - double BSIM4V4wckappad; - double BSIM4V4wcf; - double BSIM4V4wclc; - double BSIM4V4wcle; - double BSIM4V4wvfbcv; - double BSIM4V4wnoff; - double BSIM4V4wvoffcv; - double BSIM4V4wacde; - double BSIM4V4wmoin; + double BSIM4v4wcgsl; + double BSIM4v4wcgdl; + double BSIM4v4wckappas; + double BSIM4v4wckappad; + double BSIM4v4wcf; + double BSIM4v4wclc; + double BSIM4v4wcle; + double BSIM4v4wvfbcv; + double BSIM4v4wnoff; + double BSIM4v4wvoffcv; + double BSIM4v4wacde; + double BSIM4v4wmoin; /* Cross-term Dependence */ - double BSIM4V4pcdsc; - double BSIM4V4pcdscb; - double BSIM4V4pcdscd; - double BSIM4V4pcit; - double BSIM4V4pnfactor; - double BSIM4V4pxj; - double BSIM4V4pvsat; - double BSIM4V4pat; - double BSIM4V4pa0; - double BSIM4V4pags; - double BSIM4V4pa1; - double BSIM4V4pa2; - double BSIM4V4pketa; - double BSIM4V4pnsub; - double BSIM4V4pndep; - double BSIM4V4pnsd; - double BSIM4V4pphin; - double BSIM4V4pngate; - double BSIM4V4pgamma1; - double BSIM4V4pgamma2; - double BSIM4V4pvbx; - double BSIM4V4pvbm; - double BSIM4V4pxt; - double BSIM4V4pk1; - double BSIM4V4pkt1; - double BSIM4V4pkt1l; - double BSIM4V4pkt2; - double BSIM4V4pk2; - double BSIM4V4pk3; - double BSIM4V4pk3b; - double BSIM4V4pw0; - double BSIM4V4pdvtp0; - double BSIM4V4pdvtp1; - double BSIM4V4plpe0; - double BSIM4V4plpeb; - double BSIM4V4pdvt0; - double BSIM4V4pdvt1; - double BSIM4V4pdvt2; - double BSIM4V4pdvt0w; - double BSIM4V4pdvt1w; - double BSIM4V4pdvt2w; - double BSIM4V4pdrout; - double BSIM4V4pdsub; - double BSIM4V4pvth0; - double BSIM4V4pua; - double BSIM4V4pua1; - double BSIM4V4pub; - double BSIM4V4pub1; - double BSIM4V4puc; - double BSIM4V4puc1; - double BSIM4V4pu0; - double BSIM4V4peu; - double BSIM4V4pute; - double BSIM4V4pvoff; - double BSIM4V4pminv; - double BSIM4V4pdelta; - double BSIM4V4prdsw; - double BSIM4V4prsw; - double BSIM4V4prdw; - double BSIM4V4pprwg; - double BSIM4V4pprwb; - double BSIM4V4pprt; - double BSIM4V4peta0; - double BSIM4V4petab; - double BSIM4V4ppclm; - double BSIM4V4ppdibl1; - double BSIM4V4ppdibl2; - double BSIM4V4ppdiblb; - double BSIM4V4pfprout; - double BSIM4V4ppdits; - double BSIM4V4ppditsd; - double BSIM4V4ppscbe1; - double BSIM4V4ppscbe2; - double BSIM4V4ppvag; - double BSIM4V4pwr; - double BSIM4V4pdwg; - double BSIM4V4pdwb; - double BSIM4V4pb0; - double BSIM4V4pb1; - double BSIM4V4palpha0; - double BSIM4V4palpha1; - double BSIM4V4pbeta0; - double BSIM4V4pvfb; - double BSIM4V4pagidl; - double BSIM4V4pbgidl; - double BSIM4V4pcgidl; - double BSIM4V4pegidl; - double BSIM4V4paigc; - double BSIM4V4pbigc; - double BSIM4V4pcigc; - double BSIM4V4paigsd; - double BSIM4V4pbigsd; - double BSIM4V4pcigsd; - double BSIM4V4paigbacc; - double BSIM4V4pbigbacc; - double BSIM4V4pcigbacc; - double BSIM4V4paigbinv; - double BSIM4V4pbigbinv; - double BSIM4V4pcigbinv; - double BSIM4V4pnigc; - double BSIM4V4pnigbacc; - double BSIM4V4pnigbinv; - double BSIM4V4pntox; - double BSIM4V4peigbinv; - double BSIM4V4ppigcd; - double BSIM4V4ppoxedge; - double BSIM4V4pxrcrg1; - double BSIM4V4pxrcrg2; - double BSIM4V4plambda; - double BSIM4V4pvtl; - double BSIM4V4pxn; - double BSIM4V4pvfbsdoff; + double BSIM4v4pcdsc; + double BSIM4v4pcdscb; + double BSIM4v4pcdscd; + double BSIM4v4pcit; + double BSIM4v4pnfactor; + double BSIM4v4pxj; + double BSIM4v4pvsat; + double BSIM4v4pat; + double BSIM4v4pa0; + double BSIM4v4pags; + double BSIM4v4pa1; + double BSIM4v4pa2; + double BSIM4v4pketa; + double BSIM4v4pnsub; + double BSIM4v4pndep; + double BSIM4v4pnsd; + double BSIM4v4pphin; + double BSIM4v4pngate; + double BSIM4v4pgamma1; + double BSIM4v4pgamma2; + double BSIM4v4pvbx; + double BSIM4v4pvbm; + double BSIM4v4pxt; + double BSIM4v4pk1; + double BSIM4v4pkt1; + double BSIM4v4pkt1l; + double BSIM4v4pkt2; + double BSIM4v4pk2; + double BSIM4v4pk3; + double BSIM4v4pk3b; + double BSIM4v4pw0; + double BSIM4v4pdvtp0; + double BSIM4v4pdvtp1; + double BSIM4v4plpe0; + double BSIM4v4plpeb; + double BSIM4v4pdvt0; + double BSIM4v4pdvt1; + double BSIM4v4pdvt2; + double BSIM4v4pdvt0w; + double BSIM4v4pdvt1w; + double BSIM4v4pdvt2w; + double BSIM4v4pdrout; + double BSIM4v4pdsub; + double BSIM4v4pvth0; + double BSIM4v4pua; + double BSIM4v4pua1; + double BSIM4v4pub; + double BSIM4v4pub1; + double BSIM4v4puc; + double BSIM4v4puc1; + double BSIM4v4pu0; + double BSIM4v4peu; + double BSIM4v4pute; + double BSIM4v4pvoff; + double BSIM4v4pminv; + double BSIM4v4pdelta; + double BSIM4v4prdsw; + double BSIM4v4prsw; + double BSIM4v4prdw; + double BSIM4v4pprwg; + double BSIM4v4pprwb; + double BSIM4v4pprt; + double BSIM4v4peta0; + double BSIM4v4petab; + double BSIM4v4ppclm; + double BSIM4v4ppdibl1; + double BSIM4v4ppdibl2; + double BSIM4v4ppdiblb; + double BSIM4v4pfprout; + double BSIM4v4ppdits; + double BSIM4v4ppditsd; + double BSIM4v4ppscbe1; + double BSIM4v4ppscbe2; + double BSIM4v4ppvag; + double BSIM4v4pwr; + double BSIM4v4pdwg; + double BSIM4v4pdwb; + double BSIM4v4pb0; + double BSIM4v4pb1; + double BSIM4v4palpha0; + double BSIM4v4palpha1; + double BSIM4v4pbeta0; + double BSIM4v4pvfb; + double BSIM4v4pagidl; + double BSIM4v4pbgidl; + double BSIM4v4pcgidl; + double BSIM4v4pegidl; + double BSIM4v4paigc; + double BSIM4v4pbigc; + double BSIM4v4pcigc; + double BSIM4v4paigsd; + double BSIM4v4pbigsd; + double BSIM4v4pcigsd; + double BSIM4v4paigbacc; + double BSIM4v4pbigbacc; + double BSIM4v4pcigbacc; + double BSIM4v4paigbinv; + double BSIM4v4pbigbinv; + double BSIM4v4pcigbinv; + double BSIM4v4pnigc; + double BSIM4v4pnigbacc; + double BSIM4v4pnigbinv; + double BSIM4v4pntox; + double BSIM4v4peigbinv; + double BSIM4v4ppigcd; + double BSIM4v4ppoxedge; + double BSIM4v4pxrcrg1; + double BSIM4v4pxrcrg2; + double BSIM4v4plambda; + double BSIM4v4pvtl; + double BSIM4v4pxn; + double BSIM4v4pvfbsdoff; /* CV model */ - double BSIM4V4pcgsl; - double BSIM4V4pcgdl; - double BSIM4V4pckappas; - double BSIM4V4pckappad; - double BSIM4V4pcf; - double BSIM4V4pclc; - double BSIM4V4pcle; - double BSIM4V4pvfbcv; - double BSIM4V4pnoff; - double BSIM4V4pvoffcv; - double BSIM4V4pacde; - double BSIM4V4pmoin; - - double BSIM4V4tnom; - double BSIM4V4cgso; - double BSIM4V4cgdo; - double BSIM4V4cgbo; - double BSIM4V4xpart; - double BSIM4V4cFringOut; - double BSIM4V4cFringMax; - - double BSIM4V4sheetResistance; - double BSIM4V4SjctSatCurDensity; - double BSIM4V4DjctSatCurDensity; - double BSIM4V4SjctSidewallSatCurDensity; - double BSIM4V4DjctSidewallSatCurDensity; - double BSIM4V4SjctGateSidewallSatCurDensity; - double BSIM4V4DjctGateSidewallSatCurDensity; - double BSIM4V4SbulkJctPotential; - double BSIM4V4DbulkJctPotential; - double BSIM4V4SbulkJctBotGradingCoeff; - double BSIM4V4DbulkJctBotGradingCoeff; - double BSIM4V4SbulkJctSideGradingCoeff; - double BSIM4V4DbulkJctSideGradingCoeff; - double BSIM4V4SbulkJctGateSideGradingCoeff; - double BSIM4V4DbulkJctGateSideGradingCoeff; - double BSIM4V4SsidewallJctPotential; - double BSIM4V4DsidewallJctPotential; - double BSIM4V4SGatesidewallJctPotential; - double BSIM4V4DGatesidewallJctPotential; - double BSIM4V4SunitAreaJctCap; - double BSIM4V4DunitAreaJctCap; - double BSIM4V4SunitLengthSidewallJctCap; - double BSIM4V4DunitLengthSidewallJctCap; - double BSIM4V4SunitLengthGateSidewallJctCap; - double BSIM4V4DunitLengthGateSidewallJctCap; - double BSIM4V4SjctEmissionCoeff; - double BSIM4V4DjctEmissionCoeff; - double BSIM4V4SjctTempExponent; - double BSIM4V4DjctTempExponent; - double BSIM4V4njtstemp; - double BSIM4V4njtsswtemp; - double BSIM4V4njtsswgtemp; - - double BSIM4V4Lint; - double BSIM4V4Ll; - double BSIM4V4Llc; - double BSIM4V4Lln; - double BSIM4V4Lw; - double BSIM4V4Lwc; - double BSIM4V4Lwn; - double BSIM4V4Lwl; - double BSIM4V4Lwlc; - double BSIM4V4Lmin; - double BSIM4V4Lmax; - - double BSIM4V4Wint; - double BSIM4V4Wl; - double BSIM4V4Wlc; - double BSIM4V4Wln; - double BSIM4V4Ww; - double BSIM4V4Wwc; - double BSIM4V4Wwn; - double BSIM4V4Wwl; - double BSIM4V4Wwlc; - double BSIM4V4Wmin; - double BSIM4V4Wmax; + double BSIM4v4pcgsl; + double BSIM4v4pcgdl; + double BSIM4v4pckappas; + double BSIM4v4pckappad; + double BSIM4v4pcf; + double BSIM4v4pclc; + double BSIM4v4pcle; + double BSIM4v4pvfbcv; + double BSIM4v4pnoff; + double BSIM4v4pvoffcv; + double BSIM4v4pacde; + double BSIM4v4pmoin; + + double BSIM4v4tnom; + double BSIM4v4cgso; + double BSIM4v4cgdo; + double BSIM4v4cgbo; + double BSIM4v4xpart; + double BSIM4v4cFringOut; + double BSIM4v4cFringMax; + + double BSIM4v4sheetResistance; + double BSIM4v4SjctSatCurDensity; + double BSIM4v4DjctSatCurDensity; + double BSIM4v4SjctSidewallSatCurDensity; + double BSIM4v4DjctSidewallSatCurDensity; + double BSIM4v4SjctGateSidewallSatCurDensity; + double BSIM4v4DjctGateSidewallSatCurDensity; + double BSIM4v4SbulkJctPotential; + double BSIM4v4DbulkJctPotential; + double BSIM4v4SbulkJctBotGradingCoeff; + double BSIM4v4DbulkJctBotGradingCoeff; + double BSIM4v4SbulkJctSideGradingCoeff; + double BSIM4v4DbulkJctSideGradingCoeff; + double BSIM4v4SbulkJctGateSideGradingCoeff; + double BSIM4v4DbulkJctGateSideGradingCoeff; + double BSIM4v4SsidewallJctPotential; + double BSIM4v4DsidewallJctPotential; + double BSIM4v4SGatesidewallJctPotential; + double BSIM4v4DGatesidewallJctPotential; + double BSIM4v4SunitAreaJctCap; + double BSIM4v4DunitAreaJctCap; + double BSIM4v4SunitLengthSidewallJctCap; + double BSIM4v4DunitLengthSidewallJctCap; + double BSIM4v4SunitLengthGateSidewallJctCap; + double BSIM4v4DunitLengthGateSidewallJctCap; + double BSIM4v4SjctEmissionCoeff; + double BSIM4v4DjctEmissionCoeff; + double BSIM4v4SjctTempExponent; + double BSIM4v4DjctTempExponent; + double BSIM4v4njtstemp; + double BSIM4v4njtsswtemp; + double BSIM4v4njtsswgtemp; + + double BSIM4v4Lint; + double BSIM4v4Ll; + double BSIM4v4Llc; + double BSIM4v4Lln; + double BSIM4v4Lw; + double BSIM4v4Lwc; + double BSIM4v4Lwn; + double BSIM4v4Lwl; + double BSIM4v4Lwlc; + double BSIM4v4Lmin; + double BSIM4v4Lmax; + + double BSIM4v4Wint; + double BSIM4v4Wl; + double BSIM4v4Wlc; + double BSIM4v4Wln; + double BSIM4v4Ww; + double BSIM4v4Wwc; + double BSIM4v4Wwn; + double BSIM4v4Wwl; + double BSIM4v4Wwlc; + double BSIM4v4Wmin; + double BSIM4v4Wmax; /* added for stress effect */ - double BSIM4V4saref; - double BSIM4V4sbref; - double BSIM4V4wlod; - double BSIM4V4ku0; - double BSIM4V4kvsat; - double BSIM4V4kvth0; - double BSIM4V4tku0; - double BSIM4V4llodku0; - double BSIM4V4wlodku0; - double BSIM4V4llodvth; - double BSIM4V4wlodvth; - double BSIM4V4lku0; - double BSIM4V4wku0; - double BSIM4V4pku0; - double BSIM4V4lkvth0; - double BSIM4V4wkvth0; - double BSIM4V4pkvth0; - double BSIM4V4stk2; - double BSIM4V4lodk2; - double BSIM4V4steta0; - double BSIM4V4lodeta0; + double BSIM4v4saref; + double BSIM4v4sbref; + double BSIM4v4wlod; + double BSIM4v4ku0; + double BSIM4v4kvsat; + double BSIM4v4kvth0; + double BSIM4v4tku0; + double BSIM4v4llodku0; + double BSIM4v4wlodku0; + double BSIM4v4llodvth; + double BSIM4v4wlodvth; + double BSIM4v4lku0; + double BSIM4v4wku0; + double BSIM4v4pku0; + double BSIM4v4lkvth0; + double BSIM4v4wkvth0; + double BSIM4v4pkvth0; + double BSIM4v4stk2; + double BSIM4v4lodk2; + double BSIM4v4steta0; + double BSIM4v4lodeta0; /* Pre-calculated constants * move to size-dependent param */ - double BSIM4V4vtm; - double BSIM4V4vtm0; - double BSIM4V4coxe; - double BSIM4V4coxp; - double BSIM4V4cof1; - double BSIM4V4cof2; - double BSIM4V4cof3; - double BSIM4V4cof4; - double BSIM4V4vcrit; - double BSIM4V4factor1; - double BSIM4V4PhiBS; - double BSIM4V4PhiBSWS; - double BSIM4V4PhiBSWGS; - double BSIM4V4SjctTempSatCurDensity; - double BSIM4V4SjctSidewallTempSatCurDensity; - double BSIM4V4SjctGateSidewallTempSatCurDensity; - double BSIM4V4PhiBD; - double BSIM4V4PhiBSWD; - double BSIM4V4PhiBSWGD; - double BSIM4V4DjctTempSatCurDensity; - double BSIM4V4DjctSidewallTempSatCurDensity; - double BSIM4V4DjctGateSidewallTempSatCurDensity; - double BSIM4V4SunitAreaTempJctCap; - double BSIM4V4DunitAreaTempJctCap; - double BSIM4V4SunitLengthSidewallTempJctCap; - double BSIM4V4DunitLengthSidewallTempJctCap; - double BSIM4V4SunitLengthGateSidewallTempJctCap; - double BSIM4V4DunitLengthGateSidewallTempJctCap; - - double BSIM4V4oxideTrapDensityA; - double BSIM4V4oxideTrapDensityB; - double BSIM4V4oxideTrapDensityC; - double BSIM4V4em; - double BSIM4V4ef; - double BSIM4V4af; - double BSIM4V4kf; - - int BSIM4V4rgeomod; + double BSIM4v4vtm; + double BSIM4v4vtm0; + double BSIM4v4coxe; + double BSIM4v4coxp; + double BSIM4v4cof1; + double BSIM4v4cof2; + double BSIM4v4cof3; + double BSIM4v4cof4; + double BSIM4v4vcrit; + double BSIM4v4factor1; + double BSIM4v4PhiBS; + double BSIM4v4PhiBSWS; + double BSIM4v4PhiBSWGS; + double BSIM4v4SjctTempSatCurDensity; + double BSIM4v4SjctSidewallTempSatCurDensity; + double BSIM4v4SjctGateSidewallTempSatCurDensity; + double BSIM4v4PhiBD; + double BSIM4v4PhiBSWD; + double BSIM4v4PhiBSWGD; + double BSIM4v4DjctTempSatCurDensity; + double BSIM4v4DjctSidewallTempSatCurDensity; + double BSIM4v4DjctGateSidewallTempSatCurDensity; + double BSIM4v4SunitAreaTempJctCap; + double BSIM4v4DunitAreaTempJctCap; + double BSIM4v4SunitLengthSidewallTempJctCap; + double BSIM4v4DunitLengthSidewallTempJctCap; + double BSIM4v4SunitLengthGateSidewallTempJctCap; + double BSIM4v4DunitLengthGateSidewallTempJctCap; + + double BSIM4v4oxideTrapDensityA; + double BSIM4v4oxideTrapDensityB; + double BSIM4v4oxideTrapDensityC; + double BSIM4v4em; + double BSIM4v4ef; + double BSIM4v4af; + double BSIM4v4kf; + + int BSIM4v4rgeomod; /* strain parameters */ - double BSIM4V4stimod; - double BSIM4V4sa0; - double BSIM4V4sb0; + double BSIM4v4stimod; + double BSIM4v4sa0; + double BSIM4v4sb0; struct bsim4SizeDependParam *pSizeDependParamKnot; /* Flags */ - unsigned BSIM4V4rgeomodGiven :1; - unsigned BSIM4V4stimodGiven :1; - unsigned BSIM4V4sa0Given :1; - unsigned BSIM4V4sb0Given :1; - - unsigned BSIM4V4mobModGiven :1; - unsigned BSIM4V4binUnitGiven :1; - unsigned BSIM4V4capModGiven :1; - unsigned BSIM4V4dioModGiven :1; - unsigned BSIM4V4rdsModGiven :1; - unsigned BSIM4V4rbodyModGiven :1; - unsigned BSIM4V4rgateModGiven :1; - unsigned BSIM4V4perModGiven :1; - unsigned BSIM4V4geoModGiven :1; - unsigned BSIM4V4paramChkGiven :1; - unsigned BSIM4V4trnqsModGiven :1; - unsigned BSIM4V4acnqsModGiven :1; - unsigned BSIM4V4fnoiModGiven :1; - unsigned BSIM4V4tnoiModGiven :1; - unsigned BSIM4V4igcModGiven :1; - unsigned BSIM4V4igbModGiven :1; - unsigned BSIM4V4tempModGiven :1; - unsigned BSIM4V4typeGiven :1; - unsigned BSIM4V4toxrefGiven :1; - unsigned BSIM4V4toxeGiven :1; - unsigned BSIM4V4toxpGiven :1; - unsigned BSIM4V4toxmGiven :1; - unsigned BSIM4V4dtoxGiven :1; - unsigned BSIM4V4epsroxGiven :1; - unsigned BSIM4V4versionGiven :1; - unsigned BSIM4V4cdscGiven :1; - unsigned BSIM4V4cdscbGiven :1; - unsigned BSIM4V4cdscdGiven :1; - unsigned BSIM4V4citGiven :1; - unsigned BSIM4V4nfactorGiven :1; - unsigned BSIM4V4xjGiven :1; - unsigned BSIM4V4vsatGiven :1; - unsigned BSIM4V4atGiven :1; - unsigned BSIM4V4a0Given :1; - unsigned BSIM4V4agsGiven :1; - unsigned BSIM4V4a1Given :1; - unsigned BSIM4V4a2Given :1; - unsigned BSIM4V4ketaGiven :1; - unsigned BSIM4V4nsubGiven :1; - unsigned BSIM4V4ndepGiven :1; - unsigned BSIM4V4nsdGiven :1; - unsigned BSIM4V4phinGiven :1; - unsigned BSIM4V4ngateGiven :1; - unsigned BSIM4V4gamma1Given :1; - unsigned BSIM4V4gamma2Given :1; - unsigned BSIM4V4vbxGiven :1; - unsigned BSIM4V4vbmGiven :1; - unsigned BSIM4V4xtGiven :1; - unsigned BSIM4V4k1Given :1; - unsigned BSIM4V4kt1Given :1; - unsigned BSIM4V4kt1lGiven :1; - unsigned BSIM4V4kt2Given :1; - unsigned BSIM4V4k2Given :1; - unsigned BSIM4V4k3Given :1; - unsigned BSIM4V4k3bGiven :1; - unsigned BSIM4V4w0Given :1; - unsigned BSIM4V4dvtp0Given :1; - unsigned BSIM4V4dvtp1Given :1; - unsigned BSIM4V4lpe0Given :1; - unsigned BSIM4V4lpebGiven :1; - unsigned BSIM4V4dvt0Given :1; - unsigned BSIM4V4dvt1Given :1; - unsigned BSIM4V4dvt2Given :1; - unsigned BSIM4V4dvt0wGiven :1; - unsigned BSIM4V4dvt1wGiven :1; - unsigned BSIM4V4dvt2wGiven :1; - unsigned BSIM4V4droutGiven :1; - unsigned BSIM4V4dsubGiven :1; - unsigned BSIM4V4vth0Given :1; - unsigned BSIM4V4euGiven :1; - unsigned BSIM4V4uaGiven :1; - unsigned BSIM4V4ua1Given :1; - unsigned BSIM4V4ubGiven :1; - unsigned BSIM4V4ub1Given :1; - unsigned BSIM4V4ucGiven :1; - unsigned BSIM4V4uc1Given :1; - unsigned BSIM4V4u0Given :1; - unsigned BSIM4V4uteGiven :1; - unsigned BSIM4V4voffGiven :1; - unsigned BSIM4V4vofflGiven :1; - unsigned BSIM4V4minvGiven :1; - unsigned BSIM4V4rdswGiven :1; - unsigned BSIM4V4rdswminGiven :1; - unsigned BSIM4V4rdwminGiven :1; - unsigned BSIM4V4rswminGiven :1; - unsigned BSIM4V4rswGiven :1; - unsigned BSIM4V4rdwGiven :1; - unsigned BSIM4V4prwgGiven :1; - unsigned BSIM4V4prwbGiven :1; - unsigned BSIM4V4prtGiven :1; - unsigned BSIM4V4eta0Given :1; - unsigned BSIM4V4etabGiven :1; - unsigned BSIM4V4pclmGiven :1; - unsigned BSIM4V4pdibl1Given :1; - unsigned BSIM4V4pdibl2Given :1; - unsigned BSIM4V4pdiblbGiven :1; - unsigned BSIM4V4fproutGiven :1; - unsigned BSIM4V4pditsGiven :1; - unsigned BSIM4V4pditsdGiven :1; - unsigned BSIM4V4pditslGiven :1; - unsigned BSIM4V4pscbe1Given :1; - unsigned BSIM4V4pscbe2Given :1; - unsigned BSIM4V4pvagGiven :1; - unsigned BSIM4V4deltaGiven :1; - unsigned BSIM4V4wrGiven :1; - unsigned BSIM4V4dwgGiven :1; - unsigned BSIM4V4dwbGiven :1; - unsigned BSIM4V4b0Given :1; - unsigned BSIM4V4b1Given :1; - unsigned BSIM4V4alpha0Given :1; - unsigned BSIM4V4alpha1Given :1; - unsigned BSIM4V4beta0Given :1; - unsigned BSIM4V4agidlGiven :1; - unsigned BSIM4V4bgidlGiven :1; - unsigned BSIM4V4cgidlGiven :1; - unsigned BSIM4V4egidlGiven :1; - unsigned BSIM4V4aigcGiven :1; - unsigned BSIM4V4bigcGiven :1; - unsigned BSIM4V4cigcGiven :1; - unsigned BSIM4V4aigsdGiven :1; - unsigned BSIM4V4bigsdGiven :1; - unsigned BSIM4V4cigsdGiven :1; - unsigned BSIM4V4aigbaccGiven :1; - unsigned BSIM4V4bigbaccGiven :1; - unsigned BSIM4V4cigbaccGiven :1; - unsigned BSIM4V4aigbinvGiven :1; - unsigned BSIM4V4bigbinvGiven :1; - unsigned BSIM4V4cigbinvGiven :1; - unsigned BSIM4V4nigcGiven :1; - unsigned BSIM4V4nigbinvGiven :1; - unsigned BSIM4V4nigbaccGiven :1; - unsigned BSIM4V4ntoxGiven :1; - unsigned BSIM4V4eigbinvGiven :1; - unsigned BSIM4V4pigcdGiven :1; - unsigned BSIM4V4poxedgeGiven :1; - unsigned BSIM4V4ijthdfwdGiven :1; - unsigned BSIM4V4ijthsfwdGiven :1; - unsigned BSIM4V4ijthdrevGiven :1; - unsigned BSIM4V4ijthsrevGiven :1; - unsigned BSIM4V4xjbvdGiven :1; - unsigned BSIM4V4xjbvsGiven :1; - unsigned BSIM4V4bvdGiven :1; - unsigned BSIM4V4bvsGiven :1; - - unsigned BSIM4V4jtssGiven :1; - unsigned BSIM4V4jtsdGiven :1; - unsigned BSIM4V4jtsswsGiven :1; - unsigned BSIM4V4jtsswdGiven :1; - unsigned BSIM4V4jtsswgsGiven :1; - unsigned BSIM4V4jtsswgdGiven :1; - unsigned BSIM4V4njtsGiven :1; - unsigned BSIM4V4njtsswGiven :1; - unsigned BSIM4V4njtsswgGiven :1; - unsigned BSIM4V4xtssGiven :1; - unsigned BSIM4V4xtsdGiven :1; - unsigned BSIM4V4xtsswsGiven :1; - unsigned BSIM4V4xtsswdGiven :1; - unsigned BSIM4V4xtsswgsGiven :1; - unsigned BSIM4V4xtsswgdGiven :1; - unsigned BSIM4V4tnjtsGiven :1; - unsigned BSIM4V4tnjtsswGiven :1; - unsigned BSIM4V4tnjtsswgGiven :1; - unsigned BSIM4V4vtssGiven :1; - unsigned BSIM4V4vtsdGiven :1; - unsigned BSIM4V4vtsswsGiven :1; - unsigned BSIM4V4vtsswdGiven :1; - unsigned BSIM4V4vtsswgsGiven :1; - unsigned BSIM4V4vtsswgdGiven :1; - - unsigned BSIM4V4vfbGiven :1; - unsigned BSIM4V4gbminGiven :1; - unsigned BSIM4V4rbdbGiven :1; - unsigned BSIM4V4rbsbGiven :1; - unsigned BSIM4V4rbpsGiven :1; - unsigned BSIM4V4rbpdGiven :1; - unsigned BSIM4V4rbpbGiven :1; - unsigned BSIM4V4xrcrg1Given :1; - unsigned BSIM4V4xrcrg2Given :1; - unsigned BSIM4V4tnoiaGiven :1; - unsigned BSIM4V4tnoibGiven :1; - unsigned BSIM4V4rnoiaGiven :1; - unsigned BSIM4V4rnoibGiven :1; - unsigned BSIM4V4ntnoiGiven :1; - - unsigned BSIM4V4lambdaGiven :1; - unsigned BSIM4V4vtlGiven :1; - unsigned BSIM4V4lcGiven :1; - unsigned BSIM4V4xnGiven :1; - unsigned BSIM4V4vfbsdoffGiven :1; - unsigned BSIM4V4lintnoiGiven :1; + unsigned BSIM4v4rgeomodGiven :1; + unsigned BSIM4v4stimodGiven :1; + unsigned BSIM4v4sa0Given :1; + unsigned BSIM4v4sb0Given :1; + + unsigned BSIM4v4mobModGiven :1; + unsigned BSIM4v4binUnitGiven :1; + unsigned BSIM4v4capModGiven :1; + unsigned BSIM4v4dioModGiven :1; + unsigned BSIM4v4rdsModGiven :1; + unsigned BSIM4v4rbodyModGiven :1; + unsigned BSIM4v4rgateModGiven :1; + unsigned BSIM4v4perModGiven :1; + unsigned BSIM4v4geoModGiven :1; + unsigned BSIM4v4paramChkGiven :1; + unsigned BSIM4v4trnqsModGiven :1; + unsigned BSIM4v4acnqsModGiven :1; + unsigned BSIM4v4fnoiModGiven :1; + unsigned BSIM4v4tnoiModGiven :1; + unsigned BSIM4v4igcModGiven :1; + unsigned BSIM4v4igbModGiven :1; + unsigned BSIM4v4tempModGiven :1; + unsigned BSIM4v4typeGiven :1; + unsigned BSIM4v4toxrefGiven :1; + unsigned BSIM4v4toxeGiven :1; + unsigned BSIM4v4toxpGiven :1; + unsigned BSIM4v4toxmGiven :1; + unsigned BSIM4v4dtoxGiven :1; + unsigned BSIM4v4epsroxGiven :1; + unsigned BSIM4v4versionGiven :1; + unsigned BSIM4v4cdscGiven :1; + unsigned BSIM4v4cdscbGiven :1; + unsigned BSIM4v4cdscdGiven :1; + unsigned BSIM4v4citGiven :1; + unsigned BSIM4v4nfactorGiven :1; + unsigned BSIM4v4xjGiven :1; + unsigned BSIM4v4vsatGiven :1; + unsigned BSIM4v4atGiven :1; + unsigned BSIM4v4a0Given :1; + unsigned BSIM4v4agsGiven :1; + unsigned BSIM4v4a1Given :1; + unsigned BSIM4v4a2Given :1; + unsigned BSIM4v4ketaGiven :1; + unsigned BSIM4v4nsubGiven :1; + unsigned BSIM4v4ndepGiven :1; + unsigned BSIM4v4nsdGiven :1; + unsigned BSIM4v4phinGiven :1; + unsigned BSIM4v4ngateGiven :1; + unsigned BSIM4v4gamma1Given :1; + unsigned BSIM4v4gamma2Given :1; + unsigned BSIM4v4vbxGiven :1; + unsigned BSIM4v4vbmGiven :1; + unsigned BSIM4v4xtGiven :1; + unsigned BSIM4v4k1Given :1; + unsigned BSIM4v4kt1Given :1; + unsigned BSIM4v4kt1lGiven :1; + unsigned BSIM4v4kt2Given :1; + unsigned BSIM4v4k2Given :1; + unsigned BSIM4v4k3Given :1; + unsigned BSIM4v4k3bGiven :1; + unsigned BSIM4v4w0Given :1; + unsigned BSIM4v4dvtp0Given :1; + unsigned BSIM4v4dvtp1Given :1; + unsigned BSIM4v4lpe0Given :1; + unsigned BSIM4v4lpebGiven :1; + unsigned BSIM4v4dvt0Given :1; + unsigned BSIM4v4dvt1Given :1; + unsigned BSIM4v4dvt2Given :1; + unsigned BSIM4v4dvt0wGiven :1; + unsigned BSIM4v4dvt1wGiven :1; + unsigned BSIM4v4dvt2wGiven :1; + unsigned BSIM4v4droutGiven :1; + unsigned BSIM4v4dsubGiven :1; + unsigned BSIM4v4vth0Given :1; + unsigned BSIM4v4euGiven :1; + unsigned BSIM4v4uaGiven :1; + unsigned BSIM4v4ua1Given :1; + unsigned BSIM4v4ubGiven :1; + unsigned BSIM4v4ub1Given :1; + unsigned BSIM4v4ucGiven :1; + unsigned BSIM4v4uc1Given :1; + unsigned BSIM4v4u0Given :1; + unsigned BSIM4v4uteGiven :1; + unsigned BSIM4v4voffGiven :1; + unsigned BSIM4v4vofflGiven :1; + unsigned BSIM4v4minvGiven :1; + unsigned BSIM4v4rdswGiven :1; + unsigned BSIM4v4rdswminGiven :1; + unsigned BSIM4v4rdwminGiven :1; + unsigned BSIM4v4rswminGiven :1; + unsigned BSIM4v4rswGiven :1; + unsigned BSIM4v4rdwGiven :1; + unsigned BSIM4v4prwgGiven :1; + unsigned BSIM4v4prwbGiven :1; + unsigned BSIM4v4prtGiven :1; + unsigned BSIM4v4eta0Given :1; + unsigned BSIM4v4etabGiven :1; + unsigned BSIM4v4pclmGiven :1; + unsigned BSIM4v4pdibl1Given :1; + unsigned BSIM4v4pdibl2Given :1; + unsigned BSIM4v4pdiblbGiven :1; + unsigned BSIM4v4fproutGiven :1; + unsigned BSIM4v4pditsGiven :1; + unsigned BSIM4v4pditsdGiven :1; + unsigned BSIM4v4pditslGiven :1; + unsigned BSIM4v4pscbe1Given :1; + unsigned BSIM4v4pscbe2Given :1; + unsigned BSIM4v4pvagGiven :1; + unsigned BSIM4v4deltaGiven :1; + unsigned BSIM4v4wrGiven :1; + unsigned BSIM4v4dwgGiven :1; + unsigned BSIM4v4dwbGiven :1; + unsigned BSIM4v4b0Given :1; + unsigned BSIM4v4b1Given :1; + unsigned BSIM4v4alpha0Given :1; + unsigned BSIM4v4alpha1Given :1; + unsigned BSIM4v4beta0Given :1; + unsigned BSIM4v4agidlGiven :1; + unsigned BSIM4v4bgidlGiven :1; + unsigned BSIM4v4cgidlGiven :1; + unsigned BSIM4v4egidlGiven :1; + unsigned BSIM4v4aigcGiven :1; + unsigned BSIM4v4bigcGiven :1; + unsigned BSIM4v4cigcGiven :1; + unsigned BSIM4v4aigsdGiven :1; + unsigned BSIM4v4bigsdGiven :1; + unsigned BSIM4v4cigsdGiven :1; + unsigned BSIM4v4aigbaccGiven :1; + unsigned BSIM4v4bigbaccGiven :1; + unsigned BSIM4v4cigbaccGiven :1; + unsigned BSIM4v4aigbinvGiven :1; + unsigned BSIM4v4bigbinvGiven :1; + unsigned BSIM4v4cigbinvGiven :1; + unsigned BSIM4v4nigcGiven :1; + unsigned BSIM4v4nigbinvGiven :1; + unsigned BSIM4v4nigbaccGiven :1; + unsigned BSIM4v4ntoxGiven :1; + unsigned BSIM4v4eigbinvGiven :1; + unsigned BSIM4v4pigcdGiven :1; + unsigned BSIM4v4poxedgeGiven :1; + unsigned BSIM4v4ijthdfwdGiven :1; + unsigned BSIM4v4ijthsfwdGiven :1; + unsigned BSIM4v4ijthdrevGiven :1; + unsigned BSIM4v4ijthsrevGiven :1; + unsigned BSIM4v4xjbvdGiven :1; + unsigned BSIM4v4xjbvsGiven :1; + unsigned BSIM4v4bvdGiven :1; + unsigned BSIM4v4bvsGiven :1; + + unsigned BSIM4v4jtssGiven :1; + unsigned BSIM4v4jtsdGiven :1; + unsigned BSIM4v4jtsswsGiven :1; + unsigned BSIM4v4jtsswdGiven :1; + unsigned BSIM4v4jtsswgsGiven :1; + unsigned BSIM4v4jtsswgdGiven :1; + unsigned BSIM4v4njtsGiven :1; + unsigned BSIM4v4njtsswGiven :1; + unsigned BSIM4v4njtsswgGiven :1; + unsigned BSIM4v4xtssGiven :1; + unsigned BSIM4v4xtsdGiven :1; + unsigned BSIM4v4xtsswsGiven :1; + unsigned BSIM4v4xtsswdGiven :1; + unsigned BSIM4v4xtsswgsGiven :1; + unsigned BSIM4v4xtsswgdGiven :1; + unsigned BSIM4v4tnjtsGiven :1; + unsigned BSIM4v4tnjtsswGiven :1; + unsigned BSIM4v4tnjtsswgGiven :1; + unsigned BSIM4v4vtssGiven :1; + unsigned BSIM4v4vtsdGiven :1; + unsigned BSIM4v4vtsswsGiven :1; + unsigned BSIM4v4vtsswdGiven :1; + unsigned BSIM4v4vtsswgsGiven :1; + unsigned BSIM4v4vtsswgdGiven :1; + + unsigned BSIM4v4vfbGiven :1; + unsigned BSIM4v4gbminGiven :1; + unsigned BSIM4v4rbdbGiven :1; + unsigned BSIM4v4rbsbGiven :1; + unsigned BSIM4v4rbpsGiven :1; + unsigned BSIM4v4rbpdGiven :1; + unsigned BSIM4v4rbpbGiven :1; + unsigned BSIM4v4xrcrg1Given :1; + unsigned BSIM4v4xrcrg2Given :1; + unsigned BSIM4v4tnoiaGiven :1; + unsigned BSIM4v4tnoibGiven :1; + unsigned BSIM4v4rnoiaGiven :1; + unsigned BSIM4v4rnoibGiven :1; + unsigned BSIM4v4ntnoiGiven :1; + + unsigned BSIM4v4lambdaGiven :1; + unsigned BSIM4v4vtlGiven :1; + unsigned BSIM4v4lcGiven :1; + unsigned BSIM4v4xnGiven :1; + unsigned BSIM4v4vfbsdoffGiven :1; + unsigned BSIM4v4lintnoiGiven :1; /* CV model and parasitics */ - unsigned BSIM4V4cgslGiven :1; - unsigned BSIM4V4cgdlGiven :1; - unsigned BSIM4V4ckappasGiven :1; - unsigned BSIM4V4ckappadGiven :1; - unsigned BSIM4V4cfGiven :1; - unsigned BSIM4V4vfbcvGiven :1; - unsigned BSIM4V4clcGiven :1; - unsigned BSIM4V4cleGiven :1; - unsigned BSIM4V4dwcGiven :1; - unsigned BSIM4V4dlcGiven :1; - unsigned BSIM4V4xwGiven :1; - unsigned BSIM4V4xlGiven :1; - unsigned BSIM4V4dlcigGiven :1; - unsigned BSIM4V4dwjGiven :1; - unsigned BSIM4V4noffGiven :1; - unsigned BSIM4V4voffcvGiven :1; - unsigned BSIM4V4acdeGiven :1; - unsigned BSIM4V4moinGiven :1; - unsigned BSIM4V4tcjGiven :1; - unsigned BSIM4V4tcjswGiven :1; - unsigned BSIM4V4tcjswgGiven :1; - unsigned BSIM4V4tpbGiven :1; - unsigned BSIM4V4tpbswGiven :1; - unsigned BSIM4V4tpbswgGiven :1; - unsigned BSIM4V4dmcgGiven :1; - unsigned BSIM4V4dmciGiven :1; - unsigned BSIM4V4dmdgGiven :1; - unsigned BSIM4V4dmcgtGiven :1; - unsigned BSIM4V4xgwGiven :1; - unsigned BSIM4V4xglGiven :1; - unsigned BSIM4V4rshgGiven :1; - unsigned BSIM4V4ngconGiven :1; + unsigned BSIM4v4cgslGiven :1; + unsigned BSIM4v4cgdlGiven :1; + unsigned BSIM4v4ckappasGiven :1; + unsigned BSIM4v4ckappadGiven :1; + unsigned BSIM4v4cfGiven :1; + unsigned BSIM4v4vfbcvGiven :1; + unsigned BSIM4v4clcGiven :1; + unsigned BSIM4v4cleGiven :1; + unsigned BSIM4v4dwcGiven :1; + unsigned BSIM4v4dlcGiven :1; + unsigned BSIM4v4xwGiven :1; + unsigned BSIM4v4xlGiven :1; + unsigned BSIM4v4dlcigGiven :1; + unsigned BSIM4v4dwjGiven :1; + unsigned BSIM4v4noffGiven :1; + unsigned BSIM4v4voffcvGiven :1; + unsigned BSIM4v4acdeGiven :1; + unsigned BSIM4v4moinGiven :1; + unsigned BSIM4v4tcjGiven :1; + unsigned BSIM4v4tcjswGiven :1; + unsigned BSIM4v4tcjswgGiven :1; + unsigned BSIM4v4tpbGiven :1; + unsigned BSIM4v4tpbswGiven :1; + unsigned BSIM4v4tpbswgGiven :1; + unsigned BSIM4v4dmcgGiven :1; + unsigned BSIM4v4dmciGiven :1; + unsigned BSIM4v4dmdgGiven :1; + unsigned BSIM4v4dmcgtGiven :1; + unsigned BSIM4v4xgwGiven :1; + unsigned BSIM4v4xglGiven :1; + unsigned BSIM4v4rshgGiven :1; + unsigned BSIM4v4ngconGiven :1; /* Length dependence */ - unsigned BSIM4V4lcdscGiven :1; - unsigned BSIM4V4lcdscbGiven :1; - unsigned BSIM4V4lcdscdGiven :1; - unsigned BSIM4V4lcitGiven :1; - unsigned BSIM4V4lnfactorGiven :1; - unsigned BSIM4V4lxjGiven :1; - unsigned BSIM4V4lvsatGiven :1; - unsigned BSIM4V4latGiven :1; - unsigned BSIM4V4la0Given :1; - unsigned BSIM4V4lagsGiven :1; - unsigned BSIM4V4la1Given :1; - unsigned BSIM4V4la2Given :1; - unsigned BSIM4V4lketaGiven :1; - unsigned BSIM4V4lnsubGiven :1; - unsigned BSIM4V4lndepGiven :1; - unsigned BSIM4V4lnsdGiven :1; - unsigned BSIM4V4lphinGiven :1; - unsigned BSIM4V4lngateGiven :1; - unsigned BSIM4V4lgamma1Given :1; - unsigned BSIM4V4lgamma2Given :1; - unsigned BSIM4V4lvbxGiven :1; - unsigned BSIM4V4lvbmGiven :1; - unsigned BSIM4V4lxtGiven :1; - unsigned BSIM4V4lk1Given :1; - unsigned BSIM4V4lkt1Given :1; - unsigned BSIM4V4lkt1lGiven :1; - unsigned BSIM4V4lkt2Given :1; - unsigned BSIM4V4lk2Given :1; - unsigned BSIM4V4lk3Given :1; - unsigned BSIM4V4lk3bGiven :1; - unsigned BSIM4V4lw0Given :1; - unsigned BSIM4V4ldvtp0Given :1; - unsigned BSIM4V4ldvtp1Given :1; - unsigned BSIM4V4llpe0Given :1; - unsigned BSIM4V4llpebGiven :1; - unsigned BSIM4V4ldvt0Given :1; - unsigned BSIM4V4ldvt1Given :1; - unsigned BSIM4V4ldvt2Given :1; - unsigned BSIM4V4ldvt0wGiven :1; - unsigned BSIM4V4ldvt1wGiven :1; - unsigned BSIM4V4ldvt2wGiven :1; - unsigned BSIM4V4ldroutGiven :1; - unsigned BSIM4V4ldsubGiven :1; - unsigned BSIM4V4lvth0Given :1; - unsigned BSIM4V4luaGiven :1; - unsigned BSIM4V4lua1Given :1; - unsigned BSIM4V4lubGiven :1; - unsigned BSIM4V4lub1Given :1; - unsigned BSIM4V4lucGiven :1; - unsigned BSIM4V4luc1Given :1; - unsigned BSIM4V4lu0Given :1; - unsigned BSIM4V4leuGiven :1; - unsigned BSIM4V4luteGiven :1; - unsigned BSIM4V4lvoffGiven :1; - unsigned BSIM4V4lminvGiven :1; - unsigned BSIM4V4lrdswGiven :1; - unsigned BSIM4V4lrswGiven :1; - unsigned BSIM4V4lrdwGiven :1; - unsigned BSIM4V4lprwgGiven :1; - unsigned BSIM4V4lprwbGiven :1; - unsigned BSIM4V4lprtGiven :1; - unsigned BSIM4V4leta0Given :1; - unsigned BSIM4V4letabGiven :1; - unsigned BSIM4V4lpclmGiven :1; - unsigned BSIM4V4lpdibl1Given :1; - unsigned BSIM4V4lpdibl2Given :1; - unsigned BSIM4V4lpdiblbGiven :1; - unsigned BSIM4V4lfproutGiven :1; - unsigned BSIM4V4lpditsGiven :1; - unsigned BSIM4V4lpditsdGiven :1; - unsigned BSIM4V4lpscbe1Given :1; - unsigned BSIM4V4lpscbe2Given :1; - unsigned BSIM4V4lpvagGiven :1; - unsigned BSIM4V4ldeltaGiven :1; - unsigned BSIM4V4lwrGiven :1; - unsigned BSIM4V4ldwgGiven :1; - unsigned BSIM4V4ldwbGiven :1; - unsigned BSIM4V4lb0Given :1; - unsigned BSIM4V4lb1Given :1; - unsigned BSIM4V4lalpha0Given :1; - unsigned BSIM4V4lalpha1Given :1; - unsigned BSIM4V4lbeta0Given :1; - unsigned BSIM4V4lvfbGiven :1; - unsigned BSIM4V4lagidlGiven :1; - unsigned BSIM4V4lbgidlGiven :1; - unsigned BSIM4V4lcgidlGiven :1; - unsigned BSIM4V4legidlGiven :1; - unsigned BSIM4V4laigcGiven :1; - unsigned BSIM4V4lbigcGiven :1; - unsigned BSIM4V4lcigcGiven :1; - unsigned BSIM4V4laigsdGiven :1; - unsigned BSIM4V4lbigsdGiven :1; - unsigned BSIM4V4lcigsdGiven :1; - unsigned BSIM4V4laigbaccGiven :1; - unsigned BSIM4V4lbigbaccGiven :1; - unsigned BSIM4V4lcigbaccGiven :1; - unsigned BSIM4V4laigbinvGiven :1; - unsigned BSIM4V4lbigbinvGiven :1; - unsigned BSIM4V4lcigbinvGiven :1; - unsigned BSIM4V4lnigcGiven :1; - unsigned BSIM4V4lnigbinvGiven :1; - unsigned BSIM4V4lnigbaccGiven :1; - unsigned BSIM4V4lntoxGiven :1; - unsigned BSIM4V4leigbinvGiven :1; - unsigned BSIM4V4lpigcdGiven :1; - unsigned BSIM4V4lpoxedgeGiven :1; - unsigned BSIM4V4lxrcrg1Given :1; - unsigned BSIM4V4lxrcrg2Given :1; - unsigned BSIM4V4llambdaGiven :1; - unsigned BSIM4V4lvtlGiven :1; - unsigned BSIM4V4lxnGiven :1; - unsigned BSIM4V4lvfbsdoffGiven :1; + unsigned BSIM4v4lcdscGiven :1; + unsigned BSIM4v4lcdscbGiven :1; + unsigned BSIM4v4lcdscdGiven :1; + unsigned BSIM4v4lcitGiven :1; + unsigned BSIM4v4lnfactorGiven :1; + unsigned BSIM4v4lxjGiven :1; + unsigned BSIM4v4lvsatGiven :1; + unsigned BSIM4v4latGiven :1; + unsigned BSIM4v4la0Given :1; + unsigned BSIM4v4lagsGiven :1; + unsigned BSIM4v4la1Given :1; + unsigned BSIM4v4la2Given :1; + unsigned BSIM4v4lketaGiven :1; + unsigned BSIM4v4lnsubGiven :1; + unsigned BSIM4v4lndepGiven :1; + unsigned BSIM4v4lnsdGiven :1; + unsigned BSIM4v4lphinGiven :1; + unsigned BSIM4v4lngateGiven :1; + unsigned BSIM4v4lgamma1Given :1; + unsigned BSIM4v4lgamma2Given :1; + unsigned BSIM4v4lvbxGiven :1; + unsigned BSIM4v4lvbmGiven :1; + unsigned BSIM4v4lxtGiven :1; + unsigned BSIM4v4lk1Given :1; + unsigned BSIM4v4lkt1Given :1; + unsigned BSIM4v4lkt1lGiven :1; + unsigned BSIM4v4lkt2Given :1; + unsigned BSIM4v4lk2Given :1; + unsigned BSIM4v4lk3Given :1; + unsigned BSIM4v4lk3bGiven :1; + unsigned BSIM4v4lw0Given :1; + unsigned BSIM4v4ldvtp0Given :1; + unsigned BSIM4v4ldvtp1Given :1; + unsigned BSIM4v4llpe0Given :1; + unsigned BSIM4v4llpebGiven :1; + unsigned BSIM4v4ldvt0Given :1; + unsigned BSIM4v4ldvt1Given :1; + unsigned BSIM4v4ldvt2Given :1; + unsigned BSIM4v4ldvt0wGiven :1; + unsigned BSIM4v4ldvt1wGiven :1; + unsigned BSIM4v4ldvt2wGiven :1; + unsigned BSIM4v4ldroutGiven :1; + unsigned BSIM4v4ldsubGiven :1; + unsigned BSIM4v4lvth0Given :1; + unsigned BSIM4v4luaGiven :1; + unsigned BSIM4v4lua1Given :1; + unsigned BSIM4v4lubGiven :1; + unsigned BSIM4v4lub1Given :1; + unsigned BSIM4v4lucGiven :1; + unsigned BSIM4v4luc1Given :1; + unsigned BSIM4v4lu0Given :1; + unsigned BSIM4v4leuGiven :1; + unsigned BSIM4v4luteGiven :1; + unsigned BSIM4v4lvoffGiven :1; + unsigned BSIM4v4lminvGiven :1; + unsigned BSIM4v4lrdswGiven :1; + unsigned BSIM4v4lrswGiven :1; + unsigned BSIM4v4lrdwGiven :1; + unsigned BSIM4v4lprwgGiven :1; + unsigned BSIM4v4lprwbGiven :1; + unsigned BSIM4v4lprtGiven :1; + unsigned BSIM4v4leta0Given :1; + unsigned BSIM4v4letabGiven :1; + unsigned BSIM4v4lpclmGiven :1; + unsigned BSIM4v4lpdibl1Given :1; + unsigned BSIM4v4lpdibl2Given :1; + unsigned BSIM4v4lpdiblbGiven :1; + unsigned BSIM4v4lfproutGiven :1; + unsigned BSIM4v4lpditsGiven :1; + unsigned BSIM4v4lpditsdGiven :1; + unsigned BSIM4v4lpscbe1Given :1; + unsigned BSIM4v4lpscbe2Given :1; + unsigned BSIM4v4lpvagGiven :1; + unsigned BSIM4v4ldeltaGiven :1; + unsigned BSIM4v4lwrGiven :1; + unsigned BSIM4v4ldwgGiven :1; + unsigned BSIM4v4ldwbGiven :1; + unsigned BSIM4v4lb0Given :1; + unsigned BSIM4v4lb1Given :1; + unsigned BSIM4v4lalpha0Given :1; + unsigned BSIM4v4lalpha1Given :1; + unsigned BSIM4v4lbeta0Given :1; + unsigned BSIM4v4lvfbGiven :1; + unsigned BSIM4v4lagidlGiven :1; + unsigned BSIM4v4lbgidlGiven :1; + unsigned BSIM4v4lcgidlGiven :1; + unsigned BSIM4v4legidlGiven :1; + unsigned BSIM4v4laigcGiven :1; + unsigned BSIM4v4lbigcGiven :1; + unsigned BSIM4v4lcigcGiven :1; + unsigned BSIM4v4laigsdGiven :1; + unsigned BSIM4v4lbigsdGiven :1; + unsigned BSIM4v4lcigsdGiven :1; + unsigned BSIM4v4laigbaccGiven :1; + unsigned BSIM4v4lbigbaccGiven :1; + unsigned BSIM4v4lcigbaccGiven :1; + unsigned BSIM4v4laigbinvGiven :1; + unsigned BSIM4v4lbigbinvGiven :1; + unsigned BSIM4v4lcigbinvGiven :1; + unsigned BSIM4v4lnigcGiven :1; + unsigned BSIM4v4lnigbinvGiven :1; + unsigned BSIM4v4lnigbaccGiven :1; + unsigned BSIM4v4lntoxGiven :1; + unsigned BSIM4v4leigbinvGiven :1; + unsigned BSIM4v4lpigcdGiven :1; + unsigned BSIM4v4lpoxedgeGiven :1; + unsigned BSIM4v4lxrcrg1Given :1; + unsigned BSIM4v4lxrcrg2Given :1; + unsigned BSIM4v4llambdaGiven :1; + unsigned BSIM4v4lvtlGiven :1; + unsigned BSIM4v4lxnGiven :1; + unsigned BSIM4v4lvfbsdoffGiven :1; /* CV model */ - unsigned BSIM4V4lcgslGiven :1; - unsigned BSIM4V4lcgdlGiven :1; - unsigned BSIM4V4lckappasGiven :1; - unsigned BSIM4V4lckappadGiven :1; - unsigned BSIM4V4lcfGiven :1; - unsigned BSIM4V4lclcGiven :1; - unsigned BSIM4V4lcleGiven :1; - unsigned BSIM4V4lvfbcvGiven :1; - unsigned BSIM4V4lnoffGiven :1; - unsigned BSIM4V4lvoffcvGiven :1; - unsigned BSIM4V4lacdeGiven :1; - unsigned BSIM4V4lmoinGiven :1; + unsigned BSIM4v4lcgslGiven :1; + unsigned BSIM4v4lcgdlGiven :1; + unsigned BSIM4v4lckappasGiven :1; + unsigned BSIM4v4lckappadGiven :1; + unsigned BSIM4v4lcfGiven :1; + unsigned BSIM4v4lclcGiven :1; + unsigned BSIM4v4lcleGiven :1; + unsigned BSIM4v4lvfbcvGiven :1; + unsigned BSIM4v4lnoffGiven :1; + unsigned BSIM4v4lvoffcvGiven :1; + unsigned BSIM4v4lacdeGiven :1; + unsigned BSIM4v4lmoinGiven :1; /* Width dependence */ - unsigned BSIM4V4wcdscGiven :1; - unsigned BSIM4V4wcdscbGiven :1; - unsigned BSIM4V4wcdscdGiven :1; - unsigned BSIM4V4wcitGiven :1; - unsigned BSIM4V4wnfactorGiven :1; - unsigned BSIM4V4wxjGiven :1; - unsigned BSIM4V4wvsatGiven :1; - unsigned BSIM4V4watGiven :1; - unsigned BSIM4V4wa0Given :1; - unsigned BSIM4V4wagsGiven :1; - unsigned BSIM4V4wa1Given :1; - unsigned BSIM4V4wa2Given :1; - unsigned BSIM4V4wketaGiven :1; - unsigned BSIM4V4wnsubGiven :1; - unsigned BSIM4V4wndepGiven :1; - unsigned BSIM4V4wnsdGiven :1; - unsigned BSIM4V4wphinGiven :1; - unsigned BSIM4V4wngateGiven :1; - unsigned BSIM4V4wgamma1Given :1; - unsigned BSIM4V4wgamma2Given :1; - unsigned BSIM4V4wvbxGiven :1; - unsigned BSIM4V4wvbmGiven :1; - unsigned BSIM4V4wxtGiven :1; - unsigned BSIM4V4wk1Given :1; - unsigned BSIM4V4wkt1Given :1; - unsigned BSIM4V4wkt1lGiven :1; - unsigned BSIM4V4wkt2Given :1; - unsigned BSIM4V4wk2Given :1; - unsigned BSIM4V4wk3Given :1; - unsigned BSIM4V4wk3bGiven :1; - unsigned BSIM4V4ww0Given :1; - unsigned BSIM4V4wdvtp0Given :1; - unsigned BSIM4V4wdvtp1Given :1; - unsigned BSIM4V4wlpe0Given :1; - unsigned BSIM4V4wlpebGiven :1; - unsigned BSIM4V4wdvt0Given :1; - unsigned BSIM4V4wdvt1Given :1; - unsigned BSIM4V4wdvt2Given :1; - unsigned BSIM4V4wdvt0wGiven :1; - unsigned BSIM4V4wdvt1wGiven :1; - unsigned BSIM4V4wdvt2wGiven :1; - unsigned BSIM4V4wdroutGiven :1; - unsigned BSIM4V4wdsubGiven :1; - unsigned BSIM4V4wvth0Given :1; - unsigned BSIM4V4wuaGiven :1; - unsigned BSIM4V4wua1Given :1; - unsigned BSIM4V4wubGiven :1; - unsigned BSIM4V4wub1Given :1; - unsigned BSIM4V4wucGiven :1; - unsigned BSIM4V4wuc1Given :1; - unsigned BSIM4V4wu0Given :1; - unsigned BSIM4V4weuGiven :1; - unsigned BSIM4V4wuteGiven :1; - unsigned BSIM4V4wvoffGiven :1; - unsigned BSIM4V4wminvGiven :1; - unsigned BSIM4V4wrdswGiven :1; - unsigned BSIM4V4wrswGiven :1; - unsigned BSIM4V4wrdwGiven :1; - unsigned BSIM4V4wprwgGiven :1; - unsigned BSIM4V4wprwbGiven :1; - unsigned BSIM4V4wprtGiven :1; - unsigned BSIM4V4weta0Given :1; - unsigned BSIM4V4wetabGiven :1; - unsigned BSIM4V4wpclmGiven :1; - unsigned BSIM4V4wpdibl1Given :1; - unsigned BSIM4V4wpdibl2Given :1; - unsigned BSIM4V4wpdiblbGiven :1; - unsigned BSIM4V4wfproutGiven :1; - unsigned BSIM4V4wpditsGiven :1; - unsigned BSIM4V4wpditsdGiven :1; - unsigned BSIM4V4wpscbe1Given :1; - unsigned BSIM4V4wpscbe2Given :1; - unsigned BSIM4V4wpvagGiven :1; - unsigned BSIM4V4wdeltaGiven :1; - unsigned BSIM4V4wwrGiven :1; - unsigned BSIM4V4wdwgGiven :1; - unsigned BSIM4V4wdwbGiven :1; - unsigned BSIM4V4wb0Given :1; - unsigned BSIM4V4wb1Given :1; - unsigned BSIM4V4walpha0Given :1; - unsigned BSIM4V4walpha1Given :1; - unsigned BSIM4V4wbeta0Given :1; - unsigned BSIM4V4wvfbGiven :1; - unsigned BSIM4V4wagidlGiven :1; - unsigned BSIM4V4wbgidlGiven :1; - unsigned BSIM4V4wcgidlGiven :1; - unsigned BSIM4V4wegidlGiven :1; - unsigned BSIM4V4waigcGiven :1; - unsigned BSIM4V4wbigcGiven :1; - unsigned BSIM4V4wcigcGiven :1; - unsigned BSIM4V4waigsdGiven :1; - unsigned BSIM4V4wbigsdGiven :1; - unsigned BSIM4V4wcigsdGiven :1; - unsigned BSIM4V4waigbaccGiven :1; - unsigned BSIM4V4wbigbaccGiven :1; - unsigned BSIM4V4wcigbaccGiven :1; - unsigned BSIM4V4waigbinvGiven :1; - unsigned BSIM4V4wbigbinvGiven :1; - unsigned BSIM4V4wcigbinvGiven :1; - unsigned BSIM4V4wnigcGiven :1; - unsigned BSIM4V4wnigbinvGiven :1; - unsigned BSIM4V4wnigbaccGiven :1; - unsigned BSIM4V4wntoxGiven :1; - unsigned BSIM4V4weigbinvGiven :1; - unsigned BSIM4V4wpigcdGiven :1; - unsigned BSIM4V4wpoxedgeGiven :1; - unsigned BSIM4V4wxrcrg1Given :1; - unsigned BSIM4V4wxrcrg2Given :1; - unsigned BSIM4V4wlambdaGiven :1; - unsigned BSIM4V4wvtlGiven :1; - unsigned BSIM4V4wxnGiven :1; - unsigned BSIM4V4wvfbsdoffGiven :1; + unsigned BSIM4v4wcdscGiven :1; + unsigned BSIM4v4wcdscbGiven :1; + unsigned BSIM4v4wcdscdGiven :1; + unsigned BSIM4v4wcitGiven :1; + unsigned BSIM4v4wnfactorGiven :1; + unsigned BSIM4v4wxjGiven :1; + unsigned BSIM4v4wvsatGiven :1; + unsigned BSIM4v4watGiven :1; + unsigned BSIM4v4wa0Given :1; + unsigned BSIM4v4wagsGiven :1; + unsigned BSIM4v4wa1Given :1; + unsigned BSIM4v4wa2Given :1; + unsigned BSIM4v4wketaGiven :1; + unsigned BSIM4v4wnsubGiven :1; + unsigned BSIM4v4wndepGiven :1; + unsigned BSIM4v4wnsdGiven :1; + unsigned BSIM4v4wphinGiven :1; + unsigned BSIM4v4wngateGiven :1; + unsigned BSIM4v4wgamma1Given :1; + unsigned BSIM4v4wgamma2Given :1; + unsigned BSIM4v4wvbxGiven :1; + unsigned BSIM4v4wvbmGiven :1; + unsigned BSIM4v4wxtGiven :1; + unsigned BSIM4v4wk1Given :1; + unsigned BSIM4v4wkt1Given :1; + unsigned BSIM4v4wkt1lGiven :1; + unsigned BSIM4v4wkt2Given :1; + unsigned BSIM4v4wk2Given :1; + unsigned BSIM4v4wk3Given :1; + unsigned BSIM4v4wk3bGiven :1; + unsigned BSIM4v4ww0Given :1; + unsigned BSIM4v4wdvtp0Given :1; + unsigned BSIM4v4wdvtp1Given :1; + unsigned BSIM4v4wlpe0Given :1; + unsigned BSIM4v4wlpebGiven :1; + unsigned BSIM4v4wdvt0Given :1; + unsigned BSIM4v4wdvt1Given :1; + unsigned BSIM4v4wdvt2Given :1; + unsigned BSIM4v4wdvt0wGiven :1; + unsigned BSIM4v4wdvt1wGiven :1; + unsigned BSIM4v4wdvt2wGiven :1; + unsigned BSIM4v4wdroutGiven :1; + unsigned BSIM4v4wdsubGiven :1; + unsigned BSIM4v4wvth0Given :1; + unsigned BSIM4v4wuaGiven :1; + unsigned BSIM4v4wua1Given :1; + unsigned BSIM4v4wubGiven :1; + unsigned BSIM4v4wub1Given :1; + unsigned BSIM4v4wucGiven :1; + unsigned BSIM4v4wuc1Given :1; + unsigned BSIM4v4wu0Given :1; + unsigned BSIM4v4weuGiven :1; + unsigned BSIM4v4wuteGiven :1; + unsigned BSIM4v4wvoffGiven :1; + unsigned BSIM4v4wminvGiven :1; + unsigned BSIM4v4wrdswGiven :1; + unsigned BSIM4v4wrswGiven :1; + unsigned BSIM4v4wrdwGiven :1; + unsigned BSIM4v4wprwgGiven :1; + unsigned BSIM4v4wprwbGiven :1; + unsigned BSIM4v4wprtGiven :1; + unsigned BSIM4v4weta0Given :1; + unsigned BSIM4v4wetabGiven :1; + unsigned BSIM4v4wpclmGiven :1; + unsigned BSIM4v4wpdibl1Given :1; + unsigned BSIM4v4wpdibl2Given :1; + unsigned BSIM4v4wpdiblbGiven :1; + unsigned BSIM4v4wfproutGiven :1; + unsigned BSIM4v4wpditsGiven :1; + unsigned BSIM4v4wpditsdGiven :1; + unsigned BSIM4v4wpscbe1Given :1; + unsigned BSIM4v4wpscbe2Given :1; + unsigned BSIM4v4wpvagGiven :1; + unsigned BSIM4v4wdeltaGiven :1; + unsigned BSIM4v4wwrGiven :1; + unsigned BSIM4v4wdwgGiven :1; + unsigned BSIM4v4wdwbGiven :1; + unsigned BSIM4v4wb0Given :1; + unsigned BSIM4v4wb1Given :1; + unsigned BSIM4v4walpha0Given :1; + unsigned BSIM4v4walpha1Given :1; + unsigned BSIM4v4wbeta0Given :1; + unsigned BSIM4v4wvfbGiven :1; + unsigned BSIM4v4wagidlGiven :1; + unsigned BSIM4v4wbgidlGiven :1; + unsigned BSIM4v4wcgidlGiven :1; + unsigned BSIM4v4wegidlGiven :1; + unsigned BSIM4v4waigcGiven :1; + unsigned BSIM4v4wbigcGiven :1; + unsigned BSIM4v4wcigcGiven :1; + unsigned BSIM4v4waigsdGiven :1; + unsigned BSIM4v4wbigsdGiven :1; + unsigned BSIM4v4wcigsdGiven :1; + unsigned BSIM4v4waigbaccGiven :1; + unsigned BSIM4v4wbigbaccGiven :1; + unsigned BSIM4v4wcigbaccGiven :1; + unsigned BSIM4v4waigbinvGiven :1; + unsigned BSIM4v4wbigbinvGiven :1; + unsigned BSIM4v4wcigbinvGiven :1; + unsigned BSIM4v4wnigcGiven :1; + unsigned BSIM4v4wnigbinvGiven :1; + unsigned BSIM4v4wnigbaccGiven :1; + unsigned BSIM4v4wntoxGiven :1; + unsigned BSIM4v4weigbinvGiven :1; + unsigned BSIM4v4wpigcdGiven :1; + unsigned BSIM4v4wpoxedgeGiven :1; + unsigned BSIM4v4wxrcrg1Given :1; + unsigned BSIM4v4wxrcrg2Given :1; + unsigned BSIM4v4wlambdaGiven :1; + unsigned BSIM4v4wvtlGiven :1; + unsigned BSIM4v4wxnGiven :1; + unsigned BSIM4v4wvfbsdoffGiven :1; /* CV model */ - unsigned BSIM4V4wcgslGiven :1; - unsigned BSIM4V4wcgdlGiven :1; - unsigned BSIM4V4wckappasGiven :1; - unsigned BSIM4V4wckappadGiven :1; - unsigned BSIM4V4wcfGiven :1; - unsigned BSIM4V4wclcGiven :1; - unsigned BSIM4V4wcleGiven :1; - unsigned BSIM4V4wvfbcvGiven :1; - unsigned BSIM4V4wnoffGiven :1; - unsigned BSIM4V4wvoffcvGiven :1; - unsigned BSIM4V4wacdeGiven :1; - unsigned BSIM4V4wmoinGiven :1; + unsigned BSIM4v4wcgslGiven :1; + unsigned BSIM4v4wcgdlGiven :1; + unsigned BSIM4v4wckappasGiven :1; + unsigned BSIM4v4wckappadGiven :1; + unsigned BSIM4v4wcfGiven :1; + unsigned BSIM4v4wclcGiven :1; + unsigned BSIM4v4wcleGiven :1; + unsigned BSIM4v4wvfbcvGiven :1; + unsigned BSIM4v4wnoffGiven :1; + unsigned BSIM4v4wvoffcvGiven :1; + unsigned BSIM4v4wacdeGiven :1; + unsigned BSIM4v4wmoinGiven :1; /* Cross-term dependence */ - unsigned BSIM4V4pcdscGiven :1; - unsigned BSIM4V4pcdscbGiven :1; - unsigned BSIM4V4pcdscdGiven :1; - unsigned BSIM4V4pcitGiven :1; - unsigned BSIM4V4pnfactorGiven :1; - unsigned BSIM4V4pxjGiven :1; - unsigned BSIM4V4pvsatGiven :1; - unsigned BSIM4V4patGiven :1; - unsigned BSIM4V4pa0Given :1; - unsigned BSIM4V4pagsGiven :1; - unsigned BSIM4V4pa1Given :1; - unsigned BSIM4V4pa2Given :1; - unsigned BSIM4V4pketaGiven :1; - unsigned BSIM4V4pnsubGiven :1; - unsigned BSIM4V4pndepGiven :1; - unsigned BSIM4V4pnsdGiven :1; - unsigned BSIM4V4pphinGiven :1; - unsigned BSIM4V4pngateGiven :1; - unsigned BSIM4V4pgamma1Given :1; - unsigned BSIM4V4pgamma2Given :1; - unsigned BSIM4V4pvbxGiven :1; - unsigned BSIM4V4pvbmGiven :1; - unsigned BSIM4V4pxtGiven :1; - unsigned BSIM4V4pk1Given :1; - unsigned BSIM4V4pkt1Given :1; - unsigned BSIM4V4pkt1lGiven :1; - unsigned BSIM4V4pkt2Given :1; - unsigned BSIM4V4pk2Given :1; - unsigned BSIM4V4pk3Given :1; - unsigned BSIM4V4pk3bGiven :1; - unsigned BSIM4V4pw0Given :1; - unsigned BSIM4V4pdvtp0Given :1; - unsigned BSIM4V4pdvtp1Given :1; - unsigned BSIM4V4plpe0Given :1; - unsigned BSIM4V4plpebGiven :1; - unsigned BSIM4V4pdvt0Given :1; - unsigned BSIM4V4pdvt1Given :1; - unsigned BSIM4V4pdvt2Given :1; - unsigned BSIM4V4pdvt0wGiven :1; - unsigned BSIM4V4pdvt1wGiven :1; - unsigned BSIM4V4pdvt2wGiven :1; - unsigned BSIM4V4pdroutGiven :1; - unsigned BSIM4V4pdsubGiven :1; - unsigned BSIM4V4pvth0Given :1; - unsigned BSIM4V4puaGiven :1; - unsigned BSIM4V4pua1Given :1; - unsigned BSIM4V4pubGiven :1; - unsigned BSIM4V4pub1Given :1; - unsigned BSIM4V4pucGiven :1; - unsigned BSIM4V4puc1Given :1; - unsigned BSIM4V4pu0Given :1; - unsigned BSIM4V4peuGiven :1; - unsigned BSIM4V4puteGiven :1; - unsigned BSIM4V4pvoffGiven :1; - unsigned BSIM4V4pminvGiven :1; - unsigned BSIM4V4prdswGiven :1; - unsigned BSIM4V4prswGiven :1; - unsigned BSIM4V4prdwGiven :1; - unsigned BSIM4V4pprwgGiven :1; - unsigned BSIM4V4pprwbGiven :1; - unsigned BSIM4V4pprtGiven :1; - unsigned BSIM4V4peta0Given :1; - unsigned BSIM4V4petabGiven :1; - unsigned BSIM4V4ppclmGiven :1; - unsigned BSIM4V4ppdibl1Given :1; - unsigned BSIM4V4ppdibl2Given :1; - unsigned BSIM4V4ppdiblbGiven :1; - unsigned BSIM4V4pfproutGiven :1; - unsigned BSIM4V4ppditsGiven :1; - unsigned BSIM4V4ppditsdGiven :1; - unsigned BSIM4V4ppscbe1Given :1; - unsigned BSIM4V4ppscbe2Given :1; - unsigned BSIM4V4ppvagGiven :1; - unsigned BSIM4V4pdeltaGiven :1; - unsigned BSIM4V4pwrGiven :1; - unsigned BSIM4V4pdwgGiven :1; - unsigned BSIM4V4pdwbGiven :1; - unsigned BSIM4V4pb0Given :1; - unsigned BSIM4V4pb1Given :1; - unsigned BSIM4V4palpha0Given :1; - unsigned BSIM4V4palpha1Given :1; - unsigned BSIM4V4pbeta0Given :1; - unsigned BSIM4V4pvfbGiven :1; - unsigned BSIM4V4pagidlGiven :1; - unsigned BSIM4V4pbgidlGiven :1; - unsigned BSIM4V4pcgidlGiven :1; - unsigned BSIM4V4pegidlGiven :1; - unsigned BSIM4V4paigcGiven :1; - unsigned BSIM4V4pbigcGiven :1; - unsigned BSIM4V4pcigcGiven :1; - unsigned BSIM4V4paigsdGiven :1; - unsigned BSIM4V4pbigsdGiven :1; - unsigned BSIM4V4pcigsdGiven :1; - unsigned BSIM4V4paigbaccGiven :1; - unsigned BSIM4V4pbigbaccGiven :1; - unsigned BSIM4V4pcigbaccGiven :1; - unsigned BSIM4V4paigbinvGiven :1; - unsigned BSIM4V4pbigbinvGiven :1; - unsigned BSIM4V4pcigbinvGiven :1; - unsigned BSIM4V4pnigcGiven :1; - unsigned BSIM4V4pnigbinvGiven :1; - unsigned BSIM4V4pnigbaccGiven :1; - unsigned BSIM4V4pntoxGiven :1; - unsigned BSIM4V4peigbinvGiven :1; - unsigned BSIM4V4ppigcdGiven :1; - unsigned BSIM4V4ppoxedgeGiven :1; - unsigned BSIM4V4pxrcrg1Given :1; - unsigned BSIM4V4pxrcrg2Given :1; - unsigned BSIM4V4plambdaGiven :1; - unsigned BSIM4V4pvtlGiven :1; - unsigned BSIM4V4pxnGiven :1; - unsigned BSIM4V4pvfbsdoffGiven :1; + unsigned BSIM4v4pcdscGiven :1; + unsigned BSIM4v4pcdscbGiven :1; + unsigned BSIM4v4pcdscdGiven :1; + unsigned BSIM4v4pcitGiven :1; + unsigned BSIM4v4pnfactorGiven :1; + unsigned BSIM4v4pxjGiven :1; + unsigned BSIM4v4pvsatGiven :1; + unsigned BSIM4v4patGiven :1; + unsigned BSIM4v4pa0Given :1; + unsigned BSIM4v4pagsGiven :1; + unsigned BSIM4v4pa1Given :1; + unsigned BSIM4v4pa2Given :1; + unsigned BSIM4v4pketaGiven :1; + unsigned BSIM4v4pnsubGiven :1; + unsigned BSIM4v4pndepGiven :1; + unsigned BSIM4v4pnsdGiven :1; + unsigned BSIM4v4pphinGiven :1; + unsigned BSIM4v4pngateGiven :1; + unsigned BSIM4v4pgamma1Given :1; + unsigned BSIM4v4pgamma2Given :1; + unsigned BSIM4v4pvbxGiven :1; + unsigned BSIM4v4pvbmGiven :1; + unsigned BSIM4v4pxtGiven :1; + unsigned BSIM4v4pk1Given :1; + unsigned BSIM4v4pkt1Given :1; + unsigned BSIM4v4pkt1lGiven :1; + unsigned BSIM4v4pkt2Given :1; + unsigned BSIM4v4pk2Given :1; + unsigned BSIM4v4pk3Given :1; + unsigned BSIM4v4pk3bGiven :1; + unsigned BSIM4v4pw0Given :1; + unsigned BSIM4v4pdvtp0Given :1; + unsigned BSIM4v4pdvtp1Given :1; + unsigned BSIM4v4plpe0Given :1; + unsigned BSIM4v4plpebGiven :1; + unsigned BSIM4v4pdvt0Given :1; + unsigned BSIM4v4pdvt1Given :1; + unsigned BSIM4v4pdvt2Given :1; + unsigned BSIM4v4pdvt0wGiven :1; + unsigned BSIM4v4pdvt1wGiven :1; + unsigned BSIM4v4pdvt2wGiven :1; + unsigned BSIM4v4pdroutGiven :1; + unsigned BSIM4v4pdsubGiven :1; + unsigned BSIM4v4pvth0Given :1; + unsigned BSIM4v4puaGiven :1; + unsigned BSIM4v4pua1Given :1; + unsigned BSIM4v4pubGiven :1; + unsigned BSIM4v4pub1Given :1; + unsigned BSIM4v4pucGiven :1; + unsigned BSIM4v4puc1Given :1; + unsigned BSIM4v4pu0Given :1; + unsigned BSIM4v4peuGiven :1; + unsigned BSIM4v4puteGiven :1; + unsigned BSIM4v4pvoffGiven :1; + unsigned BSIM4v4pminvGiven :1; + unsigned BSIM4v4prdswGiven :1; + unsigned BSIM4v4prswGiven :1; + unsigned BSIM4v4prdwGiven :1; + unsigned BSIM4v4pprwgGiven :1; + unsigned BSIM4v4pprwbGiven :1; + unsigned BSIM4v4pprtGiven :1; + unsigned BSIM4v4peta0Given :1; + unsigned BSIM4v4petabGiven :1; + unsigned BSIM4v4ppclmGiven :1; + unsigned BSIM4v4ppdibl1Given :1; + unsigned BSIM4v4ppdibl2Given :1; + unsigned BSIM4v4ppdiblbGiven :1; + unsigned BSIM4v4pfproutGiven :1; + unsigned BSIM4v4ppditsGiven :1; + unsigned BSIM4v4ppditsdGiven :1; + unsigned BSIM4v4ppscbe1Given :1; + unsigned BSIM4v4ppscbe2Given :1; + unsigned BSIM4v4ppvagGiven :1; + unsigned BSIM4v4pdeltaGiven :1; + unsigned BSIM4v4pwrGiven :1; + unsigned BSIM4v4pdwgGiven :1; + unsigned BSIM4v4pdwbGiven :1; + unsigned BSIM4v4pb0Given :1; + unsigned BSIM4v4pb1Given :1; + unsigned BSIM4v4palpha0Given :1; + unsigned BSIM4v4palpha1Given :1; + unsigned BSIM4v4pbeta0Given :1; + unsigned BSIM4v4pvfbGiven :1; + unsigned BSIM4v4pagidlGiven :1; + unsigned BSIM4v4pbgidlGiven :1; + unsigned BSIM4v4pcgidlGiven :1; + unsigned BSIM4v4pegidlGiven :1; + unsigned BSIM4v4paigcGiven :1; + unsigned BSIM4v4pbigcGiven :1; + unsigned BSIM4v4pcigcGiven :1; + unsigned BSIM4v4paigsdGiven :1; + unsigned BSIM4v4pbigsdGiven :1; + unsigned BSIM4v4pcigsdGiven :1; + unsigned BSIM4v4paigbaccGiven :1; + unsigned BSIM4v4pbigbaccGiven :1; + unsigned BSIM4v4pcigbaccGiven :1; + unsigned BSIM4v4paigbinvGiven :1; + unsigned BSIM4v4pbigbinvGiven :1; + unsigned BSIM4v4pcigbinvGiven :1; + unsigned BSIM4v4pnigcGiven :1; + unsigned BSIM4v4pnigbinvGiven :1; + unsigned BSIM4v4pnigbaccGiven :1; + unsigned BSIM4v4pntoxGiven :1; + unsigned BSIM4v4peigbinvGiven :1; + unsigned BSIM4v4ppigcdGiven :1; + unsigned BSIM4v4ppoxedgeGiven :1; + unsigned BSIM4v4pxrcrg1Given :1; + unsigned BSIM4v4pxrcrg2Given :1; + unsigned BSIM4v4plambdaGiven :1; + unsigned BSIM4v4pvtlGiven :1; + unsigned BSIM4v4pxnGiven :1; + unsigned BSIM4v4pvfbsdoffGiven :1; /* CV model */ - unsigned BSIM4V4pcgslGiven :1; - unsigned BSIM4V4pcgdlGiven :1; - unsigned BSIM4V4pckappasGiven :1; - unsigned BSIM4V4pckappadGiven :1; - unsigned BSIM4V4pcfGiven :1; - unsigned BSIM4V4pclcGiven :1; - unsigned BSIM4V4pcleGiven :1; - unsigned BSIM4V4pvfbcvGiven :1; - unsigned BSIM4V4pnoffGiven :1; - unsigned BSIM4V4pvoffcvGiven :1; - unsigned BSIM4V4pacdeGiven :1; - unsigned BSIM4V4pmoinGiven :1; - - unsigned BSIM4V4useFringeGiven :1; - - unsigned BSIM4V4tnomGiven :1; - unsigned BSIM4V4cgsoGiven :1; - unsigned BSIM4V4cgdoGiven :1; - unsigned BSIM4V4cgboGiven :1; - unsigned BSIM4V4xpartGiven :1; - unsigned BSIM4V4sheetResistanceGiven :1; - - unsigned BSIM4V4SjctSatCurDensityGiven :1; - unsigned BSIM4V4SjctSidewallSatCurDensityGiven :1; - unsigned BSIM4V4SjctGateSidewallSatCurDensityGiven :1; - unsigned BSIM4V4SbulkJctPotentialGiven :1; - unsigned BSIM4V4SbulkJctBotGradingCoeffGiven :1; - unsigned BSIM4V4SsidewallJctPotentialGiven :1; - unsigned BSIM4V4SGatesidewallJctPotentialGiven :1; - unsigned BSIM4V4SbulkJctSideGradingCoeffGiven :1; - unsigned BSIM4V4SunitAreaJctCapGiven :1; - unsigned BSIM4V4SunitLengthSidewallJctCapGiven :1; - unsigned BSIM4V4SbulkJctGateSideGradingCoeffGiven :1; - unsigned BSIM4V4SunitLengthGateSidewallJctCapGiven :1; - unsigned BSIM4V4SjctEmissionCoeffGiven :1; - unsigned BSIM4V4SjctTempExponentGiven :1; - - unsigned BSIM4V4DjctSatCurDensityGiven :1; - unsigned BSIM4V4DjctSidewallSatCurDensityGiven :1; - unsigned BSIM4V4DjctGateSidewallSatCurDensityGiven :1; - unsigned BSIM4V4DbulkJctPotentialGiven :1; - unsigned BSIM4V4DbulkJctBotGradingCoeffGiven :1; - unsigned BSIM4V4DsidewallJctPotentialGiven :1; - unsigned BSIM4V4DGatesidewallJctPotentialGiven :1; - unsigned BSIM4V4DbulkJctSideGradingCoeffGiven :1; - unsigned BSIM4V4DunitAreaJctCapGiven :1; - unsigned BSIM4V4DunitLengthSidewallJctCapGiven :1; - unsigned BSIM4V4DbulkJctGateSideGradingCoeffGiven :1; - unsigned BSIM4V4DunitLengthGateSidewallJctCapGiven :1; - unsigned BSIM4V4DjctEmissionCoeffGiven :1; - unsigned BSIM4V4DjctTempExponentGiven :1; - - unsigned BSIM4V4oxideTrapDensityAGiven :1; - unsigned BSIM4V4oxideTrapDensityBGiven :1; - unsigned BSIM4V4oxideTrapDensityCGiven :1; - unsigned BSIM4V4emGiven :1; - unsigned BSIM4V4efGiven :1; - unsigned BSIM4V4afGiven :1; - unsigned BSIM4V4kfGiven :1; - - unsigned BSIM4V4LintGiven :1; - unsigned BSIM4V4LlGiven :1; - unsigned BSIM4V4LlcGiven :1; - unsigned BSIM4V4LlnGiven :1; - unsigned BSIM4V4LwGiven :1; - unsigned BSIM4V4LwcGiven :1; - unsigned BSIM4V4LwnGiven :1; - unsigned BSIM4V4LwlGiven :1; - unsigned BSIM4V4LwlcGiven :1; - unsigned BSIM4V4LminGiven :1; - unsigned BSIM4V4LmaxGiven :1; - - unsigned BSIM4V4WintGiven :1; - unsigned BSIM4V4WlGiven :1; - unsigned BSIM4V4WlcGiven :1; - unsigned BSIM4V4WlnGiven :1; - unsigned BSIM4V4WwGiven :1; - unsigned BSIM4V4WwcGiven :1; - unsigned BSIM4V4WwnGiven :1; - unsigned BSIM4V4WwlGiven :1; - unsigned BSIM4V4WwlcGiven :1; - unsigned BSIM4V4WminGiven :1; - unsigned BSIM4V4WmaxGiven :1; + unsigned BSIM4v4pcgslGiven :1; + unsigned BSIM4v4pcgdlGiven :1; + unsigned BSIM4v4pckappasGiven :1; + unsigned BSIM4v4pckappadGiven :1; + unsigned BSIM4v4pcfGiven :1; + unsigned BSIM4v4pclcGiven :1; + unsigned BSIM4v4pcleGiven :1; + unsigned BSIM4v4pvfbcvGiven :1; + unsigned BSIM4v4pnoffGiven :1; + unsigned BSIM4v4pvoffcvGiven :1; + unsigned BSIM4v4pacdeGiven :1; + unsigned BSIM4v4pmoinGiven :1; + + unsigned BSIM4v4useFringeGiven :1; + + unsigned BSIM4v4tnomGiven :1; + unsigned BSIM4v4cgsoGiven :1; + unsigned BSIM4v4cgdoGiven :1; + unsigned BSIM4v4cgboGiven :1; + unsigned BSIM4v4xpartGiven :1; + unsigned BSIM4v4sheetResistanceGiven :1; + + unsigned BSIM4v4SjctSatCurDensityGiven :1; + unsigned BSIM4v4SjctSidewallSatCurDensityGiven :1; + unsigned BSIM4v4SjctGateSidewallSatCurDensityGiven :1; + unsigned BSIM4v4SbulkJctPotentialGiven :1; + unsigned BSIM4v4SbulkJctBotGradingCoeffGiven :1; + unsigned BSIM4v4SsidewallJctPotentialGiven :1; + unsigned BSIM4v4SGatesidewallJctPotentialGiven :1; + unsigned BSIM4v4SbulkJctSideGradingCoeffGiven :1; + unsigned BSIM4v4SunitAreaJctCapGiven :1; + unsigned BSIM4v4SunitLengthSidewallJctCapGiven :1; + unsigned BSIM4v4SbulkJctGateSideGradingCoeffGiven :1; + unsigned BSIM4v4SunitLengthGateSidewallJctCapGiven :1; + unsigned BSIM4v4SjctEmissionCoeffGiven :1; + unsigned BSIM4v4SjctTempExponentGiven :1; + + unsigned BSIM4v4DjctSatCurDensityGiven :1; + unsigned BSIM4v4DjctSidewallSatCurDensityGiven :1; + unsigned BSIM4v4DjctGateSidewallSatCurDensityGiven :1; + unsigned BSIM4v4DbulkJctPotentialGiven :1; + unsigned BSIM4v4DbulkJctBotGradingCoeffGiven :1; + unsigned BSIM4v4DsidewallJctPotentialGiven :1; + unsigned BSIM4v4DGatesidewallJctPotentialGiven :1; + unsigned BSIM4v4DbulkJctSideGradingCoeffGiven :1; + unsigned BSIM4v4DunitAreaJctCapGiven :1; + unsigned BSIM4v4DunitLengthSidewallJctCapGiven :1; + unsigned BSIM4v4DbulkJctGateSideGradingCoeffGiven :1; + unsigned BSIM4v4DunitLengthGateSidewallJctCapGiven :1; + unsigned BSIM4v4DjctEmissionCoeffGiven :1; + unsigned BSIM4v4DjctTempExponentGiven :1; + + unsigned BSIM4v4oxideTrapDensityAGiven :1; + unsigned BSIM4v4oxideTrapDensityBGiven :1; + unsigned BSIM4v4oxideTrapDensityCGiven :1; + unsigned BSIM4v4emGiven :1; + unsigned BSIM4v4efGiven :1; + unsigned BSIM4v4afGiven :1; + unsigned BSIM4v4kfGiven :1; + + unsigned BSIM4v4LintGiven :1; + unsigned BSIM4v4LlGiven :1; + unsigned BSIM4v4LlcGiven :1; + unsigned BSIM4v4LlnGiven :1; + unsigned BSIM4v4LwGiven :1; + unsigned BSIM4v4LwcGiven :1; + unsigned BSIM4v4LwnGiven :1; + unsigned BSIM4v4LwlGiven :1; + unsigned BSIM4v4LwlcGiven :1; + unsigned BSIM4v4LminGiven :1; + unsigned BSIM4v4LmaxGiven :1; + + unsigned BSIM4v4WintGiven :1; + unsigned BSIM4v4WlGiven :1; + unsigned BSIM4v4WlcGiven :1; + unsigned BSIM4v4WlnGiven :1; + unsigned BSIM4v4WwGiven :1; + unsigned BSIM4v4WwcGiven :1; + unsigned BSIM4v4WwnGiven :1; + unsigned BSIM4v4WwlGiven :1; + unsigned BSIM4v4WwlcGiven :1; + unsigned BSIM4v4WminGiven :1; + unsigned BSIM4v4WmaxGiven :1; /* added for stress effect */ - unsigned BSIM4V4sarefGiven :1; - unsigned BSIM4V4sbrefGiven :1; - unsigned BSIM4V4wlodGiven :1; - unsigned BSIM4V4ku0Given :1; - unsigned BSIM4V4kvsatGiven :1; - unsigned BSIM4V4kvth0Given :1; - unsigned BSIM4V4tku0Given :1; - unsigned BSIM4V4llodku0Given :1; - unsigned BSIM4V4wlodku0Given :1; - unsigned BSIM4V4llodvthGiven :1; - unsigned BSIM4V4wlodvthGiven :1; - unsigned BSIM4V4lku0Given :1; - unsigned BSIM4V4wku0Given :1; - unsigned BSIM4V4pku0Given :1; - unsigned BSIM4V4lkvth0Given :1; - unsigned BSIM4V4wkvth0Given :1; - unsigned BSIM4V4pkvth0Given :1; - unsigned BSIM4V4stk2Given :1; - unsigned BSIM4V4lodk2Given :1; - unsigned BSIM4V4steta0Given :1; - unsigned BSIM4V4lodeta0Given :1; - - -} BSIM4V4model; + unsigned BSIM4v4sarefGiven :1; + unsigned BSIM4v4sbrefGiven :1; + unsigned BSIM4v4wlodGiven :1; + unsigned BSIM4v4ku0Given :1; + unsigned BSIM4v4kvsatGiven :1; + unsigned BSIM4v4kvth0Given :1; + unsigned BSIM4v4tku0Given :1; + unsigned BSIM4v4llodku0Given :1; + unsigned BSIM4v4wlodku0Given :1; + unsigned BSIM4v4llodvthGiven :1; + unsigned BSIM4v4wlodvthGiven :1; + unsigned BSIM4v4lku0Given :1; + unsigned BSIM4v4wku0Given :1; + unsigned BSIM4v4pku0Given :1; + unsigned BSIM4v4lkvth0Given :1; + unsigned BSIM4v4wkvth0Given :1; + unsigned BSIM4v4pkvth0Given :1; + unsigned BSIM4v4stk2Given :1; + unsigned BSIM4v4lodk2Given :1; + unsigned BSIM4v4steta0Given :1; + unsigned BSIM4v4lodeta0Given :1; + + +} BSIM4v4model; #ifndef NMOS @@ -2103,833 +2103,833 @@ typedef struct sBSIM4V4model /* Instance parameters */ -#define BSIM4V4_W 1 -#define BSIM4V4_L 2 -#define BSIM4V4_AS 3 -#define BSIM4V4_AD 4 -#define BSIM4V4_PS 5 -#define BSIM4V4_PD 6 -#define BSIM4V4_NRS 7 -#define BSIM4V4_NRD 8 -#define BSIM4V4_OFF 9 -#define BSIM4V4_IC 10 -#define BSIM4V4_IC_VDS 11 -#define BSIM4V4_IC_VGS 12 -#define BSIM4V4_IC_VBS 13 -#define BSIM4V4_TRNQSMOD 14 -#define BSIM4V4_RBODYMOD 15 -#define BSIM4V4_RGATEMOD 16 -#define BSIM4V4_GEOMOD 17 -#define BSIM4V4_RGEOMOD 18 -#define BSIM4V4_NF 19 -#define BSIM4V4_MIN 20 -#define BSIM4V4_ACNQSMOD 22 -#define BSIM4V4_RBDB 23 -#define BSIM4V4_RBSB 24 -#define BSIM4V4_RBPB 25 -#define BSIM4V4_RBPS 26 -#define BSIM4V4_RBPD 27 -#define BSIM4V4_SA 28 -#define BSIM4V4_SB 29 -#define BSIM4V4_SD 30 -#define BSIM4V4_M 31 +#define BSIM4v4_W 1 +#define BSIM4v4_L 2 +#define BSIM4v4_AS 3 +#define BSIM4v4_AD 4 +#define BSIM4v4_PS 5 +#define BSIM4v4_PD 6 +#define BSIM4v4_NRS 7 +#define BSIM4v4_NRD 8 +#define BSIM4v4_OFF 9 +#define BSIM4v4_IC 10 +#define BSIM4v4_IC_VDS 11 +#define BSIM4v4_IC_VGS 12 +#define BSIM4v4_IC_VBS 13 +#define BSIM4v4_TRNQSMOD 14 +#define BSIM4v4_RBODYMOD 15 +#define BSIM4v4_RGATEMOD 16 +#define BSIM4v4_GEOMOD 17 +#define BSIM4v4_RGEOMOD 18 +#define BSIM4v4_NF 19 +#define BSIM4v4_MIN 20 +#define BSIM4v4_ACNQSMOD 22 +#define BSIM4v4_RBDB 23 +#define BSIM4v4_RBSB 24 +#define BSIM4v4_RBPB 25 +#define BSIM4v4_RBPS 26 +#define BSIM4v4_RBPD 27 +#define BSIM4v4_SA 28 +#define BSIM4v4_SB 29 +#define BSIM4v4_SD 30 +#define BSIM4v4_M 31 /* Global parameters */ -#define BSIM4V4_MOD_TEMPMOD 89 -#define BSIM4V4_MOD_IGCMOD 90 -#define BSIM4V4_MOD_IGBMOD 91 -#define BSIM4V4_MOD_ACNQSMOD 92 -#define BSIM4V4_MOD_FNOIMOD 93 -#define BSIM4V4_MOD_RDSMOD 94 -#define BSIM4V4_MOD_DIOMOD 96 -#define BSIM4V4_MOD_PERMOD 97 -#define BSIM4V4_MOD_GEOMOD 98 -#define BSIM4V4_MOD_RGATEMOD 99 -#define BSIM4V4_MOD_RBODYMOD 100 -#define BSIM4V4_MOD_CAPMOD 101 -#define BSIM4V4_MOD_TRNQSMOD 102 -#define BSIM4V4_MOD_MOBMOD 103 -#define BSIM4V4_MOD_TNOIMOD 104 -#define BSIM4V4_MOD_TOXE 105 -#define BSIM4V4_MOD_CDSC 106 -#define BSIM4V4_MOD_CDSCB 107 -#define BSIM4V4_MOD_CIT 108 -#define BSIM4V4_MOD_NFACTOR 109 -#define BSIM4V4_MOD_XJ 110 -#define BSIM4V4_MOD_VSAT 111 -#define BSIM4V4_MOD_AT 112 -#define BSIM4V4_MOD_A0 113 -#define BSIM4V4_MOD_A1 114 -#define BSIM4V4_MOD_A2 115 -#define BSIM4V4_MOD_KETA 116 -#define BSIM4V4_MOD_NSUB 117 -#define BSIM4V4_MOD_NDEP 118 -#define BSIM4V4_MOD_NGATE 120 -#define BSIM4V4_MOD_GAMMA1 121 -#define BSIM4V4_MOD_GAMMA2 122 -#define BSIM4V4_MOD_VBX 123 -#define BSIM4V4_MOD_BINUNIT 124 -#define BSIM4V4_MOD_VBM 125 -#define BSIM4V4_MOD_XT 126 -#define BSIM4V4_MOD_K1 129 -#define BSIM4V4_MOD_KT1 130 -#define BSIM4V4_MOD_KT1L 131 -#define BSIM4V4_MOD_K2 132 -#define BSIM4V4_MOD_KT2 133 -#define BSIM4V4_MOD_K3 134 -#define BSIM4V4_MOD_K3B 135 -#define BSIM4V4_MOD_W0 136 -#define BSIM4V4_MOD_LPE0 137 -#define BSIM4V4_MOD_DVT0 138 -#define BSIM4V4_MOD_DVT1 139 -#define BSIM4V4_MOD_DVT2 140 -#define BSIM4V4_MOD_DVT0W 141 -#define BSIM4V4_MOD_DVT1W 142 -#define BSIM4V4_MOD_DVT2W 143 -#define BSIM4V4_MOD_DROUT 144 -#define BSIM4V4_MOD_DSUB 145 -#define BSIM4V4_MOD_VTH0 146 -#define BSIM4V4_MOD_UA 147 -#define BSIM4V4_MOD_UA1 148 -#define BSIM4V4_MOD_UB 149 -#define BSIM4V4_MOD_UB1 150 -#define BSIM4V4_MOD_UC 151 -#define BSIM4V4_MOD_UC1 152 -#define BSIM4V4_MOD_U0 153 -#define BSIM4V4_MOD_UTE 154 -#define BSIM4V4_MOD_VOFF 155 -#define BSIM4V4_MOD_DELTA 156 -#define BSIM4V4_MOD_RDSW 157 -#define BSIM4V4_MOD_PRT 158 -#define BSIM4V4_MOD_LDD 159 -#define BSIM4V4_MOD_ETA 160 -#define BSIM4V4_MOD_ETA0 161 -#define BSIM4V4_MOD_ETAB 162 -#define BSIM4V4_MOD_PCLM 163 -#define BSIM4V4_MOD_PDIBL1 164 -#define BSIM4V4_MOD_PDIBL2 165 -#define BSIM4V4_MOD_PSCBE1 166 -#define BSIM4V4_MOD_PSCBE2 167 -#define BSIM4V4_MOD_PVAG 168 -#define BSIM4V4_MOD_WR 169 -#define BSIM4V4_MOD_DWG 170 -#define BSIM4V4_MOD_DWB 171 -#define BSIM4V4_MOD_B0 172 -#define BSIM4V4_MOD_B1 173 -#define BSIM4V4_MOD_ALPHA0 174 -#define BSIM4V4_MOD_BETA0 175 -#define BSIM4V4_MOD_PDIBLB 178 -#define BSIM4V4_MOD_PRWG 179 -#define BSIM4V4_MOD_PRWB 180 -#define BSIM4V4_MOD_CDSCD 181 -#define BSIM4V4_MOD_AGS 182 -#define BSIM4V4_MOD_FRINGE 184 -#define BSIM4V4_MOD_CGSL 186 -#define BSIM4V4_MOD_CGDL 187 -#define BSIM4V4_MOD_CKAPPAS 188 -#define BSIM4V4_MOD_CF 189 -#define BSIM4V4_MOD_CLC 190 -#define BSIM4V4_MOD_CLE 191 -#define BSIM4V4_MOD_PARAMCHK 192 -#define BSIM4V4_MOD_VERSION 193 -#define BSIM4V4_MOD_VFBCV 194 -#define BSIM4V4_MOD_ACDE 195 -#define BSIM4V4_MOD_MOIN 196 -#define BSIM4V4_MOD_NOFF 197 -#define BSIM4V4_MOD_IJTHDFWD 198 -#define BSIM4V4_MOD_ALPHA1 199 -#define BSIM4V4_MOD_VFB 200 -#define BSIM4V4_MOD_TOXM 201 -#define BSIM4V4_MOD_TCJ 202 -#define BSIM4V4_MOD_TCJSW 203 -#define BSIM4V4_MOD_TCJSWG 204 -#define BSIM4V4_MOD_TPB 205 -#define BSIM4V4_MOD_TPBSW 206 -#define BSIM4V4_MOD_TPBSWG 207 -#define BSIM4V4_MOD_VOFFCV 208 -#define BSIM4V4_MOD_GBMIN 209 -#define BSIM4V4_MOD_RBDB 210 -#define BSIM4V4_MOD_RBSB 211 -#define BSIM4V4_MOD_RBPB 212 -#define BSIM4V4_MOD_RBPS 213 -#define BSIM4V4_MOD_RBPD 214 -#define BSIM4V4_MOD_DMCG 215 -#define BSIM4V4_MOD_DMCI 216 -#define BSIM4V4_MOD_DMDG 217 -#define BSIM4V4_MOD_XGW 218 -#define BSIM4V4_MOD_XGL 219 -#define BSIM4V4_MOD_RSHG 220 -#define BSIM4V4_MOD_NGCON 221 -#define BSIM4V4_MOD_AGIDL 222 -#define BSIM4V4_MOD_BGIDL 223 -#define BSIM4V4_MOD_EGIDL 224 -#define BSIM4V4_MOD_IJTHSFWD 225 -#define BSIM4V4_MOD_XJBVD 226 -#define BSIM4V4_MOD_XJBVS 227 -#define BSIM4V4_MOD_BVD 228 -#define BSIM4V4_MOD_BVS 229 -#define BSIM4V4_MOD_TOXP 230 -#define BSIM4V4_MOD_DTOX 231 -#define BSIM4V4_MOD_XRCRG1 232 -#define BSIM4V4_MOD_XRCRG2 233 -#define BSIM4V4_MOD_EU 234 -#define BSIM4V4_MOD_IJTHSREV 235 -#define BSIM4V4_MOD_IJTHDREV 236 -#define BSIM4V4_MOD_MINV 237 -#define BSIM4V4_MOD_VOFFL 238 -#define BSIM4V4_MOD_PDITS 239 -#define BSIM4V4_MOD_PDITSD 240 -#define BSIM4V4_MOD_PDITSL 241 -#define BSIM4V4_MOD_TNOIA 242 -#define BSIM4V4_MOD_TNOIB 243 -#define BSIM4V4_MOD_NTNOI 244 -#define BSIM4V4_MOD_FPROUT 245 -#define BSIM4V4_MOD_LPEB 246 -#define BSIM4V4_MOD_DVTP0 247 -#define BSIM4V4_MOD_DVTP1 248 -#define BSIM4V4_MOD_CGIDL 249 -#define BSIM4V4_MOD_PHIN 250 -#define BSIM4V4_MOD_RDSWMIN 251 -#define BSIM4V4_MOD_RSW 252 -#define BSIM4V4_MOD_RDW 253 -#define BSIM4V4_MOD_RDWMIN 254 -#define BSIM4V4_MOD_RSWMIN 255 -#define BSIM4V4_MOD_NSD 256 -#define BSIM4V4_MOD_CKAPPAD 257 -#define BSIM4V4_MOD_DMCGT 258 -#define BSIM4V4_MOD_AIGC 259 -#define BSIM4V4_MOD_BIGC 260 -#define BSIM4V4_MOD_CIGC 261 -#define BSIM4V4_MOD_AIGBACC 262 -#define BSIM4V4_MOD_BIGBACC 263 -#define BSIM4V4_MOD_CIGBACC 264 -#define BSIM4V4_MOD_AIGBINV 265 -#define BSIM4V4_MOD_BIGBINV 266 -#define BSIM4V4_MOD_CIGBINV 267 -#define BSIM4V4_MOD_NIGC 268 -#define BSIM4V4_MOD_NIGBACC 269 -#define BSIM4V4_MOD_NIGBINV 270 -#define BSIM4V4_MOD_NTOX 271 -#define BSIM4V4_MOD_TOXREF 272 -#define BSIM4V4_MOD_EIGBINV 273 -#define BSIM4V4_MOD_PIGCD 274 -#define BSIM4V4_MOD_POXEDGE 275 -#define BSIM4V4_MOD_EPSROX 276 -#define BSIM4V4_MOD_AIGSD 277 -#define BSIM4V4_MOD_BIGSD 278 -#define BSIM4V4_MOD_CIGSD 279 -#define BSIM4V4_MOD_JSWGS 280 -#define BSIM4V4_MOD_JSWGD 281 -#define BSIM4V4_MOD_LAMBDA 282 -#define BSIM4V4_MOD_VTL 283 -#define BSIM4V4_MOD_LC 284 -#define BSIM4V4_MOD_XN 285 -#define BSIM4V4_MOD_RNOIA 286 -#define BSIM4V4_MOD_RNOIB 287 -#define BSIM4V4_MOD_VFBSDOFF 288 -#define BSIM4V4_MOD_LINTNOI 289 +#define BSIM4v4_MOD_TEMPMOD 89 +#define BSIM4v4_MOD_IGCMOD 90 +#define BSIM4v4_MOD_IGBMOD 91 +#define BSIM4v4_MOD_ACNQSMOD 92 +#define BSIM4v4_MOD_FNOIMOD 93 +#define BSIM4v4_MOD_RDSMOD 94 +#define BSIM4v4_MOD_DIOMOD 96 +#define BSIM4v4_MOD_PERMOD 97 +#define BSIM4v4_MOD_GEOMOD 98 +#define BSIM4v4_MOD_RGATEMOD 99 +#define BSIM4v4_MOD_RBODYMOD 100 +#define BSIM4v4_MOD_CAPMOD 101 +#define BSIM4v4_MOD_TRNQSMOD 102 +#define BSIM4v4_MOD_MOBMOD 103 +#define BSIM4v4_MOD_TNOIMOD 104 +#define BSIM4v4_MOD_TOXE 105 +#define BSIM4v4_MOD_CDSC 106 +#define BSIM4v4_MOD_CDSCB 107 +#define BSIM4v4_MOD_CIT 108 +#define BSIM4v4_MOD_NFACTOR 109 +#define BSIM4v4_MOD_XJ 110 +#define BSIM4v4_MOD_VSAT 111 +#define BSIM4v4_MOD_AT 112 +#define BSIM4v4_MOD_A0 113 +#define BSIM4v4_MOD_A1 114 +#define BSIM4v4_MOD_A2 115 +#define BSIM4v4_MOD_KETA 116 +#define BSIM4v4_MOD_NSUB 117 +#define BSIM4v4_MOD_NDEP 118 +#define BSIM4v4_MOD_NGATE 120 +#define BSIM4v4_MOD_GAMMA1 121 +#define BSIM4v4_MOD_GAMMA2 122 +#define BSIM4v4_MOD_VBX 123 +#define BSIM4v4_MOD_BINUNIT 124 +#define BSIM4v4_MOD_VBM 125 +#define BSIM4v4_MOD_XT 126 +#define BSIM4v4_MOD_K1 129 +#define BSIM4v4_MOD_KT1 130 +#define BSIM4v4_MOD_KT1L 131 +#define BSIM4v4_MOD_K2 132 +#define BSIM4v4_MOD_KT2 133 +#define BSIM4v4_MOD_K3 134 +#define BSIM4v4_MOD_K3B 135 +#define BSIM4v4_MOD_W0 136 +#define BSIM4v4_MOD_LPE0 137 +#define BSIM4v4_MOD_DVT0 138 +#define BSIM4v4_MOD_DVT1 139 +#define BSIM4v4_MOD_DVT2 140 +#define BSIM4v4_MOD_DVT0W 141 +#define BSIM4v4_MOD_DVT1W 142 +#define BSIM4v4_MOD_DVT2W 143 +#define BSIM4v4_MOD_DROUT 144 +#define BSIM4v4_MOD_DSUB 145 +#define BSIM4v4_MOD_VTH0 146 +#define BSIM4v4_MOD_UA 147 +#define BSIM4v4_MOD_UA1 148 +#define BSIM4v4_MOD_UB 149 +#define BSIM4v4_MOD_UB1 150 +#define BSIM4v4_MOD_UC 151 +#define BSIM4v4_MOD_UC1 152 +#define BSIM4v4_MOD_U0 153 +#define BSIM4v4_MOD_UTE 154 +#define BSIM4v4_MOD_VOFF 155 +#define BSIM4v4_MOD_DELTA 156 +#define BSIM4v4_MOD_RDSW 157 +#define BSIM4v4_MOD_PRT 158 +#define BSIM4v4_MOD_LDD 159 +#define BSIM4v4_MOD_ETA 160 +#define BSIM4v4_MOD_ETA0 161 +#define BSIM4v4_MOD_ETAB 162 +#define BSIM4v4_MOD_PCLM 163 +#define BSIM4v4_MOD_PDIBL1 164 +#define BSIM4v4_MOD_PDIBL2 165 +#define BSIM4v4_MOD_PSCBE1 166 +#define BSIM4v4_MOD_PSCBE2 167 +#define BSIM4v4_MOD_PVAG 168 +#define BSIM4v4_MOD_WR 169 +#define BSIM4v4_MOD_DWG 170 +#define BSIM4v4_MOD_DWB 171 +#define BSIM4v4_MOD_B0 172 +#define BSIM4v4_MOD_B1 173 +#define BSIM4v4_MOD_ALPHA0 174 +#define BSIM4v4_MOD_BETA0 175 +#define BSIM4v4_MOD_PDIBLB 178 +#define BSIM4v4_MOD_PRWG 179 +#define BSIM4v4_MOD_PRWB 180 +#define BSIM4v4_MOD_CDSCD 181 +#define BSIM4v4_MOD_AGS 182 +#define BSIM4v4_MOD_FRINGE 184 +#define BSIM4v4_MOD_CGSL 186 +#define BSIM4v4_MOD_CGDL 187 +#define BSIM4v4_MOD_CKAPPAS 188 +#define BSIM4v4_MOD_CF 189 +#define BSIM4v4_MOD_CLC 190 +#define BSIM4v4_MOD_CLE 191 +#define BSIM4v4_MOD_PARAMCHK 192 +#define BSIM4v4_MOD_VERSION 193 +#define BSIM4v4_MOD_VFBCV 194 +#define BSIM4v4_MOD_ACDE 195 +#define BSIM4v4_MOD_MOIN 196 +#define BSIM4v4_MOD_NOFF 197 +#define BSIM4v4_MOD_IJTHDFWD 198 +#define BSIM4v4_MOD_ALPHA1 199 +#define BSIM4v4_MOD_VFB 200 +#define BSIM4v4_MOD_TOXM 201 +#define BSIM4v4_MOD_TCJ 202 +#define BSIM4v4_MOD_TCJSW 203 +#define BSIM4v4_MOD_TCJSWG 204 +#define BSIM4v4_MOD_TPB 205 +#define BSIM4v4_MOD_TPBSW 206 +#define BSIM4v4_MOD_TPBSWG 207 +#define BSIM4v4_MOD_VOFFCV 208 +#define BSIM4v4_MOD_GBMIN 209 +#define BSIM4v4_MOD_RBDB 210 +#define BSIM4v4_MOD_RBSB 211 +#define BSIM4v4_MOD_RBPB 212 +#define BSIM4v4_MOD_RBPS 213 +#define BSIM4v4_MOD_RBPD 214 +#define BSIM4v4_MOD_DMCG 215 +#define BSIM4v4_MOD_DMCI 216 +#define BSIM4v4_MOD_DMDG 217 +#define BSIM4v4_MOD_XGW 218 +#define BSIM4v4_MOD_XGL 219 +#define BSIM4v4_MOD_RSHG 220 +#define BSIM4v4_MOD_NGCON 221 +#define BSIM4v4_MOD_AGIDL 222 +#define BSIM4v4_MOD_BGIDL 223 +#define BSIM4v4_MOD_EGIDL 224 +#define BSIM4v4_MOD_IJTHSFWD 225 +#define BSIM4v4_MOD_XJBVD 226 +#define BSIM4v4_MOD_XJBVS 227 +#define BSIM4v4_MOD_BVD 228 +#define BSIM4v4_MOD_BVS 229 +#define BSIM4v4_MOD_TOXP 230 +#define BSIM4v4_MOD_DTOX 231 +#define BSIM4v4_MOD_XRCRG1 232 +#define BSIM4v4_MOD_XRCRG2 233 +#define BSIM4v4_MOD_EU 234 +#define BSIM4v4_MOD_IJTHSREV 235 +#define BSIM4v4_MOD_IJTHDREV 236 +#define BSIM4v4_MOD_MINV 237 +#define BSIM4v4_MOD_VOFFL 238 +#define BSIM4v4_MOD_PDITS 239 +#define BSIM4v4_MOD_PDITSD 240 +#define BSIM4v4_MOD_PDITSL 241 +#define BSIM4v4_MOD_TNOIA 242 +#define BSIM4v4_MOD_TNOIB 243 +#define BSIM4v4_MOD_NTNOI 244 +#define BSIM4v4_MOD_FPROUT 245 +#define BSIM4v4_MOD_LPEB 246 +#define BSIM4v4_MOD_DVTP0 247 +#define BSIM4v4_MOD_DVTP1 248 +#define BSIM4v4_MOD_CGIDL 249 +#define BSIM4v4_MOD_PHIN 250 +#define BSIM4v4_MOD_RDSWMIN 251 +#define BSIM4v4_MOD_RSW 252 +#define BSIM4v4_MOD_RDW 253 +#define BSIM4v4_MOD_RDWMIN 254 +#define BSIM4v4_MOD_RSWMIN 255 +#define BSIM4v4_MOD_NSD 256 +#define BSIM4v4_MOD_CKAPPAD 257 +#define BSIM4v4_MOD_DMCGT 258 +#define BSIM4v4_MOD_AIGC 259 +#define BSIM4v4_MOD_BIGC 260 +#define BSIM4v4_MOD_CIGC 261 +#define BSIM4v4_MOD_AIGBACC 262 +#define BSIM4v4_MOD_BIGBACC 263 +#define BSIM4v4_MOD_CIGBACC 264 +#define BSIM4v4_MOD_AIGBINV 265 +#define BSIM4v4_MOD_BIGBINV 266 +#define BSIM4v4_MOD_CIGBINV 267 +#define BSIM4v4_MOD_NIGC 268 +#define BSIM4v4_MOD_NIGBACC 269 +#define BSIM4v4_MOD_NIGBINV 270 +#define BSIM4v4_MOD_NTOX 271 +#define BSIM4v4_MOD_TOXREF 272 +#define BSIM4v4_MOD_EIGBINV 273 +#define BSIM4v4_MOD_PIGCD 274 +#define BSIM4v4_MOD_POXEDGE 275 +#define BSIM4v4_MOD_EPSROX 276 +#define BSIM4v4_MOD_AIGSD 277 +#define BSIM4v4_MOD_BIGSD 278 +#define BSIM4v4_MOD_CIGSD 279 +#define BSIM4v4_MOD_JSWGS 280 +#define BSIM4v4_MOD_JSWGD 281 +#define BSIM4v4_MOD_LAMBDA 282 +#define BSIM4v4_MOD_VTL 283 +#define BSIM4v4_MOD_LC 284 +#define BSIM4v4_MOD_XN 285 +#define BSIM4v4_MOD_RNOIA 286 +#define BSIM4v4_MOD_RNOIB 287 +#define BSIM4v4_MOD_VFBSDOFF 288 +#define BSIM4v4_MOD_LINTNOI 289 /* Length dependence */ -#define BSIM4V4_MOD_LCDSC 301 -#define BSIM4V4_MOD_LCDSCB 302 -#define BSIM4V4_MOD_LCIT 303 -#define BSIM4V4_MOD_LNFACTOR 304 -#define BSIM4V4_MOD_LXJ 305 -#define BSIM4V4_MOD_LVSAT 306 -#define BSIM4V4_MOD_LAT 307 -#define BSIM4V4_MOD_LA0 308 -#define BSIM4V4_MOD_LA1 309 -#define BSIM4V4_MOD_LA2 310 -#define BSIM4V4_MOD_LKETA 311 -#define BSIM4V4_MOD_LNSUB 312 -#define BSIM4V4_MOD_LNDEP 313 -#define BSIM4V4_MOD_LNGATE 315 -#define BSIM4V4_MOD_LGAMMA1 316 -#define BSIM4V4_MOD_LGAMMA2 317 -#define BSIM4V4_MOD_LVBX 318 -#define BSIM4V4_MOD_LVBM 320 -#define BSIM4V4_MOD_LXT 322 -#define BSIM4V4_MOD_LK1 325 -#define BSIM4V4_MOD_LKT1 326 -#define BSIM4V4_MOD_LKT1L 327 -#define BSIM4V4_MOD_LK2 328 -#define BSIM4V4_MOD_LKT2 329 -#define BSIM4V4_MOD_LK3 330 -#define BSIM4V4_MOD_LK3B 331 -#define BSIM4V4_MOD_LW0 332 -#define BSIM4V4_MOD_LLPE0 333 -#define BSIM4V4_MOD_LDVT0 334 -#define BSIM4V4_MOD_LDVT1 335 -#define BSIM4V4_MOD_LDVT2 336 -#define BSIM4V4_MOD_LDVT0W 337 -#define BSIM4V4_MOD_LDVT1W 338 -#define BSIM4V4_MOD_LDVT2W 339 -#define BSIM4V4_MOD_LDROUT 340 -#define BSIM4V4_MOD_LDSUB 341 -#define BSIM4V4_MOD_LVTH0 342 -#define BSIM4V4_MOD_LUA 343 -#define BSIM4V4_MOD_LUA1 344 -#define BSIM4V4_MOD_LUB 345 -#define BSIM4V4_MOD_LUB1 346 -#define BSIM4V4_MOD_LUC 347 -#define BSIM4V4_MOD_LUC1 348 -#define BSIM4V4_MOD_LU0 349 -#define BSIM4V4_MOD_LUTE 350 -#define BSIM4V4_MOD_LVOFF 351 -#define BSIM4V4_MOD_LDELTA 352 -#define BSIM4V4_MOD_LRDSW 353 -#define BSIM4V4_MOD_LPRT 354 -#define BSIM4V4_MOD_LLDD 355 -#define BSIM4V4_MOD_LETA 356 -#define BSIM4V4_MOD_LETA0 357 -#define BSIM4V4_MOD_LETAB 358 -#define BSIM4V4_MOD_LPCLM 359 -#define BSIM4V4_MOD_LPDIBL1 360 -#define BSIM4V4_MOD_LPDIBL2 361 -#define BSIM4V4_MOD_LPSCBE1 362 -#define BSIM4V4_MOD_LPSCBE2 363 -#define BSIM4V4_MOD_LPVAG 364 -#define BSIM4V4_MOD_LWR 365 -#define BSIM4V4_MOD_LDWG 366 -#define BSIM4V4_MOD_LDWB 367 -#define BSIM4V4_MOD_LB0 368 -#define BSIM4V4_MOD_LB1 369 -#define BSIM4V4_MOD_LALPHA0 370 -#define BSIM4V4_MOD_LBETA0 371 -#define BSIM4V4_MOD_LPDIBLB 374 -#define BSIM4V4_MOD_LPRWG 375 -#define BSIM4V4_MOD_LPRWB 376 -#define BSIM4V4_MOD_LCDSCD 377 -#define BSIM4V4_MOD_LAGS 378 - -#define BSIM4V4_MOD_LFRINGE 381 -#define BSIM4V4_MOD_LCGSL 383 -#define BSIM4V4_MOD_LCGDL 384 -#define BSIM4V4_MOD_LCKAPPAS 385 -#define BSIM4V4_MOD_LCF 386 -#define BSIM4V4_MOD_LCLC 387 -#define BSIM4V4_MOD_LCLE 388 -#define BSIM4V4_MOD_LVFBCV 389 -#define BSIM4V4_MOD_LACDE 390 -#define BSIM4V4_MOD_LMOIN 391 -#define BSIM4V4_MOD_LNOFF 392 -#define BSIM4V4_MOD_LALPHA1 394 -#define BSIM4V4_MOD_LVFB 395 -#define BSIM4V4_MOD_LVOFFCV 396 -#define BSIM4V4_MOD_LAGIDL 397 -#define BSIM4V4_MOD_LBGIDL 398 -#define BSIM4V4_MOD_LEGIDL 399 -#define BSIM4V4_MOD_LXRCRG1 400 -#define BSIM4V4_MOD_LXRCRG2 401 -#define BSIM4V4_MOD_LEU 402 -#define BSIM4V4_MOD_LMINV 403 -#define BSIM4V4_MOD_LPDITS 404 -#define BSIM4V4_MOD_LPDITSD 405 -#define BSIM4V4_MOD_LFPROUT 406 -#define BSIM4V4_MOD_LLPEB 407 -#define BSIM4V4_MOD_LDVTP0 408 -#define BSIM4V4_MOD_LDVTP1 409 -#define BSIM4V4_MOD_LCGIDL 410 -#define BSIM4V4_MOD_LPHIN 411 -#define BSIM4V4_MOD_LRSW 412 -#define BSIM4V4_MOD_LRDW 413 -#define BSIM4V4_MOD_LNSD 414 -#define BSIM4V4_MOD_LCKAPPAD 415 -#define BSIM4V4_MOD_LAIGC 416 -#define BSIM4V4_MOD_LBIGC 417 -#define BSIM4V4_MOD_LCIGC 418 -#define BSIM4V4_MOD_LAIGBACC 419 -#define BSIM4V4_MOD_LBIGBACC 420 -#define BSIM4V4_MOD_LCIGBACC 421 -#define BSIM4V4_MOD_LAIGBINV 422 -#define BSIM4V4_MOD_LBIGBINV 423 -#define BSIM4V4_MOD_LCIGBINV 424 -#define BSIM4V4_MOD_LNIGC 425 -#define BSIM4V4_MOD_LNIGBACC 426 -#define BSIM4V4_MOD_LNIGBINV 427 -#define BSIM4V4_MOD_LNTOX 428 -#define BSIM4V4_MOD_LEIGBINV 429 -#define BSIM4V4_MOD_LPIGCD 430 -#define BSIM4V4_MOD_LPOXEDGE 431 -#define BSIM4V4_MOD_LAIGSD 432 -#define BSIM4V4_MOD_LBIGSD 433 -#define BSIM4V4_MOD_LCIGSD 434 - -#define BSIM4V4_MOD_LLAMBDA 435 -#define BSIM4V4_MOD_LVTL 436 -#define BSIM4V4_MOD_LXN 437 -#define BSIM4V4_MOD_LVFBSDOFF 438 +#define BSIM4v4_MOD_LCDSC 301 +#define BSIM4v4_MOD_LCDSCB 302 +#define BSIM4v4_MOD_LCIT 303 +#define BSIM4v4_MOD_LNFACTOR 304 +#define BSIM4v4_MOD_LXJ 305 +#define BSIM4v4_MOD_LVSAT 306 +#define BSIM4v4_MOD_LAT 307 +#define BSIM4v4_MOD_LA0 308 +#define BSIM4v4_MOD_LA1 309 +#define BSIM4v4_MOD_LA2 310 +#define BSIM4v4_MOD_LKETA 311 +#define BSIM4v4_MOD_LNSUB 312 +#define BSIM4v4_MOD_LNDEP 313 +#define BSIM4v4_MOD_LNGATE 315 +#define BSIM4v4_MOD_LGAMMA1 316 +#define BSIM4v4_MOD_LGAMMA2 317 +#define BSIM4v4_MOD_LVBX 318 +#define BSIM4v4_MOD_LVBM 320 +#define BSIM4v4_MOD_LXT 322 +#define BSIM4v4_MOD_LK1 325 +#define BSIM4v4_MOD_LKT1 326 +#define BSIM4v4_MOD_LKT1L 327 +#define BSIM4v4_MOD_LK2 328 +#define BSIM4v4_MOD_LKT2 329 +#define BSIM4v4_MOD_LK3 330 +#define BSIM4v4_MOD_LK3B 331 +#define BSIM4v4_MOD_LW0 332 +#define BSIM4v4_MOD_LLPE0 333 +#define BSIM4v4_MOD_LDVT0 334 +#define BSIM4v4_MOD_LDVT1 335 +#define BSIM4v4_MOD_LDVT2 336 +#define BSIM4v4_MOD_LDVT0W 337 +#define BSIM4v4_MOD_LDVT1W 338 +#define BSIM4v4_MOD_LDVT2W 339 +#define BSIM4v4_MOD_LDROUT 340 +#define BSIM4v4_MOD_LDSUB 341 +#define BSIM4v4_MOD_LVTH0 342 +#define BSIM4v4_MOD_LUA 343 +#define BSIM4v4_MOD_LUA1 344 +#define BSIM4v4_MOD_LUB 345 +#define BSIM4v4_MOD_LUB1 346 +#define BSIM4v4_MOD_LUC 347 +#define BSIM4v4_MOD_LUC1 348 +#define BSIM4v4_MOD_LU0 349 +#define BSIM4v4_MOD_LUTE 350 +#define BSIM4v4_MOD_LVOFF 351 +#define BSIM4v4_MOD_LDELTA 352 +#define BSIM4v4_MOD_LRDSW 353 +#define BSIM4v4_MOD_LPRT 354 +#define BSIM4v4_MOD_LLDD 355 +#define BSIM4v4_MOD_LETA 356 +#define BSIM4v4_MOD_LETA0 357 +#define BSIM4v4_MOD_LETAB 358 +#define BSIM4v4_MOD_LPCLM 359 +#define BSIM4v4_MOD_LPDIBL1 360 +#define BSIM4v4_MOD_LPDIBL2 361 +#define BSIM4v4_MOD_LPSCBE1 362 +#define BSIM4v4_MOD_LPSCBE2 363 +#define BSIM4v4_MOD_LPVAG 364 +#define BSIM4v4_MOD_LWR 365 +#define BSIM4v4_MOD_LDWG 366 +#define BSIM4v4_MOD_LDWB 367 +#define BSIM4v4_MOD_LB0 368 +#define BSIM4v4_MOD_LB1 369 +#define BSIM4v4_MOD_LALPHA0 370 +#define BSIM4v4_MOD_LBETA0 371 +#define BSIM4v4_MOD_LPDIBLB 374 +#define BSIM4v4_MOD_LPRWG 375 +#define BSIM4v4_MOD_LPRWB 376 +#define BSIM4v4_MOD_LCDSCD 377 +#define BSIM4v4_MOD_LAGS 378 + +#define BSIM4v4_MOD_LFRINGE 381 +#define BSIM4v4_MOD_LCGSL 383 +#define BSIM4v4_MOD_LCGDL 384 +#define BSIM4v4_MOD_LCKAPPAS 385 +#define BSIM4v4_MOD_LCF 386 +#define BSIM4v4_MOD_LCLC 387 +#define BSIM4v4_MOD_LCLE 388 +#define BSIM4v4_MOD_LVFBCV 389 +#define BSIM4v4_MOD_LACDE 390 +#define BSIM4v4_MOD_LMOIN 391 +#define BSIM4v4_MOD_LNOFF 392 +#define BSIM4v4_MOD_LALPHA1 394 +#define BSIM4v4_MOD_LVFB 395 +#define BSIM4v4_MOD_LVOFFCV 396 +#define BSIM4v4_MOD_LAGIDL 397 +#define BSIM4v4_MOD_LBGIDL 398 +#define BSIM4v4_MOD_LEGIDL 399 +#define BSIM4v4_MOD_LXRCRG1 400 +#define BSIM4v4_MOD_LXRCRG2 401 +#define BSIM4v4_MOD_LEU 402 +#define BSIM4v4_MOD_LMINV 403 +#define BSIM4v4_MOD_LPDITS 404 +#define BSIM4v4_MOD_LPDITSD 405 +#define BSIM4v4_MOD_LFPROUT 406 +#define BSIM4v4_MOD_LLPEB 407 +#define BSIM4v4_MOD_LDVTP0 408 +#define BSIM4v4_MOD_LDVTP1 409 +#define BSIM4v4_MOD_LCGIDL 410 +#define BSIM4v4_MOD_LPHIN 411 +#define BSIM4v4_MOD_LRSW 412 +#define BSIM4v4_MOD_LRDW 413 +#define BSIM4v4_MOD_LNSD 414 +#define BSIM4v4_MOD_LCKAPPAD 415 +#define BSIM4v4_MOD_LAIGC 416 +#define BSIM4v4_MOD_LBIGC 417 +#define BSIM4v4_MOD_LCIGC 418 +#define BSIM4v4_MOD_LAIGBACC 419 +#define BSIM4v4_MOD_LBIGBACC 420 +#define BSIM4v4_MOD_LCIGBACC 421 +#define BSIM4v4_MOD_LAIGBINV 422 +#define BSIM4v4_MOD_LBIGBINV 423 +#define BSIM4v4_MOD_LCIGBINV 424 +#define BSIM4v4_MOD_LNIGC 425 +#define BSIM4v4_MOD_LNIGBACC 426 +#define BSIM4v4_MOD_LNIGBINV 427 +#define BSIM4v4_MOD_LNTOX 428 +#define BSIM4v4_MOD_LEIGBINV 429 +#define BSIM4v4_MOD_LPIGCD 430 +#define BSIM4v4_MOD_LPOXEDGE 431 +#define BSIM4v4_MOD_LAIGSD 432 +#define BSIM4v4_MOD_LBIGSD 433 +#define BSIM4v4_MOD_LCIGSD 434 + +#define BSIM4v4_MOD_LLAMBDA 435 +#define BSIM4v4_MOD_LVTL 436 +#define BSIM4v4_MOD_LXN 437 +#define BSIM4v4_MOD_LVFBSDOFF 438 /* Width dependence */ -#define BSIM4V4_MOD_WCDSC 481 -#define BSIM4V4_MOD_WCDSCB 482 -#define BSIM4V4_MOD_WCIT 483 -#define BSIM4V4_MOD_WNFACTOR 484 -#define BSIM4V4_MOD_WXJ 485 -#define BSIM4V4_MOD_WVSAT 486 -#define BSIM4V4_MOD_WAT 487 -#define BSIM4V4_MOD_WA0 488 -#define BSIM4V4_MOD_WA1 489 -#define BSIM4V4_MOD_WA2 490 -#define BSIM4V4_MOD_WKETA 491 -#define BSIM4V4_MOD_WNSUB 492 -#define BSIM4V4_MOD_WNDEP 493 -#define BSIM4V4_MOD_WNGATE 495 -#define BSIM4V4_MOD_WGAMMA1 496 -#define BSIM4V4_MOD_WGAMMA2 497 -#define BSIM4V4_MOD_WVBX 498 -#define BSIM4V4_MOD_WVBM 500 -#define BSIM4V4_MOD_WXT 502 -#define BSIM4V4_MOD_WK1 505 -#define BSIM4V4_MOD_WKT1 506 -#define BSIM4V4_MOD_WKT1L 507 -#define BSIM4V4_MOD_WK2 508 -#define BSIM4V4_MOD_WKT2 509 -#define BSIM4V4_MOD_WK3 510 -#define BSIM4V4_MOD_WK3B 511 -#define BSIM4V4_MOD_WW0 512 -#define BSIM4V4_MOD_WLPE0 513 -#define BSIM4V4_MOD_WDVT0 514 -#define BSIM4V4_MOD_WDVT1 515 -#define BSIM4V4_MOD_WDVT2 516 -#define BSIM4V4_MOD_WDVT0W 517 -#define BSIM4V4_MOD_WDVT1W 518 -#define BSIM4V4_MOD_WDVT2W 519 -#define BSIM4V4_MOD_WDROUT 520 -#define BSIM4V4_MOD_WDSUB 521 -#define BSIM4V4_MOD_WVTH0 522 -#define BSIM4V4_MOD_WUA 523 -#define BSIM4V4_MOD_WUA1 524 -#define BSIM4V4_MOD_WUB 525 -#define BSIM4V4_MOD_WUB1 526 -#define BSIM4V4_MOD_WUC 527 -#define BSIM4V4_MOD_WUC1 528 -#define BSIM4V4_MOD_WU0 529 -#define BSIM4V4_MOD_WUTE 530 -#define BSIM4V4_MOD_WVOFF 531 -#define BSIM4V4_MOD_WDELTA 532 -#define BSIM4V4_MOD_WRDSW 533 -#define BSIM4V4_MOD_WPRT 534 -#define BSIM4V4_MOD_WLDD 535 -#define BSIM4V4_MOD_WETA 536 -#define BSIM4V4_MOD_WETA0 537 -#define BSIM4V4_MOD_WETAB 538 -#define BSIM4V4_MOD_WPCLM 539 -#define BSIM4V4_MOD_WPDIBL1 540 -#define BSIM4V4_MOD_WPDIBL2 541 -#define BSIM4V4_MOD_WPSCBE1 542 -#define BSIM4V4_MOD_WPSCBE2 543 -#define BSIM4V4_MOD_WPVAG 544 -#define BSIM4V4_MOD_WWR 545 -#define BSIM4V4_MOD_WDWG 546 -#define BSIM4V4_MOD_WDWB 547 -#define BSIM4V4_MOD_WB0 548 -#define BSIM4V4_MOD_WB1 549 -#define BSIM4V4_MOD_WALPHA0 550 -#define BSIM4V4_MOD_WBETA0 551 -#define BSIM4V4_MOD_WPDIBLB 554 -#define BSIM4V4_MOD_WPRWG 555 -#define BSIM4V4_MOD_WPRWB 556 -#define BSIM4V4_MOD_WCDSCD 557 -#define BSIM4V4_MOD_WAGS 558 - -#define BSIM4V4_MOD_WFRINGE 561 -#define BSIM4V4_MOD_WCGSL 563 -#define BSIM4V4_MOD_WCGDL 564 -#define BSIM4V4_MOD_WCKAPPAS 565 -#define BSIM4V4_MOD_WCF 566 -#define BSIM4V4_MOD_WCLC 567 -#define BSIM4V4_MOD_WCLE 568 -#define BSIM4V4_MOD_WVFBCV 569 -#define BSIM4V4_MOD_WACDE 570 -#define BSIM4V4_MOD_WMOIN 571 -#define BSIM4V4_MOD_WNOFF 572 -#define BSIM4V4_MOD_WALPHA1 574 -#define BSIM4V4_MOD_WVFB 575 -#define BSIM4V4_MOD_WVOFFCV 576 -#define BSIM4V4_MOD_WAGIDL 577 -#define BSIM4V4_MOD_WBGIDL 578 -#define BSIM4V4_MOD_WEGIDL 579 -#define BSIM4V4_MOD_WXRCRG1 580 -#define BSIM4V4_MOD_WXRCRG2 581 -#define BSIM4V4_MOD_WEU 582 -#define BSIM4V4_MOD_WMINV 583 -#define BSIM4V4_MOD_WPDITS 584 -#define BSIM4V4_MOD_WPDITSD 585 -#define BSIM4V4_MOD_WFPROUT 586 -#define BSIM4V4_MOD_WLPEB 587 -#define BSIM4V4_MOD_WDVTP0 588 -#define BSIM4V4_MOD_WDVTP1 589 -#define BSIM4V4_MOD_WCGIDL 590 -#define BSIM4V4_MOD_WPHIN 591 -#define BSIM4V4_MOD_WRSW 592 -#define BSIM4V4_MOD_WRDW 593 -#define BSIM4V4_MOD_WNSD 594 -#define BSIM4V4_MOD_WCKAPPAD 595 -#define BSIM4V4_MOD_WAIGC 596 -#define BSIM4V4_MOD_WBIGC 597 -#define BSIM4V4_MOD_WCIGC 598 -#define BSIM4V4_MOD_WAIGBACC 599 -#define BSIM4V4_MOD_WBIGBACC 600 -#define BSIM4V4_MOD_WCIGBACC 601 -#define BSIM4V4_MOD_WAIGBINV 602 -#define BSIM4V4_MOD_WBIGBINV 603 -#define BSIM4V4_MOD_WCIGBINV 604 -#define BSIM4V4_MOD_WNIGC 605 -#define BSIM4V4_MOD_WNIGBACC 606 -#define BSIM4V4_MOD_WNIGBINV 607 -#define BSIM4V4_MOD_WNTOX 608 -#define BSIM4V4_MOD_WEIGBINV 609 -#define BSIM4V4_MOD_WPIGCD 610 -#define BSIM4V4_MOD_WPOXEDGE 611 -#define BSIM4V4_MOD_WAIGSD 612 -#define BSIM4V4_MOD_WBIGSD 613 -#define BSIM4V4_MOD_WCIGSD 614 -#define BSIM4V4_MOD_WLAMBDA 615 -#define BSIM4V4_MOD_WVTL 616 -#define BSIM4V4_MOD_WXN 617 -#define BSIM4V4_MOD_WVFBSDOFF 618 +#define BSIM4v4_MOD_WCDSC 481 +#define BSIM4v4_MOD_WCDSCB 482 +#define BSIM4v4_MOD_WCIT 483 +#define BSIM4v4_MOD_WNFACTOR 484 +#define BSIM4v4_MOD_WXJ 485 +#define BSIM4v4_MOD_WVSAT 486 +#define BSIM4v4_MOD_WAT 487 +#define BSIM4v4_MOD_WA0 488 +#define BSIM4v4_MOD_WA1 489 +#define BSIM4v4_MOD_WA2 490 +#define BSIM4v4_MOD_WKETA 491 +#define BSIM4v4_MOD_WNSUB 492 +#define BSIM4v4_MOD_WNDEP 493 +#define BSIM4v4_MOD_WNGATE 495 +#define BSIM4v4_MOD_WGAMMA1 496 +#define BSIM4v4_MOD_WGAMMA2 497 +#define BSIM4v4_MOD_WVBX 498 +#define BSIM4v4_MOD_WVBM 500 +#define BSIM4v4_MOD_WXT 502 +#define BSIM4v4_MOD_WK1 505 +#define BSIM4v4_MOD_WKT1 506 +#define BSIM4v4_MOD_WKT1L 507 +#define BSIM4v4_MOD_WK2 508 +#define BSIM4v4_MOD_WKT2 509 +#define BSIM4v4_MOD_WK3 510 +#define BSIM4v4_MOD_WK3B 511 +#define BSIM4v4_MOD_WW0 512 +#define BSIM4v4_MOD_WLPE0 513 +#define BSIM4v4_MOD_WDVT0 514 +#define BSIM4v4_MOD_WDVT1 515 +#define BSIM4v4_MOD_WDVT2 516 +#define BSIM4v4_MOD_WDVT0W 517 +#define BSIM4v4_MOD_WDVT1W 518 +#define BSIM4v4_MOD_WDVT2W 519 +#define BSIM4v4_MOD_WDROUT 520 +#define BSIM4v4_MOD_WDSUB 521 +#define BSIM4v4_MOD_WVTH0 522 +#define BSIM4v4_MOD_WUA 523 +#define BSIM4v4_MOD_WUA1 524 +#define BSIM4v4_MOD_WUB 525 +#define BSIM4v4_MOD_WUB1 526 +#define BSIM4v4_MOD_WUC 527 +#define BSIM4v4_MOD_WUC1 528 +#define BSIM4v4_MOD_WU0 529 +#define BSIM4v4_MOD_WUTE 530 +#define BSIM4v4_MOD_WVOFF 531 +#define BSIM4v4_MOD_WDELTA 532 +#define BSIM4v4_MOD_WRDSW 533 +#define BSIM4v4_MOD_WPRT 534 +#define BSIM4v4_MOD_WLDD 535 +#define BSIM4v4_MOD_WETA 536 +#define BSIM4v4_MOD_WETA0 537 +#define BSIM4v4_MOD_WETAB 538 +#define BSIM4v4_MOD_WPCLM 539 +#define BSIM4v4_MOD_WPDIBL1 540 +#define BSIM4v4_MOD_WPDIBL2 541 +#define BSIM4v4_MOD_WPSCBE1 542 +#define BSIM4v4_MOD_WPSCBE2 543 +#define BSIM4v4_MOD_WPVAG 544 +#define BSIM4v4_MOD_WWR 545 +#define BSIM4v4_MOD_WDWG 546 +#define BSIM4v4_MOD_WDWB 547 +#define BSIM4v4_MOD_WB0 548 +#define BSIM4v4_MOD_WB1 549 +#define BSIM4v4_MOD_WALPHA0 550 +#define BSIM4v4_MOD_WBETA0 551 +#define BSIM4v4_MOD_WPDIBLB 554 +#define BSIM4v4_MOD_WPRWG 555 +#define BSIM4v4_MOD_WPRWB 556 +#define BSIM4v4_MOD_WCDSCD 557 +#define BSIM4v4_MOD_WAGS 558 + +#define BSIM4v4_MOD_WFRINGE 561 +#define BSIM4v4_MOD_WCGSL 563 +#define BSIM4v4_MOD_WCGDL 564 +#define BSIM4v4_MOD_WCKAPPAS 565 +#define BSIM4v4_MOD_WCF 566 +#define BSIM4v4_MOD_WCLC 567 +#define BSIM4v4_MOD_WCLE 568 +#define BSIM4v4_MOD_WVFBCV 569 +#define BSIM4v4_MOD_WACDE 570 +#define BSIM4v4_MOD_WMOIN 571 +#define BSIM4v4_MOD_WNOFF 572 +#define BSIM4v4_MOD_WALPHA1 574 +#define BSIM4v4_MOD_WVFB 575 +#define BSIM4v4_MOD_WVOFFCV 576 +#define BSIM4v4_MOD_WAGIDL 577 +#define BSIM4v4_MOD_WBGIDL 578 +#define BSIM4v4_MOD_WEGIDL 579 +#define BSIM4v4_MOD_WXRCRG1 580 +#define BSIM4v4_MOD_WXRCRG2 581 +#define BSIM4v4_MOD_WEU 582 +#define BSIM4v4_MOD_WMINV 583 +#define BSIM4v4_MOD_WPDITS 584 +#define BSIM4v4_MOD_WPDITSD 585 +#define BSIM4v4_MOD_WFPROUT 586 +#define BSIM4v4_MOD_WLPEB 587 +#define BSIM4v4_MOD_WDVTP0 588 +#define BSIM4v4_MOD_WDVTP1 589 +#define BSIM4v4_MOD_WCGIDL 590 +#define BSIM4v4_MOD_WPHIN 591 +#define BSIM4v4_MOD_WRSW 592 +#define BSIM4v4_MOD_WRDW 593 +#define BSIM4v4_MOD_WNSD 594 +#define BSIM4v4_MOD_WCKAPPAD 595 +#define BSIM4v4_MOD_WAIGC 596 +#define BSIM4v4_MOD_WBIGC 597 +#define BSIM4v4_MOD_WCIGC 598 +#define BSIM4v4_MOD_WAIGBACC 599 +#define BSIM4v4_MOD_WBIGBACC 600 +#define BSIM4v4_MOD_WCIGBACC 601 +#define BSIM4v4_MOD_WAIGBINV 602 +#define BSIM4v4_MOD_WBIGBINV 603 +#define BSIM4v4_MOD_WCIGBINV 604 +#define BSIM4v4_MOD_WNIGC 605 +#define BSIM4v4_MOD_WNIGBACC 606 +#define BSIM4v4_MOD_WNIGBINV 607 +#define BSIM4v4_MOD_WNTOX 608 +#define BSIM4v4_MOD_WEIGBINV 609 +#define BSIM4v4_MOD_WPIGCD 610 +#define BSIM4v4_MOD_WPOXEDGE 611 +#define BSIM4v4_MOD_WAIGSD 612 +#define BSIM4v4_MOD_WBIGSD 613 +#define BSIM4v4_MOD_WCIGSD 614 +#define BSIM4v4_MOD_WLAMBDA 615 +#define BSIM4v4_MOD_WVTL 616 +#define BSIM4v4_MOD_WXN 617 +#define BSIM4v4_MOD_WVFBSDOFF 618 /* Cross-term dependence */ -#define BSIM4V4_MOD_PCDSC 661 -#define BSIM4V4_MOD_PCDSCB 662 -#define BSIM4V4_MOD_PCIT 663 -#define BSIM4V4_MOD_PNFACTOR 664 -#define BSIM4V4_MOD_PXJ 665 -#define BSIM4V4_MOD_PVSAT 666 -#define BSIM4V4_MOD_PAT 667 -#define BSIM4V4_MOD_PA0 668 -#define BSIM4V4_MOD_PA1 669 -#define BSIM4V4_MOD_PA2 670 -#define BSIM4V4_MOD_PKETA 671 -#define BSIM4V4_MOD_PNSUB 672 -#define BSIM4V4_MOD_PNDEP 673 -#define BSIM4V4_MOD_PNGATE 675 -#define BSIM4V4_MOD_PGAMMA1 676 -#define BSIM4V4_MOD_PGAMMA2 677 -#define BSIM4V4_MOD_PVBX 678 - -#define BSIM4V4_MOD_PVBM 680 - -#define BSIM4V4_MOD_PXT 682 -#define BSIM4V4_MOD_PK1 685 -#define BSIM4V4_MOD_PKT1 686 -#define BSIM4V4_MOD_PKT1L 687 -#define BSIM4V4_MOD_PK2 688 -#define BSIM4V4_MOD_PKT2 689 -#define BSIM4V4_MOD_PK3 690 -#define BSIM4V4_MOD_PK3B 691 -#define BSIM4V4_MOD_PW0 692 -#define BSIM4V4_MOD_PLPE0 693 - -#define BSIM4V4_MOD_PDVT0 694 -#define BSIM4V4_MOD_PDVT1 695 -#define BSIM4V4_MOD_PDVT2 696 - -#define BSIM4V4_MOD_PDVT0W 697 -#define BSIM4V4_MOD_PDVT1W 698 -#define BSIM4V4_MOD_PDVT2W 699 - -#define BSIM4V4_MOD_PDROUT 700 -#define BSIM4V4_MOD_PDSUB 701 -#define BSIM4V4_MOD_PVTH0 702 -#define BSIM4V4_MOD_PUA 703 -#define BSIM4V4_MOD_PUA1 704 -#define BSIM4V4_MOD_PUB 705 -#define BSIM4V4_MOD_PUB1 706 -#define BSIM4V4_MOD_PUC 707 -#define BSIM4V4_MOD_PUC1 708 -#define BSIM4V4_MOD_PU0 709 -#define BSIM4V4_MOD_PUTE 710 -#define BSIM4V4_MOD_PVOFF 711 -#define BSIM4V4_MOD_PDELTA 712 -#define BSIM4V4_MOD_PRDSW 713 -#define BSIM4V4_MOD_PPRT 714 -#define BSIM4V4_MOD_PLDD 715 -#define BSIM4V4_MOD_PETA 716 -#define BSIM4V4_MOD_PETA0 717 -#define BSIM4V4_MOD_PETAB 718 -#define BSIM4V4_MOD_PPCLM 719 -#define BSIM4V4_MOD_PPDIBL1 720 -#define BSIM4V4_MOD_PPDIBL2 721 -#define BSIM4V4_MOD_PPSCBE1 722 -#define BSIM4V4_MOD_PPSCBE2 723 -#define BSIM4V4_MOD_PPVAG 724 -#define BSIM4V4_MOD_PWR 725 -#define BSIM4V4_MOD_PDWG 726 -#define BSIM4V4_MOD_PDWB 727 -#define BSIM4V4_MOD_PB0 728 -#define BSIM4V4_MOD_PB1 729 -#define BSIM4V4_MOD_PALPHA0 730 -#define BSIM4V4_MOD_PBETA0 731 -#define BSIM4V4_MOD_PPDIBLB 734 - -#define BSIM4V4_MOD_PPRWG 735 -#define BSIM4V4_MOD_PPRWB 736 - -#define BSIM4V4_MOD_PCDSCD 737 -#define BSIM4V4_MOD_PAGS 738 - -#define BSIM4V4_MOD_PFRINGE 741 -#define BSIM4V4_MOD_PCGSL 743 -#define BSIM4V4_MOD_PCGDL 744 -#define BSIM4V4_MOD_PCKAPPAS 745 -#define BSIM4V4_MOD_PCF 746 -#define BSIM4V4_MOD_PCLC 747 -#define BSIM4V4_MOD_PCLE 748 -#define BSIM4V4_MOD_PVFBCV 749 -#define BSIM4V4_MOD_PACDE 750 -#define BSIM4V4_MOD_PMOIN 751 -#define BSIM4V4_MOD_PNOFF 752 -#define BSIM4V4_MOD_PALPHA1 754 -#define BSIM4V4_MOD_PVFB 755 -#define BSIM4V4_MOD_PVOFFCV 756 -#define BSIM4V4_MOD_PAGIDL 757 -#define BSIM4V4_MOD_PBGIDL 758 -#define BSIM4V4_MOD_PEGIDL 759 -#define BSIM4V4_MOD_PXRCRG1 760 -#define BSIM4V4_MOD_PXRCRG2 761 -#define BSIM4V4_MOD_PEU 762 -#define BSIM4V4_MOD_PMINV 763 -#define BSIM4V4_MOD_PPDITS 764 -#define BSIM4V4_MOD_PPDITSD 765 -#define BSIM4V4_MOD_PFPROUT 766 -#define BSIM4V4_MOD_PLPEB 767 -#define BSIM4V4_MOD_PDVTP0 768 -#define BSIM4V4_MOD_PDVTP1 769 -#define BSIM4V4_MOD_PCGIDL 770 -#define BSIM4V4_MOD_PPHIN 771 -#define BSIM4V4_MOD_PRSW 772 -#define BSIM4V4_MOD_PRDW 773 -#define BSIM4V4_MOD_PNSD 774 -#define BSIM4V4_MOD_PCKAPPAD 775 -#define BSIM4V4_MOD_PAIGC 776 -#define BSIM4V4_MOD_PBIGC 777 -#define BSIM4V4_MOD_PCIGC 778 -#define BSIM4V4_MOD_PAIGBACC 779 -#define BSIM4V4_MOD_PBIGBACC 780 -#define BSIM4V4_MOD_PCIGBACC 781 -#define BSIM4V4_MOD_PAIGBINV 782 -#define BSIM4V4_MOD_PBIGBINV 783 -#define BSIM4V4_MOD_PCIGBINV 784 -#define BSIM4V4_MOD_PNIGC 785 -#define BSIM4V4_MOD_PNIGBACC 786 -#define BSIM4V4_MOD_PNIGBINV 787 -#define BSIM4V4_MOD_PNTOX 788 -#define BSIM4V4_MOD_PEIGBINV 789 -#define BSIM4V4_MOD_PPIGCD 790 -#define BSIM4V4_MOD_PPOXEDGE 791 -#define BSIM4V4_MOD_PAIGSD 792 -#define BSIM4V4_MOD_PBIGSD 793 -#define BSIM4V4_MOD_PCIGSD 794 - -#define BSIM4V4_MOD_SAREF 795 -#define BSIM4V4_MOD_SBREF 796 -#define BSIM4V4_MOD_KU0 797 -#define BSIM4V4_MOD_KVSAT 798 -#define BSIM4V4_MOD_TKU0 799 -#define BSIM4V4_MOD_LLODKU0 800 -#define BSIM4V4_MOD_WLODKU0 801 -#define BSIM4V4_MOD_LLODVTH 802 -#define BSIM4V4_MOD_WLODVTH 803 -#define BSIM4V4_MOD_LKU0 804 -#define BSIM4V4_MOD_WKU0 805 -#define BSIM4V4_MOD_PKU0 806 -#define BSIM4V4_MOD_KVTH0 807 -#define BSIM4V4_MOD_LKVTH0 808 -#define BSIM4V4_MOD_WKVTH0 809 -#define BSIM4V4_MOD_PKVTH0 810 -#define BSIM4V4_MOD_WLOD 811 -#define BSIM4V4_MOD_STK2 812 -#define BSIM4V4_MOD_LODK2 813 -#define BSIM4V4_MOD_STETA0 814 -#define BSIM4V4_MOD_LODETA0 815 - -#define BSIM4V4_MOD_PLAMBDA 825 -#define BSIM4V4_MOD_PVTL 826 -#define BSIM4V4_MOD_PXN 827 -#define BSIM4V4_MOD_PVFBSDOFF 828 - -#define BSIM4V4_MOD_TNOM 831 -#define BSIM4V4_MOD_CGSO 832 -#define BSIM4V4_MOD_CGDO 833 -#define BSIM4V4_MOD_CGBO 834 -#define BSIM4V4_MOD_XPART 835 -#define BSIM4V4_MOD_RSH 836 -#define BSIM4V4_MOD_JSS 837 -#define BSIM4V4_MOD_PBS 838 -#define BSIM4V4_MOD_MJS 839 -#define BSIM4V4_MOD_PBSWS 840 -#define BSIM4V4_MOD_MJSWS 841 -#define BSIM4V4_MOD_CJS 842 -#define BSIM4V4_MOD_CJSWS 843 -#define BSIM4V4_MOD_NMOS 844 -#define BSIM4V4_MOD_PMOS 845 -#define BSIM4V4_MOD_NOIA 846 -#define BSIM4V4_MOD_NOIB 847 -#define BSIM4V4_MOD_NOIC 848 -#define BSIM4V4_MOD_LINT 849 -#define BSIM4V4_MOD_LL 850 -#define BSIM4V4_MOD_LLN 851 -#define BSIM4V4_MOD_LW 852 -#define BSIM4V4_MOD_LWN 853 -#define BSIM4V4_MOD_LWL 854 -#define BSIM4V4_MOD_LMIN 855 -#define BSIM4V4_MOD_LMAX 856 -#define BSIM4V4_MOD_WINT 857 -#define BSIM4V4_MOD_WL 858 -#define BSIM4V4_MOD_WLN 859 -#define BSIM4V4_MOD_WW 860 -#define BSIM4V4_MOD_WWN 861 -#define BSIM4V4_MOD_WWL 862 -#define BSIM4V4_MOD_WMIN 863 -#define BSIM4V4_MOD_WMAX 864 -#define BSIM4V4_MOD_DWC 865 -#define BSIM4V4_MOD_DLC 866 -#define BSIM4V4_MOD_XL 867 -#define BSIM4V4_MOD_XW 868 -#define BSIM4V4_MOD_EM 869 -#define BSIM4V4_MOD_EF 870 -#define BSIM4V4_MOD_AF 871 -#define BSIM4V4_MOD_KF 872 -#define BSIM4V4_MOD_NJS 873 -#define BSIM4V4_MOD_XTIS 874 -#define BSIM4V4_MOD_PBSWGS 875 -#define BSIM4V4_MOD_MJSWGS 876 -#define BSIM4V4_MOD_CJSWGS 877 -#define BSIM4V4_MOD_JSWS 878 -#define BSIM4V4_MOD_LLC 879 -#define BSIM4V4_MOD_LWC 880 -#define BSIM4V4_MOD_LWLC 881 -#define BSIM4V4_MOD_WLC 882 -#define BSIM4V4_MOD_WWC 883 -#define BSIM4V4_MOD_WWLC 884 -#define BSIM4V4_MOD_DWJ 885 -#define BSIM4V4_MOD_JSD 886 -#define BSIM4V4_MOD_PBD 887 -#define BSIM4V4_MOD_MJD 888 -#define BSIM4V4_MOD_PBSWD 889 -#define BSIM4V4_MOD_MJSWD 890 -#define BSIM4V4_MOD_CJD 891 -#define BSIM4V4_MOD_CJSWD 892 -#define BSIM4V4_MOD_NJD 893 -#define BSIM4V4_MOD_XTID 894 -#define BSIM4V4_MOD_PBSWGD 895 -#define BSIM4V4_MOD_MJSWGD 896 -#define BSIM4V4_MOD_CJSWGD 897 -#define BSIM4V4_MOD_JSWD 898 -#define BSIM4V4_MOD_DLCIG 899 +#define BSIM4v4_MOD_PCDSC 661 +#define BSIM4v4_MOD_PCDSCB 662 +#define BSIM4v4_MOD_PCIT 663 +#define BSIM4v4_MOD_PNFACTOR 664 +#define BSIM4v4_MOD_PXJ 665 +#define BSIM4v4_MOD_PVSAT 666 +#define BSIM4v4_MOD_PAT 667 +#define BSIM4v4_MOD_PA0 668 +#define BSIM4v4_MOD_PA1 669 +#define BSIM4v4_MOD_PA2 670 +#define BSIM4v4_MOD_PKETA 671 +#define BSIM4v4_MOD_PNSUB 672 +#define BSIM4v4_MOD_PNDEP 673 +#define BSIM4v4_MOD_PNGATE 675 +#define BSIM4v4_MOD_PGAMMA1 676 +#define BSIM4v4_MOD_PGAMMA2 677 +#define BSIM4v4_MOD_PVBX 678 + +#define BSIM4v4_MOD_PVBM 680 + +#define BSIM4v4_MOD_PXT 682 +#define BSIM4v4_MOD_PK1 685 +#define BSIM4v4_MOD_PKT1 686 +#define BSIM4v4_MOD_PKT1L 687 +#define BSIM4v4_MOD_PK2 688 +#define BSIM4v4_MOD_PKT2 689 +#define BSIM4v4_MOD_PK3 690 +#define BSIM4v4_MOD_PK3B 691 +#define BSIM4v4_MOD_PW0 692 +#define BSIM4v4_MOD_PLPE0 693 + +#define BSIM4v4_MOD_PDVT0 694 +#define BSIM4v4_MOD_PDVT1 695 +#define BSIM4v4_MOD_PDVT2 696 + +#define BSIM4v4_MOD_PDVT0W 697 +#define BSIM4v4_MOD_PDVT1W 698 +#define BSIM4v4_MOD_PDVT2W 699 + +#define BSIM4v4_MOD_PDROUT 700 +#define BSIM4v4_MOD_PDSUB 701 +#define BSIM4v4_MOD_PVTH0 702 +#define BSIM4v4_MOD_PUA 703 +#define BSIM4v4_MOD_PUA1 704 +#define BSIM4v4_MOD_PUB 705 +#define BSIM4v4_MOD_PUB1 706 +#define BSIM4v4_MOD_PUC 707 +#define BSIM4v4_MOD_PUC1 708 +#define BSIM4v4_MOD_PU0 709 +#define BSIM4v4_MOD_PUTE 710 +#define BSIM4v4_MOD_PVOFF 711 +#define BSIM4v4_MOD_PDELTA 712 +#define BSIM4v4_MOD_PRDSW 713 +#define BSIM4v4_MOD_PPRT 714 +#define BSIM4v4_MOD_PLDD 715 +#define BSIM4v4_MOD_PETA 716 +#define BSIM4v4_MOD_PETA0 717 +#define BSIM4v4_MOD_PETAB 718 +#define BSIM4v4_MOD_PPCLM 719 +#define BSIM4v4_MOD_PPDIBL1 720 +#define BSIM4v4_MOD_PPDIBL2 721 +#define BSIM4v4_MOD_PPSCBE1 722 +#define BSIM4v4_MOD_PPSCBE2 723 +#define BSIM4v4_MOD_PPVAG 724 +#define BSIM4v4_MOD_PWR 725 +#define BSIM4v4_MOD_PDWG 726 +#define BSIM4v4_MOD_PDWB 727 +#define BSIM4v4_MOD_PB0 728 +#define BSIM4v4_MOD_PB1 729 +#define BSIM4v4_MOD_PALPHA0 730 +#define BSIM4v4_MOD_PBETA0 731 +#define BSIM4v4_MOD_PPDIBLB 734 + +#define BSIM4v4_MOD_PPRWG 735 +#define BSIM4v4_MOD_PPRWB 736 + +#define BSIM4v4_MOD_PCDSCD 737 +#define BSIM4v4_MOD_PAGS 738 + +#define BSIM4v4_MOD_PFRINGE 741 +#define BSIM4v4_MOD_PCGSL 743 +#define BSIM4v4_MOD_PCGDL 744 +#define BSIM4v4_MOD_PCKAPPAS 745 +#define BSIM4v4_MOD_PCF 746 +#define BSIM4v4_MOD_PCLC 747 +#define BSIM4v4_MOD_PCLE 748 +#define BSIM4v4_MOD_PVFBCV 749 +#define BSIM4v4_MOD_PACDE 750 +#define BSIM4v4_MOD_PMOIN 751 +#define BSIM4v4_MOD_PNOFF 752 +#define BSIM4v4_MOD_PALPHA1 754 +#define BSIM4v4_MOD_PVFB 755 +#define BSIM4v4_MOD_PVOFFCV 756 +#define BSIM4v4_MOD_PAGIDL 757 +#define BSIM4v4_MOD_PBGIDL 758 +#define BSIM4v4_MOD_PEGIDL 759 +#define BSIM4v4_MOD_PXRCRG1 760 +#define BSIM4v4_MOD_PXRCRG2 761 +#define BSIM4v4_MOD_PEU 762 +#define BSIM4v4_MOD_PMINV 763 +#define BSIM4v4_MOD_PPDITS 764 +#define BSIM4v4_MOD_PPDITSD 765 +#define BSIM4v4_MOD_PFPROUT 766 +#define BSIM4v4_MOD_PLPEB 767 +#define BSIM4v4_MOD_PDVTP0 768 +#define BSIM4v4_MOD_PDVTP1 769 +#define BSIM4v4_MOD_PCGIDL 770 +#define BSIM4v4_MOD_PPHIN 771 +#define BSIM4v4_MOD_PRSW 772 +#define BSIM4v4_MOD_PRDW 773 +#define BSIM4v4_MOD_PNSD 774 +#define BSIM4v4_MOD_PCKAPPAD 775 +#define BSIM4v4_MOD_PAIGC 776 +#define BSIM4v4_MOD_PBIGC 777 +#define BSIM4v4_MOD_PCIGC 778 +#define BSIM4v4_MOD_PAIGBACC 779 +#define BSIM4v4_MOD_PBIGBACC 780 +#define BSIM4v4_MOD_PCIGBACC 781 +#define BSIM4v4_MOD_PAIGBINV 782 +#define BSIM4v4_MOD_PBIGBINV 783 +#define BSIM4v4_MOD_PCIGBINV 784 +#define BSIM4v4_MOD_PNIGC 785 +#define BSIM4v4_MOD_PNIGBACC 786 +#define BSIM4v4_MOD_PNIGBINV 787 +#define BSIM4v4_MOD_PNTOX 788 +#define BSIM4v4_MOD_PEIGBINV 789 +#define BSIM4v4_MOD_PPIGCD 790 +#define BSIM4v4_MOD_PPOXEDGE 791 +#define BSIM4v4_MOD_PAIGSD 792 +#define BSIM4v4_MOD_PBIGSD 793 +#define BSIM4v4_MOD_PCIGSD 794 + +#define BSIM4v4_MOD_SAREF 795 +#define BSIM4v4_MOD_SBREF 796 +#define BSIM4v4_MOD_KU0 797 +#define BSIM4v4_MOD_KVSAT 798 +#define BSIM4v4_MOD_TKU0 799 +#define BSIM4v4_MOD_LLODKU0 800 +#define BSIM4v4_MOD_WLODKU0 801 +#define BSIM4v4_MOD_LLODVTH 802 +#define BSIM4v4_MOD_WLODVTH 803 +#define BSIM4v4_MOD_LKU0 804 +#define BSIM4v4_MOD_WKU0 805 +#define BSIM4v4_MOD_PKU0 806 +#define BSIM4v4_MOD_KVTH0 807 +#define BSIM4v4_MOD_LKVTH0 808 +#define BSIM4v4_MOD_WKVTH0 809 +#define BSIM4v4_MOD_PKVTH0 810 +#define BSIM4v4_MOD_WLOD 811 +#define BSIM4v4_MOD_STK2 812 +#define BSIM4v4_MOD_LODK2 813 +#define BSIM4v4_MOD_STETA0 814 +#define BSIM4v4_MOD_LODETA0 815 + +#define BSIM4v4_MOD_PLAMBDA 825 +#define BSIM4v4_MOD_PVTL 826 +#define BSIM4v4_MOD_PXN 827 +#define BSIM4v4_MOD_PVFBSDOFF 828 + +#define BSIM4v4_MOD_TNOM 831 +#define BSIM4v4_MOD_CGSO 832 +#define BSIM4v4_MOD_CGDO 833 +#define BSIM4v4_MOD_CGBO 834 +#define BSIM4v4_MOD_XPART 835 +#define BSIM4v4_MOD_RSH 836 +#define BSIM4v4_MOD_JSS 837 +#define BSIM4v4_MOD_PBS 838 +#define BSIM4v4_MOD_MJS 839 +#define BSIM4v4_MOD_PBSWS 840 +#define BSIM4v4_MOD_MJSWS 841 +#define BSIM4v4_MOD_CJS 842 +#define BSIM4v4_MOD_CJSWS 843 +#define BSIM4v4_MOD_NMOS 844 +#define BSIM4v4_MOD_PMOS 845 +#define BSIM4v4_MOD_NOIA 846 +#define BSIM4v4_MOD_NOIB 847 +#define BSIM4v4_MOD_NOIC 848 +#define BSIM4v4_MOD_LINT 849 +#define BSIM4v4_MOD_LL 850 +#define BSIM4v4_MOD_LLN 851 +#define BSIM4v4_MOD_LW 852 +#define BSIM4v4_MOD_LWN 853 +#define BSIM4v4_MOD_LWL 854 +#define BSIM4v4_MOD_LMIN 855 +#define BSIM4v4_MOD_LMAX 856 +#define BSIM4v4_MOD_WINT 857 +#define BSIM4v4_MOD_WL 858 +#define BSIM4v4_MOD_WLN 859 +#define BSIM4v4_MOD_WW 860 +#define BSIM4v4_MOD_WWN 861 +#define BSIM4v4_MOD_WWL 862 +#define BSIM4v4_MOD_WMIN 863 +#define BSIM4v4_MOD_WMAX 864 +#define BSIM4v4_MOD_DWC 865 +#define BSIM4v4_MOD_DLC 866 +#define BSIM4v4_MOD_XL 867 +#define BSIM4v4_MOD_XW 868 +#define BSIM4v4_MOD_EM 869 +#define BSIM4v4_MOD_EF 870 +#define BSIM4v4_MOD_AF 871 +#define BSIM4v4_MOD_KF 872 +#define BSIM4v4_MOD_NJS 873 +#define BSIM4v4_MOD_XTIS 874 +#define BSIM4v4_MOD_PBSWGS 875 +#define BSIM4v4_MOD_MJSWGS 876 +#define BSIM4v4_MOD_CJSWGS 877 +#define BSIM4v4_MOD_JSWS 878 +#define BSIM4v4_MOD_LLC 879 +#define BSIM4v4_MOD_LWC 880 +#define BSIM4v4_MOD_LWLC 881 +#define BSIM4v4_MOD_WLC 882 +#define BSIM4v4_MOD_WWC 883 +#define BSIM4v4_MOD_WWLC 884 +#define BSIM4v4_MOD_DWJ 885 +#define BSIM4v4_MOD_JSD 886 +#define BSIM4v4_MOD_PBD 887 +#define BSIM4v4_MOD_MJD 888 +#define BSIM4v4_MOD_PBSWD 889 +#define BSIM4v4_MOD_MJSWD 890 +#define BSIM4v4_MOD_CJD 891 +#define BSIM4v4_MOD_CJSWD 892 +#define BSIM4v4_MOD_NJD 893 +#define BSIM4v4_MOD_XTID 894 +#define BSIM4v4_MOD_PBSWGD 895 +#define BSIM4v4_MOD_MJSWGD 896 +#define BSIM4v4_MOD_CJSWGD 897 +#define BSIM4v4_MOD_JSWD 898 +#define BSIM4v4_MOD_DLCIG 899 /* trap-assisted tunneling */ -#define BSIM4V4_MOD_JTSS 900 -#define BSIM4V4_MOD_JTSD 901 -#define BSIM4V4_MOD_JTSSWS 902 -#define BSIM4V4_MOD_JTSSWD 903 -#define BSIM4V4_MOD_JTSSWGS 904 -#define BSIM4V4_MOD_JTSSWGD 905 -#define BSIM4V4_MOD_NJTS 906 -#define BSIM4V4_MOD_NJTSSW 907 -#define BSIM4V4_MOD_NJTSSWG 908 -#define BSIM4V4_MOD_XTSS 909 -#define BSIM4V4_MOD_XTSD 910 -#define BSIM4V4_MOD_XTSSWS 911 -#define BSIM4V4_MOD_XTSSWD 912 -#define BSIM4V4_MOD_XTSSWGS 913 -#define BSIM4V4_MOD_XTSSWGD 914 -#define BSIM4V4_MOD_TNJTS 915 -#define BSIM4V4_MOD_TNJTSSW 916 -#define BSIM4V4_MOD_TNJTSSWG 917 -#define BSIM4V4_MOD_VTSS 918 -#define BSIM4V4_MOD_VTSD 919 -#define BSIM4V4_MOD_VTSSWS 920 -#define BSIM4V4_MOD_VTSSWD 921 -#define BSIM4V4_MOD_VTSSWGS 922 -#define BSIM4V4_MOD_VTSSWGD 923 - -#define BSIM4V4_MOD_STIMOD 930 -#define BSIM4V4_MOD_SA0 931 -#define BSIM4V4_MOD_SB0 932 - -#define BSIM4V4_MOD_RGEOMOD 933 +#define BSIM4v4_MOD_JTSS 900 +#define BSIM4v4_MOD_JTSD 901 +#define BSIM4v4_MOD_JTSSWS 902 +#define BSIM4v4_MOD_JTSSWD 903 +#define BSIM4v4_MOD_JTSSWGS 904 +#define BSIM4v4_MOD_JTSSWGD 905 +#define BSIM4v4_MOD_NJTS 906 +#define BSIM4v4_MOD_NJTSSW 907 +#define BSIM4v4_MOD_NJTSSWG 908 +#define BSIM4v4_MOD_XTSS 909 +#define BSIM4v4_MOD_XTSD 910 +#define BSIM4v4_MOD_XTSSWS 911 +#define BSIM4v4_MOD_XTSSWD 912 +#define BSIM4v4_MOD_XTSSWGS 913 +#define BSIM4v4_MOD_XTSSWGD 914 +#define BSIM4v4_MOD_TNJTS 915 +#define BSIM4v4_MOD_TNJTSSW 916 +#define BSIM4v4_MOD_TNJTSSWG 917 +#define BSIM4v4_MOD_VTSS 918 +#define BSIM4v4_MOD_VTSD 919 +#define BSIM4v4_MOD_VTSSWS 920 +#define BSIM4v4_MOD_VTSSWD 921 +#define BSIM4v4_MOD_VTSSWGS 922 +#define BSIM4v4_MOD_VTSSWGD 923 + +#define BSIM4v4_MOD_STIMOD 930 +#define BSIM4v4_MOD_SA0 931 +#define BSIM4v4_MOD_SB0 932 + +#define BSIM4v4_MOD_RGEOMOD 933 /* device questions */ -#define BSIM4V4_DNODE 945 -#define BSIM4V4_GNODEEXT 946 -#define BSIM4V4_SNODE 947 -#define BSIM4V4_BNODE 948 -#define BSIM4V4_DNODEPRIME 949 -#define BSIM4V4_GNODEPRIME 950 -#define BSIM4V4_GNODEMIDE 951 -#define BSIM4V4_GNODEMID 952 -#define BSIM4V4_SNODEPRIME 953 -#define BSIM4V4_BNODEPRIME 954 -#define BSIM4V4_DBNODE 955 -#define BSIM4V4_SBNODE 956 -#define BSIM4V4_VBD 957 -#define BSIM4V4_VBS 958 -#define BSIM4V4_VGS 959 -#define BSIM4V4_VDS 960 -#define BSIM4V4_CD 961 -#define BSIM4V4_CBS 962 -#define BSIM4V4_CBD 963 -#define BSIM4V4_GM 964 -#define BSIM4V4_GDS 965 -#define BSIM4V4_GMBS 966 -#define BSIM4V4_GBD 967 -#define BSIM4V4_GBS 968 -#define BSIM4V4_QB 969 -#define BSIM4V4_CQB 970 -#define BSIM4V4_QG 971 -#define BSIM4V4_CQG 972 -#define BSIM4V4_QD 973 -#define BSIM4V4_CQD 974 -#define BSIM4V4_CGGB 975 -#define BSIM4V4_CGDB 976 -#define BSIM4V4_CGSB 977 -#define BSIM4V4_CBGB 978 -#define BSIM4V4_CAPBD 979 -#define BSIM4V4_CQBD 980 -#define BSIM4V4_CAPBS 981 -#define BSIM4V4_CQBS 982 -#define BSIM4V4_CDGB 983 -#define BSIM4V4_CDDB 984 -#define BSIM4V4_CDSB 985 -#define BSIM4V4_VON 986 -#define BSIM4V4_VDSAT 987 -#define BSIM4V4_QBS 988 -#define BSIM4V4_QBD 989 -#define BSIM4V4_SOURCECONDUCT 990 -#define BSIM4V4_DRAINCONDUCT 991 -#define BSIM4V4_CBDB 992 -#define BSIM4V4_CBSB 993 -#define BSIM4V4_CSUB 994 -#define BSIM4V4_QINV 995 -#define BSIM4V4_IGIDL 996 -#define BSIM4V4_CSGB 997 -#define BSIM4V4_CSDB 998 -#define BSIM4V4_CSSB 999 -#define BSIM4V4_CGBB 1000 -#define BSIM4V4_CDBB 1001 -#define BSIM4V4_CSBB 1002 -#define BSIM4V4_CBBB 1003 -#define BSIM4V4_QS 1004 -#define BSIM4V4_IGISL 1005 -#define BSIM4V4_IGS 1006 -#define BSIM4V4_IGD 1007 -#define BSIM4V4_IGB 1008 -#define BSIM4V4_IGCS 1009 -#define BSIM4V4_IGCD 1010 +#define BSIM4v4_DNODE 945 +#define BSIM4v4_GNODEEXT 946 +#define BSIM4v4_SNODE 947 +#define BSIM4v4_BNODE 948 +#define BSIM4v4_DNODEPRIME 949 +#define BSIM4v4_GNODEPRIME 950 +#define BSIM4v4_GNODEMIDE 951 +#define BSIM4v4_GNODEMID 952 +#define BSIM4v4_SNODEPRIME 953 +#define BSIM4v4_BNODEPRIME 954 +#define BSIM4v4_DBNODE 955 +#define BSIM4v4_SBNODE 956 +#define BSIM4v4_VBD 957 +#define BSIM4v4_VBS 958 +#define BSIM4v4_VGS 959 +#define BSIM4v4_VDS 960 +#define BSIM4v4_CD 961 +#define BSIM4v4_CBS 962 +#define BSIM4v4_CBD 963 +#define BSIM4v4_GM 964 +#define BSIM4v4_GDS 965 +#define BSIM4v4_GMBS 966 +#define BSIM4v4_GBD 967 +#define BSIM4v4_GBS 968 +#define BSIM4v4_QB 969 +#define BSIM4v4_CQB 970 +#define BSIM4v4_QG 971 +#define BSIM4v4_CQG 972 +#define BSIM4v4_QD 973 +#define BSIM4v4_CQD 974 +#define BSIM4v4_CGGB 975 +#define BSIM4v4_CGDB 976 +#define BSIM4v4_CGSB 977 +#define BSIM4v4_CBGB 978 +#define BSIM4v4_CAPBD 979 +#define BSIM4v4_CQBD 980 +#define BSIM4v4_CAPBS 981 +#define BSIM4v4_CQBS 982 +#define BSIM4v4_CDGB 983 +#define BSIM4v4_CDDB 984 +#define BSIM4v4_CDSB 985 +#define BSIM4v4_VON 986 +#define BSIM4v4_VDSAT 987 +#define BSIM4v4_QBS 988 +#define BSIM4v4_QBD 989 +#define BSIM4v4_SOURCECONDUCT 990 +#define BSIM4v4_DRAINCONDUCT 991 +#define BSIM4v4_CBDB 992 +#define BSIM4v4_CBSB 993 +#define BSIM4v4_CSUB 994 +#define BSIM4v4_QINV 995 +#define BSIM4v4_IGIDL 996 +#define BSIM4v4_CSGB 997 +#define BSIM4v4_CSDB 998 +#define BSIM4v4_CSSB 999 +#define BSIM4v4_CGBB 1000 +#define BSIM4v4_CDBB 1001 +#define BSIM4v4_CSBB 1002 +#define BSIM4v4_CBBB 1003 +#define BSIM4v4_QS 1004 +#define BSIM4v4_IGISL 1005 +#define BSIM4v4_IGS 1006 +#define BSIM4v4_IGD 1007 +#define BSIM4v4_IGB 1008 +#define BSIM4v4_IGCS 1009 +#define BSIM4v4_IGCD 1010 # #include "bsim4v4ext.h" -extern void BSIM4V4evaluate(double,double,double,BSIM4V4instance*,BSIM4V4model*, +extern void BSIM4v4evaluate(double,double,double,BSIM4v4instance*,BSIM4v4model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); -extern int BSIM4V4debug(BSIM4V4model*, BSIM4V4instance*, CKTcircuit*, int); -extern int BSIM4V4checkModel(BSIM4V4model*, BSIM4V4instance*, CKTcircuit*); +extern int BSIM4v4debug(BSIM4v4model*, BSIM4v4instance*, CKTcircuit*, int); +extern int BSIM4v4checkModel(BSIM4v4model*, BSIM4v4instance*, CKTcircuit*); -#endif /*BSIM4V4*/ +#endif /*BSIM4v4*/ diff --git a/src/spicelib/devices/bsim4v4/bsim4v4ext.h b/src/spicelib/devices/bsim4v4/bsim4v4ext.h index b1476968e..fd5fce099 100644 --- a/src/spicelib/devices/bsim4v4/bsim4v4ext.h +++ b/src/spicelib/devices/bsim4v4/bsim4v4ext.h @@ -6,28 +6,28 @@ File: bsim4ext.h **********/ -extern int BSIM4V4acLoad(GENmodel *,CKTcircuit*); -extern int BSIM4V4ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); -extern int BSIM4V4convTest(GENmodel *,CKTcircuit*); -extern int BSIM4V4delete(GENmodel*,IFuid,GENinstance**); -extern void BSIM4V4destroy(GENmodel**); -extern int BSIM4V4getic(GENmodel*,CKTcircuit*); -extern int BSIM4V4load(GENmodel*,CKTcircuit*); -extern int BSIM4V4mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); -extern int BSIM4V4mDelete(GENmodel**,IFuid,GENmodel*); -extern int BSIM4V4mParam(int,IFvalue*,GENmodel*); -extern void BSIM4V4mosCap(CKTcircuit*, double, double, double, double, +extern int BSIM4v4acLoad(GENmodel *,CKTcircuit*); +extern int BSIM4v4ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); +extern int BSIM4v4convTest(GENmodel *,CKTcircuit*); +extern int BSIM4v4delete(GENmodel*,IFuid,GENinstance**); +extern void BSIM4v4destroy(GENmodel**); +extern int BSIM4v4getic(GENmodel*,CKTcircuit*); +extern int BSIM4v4load(GENmodel*,CKTcircuit*); +extern int BSIM4v4mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); +extern int BSIM4v4mDelete(GENmodel**,IFuid,GENmodel*); +extern int BSIM4v4mParam(int,IFvalue*,GENmodel*); +extern void BSIM4v4mosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); -extern int BSIM4V4param(int,IFvalue*,GENinstance*,IFvalue*); -extern int BSIM4V4pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); -extern int BSIM4V4setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); -extern int BSIM4V4temp(GENmodel*,CKTcircuit*); -extern int BSIM4V4trunc(GENmodel*,CKTcircuit*,double*); -extern int BSIM4V4noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); -extern int BSIM4V4unsetup(GENmodel*,CKTcircuit*); +extern int BSIM4v4param(int,IFvalue*,GENinstance*,IFvalue*); +extern int BSIM4v4pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); +extern int BSIM4v4setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); +extern int BSIM4v4temp(GENmodel*,CKTcircuit*); +extern int BSIM4v4trunc(GENmodel*,CKTcircuit*,double*); +extern int BSIM4v4noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); +extern int BSIM4v4unsetup(GENmodel*,CKTcircuit*); diff --git a/src/spicelib/devices/bsim4v4/bsim4v4init.c b/src/spicelib/devices/bsim4v4/bsim4v4init.c index 09db8effa..81892bc69 100644 --- a/src/spicelib/devices/bsim4v4/bsim4v4init.c +++ b/src/spicelib/devices/bsim4v4/bsim4v4init.c @@ -7,20 +7,20 @@ #include "bsim4v4init.h" -SPICEdev BSIM4V4info = { +SPICEdev BSIM4v4info = { { "BSIM4v4", "Berkeley Short Channel IGFET Model-4", - &BSIM4V4nSize, - &BSIM4V4nSize, - BSIM4V4names, + &BSIM4v4nSize, + &BSIM4v4nSize, + BSIM4v4names, - &BSIM4V4pTSize, - BSIM4V4pTable, + &BSIM4v4pTSize, + BSIM4v4pTable, - &BSIM4V4mPTSize, - BSIM4V4mPTable, + &BSIM4v4mPTSize, + BSIM4v4mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ @@ -40,25 +40,25 @@ SPICEdev BSIM4V4info = { DEV_DEFAULT }, - BSIM4V4param, /* DEVparam */ - BSIM4V4mParam, /* DEVmodParam */ - BSIM4V4load, /* DEVload */ - BSIM4V4setup, /* DEVsetup */ - BSIM4V4unsetup, /* DEVunsetup */ - BSIM4V4setup, /* DEVpzSetup */ - BSIM4V4temp, /* DEVtemperature */ - BSIM4V4trunc, /* DEVtrunc */ + BSIM4v4param, /* DEVparam */ + BSIM4v4mParam, /* DEVmodParam */ + BSIM4v4load, /* DEVload */ + BSIM4v4setup, /* DEVsetup */ + BSIM4v4unsetup, /* DEVunsetup */ + BSIM4v4setup, /* DEVpzSetup */ + BSIM4v4temp, /* DEVtemperature */ + BSIM4v4trunc, /* DEVtrunc */ NULL, /* DEVfindBranch */ - BSIM4V4acLoad, /* DEVacLoad */ + BSIM4v4acLoad, /* DEVacLoad */ NULL, /* DEVaccept */ - BSIM4V4destroy, /* DEVdestroy */ - BSIM4V4mDelete, /* DEVmodDelete */ - BSIM4V4delete, /* DEVdelete */ - BSIM4V4getic, /* DEVsetic */ - BSIM4V4ask, /* DEVask */ - BSIM4V4mAsk, /* DEVmodAsk */ - BSIM4V4pzLoad, /* DEVpzLoad */ - BSIM4V4convTest, /* DEVconvTest */ + BSIM4v4destroy, /* DEVdestroy */ + BSIM4v4mDelete, /* DEVmodDelete */ + BSIM4v4delete, /* DEVdelete */ + BSIM4v4getic, /* DEVsetic */ + BSIM4v4ask, /* DEVask */ + BSIM4v4mAsk, /* DEVmodAsk */ + BSIM4v4pzLoad, /* DEVpzLoad */ + BSIM4v4convTest, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ @@ -66,18 +66,18 @@ SPICEdev BSIM4V4info = { NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ - BSIM4V4noise, /* DEVnoise */ + BSIM4v4noise, /* DEVnoise */ #ifdef CIDER NULL, /* DEVdump */ NULL, /* DEVacct */ #endif - &BSIM4V4iSize, /* DEVinstSize */ - &BSIM4V4mSize /* DEVmodSize */ + &BSIM4v4iSize, /* DEVinstSize */ + &BSIM4v4mSize /* DEVmodSize */ }; SPICEdev * get_bsim4v4_info(void) { - return &BSIM4V4info; + return &BSIM4v4info; } diff --git a/src/spicelib/devices/bsim4v4/bsim4v4init.h b/src/spicelib/devices/bsim4v4/bsim4v4init.h index 823759cf7..33cc59cf2 100644 --- a/src/spicelib/devices/bsim4v4/bsim4v4init.h +++ b/src/spicelib/devices/bsim4v4/bsim4v4init.h @@ -1,13 +1,13 @@ #ifndef _BSIM4V4INIT_H #define _BSIM4V4INIT_H -extern IFparm BSIM4V4pTable[ ]; -extern IFparm BSIM4V4mPTable[ ]; -extern char *BSIM4V4names[ ]; -extern int BSIM4V4pTSize; -extern int BSIM4V4mPTSize; -extern int BSIM4V4nSize; -extern int BSIM4V4iSize; -extern int BSIM4V4mSize; +extern IFparm BSIM4v4pTable[ ]; +extern IFparm BSIM4v4mPTable[ ]; +extern char *BSIM4v4names[ ]; +extern int BSIM4v4pTSize; +extern int BSIM4v4mPTSize; +extern int BSIM4v4nSize; +extern int BSIM4v4iSize; +extern int BSIM4v4mSize; #endif