Browse Source

Added dietmar's bsim3v3.2 enhanced model.

pre-master-46
pnenzi 23 years ago
parent
commit
b5c7486d34
  1. 905
      src/spicelib/devices/bsim3/b3.c
  2. 777
      src/spicelib/devices/bsim3/b3acld.c
  3. 419
      src/spicelib/devices/bsim3/b3ask.c
  4. 966
      src/spicelib/devices/bsim3/b3check.c
  5. 194
      src/spicelib/devices/bsim3/b3cvtest.c
  6. 51
      src/spicelib/devices/bsim3/b3del.c
  7. 58
      src/spicelib/devices/bsim3/b3dest.c
  8. 73
      src/spicelib/devices/bsim3/b3getic.c
  9. 5366
      src/spicelib/devices/bsim3/b3ld.c
  10. 2452
      src/spicelib/devices/bsim3/b3mask.c
  11. 71
      src/spicelib/devices/bsim3/b3mdel.c
  12. 62
      src/spicelib/devices/bsim3/b3mpar.c
  13. 851
      src/spicelib/devices/bsim3/b3noi.c
  14. 174
      src/spicelib/devices/bsim3/b3par.c
  15. 811
      src/spicelib/devices/bsim3/b3pzld.c
  16. 2046
      src/spicelib/devices/bsim3/b3set.c
  17. 2136
      src/spicelib/devices/bsim3/b3temp.c
  18. 56
      src/spicelib/devices/bsim3/b3trunc.c
  19. 55
      src/spicelib/devices/bsim3/bsim3def.h
  20. 3
      src/spicelib/devices/bsim3/bsim3ext.h
  21. 10
      src/spicelib/devices/bsim3/bsim3init.c

905
src/spicelib/devices/bsim3/b3.c

@ -1,488 +1,493 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3.c of BSIM3v3.2.4
* Author: 1995 Min-Chie Jeng and Mansun Chan
* Author: 1997-1999 Weidong Liu.
* Author: 2001 Xuemei Xi
* Modified by Paolo Nenzi 2002
* Modified by Paolo Nenzi 2002 and Dietmar Warning 2003
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "devdefs.h"
#include "bsim3def.h"
#include "suffix.h"
IFparm BSIM3pTable[] = { /* parameters */
IOP ("l", BSIM3_L, IF_REAL, "Length"),
IOP ("w", BSIM3_W, IF_REAL, "Width"),
IOP ("m", BSIM3_M, IF_REAL, "Parallel multiplier"),
IOP ("ad", BSIM3_AD, IF_REAL, "Drain area"),
IOP ("as", BSIM3_AS, IF_REAL, "Source area"),
IOP ("pd", BSIM3_PD, IF_REAL, "Drain perimeter"),
IOP ("ps", BSIM3_PS, IF_REAL, "Source perimeter"),
IOP ("nrd", BSIM3_NRD, IF_REAL, "Number of squares in drain"),
IOP ("nrs", BSIM3_NRS, IF_REAL, "Number of squares in source"),
IOP ("off", BSIM3_OFF, IF_FLAG, "Device is initially off"),
IOP ("nqsmod", BSIM3_NQSMOD, IF_INTEGER,
"Non-quasi-static model selector"),
IP ("ic", BSIM3_IC, IF_REALVEC,
"Vector of DS,GS,BS initial voltages"),
OP ("gmbs", BSIM3_GMBS, IF_REAL, "Gmb"),
OP ("gm", BSIM3_GM, IF_REAL, "Gm"),
OP ("gds", BSIM3_GDS, IF_REAL, "Gds"),
OP ("vdsat", BSIM3_VDSAT, IF_REAL, "Vdsat"),
OP ("vth", BSIM3_VON, IF_REAL, "Vth"),
OP ("id", BSIM3_CD, IF_REAL, "Ids"),
OP ("vbs", BSIM3_VBS, IF_REAL, "Vbs"),
OP ("vgs", BSIM3_VGS, IF_REAL, "Vgs"),
OP ("vds", BSIM3_VDS, IF_REAL, "Vds"),
IFparm BSIM3pTable[] = { /* parameters */
IOP( "l", BSIM3_L, IF_REAL , "Length"),
IOP( "w", BSIM3_W, IF_REAL , "Width"),
IOP( "m", BSIM3_M, IF_REAL , "Parallel multiplier"),
IOP( "ad", BSIM3_AD, IF_REAL , "Drain area"),
IOP( "as", BSIM3_AS, IF_REAL , "Source area"),
IOP( "pd", BSIM3_PD, IF_REAL , "Drain perimeter"),
IOP( "ps", BSIM3_PS, IF_REAL , "Source perimeter"),
IOP( "nrd", BSIM3_NRD, IF_REAL , "Number of squares in drain"),
IOP( "nrs", BSIM3_NRS, IF_REAL , "Number of squares in source"),
IOP( "off", BSIM3_OFF, IF_FLAG , "Device is initially off"),
IOP( "nqsmod", BSIM3_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"),
IP( "ic", BSIM3_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"),
OP( "gmbs", BSIM3_GMBS, IF_REAL, "Gmb"),
OP( "gm", BSIM3_GM, IF_REAL, "Gm"),
OP( "gds", BSIM3_GDS, IF_REAL, "Gds"),
OP( "vdsat", BSIM3_VDSAT, IF_REAL, "Vdsat"),
OP( "vth", BSIM3_VON, IF_REAL, "Vth"),
OP( "id", BSIM3_CD, IF_REAL, "Ids"),
OP( "vbs", BSIM3_VBS, IF_REAL, "Vbs"),
OP( "vgs", BSIM3_VGS, IF_REAL, "Vgs"),
OP( "vds", BSIM3_VDS, IF_REAL, "Vds"),
};
IFparm BSIM3mPTable[] = { /* model parameters */
IOP ("capmod", BSIM3_MOD_CAPMOD, IF_INTEGER,"Capacitance model selector"),
IOP ("mobmod", BSIM3_MOD_MOBMOD, IF_INTEGER,"Mobility model selector"),
IOP ("noimod", BSIM3_MOD_NOIMOD, IF_INTEGER, "Noise model selector"),
IOP ("paramchk", BSIM3_MOD_PARAMCHK, IF_INTEGER,"Model parameter checking selector"),
IOP ("binunit", BSIM3_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"),
IOP ("version", BSIM3_MOD_VERSION, IF_STRING," parameter for model version"),
IOP ("tox", BSIM3_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"),
IOP ("toxm", BSIM3_MOD_TOXM, IF_REAL,"Gate oxide thickness used in extraction"),
IOP ("cdsc", BSIM3_MOD_CDSC, IF_REAL,"Drain/Source and channel coupling capacitance"),
IOP ("cdscb", BSIM3_MOD_CDSCB, IF_REAL,"Body-bias dependence of cdsc"),
IOP ("cdscd", BSIM3_MOD_CDSCD, IF_REAL,"Drain-bias dependence of cdsc"),
IOP ("cit", BSIM3_MOD_CIT, IF_REAL, "Interface state capacitance"),
IOP ("nfactor", BSIM3_MOD_NFACTOR, IF_REAL,"Subthreshold swing Coefficient"),
IOP ("xj", BSIM3_MOD_XJ, IF_REAL, "Junction depth in meters"),
IOP ("vsat", BSIM3_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"),
IOP ("at", BSIM3_MOD_AT, IF_REAL, "Temperature coefficient of vsat"),
IOP ("a0", BSIM3_MOD_A0, IF_REAL,"Non-uniform depletion width effect coefficient."),
IOP ("ags", BSIM3_MOD_AGS, IF_REAL,"Gate bias coefficient of Abulk."),
IOP ("a1", BSIM3_MOD_A1, IF_REAL,"Non-saturation effect coefficient"),
IOP ("a2", BSIM3_MOD_A2, IF_REAL,"Non-saturation effect coefficient"),
IOP ("keta", BSIM3_MOD_KETA, IF_REAL,"Body-bias coefficient of non-uniform depletion width effect."),
IOP ("nsub", BSIM3_MOD_NSUB, IF_REAL,"Substrate doping concentration"),
IOP ("nch", BSIM3_MOD_NPEAK, IF_REAL, "Channel doping concentration"),
IOP ("ngate", BSIM3_MOD_NGATE, IF_REAL,"Poly-gate doping concentration"),
IOP ("gamma1", BSIM3_MOD_GAMMA1, IF_REAL, "Vth body coefficient"),
IOP ("gamma2", BSIM3_MOD_GAMMA2, IF_REAL, "Vth body coefficient"),
IOP ("vbx", BSIM3_MOD_VBX, IF_REAL, "Vth transition body Voltage"),
IOP ("vbm", BSIM3_MOD_VBM, IF_REAL, "Maximum body voltage"),
IFparm BSIM3mPTable[] = { /* model parameters */
IOP( "capmod", BSIM3_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"),
IOP( "mobmod", BSIM3_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"),
IOP( "noimod", BSIM3_MOD_NOIMOD, IF_INTEGER, "Noise model selector"),
IOP( "acm", BSIM3_MOD_ACMMOD, IF_INTEGER, "Area calculation method selector"),
IOP( "paramchk", BSIM3_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"),
IOP( "binunit", BSIM3_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"),
IOP( "version", BSIM3_MOD_VERSION, IF_STRING, " parameter for model version"),
IOP( "tox", BSIM3_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"),
IOP( "toxm", BSIM3_MOD_TOXM, IF_REAL, "Gate oxide thickness used in extraction"),
IOP( "cdsc", BSIM3_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"),
IOP( "cdscb", BSIM3_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"),
IOP( "cdscd", BSIM3_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"),
IOP( "cit", BSIM3_MOD_CIT, IF_REAL, "Interface state capacitance"),
IOP( "nfactor", BSIM3_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"),
IOP( "xj", BSIM3_MOD_XJ, IF_REAL, "Junction depth in meters"),
IOP( "vsat", BSIM3_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"),
IOP( "at", BSIM3_MOD_AT, IF_REAL, "Temperature coefficient of vsat"),
IOP( "a0", BSIM3_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."),
IOP( "ags", BSIM3_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."),
IOP( "a1", BSIM3_MOD_A1, IF_REAL, "Non-saturation effect coefficient"),
IOP( "a2", BSIM3_MOD_A2, IF_REAL, "Non-saturation effect coefficient"),
IOP( "keta", BSIM3_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."),
IOP( "nsub", BSIM3_MOD_NSUB, IF_REAL, "Substrate doping concentration"),
IOP( "nch", BSIM3_MOD_NPEAK, IF_REAL, "Channel doping concentration"),
IOP( "ngate", BSIM3_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"),
IOP( "gamma1", BSIM3_MOD_GAMMA1, IF_REAL, "Vth body coefficient"),
IOP( "gamma2", BSIM3_MOD_GAMMA2, IF_REAL, "Vth body coefficient"),
IOP( "vbx", BSIM3_MOD_VBX, IF_REAL, "Vth transition body Voltage"),
IOP( "vbm", BSIM3_MOD_VBM, IF_REAL, "Maximum body voltage"),
IOP ("xt", BSIM3_MOD_XT, IF_REAL, "Doping depth"),
IOP ("k1", BSIM3_MOD_K1, IF_REAL, "Bulk effect coefficient 1"),
IOP ("kt1", BSIM3_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"),
IOP ("kt1l", BSIM3_MOD_KT1L, IF_REAL,"Temperature coefficient of Vth"),
IOP ("kt2", BSIM3_MOD_KT2, IF_REAL, "Body-coefficient of kt1"),
IOP ("k2", BSIM3_MOD_K2, IF_REAL, "Bulk effect coefficient 2"),
IOP ("k3", BSIM3_MOD_K3, IF_REAL, "Narrow width effect coefficient"),
IOP ("k3b", BSIM3_MOD_K3B, IF_REAL, "Body effect coefficient of k3"),
IOP ("w0", BSIM3_MOD_W0, IF_REAL, "Narrow width effect parameter"),
IOP ("nlx", BSIM3_MOD_NLX, IF_REAL,"Lateral non-uniform doping effect"),
IOP ("dvt0", BSIM3_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"),
IOP ("dvt1", BSIM3_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"),
IOP ("dvt2", BSIM3_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"),
IOP ("dvt0w", BSIM3_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"),
IOP ("dvt1w", BSIM3_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"),
IOP ("dvt2w", BSIM3_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"),
IOP ("drout", BSIM3_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"),
IOP ("dsub", BSIM3_MOD_DSUB, IF_REAL,"DIBL coefficient in the subthreshold region"),
IOP ("vth0", BSIM3_MOD_VTH0, IF_REAL, "Threshold voltage"),
IOP ("vtho", BSIM3_MOD_VTH0, IF_REAL, "Threshold voltage"),
IOP ("ua", BSIM3_MOD_UA, IF_REAL, "Linear gate dependence of mobility"),
IOP ("ua1", BSIM3_MOD_UA1, IF_REAL, "Temperature coefficient of ua"),
IOP ("ub", BSIM3_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"),
IOP ("ub1", BSIM3_MOD_UB1, IF_REAL, "Temperature coefficient of ub"),
IOP ("uc", BSIM3_MOD_UC, IF_REAL, "Body-bias dependence of mobility"),
IOP ("uc1", BSIM3_MOD_UC1, IF_REAL, "Temperature coefficient of uc"),
IOP ("u0", BSIM3_MOD_U0, IF_REAL, "Low-field mobility at Tnom"),
IOP ("ute", BSIM3_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"),
IOP ("voff", BSIM3_MOD_VOFF, IF_REAL, "Threshold voltage offset"),
IOP ("tnom", BSIM3_MOD_TNOM, IF_REAL, "Parameter measurement temperature"),
IOP ("cgso", BSIM3_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"),
IOP ("cgdo", BSIM3_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"),
IOP ("cgbo", BSIM3_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"),
IOP ("xpart", BSIM3_MOD_XPART, IF_REAL, "Channel charge partitioning"),
IOP ("elm", BSIM3_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"),
IOP ("delta", BSIM3_MOD_DELTA, IF_REAL, "Effective Vds parameter"),
IOP ("rsh", BSIM3_MOD_RSH, IF_REAL, "Source-drain sheet resistance"),
IOP ("rdsw", BSIM3_MOD_RDSW, IF_REAL, "Source-drain resistance per width"),
IOP( "xt", BSIM3_MOD_XT, IF_REAL, "Doping depth"),
IOP( "k1", BSIM3_MOD_K1, IF_REAL, "Bulk effect coefficient 1"),
IOP( "kt1", BSIM3_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"),
IOP( "kt1l", BSIM3_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"),
IOP( "kt2", BSIM3_MOD_KT2, IF_REAL, "Body-coefficient of kt1"),
IOP( "k2", BSIM3_MOD_K2, IF_REAL, "Bulk effect coefficient 2"),
IOP( "k3", BSIM3_MOD_K3, IF_REAL, "Narrow width effect coefficient"),
IOP( "k3b", BSIM3_MOD_K3B, IF_REAL, "Body effect coefficient of k3"),
IOP( "w0", BSIM3_MOD_W0, IF_REAL, "Narrow width effect parameter"),
IOP( "nlx", BSIM3_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"),
IOP( "dvt0", BSIM3_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"),
IOP( "dvt1", BSIM3_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"),
IOP( "dvt2", BSIM3_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"),
IOP( "dvt0w", BSIM3_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"),
IOP( "dvt1w", BSIM3_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"),
IOP( "dvt2w", BSIM3_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"),
IOP( "drout", BSIM3_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"),
IOP( "dsub", BSIM3_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"),
IOP( "vth0", BSIM3_MOD_VTH0, IF_REAL,"Threshold voltage"),
IOP( "vtho", BSIM3_MOD_VTH0, IF_REAL,"Threshold voltage"),
IOP( "ua", BSIM3_MOD_UA, IF_REAL, "Linear gate dependence of mobility"),
IOP( "ua1", BSIM3_MOD_UA1, IF_REAL, "Temperature coefficient of ua"),
IOP( "ub", BSIM3_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"),
IOP( "ub1", BSIM3_MOD_UB1, IF_REAL, "Temperature coefficient of ub"),
IOP( "uc", BSIM3_MOD_UC, IF_REAL, "Body-bias dependence of mobility"),
IOP( "uc1", BSIM3_MOD_UC1, IF_REAL, "Temperature coefficient of uc"),
IOP( "u0", BSIM3_MOD_U0, IF_REAL, "Low-field mobility at Tnom"),
IOP( "ute", BSIM3_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"),
IOP( "voff", BSIM3_MOD_VOFF, IF_REAL, "Threshold voltage offset"),
IOP( "tnom", BSIM3_MOD_TNOM, IF_REAL, "Parameter measurement temperature"),
IOP( "cgso", BSIM3_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"),
IOP( "cgdo", BSIM3_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"),
IOP( "cgbo", BSIM3_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"),
IOP( "xpart", BSIM3_MOD_XPART, IF_REAL, "Channel charge partitioning"),
IOP( "elm", BSIM3_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"),
IOP( "delta", BSIM3_MOD_DELTA, IF_REAL, "Effective Vds parameter"),
IOP( "rsh", BSIM3_MOD_RSH, IF_REAL, "Source-drain sheet resistance"),
IOP( "rdsw", BSIM3_MOD_RDSW, IF_REAL, "Source-drain resistance per width"),
IOP ("prwg", BSIM3_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "),
IOP ("prwb", BSIM3_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "),
IOP( "prwg", BSIM3_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "),
IOP( "prwb", BSIM3_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "),
IOP ("prt", BSIM3_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "),
IOP ("eta0", BSIM3_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"),
IOP ("etab", BSIM3_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"),
IOP ("pclm", BSIM3_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"),
IOP ("pdiblc1", BSIM3_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"),
IOP ("pdiblc2", BSIM3_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"),
IOP ("pdiblcb", BSIM3_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"),
IOP ("pscbe1", BSIM3_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"),
IOP ("pscbe2", BSIM3_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"),
IOP ("pvag", BSIM3_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"),
IOP ("js", BSIM3_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"),
IOP ("jsw", BSIM3_MOD_JSW, IF_REAL, "Sidewall junction reverse saturation current density"),
IOP ("pb", BSIM3_MOD_PB, IF_REAL, "Source/drain junction built-in potential"),
IOP ("nj", BSIM3_MOD_NJ, IF_REAL, "Source/drain junction emission coefficient"),
IOP ("xti", BSIM3_MOD_XTI, IF_REAL, "Junction current temperature exponent"),
IOP ("mj", BSIM3_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"),
IOP ("pbsw", BSIM3_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"),
IOP ("mjsw", BSIM3_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"),
IOP ("pbswg", BSIM3_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"),
IOP ("mjswg", BSIM3_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"),
IOP ("cj", BSIM3_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"),
IOP ("vfbcv", BSIM3_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"),
IOP ("vfb", BSIM3_MOD_VFB, IF_REAL, "Flat Band Voltage"),
IOP ("cjsw", BSIM3_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit periphery"),
IOP ("cjswg", BSIM3_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"),
IOP ("tpb", BSIM3_MOD_TPB, IF_REAL, "Temperature coefficient of pb"),
IOP ("tcj", BSIM3_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"),
IOP ("tpbsw", BSIM3_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"),
IOP ("tcjsw", BSIM3_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"),
IOP ("tpbswg", BSIM3_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"),
IOP ("tcjswg", BSIM3_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"),
IOP ("acde", BSIM3_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"),
IOP ("moin", BSIM3_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"),
IOP ("noff", BSIM3_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"),
IOP ("voffcv", BSIM3_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"),
IOP ("lint", BSIM3_MOD_LINT, IF_REAL, "Length reduction parameter"),
IOP ("ll", BSIM3_MOD_LL, IF_REAL, "Length reduction parameter"),
IOP ("llc", BSIM3_MOD_LLC, IF_REAL, "Length reduction parameter for CV"),
IOP ("lln", BSIM3_MOD_LLN, IF_REAL, "Length reduction parameter"),
IOP ("lw", BSIM3_MOD_LW, IF_REAL, "Length reduction parameter"),
IOP ("lwc", BSIM3_MOD_LWC, IF_REAL, "Length reduction parameter for CV"),
IOP ("lwn", BSIM3_MOD_LWN, IF_REAL, "Length reduction parameter"),
IOP ("lwl", BSIM3_MOD_LWL, IF_REAL, "Length reduction parameter"),
IOP ("lwlc", BSIM3_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"),
IOP ("lmin", BSIM3_MOD_LMIN, IF_REAL, "Minimum length for the model"),
IOP ("lmax", BSIM3_MOD_LMAX, IF_REAL, "Maximum length for the model"),
IOP( "prt", BSIM3_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "),
IOP( "eta0", BSIM3_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"),
IOP( "etab", BSIM3_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"),
IOP( "pclm", BSIM3_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"),
IOP( "pdiblc1", BSIM3_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"),
IOP( "pdiblc2", BSIM3_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"),
IOP( "pdiblcb", BSIM3_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"),
IOP( "pscbe1", BSIM3_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"),
IOP( "pscbe2", BSIM3_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"),
IOP( "pvag", BSIM3_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"),
IOP( "js", BSIM3_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"),
IOP( "jsw", BSIM3_MOD_JSW, IF_REAL, "Sidewall junction reverse saturation current density"),
IOP( "pb", BSIM3_MOD_PB, IF_REAL, "Source/drain junction built-in potential"),
IOP( "nj", BSIM3_MOD_NJ, IF_REAL, "Source/drain junction emission coefficient"),
IOP( "xti", BSIM3_MOD_XTI, IF_REAL, "Junction current temperature exponent"),
IOP( "mj", BSIM3_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"),
IOP( "pbsw", BSIM3_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"),
IOP( "mjsw", BSIM3_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"),
IOP( "pbswg", BSIM3_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"),
IOP( "mjswg", BSIM3_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"),
IOP( "cj", BSIM3_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"),
IOP( "vfbcv", BSIM3_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"),
IOP( "vfb", BSIM3_MOD_VFB, IF_REAL, "Flat Band Voltage"),
IOP( "cjsw", BSIM3_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit periphery"),
IOP( "cjswg", BSIM3_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"),
IOP( "tpb", BSIM3_MOD_TPB, IF_REAL, "Temperature coefficient of pb"),
IOP( "tcj", BSIM3_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"),
IOP( "tpbsw", BSIM3_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"),
IOP( "tcjsw", BSIM3_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"),
IOP( "tpbswg", BSIM3_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"),
IOP( "tcjswg", BSIM3_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"),
IOP( "acde", BSIM3_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"),
IOP( "moin", BSIM3_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"),
IOP( "noff", BSIM3_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"),
IOP( "voffcv", BSIM3_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"),
IOP( "lint", BSIM3_MOD_LINT, IF_REAL, "Length reduction parameter"),
IOP( "ll", BSIM3_MOD_LL, IF_REAL, "Length reduction parameter"),
IOP( "llc", BSIM3_MOD_LLC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lln", BSIM3_MOD_LLN, IF_REAL, "Length reduction parameter"),
IOP( "lw", BSIM3_MOD_LW, IF_REAL, "Length reduction parameter"),
IOP( "lwc", BSIM3_MOD_LWC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lwn", BSIM3_MOD_LWN, IF_REAL, "Length reduction parameter"),
IOP( "lwl", BSIM3_MOD_LWL, IF_REAL, "Length reduction parameter"),
IOP( "lwlc", BSIM3_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lmin", BSIM3_MOD_LMIN, IF_REAL, "Minimum length for the model"),
IOP( "lmax", BSIM3_MOD_LMAX, IF_REAL, "Maximum length for the model"),
IOP ("wr", BSIM3_MOD_WR, IF_REAL, "Width dependence of rds"),
IOP ("wint", BSIM3_MOD_WINT, IF_REAL, "Width reduction parameter"),
IOP ("dwg", BSIM3_MOD_DWG, IF_REAL, "Width reduction parameter"),
IOP ("dwb", BSIM3_MOD_DWB, IF_REAL, "Width reduction parameter"),
IOP( "xl", BSIM3_MOD_XL, IF_REAL, "Length correction parameter"),
IOP( "xw", BSIM3_MOD_XW, IF_REAL, "Width correction parameter"),
IOP ("wl", BSIM3_MOD_WL, IF_REAL, "Width reduction parameter"),
IOP ("wlc", BSIM3_MOD_WLC, IF_REAL, "Width reduction parameter for CV"),
IOP ("wln", BSIM3_MOD_WLN, IF_REAL, "Width reduction parameter"),
IOP ("ww", BSIM3_MOD_WW, IF_REAL, "Width reduction parameter"),
IOP ("wwc", BSIM3_MOD_WWC, IF_REAL, "Width reduction parameter for CV"),
IOP ("wwn", BSIM3_MOD_WWN, IF_REAL, "Width reduction parameter"),
IOP ("wwl", BSIM3_MOD_WWL, IF_REAL, "Width reduction parameter"),
IOP ("wwlc", BSIM3_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"),
IOP ("wmin", BSIM3_MOD_WMIN, IF_REAL, "Minimum width for the model"),
IOP ("wmax", BSIM3_MOD_WMAX, IF_REAL, "Maximum width for the model"),
IOP( "wr", BSIM3_MOD_WR, IF_REAL, "Width dependence of rds"),
IOP( "wint", BSIM3_MOD_WINT, IF_REAL, "Width reduction parameter"),
IOP( "dwg", BSIM3_MOD_DWG, IF_REAL, "Width reduction parameter"),
IOP( "dwb", BSIM3_MOD_DWB, IF_REAL, "Width reduction parameter"),
IOP ("b0", BSIM3_MOD_B0, IF_REAL, "Abulk narrow width parameter"),
IOP ("b1", BSIM3_MOD_B1, IF_REAL, "Abulk narrow width parameter"),
IOP( "wl", BSIM3_MOD_WL, IF_REAL, "Width reduction parameter"),
IOP( "wlc", BSIM3_MOD_WLC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wln", BSIM3_MOD_WLN, IF_REAL, "Width reduction parameter"),
IOP( "ww", BSIM3_MOD_WW, IF_REAL, "Width reduction parameter"),
IOP( "wwc", BSIM3_MOD_WWC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wwn", BSIM3_MOD_WWN, IF_REAL, "Width reduction parameter"),
IOP( "wwl", BSIM3_MOD_WWL, IF_REAL, "Width reduction parameter"),
IOP( "wwlc", BSIM3_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wmin", BSIM3_MOD_WMIN, IF_REAL, "Minimum width for the model"),
IOP( "wmax", BSIM3_MOD_WMAX, IF_REAL, "Maximum width for the model"),
IOP ("cgsl", BSIM3_MOD_CGSL, IF_REAL, "New C-V model parameter"),
IOP ("cgdl", BSIM3_MOD_CGDL, IF_REAL, "New C-V model parameter"),
IOP ("ckappa", BSIM3_MOD_CKAPPA, IF_REAL, "New C-V model parameter"),
IOP ("cf", BSIM3_MOD_CF, IF_REAL, "Fringe capacitance parameter"),
IOP ("clc", BSIM3_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"),
IOP ("cle", BSIM3_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"),
IOP ("dwc", BSIM3_MOD_DWC, IF_REAL, "Delta W for C-V model"),
IOP ("dlc", BSIM3_MOD_DLC, IF_REAL, "Delta L for C-V model"),
IOP( "b0", BSIM3_MOD_B0, IF_REAL, "Abulk narrow width parameter"),
IOP( "b1", BSIM3_MOD_B1, IF_REAL, "Abulk narrow width parameter"),
IOP ("alpha0", BSIM3_MOD_ALPHA0, IF_REAL, "substrate current model parameter"),
IOP ("alpha1", BSIM3_MOD_ALPHA1, IF_REAL, "substrate current model parameter"),
IOP ("beta0", BSIM3_MOD_BETA0, IF_REAL, "substrate current model parameter"),
IOP ("ijth", BSIM3_MOD_IJTH, IF_REAL, "Diode limiting current"),
IOP( "cgsl", BSIM3_MOD_CGSL, IF_REAL, "New C-V model parameter"),
IOP( "cgdl", BSIM3_MOD_CGDL, IF_REAL, "New C-V model parameter"),
IOP( "ckappa", BSIM3_MOD_CKAPPA, IF_REAL, "New C-V model parameter"),
IOP( "cf", BSIM3_MOD_CF, IF_REAL, "Fringe capacitance parameter"),
IOP( "clc", BSIM3_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"),
IOP( "cle", BSIM3_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"),
IOP( "dwc", BSIM3_MOD_DWC, IF_REAL, "Delta W for C-V model"),
IOP( "dlc", BSIM3_MOD_DLC, IF_REAL, "Delta L for C-V model"),
IOP ("lcdsc", BSIM3_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"),
IOP ("lcdscb", BSIM3_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"),
IOP ("lcdscd", BSIM3_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"),
IOP ("lcit", BSIM3_MOD_LCIT, IF_REAL, "Length dependence of cit"),
IOP ("lnfactor", BSIM3_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"),
IOP ("lxj", BSIM3_MOD_LXJ, IF_REAL, "Length dependence of xj"),
IOP ("lvsat", BSIM3_MOD_LVSAT, IF_REAL, "Length dependence of vsat"),
IOP ("lat", BSIM3_MOD_LAT, IF_REAL, "Length dependence of at"),
IOP ("la0", BSIM3_MOD_LA0, IF_REAL, "Length dependence of a0"),
IOP ("lags", BSIM3_MOD_LAGS, IF_REAL, "Length dependence of ags"),
IOP ("la1", BSIM3_MOD_LA1, IF_REAL, "Length dependence of a1"),
IOP ("la2", BSIM3_MOD_LA2, IF_REAL, "Length dependence of a2"),
IOP ("lketa", BSIM3_MOD_LKETA, IF_REAL, "Length dependence of keta"),
IOP ("lnsub", BSIM3_MOD_LNSUB, IF_REAL, "Length dependence of nsub"),
IOP ("lnch", BSIM3_MOD_LNPEAK, IF_REAL, "Length dependence of nch"),
IOP ("lngate", BSIM3_MOD_LNGATE, IF_REAL, "Length dependence of ngate"),
IOP ("lgamma1", BSIM3_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"),
IOP ("lgamma2", BSIM3_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"),
IOP ("lvbx", BSIM3_MOD_LVBX, IF_REAL, "Length dependence of vbx"),
IOP ("lvbm", BSIM3_MOD_LVBM, IF_REAL, "Length dependence of vbm"),
IOP ("lxt", BSIM3_MOD_LXT, IF_REAL, "Length dependence of xt"),
IOP ("lk1", BSIM3_MOD_LK1, IF_REAL, "Length dependence of k1"),
IOP ("lkt1", BSIM3_MOD_LKT1, IF_REAL, "Length dependence of kt1"),
IOP ("lkt1l", BSIM3_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"),
IOP ("lkt2", BSIM3_MOD_LKT2, IF_REAL, "Length dependence of kt2"),
IOP ("lk2", BSIM3_MOD_LK2, IF_REAL, "Length dependence of k2"),
IOP ("lk3", BSIM3_MOD_LK3, IF_REAL, "Length dependence of k3"),
IOP ("lk3b", BSIM3_MOD_LK3B, IF_REAL, "Length dependence of k3b"),
IOP ("lw0", BSIM3_MOD_LW0, IF_REAL, "Length dependence of w0"),
IOP ("lnlx", BSIM3_MOD_LNLX, IF_REAL, "Length dependence of nlx"),
IOP ("ldvt0", BSIM3_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"),
IOP ("ldvt1", BSIM3_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"),
IOP ("ldvt2", BSIM3_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"),
IOP ("ldvt0w", BSIM3_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"),
IOP ("ldvt1w", BSIM3_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"),
IOP ("ldvt2w", BSIM3_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"),
IOP ("ldrout", BSIM3_MOD_LDROUT, IF_REAL, "Length dependence of drout"),
IOP ("ldsub", BSIM3_MOD_LDSUB, IF_REAL, "Length dependence of dsub"),
IOP ("lvth0", BSIM3_MOD_LVTH0, IF_REAL, "Length dependence of vto"),
IOP ("lvtho", BSIM3_MOD_LVTH0, IF_REAL, "Length dependence of vto"),
IOP ("lua", BSIM3_MOD_LUA, IF_REAL, "Length dependence of ua"),
IOP ("lua1", BSIM3_MOD_LUA1, IF_REAL, "Length dependence of ua1"),
IOP ("lub", BSIM3_MOD_LUB, IF_REAL, "Length dependence of ub"),
IOP ("lub1", BSIM3_MOD_LUB1, IF_REAL, "Length dependence of ub1"),
IOP ("luc", BSIM3_MOD_LUC, IF_REAL, "Length dependence of uc"),
IOP ("luc1", BSIM3_MOD_LUC1, IF_REAL, "Length dependence of uc1"),
IOP ("lu0", BSIM3_MOD_LU0, IF_REAL, "Length dependence of u0"),
IOP ("lute", BSIM3_MOD_LUTE, IF_REAL, "Length dependence of ute"),
IOP ("lvoff", BSIM3_MOD_LVOFF, IF_REAL, "Length dependence of voff"),
IOP ("lelm", BSIM3_MOD_LELM, IF_REAL, "Length dependence of elm"),
IOP ("ldelta", BSIM3_MOD_LDELTA, IF_REAL, "Length dependence of delta"),
IOP ("lrdsw", BSIM3_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "),
IOP( "hdif", BSIM3_MOD_HDIF, IF_REAL, "ACM Parameter: Distance Gate - contact"),
IOP( "ldif", BSIM3_MOD_LDIF, IF_REAL, "ACM Parameter: Length of LDD Gate-Source/Drain"),
IOP( "ld", BSIM3_MOD_LD, IF_REAL, "ACM Parameter: Length of LDD under Gate"),
IOP( "rd", BSIM3_MOD_RD, IF_REAL, "ACM Parameter: Resistance of LDD drain side"),
IOP( "rs", BSIM3_MOD_RS, IF_REAL, "ACM Parameter: Resistance of LDD source side"),
IOP( "rdc", BSIM3_MOD_RS, IF_REAL, "ACM Parameter: Resistance contact drain side"),
IOP( "rsc", BSIM3_MOD_RS, IF_REAL, "ACM Parameter: Resistance contact source side"),
IOP ("lprwg", BSIM3_MOD_LPRWG, IF_REAL, "Length dependence of prwg "),
IOP ("lprwb", BSIM3_MOD_LPRWB, IF_REAL, "Length dependence of prwb "),
IOP( "alpha0", BSIM3_MOD_ALPHA0, IF_REAL, "substrate current model parameter"),
IOP( "alpha1", BSIM3_MOD_ALPHA1, IF_REAL, "substrate current model parameter"),
IOP( "beta0", BSIM3_MOD_BETA0, IF_REAL, "substrate current model parameter"),
IOP( "ijth", BSIM3_MOD_IJTH, IF_REAL, "Diode limiting current"),
IOP ("lprt", BSIM3_MOD_LPRT, IF_REAL, "Length dependence of prt "),
IOP ("leta0", BSIM3_MOD_LETA0, IF_REAL, "Length dependence of eta0"),
IOP ("letab", BSIM3_MOD_LETAB, IF_REAL, "Length dependence of etab"),
IOP ("lpclm", BSIM3_MOD_LPCLM, IF_REAL, "Length dependence of pclm"),
IOP ("lpdiblc1", BSIM3_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"),
IOP ("lpdiblc2", BSIM3_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"),
IOP ("lpdiblcb", BSIM3_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"),
IOP ("lpscbe1", BSIM3_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"),
IOP ("lpscbe2", BSIM3_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"),
IOP ("lpvag", BSIM3_MOD_LPVAG, IF_REAL, "Length dependence of pvag"),
IOP ("lwr", BSIM3_MOD_LWR, IF_REAL, "Length dependence of wr"),
IOP ("ldwg", BSIM3_MOD_LDWG, IF_REAL, "Length dependence of dwg"),
IOP ("ldwb", BSIM3_MOD_LDWB, IF_REAL, "Length dependence of dwb"),
IOP ("lb0", BSIM3_MOD_LB0, IF_REAL, "Length dependence of b0"),
IOP ("lb1", BSIM3_MOD_LB1, IF_REAL, "Length dependence of b1"),
IOP ("lcgsl", BSIM3_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"),
IOP ("lcgdl", BSIM3_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"),
IOP ("lckappa", BSIM3_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"),
IOP ("lcf", BSIM3_MOD_LCF, IF_REAL, "Length dependence of cf"),
IOP ("lclc", BSIM3_MOD_LCLC, IF_REAL, "Length dependence of clc"),
IOP ("lcle", BSIM3_MOD_LCLE, IF_REAL, "Length dependence of cle"),
IOP ("lalpha0", BSIM3_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"),
IOP ("lalpha1", BSIM3_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"),
IOP ("lbeta0", BSIM3_MOD_LBETA0, IF_REAL, "Length dependence of beta0"),
IOP ("lvfbcv", BSIM3_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"),
IOP ("lvfb", BSIM3_MOD_LVFB, IF_REAL, "Length dependence of vfb"),
IOP ("lacde", BSIM3_MOD_LACDE, IF_REAL, "Length dependence of acde"),
IOP ("lmoin", BSIM3_MOD_LMOIN, IF_REAL, "Length dependence of moin"),
IOP ("lnoff", BSIM3_MOD_LNOFF, IF_REAL, "Length dependence of noff"),
IOP ("lvoffcv", BSIM3_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"),
IOP ("wcdsc", BSIM3_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"),
IOP ("wcdscb", BSIM3_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"),
IOP ("wcdscd", BSIM3_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"),
IOP ("wcit", BSIM3_MOD_WCIT, IF_REAL, "Width dependence of cit"),
IOP ("wnfactor", BSIM3_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"),
IOP ("wxj", BSIM3_MOD_WXJ, IF_REAL, "Width dependence of xj"),
IOP ("wvsat", BSIM3_MOD_WVSAT, IF_REAL, "Width dependence of vsat"),
IOP ("wat", BSIM3_MOD_WAT, IF_REAL, "Width dependence of at"),
IOP ("wa0", BSIM3_MOD_WA0, IF_REAL, "Width dependence of a0"),
IOP ("wags", BSIM3_MOD_WAGS, IF_REAL, "Width dependence of ags"),
IOP ("wa1", BSIM3_MOD_WA1, IF_REAL, "Width dependence of a1"),
IOP ("wa2", BSIM3_MOD_WA2, IF_REAL, "Width dependence of a2"),
IOP ("wketa", BSIM3_MOD_WKETA, IF_REAL, "Width dependence of keta"),
IOP ("wnsub", BSIM3_MOD_WNSUB, IF_REAL, "Width dependence of nsub"),
IOP ("wnch", BSIM3_MOD_WNPEAK, IF_REAL, "Width dependence of nch"),
IOP ("wngate", BSIM3_MOD_WNGATE, IF_REAL, "Width dependence of ngate"),
IOP ("wgamma1", BSIM3_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"),
IOP ("wgamma2", BSIM3_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"),
IOP ("wvbx", BSIM3_MOD_WVBX, IF_REAL, "Width dependence of vbx"),
IOP ("wvbm", BSIM3_MOD_WVBM, IF_REAL, "Width dependence of vbm"),
IOP ("wxt", BSIM3_MOD_WXT, IF_REAL, "Width dependence of xt"),
IOP ("wk1", BSIM3_MOD_WK1, IF_REAL, "Width dependence of k1"),
IOP ("wkt1", BSIM3_MOD_WKT1, IF_REAL, "Width dependence of kt1"),
IOP ("wkt1l", BSIM3_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"),
IOP ("wkt2", BSIM3_MOD_WKT2, IF_REAL, "Width dependence of kt2"),
IOP ("wk2", BSIM3_MOD_WK2, IF_REAL, "Width dependence of k2"),
IOP ("wk3", BSIM3_MOD_WK3, IF_REAL, "Width dependence of k3"),
IOP ("wk3b", BSIM3_MOD_WK3B, IF_REAL, "Width dependence of k3b"),
IOP ("ww0", BSIM3_MOD_WW0, IF_REAL, "Width dependence of w0"),
IOP ("wnlx", BSIM3_MOD_WNLX, IF_REAL, "Width dependence of nlx"),
IOP ("wdvt0", BSIM3_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"),
IOP ("wdvt1", BSIM3_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"),
IOP ("wdvt2", BSIM3_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"),
IOP ("wdvt0w", BSIM3_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"),
IOP ("wdvt1w", BSIM3_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"),
IOP ("wdvt2w", BSIM3_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"),
IOP ("wdrout", BSIM3_MOD_WDROUT, IF_REAL, "Width dependence of drout"),
IOP ("wdsub", BSIM3_MOD_WDSUB, IF_REAL, "Width dependence of dsub"),
IOP ("wvth0", BSIM3_MOD_WVTH0, IF_REAL, "Width dependence of vto"),
IOP ("wvtho", BSIM3_MOD_WVTH0, IF_REAL, "Width dependence of vto"),
IOP ("wua", BSIM3_MOD_WUA, IF_REAL, "Width dependence of ua"),
IOP ("wua1", BSIM3_MOD_WUA1, IF_REAL, "Width dependence of ua1"),
IOP ("wub", BSIM3_MOD_WUB, IF_REAL, "Width dependence of ub"),
IOP ("wub1", BSIM3_MOD_WUB1, IF_REAL, "Width dependence of ub1"),
IOP ("wuc", BSIM3_MOD_WUC, IF_REAL, "Width dependence of uc"),
IOP ("wuc1", BSIM3_MOD_WUC1, IF_REAL, "Width dependence of uc1"),
IOP ("wu0", BSIM3_MOD_WU0, IF_REAL, "Width dependence of u0"),
IOP ("wute", BSIM3_MOD_WUTE, IF_REAL, "Width dependence of ute"),
IOP ("wvoff", BSIM3_MOD_WVOFF, IF_REAL, "Width dependence of voff"),
IOP ("welm", BSIM3_MOD_WELM, IF_REAL, "Width dependence of elm"),
IOP ("wdelta", BSIM3_MOD_WDELTA, IF_REAL, "Width dependence of delta"),
IOP ("wrdsw", BSIM3_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "),
IOP( "lcdsc", BSIM3_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"),
IOP( "lcdscb", BSIM3_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"),
IOP( "lcdscd", BSIM3_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"),
IOP( "lcit", BSIM3_MOD_LCIT, IF_REAL, "Length dependence of cit"),
IOP( "lnfactor", BSIM3_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"),
IOP( "lxj", BSIM3_MOD_LXJ, IF_REAL, "Length dependence of xj"),
IOP( "lvsat", BSIM3_MOD_LVSAT, IF_REAL, "Length dependence of vsat"),
IOP( "lat", BSIM3_MOD_LAT, IF_REAL, "Length dependence of at"),
IOP( "la0", BSIM3_MOD_LA0, IF_REAL, "Length dependence of a0"),
IOP( "lags", BSIM3_MOD_LAGS, IF_REAL, "Length dependence of ags"),
IOP( "la1", BSIM3_MOD_LA1, IF_REAL, "Length dependence of a1"),
IOP( "la2", BSIM3_MOD_LA2, IF_REAL, "Length dependence of a2"),
IOP( "lketa", BSIM3_MOD_LKETA, IF_REAL, "Length dependence of keta"),
IOP( "lnsub", BSIM3_MOD_LNSUB, IF_REAL, "Length dependence of nsub"),
IOP( "lnch", BSIM3_MOD_LNPEAK, IF_REAL, "Length dependence of nch"),
IOP( "lngate", BSIM3_MOD_LNGATE, IF_REAL, "Length dependence of ngate"),
IOP( "lgamma1", BSIM3_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"),
IOP( "lgamma2", BSIM3_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"),
IOP( "lvbx", BSIM3_MOD_LVBX, IF_REAL, "Length dependence of vbx"),
IOP( "lvbm", BSIM3_MOD_LVBM, IF_REAL, "Length dependence of vbm"),
IOP( "lxt", BSIM3_MOD_LXT, IF_REAL, "Length dependence of xt"),
IOP( "lk1", BSIM3_MOD_LK1, IF_REAL, "Length dependence of k1"),
IOP( "lkt1", BSIM3_MOD_LKT1, IF_REAL, "Length dependence of kt1"),
IOP( "lkt1l", BSIM3_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"),
IOP( "lkt2", BSIM3_MOD_LKT2, IF_REAL, "Length dependence of kt2"),
IOP( "lk2", BSIM3_MOD_LK2, IF_REAL, "Length dependence of k2"),
IOP( "lk3", BSIM3_MOD_LK3, IF_REAL, "Length dependence of k3"),
IOP( "lk3b", BSIM3_MOD_LK3B, IF_REAL, "Length dependence of k3b"),
IOP( "lw0", BSIM3_MOD_LW0, IF_REAL, "Length dependence of w0"),
IOP( "lnlx", BSIM3_MOD_LNLX, IF_REAL, "Length dependence of nlx"),
IOP( "ldvt0", BSIM3_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"),
IOP( "ldvt1", BSIM3_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"),
IOP( "ldvt2", BSIM3_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"),
IOP( "ldvt0w", BSIM3_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"),
IOP( "ldvt1w", BSIM3_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"),
IOP( "ldvt2w", BSIM3_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"),
IOP( "ldrout", BSIM3_MOD_LDROUT, IF_REAL, "Length dependence of drout"),
IOP( "ldsub", BSIM3_MOD_LDSUB, IF_REAL, "Length dependence of dsub"),
IOP( "lvth0", BSIM3_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
IOP( "lvtho", BSIM3_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
IOP( "lua", BSIM3_MOD_LUA, IF_REAL, "Length dependence of ua"),
IOP( "lua1", BSIM3_MOD_LUA1, IF_REAL, "Length dependence of ua1"),
IOP( "lub", BSIM3_MOD_LUB, IF_REAL, "Length dependence of ub"),
IOP( "lub1", BSIM3_MOD_LUB1, IF_REAL, "Length dependence of ub1"),
IOP( "luc", BSIM3_MOD_LUC, IF_REAL, "Length dependence of uc"),
IOP( "luc1", BSIM3_MOD_LUC1, IF_REAL, "Length dependence of uc1"),
IOP( "lu0", BSIM3_MOD_LU0, IF_REAL, "Length dependence of u0"),
IOP( "lute", BSIM3_MOD_LUTE, IF_REAL, "Length dependence of ute"),
IOP( "lvoff", BSIM3_MOD_LVOFF, IF_REAL, "Length dependence of voff"),
IOP( "lelm", BSIM3_MOD_LELM, IF_REAL, "Length dependence of elm"),
IOP( "ldelta", BSIM3_MOD_LDELTA, IF_REAL, "Length dependence of delta"),
IOP( "lrdsw", BSIM3_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "),
IOP ("wprwg", BSIM3_MOD_WPRWG, IF_REAL, "Width dependence of prwg "),
IOP ("wprwb", BSIM3_MOD_WPRWB, IF_REAL, "Width dependence of prwb "),
IOP( "lprwg", BSIM3_MOD_LPRWG, IF_REAL, "Length dependence of prwg "),
IOP( "lprwb", BSIM3_MOD_LPRWB, IF_REAL, "Length dependence of prwb "),
IOP ("wprt", BSIM3_MOD_WPRT, IF_REAL, "Width dependence of prt"),
IOP ("weta0", BSIM3_MOD_WETA0, IF_REAL, "Width dependence of eta0"),
IOP ("wetab", BSIM3_MOD_WETAB, IF_REAL, "Width dependence of etab"),
IOP ("wpclm", BSIM3_MOD_WPCLM, IF_REAL, "Width dependence of pclm"),
IOP ("wpdiblc1", BSIM3_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"),
IOP ("wpdiblc2", BSIM3_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"),
IOP ("wpdiblcb", BSIM3_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"),
IOP ("wpscbe1", BSIM3_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"),
IOP ("wpscbe2", BSIM3_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"),
IOP ("wpvag", BSIM3_MOD_WPVAG, IF_REAL, "Width dependence of pvag"),
IOP ("wwr", BSIM3_MOD_WWR, IF_REAL, "Width dependence of wr"),
IOP ("wdwg", BSIM3_MOD_WDWG, IF_REAL, "Width dependence of dwg"),
IOP ("wdwb", BSIM3_MOD_WDWB, IF_REAL, "Width dependence of dwb"),
IOP ("wb0", BSIM3_MOD_WB0, IF_REAL, "Width dependence of b0"),
IOP ("wb1", BSIM3_MOD_WB1, IF_REAL, "Width dependence of b1"),
IOP ("wcgsl", BSIM3_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"),
IOP ("wcgdl", BSIM3_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"),
IOP ("wckappa", BSIM3_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"),
IOP ("wcf", BSIM3_MOD_WCF, IF_REAL, "Width dependence of cf"),
IOP ("wclc", BSIM3_MOD_WCLC, IF_REAL, "Width dependence of clc"),
IOP ("wcle", BSIM3_MOD_WCLE, IF_REAL, "Width dependence of cle"),
IOP ("walpha0", BSIM3_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"),
IOP ("walpha1", BSIM3_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"),
IOP ("wbeta0", BSIM3_MOD_WBETA0, IF_REAL, "Width dependence of beta0"),
IOP ("wvfbcv", BSIM3_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"),
IOP ("wvfb", BSIM3_MOD_WVFB, IF_REAL, "Width dependence of vfb"),
IOP ("wacde", BSIM3_MOD_WACDE, IF_REAL, "Width dependence of acde"),
IOP ("wmoin", BSIM3_MOD_WMOIN, IF_REAL, "Width dependence of moin"),
IOP ("wnoff", BSIM3_MOD_WNOFF, IF_REAL, "Width dependence of noff"),
IOP ("wvoffcv", BSIM3_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"),
IOP( "lprt", BSIM3_MOD_LPRT, IF_REAL, "Length dependence of prt "),
IOP( "leta0", BSIM3_MOD_LETA0, IF_REAL, "Length dependence of eta0"),
IOP( "letab", BSIM3_MOD_LETAB, IF_REAL, "Length dependence of etab"),
IOP( "lpclm", BSIM3_MOD_LPCLM, IF_REAL, "Length dependence of pclm"),
IOP( "lpdiblc1", BSIM3_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"),
IOP( "lpdiblc2", BSIM3_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"),
IOP( "lpdiblcb", BSIM3_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"),
IOP( "lpscbe1", BSIM3_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"),
IOP( "lpscbe2", BSIM3_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"),
IOP( "lpvag", BSIM3_MOD_LPVAG, IF_REAL, "Length dependence of pvag"),
IOP( "lwr", BSIM3_MOD_LWR, IF_REAL, "Length dependence of wr"),
IOP( "ldwg", BSIM3_MOD_LDWG, IF_REAL, "Length dependence of dwg"),
IOP( "ldwb", BSIM3_MOD_LDWB, IF_REAL, "Length dependence of dwb"),
IOP( "lb0", BSIM3_MOD_LB0, IF_REAL, "Length dependence of b0"),
IOP( "lb1", BSIM3_MOD_LB1, IF_REAL, "Length dependence of b1"),
IOP( "lcgsl", BSIM3_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"),
IOP( "lcgdl", BSIM3_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"),
IOP( "lckappa", BSIM3_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"),
IOP( "lcf", BSIM3_MOD_LCF, IF_REAL, "Length dependence of cf"),
IOP( "lclc", BSIM3_MOD_LCLC, IF_REAL, "Length dependence of clc"),
IOP( "lcle", BSIM3_MOD_LCLE, IF_REAL, "Length dependence of cle"),
IOP( "lalpha0", BSIM3_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"),
IOP( "lalpha1", BSIM3_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"),
IOP( "lbeta0", BSIM3_MOD_LBETA0, IF_REAL, "Length dependence of beta0"),
IOP( "lvfbcv", BSIM3_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"),
IOP( "lvfb", BSIM3_MOD_LVFB, IF_REAL, "Length dependence of vfb"),
IOP( "lacde", BSIM3_MOD_LACDE, IF_REAL, "Length dependence of acde"),
IOP( "lmoin", BSIM3_MOD_LMOIN, IF_REAL, "Length dependence of moin"),
IOP( "lnoff", BSIM3_MOD_LNOFF, IF_REAL, "Length dependence of noff"),
IOP( "lvoffcv", BSIM3_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"),
IOP( "wcdsc", BSIM3_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"),
IOP( "wcdscb", BSIM3_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"),
IOP( "wcdscd", BSIM3_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"),
IOP( "wcit", BSIM3_MOD_WCIT, IF_REAL, "Width dependence of cit"),
IOP( "wnfactor", BSIM3_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"),
IOP( "wxj", BSIM3_MOD_WXJ, IF_REAL, "Width dependence of xj"),
IOP( "wvsat", BSIM3_MOD_WVSAT, IF_REAL, "Width dependence of vsat"),
IOP( "wat", BSIM3_MOD_WAT, IF_REAL, "Width dependence of at"),
IOP( "wa0", BSIM3_MOD_WA0, IF_REAL, "Width dependence of a0"),
IOP( "wags", BSIM3_MOD_WAGS, IF_REAL, "Width dependence of ags"),
IOP( "wa1", BSIM3_MOD_WA1, IF_REAL, "Width dependence of a1"),
IOP( "wa2", BSIM3_MOD_WA2, IF_REAL, "Width dependence of a2"),
IOP( "wketa", BSIM3_MOD_WKETA, IF_REAL, "Width dependence of keta"),
IOP( "wnsub", BSIM3_MOD_WNSUB, IF_REAL, "Width dependence of nsub"),
IOP( "wnch", BSIM3_MOD_WNPEAK, IF_REAL, "Width dependence of nch"),
IOP( "wngate", BSIM3_MOD_WNGATE, IF_REAL, "Width dependence of ngate"),
IOP( "wgamma1", BSIM3_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"),
IOP( "wgamma2", BSIM3_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"),
IOP( "wvbx", BSIM3_MOD_WVBX, IF_REAL, "Width dependence of vbx"),
IOP( "wvbm", BSIM3_MOD_WVBM, IF_REAL, "Width dependence of vbm"),
IOP( "wxt", BSIM3_MOD_WXT, IF_REAL, "Width dependence of xt"),
IOP( "wk1", BSIM3_MOD_WK1, IF_REAL, "Width dependence of k1"),
IOP( "wkt1", BSIM3_MOD_WKT1, IF_REAL, "Width dependence of kt1"),
IOP( "wkt1l", BSIM3_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"),
IOP( "wkt2", BSIM3_MOD_WKT2, IF_REAL, "Width dependence of kt2"),
IOP( "wk2", BSIM3_MOD_WK2, IF_REAL, "Width dependence of k2"),
IOP( "wk3", BSIM3_MOD_WK3, IF_REAL, "Width dependence of k3"),
IOP( "wk3b", BSIM3_MOD_WK3B, IF_REAL, "Width dependence of k3b"),
IOP( "ww0", BSIM3_MOD_WW0, IF_REAL, "Width dependence of w0"),
IOP( "wnlx", BSIM3_MOD_WNLX, IF_REAL, "Width dependence of nlx"),
IOP( "wdvt0", BSIM3_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"),
IOP( "wdvt1", BSIM3_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"),
IOP( "wdvt2", BSIM3_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"),
IOP( "wdvt0w", BSIM3_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"),
IOP( "wdvt1w", BSIM3_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"),
IOP( "wdvt2w", BSIM3_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"),
IOP( "wdrout", BSIM3_MOD_WDROUT, IF_REAL, "Width dependence of drout"),
IOP( "wdsub", BSIM3_MOD_WDSUB, IF_REAL, "Width dependence of dsub"),
IOP( "wvth0", BSIM3_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
IOP( "wvtho", BSIM3_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
IOP( "wua", BSIM3_MOD_WUA, IF_REAL, "Width dependence of ua"),
IOP( "wua1", BSIM3_MOD_WUA1, IF_REAL, "Width dependence of ua1"),
IOP( "wub", BSIM3_MOD_WUB, IF_REAL, "Width dependence of ub"),
IOP( "wub1", BSIM3_MOD_WUB1, IF_REAL, "Width dependence of ub1"),
IOP( "wuc", BSIM3_MOD_WUC, IF_REAL, "Width dependence of uc"),
IOP( "wuc1", BSIM3_MOD_WUC1, IF_REAL, "Width dependence of uc1"),
IOP( "wu0", BSIM3_MOD_WU0, IF_REAL, "Width dependence of u0"),
IOP( "wute", BSIM3_MOD_WUTE, IF_REAL, "Width dependence of ute"),
IOP( "wvoff", BSIM3_MOD_WVOFF, IF_REAL, "Width dependence of voff"),
IOP( "welm", BSIM3_MOD_WELM, IF_REAL, "Width dependence of elm"),
IOP( "wdelta", BSIM3_MOD_WDELTA, IF_REAL, "Width dependence of delta"),
IOP( "wrdsw", BSIM3_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "),
IOP ("pcdsc", BSIM3_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"),
IOP ("pcdscb", BSIM3_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"),
IOP ("pcdscd", BSIM3_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"),
IOP ("pcit", BSIM3_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"),
IOP ("pnfactor", BSIM3_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"),
IOP ("pxj", BSIM3_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"),
IOP ("pvsat", BSIM3_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"),
IOP ("pat", BSIM3_MOD_PAT, IF_REAL, "Cross-term dependence of at"),
IOP ("pa0", BSIM3_MOD_PA0, IF_REAL, "Cross-term dependence of a0"),
IOP ("pags", BSIM3_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"),
IOP ("pa1", BSIM3_MOD_PA1, IF_REAL, "Cross-term dependence of a1"),
IOP ("pa2", BSIM3_MOD_PA2, IF_REAL, "Cross-term dependence of a2"),
IOP ("pketa", BSIM3_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"),
IOP ("pnsub", BSIM3_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"),
IOP ("pnch", BSIM3_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"),
IOP ("pngate", BSIM3_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"),
IOP ("pgamma1", BSIM3_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"),
IOP ("pgamma2", BSIM3_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"),
IOP ("pvbx", BSIM3_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"),
IOP ("pvbm", BSIM3_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"),
IOP ("pxt", BSIM3_MOD_PXT, IF_REAL, "Cross-term dependence of xt"),
IOP ("pk1", BSIM3_MOD_PK1, IF_REAL, "Cross-term dependence of k1"),
IOP ("pkt1", BSIM3_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"),
IOP ("pkt1l", BSIM3_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"),
IOP ("pkt2", BSIM3_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"),
IOP ("pk2", BSIM3_MOD_PK2, IF_REAL, "Cross-term dependence of k2"),
IOP ("pk3", BSIM3_MOD_PK3, IF_REAL, "Cross-term dependence of k3"),
IOP ("pk3b", BSIM3_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"),
IOP ("pw0", BSIM3_MOD_PW0, IF_REAL, "Cross-term dependence of w0"),
IOP ("pnlx", BSIM3_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"),
IOP ("pdvt0", BSIM3_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"),
IOP ("pdvt1", BSIM3_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"),
IOP ("pdvt2", BSIM3_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"),
IOP ("pdvt0w", BSIM3_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"),
IOP ("pdvt1w", BSIM3_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"),
IOP ("pdvt2w", BSIM3_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"),
IOP ("pdrout", BSIM3_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"),
IOP ("pdsub", BSIM3_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"),
IOP ("pvth0", BSIM3_MOD_PVTH0, IF_REAL, "Cross-term dependence of vto"),
IOP ("pvtho", BSIM3_MOD_PVTH0, IF_REAL, "Cross-term dependence of vto"),
IOP ("pua", BSIM3_MOD_PUA, IF_REAL, "Cross-term dependence of ua"),
IOP ("pua1", BSIM3_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"),
IOP ("pub", BSIM3_MOD_PUB, IF_REAL, "Cross-term dependence of ub"),
IOP ("pub1", BSIM3_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"),
IOP ("puc", BSIM3_MOD_PUC, IF_REAL, "Cross-term dependence of uc"),
IOP ("puc1", BSIM3_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"),
IOP ("pu0", BSIM3_MOD_PU0, IF_REAL, "Cross-term dependence of u0"),
IOP ("pute", BSIM3_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"),
IOP ("pvoff", BSIM3_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"),
IOP ("pelm", BSIM3_MOD_PELM, IF_REAL, "Cross-term dependence of elm"),
IOP ("pdelta", BSIM3_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"),
IOP ("prdsw", BSIM3_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "),
IOP( "wprwg", BSIM3_MOD_WPRWG, IF_REAL, "Width dependence of prwg "),
IOP( "wprwb", BSIM3_MOD_WPRWB, IF_REAL, "Width dependence of prwb "),
IOP ("pprwg", BSIM3_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "),
IOP ("pprwb", BSIM3_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "),
IOP( "wprt", BSIM3_MOD_WPRT, IF_REAL, "Width dependence of prt"),
IOP( "weta0", BSIM3_MOD_WETA0, IF_REAL, "Width dependence of eta0"),
IOP( "wetab", BSIM3_MOD_WETAB, IF_REAL, "Width dependence of etab"),
IOP( "wpclm", BSIM3_MOD_WPCLM, IF_REAL, "Width dependence of pclm"),
IOP( "wpdiblc1", BSIM3_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"),
IOP( "wpdiblc2", BSIM3_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"),
IOP( "wpdiblcb", BSIM3_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"),
IOP( "wpscbe1", BSIM3_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"),
IOP( "wpscbe2", BSIM3_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"),
IOP( "wpvag", BSIM3_MOD_WPVAG, IF_REAL, "Width dependence of pvag"),
IOP( "wwr", BSIM3_MOD_WWR, IF_REAL, "Width dependence of wr"),
IOP( "wdwg", BSIM3_MOD_WDWG, IF_REAL, "Width dependence of dwg"),
IOP( "wdwb", BSIM3_MOD_WDWB, IF_REAL, "Width dependence of dwb"),
IOP( "wb0", BSIM3_MOD_WB0, IF_REAL, "Width dependence of b0"),
IOP( "wb1", BSIM3_MOD_WB1, IF_REAL, "Width dependence of b1"),
IOP( "wcgsl", BSIM3_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"),
IOP( "wcgdl", BSIM3_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"),
IOP( "wckappa", BSIM3_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"),
IOP( "wcf", BSIM3_MOD_WCF, IF_REAL, "Width dependence of cf"),
IOP( "wclc", BSIM3_MOD_WCLC, IF_REAL, "Width dependence of clc"),
IOP( "wcle", BSIM3_MOD_WCLE, IF_REAL, "Width dependence of cle"),
IOP( "walpha0", BSIM3_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"),
IOP( "walpha1", BSIM3_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"),
IOP( "wbeta0", BSIM3_MOD_WBETA0, IF_REAL, "Width dependence of beta0"),
IOP( "wvfbcv", BSIM3_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"),
IOP( "wvfb", BSIM3_MOD_WVFB, IF_REAL, "Width dependence of vfb"),
IOP( "wacde", BSIM3_MOD_WACDE, IF_REAL, "Width dependence of acde"),
IOP( "wmoin", BSIM3_MOD_WMOIN, IF_REAL, "Width dependence of moin"),
IOP( "wnoff", BSIM3_MOD_WNOFF, IF_REAL, "Width dependence of noff"),
IOP( "wvoffcv", BSIM3_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"),
IOP ("pprt", BSIM3_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "),
IOP ("peta0", BSIM3_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"),
IOP ("petab", BSIM3_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"),
IOP ("ppclm", BSIM3_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"),
IOP ("ppdiblc1", BSIM3_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"),
IOP ("ppdiblc2", BSIM3_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"),
IOP ("ppdiblcb", BSIM3_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"),
IOP ("ppscbe1", BSIM3_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"),
IOP ("ppscbe2", BSIM3_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"),
IOP ("ppvag", BSIM3_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"),
IOP ("pwr", BSIM3_MOD_PWR, IF_REAL, "Cross-term dependence of wr"),
IOP ("pdwg", BSIM3_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"),
IOP ("pdwb", BSIM3_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"),
IOP ("pb0", BSIM3_MOD_PB0, IF_REAL, "Cross-term dependence of b0"),
IOP ("pb1", BSIM3_MOD_PB1, IF_REAL, "Cross-term dependence of b1"),
IOP ("pcgsl", BSIM3_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"),
IOP ("pcgdl", BSIM3_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"),
IOP ("pckappa", BSIM3_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"),
IOP ("pcf", BSIM3_MOD_PCF, IF_REAL, "Cross-term dependence of cf"),
IOP ("pclc", BSIM3_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"),
IOP ("pcle", BSIM3_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"),
IOP ("palpha0", BSIM3_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"),
IOP ("palpha1", BSIM3_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"),
IOP ("pbeta0", BSIM3_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"),
IOP ("pvfbcv", BSIM3_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"),
IOP ("pvfb", BSIM3_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"),
IOP ("pacde", BSIM3_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"),
IOP ("pmoin", BSIM3_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"),
IOP ("pnoff", BSIM3_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"),
IOP ("pvoffcv", BSIM3_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"),
IOP( "pcdsc", BSIM3_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"),
IOP( "pcdscb", BSIM3_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"),
IOP( "pcdscd", BSIM3_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"),
IOP( "pcit", BSIM3_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"),
IOP( "pnfactor", BSIM3_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"),
IOP( "pxj", BSIM3_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"),
IOP( "pvsat", BSIM3_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"),
IOP( "pat", BSIM3_MOD_PAT, IF_REAL, "Cross-term dependence of at"),
IOP( "pa0", BSIM3_MOD_PA0, IF_REAL, "Cross-term dependence of a0"),
IOP( "pags", BSIM3_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"),
IOP( "pa1", BSIM3_MOD_PA1, IF_REAL, "Cross-term dependence of a1"),
IOP( "pa2", BSIM3_MOD_PA2, IF_REAL, "Cross-term dependence of a2"),
IOP( "pketa", BSIM3_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"),
IOP( "pnsub", BSIM3_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"),
IOP( "pnch", BSIM3_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"),
IOP( "pngate", BSIM3_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"),
IOP( "pgamma1", BSIM3_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"),
IOP( "pgamma2", BSIM3_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"),
IOP( "pvbx", BSIM3_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"),
IOP( "pvbm", BSIM3_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"),
IOP( "pxt", BSIM3_MOD_PXT, IF_REAL, "Cross-term dependence of xt"),
IOP( "pk1", BSIM3_MOD_PK1, IF_REAL, "Cross-term dependence of k1"),
IOP( "pkt1", BSIM3_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"),
IOP( "pkt1l", BSIM3_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"),
IOP( "pkt2", BSIM3_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"),
IOP( "pk2", BSIM3_MOD_PK2, IF_REAL, "Cross-term dependence of k2"),
IOP( "pk3", BSIM3_MOD_PK3, IF_REAL, "Cross-term dependence of k3"),
IOP( "pk3b", BSIM3_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"),
IOP( "pw0", BSIM3_MOD_PW0, IF_REAL, "Cross-term dependence of w0"),
IOP( "pnlx", BSIM3_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"),
IOP( "pdvt0", BSIM3_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"),
IOP( "pdvt1", BSIM3_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"),
IOP( "pdvt2", BSIM3_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"),
IOP( "pdvt0w", BSIM3_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"),
IOP( "pdvt1w", BSIM3_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"),
IOP( "pdvt2w", BSIM3_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"),
IOP( "pdrout", BSIM3_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"),
IOP( "pdsub", BSIM3_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"),
IOP( "pvth0", BSIM3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
IOP( "pvtho", BSIM3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
IOP( "pua", BSIM3_MOD_PUA, IF_REAL, "Cross-term dependence of ua"),
IOP( "pua1", BSIM3_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"),
IOP( "pub", BSIM3_MOD_PUB, IF_REAL, "Cross-term dependence of ub"),
IOP( "pub1", BSIM3_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"),
IOP( "puc", BSIM3_MOD_PUC, IF_REAL, "Cross-term dependence of uc"),
IOP( "puc1", BSIM3_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"),
IOP( "pu0", BSIM3_MOD_PU0, IF_REAL, "Cross-term dependence of u0"),
IOP( "pute", BSIM3_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"),
IOP( "pvoff", BSIM3_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"),
IOP( "pelm", BSIM3_MOD_PELM, IF_REAL, "Cross-term dependence of elm"),
IOP( "pdelta", BSIM3_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"),
IOP( "prdsw", BSIM3_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "),
IOP ("noia", BSIM3_MOD_NOIA, IF_REAL, "Flicker noise parameter"),
IOP ("noib", BSIM3_MOD_NOIB, IF_REAL, "Flicker noise parameter"),
IOP ("noic", BSIM3_MOD_NOIC, IF_REAL, "Flicker noise parameter"),
IOP ("em", BSIM3_MOD_EM, IF_REAL, "Flicker noise parameter"),
IOP ("ef", BSIM3_MOD_EF, IF_REAL, "Flicker noise frequency exponent"),
IOP ("af", BSIM3_MOD_AF, IF_REAL, "Flicker noise exponent"),
IOP ("kf", BSIM3_MOD_KF, IF_REAL, "Flicker noise coefficient"),
IOP( "pprwg", BSIM3_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "),
IOP( "pprwb", BSIM3_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "),
IP ("nmos", BSIM3_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"),
IP ("pmos", BSIM3_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"),
IOP( "pprt", BSIM3_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "),
IOP( "peta0", BSIM3_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"),
IOP( "petab", BSIM3_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"),
IOP( "ppclm", BSIM3_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"),
IOP( "ppdiblc1", BSIM3_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"),
IOP( "ppdiblc2", BSIM3_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"),
IOP( "ppdiblcb", BSIM3_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"),
IOP( "ppscbe1", BSIM3_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"),
IOP( "ppscbe2", BSIM3_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"),
IOP( "ppvag", BSIM3_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"),
IOP( "pwr", BSIM3_MOD_PWR, IF_REAL, "Cross-term dependence of wr"),
IOP( "pdwg", BSIM3_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"),
IOP( "pdwb", BSIM3_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"),
IOP( "pb0", BSIM3_MOD_PB0, IF_REAL, "Cross-term dependence of b0"),
IOP( "pb1", BSIM3_MOD_PB1, IF_REAL, "Cross-term dependence of b1"),
IOP( "pcgsl", BSIM3_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"),
IOP( "pcgdl", BSIM3_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"),
IOP( "pckappa", BSIM3_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"),
IOP( "pcf", BSIM3_MOD_PCF, IF_REAL, "Cross-term dependence of cf"),
IOP( "pclc", BSIM3_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"),
IOP( "pcle", BSIM3_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"),
IOP( "palpha0", BSIM3_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"),
IOP( "palpha1", BSIM3_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"),
IOP( "pbeta0", BSIM3_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"),
IOP( "pvfbcv", BSIM3_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"),
IOP( "pvfb", BSIM3_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"),
IOP( "pacde", BSIM3_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"),
IOP( "pmoin", BSIM3_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"),
IOP( "pnoff", BSIM3_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"),
IOP( "pvoffcv", BSIM3_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"),
IOP( "noia", BSIM3_MOD_NOIA, IF_REAL, "Flicker noise parameter"),
IOP( "noib", BSIM3_MOD_NOIB, IF_REAL, "Flicker noise parameter"),
IOP( "noic", BSIM3_MOD_NOIC, IF_REAL, "Flicker noise parameter"),
IOP( "em", BSIM3_MOD_EM, IF_REAL, "Flicker noise parameter"),
IOP( "ef", BSIM3_MOD_EF, IF_REAL, "Flicker noise frequency exponent"),
IOP( "af", BSIM3_MOD_AF, IF_REAL, "Flicker noise exponent"),
IOP( "kf", BSIM3_MOD_KF, IF_REAL, "Flicker noise coefficient"),
IP( "nmos", BSIM3_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"),
IP( "pmos", BSIM3_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"),
};
char *BSIM3names[] = {
"Drain",
"Gate",
"Source",
"Bulk",
"Charge"
"Drain",
"Gate",
"Source",
"Bulk",
"Charge"
};
int BSIM3nSize = NUMELEMS (BSIM3names);
int BSIM3pTSize = NUMELEMS (BSIM3pTable);
int BSIM3mPTSize = NUMELEMS (BSIM3mPTable);
int BSIM3iSize = sizeof (BSIM3instance);
int BSIM3mSize = sizeof (BSIM3model);
int BSIM3nSize = NUMELEMS(BSIM3names);
int BSIM3pTSize = NUMELEMS(BSIM3pTable);
int BSIM3mPTSize = NUMELEMS(BSIM3mPTable);
int BSIM3iSize = sizeof(BSIM3instance);
int BSIM3mSize = sizeof(BSIM3model);

777
src/spicelib/devices/bsim3/b3acld.c

@ -1,22 +1,14 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3acld.c of BSIM3v3.2.4
* Author: 1995 Min-Chie Jeng and Mansun Chan
* Author: 1997-1999 Weidong Liu.
* Author: 2001 Xuemei Xi
* Modified by Paolo Nenzi 2002
* Modified by Paolo Nenzi 2002 and Dietmar Warning 2003
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "cktdefs.h"
#include "bsim3def.h"
@ -25,426 +17,347 @@
int
BSIM3acLoad (GENmodel * inModel, CKTcircuit * ckt)
BSIM3acLoad (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM3model *model = (BSIM3model *) inModel;
BSIM3instance *here;
double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb;
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb;
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega;
double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm,
Gmbs;
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb,
xcqbb;
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Cdb, Csg, Csd, Css, Csb;
double ScalingFactor = 1.0e-9;
double m;
omega = ckt->CKTomega;
for (; model != NULL; model = model->BSIM3nextModel)
{
for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
if (here->BSIM3mode >= 0)
{
Gm = here->BSIM3gm;
Gmbs = here->BSIM3gmbs;
FwdSum = Gm + Gmbs;
RevSum = 0.0;
gbbdp = -here->BSIM3gbds;
gbbsp = here->BSIM3gbds + here->BSIM3gbgs +
here->BSIM3gbbs;
gbdpg = here->BSIM3gbgs;
gbdpb = here->BSIM3gbbs;
gbdpdp = here->BSIM3gbds;
gbdpsp = -(gbdpg + gbdpb + gbdpdp);
gbspdp = 0.0;
gbspg = 0.0;
gbspb = 0.0;
gbspsp = 0.0;
if (here->BSIM3nqsMod == 0)
{
cggb = here->BSIM3cggb;
cgsb = here->BSIM3cgsb;
cgdb = here->BSIM3cgdb;
cbgb = here->BSIM3cbgb;
cbsb = here->BSIM3cbsb;
cbdb = here->BSIM3cbdb;
cdgb = here->BSIM3cdgb;
cdsb = here->BSIM3cdsb;
cddb = here->BSIM3cddb;
xgtg = xgtd = xgts = xgtb = 0.0;
sxpart = 0.6;
dxpart = 0.4;
ddxpart_dVd = ddxpart_dVg =
ddxpart_dVb = ddxpart_dVs =
0.0;
dsxpart_dVd = dsxpart_dVg =
dsxpart_dVb = dsxpart_dVs =
0.0;
}
else
{
cggb = cgdb = cgsb = 0.0;
cbgb = cbdb = cbsb = 0.0;
cdgb = cddb = cdsb = 0.0;
xgtg = here->BSIM3gtg;
xgtd = here->BSIM3gtd;
xgts = here->BSIM3gts;
xgtb = here->BSIM3gtb;
xcqgb = here->BSIM3cqgb * omega;
xcqdb = here->BSIM3cqdb * omega;
xcqsb = here->BSIM3cqsb * omega;
xcqbb = here->BSIM3cqbb * omega;
CoxWL = model->BSIM3cox *
here->pParam->BSIM3weffCV *
here->pParam->BSIM3leffCV;
qcheq = -(here->BSIM3qgate +
here->BSIM3qbulk);
if (fabs (qcheq) <= 1.0e-5 * CoxWL)
{
if (model->BSIM3xpart < 0.5)
{
dxpart = 0.4;
}
else if (model->BSIM3xpart >
0.5)
{
dxpart = 0.0;
}
else
{
dxpart = 0.5;
}
ddxpart_dVd = ddxpart_dVg =
ddxpart_dVb =
ddxpart_dVs = 0.0;
}
else
{
dxpart = here->BSIM3qdrn /
qcheq;
Cdd = here->BSIM3cddb;
Csd = -(here->BSIM3cgdb +
here->BSIM3cddb +
here->BSIM3cbdb);
ddxpart_dVd =
(Cdd -
dxpart * (Cdd +
Csd)) /
qcheq;
Cdg = here->BSIM3cdgb;
Csg = -(here->BSIM3cggb +
here->BSIM3cdgb +
here->BSIM3cbgb);
ddxpart_dVg =
(Cdg -
dxpart * (Cdg +
Csg)) /
qcheq;
Cds = here->BSIM3cdsb;
Css = -(here->BSIM3cgsb +
here->BSIM3cdsb +
here->BSIM3cbsb);
ddxpart_dVs =
(Cds -
dxpart * (Cds +
Css)) /
qcheq;
ddxpart_dVb =
-(ddxpart_dVd +
ddxpart_dVg +
ddxpart_dVs);
}
sxpart = 1.0 - dxpart;
dsxpart_dVd = -ddxpart_dVd;
dsxpart_dVg = -ddxpart_dVg;
dsxpart_dVs = -ddxpart_dVs;
dsxpart_dVb =
-(dsxpart_dVd + dsxpart_dVg +
dsxpart_dVs);
}
}
else
{
Gm = -here->BSIM3gm;
Gmbs = -here->BSIM3gmbs;
FwdSum = 0.0;
RevSum = -(Gm + Gmbs);
gbbsp = -here->BSIM3gbds;
gbbdp = here->BSIM3gbds + here->BSIM3gbgs +
here->BSIM3gbbs;
gbdpg = 0.0;
gbdpsp = 0.0;
gbdpb = 0.0;
gbdpdp = 0.0;
gbspg = here->BSIM3gbgs;
gbspsp = here->BSIM3gbds;
gbspb = here->BSIM3gbbs;
gbspdp = -(gbspg + gbspsp + gbspb);
if (here->BSIM3nqsMod == 0)
{
cggb = here->BSIM3cggb;
cgsb = here->BSIM3cgdb;
cgdb = here->BSIM3cgsb;
cbgb = here->BSIM3cbgb;
cbsb = here->BSIM3cbdb;
cbdb = here->BSIM3cbsb;
cdgb = -(here->BSIM3cdgb + cggb +
cbgb);
cdsb = -(here->BSIM3cddb + cgsb +
cbsb);
cddb = -(here->BSIM3cdsb + cgdb +
cbdb);
xgtg = xgtd = xgts = xgtb = 0.0;
sxpart = 0.4;
dxpart = 0.6;
ddxpart_dVd = ddxpart_dVg =
ddxpart_dVb = ddxpart_dVs =
0.0;
dsxpart_dVd = dsxpart_dVg =
dsxpart_dVb = dsxpart_dVs =
0.0;
}
else
{
cggb = cgdb = cgsb = 0.0;
cbgb = cbdb = cbsb = 0.0;
cdgb = cddb = cdsb = 0.0;
xgtg = here->BSIM3gtg;
xgtd = here->BSIM3gts;
xgts = here->BSIM3gtd;
xgtb = here->BSIM3gtb;
xcqgb = here->BSIM3cqgb * omega;
xcqdb = here->BSIM3cqsb * omega;
xcqsb = here->BSIM3cqdb * omega;
xcqbb = here->BSIM3cqbb * omega;
CoxWL = model->BSIM3cox *
here->pParam->BSIM3weffCV *
here->pParam->BSIM3leffCV;
qcheq = -(here->BSIM3qgate +
here->BSIM3qbulk);
if (fabs (qcheq) <= 1.0e-5 * CoxWL)
{
if (model->BSIM3xpart < 0.5)
{
sxpart = 0.4;
}
else if (model->BSIM3xpart >
0.5)
{
sxpart = 0.0;
}
else
{
sxpart = 0.5;
}
dsxpart_dVd = dsxpart_dVg =
dsxpart_dVb =
dsxpart_dVs = 0.0;
}
else
{
sxpart = here->BSIM3qdrn /
qcheq;
Css = here->BSIM3cddb;
Cds = -(here->BSIM3cgdb +
here->BSIM3cddb +
here->BSIM3cbdb);
dsxpart_dVs =
(Css -
sxpart * (Css +
Cds)) /
qcheq;
Csg = here->BSIM3cdgb;
Cdg = -(here->BSIM3cggb +
here->BSIM3cdgb +
here->BSIM3cbgb);
dsxpart_dVg =
(Csg -
sxpart * (Csg +
Cdg)) /
qcheq;
Csd = here->BSIM3cdsb;
Cdd = -(here->BSIM3cgsb +
here->BSIM3cdsb +
here->BSIM3cbsb);
dsxpart_dVd =
(Csd -
sxpart * (Csd +
Cdd)) /
qcheq;
dsxpart_dVb =
-(dsxpart_dVd +
dsxpart_dVg +
dsxpart_dVs);
}
dxpart = 1.0 - sxpart;
ddxpart_dVd = -dsxpart_dVd;
ddxpart_dVg = -dsxpart_dVg;
ddxpart_dVs = -dsxpart_dVs;
ddxpart_dVb =
-(ddxpart_dVd + ddxpart_dVg +
ddxpart_dVs);
}
}
T1 = *(ckt->CKTstate0 +
here->BSIM3qdef) * here->BSIM3gtau;
gdpr = here->BSIM3drainConductance;
gspr = here->BSIM3sourceConductance;
gds = here->BSIM3gds;
gbd = here->BSIM3gbd;
gbs = here->BSIM3gbs;
capbd = here->BSIM3capbd;
capbs = here->BSIM3capbs;
GSoverlapCap = here->BSIM3cgso;
GDoverlapCap = here->BSIM3cgdo;
GBoverlapCap = here->pParam->BSIM3cgbo;
xcdgb = (cdgb - GDoverlapCap) * omega;
xcddb = (cddb + capbd + GDoverlapCap) * omega;
xcdsb = cdsb * omega;
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega;
xcsdb = -(cgdb + cbdb + cddb) * omega;
xcssb = (capbs + GSoverlapCap -
(cgsb + cbsb + cdsb)) * omega;
xcggb = (cggb + GDoverlapCap + GSoverlapCap +
GBoverlapCap) * omega;
xcgdb = (cgdb - GDoverlapCap) * omega;
xcgsb = (cgsb - GSoverlapCap) * omega;
xcbgb = (cbgb - GBoverlapCap) * omega;
xcbdb = (cbdb - capbd) * omega;
xcbsb = (cbsb - capbs) * omega;
m = here->BSIM3m;
*(here->BSIM3GgPtr + 1) += m * xcggb;
*(here->BSIM3BbPtr + 1) -=
m * (xcbgb + xcbdb + xcbsb);
*(here->BSIM3DPdpPtr + 1) += m * xcddb;
*(here->BSIM3SPspPtr + 1) += m * xcssb;
*(here->BSIM3GbPtr + 1) -=
m * (xcggb + xcgdb + xcgsb);
*(here->BSIM3GdpPtr + 1) += m * xcgdb;
*(here->BSIM3GspPtr + 1) += m * xcgsb;
*(here->BSIM3BgPtr + 1) += m * xcbgb;
*(here->BSIM3BdpPtr + 1) += m * xcbdb;
*(here->BSIM3BspPtr + 1) += m * xcbsb;
*(here->BSIM3DPgPtr + 1) += m * xcdgb;
*(here->BSIM3DPbPtr + 1) -=
m * (xcdgb + xcddb + xcdsb);
*(here->BSIM3DPspPtr + 1) += m * xcdsb;
*(here->BSIM3SPgPtr + 1) += m * xcsgb;
*(here->BSIM3SPbPtr + 1) -=
m * (xcsgb + xcsdb + xcssb);
*(here->BSIM3SPdpPtr + 1) += m * xcsdb;
*(here->BSIM3DdPtr) += m * gdpr;
*(here->BSIM3SsPtr) += m * gspr;
*(here->BSIM3BbPtr) +=
m * (gbd + gbs - here->BSIM3gbbs);
*(here->BSIM3DPdpPtr) +=
m * (gdpr + gds + gbd + RevSum +
dxpart * xgtd + T1 * ddxpart_dVd +
gbdpdp);
*(here->BSIM3SPspPtr) +=
m * (gspr + gds + gbs + FwdSum +
sxpart * xgts + T1 * dsxpart_dVs +
gbspsp);
*(here->BSIM3DdpPtr) -= m * gdpr;
*(here->BSIM3SspPtr) -= m * gspr;
*(here->BSIM3BgPtr) -= m * here->BSIM3gbgs;
*(here->BSIM3BdpPtr) -= m * (gbd - gbbdp);
*(here->BSIM3BspPtr) -= m * (gbs - gbbsp);
*(here->BSIM3DPdPtr) -= m * gdpr;
*(here->BSIM3DPgPtr) +=
m * (Gm + dxpart * xgtg + T1 * ddxpart_dVg +
gbdpg);
*(here->BSIM3DPbPtr) -=
m * (gbd - Gmbs - dxpart * xgtb -
T1 * ddxpart_dVb - gbdpb);
*(here->BSIM3DPspPtr) -=
m * (gds + FwdSum - dxpart * xgts -
T1 * ddxpart_dVs - gbdpsp);
*(here->BSIM3SPgPtr) -=
m * (Gm - sxpart * xgtg - T1 * dsxpart_dVg -
gbspg);
*(here->BSIM3SPsPtr) -= m * gspr;
*(here->BSIM3SPbPtr) -=
m * (gbs + Gmbs - sxpart * xgtb -
T1 * dsxpart_dVb - gbspb);
*(here->BSIM3SPdpPtr) -=
m * (gds + RevSum - sxpart * xgtd -
T1 * dsxpart_dVd - gbspdp);
*(here->BSIM3GgPtr) -= m * xgtg;
*(here->BSIM3GbPtr) -= m * xgtb;
*(here->BSIM3GdpPtr) -= m * xgtd;
*(here->BSIM3GspPtr) -= m * xgts;
if (here->BSIM3nqsMod)
{
*(here->BSIM3QqPtr + 1) +=
m * omega * ScalingFactor;
*(here->BSIM3QgPtr + 1) -= m * xcqgb;
*(here->BSIM3QdpPtr + 1) -= m * xcqdb;
*(here->BSIM3QspPtr + 1) -= m * xcqsb;
*(here->BSIM3QbPtr + 1) -= m * xcqbb;
*(here->BSIM3QqPtr) += m * here->BSIM3gtau;
*(here->BSIM3DPqPtr) +=
m * (dxpart * here->BSIM3gtau);
*(here->BSIM3SPqPtr) +=
m * (sxpart * here->BSIM3gtau);
*(here->BSIM3GqPtr) -= m * here->BSIM3gtau;
*(here->BSIM3QgPtr) += m * xgtg;
*(here->BSIM3QdpPtr) += m * xgtd;
*(here->BSIM3QspPtr) += m * xgts;
*(here->BSIM3QbPtr) += m * xgtb;
}
}
}
return (OK);
BSIM3model *model = (BSIM3model*)inModel;
BSIM3instance *here;
double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb;
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb;
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega;
double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm, Gmbs;
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb, xcqbb;
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css;
double ScalingFactor = 1.0e-9;
double m;
omega = ckt->CKTomega;
for (; model != NULL; model = model->BSIM3nextModel)
{ for (here = model->BSIM3instances; here!= NULL;
here = here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
if (here->BSIM3mode >= 0)
{ Gm = here->BSIM3gm;
Gmbs = here->BSIM3gmbs;
FwdSum = Gm + Gmbs;
RevSum = 0.0;
gbbdp = -here->BSIM3gbds;
gbbsp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs;
gbdpg = here->BSIM3gbgs;
gbdpb = here->BSIM3gbbs;
gbdpdp = here->BSIM3gbds;
gbdpsp = -(gbdpg + gbdpb + gbdpdp);
gbspdp = 0.0;
gbspg = 0.0;
gbspb = 0.0;
gbspsp = 0.0;
if (here->BSIM3nqsMod == 0)
{ cggb = here->BSIM3cggb;
cgsb = here->BSIM3cgsb;
cgdb = here->BSIM3cgdb;
cbgb = here->BSIM3cbgb;
cbsb = here->BSIM3cbsb;
cbdb = here->BSIM3cbdb;
cdgb = here->BSIM3cdgb;
cdsb = here->BSIM3cdsb;
cddb = here->BSIM3cddb;
xgtg = xgtd = xgts = xgtb = 0.0;
sxpart = 0.6;
dxpart = 0.4;
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
= ddxpart_dVs = 0.0;
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
= dsxpart_dVs = 0.0;
}
else
{ cggb = cgdb = cgsb = 0.0;
cbgb = cbdb = cbsb = 0.0;
cdgb = cddb = cdsb = 0.0;
xgtg = here->BSIM3gtg;
xgtd = here->BSIM3gtd;
xgts = here->BSIM3gts;
xgtb = here->BSIM3gtb;
xcqgb = here->BSIM3cqgb * omega;
xcqdb = here->BSIM3cqdb * omega;
xcqsb = here->BSIM3cqsb * omega;
xcqbb = here->BSIM3cqbb * omega;
CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV
* here->pParam->BSIM3leffCV;
qcheq = -(here->BSIM3qgate + here->BSIM3qbulk);
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
{ if (model->BSIM3xpart < 0.5)
{ dxpart = 0.4;
}
else if (model->BSIM3xpart > 0.5)
{ dxpart = 0.0;
}
else
{ dxpart = 0.5;
}
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
= ddxpart_dVs = 0.0;
}
else
{ dxpart = here->BSIM3qdrn / qcheq;
Cdd = here->BSIM3cddb;
Csd = -(here->BSIM3cgdb + here->BSIM3cddb
+ here->BSIM3cbdb);
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq;
Cdg = here->BSIM3cdgb;
Csg = -(here->BSIM3cggb + here->BSIM3cdgb
+ here->BSIM3cbgb);
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq;
Cds = here->BSIM3cdsb;
Css = -(here->BSIM3cgsb + here->BSIM3cdsb
+ here->BSIM3cbsb);
ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq;
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg
+ ddxpart_dVs);
}
sxpart = 1.0 - dxpart;
dsxpart_dVd = -ddxpart_dVd;
dsxpart_dVg = -ddxpart_dVg;
dsxpart_dVs = -ddxpart_dVs;
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs);
}
}
else
{ Gm = -here->BSIM3gm;
Gmbs = -here->BSIM3gmbs;
FwdSum = 0.0;
RevSum = -(Gm + Gmbs);
gbbsp = -here->BSIM3gbds;
gbbdp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs;
gbdpg = 0.0;
gbdpsp = 0.0;
gbdpb = 0.0;
gbdpdp = 0.0;
gbspg = here->BSIM3gbgs;
gbspsp = here->BSIM3gbds;
gbspb = here->BSIM3gbbs;
gbspdp = -(gbspg + gbspsp + gbspb);
if (here->BSIM3nqsMod == 0)
{ cggb = here->BSIM3cggb;
cgsb = here->BSIM3cgdb;
cgdb = here->BSIM3cgsb;
cbgb = here->BSIM3cbgb;
cbsb = here->BSIM3cbdb;
cbdb = here->BSIM3cbsb;
cdgb = -(here->BSIM3cdgb + cggb + cbgb);
cdsb = -(here->BSIM3cddb + cgsb + cbsb);
cddb = -(here->BSIM3cdsb + cgdb + cbdb);
xgtg = xgtd = xgts = xgtb = 0.0;
sxpart = 0.4;
dxpart = 0.6;
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
= ddxpart_dVs = 0.0;
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
= dsxpart_dVs = 0.0;
}
else
{ cggb = cgdb = cgsb = 0.0;
cbgb = cbdb = cbsb = 0.0;
cdgb = cddb = cdsb = 0.0;
xgtg = here->BSIM3gtg;
xgtd = here->BSIM3gts;
xgts = here->BSIM3gtd;
xgtb = here->BSIM3gtb;
xcqgb = here->BSIM3cqgb * omega;
xcqdb = here->BSIM3cqsb * omega;
xcqsb = here->BSIM3cqdb * omega;
xcqbb = here->BSIM3cqbb * omega;
CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV
* here->pParam->BSIM3leffCV;
qcheq = -(here->BSIM3qgate + here->BSIM3qbulk);
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
{ if (model->BSIM3xpart < 0.5)
{ sxpart = 0.4;
}
else if (model->BSIM3xpart > 0.5)
{ sxpart = 0.0;
}
else
{ sxpart = 0.5;
}
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
= dsxpart_dVs = 0.0;
}
else
{ sxpart = here->BSIM3qdrn / qcheq;
Css = here->BSIM3cddb;
Cds = -(here->BSIM3cgdb + here->BSIM3cddb
+ here->BSIM3cbdb);
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq;
Csg = here->BSIM3cdgb;
Cdg = -(here->BSIM3cggb + here->BSIM3cdgb
+ here->BSIM3cbgb);
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq;
Csd = here->BSIM3cdsb;
Cdd = -(here->BSIM3cgsb + here->BSIM3cdsb
+ here->BSIM3cbsb);
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq;
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg
+ dsxpart_dVs);
}
dxpart = 1.0 - sxpart;
ddxpart_dVd = -dsxpart_dVd;
ddxpart_dVg = -dsxpart_dVg;
ddxpart_dVs = -dsxpart_dVs;
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs);
}
}
T1 = *(ckt->CKTstate0 + here->BSIM3qdef) * here->BSIM3gtau;
gdpr = here->BSIM3drainConductance;
gspr = here->BSIM3sourceConductance;
gds = here->BSIM3gds;
gbd = here->BSIM3gbd;
gbs = here->BSIM3gbs;
capbd = here->BSIM3capbd;
capbs = here->BSIM3capbs;
GSoverlapCap = here->BSIM3cgso;
GDoverlapCap = here->BSIM3cgdo;
GBoverlapCap = here->pParam->BSIM3cgbo;
xcdgb = (cdgb - GDoverlapCap) * omega;
xcddb = (cddb + capbd + GDoverlapCap) * omega;
xcdsb = cdsb * omega;
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega;
xcsdb = -(cgdb + cbdb + cddb) * omega;
xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)) * omega;
xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap)
* omega;
xcgdb = (cgdb - GDoverlapCap ) * omega;
xcgsb = (cgsb - GSoverlapCap) * omega;
xcbgb = (cbgb - GBoverlapCap) * omega;
xcbdb = (cbdb - capbd ) * omega;
xcbsb = (cbsb - capbs ) * omega;
m = here->BSIM3m;
*(here->BSIM3GgPtr + 1) += m * xcggb;
*(here->BSIM3BbPtr + 1) -=
m * (xcbgb + xcbdb + xcbsb);
*(here->BSIM3DPdpPtr + 1) += m * xcddb;
*(here->BSIM3SPspPtr + 1) += m * xcssb;
*(here->BSIM3GbPtr + 1) -=
m * (xcggb + xcgdb + xcgsb);
*(here->BSIM3GdpPtr + 1) += m * xcgdb;
*(here->BSIM3GspPtr + 1) += m * xcgsb;
*(here->BSIM3BgPtr + 1) += m * xcbgb;
*(here->BSIM3BdpPtr + 1) += m * xcbdb;
*(here->BSIM3BspPtr + 1) += m * xcbsb;
*(here->BSIM3DPgPtr + 1) += m * xcdgb;
*(here->BSIM3DPbPtr + 1) -=
m * (xcdgb + xcddb + xcdsb);
*(here->BSIM3DPspPtr + 1) += m * xcdsb;
*(here->BSIM3SPgPtr + 1) += m * xcsgb;
*(here->BSIM3SPbPtr + 1) -=
m * (xcsgb + xcsdb + xcssb);
*(here->BSIM3SPdpPtr + 1) += m * xcsdb;
*(here->BSIM3DdPtr) += m * gdpr;
*(here->BSIM3SsPtr) += m * gspr;
*(here->BSIM3BbPtr) +=
m * (gbd + gbs - here->BSIM3gbbs);
*(here->BSIM3DPdpPtr) +=
m * (gdpr + gds + gbd + RevSum +
dxpart * xgtd + T1 * ddxpart_dVd +
gbdpdp);
*(here->BSIM3SPspPtr) +=
m * (gspr + gds + gbs + FwdSum +
sxpart * xgts + T1 * dsxpart_dVs +
gbspsp);
*(here->BSIM3DdpPtr) -= m * gdpr;
*(here->BSIM3SspPtr) -= m * gspr;
*(here->BSIM3BgPtr) -= m * here->BSIM3gbgs;
*(here->BSIM3BdpPtr) -= m * (gbd - gbbdp);
*(here->BSIM3BspPtr) -= m * (gbs - gbbsp);
*(here->BSIM3DPdPtr) -= m * gdpr;
*(here->BSIM3DPgPtr) +=
m * (Gm + dxpart * xgtg + T1 * ddxpart_dVg +
gbdpg);
*(here->BSIM3DPbPtr) -=
m * (gbd - Gmbs - dxpart * xgtb -
T1 * ddxpart_dVb - gbdpb);
*(here->BSIM3DPspPtr) -=
m * (gds + FwdSum - dxpart * xgts -
T1 * ddxpart_dVs - gbdpsp);
*(here->BSIM3SPgPtr) -=
m * (Gm - sxpart * xgtg - T1 * dsxpart_dVg -
gbspg);
*(here->BSIM3SPsPtr) -= m * gspr;
*(here->BSIM3SPbPtr) -=
m * (gbs + Gmbs - sxpart * xgtb -
T1 * dsxpart_dVb - gbspb);
*(here->BSIM3SPdpPtr) -=
m * (gds + RevSum - sxpart * xgtd -
T1 * dsxpart_dVd - gbspdp);
*(here->BSIM3GgPtr) -= m * xgtg;
*(here->BSIM3GbPtr) -= m * xgtb;
*(here->BSIM3GdpPtr) -= m * xgtd;
*(here->BSIM3GspPtr) -= m * xgts;
if (here->BSIM3nqsMod)
{
*(here->BSIM3QqPtr + 1) +=
m * omega * ScalingFactor;
*(here->BSIM3QgPtr + 1) -= m * xcqgb;
*(here->BSIM3QdpPtr + 1) -= m * xcqdb;
*(here->BSIM3QspPtr + 1) -= m * xcqsb;
*(here->BSIM3QbPtr + 1) -= m * xcqbb;
*(here->BSIM3QqPtr) += m * here->BSIM3gtau;
*(here->BSIM3DPqPtr) +=
m * (dxpart * here->BSIM3gtau);
*(here->BSIM3SPqPtr) +=
m * (sxpart * here->BSIM3gtau);
*(here->BSIM3GqPtr) -= m * here->BSIM3gtau;
*(here->BSIM3QgPtr) += m * xgtg;
*(here->BSIM3QdpPtr) += m * xgtd;
*(here->BSIM3QspPtr) += m * xgts;
*(here->BSIM3QbPtr) += m * xgtb;
}
}
}
return(OK);
}

419
src/spicelib/devices/bsim3/b3ask.c

@ -1,23 +1,14 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3ask.c of BSIM3v3.2.4
* Author: 1995 Min-Chie Jeng and Mansun Chan
* Author: 1997-1999 Weidong Liu.
* Author: 2001 Xuemei Xi
* Modified bt Paolo Nenzi 2002
* Modified bt Paolo Nenzi 2002 and Dietmar Warning 2003
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "ifsim.h"
#include "cktdefs.h"
@ -27,209 +18,209 @@
#include "suffix.h"
int
BSIM3ask (CKTcircuit * ckt, GENinstance * inst, int which, IFvalue * value,
IFvalue * select)
BSIM3ask (CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
IFvalue *select)
{
BSIM3instance *here = (BSIM3instance *) inst;
BSIM3instance *here = (BSIM3instance*)inst;
switch (which)
{
case BSIM3_L:
value->rValue = here->BSIM3l;
return (OK);
case BSIM3_W:
value->rValue = here->BSIM3w;
return (OK);
switch(which)
{ case BSIM3_L:
value->rValue = here->BSIM3l;
return(OK);
case BSIM3_W:
value->rValue = here->BSIM3w;
return(OK);
case BSIM3_M:
value->rValue = here->BSIM3m;
return (OK);
case BSIM3_AS:
value->rValue = here->BSIM3sourceArea;
return (OK);
case BSIM3_AD:
value->rValue = here->BSIM3drainArea;
return (OK);
case BSIM3_PS:
value->rValue = here->BSIM3sourcePerimeter;
return (OK);
case BSIM3_PD:
value->rValue = here->BSIM3drainPerimeter;
return (OK);
case BSIM3_NRS:
value->rValue = here->BSIM3sourceSquares;
return (OK);
case BSIM3_NRD:
value->rValue = here->BSIM3drainSquares;
return (OK);
case BSIM3_OFF:
value->rValue = here->BSIM3off;
return (OK);
case BSIM3_NQSMOD:
value->iValue = here->BSIM3nqsMod;
return (OK);
case BSIM3_IC_VBS:
value->rValue = here->BSIM3icVBS;
return (OK);
case BSIM3_IC_VDS:
value->rValue = here->BSIM3icVDS;
return (OK);
case BSIM3_IC_VGS:
value->rValue = here->BSIM3icVGS;
return (OK);
case BSIM3_DNODE:
value->iValue = here->BSIM3dNode;
return (OK);
case BSIM3_GNODE:
value->iValue = here->BSIM3gNode;
return (OK);
case BSIM3_SNODE:
value->iValue = here->BSIM3sNode;
return (OK);
case BSIM3_BNODE:
value->iValue = here->BSIM3bNode;
return (OK);
case BSIM3_DNODEPRIME:
value->iValue = here->BSIM3dNodePrime;
return (OK);
case BSIM3_SNODEPRIME:
value->iValue = here->BSIM3sNodePrime;
return (OK);
case BSIM3_SOURCECONDUCT:
value->rValue = here->BSIM3sourceConductance;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_DRAINCONDUCT:
value->rValue = here->BSIM3drainConductance;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_VBD:
value->rValue = *(ckt->CKTstate0 + here->BSIM3vbd);
return (OK);
case BSIM3_VBS:
value->rValue = *(ckt->CKTstate0 + here->BSIM3vbs);
return (OK);
case BSIM3_VGS:
value->rValue = *(ckt->CKTstate0 + here->BSIM3vgs);
return (OK);
case BSIM3_VDS:
value->rValue = *(ckt->CKTstate0 + here->BSIM3vds);
return (OK);
case BSIM3_CD:
value->rValue = here->BSIM3cd;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CBS:
value->rValue = here->BSIM3cbs;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CBD:
value->rValue = here->BSIM3cbd;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_GM:
value->rValue = here->BSIM3gm;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_GDS:
value->rValue = here->BSIM3gds;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_GMBS:
value->rValue = here->BSIM3gmbs;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_GBD:
value->rValue = here->BSIM3gbd;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_GBS:
value->rValue = here->BSIM3gbs;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_QB:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qb);
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CQB:
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqb);
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_QG:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qg);
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CQG:
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqg);
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_QD:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qd);
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CQD:
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqd);
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CGG:
value->rValue = here->BSIM3cggb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CGD:
value->rValue = here->BSIM3cgdb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CGS:
value->rValue = here->BSIM3cgsb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CDG:
value->rValue = here->BSIM3cdgb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CDD:
value->rValue = here->BSIM3cddb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CDS:
value->rValue = here->BSIM3cdsb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CBG:
value->rValue = here->BSIM3cbgb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CBDB:
value->rValue = here->BSIM3cbdb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CBSB:
value->rValue = here->BSIM3cbsb;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CAPBD:
value->rValue = here->BSIM3capbd;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_CAPBS:
value->rValue = here->BSIM3capbs;
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_VON:
value->rValue = here->BSIM3von;
return (OK);
case BSIM3_VDSAT:
value->rValue = here->BSIM3vdsat;
return (OK);
case BSIM3_QBS:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qbs);
value->rValue *= here->BSIM3m;
return (OK);
case BSIM3_QBD:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qbd);
value->rValue *= here->BSIM3m;
return (OK);
default:
return (E_BADPARM);
}
/* NOTREACHED */
value->rValue = here->BSIM3m;
return (OK);
case BSIM3_AS:
value->rValue = here->BSIM3sourceArea;
return(OK);
case BSIM3_AD:
value->rValue = here->BSIM3drainArea;
return(OK);
case BSIM3_PS:
value->rValue = here->BSIM3sourcePerimeter;
return(OK);
case BSIM3_PD:
value->rValue = here->BSIM3drainPerimeter;
return(OK);
case BSIM3_NRS:
value->rValue = here->BSIM3sourceSquares;
return(OK);
case BSIM3_NRD:
value->rValue = here->BSIM3drainSquares;
return(OK);
case BSIM3_OFF:
value->rValue = here->BSIM3off;
return(OK);
case BSIM3_NQSMOD:
value->iValue = here->BSIM3nqsMod;
return(OK);
case BSIM3_IC_VBS:
value->rValue = here->BSIM3icVBS;
return(OK);
case BSIM3_IC_VDS:
value->rValue = here->BSIM3icVDS;
return(OK);
case BSIM3_IC_VGS:
value->rValue = here->BSIM3icVGS;
return(OK);
case BSIM3_DNODE:
value->iValue = here->BSIM3dNode;
return(OK);
case BSIM3_GNODE:
value->iValue = here->BSIM3gNode;
return(OK);
case BSIM3_SNODE:
value->iValue = here->BSIM3sNode;
return(OK);
case BSIM3_BNODE:
value->iValue = here->BSIM3bNode;
return(OK);
case BSIM3_DNODEPRIME:
value->iValue = here->BSIM3dNodePrime;
return(OK);
case BSIM3_SNODEPRIME:
value->iValue = here->BSIM3sNodePrime;
return(OK);
case BSIM3_SOURCECONDUCT:
value->rValue = here->BSIM3sourceConductance;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_DRAINCONDUCT:
value->rValue = here->BSIM3drainConductance;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_VBD:
value->rValue = *(ckt->CKTstate0 + here->BSIM3vbd);
return(OK);
case BSIM3_VBS:
value->rValue = *(ckt->CKTstate0 + here->BSIM3vbs);
return(OK);
case BSIM3_VGS:
value->rValue = *(ckt->CKTstate0 + here->BSIM3vgs);
return(OK);
case BSIM3_VDS:
value->rValue = *(ckt->CKTstate0 + here->BSIM3vds);
return(OK);
case BSIM3_CD:
value->rValue = here->BSIM3cd;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CBS:
value->rValue = here->BSIM3cbs;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CBD:
value->rValue = here->BSIM3cbd;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_GM:
value->rValue = here->BSIM3gm;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_GDS:
value->rValue = here->BSIM3gds;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_GMBS:
value->rValue = here->BSIM3gmbs;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_GBD:
value->rValue = here->BSIM3gbd;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_GBS:
value->rValue = here->BSIM3gbs;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_QB:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qb);
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CQB:
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqb);
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_QG:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qg);
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CQG:
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqg);
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_QD:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qd);
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CQD:
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqd);
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CGG:
value->rValue = here->BSIM3cggb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CGD:
value->rValue = here->BSIM3cgdb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CGS:
value->rValue = here->BSIM3cgsb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CDG:
value->rValue = here->BSIM3cdgb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CDD:
value->rValue = here->BSIM3cddb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CDS:
value->rValue = here->BSIM3cdsb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CBG:
value->rValue = here->BSIM3cbgb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CBDB:
value->rValue = here->BSIM3cbdb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CBSB:
value->rValue = here->BSIM3cbsb;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CAPBD:
value->rValue = here->BSIM3capbd;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_CAPBS:
value->rValue = here->BSIM3capbs;
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_VON:
value->rValue = here->BSIM3von;
return(OK);
case BSIM3_VDSAT:
value->rValue = here->BSIM3vdsat;
return(OK);
case BSIM3_QBS:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qbs);
value->rValue *= here->BSIM3m;
return(OK);
case BSIM3_QBD:
value->rValue = *(ckt->CKTstate0 + here->BSIM3qbd);
value->rValue *= here->BSIM3m;
return(OK);
default:
return(E_BADPARM);
}
/* NOTREACHED */
}

966
src/spicelib/devices/bsim3/b3check.c

@ -1,3 +1,5 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3check.c of BSIM3v3.2.4
@ -5,20 +7,9 @@
* Author: 1997-1999 Weidong Liu.
* Author: 2001 Xuemei Xi
* Modified by Xuemei Xi, 10/05, 12/14, 2001.
* Modified by Paolo Nenzi 2002
* Modified by Paolo Nenzi 2002 and Dietmar Warning 2003
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "cktdefs.h"
#include "bsim3def.h"
@ -29,561 +20,430 @@
#include "suffix.h"
int
BSIM3checkModel (BSIM3model * model, BSIM3instance * here, CKTcircuit * ckt)
BSIM3checkModel (BSIM3model *model, BSIM3instance *here, CKTcircuit *ckt)
{
struct bsim3SizeDependParam *pParam;
int Fatal_Flag = 0;
FILE *fplog;
if ((fplog = fopen ("b3v3check.log", "w")) != NULL)
struct bsim3SizeDependParam *pParam;
int Fatal_Flag = 0;
FILE *fplog;
if ((fplog = fopen("b3v3check.log", "w")) != NULL)
{ pParam = here->pParam;
fprintf (fplog,
"BSIM3v3.2 Model (Supports: v3.2 and v3.2.{2,3,4}).\n");
fprintf (fplog, "Parameter Checking.\n");
fprintf (fplog, "Model = %s\n", model->BSIM3modName);
fprintf (fplog, "W = %g, L = %g, M = %g\n", here->BSIM3w,
here->BSIM3l, here->BSIM3m);
if ((strcmp (model->BSIM3version, "3.2.4"))
&& (strcmp (model->BSIM3version, "3.2.3"))
&& (strcmp (model->BSIM3version, "3.2.2"))
&& (strcmp (model->BSIM3version, "3.2")))
{
pParam = here->pParam;
fprintf (fplog,
"BSIM3v3.2 Model (Supports: v3.2 and v3.2.{2,3,4}.\n");
fprintf (fplog, "Parameter Checking.\n");
fprintf (fplog, "Model = %s\n", model->BSIM3modName);
fprintf (fplog, "W = %g, L = %g, M = %g\n", here->BSIM3w,
here->BSIM3l, here->BSIM3m);
if ((strcmp (model->BSIM3version, "3.2.4"))
&& (strcmp (model->BSIM3version, "3.2.3"))
&& (strcmp (model->BSIM3version, "3.2.2"))
&& (strcmp (model->BSIM3version, "3.2")))
{
fprintf (fplog,
"Warning: This model supports BSIM3v3.2 and BSIM3v3.{2,3,4}\n");
fprintf (fplog,
"You specified a wrong version number.\n.");
printf ("Warning: This model supports BSIM3v3.2 and BSIM3v3.{2,3,4}\n");
printf ("You specified a wrong version number.\n.");
}
if (pParam->BSIM3nlx < -pParam->BSIM3leff)
{
fprintf (fplog,
"Fatal: Nlx = %g is less than -Leff.\n",
pParam->BSIM3nlx);
printf ("Fatal: Nlx = %g is less than -Leff.\n",
pParam->BSIM3nlx);
Fatal_Flag = 1;
}
if (model->BSIM3tox <= 0.0)
{
fprintf (fplog, "Fatal: Tox = %g is not positive.\n",
model->BSIM3tox);
printf ("Fatal: Tox = %g is not positive.\n",
model->BSIM3tox);
Fatal_Flag = 1;
}
if (model->BSIM3toxm <= 0.0)
{
fprintf (fplog, "Fatal: Toxm = %g is not positive.\n",
model->BSIM3toxm);
printf ("Fatal: Toxm = %g is not positive.\n",
model->BSIM3toxm);
Fatal_Flag = 1;
}
if (pParam->BSIM3npeak <= 0.0)
{
fprintf (fplog, "Fatal: Nch = %g is not positive.\n",
pParam->BSIM3npeak);
printf ("Fatal: Nch = %g is not positive.\n",
pParam->BSIM3npeak);
Fatal_Flag = 1;
}
if (pParam->BSIM3nsub <= 0.0)
{
fprintf (fplog, "Fatal: Nsub = %g is not positive.\n",
pParam->BSIM3nsub);
printf ("Fatal: Nsub = %g is not positive.\n",
pParam->BSIM3nsub);
Fatal_Flag = 1;
}
if (pParam->BSIM3ngate < 0.0)
{
fprintf (fplog,
"Fatal: Ngate = %g is not positive.\n",
pParam->BSIM3ngate);
printf ("Fatal: Ngate = %g Ngate is not positive.\n",
pParam->BSIM3ngate);
Fatal_Flag = 1;
}
if (pParam->BSIM3ngate > 1.e25)
{
fprintf (fplog, "Fatal: Ngate = %g is too high.\n",
pParam->BSIM3ngate);
printf ("Fatal: Ngate = %g Ngate is too high\n",
pParam->BSIM3ngate);
Fatal_Flag = 1;
}
if (pParam->BSIM3xj <= 0.0)
{
fprintf (fplog, "Fatal: Xj = %g is not positive.\n",
pParam->BSIM3xj);
printf ("Fatal: Xj = %g is not positive.\n",
pParam->BSIM3xj);
Fatal_Flag = 1;
}
if (pParam->BSIM3dvt1 < 0.0)
{
fprintf (fplog, "Fatal: Dvt1 = %g is negative.\n",
pParam->BSIM3dvt1);
printf ("Fatal: Dvt1 = %g is negative.\n",
pParam->BSIM3dvt1);
Fatal_Flag = 1;
}
if (pParam->BSIM3dvt1w < 0.0)
{
fprintf (fplog, "Fatal: Dvt1w = %g is negative.\n",
pParam->BSIM3dvt1w);
printf ("Fatal: Dvt1w = %g is negative.\n",
pParam->BSIM3dvt1w);
Fatal_Flag = 1;
}
if (pParam->BSIM3w0 == -pParam->BSIM3weff)
{
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->BSIM3dsub < 0.0)
{
fprintf (fplog, "Fatal: Dsub = %g is negative.\n",
pParam->BSIM3dsub);
printf ("Fatal: Dsub = %g is negative.\n",
pParam->BSIM3dsub);
Fatal_Flag = 1;
}
if (pParam->BSIM3b1 == -pParam->BSIM3weff)
{
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 (pParam->BSIM3u0temp <= 0.0)
{
fprintf (fplog,
"Fatal: u0 at current temperature = %g is not positive.\n",
pParam->BSIM3u0temp);
printf ("Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3u0temp);
Fatal_Flag = 1;
}
/* Check delta parameter */
if (pParam->BSIM3delta < 0.0)
{
fprintf (fplog,
"Fatal: Delta = %g is less than zero.\n",
pParam->BSIM3delta);
printf ("Fatal: Delta = %g is less than zero.\n",
pParam->BSIM3delta);
Fatal_Flag = 1;
}
if (pParam->BSIM3vsattemp <= 0.0)
{
fprintf (fplog,
"Fatal: Vsat at current temperature = %g is not positive.\n",
pParam->BSIM3vsattemp);
printf ("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3vsattemp);
Fatal_Flag = 1;
}
"Warning: This model supports BSIM3v3.2 and BSIM3v3.2.{2,3,4}\n");
fprintf (fplog,
"You specified a wrong version number.\n");
printf ("Warning: This model supports BSIM3v3.2 and BSIM3v3.2.{2,3,4}\n");
printf ("You specified a wrong version number.\n");
}
if (pParam->BSIM3nlx < -pParam->BSIM3leff)
{ fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n",
pParam->BSIM3nlx);
printf("Fatal: Nlx = %g is less than -Leff.\n",
pParam->BSIM3nlx);
Fatal_Flag = 1;
}
if (model->BSIM3tox <= 0.0)
{ fprintf(fplog, "Fatal: Tox = %g is not positive.\n",
model->BSIM3tox);
printf("Fatal: Tox = %g is not positive.\n", model->BSIM3tox);
Fatal_Flag = 1;
}
if (model->BSIM3toxm <= 0.0)
{ fprintf(fplog, "Fatal: Toxm = %g is not positive.\n",
model->BSIM3toxm);
printf("Fatal: Toxm = %g is not positive.\n", model->BSIM3toxm);
Fatal_Flag = 1;
}
if (pParam->BSIM3npeak <= 0.0)
{ fprintf(fplog, "Fatal: Nch = %g is not positive.\n",
pParam->BSIM3npeak);
printf("Fatal: Nch = %g is not positive.\n",
pParam->BSIM3npeak);
Fatal_Flag = 1;
}
if (pParam->BSIM3nsub <= 0.0)
{ fprintf(fplog, "Fatal: Nsub = %g is not positive.\n",
pParam->BSIM3nsub);
printf("Fatal: Nsub = %g is not positive.\n",
pParam->BSIM3nsub);
Fatal_Flag = 1;
}
if (pParam->BSIM3ngate < 0.0)
{ fprintf(fplog, "Fatal: Ngate = %g is not positive.\n",
pParam->BSIM3ngate);
printf("Fatal: Ngate = %g Ngate is not positive.\n",
pParam->BSIM3ngate);
Fatal_Flag = 1;
}
if (pParam->BSIM3ngate > 1.e25)
{ fprintf(fplog, "Fatal: Ngate = %g is too high.\n",
pParam->BSIM3ngate);
printf("Fatal: Ngate = %g Ngate is too high\n",
pParam->BSIM3ngate);
Fatal_Flag = 1;
}
if (pParam->BSIM3xj <= 0.0)
{ fprintf(fplog, "Fatal: Xj = %g is not positive.\n",
pParam->BSIM3xj);
printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM3xj);
Fatal_Flag = 1;
}
if (pParam->BSIM3dvt1 < 0.0)
{ fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n",
pParam->BSIM3dvt1);
printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3dvt1);
Fatal_Flag = 1;
}
if (pParam->BSIM3dvt1w < 0.0)
{ fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n",
pParam->BSIM3dvt1w);
printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3dvt1w);
Fatal_Flag = 1;
}
if (pParam->BSIM3w0 == -pParam->BSIM3weff)
{ 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->BSIM3dsub < 0.0)
{ fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM3dsub);
printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM3dsub);
Fatal_Flag = 1;
}
if (pParam->BSIM3b1 == -pParam->BSIM3weff)
{ 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 (pParam->BSIM3u0temp <= 0.0)
{ fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3u0temp);
printf("Fatal: u0 at current temperature = %g is not positive.\n",
pParam->BSIM3u0temp);
Fatal_Flag = 1;
}
/* Check delta parameter */
if (pParam->BSIM3delta < 0.0)
{ fprintf(fplog, "Fatal: Delta = %g is less than zero.\n",
pParam->BSIM3delta);
printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM3delta);
Fatal_Flag = 1;
}
if (pParam->BSIM3vsattemp <= 0.0)
{ fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3vsattemp);
printf("Fatal: Vsat at current temperature = %g is not positive.\n",
pParam->BSIM3vsattemp);
Fatal_Flag = 1;
}
/* Check Rout parameters */
if (pParam->BSIM3pclm <= 0.0)
{
fprintf (fplog, "Fatal: Pclm = %g is not positive.\n",
pParam->BSIM3pclm);
printf ("Fatal: Pclm = %g is not positive.\n",
pParam->BSIM3pclm);
Fatal_Flag = 1;
}
if (pParam->BSIM3drout < 0.0)
{
fprintf (fplog, "Fatal: Drout = %g is negative.\n",
pParam->BSIM3drout);
printf ("Fatal: Drout = %g is negative.\n",
pParam->BSIM3drout);
Fatal_Flag = 1;
}
if (pParam->BSIM3pscbe2 <= 0.0)
{
fprintf (fplog,
"Warning: Pscbe2 = %g is not positive.\n",
pParam->BSIM3pscbe2);
printf ("Warning: Pscbe2 = %g is not positive.\n",
pParam->BSIM3pscbe2);
}
if (model->BSIM3unitLengthSidewallJctCap > 0.0 ||
model->BSIM3unitLengthGateSidewallJctCap > 0.0)
{
if (here->BSIM3drainPerimeter < pParam->BSIM3weff)
{
fprintf (fplog,
"Warning: Pd = %g is less than W.\n",
here->BSIM3drainPerimeter);
printf ("Warning: Pd = %g is less than W.\n",
here->BSIM3drainPerimeter);
}
if (here->BSIM3sourcePerimeter < pParam->BSIM3weff)
{
fprintf (fplog,
"Warning: Ps = %g is less than W.\n",
here->BSIM3sourcePerimeter);
printf ("Warning: Ps = %g is less than W.\n",
here->BSIM3sourcePerimeter);
}
}
if (pParam->BSIM3noff < 0.1)
{
fprintf (fplog, "Warning: Noff = %g is too small.\n",
pParam->BSIM3noff);
printf ("Warning: Noff = %g is too small.\n",
pParam->BSIM3noff);
}
if (pParam->BSIM3noff > 4.0)
{
fprintf (fplog, "Warning: Noff = %g is too large.\n",
pParam->BSIM3noff);
printf ("Warning: Noff = %g is too large.\n",
pParam->BSIM3noff);
}
if (pParam->BSIM3voffcv < -0.5)
{
fprintf (fplog,
"Warning: Voffcv = %g is too small.\n",
pParam->BSIM3voffcv);
printf ("Warning: Voffcv = %g is too small.\n",
pParam->BSIM3voffcv);
}
if (pParam->BSIM3voffcv > 0.5)
{
fprintf (fplog,
"Warning: Voffcv = %g is too large.\n",
pParam->BSIM3voffcv);
printf ("Warning: Voffcv = %g is too large.\n",
pParam->BSIM3voffcv);
}
if (model->BSIM3ijth < 0.0)
{
fprintf (fplog,
"Fatal: Ijth = %g cannot be negative.\n",
model->BSIM3ijth);
printf ("Fatal: Ijth = %g cannot be negative.\n",
model->BSIM3ijth);
Fatal_Flag = 1;
}
if (pParam->BSIM3pclm <= 0.0)
{ fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM3pclm);
printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM3pclm);
Fatal_Flag = 1;
}
if (pParam->BSIM3drout < 0.0)
{ fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM3drout);
printf("Fatal: Drout = %g is negative.\n", pParam->BSIM3drout);
Fatal_Flag = 1;
}
if (pParam->BSIM3pscbe2 <= 0.0)
{ fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n",
pParam->BSIM3pscbe2);
printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM3pscbe2);
}
/* acm model */
if (model->BSIM3acmMod == 0) {
if (model->BSIM3unitLengthSidewallJctCap > 0.0 ||
model->BSIM3unitLengthGateSidewallJctCap > 0.0)
{
if (here->BSIM3drainPerimeter < pParam->BSIM3weff)
{ fprintf(fplog, "Warning: Pd = %g is less than W.\n",
here->BSIM3drainPerimeter);
printf("Warning: Pd = %g is less than W.\n",
here->BSIM3drainPerimeter);
}
if (here->BSIM3sourcePerimeter < pParam->BSIM3weff)
{ fprintf(fplog, "Warning: Ps = %g is less than W.\n",
here->BSIM3sourcePerimeter);
printf("Warning: Ps = %g is less than W.\n",
here->BSIM3sourcePerimeter);
}
}
}
if (pParam->BSIM3noff < 0.1)
{ fprintf(fplog, "Warning: Noff = %g is too small.\n",
pParam->BSIM3noff);
printf("Warning: Noff = %g is too small.\n", pParam->BSIM3noff);
}
if (pParam->BSIM3noff > 4.0)
{ fprintf(fplog, "Warning: Noff = %g is too large.\n",
pParam->BSIM3noff);
printf("Warning: Noff = %g is too large.\n", pParam->BSIM3noff);
}
if (pParam->BSIM3voffcv < -0.5)
{ fprintf(fplog, "Warning: Voffcv = %g is too small.\n",
pParam->BSIM3voffcv);
printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM3voffcv);
}
if (pParam->BSIM3voffcv > 0.5)
{ fprintf(fplog, "Warning: Voffcv = %g is too large.\n",
pParam->BSIM3voffcv);
printf("Warning: Voffcv = %g is too large.\n", pParam->BSIM3voffcv);
}
if (model->BSIM3ijth < 0.0)
{ fprintf(fplog, "Fatal: Ijth = %g cannot be negative.\n",
model->BSIM3ijth);
printf("Fatal: Ijth = %g cannot be negative.\n", model->BSIM3ijth);
Fatal_Flag = 1;
}
/* Check capacitance parameters */
if (pParam->BSIM3clc < 0.0)
{
fprintf (fplog, "Fatal: Clc = %g is negative.\n",
pParam->BSIM3clc);
printf ("Fatal: Clc = %g is negative.\n",
pParam->BSIM3clc);
Fatal_Flag = 1;
}
if (pParam->BSIM3moin < 5.0)
{
fprintf (fplog, "Warning: Moin = %g is too small.\n",
pParam->BSIM3moin);
printf ("Warning: Moin = %g is too small.\n",
pParam->BSIM3moin);
}
if (pParam->BSIM3moin > 25.0)
{
fprintf (fplog, "Warning: Moin = %g is too large.\n",
pParam->BSIM3moin);
printf ("Warning: Moin = %g is too large.\n",
pParam->BSIM3moin);
}
if (model->BSIM3capMod == 3)
{
if (pParam->BSIM3acde < 0.4)
{
fprintf (fplog,
"Warning: Acde = %g is too small.\n",
pParam->BSIM3acde);
printf ("Warning: Acde = %g is too small.\n",
pParam->BSIM3acde);
}
if (pParam->BSIM3acde > 1.6)
{
fprintf (fplog,
"Warning: Acde = %g is too large.\n",
pParam->BSIM3acde);
printf ("Warning: Acde = %g is too large.\n",
pParam->BSIM3acde);
}
}
if (model->BSIM3paramChk == 1)
{
/* Check L and W parameters */
if (pParam->BSIM3leff <= 5.0e-8)
{
fprintf (fplog,
"Warning: Leff = %g may be too small.\n",
pParam->BSIM3leff);
printf ("Warning: Leff = %g may be too small.\n", pParam->BSIM3leff);
}
if (pParam->BSIM3leffCV <= 5.0e-8)
{
fprintf (fplog,
"Warning: Leff for CV = %g may be too small.\n",
pParam->BSIM3leffCV);
printf ("Warning: Leff for CV = %g may be too small.\n", pParam->BSIM3leffCV);
}
if (pParam->BSIM3weff <= 1.0e-7)
{
fprintf (fplog,
"Warning: Weff = %g may be too small.\n",
pParam->BSIM3weff);
printf ("Warning: Weff = %g may be too small.\n", pParam->BSIM3weff);
}
if (pParam->BSIM3weffCV <= 1.0e-7)
{
fprintf (fplog,
"Warning: Weff for CV = %g may be too small.\n",
pParam->BSIM3weffCV);
printf ("Warning: Weff for CV = %g may be too small.\n", pParam->BSIM3weffCV);
}
if (pParam->BSIM3clc < 0.0)
{ fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM3clc);
printf("Fatal: Clc = %g is negative.\n", pParam->BSIM3clc);
Fatal_Flag = 1;
}
if (pParam->BSIM3moin < 5.0)
{ fprintf(fplog, "Warning: Moin = %g is too small.\n",
pParam->BSIM3moin);
printf("Warning: Moin = %g is too small.\n", pParam->BSIM3moin);
}
if (pParam->BSIM3moin > 25.0)
{ fprintf(fplog, "Warning: Moin = %g is too large.\n",
pParam->BSIM3moin);
printf("Warning: Moin = %g is too large.\n", pParam->BSIM3moin);
}
if(model->BSIM3capMod ==3) {
if (pParam->BSIM3acde < 0.4)
{ fprintf(fplog, "Warning: Acde = %g is too small.\n",
pParam->BSIM3acde);
printf("Warning: Acde = %g is too small.\n", pParam->BSIM3acde);
}
if (pParam->BSIM3acde > 1.6)
{ fprintf(fplog, "Warning: Acde = %g is too large.\n",
pParam->BSIM3acde);
printf("Warning: Acde = %g is too large.\n", pParam->BSIM3acde);
}
}
if (model->BSIM3paramChk ==1)
{
/* Check L and W parameters */
if (pParam->BSIM3leff <= 5.0e-8)
{ fprintf(fplog, "Warning: Leff = %g may be too small.\n",
pParam->BSIM3leff);
printf("Warning: Leff = %g may be too small.\n",
pParam->BSIM3leff);
}
if (pParam->BSIM3leffCV <= 5.0e-8)
{ fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n",
pParam->BSIM3leffCV);
printf("Warning: Leff for CV = %g may be too small.\n",
pParam->BSIM3leffCV);
}
if (pParam->BSIM3weff <= 1.0e-7)
{ fprintf(fplog, "Warning: Weff = %g may be too small.\n",
pParam->BSIM3weff);
printf("Warning: Weff = %g may be too small.\n",
pParam->BSIM3weff);
}
if (pParam->BSIM3weffCV <= 1.0e-7)
{ fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n",
pParam->BSIM3weffCV);
printf("Warning: Weff for CV = %g may be too small.\n",
pParam->BSIM3weffCV);
}
/* Check threshold voltage parameters */
if (pParam->BSIM3nlx < 0.0)
{
fprintf (fplog,
"Warning: Nlx = %g is negative.\n",
pParam->BSIM3nlx);
printf ("Warning: Nlx = %g is negative.\n",
pParam->BSIM3nlx);
}
if (model->BSIM3tox < 1.0e-9)
{
fprintf (fplog,
"Warning: Tox = %g is less than 10A.\n",
model->BSIM3tox);
printf ("Warning: Tox = %g is less than 10A.\n", model->BSIM3tox);
}
if (pParam->BSIM3npeak <= 1.0e15)
{
fprintf (fplog,
"Warning: Nch = %g may be too small.\n",
pParam->BSIM3npeak);
printf ("Warning: Nch = %g may be too small.\n", pParam->BSIM3npeak);
}
else if (pParam->BSIM3npeak >= 1.0e21)
{
fprintf (fplog,
"Warning: Nch = %g may be too large.\n",
pParam->BSIM3npeak);
printf ("Warning: Nch = %g may be too large.\n", pParam->BSIM3npeak);
}
if (pParam->BSIM3nsub <= 1.0e14)
{
fprintf (fplog,
"Warning: Nsub = %g may be too small.\n",
pParam->BSIM3nsub);
printf ("Warning: Nsub = %g may be too small.\n", pParam->BSIM3nsub);
}
else if (pParam->BSIM3nsub >= 1.0e21)
{
fprintf (fplog,
"Warning: Nsub = %g may be too large.\n",
pParam->BSIM3nsub);
printf ("Warning: Nsub = %g may be too large.\n", pParam->BSIM3nsub);
}
if ((pParam->BSIM3ngate > 0.0) &&
(pParam->BSIM3ngate <= 1.e18))
{
fprintf (fplog,
"Warning: Ngate = %g is less than 1.E18cm^-3.\n",
pParam->BSIM3ngate);
printf ("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM3ngate);
}
if (pParam->BSIM3dvt0 < 0.0)
{
fprintf (fplog,
"Warning: Dvt0 = %g is negative.\n",
pParam->BSIM3dvt0);
printf ("Warning: Dvt0 = %g is negative.\n",
pParam->BSIM3dvt0);
}
if (fabs
(1.0e-6 / (pParam->BSIM3w0 + pParam->BSIM3weff)) >
10.0)
{
fprintf (fplog,
"Warning: (W0 + Weff) may be too small.\n");
printf ("Warning: (W0 + Weff) may be too small.\n");
}
if (pParam->BSIM3nlx < 0.0)
{ fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->BSIM3nlx);
printf("Warning: Nlx = %g is negative.\n", pParam->BSIM3nlx);
}
if (model->BSIM3tox < 1.0e-9)
{ fprintf(fplog, "Warning: Tox = %g is less than 10A.\n",
model->BSIM3tox);
printf("Warning: Tox = %g is less than 10A.\n", model->BSIM3tox);
}
if (pParam->BSIM3npeak <= 1.0e15)
{ fprintf(fplog, "Warning: Nch = %g may be too small.\n",
pParam->BSIM3npeak);
printf("Warning: Nch = %g may be too small.\n",
pParam->BSIM3npeak);
}
else if (pParam->BSIM3npeak >= 1.0e21)
{ fprintf(fplog, "Warning: Nch = %g may be too large.\n",
pParam->BSIM3npeak);
printf("Warning: Nch = %g may be too large.\n",
pParam->BSIM3npeak);
}
if (pParam->BSIM3nsub <= 1.0e14)
{ fprintf(fplog, "Warning: Nsub = %g may be too small.\n",
pParam->BSIM3nsub);
printf("Warning: Nsub = %g may be too small.\n",
pParam->BSIM3nsub);
}
else if (pParam->BSIM3nsub >= 1.0e21)
{ fprintf(fplog, "Warning: Nsub = %g may be too large.\n",
pParam->BSIM3nsub);
printf("Warning: Nsub = %g may be too large.\n",
pParam->BSIM3nsub);
}
if ((pParam->BSIM3ngate > 0.0) &&
(pParam->BSIM3ngate <= 1.e18))
{ fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n",
pParam->BSIM3ngate);
printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n",
pParam->BSIM3ngate);
}
if (pParam->BSIM3dvt0 < 0.0)
{ fprintf(fplog, "Warning: Dvt0 = %g is negative.\n",
pParam->BSIM3dvt0);
printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM3dvt0);
}
if (fabs(1.0e-6 / (pParam->BSIM3w0 + pParam->BSIM3weff)) > 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->BSIM3nfactor < 0.0)
{
fprintf (fplog,
"Warning: Nfactor = %g is negative.\n",
pParam->BSIM3nfactor);
printf ("Warning: Nfactor = %g is negative.\n", pParam->BSIM3nfactor);
}
if (pParam->BSIM3cdsc < 0.0)
{
fprintf (fplog,
"Warning: Cdsc = %g is negative.\n",
pParam->BSIM3cdsc);
printf ("Warning: Cdsc = %g is negative.\n",
pParam->BSIM3cdsc);
}
if (pParam->BSIM3cdscd < 0.0)
{
fprintf (fplog,
"Warning: Cdscd = %g is negative.\n",
pParam->BSIM3cdscd);
printf ("Warning: Cdscd = %g is negative.\n",
pParam->BSIM3cdscd);
}
if (pParam->BSIM3nfactor < 0.0)
{ fprintf(fplog, "Warning: Nfactor = %g is negative.\n",
pParam->BSIM3nfactor);
printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM3nfactor);
}
if (pParam->BSIM3cdsc < 0.0)
{ fprintf(fplog, "Warning: Cdsc = %g is negative.\n",
pParam->BSIM3cdsc);
printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM3cdsc);
}
if (pParam->BSIM3cdscd < 0.0)
{ fprintf(fplog, "Warning: Cdscd = %g is negative.\n",
pParam->BSIM3cdscd);
printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM3cdscd);
}
/* Check DIBL parameters */
if (pParam->BSIM3eta0 < 0.0)
{
fprintf (fplog,
"Warning: Eta0 = %g is negative.\n",
pParam->BSIM3eta0);
printf ("Warning: Eta0 = %g is negative.\n",
pParam->BSIM3eta0);
}
/* Check Abulk parameters */
if (fabs
(1.0e-6 / (pParam->BSIM3b1 + pParam->BSIM3weff)) >
10.0)
{
fprintf (fplog,
"Warning: (B1 + Weff) may be too small.\n");
printf ("Warning: (B1 + Weff) may be too small.\n");
}
if (pParam->BSIM3eta0 < 0.0)
{ fprintf(fplog, "Warning: Eta0 = %g is negative.\n",
pParam->BSIM3eta0);
printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM3eta0);
}
/* Check Abulk parameters */
if (fabs(1.0e-6 / (pParam->BSIM3b1 + pParam->BSIM3weff)) > 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->BSIM3a2 < 0.01)
{
fprintf (fplog,
"Warning: A2 = %g is too small. Set to 0.01.\n",
pParam->BSIM3a2);
printf ("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3a2);
pParam->BSIM3a2 = 0.01;
}
else if (pParam->BSIM3a2 > 1.0)
{
fprintf (fplog,
"Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
pParam->BSIM3a2);
printf ("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM3a2);
pParam->BSIM3a2 = 1.0;
pParam->BSIM3a1 = 0.0;
}
if (pParam->BSIM3rdsw < 0.0)
{
fprintf (fplog,
"Warning: Rdsw = %g is negative. Set to zero.\n",
pParam->BSIM3rdsw);
printf ("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM3rdsw);
pParam->BSIM3rdsw = 0.0;
pParam->BSIM3rds0 = 0.0;
}
else if ((pParam->BSIM3rds0 > 0.0)
&& (pParam->BSIM3rds0 < 0.001))
{
fprintf (fplog,
"Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n",
pParam->BSIM3rds0);
printf ("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->BSIM3rds0);
pParam->BSIM3rds0 = 0.0;
}
if (pParam->BSIM3vsattemp < 1.0e3)
{
fprintf (fplog,
"Warning: Vsat at current temperature = %g may be too small.\n",
pParam->BSIM3vsattemp);
printf ("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3vsattemp);
}
if (pParam->BSIM3pdibl1 < 0.0)
{
fprintf (fplog,
"Warning: Pdibl1 = %g is negative.\n",
pParam->BSIM3pdibl1);
printf ("Warning: Pdibl1 = %g is negative.\n",
pParam->BSIM3pdibl1);
}
if (pParam->BSIM3pdibl2 < 0.0)
{
fprintf (fplog,
"Warning: Pdibl2 = %g is negative.\n",
pParam->BSIM3pdibl2);
printf ("Warning: Pdibl2 = %g is negative.\n",
pParam->BSIM3pdibl2);
}
/* Check overlap capacitance parameters */
if (model->BSIM3cgdo < 0.0)
{
fprintf (fplog,
"Warning: cgdo = %g is negative. Set to zero.\n",
model->BSIM3cgdo);
printf ("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3cgdo);
model->BSIM3cgdo = 0.0;
}
if (model->BSIM3cgso < 0.0)
{
fprintf (fplog,
"Warning: cgso = %g is negative. Set to zero.\n",
model->BSIM3cgso);
printf ("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3cgso);
model->BSIM3cgso = 0.0;
}
if (model->BSIM3cgbo < 0.0)
{
fprintf (fplog,
"Warning: cgbo = %g is negative. Set to zero.\n",
model->BSIM3cgbo);
printf ("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3cgbo);
model->BSIM3cgbo = 0.0;
}
} /* loop for the parameter check for warning messages */
fclose (fplog);
if (pParam->BSIM3a2 < 0.01)
{ fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3a2);
printf("Warning: A2 = %g is too small. Set to 0.01.\n",
pParam->BSIM3a2);
pParam->BSIM3a2 = 0.01;
}
else
{
fprintf (stderr,
"Warning: Can't open log file. Parameter checking skipped.\n");
else if (pParam->BSIM3a2 > 1.0)
{ fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
pParam->BSIM3a2);
printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
pParam->BSIM3a2);
pParam->BSIM3a2 = 1.0;
pParam->BSIM3a1 = 0.0;
}
if (pParam->BSIM3rdsw < 0.0)
{ fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n",
pParam->BSIM3rdsw);
printf("Warning: Rdsw = %g is negative. Set to zero.\n",
pParam->BSIM3rdsw);
pParam->BSIM3rdsw = 0.0;
pParam->BSIM3rds0 = 0.0;
}
else if ((pParam->BSIM3rds0 > 0.0) && (pParam->BSIM3rds0 < 0.001))
{ fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n",
pParam->BSIM3rds0);
printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n",
pParam->BSIM3rds0);
pParam->BSIM3rds0 = 0.0;
}
if (pParam->BSIM3vsattemp < 1.0e3)
{ fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3vsattemp);
printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3vsattemp);
}
return (Fatal_Flag);
if (pParam->BSIM3pdibl1 < 0.0)
{ fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n",
pParam->BSIM3pdibl1);
printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3pdibl1);
}
if (pParam->BSIM3pdibl2 < 0.0)
{ fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n",
pParam->BSIM3pdibl2);
printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3pdibl2);
}
/* Check overlap capacitance parameters */
if (model->BSIM3cgdo < 0.0)
{ fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3cgdo);
printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3cgdo);
model->BSIM3cgdo = 0.0;
}
if (model->BSIM3cgso < 0.0)
{ fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3cgso);
printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3cgso);
model->BSIM3cgso = 0.0;
}
if (model->BSIM3cgbo < 0.0)
{ fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3cgbo);
printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3cgbo);
model->BSIM3cgbo = 0.0;
}
}/* loop for the parameter check for warning messages */
fclose(fplog);
}
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
return(Fatal_Flag);
}

194
src/spicelib/devices/bsim3/b3cvtest.c

@ -1,3 +1,5 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3cvtest.c of BSIM3v3.2.4
@ -7,16 +9,6 @@
* Modified by Paolo Nenzi 2002
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "cktdefs.h"
#include "bsim3def.h"
@ -28,111 +20,91 @@
int
BSIM3convTest (GENmodel * inModel, CKTcircuit * ckt)
BSIM3convTest (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM3model *model = (BSIM3model *) inModel;
BSIM3instance *here;
double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
BSIM3model *model = (BSIM3model*)inModel;
BSIM3instance *here;
double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
/* loop through all the BSIM3 device models */
for (; model != NULL; model = model->BSIM3nextModel)
{ /* loop through all the instances of the model */
for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{
/* loop through all the BSIM3 device models */
for (; model != NULL; model = model->BSIM3nextModel)
{ /* loop through all the instances of the model */
for (here = model->BSIM3instances; here != NULL ;
here=here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
if (here->BSIM3owner != ARCHme)
continue;
vbs = model->BSIM3type
* (*(ckt->CKTrhsOld + here->BSIM3bNode)
- *(ckt->CKTrhsOld +
here->BSIM3sNodePrime));
vgs = model->BSIM3type *
(*(ckt->CKTrhsOld + here->BSIM3gNode) -
*(ckt->CKTrhsOld + here->BSIM3sNodePrime));
vds = model->BSIM3type *
(*(ckt->CKTrhsOld + here->BSIM3dNodePrime) -
*(ckt->CKTrhsOld + here->BSIM3sNodePrime));
vbd = vbs - vds;
vgd = vgs - vds;
vgdo = *(ckt->CKTstate0 + here->BSIM3vgs)
- *(ckt->CKTstate0 + here->BSIM3vds);
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3vbs);
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3vbd);
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3vgs);
delvds = vds - *(ckt->CKTstate0 + here->BSIM3vds);
delvgd = vgd - vgdo;
vbs = model->BSIM3type
* (*(ckt->CKTrhsOld+here->BSIM3bNode)
- *(ckt->CKTrhsOld+here->BSIM3sNodePrime));
vgs = model->BSIM3type
* (*(ckt->CKTrhsOld+here->BSIM3gNode)
- *(ckt->CKTrhsOld+here->BSIM3sNodePrime));
vds = model->BSIM3type
* (*(ckt->CKTrhsOld+here->BSIM3dNodePrime)
- *(ckt->CKTrhsOld+here->BSIM3sNodePrime));
vbd = vbs - vds;
vgd = vgs - vds;
vgdo = *(ckt->CKTstate0 + here->BSIM3vgs)
- *(ckt->CKTstate0 + here->BSIM3vds);
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3vbs);
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3vbd);
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3vgs);
delvds = vds - *(ckt->CKTstate0 + here->BSIM3vds);
delvgd = vgd-vgdo;
cd = here->BSIM3cd - here->BSIM3cbd;
if (here->BSIM3mode >= 0)
{
cd += here->BSIM3csub;
cdhat = cd - here->BSIM3gbd * delvbd
+ (here->BSIM3gmbs +
here->BSIM3gbbs) * delvbs +
(here->BSIM3gm +
here->BSIM3gbgs) * delvgs +
(here->BSIM3gds +
here->BSIM3gbds) * delvds;
}
else
{
cdhat = cd + (here->BSIM3gmbs -
here->BSIM3gbd) * delvbd +
here->BSIM3gm * delvgd -
here->BSIM3gds * delvds;
}
cd = here->BSIM3cd - here->BSIM3cbd;
if (here->BSIM3mode >= 0)
{ cd += here->BSIM3csub;
cdhat = cd - here->BSIM3gbd * delvbd
+ (here->BSIM3gmbs + here->BSIM3gbbs) * delvbs
+ (here->BSIM3gm + here->BSIM3gbgs) * delvgs
+ (here->BSIM3gds + here->BSIM3gbds) * delvds;
}
else
{ cdhat = cd + (here->BSIM3gmbs - here->BSIM3gbd) * delvbd
+ here->BSIM3gm * delvgd - here->BSIM3gds * delvds;
}
/*
* check convergence
*/
if ((here->BSIM3off == 0)
|| (!(ckt->CKTmode & MODEINITFIX)))
{
tol = ckt->CKTreltol * MAX (fabs (cdhat),
fabs (cd)) +
ckt->CKTabstol;
if (fabs (cdhat - cd) >= tol)
{
ckt->CKTnoncon++;
return (OK);
}
cbs = here->BSIM3cbs;
cbd = here->BSIM3cbd;
if (here->BSIM3mode >= 0)
{
cbhat = cbs + cbd - here->BSIM3csub
+ here->BSIM3gbd * delvbd
+ (here->BSIM3gbs -
here->BSIM3gbbs) * delvbs -
here->BSIM3gbgs * delvgs -
here->BSIM3gbds * delvds;
}
else
{
cbhat = cbs + cbd - here->BSIM3csub
+ here->BSIM3gbs * delvbs
+ (here->BSIM3gbd -
here->BSIM3gbbs) * delvbd -
here->BSIM3gbgs * delvgd +
here->BSIM3gbds * delvds;
}
tol = ckt->CKTreltol * MAX (fabs (cbhat),
fabs (cbs + cbd -
here->
BSIM3csub))
+ ckt->CKTabstol;
if (fabs
(cbhat - (cbs + cbd - here->BSIM3csub)) >
tol)
{
ckt->CKTnoncon++;
return (OK);
}
}
}
}
return (OK);
/*
* check convergence
*/
if ((here->BSIM3off == 0) || (!(ckt->CKTmode & MODEINITFIX)))
{ tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd))
+ ckt->CKTabstol;
if (fabs(cdhat - cd) >= tol)
{ ckt->CKTnoncon++;
return(OK);
}
cbs = here->BSIM3cbs;
cbd = here->BSIM3cbd;
if (here->BSIM3mode >= 0)
{ cbhat = cbs + cbd - here->BSIM3csub
+ here->BSIM3gbd * delvbd
+ (here->BSIM3gbs - here->BSIM3gbbs) * delvbs
- here->BSIM3gbgs * delvgs
- here->BSIM3gbds * delvds;
}
else
{ cbhat = cbs + cbd - here->BSIM3csub
+ here->BSIM3gbs * delvbs
+ (here->BSIM3gbd - here->BSIM3gbbs) * delvbd
- here->BSIM3gbgs * delvgd
+ here->BSIM3gbds * delvds;
}
tol = ckt->CKTreltol * MAX(fabs(cbhat),
fabs(cbs + cbd - here->BSIM3csub)) + ckt->CKTabstol;
if (fabs(cbhat - (cbs + cbd - here->BSIM3csub)) > tol)
{ ckt->CKTnoncon++;
return(OK);
}
}
}
}
return(OK);
}

51
src/spicelib/devices/bsim3/b3del.c

@ -1,3 +1,5 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3del.c of BSIM3v3.2.4
@ -8,17 +10,6 @@
* Modified by Paolo Nenzi 2002
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "bsim3def.h"
#include "sperror.h"
@ -27,27 +18,23 @@
int
BSIM3delete (GENmodel * inModel, IFuid name, GENinstance ** inInst)
BSIM3delete (GENmodel *inModel, IFuid name, GENinstance **inInst)
{
BSIM3instance **fast = (BSIM3instance **) inInst;
BSIM3model *model = (BSIM3model *) inModel;
BSIM3instance **prev = NULL;
BSIM3instance *here;
BSIM3instance **fast = (BSIM3instance**)inInst;
BSIM3model *model = (BSIM3model*)inModel;
BSIM3instance **prev = NULL;
BSIM3instance *here;
for (; model; model = model->BSIM3nextModel)
{
prev = &(model->BSIM3instances);
for (here = *prev; here; here = *prev)
{
if (here->BSIM3name == name
|| (fast && here == *fast))
{
*prev = here->BSIM3nextInstance;
FREE (here);
return (OK);
}
prev = &(here->BSIM3nextInstance);
}
}
return (E_NODEV);
for (; model ; model = model->BSIM3nextModel)
{ prev = &(model->BSIM3instances);
for (here = *prev; here ; here = *prev)
{ if (here->BSIM3name == name || (fast && here==*fast))
{ *prev= here->BSIM3nextInstance;
FREE(here);
return(OK);
}
prev = &(here->BSIM3nextInstance);
}
}
return(E_NODEV);
}

58
src/spicelib/devices/bsim3/b3dest.c

@ -1,3 +1,5 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3dest.c of BSIM3v3.2.4
@ -7,48 +9,30 @@
* Modified by Paolo Nenzi 2002
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "bsim3def.h"
#include "suffix.h"
void
BSIM3destroy (GENmodel ** inModel)
BSIM3destroy (GENmodel **inModel)
{
BSIM3model **model = (BSIM3model **) inModel;
BSIM3instance *here;
BSIM3instance *prev = NULL;
BSIM3model *mod = *model;
BSIM3model *oldmod = NULL;
BSIM3model **model = (BSIM3model**)inModel;
BSIM3instance *here;
BSIM3instance *prev = NULL;
BSIM3model *mod = *model;
BSIM3model *oldmod = NULL;
for (; mod; mod = mod->BSIM3nextModel)
{
if (oldmod)
FREE (oldmod);
oldmod = mod;
prev = (BSIM3instance *) NULL;
for (here = mod->BSIM3instances; here;
here = here->BSIM3nextInstance)
{
if (prev)
FREE (prev);
prev = here;
}
if (prev)
FREE (prev);
}
if (oldmod)
FREE (oldmod);
*model = NULL;
return;
for (; mod ; mod = mod->BSIM3nextModel)
{ if(oldmod) FREE(oldmod);
oldmod = mod;
prev = (BSIM3instance *)NULL;
for (here = mod->BSIM3instances; here; here = here->BSIM3nextInstance)
{ if(prev) FREE(prev);
prev = here;
}
if(prev) FREE(prev);
}
if(oldmod) FREE(oldmod);
*model = NULL;
return;
}

73
src/spicelib/devices/bsim3/b3getic.c

@ -1,23 +1,13 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3getic.c of BSIM3v3.2.4
* Author: 1995 Min-Chie Jeng and Mansun Chan.
* Author: 1997-1999 Weidong Liu.
* Author: 2001 Xuemei Xi
* Modified by Paolo Nenzi 2002
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "cktdefs.h"
#include "bsim3def.h"
@ -26,39 +16,32 @@
int
BSIM3getic (GENmodel * inModel, CKTcircuit * ckt)
BSIM3getic (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM3model *model = (BSIM3model *) inModel;
BSIM3instance *here;
for (; model; model = model->BSIM3nextModel)
{
for (here = model->BSIM3instances; here;
here = here->BSIM3nextInstance)
{
BSIM3model *model = (BSIM3model*)inModel;
BSIM3instance *here;
for (; model ; model = model->BSIM3nextModel)
{ for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
if (!here->BSIM3icVBSGiven)
{ here->BSIM3icVBS = *(ckt->CKTrhs + here->BSIM3bNode)
- *(ckt->CKTrhs + here->BSIM3sNode);
}
if (!here->BSIM3icVDSGiven)
{ here->BSIM3icVDS = *(ckt->CKTrhs + here->BSIM3dNode)
- *(ckt->CKTrhs + here->BSIM3sNode);
}
if (!here->BSIM3icVGSGiven)
{ here->BSIM3icVGS = *(ckt->CKTrhs + here->BSIM3gNode)
- *(ckt->CKTrhs + here->BSIM3sNode);
}
}
}
return(OK);
}
if (here->BSIM3owner != ARCHme)
continue;
if (!here->BSIM3icVBSGiven)
{
here->BSIM3icVBS =
*(ckt->CKTrhs + here->BSIM3bNode) -
*(ckt->CKTrhs + here->BSIM3sNode);
}
if (!here->BSIM3icVDSGiven)
{
here->BSIM3icVDS =
*(ckt->CKTrhs + here->BSIM3dNode) -
*(ckt->CKTrhs + here->BSIM3sNode);
}
if (!here->BSIM3icVGSGiven)
{
here->BSIM3icVGS =
*(ckt->CKTrhs + here->BSIM3gNode) -
*(ckt->CKTrhs + here->BSIM3sNode);
}
}
}
return (OK);
}

5366
src/spicelib/devices/bsim3/b3ld.c
File diff suppressed because it is too large
View File

2452
src/spicelib/devices/bsim3/b3mask.c
File diff suppressed because it is too large
View File

71
src/spicelib/devices/bsim3/b3mdel.c

@ -1,3 +1,5 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3mdel.c of BSIM3v3.2.4
@ -7,52 +9,39 @@
* Modified by Paolo Nenzi 2002
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "bsim3def.h"
#include "sperror.h"
#include "suffix.h"
int
BSIM3mDelete (GENmodel ** inModel, IFuid modname, GENmodel * kill)
BSIM3mDelete (GENmodel **inModel, IFuid modname, GENmodel *kill)
{
BSIM3model **model = (BSIM3model **) inModel;
BSIM3model *modfast = (BSIM3model *) kill;
BSIM3instance *here;
BSIM3instance *prev = NULL;
BSIM3model **oldmod;
oldmod = model;
for (; *model; model = &((*model)->BSIM3nextModel))
{
if ((*model)->BSIM3modName == modname ||
(modfast && *model == modfast))
goto delgot;
oldmod = model;
}
return (E_NOMOD);
delgot:
*oldmod = (*model)->BSIM3nextModel; /* cut deleted device out of list */
for (here = (*model)->BSIM3instances; here;
here = here->BSIM3nextInstance)
{
if (prev)
FREE (prev);
prev = here;
}
if (prev)
FREE (prev);
FREE (*model);
return (OK);
BSIM3model **model = (BSIM3model**)inModel;
BSIM3model *modfast = (BSIM3model*)kill;
BSIM3instance *here;
BSIM3instance *prev = NULL;
BSIM3model **oldmod;
oldmod = model;
for (; *model ; model = &((*model)->BSIM3nextModel))
{ if ((*model)->BSIM3modName == modname ||
(modfast && *model == modfast))
goto delgot;
oldmod = model;
}
return(E_NOMOD);
delgot:
*oldmod = (*model)->BSIM3nextModel; /* cut deleted device out of list */
for (here = (*model)->BSIM3instances; here; here = here->BSIM3nextInstance)
{ if(prev) FREE(prev);
prev = here;
}
if(prev) FREE(prev);
FREE(*model);
return(OK);
}

62
src/spicelib/devices/bsim3/b3mpar.c

@ -1,23 +1,14 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3mpar.c of BSIM3v3.2.4
* Author: 1995 Min-Chie Jeng and Mansun Chan.
* Author: 1997-1999 Weidong Liu.
* Author: 2001 Xuemei Xi
* Modified by Paolo Nenzi 2002
* Modified by Paolo Nenzi 2002 and Dietmar Warning 2003
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "bsim3def.h"
#include "ifsim.h"
@ -46,12 +37,16 @@ BSIM3mParam(int param, IFvalue *value, GENmodel *inMod)
mod->BSIM3capMod = value->iValue;
mod->BSIM3capModGiven = TRUE;
break;
case BSIM3_MOD_ACMMOD:
mod->BSIM3acmMod = value->iValue;
mod->BSIM3acmModGiven = TRUE;
break;
case BSIM3_MOD_NOIMOD :
mod->BSIM3noiMod = value->iValue;
mod->BSIM3noiModGiven = TRUE;
break;
case BSIM3_MOD_VERSION :
mod->BSIM3version = value->sValue;
mod->BSIM3version = value->sValue;
mod->BSIM3versionGiven = TRUE;
break;
case BSIM3_MOD_TOX :
@ -441,6 +436,36 @@ BSIM3mParam(int param, IFvalue *value, GENmodel *inMod)
mod->BSIM3tpbswgGiven = TRUE;
break;
/* acm model */
case BSIM3_MOD_HDIF:
mod->BSIM3hdif = value->rValue;
mod->BSIM3hdifGiven = TRUE;
break;
case BSIM3_MOD_LDIF:
mod->BSIM3ldif = value->rValue;
mod->BSIM3ldifGiven = TRUE;
break;
case BSIM3_MOD_LD:
mod->BSIM3ld = value->rValue;
mod->BSIM3ldGiven = TRUE;
break;
case BSIM3_MOD_RD:
mod->BSIM3rd = value->rValue;
mod->BSIM3rdGiven = TRUE;
break;
case BSIM3_MOD_RS:
mod->BSIM3rs = value->rValue;
mod->BSIM3rsGiven = TRUE;
break;
case BSIM3_MOD_RDC:
mod->BSIM3rdc = value->rValue;
mod->BSIM3rdcGiven = TRUE;
break;
case BSIM3_MOD_RSC:
mod->BSIM3rsc = value->rValue;
mod->BSIM3rscGiven = TRUE;
break;
/* Length dependence */
case BSIM3_MOD_LCDSC :
mod->BSIM3lcdsc = value->rValue;
@ -1471,7 +1496,7 @@ BSIM3mParam(int param, IFvalue *value, GENmodel *inMod)
break;
case BSIM3_MOD_TNOM :
mod->BSIM3tnom = value->rValue + 273.15;
mod->BSIM3tnom = value->rValue;
mod->BSIM3tnomGiven = TRUE;
break;
case BSIM3_MOD_CGSO :
@ -1635,6 +1660,15 @@ BSIM3mParam(int param, IFvalue *value, GENmodel *inMod)
mod->BSIM3WmaxGiven = TRUE;
break;
case BSIM3_MOD_XL:
mod->BSIM3xl = value->rValue;
mod->BSIM3xlGiven = TRUE;
break;
case BSIM3_MOD_XW:
mod->BSIM3xw = value->rValue;
mod->BSIM3xwGiven = TRUE;
break;
case BSIM3_MOD_NOIA :
mod->BSIM3oxideTrapDensityA = value->rValue;
mod->BSIM3oxideTrapDensityAGiven = TRUE;

851
src/spicelib/devices/bsim3/b3noi.c

@ -1,3 +1,5 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3noi.c of BSIM3v3.2.4
@ -5,26 +7,16 @@
* Author: 1997-1999 Weidong Liu.
* Author: 2001 Xuemei Xi
* Modified by Xuemei Xi, 10/05, 12/21, 2001.
* Modified bt Paolo Nenzi 2002 and Dietmar Warning 2003
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "bsim3def.h"
#include "cktdefs.h"
#include "iferrmsg.h"
#include "noisedef.h"
#include "suffix.h"
#include "const.h" /* jwan */
#include "const.h" /* jwan */
/*
* BSIM3noise (mode, operation, firstModel, ckt, data, OnDens)
@ -52,9 +44,8 @@
Flicker noise = SPICE2 model
*/
extern void NevalSrc ();
extern double Nintegrate ();
extern void NevalSrc();
extern double Nintegrate();
/*
* The StrongInversionNoiseEval function has been modified in
@ -68,106 +59,115 @@ extern double Nintegrate ();
* 2002 Paolo Nenzi
*/
/*
* JX: 1/f noise model is smoothed out 12/18/01.
*/
double
StrongInversionNoiseEvalNew (double Vds, BSIM3model * model,
BSIM3instance * here, double freq, double temp)
StrongInversionNoiseEvalNew(double Vds, BSIM3model *model,
BSIM3instance *here, double freq, double temp)
{
struct bsim3SizeDependParam *pParam;
double cd, esat, DelClm, EffFreq, N0, Nl, Vgst;
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
pParam = here->pParam;
cd = fabs (here->BSIM3cd) * here->BSIM3m;
esat = 2.0 * pParam->BSIM3vsattemp / here->BSIM3ueff;
if (model->BSIM3em <= 0.0)
DelClm = 0.0;
else
{
T0 = ((((Vds - here->BSIM3Vdseff) / pParam->BSIM3litl)
+ model->BSIM3em) / esat);
DelClm = pParam->BSIM3litl * log (MAX (T0, N_MINLOG));
struct bsim3SizeDependParam *pParam;
double cd, esat, DelClm, EffFreq, N0, Nl;
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi;
pParam = here->pParam;
cd = fabs(here->BSIM3cd);
esat = 2.0 * pParam->BSIM3vsattemp / here->BSIM3ueff;
if(model->BSIM3em<=0.0) DelClm = 0.0;
else {
T0 = ((((Vds - here->BSIM3Vdseff) / pParam->BSIM3litl)
+ model->BSIM3em) / esat);
DelClm = pParam->BSIM3litl * log (MAX(T0, N_MINLOG));
}
EffFreq = pow (freq, model->BSIM3ef);
T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3ueff;
T2 = 1.0e8 * EffFreq * here->BSIM3Abulk * model->BSIM3cox
* pParam->BSIM3leff * pParam->BSIM3leff;
N0 = model->BSIM3cox * here->BSIM3Vgsteff / CHARGE;
Nl = model->BSIM3cox * here->BSIM3Vgsteff
* (1.0 - here->BSIM3AbovVgst2Vtm * here->BSIM3Vdseff) / CHARGE;
T3 = model->BSIM3oxideTrapDensityA
* log (MAX (((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG));
T4 = model->BSIM3oxideTrapDensityB * (N0 - Nl);
T5 = model->BSIM3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
T6 = 8.62e-5 * temp * cd * cd;
T7 = 1.0e8 * EffFreq * pParam->BSIM3leff
* pParam->BSIM3leff * pParam->BSIM3weff * here->BSIM3m;
T8 = model->BSIM3oxideTrapDensityA +
model->BSIM3oxideTrapDensityB * Nl +
model->BSIM3oxideTrapDensityC * Nl * Nl;
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
return Ssi;
EffFreq = pow(freq, model->BSIM3ef);
T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3ueff;
T2 = 1.0e8 * EffFreq * here->BSIM3Abulk * model->BSIM3cox
* pParam->BSIM3leff * pParam->BSIM3leff;
N0 = model->BSIM3cox * here->BSIM3Vgsteff / CHARGE;
Nl = model->BSIM3cox * here->BSIM3Vgsteff
* (1.0 - here->BSIM3AbovVgst2Vtm * here->BSIM3Vdseff) / CHARGE;
T3 = model->BSIM3oxideTrapDensityA
* log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG));
T4 = model->BSIM3oxideTrapDensityB * (N0 - Nl);
T5 = model->BSIM3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
T6 = 8.62e-5 * temp * cd * cd;
T7 = 1.0e8 * EffFreq * pParam->BSIM3leff
* pParam->BSIM3leff * pParam->BSIM3weff;
T8 = model->BSIM3oxideTrapDensityA + model->BSIM3oxideTrapDensityB * Nl
+ model->BSIM3oxideTrapDensityC * Nl * Nl;
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
return Ssi;
}
/*
* The code for releases: BSIM3V32, BSIM3V322, BSIM3V323
* follows
*/
double
StrongInversionNoiseEvalOld (double vgs, double vds, BSIM3model * model,
BSIM3instance * here, double freq, double temp)
StrongInversionNoiseEvalOld(double vgs, double vds, BSIM3model *model,
BSIM3instance *here, double freq, double temp)
{
struct bsim3SizeDependParam *pParam;
double cd, esat, DelClm, EffFreq, N0, Nl, Vgst;
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi;
pParam = here->pParam;
cd = fabs (here->BSIM3cd) * here->BSIM3m;
if (model->BSIM3em <= 0.0) /* flicker noise modified -JX */
DelClm = 0.0;
else if (vds > here->BSIM3vdsat)
cd = fabs (here->BSIM3cd);
/* Added revision dependent code */
if (model->BSIM3intVersion < BSIM3V323)
{
if (vds > here->BSIM3vdsat)
{
esat = 2.0 * pParam->BSIM3vsattemp / here->BSIM3ueff;
T0 = ((((vds - here->BSIM3vdsat) / pParam->BSIM3litl) +
model->BSIM3em) / esat);
model->BSIM3em) / esat);
DelClm = pParam->BSIM3litl * log (MAX (T0, N_MINLOG));
}
else
DelClm = 0.0;
}
else
DelClm = 0.0;
{
if (model->BSIM3em <= 0.0) /* flicker noise modified -JX */
DelClm = 0.0;
else if (vds > here->BSIM3vdsat)
{
esat = 2.0 * pParam->BSIM3vsattemp / here->BSIM3ueff;
T0 = ((((vds - here->BSIM3vdsat) / pParam->BSIM3litl) +
model->BSIM3em) / esat);
DelClm = pParam->BSIM3litl * log (MAX (T0, N_MINLOG));
}
else
DelClm = 0.0;
}
EffFreq = pow (freq, model->BSIM3ef);
T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3ueff;
T2 = 1.0e8 * EffFreq * model->BSIM3cox
* pParam->BSIM3leff * pParam->BSIM3leff;
* pParam->BSIM3leff * pParam->BSIM3leff;
Vgst = vgs - here->BSIM3von;
N0 = model->BSIM3cox * Vgst / CHARGE;
if (N0 < 0.0)
N0 = 0.0;
N0 = 0.0;
Nl = model->BSIM3cox * (Vgst - MIN (vds, here->BSIM3vdsat)) / CHARGE;
if (Nl < 0.0)
Nl = 0.0;
Nl = 0.0;
T3 = model->BSIM3oxideTrapDensityA
* log (MAX (((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG));
* log (MAX (((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG));
T4 = model->BSIM3oxideTrapDensityB * (N0 - Nl);
T5 = model->BSIM3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
T6 = 8.62e-5 * temp * cd * cd;
T7 = 1.0e8 * EffFreq * pParam->BSIM3leff
* pParam->BSIM3leff * pParam->BSIM3weff * here->BSIM3m;
T8 = model->BSIM3oxideTrapDensityA +
model->BSIM3oxideTrapDensityB * Nl +
model->BSIM3oxideTrapDensityC * Nl * Nl;
* pParam->BSIM3leff * pParam->BSIM3weff;
T8 = model->BSIM3oxideTrapDensityA + model->BSIM3oxideTrapDensityB * Nl
+ model->BSIM3oxideTrapDensityC * Nl * Nl;
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
@ -177,388 +177,329 @@ StrongInversionNoiseEvalOld (double vgs, double vds, BSIM3model * model,
int
BSIM3noise (int mode, int operation, GENmodel * inModel, CKTcircuit * ckt,
Ndata * data, double *OnDens)
BSIM3noise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt,
Ndata *data, double *OnDens)
{
BSIM3model *model = (BSIM3model *) inModel;
BSIM3instance *here;
struct bsim3SizeDependParam *pParam;
char name[N_MXVLNTH];
double tempOnoise;
double tempInoise;
double noizDens[BSIM3NSRCS];
double lnNdens[BSIM3NSRCS];
double vgs, vds, Slimit;
double N0, Nl;
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13;
double n, ExpArg, Ssi, Swi;
int error, i;
/* define the names of the noise sources */
static char *BSIM3nNames[BSIM3NSRCS] = { /* Note that we have to keep the order */
".rd", /* noise due to rd */
/* consistent with the index definitions */
".rs", /* noise due to rs */
/* in BSIM3defs.h */
".id", /* noise due to id */
".1overf", /* flicker (1/f) noise */
"" /* total transistor noise */
};
for (; model != NULL; model = model->BSIM3nextModel)
{
for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
pParam = here->pParam;
switch (operation)
{
case N_OPEN:
/* see if we have to to produce a summary report */
/* if so, name all the noise generators */
if (((NOISEAN *) ckt->CKTcurJob)->NStpsSm != 0)
{
switch (mode)
{
case N_DENS:
for (i = 0; i < BSIM3NSRCS; i++)
{
(void) sprintf (name,
"onoise.%s%s",
here->BSIM3name, BSIM3nNames[i]);
data->namelist =
(IFuid *)
trealloc ((char *) data->namelist,
(data->numPlots + 1) * sizeof (IFuid));
if (!data->namelist)
return (E_NOMEM);
(*
(SPfrontEnd->
IFnewUid)) (ckt,
&(data->
namelist
[data->
numPlots++]),
(IFuid)
NULL,
name, UID_OTHER, (void **) NULL);
/* we've added one more plot */
}
break;
case INT_NOIZ:
for (i = 0; i < BSIM3NSRCS; i++)
{
(void) sprintf (name,
"onoise_total.%s%s",
here->BSIM3name, BSIM3nNames[i]);
data->namelist =
(IFuid *)
trealloc ((char *) data->namelist,
(data->numPlots + 1) * sizeof (IFuid));
if (!data->namelist)
return (E_NOMEM);
(*
(SPfrontEnd->
IFnewUid)) (ckt,
&(data->
namelist
[data->
numPlots++]),
(IFuid)
NULL,
name, UID_OTHER, (void **) NULL);
/* we've added one more plot */
(void) sprintf (name,
"inoise_total.%s%s",
here->BSIM3name, BSIM3nNames[i]);
data->namelist =
(IFuid *)
trealloc ((char *) data->namelist,
(data->numPlots + 1) * sizeof (IFuid));
if (!data->namelist)
return (E_NOMEM);
(*
(SPfrontEnd->
IFnewUid)) (ckt,
&(data->
namelist
[data->
numPlots++]),
(IFuid)
NULL,
name, UID_OTHER, (void **) NULL);
/* we've added one more plot */
}
break;
}
}
break;
case N_CALC:
switch (mode)
{
case N_DENS:
NevalSrc (&noizDens[BSIM3RDNOIZ],
&lnNdens[BSIM3RDNOIZ], ckt,
THERMNOISE,
here->BSIM3dNodePrime,
here->BSIM3dNode,
here->BSIM3drainConductance * here->BSIM3m);
NevalSrc (&noizDens[BSIM3RSNOIZ],
&lnNdens[BSIM3RSNOIZ], ckt,
THERMNOISE,
here->BSIM3sNodePrime,
here->BSIM3sNode,
here->BSIM3sourceConductance * here->BSIM3m);
switch (model->BSIM3noiMod)
{
case 1:
case 3:
NevalSrc (&noizDens
[BSIM3IDNOIZ],
&lnNdens
[BSIM3IDNOIZ], ckt,
THERMNOISE,
here->
BSIM3dNodePrime,
here->
BSIM3sNodePrime,
(2.0 / 3.0 *
fabs (here->
BSIM3gm +
here->
BSIM3gds +
here->BSIM3gmbs)) * here->BSIM3m);
BSIM3model *model = (BSIM3model *)inModel;
BSIM3instance *here;
struct bsim3SizeDependParam *pParam;
char name[N_MXVLNTH];
double tempOnoise;
double tempInoise;
double noizDens[BSIM3NSRCS];
double lnNdens[BSIM3NSRCS];
double vgs, vds, Slimit;
double T1, T10, T11;
double Ssi, Swi;
double m;
int i;
/* define the names of the noise sources */
static char *BSIM3nNames[BSIM3NSRCS] =
{ /* Note that we have to keep the order */
".rd", /* noise due to rd */
/* consistent with the index definitions */
".rs", /* noise due to rs */
/* in BSIM3defs.h */
".id", /* noise due to id */
".1overf", /* flicker (1/f) noise */
"" /* total transistor noise */
};
for (; model != NULL; model = model->BSIM3nextModel)
{ for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{ pParam = here->pParam;
switch (operation)
{ case N_OPEN:
/* see if we have to to produce a summary report */
/* if so, name all the noise generators */
if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0)
{ switch (mode)
{ case N_DENS:
for (i = 0; i < BSIM3NSRCS; i++)
{ (void) sprintf(name, "onoise.%s%s",
here->BSIM3name,
BSIM3nNames[i]);
data->namelist = (IFuid *) trealloc(
(char *) data->namelist,
(data->numPlots + 1)
* sizeof(IFuid));
if (!data->namelist)
return(E_NOMEM);
(*(SPfrontEnd->IFnewUid)) (ckt,
&(data->namelist[data->numPlots++]),
(IFuid) NULL, name, UID_OTHER,
(void **) NULL);
/* we've added one more plot */
}
break;
case INT_NOIZ:
for (i = 0; i < BSIM3NSRCS; i++)
{ (void) sprintf(name, "onoise_total.%s%s",
here->BSIM3name,
BSIM3nNames[i]);
data->namelist = (IFuid *) trealloc(
(char *) data->namelist,
(data->numPlots + 1)
* sizeof(IFuid));
if (!data->namelist)
return(E_NOMEM);
(*(SPfrontEnd->IFnewUid)) (ckt,
&(data->namelist[data->numPlots++]),
(IFuid) NULL, name, UID_OTHER,
(void **) NULL);
/* we've added one more plot */
(void) sprintf(name, "inoise_total.%s%s",
here->BSIM3name,
BSIM3nNames[i]);
data->namelist = (IFuid *) trealloc(
(char *) data->namelist,
(data->numPlots + 1)
* sizeof(IFuid));
if (!data->namelist)
return(E_NOMEM);
(*(SPfrontEnd->IFnewUid)) (ckt,
&(data->namelist[data->numPlots++]),
(IFuid) NULL, name, UID_OTHER,
(void **)NULL);
/* we've added one more plot */
}
break;
}
}
break;
case 2:
case 4:
NevalSrc (&noizDens[BSIM3IDNOIZ], &lnNdens[BSIM3IDNOIZ], ckt,
THERMNOISE, here->BSIM3dNodePrime, here->BSIM3sNodePrime,
(here->BSIM3ueff * fabs (here->BSIM3qinv) * here->BSIM3m /
(pParam->BSIM3leff * pParam->BSIM3leff + here->BSIM3ueff *
fabs (here->BSIM3qinv) * here->BSIM3m *
(here->BSIM3rds / here->BSIM3m)))); /* bugfix */
break;
}
NevalSrc (&noizDens[BSIM3FLNOIZ],
(double *) NULL, ckt,
N_GAIN,
here->BSIM3dNodePrime,
here->BSIM3sNodePrime, (double) 0.0);
switch (model->BSIM3noiMod)
{
case 1:
case 4:
noizDens[BSIM3FLNOIZ] *=
model->BSIM3kf *
exp (model->BSIM3af *
log (MAX
(fabs
(here->
BSIM3cd *
here->
BSIM3m),
N_MINLOG)))
/
(pow
(data->freq,
model->BSIM3ef) *
pParam->BSIM3leff *
pParam->BSIM3leff * model->BSIM3cox);
break;
case 2:
case 3:
vgs = *(ckt->CKTstates[0] + here->BSIM3vgs);
vds = *(ckt->CKTstates[0] + here->BSIM3vds);
if (vds < 0.0)
{
vds = -vds;
vgs = vgs + vds;
}
/* Added revision dependent code */
if (model->BSIM3intVersion == BSIM3V324)
{
Ssi =
StrongInversionNoiseEvalNew (vds, model, here,
data->freq,
ckt->CKTtemp);
T10 =
model->BSIM3oxideTrapDensityA * 8.62e-5 *
ckt->CKTtemp;
T11 =
pParam->BSIM3weff * here->BSIM3m *
pParam->BSIM3leff * pow (data->freq,
model->BSIM3ef) * 4.0e36;
Swi =
T10 / T11 * here->BSIM3cd * here->BSIM3m *
here->BSIM3cd * here->BSIM3m;
T1 = Swi + Ssi;
if (T1 > 0.0)
noizDens[BSIM3FLNOIZ] *= (Ssi * Swi) / T1;
else
noizDens[BSIM3FLNOIZ] *= 0.0;
}
else
{ /*BSIM3V32 || BSIM3V322 || BSIM3V323 */
if (vgs >= here->BSIM3von + 0.1)
{
Ssi =
StrongInversionNoiseEvalOld (vgs, vds, model,
here, data->freq,
ckt->CKTtemp);
noizDens[BSIM3FLNOIZ] *= Ssi;
}
else
{
pParam = here->pParam;
T10 = model->
BSIM3oxideTrapDensityA
* 8.62e-5 * ckt->CKTtemp;
T11 = pParam->BSIM3weff *
here->BSIM3m * pParam-> BSIM3leff *
pow (data->freq, model->BSIM3ef) * 4.0e36;
Swi = T10 / T11 * (here->BSIM3cd * here->BSIM3m) * (here->BSIM3cd * here->BSIM3m);
Slimit =
StrongInversionNoiseEvalOld (here->BSIM3von +
0.1, vds, model,
here, data->freq,
ckt->CKTtemp);
T1 = Swi + Slimit;
if (T1 > 0.0)
noizDens[BSIM3FLNOIZ] *= (Slimit * Swi) / T1;
case N_CALC:
m = here->BSIM3m;
switch (mode)
{ case N_DENS:
NevalSrc(&noizDens[BSIM3RDNOIZ],
&lnNdens[BSIM3RDNOIZ], ckt, THERMNOISE,
here->BSIM3dNodePrime, here->BSIM3dNode,
here->BSIM3drainConductance * m);
NevalSrc(&noizDens[BSIM3RSNOIZ],
&lnNdens[BSIM3RSNOIZ], ckt, THERMNOISE,
here->BSIM3sNodePrime, here->BSIM3sNode,
here->BSIM3sourceConductance * m);
switch( model->BSIM3noiMod )
{ case 1:
case 3:
NevalSrc(&noizDens[BSIM3IDNOIZ],
&lnNdens[BSIM3IDNOIZ], ckt,
THERMNOISE, here->BSIM3dNodePrime,
here->BSIM3sNodePrime,
(2.0 / 3.0 * fabs(here->BSIM3gm
+ here->BSIM3gds
+ here->BSIM3gmbs)) * m);
break;
case 2:
case 4:
/* Added revision dependent code */
if (model->BSIM3intVersion == BSIM3V324)
{
NevalSrc(&noizDens[BSIM3IDNOIZ],
&lnNdens[BSIM3IDNOIZ], ckt,
THERMNOISE, here->BSIM3dNodePrime,
here->BSIM3sNodePrime,
(m * here->BSIM3ueff
* fabs(here->BSIM3qinv)
/ (pParam->BSIM3leff * pParam->BSIM3leff
+ here->BSIM3ueff * fabs(here->BSIM3qinv)
* here->BSIM3rds))); /* bugfix */
}
else
{ /* for all versions lower then 3.2.4 */
NevalSrc(&noizDens[BSIM3IDNOIZ],
&lnNdens[BSIM3IDNOIZ], ckt,
THERMNOISE, here->BSIM3dNodePrime,
here->BSIM3sNodePrime,
(m * here->BSIM3ueff
* fabs(here->BSIM3qinv
/ (pParam->BSIM3leff
* pParam->BSIM3leff))));
}
break;
}
NevalSrc(&noizDens[BSIM3FLNOIZ], (double*) NULL,
ckt, N_GAIN, here->BSIM3dNodePrime,
here->BSIM3sNodePrime, (double) 0.0);
switch( model->BSIM3noiMod )
{ case 1:
case 4:
noizDens[BSIM3FLNOIZ] *= m * model->BSIM3kf
* exp(model->BSIM3af
* log(MAX(fabs(here->BSIM3cd),
N_MINLOG)))
/ (pow(data->freq, model->BSIM3ef)
* pParam->BSIM3leff
* pParam->BSIM3leff
* model->BSIM3cox);
break;
case 2:
case 3:
vgs = *(ckt->CKTstates[0] + here->BSIM3vgs);
vds = *(ckt->CKTstates[0] + here->BSIM3vds);
if (vds < 0.0)
{ vds = -vds;
vgs = vgs + vds;
}
/* Added revision dependent code */
if (model->BSIM3intVersion == BSIM3V324)
{
Ssi = StrongInversionNoiseEvalNew(vds, model,
here, data->freq, ckt->CKTtemp);
T10 = model->BSIM3oxideTrapDensityA
* 8.62e-5 * ckt->CKTtemp;
T11 = pParam->BSIM3weff
* pParam->BSIM3leff
* pow(data->freq, model->BSIM3ef)
* 4.0e36;
Swi = T10 / T11 * here->BSIM3cd
* here->BSIM3cd;
T1 = Swi + Ssi;
if (T1 > 0.0)
noizDens[BSIM3FLNOIZ] *= m * (Ssi * Swi) / T1;
else
noizDens[BSIM3FLNOIZ] *= 0.0;
}
else
{ /* for all versions lower then 3.2.4 */
if (vgs >= here->BSIM3von + 0.1)
{
Ssi = StrongInversionNoiseEvalOld(vgs, vds, model,
here, data->freq, ckt->CKTtemp);
noizDens[BSIM3FLNOIZ] *= m * Ssi;
}
else
{
pParam = here->pParam;
T10 = model->BSIM3oxideTrapDensityA
* 8.62e-5 * ckt->CKTtemp;
T11 = pParam->BSIM3weff
* pParam-> BSIM3leff
* pow (data->freq, model->BSIM3ef)
* 4.0e36;
Swi = T10 / T11 * here->BSIM3cd * here->BSIM3cd;
Slimit = StrongInversionNoiseEvalOld(
here->BSIM3von + 0.1, vds, model,
here, data->freq, ckt->CKTtemp);
T1 = Swi + Slimit;
if (T1 > 0.0)
noizDens[BSIM3FLNOIZ] *= m * (Slimit * Swi) / T1;
else
noizDens[BSIM3FLNOIZ] *= 0.0;
}
}
break;
}
lnNdens[BSIM3FLNOIZ] =
log(MAX(noizDens[BSIM3FLNOIZ], N_MINLOG));
noizDens[BSIM3TOTNOIZ] = noizDens[BSIM3RDNOIZ]
+ noizDens[BSIM3RSNOIZ]
+ noizDens[BSIM3IDNOIZ]
+ noizDens[BSIM3FLNOIZ];
lnNdens[BSIM3TOTNOIZ] =
log(MAX(noizDens[BSIM3TOTNOIZ], N_MINLOG));
*OnDens += noizDens[BSIM3TOTNOIZ];
if (data->delFreq == 0.0)
{ /* if we haven't done any previous
integration, we need to initialize our
"history" variables.
*/
for (i = 0; i < BSIM3NSRCS; i++)
{ here->BSIM3nVar[LNLSTDENS][i] =
lnNdens[i];
}
/* clear out our integration variables
if it's the first pass
*/
if (data->freq ==
((NOISEAN*) ckt->CKTcurJob)->NstartFreq)
{ for (i = 0; i < BSIM3NSRCS; i++)
{ here->BSIM3nVar[OUTNOIZ][i] = 0.0;
here->BSIM3nVar[INNOIZ][i] = 0.0;
}
}
}
else
noizDens[BSIM3FLNOIZ] *= 0.0;
}
}
{ /* data->delFreq != 0.0,
we have to integrate.
*/
for (i = 0; i < BSIM3NSRCS; i++)
{ if (i != BSIM3TOTNOIZ)
{ tempOnoise = Nintegrate(noizDens[i],
lnNdens[i],
here->BSIM3nVar[LNLSTDENS][i],
data);
tempInoise = Nintegrate(noizDens[i]
* data->GainSqInv, lnNdens[i]
+ data->lnGainInv,
here->BSIM3nVar[LNLSTDENS][i]
+ data->lnGainInv, data);
here->BSIM3nVar[LNLSTDENS][i] =
lnNdens[i];
data->outNoiz += tempOnoise;
data->inNoise += tempInoise;
if (((NOISEAN*)
ckt->CKTcurJob)->NStpsSm != 0)
{ here->BSIM3nVar[OUTNOIZ][i]
+= tempOnoise;
here->BSIM3nVar[OUTNOIZ][BSIM3TOTNOIZ]
+= tempOnoise;
here->BSIM3nVar[INNOIZ][i]
+= tempInoise;
here->BSIM3nVar[INNOIZ][BSIM3TOTNOIZ]
+= tempInoise;
}
}
}
}
if (data->prtSummary)
{ for (i = 0; i < BSIM3NSRCS; i++)
{ /* print a summary report */
data->outpVector[data->outNumber++]
= noizDens[i];
}
}
break;
case INT_NOIZ:
/* already calculated, just output */
if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0)
{ for (i = 0; i < BSIM3NSRCS; i++)
{ data->outpVector[data->outNumber++]
= here->BSIM3nVar[OUTNOIZ][i];
data->outpVector[data->outNumber++]
= here->BSIM3nVar[INNOIZ][i];
}
}
break;
}
break;
}
lnNdens[BSIM3FLNOIZ] =
log (MAX (noizDens[BSIM3FLNOIZ], N_MINLOG));
noizDens[BSIM3TOTNOIZ] =
noizDens[BSIM3RDNOIZ] +
noizDens[BSIM3RSNOIZ] +
noizDens[BSIM3IDNOIZ] + noizDens[BSIM3FLNOIZ];
lnNdens[BSIM3TOTNOIZ] =
log (MAX (noizDens[BSIM3TOTNOIZ], N_MINLOG));
*OnDens += noizDens[BSIM3TOTNOIZ];
if (data->delFreq == 0.0)
{ /* if we haven't done any previous
* integration, we need to initialize our
* "history" variables.
*/
for (i = 0; i < BSIM3NSRCS; i++)
{
here->BSIM3nVar[LNLSTDENS][i] = lnNdens[i];
}
/* clear out our integration variables
* if it's the first pass
*/
if (data->freq ==
((NOISEAN *) ckt->CKTcurJob)->NstartFreq)
{
for (i = 0; i < BSIM3NSRCS; i++)
{
here->BSIM3nVar[OUTNOIZ][i] = 0.0;
here->BSIM3nVar[INNOIZ][i] = 0.0;
}
}
}
else
{ /* data->delFreq != 0.0,
* we have to integrate.
*/
for (i = 0; i < BSIM3NSRCS; i++)
{
if (i != BSIM3TOTNOIZ)
{
tempOnoise =
Nintegrate
(noizDens
[i],
lnNdens
[i], here->BSIM3nVar[LNLSTDENS][i], data);
tempInoise =
Nintegrate
(noizDens
[i] *
data->
GainSqInv,
lnNdens
[i] +
data->
lnGainInv,
here->
BSIM3nVar
[LNLSTDENS][i] + data->lnGainInv, data);
here->BSIM3nVar[LNLSTDENS][i] = lnNdens[i];
data->outNoiz += tempOnoise;
data->inNoise += tempInoise;
if (((NOISEAN *) ckt->CKTcurJob)->NStpsSm != 0)
{
here->BSIM3nVar[OUTNOIZ][i] += tempOnoise;
here->BSIM3nVar[OUTNOIZ][BSIM3TOTNOIZ] +=
tempOnoise;
here->BSIM3nVar[INNOIZ][i] += tempInoise;
here->BSIM3nVar[INNOIZ][BSIM3TOTNOIZ] +=
tempInoise;
}
}
}
}
if (data->prtSummary)
{
for (i = 0; i < BSIM3NSRCS; i++)
{ /* print a summary report */
data->outpVector[data->outNumber++] = noizDens[i];
}
}
break;
case INT_NOIZ:
/* already calculated, just output */
if (((NOISEAN *) ckt->CKTcurJob)->NStpsSm != 0)
{
for (i = 0; i < BSIM3NSRCS; i++)
{
data->outpVector
[data->outNumber++] = here->BSIM3nVar[OUTNOIZ][i];
data->outpVector
[data->outNumber++] = here->BSIM3nVar[INNOIZ][i];
}
}
break;
}
break;
case N_CLOSE:
/* do nothing, the main calling routine will close */
return (OK);
break; /* the plots */
} /* switch (operation) */
} /* for here */
} /* for model */
return (OK);
case N_CLOSE:
/* do nothing, the main calling routine will close */
return (OK);
break; /* the plots */
} /* switch (operation) */
} /* for here */
} /* for model */
return(OK);
}

174
src/spicelib/devices/bsim3/b3par.c

@ -1,23 +1,14 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3par.c of BSIM3v3.2.4
* Author: 1995 Min-Chie Jeng and Mansun Chan
* Author: 1997-1999 Weidong Liu.
* Author: 2001 Xuemei Xi
* Modified by Paolo Nenzi 2002
* Modified by Paolo Nenzi 2002 and Dietmar Warning 2003
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "ifsim.h"
#include "bsim3def.h"
@ -25,85 +16,86 @@
#include "suffix.h"
int
BSIM3param (int param, IFvalue * value, GENinstance * inst, IFvalue * select)
BSIM3param (int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
BSIM3instance *here = (BSIM3instance *) inst;
switch (param)
{
case BSIM3_W:
here->BSIM3w = value->rValue;
here->BSIM3wGiven = TRUE;
break;
case BSIM3_L:
here->BSIM3l = value->rValue;
here->BSIM3lGiven = TRUE;
break;
BSIM3instance *here = (BSIM3instance*)inst;
switch(param)
{ case BSIM3_W:
here->BSIM3w = value->rValue;
here->BSIM3wGiven = TRUE;
break;
case BSIM3_L:
here->BSIM3l = value->rValue;
here->BSIM3lGiven = TRUE;
break;
case BSIM3_M:
here->BSIM3m = value->rValue;
here->BSIM3mGiven = TRUE;
break;
case BSIM3_AS:
here->BSIM3sourceArea = value->rValue;
here->BSIM3sourceAreaGiven = TRUE;
break;
case BSIM3_AD:
here->BSIM3drainArea = value->rValue;
here->BSIM3drainAreaGiven = TRUE;
break;
case BSIM3_PS:
here->BSIM3sourcePerimeter = value->rValue;
here->BSIM3sourcePerimeterGiven = TRUE;
break;
case BSIM3_PD:
here->BSIM3drainPerimeter = value->rValue;
here->BSIM3drainPerimeterGiven = TRUE;
break;
case BSIM3_NRS:
here->BSIM3sourceSquares = value->rValue;
here->BSIM3sourceSquaresGiven = TRUE;
break;
case BSIM3_NRD:
here->BSIM3drainSquares = value->rValue;
here->BSIM3drainSquaresGiven = TRUE;
break;
case BSIM3_OFF:
here->BSIM3off = value->iValue;
break;
case BSIM3_IC_VBS:
here->BSIM3icVBS = value->rValue;
here->BSIM3icVBSGiven = TRUE;
break;
case BSIM3_IC_VDS:
here->BSIM3icVDS = value->rValue;
here->BSIM3icVDSGiven = TRUE;
break;
case BSIM3_IC_VGS:
here->BSIM3icVGS = value->rValue;
here->BSIM3icVGSGiven = TRUE;
break;
case BSIM3_NQSMOD:
here->BSIM3nqsMod = value->iValue;
here->BSIM3nqsModGiven = TRUE;
break;
case BSIM3_IC:
switch (value->v.numValue)
{
case 3:
here->BSIM3icVBS = *(value->v.vec.rVec + 2);
here->BSIM3icVBSGiven = TRUE;
case 2:
here->BSIM3icVGS = *(value->v.vec.rVec + 1);
here->BSIM3icVGSGiven = TRUE;
case 1:
here->BSIM3icVDS = *(value->v.vec.rVec);
here->BSIM3icVDSGiven = TRUE;
break;
default:
return (E_BADPARM);
}
break;
default:
return (E_BADPARM);
}
return (OK);
here->BSIM3m = value->rValue;
here->BSIM3mGiven = TRUE;
break;
case BSIM3_AS:
here->BSIM3sourceArea = value->rValue;
here->BSIM3sourceAreaGiven = TRUE;
break;
case BSIM3_AD:
here->BSIM3drainArea = value->rValue;
here->BSIM3drainAreaGiven = TRUE;
break;
case BSIM3_PS:
here->BSIM3sourcePerimeter = value->rValue;
here->BSIM3sourcePerimeterGiven = TRUE;
break;
case BSIM3_PD:
here->BSIM3drainPerimeter = value->rValue;
here->BSIM3drainPerimeterGiven = TRUE;
break;
case BSIM3_NRS:
here->BSIM3sourceSquares = value->rValue;
here->BSIM3sourceSquaresGiven = TRUE;
break;
case BSIM3_NRD:
here->BSIM3drainSquares = value->rValue;
here->BSIM3drainSquaresGiven = TRUE;
break;
case BSIM3_OFF:
here->BSIM3off = value->iValue;
break;
case BSIM3_IC_VBS:
here->BSIM3icVBS = value->rValue;
here->BSIM3icVBSGiven = TRUE;
break;
case BSIM3_IC_VDS:
here->BSIM3icVDS = value->rValue;
here->BSIM3icVDSGiven = TRUE;
break;
case BSIM3_IC_VGS:
here->BSIM3icVGS = value->rValue;
here->BSIM3icVGSGiven = TRUE;
break;
case BSIM3_NQSMOD:
here->BSIM3nqsMod = value->iValue;
here->BSIM3nqsModGiven = TRUE;
break;
case BSIM3_IC:
switch(value->v.numValue){
case 3:
here->BSIM3icVBS = *(value->v.vec.rVec+2);
here->BSIM3icVBSGiven = TRUE;
case 2:
here->BSIM3icVGS = *(value->v.vec.rVec+1);
here->BSIM3icVGSGiven = TRUE;
case 1:
here->BSIM3icVDS = *(value->v.vec.rVec);
here->BSIM3icVDSGiven = TRUE;
break;
default:
return(E_BADPARM);
}
break;
default:
return(E_BADPARM);
}
return(OK);
}

811
src/spicelib/devices/bsim3/b3pzld.c

@ -1,3 +1,5 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3pzld.c of BSIM3v3.2.4
@ -7,17 +9,6 @@
* Modified by Paolo Nenzi 2002
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "cktdefs.h"
#include "complex.h"
@ -26,453 +17,355 @@
#include "suffix.h"
int
BSIM3pzLoad (GENmodel * inModel, CKTcircuit * ckt, SPcomplex * s)
BSIM3pzLoad (GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
{
BSIM3model *model = (BSIM3model *) inModel;
BSIM3instance *here;
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb;
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb;
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm,
Gmbs;
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb;
double GSoverlapCap, GDoverlapCap, GBoverlapCap;
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb,
xcqbb;
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Cdb, Csg, Csd, Css, Csb;
double ScalingFactor = 1.0e-9;
double m;
for (; model != NULL; model = model->BSIM3nextModel)
{
for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
if (here->BSIM3mode >= 0)
{
Gm = here->BSIM3gm;
Gmbs = here->BSIM3gmbs;
FwdSum = Gm + Gmbs;
RevSum = 0.0;
gbbdp = -here->BSIM3gbds;
gbbsp = here->BSIM3gbds + here->BSIM3gbgs +
here->BSIM3gbbs;
gbdpg = here->BSIM3gbgs;
gbdpdp = here->BSIM3gbds;
gbdpb = here->BSIM3gbbs;
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
gbspg = 0.0;
gbspdp = 0.0;
gbspb = 0.0;
gbspsp = 0.0;
if (here->BSIM3nqsMod == 0)
{
cggb = here->BSIM3cggb;
cgsb = here->BSIM3cgsb;
cgdb = here->BSIM3cgdb;
cbgb = here->BSIM3cbgb;
cbsb = here->BSIM3cbsb;
cbdb = here->BSIM3cbdb;
cdgb = here->BSIM3cdgb;
cdsb = here->BSIM3cdsb;
cddb = here->BSIM3cddb;
xgtg = xgtd = xgts = xgtb = 0.0;
sxpart = 0.6;
dxpart = 0.4;
ddxpart_dVd = ddxpart_dVg =
ddxpart_dVb = ddxpart_dVs =
0.0;
dsxpart_dVd = dsxpart_dVg =
dsxpart_dVb = dsxpart_dVs =
0.0;
}
else
{
cggb = cgdb = cgsb = 0.0;
cbgb = cbdb = cbsb = 0.0;
cdgb = cddb = cdsb = 0.0;
xgtg = here->BSIM3gtg;
xgtd = here->BSIM3gtd;
xgts = here->BSIM3gts;
xgtb = here->BSIM3gtb;
xcqgb = here->BSIM3cqgb;
xcqdb = here->BSIM3cqdb;
xcqsb = here->BSIM3cqsb;
xcqbb = here->BSIM3cqbb;
CoxWL = model->BSIM3cox *
here->pParam->BSIM3weffCV *
here->pParam->BSIM3leffCV;
qcheq = -(here->BSIM3qgate +
here->BSIM3qbulk);
if (fabs (qcheq) <= 1.0e-5 * CoxWL)
{
if (model->BSIM3xpart < 0.5)
{
dxpart = 0.4;
}
else if (model->BSIM3xpart >
0.5)
{
dxpart = 0.0;
}
else
{
dxpart = 0.5;
}
ddxpart_dVd = ddxpart_dVg =
ddxpart_dVb =
ddxpart_dVs = 0.0;
}
else
{
dxpart = here->BSIM3qdrn /
qcheq;
Cdd = here->BSIM3cddb;
Csd = -(here->BSIM3cgdb +
here->BSIM3cddb +
here->BSIM3cbdb);
ddxpart_dVd =
(Cdd -
dxpart * (Cdd +
Csd)) /
qcheq;
Cdg = here->BSIM3cdgb;
Csg = -(here->BSIM3cggb +
here->BSIM3cdgb +
here->BSIM3cbgb);
ddxpart_dVg =
(Cdg -
dxpart * (Cdg +
Csg)) /
qcheq;
Cds = here->BSIM3cdsb;
Css = -(here->BSIM3cgsb +
here->BSIM3cdsb +
here->BSIM3cbsb);
ddxpart_dVs =
(Cds -
dxpart * (Cds +
Css)) /
qcheq;
ddxpart_dVb =
-(ddxpart_dVd +
ddxpart_dVg +
ddxpart_dVs);
}
sxpart = 1.0 - dxpart;
dsxpart_dVd = -ddxpart_dVd;
dsxpart_dVg = -ddxpart_dVg;
dsxpart_dVs = -ddxpart_dVs;
dsxpart_dVb =
-(dsxpart_dVd + dsxpart_dVg +
dsxpart_dVs);
}
}
else
{
Gm = -here->BSIM3gm;
Gmbs = -here->BSIM3gmbs;
FwdSum = 0.0;
RevSum = -(Gm + Gmbs);
gbbsp = -here->BSIM3gbds;
gbbdp = here->BSIM3gbds + here->BSIM3gbgs +
here->BSIM3gbbs;
gbdpg = 0.0;
gbdpsp = 0.0;
gbdpb = 0.0;
gbdpdp = 0.0;
gbspg = here->BSIM3gbgs;
gbspsp = here->BSIM3gbds;
gbspb = here->BSIM3gbbs;
gbspdp = -(gbspg + gbspsp + gbspb);
if (here->BSIM3nqsMod == 0)
{
cggb = here->BSIM3cggb;
cgsb = here->BSIM3cgdb;
cgdb = here->BSIM3cgsb;
cbgb = here->BSIM3cbgb;
cbsb = here->BSIM3cbdb;
cbdb = here->BSIM3cbsb;
cdgb = -(here->BSIM3cdgb + cggb +
cbgb);
cdsb = -(here->BSIM3cddb + cgsb +
cbsb);
cddb = -(here->BSIM3cdsb + cgdb +
cbdb);
xgtg = xgtd = xgts = xgtb = 0.0;
sxpart = 0.4;
dxpart = 0.6;
ddxpart_dVd = ddxpart_dVg =
ddxpart_dVb = ddxpart_dVs =
0.0;
dsxpart_dVd = dsxpart_dVg =
dsxpart_dVb = dsxpart_dVs =
0.0;
}
else
{
cggb = cgdb = cgsb = 0.0;
cbgb = cbdb = cbsb = 0.0;
cdgb = cddb = cdsb = 0.0;
xgtg = here->BSIM3gtg;
xgtd = here->BSIM3gts;
xgts = here->BSIM3gtd;
xgtb = here->BSIM3gtb;
xcqgb = here->BSIM3cqgb;
xcqdb = here->BSIM3cqsb;
xcqsb = here->BSIM3cqdb;
xcqbb = here->BSIM3cqbb;
CoxWL = model->BSIM3cox *
here->pParam->BSIM3weffCV *
here->pParam->BSIM3leffCV;
qcheq = -(here->BSIM3qgate +
here->BSIM3qbulk);
if (fabs (qcheq) <= 1.0e-5 * CoxWL)
{
if (model->BSIM3xpart < 0.5)
{
sxpart = 0.4;
}
else if (model->BSIM3xpart >
0.5)
{
sxpart = 0.0;
}
else
{
sxpart = 0.5;
}
dsxpart_dVd = dsxpart_dVg =
dsxpart_dVb =
dsxpart_dVs = 0.0;
}
else
{
sxpart = here->BSIM3qdrn /
qcheq;
Css = here->BSIM3cddb;
Cds = -(here->BSIM3cgdb +
here->BSIM3cddb +
here->BSIM3cbdb);
dsxpart_dVs =
(Css -
sxpart * (Css +
Cds)) /
qcheq;
Csg = here->BSIM3cdgb;
Cdg = -(here->BSIM3cggb +
here->BSIM3cdgb +
here->BSIM3cbgb);
dsxpart_dVg =
(Csg -
sxpart * (Csg +
Cdg)) /
qcheq;
Csd = here->BSIM3cdsb;
Cdd = -(here->BSIM3cgsb +
here->BSIM3cdsb +
here->BSIM3cbsb);
dsxpart_dVd =
(Csd -
sxpart * (Csd +
Cdd)) /
qcheq;
dsxpart_dVb =
-(dsxpart_dVd +
dsxpart_dVg +
dsxpart_dVs);
}
dxpart = 1.0 - sxpart;
ddxpart_dVd = -dsxpart_dVd;
ddxpart_dVg = -dsxpart_dVg;
ddxpart_dVs = -dsxpart_dVs;
ddxpart_dVb =
-(ddxpart_dVd + ddxpart_dVg +
ddxpart_dVs);
}
}
T1 = *(ckt->CKTstate0 +
here->BSIM3qdef) * here->BSIM3gtau;
gdpr = here->BSIM3drainConductance;
gspr = here->BSIM3sourceConductance;
gds = here->BSIM3gds;
gbd = here->BSIM3gbd;
gbs = here->BSIM3gbs;
capbd = here->BSIM3capbd;
capbs = here->BSIM3capbs;
GSoverlapCap = here->BSIM3cgso;
GDoverlapCap = here->BSIM3cgdo;
GBoverlapCap = here->pParam->BSIM3cgbo;
xcdgb = (cdgb - GDoverlapCap);
xcddb = (cddb + capbd + GDoverlapCap);
xcdsb = cdsb;
xcdbb = -(xcdgb + xcddb + xcdsb);
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap);
xcsdb = -(cgdb + cbdb + cddb);
xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb));
xcsbb = -(xcsgb + xcsdb + xcssb);
xcggb = (cggb + GDoverlapCap + GSoverlapCap +
GBoverlapCap);
xcgdb = (cgdb - GDoverlapCap);
xcgsb = (cgsb - GSoverlapCap);
xcgbb = -(xcggb + xcgdb + xcgsb);
xcbgb = (cbgb - GBoverlapCap);
xcbdb = (cbdb - capbd);
xcbsb = (cbsb - capbs);
xcbbb = -(xcbgb + xcbdb + xcbsb);
m = here->BSIM3m;
*(here->BSIM3GgPtr) += m * (xcggb * s->real);
*(here->BSIM3GgPtr + 1) += m * (xcggb * s->imag);
*(here->BSIM3BbPtr) += m * (xcbbb * s->real);
*(here->BSIM3BbPtr + 1) += m * (xcbbb * s->imag);
*(here->BSIM3DPdpPtr) += m * (xcddb * s->real);
*(here->BSIM3DPdpPtr + 1) += m * (xcddb * s->imag);
*(here->BSIM3SPspPtr) += m * (xcssb * s->real);
*(here->BSIM3SPspPtr + 1) += m * (xcssb * s->imag);
*(here->BSIM3GbPtr) += m * (xcgbb * s->real);
*(here->BSIM3GbPtr + 1) += m * (xcgbb * s->imag);
*(here->BSIM3GdpPtr) += m * (xcgdb * s->real);
*(here->BSIM3GdpPtr + 1) += m * (xcgdb * s->imag);
*(here->BSIM3GspPtr) += m * (xcgsb * s->real);
*(here->BSIM3GspPtr + 1) += m * (xcgsb * s->imag);
*(here->BSIM3BgPtr) += m * (xcbgb * s->real);
*(here->BSIM3BgPtr + 1) += m * (xcbgb * s->imag);
*(here->BSIM3BdpPtr) += m * (xcbdb * s->real);
*(here->BSIM3BdpPtr + 1) += m * (xcbdb * s->imag);
*(here->BSIM3BspPtr) += m * (xcbsb * s->real);
*(here->BSIM3BspPtr + 1) += m * (xcbsb * s->imag);
*(here->BSIM3DPgPtr) += m * (xcdgb * s->real);
*(here->BSIM3DPgPtr + 1) += m * (xcdgb * s->imag);
*(here->BSIM3DPbPtr) += m * (xcdbb * s->real);
*(here->BSIM3DPbPtr + 1) += m * (xcdbb * s->imag);
*(here->BSIM3DPspPtr) += m * (xcdsb * s->real);
*(here->BSIM3DPspPtr + 1) += m * (xcdsb * s->imag);
*(here->BSIM3SPgPtr) += m * (xcsgb * s->real);
*(here->BSIM3SPgPtr + 1) += m * (xcsgb * s->imag);
*(here->BSIM3SPbPtr) += m * (xcsbb * s->real);
*(here->BSIM3SPbPtr + 1) += m * (xcsbb * s->imag);
*(here->BSIM3SPdpPtr) += m * (xcsdb * s->real);
*(here->BSIM3SPdpPtr + 1) += m * (xcsdb * s->imag);
*(here->BSIM3DdPtr) += m * gdpr;
*(here->BSIM3DdpPtr) -= m * gdpr;
*(here->BSIM3DPdPtr) -= m * gdpr;
*(here->BSIM3SsPtr) += m * gspr;
*(here->BSIM3SspPtr) -= m * gspr;
*(here->BSIM3SPsPtr) -= m * gspr;
*(here->BSIM3BgPtr) -= m * here->BSIM3gbgs;
*(here->BSIM3BbPtr) +=
m * (gbd + gbs - here->BSIM3gbbs);
*(here->BSIM3BdpPtr) -= m * (gbd - gbbdp);
*(here->BSIM3BspPtr) -= m * (gbs - gbbsp);
*(here->BSIM3DPgPtr) += m * (Gm + dxpart * xgtg
+ T1 * ddxpart_dVg +
gbdpg);
*(here->BSIM3DPdpPtr) +=
m * (gdpr + gds + gbd + RevSum +
dxpart * xgtd + T1 * ddxpart_dVd +
gbdpdp);
*(here->BSIM3DPspPtr) -=
m * (gds + FwdSum - dxpart * xgts -
T1 * ddxpart_dVs - gbdpsp);
*(here->BSIM3DPbPtr) -=
m * (gbd - Gmbs - dxpart * xgtb -
T1 * ddxpart_dVb - gbdpb);
*(here->BSIM3SPgPtr) -= m * (Gm - sxpart * xgtg
- T1 * dsxpart_dVg -
gbspg);
*(here->BSIM3SPspPtr) +=
m * (gspr + gds + gbs + FwdSum +
sxpart * xgts + T1 * dsxpart_dVs +
gbspsp);
*(here->BSIM3SPbPtr) -=
m * (gbs + Gmbs - sxpart * xgtb -
T1 * dsxpart_dVb - gbspb);
*(here->BSIM3SPdpPtr) -=
m * (gds + RevSum - sxpart * xgtd -
T1 * dsxpart_dVd - gbspdp);
*(here->BSIM3GgPtr) -= m * xgtg;
*(here->BSIM3GbPtr) -= m * xgtb;
*(here->BSIM3GdpPtr) -= m * xgtd;
*(here->BSIM3GspPtr) -= m * xgts;
if (here->BSIM3nqsMod)
{
*(here->BSIM3QqPtr) +=
m * (s->real * ScalingFactor);
*(here->BSIM3QqPtr + 1) +=
m * (s->imag * ScalingFactor);
*(here->BSIM3QgPtr) -= m * (xcqgb * s->real);
*(here->BSIM3QgPtr + 1) -=
m * (xcqgb * s->imag);
*(here->BSIM3QdpPtr) -= m * (xcqdb * s->real);
*(here->BSIM3QdpPtr + 1) -=
m * (xcqdb * s->imag);
*(here->BSIM3QbPtr) -= m * (xcqbb * s->real);
*(here->BSIM3QbPtr + 1) -=
m * (xcqbb * s->imag);
*(here->BSIM3QspPtr) -= m * (xcqsb * s->real);
*(here->BSIM3QspPtr + 1) -=
m * (xcqsb * s->imag);
*(here->BSIM3GqPtr) -= m * here->BSIM3gtau;
*(here->BSIM3DPqPtr) +=
m * (dxpart * here->BSIM3gtau);
*(here->BSIM3SPqPtr) +=
m * (sxpart * here->BSIM3gtau);
*(here->BSIM3QqPtr) += m * (here->BSIM3gtau);
*(here->BSIM3QgPtr) += m * xgtg;
*(here->BSIM3QdpPtr) += m * xgtd;
*(here->BSIM3QbPtr) += m * xgtb;
*(here->BSIM3QspPtr) += m * xgts;
}
}
}
return (OK);
BSIM3model *model = (BSIM3model*)inModel;
BSIM3instance *here;
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb;
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb;
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm, Gmbs;
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb;
double GSoverlapCap, GDoverlapCap, GBoverlapCap;
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb, xcqbb;
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css;
double ScalingFactor = 1.0e-9;
double m;
for (; model != NULL; model = model->BSIM3nextModel)
{ for (here = model->BSIM3instances; here!= NULL;
here = here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
if (here->BSIM3mode >= 0)
{ Gm = here->BSIM3gm;
Gmbs = here->BSIM3gmbs;
FwdSum = Gm + Gmbs;
RevSum = 0.0;
gbbdp = -here->BSIM3gbds;
gbbsp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs;
gbdpg = here->BSIM3gbgs;
gbdpdp = here->BSIM3gbds;
gbdpb = here->BSIM3gbbs;
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
gbspg = 0.0;
gbspdp = 0.0;
gbspb = 0.0;
gbspsp = 0.0;
if (here->BSIM3nqsMod == 0)
{ cggb = here->BSIM3cggb;
cgsb = here->BSIM3cgsb;
cgdb = here->BSIM3cgdb;
cbgb = here->BSIM3cbgb;
cbsb = here->BSIM3cbsb;
cbdb = here->BSIM3cbdb;
cdgb = here->BSIM3cdgb;
cdsb = here->BSIM3cdsb;
cddb = here->BSIM3cddb;
xgtg = xgtd = xgts = xgtb = 0.0;
sxpart = 0.6;
dxpart = 0.4;
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
= ddxpart_dVs = 0.0;
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
= dsxpart_dVs = 0.0;
}
else
{ cggb = cgdb = cgsb = 0.0;
cbgb = cbdb = cbsb = 0.0;
cdgb = cddb = cdsb = 0.0;
xgtg = here->BSIM3gtg;
xgtd = here->BSIM3gtd;
xgts = here->BSIM3gts;
xgtb = here->BSIM3gtb;
xcqgb = here->BSIM3cqgb;
xcqdb = here->BSIM3cqdb;
xcqsb = here->BSIM3cqsb;
xcqbb = here->BSIM3cqbb;
CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV
* here->pParam->BSIM3leffCV;
qcheq = -(here->BSIM3qgate + here->BSIM3qbulk);
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
{ if (model->BSIM3xpart < 0.5)
{ dxpart = 0.4;
}
else if (model->BSIM3xpart > 0.5)
{ dxpart = 0.0;
}
else
{ dxpart = 0.5;
}
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
= ddxpart_dVs = 0.0;
}
else
{ dxpart = here->BSIM3qdrn / qcheq;
Cdd = here->BSIM3cddb;
Csd = -(here->BSIM3cgdb + here->BSIM3cddb
+ here->BSIM3cbdb);
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq;
Cdg = here->BSIM3cdgb;
Csg = -(here->BSIM3cggb + here->BSIM3cdgb
+ here->BSIM3cbgb);
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq;
Cds = here->BSIM3cdsb;
Css = -(here->BSIM3cgsb + here->BSIM3cdsb
+ here->BSIM3cbsb);
ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq;
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg
+ ddxpart_dVs);
}
sxpart = 1.0 - dxpart;
dsxpart_dVd = -ddxpart_dVd;
dsxpart_dVg = -ddxpart_dVg;
dsxpart_dVs = -ddxpart_dVs;
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs);
}
}
else
{ Gm = -here->BSIM3gm;
Gmbs = -here->BSIM3gmbs;
FwdSum = 0.0;
RevSum = -(Gm + Gmbs);
gbbsp = -here->BSIM3gbds;
gbbdp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs;
gbdpg = 0.0;
gbdpsp = 0.0;
gbdpb = 0.0;
gbdpdp = 0.0;
gbspg = here->BSIM3gbgs;
gbspsp = here->BSIM3gbds;
gbspb = here->BSIM3gbbs;
gbspdp = -(gbspg + gbspsp + gbspb);
if (here->BSIM3nqsMod == 0)
{ cggb = here->BSIM3cggb;
cgsb = here->BSIM3cgdb;
cgdb = here->BSIM3cgsb;
cbgb = here->BSIM3cbgb;
cbsb = here->BSIM3cbdb;
cbdb = here->BSIM3cbsb;
cdgb = -(here->BSIM3cdgb + cggb + cbgb);
cdsb = -(here->BSIM3cddb + cgsb + cbsb);
cddb = -(here->BSIM3cdsb + cgdb + cbdb);
xgtg = xgtd = xgts = xgtb = 0.0;
sxpart = 0.4;
dxpart = 0.6;
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
= ddxpart_dVs = 0.0;
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
= dsxpart_dVs = 0.0;
}
else
{ cggb = cgdb = cgsb = 0.0;
cbgb = cbdb = cbsb = 0.0;
cdgb = cddb = cdsb = 0.0;
xgtg = here->BSIM3gtg;
xgtd = here->BSIM3gts;
xgts = here->BSIM3gtd;
xgtb = here->BSIM3gtb;
xcqgb = here->BSIM3cqgb;
xcqdb = here->BSIM3cqsb;
xcqsb = here->BSIM3cqdb;
xcqbb = here->BSIM3cqbb;
CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV
* here->pParam->BSIM3leffCV;
qcheq = -(here->BSIM3qgate + here->BSIM3qbulk);
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
{ if (model->BSIM3xpart < 0.5)
{ sxpart = 0.4;
}
else if (model->BSIM3xpart > 0.5)
{ sxpart = 0.0;
}
else
{ sxpart = 0.5;
}
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
= dsxpart_dVs = 0.0;
}
else
{ sxpart = here->BSIM3qdrn / qcheq;
Css = here->BSIM3cddb;
Cds = -(here->BSIM3cgdb + here->BSIM3cddb
+ here->BSIM3cbdb);
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq;
Csg = here->BSIM3cdgb;
Cdg = -(here->BSIM3cggb + here->BSIM3cdgb
+ here->BSIM3cbgb);
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq;
Csd = here->BSIM3cdsb;
Cdd = -(here->BSIM3cgsb + here->BSIM3cdsb
+ here->BSIM3cbsb);
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq;
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg
+ dsxpart_dVs);
}
dxpart = 1.0 - sxpart;
ddxpart_dVd = -dsxpart_dVd;
ddxpart_dVg = -dsxpart_dVg;
ddxpart_dVs = -dsxpart_dVs;
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs);
}
}
T1 = *(ckt->CKTstate0 + here->BSIM3qdef) * here->BSIM3gtau;
gdpr = here->BSIM3drainConductance;
gspr = here->BSIM3sourceConductance;
gds = here->BSIM3gds;
gbd = here->BSIM3gbd;
gbs = here->BSIM3gbs;
capbd = here->BSIM3capbd;
capbs = here->BSIM3capbs;
GSoverlapCap = here->BSIM3cgso;
GDoverlapCap = here->BSIM3cgdo;
GBoverlapCap = here->pParam->BSIM3cgbo;
xcdgb = (cdgb - GDoverlapCap);
xcddb = (cddb + capbd + GDoverlapCap);
xcdsb = cdsb;
xcdbb = -(xcdgb + xcddb + xcdsb);
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap);
xcsdb = -(cgdb + cbdb + cddb);
xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb));
xcsbb = -(xcsgb + xcsdb + xcssb);
xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap);
xcgdb = (cgdb - GDoverlapCap);
xcgsb = (cgsb - GSoverlapCap);
xcgbb = -(xcggb + xcgdb + xcgsb);
xcbgb = (cbgb - GBoverlapCap);
xcbdb = (cbdb - capbd);
xcbsb = (cbsb - capbs);
xcbbb = -(xcbgb + xcbdb + xcbsb);
m = here->BSIM3m;
*(here->BSIM3GgPtr ) += m * (xcggb * s->real);
*(here->BSIM3GgPtr +1) += m * (xcggb * s->imag);
*(here->BSIM3BbPtr ) += m * (xcbbb * s->real);
*(here->BSIM3BbPtr +1) += m * (xcbbb * s->imag);
*(here->BSIM3DPdpPtr ) += m * (xcddb * s->real);
*(here->BSIM3DPdpPtr +1) += m * (xcddb * s->imag);
*(here->BSIM3SPspPtr ) += m * (xcssb * s->real);
*(here->BSIM3SPspPtr +1) += m * (xcssb * s->imag);
*(here->BSIM3GbPtr ) += m * (xcgbb * s->real);
*(here->BSIM3GbPtr +1) += m * (xcgbb * s->imag);
*(here->BSIM3GdpPtr ) += m * (xcgdb * s->real);
*(here->BSIM3GdpPtr +1) += m * (xcgdb * s->imag);
*(here->BSIM3GspPtr ) += m * (xcgsb * s->real);
*(here->BSIM3GspPtr +1) += m * (xcgsb * s->imag);
*(here->BSIM3BgPtr ) += m * (xcbgb * s->real);
*(here->BSIM3BgPtr +1) += m * (xcbgb * s->imag);
*(here->BSIM3BdpPtr ) += m * (xcbdb * s->real);
*(here->BSIM3BdpPtr +1) += m * (xcbdb * s->imag);
*(here->BSIM3BspPtr ) += m * (xcbsb * s->real);
*(here->BSIM3BspPtr +1) += m * (xcbsb * s->imag);
*(here->BSIM3DPgPtr ) += m * (xcdgb * s->real);
*(here->BSIM3DPgPtr +1) += m * (xcdgb * s->imag);
*(here->BSIM3DPbPtr ) += m * (xcdbb * s->real);
*(here->BSIM3DPbPtr +1) += m * (xcdbb * s->imag);
*(here->BSIM3DPspPtr ) += m * (xcdsb * s->real);
*(here->BSIM3DPspPtr +1) += m * (xcdsb * s->imag);
*(here->BSIM3SPgPtr ) += m * (xcsgb * s->real);
*(here->BSIM3SPgPtr +1) += m * (xcsgb * s->imag);
*(here->BSIM3SPbPtr ) += m * (xcsbb * s->real);
*(here->BSIM3SPbPtr +1) += m * (xcsbb * s->imag);
*(here->BSIM3SPdpPtr ) += m * (xcsdb * s->real);
*(here->BSIM3SPdpPtr +1) += m * (xcsdb * s->imag);
*(here->BSIM3DdPtr) += m * gdpr;
*(here->BSIM3DdpPtr) -= m * gdpr;
*(here->BSIM3DPdPtr) -= m * gdpr;
*(here->BSIM3SsPtr) += m * gspr;
*(here->BSIM3SspPtr) -= m * gspr;
*(here->BSIM3SPsPtr) -= m * gspr;
*(here->BSIM3BgPtr) -= m * here->BSIM3gbgs;
*(here->BSIM3BbPtr) += m * (gbd + gbs - here->BSIM3gbbs);
*(here->BSIM3BdpPtr) -= m * (gbd - gbbdp);
*(here->BSIM3BspPtr) -= m * (gbs - gbbsp);
*(here->BSIM3DPgPtr) += Gm + dxpart * xgtg
+ T1 * ddxpart_dVg + gbdpg;
*(here->BSIM3DPdpPtr) += gdpr + gds + gbd + RevSum
+ dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp;
*(here->BSIM3DPspPtr) -= gds + FwdSum - dxpart * xgts
- T1 * ddxpart_dVs - gbdpsp;
*(here->BSIM3DPbPtr) -= gbd - Gmbs - dxpart * xgtb
- T1 * ddxpart_dVb - gbdpb;
*(here->BSIM3SPgPtr) -= Gm - sxpart * xgtg
- T1 * dsxpart_dVg - gbspg;
*(here->BSIM3SPspPtr) += gspr + gds + gbs + FwdSum
+ sxpart * xgts + T1 * dsxpart_dVs + gbspsp;
*(here->BSIM3SPbPtr) -= gbs + Gmbs - sxpart * xgtb
- T1 * dsxpart_dVb - gbspb;
*(here->BSIM3SPdpPtr) -= gds + RevSum - sxpart * xgtd
- T1 * dsxpart_dVd - gbspdp;
*(here->BSIM3GgPtr) -= xgtg;
*(here->BSIM3GbPtr) -= xgtb;
*(here->BSIM3GdpPtr) -= xgtd;
*(here->BSIM3GspPtr) -= xgts;
if (here->BSIM3nqsMod)
{ *(here->BSIM3QqPtr ) += m * (s->real * ScalingFactor);
*(here->BSIM3QqPtr +1) += m * (s->imag * ScalingFactor);
*(here->BSIM3QgPtr ) -= m * (xcqgb * s->real);
*(here->BSIM3QgPtr +1) -= m * (xcqgb * s->imag);
*(here->BSIM3QdpPtr ) -= m * (xcqdb * s->real);
*(here->BSIM3QdpPtr +1) -= m * (xcqdb * s->imag);
*(here->BSIM3QbPtr ) -= m * (xcqbb * s->real);
*(here->BSIM3QbPtr +1) -= m * (xcqbb * s->imag);
*(here->BSIM3QspPtr ) -= m * (xcqsb * s->real);
*(here->BSIM3QspPtr +1) -= xcqsb * s->imag;
*(here->BSIM3GqPtr) -= m * (here->BSIM3gtau);
*(here->BSIM3DPqPtr) += m * (dxpart * here->BSIM3gtau);
*(here->BSIM3SPqPtr) += m * (sxpart * here->BSIM3gtau);
*(here->BSIM3QqPtr) += m * (here->BSIM3gtau);
*(here->BSIM3QgPtr) += m * xgtg;
*(here->BSIM3QdpPtr) += m * xgtd;
*(here->BSIM3QbPtr) += m * xgtb;
*(here->BSIM3QspPtr) += m * xgts;
}
}
}
return(OK);
}

2046
src/spicelib/devices/bsim3/b3set.c
File diff suppressed because it is too large
View File

2136
src/spicelib/devices/bsim3/b3temp.c
File diff suppressed because it is too large
View File

56
src/spicelib/devices/bsim3/b3trunc.c

@ -1,3 +1,5 @@
/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b3trunc.c of BSIM3v3.2.4
@ -7,17 +9,6 @@
* Modified by Poalo Nenzi 2002
**********/
/*
* Release Notes:
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
*/
/*************************************/
#include "ngspice.h"
#include "cktdefs.h"
#include "bsim3def.h"
@ -26,35 +17,34 @@
int
BSIM3trunc (GENmodel * inModel, CKTcircuit * ckt, double *timeStep)
BSIM3trunc (GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
BSIM3model *model = (BSIM3model *) inModel;
BSIM3instance *here;
BSIM3model *model = (BSIM3model*)inModel;
BSIM3instance *here;
#ifdef STEPDEBUG
double debugtemp;
double debugtemp;
#endif /* STEPDEBUG */
for (; model != NULL; model = model->BSIM3nextModel)
{
for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
for (; model != NULL; model = model->BSIM3nextModel)
{ for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{
if (here->BSIM3owner != ARCHme)
continue;
#ifdef STEPDEBUG
debugtemp = *timeStep;
debugtemp = *timeStep;
#endif /* STEPDEBUG */
CKTterr (here->BSIM3qb, ckt, timeStep);
CKTterr (here->BSIM3qg, ckt, timeStep);
CKTterr (here->BSIM3qd, ckt, timeStep);
CKTterr(here->BSIM3qb,ckt,timeStep);
CKTterr(here->BSIM3qg,ckt,timeStep);
CKTterr(here->BSIM3qd,ckt,timeStep);
#ifdef STEPDEBUG
if (debugtemp != *timeStep)
{
printf ("device %s reduces step from %g to %g\n", here->BSIM3name, debugtemp, *timeStep);
}
if(debugtemp != *timeStep)
{ printf("device %s reduces step from %g to %g\n",
here->BSIM3name,debugtemp,*timeStep);
}
#endif /* STEPDEBUG */
}
}
return (OK);
}
}
return(OK);
}

55
src/spicelib/devices/bsim3/bsim3def.h

@ -3,7 +3,7 @@ Copyright 2001 Regents of the University of California. All rights reserved.
Author: 1995 Min-Chie Jeng and Mansun Chan.
Author: 1997-1999 Weidong Liu.
Author: 2001 Xuemei Xi
Modified by Paolo Nenzi 2002
Modified by Paolo Nenzi 2002 and Dietmar Warning 2003
File: bsim3def.h
**********/
@ -21,7 +21,7 @@ typedef struct sBSIM3instance
struct sBSIM3model *BSIM3modPtr;
struct sBSIM3instance *BSIM3nextInstance;
IFuid BSIM3name;
int BSIM3owner; /* number of owner process */
int BSIM3owner; /* number of owner process */
int BSIM3states; /* index into state table for this device */
int BSIM3dNode;
int BSIM3gNode;
@ -39,9 +39,9 @@ typedef struct sBSIM3instance
double BSIM3cgdo;
double BSIM3cgso;
double BSIM3vjsm;
double BSIM3IsEvjsm;
double BSIM3IsEvjsm;
double BSIM3vjdm;
double BSIM3IsEvjdm;
double BSIM3IsEvjdm;
double BSIM3l;
double BSIM3w;
@ -108,7 +108,7 @@ typedef struct sBSIM3instance
double BSIM3Vgsteff;
double BSIM3Vdseff;
double BSIM3Abulk;
double BSIM3AbovVgst2Vtm;
double BSIM3AbovVgst2Vtm;
struct bsim3SizeDependParam *pParam;
@ -161,7 +161,6 @@ typedef struct sBSIM3instance
double *BSIM3SPqPtr;
double *BSIM3BqPtr;
#define BSIM3vbd BSIM3states+ 0
#define BSIM3vbs BSIM3states+ 1
#define BSIM3vgs BSIM3states+ 2
@ -353,11 +352,11 @@ typedef struct sBSIM3model
int BSIM3mobMod;
int BSIM3capMod;
int BSIM3acmMod;
int BSIM3noiMod;
int BSIM3binUnit;
int BSIM3paramChk;
char *BSIM3version;
char *BSIM3version;
/* The following field is an integer coding
* of BSIM3version.
*/
@ -464,6 +463,15 @@ typedef struct sBSIM3model
double BSIM3tpbsw;
double BSIM3tpbswg;
/* acm model */
double BSIM3hdif;
double BSIM3ldif;
double BSIM3ld;
double BSIM3rd;
double BSIM3rs;
double BSIM3rdc;
double BSIM3rsc;
/* Length Dependence */
double BSIM3lcdsc;
double BSIM3lcdscb;
@ -772,6 +780,9 @@ typedef struct sBSIM3model
double BSIM3Wmin;
double BSIM3Wmax;
/* acm model */
double BSIM3xl;
double BSIM3xw;
/* Pre-calculated constants */
/* MCJ: move to size-dependent param. */
@ -806,6 +817,7 @@ typedef struct sBSIM3model
unsigned BSIM3mobModGiven :1;
unsigned BSIM3binUnitGiven :1;
unsigned BSIM3capModGiven :1;
unsigned BSIM3acmModGiven :1;
unsigned BSIM3paramChkGiven :1;
unsigned BSIM3noiModGiven :1;
unsigned BSIM3typeGiven :1;
@ -907,6 +919,14 @@ typedef struct sBSIM3model
unsigned BSIM3tpbswGiven :1;
unsigned BSIM3tpbswgGiven :1;
/* acm model */
unsigned BSIM3hdifGiven :1;
unsigned BSIM3ldifGiven :1;
unsigned BSIM3ldGiven :1;
unsigned BSIM3rdGiven :1;
unsigned BSIM3rsGiven :1;
unsigned BSIM3rdcGiven :1;
unsigned BSIM3rscGiven :1;
/* Length dependence */
unsigned BSIM3lcdscGiven :1;
@ -1223,6 +1243,10 @@ typedef struct sBSIM3model
unsigned BSIM3WminGiven :1;
unsigned BSIM3WmaxGiven :1;
/* acm model */
unsigned BSIM3xlGiven :1;
unsigned BSIM3xwGiven :1;
} BSIM3model;
@ -1251,6 +1275,7 @@ typedef struct sBSIM3model
/* model parameters */
#define BSIM3_MOD_CAPMOD 101
#define BSIM3_MOD_ACMMOD 102
#define BSIM3_MOD_MOBMOD 103
#define BSIM3_MOD_NOIMOD 104
@ -1715,6 +1740,18 @@ typedef struct sBSIM3model
#define BSIM3_MOD_WWC 701
#define BSIM3_MOD_WWLC 702
/* acm parameters */
#define BSIM3_MOD_XL 703
#define BSIM3_MOD_XW 704
#define BSIM3_MOD_HDIF 711
#define BSIM3_MOD_LDIF 712
#define BSIM3_MOD_LD 713
#define BSIM3_MOD_RD 714
#define BSIM3_MOD_RS 715
#define BSIM3_MOD_RDC 716
#define BSIM3_MOD_RSC 717
/* device questions */
#define BSIM3_DNODE 751
#define BSIM3_GNODE 752
@ -1770,6 +1807,4 @@ extern void BSIM3evaluate(double,double,double,BSIM3instance*,BSIM3model*,
extern int BSIM3debug(BSIM3model*, BSIM3instance*, CKTcircuit*, int);
extern int BSIM3checkModel(BSIM3model*, BSIM3instance*, CKTcircuit*);
#endif /*BSIM3*/

3
src/spicelib/devices/bsim3/bsim3ext.h

@ -29,6 +29,3 @@ extern int BSIM3temp(GENmodel*,CKTcircuit*);
extern int BSIM3trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM3unsetup(GENmodel*,CKTcircuit*);

10
src/spicelib/devices/bsim3/bsim3init.c

@ -1,13 +1,13 @@
#include <config.h>
#include "config.h"
#include <devdefs.h>
#include "devdefs.h"
#include "bsim3itf.h"
#include "bsim3ext.h"
#include "bsim3init.h"
SPICEdev B3info = {
SPICEdev BSIM3info = {
{ "BSIM3",
"Berkeley Short Channel IGFET Model Version-3",
@ -69,7 +69,7 @@ SPICEdev B3info = {
#ifdef CIDER
DEVdump : NULL,
DEVacct : NULL,
#endif
#endif
DEVinstSize : &BSIM3iSize,
DEVmodSize : &BSIM3mSize
@ -79,5 +79,5 @@ SPICEdev B3info = {
SPICEdev *
get_bsim3_info(void)
{
return &B3info;
return &BSIM3info;
}
Loading…
Cancel
Save