Code merged into bsim4v4

This commit is contained in:
dwarning 2011-06-19 13:45:53 +00:00
parent 747c606e30
commit a1d0aca288
54 changed files with 0 additions and 39960 deletions

View File

@ -1,6 +0,0 @@
Makefile.in
Makefile
.deps
.libs
*.lo
*.la

View File

@ -1,33 +0,0 @@
The terms under which the software is provided are as the following.
Software is distributed as is, completely without warranty or service
support. The University of California and its employees are not liable
for the condition or performance of the software.
The University owns the copyright but shall not be liable for any
infringement of copyright or other proprietary rights brought by third
parties against the users of the software.
The University of California hereby disclaims all implied warranties.
The University of California grants the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions:
1. The users agree not to charge for the University of California code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
the UC Berkeley BSIM Research Group that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to obey all U.S. Government restrictions governing
redistribution or export of the software.
4. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others.
Chenming Hu, and Weidong Liu
Oct. 2000

View File

@ -1,37 +0,0 @@
## Process this file with automake to produce Makefile.in
noinst_LTLIBRARIES = libbsim4v2.la
libbsim4v2_la_SOURCES = \
b4v2.c \
b4v2acld.c \
b4v2ask.c \
b4v2check.c \
b4v2cvtest.c \
b4v2del.c \
b4v2dest.c \
b4v2geo.c \
b4v2getic.c \
b4v2ld.c \
b4v2mask.c \
b4v2mdel.c \
b4v2mpar.c \
b4v2noi.c \
b4v2par.c \
b4v2pzld.c \
b4v2set.c \
b4v2temp.c \
b4v2trunc.c \
bsim4v2def.h \
bsim4v2ext.h \
bsim4v2init.c \
bsim4v2init.h \
bsim4v2itf.h
AM_CPPFLAGS = -I$(top_srcdir)/src/include
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = B4TERMS_OF_USE

View File

@ -1,744 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
*
* Modified by Xuemei Xi, 10/05/2001.
**********/
#include "ngspice.h"
#include "devdefs.h"
#include "bsim4v2def.h"
#include "suffix.h"
IFparm BSIM4v2pTable[] = { /* parameters */
IOP( "l", BSIM4v2_L, IF_REAL , "Length"),
IOP( "w", BSIM4v2_W, IF_REAL , "Width"),
IOP( "m", BSIM4v2_M, IF_REAL , "Separate Parallel multiplier"),
IOP( "nf", BSIM4v2_NF, IF_REAL , "Number of fingers"),
IOP( "min", BSIM4v2_MIN, IF_INTEGER , "Minimize either D or S"),
IOP( "ad", BSIM4v2_AD, IF_REAL , "Drain area"),
IOP( "as", BSIM4v2_AS, IF_REAL , "Source area"),
IOP( "pd", BSIM4v2_PD, IF_REAL , "Drain perimeter"),
IOP( "ps", BSIM4v2_PS, IF_REAL , "Source perimeter"),
IOP( "nrd", BSIM4v2_NRD, IF_REAL , "Number of squares in drain"),
IOP( "nrs", BSIM4v2_NRS, IF_REAL , "Number of squares in source"),
IOP( "off", BSIM4v2_OFF, IF_FLAG , "Device is initially off"),
IOP( "rbdb", BSIM4v2_RBDB, IF_REAL , "Body resistance"),
IOP( "rbsb", BSIM4v2_RBSB, IF_REAL , "Body resistance"),
IOP( "rbpb", BSIM4v2_RBPB, IF_REAL , "Body resistance"),
IOP( "rbps", BSIM4v2_RBPS, IF_REAL , "Body resistance"),
IOP( "rbpd", BSIM4v2_RBPD, IF_REAL , "Body resistance"),
IOP( "trnqsmod", BSIM4v2_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"),
IOP( "acnqsmod", BSIM4v2_ACNQSMOD, IF_INTEGER, "AC NQS model selector"),
IOP( "rbodymod", BSIM4v2_RBODYMOD, IF_INTEGER, "Distributed body R model selector"),
IOP( "rgatemod", BSIM4v2_RGATEMOD, IF_INTEGER, "Gate resistance model selector"),
IOP( "geomod", BSIM4v2_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"),
IOP( "rgeomod", BSIM4v2_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"),
IP( "ic", BSIM4v2_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"),
OP( "gmbs", BSIM4v2_GMBS, IF_REAL, "Gmb"),
OP( "gm", BSIM4v2_GM, IF_REAL, "Gm"),
OP( "gds", BSIM4v2_GDS, IF_REAL, "Gds"),
OP( "vdsat", BSIM4v2_VDSAT, IF_REAL, "Vdsat"),
OP( "vth", BSIM4v2_VON, IF_REAL, "Vth"),
OP( "id", BSIM4v2_CD, IF_REAL, "Ids"),
OP( "ibd", BSIM4v2_CBD, IF_REAL, "Ibd"),
OP( "ibs", BSIM4v2_CBS, IF_REAL, "Ibs"),
OP( "isub", BSIM4v2_CSUB, IF_REAL, "Isub"),
OP( "igidl", BSIM4v2_IGIDL, IF_REAL, "Igidl"),
OP( "igisl", BSIM4v2_IGISL, IF_REAL, "Igisl"),
OP( "igs", BSIM4v2_IGS, IF_REAL, "Igs"),
OP( "igd", BSIM4v2_IGD, IF_REAL, "Igd"),
OP( "igb", BSIM4v2_IGB, IF_REAL, "Igb"),
OP( "igcs", BSIM4v2_IGCS, IF_REAL, "Igcs"),
OP( "igcd", BSIM4v2_IGCD, IF_REAL, "Igcd"),
OP( "vbs", BSIM4v2_VBS, IF_REAL, "Vbs"),
OP( "vgs", BSIM4v2_VGS, IF_REAL, "Vgs"),
OP( "vds", BSIM4v2_VDS, IF_REAL, "Vds"),
OP( "cgg", BSIM4v2_CGGB, IF_REAL, "Cggb"),
OP( "cgs", BSIM4v2_CGSB, IF_REAL, "Cgsb"),
OP( "cgd", BSIM4v2_CGDB, IF_REAL, "Cgdb"),
OP( "cbg", BSIM4v2_CBGB, IF_REAL, "Cbgb"),
OP( "cbd", BSIM4v2_CBDB, IF_REAL, "Cbdb"),
OP( "cbs", BSIM4v2_CBSB, IF_REAL, "Cbsb"),
OP( "cdg", BSIM4v2_CDGB, IF_REAL, "Cdgb"),
OP( "cdd", BSIM4v2_CDDB, IF_REAL, "Cddb"),
OP( "cds", BSIM4v2_CDSB, IF_REAL, "Cdsb"),
OP( "csg", BSIM4v2_CSGB, IF_REAL, "Csgb"),
OP( "csd", BSIM4v2_CSDB, IF_REAL, "Csdb"),
OP( "css", BSIM4v2_CSSB, IF_REAL, "Cssb"),
OP( "cgb", BSIM4v2_CGBB, IF_REAL, "Cgbb"),
OP( "cdb", BSIM4v2_CDBB, IF_REAL, "Cdbb"),
OP( "csb", BSIM4v2_CSBB, IF_REAL, "Csbb"),
OP( "cbb", BSIM4v2_CBBB, IF_REAL, "Cbbb"),
OP( "capbd", BSIM4v2_CAPBD, IF_REAL, "Capbd"),
OP( "capbs", BSIM4v2_CAPBS, IF_REAL, "Capbs"),
OP( "qg", BSIM4v2_QG, IF_REAL, "Qgate"),
OP( "qb", BSIM4v2_QB, IF_REAL, "Qbulk"),
OP( "qd", BSIM4v2_QD, IF_REAL, "Qdrain"),
OP( "qs", BSIM4v2_QS, IF_REAL, "Qsource"),
OP( "qinv", BSIM4v2_QINV, IF_REAL, "Qinversion"),
};
IFparm BSIM4v2mPTable[] = { /* model parameters */
IOP( "capmod", BSIM4v2_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"),
IOP( "diomod", BSIM4v2_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"),
IOP( "rdsmod", BSIM4v2_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"),
IOP( "trnqsmod", BSIM4v2_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"),
IOP( "acnqsmod", BSIM4v2_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"),
IOP( "mobmod", BSIM4v2_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"),
IOP( "rbodymod", BSIM4v2_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"),
IOP( "rgatemod", BSIM4v2_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"),
IOP( "permod", BSIM4v2_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"),
IOP( "geomod", BSIM4v2_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"),
IOP( "fnoimod", BSIM4v2_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"),
IOP( "tnoimod", BSIM4v2_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"),
IOP( "igcmod", BSIM4v2_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"),
IOP( "igbmod", BSIM4v2_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"),
IOP( "paramchk", BSIM4v2_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"),
IOP( "binunit", BSIM4v2_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"),
IOP( "version", BSIM4v2_MOD_VERSION, IF_STRING, "parameter for model version"),
IOP( "toxe", BSIM4v2_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"),
IOP( "toxp", BSIM4v2_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"),
IOP( "toxm", BSIM4v2_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"),
IOP( "toxref", BSIM4v2_MOD_TOXREF, IF_REAL, "Target tox value"),
IOP( "dtox", BSIM4v2_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "),
IOP( "epsrox", BSIM4v2_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"),
IOP( "cdsc", BSIM4v2_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"),
IOP( "cdscb", BSIM4v2_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"),
IOP( "cdscd", BSIM4v2_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"),
IOP( "cit", BSIM4v2_MOD_CIT, IF_REAL, "Interface state capacitance"),
IOP( "nfactor", BSIM4v2_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"),
IOP( "xj", BSIM4v2_MOD_XJ, IF_REAL, "Junction depth in meters"),
IOP( "vsat", BSIM4v2_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"),
IOP( "at", BSIM4v2_MOD_AT, IF_REAL, "Temperature coefficient of vsat"),
IOP( "a0", BSIM4v2_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."),
IOP( "ags", BSIM4v2_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."),
IOP( "a1", BSIM4v2_MOD_A1, IF_REAL, "Non-saturation effect coefficient"),
IOP( "a2", BSIM4v2_MOD_A2, IF_REAL, "Non-saturation effect coefficient"),
IOP( "keta", BSIM4v2_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."),
IOP( "nsub", BSIM4v2_MOD_NSUB, IF_REAL, "Substrate doping concentration"),
IOP( "ndep", BSIM4v2_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"),
IOP( "nsd", BSIM4v2_MOD_NSD, IF_REAL, "S/D doping concentration"),
IOP( "phin", BSIM4v2_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"),
IOP( "ngate", BSIM4v2_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"),
IOP( "gamma1", BSIM4v2_MOD_GAMMA1, IF_REAL, "Vth body coefficient"),
IOP( "gamma2", BSIM4v2_MOD_GAMMA2, IF_REAL, "Vth body coefficient"),
IOP( "vbx", BSIM4v2_MOD_VBX, IF_REAL, "Vth transition body Voltage"),
IOP( "vbm", BSIM4v2_MOD_VBM, IF_REAL, "Maximum body voltage"),
IOP( "xt", BSIM4v2_MOD_XT, IF_REAL, "Doping depth"),
IOP( "k1", BSIM4v2_MOD_K1, IF_REAL, "Bulk effect coefficient 1"),
IOP( "kt1", BSIM4v2_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"),
IOP( "kt1l", BSIM4v2_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"),
IOP( "kt2", BSIM4v2_MOD_KT2, IF_REAL, "Body-coefficient of kt1"),
IOP( "k2", BSIM4v2_MOD_K2, IF_REAL, "Bulk effect coefficient 2"),
IOP( "k3", BSIM4v2_MOD_K3, IF_REAL, "Narrow width effect coefficient"),
IOP( "k3b", BSIM4v2_MOD_K3B, IF_REAL, "Body effect coefficient of k3"),
IOP( "w0", BSIM4v2_MOD_W0, IF_REAL, "Narrow width effect parameter"),
IOP( "dvtp0", BSIM4v2_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"),
IOP( "dvtp1", BSIM4v2_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"),
IOP( "lpe0", BSIM4v2_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"),
IOP( "lpeb", BSIM4v2_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"),
IOP( "dvt0", BSIM4v2_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"),
IOP( "dvt1", BSIM4v2_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"),
IOP( "dvt2", BSIM4v2_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"),
IOP( "dvt0w", BSIM4v2_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"),
IOP( "dvt1w", BSIM4v2_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"),
IOP( "dvt2w", BSIM4v2_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"),
IOP( "drout", BSIM4v2_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"),
IOP( "dsub", BSIM4v2_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"),
IOP( "vth0", BSIM4v2_MOD_VTH0, IF_REAL,"Threshold voltage"),
IOP( "vtho", BSIM4v2_MOD_VTH0, IF_REAL,"Threshold voltage"),
IOP( "ua", BSIM4v2_MOD_UA, IF_REAL, "Linear gate dependence of mobility"),
IOP( "ua1", BSIM4v2_MOD_UA1, IF_REAL, "Temperature coefficient of ua"),
IOP( "ub", BSIM4v2_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"),
IOP( "ub1", BSIM4v2_MOD_UB1, IF_REAL, "Temperature coefficient of ub"),
IOP( "uc", BSIM4v2_MOD_UC, IF_REAL, "Body-bias dependence of mobility"),
IOP( "uc1", BSIM4v2_MOD_UC1, IF_REAL, "Temperature coefficient of uc"),
IOP( "u0", BSIM4v2_MOD_U0, IF_REAL, "Low-field mobility at Tnom"),
IOP( "eu", BSIM4v2_MOD_EU, IF_REAL, "Mobility exponent"),
IOP( "ute", BSIM4v2_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"),
IOP( "voff", BSIM4v2_MOD_VOFF, IF_REAL, "Threshold voltage offset"),
IOP( "minv", BSIM4v2_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"),
IOP( "voffl", BSIM4v2_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"),
IOP( "tnom", BSIM4v2_MOD_TNOM, IF_REAL, "Parameter measurement temperature"),
IOP( "cgso", BSIM4v2_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"),
IOP( "cgdo", BSIM4v2_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"),
IOP( "cgbo", BSIM4v2_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"),
IOP( "xpart", BSIM4v2_MOD_XPART, IF_REAL, "Channel charge partitioning"),
IOP( "delta", BSIM4v2_MOD_DELTA, IF_REAL, "Effective Vds parameter"),
IOP( "rsh", BSIM4v2_MOD_RSH, IF_REAL, "Source-drain sheet resistance"),
IOP( "rdsw", BSIM4v2_MOD_RDSW, IF_REAL, "Source-drain resistance per width"),
IOP( "rdswmin", BSIM4v2_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"),
IOP( "rsw", BSIM4v2_MOD_RSW, IF_REAL, "Source resistance per width"),
IOP( "rdw", BSIM4v2_MOD_RDW, IF_REAL, "Drain resistance per width"),
IOP( "rdwmin", BSIM4v2_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"),
IOP( "rswmin", BSIM4v2_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"),
IOP( "prwg", BSIM4v2_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "),
IOP( "prwb", BSIM4v2_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "),
IOP( "prt", BSIM4v2_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "),
IOP( "eta0", BSIM4v2_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"),
IOP( "etab", BSIM4v2_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"),
IOP( "pclm", BSIM4v2_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"),
IOP( "pdiblc1", BSIM4v2_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"),
IOP( "pdiblc2", BSIM4v2_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"),
IOP( "pdiblcb", BSIM4v2_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"),
IOP( "fprout", BSIM4v2_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"),
IOP( "pdits", BSIM4v2_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"),
IOP( "pditsl", BSIM4v2_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"),
IOP( "pditsd", BSIM4v2_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"),
IOP( "pscbe1", BSIM4v2_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"),
IOP( "pscbe2", BSIM4v2_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"),
IOP( "pvag", BSIM4v2_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"),
IOP( "jss", BSIM4v2_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"),
IOP( "jsws", BSIM4v2_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"),
IOP( "jswgs", BSIM4v2_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"),
IOP( "pbs", BSIM4v2_MOD_PBS, IF_REAL, "Source junction built-in potential"),
IOP( "njs", BSIM4v2_MOD_NJS, IF_REAL, "Source junction emission coefficient"),
IOP( "xtis", BSIM4v2_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"),
IOP( "mjs", BSIM4v2_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"),
IOP( "pbsws", BSIM4v2_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"),
IOP( "mjsws", BSIM4v2_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"),
IOP( "pbswgs", BSIM4v2_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"),
IOP( "mjswgs", BSIM4v2_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"),
IOP( "cjs", BSIM4v2_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"),
IOP( "cjsws", BSIM4v2_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"),
IOP( "cjswgs", BSIM4v2_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"),
IOP( "jsd", BSIM4v2_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"),
IOP( "jswd", BSIM4v2_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"),
IOP( "jswgd", BSIM4v2_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"),
IOP( "pbd", BSIM4v2_MOD_PBD, IF_REAL, "Drain junction built-in potential"),
IOP( "njd", BSIM4v2_MOD_NJD, IF_REAL, "Drain junction emission coefficient"),
IOP( "xtid", BSIM4v2_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"),
IOP( "mjd", BSIM4v2_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"),
IOP( "pbswd", BSIM4v2_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"),
IOP( "mjswd", BSIM4v2_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"),
IOP( "pbswgd", BSIM4v2_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"),
IOP( "mjswgd", BSIM4v2_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"),
IOP( "cjd", BSIM4v2_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"),
IOP( "cjswd", BSIM4v2_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"),
IOP( "cjswgd", BSIM4v2_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"),
IOP( "vfbcv", BSIM4v2_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"),
IOP( "vfb", BSIM4v2_MOD_VFB, IF_REAL, "Flat Band Voltage"),
IOP( "tpb", BSIM4v2_MOD_TPB, IF_REAL, "Temperature coefficient of pb"),
IOP( "tcj", BSIM4v2_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"),
IOP( "tpbsw", BSIM4v2_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"),
IOP( "tcjsw", BSIM4v2_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"),
IOP( "tpbswg", BSIM4v2_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"),
IOP( "tcjswg", BSIM4v2_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"),
IOP( "acde", BSIM4v2_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"),
IOP( "moin", BSIM4v2_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"),
IOP( "noff", BSIM4v2_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"),
IOP( "voffcv", BSIM4v2_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"),
IOP( "dmcg", BSIM4v2_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"),
IOP( "dmci", BSIM4v2_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"),
IOP( "dmdg", BSIM4v2_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"),
IOP( "dmcgt", BSIM4v2_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"),
IOP( "xgw", BSIM4v2_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"),
IOP( "xgl", BSIM4v2_MOD_XGL, IF_REAL, "Variation in Ldrawn"),
IOP( "rshg", BSIM4v2_MOD_RSHG, IF_REAL, "Gate sheet resistance"),
IOP( "ngcon", BSIM4v2_MOD_NGCON, IF_REAL, "Number of gate contacts"),
IOP( "xrcrg1", BSIM4v2_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"),
IOP( "xrcrg2", BSIM4v2_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"),
IOP( "lint", BSIM4v2_MOD_LINT, IF_REAL, "Length reduction parameter"),
IOP( "ll", BSIM4v2_MOD_LL, IF_REAL, "Length reduction parameter"),
IOP( "llc", BSIM4v2_MOD_LLC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lln", BSIM4v2_MOD_LLN, IF_REAL, "Length reduction parameter"),
IOP( "lw", BSIM4v2_MOD_LW, IF_REAL, "Length reduction parameter"),
IOP( "lwc", BSIM4v2_MOD_LWC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lwn", BSIM4v2_MOD_LWN, IF_REAL, "Length reduction parameter"),
IOP( "lwl", BSIM4v2_MOD_LWL, IF_REAL, "Length reduction parameter"),
IOP( "lwlc", BSIM4v2_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lmin", BSIM4v2_MOD_LMIN, IF_REAL, "Minimum length for the model"),
IOP( "lmax", BSIM4v2_MOD_LMAX, IF_REAL, "Maximum length for the model"),
IOP( "wr", BSIM4v2_MOD_WR, IF_REAL, "Width dependence of rds"),
IOP( "wint", BSIM4v2_MOD_WINT, IF_REAL, "Width reduction parameter"),
IOP( "dwg", BSIM4v2_MOD_DWG, IF_REAL, "Width reduction parameter"),
IOP( "dwb", BSIM4v2_MOD_DWB, IF_REAL, "Width reduction parameter"),
IOP( "wl", BSIM4v2_MOD_WL, IF_REAL, "Width reduction parameter"),
IOP( "wlc", BSIM4v2_MOD_WLC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wln", BSIM4v2_MOD_WLN, IF_REAL, "Width reduction parameter"),
IOP( "ww", BSIM4v2_MOD_WW, IF_REAL, "Width reduction parameter"),
IOP( "wwc", BSIM4v2_MOD_WWC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wwn", BSIM4v2_MOD_WWN, IF_REAL, "Width reduction parameter"),
IOP( "wwl", BSIM4v2_MOD_WWL, IF_REAL, "Width reduction parameter"),
IOP( "wwlc", BSIM4v2_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wmin", BSIM4v2_MOD_WMIN, IF_REAL, "Minimum width for the model"),
IOP( "wmax", BSIM4v2_MOD_WMAX, IF_REAL, "Maximum width for the model"),
IOP( "b0", BSIM4v2_MOD_B0, IF_REAL, "Abulk narrow width parameter"),
IOP( "b1", BSIM4v2_MOD_B1, IF_REAL, "Abulk narrow width parameter"),
IOP( "cgsl", BSIM4v2_MOD_CGSL, IF_REAL, "New C-V model parameter"),
IOP( "cgdl", BSIM4v2_MOD_CGDL, IF_REAL, "New C-V model parameter"),
IOP( "ckappas", BSIM4v2_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "),
IOP( "ckappad", BSIM4v2_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"),
IOP( "cf", BSIM4v2_MOD_CF, IF_REAL, "Fringe capacitance parameter"),
IOP( "clc", BSIM4v2_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"),
IOP( "cle", BSIM4v2_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"),
IOP( "dwc", BSIM4v2_MOD_DWC, IF_REAL, "Delta W for C-V model"),
IOP( "dlc", BSIM4v2_MOD_DLC, IF_REAL, "Delta L for C-V model"),
IOP( "xw", BSIM4v2_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"),
IOP( "xl", BSIM4v2_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"),
IOP( "dlcig", BSIM4v2_MOD_DLCIG, IF_REAL, "Delta L for Ig model"),
IOP( "dwj", BSIM4v2_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"),
IOP( "alpha0", BSIM4v2_MOD_ALPHA0, IF_REAL, "substrate current model parameter"),
IOP( "alpha1", BSIM4v2_MOD_ALPHA1, IF_REAL, "substrate current model parameter"),
IOP( "beta0", BSIM4v2_MOD_BETA0, IF_REAL, "substrate current model parameter"),
IOP( "agidl", BSIM4v2_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"),
IOP( "bgidl", BSIM4v2_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"),
IOP( "cgidl", BSIM4v2_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"),
IOP( "egidl", BSIM4v2_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"),
IOP( "aigc", BSIM4v2_MOD_AIGC, IF_REAL, "Parameter for Igc"),
IOP( "bigc", BSIM4v2_MOD_BIGC, IF_REAL, "Parameter for Igc"),
IOP( "cigc", BSIM4v2_MOD_CIGC, IF_REAL, "Parameter for Igc"),
IOP( "aigsd", BSIM4v2_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"),
IOP( "bigsd", BSIM4v2_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"),
IOP( "cigsd", BSIM4v2_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"),
IOP( "aigbacc", BSIM4v2_MOD_AIGBACC, IF_REAL, "Parameter for Igb"),
IOP( "bigbacc", BSIM4v2_MOD_BIGBACC, IF_REAL, "Parameter for Igb"),
IOP( "cigbacc", BSIM4v2_MOD_CIGBACC, IF_REAL, "Parameter for Igb"),
IOP( "aigbinv", BSIM4v2_MOD_AIGBINV, IF_REAL, "Parameter for Igb"),
IOP( "bigbinv", BSIM4v2_MOD_BIGBINV, IF_REAL, "Parameter for Igb"),
IOP( "cigbinv", BSIM4v2_MOD_CIGBINV, IF_REAL, "Parameter for Igb"),
IOP( "nigc", BSIM4v2_MOD_NIGC, IF_REAL, "Parameter for Igc slope"),
IOP( "nigbinv", BSIM4v2_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"),
IOP( "nigbacc", BSIM4v2_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"),
IOP( "ntox", BSIM4v2_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"),
IOP( "eigbinv", BSIM4v2_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"),
IOP( "pigcd", BSIM4v2_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"),
IOP( "poxedge", BSIM4v2_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"),
IOP( "ijthdfwd", BSIM4v2_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"),
IOP( "ijthsfwd", BSIM4v2_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"),
IOP( "ijthdrev", BSIM4v2_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"),
IOP( "ijthsrev", BSIM4v2_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"),
IOP( "xjbvd", BSIM4v2_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"),
IOP( "xjbvs", BSIM4v2_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"),
IOP( "bvd", BSIM4v2_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"),
IOP( "bvs", BSIM4v2_MOD_BVS, IF_REAL, "Source diode breakdown voltage"),
IOP( "gbmin", BSIM4v2_MOD_GBMIN, IF_REAL, "Minimum body conductance"),
IOP( "rbdb", BSIM4v2_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"),
IOP( "rbpb", BSIM4v2_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"),
IOP( "rbsb", BSIM4v2_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"),
IOP( "rbps", BSIM4v2_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"),
IOP( "rbpd", BSIM4v2_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"),
IOP( "lcdsc", BSIM4v2_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"),
IOP( "lcdscb", BSIM4v2_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"),
IOP( "lcdscd", BSIM4v2_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"),
IOP( "lcit", BSIM4v2_MOD_LCIT, IF_REAL, "Length dependence of cit"),
IOP( "lnfactor", BSIM4v2_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"),
IOP( "lxj", BSIM4v2_MOD_LXJ, IF_REAL, "Length dependence of xj"),
IOP( "lvsat", BSIM4v2_MOD_LVSAT, IF_REAL, "Length dependence of vsat"),
IOP( "lat", BSIM4v2_MOD_LAT, IF_REAL, "Length dependence of at"),
IOP( "la0", BSIM4v2_MOD_LA0, IF_REAL, "Length dependence of a0"),
IOP( "lags", BSIM4v2_MOD_LAGS, IF_REAL, "Length dependence of ags"),
IOP( "la1", BSIM4v2_MOD_LA1, IF_REAL, "Length dependence of a1"),
IOP( "la2", BSIM4v2_MOD_LA2, IF_REAL, "Length dependence of a2"),
IOP( "lketa", BSIM4v2_MOD_LKETA, IF_REAL, "Length dependence of keta"),
IOP( "lnsub", BSIM4v2_MOD_LNSUB, IF_REAL, "Length dependence of nsub"),
IOP( "lndep", BSIM4v2_MOD_LNDEP, IF_REAL, "Length dependence of ndep"),
IOP( "lnsd", BSIM4v2_MOD_LNSD, IF_REAL, "Length dependence of nsd"),
IOP( "lphin", BSIM4v2_MOD_LPHIN, IF_REAL, "Length dependence of phin"),
IOP( "lngate", BSIM4v2_MOD_LNGATE, IF_REAL, "Length dependence of ngate"),
IOP( "lgamma1", BSIM4v2_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"),
IOP( "lgamma2", BSIM4v2_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"),
IOP( "lvbx", BSIM4v2_MOD_LVBX, IF_REAL, "Length dependence of vbx"),
IOP( "lvbm", BSIM4v2_MOD_LVBM, IF_REAL, "Length dependence of vbm"),
IOP( "lxt", BSIM4v2_MOD_LXT, IF_REAL, "Length dependence of xt"),
IOP( "lk1", BSIM4v2_MOD_LK1, IF_REAL, "Length dependence of k1"),
IOP( "lkt1", BSIM4v2_MOD_LKT1, IF_REAL, "Length dependence of kt1"),
IOP( "lkt1l", BSIM4v2_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"),
IOP( "lkt2", BSIM4v2_MOD_LKT2, IF_REAL, "Length dependence of kt2"),
IOP( "lk2", BSIM4v2_MOD_LK2, IF_REAL, "Length dependence of k2"),
IOP( "lk3", BSIM4v2_MOD_LK3, IF_REAL, "Length dependence of k3"),
IOP( "lk3b", BSIM4v2_MOD_LK3B, IF_REAL, "Length dependence of k3b"),
IOP( "lw0", BSIM4v2_MOD_LW0, IF_REAL, "Length dependence of w0"),
IOP( "ldvtp0", BSIM4v2_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"),
IOP( "ldvtp1", BSIM4v2_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"),
IOP( "llpe0", BSIM4v2_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"),
IOP( "llpeb", BSIM4v2_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"),
IOP( "ldvt0", BSIM4v2_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"),
IOP( "ldvt1", BSIM4v2_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"),
IOP( "ldvt2", BSIM4v2_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"),
IOP( "ldvt0w", BSIM4v2_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"),
IOP( "ldvt1w", BSIM4v2_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"),
IOP( "ldvt2w", BSIM4v2_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"),
IOP( "ldrout", BSIM4v2_MOD_LDROUT, IF_REAL, "Length dependence of drout"),
IOP( "ldsub", BSIM4v2_MOD_LDSUB, IF_REAL, "Length dependence of dsub"),
IOP( "lvth0", BSIM4v2_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
IOP( "lvtho", BSIM4v2_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
IOP( "lua", BSIM4v2_MOD_LUA, IF_REAL, "Length dependence of ua"),
IOP( "lua1", BSIM4v2_MOD_LUA1, IF_REAL, "Length dependence of ua1"),
IOP( "lub", BSIM4v2_MOD_LUB, IF_REAL, "Length dependence of ub"),
IOP( "lub1", BSIM4v2_MOD_LUB1, IF_REAL, "Length dependence of ub1"),
IOP( "luc", BSIM4v2_MOD_LUC, IF_REAL, "Length dependence of uc"),
IOP( "luc1", BSIM4v2_MOD_LUC1, IF_REAL, "Length dependence of uc1"),
IOP( "lu0", BSIM4v2_MOD_LU0, IF_REAL, "Length dependence of u0"),
IOP( "lute", BSIM4v2_MOD_LUTE, IF_REAL, "Length dependence of ute"),
IOP( "lvoff", BSIM4v2_MOD_LVOFF, IF_REAL, "Length dependence of voff"),
IOP( "lminv", BSIM4v2_MOD_LMINV, IF_REAL, "Length dependence of minv"),
IOP( "ldelta", BSIM4v2_MOD_LDELTA, IF_REAL, "Length dependence of delta"),
IOP( "lrdsw", BSIM4v2_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "),
IOP( "lrsw", BSIM4v2_MOD_LRSW, IF_REAL, "Length dependence of rsw"),
IOP( "lrdw", BSIM4v2_MOD_LRDW, IF_REAL, "Length dependence of rdw"),
IOP( "lprwg", BSIM4v2_MOD_LPRWG, IF_REAL, "Length dependence of prwg "),
IOP( "lprwb", BSIM4v2_MOD_LPRWB, IF_REAL, "Length dependence of prwb "),
IOP( "lprt", BSIM4v2_MOD_LPRT, IF_REAL, "Length dependence of prt "),
IOP( "leta0", BSIM4v2_MOD_LETA0, IF_REAL, "Length dependence of eta0"),
IOP( "letab", BSIM4v2_MOD_LETAB, IF_REAL, "Length dependence of etab"),
IOP( "lpclm", BSIM4v2_MOD_LPCLM, IF_REAL, "Length dependence of pclm"),
IOP( "lpdiblc1", BSIM4v2_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"),
IOP( "lpdiblc2", BSIM4v2_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"),
IOP( "lpdiblcb", BSIM4v2_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"),
IOP( "lfprout", BSIM4v2_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"),
IOP( "lpdits", BSIM4v2_MOD_LPDITS, IF_REAL, "Length dependence of pdits"),
IOP( "lpditsd", BSIM4v2_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"),
IOP( "lpscbe1", BSIM4v2_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"),
IOP( "lpscbe2", BSIM4v2_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"),
IOP( "lpvag", BSIM4v2_MOD_LPVAG, IF_REAL, "Length dependence of pvag"),
IOP( "lwr", BSIM4v2_MOD_LWR, IF_REAL, "Length dependence of wr"),
IOP( "ldwg", BSIM4v2_MOD_LDWG, IF_REAL, "Length dependence of dwg"),
IOP( "ldwb", BSIM4v2_MOD_LDWB, IF_REAL, "Length dependence of dwb"),
IOP( "lb0", BSIM4v2_MOD_LB0, IF_REAL, "Length dependence of b0"),
IOP( "lb1", BSIM4v2_MOD_LB1, IF_REAL, "Length dependence of b1"),
IOP( "lcgsl", BSIM4v2_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"),
IOP( "lcgdl", BSIM4v2_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"),
IOP( "lckappas", BSIM4v2_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"),
IOP( "lckappad", BSIM4v2_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"),
IOP( "lcf", BSIM4v2_MOD_LCF, IF_REAL, "Length dependence of cf"),
IOP( "lclc", BSIM4v2_MOD_LCLC, IF_REAL, "Length dependence of clc"),
IOP( "lcle", BSIM4v2_MOD_LCLE, IF_REAL, "Length dependence of cle"),
IOP( "lalpha0", BSIM4v2_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"),
IOP( "lalpha1", BSIM4v2_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"),
IOP( "lbeta0", BSIM4v2_MOD_LBETA0, IF_REAL, "Length dependence of beta0"),
IOP( "lagidl", BSIM4v2_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"),
IOP( "lbgidl", BSIM4v2_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"),
IOP( "lcgidl", BSIM4v2_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"),
IOP( "legidl", BSIM4v2_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"),
IOP( "laigc", BSIM4v2_MOD_LAIGC, IF_REAL, "Length dependence of aigc"),
IOP( "lbigc", BSIM4v2_MOD_LBIGC, IF_REAL, "Length dependence of bigc"),
IOP( "lcigc", BSIM4v2_MOD_LCIGC, IF_REAL, "Length dependence of cigc"),
IOP( "laigsd", BSIM4v2_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"),
IOP( "lbigsd", BSIM4v2_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"),
IOP( "lcigsd", BSIM4v2_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"),
IOP( "laigbacc", BSIM4v2_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"),
IOP( "lbigbacc", BSIM4v2_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"),
IOP( "lcigbacc", BSIM4v2_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"),
IOP( "laigbinv", BSIM4v2_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"),
IOP( "lbigbinv", BSIM4v2_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"),
IOP( "lcigbinv", BSIM4v2_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"),
IOP( "lnigc", BSIM4v2_MOD_LNIGC, IF_REAL, "Length dependence of nigc"),
IOP( "lnigbinv", BSIM4v2_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"),
IOP( "lnigbacc", BSIM4v2_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"),
IOP( "lntox", BSIM4v2_MOD_LNTOX, IF_REAL, "Length dependence of ntox"),
IOP( "leigbinv", BSIM4v2_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"),
IOP( "lpigcd", BSIM4v2_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"),
IOP( "lpoxedge", BSIM4v2_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"),
IOP( "lvfbcv", BSIM4v2_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"),
IOP( "lvfb", BSIM4v2_MOD_LVFB, IF_REAL, "Length dependence of vfb"),
IOP( "lacde", BSIM4v2_MOD_LACDE, IF_REAL, "Length dependence of acde"),
IOP( "lmoin", BSIM4v2_MOD_LMOIN, IF_REAL, "Length dependence of moin"),
IOP( "lnoff", BSIM4v2_MOD_LNOFF, IF_REAL, "Length dependence of noff"),
IOP( "lvoffcv", BSIM4v2_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"),
IOP( "lxrcrg1", BSIM4v2_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"),
IOP( "lxrcrg2", BSIM4v2_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"),
IOP( "leu", BSIM4v2_MOD_LEU, IF_REAL, "Length dependence of eu"),
IOP( "wcdsc", BSIM4v2_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"),
IOP( "wcdscb", BSIM4v2_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"),
IOP( "wcdscd", BSIM4v2_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"),
IOP( "wcit", BSIM4v2_MOD_WCIT, IF_REAL, "Width dependence of cit"),
IOP( "wnfactor", BSIM4v2_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"),
IOP( "wxj", BSIM4v2_MOD_WXJ, IF_REAL, "Width dependence of xj"),
IOP( "wvsat", BSIM4v2_MOD_WVSAT, IF_REAL, "Width dependence of vsat"),
IOP( "wat", BSIM4v2_MOD_WAT, IF_REAL, "Width dependence of at"),
IOP( "wa0", BSIM4v2_MOD_WA0, IF_REAL, "Width dependence of a0"),
IOP( "wags", BSIM4v2_MOD_WAGS, IF_REAL, "Width dependence of ags"),
IOP( "wa1", BSIM4v2_MOD_WA1, IF_REAL, "Width dependence of a1"),
IOP( "wa2", BSIM4v2_MOD_WA2, IF_REAL, "Width dependence of a2"),
IOP( "wketa", BSIM4v2_MOD_WKETA, IF_REAL, "Width dependence of keta"),
IOP( "wnsub", BSIM4v2_MOD_WNSUB, IF_REAL, "Width dependence of nsub"),
IOP( "wndep", BSIM4v2_MOD_WNDEP, IF_REAL, "Width dependence of ndep"),
IOP( "wnsd", BSIM4v2_MOD_WNSD, IF_REAL, "Width dependence of nsd"),
IOP( "wphin", BSIM4v2_MOD_WPHIN, IF_REAL, "Width dependence of phin"),
IOP( "wngate", BSIM4v2_MOD_WNGATE, IF_REAL, "Width dependence of ngate"),
IOP( "wgamma1", BSIM4v2_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"),
IOP( "wgamma2", BSIM4v2_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"),
IOP( "wvbx", BSIM4v2_MOD_WVBX, IF_REAL, "Width dependence of vbx"),
IOP( "wvbm", BSIM4v2_MOD_WVBM, IF_REAL, "Width dependence of vbm"),
IOP( "wxt", BSIM4v2_MOD_WXT, IF_REAL, "Width dependence of xt"),
IOP( "wk1", BSIM4v2_MOD_WK1, IF_REAL, "Width dependence of k1"),
IOP( "wkt1", BSIM4v2_MOD_WKT1, IF_REAL, "Width dependence of kt1"),
IOP( "wkt1l", BSIM4v2_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"),
IOP( "wkt2", BSIM4v2_MOD_WKT2, IF_REAL, "Width dependence of kt2"),
IOP( "wk2", BSIM4v2_MOD_WK2, IF_REAL, "Width dependence of k2"),
IOP( "wk3", BSIM4v2_MOD_WK3, IF_REAL, "Width dependence of k3"),
IOP( "wk3b", BSIM4v2_MOD_WK3B, IF_REAL, "Width dependence of k3b"),
IOP( "ww0", BSIM4v2_MOD_WW0, IF_REAL, "Width dependence of w0"),
IOP( "wdvtp0", BSIM4v2_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"),
IOP( "wdvtp1", BSIM4v2_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"),
IOP( "wlpe0", BSIM4v2_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"),
IOP( "wlpeb", BSIM4v2_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"),
IOP( "wdvt0", BSIM4v2_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"),
IOP( "wdvt1", BSIM4v2_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"),
IOP( "wdvt2", BSIM4v2_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"),
IOP( "wdvt0w", BSIM4v2_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"),
IOP( "wdvt1w", BSIM4v2_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"),
IOP( "wdvt2w", BSIM4v2_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"),
IOP( "wdrout", BSIM4v2_MOD_WDROUT, IF_REAL, "Width dependence of drout"),
IOP( "wdsub", BSIM4v2_MOD_WDSUB, IF_REAL, "Width dependence of dsub"),
IOP( "wvth0", BSIM4v2_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
IOP( "wvtho", BSIM4v2_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
IOP( "wua", BSIM4v2_MOD_WUA, IF_REAL, "Width dependence of ua"),
IOP( "wua1", BSIM4v2_MOD_WUA1, IF_REAL, "Width dependence of ua1"),
IOP( "wub", BSIM4v2_MOD_WUB, IF_REAL, "Width dependence of ub"),
IOP( "wub1", BSIM4v2_MOD_WUB1, IF_REAL, "Width dependence of ub1"),
IOP( "wuc", BSIM4v2_MOD_WUC, IF_REAL, "Width dependence of uc"),
IOP( "wuc1", BSIM4v2_MOD_WUC1, IF_REAL, "Width dependence of uc1"),
IOP( "wu0", BSIM4v2_MOD_WU0, IF_REAL, "Width dependence of u0"),
IOP( "wute", BSIM4v2_MOD_WUTE, IF_REAL, "Width dependence of ute"),
IOP( "wvoff", BSIM4v2_MOD_WVOFF, IF_REAL, "Width dependence of voff"),
IOP( "wminv", BSIM4v2_MOD_WMINV, IF_REAL, "Width dependence of minv"),
IOP( "wdelta", BSIM4v2_MOD_WDELTA, IF_REAL, "Width dependence of delta"),
IOP( "wrdsw", BSIM4v2_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "),
IOP( "wrsw", BSIM4v2_MOD_WRSW, IF_REAL, "Width dependence of rsw"),
IOP( "wrdw", BSIM4v2_MOD_WRDW, IF_REAL, "Width dependence of rdw"),
IOP( "wprwg", BSIM4v2_MOD_WPRWG, IF_REAL, "Width dependence of prwg "),
IOP( "wprwb", BSIM4v2_MOD_WPRWB, IF_REAL, "Width dependence of prwb "),
IOP( "wprt", BSIM4v2_MOD_WPRT, IF_REAL, "Width dependence of prt"),
IOP( "weta0", BSIM4v2_MOD_WETA0, IF_REAL, "Width dependence of eta0"),
IOP( "wetab", BSIM4v2_MOD_WETAB, IF_REAL, "Width dependence of etab"),
IOP( "wpclm", BSIM4v2_MOD_WPCLM, IF_REAL, "Width dependence of pclm"),
IOP( "wpdiblc1", BSIM4v2_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"),
IOP( "wpdiblc2", BSIM4v2_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"),
IOP( "wpdiblcb", BSIM4v2_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"),
IOP( "wfprout", BSIM4v2_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"),
IOP( "wpdits", BSIM4v2_MOD_WPDITS, IF_REAL, "Width dependence of pdits"),
IOP( "wpditsd", BSIM4v2_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"),
IOP( "wpscbe1", BSIM4v2_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"),
IOP( "wpscbe2", BSIM4v2_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"),
IOP( "wpvag", BSIM4v2_MOD_WPVAG, IF_REAL, "Width dependence of pvag"),
IOP( "wwr", BSIM4v2_MOD_WWR, IF_REAL, "Width dependence of wr"),
IOP( "wdwg", BSIM4v2_MOD_WDWG, IF_REAL, "Width dependence of dwg"),
IOP( "wdwb", BSIM4v2_MOD_WDWB, IF_REAL, "Width dependence of dwb"),
IOP( "wb0", BSIM4v2_MOD_WB0, IF_REAL, "Width dependence of b0"),
IOP( "wb1", BSIM4v2_MOD_WB1, IF_REAL, "Width dependence of b1"),
IOP( "wcgsl", BSIM4v2_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"),
IOP( "wcgdl", BSIM4v2_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"),
IOP( "wckappas", BSIM4v2_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"),
IOP( "wckappad", BSIM4v2_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"),
IOP( "wcf", BSIM4v2_MOD_WCF, IF_REAL, "Width dependence of cf"),
IOP( "wclc", BSIM4v2_MOD_WCLC, IF_REAL, "Width dependence of clc"),
IOP( "wcle", BSIM4v2_MOD_WCLE, IF_REAL, "Width dependence of cle"),
IOP( "walpha0", BSIM4v2_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"),
IOP( "walpha1", BSIM4v2_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"),
IOP( "wbeta0", BSIM4v2_MOD_WBETA0, IF_REAL, "Width dependence of beta0"),
IOP( "wagidl", BSIM4v2_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"),
IOP( "wbgidl", BSIM4v2_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"),
IOP( "wcgidl", BSIM4v2_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"),
IOP( "wegidl", BSIM4v2_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"),
IOP( "waigc", BSIM4v2_MOD_WAIGC, IF_REAL, "Width dependence of aigc"),
IOP( "wbigc", BSIM4v2_MOD_WBIGC, IF_REAL, "Width dependence of bigc"),
IOP( "wcigc", BSIM4v2_MOD_WCIGC, IF_REAL, "Width dependence of cigc"),
IOP( "waigsd", BSIM4v2_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"),
IOP( "wbigsd", BSIM4v2_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"),
IOP( "wcigsd", BSIM4v2_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"),
IOP( "waigbacc", BSIM4v2_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"),
IOP( "wbigbacc", BSIM4v2_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"),
IOP( "wcigbacc", BSIM4v2_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"),
IOP( "waigbinv", BSIM4v2_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"),
IOP( "wbigbinv", BSIM4v2_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"),
IOP( "wcigbinv", BSIM4v2_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"),
IOP( "wnigc", BSIM4v2_MOD_WNIGC, IF_REAL, "Width dependence of nigc"),
IOP( "wnigbinv", BSIM4v2_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"),
IOP( "wnigbacc", BSIM4v2_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"),
IOP( "wntox", BSIM4v2_MOD_WNTOX, IF_REAL, "Width dependence of ntox"),
IOP( "weigbinv", BSIM4v2_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"),
IOP( "wpigcd", BSIM4v2_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"),
IOP( "wpoxedge", BSIM4v2_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"),
IOP( "wvfbcv", BSIM4v2_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"),
IOP( "wvfb", BSIM4v2_MOD_WVFB, IF_REAL, "Width dependence of vfb"),
IOP( "wacde", BSIM4v2_MOD_WACDE, IF_REAL, "Width dependence of acde"),
IOP( "wmoin", BSIM4v2_MOD_WMOIN, IF_REAL, "Width dependence of moin"),
IOP( "wnoff", BSIM4v2_MOD_WNOFF, IF_REAL, "Width dependence of noff"),
IOP( "wvoffcv", BSIM4v2_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"),
IOP( "wxrcrg1", BSIM4v2_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"),
IOP( "wxrcrg2", BSIM4v2_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"),
IOP( "weu", BSIM4v2_MOD_WEU, IF_REAL, "Width dependence of eu"),
IOP( "pcdsc", BSIM4v2_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"),
IOP( "pcdscb", BSIM4v2_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"),
IOP( "pcdscd", BSIM4v2_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"),
IOP( "pcit", BSIM4v2_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"),
IOP( "pnfactor", BSIM4v2_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"),
IOP( "pxj", BSIM4v2_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"),
IOP( "pvsat", BSIM4v2_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"),
IOP( "pat", BSIM4v2_MOD_PAT, IF_REAL, "Cross-term dependence of at"),
IOP( "pa0", BSIM4v2_MOD_PA0, IF_REAL, "Cross-term dependence of a0"),
IOP( "pags", BSIM4v2_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"),
IOP( "pa1", BSIM4v2_MOD_PA1, IF_REAL, "Cross-term dependence of a1"),
IOP( "pa2", BSIM4v2_MOD_PA2, IF_REAL, "Cross-term dependence of a2"),
IOP( "pketa", BSIM4v2_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"),
IOP( "pnsub", BSIM4v2_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"),
IOP( "pndep", BSIM4v2_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"),
IOP( "pnsd", BSIM4v2_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"),
IOP( "pphin", BSIM4v2_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"),
IOP( "pngate", BSIM4v2_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"),
IOP( "pgamma1", BSIM4v2_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"),
IOP( "pgamma2", BSIM4v2_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"),
IOP( "pvbx", BSIM4v2_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"),
IOP( "pvbm", BSIM4v2_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"),
IOP( "pxt", BSIM4v2_MOD_PXT, IF_REAL, "Cross-term dependence of xt"),
IOP( "pk1", BSIM4v2_MOD_PK1, IF_REAL, "Cross-term dependence of k1"),
IOP( "pkt1", BSIM4v2_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"),
IOP( "pkt1l", BSIM4v2_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"),
IOP( "pkt2", BSIM4v2_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"),
IOP( "pk2", BSIM4v2_MOD_PK2, IF_REAL, "Cross-term dependence of k2"),
IOP( "pk3", BSIM4v2_MOD_PK3, IF_REAL, "Cross-term dependence of k3"),
IOP( "pk3b", BSIM4v2_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"),
IOP( "pw0", BSIM4v2_MOD_PW0, IF_REAL, "Cross-term dependence of w0"),
IOP( "pdvtp0", BSIM4v2_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"),
IOP( "pdvtp1", BSIM4v2_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"),
IOP( "plpe0", BSIM4v2_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"),
IOP( "plpeb", BSIM4v2_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"),
IOP( "pdvt0", BSIM4v2_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"),
IOP( "pdvt1", BSIM4v2_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"),
IOP( "pdvt2", BSIM4v2_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"),
IOP( "pdvt0w", BSIM4v2_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"),
IOP( "pdvt1w", BSIM4v2_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"),
IOP( "pdvt2w", BSIM4v2_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"),
IOP( "pdrout", BSIM4v2_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"),
IOP( "pdsub", BSIM4v2_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"),
IOP( "pvth0", BSIM4v2_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
IOP( "pvtho", BSIM4v2_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
IOP( "pua", BSIM4v2_MOD_PUA, IF_REAL, "Cross-term dependence of ua"),
IOP( "pua1", BSIM4v2_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"),
IOP( "pub", BSIM4v2_MOD_PUB, IF_REAL, "Cross-term dependence of ub"),
IOP( "pub1", BSIM4v2_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"),
IOP( "puc", BSIM4v2_MOD_PUC, IF_REAL, "Cross-term dependence of uc"),
IOP( "puc1", BSIM4v2_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"),
IOP( "pu0", BSIM4v2_MOD_PU0, IF_REAL, "Cross-term dependence of u0"),
IOP( "pute", BSIM4v2_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"),
IOP( "pvoff", BSIM4v2_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"),
IOP( "pminv", BSIM4v2_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"),
IOP( "pdelta", BSIM4v2_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"),
IOP( "prdsw", BSIM4v2_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "),
IOP( "prsw", BSIM4v2_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"),
IOP( "prdw", BSIM4v2_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"),
IOP( "pprwg", BSIM4v2_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "),
IOP( "pprwb", BSIM4v2_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "),
IOP( "pprt", BSIM4v2_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "),
IOP( "peta0", BSIM4v2_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"),
IOP( "petab", BSIM4v2_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"),
IOP( "ppclm", BSIM4v2_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"),
IOP( "ppdiblc1", BSIM4v2_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"),
IOP( "ppdiblc2", BSIM4v2_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"),
IOP( "ppdiblcb", BSIM4v2_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"),
IOP( "pfprout", BSIM4v2_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"),
IOP( "ppdits", BSIM4v2_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"),
IOP( "ppditsd", BSIM4v2_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"),
IOP( "ppscbe1", BSIM4v2_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"),
IOP( "ppscbe2", BSIM4v2_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"),
IOP( "ppvag", BSIM4v2_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"),
IOP( "pwr", BSIM4v2_MOD_PWR, IF_REAL, "Cross-term dependence of wr"),
IOP( "pdwg", BSIM4v2_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"),
IOP( "pdwb", BSIM4v2_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"),
IOP( "pb0", BSIM4v2_MOD_PB0, IF_REAL, "Cross-term dependence of b0"),
IOP( "pb1", BSIM4v2_MOD_PB1, IF_REAL, "Cross-term dependence of b1"),
IOP( "pcgsl", BSIM4v2_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"),
IOP( "pcgdl", BSIM4v2_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"),
IOP( "pckappas", BSIM4v2_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"),
IOP( "pckappad", BSIM4v2_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"),
IOP( "pcf", BSIM4v2_MOD_PCF, IF_REAL, "Cross-term dependence of cf"),
IOP( "pclc", BSIM4v2_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"),
IOP( "pcle", BSIM4v2_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"),
IOP( "palpha0", BSIM4v2_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"),
IOP( "palpha1", BSIM4v2_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"),
IOP( "pbeta0", BSIM4v2_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"),
IOP( "pagidl", BSIM4v2_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"),
IOP( "pbgidl", BSIM4v2_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"),
IOP( "pcgidl", BSIM4v2_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"),
IOP( "pegidl", BSIM4v2_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"),
IOP( "paigc", BSIM4v2_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"),
IOP( "pbigc", BSIM4v2_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"),
IOP( "pcigc", BSIM4v2_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"),
IOP( "paigsd", BSIM4v2_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"),
IOP( "pbigsd", BSIM4v2_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"),
IOP( "pcigsd", BSIM4v2_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"),
IOP( "paigbacc", BSIM4v2_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"),
IOP( "pbigbacc", BSIM4v2_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"),
IOP( "pcigbacc", BSIM4v2_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"),
IOP( "paigbinv", BSIM4v2_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"),
IOP( "pbigbinv", BSIM4v2_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"),
IOP( "pcigbinv", BSIM4v2_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"),
IOP( "pnigc", BSIM4v2_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"),
IOP( "pnigbinv", BSIM4v2_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"),
IOP( "pnigbacc", BSIM4v2_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"),
IOP( "pntox", BSIM4v2_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"),
IOP( "peigbinv", BSIM4v2_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"),
IOP( "ppigcd", BSIM4v2_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"),
IOP( "ppoxedge", BSIM4v2_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"),
IOP( "pvfbcv", BSIM4v2_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"),
IOP( "pvfb", BSIM4v2_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"),
IOP( "pacde", BSIM4v2_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"),
IOP( "pmoin", BSIM4v2_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"),
IOP( "pnoff", BSIM4v2_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"),
IOP( "pvoffcv", BSIM4v2_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"),
IOP( "pxrcrg1", BSIM4v2_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"),
IOP( "pxrcrg2", BSIM4v2_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"),
IOP( "peu", BSIM4v2_MOD_PEU, IF_REAL, "Cross-term dependence of eu"),
IOP( "noia", BSIM4v2_MOD_NOIA, IF_REAL, "Flicker noise parameter"),
IOP( "noib", BSIM4v2_MOD_NOIB, IF_REAL, "Flicker noise parameter"),
IOP( "noic", BSIM4v2_MOD_NOIC, IF_REAL, "Flicker noise parameter"),
IOP( "tnoia", BSIM4v2_MOD_TNOIA, IF_REAL, "Thermal noise parameter"),
IOP( "tnoib", BSIM4v2_MOD_TNOIB, IF_REAL, "Thermal noise parameter"),
IOP( "ntnoi", BSIM4v2_MOD_NTNOI, IF_REAL, "Thermal noise parameter"),
IOP( "em", BSIM4v2_MOD_EM, IF_REAL, "Flicker noise parameter"),
IOP( "ef", BSIM4v2_MOD_EF, IF_REAL, "Flicker noise frequency exponent"),
IOP( "af", BSIM4v2_MOD_AF, IF_REAL, "Flicker noise exponent"),
IOP( "kf", BSIM4v2_MOD_KF, IF_REAL, "Flicker noise coefficient"),
IP( "nmos", BSIM4v2_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"),
IP( "pmos", BSIM4v2_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"),
};
char *BSIM4v2names[] = {
"Drain",
"Gate",
"Source",
"Bulk",
"Charge"
};
int BSIM4v2nSize = NUMELEMS(BSIM4v2names);
int BSIM4v2pTSize = NUMELEMS(BSIM4v2pTable);
int BSIM4v2mPTSize = NUMELEMS(BSIM4v2mPTable);
int BSIM4v2iSize = sizeof(BSIM4v2instance);
int BSIM4v2mSize = sizeof(BSIM4v2model);

View File

@ -1,673 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4acld.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
*
* Modified by Xuemei Xi 10/05/2001
**********/
#include "ngspice.h"
#include "cktdefs.h"
#include "bsim4v2def.h"
#include "sperror.h"
int
BSIM4v2acLoad(
GENmodel *inModel,
CKTcircuit *ckt)
{
BSIM4v2model *model = (BSIM4v2model*)inModel;
BSIM4v2instance *here;
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb;
double xcbgb, xcbdb, xcbsb, xcbbb;
double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi;
double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi;
double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr;
double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi;
double xcdbdb, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb, xcsgmb;
double xcgmbb=0.0, xcbgmb;
double capbd, capbs, omega;
double gstot, gstotd, gstotg, gstots, gstotb, gspr;
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr;
double gIstotg, gIstotd, gIstots, gIstotb;
double gIdtotg, gIdtotd, gIdtots, gIdtotb;
double gIbtotg, gIbtotd, gIbtots, gIbtotb;
double gIgtotg, gIgtotd, gIgtots, gIgtotb;
double cgso, cgdo, cgbo;
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
double T0=0.0, T1, T2, T3;
double Csg, Csd, Css;
double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr;
double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi;
double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi;
double FwdSumr, RevSumr, Gmr, Gmbsr;
double FwdSumi, RevSumi, Gmi, Gmbsi;
struct bsim4SizeDependParam *pParam;
double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls;
double m;
omega = ckt->CKTomega;
for (; model != NULL; model = model->BSIM4v2nextModel)
{ for (here = model->BSIM4v2instances; here!= NULL;
here = here->BSIM4v2nextInstance)
{ if (here->BSIM4v2owner != ARCHme) continue;
pParam = here->pParam;
capbd = here->BSIM4v2capbd;
capbs = here->BSIM4v2capbs;
cgso = here->BSIM4v2cgso;
cgdo = here->BSIM4v2cgdo;
cgbo = pParam->BSIM4v2cgbo;
Csd = -(here->BSIM4v2cddb + here->BSIM4v2cgdb + here->BSIM4v2cbdb);
Csg = -(here->BSIM4v2cdgb + here->BSIM4v2cggb + here->BSIM4v2cbgb);
Css = -(here->BSIM4v2cdsb + here->BSIM4v2cgsb + here->BSIM4v2cbsb);
if (here->BSIM4v2acnqsMod)
{ T0 = omega * here->BSIM4v2taunet;
T1 = T0 * T0;
T2 = 1.0 / (1.0 + T1);
T3 = T0 * T2;
gmr = here->BSIM4v2gm * T2;
gmbsr = here->BSIM4v2gmbs * T2;
gdsr = here->BSIM4v2gds * T2;
gmi = -here->BSIM4v2gm * T3;
gmbsi = -here->BSIM4v2gmbs * T3;
gdsi = -here->BSIM4v2gds * T3;
Cddr = here->BSIM4v2cddb * T2;
Cdgr = here->BSIM4v2cdgb * T2;
Cdsr = here->BSIM4v2cdsb * T2;
Cdbr = -(Cddr + Cdgr + Cdsr);
/* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */
Cddi = here->BSIM4v2cddb * T3 * omega;
Cdgi = here->BSIM4v2cdgb * T3 * omega;
Cdsi = here->BSIM4v2cdsb * T3 * omega;
Cdbi = -(Cddi + Cdgi + Cdsi);
Csdr = Csd * T2;
Csgr = Csg * T2;
Cssr = Css * T2;
Csbr = -(Csdr + Csgr + Cssr);
Csdi = Csd * T3 * omega;
Csgi = Csg * T3 * omega;
Cssi = Css * T3 * omega;
Csbi = -(Csdi + Csgi + Cssi);
Cgdr = -(Cddr + Csdr + here->BSIM4v2cbdb);
Cggr = -(Cdgr + Csgr + here->BSIM4v2cbgb);
Cgsr = -(Cdsr + Cssr + here->BSIM4v2cbsb);
Cgbr = -(Cgdr + Cggr + Cgsr);
Cgdi = -(Cddi + Csdi);
Cggi = -(Cdgi + Csgi);
Cgsi = -(Cdsi + Cssi);
Cgbi = -(Cgdi + Cggi + Cgsi);
}
else /* QS */
{ gmr = here->BSIM4v2gm;
gmbsr = here->BSIM4v2gmbs;
gdsr = here->BSIM4v2gds;
gmi = gmbsi = gdsi = 0.0;
Cddr = here->BSIM4v2cddb;
Cdgr = here->BSIM4v2cdgb;
Cdsr = here->BSIM4v2cdsb;
Cdbr = -(Cddr + Cdgr + Cdsr);
Cddi = Cdgi = Cdsi = Cdbi = 0.0;
Csdr = Csd;
Csgr = Csg;
Cssr = Css;
Csbr = -(Csdr + Csgr + Cssr);
Csdi = Csgi = Cssi = Csbi = 0.0;
Cgdr = here->BSIM4v2cgdb;
Cggr = here->BSIM4v2cggb;
Cgsr = here->BSIM4v2cgsb;
Cgbr = -(Cgdr + Cggr + Cgsr);
Cgdi = Cggi = Cgsi = Cgbi = 0.0;
}
if (here->BSIM4v2mode >= 0)
{ Gmr = gmr;
Gmbsr = gmbsr;
FwdSumr = Gmr + Gmbsr;
RevSumr = 0.0;
Gmi = gmi;
Gmbsi = gmbsi;
FwdSumi = Gmi + Gmbsi;
RevSumi = 0.0;
gbbdp = -(here->BSIM4v2gbds);
gbbsp = here->BSIM4v2gbds + here->BSIM4v2gbgs + here->BSIM4v2gbbs;
gbdpg = here->BSIM4v2gbgs;
gbdpdp = here->BSIM4v2gbds;
gbdpb = here->BSIM4v2gbbs;
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
gbspdp = 0.0;
gbspg = 0.0;
gbspb = 0.0;
gbspsp = 0.0;
if (model->BSIM4v2igcMod)
{ gIstotg = here->BSIM4v2gIgsg + here->BSIM4v2gIgcsg;
gIstotd = here->BSIM4v2gIgcsd;
gIstots = here->BSIM4v2gIgss + here->BSIM4v2gIgcss;
gIstotb = here->BSIM4v2gIgcsb;
gIdtotg = here->BSIM4v2gIgdg + here->BSIM4v2gIgcdg;
gIdtotd = here->BSIM4v2gIgdd + here->BSIM4v2gIgcdd;
gIdtots = here->BSIM4v2gIgcds;
gIdtotb = here->BSIM4v2gIgcdb;
}
else
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0;
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0;
}
if (model->BSIM4v2igbMod)
{ gIbtotg = here->BSIM4v2gIgbg;
gIbtotd = here->BSIM4v2gIgbd;
gIbtots = here->BSIM4v2gIgbs;
gIbtotb = here->BSIM4v2gIgbb;
}
else
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0;
if ((model->BSIM4v2igcMod != 0) || (model->BSIM4v2igbMod != 0))
{ gIgtotg = gIstotg + gIdtotg + gIbtotg;
gIgtotd = gIstotd + gIdtotd + gIbtotd ;
gIgtots = gIstots + gIdtots + gIbtots;
gIgtotb = gIstotb + gIdtotb + gIbtotb;
}
else
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0;
if (here->BSIM4v2rgateMod == 2)
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vges)
- *(ckt->CKTstates[0] + here->BSIM4v2vgs);
else if (here->BSIM4v2rgateMod == 3)
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vgms)
- *(ckt->CKTstates[0] + here->BSIM4v2vgs);
if (here->BSIM4v2rgateMod > 1)
{ gcrgd = here->BSIM4v2gcrgd * T0;
gcrgg = here->BSIM4v2gcrgg * T0;
gcrgs = here->BSIM4v2gcrgs * T0;
gcrgb = here->BSIM4v2gcrgb * T0;
gcrgg -= here->BSIM4v2gcrg;
gcrg = here->BSIM4v2gcrg;
}
else
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0;
if (here->BSIM4v2rgateMod == 3)
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v2cgbo) * omega;
xcgmdb = -cgdo * omega;
xcgmsb = -cgso * omega;
xcgmbb = -pParam->BSIM4v2cgbo * omega;
xcdgmb = xcgmdb;
xcsgmb = xcgmsb;
xcbgmb = xcgmbb;
xcggbr = Cggr * omega;
xcgdbr = Cgdr * omega;
xcgsbr = Cgsr * omega;
xcgbbr = -(xcggbr + xcgdbr + xcgsbr);
xcdgbr = Cdgr * omega;
xcsgbr = Csgr * omega;
xcbgb = here->BSIM4v2cbgb * omega;
}
else
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v2cgbo ) * omega;
xcgdbr = (Cgdr - cgdo) * omega;
xcgsbr = (Cgsr - cgso) * omega;
xcgbbr = -(xcggbr + xcgdbr + xcgsbr);
xcdgbr = (Cdgr - cgdo) * omega;
xcsgbr = (Csgr - cgso) * omega;
xcbgb = (here->BSIM4v2cbgb - pParam->BSIM4v2cgbo) * omega;
xcdgmb = xcsgmb = xcbgmb = 0.0;
}
xcddbr = (Cddr + here->BSIM4v2capbd + cgdo) * omega;
xcdsbr = Cdsr * omega;
xcsdbr = Csdr * omega;
xcssbr = (here->BSIM4v2capbs + cgso + Cssr) * omega;
if (!here->BSIM4v2rbodyMod)
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb);
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb);
xcbdb = (here->BSIM4v2cbdb - here->BSIM4v2capbd) * omega;
xcbsb = (here->BSIM4v2cbsb - here->BSIM4v2capbs) * omega;
xcdbdb = 0.0;
}
else
{ xcdbbr = Cdbr * omega;
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb)
+ here->BSIM4v2capbs * omega;
xcbdb = here->BSIM4v2cbdb * omega;
xcbsb = here->BSIM4v2cbsb * omega;
xcdbdb = -here->BSIM4v2capbd * omega;
xcsbsb = -here->BSIM4v2capbs * omega;
}
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb);
xcdgbi = Cdgi;
xcsgbi = Csgi;
xcddbi = Cddi;
xcdsbi = Cdsi;
xcsdbi = Csdi;
xcssbi = Cssi;
xcdbbi = Cdbi;
xcsbbi = Csbi;
xcggbi = Cggi;
xcgdbi = Cgdi;
xcgsbi = Cgsi;
xcgbbi = Cgbi;
}
else /* Reverse mode */
{ Gmr = -gmr;
Gmbsr = -gmbsr;
FwdSumr = 0.0;
RevSumr = -(Gmr + Gmbsr);
Gmi = -gmi;
Gmbsi = -gmbsi;
FwdSumi = 0.0;
RevSumi = -(Gmi + Gmbsi);
gbbsp = -(here->BSIM4v2gbds);
gbbdp = here->BSIM4v2gbds + here->BSIM4v2gbgs + here->BSIM4v2gbbs;
gbdpg = 0.0;
gbdpsp = 0.0;
gbdpb = 0.0;
gbdpdp = 0.0;
gbspg = here->BSIM4v2gbgs;
gbspsp = here->BSIM4v2gbds;
gbspb = here->BSIM4v2gbbs;
gbspdp = -(gbspg + gbspsp + gbspb);
if (model->BSIM4v2igcMod)
{ gIstotg = here->BSIM4v2gIgsg + here->BSIM4v2gIgcdg;
gIstotd = here->BSIM4v2gIgcds;
gIstots = here->BSIM4v2gIgss + here->BSIM4v2gIgcdd;
gIstotb = here->BSIM4v2gIgcdb;
gIdtotg = here->BSIM4v2gIgdg + here->BSIM4v2gIgcsg;
gIdtotd = here->BSIM4v2gIgdd + here->BSIM4v2gIgcss;
gIdtots = here->BSIM4v2gIgcsd;
gIdtotb = here->BSIM4v2gIgcsb;
}
else
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0;
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0;
}
if (model->BSIM4v2igbMod)
{ gIbtotg = here->BSIM4v2gIgbg;
gIbtotd = here->BSIM4v2gIgbs;
gIbtots = here->BSIM4v2gIgbd;
gIbtotb = here->BSIM4v2gIgbb;
}
else
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0;
if ((model->BSIM4v2igcMod != 0) || (model->BSIM4v2igbMod != 0))
{ gIgtotg = gIstotg + gIdtotg + gIbtotg;
gIgtotd = gIstotd + gIdtotd + gIbtotd ;
gIgtots = gIstots + gIdtots + gIbtots;
gIgtotb = gIstotb + gIdtotb + gIbtotb;
}
else
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0;
if (here->BSIM4v2rgateMod == 2)
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vges)
- *(ckt->CKTstates[0] + here->BSIM4v2vgs);
else if (here->BSIM4v2rgateMod == 3)
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vgms)
- *(ckt->CKTstates[0] + here->BSIM4v2vgs);
if (here->BSIM4v2rgateMod > 1)
{ gcrgd = here->BSIM4v2gcrgs * T0;
gcrgg = here->BSIM4v2gcrgg * T0;
gcrgs = here->BSIM4v2gcrgd * T0;
gcrgb = here->BSIM4v2gcrgb * T0;
gcrgg -= here->BSIM4v2gcrg;
gcrg = here->BSIM4v2gcrg;
}
else
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0;
if (here->BSIM4v2rgateMod == 3)
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v2cgbo) * omega;
xcgmdb = -cgdo * omega;
xcgmsb = -cgso * omega;
xcgmbb = -pParam->BSIM4v2cgbo * omega;
xcdgmb = xcgmdb;
xcsgmb = xcgmsb;
xcbgmb = xcgmbb;
xcggbr = Cggr * omega;
xcgdbr = Cgsr * omega;
xcgsbr = Cgdr * omega;
xcgbbr = -(xcggbr + xcgdbr + xcgsbr);
xcdgbr = Csgr * omega;
xcsgbr = Cdgr * omega;
xcbgb = here->BSIM4v2cbgb * omega;
}
else
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v2cgbo ) * omega;
xcgdbr = (Cgsr - cgdo) * omega;
xcgsbr = (Cgdr - cgso) * omega;
xcgbbr = -(xcggbr + xcgdbr + xcgsbr);
xcdgbr = (Csgr - cgdo) * omega;
xcsgbr = (Cdgr - cgso) * omega;
xcbgb = (here->BSIM4v2cbgb - pParam->BSIM4v2cgbo) * omega;
xcdgmb = xcsgmb = xcbgmb = 0.0;
}
xcddbr = (here->BSIM4v2capbd + cgdo + Cssr) * omega;
xcdsbr = Csdr * omega;
xcsdbr = Cdsr * omega;
xcssbr = (Cddr + here->BSIM4v2capbs + cgso) * omega;
if (!here->BSIM4v2rbodyMod)
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb);
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb);
xcbdb = (here->BSIM4v2cbsb - here->BSIM4v2capbd) * omega;
xcbsb = (here->BSIM4v2cbdb - here->BSIM4v2capbs) * omega;
xcdbdb = 0.0;
}
else
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb)
+ here->BSIM4v2capbd * omega;
xcsbbr = Cdbr * omega;
xcbdb = here->BSIM4v2cbsb * omega;
xcbsb = here->BSIM4v2cbdb * omega;
xcdbdb = -here->BSIM4v2capbd * omega;
xcsbsb = -here->BSIM4v2capbs * omega;
}
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb);
xcdgbi = Csgi;
xcsgbi = Cdgi;
xcddbi = Cssi;
xcdsbi = Csdi;
xcsdbi = Cdsi;
xcssbi = Cddi;
xcdbbi = Csbi;
xcsbbi = Cdbi;
xcggbi = Cggi;
xcgdbi = Cgsi;
xcgsbi = Cgdi;
xcgbbi = Cgbi;
}
if (model->BSIM4v2rdsMod == 1)
{ gstot = here->BSIM4v2gstot;
gstotd = here->BSIM4v2gstotd;
gstotg = here->BSIM4v2gstotg;
gstots = here->BSIM4v2gstots - gstot;
gstotb = here->BSIM4v2gstotb;
gdtot = here->BSIM4v2gdtot;
gdtotd = here->BSIM4v2gdtotd - gdtot;
gdtotg = here->BSIM4v2gdtotg;
gdtots = here->BSIM4v2gdtots;
gdtotb = here->BSIM4v2gdtotb;
}
else
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0;
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0;
}
/*
* Loading AC matrix
*/
m = here->BSIM4v2m;
if (!model->BSIM4v2rdsMod)
{ gdpr = here->BSIM4v2drainConductance;
gspr = here->BSIM4v2sourceConductance;
}
else
gdpr = gspr = 0.0;
if (!here->BSIM4v2rbodyMod)
{ gjbd = here->BSIM4v2gbd;
gjbs = here->BSIM4v2gbs;
}
else
gjbd = gjbs = 0.0;
geltd = here->BSIM4v2grgeltd;
if (here->BSIM4v2rgateMod == 1)
{ *(here->BSIM4v2GEgePtr) += m * geltd;
*(here->BSIM4v2GPgePtr) -= m * geltd;
*(here->BSIM4v2GEgpPtr) -= m * geltd;
*(here->BSIM4v2GPgpPtr +1) += m * xcggbr;
*(here->BSIM4v2GPgpPtr) += m * (geltd + xcggbi + gIgtotg);
*(here->BSIM4v2GPdpPtr +1) += m * xcgdbr;
*(here->BSIM4v2GPdpPtr) += m * (xcgdbi + gIgtotd);
*(here->BSIM4v2GPspPtr +1) += m * xcgsbr;
*(here->BSIM4v2GPspPtr) += m * (xcgsbi + gIgtots);
*(here->BSIM4v2GPbpPtr +1) += m * xcgbbr;
*(here->BSIM4v2GPbpPtr) += m * (xcgbbi + gIgtotb);
} /* WDLiu: gcrg already subtracted from all gcrgg below */
else if (here->BSIM4v2rgateMod == 2)
{ *(here->BSIM4v2GEgePtr) += m * gcrg;
*(here->BSIM4v2GEgpPtr) += m * gcrgg;
*(here->BSIM4v2GEdpPtr) += m * gcrgd;
*(here->BSIM4v2GEspPtr) += m * gcrgs;
*(here->BSIM4v2GEbpPtr) += m * gcrgb;
*(here->BSIM4v2GPgePtr) -= m * gcrg;
*(here->BSIM4v2GPgpPtr +1) += m * xcggbr;
*(here->BSIM4v2GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg);
*(here->BSIM4v2GPdpPtr +1) += m * xcgdbr;
*(here->BSIM4v2GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd);
*(here->BSIM4v2GPspPtr +1) += m * xcgsbr;
*(here->BSIM4v2GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots);
*(here->BSIM4v2GPbpPtr +1) += m * xcgbbr;
*(here->BSIM4v2GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb);
}
else if (here->BSIM4v2rgateMod == 3)
{ *(here->BSIM4v2GEgePtr) += m * geltd;
*(here->BSIM4v2GEgmPtr) -= m * geltd;
*(here->BSIM4v2GMgePtr) -= m * geltd;
*(here->BSIM4v2GMgmPtr) += m * (geltd + gcrg);
*(here->BSIM4v2GMgmPtr +1) += m * xcgmgmb;
*(here->BSIM4v2GMdpPtr) += m * gcrgd;
*(here->BSIM4v2GMdpPtr +1) += m * xcgmdb;
*(here->BSIM4v2GMgpPtr) += m * gcrgg;
*(here->BSIM4v2GMspPtr) += m * gcrgs;
*(here->BSIM4v2GMspPtr +1) += m * xcgmsb;
*(here->BSIM4v2GMbpPtr) += m * gcrgb;
*(here->BSIM4v2GMbpPtr +1) += m * xcgmbb;
*(here->BSIM4v2DPgmPtr +1) += m * xcdgmb;
*(here->BSIM4v2GPgmPtr) -= m * gcrg;
*(here->BSIM4v2SPgmPtr +1) += m * xcsgmb;
*(here->BSIM4v2BPgmPtr +1) += m * xcbgmb;
*(here->BSIM4v2GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg);
*(here->BSIM4v2GPgpPtr +1) += m * xcggbr;
*(here->BSIM4v2GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd);
*(here->BSIM4v2GPdpPtr +1) += m * xcgdbr;
*(here->BSIM4v2GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots);
*(here->BSIM4v2GPspPtr +1) += m * xcgsbr;
*(here->BSIM4v2GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb);
*(here->BSIM4v2GPbpPtr +1) += m * xcgbbr;
}
else
{ *(here->BSIM4v2GPgpPtr +1) += m * xcggbr;
*(here->BSIM4v2GPgpPtr) += m * (xcggbi + gIgtotg);
*(here->BSIM4v2GPdpPtr +1) += m * xcgdbr;
*(here->BSIM4v2GPdpPtr) += m * (xcgdbi + gIgtotd);
*(here->BSIM4v2GPspPtr +1) += m * xcgsbr;
*(here->BSIM4v2GPspPtr) += m * (xcgsbi + gIgtots);
*(here->BSIM4v2GPbpPtr +1) += m * xcgbbr;
*(here->BSIM4v2GPbpPtr) += m * (xcgbbi + gIgtotb);
}
if (model->BSIM4v2rdsMod)
{ (*(here->BSIM4v2DgpPtr) += m * gdtotg);
(*(here->BSIM4v2DspPtr) += m * gdtots);
(*(here->BSIM4v2DbpPtr) += m * gdtotb);
(*(here->BSIM4v2SdpPtr) += m * gstotd);
(*(here->BSIM4v2SgpPtr) += m * gstotg);
(*(here->BSIM4v2SbpPtr) += m * gstotb);
}
*(here->BSIM4v2DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi);
*(here->BSIM4v2DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4v2gbd
- gdtotd + RevSumr + gbdpdp - gIdtotd);
*(here->BSIM4v2DPdPtr) -= m * (gdpr + gdtot);
*(here->BSIM4v2DPgpPtr +1) += m * (xcdgbr + Gmi);
*(here->BSIM4v2DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg);
*(here->BSIM4v2DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi);
*(here->BSIM4v2DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots);
*(here->BSIM4v2DPbpPtr +1) += m * (xcdbbr + Gmbsi);
*(here->BSIM4v2DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb);
*(here->BSIM4v2DdpPtr) -= m * (gdpr - gdtotd);
*(here->BSIM4v2DdPtr) += m * (gdpr + gdtot);
*(here->BSIM4v2SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi);
*(here->BSIM4v2SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd);
*(here->BSIM4v2SPgpPtr +1) += m * (xcsgbr - Gmi);
*(here->BSIM4v2SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg);
*(here->BSIM4v2SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi);
*(here->BSIM4v2SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4v2gbs
- gstots + FwdSumr + gbspsp - gIstots);
*(here->BSIM4v2SPsPtr) -= m * (gspr + gstot);
*(here->BSIM4v2SPbpPtr +1) += m * (xcsbbr - Gmbsi);
*(here->BSIM4v2SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb);
*(here->BSIM4v2SspPtr) -= m * (gspr - gstots);
*(here->BSIM4v2SsPtr) += m * (gspr + gstot);
*(here->BSIM4v2BPdpPtr +1) += m * xcbdb;
*(here->BSIM4v2BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd);
*(here->BSIM4v2BPgpPtr +1) += m * xcbgb;
*(here->BSIM4v2BPgpPtr) -= m * (here->BSIM4v2gbgs + gIbtotg);
*(here->BSIM4v2BPspPtr +1) += m * xcbsb;
*(here->BSIM4v2BPspPtr) -= m * (gjbs - gbbsp + gIbtots);
*(here->BSIM4v2BPbpPtr +1) += m * xcbbb;
*(here->BSIM4v2BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v2gbbs
- gIbtotb);
ggidld = here->BSIM4v2ggidld;
ggidlg = here->BSIM4v2ggidlg;
ggidlb = here->BSIM4v2ggidlb;
ggislg = here->BSIM4v2ggislg;
ggisls = here->BSIM4v2ggisls;
ggislb = here->BSIM4v2ggislb;
/* stamp gidl */
(*(here->BSIM4v2DPdpPtr) += m * ggidld);
(*(here->BSIM4v2DPgpPtr) += m * ggidlg);
(*(here->BSIM4v2DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb));
(*(here->BSIM4v2DPbpPtr) += m * ggidlb);
(*(here->BSIM4v2BPdpPtr) -= m * ggidld);
(*(here->BSIM4v2BPgpPtr) -= m * ggidlg);
(*(here->BSIM4v2BPspPtr) += m * ((ggidlg + ggidld) + ggidlb));
(*(here->BSIM4v2BPbpPtr) -= m * ggidlb);
/* stamp gisl */
(*(here->BSIM4v2SPdpPtr) -= m * ((ggisls + ggislg) + ggislb));
(*(here->BSIM4v2SPgpPtr) += m * ggislg);
(*(here->BSIM4v2SPspPtr) += m * ggisls);
(*(here->BSIM4v2SPbpPtr) += m * ggislb);
(*(here->BSIM4v2BPdpPtr) += m * ((ggislg + ggisls) + ggislb));
(*(here->BSIM4v2BPgpPtr) -= m * ggislg);
(*(here->BSIM4v2BPspPtr) -= m * ggisls);
(*(here->BSIM4v2BPbpPtr) -= m * ggislb);
if (here->BSIM4v2rbodyMod)
{ (*(here->BSIM4v2DPdbPtr +1) += m * xcdbdb);
(*(here->BSIM4v2DPdbPtr) -= m * here->BSIM4v2gbd);
(*(here->BSIM4v2SPsbPtr +1) += m * xcsbsb);
(*(here->BSIM4v2SPsbPtr) -= m * here->BSIM4v2gbs);
(*(here->BSIM4v2DBdpPtr +1) += m * xcdbdb);
(*(here->BSIM4v2DBdpPtr) -= m * here->BSIM4v2gbd);
(*(here->BSIM4v2DBdbPtr +1) -= m * xcdbdb);
(*(here->BSIM4v2DBdbPtr) += m * (here->BSIM4v2gbd + here->BSIM4v2grbpd
+ here->BSIM4v2grbdb));
(*(here->BSIM4v2DBbpPtr) -= m * here->BSIM4v2grbpd);
(*(here->BSIM4v2DBbPtr) -= m * here->BSIM4v2grbdb);
(*(here->BSIM4v2BPdbPtr) -= m * here->BSIM4v2grbpd);
(*(here->BSIM4v2BPbPtr) -= m * here->BSIM4v2grbpb);
(*(here->BSIM4v2BPsbPtr) -= m * here->BSIM4v2grbps);
(*(here->BSIM4v2BPbpPtr) += m * (here->BSIM4v2grbpd + here->BSIM4v2grbps
+ here->BSIM4v2grbpb));
/* WDLiu: (-here->BSIM4v2gbbs) already added to BPbpPtr */
(*(here->BSIM4v2SBspPtr +1) += m * xcsbsb);
(*(here->BSIM4v2SBspPtr) -= m * here->BSIM4v2gbs);
(*(here->BSIM4v2SBbpPtr) -= m * here->BSIM4v2grbps);
(*(here->BSIM4v2SBbPtr) -= m * here->BSIM4v2grbsb);
(*(here->BSIM4v2SBsbPtr +1) -= m * xcsbsb);
(*(here->BSIM4v2SBsbPtr) += m * (here->BSIM4v2gbs
+ here->BSIM4v2grbps + here->BSIM4v2grbsb));
(*(here->BSIM4v2BdbPtr) -= m * here->BSIM4v2grbdb);
(*(here->BSIM4v2BbpPtr) -= m * here->BSIM4v2grbpb);
(*(here->BSIM4v2BsbPtr) -= m * here->BSIM4v2grbsb);
(*(here->BSIM4v2BbPtr) += m * (here->BSIM4v2grbsb + here->BSIM4v2grbdb
+ here->BSIM4v2grbpb));
}
/*
* WDLiu: The internal charge node generated for transient NQS is not needed for
* AC NQS. The following is not doing a real job, but we have to keep it;
* otherwise a singular AC NQS matrix may occur if the transient NQS is on.
* The charge node is isolated from the instance.
*/
if (here->BSIM4v2trnqsMod)
{ (*(here->BSIM4v2QqPtr) += m * 1.0);
(*(here->BSIM4v2QgpPtr) += 0.0);
(*(here->BSIM4v2QdpPtr) += 0.0);
(*(here->BSIM4v2QspPtr) += 0.0);
(*(here->BSIM4v2QbpPtr) += 0.0);
(*(here->BSIM4v2DPqPtr) += 0.0);
(*(here->BSIM4v2SPqPtr) += 0.0);
(*(here->BSIM4v2GPqPtr) += 0.0);
}
}
}
return(OK);
}

View File

@ -1,345 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4ask.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
*
* Modified by Xuemei Xi, 10/05/2001.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "ifsim.h"
#include "cktdefs.h"
#include "devdefs.h"
#include "bsim4v2def.h"
#include "sperror.h"
int
BSIM4v2ask(
CKTcircuit *ckt,
GENinstance *inst,
int which,
IFvalue *value,
IFvalue *select)
{
BSIM4v2instance *here = (BSIM4v2instance*)inst;
NG_IGNORE(select);
switch(which)
{ case BSIM4v2_L:
value->rValue = here->BSIM4v2l;
return(OK);
case BSIM4v2_W:
value->rValue = here->BSIM4v2w;
return(OK);
case BSIM4v2_M:
value->rValue = here->BSIM4v2m;
return(OK);
case BSIM4v2_NF:
value->rValue = here->BSIM4v2nf;
return(OK);
case BSIM4v2_MIN:
value->iValue = here->BSIM4v2min;
return(OK);
case BSIM4v2_AS:
value->rValue = here->BSIM4v2sourceArea;
return(OK);
case BSIM4v2_AD:
value->rValue = here->BSIM4v2drainArea;
return(OK);
case BSIM4v2_PS:
value->rValue = here->BSIM4v2sourcePerimeter;
return(OK);
case BSIM4v2_PD:
value->rValue = here->BSIM4v2drainPerimeter;
return(OK);
case BSIM4v2_NRS:
value->rValue = here->BSIM4v2sourceSquares;
return(OK);
case BSIM4v2_NRD:
value->rValue = here->BSIM4v2drainSquares;
return(OK);
case BSIM4v2_OFF:
value->rValue = here->BSIM4v2off;
return(OK);
case BSIM4v2_RBSB:
value->rValue = here->BSIM4v2rbsb;
return(OK);
case BSIM4v2_RBDB:
value->rValue = here->BSIM4v2rbdb;
return(OK);
case BSIM4v2_RBPB:
value->rValue = here->BSIM4v2rbpb;
return(OK);
case BSIM4v2_RBPS:
value->rValue = here->BSIM4v2rbps;
return(OK);
case BSIM4v2_RBPD:
value->rValue = here->BSIM4v2rbpd;
return(OK);
case BSIM4v2_TRNQSMOD:
value->iValue = here->BSIM4v2trnqsMod;
return(OK);
case BSIM4v2_ACNQSMOD:
value->iValue = here->BSIM4v2acnqsMod;
return(OK);
case BSIM4v2_RBODYMOD:
value->iValue = here->BSIM4v2rbodyMod;
return(OK);
case BSIM4v2_RGATEMOD:
value->iValue = here->BSIM4v2rgateMod;
return(OK);
case BSIM4v2_GEOMOD:
value->iValue = here->BSIM4v2geoMod;
return(OK);
case BSIM4v2_RGEOMOD:
value->iValue = here->BSIM4v2rgeoMod;
return(OK);
case BSIM4v2_IC_VDS:
value->rValue = here->BSIM4v2icVDS;
return(OK);
case BSIM4v2_IC_VGS:
value->rValue = here->BSIM4v2icVGS;
return(OK);
case BSIM4v2_IC_VBS:
value->rValue = here->BSIM4v2icVBS;
return(OK);
case BSIM4v2_DNODE:
value->iValue = here->BSIM4v2dNode;
return(OK);
case BSIM4v2_GNODEEXT:
value->iValue = here->BSIM4v2gNodeExt;
return(OK);
case BSIM4v2_SNODE:
value->iValue = here->BSIM4v2sNode;
return(OK);
case BSIM4v2_BNODE:
value->iValue = here->BSIM4v2bNode;
return(OK);
case BSIM4v2_DNODEPRIME:
value->iValue = here->BSIM4v2dNodePrime;
return(OK);
case BSIM4v2_GNODEPRIME:
value->iValue = here->BSIM4v2gNodePrime;
return(OK);
case BSIM4v2_GNODEMID:
value->iValue = here->BSIM4v2gNodeMid;
return(OK);
case BSIM4v2_SNODEPRIME:
value->iValue = here->BSIM4v2sNodePrime;
return(OK);
case BSIM4v2_DBNODE:
value->iValue = here->BSIM4v2dbNode;
return(OK);
case BSIM4v2_BNODEPRIME:
value->iValue = here->BSIM4v2bNodePrime;
return(OK);
case BSIM4v2_SBNODE:
value->iValue = here->BSIM4v2sbNode;
return(OK);
case BSIM4v2_SOURCECONDUCT:
value->rValue = here->BSIM4v2sourceConductance;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_DRAINCONDUCT:
value->rValue = here->BSIM4v2drainConductance;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_VBD:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2vbd);
return(OK);
case BSIM4v2_VBS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2vbs);
return(OK);
case BSIM4v2_VGS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2vgs);
return(OK);
case BSIM4v2_VDS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2vds);
return(OK);
case BSIM4v2_CD:
value->rValue = here->BSIM4v2cd;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CBS:
value->rValue = here->BSIM4v2cbs;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CBD:
value->rValue = here->BSIM4v2cbd;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CSUB:
value->rValue = here->BSIM4v2csub;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_QINV:
value->rValue = here-> BSIM4v2qinv;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_IGIDL:
value->rValue = here->BSIM4v2Igidl;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_IGISL:
value->rValue = here->BSIM4v2Igisl;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_IGS:
value->rValue = here->BSIM4v2Igs;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_IGD:
value->rValue = here->BSIM4v2Igd;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_IGB:
value->rValue = here->BSIM4v2Igb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_IGCS:
value->rValue = here->BSIM4v2Igcs;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_IGCD:
value->rValue = here->BSIM4v2Igcd;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_GM:
value->rValue = here->BSIM4v2gm;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_GDS:
value->rValue = here->BSIM4v2gds;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_GMBS:
value->rValue = here->BSIM4v2gmbs;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_GBD:
value->rValue = here->BSIM4v2gbd;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_GBS:
value->rValue = here->BSIM4v2gbs;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_QB:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qb);
return(OK);
case BSIM4v2_CQB:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2cqb);
return(OK);
case BSIM4v2_QG:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qg);
return(OK);
case BSIM4v2_CQG:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2cqg);
return(OK);
case BSIM4v2_QD:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qd);
return(OK);
case BSIM4v2_CQD:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2cqd);
return(OK);
case BSIM4v2_QS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qs);
return(OK);
case BSIM4v2_CGGB:
value->rValue = here->BSIM4v2cggb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CGDB:
value->rValue = here->BSIM4v2cgdb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CGSB:
value->rValue = here->BSIM4v2cgsb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CDGB:
value->rValue = here->BSIM4v2cdgb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CDDB:
value->rValue = here->BSIM4v2cddb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CDSB:
value->rValue = here->BSIM4v2cdsb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CBGB:
value->rValue = here->BSIM4v2cbgb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CBDB:
value->rValue = here->BSIM4v2cbdb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CBSB:
value->rValue = here->BSIM4v2cbsb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CSGB:
value->rValue = here->BSIM4v2csgb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CSDB:
value->rValue = here->BSIM4v2csdb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CSSB:
value->rValue = here->BSIM4v2cssb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CGBB:
value->rValue = here->BSIM4v2cgbb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CDBB:
value->rValue = here->BSIM4v2cdbb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CSBB:
value->rValue = here->BSIM4v2csbb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CBBB:
value->rValue = here->BSIM4v2cbbb;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CAPBD:
value->rValue = here->BSIM4v2capbd;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_CAPBS:
value->rValue = here->BSIM4v2capbs;
value->rValue *= here->BSIM4v2m;
return(OK);
case BSIM4v2_VON:
value->rValue = here->BSIM4v2von;
return(OK);
case BSIM4v2_VDSAT:
value->rValue = here->BSIM4v2vdsat;
return(OK);
case BSIM4v2_QBS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qbs);
return(OK);
case BSIM4v2_QBD:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qbd);
return(OK);
default:
return(E_BADPARM);
}
/* NOTREACHED */
}

View File

@ -1,566 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4check.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 04/06/2001.
* Modified by Xuemei Xi, 10/05/2001.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "cktdefs.h"
#include "bsim4v2def.h"
#include "trandefs.h"
#include "const.h"
#include "sperror.h"
#include "devdefs.h"
int
BSIM4v2checkModel(
BSIM4v2model *model,
BSIM4v2instance *here,
CKTcircuit *ckt)
{
struct bsim4SizeDependParam *pParam;
int Fatal_Flag = 0;
FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("bsim4.out", "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "BSIM4v2: Berkeley Short Channel IGFET Model-4\n");
fprintf(fplog, "Developed by Weidong Liu, Xuemei Xi , Xiaodong Jin, Kanyu M. Cao and Prof. Chenming Hu in 2001.\n");
fprintf(fplog, "\n");
fprintf(fplog, "++++++++++ BSIM4v2 PARAMETER CHECKING BELOW ++++++++++\n");
if (strcmp(model->BSIM4v2version, "4.2.1") != 0)
{ fprintf(fplog, "Warning: This model is BSIM4.2.1; you specified a wrong version number.\n");
printf("Warning: This model is BSIM4.2.1; you specified a wrong version number.\n");
}
fprintf(fplog, "Model = %s\n", model->BSIM4v2modName);
if ((here->BSIM4v2rgateMod == 2) || (here->BSIM4v2rgateMod == 3))
{ if ((here->BSIM4v2trnqsMod == 1) || (here->BSIM4v2acnqsMod == 1))
{ fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n");
printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n");
}
}
if (model->BSIM4v2toxe <= 0.0)
{ fprintf(fplog, "Fatal: Toxe = %g is not positive.\n",
model->BSIM4v2toxe);
printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v2toxe);
Fatal_Flag = 1;
}
if (model->BSIM4v2toxp <= 0.0)
{ fprintf(fplog, "Fatal: Toxp = %g is not positive.\n",
model->BSIM4v2toxp);
printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v2toxp);
Fatal_Flag = 1;
}
if (model->BSIM4v2toxm <= 0.0)
{ fprintf(fplog, "Fatal: Toxm = %g is not positive.\n",
model->BSIM4v2toxm);
printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v2toxm);
Fatal_Flag = 1;
}
if (model->BSIM4v2toxref <= 0.0)
{ fprintf(fplog, "Fatal: Toxref = %g is not positive.\n",
model->BSIM4v2toxref);
printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v2toxref);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2lpe0 < -pParam->BSIM4v2leff)
{ fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n",
pParam->BSIM4v2lpe0);
printf("Fatal: Lpe0 = %g is less than -Leff.\n",
pParam->BSIM4v2lpe0);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2lpeb < -pParam->BSIM4v2leff)
{ fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n",
pParam->BSIM4v2lpeb);
printf("Fatal: Lpeb = %g is less than -Leff.\n",
pParam->BSIM4v2lpeb);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2phin < -0.4)
{ fprintf(fplog, "Fatal: Phin = %g is less than -0.4.\n",
pParam->BSIM4v2phin);
printf("Fatal: Phin = %g is less than -0.4.\n",
pParam->BSIM4v2phin);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2ndep <= 0.0)
{ fprintf(fplog, "Fatal: Ndep = %g is not positive.\n",
pParam->BSIM4v2ndep);
printf("Fatal: Ndep = %g is not positive.\n",
pParam->BSIM4v2ndep);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2nsub <= 0.0)
{ fprintf(fplog, "Fatal: Nsub = %g is not positive.\n",
pParam->BSIM4v2nsub);
printf("Fatal: Nsub = %g is not positive.\n",
pParam->BSIM4v2nsub);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2ngate < 0.0)
{ fprintf(fplog, "Fatal: Ngate = %g is not positive.\n",
pParam->BSIM4v2ngate);
printf("Fatal: Ngate = %g Ngate is not positive.\n",
pParam->BSIM4v2ngate);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2ngate > 1.e25)
{ fprintf(fplog, "Fatal: Ngate = %g is too high.\n",
pParam->BSIM4v2ngate);
printf("Fatal: Ngate = %g Ngate is too high\n",
pParam->BSIM4v2ngate);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2xj <= 0.0)
{ fprintf(fplog, "Fatal: Xj = %g is not positive.\n",
pParam->BSIM4v2xj);
printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v2xj);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2dvt1 < 0.0)
{ fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n",
pParam->BSIM4v2dvt1);
printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v2dvt1);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2dvt1w < 0.0)
{ fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n",
pParam->BSIM4v2dvt1w);
printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v2dvt1w);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2w0 == -pParam->BSIM4v2weff)
{ 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->BSIM4v2dsub < 0.0)
{ fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v2dsub);
printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v2dsub);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2b1 == -pParam->BSIM4v2weff)
{ 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->BSIM4v2u0temp <= 0.0)
{ fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM4v2u0temp);
printf("Fatal: u0 at current temperature = %g is not positive.\n",
pParam->BSIM4v2u0temp);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2delta < 0.0)
{ fprintf(fplog, "Fatal: Delta = %g is less than zero.\n",
pParam->BSIM4v2delta);
printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v2delta);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2vsattemp <= 0.0)
{ fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM4v2vsattemp);
printf("Fatal: Vsat at current temperature = %g is not positive.\n",
pParam->BSIM4v2vsattemp);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2pclm <= 0.0)
{ fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v2pclm);
printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v2pclm);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2drout < 0.0)
{ fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v2drout);
printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v2drout);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2pscbe2 <= 0.0)
{ fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n",
pParam->BSIM4v2pscbe2);
printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v2pscbe2);
}
if (here->BSIM4v2nf < 1.0)
{ fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v2nf);
printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v2nf);
Fatal_Flag = 1;
}
if ((here->BSIM4v2l + model->BSIM4v2xl) <= model->BSIM4v2xgl)
{ fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n");
printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n");
Fatal_Flag = 1;
}
if (model->BSIM4v2ngcon < 1.0)
{ fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n");
printf("Fatal: The parameter ngcon cannot be smaller than one.\n");
Fatal_Flag = 1;
}
if ((model->BSIM4v2ngcon != 1.0) && (model->BSIM4v2ngcon != 2.0))
{ model->BSIM4v2ngcon = 1.0;
fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n");
printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n");
}
if (model->BSIM4v2gbmin < 1.0e-20)
{ fprintf(fplog, "Warning: Gbmin = %g is too small.\n",
model->BSIM4v2gbmin);
printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v2gbmin);
}
if (pParam->BSIM4v2noff < 0.1)
{ fprintf(fplog, "Warning: Noff = %g is too small.\n",
pParam->BSIM4v2noff);
printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v2noff);
}
if (pParam->BSIM4v2noff > 4.0)
{ fprintf(fplog, "Warning: Noff = %g is too large.\n",
pParam->BSIM4v2noff);
printf("Warning: Noff = %g is too large.\n", pParam->BSIM4v2noff);
}
if (pParam->BSIM4v2voffcv < -0.5)
{ fprintf(fplog, "Warning: Voffcv = %g is too small.\n",
pParam->BSIM4v2voffcv);
printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v2voffcv);
}
if (pParam->BSIM4v2voffcv > 0.5)
{ fprintf(fplog, "Warning: Voffcv = %g is too large.\n",
pParam->BSIM4v2voffcv);
printf("Warning: Voffcv = %g is too large.\n", pParam->BSIM4v2voffcv);
}
/* Check capacitance parameters */
if (pParam->BSIM4v2clc < 0.0)
{ fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v2clc);
printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v2clc);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2moin < 5.0)
{ fprintf(fplog, "Warning: Moin = %g is too small.\n",
pParam->BSIM4v2moin);
printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v2moin);
}
if (pParam->BSIM4v2moin > 25.0)
{ fprintf(fplog, "Warning: Moin = %g is too large.\n",
pParam->BSIM4v2moin);
printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v2moin);
}
if(model->BSIM4v2capMod ==2) {
if (pParam->BSIM4v2acde < 0.4)
{ fprintf(fplog, "Warning: Acde = %g is too small.\n",
pParam->BSIM4v2acde);
printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v2acde);
}
if (pParam->BSIM4v2acde > 1.6)
{ fprintf(fplog, "Warning: Acde = %g is too large.\n",
pParam->BSIM4v2acde);
printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v2acde);
}
}
if (model->BSIM4v2paramChk ==1)
{
/* Check L and W parameters */
if (pParam->BSIM4v2leff <= 1.0e-9)
{ fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n",
pParam->BSIM4v2leff);
printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n",
pParam->BSIM4v2leff);
}
if (pParam->BSIM4v2leffCV <= 1.0e-9)
{ fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n",
pParam->BSIM4v2leffCV);
printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n",
pParam->BSIM4v2leffCV);
}
if (pParam->BSIM4v2weff <= 1.0e-9)
{ fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n",
pParam->BSIM4v2weff);
printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n",
pParam->BSIM4v2weff);
}
if (pParam->BSIM4v2weffCV <= 1.0e-9)
{ fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n",
pParam->BSIM4v2weffCV);
printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n",
pParam->BSIM4v2weffCV);
}
/* Check threshold voltage parameters */
if (model->BSIM4v2toxe < 1.0e-10)
{ fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n",
model->BSIM4v2toxe);
printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v2toxe);
}
if (model->BSIM4v2toxp < 1.0e-10)
{ fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n",
model->BSIM4v2toxp);
printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v2toxp);
}
if (model->BSIM4v2toxm < 1.0e-10)
{ fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n",
model->BSIM4v2toxm);
printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v2toxm);
}
if (pParam->BSIM4v2ndep <= 1.0e12)
{ fprintf(fplog, "Warning: Ndep = %g may be too small.\n",
pParam->BSIM4v2ndep);
printf("Warning: Ndep = %g may be too small.\n",
pParam->BSIM4v2ndep);
}
else if (pParam->BSIM4v2ndep >= 1.0e21)
{ fprintf(fplog, "Warning: Ndep = %g may be too large.\n",
pParam->BSIM4v2ndep);
printf("Warning: Ndep = %g may be too large.\n",
pParam->BSIM4v2ndep);
}
if (pParam->BSIM4v2nsub <= 1.0e14)
{ fprintf(fplog, "Warning: Nsub = %g may be too small.\n",
pParam->BSIM4v2nsub);
printf("Warning: Nsub = %g may be too small.\n",
pParam->BSIM4v2nsub);
}
else if (pParam->BSIM4v2nsub >= 1.0e21)
{ fprintf(fplog, "Warning: Nsub = %g may be too large.\n",
pParam->BSIM4v2nsub);
printf("Warning: Nsub = %g may be too large.\n",
pParam->BSIM4v2nsub);
}
if ((pParam->BSIM4v2ngate > 0.0) &&
(pParam->BSIM4v2ngate <= 1.e18))
{ fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n",
pParam->BSIM4v2ngate);
printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n",
pParam->BSIM4v2ngate);
}
if (pParam->BSIM4v2dvt0 < 0.0)
{ fprintf(fplog, "Warning: Dvt0 = %g is negative.\n",
pParam->BSIM4v2dvt0);
printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v2dvt0);
}
if (fabs(1.0e-6 / (pParam->BSIM4v2w0 + pParam->BSIM4v2weff)) > 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->BSIM4v2nfactor < 0.0)
{ fprintf(fplog, "Warning: Nfactor = %g is negative.\n",
pParam->BSIM4v2nfactor);
printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v2nfactor);
}
if (pParam->BSIM4v2cdsc < 0.0)
{ fprintf(fplog, "Warning: Cdsc = %g is negative.\n",
pParam->BSIM4v2cdsc);
printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v2cdsc);
}
if (pParam->BSIM4v2cdscd < 0.0)
{ fprintf(fplog, "Warning: Cdscd = %g is negative.\n",
pParam->BSIM4v2cdscd);
printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v2cdscd);
}
/* Check DIBL parameters */
if (pParam->BSIM4v2eta0 < 0.0)
{ fprintf(fplog, "Warning: Eta0 = %g is negative.\n",
pParam->BSIM4v2eta0);
printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM4v2eta0);
}
/* Check Abulk parameters */
if (fabs(1.0e-6 / (pParam->BSIM4v2b1 + pParam->BSIM4v2weff)) > 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->BSIM4v2a2 < 0.01)
{ fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v2a2);
printf("Warning: A2 = %g is too small. Set to 0.01.\n",
pParam->BSIM4v2a2);
pParam->BSIM4v2a2 = 0.01;
}
else if (pParam->BSIM4v2a2 > 1.0)
{ fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
pParam->BSIM4v2a2);
printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
pParam->BSIM4v2a2);
pParam->BSIM4v2a2 = 1.0;
pParam->BSIM4v2a1 = 0.0;
}
if (pParam->BSIM4v2prwg < 0.0)
{ fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n",
pParam->BSIM4v2prwg);
printf("Warning: Prwg = %g is negative. Set to zero.\n",
pParam->BSIM4v2prwg);
pParam->BSIM4v2prwg = 0.0;
}
if (pParam->BSIM4v2rdsw < 0.0)
{ fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n",
pParam->BSIM4v2rdsw);
printf("Warning: Rdsw = %g is negative. Set to zero.\n",
pParam->BSIM4v2rdsw);
pParam->BSIM4v2rdsw = 0.0;
pParam->BSIM4v2rds0 = 0.0;
}
if (pParam->BSIM4v2rds0 < 0.0)
{ fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n",
pParam->BSIM4v2rds0);
printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n",
pParam->BSIM4v2rds0);
pParam->BSIM4v2rds0 = 0.0;
}
if (pParam->BSIM4v2rdswmin < 0.0)
{ fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n",
pParam->BSIM4v2rdswmin);
printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n",
pParam->BSIM4v2rdswmin);
pParam->BSIM4v2rdswmin = 0.0;
}
if (pParam->BSIM4v2vsattemp < 1.0e3)
{ fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v2vsattemp);
printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v2vsattemp);
}
if (pParam->BSIM4v2fprout < 0.0)
{ fprintf(fplog, "Fatal: fprout = %g is negative.\n",
pParam->BSIM4v2fprout);
printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v2fprout);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2pdits < 0.0)
{ fprintf(fplog, "Fatal: pdits = %g is negative.\n",
pParam->BSIM4v2pdits);
printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v2pdits);
Fatal_Flag = 1;
}
if (model->BSIM4v2pditsl < 0.0)
{ fprintf(fplog, "Fatal: pditsl = %g is negative.\n",
model->BSIM4v2pditsl);
printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v2pditsl);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2pdibl1 < 0.0)
{ fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n",
pParam->BSIM4v2pdibl1);
printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v2pdibl1);
}
if (pParam->BSIM4v2pdibl2 < 0.0)
{ fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n",
pParam->BSIM4v2pdibl2);
printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v2pdibl2);
}
if (pParam->BSIM4v2nigbinv <= 0.0)
{ fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n",
pParam->BSIM4v2nigbinv);
printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v2nigbinv);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2nigbacc <= 0.0)
{ fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n",
pParam->BSIM4v2nigbacc);
printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v2nigbacc);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2nigc <= 0.0)
{ fprintf(fplog, "Fatal: nigc = %g is non-positive.\n",
pParam->BSIM4v2nigc);
printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v2nigc);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2poxedge <= 0.0)
{ fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n",
pParam->BSIM4v2poxedge);
printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v2poxedge);
Fatal_Flag = 1;
}
if (pParam->BSIM4v2pigcd <= 0.0)
{ fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n",
pParam->BSIM4v2pigcd);
printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v2pigcd);
Fatal_Flag = 1;
}
/* Check overlap capacitance parameters */
if (model->BSIM4v2cgdo < 0.0)
{ fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v2cgdo);
printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v2cgdo);
model->BSIM4v2cgdo = 0.0;
}
if (model->BSIM4v2cgso < 0.0)
{ fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v2cgso);
printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v2cgso);
model->BSIM4v2cgso = 0.0;
}
if (model->BSIM4v2tnoia < 0.0)
{ fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v2tnoia);
printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v2tnoia);
model->BSIM4v2tnoia = 0.0;
}
if (model->BSIM4v2tnoib < 0.0)
{ fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v2tnoib);
printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v2tnoib);
model->BSIM4v2tnoib = 0.0;
}
if (model->BSIM4v2ntnoi < 0.0)
{ fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v2ntnoi);
printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v2ntnoi);
model->BSIM4v2ntnoi = 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);
}

View File

@ -1,201 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4cvtest.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
*
* Modified by Xuemei Xi, 10/05/2001.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "cktdefs.h"
#include "bsim4v2def.h"
#include "trandefs.h"
#include "const.h"
#include "devdefs.h"
#include "sperror.h"
int
BSIM4v2convTest(
GENmodel *inModel,
CKTcircuit *ckt)
{
BSIM4v2model *model = (BSIM4v2model*)inModel;
BSIM4v2instance *here;
double delvbd, delvbs, delvds, delvgd, delvgs;
double delvdbd, delvsbs;
double delvbd_jct, delvbs_jct;
double vds, vgs, vgd, vgdo, vbs, vbd;
double vdbd, vdbs, vsbs;
double cbhat, cdhat, Idtot, Ibtot;
double vses, vdes, vdedo, delvses, delvded, delvdes;
double Isestot, cseshat, Idedtot, cdedhat;
double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat;
double tol0, tol1, tol2, tol3, tol4, tol5, tol6;
for (; model != NULL; model = model->BSIM4v2nextModel)
{ for (here = model->BSIM4v2instances; here != NULL ;
here=here->BSIM4v2nextInstance)
{
if (here->BSIM4v2owner != ARCHme) continue;
vds = model->BSIM4v2type
* (*(ckt->CKTrhsOld + here->BSIM4v2dNodePrime)
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime));
vgs = model->BSIM4v2type
* (*(ckt->CKTrhsOld + here->BSIM4v2gNodePrime)
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime));
vbs = model->BSIM4v2type
* (*(ckt->CKTrhsOld + here->BSIM4v2bNodePrime)
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime));
vdbs = model->BSIM4v2type
* (*(ckt->CKTrhsOld + here->BSIM4v2dbNode)
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime));
vsbs = model->BSIM4v2type
* (*(ckt->CKTrhsOld + here->BSIM4v2sbNode)
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime));
vses = model->BSIM4v2type
* (*(ckt->CKTrhsOld + here->BSIM4v2sNode)
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime));
vdes = model->BSIM4v2type
* (*(ckt->CKTrhsOld + here->BSIM4v2dNode)
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime));
vgdo = *(ckt->CKTstate0 + here->BSIM4v2vgs)
- *(ckt->CKTstate0 + here->BSIM4v2vds);
vbd = vbs - vds;
vdbd = vdbs - vds;
vgd = vgs - vds;
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v2vbd);
delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v2vdbd);
delvgd = vgd - vgdo;
delvds = vds - *(ckt->CKTstate0 + here->BSIM4v2vds);
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v2vgs);
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v2vbs);
delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v2vsbs);
delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v2vses));
vdedo = *(ckt->CKTstate0 + here->BSIM4v2vdes)
- *(ckt->CKTstate0 + here->BSIM4v2vds);
delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v2vdes);
delvded = vdes - vds - vdedo;
delvbd_jct = (!here->BSIM4v2rbodyMod) ? delvbd : delvdbd;
delvbs_jct = (!here->BSIM4v2rbodyMod) ? delvbs : delvsbs;
if (here->BSIM4v2mode >= 0)
{ Idtot = here->BSIM4v2cd + here->BSIM4v2csub - here->BSIM4v2cbd
+ here->BSIM4v2Igidl;
cdhat = Idtot - here->BSIM4v2gbd * delvbd_jct
+ (here->BSIM4v2gmbs + here->BSIM4v2gbbs + here->BSIM4v2ggidlb) * delvbs
+ (here->BSIM4v2gm + here->BSIM4v2gbgs + here->BSIM4v2ggidlg) * delvgs
+ (here->BSIM4v2gds + here->BSIM4v2gbds + here->BSIM4v2ggidld) * delvds;
Igstot = here->BSIM4v2Igs + here->BSIM4v2Igcs;
cgshat = Igstot + (here->BSIM4v2gIgsg + here->BSIM4v2gIgcsg) * delvgs
+ here->BSIM4v2gIgcsd * delvds + here->BSIM4v2gIgcsb * delvbs;
Igdtot = here->BSIM4v2Igd + here->BSIM4v2Igcd;
cgdhat = Igdtot + here->BSIM4v2gIgdg * delvgd + here->BSIM4v2gIgcdg * delvgs
+ here->BSIM4v2gIgcdd * delvds + here->BSIM4v2gIgcdb * delvbs;
Igbtot = here->BSIM4v2Igb;
cgbhat = here->BSIM4v2Igb + here->BSIM4v2gIgbg * delvgs + here->BSIM4v2gIgbd
* delvds + here->BSIM4v2gIgbb * delvbs;
}
else
{ Idtot = here->BSIM4v2cd + here->BSIM4v2cbd - here->BSIM4v2Igisl;
cdhat = Idtot + here->BSIM4v2gbd * delvbd_jct + here->BSIM4v2gmbs
* delvbd + here->BSIM4v2gm * delvgd
- here->BSIM4v2gds * delvds - here->BSIM4v2ggislg * vgd
- here->BSIM4v2ggislb * vbd + here->BSIM4v2ggisls * vds;
Igstot = here->BSIM4v2Igs + here->BSIM4v2Igcd;
cgshat = Igstot + here->BSIM4v2gIgsg * delvgs + here->BSIM4v2gIgcdg * delvgd
- here->BSIM4v2gIgcdd * delvds + here->BSIM4v2gIgcdb * delvbd;
Igdtot = here->BSIM4v2Igd + here->BSIM4v2Igcs;
cgdhat = Igdtot + (here->BSIM4v2gIgdg + here->BSIM4v2gIgcsg) * delvgd
- here->BSIM4v2gIgcsd * delvds + here->BSIM4v2gIgcsb * delvbd;
Igbtot = here->BSIM4v2Igb;
cgbhat = here->BSIM4v2Igb + here->BSIM4v2gIgbg * delvgd - here->BSIM4v2gIgbd
* delvds + here->BSIM4v2gIgbb * delvbd;
}
Isestot = here->BSIM4v2gstot * (*(ckt->CKTstate0 + here->BSIM4v2vses));
cseshat = Isestot + here->BSIM4v2gstot * delvses
+ here->BSIM4v2gstotd * delvds + here->BSIM4v2gstotg * delvgs
+ here->BSIM4v2gstotb * delvbs;
Idedtot = here->BSIM4v2gdtot * vdedo;
cdedhat = Idedtot + here->BSIM4v2gdtot * delvded
+ here->BSIM4v2gdtotd * delvds + here->BSIM4v2gdtotg * delvgs
+ here->BSIM4v2gdtotb * delvbs;
/*
* Check convergence
*/
if ((here->BSIM4v2off == 0) || (!(ckt->CKTmode & MODEINITFIX)))
{ tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot))
+ ckt->CKTabstol;
tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot))
+ ckt->CKTabstol;
tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot))
+ ckt->CKTabstol;
tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot))
+ ckt->CKTabstol;
tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot))
+ ckt->CKTabstol;
tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot))
+ ckt->CKTabstol;
if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1)
|| (fabs(cdedhat - Idedtot) >= tol2))
{ ckt->CKTnoncon++;
return(OK);
}
if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4)
|| (fabs(cgbhat - Igbtot) >= tol5))
{ ckt->CKTnoncon++;
return(OK);
}
Ibtot = here->BSIM4v2cbs + here->BSIM4v2cbd
- here->BSIM4v2Igidl - here->BSIM4v2Igisl - here->BSIM4v2csub;
if (here->BSIM4v2mode >= 0)
{ cbhat = Ibtot + here->BSIM4v2gbd * delvbd_jct
+ here->BSIM4v2gbs * delvbs_jct - (here->BSIM4v2gbbs + here->BSIM4v2ggidlb)
* delvbs - (here->BSIM4v2gbgs + here->BSIM4v2ggidlg) * delvgs
- (here->BSIM4v2gbds + here->BSIM4v2ggidld) * delvds
- here->BSIM4v2ggislg * delvgd - here->BSIM4v2ggislb* delvbd + here->BSIM4v2ggisls * delvds ;
}
else
{ cbhat = Ibtot + here->BSIM4v2gbs * delvbs_jct + here->BSIM4v2gbd
* delvbd_jct - (here->BSIM4v2gbbs + here->BSIM4v2ggidlb) * delvbd
- (here->BSIM4v2gbgs + here->BSIM4v2ggidlg) * delvgd
+ (here->BSIM4v2gbds + here->BSIM4v2ggidld) * delvds
- here->BSIM4v2ggislg * delvgs - here->BSIM4v2ggislb * delvbs + here->BSIM4v2ggisls * delvds;
}
tol6 = ckt->CKTreltol * MAX(fabs(cbhat),
fabs(Ibtot)) + ckt->CKTabstol;
if (fabs(cbhat - Ibtot) > tol6)
{ ckt->CKTnoncon++;
return(OK);
}
}
}
}
return(OK);
}

View File

@ -1,41 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4del.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include "bsim4v2def.h"
#include "sperror.h"
#include "gendefs.h"
int
BSIM4v2delete(
GENmodel *inModel,
IFuid name,
GENinstance **inInst)
{
BSIM4v2instance **fast = (BSIM4v2instance**)inInst;
BSIM4v2model *model = (BSIM4v2model*)inModel;
BSIM4v2instance **prev = NULL;
BSIM4v2instance *here;
for (; model ; model = model->BSIM4v2nextModel)
{ prev = &(model->BSIM4v2instances);
for (here = *prev; here ; here = *prev)
{ if (here->BSIM4v2name == name || (fast && here==*fast))
{ *prev= here->BSIM4v2nextInstance;
FREE(here);
return(OK);
}
prev = &(here->BSIM4v2nextInstance);
}
}
return(E_NODEV);
}

View File

@ -1,38 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4dest.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include "bsim4v2def.h"
void
BSIM4v2destroy(
GENmodel **inModel)
{
BSIM4v2model **model = (BSIM4v2model**)inModel;
BSIM4v2instance *here;
BSIM4v2instance *prev = NULL;
BSIM4v2model *mod = *model;
BSIM4v2model *oldmod = NULL;
for (; mod ; mod = mod->BSIM4v2nextModel)
{ if(oldmod) FREE(oldmod);
oldmod = mod;
prev = NULL;
for (here = mod->BSIM4v2instances; here; here = here->BSIM4v2nextInstance)
{ if(prev) FREE(prev);
prev = here;
}
if(prev) FREE(prev);
}
if(oldmod) FREE(oldmod);
*model = NULL;
return;
}

View File

@ -1,399 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4geo.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "bsim4v2def.h"
int
BSIM4v2RdsEndIso(double, double, double, double, double, double, int, int, double *);
int
BSIM4v2RdsEndSha(double, double, double, double, double, double, int, int, double *);
/*
* WDLiu:
* This subrutine is a special module to process the geometry dependent
* parasitics for BSIM4v2, which calculates Ps, Pd, As, Ad, and Rs and Rd
* for multi-fingers and varous GEO and RGEO options.
*/
static int
BSIM4v2NumFingerDiff(
double nf,
int minSD,
double *nuIntD, double *nuEndD, double *nuIntS, double *nuEndS)
{
int NF;
NF = (int)nf;
if ((NF%2) != 0)
{ *nuEndD = *nuEndS = 1.0;
*nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0);
}
else
{ if (minSD == 1) /* minimize # of source */
{ *nuEndD = 2.0;
*nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0);
*nuEndS = 0.0;
*nuIntS = nf;
}
else
{ *nuEndD = 0.0;
*nuIntD = nf;
*nuEndS = 2.0;
*nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0);
}
}
return 0;
}
int
BSIM4v2PAeffGeo(
double nf,
int geo, int minSD,
double Weffcj, double DMCG, double DMCI, double DMDG,
double *Ps, double *Pd, double *As, double *Ad)
{
double T0, T1, T2;
double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer;
double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer;
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0;
if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */
BSIM4v2NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS);
T0 = DMCG + DMCI;
T1 = DMCG + DMCG;
T2 = DMDG + DMDG;
PSiso = PDiso = T0 + T0 + Weffcj;
PSsha = PDsha = T1;
PSmer = PDmer = T2;
ASiso = ADiso = T0 * Weffcj;
ASsha = ADsha = DMCG * Weffcj;
ASmer = ADmer = DMDG * Weffcj;
switch(geo)
{ case 0:
*Ps = nuEndS * PSiso + nuIntS * PSsha;
*Pd = nuEndD * PDiso + nuIntD * PDsha;
*As = nuEndS * ASiso + nuIntS * ASsha;
*Ad = nuEndD * ADiso + nuIntD * ADsha;
break;
case 1:
*Ps = nuEndS * PSiso + nuIntS * PSsha;
*Pd = (nuEndD + nuIntD) * PDsha;
*As = nuEndS * ASiso + nuIntS * ASsha;
*Ad = (nuEndD + nuIntD) * ADsha;
break;
case 2:
*Ps = (nuEndS + nuIntS) * PSsha;
*Pd = nuEndD * PDiso + nuIntD * PDsha;
*As = (nuEndS + nuIntS) * ASsha;
*Ad = nuEndD * ADiso + nuIntD * ADsha;
break;
case 3:
*Ps = (nuEndS + nuIntS) * PSsha;
*Pd = (nuEndD + nuIntD) * PDsha;
*As = (nuEndS + nuIntS) * ASsha;
*Ad = (nuEndD + nuIntD) * ADsha;
break;
case 4:
*Ps = nuEndS * PSiso + nuIntS * PSsha;
*Pd = nuEndD * PDmer + nuIntD * PDsha;
*As = nuEndS * ASiso + nuIntS * ASsha;
*Ad = nuEndD * ADmer + nuIntD * ADsha;
break;
case 5:
*Ps = (nuEndS + nuIntS) * PSsha;
*Pd = nuEndD * PDmer + nuIntD * PDsha;
*As = (nuEndS + nuIntS) * ASsha;
*Ad = nuEndD * ADmer + nuIntD * ADsha;
break;
case 6:
*Ps = nuEndS * PSmer + nuIntS * PSsha;
*Pd = nuEndD * PDiso + nuIntD * PDsha;
*As = nuEndS * ASmer + nuIntS * ASsha;
*Ad = nuEndD * ADiso + nuIntD * ADsha;
break;
case 7:
*Ps = nuEndS * PSmer + nuIntS * PSsha;
*Pd = (nuEndD + nuIntD) * PDsha;
*As = nuEndS * ASmer + nuIntS * ASsha;
*Ad = (nuEndD + nuIntD) * ADsha;
break;
case 8:
*Ps = nuEndS * PSmer + nuIntS * PSsha;
*Pd = nuEndD * PDmer + nuIntD * PDsha;
*As = nuEndS * ASmer + nuIntS * ASsha;
*Ad = nuEndD * ADmer + nuIntD * ADsha;
break;
case 9: /* geo = 9 and 10 happen only when nf = even */
*Ps = PSiso + (nf - 1.0) * PSsha;
*Pd = nf * PDsha;
*As = ASiso + (nf - 1.0) * ASsha;
*Ad = nf * ADsha;
break;
case 10:
*Ps = nf * PSsha;
*Pd = PDiso + (nf - 1.0) * PDsha;
*As = nf * ASsha;
*Ad = ADiso + (nf - 1.0) * ADsha;
break;
default:
printf("Warning: Specified GEO = %d not matched\n", geo);
}
return 0;
}
int
BSIM4v2RdseffGeo(
double nf,
int geo, int rgeo, int minSD,
double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG,
int Type,
double *Rtot)
{
double Rint=0.0, Rend = 0.0;
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0;
if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */
{ BSIM4v2NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS);
/* Internal S/D resistance -- assume shared S or D and all wide contacts */
if (Type == 1)
{ if (nuIntS == 0.0)
Rint = 0.0;
else
Rint = Rsh * DMCG / ( Weffcj * nuIntS);
}
else
{ if (nuIntD == 0.0)
Rint = 0.0;
else
Rint = Rsh * DMCG / ( Weffcj * nuIntD);
}
}
/* End S/D resistance -- geo dependent */
switch(geo)
{ case 0:
if (Type == 1) BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 1:
if (Type == 1) BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 2:
if (Type == 1) BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 3:
if (Type == 1) BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 4:
if (Type == 1) BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else Rend = Rsh * DMDG / Weffcj;
break;
case 5:
if (Type == 1) BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else Rend = Rsh * DMDG / (Weffcj * nuEndD);
break;
case 6:
if (Type == 1) Rend = Rsh * DMDG / Weffcj;
else BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 7:
if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS);
else BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 8:
Rend = Rsh * DMDG / Weffcj;
break;
case 9: /* all wide contacts assumed for geo = 9 and 10 */
if (Type == 1)
{ Rend = 0.5 * Rsh * DMCG / Weffcj;
if (nf == 2.0)
Rint = 0.0;
else
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0));
}
else
{ Rend = 0.0;
Rint = Rsh * DMCG / (Weffcj * nf);
}
break;
case 10:
if (Type == 1)
{ Rend = 0.0;
Rint = Rsh * DMCG / (Weffcj * nf);
}
else
{ Rend = 0.5 * Rsh * DMCG / Weffcj;;
if (nf == 2.0)
Rint = 0.0;
else
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0));
}
break;
default:
printf("Warning: Specified GEO = %d not matched\n", geo);
}
if (Rint <= 0.0)
*Rtot = Rend;
else if (Rend <= 0.0)
*Rtot = Rint;
else
*Rtot = Rint * Rend / (Rint + Rend);
if(*Rtot==0.0)
printf("Warning: Zero resistance returned from RdseffGeo\n");
return 0;
}
int
BSIM4v2RdsEndIso(
double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG,
double nuEnd,
int rgeo, int Type,
double *Rend)
{
NG_IGNORE(DMDG);
if (Type == 1)
{ switch(rgeo)
{ case 1:
case 2:
case 5:
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * DMCG / (Weffcj * nuEnd);
break;
case 3:
case 4:
case 6:
if ((DMCG + DMCI) == 0.0)
printf("(DMCG + DMCI) can not be equal to zero\n");
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI));
break;
default:
printf("Warning: Specified RGEO = %d not matched\n", rgeo);
}
}
else
{ switch(rgeo)
{ case 1:
case 3:
case 7:
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * DMCG / (Weffcj * nuEnd);
break;
case 2:
case 4:
case 8:
if ((DMCG + DMCI) == 0.0)
printf("(DMCG + DMCI) can not be equal to zero\n");
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI));
break;
default:
printf("Warning: Specified RGEO = %d not matched\n", rgeo);
}
}
return 0;
}
int
BSIM4v2RdsEndSha(
double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG,
double nuEnd,
int rgeo, int Type,
double *Rend)
{
NG_IGNORE(DMCI);
NG_IGNORE(DMDG);
if (Type == 1)
{ switch(rgeo)
{ case 1:
case 2:
case 5:
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * DMCG / (Weffcj * nuEnd);
break;
case 3:
case 4:
case 6:
if (DMCG == 0.0)
printf("DMCG can not be equal to zero\n");
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG);
break;
default:
printf("Warning: Specified RGEO = %d not matched\n", rgeo);
}
}
else
{ switch(rgeo)
{ case 1:
case 3:
case 7:
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * DMCG / (Weffcj * nuEnd);
break;
case 2:
case 4:
case 8:
if (DMCG == 0.0)
printf("DMCG can not be equal to zero\n");
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG);
break;
default:
printf("Warning: Specified RGEO = %d not matched\n", rgeo);
}
}
return 0;
}

View File

@ -1,44 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4getic.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "bsim4v2def.h"
#include "sperror.h"
int
BSIM4v2getic(
GENmodel *inModel,
CKTcircuit *ckt)
{
BSIM4v2model *model = (BSIM4v2model*)inModel;
BSIM4v2instance *here;
for (; model ; model = model->BSIM4v2nextModel)
{ for (here = model->BSIM4v2instances; here; here = here->BSIM4v2nextInstance)
{ if (here->BSIM4v2owner != ARCHme) continue;
if (!here->BSIM4v2icVDSGiven)
{ here->BSIM4v2icVDS = *(ckt->CKTrhs + here->BSIM4v2dNode)
- *(ckt->CKTrhs + here->BSIM4v2sNode);
}
if (!here->BSIM4v2icVGSGiven)
{ here->BSIM4v2icVGS = *(ckt->CKTrhs + here->BSIM4v2gNodeExt)
- *(ckt->CKTrhs + here->BSIM4v2sNode);
}
if(!here->BSIM4v2icVBSGiven)
{ here->BSIM4v2icVBS = *(ckt->CKTrhs + here->BSIM4v2bNode)
- *(ckt->CKTrhs + here->BSIM4v2sNode);
}
}
}
return(OK);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,47 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4mdel.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include "bsim4v2def.h"
#include "sperror.h"
int
BSIM4v2mDelete(
GENmodel **inModel,
IFuid modname,
GENmodel *kill)
{
BSIM4v2model **model = (BSIM4v2model**)inModel;
BSIM4v2model *modfast = (BSIM4v2model*)kill;
BSIM4v2instance *here;
BSIM4v2instance *prev = NULL;
BSIM4v2model **oldmod;
oldmod = model;
for (; *model ; model = &((*model)->BSIM4v2nextModel))
{ if ((*model)->BSIM4v2modName == modname ||
(modfast && *model == modfast))
goto delgot;
oldmod = model;
}
return(E_NOMOD);
delgot:
*oldmod = (*model)->BSIM4v2nextModel; /* cut deleted device out of list */
for (here = (*model)->BSIM4v2instances; here; here = here->BSIM4v2nextInstance)
{ if(prev) FREE(prev);
prev = here;
}
if(prev) FREE(prev);
FREE(*model);
return(OK);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,464 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4noi.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 10/05/2001.
**********/
#include "ngspice.h"
#include "bsim4v2def.h"
#include "cktdefs.h"
#include "iferrmsg.h"
#include "noisedef.h"
#include "const.h"
/*
* WDL: 1/f noise model has been smoothed out and enhanced with
* bulk charge effect as well as physical N* equ. and necessary
* conversion into the SI unit system.
*/
static double
BSIM4v2Eval1ovFNoise(
double Vds,
BSIM4v2model *model,
BSIM4v2instance *here,
double freq, double temp)
{
struct bsim4SizeDependParam *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->BSIM4v2cd);
esat = 2.0 * pParam->BSIM4v2vsattemp / here->BSIM4v2ueff;
if(model->BSIM4v2em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */
else {
T0 = ((((Vds - here->BSIM4v2Vdseff) / pParam->BSIM4v2litl)
+ model->BSIM4v2em) / esat);
DelClm = pParam->BSIM4v2litl * log (MAX(T0, N_MINLOG));
}
EffFreq = pow(freq, model->BSIM4v2ef);
T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v2ueff;
T2 = 1.0e10 * EffFreq * here->BSIM4v2Abulk * model->BSIM4v2coxe
* pParam->BSIM4v2leff * pParam->BSIM4v2leff;
N0 = model->BSIM4v2coxe * here->BSIM4v2Vgsteff / CHARGE;
Nl = model->BSIM4v2coxe * here->BSIM4v2Vgsteff
* (1.0 - here->BSIM4v2AbovVgst2Vtm * here->BSIM4v2Vdseff) / CHARGE;
T3 = model->BSIM4v2oxideTrapDensityA
* log(MAX(((N0 + here->BSIM4v2nstar) / (Nl + here->BSIM4v2nstar)), N_MINLOG));
T4 = model->BSIM4v2oxideTrapDensityB * (N0 - Nl);
T5 = model->BSIM4v2oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
T6 = CONSTboltz * temp * cd * cd;
T7 = 1.0e10 * EffFreq * pParam->BSIM4v2leff
* pParam->BSIM4v2leff * pParam->BSIM4v2weff;
T8 = model->BSIM4v2oxideTrapDensityA + model->BSIM4v2oxideTrapDensityB * Nl
+ model->BSIM4v2oxideTrapDensityC * Nl * Nl;
T9 = (Nl + here->BSIM4v2nstar) * (Nl + here->BSIM4v2nstar);
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
return Ssi;
}
int
BSIM4v2noise (
int mode, int operation,
GENmodel *inModel,
CKTcircuit *ckt,
Ndata *data,
double *OnDens)
{
BSIM4v2model *model = (BSIM4v2model *)inModel;
BSIM4v2instance *here;
struct bsim4SizeDependParam *pParam;
char name[N_MXVLNTH];
double tempOnoise;
double tempInoise;
double noizDens[BSIM4v2NSRCS];
double lnNdens[BSIM4v2NSRCS];
double T0, T1, T2, T5, T10, T11;
double Vds, Ssi, Swi;
double tmp=0.0, gdpr, gspr, npart_theta=0.0, npart_beta=0.0, igsquare;
double m;
int i;
/* define the names of the noise sources */
static char *BSIM4v2nNames[BSIM4v2NSRCS] =
{ /* Note that we have to keep the order */
".rd", /* noise due to rd */
".rs", /* noise due to rs */
".rg", /* noise due to rgeltd */
".rbps", /* noise due to rbps */
".rbpd", /* noise due to rbpd */
".rbpb", /* noise due to rbpb */
".rbsb", /* noise due to rbsb */
".rbdb", /* noise due to rbdb */
".id", /* noise due to id */
".1overf", /* flicker (1/f) noise */
".igs", /* shot noise due to IGS */
".igd", /* shot noise due to IGD */
".igb", /* shot noise due to IGB */
"" /* total transistor noise */
};
for (; model != NULL; model = model->BSIM4v2nextModel)
{ for (here = model->BSIM4v2instances; here != NULL;
here = here->BSIM4v2nextInstance)
{ 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 < BSIM4v2NSRCS; i++)
{ (void) sprintf(name, "onoise.%s%s",
here->BSIM4v2name,
BSIM4v2nNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);
SPfrontEnd->IFnewUid (ckt,
&(data->namelist[data->numPlots++]),
NULL, name, UID_OTHER,
NULL);
/* we've added one more plot */
}
break;
case INT_NOIZ:
for (i = 0; i < BSIM4v2NSRCS; i++)
{ (void) sprintf(name, "onoise_total.%s%s",
here->BSIM4v2name,
BSIM4v2nNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);
SPfrontEnd->IFnewUid (ckt,
&(data->namelist[data->numPlots++]),
NULL, name, UID_OTHER,
NULL);
/* we've added one more plot */
(void) sprintf(name, "inoise_total.%s%s",
here->BSIM4v2name,
BSIM4v2nNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);
SPfrontEnd->IFnewUid (ckt,
&(data->namelist[data->numPlots++]),
NULL, name, UID_OTHER,
NULL);
/* we've added one more plot */
}
break;
}
}
break;
case N_CALC:
m = here->BSIM4v2m;
switch (mode)
{ case N_DENS:
if (model->BSIM4v2tnoiMod == 0)
{ if (model->BSIM4v2rdsMod == 0)
{ gspr = here->BSIM4v2sourceConductance;
gdpr = here->BSIM4v2drainConductance;
if (here->BSIM4v2grdsw > 0.0)
tmp = 1.0 / here->BSIM4v2grdsw; /* tmp used below */
else
tmp = 0.0;
}
else
{ gspr = here->BSIM4v2gstot;
gdpr = here->BSIM4v2gdtot;
tmp = 0.0;
}
}
else
{ T5 = here->BSIM4v2Vgsteff / here->BSIM4v2EsatL;
T5 *= T5;
npart_beta = 0.577 * (1.0 + T5
* model->BSIM4v2tnoia * pParam->BSIM4v2leff);
npart_theta = 0.37 * (1.0 + T5
* model->BSIM4v2tnoib * pParam->BSIM4v2leff);
if (model->BSIM4v2rdsMod == 0)
{ gspr = here->BSIM4v2sourceConductance;
gdpr = here->BSIM4v2drainConductance;
}
else
{ gspr = here->BSIM4v2gstot;
gdpr = here->BSIM4v2gdtot;
}
if ((*(ckt->CKTstates[0] + here->BSIM4v2vds)) >= 0.0)
gspr = gspr * (1.0 + npart_theta * npart_theta * gspr
/ here->BSIM4v2IdovVds);
else
gdpr = gdpr * (1.0 + npart_theta * npart_theta * gdpr
/ here->BSIM4v2IdovVds);
}
NevalSrc(&noizDens[BSIM4v2RDNOIZ],
&lnNdens[BSIM4v2RDNOIZ], ckt, THERMNOISE,
here->BSIM4v2dNodePrime, here->BSIM4v2dNode,
gdpr * m);
NevalSrc(&noizDens[BSIM4v2RSNOIZ],
&lnNdens[BSIM4v2RSNOIZ], ckt, THERMNOISE,
here->BSIM4v2sNodePrime, here->BSIM4v2sNode,
gspr * m);
if ((here->BSIM4v2rgateMod == 1) || (here->BSIM4v2rgateMod == 2))
{ NevalSrc(&noizDens[BSIM4v2RGNOIZ],
&lnNdens[BSIM4v2RGNOIZ], ckt, THERMNOISE,
here->BSIM4v2gNodePrime, here->BSIM4v2gNodeExt,
here->BSIM4v2grgeltd * m);
}
else if (here->BSIM4v2rgateMod == 3)
{ NevalSrc(&noizDens[BSIM4v2RGNOIZ],
&lnNdens[BSIM4v2RGNOIZ], ckt, THERMNOISE,
here->BSIM4v2gNodeMid, here->BSIM4v2gNodeExt,
here->BSIM4v2grgeltd * m);
}
else
{ noizDens[BSIM4v2RGNOIZ] = 0.0;
lnNdens[BSIM4v2RGNOIZ] =
log(MAX(noizDens[BSIM4v2RGNOIZ], N_MINLOG));
}
if (here->BSIM4v2rbodyMod)
{ NevalSrc(&noizDens[BSIM4v2RBPSNOIZ],
&lnNdens[BSIM4v2RBPSNOIZ], ckt, THERMNOISE,
here->BSIM4v2bNodePrime, here->BSIM4v2sbNode,
here->BSIM4v2grbps * m);
NevalSrc(&noizDens[BSIM4v2RBPDNOIZ],
&lnNdens[BSIM4v2RBPDNOIZ], ckt, THERMNOISE,
here->BSIM4v2bNodePrime, here->BSIM4v2dbNode,
here->BSIM4v2grbpd * m);
NevalSrc(&noizDens[BSIM4v2RBPBNOIZ],
&lnNdens[BSIM4v2RBPBNOIZ], ckt, THERMNOISE,
here->BSIM4v2bNodePrime, here->BSIM4v2bNode,
here->BSIM4v2grbpb * m);
NevalSrc(&noizDens[BSIM4v2RBSBNOIZ],
&lnNdens[BSIM4v2RBSBNOIZ], ckt, THERMNOISE,
here->BSIM4v2bNode, here->BSIM4v2sbNode,
here->BSIM4v2grbsb * m);
NevalSrc(&noizDens[BSIM4v2RBDBNOIZ],
&lnNdens[BSIM4v2RBDBNOIZ], ckt, THERMNOISE,
here->BSIM4v2bNode, here->BSIM4v2dbNode,
here->BSIM4v2grbdb * m);
}
else
{ noizDens[BSIM4v2RBPSNOIZ] = noizDens[BSIM4v2RBPDNOIZ] = 0.0;
noizDens[BSIM4v2RBPBNOIZ] = 0.0;
noizDens[BSIM4v2RBSBNOIZ] = noizDens[BSIM4v2RBDBNOIZ] = 0.0;
lnNdens[BSIM4v2RBPSNOIZ] =
log(MAX(noizDens[BSIM4v2RBPSNOIZ], N_MINLOG));
lnNdens[BSIM4v2RBPDNOIZ] =
log(MAX(noizDens[BSIM4v2RBPDNOIZ], N_MINLOG));
lnNdens[BSIM4v2RBPBNOIZ] =
log(MAX(noizDens[BSIM4v2RBPBNOIZ], N_MINLOG));
lnNdens[BSIM4v2RBSBNOIZ] =
log(MAX(noizDens[BSIM4v2RBSBNOIZ], N_MINLOG));
lnNdens[BSIM4v2RBDBNOIZ] =
log(MAX(noizDens[BSIM4v2RBDBNOIZ], N_MINLOG));
}
switch(model->BSIM4v2tnoiMod)
{ case 0:
T0 = m * here->BSIM4v2ueff * fabs(here->BSIM4v2qinv);
T1 = T0 * tmp + pParam->BSIM4v2leff
* pParam->BSIM4v2leff;
NevalSrc(&noizDens[BSIM4v2IDNOIZ],
&lnNdens[BSIM4v2IDNOIZ], ckt,
THERMNOISE, here->BSIM4v2dNodePrime,
here->BSIM4v2sNodePrime,
(T0 / T1) * model->BSIM4v2ntnoi);
break;
case 1:
T0 = m * (here->BSIM4v2gm + here->BSIM4v2gmbs + here->BSIM4v2gds);
T0 *= T0;
igsquare = npart_theta * npart_theta * T0 / here->BSIM4v2IdovVds;
T1 = npart_beta * (here->BSIM4v2gm
+ here->BSIM4v2gmbs) + here->BSIM4v2gds;
T2 = T1 * T1 / here->BSIM4v2IdovVds;
NevalSrc(&noizDens[BSIM4v2IDNOIZ],
&lnNdens[BSIM4v2IDNOIZ], ckt,
THERMNOISE, here->BSIM4v2dNodePrime,
here->BSIM4v2sNodePrime, (T2 - igsquare));
break;
}
NevalSrc(&noizDens[BSIM4v2FLNOIZ], NULL,
ckt, N_GAIN, here->BSIM4v2dNodePrime,
here->BSIM4v2sNodePrime, (double) 0.0);
switch(model->BSIM4v2fnoiMod)
{ case 0:
noizDens[BSIM4v2FLNOIZ] *= m * model->BSIM4v2kf
* exp(model->BSIM4v2af
* log(MAX(fabs(here->BSIM4v2cd),
N_MINLOG)))
/ (pow(data->freq, model->BSIM4v2ef)
* pParam->BSIM4v2leff
* pParam->BSIM4v2leff
* model->BSIM4v2coxe);
break;
case 1:
Vds = *(ckt->CKTstates[0] + here->BSIM4v2vds);
if (Vds < 0.0)
Vds = -Vds;
Ssi = BSIM4v2Eval1ovFNoise(Vds, model, here,
data->freq, ckt->CKTtemp);
T10 = model->BSIM4v2oxideTrapDensityA
* CONSTboltz * ckt->CKTtemp;
T11 = pParam->BSIM4v2weff * pParam->BSIM4v2leff
* pow(data->freq, model->BSIM4v2ef) * 1.0e10
* here->BSIM4v2nstar * here->BSIM4v2nstar;
Swi = T10 / T11 * here->BSIM4v2cd
* here->BSIM4v2cd;
T1 = Swi + Ssi;
if (T1 > 0.0)
noizDens[BSIM4v2FLNOIZ] *= m * (Ssi * Swi) / T1;
else
noizDens[BSIM4v2FLNOIZ] *= 0.0;
break;
}
lnNdens[BSIM4v2FLNOIZ] =
log(MAX(noizDens[BSIM4v2FLNOIZ], N_MINLOG));
NevalSrc(&noizDens[BSIM4v2IGSNOIZ],
&lnNdens[BSIM4v2IGSNOIZ], ckt, SHOTNOISE,
here->BSIM4v2gNodePrime, here->BSIM4v2sNodePrime,
m * (here->BSIM4v2Igs + here->BSIM4v2Igcs));
NevalSrc(&noizDens[BSIM4v2IGDNOIZ],
&lnNdens[BSIM4v2IGDNOIZ], ckt, SHOTNOISE,
here->BSIM4v2gNodePrime, here->BSIM4v2dNodePrime,
m * (here->BSIM4v2Igd + here->BSIM4v2Igcd));
NevalSrc(&noizDens[BSIM4v2IGBNOIZ],
&lnNdens[BSIM4v2IGBNOIZ], ckt, SHOTNOISE,
here->BSIM4v2gNodePrime, here->BSIM4v2bNodePrime,
m * here->BSIM4v2Igb);
noizDens[BSIM4v2TOTNOIZ] = noizDens[BSIM4v2RDNOIZ]
+ noizDens[BSIM4v2RSNOIZ] + noizDens[BSIM4v2RGNOIZ]
+ noizDens[BSIM4v2RBPSNOIZ] + noizDens[BSIM4v2RBPDNOIZ]
+ noizDens[BSIM4v2RBPBNOIZ]
+ noizDens[BSIM4v2RBSBNOIZ] + noizDens[BSIM4v2RBDBNOIZ]
+ noizDens[BSIM4v2IDNOIZ] + noizDens[BSIM4v2FLNOIZ]
+ noizDens[BSIM4v2IGSNOIZ] + noizDens[BSIM4v2IGDNOIZ]
+ noizDens[BSIM4v2IGBNOIZ];
lnNdens[BSIM4v2TOTNOIZ] =
log(MAX(noizDens[BSIM4v2TOTNOIZ], N_MINLOG));
*OnDens += noizDens[BSIM4v2TOTNOIZ];
if (data->delFreq == 0.0)
{ /* if we haven't done any previous
integration, we need to initialize our
"history" variables.
*/
for (i = 0; i < BSIM4v2NSRCS; i++)
{ here->BSIM4v2nVar[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 < BSIM4v2NSRCS; i++)
{ here->BSIM4v2nVar[OUTNOIZ][i] = 0.0;
here->BSIM4v2nVar[INNOIZ][i] = 0.0;
}
}
}
else
{ /* data->delFreq != 0.0,
we have to integrate.
*/
for (i = 0; i < BSIM4v2NSRCS; i++)
{ if (i != BSIM4v2TOTNOIZ)
{ tempOnoise = Nintegrate(noizDens[i],
lnNdens[i],
here->BSIM4v2nVar[LNLSTDENS][i],
data);
tempInoise = Nintegrate(noizDens[i]
* data->GainSqInv, lnNdens[i]
+ data->lnGainInv,
here->BSIM4v2nVar[LNLSTDENS][i]
+ data->lnGainInv, data);
here->BSIM4v2nVar[LNLSTDENS][i] =
lnNdens[i];
data->outNoiz += tempOnoise;
data->inNoise += tempInoise;
if (((NOISEAN*)
ckt->CKTcurJob)->NStpsSm != 0)
{ here->BSIM4v2nVar[OUTNOIZ][i]
+= tempOnoise;
here->BSIM4v2nVar[OUTNOIZ][BSIM4v2TOTNOIZ]
+= tempOnoise;
here->BSIM4v2nVar[INNOIZ][i]
+= tempInoise;
here->BSIM4v2nVar[INNOIZ][BSIM4v2TOTNOIZ]
+= tempInoise;
}
}
}
}
if (data->prtSummary)
{ for (i = 0; i < BSIM4v2NSRCS; 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 < BSIM4v2NSRCS; i++)
{ data->outpVector[data->outNumber++]
= here->BSIM4v2nVar[OUTNOIZ][i];
data->outpVector[data->outNumber++]
= here->BSIM4v2nVar[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);
}

View File

@ -1,157 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4par.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include "ifsim.h"
#include "bsim4v2def.h"
#include "sperror.h"
#include "fteext.h"
int
BSIM4v2param(
int param,
IFvalue *value,
GENinstance *inst,
IFvalue *select)
{
double scale;
BSIM4v2instance *here = (BSIM4v2instance*)inst;
NG_IGNORE(select);
if (!cp_getvar("scale", CP_REAL, &scale))
scale = 1;
switch(param)
{ case BSIM4v2_W:
here->BSIM4v2w = value->rValue*scale;
here->BSIM4v2wGiven = TRUE;
break;
case BSIM4v2_L:
here->BSIM4v2l = value->rValue*scale;
here->BSIM4v2lGiven = TRUE;
break;
case BSIM4v2_M:
here->BSIM4v2m = value->rValue;
here->BSIM4v2mGiven = TRUE;
break;
case BSIM4v2_NF:
here->BSIM4v2nf = value->rValue;
here->BSIM4v2nfGiven = TRUE;
break;
case BSIM4v2_MIN:
here->BSIM4v2min = value->iValue;
here->BSIM4v2minGiven = TRUE;
break;
case BSIM4v2_AS:
here->BSIM4v2sourceArea = value->rValue*scale*scale;
here->BSIM4v2sourceAreaGiven = TRUE;
break;
case BSIM4v2_AD:
here->BSIM4v2drainArea = value->rValue*scale*scale;
here->BSIM4v2drainAreaGiven = TRUE;
break;
case BSIM4v2_PS:
here->BSIM4v2sourcePerimeter = value->rValue*scale;
here->BSIM4v2sourcePerimeterGiven = TRUE;
break;
case BSIM4v2_PD:
here->BSIM4v2drainPerimeter = value->rValue*scale;
here->BSIM4v2drainPerimeterGiven = TRUE;
break;
case BSIM4v2_NRS:
here->BSIM4v2sourceSquares = value->rValue;
here->BSIM4v2sourceSquaresGiven = TRUE;
break;
case BSIM4v2_NRD:
here->BSIM4v2drainSquares = value->rValue;
here->BSIM4v2drainSquaresGiven = TRUE;
break;
case BSIM4v2_OFF:
here->BSIM4v2off = value->iValue;
break;
case BSIM4v2_RBSB:
here->BSIM4v2rbsb = value->rValue;
here->BSIM4v2rbsbGiven = TRUE;
break;
case BSIM4v2_RBDB:
here->BSIM4v2rbdb = value->rValue;
here->BSIM4v2rbdbGiven = TRUE;
break;
case BSIM4v2_RBPB:
here->BSIM4v2rbpb = value->rValue;
here->BSIM4v2rbpbGiven = TRUE;
break;
case BSIM4v2_RBPS:
here->BSIM4v2rbps = value->rValue;
here->BSIM4v2rbpsGiven = TRUE;
break;
case BSIM4v2_RBPD:
here->BSIM4v2rbpd = value->rValue;
here->BSIM4v2rbpdGiven = TRUE;
break;
case BSIM4v2_TRNQSMOD:
here->BSIM4v2trnqsMod = value->iValue;
here->BSIM4v2trnqsModGiven = TRUE;
break;
case BSIM4v2_ACNQSMOD:
here->BSIM4v2acnqsMod = value->iValue;
here->BSIM4v2acnqsModGiven = TRUE;
break;
case BSIM4v2_RBODYMOD:
here->BSIM4v2rbodyMod = value->iValue;
here->BSIM4v2rbodyModGiven = TRUE;
break;
case BSIM4v2_RGATEMOD:
here->BSIM4v2rgateMod = value->iValue;
here->BSIM4v2rgateModGiven = TRUE;
break;
case BSIM4v2_GEOMOD:
here->BSIM4v2geoMod = value->iValue;
here->BSIM4v2geoModGiven = TRUE;
break;
case BSIM4v2_RGEOMOD:
here->BSIM4v2rgeoMod = value->iValue;
here->BSIM4v2rgeoModGiven = TRUE;
break;
case BSIM4v2_IC_VDS:
here->BSIM4v2icVDS = value->rValue;
here->BSIM4v2icVDSGiven = TRUE;
break;
case BSIM4v2_IC_VGS:
here->BSIM4v2icVGS = value->rValue;
here->BSIM4v2icVGSGiven = TRUE;
break;
case BSIM4v2_IC_VBS:
here->BSIM4v2icVBS = value->rValue;
here->BSIM4v2icVBSGiven = TRUE;
break;
case BSIM4v2_IC:
switch(value->v.numValue)
{ case 3:
here->BSIM4v2icVBS = *(value->v.vec.rVec+2);
here->BSIM4v2icVBSGiven = TRUE;
case 2:
here->BSIM4v2icVGS = *(value->v.vec.rVec+1);
here->BSIM4v2icVGSGiven = TRUE;
case 1:
here->BSIM4v2icVDS = *(value->v.vec.rVec);
here->BSIM4v2icVDSGiven = TRUE;
break;
default:
return(E_BADPARM);
}
break;
default:
return(E_BADPARM);
}
return(OK);
}

View File

@ -1,758 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4pzld.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 10/05/2001.
**********/
#include "ngspice.h"
#include "cktdefs.h"
#include "complex.h"
#include "sperror.h"
#include "bsim4v2def.h"
int
BSIM4v2pzLoad(
GENmodel *inModel,
CKTcircuit *ckt,
SPcomplex *s)
{
BSIM4v2model *model = (BSIM4v2model*)inModel;
BSIM4v2instance *here;
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb;
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb;
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb;
double gds, capbd, capbs, FwdSum, RevSum, Gm, Gmbs;
double gstot, gstotd, gstotg, gstots, gstotb, gspr;
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr;
double gIstotg, gIstotd, gIstots, gIstotb;
double gIdtotg, gIdtotd, gIdtots, gIdtotb;
double gIbtotg, gIbtotd, gIbtots, gIbtotb;
double gIgtotg, gIgtotd, gIgtots, gIgtotb;
double cgso, cgdo, cgbo;
double xcdbdb=0.0, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb=0.0, xcsgmb=0.0;
double xcgmbb=0.0, xcbgmb=0.0;
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0;
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 T0=0.0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css;
double ScalingFactor = 1.0e-9;
struct bsim4SizeDependParam *pParam;
double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls;
double m;
for (; model != NULL; model = model->BSIM4v2nextModel)
{ for (here = model->BSIM4v2instances; here!= NULL;
here = here->BSIM4v2nextInstance)
{ if (here->BSIM4v2owner != ARCHme) continue;
pParam = here->pParam;
capbd = here->BSIM4v2capbd;
capbs = here->BSIM4v2capbs;
cgso = here->BSIM4v2cgso;
cgdo = here->BSIM4v2cgdo;
cgbo = pParam->BSIM4v2cgbo;
if (here->BSIM4v2mode >= 0)
{ Gm = here->BSIM4v2gm;
Gmbs = here->BSIM4v2gmbs;
FwdSum = Gm + Gmbs;
RevSum = 0.0;
gbbdp = -(here->BSIM4v2gbds);
gbbsp = here->BSIM4v2gbds + here->BSIM4v2gbgs + here->BSIM4v2gbbs;
gbdpg = here->BSIM4v2gbgs;
gbdpdp = here->BSIM4v2gbds;
gbdpb = here->BSIM4v2gbbs;
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
gbspdp = 0.0;
gbspg = 0.0;
gbspb = 0.0;
gbspsp = 0.0;
if (model->BSIM4v2igcMod)
{ gIstotg = here->BSIM4v2gIgsg + here->BSIM4v2gIgcsg;
gIstotd = here->BSIM4v2gIgcsd;
gIstots = here->BSIM4v2gIgss + here->BSIM4v2gIgcss;
gIstotb = here->BSIM4v2gIgcsb;
gIdtotg = here->BSIM4v2gIgdg + here->BSIM4v2gIgcdg;
gIdtotd = here->BSIM4v2gIgdd + here->BSIM4v2gIgcdd;
gIdtots = here->BSIM4v2gIgcds;
gIdtotb = here->BSIM4v2gIgcdb;
}
else
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0;
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0;
}
if (model->BSIM4v2igbMod)
{ gIbtotg = here->BSIM4v2gIgbg;
gIbtotd = here->BSIM4v2gIgbd;
gIbtots = here->BSIM4v2gIgbs;
gIbtotb = here->BSIM4v2gIgbb;
}
else
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0;
if ((model->BSIM4v2igcMod != 0) || (model->BSIM4v2igbMod != 0))
{ gIgtotg = gIstotg + gIdtotg + gIbtotg;
gIgtotd = gIstotd + gIdtotd + gIbtotd ;
gIgtots = gIstots + gIdtots + gIbtots;
gIgtotb = gIstotb + gIdtotb + gIbtotb;
}
else
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0;
if (here->BSIM4v2rgateMod == 2)
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vges)
- *(ckt->CKTstates[0] + here->BSIM4v2vgs);
else if (here->BSIM4v2rgateMod == 3)
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vgms)
- *(ckt->CKTstates[0] + here->BSIM4v2vgs);
if (here->BSIM4v2rgateMod > 1)
{ gcrgd = here->BSIM4v2gcrgd * T0;
gcrgg = here->BSIM4v2gcrgg * T0;
gcrgs = here->BSIM4v2gcrgs * T0;
gcrgb = here->BSIM4v2gcrgb * T0;
gcrgg -= here->BSIM4v2gcrg;
gcrg = here->BSIM4v2gcrg;
}
else
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0;
if (here->BSIM4v2acnqsMod == 0)
{ if (here->BSIM4v2rgateMod == 3)
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v2cgbo;
xcgmdb = -cgdo;
xcgmsb = -cgso;
xcgmbb = -pParam->BSIM4v2cgbo;
xcdgmb = xcgmdb;
xcsgmb = xcgmsb;
xcbgmb = xcgmbb;
xcggb = here->BSIM4v2cggb;
xcgdb = here->BSIM4v2cgdb;
xcgsb = here->BSIM4v2cgsb;
xcgbb = -(xcggb + xcgdb + xcgsb);
xcdgb = here->BSIM4v2cdgb;
xcsgb = -(here->BSIM4v2cggb + here->BSIM4v2cbgb
+ here->BSIM4v2cdgb);
xcbgb = here->BSIM4v2cbgb;
}
else
{ xcggb = here->BSIM4v2cggb + cgdo + cgso
+ pParam->BSIM4v2cgbo;
xcgdb = here->BSIM4v2cgdb - cgdo;
xcgsb = here->BSIM4v2cgsb - cgso;
xcgbb = -(xcggb + xcgdb + xcgsb);
xcdgb = here->BSIM4v2cdgb - cgdo;
xcsgb = -(here->BSIM4v2cggb + here->BSIM4v2cbgb
+ here->BSIM4v2cdgb + cgso);
xcbgb = here->BSIM4v2cbgb - pParam->BSIM4v2cgbo;
xcdgmb = xcsgmb = xcbgmb = 0.0;
}
xcddb = here->BSIM4v2cddb + here->BSIM4v2capbd + cgdo;
xcdsb = here->BSIM4v2cdsb;
xcsdb = -(here->BSIM4v2cgdb + here->BSIM4v2cbdb
+ here->BSIM4v2cddb);
xcssb = here->BSIM4v2capbs + cgso - (here->BSIM4v2cgsb
+ here->BSIM4v2cbsb + here->BSIM4v2cdsb);
if (!here->BSIM4v2rbodyMod)
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb);
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb);
xcbdb = here->BSIM4v2cbdb - here->BSIM4v2capbd;
xcbsb = here->BSIM4v2cbsb - here->BSIM4v2capbs;
xcdbdb = 0.0;
}
else
{ xcdbb = -(here->BSIM4v2cddb + here->BSIM4v2cdgb
+ here->BSIM4v2cdsb);
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb)
+ here->BSIM4v2capbs;
xcbdb = here->BSIM4v2cbdb;
xcbsb = here->BSIM4v2cbsb;
xcdbdb = -here->BSIM4v2capbd;
xcsbsb = -here->BSIM4v2capbs;
}
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb);
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
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0;
xcbgb = xcbdb = xcbsb = xcbbb = 0.0;
xcdgb = xcddb = xcdsb = xcdbb = 0.0;
xcsgb = xcsdb = xcssb = xcsbb = 0.0;
xgtg = here->BSIM4v2gtg;
xgtd = here->BSIM4v2gtd;
xgts = here->BSIM4v2gts;
xgtb = here->BSIM4v2gtb;
xcqgb = here->BSIM4v2cqgb;
xcqdb = here->BSIM4v2cqdb;
xcqsb = here->BSIM4v2cqsb;
xcqbb = here->BSIM4v2cqbb;
CoxWL = model->BSIM4v2coxe * here->pParam->BSIM4v2weffCV
* here->BSIM4v2nf * here->pParam->BSIM4v2leffCV;
qcheq = -(here->BSIM4v2qgate + here->BSIM4v2qbulk);
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
{ if (model->BSIM4v2xpart < 0.5)
{ dxpart = 0.4;
}
else if (model->BSIM4v2xpart > 0.5)
{ dxpart = 0.0;
}
else
{ dxpart = 0.5;
}
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
= ddxpart_dVs = 0.0;
}
else
{ dxpart = here->BSIM4v2qdrn / qcheq;
Cdd = here->BSIM4v2cddb;
Csd = -(here->BSIM4v2cgdb + here->BSIM4v2cddb
+ here->BSIM4v2cbdb);
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq;
Cdg = here->BSIM4v2cdgb;
Csg = -(here->BSIM4v2cggb + here->BSIM4v2cdgb
+ here->BSIM4v2cbgb);
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq;
Cds = here->BSIM4v2cdsb;
Css = -(here->BSIM4v2cgsb + here->BSIM4v2cdsb
+ here->BSIM4v2cbsb);
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->BSIM4v2gm;
Gmbs = -here->BSIM4v2gmbs;
FwdSum = 0.0;
RevSum = -(Gm + Gmbs);
gbbsp = -(here->BSIM4v2gbds);
gbbdp = here->BSIM4v2gbds + here->BSIM4v2gbgs + here->BSIM4v2gbbs;
gbdpg = 0.0;
gbdpsp = 0.0;
gbdpb = 0.0;
gbdpdp = 0.0;
gbspg = here->BSIM4v2gbgs;
gbspsp = here->BSIM4v2gbds;
gbspb = here->BSIM4v2gbbs;
gbspdp = -(gbspg + gbspsp + gbspb);
if (model->BSIM4v2igcMod)
{ gIstotg = here->BSIM4v2gIgsg + here->BSIM4v2gIgcdg;
gIstotd = here->BSIM4v2gIgcds;
gIstots = here->BSIM4v2gIgss + here->BSIM4v2gIgcdd;
gIstotb = here->BSIM4v2gIgcdb;
gIdtotg = here->BSIM4v2gIgdg + here->BSIM4v2gIgcsg;
gIdtotd = here->BSIM4v2gIgdd + here->BSIM4v2gIgcss;
gIdtots = here->BSIM4v2gIgcsd;
gIdtotb = here->BSIM4v2gIgcsb;
}
else
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0;
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0;
}
if (model->BSIM4v2igbMod)
{ gIbtotg = here->BSIM4v2gIgbg;
gIbtotd = here->BSIM4v2gIgbs;
gIbtots = here->BSIM4v2gIgbd;
gIbtotb = here->BSIM4v2gIgbb;
}
else
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0;
if ((model->BSIM4v2igcMod != 0) || (model->BSIM4v2igbMod != 0))
{ gIgtotg = gIstotg + gIdtotg + gIbtotg;
gIgtotd = gIstotd + gIdtotd + gIbtotd ;
gIgtots = gIstots + gIdtots + gIbtots;
gIgtotb = gIstotb + gIdtotb + gIbtotb;
}
else
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0;
if (here->BSIM4v2rgateMod == 2)
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vges)
- *(ckt->CKTstates[0] + here->BSIM4v2vgs);
else if (here->BSIM4v2rgateMod == 3)
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vgms)
- *(ckt->CKTstates[0] + here->BSIM4v2vgs);
if (here->BSIM4v2rgateMod > 1)
{ gcrgd = here->BSIM4v2gcrgs * T0;
gcrgg = here->BSIM4v2gcrgg * T0;
gcrgs = here->BSIM4v2gcrgd * T0;
gcrgb = here->BSIM4v2gcrgb * T0;
gcrgg -= here->BSIM4v2gcrg;
gcrg = here->BSIM4v2gcrg;
}
else
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0;
if (here->BSIM4v2acnqsMod == 0)
{ if (here->BSIM4v2rgateMod == 3)
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v2cgbo;
xcgmdb = -cgdo;
xcgmsb = -cgso;
xcgmbb = -pParam->BSIM4v2cgbo;
xcdgmb = xcgmdb;
xcsgmb = xcgmsb;
xcbgmb = xcgmbb;
xcggb = here->BSIM4v2cggb;
xcgdb = here->BSIM4v2cgsb;
xcgsb = here->BSIM4v2cgdb;
xcgbb = -(xcggb + xcgdb + xcgsb);
xcdgb = -(here->BSIM4v2cggb + here->BSIM4v2cbgb
+ here->BSIM4v2cdgb);
xcsgb = here->BSIM4v2cdgb;
xcbgb = here->BSIM4v2cbgb;
}
else
{ xcggb = here->BSIM4v2cggb + cgdo + cgso
+ pParam->BSIM4v2cgbo;
xcgdb = here->BSIM4v2cgsb - cgdo;
xcgsb = here->BSIM4v2cgdb - cgso;
xcgbb = -(xcggb + xcgdb + xcgsb);
xcdgb = -(here->BSIM4v2cggb + here->BSIM4v2cbgb
+ here->BSIM4v2cdgb + cgdo);
xcsgb = here->BSIM4v2cdgb - cgso;
xcbgb = here->BSIM4v2cbgb - pParam->BSIM4v2cgbo;
xcdgmb = xcsgmb = xcbgmb = 0.0;
}
xcddb = here->BSIM4v2capbd + cgdo - (here->BSIM4v2cgsb
+ here->BSIM4v2cbsb + here->BSIM4v2cdsb);
xcdsb = -(here->BSIM4v2cgdb + here->BSIM4v2cbdb
+ here->BSIM4v2cddb);
xcsdb = here->BSIM4v2cdsb;
xcssb = here->BSIM4v2cddb + here->BSIM4v2capbs + cgso;
if (!here->BSIM4v2rbodyMod)
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb);
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb);
xcbdb = here->BSIM4v2cbsb - here->BSIM4v2capbd;
xcbsb = here->BSIM4v2cbdb - here->BSIM4v2capbs;
xcdbdb = 0.0;
}
else
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb)
+ here->BSIM4v2capbd;
xcsbb = -(here->BSIM4v2cddb + here->BSIM4v2cdgb
+ here->BSIM4v2cdsb);
xcbdb = here->BSIM4v2cbsb;
xcbsb = here->BSIM4v2cbdb;
xcdbdb = -here->BSIM4v2capbd;
xcsbsb = -here->BSIM4v2capbs;
}
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb);
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
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0;
xcbgb = xcbdb = xcbsb = xcbbb = 0.0;
xcdgb = xcddb = xcdsb = xcdbb = 0.0;
xcsgb = xcsdb = xcssb = xcsbb = 0.0;
xgtg = here->BSIM4v2gtg;
xgtd = here->BSIM4v2gts;
xgts = here->BSIM4v2gtd;
xgtb = here->BSIM4v2gtb;
xcqgb = here->BSIM4v2cqgb;
xcqdb = here->BSIM4v2cqsb;
xcqsb = here->BSIM4v2cqdb;
xcqbb = here->BSIM4v2cqbb;
CoxWL = model->BSIM4v2coxe * here->pParam->BSIM4v2weffCV
* here->BSIM4v2nf * here->pParam->BSIM4v2leffCV;
qcheq = -(here->BSIM4v2qgate + here->BSIM4v2qbulk);
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
{ if (model->BSIM4v2xpart < 0.5)
{ sxpart = 0.4;
}
else if (model->BSIM4v2xpart > 0.5)
{ sxpart = 0.0;
}
else
{ sxpart = 0.5;
}
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
= dsxpart_dVs = 0.0;
}
else
{ sxpart = here->BSIM4v2qdrn / qcheq;
Css = here->BSIM4v2cddb;
Cds = -(here->BSIM4v2cgdb + here->BSIM4v2cddb
+ here->BSIM4v2cbdb);
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq;
Csg = here->BSIM4v2cdgb;
Cdg = -(here->BSIM4v2cggb + here->BSIM4v2cdgb
+ here->BSIM4v2cbgb);
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq;
Csd = here->BSIM4v2cdsb;
Cdd = -(here->BSIM4v2cgsb + here->BSIM4v2cdsb
+ here->BSIM4v2cbsb);
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);
}
}
if (model->BSIM4v2rdsMod == 1)
{ gstot = here->BSIM4v2gstot;
gstotd = here->BSIM4v2gstotd;
gstotg = here->BSIM4v2gstotg;
gstots = here->BSIM4v2gstots - gstot;
gstotb = here->BSIM4v2gstotb;
gdtot = here->BSIM4v2gdtot;
gdtotd = here->BSIM4v2gdtotd - gdtot;
gdtotg = here->BSIM4v2gdtotg;
gdtots = here->BSIM4v2gdtots;
gdtotb = here->BSIM4v2gdtotb;
}
else
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0;
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0;
}
T1 = *(ckt->CKTstate0 + here->BSIM4v2qdef) * here->BSIM4v2gtau;
gds = here->BSIM4v2gds;
/*
* Loading PZ matrix
*/
m = here->BSIM4v2m;
if (!model->BSIM4v2rdsMod)
{ gdpr = here->BSIM4v2drainConductance;
gspr = here->BSIM4v2sourceConductance;
}
else
gdpr = gspr = 0.0;
if (!here->BSIM4v2rbodyMod)
{ gjbd = here->BSIM4v2gbd;
gjbs = here->BSIM4v2gbs;
}
else
gjbd = gjbs = 0.0;
geltd = here->BSIM4v2grgeltd;
if (here->BSIM4v2rgateMod == 1)
{ *(here->BSIM4v2GEgePtr) += m * geltd;
*(here->BSIM4v2GPgePtr) -= m * geltd;
*(here->BSIM4v2GEgpPtr) -= m * geltd;
*(here->BSIM4v2GPgpPtr ) += m * xcggb * s->real;
*(here->BSIM4v2GPgpPtr +1) += m * xcggb * s->imag;
*(here->BSIM4v2GPgpPtr) += m * (geltd - xgtg + gIgtotg);
*(here->BSIM4v2GPdpPtr ) += m * xcgdb * s->real;
*(here->BSIM4v2GPdpPtr +1) += m * xcgdb * s->imag;
*(here->BSIM4v2GPdpPtr) -= m * (xgtd - gIgtotd);
*(here->BSIM4v2GPspPtr ) += m * xcgsb * s->real;
*(here->BSIM4v2GPspPtr +1) += m * xcgsb * s->imag;
*(here->BSIM4v2GPspPtr) -= m * (xgts - gIgtots);
*(here->BSIM4v2GPbpPtr ) += m * xcgbb * s->real;
*(here->BSIM4v2GPbpPtr +1) += m * xcgbb * s->imag;
*(here->BSIM4v2GPbpPtr) -= m * (xgtb - gIgtotb);
}
else if (here->BSIM4v2rgateMod == 2)
{ *(here->BSIM4v2GEgePtr) += m * gcrg;
*(here->BSIM4v2GEgpPtr) += m * gcrgg;
*(here->BSIM4v2GEdpPtr) += m * gcrgd;
*(here->BSIM4v2GEspPtr) += m * gcrgs;
*(here->BSIM4v2GEbpPtr) += m * gcrgb;
*(here->BSIM4v2GPgePtr) -= m * gcrg;
*(here->BSIM4v2GPgpPtr ) += m * xcggb * s->real;
*(here->BSIM4v2GPgpPtr +1) += m * xcggb * s->imag;
*(here->BSIM4v2GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg);
*(here->BSIM4v2GPdpPtr ) += m * xcgdb * s->real;
*(here->BSIM4v2GPdpPtr +1) += m * xcgdb * s->imag;
*(here->BSIM4v2GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd);
*(here->BSIM4v2GPspPtr ) += m * xcgsb * s->real;
*(here->BSIM4v2GPspPtr +1) += m * xcgsb * s->imag;
*(here->BSIM4v2GPspPtr) -= m * (gcrgs + xgts - gIgtots);
*(here->BSIM4v2GPbpPtr ) += m * xcgbb * s->real;
*(here->BSIM4v2GPbpPtr +1) += m * xcgbb * s->imag;
*(here->BSIM4v2GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb);
}
else if (here->BSIM4v2rgateMod == 3)
{ *(here->BSIM4v2GEgePtr) += m * geltd;
*(here->BSIM4v2GEgmPtr) -= m * geltd;
*(here->BSIM4v2GMgePtr) -= m * geltd;
*(here->BSIM4v2GMgmPtr) += m * (geltd + gcrg);
*(here->BSIM4v2GMgmPtr ) += m * xcgmgmb * s->real;
*(here->BSIM4v2GMgmPtr +1) += m * xcgmgmb * s->imag;
*(here->BSIM4v2GMdpPtr) += m * gcrgd;
*(here->BSIM4v2GMdpPtr ) += m * xcgmdb * s->real;
*(here->BSIM4v2GMdpPtr +1) += m * xcgmdb * s->imag;
*(here->BSIM4v2GMgpPtr) += m * gcrgg;
*(here->BSIM4v2GMspPtr) += m * gcrgs;
*(here->BSIM4v2GMspPtr ) += m * xcgmsb * s->real;
*(here->BSIM4v2GMspPtr +1) += m * xcgmsb * s->imag;
*(here->BSIM4v2GMbpPtr) += m * gcrgb;
*(here->BSIM4v2GMbpPtr ) += m * xcgmbb * s->real;
*(here->BSIM4v2GMbpPtr +1) += m * xcgmbb * s->imag;
*(here->BSIM4v2DPgmPtr ) += m * xcdgmb * s->real;
*(here->BSIM4v2DPgmPtr +1) += m * xcdgmb * s->imag;
*(here->BSIM4v2GPgmPtr) -= m * gcrg;
*(here->BSIM4v2SPgmPtr ) += m * xcsgmb * s->real;
*(here->BSIM4v2SPgmPtr +1) += m * xcsgmb * s->imag;
*(here->BSIM4v2BPgmPtr ) += m * xcbgmb * s->real;
*(here->BSIM4v2BPgmPtr +1) += m * xcbgmb * s->imag;
*(here->BSIM4v2GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg);
*(here->BSIM4v2GPgpPtr ) += m * xcggb * s->real;
*(here->BSIM4v2GPgpPtr +1) += m * xcggb * s->imag;
*(here->BSIM4v2GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd);
*(here->BSIM4v2GPdpPtr ) += m * xcgdb * s->real;
*(here->BSIM4v2GPdpPtr +1) += m * xcgdb * s->imag;
*(here->BSIM4v2GPspPtr) -= m * (gcrgs + xgts - gIgtots);
*(here->BSIM4v2GPspPtr ) += m * xcgsb * s->real;
*(here->BSIM4v2GPspPtr +1) += m * xcgsb * s->imag;
*(here->BSIM4v2GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb);
*(here->BSIM4v2GPbpPtr ) += m * xcgbb * s->real;
*(here->BSIM4v2GPbpPtr +1) += m * xcgbb * s->imag;
}
else
{ *(here->BSIM4v2GPdpPtr ) += m * xcgdb * s->real;
*(here->BSIM4v2GPdpPtr +1) += m * xcgdb * s->imag;
*(here->BSIM4v2GPdpPtr) -= m * (xgtd - gIgtotd);
*(here->BSIM4v2GPgpPtr ) += m * xcggb * s->real;
*(here->BSIM4v2GPgpPtr +1) += m * xcggb * s->imag;
*(here->BSIM4v2GPgpPtr) -= m * (xgtg - gIgtotg);
*(here->BSIM4v2GPspPtr ) += m * xcgsb * s->real;
*(here->BSIM4v2GPspPtr +1) += m * xcgsb * s->imag;
*(here->BSIM4v2GPspPtr) -= m * (xgts - gIgtots);
*(here->BSIM4v2GPbpPtr ) += m * xcgbb * s->real;
*(here->BSIM4v2GPbpPtr +1) += m * xcgbb * s->imag;
*(here->BSIM4v2GPbpPtr) -= m * (xgtb - gIgtotb);
}
if (model->BSIM4v2rdsMod)
{ (*(here->BSIM4v2DgpPtr) += m * gdtotg);
(*(here->BSIM4v2DspPtr) += m * gdtots);
(*(here->BSIM4v2DbpPtr) += m * gdtotb);
(*(here->BSIM4v2SdpPtr) += m * gstotd);
(*(here->BSIM4v2SgpPtr) += m * gstotg);
(*(here->BSIM4v2SbpPtr) += m * gstotb);
}
*(here->BSIM4v2DPdpPtr ) += m * xcddb * s->real;
*(here->BSIM4v2DPdpPtr +1) += m * xcddb * s->imag;
*(here->BSIM4v2DPdpPtr) += m * (gdpr + gds + here->BSIM4v2gbd
- gdtotd + RevSum + gbdpdp - gIdtotd
+ dxpart * xgtd + T1 * ddxpart_dVd);
*(here->BSIM4v2DPdPtr) -= m * (gdpr + gdtot);
*(here->BSIM4v2DPgpPtr ) += m * xcdgb * s->real;
*(here->BSIM4v2DPgpPtr +1) += m * xcdgb * s->imag;
*(here->BSIM4v2DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg
+ T1 * ddxpart_dVg + dxpart * xgtg);
*(here->BSIM4v2DPspPtr ) += m * xcdsb * s->real;
*(here->BSIM4v2DPspPtr +1) += m * xcdsb * s->imag;
*(here->BSIM4v2DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots
- T1 * ddxpart_dVs - dxpart * xgts);
*(here->BSIM4v2DPbpPtr ) += m * xcdbb * s->real;
*(here->BSIM4v2DPbpPtr +1) += m * xcdbb * s->imag;
*(here->BSIM4v2DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb
- T1 * ddxpart_dVb - dxpart * xgtb);
*(here->BSIM4v2DdpPtr) -= m * (gdpr - gdtotd);
*(here->BSIM4v2DdPtr) += m * (gdpr + gdtot);
*(here->BSIM4v2SPdpPtr ) += m * xcsdb * s->real;
*(here->BSIM4v2SPdpPtr +1) += m * xcsdb * s->imag;
*(here->BSIM4v2SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd
- T1 * dsxpart_dVd - sxpart * xgtd);
*(here->BSIM4v2SPgpPtr ) += m * xcsgb * s->real;
*(here->BSIM4v2SPgpPtr +1) += m * xcsgb * s->imag;
*(here->BSIM4v2SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg
- T1 * dsxpart_dVg - sxpart * xgtg);
*(here->BSIM4v2SPspPtr ) += m * xcssb * s->real;
*(here->BSIM4v2SPspPtr +1) += m * xcssb * s->imag;
*(here->BSIM4v2SPspPtr) += m * (gspr + gds + here->BSIM4v2gbs - gIstots
- gstots + FwdSum + gbspsp
+ sxpart * xgts + T1 * dsxpart_dVs);
*(here->BSIM4v2SPsPtr) -= m * (gspr + gstot);
*(here->BSIM4v2SPbpPtr ) += m * xcsbb * s->real;
*(here->BSIM4v2SPbpPtr +1) += m * xcsbb * s->imag;
*(here->BSIM4v2SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb
- T1 * dsxpart_dVb - sxpart * xgtb);
*(here->BSIM4v2SspPtr) -= m * (gspr - gstots);
*(here->BSIM4v2SsPtr) += m * (gspr + gstot);
*(here->BSIM4v2BPdpPtr ) += m * xcbdb * s->real;
*(here->BSIM4v2BPdpPtr +1) += m * xcbdb * s->imag;
*(here->BSIM4v2BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd);
*(here->BSIM4v2BPgpPtr ) += m * xcbgb * s->real;
*(here->BSIM4v2BPgpPtr +1) += m * xcbgb * s->imag;
*(here->BSIM4v2BPgpPtr) -= m * (here->BSIM4v2gbgs + gIbtotg);
*(here->BSIM4v2BPspPtr ) += m * xcbsb * s->real;
*(here->BSIM4v2BPspPtr +1) += m * xcbsb * s->imag;
*(here->BSIM4v2BPspPtr) -= m * (gjbs - gbbsp + gIbtots);
*(here->BSIM4v2BPbpPtr ) += m * xcbbb * s->real;
*(here->BSIM4v2BPbpPtr +1) += m * xcbbb * s->imag;
*(here->BSIM4v2BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v2gbbs
- gIbtotb);
ggidld = here->BSIM4v2ggidld;
ggidlg = here->BSIM4v2ggidlg;
ggidlb = here->BSIM4v2ggidlb;
ggislg = here->BSIM4v2ggislg;
ggisls = here->BSIM4v2ggisls;
ggislb = here->BSIM4v2ggislb;
/* stamp gidl */
(*(here->BSIM4v2DPdpPtr) += m * ggidld);
(*(here->BSIM4v2DPgpPtr) += m * ggidlg);
(*(here->BSIM4v2DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb));
(*(here->BSIM4v2DPbpPtr) += m * ggidlb);
(*(here->BSIM4v2BPdpPtr) -= m * ggidld);
(*(here->BSIM4v2BPgpPtr) -= m * ggidlg);
(*(here->BSIM4v2BPspPtr) += m * ((ggidlg + ggidld) + ggidlb));
(*(here->BSIM4v2BPbpPtr) -= m * ggidlb);
/* stamp gisl */
(*(here->BSIM4v2SPdpPtr) -= m * ((ggisls + ggislg) + ggislb));
(*(here->BSIM4v2SPgpPtr) += m * ggislg);
(*(here->BSIM4v2SPspPtr) += m * ggisls);
(*(here->BSIM4v2SPbpPtr) += m * ggislb);
(*(here->BSIM4v2BPdpPtr) += m * ((ggislg + ggisls) + ggislb));
(*(here->BSIM4v2BPgpPtr) -= m * ggislg);
(*(here->BSIM4v2BPspPtr) -= m * ggisls);
(*(here->BSIM4v2BPbpPtr) -= m * ggislb);
if (here->BSIM4v2rbodyMod)
{ (*(here->BSIM4v2DPdbPtr ) += m * xcdbdb * s->real);
(*(here->BSIM4v2DPdbPtr +1) += m * xcdbdb * s->imag);
(*(here->BSIM4v2DPdbPtr) -= m * here->BSIM4v2gbd);
(*(here->BSIM4v2SPsbPtr ) += m * xcsbsb * s->real);
(*(here->BSIM4v2SPsbPtr +1) += m * xcsbsb * s->imag);
(*(here->BSIM4v2SPsbPtr) -= m * here->BSIM4v2gbs);
(*(here->BSIM4v2DBdpPtr ) += m * xcdbdb * s->real);
(*(here->BSIM4v2DBdpPtr +1) += m * xcdbdb * s->imag);
(*(here->BSIM4v2DBdpPtr) -= m * here->BSIM4v2gbd);
(*(here->BSIM4v2DBdbPtr ) -= m * xcdbdb * s->real);
(*(here->BSIM4v2DBdbPtr +1) -= m * xcdbdb * s->imag);
(*(here->BSIM4v2DBdbPtr) += m * (here->BSIM4v2gbd + here->BSIM4v2grbpd
+ here->BSIM4v2grbdb));
(*(here->BSIM4v2DBbpPtr) -= m * here->BSIM4v2grbpd);
(*(here->BSIM4v2DBbPtr) -= m * here->BSIM4v2grbdb);
(*(here->BSIM4v2BPdbPtr) -= m * here->BSIM4v2grbpd);
(*(here->BSIM4v2BPbPtr) -= m * here->BSIM4v2grbpb);
(*(here->BSIM4v2BPsbPtr) -= m * here->BSIM4v2grbps);
(*(here->BSIM4v2BPbpPtr) += m * (here->BSIM4v2grbpd + here->BSIM4v2grbps
+ here->BSIM4v2grbpb));
/* WDL: (-here->BSIM4v2gbbs) already added to BPbpPtr */
(*(here->BSIM4v2SBspPtr ) += m * xcsbsb * s->real);
(*(here->BSIM4v2SBspPtr +1) += m * xcsbsb * s->imag);
(*(here->BSIM4v2SBspPtr) -= m * here->BSIM4v2gbs);
(*(here->BSIM4v2SBbpPtr) -= m * here->BSIM4v2grbps);
(*(here->BSIM4v2SBbPtr) -= m * here->BSIM4v2grbsb);
(*(here->BSIM4v2SBsbPtr ) -= m * xcsbsb * s->real);
(*(here->BSIM4v2SBsbPtr +1) -= m * xcsbsb * s->imag);
(*(here->BSIM4v2SBsbPtr) += m * (here->BSIM4v2gbs
+ here->BSIM4v2grbps + here->BSIM4v2grbsb));
(*(here->BSIM4v2BdbPtr) -= m * here->BSIM4v2grbdb);
(*(here->BSIM4v2BbpPtr) -= m * here->BSIM4v2grbpb);
(*(here->BSIM4v2BsbPtr) -= m * here->BSIM4v2grbsb);
(*(here->BSIM4v2BbPtr) += m * (here->BSIM4v2grbsb + here->BSIM4v2grbdb
+ here->BSIM4v2grbpb));
}
if (here->BSIM4v2acnqsMod)
{ *(here->BSIM4v2QqPtr ) += m * s->real * ScalingFactor;
*(here->BSIM4v2QqPtr +1) += m * s->imag * ScalingFactor;
*(here->BSIM4v2QgpPtr ) -= m * xcqgb * s->real;
*(here->BSIM4v2QgpPtr +1) -= m * xcqgb * s->imag;
*(here->BSIM4v2QdpPtr ) -= m * xcqdb * s->real;
*(here->BSIM4v2QdpPtr +1) -= m * xcqdb * s->imag;
*(here->BSIM4v2QbpPtr ) -= m * xcqbb * s->real;
*(here->BSIM4v2QbpPtr +1) -= m * xcqbb * s->imag;
*(here->BSIM4v2QspPtr ) -= m * xcqsb * s->real;
*(here->BSIM4v2QspPtr +1) -= m * xcqsb * s->imag;
*(here->BSIM4v2GPqPtr) -= m * here->BSIM4v2gtau;
*(here->BSIM4v2DPqPtr) += m * dxpart * here->BSIM4v2gtau;
*(here->BSIM4v2SPqPtr) += m * sxpart * here->BSIM4v2gtau;
*(here->BSIM4v2QqPtr) += m * here->BSIM4v2gtau;
*(here->BSIM4v2QgpPtr) += m * xgtg;
*(here->BSIM4v2QdpPtr) += m * xgtd;
*(here->BSIM4v2QbpPtr) += m * xgtb;
*(here->BSIM4v2QspPtr) += m * xgts;
}
}
}
return(OK);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,60 +0,0 @@
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/
/**********
* Copyright 2001 Regents of the University of California. All rights reserved.
* File: b4trunc.c of BSIM4.2.1.
* Author: 2000 Weidong Liu
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "cktdefs.h"
#include "bsim4v2def.h"
#include "sperror.h"
int
BSIM4v2trunc(
GENmodel *inModel,
CKTcircuit *ckt,
double *timeStep)
{
BSIM4v2model *model = (BSIM4v2model*)inModel;
BSIM4v2instance *here;
#ifdef STEPDEBUG
double debugtemp;
#endif /* STEPDEBUG */
for (; model != NULL; model = model->BSIM4v2nextModel)
{ for (here = model->BSIM4v2instances; here != NULL;
here = here->BSIM4v2nextInstance)
{
if (here->BSIM4v2owner != ARCHme) continue;
#ifdef STEPDEBUG
debugtemp = *timeStep;
#endif /* STEPDEBUG */
CKTterr(here->BSIM4v2qb,ckt,timeStep);
CKTterr(here->BSIM4v2qg,ckt,timeStep);
CKTterr(here->BSIM4v2qd,ckt,timeStep);
if (here->BSIM4v2trnqsMod)
CKTterr(here->BSIM4v2qcdump,ckt,timeStep);
if (here->BSIM4v2rbodyMod)
{ CKTterr(here->BSIM4v2qbs,ckt,timeStep);
CKTterr(here->BSIM4v2qbd,ckt,timeStep);
}
if (here->BSIM4v2rgateMod == 3)
CKTterr(here->BSIM4v2qgmid,ckt,timeStep);
#ifdef STEPDEBUG
if(debugtemp != *timeStep)
{ printf("device %s reduces step from %g to %g\n",
here->BSIM4v2name,debugtemp,*timeStep);
}
#endif /* STEPDEBUG */
}
}
return(OK);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
/**********
Copyright 2001 Regents of the University of California. All rights reserved.
Author: 2000 Weidong Liu
Author: 2001 Xuemei Xi
File: bsim4ext.h
**********/
extern int BSIM4v2acLoad(GENmodel *,CKTcircuit*);
extern int BSIM4v2ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
extern int BSIM4v2convTest(GENmodel *,CKTcircuit*);
extern int BSIM4v2delete(GENmodel*,IFuid,GENinstance**);
extern void BSIM4v2destroy(GENmodel**);
extern int BSIM4v2getic(GENmodel*,CKTcircuit*);
extern int BSIM4v2load(GENmodel*,CKTcircuit*);
extern int BSIM4v2mAsk(CKTcircuit*,GENmodel *,int, IFvalue*);
extern int BSIM4v2mDelete(GENmodel**,IFuid,GENmodel*);
extern int BSIM4v2mParam(int,IFvalue*,GENmodel*);
extern void BSIM4v2mosCap(CKTcircuit*, double, double, double, double,
double, double, double, double, double, double, double,
double, double, double, double, double, double, double*,
double*, double*, double*, double*, double*, double*, double*,
double*, double*, double*, double*, double*, double*, double*,
double*);
extern int BSIM4v2param(int,IFvalue*,GENinstance*,IFvalue*);
extern int BSIM4v2pzLoad(GENmodel*,CKTcircuit*,SPcomplex*);
extern int BSIM4v2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int BSIM4v2temp(GENmodel*,CKTcircuit*);
extern int BSIM4v2trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM4v2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM4v2unsetup(GENmodel*,CKTcircuit*);

View File

@ -1,83 +0,0 @@
#include "config.h"
#include "devdefs.h"
#include "bsim4v2itf.h"
#include "bsim4v2ext.h"
#include "bsim4v2init.h"
SPICEdev BSIM4v2info = {
{
"BSIM4v2",
"Berkeley Short Channel IGFET Model-4",
&BSIM4v2nSize,
&BSIM4v2nSize,
BSIM4v2names,
&BSIM4v2pTSize,
BSIM4v2pTable,
&BSIM4v2mPTSize,
BSIM4v2mPTable,
#ifdef XSPICE
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
/*--------------------------- End of SDB fix -------------------------*/
#endif
DEV_DEFAULT
},
/* DEVparam */ BSIM4v2param,
/* DEVmodParam */ BSIM4v2mParam,
/* DEVload */ BSIM4v2load,
/* DEVsetup */ BSIM4v2setup,
/* DEVunsetup */ BSIM4v2unsetup,
/* DEVpzSetup */ BSIM4v2setup,
/* DEVtemperature*/ BSIM4v2temp,
/* DEVtrunc */ BSIM4v2trunc,
/* DEVfindBranch */ NULL,
/* DEVacLoad */ BSIM4v2acLoad,
/* DEVaccept */ NULL,
/* DEVdestroy */ BSIM4v2destroy,
/* DEVmodDelete */ BSIM4v2mDelete,
/* DEVdelete */ BSIM4v2delete,
/* DEVsetic */ BSIM4v2getic,
/* DEVask */ BSIM4v2ask,
/* DEVmodAsk */ BSIM4v2mAsk,
/* DEVpzLoad */ BSIM4v2pzLoad,
/* DEVconvTest */ BSIM4v2convTest,
/* DEVsenSetup */ NULL,
/* DEVsenLoad */ NULL,
/* DEVsenUpdate */ NULL,
/* DEVsenAcLoad */ NULL,
/* DEVsenPrint */ NULL,
/* DEVsenTrunc */ NULL,
/* DEVdisto */ NULL,
/* DEVnoise */ BSIM4v2noise,
#ifdef CIDER
NULL, /* DEVdump */
NULL, /* DEVacct */
#endif
/* DEVinstSize */ &BSIM4v2iSize,
/* DEVmodSize */ &BSIM4v2mSize
};
SPICEdev *
get_bsim4v2_info(void)
{
return &BSIM4v2info;
}

View File

@ -1,13 +0,0 @@
#ifndef _BSIM4V2INIT_H
#define _BSIM4V2INIT_H
extern IFparm BSIM4v2pTable[ ];
extern IFparm BSIM4v2mPTable[ ];
extern char *BSIM4v2names[ ];
extern int BSIM4v2pTSize;
extern int BSIM4v2mPTSize;
extern int BSIM4v2nSize;
extern int BSIM4v2iSize;
extern int BSIM4v2mSize;
#endif

View File

@ -1,13 +0,0 @@
/**********
Copyright 2001 Regents of the University of California. All rights reserved.
Author: 2000 Weidong Liu.
Author: 2001 Xuemei Xi
File: bsim4itf.h
**********/
#ifndef DEV_BSIM4V2
#define DEV_BSIM4V2
SPICEdev *get_bsim4v2_info(void);
#endif

View File

@ -1,6 +0,0 @@
Makefile.in
Makefile
.deps
.libs
*.lo
*.la

View File

@ -1,33 +0,0 @@
The terms under which the software is provided are as the following.
Software is distributed as is, completely without warranty or service
support. The University of California and its employees are not liable
for the condition or performance of the software.
The University owns the copyright but shall not be liable for any
infringement of copyright or other proprietary rights brought by third
parties against the users of the software.
The University of California hereby disclaims all implied warranties.
The University of California grants the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions:
1. The users agree not to charge for the University of California code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
the UC Berkeley BSIM Research Group that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to obey all U.S. Government restrictions governing
redistribution or export of the software.
4. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others.
Chenming Hu, and Weidong Liu
Mar. 2000

View File

@ -1,37 +0,0 @@
## Process this file with automake to produce Makefile.in
noinst_LTLIBRARIES = libbsim4v3.la
libbsim4v3_la_SOURCES = \
b4v3.c \
b4v3acld.c \
b4v3ask.c \
b4v3check.c \
b4v3cvtest.c \
b4v3del.c \
b4v3dest.c \
b4v3geo.c \
b4v3getic.c \
b4v3ld.c \
b4v3mask.c \
b4v3mdel.c \
b4v3mpar.c \
b4v3noi.c \
b4v3par.c \
b4v3pzld.c \
b4v3set.c \
b4v3temp.c \
b4v3trunc.c \
bsim4v3def.h \
bsim4v3ext.h \
bsim4v3init.c \
bsim4v3init.h \
bsim4v3itf.h
AM_CPPFLAGS = -I$(top_srcdir)/src/include
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = B4TERMS_OF_USE

View File

@ -1,786 +0,0 @@
/**** BSIM4.3.0 Released by Jane Xuemei Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 04/06/2001.
* Modified by Xuemei Xi, 10/05/2001.
* Modified by Xuemei Xi, 11/15/2002.
* Modified by Xuemei Xi, 05/09/2003.
**********/
#include "ngspice.h"
#include "devdefs.h"
#include "bsim4v3def.h"
#include "suffix.h"
IFparm BSIM4v3pTable[] = { /* parameters */
IOP( "l", BSIM4v3_L, IF_REAL , "Length"),
IOP( "w", BSIM4v3_W, IF_REAL , "Width"),
IOP( "m", BSIM4v3_M, IF_REAL , "Separate Parallel multiplier"),
IOP( "nf", BSIM4v3_NF, IF_REAL , "Number of fingers"),
IOP( "sa", BSIM4v3_SA, IF_REAL , "distance between OD edge to poly of one side "),
IOP( "sb", BSIM4v3_SB, IF_REAL , "distance between OD edge to poly of the other side"),
IOP( "sd", BSIM4v3_SD, IF_REAL , "distance between neighbour fingers"),
IOP( "min", BSIM4v3_MIN, IF_INTEGER , "Minimize either D or S"),
IOP( "ad", BSIM4v3_AD, IF_REAL , "Drain area"),
IOP( "as", BSIM4v3_AS, IF_REAL , "Source area"),
IOP( "pd", BSIM4v3_PD, IF_REAL , "Drain perimeter"),
IOP( "ps", BSIM4v3_PS, IF_REAL , "Source perimeter"),
IOP( "nrd", BSIM4v3_NRD, IF_REAL , "Number of squares in drain"),
IOP( "nrs", BSIM4v3_NRS, IF_REAL , "Number of squares in source"),
IOP( "off", BSIM4v3_OFF, IF_FLAG , "Device is initially off"),
IOP( "rbdb", BSIM4v3_RBDB, IF_REAL , "Body resistance"),
IOP( "rbsb", BSIM4v3_RBSB, IF_REAL , "Body resistance"),
IOP( "rbpb", BSIM4v3_RBPB, IF_REAL , "Body resistance"),
IOP( "rbps", BSIM4v3_RBPS, IF_REAL , "Body resistance"),
IOP( "rbpd", BSIM4v3_RBPD, IF_REAL , "Body resistance"),
IOP( "trnqsmod", BSIM4v3_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"),
IOP( "acnqsmod", BSIM4v3_ACNQSMOD, IF_INTEGER, "AC NQS model selector"),
IOP( "rbodymod", BSIM4v3_RBODYMOD, IF_INTEGER, "Distributed body R model selector"),
IOP( "rgatemod", BSIM4v3_RGATEMOD, IF_INTEGER, "Gate resistance model selector"),
IOP( "geomod", BSIM4v3_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"),
IOP( "rgeomod", BSIM4v3_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"),
IP( "ic", BSIM4v3_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"),
OP( "gmbs", BSIM4v3_GMBS, IF_REAL, "Gmb"),
OP( "gm", BSIM4v3_GM, IF_REAL, "Gm"),
OP( "gds", BSIM4v3_GDS, IF_REAL, "Gds"),
OP( "vdsat", BSIM4v3_VDSAT, IF_REAL, "Vdsat"),
OP( "vth", BSIM4v3_VON, IF_REAL, "Vth"),
OP( "id", BSIM4v3_CD, IF_REAL, "Ids"),
OP( "ibd", BSIM4v3_CBD, IF_REAL, "Ibd"),
OP( "ibs", BSIM4v3_CBS, IF_REAL, "Ibs"),
OP( "isub", BSIM4v3_CSUB, IF_REAL, "Isub"),
OP( "igidl", BSIM4v3_IGIDL, IF_REAL, "Igidl"),
OP( "igisl", BSIM4v3_IGISL, IF_REAL, "Igisl"),
OP( "igs", BSIM4v3_IGS, IF_REAL, "Igs"),
OP( "igd", BSIM4v3_IGD, IF_REAL, "Igd"),
OP( "igb", BSIM4v3_IGB, IF_REAL, "Igb"),
OP( "igcs", BSIM4v3_IGCS, IF_REAL, "Igcs"),
OP( "igcd", BSIM4v3_IGCD, IF_REAL, "Igcd"),
OP( "vbs", BSIM4v3_VBS, IF_REAL, "Vbs"),
OP( "vgs", BSIM4v3_VGS, IF_REAL, "Vgs"),
OP( "vds", BSIM4v3_VDS, IF_REAL, "Vds"),
OP( "cgg", BSIM4v3_CGGB, IF_REAL, "Cggb"),
OP( "cgs", BSIM4v3_CGSB, IF_REAL, "Cgsb"),
OP( "cgd", BSIM4v3_CGDB, IF_REAL, "Cgdb"),
OP( "cbg", BSIM4v3_CBGB, IF_REAL, "Cbgb"),
OP( "cbd", BSIM4v3_CBDB, IF_REAL, "Cbdb"),
OP( "cbs", BSIM4v3_CBSB, IF_REAL, "Cbsb"),
OP( "cdg", BSIM4v3_CDGB, IF_REAL, "Cdgb"),
OP( "cdd", BSIM4v3_CDDB, IF_REAL, "Cddb"),
OP( "cds", BSIM4v3_CDSB, IF_REAL, "Cdsb"),
OP( "csg", BSIM4v3_CSGB, IF_REAL, "Csgb"),
OP( "csd", BSIM4v3_CSDB, IF_REAL, "Csdb"),
OP( "css", BSIM4v3_CSSB, IF_REAL, "Cssb"),
OP( "cgb", BSIM4v3_CGBB, IF_REAL, "Cgbb"),
OP( "cdb", BSIM4v3_CDBB, IF_REAL, "Cdbb"),
OP( "csb", BSIM4v3_CSBB, IF_REAL, "Csbb"),
OP( "cbb", BSIM4v3_CBBB, IF_REAL, "Cbbb"),
OP( "capbd", BSIM4v3_CAPBD, IF_REAL, "Capbd"),
OP( "capbs", BSIM4v3_CAPBS, IF_REAL, "Capbs"),
OP( "qg", BSIM4v3_QG, IF_REAL, "Qgate"),
OP( "qb", BSIM4v3_QB, IF_REAL, "Qbulk"),
OP( "qd", BSIM4v3_QD, IF_REAL, "Qdrain"),
OP( "qs", BSIM4v3_QS, IF_REAL, "Qsource"),
OP( "qinv", BSIM4v3_QINV, IF_REAL, "Qinversion"),
};
IFparm BSIM4v3mPTable[] = { /* model parameters */
IOP( "capmod", BSIM4v3_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"),
IOP( "diomod", BSIM4v3_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"),
IOP( "rdsmod", BSIM4v3_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"),
IOP( "trnqsmod", BSIM4v3_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"),
IOP( "acnqsmod", BSIM4v3_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"),
IOP( "mobmod", BSIM4v3_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"),
IOP( "rbodymod", BSIM4v3_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"),
IOP( "rgatemod", BSIM4v3_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"),
IOP( "permod", BSIM4v3_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"),
IOP( "geomod", BSIM4v3_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"),
IOP( "fnoimod", BSIM4v3_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"),
IOP( "tnoimod", BSIM4v3_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"),
IOP( "igcmod", BSIM4v3_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"),
IOP( "igbmod", BSIM4v3_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"),
IOP( "tempmod", BSIM4v3_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"),
IOP( "paramchk", BSIM4v3_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"),
IOP( "binunit", BSIM4v3_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"),
IOP( "version", BSIM4v3_MOD_VERSION, IF_STRING, "parameter for model version"),
IOP( "toxe", BSIM4v3_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"),
IOP( "toxp", BSIM4v3_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"),
IOP( "toxm", BSIM4v3_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"),
IOP( "toxref", BSIM4v3_MOD_TOXREF, IF_REAL, "Target tox value"),
IOP( "dtox", BSIM4v3_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "),
IOP( "epsrox", BSIM4v3_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"),
IOP( "cdsc", BSIM4v3_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"),
IOP( "cdscb", BSIM4v3_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"),
IOP( "cdscd", BSIM4v3_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"),
IOP( "cit", BSIM4v3_MOD_CIT, IF_REAL, "Interface state capacitance"),
IOP( "nfactor", BSIM4v3_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"),
IOP( "xj", BSIM4v3_MOD_XJ, IF_REAL, "Junction depth in meters"),
IOP( "vsat", BSIM4v3_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"),
IOP( "at", BSIM4v3_MOD_AT, IF_REAL, "Temperature coefficient of vsat"),
IOP( "a0", BSIM4v3_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."),
IOP( "ags", BSIM4v3_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."),
IOP( "a1", BSIM4v3_MOD_A1, IF_REAL, "Non-saturation effect coefficient"),
IOP( "a2", BSIM4v3_MOD_A2, IF_REAL, "Non-saturation effect coefficient"),
IOP( "keta", BSIM4v3_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."),
IOP( "nsub", BSIM4v3_MOD_NSUB, IF_REAL, "Substrate doping concentration"),
IOP( "ndep", BSIM4v3_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"),
IOP( "nsd", BSIM4v3_MOD_NSD, IF_REAL, "S/D doping concentration"),
IOP( "phin", BSIM4v3_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"),
IOP( "ngate", BSIM4v3_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"),
IOP( "gamma1", BSIM4v3_MOD_GAMMA1, IF_REAL, "Vth body coefficient"),
IOP( "gamma2", BSIM4v3_MOD_GAMMA2, IF_REAL, "Vth body coefficient"),
IOP( "vbx", BSIM4v3_MOD_VBX, IF_REAL, "Vth transition body Voltage"),
IOP( "vbm", BSIM4v3_MOD_VBM, IF_REAL, "Maximum body voltage"),
IOP( "xt", BSIM4v3_MOD_XT, IF_REAL, "Doping depth"),
IOP( "k1", BSIM4v3_MOD_K1, IF_REAL, "Bulk effect coefficient 1"),
IOP( "kt1", BSIM4v3_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"),
IOP( "kt1l", BSIM4v3_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"),
IOP( "kt2", BSIM4v3_MOD_KT2, IF_REAL, "Body-coefficient of kt1"),
IOP( "k2", BSIM4v3_MOD_K2, IF_REAL, "Bulk effect coefficient 2"),
IOP( "k3", BSIM4v3_MOD_K3, IF_REAL, "Narrow width effect coefficient"),
IOP( "k3b", BSIM4v3_MOD_K3B, IF_REAL, "Body effect coefficient of k3"),
IOP( "w0", BSIM4v3_MOD_W0, IF_REAL, "Narrow width effect parameter"),
IOP( "dvtp0", BSIM4v3_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"),
IOP( "dvtp1", BSIM4v3_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"),
IOP( "lpe0", BSIM4v3_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"),
IOP( "lpeb", BSIM4v3_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"),
IOP( "dvt0", BSIM4v3_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"),
IOP( "dvt1", BSIM4v3_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"),
IOP( "dvt2", BSIM4v3_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"),
IOP( "dvt0w", BSIM4v3_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"),
IOP( "dvt1w", BSIM4v3_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"),
IOP( "dvt2w", BSIM4v3_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"),
IOP( "drout", BSIM4v3_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"),
IOP( "dsub", BSIM4v3_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"),
IOP( "vth0", BSIM4v3_MOD_VTH0, IF_REAL,"Threshold voltage"),
IOP( "vtho", BSIM4v3_MOD_VTH0, IF_REAL,"Threshold voltage"),
IOP( "ua", BSIM4v3_MOD_UA, IF_REAL, "Linear gate dependence of mobility"),
IOP( "ua1", BSIM4v3_MOD_UA1, IF_REAL, "Temperature coefficient of ua"),
IOP( "ub", BSIM4v3_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"),
IOP( "ub1", BSIM4v3_MOD_UB1, IF_REAL, "Temperature coefficient of ub"),
IOP( "uc", BSIM4v3_MOD_UC, IF_REAL, "Body-bias dependence of mobility"),
IOP( "uc1", BSIM4v3_MOD_UC1, IF_REAL, "Temperature coefficient of uc"),
IOP( "u0", BSIM4v3_MOD_U0, IF_REAL, "Low-field mobility at Tnom"),
IOP( "eu", BSIM4v3_MOD_EU, IF_REAL, "Mobility exponent"),
IOP( "ute", BSIM4v3_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"),
IOP( "voff", BSIM4v3_MOD_VOFF, IF_REAL, "Threshold voltage offset"),
IOP( "minv", BSIM4v3_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"),
IOP( "voffl", BSIM4v3_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"),
IOP( "tnom", BSIM4v3_MOD_TNOM, IF_REAL, "Parameter measurement temperature"),
IOP( "cgso", BSIM4v3_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"),
IOP( "cgdo", BSIM4v3_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"),
IOP( "cgbo", BSIM4v3_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"),
IOP( "xpart", BSIM4v3_MOD_XPART, IF_REAL, "Channel charge partitioning"),
IOP( "delta", BSIM4v3_MOD_DELTA, IF_REAL, "Effective Vds parameter"),
IOP( "rsh", BSIM4v3_MOD_RSH, IF_REAL, "Source-drain sheet resistance"),
IOP( "rdsw", BSIM4v3_MOD_RDSW, IF_REAL, "Source-drain resistance per width"),
IOP( "rdswmin", BSIM4v3_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"),
IOP( "rsw", BSIM4v3_MOD_RSW, IF_REAL, "Source resistance per width"),
IOP( "rdw", BSIM4v3_MOD_RDW, IF_REAL, "Drain resistance per width"),
IOP( "rdwmin", BSIM4v3_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"),
IOP( "rswmin", BSIM4v3_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"),
IOP( "prwg", BSIM4v3_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "),
IOP( "prwb", BSIM4v3_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "),
IOP( "prt", BSIM4v3_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "),
IOP( "eta0", BSIM4v3_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"),
IOP( "etab", BSIM4v3_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"),
IOP( "pclm", BSIM4v3_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"),
IOP( "pdiblc1", BSIM4v3_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"),
IOP( "pdiblc2", BSIM4v3_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"),
IOP( "pdiblcb", BSIM4v3_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"),
IOP( "fprout", BSIM4v3_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"),
IOP( "pdits", BSIM4v3_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"),
IOP( "pditsl", BSIM4v3_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"),
IOP( "pditsd", BSIM4v3_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"),
IOP( "pscbe1", BSIM4v3_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"),
IOP( "pscbe2", BSIM4v3_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"),
IOP( "pvag", BSIM4v3_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"),
IOP( "jss", BSIM4v3_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"),
IOP( "jsws", BSIM4v3_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"),
IOP( "jswgs", BSIM4v3_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"),
IOP( "pbs", BSIM4v3_MOD_PBS, IF_REAL, "Source junction built-in potential"),
IOP( "njs", BSIM4v3_MOD_NJS, IF_REAL, "Source junction emission coefficient"),
IOP( "xtis", BSIM4v3_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"),
IOP( "mjs", BSIM4v3_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"),
IOP( "pbsws", BSIM4v3_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"),
IOP( "mjsws", BSIM4v3_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"),
IOP( "pbswgs", BSIM4v3_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"),
IOP( "mjswgs", BSIM4v3_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"),
IOP( "cjs", BSIM4v3_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"),
IOP( "cjsws", BSIM4v3_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"),
IOP( "cjswgs", BSIM4v3_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"),
IOP( "jsd", BSIM4v3_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"),
IOP( "jswd", BSIM4v3_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"),
IOP( "jswgd", BSIM4v3_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"),
IOP( "pbd", BSIM4v3_MOD_PBD, IF_REAL, "Drain junction built-in potential"),
IOP( "njd", BSIM4v3_MOD_NJD, IF_REAL, "Drain junction emission coefficient"),
IOP( "xtid", BSIM4v3_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"),
IOP( "mjd", BSIM4v3_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"),
IOP( "pbswd", BSIM4v3_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"),
IOP( "mjswd", BSIM4v3_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"),
IOP( "pbswgd", BSIM4v3_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"),
IOP( "mjswgd", BSIM4v3_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"),
IOP( "cjd", BSIM4v3_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"),
IOP( "cjswd", BSIM4v3_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"),
IOP( "cjswgd", BSIM4v3_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"),
IOP( "vfbcv", BSIM4v3_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"),
IOP( "vfb", BSIM4v3_MOD_VFB, IF_REAL, "Flat Band Voltage"),
IOP( "tpb", BSIM4v3_MOD_TPB, IF_REAL, "Temperature coefficient of pb"),
IOP( "tcj", BSIM4v3_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"),
IOP( "tpbsw", BSIM4v3_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"),
IOP( "tcjsw", BSIM4v3_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"),
IOP( "tpbswg", BSIM4v3_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"),
IOP( "tcjswg", BSIM4v3_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"),
IOP( "acde", BSIM4v3_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"),
IOP( "moin", BSIM4v3_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"),
IOP( "noff", BSIM4v3_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"),
IOP( "voffcv", BSIM4v3_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"),
IOP( "dmcg", BSIM4v3_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"),
IOP( "dmci", BSIM4v3_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"),
IOP( "dmdg", BSIM4v3_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"),
IOP( "dmcgt", BSIM4v3_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"),
IOP( "xgw", BSIM4v3_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"),
IOP( "xgl", BSIM4v3_MOD_XGL, IF_REAL, "Variation in Ldrawn"),
IOP( "rshg", BSIM4v3_MOD_RSHG, IF_REAL, "Gate sheet resistance"),
IOP( "ngcon", BSIM4v3_MOD_NGCON, IF_REAL, "Number of gate contacts"),
IOP( "xrcrg1", BSIM4v3_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"),
IOP( "xrcrg2", BSIM4v3_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"),
IOP( "lambda", BSIM4v3_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"),
IOP( "vtl", BSIM4v3_MOD_VTL, IF_REAL, " thermal velocity"),
IOP( "lc", BSIM4v3_MOD_LC, IF_REAL, " back scattering parameter"),
IOP( "xn", BSIM4v3_MOD_XN, IF_REAL, " back scattering parameter"),
IOP( "lint", BSIM4v3_MOD_LINT, IF_REAL, "Length reduction parameter"),
IOP( "ll", BSIM4v3_MOD_LL, IF_REAL, "Length reduction parameter"),
IOP( "llc", BSIM4v3_MOD_LLC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lln", BSIM4v3_MOD_LLN, IF_REAL, "Length reduction parameter"),
IOP( "lw", BSIM4v3_MOD_LW, IF_REAL, "Length reduction parameter"),
IOP( "lwc", BSIM4v3_MOD_LWC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lwn", BSIM4v3_MOD_LWN, IF_REAL, "Length reduction parameter"),
IOP( "lwl", BSIM4v3_MOD_LWL, IF_REAL, "Length reduction parameter"),
IOP( "lwlc", BSIM4v3_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"),
IOP( "lmin", BSIM4v3_MOD_LMIN, IF_REAL, "Minimum length for the model"),
IOP( "lmax", BSIM4v3_MOD_LMAX, IF_REAL, "Maximum length for the model"),
IOP( "wr", BSIM4v3_MOD_WR, IF_REAL, "Width dependence of rds"),
IOP( "wint", BSIM4v3_MOD_WINT, IF_REAL, "Width reduction parameter"),
IOP( "dwg", BSIM4v3_MOD_DWG, IF_REAL, "Width reduction parameter"),
IOP( "dwb", BSIM4v3_MOD_DWB, IF_REAL, "Width reduction parameter"),
IOP( "wl", BSIM4v3_MOD_WL, IF_REAL, "Width reduction parameter"),
IOP( "wlc", BSIM4v3_MOD_WLC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wln", BSIM4v3_MOD_WLN, IF_REAL, "Width reduction parameter"),
IOP( "ww", BSIM4v3_MOD_WW, IF_REAL, "Width reduction parameter"),
IOP( "wwc", BSIM4v3_MOD_WWC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wwn", BSIM4v3_MOD_WWN, IF_REAL, "Width reduction parameter"),
IOP( "wwl", BSIM4v3_MOD_WWL, IF_REAL, "Width reduction parameter"),
IOP( "wwlc", BSIM4v3_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"),
IOP( "wmin", BSIM4v3_MOD_WMIN, IF_REAL, "Minimum width for the model"),
IOP( "wmax", BSIM4v3_MOD_WMAX, IF_REAL, "Maximum width for the model"),
IOP( "b0", BSIM4v3_MOD_B0, IF_REAL, "Abulk narrow width parameter"),
IOP( "b1", BSIM4v3_MOD_B1, IF_REAL, "Abulk narrow width parameter"),
IOP( "cgsl", BSIM4v3_MOD_CGSL, IF_REAL, "New C-V model parameter"),
IOP( "cgdl", BSIM4v3_MOD_CGDL, IF_REAL, "New C-V model parameter"),
IOP( "ckappas", BSIM4v3_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "),
IOP( "ckappad", BSIM4v3_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"),
IOP( "cf", BSIM4v3_MOD_CF, IF_REAL, "Fringe capacitance parameter"),
IOP( "clc", BSIM4v3_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"),
IOP( "cle", BSIM4v3_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"),
IOP( "dwc", BSIM4v3_MOD_DWC, IF_REAL, "Delta W for C-V model"),
IOP( "dlc", BSIM4v3_MOD_DLC, IF_REAL, "Delta L for C-V model"),
IOP( "xw", BSIM4v3_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"),
IOP( "xl", BSIM4v3_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"),
IOP( "dlcig", BSIM4v3_MOD_DLCIG, IF_REAL, "Delta L for Ig model"),
IOP( "dwj", BSIM4v3_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"),
IOP( "alpha0", BSIM4v3_MOD_ALPHA0, IF_REAL, "substrate current model parameter"),
IOP( "alpha1", BSIM4v3_MOD_ALPHA1, IF_REAL, "substrate current model parameter"),
IOP( "beta0", BSIM4v3_MOD_BETA0, IF_REAL, "substrate current model parameter"),
IOP( "agidl", BSIM4v3_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"),
IOP( "bgidl", BSIM4v3_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"),
IOP( "cgidl", BSIM4v3_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"),
IOP( "egidl", BSIM4v3_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"),
IOP( "aigc", BSIM4v3_MOD_AIGC, IF_REAL, "Parameter for Igc"),
IOP( "bigc", BSIM4v3_MOD_BIGC, IF_REAL, "Parameter for Igc"),
IOP( "cigc", BSIM4v3_MOD_CIGC, IF_REAL, "Parameter for Igc"),
IOP( "aigsd", BSIM4v3_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"),
IOP( "bigsd", BSIM4v3_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"),
IOP( "cigsd", BSIM4v3_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"),
IOP( "aigbacc", BSIM4v3_MOD_AIGBACC, IF_REAL, "Parameter for Igb"),
IOP( "bigbacc", BSIM4v3_MOD_BIGBACC, IF_REAL, "Parameter for Igb"),
IOP( "cigbacc", BSIM4v3_MOD_CIGBACC, IF_REAL, "Parameter for Igb"),
IOP( "aigbinv", BSIM4v3_MOD_AIGBINV, IF_REAL, "Parameter for Igb"),
IOP( "bigbinv", BSIM4v3_MOD_BIGBINV, IF_REAL, "Parameter for Igb"),
IOP( "cigbinv", BSIM4v3_MOD_CIGBINV, IF_REAL, "Parameter for Igb"),
IOP( "nigc", BSIM4v3_MOD_NIGC, IF_REAL, "Parameter for Igc slope"),
IOP( "nigbinv", BSIM4v3_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"),
IOP( "nigbacc", BSIM4v3_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"),
IOP( "ntox", BSIM4v3_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"),
IOP( "eigbinv", BSIM4v3_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"),
IOP( "pigcd", BSIM4v3_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"),
IOP( "poxedge", BSIM4v3_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"),
IOP( "ijthdfwd", BSIM4v3_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"),
IOP( "ijthsfwd", BSIM4v3_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"),
IOP( "ijthdrev", BSIM4v3_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"),
IOP( "ijthsrev", BSIM4v3_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"),
IOP( "xjbvd", BSIM4v3_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"),
IOP( "xjbvs", BSIM4v3_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"),
IOP( "bvd", BSIM4v3_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"),
IOP( "bvs", BSIM4v3_MOD_BVS, IF_REAL, "Source diode breakdown voltage"),
IOP( "gbmin", BSIM4v3_MOD_GBMIN, IF_REAL, "Minimum body conductance"),
IOP( "rbdb", BSIM4v3_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"),
IOP( "rbpb", BSIM4v3_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"),
IOP( "rbsb", BSIM4v3_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"),
IOP( "rbps", BSIM4v3_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"),
IOP( "rbpd", BSIM4v3_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"),
IOP( "lcdsc", BSIM4v3_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"),
IOP( "lcdscb", BSIM4v3_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"),
IOP( "lcdscd", BSIM4v3_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"),
IOP( "lcit", BSIM4v3_MOD_LCIT, IF_REAL, "Length dependence of cit"),
IOP( "lnfactor", BSIM4v3_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"),
IOP( "lxj", BSIM4v3_MOD_LXJ, IF_REAL, "Length dependence of xj"),
IOP( "lvsat", BSIM4v3_MOD_LVSAT, IF_REAL, "Length dependence of vsat"),
IOP( "lat", BSIM4v3_MOD_LAT, IF_REAL, "Length dependence of at"),
IOP( "la0", BSIM4v3_MOD_LA0, IF_REAL, "Length dependence of a0"),
IOP( "lags", BSIM4v3_MOD_LAGS, IF_REAL, "Length dependence of ags"),
IOP( "la1", BSIM4v3_MOD_LA1, IF_REAL, "Length dependence of a1"),
IOP( "la2", BSIM4v3_MOD_LA2, IF_REAL, "Length dependence of a2"),
IOP( "lketa", BSIM4v3_MOD_LKETA, IF_REAL, "Length dependence of keta"),
IOP( "lnsub", BSIM4v3_MOD_LNSUB, IF_REAL, "Length dependence of nsub"),
IOP( "lndep", BSIM4v3_MOD_LNDEP, IF_REAL, "Length dependence of ndep"),
IOP( "lnsd", BSIM4v3_MOD_LNSD, IF_REAL, "Length dependence of nsd"),
IOP( "lphin", BSIM4v3_MOD_LPHIN, IF_REAL, "Length dependence of phin"),
IOP( "lngate", BSIM4v3_MOD_LNGATE, IF_REAL, "Length dependence of ngate"),
IOP( "lgamma1", BSIM4v3_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"),
IOP( "lgamma2", BSIM4v3_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"),
IOP( "lvbx", BSIM4v3_MOD_LVBX, IF_REAL, "Length dependence of vbx"),
IOP( "lvbm", BSIM4v3_MOD_LVBM, IF_REAL, "Length dependence of vbm"),
IOP( "lxt", BSIM4v3_MOD_LXT, IF_REAL, "Length dependence of xt"),
IOP( "lk1", BSIM4v3_MOD_LK1, IF_REAL, "Length dependence of k1"),
IOP( "lkt1", BSIM4v3_MOD_LKT1, IF_REAL, "Length dependence of kt1"),
IOP( "lkt1l", BSIM4v3_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"),
IOP( "lkt2", BSIM4v3_MOD_LKT2, IF_REAL, "Length dependence of kt2"),
IOP( "lk2", BSIM4v3_MOD_LK2, IF_REAL, "Length dependence of k2"),
IOP( "lk3", BSIM4v3_MOD_LK3, IF_REAL, "Length dependence of k3"),
IOP( "lk3b", BSIM4v3_MOD_LK3B, IF_REAL, "Length dependence of k3b"),
IOP( "lw0", BSIM4v3_MOD_LW0, IF_REAL, "Length dependence of w0"),
IOP( "ldvtp0", BSIM4v3_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"),
IOP( "ldvtp1", BSIM4v3_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"),
IOP( "llpe0", BSIM4v3_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"),
IOP( "llpeb", BSIM4v3_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"),
IOP( "ldvt0", BSIM4v3_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"),
IOP( "ldvt1", BSIM4v3_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"),
IOP( "ldvt2", BSIM4v3_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"),
IOP( "ldvt0w", BSIM4v3_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"),
IOP( "ldvt1w", BSIM4v3_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"),
IOP( "ldvt2w", BSIM4v3_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"),
IOP( "ldrout", BSIM4v3_MOD_LDROUT, IF_REAL, "Length dependence of drout"),
IOP( "ldsub", BSIM4v3_MOD_LDSUB, IF_REAL, "Length dependence of dsub"),
IOP( "lvth0", BSIM4v3_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
IOP( "lvtho", BSIM4v3_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
IOP( "lua", BSIM4v3_MOD_LUA, IF_REAL, "Length dependence of ua"),
IOP( "lua1", BSIM4v3_MOD_LUA1, IF_REAL, "Length dependence of ua1"),
IOP( "lub", BSIM4v3_MOD_LUB, IF_REAL, "Length dependence of ub"),
IOP( "lub1", BSIM4v3_MOD_LUB1, IF_REAL, "Length dependence of ub1"),
IOP( "luc", BSIM4v3_MOD_LUC, IF_REAL, "Length dependence of uc"),
IOP( "luc1", BSIM4v3_MOD_LUC1, IF_REAL, "Length dependence of uc1"),
IOP( "lu0", BSIM4v3_MOD_LU0, IF_REAL, "Length dependence of u0"),
IOP( "lute", BSIM4v3_MOD_LUTE, IF_REAL, "Length dependence of ute"),
IOP( "lvoff", BSIM4v3_MOD_LVOFF, IF_REAL, "Length dependence of voff"),
IOP( "lminv", BSIM4v3_MOD_LMINV, IF_REAL, "Length dependence of minv"),
IOP( "ldelta", BSIM4v3_MOD_LDELTA, IF_REAL, "Length dependence of delta"),
IOP( "lrdsw", BSIM4v3_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "),
IOP( "lrsw", BSIM4v3_MOD_LRSW, IF_REAL, "Length dependence of rsw"),
IOP( "lrdw", BSIM4v3_MOD_LRDW, IF_REAL, "Length dependence of rdw"),
IOP( "lprwg", BSIM4v3_MOD_LPRWG, IF_REAL, "Length dependence of prwg "),
IOP( "lprwb", BSIM4v3_MOD_LPRWB, IF_REAL, "Length dependence of prwb "),
IOP( "lprt", BSIM4v3_MOD_LPRT, IF_REAL, "Length dependence of prt "),
IOP( "leta0", BSIM4v3_MOD_LETA0, IF_REAL, "Length dependence of eta0"),
IOP( "letab", BSIM4v3_MOD_LETAB, IF_REAL, "Length dependence of etab"),
IOP( "lpclm", BSIM4v3_MOD_LPCLM, IF_REAL, "Length dependence of pclm"),
IOP( "lpdiblc1", BSIM4v3_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"),
IOP( "lpdiblc2", BSIM4v3_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"),
IOP( "lpdiblcb", BSIM4v3_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"),
IOP( "lfprout", BSIM4v3_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"),
IOP( "lpdits", BSIM4v3_MOD_LPDITS, IF_REAL, "Length dependence of pdits"),
IOP( "lpditsd", BSIM4v3_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"),
IOP( "lpscbe1", BSIM4v3_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"),
IOP( "lpscbe2", BSIM4v3_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"),
IOP( "lpvag", BSIM4v3_MOD_LPVAG, IF_REAL, "Length dependence of pvag"),
IOP( "lwr", BSIM4v3_MOD_LWR, IF_REAL, "Length dependence of wr"),
IOP( "ldwg", BSIM4v3_MOD_LDWG, IF_REAL, "Length dependence of dwg"),
IOP( "ldwb", BSIM4v3_MOD_LDWB, IF_REAL, "Length dependence of dwb"),
IOP( "lb0", BSIM4v3_MOD_LB0, IF_REAL, "Length dependence of b0"),
IOP( "lb1", BSIM4v3_MOD_LB1, IF_REAL, "Length dependence of b1"),
IOP( "lcgsl", BSIM4v3_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"),
IOP( "lcgdl", BSIM4v3_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"),
IOP( "lckappas", BSIM4v3_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"),
IOP( "lckappad", BSIM4v3_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"),
IOP( "lcf", BSIM4v3_MOD_LCF, IF_REAL, "Length dependence of cf"),
IOP( "lclc", BSIM4v3_MOD_LCLC, IF_REAL, "Length dependence of clc"),
IOP( "lcle", BSIM4v3_MOD_LCLE, IF_REAL, "Length dependence of cle"),
IOP( "lalpha0", BSIM4v3_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"),
IOP( "lalpha1", BSIM4v3_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"),
IOP( "lbeta0", BSIM4v3_MOD_LBETA0, IF_REAL, "Length dependence of beta0"),
IOP( "lagidl", BSIM4v3_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"),
IOP( "lbgidl", BSIM4v3_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"),
IOP( "lcgidl", BSIM4v3_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"),
IOP( "legidl", BSIM4v3_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"),
IOP( "laigc", BSIM4v3_MOD_LAIGC, IF_REAL, "Length dependence of aigc"),
IOP( "lbigc", BSIM4v3_MOD_LBIGC, IF_REAL, "Length dependence of bigc"),
IOP( "lcigc", BSIM4v3_MOD_LCIGC, IF_REAL, "Length dependence of cigc"),
IOP( "laigsd", BSIM4v3_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"),
IOP( "lbigsd", BSIM4v3_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"),
IOP( "lcigsd", BSIM4v3_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"),
IOP( "laigbacc", BSIM4v3_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"),
IOP( "lbigbacc", BSIM4v3_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"),
IOP( "lcigbacc", BSIM4v3_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"),
IOP( "laigbinv", BSIM4v3_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"),
IOP( "lbigbinv", BSIM4v3_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"),
IOP( "lcigbinv", BSIM4v3_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"),
IOP( "lnigc", BSIM4v3_MOD_LNIGC, IF_REAL, "Length dependence of nigc"),
IOP( "lnigbinv", BSIM4v3_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"),
IOP( "lnigbacc", BSIM4v3_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"),
IOP( "lntox", BSIM4v3_MOD_LNTOX, IF_REAL, "Length dependence of ntox"),
IOP( "leigbinv", BSIM4v3_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"),
IOP( "lpigcd", BSIM4v3_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"),
IOP( "lpoxedge", BSIM4v3_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"),
IOP( "lvfbcv", BSIM4v3_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"),
IOP( "lvfb", BSIM4v3_MOD_LVFB, IF_REAL, "Length dependence of vfb"),
IOP( "lacde", BSIM4v3_MOD_LACDE, IF_REAL, "Length dependence of acde"),
IOP( "lmoin", BSIM4v3_MOD_LMOIN, IF_REAL, "Length dependence of moin"),
IOP( "lnoff", BSIM4v3_MOD_LNOFF, IF_REAL, "Length dependence of noff"),
IOP( "lvoffcv", BSIM4v3_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"),
IOP( "lxrcrg1", BSIM4v3_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"),
IOP( "lxrcrg2", BSIM4v3_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"),
IOP( "llambda", BSIM4v3_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"),
IOP( "lvtl", BSIM4v3_MOD_LVTL, IF_REAL, " Length dependence of vtl"),
IOP( "lxn", BSIM4v3_MOD_LXN, IF_REAL, " Length dependence of xn"),
IOP( "leu", BSIM4v3_MOD_LEU, IF_REAL, "Length dependence of eu"),
IOP( "wcdsc", BSIM4v3_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"),
IOP( "wcdscb", BSIM4v3_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"),
IOP( "wcdscd", BSIM4v3_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"),
IOP( "wcit", BSIM4v3_MOD_WCIT, IF_REAL, "Width dependence of cit"),
IOP( "wnfactor", BSIM4v3_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"),
IOP( "wxj", BSIM4v3_MOD_WXJ, IF_REAL, "Width dependence of xj"),
IOP( "wvsat", BSIM4v3_MOD_WVSAT, IF_REAL, "Width dependence of vsat"),
IOP( "wat", BSIM4v3_MOD_WAT, IF_REAL, "Width dependence of at"),
IOP( "wa0", BSIM4v3_MOD_WA0, IF_REAL, "Width dependence of a0"),
IOP( "wags", BSIM4v3_MOD_WAGS, IF_REAL, "Width dependence of ags"),
IOP( "wa1", BSIM4v3_MOD_WA1, IF_REAL, "Width dependence of a1"),
IOP( "wa2", BSIM4v3_MOD_WA2, IF_REAL, "Width dependence of a2"),
IOP( "wketa", BSIM4v3_MOD_WKETA, IF_REAL, "Width dependence of keta"),
IOP( "wnsub", BSIM4v3_MOD_WNSUB, IF_REAL, "Width dependence of nsub"),
IOP( "wndep", BSIM4v3_MOD_WNDEP, IF_REAL, "Width dependence of ndep"),
IOP( "wnsd", BSIM4v3_MOD_WNSD, IF_REAL, "Width dependence of nsd"),
IOP( "wphin", BSIM4v3_MOD_WPHIN, IF_REAL, "Width dependence of phin"),
IOP( "wngate", BSIM4v3_MOD_WNGATE, IF_REAL, "Width dependence of ngate"),
IOP( "wgamma1", BSIM4v3_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"),
IOP( "wgamma2", BSIM4v3_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"),
IOP( "wvbx", BSIM4v3_MOD_WVBX, IF_REAL, "Width dependence of vbx"),
IOP( "wvbm", BSIM4v3_MOD_WVBM, IF_REAL, "Width dependence of vbm"),
IOP( "wxt", BSIM4v3_MOD_WXT, IF_REAL, "Width dependence of xt"),
IOP( "wk1", BSIM4v3_MOD_WK1, IF_REAL, "Width dependence of k1"),
IOP( "wkt1", BSIM4v3_MOD_WKT1, IF_REAL, "Width dependence of kt1"),
IOP( "wkt1l", BSIM4v3_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"),
IOP( "wkt2", BSIM4v3_MOD_WKT2, IF_REAL, "Width dependence of kt2"),
IOP( "wk2", BSIM4v3_MOD_WK2, IF_REAL, "Width dependence of k2"),
IOP( "wk3", BSIM4v3_MOD_WK3, IF_REAL, "Width dependence of k3"),
IOP( "wk3b", BSIM4v3_MOD_WK3B, IF_REAL, "Width dependence of k3b"),
IOP( "ww0", BSIM4v3_MOD_WW0, IF_REAL, "Width dependence of w0"),
IOP( "wdvtp0", BSIM4v3_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"),
IOP( "wdvtp1", BSIM4v3_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"),
IOP( "wlpe0", BSIM4v3_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"),
IOP( "wlpeb", BSIM4v3_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"),
IOP( "wdvt0", BSIM4v3_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"),
IOP( "wdvt1", BSIM4v3_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"),
IOP( "wdvt2", BSIM4v3_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"),
IOP( "wdvt0w", BSIM4v3_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"),
IOP( "wdvt1w", BSIM4v3_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"),
IOP( "wdvt2w", BSIM4v3_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"),
IOP( "wdrout", BSIM4v3_MOD_WDROUT, IF_REAL, "Width dependence of drout"),
IOP( "wdsub", BSIM4v3_MOD_WDSUB, IF_REAL, "Width dependence of dsub"),
IOP( "wvth0", BSIM4v3_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
IOP( "wvtho", BSIM4v3_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
IOP( "wua", BSIM4v3_MOD_WUA, IF_REAL, "Width dependence of ua"),
IOP( "wua1", BSIM4v3_MOD_WUA1, IF_REAL, "Width dependence of ua1"),
IOP( "wub", BSIM4v3_MOD_WUB, IF_REAL, "Width dependence of ub"),
IOP( "wub1", BSIM4v3_MOD_WUB1, IF_REAL, "Width dependence of ub1"),
IOP( "wuc", BSIM4v3_MOD_WUC, IF_REAL, "Width dependence of uc"),
IOP( "wuc1", BSIM4v3_MOD_WUC1, IF_REAL, "Width dependence of uc1"),
IOP( "wu0", BSIM4v3_MOD_WU0, IF_REAL, "Width dependence of u0"),
IOP( "wute", BSIM4v3_MOD_WUTE, IF_REAL, "Width dependence of ute"),
IOP( "wvoff", BSIM4v3_MOD_WVOFF, IF_REAL, "Width dependence of voff"),
IOP( "wminv", BSIM4v3_MOD_WMINV, IF_REAL, "Width dependence of minv"),
IOP( "wdelta", BSIM4v3_MOD_WDELTA, IF_REAL, "Width dependence of delta"),
IOP( "wrdsw", BSIM4v3_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "),
IOP( "wrsw", BSIM4v3_MOD_WRSW, IF_REAL, "Width dependence of rsw"),
IOP( "wrdw", BSIM4v3_MOD_WRDW, IF_REAL, "Width dependence of rdw"),
IOP( "wprwg", BSIM4v3_MOD_WPRWG, IF_REAL, "Width dependence of prwg "),
IOP( "wprwb", BSIM4v3_MOD_WPRWB, IF_REAL, "Width dependence of prwb "),
IOP( "wprt", BSIM4v3_MOD_WPRT, IF_REAL, "Width dependence of prt"),
IOP( "weta0", BSIM4v3_MOD_WETA0, IF_REAL, "Width dependence of eta0"),
IOP( "wetab", BSIM4v3_MOD_WETAB, IF_REAL, "Width dependence of etab"),
IOP( "wpclm", BSIM4v3_MOD_WPCLM, IF_REAL, "Width dependence of pclm"),
IOP( "wpdiblc1", BSIM4v3_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"),
IOP( "wpdiblc2", BSIM4v3_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"),
IOP( "wpdiblcb", BSIM4v3_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"),
IOP( "wfprout", BSIM4v3_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"),
IOP( "wpdits", BSIM4v3_MOD_WPDITS, IF_REAL, "Width dependence of pdits"),
IOP( "wpditsd", BSIM4v3_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"),
IOP( "wpscbe1", BSIM4v3_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"),
IOP( "wpscbe2", BSIM4v3_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"),
IOP( "wpvag", BSIM4v3_MOD_WPVAG, IF_REAL, "Width dependence of pvag"),
IOP( "wwr", BSIM4v3_MOD_WWR, IF_REAL, "Width dependence of wr"),
IOP( "wdwg", BSIM4v3_MOD_WDWG, IF_REAL, "Width dependence of dwg"),
IOP( "wdwb", BSIM4v3_MOD_WDWB, IF_REAL, "Width dependence of dwb"),
IOP( "wb0", BSIM4v3_MOD_WB0, IF_REAL, "Width dependence of b0"),
IOP( "wb1", BSIM4v3_MOD_WB1, IF_REAL, "Width dependence of b1"),
IOP( "wcgsl", BSIM4v3_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"),
IOP( "wcgdl", BSIM4v3_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"),
IOP( "wckappas", BSIM4v3_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"),
IOP( "wckappad", BSIM4v3_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"),
IOP( "wcf", BSIM4v3_MOD_WCF, IF_REAL, "Width dependence of cf"),
IOP( "wclc", BSIM4v3_MOD_WCLC, IF_REAL, "Width dependence of clc"),
IOP( "wcle", BSIM4v3_MOD_WCLE, IF_REAL, "Width dependence of cle"),
IOP( "walpha0", BSIM4v3_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"),
IOP( "walpha1", BSIM4v3_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"),
IOP( "wbeta0", BSIM4v3_MOD_WBETA0, IF_REAL, "Width dependence of beta0"),
IOP( "wagidl", BSIM4v3_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"),
IOP( "wbgidl", BSIM4v3_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"),
IOP( "wcgidl", BSIM4v3_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"),
IOP( "wegidl", BSIM4v3_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"),
IOP( "waigc", BSIM4v3_MOD_WAIGC, IF_REAL, "Width dependence of aigc"),
IOP( "wbigc", BSIM4v3_MOD_WBIGC, IF_REAL, "Width dependence of bigc"),
IOP( "wcigc", BSIM4v3_MOD_WCIGC, IF_REAL, "Width dependence of cigc"),
IOP( "waigsd", BSIM4v3_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"),
IOP( "wbigsd", BSIM4v3_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"),
IOP( "wcigsd", BSIM4v3_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"),
IOP( "waigbacc", BSIM4v3_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"),
IOP( "wbigbacc", BSIM4v3_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"),
IOP( "wcigbacc", BSIM4v3_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"),
IOP( "waigbinv", BSIM4v3_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"),
IOP( "wbigbinv", BSIM4v3_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"),
IOP( "wcigbinv", BSIM4v3_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"),
IOP( "wnigc", BSIM4v3_MOD_WNIGC, IF_REAL, "Width dependence of nigc"),
IOP( "wnigbinv", BSIM4v3_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"),
IOP( "wnigbacc", BSIM4v3_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"),
IOP( "wntox", BSIM4v3_MOD_WNTOX, IF_REAL, "Width dependence of ntox"),
IOP( "weigbinv", BSIM4v3_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"),
IOP( "wpigcd", BSIM4v3_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"),
IOP( "wpoxedge", BSIM4v3_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"),
IOP( "wvfbcv", BSIM4v3_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"),
IOP( "wvfb", BSIM4v3_MOD_WVFB, IF_REAL, "Width dependence of vfb"),
IOP( "wacde", BSIM4v3_MOD_WACDE, IF_REAL, "Width dependence of acde"),
IOP( "wmoin", BSIM4v3_MOD_WMOIN, IF_REAL, "Width dependence of moin"),
IOP( "wnoff", BSIM4v3_MOD_WNOFF, IF_REAL, "Width dependence of noff"),
IOP( "wvoffcv", BSIM4v3_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"),
IOP( "wxrcrg1", BSIM4v3_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"),
IOP( "wxrcrg2", BSIM4v3_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"),
IOP( "wlambda", BSIM4v3_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"),
IOP( "wvtl", BSIM4v3_MOD_WVTL, IF_REAL, "Width dependence of vtl"),
IOP( "wxn", BSIM4v3_MOD_WXN, IF_REAL, "Width dependence of xn"),
IOP( "weu", BSIM4v3_MOD_WEU, IF_REAL, "Width dependence of eu"),
IOP( "pcdsc", BSIM4v3_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"),
IOP( "pcdscb", BSIM4v3_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"),
IOP( "pcdscd", BSIM4v3_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"),
IOP( "pcit", BSIM4v3_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"),
IOP( "pnfactor", BSIM4v3_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"),
IOP( "pxj", BSIM4v3_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"),
IOP( "pvsat", BSIM4v3_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"),
IOP( "pat", BSIM4v3_MOD_PAT, IF_REAL, "Cross-term dependence of at"),
IOP( "pa0", BSIM4v3_MOD_PA0, IF_REAL, "Cross-term dependence of a0"),
IOP( "pags", BSIM4v3_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"),
IOP( "pa1", BSIM4v3_MOD_PA1, IF_REAL, "Cross-term dependence of a1"),
IOP( "pa2", BSIM4v3_MOD_PA2, IF_REAL, "Cross-term dependence of a2"),
IOP( "pketa", BSIM4v3_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"),
IOP( "pnsub", BSIM4v3_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"),
IOP( "pndep", BSIM4v3_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"),
IOP( "pnsd", BSIM4v3_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"),
IOP( "pphin", BSIM4v3_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"),
IOP( "pngate", BSIM4v3_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"),
IOP( "pgamma1", BSIM4v3_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"),
IOP( "pgamma2", BSIM4v3_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"),
IOP( "pvbx", BSIM4v3_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"),
IOP( "pvbm", BSIM4v3_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"),
IOP( "pxt", BSIM4v3_MOD_PXT, IF_REAL, "Cross-term dependence of xt"),
IOP( "pk1", BSIM4v3_MOD_PK1, IF_REAL, "Cross-term dependence of k1"),
IOP( "pkt1", BSIM4v3_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"),
IOP( "pkt1l", BSIM4v3_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"),
IOP( "pkt2", BSIM4v3_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"),
IOP( "pk2", BSIM4v3_MOD_PK2, IF_REAL, "Cross-term dependence of k2"),
IOP( "pk3", BSIM4v3_MOD_PK3, IF_REAL, "Cross-term dependence of k3"),
IOP( "pk3b", BSIM4v3_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"),
IOP( "pw0", BSIM4v3_MOD_PW0, IF_REAL, "Cross-term dependence of w0"),
IOP( "pdvtp0", BSIM4v3_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"),
IOP( "pdvtp1", BSIM4v3_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"),
IOP( "plpe0", BSIM4v3_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"),
IOP( "plpeb", BSIM4v3_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"),
IOP( "pdvt0", BSIM4v3_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"),
IOP( "pdvt1", BSIM4v3_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"),
IOP( "pdvt2", BSIM4v3_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"),
IOP( "pdvt0w", BSIM4v3_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"),
IOP( "pdvt1w", BSIM4v3_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"),
IOP( "pdvt2w", BSIM4v3_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"),
IOP( "pdrout", BSIM4v3_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"),
IOP( "pdsub", BSIM4v3_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"),
IOP( "pvth0", BSIM4v3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
IOP( "pvtho", BSIM4v3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
IOP( "pua", BSIM4v3_MOD_PUA, IF_REAL, "Cross-term dependence of ua"),
IOP( "pua1", BSIM4v3_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"),
IOP( "pub", BSIM4v3_MOD_PUB, IF_REAL, "Cross-term dependence of ub"),
IOP( "pub1", BSIM4v3_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"),
IOP( "puc", BSIM4v3_MOD_PUC, IF_REAL, "Cross-term dependence of uc"),
IOP( "puc1", BSIM4v3_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"),
IOP( "pu0", BSIM4v3_MOD_PU0, IF_REAL, "Cross-term dependence of u0"),
IOP( "pute", BSIM4v3_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"),
IOP( "pvoff", BSIM4v3_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"),
IOP( "pminv", BSIM4v3_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"),
IOP( "pdelta", BSIM4v3_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"),
IOP( "prdsw", BSIM4v3_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "),
IOP( "prsw", BSIM4v3_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"),
IOP( "prdw", BSIM4v3_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"),
IOP( "pprwg", BSIM4v3_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "),
IOP( "pprwb", BSIM4v3_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "),
IOP( "pprt", BSIM4v3_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "),
IOP( "peta0", BSIM4v3_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"),
IOP( "petab", BSIM4v3_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"),
IOP( "ppclm", BSIM4v3_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"),
IOP( "ppdiblc1", BSIM4v3_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"),
IOP( "ppdiblc2", BSIM4v3_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"),
IOP( "ppdiblcb", BSIM4v3_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"),
IOP( "pfprout", BSIM4v3_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"),
IOP( "ppdits", BSIM4v3_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"),
IOP( "ppditsd", BSIM4v3_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"),
IOP( "ppscbe1", BSIM4v3_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"),
IOP( "ppscbe2", BSIM4v3_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"),
IOP( "ppvag", BSIM4v3_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"),
IOP( "pwr", BSIM4v3_MOD_PWR, IF_REAL, "Cross-term dependence of wr"),
IOP( "pdwg", BSIM4v3_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"),
IOP( "pdwb", BSIM4v3_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"),
IOP( "pb0", BSIM4v3_MOD_PB0, IF_REAL, "Cross-term dependence of b0"),
IOP( "pb1", BSIM4v3_MOD_PB1, IF_REAL, "Cross-term dependence of b1"),
IOP( "pcgsl", BSIM4v3_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"),
IOP( "pcgdl", BSIM4v3_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"),
IOP( "pckappas", BSIM4v3_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"),
IOP( "pckappad", BSIM4v3_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"),
IOP( "pcf", BSIM4v3_MOD_PCF, IF_REAL, "Cross-term dependence of cf"),
IOP( "pclc", BSIM4v3_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"),
IOP( "pcle", BSIM4v3_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"),
IOP( "palpha0", BSIM4v3_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"),
IOP( "palpha1", BSIM4v3_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"),
IOP( "pbeta0", BSIM4v3_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"),
IOP( "pagidl", BSIM4v3_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"),
IOP( "pbgidl", BSIM4v3_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"),
IOP( "pcgidl", BSIM4v3_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"),
IOP( "pegidl", BSIM4v3_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"),
IOP( "paigc", BSIM4v3_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"),
IOP( "pbigc", BSIM4v3_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"),
IOP( "pcigc", BSIM4v3_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"),
IOP( "paigsd", BSIM4v3_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"),
IOP( "pbigsd", BSIM4v3_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"),
IOP( "pcigsd", BSIM4v3_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"),
IOP( "paigbacc", BSIM4v3_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"),
IOP( "pbigbacc", BSIM4v3_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"),
IOP( "pcigbacc", BSIM4v3_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"),
IOP( "paigbinv", BSIM4v3_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"),
IOP( "pbigbinv", BSIM4v3_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"),
IOP( "pcigbinv", BSIM4v3_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"),
IOP( "pnigc", BSIM4v3_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"),
IOP( "pnigbinv", BSIM4v3_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"),
IOP( "pnigbacc", BSIM4v3_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"),
IOP( "pntox", BSIM4v3_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"),
IOP( "peigbinv", BSIM4v3_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"),
IOP( "ppigcd", BSIM4v3_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"),
IOP( "ppoxedge", BSIM4v3_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"),
IOP( "pvfbcv", BSIM4v3_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"),
IOP( "pvfb", BSIM4v3_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"),
IOP( "pacde", BSIM4v3_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"),
IOP( "pmoin", BSIM4v3_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"),
IOP( "pnoff", BSIM4v3_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"),
IOP( "pvoffcv", BSIM4v3_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"),
IOP( "pxrcrg1", BSIM4v3_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"),
IOP( "pxrcrg2", BSIM4v3_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"),
IOP( "plambda", BSIM4v3_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"),
IOP( "pvtl", BSIM4v3_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"),
IOP( "pxn", BSIM4v3_MOD_PXN, IF_REAL, "Cross-term dependence of xn"),
IOP( "peu", BSIM4v3_MOD_PEU, IF_REAL, "Cross-term dependence of eu"),
/* stress effect*/
IOP( "saref", BSIM4v3_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"),
IOP( "sbref", BSIM4v3_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"),
IOP( "wlod", BSIM4v3_MOD_WLOD, IF_REAL, "Width parameter for stress effect"),
IOP( "ku0", BSIM4v3_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"),
IOP( "kvsat", BSIM4v3_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"),
IOP( "kvth0", BSIM4v3_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"),
IOP( "tku0", BSIM4v3_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"),
IOP( "llodku0", BSIM4v3_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"),
IOP( "wlodku0", BSIM4v3_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"),
IOP( "llodvth", BSIM4v3_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"),
IOP( "wlodvth", BSIM4v3_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"),
IOP( "lku0", BSIM4v3_MOD_LKU0, IF_REAL, "Length dependence of ku0"),
IOP( "wku0", BSIM4v3_MOD_WKU0, IF_REAL, "Width dependence of ku0"),
IOP( "pku0", BSIM4v3_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"),
IOP( "lkvth0", BSIM4v3_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"),
IOP( "wkvth0", BSIM4v3_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"),
IOP( "pkvth0", BSIM4v3_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"),
IOP( "stk2", BSIM4v3_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"),
IOP( "lodk2", BSIM4v3_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"),
IOP( "steta0", BSIM4v3_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"),
IOP( "lodeta0", BSIM4v3_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"),
IOP( "noia", BSIM4v3_MOD_NOIA, IF_REAL, "Flicker noise parameter"),
IOP( "noib", BSIM4v3_MOD_NOIB, IF_REAL, "Flicker noise parameter"),
IOP( "noic", BSIM4v3_MOD_NOIC, IF_REAL, "Flicker noise parameter"),
IOP( "tnoia", BSIM4v3_MOD_TNOIA, IF_REAL, "Thermal noise parameter"),
IOP( "tnoib", BSIM4v3_MOD_TNOIB, IF_REAL, "Thermal noise parameter"),
IOP( "rnoia", BSIM4v3_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"),
IOP( "rnoib", BSIM4v3_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"),
IOP( "ntnoi", BSIM4v3_MOD_NTNOI, IF_REAL, "Thermal noise parameter"),
IOP( "em", BSIM4v3_MOD_EM, IF_REAL, "Flicker noise parameter"),
IOP( "ef", BSIM4v3_MOD_EF, IF_REAL, "Flicker noise frequency exponent"),
IOP( "af", BSIM4v3_MOD_AF, IF_REAL, "Flicker noise exponent"),
IOP( "kf", BSIM4v3_MOD_KF, IF_REAL, "Flicker noise coefficient"),
IP( "nmos", BSIM4v3_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"),
IP( "pmos", BSIM4v3_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"),
};
char *BSIM4v3names[] = {
"Drain",
"Gate",
"Source",
"Bulk",
"Charge"
};
int BSIM4v3nSize = NUMELEMS(BSIM4v3names);
int BSIM4v3pTSize = NUMELEMS(BSIM4v3pTable);
int BSIM4v3mPTSize = NUMELEMS(BSIM4v3mPTable);
int BSIM4v3iSize = sizeof(BSIM4v3instance);
int BSIM4v3mSize = sizeof(BSIM4v3model);

View File

@ -1,671 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3acld.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 10/05/2001.
**********/
#include "ngspice.h"
#include "cktdefs.h"
#include "bsim4v3def.h"
#include "sperror.h"
int
BSIM4v3acLoad(
GENmodel *inModel,
CKTcircuit *ckt)
{
BSIM4v3model *model = (BSIM4v3model*)inModel;
BSIM4v3instance *here;
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb;
double xcbgb, xcbdb, xcbsb, xcbbb;
double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi;
double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi;
double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr;
double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi;
double xcdbdb, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb, xcsgmb;
double xcgmbb=0.0, xcbgmb;
double capbd, capbs, omega;
double gstot, gstotd, gstotg, gstots, gstotb, gspr;
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr;
double gIstotg, gIstotd, gIstots, gIstotb;
double gIdtotg, gIdtotd, gIdtots, gIdtotb;
double gIbtotg, gIbtotd, gIbtots, gIbtotb;
double gIgtotg, gIgtotd, gIgtots, gIgtotb;
double cgso, cgdo, cgbo;
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
double T0=0.0, T1, T2, T3;
double Csg, Csd, Css;
double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr;
double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi;
double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi;
double FwdSumr, RevSumr, Gmr, Gmbsr;
double FwdSumi, RevSumi, Gmi, Gmbsi;
struct bsim4v3SizeDependParam *pParam;
double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls;
double m;
omega = ckt->CKTomega;
for (; model != NULL; model = model->BSIM4v3nextModel)
{ for (here = model->BSIM4v3instances; here!= NULL;
here = here->BSIM4v3nextInstance)
{ if (here->BSIM4v3owner != ARCHme) continue;
pParam = here->pParam;
capbd = here->BSIM4v3capbd;
capbs = here->BSIM4v3capbs;
cgso = here->BSIM4v3cgso;
cgdo = here->BSIM4v3cgdo;
cgbo = pParam->BSIM4v3cgbo;
Csd = -(here->BSIM4v3cddb + here->BSIM4v3cgdb + here->BSIM4v3cbdb);
Csg = -(here->BSIM4v3cdgb + here->BSIM4v3cggb + here->BSIM4v3cbgb);
Css = -(here->BSIM4v3cdsb + here->BSIM4v3cgsb + here->BSIM4v3cbsb);
if (here->BSIM4v3acnqsMod)
{ T0 = omega * here->BSIM4v3taunet;
T1 = T0 * T0;
T2 = 1.0 / (1.0 + T1);
T3 = T0 * T2;
gmr = here->BSIM4v3gm * T2;
gmbsr = here->BSIM4v3gmbs * T2;
gdsr = here->BSIM4v3gds * T2;
gmi = -here->BSIM4v3gm * T3;
gmbsi = -here->BSIM4v3gmbs * T3;
gdsi = -here->BSIM4v3gds * T3;
Cddr = here->BSIM4v3cddb * T2;
Cdgr = here->BSIM4v3cdgb * T2;
Cdsr = here->BSIM4v3cdsb * T2;
Cdbr = -(Cddr + Cdgr + Cdsr);
/* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */
Cddi = here->BSIM4v3cddb * T3 * omega;
Cdgi = here->BSIM4v3cdgb * T3 * omega;
Cdsi = here->BSIM4v3cdsb * T3 * omega;
Cdbi = -(Cddi + Cdgi + Cdsi);
Csdr = Csd * T2;
Csgr = Csg * T2;
Cssr = Css * T2;
Csbr = -(Csdr + Csgr + Cssr);
Csdi = Csd * T3 * omega;
Csgi = Csg * T3 * omega;
Cssi = Css * T3 * omega;
Csbi = -(Csdi + Csgi + Cssi);
Cgdr = -(Cddr + Csdr + here->BSIM4v3cbdb);
Cggr = -(Cdgr + Csgr + here->BSIM4v3cbgb);
Cgsr = -(Cdsr + Cssr + here->BSIM4v3cbsb);
Cgbr = -(Cgdr + Cggr + Cgsr);
Cgdi = -(Cddi + Csdi);
Cggi = -(Cdgi + Csgi);
Cgsi = -(Cdsi + Cssi);
Cgbi = -(Cgdi + Cggi + Cgsi);
}
else /* QS */
{ gmr = here->BSIM4v3gm;
gmbsr = here->BSIM4v3gmbs;
gdsr = here->BSIM4v3gds;
gmi = gmbsi = gdsi = 0.0;
Cddr = here->BSIM4v3cddb;
Cdgr = here->BSIM4v3cdgb;
Cdsr = here->BSIM4v3cdsb;
Cdbr = -(Cddr + Cdgr + Cdsr);
Cddi = Cdgi = Cdsi = Cdbi = 0.0;
Csdr = Csd;
Csgr = Csg;
Cssr = Css;
Csbr = -(Csdr + Csgr + Cssr);
Csdi = Csgi = Cssi = Csbi = 0.0;
Cgdr = here->BSIM4v3cgdb;
Cggr = here->BSIM4v3cggb;
Cgsr = here->BSIM4v3cgsb;
Cgbr = -(Cgdr + Cggr + Cgsr);
Cgdi = Cggi = Cgsi = Cgbi = 0.0;
}
if (here->BSIM4v3mode >= 0)
{ Gmr = gmr;
Gmbsr = gmbsr;
FwdSumr = Gmr + Gmbsr;
RevSumr = 0.0;
Gmi = gmi;
Gmbsi = gmbsi;
FwdSumi = Gmi + Gmbsi;
RevSumi = 0.0;
gbbdp = -(here->BSIM4v3gbds);
gbbsp = here->BSIM4v3gbds + here->BSIM4v3gbgs + here->BSIM4v3gbbs;
gbdpg = here->BSIM4v3gbgs;
gbdpdp = here->BSIM4v3gbds;
gbdpb = here->BSIM4v3gbbs;
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
gbspdp = 0.0;
gbspg = 0.0;
gbspb = 0.0;
gbspsp = 0.0;
if (model->BSIM4v3igcMod)
{ gIstotg = here->BSIM4v3gIgsg + here->BSIM4v3gIgcsg;
gIstotd = here->BSIM4v3gIgcsd;
gIstots = here->BSIM4v3gIgss + here->BSIM4v3gIgcss;
gIstotb = here->BSIM4v3gIgcsb;
gIdtotg = here->BSIM4v3gIgdg + here->BSIM4v3gIgcdg;
gIdtotd = here->BSIM4v3gIgdd + here->BSIM4v3gIgcdd;
gIdtots = here->BSIM4v3gIgcds;
gIdtotb = here->BSIM4v3gIgcdb;
}
else
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0;
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0;
}
if (model->BSIM4v3igbMod)
{ gIbtotg = here->BSIM4v3gIgbg;
gIbtotd = here->BSIM4v3gIgbd;
gIbtots = here->BSIM4v3gIgbs;
gIbtotb = here->BSIM4v3gIgbb;
}
else
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0;
if ((model->BSIM4v3igcMod != 0) || (model->BSIM4v3igbMod != 0))
{ gIgtotg = gIstotg + gIdtotg + gIbtotg;
gIgtotd = gIstotd + gIdtotd + gIbtotd ;
gIgtots = gIstots + gIdtots + gIbtots;
gIgtotb = gIstotb + gIdtotb + gIbtotb;
}
else
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0;
if (here->BSIM4v3rgateMod == 2)
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vges)
- *(ckt->CKTstates[0] + here->BSIM4v3vgs);
else if (here->BSIM4v3rgateMod == 3)
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vgms)
- *(ckt->CKTstates[0] + here->BSIM4v3vgs);
if (here->BSIM4v3rgateMod > 1)
{ gcrgd = here->BSIM4v3gcrgd * T0;
gcrgg = here->BSIM4v3gcrgg * T0;
gcrgs = here->BSIM4v3gcrgs * T0;
gcrgb = here->BSIM4v3gcrgb * T0;
gcrgg -= here->BSIM4v3gcrg;
gcrg = here->BSIM4v3gcrg;
}
else
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0;
if (here->BSIM4v3rgateMod == 3)
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v3cgbo) * omega;
xcgmdb = -cgdo * omega;
xcgmsb = -cgso * omega;
xcgmbb = -pParam->BSIM4v3cgbo * omega;
xcdgmb = xcgmdb;
xcsgmb = xcgmsb;
xcbgmb = xcgmbb;
xcggbr = Cggr * omega;
xcgdbr = Cgdr * omega;
xcgsbr = Cgsr * omega;
xcgbbr = -(xcggbr + xcgdbr + xcgsbr);
xcdgbr = Cdgr * omega;
xcsgbr = Csgr * omega;
xcbgb = here->BSIM4v3cbgb * omega;
}
else
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v3cgbo ) * omega;
xcgdbr = (Cgdr - cgdo) * omega;
xcgsbr = (Cgsr - cgso) * omega;
xcgbbr = -(xcggbr + xcgdbr + xcgsbr);
xcdgbr = (Cdgr - cgdo) * omega;
xcsgbr = (Csgr - cgso) * omega;
xcbgb = (here->BSIM4v3cbgb - pParam->BSIM4v3cgbo) * omega;
xcdgmb = xcsgmb = xcbgmb = 0.0;
}
xcddbr = (Cddr + here->BSIM4v3capbd + cgdo) * omega;
xcdsbr = Cdsr * omega;
xcsdbr = Csdr * omega;
xcssbr = (here->BSIM4v3capbs + cgso + Cssr) * omega;
if (!here->BSIM4v3rbodyMod)
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb);
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb);
xcbdb = (here->BSIM4v3cbdb - here->BSIM4v3capbd) * omega;
xcbsb = (here->BSIM4v3cbsb - here->BSIM4v3capbs) * omega;
xcdbdb = 0.0;
}
else
{ xcdbbr = Cdbr * omega;
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb)
+ here->BSIM4v3capbs * omega;
xcbdb = here->BSIM4v3cbdb * omega;
xcbsb = here->BSIM4v3cbsb * omega;
xcdbdb = -here->BSIM4v3capbd * omega;
xcsbsb = -here->BSIM4v3capbs * omega;
}
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb);
xcdgbi = Cdgi;
xcsgbi = Csgi;
xcddbi = Cddi;
xcdsbi = Cdsi;
xcsdbi = Csdi;
xcssbi = Cssi;
xcdbbi = Cdbi;
xcsbbi = Csbi;
xcggbi = Cggi;
xcgdbi = Cgdi;
xcgsbi = Cgsi;
xcgbbi = Cgbi;
}
else /* Reverse mode */
{ Gmr = -gmr;
Gmbsr = -gmbsr;
FwdSumr = 0.0;
RevSumr = -(Gmr + Gmbsr);
Gmi = -gmi;
Gmbsi = -gmbsi;
FwdSumi = 0.0;
RevSumi = -(Gmi + Gmbsi);
gbbsp = -(here->BSIM4v3gbds);
gbbdp = here->BSIM4v3gbds + here->BSIM4v3gbgs + here->BSIM4v3gbbs;
gbdpg = 0.0;
gbdpsp = 0.0;
gbdpb = 0.0;
gbdpdp = 0.0;
gbspg = here->BSIM4v3gbgs;
gbspsp = here->BSIM4v3gbds;
gbspb = here->BSIM4v3gbbs;
gbspdp = -(gbspg + gbspsp + gbspb);
if (model->BSIM4v3igcMod)
{ gIstotg = here->BSIM4v3gIgsg + here->BSIM4v3gIgcdg;
gIstotd = here->BSIM4v3gIgcds;
gIstots = here->BSIM4v3gIgss + here->BSIM4v3gIgcdd;
gIstotb = here->BSIM4v3gIgcdb;
gIdtotg = here->BSIM4v3gIgdg + here->BSIM4v3gIgcsg;
gIdtotd = here->BSIM4v3gIgdd + here->BSIM4v3gIgcss;
gIdtots = here->BSIM4v3gIgcsd;
gIdtotb = here->BSIM4v3gIgcsb;
}
else
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0;
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0;
}
if (model->BSIM4v3igbMod)
{ gIbtotg = here->BSIM4v3gIgbg;
gIbtotd = here->BSIM4v3gIgbs;
gIbtots = here->BSIM4v3gIgbd;
gIbtotb = here->BSIM4v3gIgbb;
}
else
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0;
if ((model->BSIM4v3igcMod != 0) || (model->BSIM4v3igbMod != 0))
{ gIgtotg = gIstotg + gIdtotg + gIbtotg;
gIgtotd = gIstotd + gIdtotd + gIbtotd ;
gIgtots = gIstots + gIdtots + gIbtots;
gIgtotb = gIstotb + gIdtotb + gIbtotb;
}
else
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0;
if (here->BSIM4v3rgateMod == 2)
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vges)
- *(ckt->CKTstates[0] + here->BSIM4v3vgs);
else if (here->BSIM4v3rgateMod == 3)
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vgms)
- *(ckt->CKTstates[0] + here->BSIM4v3vgs);
if (here->BSIM4v3rgateMod > 1)
{ gcrgd = here->BSIM4v3gcrgs * T0;
gcrgg = here->BSIM4v3gcrgg * T0;
gcrgs = here->BSIM4v3gcrgd * T0;
gcrgb = here->BSIM4v3gcrgb * T0;
gcrgg -= here->BSIM4v3gcrg;
gcrg = here->BSIM4v3gcrg;
}
else
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0;
if (here->BSIM4v3rgateMod == 3)
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v3cgbo) * omega;
xcgmdb = -cgdo * omega;
xcgmsb = -cgso * omega;
xcgmbb = -pParam->BSIM4v3cgbo * omega;
xcdgmb = xcgmdb;
xcsgmb = xcgmsb;
xcbgmb = xcgmbb;
xcggbr = Cggr * omega;
xcgdbr = Cgsr * omega;
xcgsbr = Cgdr * omega;
xcgbbr = -(xcggbr + xcgdbr + xcgsbr);
xcdgbr = Csgr * omega;
xcsgbr = Cdgr * omega;
xcbgb = here->BSIM4v3cbgb * omega;
}
else
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v3cgbo ) * omega;
xcgdbr = (Cgsr - cgdo) * omega;
xcgsbr = (Cgdr - cgso) * omega;
xcgbbr = -(xcggbr + xcgdbr + xcgsbr);
xcdgbr = (Csgr - cgdo) * omega;
xcsgbr = (Cdgr - cgso) * omega;
xcbgb = (here->BSIM4v3cbgb - pParam->BSIM4v3cgbo) * omega;
xcdgmb = xcsgmb = xcbgmb = 0.0;
}
xcddbr = (here->BSIM4v3capbd + cgdo + Cssr) * omega;
xcdsbr = Csdr * omega;
xcsdbr = Cdsr * omega;
xcssbr = (Cddr + here->BSIM4v3capbs + cgso) * omega;
if (!here->BSIM4v3rbodyMod)
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb);
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb);
xcbdb = (here->BSIM4v3cbsb - here->BSIM4v3capbd) * omega;
xcbsb = (here->BSIM4v3cbdb - here->BSIM4v3capbs) * omega;
xcdbdb = 0.0;
}
else
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb)
+ here->BSIM4v3capbd * omega;
xcsbbr = Cdbr * omega;
xcbdb = here->BSIM4v3cbsb * omega;
xcbsb = here->BSIM4v3cbdb * omega;
xcdbdb = -here->BSIM4v3capbd * omega;
xcsbsb = -here->BSIM4v3capbs * omega;
}
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb);
xcdgbi = Csgi;
xcsgbi = Cdgi;
xcddbi = Cssi;
xcdsbi = Csdi;
xcsdbi = Cdsi;
xcssbi = Cddi;
xcdbbi = Csbi;
xcsbbi = Cdbi;
xcggbi = Cggi;
xcgdbi = Cgsi;
xcgsbi = Cgdi;
xcgbbi = Cgbi;
}
if (model->BSIM4v3rdsMod == 1)
{ gstot = here->BSIM4v3gstot;
gstotd = here->BSIM4v3gstotd;
gstotg = here->BSIM4v3gstotg;
gstots = here->BSIM4v3gstots - gstot;
gstotb = here->BSIM4v3gstotb;
gdtot = here->BSIM4v3gdtot;
gdtotd = here->BSIM4v3gdtotd - gdtot;
gdtotg = here->BSIM4v3gdtotg;
gdtots = here->BSIM4v3gdtots;
gdtotb = here->BSIM4v3gdtotb;
}
else
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0;
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0;
}
/*
* Loading AC matrix
*/
m = here->BSIM4v3m;
if (!model->BSIM4v3rdsMod)
{ gdpr = here->BSIM4v3drainConductance;
gspr = here->BSIM4v3sourceConductance;
}
else
gdpr = gspr = 0.0;
if (!here->BSIM4v3rbodyMod)
{ gjbd = here->BSIM4v3gbd;
gjbs = here->BSIM4v3gbs;
}
else
gjbd = gjbs = 0.0;
geltd = here->BSIM4v3grgeltd;
if (here->BSIM4v3rgateMod == 1)
{ *(here->BSIM4v3GEgePtr) += m * geltd;
*(here->BSIM4v3GPgePtr) -= m * geltd;
*(here->BSIM4v3GEgpPtr) -= m * geltd;
*(here->BSIM4v3GPgpPtr +1) += m * xcggbr;
*(here->BSIM4v3GPgpPtr) += m * (geltd + xcggbi + gIgtotg);
*(here->BSIM4v3GPdpPtr +1) += m * xcgdbr;
*(here->BSIM4v3GPdpPtr) += m * (xcgdbi + gIgtotd);
*(here->BSIM4v3GPspPtr +1) += m * xcgsbr;
*(here->BSIM4v3GPspPtr) += m * (xcgsbi + gIgtots);
*(here->BSIM4v3GPbpPtr +1) += m * xcgbbr;
*(here->BSIM4v3GPbpPtr) += m * (xcgbbi + gIgtotb);
} /* WDLiu: gcrg already subtracted from all gcrgg below */
else if (here->BSIM4v3rgateMod == 2)
{ *(here->BSIM4v3GEgePtr) += m * gcrg;
*(here->BSIM4v3GEgpPtr) += m * gcrgg;
*(here->BSIM4v3GEdpPtr) += m * gcrgd;
*(here->BSIM4v3GEspPtr) += m * gcrgs;
*(here->BSIM4v3GEbpPtr) += m * gcrgb;
*(here->BSIM4v3GPgePtr) -= m * gcrg;
*(here->BSIM4v3GPgpPtr +1) += m * xcggbr;
*(here->BSIM4v3GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg);
*(here->BSIM4v3GPdpPtr +1) += m * xcgdbr;
*(here->BSIM4v3GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd);
*(here->BSIM4v3GPspPtr +1) += m * xcgsbr;
*(here->BSIM4v3GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots);
*(here->BSIM4v3GPbpPtr +1) += m * xcgbbr;
*(here->BSIM4v3GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb);
}
else if (here->BSIM4v3rgateMod == 3)
{ *(here->BSIM4v3GEgePtr) += m * geltd;
*(here->BSIM4v3GEgmPtr) -= m * geltd;
*(here->BSIM4v3GMgePtr) -= m * geltd;
*(here->BSIM4v3GMgmPtr) += m * (geltd + gcrg);
*(here->BSIM4v3GMgmPtr +1) += m * xcgmgmb;
*(here->BSIM4v3GMdpPtr) += m * gcrgd;
*(here->BSIM4v3GMdpPtr +1) += m * xcgmdb;
*(here->BSIM4v3GMgpPtr) += m * gcrgg;
*(here->BSIM4v3GMspPtr) += m * gcrgs;
*(here->BSIM4v3GMspPtr +1) += m * xcgmsb;
*(here->BSIM4v3GMbpPtr) += m * gcrgb;
*(here->BSIM4v3GMbpPtr +1) += m * xcgmbb;
*(here->BSIM4v3DPgmPtr +1) += m * xcdgmb;
*(here->BSIM4v3GPgmPtr) -= m * gcrg;
*(here->BSIM4v3SPgmPtr +1) += m * xcsgmb;
*(here->BSIM4v3BPgmPtr +1) += m * xcbgmb;
*(here->BSIM4v3GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg);
*(here->BSIM4v3GPgpPtr +1) += m * xcggbr;
*(here->BSIM4v3GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd);
*(here->BSIM4v3GPdpPtr +1) += m * xcgdbr;
*(here->BSIM4v3GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots);
*(here->BSIM4v3GPspPtr +1) += m * xcgsbr;
*(here->BSIM4v3GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb);
*(here->BSIM4v3GPbpPtr +1) += m * xcgbbr;
}
else
{ *(here->BSIM4v3GPgpPtr +1) += m * xcggbr;
*(here->BSIM4v3GPgpPtr) += m * (xcggbi + gIgtotg);
*(here->BSIM4v3GPdpPtr +1) += m * xcgdbr;
*(here->BSIM4v3GPdpPtr) += m * (xcgdbi + gIgtotd);
*(here->BSIM4v3GPspPtr +1) += m * xcgsbr;
*(here->BSIM4v3GPspPtr) += m * (xcgsbi + gIgtots);
*(here->BSIM4v3GPbpPtr +1) += m * xcgbbr;
*(here->BSIM4v3GPbpPtr) += m * (xcgbbi + gIgtotb);
}
if (model->BSIM4v3rdsMod)
{ (*(here->BSIM4v3DgpPtr) += m * gdtotg);
(*(here->BSIM4v3DspPtr) += m * gdtots);
(*(here->BSIM4v3DbpPtr) += m * gdtotb);
(*(here->BSIM4v3SdpPtr) += m * gstotd);
(*(here->BSIM4v3SgpPtr) += m * gstotg);
(*(here->BSIM4v3SbpPtr) += m * gstotb);
}
*(here->BSIM4v3DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi);
*(here->BSIM4v3DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4v3gbd
- gdtotd + RevSumr + gbdpdp - gIdtotd);
*(here->BSIM4v3DPdPtr) -= m * (gdpr + gdtot);
*(here->BSIM4v3DPgpPtr +1) += m * (xcdgbr + Gmi);
*(here->BSIM4v3DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg);
*(here->BSIM4v3DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi);
*(here->BSIM4v3DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots);
*(here->BSIM4v3DPbpPtr +1) += m * (xcdbbr + Gmbsi);
*(here->BSIM4v3DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb);
*(here->BSIM4v3DdpPtr) -= m * (gdpr - gdtotd);
*(here->BSIM4v3DdPtr) += m * (gdpr + gdtot);
*(here->BSIM4v3SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi);
*(here->BSIM4v3SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd);
*(here->BSIM4v3SPgpPtr +1) += m * (xcsgbr - Gmi);
*(here->BSIM4v3SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg);
*(here->BSIM4v3SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi);
*(here->BSIM4v3SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4v3gbs
- gstots + FwdSumr + gbspsp - gIstots);
*(here->BSIM4v3SPsPtr) -= m * (gspr + gstot);
*(here->BSIM4v3SPbpPtr +1) += m * (xcsbbr - Gmbsi);
*(here->BSIM4v3SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb);
*(here->BSIM4v3SspPtr) -= m * (gspr - gstots);
*(here->BSIM4v3SsPtr) += m * (gspr + gstot);
*(here->BSIM4v3BPdpPtr +1) += m * xcbdb;
*(here->BSIM4v3BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd);
*(here->BSIM4v3BPgpPtr +1) += m * xcbgb;
*(here->BSIM4v3BPgpPtr) -= m * (here->BSIM4v3gbgs + gIbtotg);
*(here->BSIM4v3BPspPtr +1) += m * xcbsb;
*(here->BSIM4v3BPspPtr) -= m * (gjbs - gbbsp + gIbtots);
*(here->BSIM4v3BPbpPtr +1) += m * xcbbb;
*(here->BSIM4v3BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v3gbbs
- gIbtotb);
ggidld = here->BSIM4v3ggidld;
ggidlg = here->BSIM4v3ggidlg;
ggidlb = here->BSIM4v3ggidlb;
ggislg = here->BSIM4v3ggislg;
ggisls = here->BSIM4v3ggisls;
ggislb = here->BSIM4v3ggislb;
/* stamp gidl */
(*(here->BSIM4v3DPdpPtr) += m * ggidld);
(*(here->BSIM4v3DPgpPtr) += m * ggidlg);
(*(here->BSIM4v3DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb));
(*(here->BSIM4v3DPbpPtr) += m * ggidlb);
(*(here->BSIM4v3BPdpPtr) -= m * ggidld);
(*(here->BSIM4v3BPgpPtr) -= m * ggidlg);
(*(here->BSIM4v3BPspPtr) += m * ((ggidlg + ggidld) + ggidlb));
(*(here->BSIM4v3BPbpPtr) -= m * ggidlb);
/* stamp gisl */
(*(here->BSIM4v3SPdpPtr) -= m * ((ggisls + ggislg) + ggislb));
(*(here->BSIM4v3SPgpPtr) += m * ggislg);
(*(here->BSIM4v3SPspPtr) += m * ggisls);
(*(here->BSIM4v3SPbpPtr) += m * ggislb);
(*(here->BSIM4v3BPdpPtr) += m * ((ggislg + ggisls) + ggislb));
(*(here->BSIM4v3BPgpPtr) -= m * ggislg);
(*(here->BSIM4v3BPspPtr) -= m * ggisls);
(*(here->BSIM4v3BPbpPtr) -= m * ggislb);
if (here->BSIM4v3rbodyMod)
{ (*(here->BSIM4v3DPdbPtr +1) += m * xcdbdb);
(*(here->BSIM4v3DPdbPtr) -= m * here->BSIM4v3gbd);
(*(here->BSIM4v3SPsbPtr +1) += m * xcsbsb);
(*(here->BSIM4v3SPsbPtr) -= m * here->BSIM4v3gbs);
(*(here->BSIM4v3DBdpPtr +1) += m * xcdbdb);
(*(here->BSIM4v3DBdpPtr) -= m * here->BSIM4v3gbd);
(*(here->BSIM4v3DBdbPtr +1) -= m * xcdbdb);
(*(here->BSIM4v3DBdbPtr) += m * (here->BSIM4v3gbd + here->BSIM4v3grbpd
+ here->BSIM4v3grbdb));
(*(here->BSIM4v3DBbpPtr) -= m * here->BSIM4v3grbpd);
(*(here->BSIM4v3DBbPtr) -= m * here->BSIM4v3grbdb);
(*(here->BSIM4v3BPdbPtr) -= m * here->BSIM4v3grbpd);
(*(here->BSIM4v3BPbPtr) -= m * here->BSIM4v3grbpb);
(*(here->BSIM4v3BPsbPtr) -= m * here->BSIM4v3grbps);
(*(here->BSIM4v3BPbpPtr) += m * (here->BSIM4v3grbpd + here->BSIM4v3grbps
+ here->BSIM4v3grbpb));
/* WDLiu: (-here->BSIM4v3gbbs) already added to BPbpPtr */
(*(here->BSIM4v3SBspPtr +1) += m * xcsbsb);
(*(here->BSIM4v3SBspPtr) -= m * here->BSIM4v3gbs);
(*(here->BSIM4v3SBbpPtr) -= m * here->BSIM4v3grbps);
(*(here->BSIM4v3SBbPtr) -= m * here->BSIM4v3grbsb);
(*(here->BSIM4v3SBsbPtr +1) -= m * xcsbsb);
(*(here->BSIM4v3SBsbPtr) += m * (here->BSIM4v3gbs
+ here->BSIM4v3grbps + here->BSIM4v3grbsb));
(*(here->BSIM4v3BdbPtr) -= m * here->BSIM4v3grbdb);
(*(here->BSIM4v3BbpPtr) -= m * here->BSIM4v3grbpb);
(*(here->BSIM4v3BsbPtr) -= m * here->BSIM4v3grbsb);
(*(here->BSIM4v3BbPtr) += m * (here->BSIM4v3grbsb + here->BSIM4v3grbdb
+ here->BSIM4v3grbpb));
}
/*
* WDLiu: The internal charge node generated for transient NQS is not needed for
* AC NQS. The following is not doing a real job, but we have to keep it;
* otherwise a singular AC NQS matrix may occur if the transient NQS is on.
* The charge node is isolated from the instance.
*/
if (here->BSIM4v3trnqsMod)
{ (*(here->BSIM4v3QqPtr) += m * 1.0);
(*(here->BSIM4v3QgpPtr) += 0.0);
(*(here->BSIM4v3QdpPtr) += 0.0);
(*(here->BSIM4v3QspPtr) += 0.0);
(*(here->BSIM4v3QbpPtr) += 0.0);
(*(here->BSIM4v3DPqPtr) += 0.0);
(*(here->BSIM4v3SPqPtr) += 0.0);
(*(here->BSIM4v3GPqPtr) += 0.0);
}
}
}
return(OK);
}

View File

@ -1,354 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3ask.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 04/06/2001.
* Modified by Xuemei Xi, 10/05/2001.
* Modified by Xuemei Xi, 05/09/2003.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "ifsim.h"
#include "cktdefs.h"
#include "devdefs.h"
#include "bsim4v3def.h"
#include "sperror.h"
int
BSIM4v3ask(
CKTcircuit *ckt,
GENinstance *inst,
int which,
IFvalue *value,
IFvalue *select)
{
BSIM4v3instance *here = (BSIM4v3instance*)inst;
NG_IGNORE(select);
switch(which)
{ case BSIM4v3_L:
value->rValue = here->BSIM4v3l;
return(OK);
case BSIM4v3_W:
value->rValue = here->BSIM4v3w;
return(OK);
case BSIM4v3_M:
value->rValue = here->BSIM4v3m;
return(OK);
case BSIM4v3_NF:
value->rValue = here->BSIM4v3nf;
return(OK);
case BSIM4v3_MIN:
value->iValue = here->BSIM4v3min;
return(OK);
case BSIM4v3_AS:
value->rValue = here->BSIM4v3sourceArea;
return(OK);
case BSIM4v3_AD:
value->rValue = here->BSIM4v3drainArea;
return(OK);
case BSIM4v3_PS:
value->rValue = here->BSIM4v3sourcePerimeter;
return(OK);
case BSIM4v3_PD:
value->rValue = here->BSIM4v3drainPerimeter;
return(OK);
case BSIM4v3_NRS:
value->rValue = here->BSIM4v3sourceSquares;
return(OK);
case BSIM4v3_NRD:
value->rValue = here->BSIM4v3drainSquares;
return(OK);
case BSIM4v3_OFF:
value->rValue = here->BSIM4v3off;
return(OK);
case BSIM4v3_SA:
value->rValue = here->BSIM4v3sa ;
return(OK);
case BSIM4v3_SB:
value->rValue = here->BSIM4v3sb ;
return(OK);
case BSIM4v3_SD:
value->rValue = here->BSIM4v3sd ;
return(OK);
case BSIM4v3_RBSB:
value->rValue = here->BSIM4v3rbsb;
return(OK);
case BSIM4v3_RBDB:
value->rValue = here->BSIM4v3rbdb;
return(OK);
case BSIM4v3_RBPB:
value->rValue = here->BSIM4v3rbpb;
return(OK);
case BSIM4v3_RBPS:
value->rValue = here->BSIM4v3rbps;
return(OK);
case BSIM4v3_RBPD:
value->rValue = here->BSIM4v3rbpd;
return(OK);
case BSIM4v3_TRNQSMOD:
value->iValue = here->BSIM4v3trnqsMod;
return(OK);
case BSIM4v3_ACNQSMOD:
value->iValue = here->BSIM4v3acnqsMod;
return(OK);
case BSIM4v3_RBODYMOD:
value->iValue = here->BSIM4v3rbodyMod;
return(OK);
case BSIM4v3_RGATEMOD:
value->iValue = here->BSIM4v3rgateMod;
return(OK);
case BSIM4v3_GEOMOD:
value->iValue = here->BSIM4v3geoMod;
return(OK);
case BSIM4v3_RGEOMOD:
value->iValue = here->BSIM4v3rgeoMod;
return(OK);
case BSIM4v3_IC_VDS:
value->rValue = here->BSIM4v3icVDS;
return(OK);
case BSIM4v3_IC_VGS:
value->rValue = here->BSIM4v3icVGS;
return(OK);
case BSIM4v3_IC_VBS:
value->rValue = here->BSIM4v3icVBS;
return(OK);
case BSIM4v3_DNODE:
value->iValue = here->BSIM4v3dNode;
return(OK);
case BSIM4v3_GNODEEXT:
value->iValue = here->BSIM4v3gNodeExt;
return(OK);
case BSIM4v3_SNODE:
value->iValue = here->BSIM4v3sNode;
return(OK);
case BSIM4v3_BNODE:
value->iValue = here->BSIM4v3bNode;
return(OK);
case BSIM4v3_DNODEPRIME:
value->iValue = here->BSIM4v3dNodePrime;
return(OK);
case BSIM4v3_GNODEPRIME:
value->iValue = here->BSIM4v3gNodePrime;
return(OK);
case BSIM4v3_GNODEMID:
value->iValue = here->BSIM4v3gNodeMid;
return(OK);
case BSIM4v3_SNODEPRIME:
value->iValue = here->BSIM4v3sNodePrime;
return(OK);
case BSIM4v3_DBNODE:
value->iValue = here->BSIM4v3dbNode;
return(OK);
case BSIM4v3_BNODEPRIME:
value->iValue = here->BSIM4v3bNodePrime;
return(OK);
case BSIM4v3_SBNODE:
value->iValue = here->BSIM4v3sbNode;
return(OK);
case BSIM4v3_SOURCECONDUCT:
value->rValue = here->BSIM4v3sourceConductance;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_DRAINCONDUCT:
value->rValue = here->BSIM4v3drainConductance;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_VBD:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3vbd);
return(OK);
case BSIM4v3_VBS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3vbs);
return(OK);
case BSIM4v3_VGS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3vgs);
return(OK);
case BSIM4v3_VDS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3vds);
return(OK);
case BSIM4v3_CD:
value->rValue = here->BSIM4v3cd;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CBS:
value->rValue = here->BSIM4v3cbs;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CBD:
value->rValue = here->BSIM4v3cbd;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CSUB:
value->rValue = here->BSIM4v3csub;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_QINV:
value->rValue = here-> BSIM4v3qinv;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_IGIDL:
value->rValue = here->BSIM4v3Igidl;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_IGISL:
value->rValue = here->BSIM4v3Igisl;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_IGS:
value->rValue = here->BSIM4v3Igs;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_IGD:
value->rValue = here->BSIM4v3Igd;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_IGB:
value->rValue = here->BSIM4v3Igb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_IGCS:
value->rValue = here->BSIM4v3Igcs;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_IGCD:
value->rValue = here->BSIM4v3Igcd;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_GM:
value->rValue = here->BSIM4v3gm;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_GDS:
value->rValue = here->BSIM4v3gds;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_GMBS:
value->rValue = here->BSIM4v3gmbs;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_GBD:
value->rValue = here->BSIM4v3gbd;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_GBS:
value->rValue = here->BSIM4v3gbs;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_QB:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qb);
return(OK);
case BSIM4v3_CQB:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3cqb);
return(OK);
case BSIM4v3_QG:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qg);
return(OK);
case BSIM4v3_CQG:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3cqg);
return(OK);
case BSIM4v3_QD:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qd);
return(OK);
case BSIM4v3_CQD:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3cqd);
return(OK);
case BSIM4v3_QS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qs);
return(OK);
case BSIM4v3_CGGB:
value->rValue = here->BSIM4v3cggb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CGDB:
value->rValue = here->BSIM4v3cgdb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CGSB:
value->rValue = here->BSIM4v3cgsb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CDGB:
value->rValue = here->BSIM4v3cdgb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CDDB:
value->rValue = here->BSIM4v3cddb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CDSB:
value->rValue = here->BSIM4v3cdsb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CBGB:
value->rValue = here->BSIM4v3cbgb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CBDB:
value->rValue = here->BSIM4v3cbdb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CBSB:
value->rValue = here->BSIM4v3cbsb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CSGB:
value->rValue = here->BSIM4v3csgb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CSDB:
value->rValue = here->BSIM4v3csdb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CSSB:
value->rValue = here->BSIM4v3cssb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CGBB:
value->rValue = here->BSIM4v3cgbb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CDBB:
value->rValue = here->BSIM4v3cdbb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CSBB:
value->rValue = here->BSIM4v3csbb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CBBB:
value->rValue = here->BSIM4v3cbbb;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CAPBD:
value->rValue = here->BSIM4v3capbd;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_CAPBS:
value->rValue = here->BSIM4v3capbs;
value->rValue *= here->BSIM4v3m;
return(OK);
case BSIM4v3_VON:
value->rValue = here->BSIM4v3von;
return(OK);
case BSIM4v3_VDSAT:
value->rValue = here->BSIM4v3vdsat;
return(OK);
case BSIM4v3_QBS:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qbs);
return(OK);
case BSIM4v3_QBD:
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qbd);
return(OK);
default:
return(E_BADPARM);
}
/* NOTREACHED */
}

View File

@ -1,665 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3check.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 04/06/2001.
* Modified by Xuemei Xi, 10/05/2001.
* Modified by Xuemei Xi, 11/15/2002.
* Modified by Xuemei Xi, 05/09/2003.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "cktdefs.h"
#include "bsim4v3def.h"
#include "trandefs.h"
#include "const.h"
#include "sperror.h"
#include "devdefs.h"
int
BSIM4v3checkModel(
BSIM4v3model *model,
BSIM4v3instance *here,
CKTcircuit *ckt)
{
struct bsim4v3SizeDependParam *pParam;
int Fatal_Flag = 0;
FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("bsim4v3.out", "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "BSIM4v3: Berkeley Short Channel IGFET Model-4\n");
fprintf(fplog, "Developed by Xuemei (Jane) Xi, Jin He, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n");
fprintf(fplog, "\n");
fprintf(fplog, "++++++++++ BSIM4v3 PARAMETER CHECKING BELOW ++++++++++\n");
if (strcmp(model->BSIM4v3version, "4.3.0") != 0)
{ fprintf(fplog, "Warning: This model is BSIM4.3.0; you specified a wrong version number.\n");
printf("Warning: This model is BSIM4.3.0; you specified a wrong version number.\n");
}
fprintf(fplog, "Model = %s\n", model->BSIM4v3modName);
if ((here->BSIM4v3rgateMod == 2) || (here->BSIM4v3rgateMod == 3))
{ if ((here->BSIM4v3trnqsMod == 1) || (here->BSIM4v3acnqsMod == 1))
{ fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n");
printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n");
}
}
if (model->BSIM4v3toxe <= 0.0)
{ fprintf(fplog, "Fatal: Toxe = %g is not positive.\n",
model->BSIM4v3toxe);
printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v3toxe);
Fatal_Flag = 1;
}
if (model->BSIM4v3toxp <= 0.0)
{ fprintf(fplog, "Fatal: Toxp = %g is not positive.\n",
model->BSIM4v3toxp);
printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v3toxp);
Fatal_Flag = 1;
}
if (model->BSIM4v3toxm <= 0.0)
{ fprintf(fplog, "Fatal: Toxm = %g is not positive.\n",
model->BSIM4v3toxm);
printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v3toxm);
Fatal_Flag = 1;
}
if (model->BSIM4v3toxref <= 0.0)
{ fprintf(fplog, "Fatal: Toxref = %g is not positive.\n",
model->BSIM4v3toxref);
printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v3toxref);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3lpe0 < -pParam->BSIM4v3leff)
{ fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n",
pParam->BSIM4v3lpe0);
printf("Fatal: Lpe0 = %g is less than -Leff.\n",
pParam->BSIM4v3lpe0);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3lpeb < -pParam->BSIM4v3leff)
{ fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n",
pParam->BSIM4v3lpeb);
printf("Fatal: Lpeb = %g is less than -Leff.\n",
pParam->BSIM4v3lpeb);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3phin < -0.4)
{ fprintf(fplog, "Fatal: Phin = %g is less than -0.4.\n",
pParam->BSIM4v3phin);
printf("Fatal: Phin = %g is less than -0.4.\n",
pParam->BSIM4v3phin);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3ndep <= 0.0)
{ fprintf(fplog, "Fatal: Ndep = %g is not positive.\n",
pParam->BSIM4v3ndep);
printf("Fatal: Ndep = %g is not positive.\n",
pParam->BSIM4v3ndep);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3nsub <= 0.0)
{ fprintf(fplog, "Fatal: Nsub = %g is not positive.\n",
pParam->BSIM4v3nsub);
printf("Fatal: Nsub = %g is not positive.\n",
pParam->BSIM4v3nsub);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3ngate < 0.0)
{ fprintf(fplog, "Fatal: Ngate = %g is not positive.\n",
pParam->BSIM4v3ngate);
printf("Fatal: Ngate = %g Ngate is not positive.\n",
pParam->BSIM4v3ngate);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3ngate > 1.e25)
{ fprintf(fplog, "Fatal: Ngate = %g is too high.\n",
pParam->BSIM4v3ngate);
printf("Fatal: Ngate = %g Ngate is too high\n",
pParam->BSIM4v3ngate);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3xj <= 0.0)
{ fprintf(fplog, "Fatal: Xj = %g is not positive.\n",
pParam->BSIM4v3xj);
printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v3xj);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3dvt1 < 0.0)
{ fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n",
pParam->BSIM4v3dvt1);
printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v3dvt1);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3dvt1w < 0.0)
{ fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n",
pParam->BSIM4v3dvt1w);
printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v3dvt1w);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3w0 == -pParam->BSIM4v3weff)
{ 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->BSIM4v3dsub < 0.0)
{ fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v3dsub);
printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v3dsub);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3b1 == -pParam->BSIM4v3weff)
{ 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->BSIM4v3u0temp <= 0.0)
{ fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM4v3u0temp);
printf("Fatal: u0 at current temperature = %g is not positive.\n",
pParam->BSIM4v3u0temp);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3delta < 0.0)
{ fprintf(fplog, "Fatal: Delta = %g is less than zero.\n",
pParam->BSIM4v3delta);
printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v3delta);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3vsattemp <= 0.0)
{ fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM4v3vsattemp);
printf("Fatal: Vsat at current temperature = %g is not positive.\n",
pParam->BSIM4v3vsattemp);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3pclm <= 0.0)
{ fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v3pclm);
printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v3pclm);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3drout < 0.0)
{ fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v3drout);
printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v3drout);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3pscbe2 <= 0.0)
{ fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n",
pParam->BSIM4v3pscbe2);
printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v3pscbe2);
}
if (here->BSIM4v3nf < 1.0)
{ fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v3nf);
printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v3nf);
Fatal_Flag = 1;
}
if((here->BSIM4v3sa > 0.0) && (here->BSIM4v3sb > 0.0) &&
((here->BSIM4v3nf == 1.0) || ((here->BSIM4v3nf > 1.0) && (here->BSIM4v3sd > 0.0))) )
{ if (model->BSIM4v3saref <= 0.0)
{ fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4v3saref);
printf("Fatal: SAref = %g is not positive.\n",model->BSIM4v3saref);
Fatal_Flag = 1;
}
if (model->BSIM4v3sbref <= 0.0)
{ fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4v3sbref);
printf("Fatal: SBref = %g is not positive.\n",model->BSIM4v3sbref);
Fatal_Flag = 1;
}
if (model->BSIM4v3wlod < 0.0)
{ fprintf(fplog, "Warning: WLOD = %g is less than 0. Set to 0.0\n",model->BSIM4v3wlod);
printf("Warning: WLOD = %g is less than 0.\n",model->BSIM4v3wlod);
model->BSIM4v3wlod = 0.0;
}
if (model->BSIM4v3kvsat < -1.0 )
{ fprintf(fplog, "Warning: KVSAT = %g is too small; Reset to -1.0.\n",model->BSIM4v3kvsat);
printf("Warning: KVSAT = %g is is too small; Reset to -1.0.\n",model->BSIM4v3kvsat);
model->BSIM4v3kvsat = -1.0;
}
if (model->BSIM4v3kvsat > 1.0)
{ fprintf(fplog, "Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4v3kvsat);
printf("Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4v3kvsat);
model->BSIM4v3kvsat = 1.0;
}
if (model->BSIM4v3lodk2 <= 0.0)
{ fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4v3lodk2);
printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4v3lodk2);
}
if (model->BSIM4v3lodeta0 <= 0.0)
{ fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4v3lodeta0);
printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4v3lodeta0);
}
}
if ((here->BSIM4v3l + model->BSIM4v3xl) <= model->BSIM4v3xgl)
{ fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n");
printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n");
Fatal_Flag = 1;
}
if (model->BSIM4v3ngcon < 1.0)
{ fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n");
printf("Fatal: The parameter ngcon cannot be smaller than one.\n");
Fatal_Flag = 1;
}
if ((model->BSIM4v3ngcon != 1.0) && (model->BSIM4v3ngcon != 2.0))
{ model->BSIM4v3ngcon = 1.0;
fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n");
printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n");
}
if (model->BSIM4v3gbmin < 1.0e-20)
{ fprintf(fplog, "Warning: Gbmin = %g is too small.\n",
model->BSIM4v3gbmin);
printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v3gbmin);
}
if (pParam->BSIM4v3noff < 0.1)
{ fprintf(fplog, "Warning: Noff = %g is too small.\n",
pParam->BSIM4v3noff);
printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v3noff);
}
if (pParam->BSIM4v3voffcv < -0.5)
{ fprintf(fplog, "Warning: Voffcv = %g is too small.\n",
pParam->BSIM4v3voffcv);
printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v3voffcv);
}
/* Check capacitance parameters */
if (pParam->BSIM4v3clc < 0.0)
{ fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v3clc);
printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v3clc);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3moin < 5.0)
{ fprintf(fplog, "Warning: Moin = %g is too small.\n",
pParam->BSIM4v3moin);
printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v3moin);
}
if (pParam->BSIM4v3moin > 25.0)
{ fprintf(fplog, "Warning: Moin = %g is too large.\n",
pParam->BSIM4v3moin);
printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v3moin);
}
if(model->BSIM4v3capMod ==2) {
if (pParam->BSIM4v3acde < 0.1)
{ fprintf(fplog, "Warning: Acde = %g is too small.\n",
pParam->BSIM4v3acde);
printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v3acde);
}
if (pParam->BSIM4v3acde > 1.6)
{ fprintf(fplog, "Warning: Acde = %g is too large.\n",
pParam->BSIM4v3acde);
printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v3acde);
}
}
/* Check overlap capacitance parameters */
if (pParam->BSIM4v3ckappas < 0.02)
{ fprintf(fplog, "Warning: ckappas = %g is too small. Set to 0.02\n",
pParam->BSIM4v3ckappas);
printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4v3ckappas);
pParam->BSIM4v3ckappas = 0.02;
}
if (pParam->BSIM4v3ckappad < 0.02)
{ fprintf(fplog, "Warning: ckappad = %g is too small. Set to 0.02\n",
pParam->BSIM4v3ckappad);
printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4v3ckappad);
pParam->BSIM4v3ckappad = 0.02;
}
if (model->BSIM4v3paramChk ==1)
{
/* Check L and W parameters */
if (pParam->BSIM4v3leff <= 1.0e-9)
{ fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n",
pParam->BSIM4v3leff);
printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n",
pParam->BSIM4v3leff);
}
if (pParam->BSIM4v3leffCV <= 1.0e-9)
{ fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n",
pParam->BSIM4v3leffCV);
printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n",
pParam->BSIM4v3leffCV);
}
if (pParam->BSIM4v3weff <= 1.0e-9)
{ fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n",
pParam->BSIM4v3weff);
printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n",
pParam->BSIM4v3weff);
}
if (pParam->BSIM4v3weffCV <= 1.0e-9)
{ fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n",
pParam->BSIM4v3weffCV);
printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n",
pParam->BSIM4v3weffCV);
}
/* Check threshold voltage parameters */
if (model->BSIM4v3toxe < 1.0e-10)
{ fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n",
model->BSIM4v3toxe);
printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v3toxe);
}
if (model->BSIM4v3toxp < 1.0e-10)
{ fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n",
model->BSIM4v3toxp);
printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v3toxp);
}
if (model->BSIM4v3toxm < 1.0e-10)
{ fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n",
model->BSIM4v3toxm);
printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v3toxm);
}
if (pParam->BSIM4v3ndep <= 1.0e12)
{ fprintf(fplog, "Warning: Ndep = %g may be too small.\n",
pParam->BSIM4v3ndep);
printf("Warning: Ndep = %g may be too small.\n",
pParam->BSIM4v3ndep);
}
else if (pParam->BSIM4v3ndep >= 1.0e21)
{ fprintf(fplog, "Warning: Ndep = %g may be too large.\n",
pParam->BSIM4v3ndep);
printf("Warning: Ndep = %g may be too large.\n",
pParam->BSIM4v3ndep);
}
if (pParam->BSIM4v3nsub <= 1.0e14)
{ fprintf(fplog, "Warning: Nsub = %g may be too small.\n",
pParam->BSIM4v3nsub);
printf("Warning: Nsub = %g may be too small.\n",
pParam->BSIM4v3nsub);
}
else if (pParam->BSIM4v3nsub >= 1.0e21)
{ fprintf(fplog, "Warning: Nsub = %g may be too large.\n",
pParam->BSIM4v3nsub);
printf("Warning: Nsub = %g may be too large.\n",
pParam->BSIM4v3nsub);
}
if ((pParam->BSIM4v3ngate > 0.0) &&
(pParam->BSIM4v3ngate <= 1.e18))
{ fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n",
pParam->BSIM4v3ngate);
printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n",
pParam->BSIM4v3ngate);
}
if (pParam->BSIM4v3dvt0 < 0.0)
{ fprintf(fplog, "Warning: Dvt0 = %g is negative.\n",
pParam->BSIM4v3dvt0);
printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v3dvt0);
}
if (fabs(1.0e-6 / (pParam->BSIM4v3w0 + pParam->BSIM4v3weff)) > 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->BSIM4v3nfactor < 0.0)
{ fprintf(fplog, "Warning: Nfactor = %g is negative.\n",
pParam->BSIM4v3nfactor);
printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v3nfactor);
}
if (pParam->BSIM4v3cdsc < 0.0)
{ fprintf(fplog, "Warning: Cdsc = %g is negative.\n",
pParam->BSIM4v3cdsc);
printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v3cdsc);
}
if (pParam->BSIM4v3cdscd < 0.0)
{ fprintf(fplog, "Warning: Cdscd = %g is negative.\n",
pParam->BSIM4v3cdscd);
printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v3cdscd);
}
/* Check DIBL parameters */
if (pParam->BSIM4v3eta0 < 0.0)
{ fprintf(fplog, "Warning: Eta0 = %g is negative.\n",
pParam->BSIM4v3eta0);
printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM4v3eta0);
}
/* Check Abulk parameters */
if (fabs(1.0e-6 / (pParam->BSIM4v3b1 + pParam->BSIM4v3weff)) > 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->BSIM4v3a2 < 0.01)
{ fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v3a2);
printf("Warning: A2 = %g is too small. Set to 0.01.\n",
pParam->BSIM4v3a2);
pParam->BSIM4v3a2 = 0.01;
}
else if (pParam->BSIM4v3a2 > 1.0)
{ fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
pParam->BSIM4v3a2);
printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
pParam->BSIM4v3a2);
pParam->BSIM4v3a2 = 1.0;
pParam->BSIM4v3a1 = 0.0;
}
if (pParam->BSIM4v3prwg < 0.0)
{ fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n",
pParam->BSIM4v3prwg);
printf("Warning: Prwg = %g is negative. Set to zero.\n",
pParam->BSIM4v3prwg);
pParam->BSIM4v3prwg = 0.0;
}
if (pParam->BSIM4v3rdsw < 0.0)
{ fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n",
pParam->BSIM4v3rdsw);
printf("Warning: Rdsw = %g is negative. Set to zero.\n",
pParam->BSIM4v3rdsw);
pParam->BSIM4v3rdsw = 0.0;
pParam->BSIM4v3rds0 = 0.0;
}
if (pParam->BSIM4v3rds0 < 0.0)
{ fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n",
pParam->BSIM4v3rds0);
printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n",
pParam->BSIM4v3rds0);
pParam->BSIM4v3rds0 = 0.0;
}
if (pParam->BSIM4v3rdswmin < 0.0)
{ fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n",
pParam->BSIM4v3rdswmin);
printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n",
pParam->BSIM4v3rdswmin);
pParam->BSIM4v3rdswmin = 0.0;
}
if (pParam->BSIM4v3vsattemp < 1.0e3)
{ fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v3vsattemp);
printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v3vsattemp);
}
if((model->BSIM4v3lambdaGiven) && (pParam->BSIM4v3lambda > 0.0) )
{
if (pParam->BSIM4v3lambda > 1.0e-9)
{ fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4v3lambda);
printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4v3lambda);
}
}
if((model->BSIM4v3vtlGiven) && (pParam->BSIM4v3vtl > 0.0) )
{
if (pParam->BSIM4v3vtl < 6.0e4)
{ fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v3vtl);
printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v3vtl);
}
if (pParam->BSIM4v3xn < 3.0)
{ fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4v3xn);
printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4v3xn);
pParam->BSIM4v3xn = 3.0;
}
if (model->BSIM4v3lc < 0.0)
{ fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4v3lc);
printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4v3lc);
pParam->BSIM4v3lc = 0.0;
}
}
if (pParam->BSIM4v3fprout < 0.0)
{ fprintf(fplog, "Fatal: fprout = %g is negative.\n",
pParam->BSIM4v3fprout);
printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v3fprout);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3pdits < 0.0)
{ fprintf(fplog, "Fatal: pdits = %g is negative.\n",
pParam->BSIM4v3pdits);
printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v3pdits);
Fatal_Flag = 1;
}
if (model->BSIM4v3pditsl < 0.0)
{ fprintf(fplog, "Fatal: pditsl = %g is negative.\n",
model->BSIM4v3pditsl);
printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v3pditsl);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3pdibl1 < 0.0)
{ fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n",
pParam->BSIM4v3pdibl1);
printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v3pdibl1);
}
if (pParam->BSIM4v3pdibl2 < 0.0)
{ fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n",
pParam->BSIM4v3pdibl2);
printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v3pdibl2);
}
if (pParam->BSIM4v3nigbinv <= 0.0)
{ fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n",
pParam->BSIM4v3nigbinv);
printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v3nigbinv);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3nigbacc <= 0.0)
{ fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n",
pParam->BSIM4v3nigbacc);
printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v3nigbacc);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3nigc <= 0.0)
{ fprintf(fplog, "Fatal: nigc = %g is non-positive.\n",
pParam->BSIM4v3nigc);
printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v3nigc);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3poxedge <= 0.0)
{ fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n",
pParam->BSIM4v3poxedge);
printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v3poxedge);
Fatal_Flag = 1;
}
if (pParam->BSIM4v3pigcd <= 0.0)
{ fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n",
pParam->BSIM4v3pigcd);
printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v3pigcd);
Fatal_Flag = 1;
}
/* Check gate resistance parameters */
if (here->BSIM4v3rgateMod == 1)
{ if (model->BSIM4v3rshg <= 0.0)
printf("Warning: rshg should be positive for rgateMod = 1.\n");
}
else if (here->BSIM4v3rgateMod == 2)
{ if (model->BSIM4v3rshg <= 0.0)
printf("Warning: rshg <= 0.0 for rgateMod = 2.\n");
else if (pParam->BSIM4v3xrcrg1 <= 0.0)
printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n");
}
if (here->BSIM4v3rgateMod == 3)
{ if (model->BSIM4v3rshg <= 0.0)
printf("Warning: rshg should be positive for rgateMod = 3.\n");
else if (pParam->BSIM4v3xrcrg1 <= 0.0)
printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n");
}
/* Check overlap capacitance parameters */
if (model->BSIM4v3cgdo < 0.0)
{ fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v3cgdo);
printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v3cgdo);
model->BSIM4v3cgdo = 0.0;
}
if (model->BSIM4v3cgso < 0.0)
{ fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v3cgso);
printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v3cgso);
model->BSIM4v3cgso = 0.0;
}
if (model->BSIM4v3tnoia < 0.0)
{ fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v3tnoia);
printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v3tnoia);
model->BSIM4v3tnoia = 0.0;
}
if (model->BSIM4v3tnoib < 0.0)
{ fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v3tnoib);
printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v3tnoib);
model->BSIM4v3tnoib = 0.0;
}
if (model->BSIM4v3rnoia < 0.0)
{ fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v3rnoia);
printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v3rnoia);
model->BSIM4v3rnoia = 0.0;
}
if (model->BSIM4v3rnoib < 0.0)
{ fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v3rnoib);
printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v3rnoib);
model->BSIM4v3rnoib = 0.0;
}
if (model->BSIM4v3ntnoi < 0.0)
{ fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v3ntnoi);
printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v3ntnoi);
model->BSIM4v3ntnoi = 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);
}

View File

@ -1,201 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3cvtest.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 04/06/2001.
* Modified by Xuemei Xi, 10/05/2001.
* Modified by Xuemei Xi, 05/09/2003.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "cktdefs.h"
#include "bsim4v3def.h"
#include "trandefs.h"
#include "const.h"
#include "devdefs.h"
#include "sperror.h"
int
BSIM4v3convTest(
GENmodel *inModel,
CKTcircuit *ckt)
{
BSIM4v3model *model = (BSIM4v3model*)inModel;
BSIM4v3instance *here;
double delvbd, delvbs, delvds, delvgd, delvgs;
double delvdbd, delvsbs;
double delvbd_jct, delvbs_jct;
double vds, vgs, vgd, vgdo, vbs, vbd;
double vdbd, vdbs, vsbs;
double cbhat, cdhat, Idtot, Ibtot;
double vses, vdes, vdedo, delvses, delvded, delvdes;
double Isestot, cseshat, Idedtot, cdedhat;
double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat;
double tol0, tol1, tol2, tol3, tol4, tol5, tol6;
for (; model != NULL; model = model->BSIM4v3nextModel)
{ for (here = model->BSIM4v3instances; here != NULL ;
here=here->BSIM4v3nextInstance)
{
if (here->BSIM4v3owner != ARCHme) continue;
vds = model->BSIM4v3type
* (*(ckt->CKTrhsOld + here->BSIM4v3dNodePrime)
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime));
vgs = model->BSIM4v3type
* (*(ckt->CKTrhsOld + here->BSIM4v3gNodePrime)
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime));
vbs = model->BSIM4v3type
* (*(ckt->CKTrhsOld + here->BSIM4v3bNodePrime)
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime));
vdbs = model->BSIM4v3type
* (*(ckt->CKTrhsOld + here->BSIM4v3dbNode)
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime));
vsbs = model->BSIM4v3type
* (*(ckt->CKTrhsOld + here->BSIM4v3sbNode)
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime));
vses = model->BSIM4v3type
* (*(ckt->CKTrhsOld + here->BSIM4v3sNode)
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime));
vdes = model->BSIM4v3type
* (*(ckt->CKTrhsOld + here->BSIM4v3dNode)
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime));
vgdo = *(ckt->CKTstate0 + here->BSIM4v3vgs)
- *(ckt->CKTstate0 + here->BSIM4v3vds);
vbd = vbs - vds;
vdbd = vdbs - vds;
vgd = vgs - vds;
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v3vbd);
delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v3vdbd);
delvgd = vgd - vgdo;
delvds = vds - *(ckt->CKTstate0 + here->BSIM4v3vds);
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v3vgs);
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v3vbs);
delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v3vsbs);
delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v3vses));
vdedo = *(ckt->CKTstate0 + here->BSIM4v3vdes)
- *(ckt->CKTstate0 + here->BSIM4v3vds);
delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v3vdes);
delvded = vdes - vds - vdedo;
delvbd_jct = (!here->BSIM4v3rbodyMod) ? delvbd : delvdbd;
delvbs_jct = (!here->BSIM4v3rbodyMod) ? delvbs : delvsbs;
if (here->BSIM4v3mode >= 0)
{ Idtot = here->BSIM4v3cd + here->BSIM4v3csub - here->BSIM4v3cbd
+ here->BSIM4v3Igidl;
cdhat = Idtot - here->BSIM4v3gbd * delvbd_jct
+ (here->BSIM4v3gmbs + here->BSIM4v3gbbs + here->BSIM4v3ggidlb) * delvbs
+ (here->BSIM4v3gm + here->BSIM4v3gbgs + here->BSIM4v3ggidlg) * delvgs
+ (here->BSIM4v3gds + here->BSIM4v3gbds + here->BSIM4v3ggidld) * delvds;
Igstot = here->BSIM4v3Igs + here->BSIM4v3Igcs;
cgshat = Igstot + (here->BSIM4v3gIgsg + here->BSIM4v3gIgcsg) * delvgs
+ here->BSIM4v3gIgcsd * delvds + here->BSIM4v3gIgcsb * delvbs;
Igdtot = here->BSIM4v3Igd + here->BSIM4v3Igcd;
cgdhat = Igdtot + here->BSIM4v3gIgdg * delvgd + here->BSIM4v3gIgcdg * delvgs
+ here->BSIM4v3gIgcdd * delvds + here->BSIM4v3gIgcdb * delvbs;
Igbtot = here->BSIM4v3Igb;
cgbhat = here->BSIM4v3Igb + here->BSIM4v3gIgbg * delvgs + here->BSIM4v3gIgbd
* delvds + here->BSIM4v3gIgbb * delvbs;
}
else
{ Idtot = here->BSIM4v3cd + here->BSIM4v3cbd - here->BSIM4v3Igidl; /* bugfix */
cdhat = Idtot + here->BSIM4v3gbd * delvbd_jct + here->BSIM4v3gmbs
* delvbd + here->BSIM4v3gm * delvgd
- (here->BSIM4v3gds + here->BSIM4v3ggidls) * delvds
- here->BSIM4v3ggidlg * delvgs - here->BSIM4v3ggidlb * delvbs;
Igstot = here->BSIM4v3Igs + here->BSIM4v3Igcd;
cgshat = Igstot + here->BSIM4v3gIgsg * delvgs + here->BSIM4v3gIgcdg * delvgd
- here->BSIM4v3gIgcdd * delvds + here->BSIM4v3gIgcdb * delvbd;
Igdtot = here->BSIM4v3Igd + here->BSIM4v3Igcs;
cgdhat = Igdtot + (here->BSIM4v3gIgdg + here->BSIM4v3gIgcsg) * delvgd
- here->BSIM4v3gIgcsd * delvds + here->BSIM4v3gIgcsb * delvbd;
Igbtot = here->BSIM4v3Igb;
cgbhat = here->BSIM4v3Igb + here->BSIM4v3gIgbg * delvgd - here->BSIM4v3gIgbd
* delvds + here->BSIM4v3gIgbb * delvbd;
}
Isestot = here->BSIM4v3gstot * (*(ckt->CKTstate0 + here->BSIM4v3vses));
cseshat = Isestot + here->BSIM4v3gstot * delvses
+ here->BSIM4v3gstotd * delvds + here->BSIM4v3gstotg * delvgs
+ here->BSIM4v3gstotb * delvbs;
Idedtot = here->BSIM4v3gdtot * vdedo;
cdedhat = Idedtot + here->BSIM4v3gdtot * delvded
+ here->BSIM4v3gdtotd * delvds + here->BSIM4v3gdtotg * delvgs
+ here->BSIM4v3gdtotb * delvbs;
/*
* Check convergence
*/
if ((here->BSIM4v3off == 0) || (!(ckt->CKTmode & MODEINITFIX)))
{ tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot))
+ ckt->CKTabstol;
tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot))
+ ckt->CKTabstol;
tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot))
+ ckt->CKTabstol;
tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot))
+ ckt->CKTabstol;
tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot))
+ ckt->CKTabstol;
tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot))
+ ckt->CKTabstol;
if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1)
|| (fabs(cdedhat - Idedtot) >= tol2))
{ ckt->CKTnoncon++;
return(OK);
}
if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4)
|| (fabs(cgbhat - Igbtot) >= tol5))
{ ckt->CKTnoncon++;
return(OK);
}
Ibtot = here->BSIM4v3cbs + here->BSIM4v3cbd
- here->BSIM4v3Igidl - here->BSIM4v3Igisl - here->BSIM4v3csub;
if (here->BSIM4v3mode >= 0)
{ cbhat = Ibtot + here->BSIM4v3gbd * delvbd_jct
+ here->BSIM4v3gbs * delvbs_jct - (here->BSIM4v3gbbs + here->BSIM4v3ggidlb)
* delvbs - (here->BSIM4v3gbgs + here->BSIM4v3ggidlg) * delvgs
- (here->BSIM4v3gbds + here->BSIM4v3ggidld) * delvds
- here->BSIM4v3ggislg * delvgd - here->BSIM4v3ggislb* delvbd + here->BSIM4v3ggisls * delvds ;
}
else
{ cbhat = Ibtot + here->BSIM4v3gbs * delvbs_jct + here->BSIM4v3gbd
* delvbd_jct - (here->BSIM4v3gbbs + here->BSIM4v3ggislb) * delvbd
- (here->BSIM4v3gbgs + here->BSIM4v3ggislg) * delvgd
+ (here->BSIM4v3gbds + here->BSIM4v3ggisld - here->BSIM4v3ggidls) * delvds
- here->BSIM4v3ggidlg * delvgs - here->BSIM4v3ggidlb * delvbs;
}
tol6 = ckt->CKTreltol * MAX(fabs(cbhat),
fabs(Ibtot)) + ckt->CKTabstol;
if (fabs(cbhat - Ibtot) > tol6)
{ ckt->CKTnoncon++;
return(OK);
}
}
}
}
return(OK);
}

View File

@ -1,41 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3del.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include "bsim4v3def.h"
#include "sperror.h"
#include "gendefs.h"
int
BSIM4v3delete(
GENmodel *inModel,
IFuid name,
GENinstance **inInst)
{
BSIM4v3instance **fast = (BSIM4v3instance**)inInst;
BSIM4v3model *model = (BSIM4v3model*)inModel;
BSIM4v3instance **prev = NULL;
BSIM4v3instance *here;
for (; model ; model = model->BSIM4v3nextModel)
{ prev = &(model->BSIM4v3instances);
for (here = *prev; here ; here = *prev)
{ if (here->BSIM4v3name == name || (fast && here==*fast))
{ *prev= here->BSIM4v3nextInstance;
FREE(here);
return(OK);
}
prev = &(here->BSIM4v3nextInstance);
}
}
return(E_NODEV);
}

View File

@ -1,38 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3dest.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include "bsim4v3def.h"
void
BSIM4v3destroy(
GENmodel **inModel)
{
BSIM4v3model **model = (BSIM4v3model**)inModel;
BSIM4v3instance *here;
BSIM4v3instance *prev = NULL;
BSIM4v3model *mod = *model;
BSIM4v3model *oldmod = NULL;
for (; mod ; mod = mod->BSIM4v3nextModel)
{ if(oldmod) FREE(oldmod);
oldmod = mod;
prev = NULL;
for (here = mod->BSIM4v3instances; here; here = here->BSIM4v3nextInstance)
{ if(prev) FREE(prev);
prev = here;
}
if(prev) FREE(prev);
}
if(oldmod) FREE(oldmod);
*model = NULL;
return;
}

View File

@ -1,399 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3geo.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "bsim4v3def.h"
int
BSIM4v3RdsEndIso(double, double, double, double, double, double, int, int, double *);
int
BSIM4v3RdsEndSha(double, double, double, double, double, double, int, int, double *);
/*
* WDLiu:
* This subrutine is a special module to process the geometry dependent
* parasitics for BSIM4v3, which calculates Ps, Pd, As, Ad, and Rs and Rd
* for multi-fingers and varous GEO and RGEO options.
*/
static int
BSIM4v3NumFingerDiff(
double nf,
int minSD,
double *nuIntD, double *nuEndD, double *nuIntS, double *nuEndS)
{
int NF;
NF = (int)nf;
if ((NF%2) != 0)
{ *nuEndD = *nuEndS = 1.0;
*nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0);
}
else
{ if (minSD == 1) /* minimize # of source */
{ *nuEndD = 2.0;
*nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0);
*nuEndS = 0.0;
*nuIntS = nf;
}
else
{ *nuEndD = 0.0;
*nuIntD = nf;
*nuEndS = 2.0;
*nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0);
}
}
return 0;
}
int
BSIM4v3PAeffGeo(
double nf,
int geo, int minSD,
double Weffcj, double DMCG, double DMCI, double DMDG,
double *Ps, double *Pd, double *As, double *Ad)
{
double T0, T1, T2;
double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer;
double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer;
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0;
if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */
BSIM4v3NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS);
T0 = DMCG + DMCI;
T1 = DMCG + DMCG;
T2 = DMDG + DMDG;
PSiso = PDiso = T0 + T0 + Weffcj;
PSsha = PDsha = T1;
PSmer = PDmer = T2;
ASiso = ADiso = T0 * Weffcj;
ASsha = ADsha = DMCG * Weffcj;
ASmer = ADmer = DMDG * Weffcj;
switch(geo)
{ case 0:
*Ps = nuEndS * PSiso + nuIntS * PSsha;
*Pd = nuEndD * PDiso + nuIntD * PDsha;
*As = nuEndS * ASiso + nuIntS * ASsha;
*Ad = nuEndD * ADiso + nuIntD * ADsha;
break;
case 1:
*Ps = nuEndS * PSiso + nuIntS * PSsha;
*Pd = (nuEndD + nuIntD) * PDsha;
*As = nuEndS * ASiso + nuIntS * ASsha;
*Ad = (nuEndD + nuIntD) * ADsha;
break;
case 2:
*Ps = (nuEndS + nuIntS) * PSsha;
*Pd = nuEndD * PDiso + nuIntD * PDsha;
*As = (nuEndS + nuIntS) * ASsha;
*Ad = nuEndD * ADiso + nuIntD * ADsha;
break;
case 3:
*Ps = (nuEndS + nuIntS) * PSsha;
*Pd = (nuEndD + nuIntD) * PDsha;
*As = (nuEndS + nuIntS) * ASsha;
*Ad = (nuEndD + nuIntD) * ADsha;
break;
case 4:
*Ps = nuEndS * PSiso + nuIntS * PSsha;
*Pd = nuEndD * PDmer + nuIntD * PDsha;
*As = nuEndS * ASiso + nuIntS * ASsha;
*Ad = nuEndD * ADmer + nuIntD * ADsha;
break;
case 5:
*Ps = (nuEndS + nuIntS) * PSsha;
*Pd = nuEndD * PDmer + nuIntD * PDsha;
*As = (nuEndS + nuIntS) * ASsha;
*Ad = nuEndD * ADmer + nuIntD * ADsha;
break;
case 6:
*Ps = nuEndS * PSmer + nuIntS * PSsha;
*Pd = nuEndD * PDiso + nuIntD * PDsha;
*As = nuEndS * ASmer + nuIntS * ASsha;
*Ad = nuEndD * ADiso + nuIntD * ADsha;
break;
case 7:
*Ps = nuEndS * PSmer + nuIntS * PSsha;
*Pd = (nuEndD + nuIntD) * PDsha;
*As = nuEndS * ASmer + nuIntS * ASsha;
*Ad = (nuEndD + nuIntD) * ADsha;
break;
case 8:
*Ps = nuEndS * PSmer + nuIntS * PSsha;
*Pd = nuEndD * PDmer + nuIntD * PDsha;
*As = nuEndS * ASmer + nuIntS * ASsha;
*Ad = nuEndD * ADmer + nuIntD * ADsha;
break;
case 9: /* geo = 9 and 10 happen only when nf = even */
*Ps = PSiso + (nf - 1.0) * PSsha;
*Pd = nf * PDsha;
*As = ASiso + (nf - 1.0) * ASsha;
*Ad = nf * ADsha;
break;
case 10:
*Ps = nf * PSsha;
*Pd = PDiso + (nf - 1.0) * PDsha;
*As = nf * ASsha;
*Ad = ADiso + (nf - 1.0) * ADsha;
break;
default:
printf("Warning: Specified GEO = %d not matched\n", geo);
}
return 0;
}
int
BSIM4v3RdseffGeo(
double nf,
int geo, int rgeo, int minSD,
double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG,
int Type,
double *Rtot)
{
double Rint=0.0, Rend = 0.0;
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0;
if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */
{ BSIM4v3NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS);
/* Internal S/D resistance -- assume shared S or D and all wide contacts */
if (Type == 1)
{ if (nuIntS == 0.0)
Rint = 0.0;
else
Rint = Rsh * DMCG / ( Weffcj * nuIntS);
}
else
{ if (nuIntD == 0.0)
Rint = 0.0;
else
Rint = Rsh * DMCG / ( Weffcj * nuIntD);
}
}
/* End S/D resistance -- geo dependent */
switch(geo)
{ case 0:
if (Type == 1) BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 1:
if (Type == 1) BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 2:
if (Type == 1) BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 3:
if (Type == 1) BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 4:
if (Type == 1) BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else Rend = Rsh * DMDG / Weffcj;
break;
case 5:
if (Type == 1) BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndS, rgeo, 1, &Rend);
else Rend = Rsh * DMDG / (Weffcj * nuEndD);
break;
case 6:
if (Type == 1) Rend = Rsh * DMDG / Weffcj;
else BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 7:
if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS);
else BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG,
nuEndD, rgeo, 0, &Rend);
break;
case 8:
Rend = Rsh * DMDG / Weffcj;
break;
case 9: /* all wide contacts assumed for geo = 9 and 10 */
if (Type == 1)
{ Rend = 0.5 * Rsh * DMCG / Weffcj;
if (nf == 2.0)
Rint = 0.0;
else
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0));
}
else
{ Rend = 0.0;
Rint = Rsh * DMCG / (Weffcj * nf);
}
break;
case 10:
if (Type == 1)
{ Rend = 0.0;
Rint = Rsh * DMCG / (Weffcj * nf);
}
else
{ Rend = 0.5 * Rsh * DMCG / Weffcj;;
if (nf == 2.0)
Rint = 0.0;
else
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0));
}
break;
default:
printf("Warning: Specified GEO = %d not matched\n", geo);
}
if (Rint <= 0.0)
*Rtot = Rend;
else if (Rend <= 0.0)
*Rtot = Rint;
else
*Rtot = Rint * Rend / (Rint + Rend);
if(*Rtot==0.0)
printf("Warning: Zero resistance returned from RdseffGeo\n");
return 0;
}
int
BSIM4v3RdsEndIso(
double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG,
double nuEnd,
int rgeo, int Type,
double *Rend)
{
NG_IGNORE(DMDG);
if (Type == 1)
{ switch(rgeo)
{ case 1:
case 2:
case 5:
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * DMCG / (Weffcj * nuEnd);
break;
case 3:
case 4:
case 6:
if ((DMCG + DMCI) == 0.0)
printf("(DMCG + DMCI) can not be equal to zero\n");
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI));
break;
default:
printf("Warning: Specified RGEO = %d not matched\n", rgeo);
}
}
else
{ switch(rgeo)
{ case 1:
case 3:
case 7:
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * DMCG / (Weffcj * nuEnd);
break;
case 2:
case 4:
case 8:
if ((DMCG + DMCI) == 0.0)
printf("(DMCG + DMCI) can not be equal to zero\n");
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI));
break;
default:
printf("Warning: Specified RGEO = %d not matched\n", rgeo);
}
}
return 0;
}
int
BSIM4v3RdsEndSha(
double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG,
double nuEnd,
int rgeo, int Type,
double *Rend)
{
NG_IGNORE(DMCI);
NG_IGNORE(DMDG);
if (Type == 1)
{ switch(rgeo)
{ case 1:
case 2:
case 5:
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * DMCG / (Weffcj * nuEnd);
break;
case 3:
case 4:
case 6:
if (DMCG == 0.0)
printf("DMCG can not be equal to zero\n");
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG);
break;
default:
printf("Warning: Specified RGEO = %d not matched\n", rgeo);
}
}
else
{ switch(rgeo)
{ case 1:
case 3:
case 7:
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * DMCG / (Weffcj * nuEnd);
break;
case 2:
case 4:
case 8:
if (DMCG == 0.0)
printf("DMCG can not be equal to zero\n");
if (nuEnd == 0.0)
*Rend = 0.0;
else
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG);
break;
default:
printf("Warning: Specified RGEO = %d not matched\n", rgeo);
}
}
return 0;
}

View File

@ -1,44 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3getic.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "bsim4v3def.h"
#include "sperror.h"
int
BSIM4v3getic(
GENmodel *inModel,
CKTcircuit *ckt)
{
BSIM4v3model *model = (BSIM4v3model*)inModel;
BSIM4v3instance *here;
for (; model ; model = model->BSIM4v3nextModel)
{ for (here = model->BSIM4v3instances; here; here = here->BSIM4v3nextInstance)
{ if (here->BSIM4v3owner != ARCHme) continue;
if (!here->BSIM4v3icVDSGiven)
{ here->BSIM4v3icVDS = *(ckt->CKTrhs + here->BSIM4v3dNode)
- *(ckt->CKTrhs + here->BSIM4v3sNode);
}
if (!here->BSIM4v3icVGSGiven)
{ here->BSIM4v3icVGS = *(ckt->CKTrhs + here->BSIM4v3gNodeExt)
- *(ckt->CKTrhs + here->BSIM4v3sNode);
}
if(!here->BSIM4v3icVBSGiven)
{ here->BSIM4v3icVBS = *(ckt->CKTrhs + here->BSIM4v3bNode)
- *(ckt->CKTrhs + here->BSIM4v3sNode);
}
}
}
return(OK);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3mdel.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include "bsim4v3def.h"
#include "sperror.h"
int
BSIM4v3mDelete(
GENmodel **inModel,
IFuid modname,
GENmodel *kill)
{
BSIM4v3model **model = (BSIM4v3model**)inModel;
BSIM4v3model *modfast = (BSIM4v3model*)kill;
BSIM4v3instance *here;
BSIM4v3instance *prev = NULL;
BSIM4v3model **oldmod;
oldmod = model;
for (; *model ; model = &((*model)->BSIM4v3nextModel))
{ if ((*model)->BSIM4v3modName == modname ||
(modfast && *model == modfast))
goto delgot;
oldmod = model;
}
return(E_NOMOD);
delgot:
*oldmod = (*model)->BSIM4v3nextModel; /* cut deleted device out of list */
for (here = (*model)->BSIM4v3instances; here; here = here->BSIM4v3nextInstance)
{ if(prev) FREE(prev);
prev = here;
}
if(prev) FREE(prev);
FREE(*model);
return(OK);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,476 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3noi.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 04/06/2001.
* Modified by Xuemei Xi, 10/05/2001.
* Modified by Xuemei Xi, 11/15/2002.
* Modified by Xuemei Xi, 05/09/2003.
**********/
#include "ngspice.h"
#include "bsim4v3def.h"
#include "cktdefs.h"
#include "iferrmsg.h"
#include "noisedef.h"
#include "const.h"
/*
* WDL: 1/f noise model has been smoothed out and enhanced with
* bulk charge effect as well as physical N* equ. and necessary
* conversion into the SI unit system.
*/
static double
BSIM4v3Eval1ovFNoise(
double Vds,
BSIM4v3model *model,
BSIM4v3instance *here,
double freq, double temp)
{
struct bsim4v3SizeDependParam *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->BSIM4v3cd);
esat = 2.0 * pParam->BSIM4v3vsattemp / here->BSIM4v3ueff;
if(model->BSIM4v3em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */
else {
T0 = ((((Vds - here->BSIM4v3Vdseff) / pParam->BSIM4v3litl)
+ model->BSIM4v3em) / esat);
DelClm = pParam->BSIM4v3litl * log (MAX(T0, N_MINLOG));
}
EffFreq = pow(freq, model->BSIM4v3ef);
T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v3ueff;
T2 = 1.0e10 * EffFreq * here->BSIM4v3Abulk * model->BSIM4v3coxe
* pParam->BSIM4v3leff * pParam->BSIM4v3leff;
N0 = model->BSIM4v3coxe * here->BSIM4v3Vgsteff / CHARGE;
Nl = model->BSIM4v3coxe * here->BSIM4v3Vgsteff
* (1.0 - here->BSIM4v3AbovVgst2Vtm * here->BSIM4v3Vdseff) / CHARGE;
T3 = model->BSIM4v3oxideTrapDensityA
* log(MAX(((N0 + here->BSIM4v3nstar) / (Nl + here->BSIM4v3nstar)), N_MINLOG));
T4 = model->BSIM4v3oxideTrapDensityB * (N0 - Nl);
T5 = model->BSIM4v3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
T6 = CONSTboltz * temp * cd * cd;
T7 = 1.0e10 * EffFreq * pParam->BSIM4v3leff
* pParam->BSIM4v3leff * pParam->BSIM4v3weff;
T8 = model->BSIM4v3oxideTrapDensityA + model->BSIM4v3oxideTrapDensityB * Nl
+ model->BSIM4v3oxideTrapDensityC * Nl * Nl;
T9 = (Nl + here->BSIM4v3nstar) * (Nl + here->BSIM4v3nstar);
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
return Ssi;
}
int
BSIM4v3noise (
int mode, int operation,
GENmodel *inModel,
CKTcircuit *ckt,
Ndata *data,
double *OnDens)
{
BSIM4v3model *model = (BSIM4v3model *)inModel;
BSIM4v3instance *here;
struct bsim4v3SizeDependParam *pParam;
char name[N_MXVLNTH];
double tempOnoise;
double tempInoise;
double noizDens[BSIM4v3NSRCS];
double lnNdens[BSIM4v3NSRCS];
double T0, T1, T2, T5, T10, T11;
double Vds, Ssi, Swi;
double tmp=0.0, gdpr, gspr, npart_theta=0.0, npart_beta=0.0, igsquare;
double m;
int i;
/* define the names of the noise sources */
static char *BSIM4v3nNames[BSIM4v3NSRCS] =
{ /* Note that we have to keep the order */
".rd", /* noise due to rd */
".rs", /* noise due to rs */
".rg", /* noise due to rgeltd */
".rbps", /* noise due to rbps */
".rbpd", /* noise due to rbpd */
".rbpb", /* noise due to rbpb */
".rbsb", /* noise due to rbsb */
".rbdb", /* noise due to rbdb */
".id", /* noise due to id */
".1overf", /* flicker (1/f) noise */
".igs", /* shot noise due to IGS */
".igd", /* shot noise due to IGD */
".igb", /* shot noise due to IGB */
"" /* total transistor noise */
};
for (; model != NULL; model = model->BSIM4v3nextModel)
{ for (here = model->BSIM4v3instances; here != NULL;
here = here->BSIM4v3nextInstance)
{ 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 < BSIM4v3NSRCS; i++)
{ (void) sprintf(name, "onoise.%s%s",
here->BSIM4v3name,
BSIM4v3nNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);
SPfrontEnd->IFnewUid (ckt,
&(data->namelist[data->numPlots++]),
NULL, name, UID_OTHER,
NULL);
/* we've added one more plot */
}
break;
case INT_NOIZ:
for (i = 0; i < BSIM4v3NSRCS; i++)
{ (void) sprintf(name, "onoise_total.%s%s",
here->BSIM4v3name,
BSIM4v3nNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);
SPfrontEnd->IFnewUid (ckt,
&(data->namelist[data->numPlots++]),
NULL, name, UID_OTHER,
NULL);
/* we've added one more plot */
(void) sprintf(name, "inoise_total.%s%s",
here->BSIM4v3name,
BSIM4v3nNames[i]);
data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1);
if (!data->namelist)
return(E_NOMEM);
SPfrontEnd->IFnewUid (ckt,
&(data->namelist[data->numPlots++]),
NULL, name, UID_OTHER,
NULL);
/* we've added one more plot */
}
break;
}
}
break;
case N_CALC:
m = here->BSIM4v3m;
switch (mode)
{ case N_DENS:
if (model->BSIM4v3tnoiMod == 0)
{ if (model->BSIM4v3rdsMod == 0)
{ gspr = here->BSIM4v3sourceConductance;
gdpr = here->BSIM4v3drainConductance;
if (here->BSIM4v3grdsw > 0.0)
tmp = 1.0 / here->BSIM4v3grdsw; /* tmp used below */
else
tmp = 0.0;
}
else
{ gspr = here->BSIM4v3gstot;
gdpr = here->BSIM4v3gdtot;
tmp = 0.0;
}
}
else
{ T5 = here->BSIM4v3Vgsteff / here->BSIM4v3EsatL;
T5 *= T5;
npart_beta = model->BSIM4v3rnoia * (1.0 + T5
* model->BSIM4v3tnoia * pParam->BSIM4v3leff);
npart_theta = model->BSIM4v3rnoib * (1.0 + T5
* model->BSIM4v3tnoib * pParam->BSIM4v3leff);
if (model->BSIM4v3rdsMod == 0)
{ gspr = here->BSIM4v3sourceConductance;
gdpr = here->BSIM4v3drainConductance;
}
else
{ gspr = here->BSIM4v3gstot;
gdpr = here->BSIM4v3gdtot;
}
if ((*(ckt->CKTstates[0] + here->BSIM4v3vds)) >= 0.0)
gspr = gspr / (1.0 + npart_theta * npart_theta * gspr
/ here->BSIM4v3IdovVds); /* bugfix */
else
gdpr = gdpr / (1.0 + npart_theta * npart_theta * gdpr
/ here->BSIM4v3IdovVds);
}
NevalSrc(&noizDens[BSIM4v3RDNOIZ],
&lnNdens[BSIM4v3RDNOIZ], ckt, THERMNOISE,
here->BSIM4v3dNodePrime, here->BSIM4v3dNode,
gdpr * m);
NevalSrc(&noizDens[BSIM4v3RSNOIZ],
&lnNdens[BSIM4v3RSNOIZ], ckt, THERMNOISE,
here->BSIM4v3sNodePrime, here->BSIM4v3sNode,
gspr * m);
if ((here->BSIM4v3rgateMod == 1) || (here->BSIM4v3rgateMod == 2))
{ NevalSrc(&noizDens[BSIM4v3RGNOIZ],
&lnNdens[BSIM4v3RGNOIZ], ckt, THERMNOISE,
here->BSIM4v3gNodePrime, here->BSIM4v3gNodeExt,
here->BSIM4v3grgeltd * m);
}
else if (here->BSIM4v3rgateMod == 3)
{ NevalSrc(&noizDens[BSIM4v3RGNOIZ],
&lnNdens[BSIM4v3RGNOIZ], ckt, THERMNOISE,
here->BSIM4v3gNodeMid, here->BSIM4v3gNodeExt,
here->BSIM4v3grgeltd * m);
}
else
{ noizDens[BSIM4v3RGNOIZ] = 0.0;
lnNdens[BSIM4v3RGNOIZ] =
log(MAX(noizDens[BSIM4v3RGNOIZ], N_MINLOG));
}
if (here->BSIM4v3rbodyMod)
{ NevalSrc(&noizDens[BSIM4v3RBPSNOIZ],
&lnNdens[BSIM4v3RBPSNOIZ], ckt, THERMNOISE,
here->BSIM4v3bNodePrime, here->BSIM4v3sbNode,
here->BSIM4v3grbps * m);
NevalSrc(&noizDens[BSIM4v3RBPDNOIZ],
&lnNdens[BSIM4v3RBPDNOIZ], ckt, THERMNOISE,
here->BSIM4v3bNodePrime, here->BSIM4v3dbNode,
here->BSIM4v3grbpd * m);
NevalSrc(&noizDens[BSIM4v3RBPBNOIZ],
&lnNdens[BSIM4v3RBPBNOIZ], ckt, THERMNOISE,
here->BSIM4v3bNodePrime, here->BSIM4v3bNode,
here->BSIM4v3grbpb * m);
NevalSrc(&noizDens[BSIM4v3RBSBNOIZ],
&lnNdens[BSIM4v3RBSBNOIZ], ckt, THERMNOISE,
here->BSIM4v3bNode, here->BSIM4v3sbNode,
here->BSIM4v3grbsb * m);
NevalSrc(&noizDens[BSIM4v3RBDBNOIZ],
&lnNdens[BSIM4v3RBDBNOIZ], ckt, THERMNOISE,
here->BSIM4v3bNode, here->BSIM4v3dbNode,
here->BSIM4v3grbdb * m);
}
else
{ noizDens[BSIM4v3RBPSNOIZ] = noizDens[BSIM4v3RBPDNOIZ] = 0.0;
noizDens[BSIM4v3RBPBNOIZ] = 0.0;
noizDens[BSIM4v3RBSBNOIZ] = noizDens[BSIM4v3RBDBNOIZ] = 0.0;
lnNdens[BSIM4v3RBPSNOIZ] =
log(MAX(noizDens[BSIM4v3RBPSNOIZ], N_MINLOG));
lnNdens[BSIM4v3RBPDNOIZ] =
log(MAX(noizDens[BSIM4v3RBPDNOIZ], N_MINLOG));
lnNdens[BSIM4v3RBPBNOIZ] =
log(MAX(noizDens[BSIM4v3RBPBNOIZ], N_MINLOG));
lnNdens[BSIM4v3RBSBNOIZ] =
log(MAX(noizDens[BSIM4v3RBSBNOIZ], N_MINLOG));
lnNdens[BSIM4v3RBDBNOIZ] =
log(MAX(noizDens[BSIM4v3RBDBNOIZ], N_MINLOG));
}
switch(model->BSIM4v3tnoiMod)
{ case 0:
T0 = m * here->BSIM4v3ueff * fabs(here->BSIM4v3qinv);
T1 = T0 * tmp + pParam->BSIM4v3leff
* pParam->BSIM4v3leff;
NevalSrc(&noizDens[BSIM4v3IDNOIZ],
&lnNdens[BSIM4v3IDNOIZ], ckt,
THERMNOISE, here->BSIM4v3dNodePrime,
here->BSIM4v3sNodePrime,
(T0 / T1) * model->BSIM4v3ntnoi);
break;
case 1:
T0 = m * (here->BSIM4v3gm + here->BSIM4v3gmbs + here->BSIM4v3gds);
T0 *= T0;
igsquare = npart_theta * npart_theta * T0 / here->BSIM4v3IdovVds;
T1 = npart_beta * (here->BSIM4v3gm
+ here->BSIM4v3gmbs) + here->BSIM4v3gds;
T2 = T1 * T1 / here->BSIM4v3IdovVds;
NevalSrc(&noizDens[BSIM4v3IDNOIZ],
&lnNdens[BSIM4v3IDNOIZ], ckt,
THERMNOISE, here->BSIM4v3dNodePrime,
here->BSIM4v3sNodePrime, (T2 - igsquare));
break;
}
NevalSrc(&noizDens[BSIM4v3FLNOIZ], NULL,
ckt, N_GAIN, here->BSIM4v3dNodePrime,
here->BSIM4v3sNodePrime, (double) 0.0);
switch(model->BSIM4v3fnoiMod)
{ case 0:
noizDens[BSIM4v3FLNOIZ] *= m * model->BSIM4v3kf
* exp(model->BSIM4v3af
* log(MAX(fabs(here->BSIM4v3cd),
N_MINLOG)))
/ (pow(data->freq, model->BSIM4v3ef)
* pParam->BSIM4v3leff
* pParam->BSIM4v3leff
* model->BSIM4v3coxe);
break;
case 1:
Vds = *(ckt->CKTstates[0] + here->BSIM4v3vds);
if (Vds < 0.0)
Vds = -Vds;
Ssi = BSIM4v3Eval1ovFNoise(Vds, model, here,
data->freq, ckt->CKTtemp);
T10 = model->BSIM4v3oxideTrapDensityA
* CONSTboltz * ckt->CKTtemp;
T11 = pParam->BSIM4v3weff * pParam->BSIM4v3leff
* pow(data->freq, model->BSIM4v3ef) * 1.0e10
* here->BSIM4v3nstar * here->BSIM4v3nstar;
Swi = T10 / T11 * here->BSIM4v3cd
* here->BSIM4v3cd;
T1 = Swi + Ssi;
if (T1 > 0.0)
noizDens[BSIM4v3FLNOIZ] *= m * (Ssi * Swi) / T1;
else
noizDens[BSIM4v3FLNOIZ] *= 0.0;
break;
}
lnNdens[BSIM4v3FLNOIZ] =
log(MAX(noizDens[BSIM4v3FLNOIZ], N_MINLOG));
if(here->BSIM4v3mode >= 0) { /* bugfix */
NevalSrc(&noizDens[BSIM4v3IGSNOIZ],
&lnNdens[BSIM4v3IGSNOIZ], ckt, SHOTNOISE,
here->BSIM4v3gNodePrime, here->BSIM4v3sNodePrime,
m * (here->BSIM4v3Igs + here->BSIM4v3Igcs));
NevalSrc(&noizDens[BSIM4v3IGDNOIZ],
&lnNdens[BSIM4v3IGDNOIZ], ckt, SHOTNOISE,
here->BSIM4v3gNodePrime, here->BSIM4v3dNodePrime,
m * (here->BSIM4v3Igd + here->BSIM4v3Igcd));
} else {
NevalSrc(&noizDens[BSIM4v3IGSNOIZ],
&lnNdens[BSIM4v3IGSNOIZ], ckt, SHOTNOISE,
here->BSIM4v3gNodePrime, here->BSIM4v3sNodePrime,
m * (here->BSIM4v3Igs + here->BSIM4v3Igcd));
NevalSrc(&noizDens[BSIM4v3IGDNOIZ],
&lnNdens[BSIM4v3IGDNOIZ], ckt, SHOTNOISE,
here->BSIM4v3gNodePrime, here->BSIM4v3dNodePrime,
m * (here->BSIM4v3Igd + here->BSIM4v3Igcs));
}
NevalSrc(&noizDens[BSIM4v3IGBNOIZ],
&lnNdens[BSIM4v3IGBNOIZ], ckt, SHOTNOISE,
here->BSIM4v3gNodePrime, here->BSIM4v3bNodePrime,
m * here->BSIM4v3Igb);
noizDens[BSIM4v3TOTNOIZ] = noizDens[BSIM4v3RDNOIZ]
+ noizDens[BSIM4v3RSNOIZ] + noizDens[BSIM4v3RGNOIZ]
+ noizDens[BSIM4v3RBPSNOIZ] + noizDens[BSIM4v3RBPDNOIZ]
+ noizDens[BSIM4v3RBPBNOIZ]
+ noizDens[BSIM4v3RBSBNOIZ] + noizDens[BSIM4v3RBDBNOIZ]
+ noizDens[BSIM4v3IDNOIZ] + noizDens[BSIM4v3FLNOIZ]
+ noizDens[BSIM4v3IGSNOIZ] + noizDens[BSIM4v3IGDNOIZ]
+ noizDens[BSIM4v3IGBNOIZ];
lnNdens[BSIM4v3TOTNOIZ] =
log(MAX(noizDens[BSIM4v3TOTNOIZ], N_MINLOG));
*OnDens += noizDens[BSIM4v3TOTNOIZ];
if (data->delFreq == 0.0)
{ /* if we haven't done any previous
integration, we need to initialize our
"history" variables.
*/
for (i = 0; i < BSIM4v3NSRCS; i++)
{ here->BSIM4v3nVar[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 < BSIM4v3NSRCS; i++)
{ here->BSIM4v3nVar[OUTNOIZ][i] = 0.0;
here->BSIM4v3nVar[INNOIZ][i] = 0.0;
}
}
}
else
{ /* data->delFreq != 0.0,
we have to integrate.
*/
for (i = 0; i < BSIM4v3NSRCS; i++)
{ if (i != BSIM4v3TOTNOIZ)
{ tempOnoise = Nintegrate(noizDens[i],
lnNdens[i],
here->BSIM4v3nVar[LNLSTDENS][i],
data);
tempInoise = Nintegrate(noizDens[i]
* data->GainSqInv, lnNdens[i]
+ data->lnGainInv,
here->BSIM4v3nVar[LNLSTDENS][i]
+ data->lnGainInv, data);
here->BSIM4v3nVar[LNLSTDENS][i] =
lnNdens[i];
data->outNoiz += tempOnoise;
data->inNoise += tempInoise;
if (((NOISEAN*)
ckt->CKTcurJob)->NStpsSm != 0)
{ here->BSIM4v3nVar[OUTNOIZ][i]
+= tempOnoise;
here->BSIM4v3nVar[OUTNOIZ][BSIM4v3TOTNOIZ]
+= tempOnoise;
here->BSIM4v3nVar[INNOIZ][i]
+= tempInoise;
here->BSIM4v3nVar[INNOIZ][BSIM4v3TOTNOIZ]
+= tempInoise;
}
}
}
}
if (data->prtSummary)
{ for (i = 0; i < BSIM4v3NSRCS; 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 < BSIM4v3NSRCS; i++)
{ data->outpVector[data->outNumber++]
= here->BSIM4v3nVar[OUTNOIZ][i];
data->outpVector[data->outNumber++]
= here->BSIM4v3nVar[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);
}

View File

@ -1,172 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3par.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 04/06/2001.
* Modified by Xuemei Xi, 11/15/2002.
* Modified by Xuemei Xi, 05/09/2003.
**********/
#include "ngspice.h"
#include "ifsim.h"
#include "bsim4v3def.h"
#include "sperror.h"
#include "fteext.h"
int
BSIM4v3param(
int param,
IFvalue *value,
GENinstance *inst,
IFvalue *select)
{
double scale;
BSIM4v3instance *here = (BSIM4v3instance*)inst;
NG_IGNORE(select);
if (!cp_getvar("scale", CP_REAL, &scale))
scale = 1;
switch(param)
{ case BSIM4v3_W:
here->BSIM4v3w = value->rValue*scale;
here->BSIM4v3wGiven = TRUE;
break;
case BSIM4v3_L:
here->BSIM4v3l = value->rValue*scale;
here->BSIM4v3lGiven = TRUE;
break;
case BSIM4v3_M:
here->BSIM4v3m = value->rValue;
here->BSIM4v3mGiven = TRUE;
break;
case BSIM4v3_NF:
here->BSIM4v3nf = value->rValue;
here->BSIM4v3nfGiven = TRUE;
break;
case BSIM4v3_MIN:
here->BSIM4v3min = value->iValue;
here->BSIM4v3minGiven = TRUE;
break;
case BSIM4v3_AS:
here->BSIM4v3sourceArea = value->rValue*scale*scale;
here->BSIM4v3sourceAreaGiven = TRUE;
break;
case BSIM4v3_AD:
here->BSIM4v3drainArea = value->rValue*scale*scale;
here->BSIM4v3drainAreaGiven = TRUE;
break;
case BSIM4v3_PS:
here->BSIM4v3sourcePerimeter = value->rValue*scale;
here->BSIM4v3sourcePerimeterGiven = TRUE;
break;
case BSIM4v3_PD:
here->BSIM4v3drainPerimeter = value->rValue*scale;
here->BSIM4v3drainPerimeterGiven = TRUE;
break;
case BSIM4v3_NRS:
here->BSIM4v3sourceSquares = value->rValue;
here->BSIM4v3sourceSquaresGiven = TRUE;
break;
case BSIM4v3_NRD:
here->BSIM4v3drainSquares = value->rValue;
here->BSIM4v3drainSquaresGiven = TRUE;
break;
case BSIM4v3_OFF:
here->BSIM4v3off = value->iValue;
break;
case BSIM4v3_SA:
here->BSIM4v3sa = value->rValue;
here->BSIM4v3saGiven = TRUE;
break;
case BSIM4v3_SB:
here->BSIM4v3sb = value->rValue;
here->BSIM4v3sbGiven = TRUE;
break;
case BSIM4v3_SD:
here->BSIM4v3sd = value->rValue;
here->BSIM4v3sdGiven = TRUE;
break;
case BSIM4v3_RBSB:
here->BSIM4v3rbsb = value->rValue;
here->BSIM4v3rbsbGiven = TRUE;
break;
case BSIM4v3_RBDB:
here->BSIM4v3rbdb = value->rValue;
here->BSIM4v3rbdbGiven = TRUE;
break;
case BSIM4v3_RBPB:
here->BSIM4v3rbpb = value->rValue;
here->BSIM4v3rbpbGiven = TRUE;
break;
case BSIM4v3_RBPS:
here->BSIM4v3rbps = value->rValue;
here->BSIM4v3rbpsGiven = TRUE;
break;
case BSIM4v3_RBPD:
here->BSIM4v3rbpd = value->rValue;
here->BSIM4v3rbpdGiven = TRUE;
break;
case BSIM4v3_TRNQSMOD:
here->BSIM4v3trnqsMod = value->iValue;
here->BSIM4v3trnqsModGiven = TRUE;
break;
case BSIM4v3_ACNQSMOD:
here->BSIM4v3acnqsMod = value->iValue;
here->BSIM4v3acnqsModGiven = TRUE;
break;
case BSIM4v3_RBODYMOD:
here->BSIM4v3rbodyMod = value->iValue;
here->BSIM4v3rbodyModGiven = TRUE;
break;
case BSIM4v3_RGATEMOD:
here->BSIM4v3rgateMod = value->iValue;
here->BSIM4v3rgateModGiven = TRUE;
break;
case BSIM4v3_GEOMOD:
here->BSIM4v3geoMod = value->iValue;
here->BSIM4v3geoModGiven = TRUE;
break;
case BSIM4v3_RGEOMOD:
here->BSIM4v3rgeoMod = value->iValue;
here->BSIM4v3rgeoModGiven = TRUE;
break;
case BSIM4v3_IC_VDS:
here->BSIM4v3icVDS = value->rValue;
here->BSIM4v3icVDSGiven = TRUE;
break;
case BSIM4v3_IC_VGS:
here->BSIM4v3icVGS = value->rValue;
here->BSIM4v3icVGSGiven = TRUE;
break;
case BSIM4v3_IC_VBS:
here->BSIM4v3icVBS = value->rValue;
here->BSIM4v3icVBSGiven = TRUE;
break;
case BSIM4v3_IC:
switch(value->v.numValue)
{ case 3:
here->BSIM4v3icVBS = *(value->v.vec.rVec+2);
here->BSIM4v3icVBSGiven = TRUE;
case 2:
here->BSIM4v3icVGS = *(value->v.vec.rVec+1);
here->BSIM4v3icVGSGiven = TRUE;
case 1:
here->BSIM4v3icVDS = *(value->v.vec.rVec);
here->BSIM4v3icVDSGiven = TRUE;
break;
default:
return(E_BADPARM);
}
break;
default:
return(E_BADPARM);
}
return(OK);
}

View File

@ -1,757 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3pzld.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
* Modified by Xuemei Xi, 10/05/2001.
**********/
#include "ngspice.h"
#include "cktdefs.h"
#include "complex.h"
#include "sperror.h"
#include "bsim4v3def.h"
int
BSIM4v3pzLoad(
GENmodel *inModel,
CKTcircuit *ckt,
SPcomplex *s)
{
BSIM4v3model *model = (BSIM4v3model*)inModel;
BSIM4v3instance *here;
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb;
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb;
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb;
double gds, capbd, capbs, FwdSum, RevSum, Gm, Gmbs;
double gstot, gstotd, gstotg, gstots, gstotb, gspr;
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr;
double gIstotg, gIstotd, gIstots, gIstotb;
double gIdtotg, gIdtotd, gIdtots, gIdtotb;
double gIbtotg, gIbtotd, gIbtots, gIbtotb;
double gIgtotg, gIgtotd, gIgtots, gIgtotb;
double cgso, cgdo, cgbo;
double xcdbdb=0.0, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb=0.0, xcsgmb=0.0;
double xcgmbb=0.0, xcbgmb=0.0;
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0;
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 T0=0.0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css;
double ScalingFactor = 1.0e-9;
struct bsim4v3SizeDependParam *pParam;
double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls;
double m;
for (; model != NULL; model = model->BSIM4v3nextModel)
{ for (here = model->BSIM4v3instances; here!= NULL;
here = here->BSIM4v3nextInstance)
{ if (here->BSIM4v3owner != ARCHme) continue;
pParam = here->pParam;
capbd = here->BSIM4v3capbd;
capbs = here->BSIM4v3capbs;
cgso = here->BSIM4v3cgso;
cgdo = here->BSIM4v3cgdo;
cgbo = pParam->BSIM4v3cgbo;
if (here->BSIM4v3mode >= 0)
{ Gm = here->BSIM4v3gm;
Gmbs = here->BSIM4v3gmbs;
FwdSum = Gm + Gmbs;
RevSum = 0.0;
gbbdp = -(here->BSIM4v3gbds);
gbbsp = here->BSIM4v3gbds + here->BSIM4v3gbgs + here->BSIM4v3gbbs;
gbdpg = here->BSIM4v3gbgs;
gbdpdp = here->BSIM4v3gbds;
gbdpb = here->BSIM4v3gbbs;
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
gbspdp = 0.0;
gbspg = 0.0;
gbspb = 0.0;
gbspsp = 0.0;
if (model->BSIM4v3igcMod)
{ gIstotg = here->BSIM4v3gIgsg + here->BSIM4v3gIgcsg;
gIstotd = here->BSIM4v3gIgcsd;
gIstots = here->BSIM4v3gIgss + here->BSIM4v3gIgcss;
gIstotb = here->BSIM4v3gIgcsb;
gIdtotg = here->BSIM4v3gIgdg + here->BSIM4v3gIgcdg;
gIdtotd = here->BSIM4v3gIgdd + here->BSIM4v3gIgcdd;
gIdtots = here->BSIM4v3gIgcds;
gIdtotb = here->BSIM4v3gIgcdb;
}
else
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0;
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0;
}
if (model->BSIM4v3igbMod)
{ gIbtotg = here->BSIM4v3gIgbg;
gIbtotd = here->BSIM4v3gIgbd;
gIbtots = here->BSIM4v3gIgbs;
gIbtotb = here->BSIM4v3gIgbb;
}
else
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0;
if ((model->BSIM4v3igcMod != 0) || (model->BSIM4v3igbMod != 0))
{ gIgtotg = gIstotg + gIdtotg + gIbtotg;
gIgtotd = gIstotd + gIdtotd + gIbtotd ;
gIgtots = gIstots + gIdtots + gIbtots;
gIgtotb = gIstotb + gIdtotb + gIbtotb;
}
else
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0;
if (here->BSIM4v3rgateMod == 2)
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vges)
- *(ckt->CKTstates[0] + here->BSIM4v3vgs);
else if (here->BSIM4v3rgateMod == 3)
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vgms)
- *(ckt->CKTstates[0] + here->BSIM4v3vgs);
if (here->BSIM4v3rgateMod > 1)
{ gcrgd = here->BSIM4v3gcrgd * T0;
gcrgg = here->BSIM4v3gcrgg * T0;
gcrgs = here->BSIM4v3gcrgs * T0;
gcrgb = here->BSIM4v3gcrgb * T0;
gcrgg -= here->BSIM4v3gcrg;
gcrg = here->BSIM4v3gcrg;
}
else
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0;
if (here->BSIM4v3acnqsMod == 0)
{ if (here->BSIM4v3rgateMod == 3)
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v3cgbo;
xcgmdb = -cgdo;
xcgmsb = -cgso;
xcgmbb = -pParam->BSIM4v3cgbo;
xcdgmb = xcgmdb;
xcsgmb = xcgmsb;
xcbgmb = xcgmbb;
xcggb = here->BSIM4v3cggb;
xcgdb = here->BSIM4v3cgdb;
xcgsb = here->BSIM4v3cgsb;
xcgbb = -(xcggb + xcgdb + xcgsb);
xcdgb = here->BSIM4v3cdgb;
xcsgb = -(here->BSIM4v3cggb + here->BSIM4v3cbgb
+ here->BSIM4v3cdgb);
xcbgb = here->BSIM4v3cbgb;
}
else
{ xcggb = here->BSIM4v3cggb + cgdo + cgso
+ pParam->BSIM4v3cgbo;
xcgdb = here->BSIM4v3cgdb - cgdo;
xcgsb = here->BSIM4v3cgsb - cgso;
xcgbb = -(xcggb + xcgdb + xcgsb);
xcdgb = here->BSIM4v3cdgb - cgdo;
xcsgb = -(here->BSIM4v3cggb + here->BSIM4v3cbgb
+ here->BSIM4v3cdgb + cgso);
xcbgb = here->BSIM4v3cbgb - pParam->BSIM4v3cgbo;
xcdgmb = xcsgmb = xcbgmb = 0.0;
}
xcddb = here->BSIM4v3cddb + here->BSIM4v3capbd + cgdo;
xcdsb = here->BSIM4v3cdsb;
xcsdb = -(here->BSIM4v3cgdb + here->BSIM4v3cbdb
+ here->BSIM4v3cddb);
xcssb = here->BSIM4v3capbs + cgso - (here->BSIM4v3cgsb
+ here->BSIM4v3cbsb + here->BSIM4v3cdsb);
if (!here->BSIM4v3rbodyMod)
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb);
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb);
xcbdb = here->BSIM4v3cbdb - here->BSIM4v3capbd;
xcbsb = here->BSIM4v3cbsb - here->BSIM4v3capbs;
xcdbdb = 0.0;
}
else
{ xcdbb = -(here->BSIM4v3cddb + here->BSIM4v3cdgb
+ here->BSIM4v3cdsb);
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb)
+ here->BSIM4v3capbs;
xcbdb = here->BSIM4v3cbdb;
xcbsb = here->BSIM4v3cbsb;
xcdbdb = -here->BSIM4v3capbd;
xcsbsb = -here->BSIM4v3capbs;
}
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb);
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
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0;
xcbgb = xcbdb = xcbsb = xcbbb = 0.0;
xcdgb = xcddb = xcdsb = xcdbb = 0.0;
xcsgb = xcsdb = xcssb = xcsbb = 0.0;
xgtg = here->BSIM4v3gtg;
xgtd = here->BSIM4v3gtd;
xgts = here->BSIM4v3gts;
xgtb = here->BSIM4v3gtb;
xcqgb = here->BSIM4v3cqgb;
xcqdb = here->BSIM4v3cqdb;
xcqsb = here->BSIM4v3cqsb;
xcqbb = here->BSIM4v3cqbb;
CoxWL = model->BSIM4v3coxe * here->pParam->BSIM4v3weffCV
* here->BSIM4v3nf * here->pParam->BSIM4v3leffCV;
qcheq = -(here->BSIM4v3qgate + here->BSIM4v3qbulk);
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
{ if (model->BSIM4v3xpart < 0.5)
{ dxpart = 0.4;
}
else if (model->BSIM4v3xpart > 0.5)
{ dxpart = 0.0;
}
else
{ dxpart = 0.5;
}
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
= ddxpart_dVs = 0.0;
}
else
{ dxpart = here->BSIM4v3qdrn / qcheq;
Cdd = here->BSIM4v3cddb;
Csd = -(here->BSIM4v3cgdb + here->BSIM4v3cddb
+ here->BSIM4v3cbdb);
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq;
Cdg = here->BSIM4v3cdgb;
Csg = -(here->BSIM4v3cggb + here->BSIM4v3cdgb
+ here->BSIM4v3cbgb);
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq;
Cds = here->BSIM4v3cdsb;
Css = -(here->BSIM4v3cgsb + here->BSIM4v3cdsb
+ here->BSIM4v3cbsb);
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->BSIM4v3gm;
Gmbs = -here->BSIM4v3gmbs;
FwdSum = 0.0;
RevSum = -(Gm + Gmbs);
gbbsp = -(here->BSIM4v3gbds);
gbbdp = here->BSIM4v3gbds + here->BSIM4v3gbgs + here->BSIM4v3gbbs;
gbdpg = 0.0;
gbdpsp = 0.0;
gbdpb = 0.0;
gbdpdp = 0.0;
gbspg = here->BSIM4v3gbgs;
gbspsp = here->BSIM4v3gbds;
gbspb = here->BSIM4v3gbbs;
gbspdp = -(gbspg + gbspsp + gbspb);
if (model->BSIM4v3igcMod)
{ gIstotg = here->BSIM4v3gIgsg + here->BSIM4v3gIgcdg;
gIstotd = here->BSIM4v3gIgcds;
gIstots = here->BSIM4v3gIgss + here->BSIM4v3gIgcdd;
gIstotb = here->BSIM4v3gIgcdb;
gIdtotg = here->BSIM4v3gIgdg + here->BSIM4v3gIgcsg;
gIdtotd = here->BSIM4v3gIgdd + here->BSIM4v3gIgcss;
gIdtots = here->BSIM4v3gIgcsd;
gIdtotb = here->BSIM4v3gIgcsb;
}
else
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0;
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0;
}
if (model->BSIM4v3igbMod)
{ gIbtotg = here->BSIM4v3gIgbg;
gIbtotd = here->BSIM4v3gIgbs;
gIbtots = here->BSIM4v3gIgbd;
gIbtotb = here->BSIM4v3gIgbb;
}
else
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0;
if ((model->BSIM4v3igcMod != 0) || (model->BSIM4v3igbMod != 0))
{ gIgtotg = gIstotg + gIdtotg + gIbtotg;
gIgtotd = gIstotd + gIdtotd + gIbtotd ;
gIgtots = gIstots + gIdtots + gIbtots;
gIgtotb = gIstotb + gIdtotb + gIbtotb;
}
else
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0;
if (here->BSIM4v3rgateMod == 2)
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vges)
- *(ckt->CKTstates[0] + here->BSIM4v3vgs);
else if (here->BSIM4v3rgateMod == 3)
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vgms)
- *(ckt->CKTstates[0] + here->BSIM4v3vgs);
if (here->BSIM4v3rgateMod > 1)
{ gcrgd = here->BSIM4v3gcrgs * T0;
gcrgg = here->BSIM4v3gcrgg * T0;
gcrgs = here->BSIM4v3gcrgd * T0;
gcrgb = here->BSIM4v3gcrgb * T0;
gcrgg -= here->BSIM4v3gcrg;
gcrg = here->BSIM4v3gcrg;
}
else
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0;
if (here->BSIM4v3acnqsMod == 0)
{ if (here->BSIM4v3rgateMod == 3)
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v3cgbo;
xcgmdb = -cgdo;
xcgmsb = -cgso;
xcgmbb = -pParam->BSIM4v3cgbo;
xcdgmb = xcgmdb;
xcsgmb = xcgmsb;
xcbgmb = xcgmbb;
xcggb = here->BSIM4v3cggb;
xcgdb = here->BSIM4v3cgsb;
xcgsb = here->BSIM4v3cgdb;
xcgbb = -(xcggb + xcgdb + xcgsb);
xcdgb = -(here->BSIM4v3cggb + here->BSIM4v3cbgb
+ here->BSIM4v3cdgb);
xcsgb = here->BSIM4v3cdgb;
xcbgb = here->BSIM4v3cbgb;
}
else
{ xcggb = here->BSIM4v3cggb + cgdo + cgso
+ pParam->BSIM4v3cgbo;
xcgdb = here->BSIM4v3cgsb - cgdo;
xcgsb = here->BSIM4v3cgdb - cgso;
xcgbb = -(xcggb + xcgdb + xcgsb);
xcdgb = -(here->BSIM4v3cggb + here->BSIM4v3cbgb
+ here->BSIM4v3cdgb + cgdo);
xcsgb = here->BSIM4v3cdgb - cgso;
xcbgb = here->BSIM4v3cbgb - pParam->BSIM4v3cgbo;
xcdgmb = xcsgmb = xcbgmb = 0.0;
}
xcddb = here->BSIM4v3capbd + cgdo - (here->BSIM4v3cgsb
+ here->BSIM4v3cbsb + here->BSIM4v3cdsb);
xcdsb = -(here->BSIM4v3cgdb + here->BSIM4v3cbdb
+ here->BSIM4v3cddb);
xcsdb = here->BSIM4v3cdsb;
xcssb = here->BSIM4v3cddb + here->BSIM4v3capbs + cgso;
if (!here->BSIM4v3rbodyMod)
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb);
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb);
xcbdb = here->BSIM4v3cbsb - here->BSIM4v3capbd;
xcbsb = here->BSIM4v3cbdb - here->BSIM4v3capbs;
xcdbdb = 0.0;
}
else
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb)
+ here->BSIM4v3capbd;
xcsbb = -(here->BSIM4v3cddb + here->BSIM4v3cdgb
+ here->BSIM4v3cdsb);
xcbdb = here->BSIM4v3cbsb;
xcbsb = here->BSIM4v3cbdb;
xcdbdb = -here->BSIM4v3capbd;
xcsbsb = -here->BSIM4v3capbs;
}
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb);
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
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0;
xcbgb = xcbdb = xcbsb = xcbbb = 0.0;
xcdgb = xcddb = xcdsb = xcdbb = 0.0;
xcsgb = xcsdb = xcssb = xcsbb = 0.0;
xgtg = here->BSIM4v3gtg;
xgtd = here->BSIM4v3gts;
xgts = here->BSIM4v3gtd;
xgtb = here->BSIM4v3gtb;
xcqgb = here->BSIM4v3cqgb;
xcqdb = here->BSIM4v3cqsb;
xcqsb = here->BSIM4v3cqdb;
xcqbb = here->BSIM4v3cqbb;
CoxWL = model->BSIM4v3coxe * here->pParam->BSIM4v3weffCV
* here->BSIM4v3nf * here->pParam->BSIM4v3leffCV;
qcheq = -(here->BSIM4v3qgate + here->BSIM4v3qbulk);
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
{ if (model->BSIM4v3xpart < 0.5)
{ sxpart = 0.4;
}
else if (model->BSIM4v3xpart > 0.5)
{ sxpart = 0.0;
}
else
{ sxpart = 0.5;
}
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
= dsxpart_dVs = 0.0;
}
else
{ sxpart = here->BSIM4v3qdrn / qcheq;
Css = here->BSIM4v3cddb;
Cds = -(here->BSIM4v3cgdb + here->BSIM4v3cddb
+ here->BSIM4v3cbdb);
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq;
Csg = here->BSIM4v3cdgb;
Cdg = -(here->BSIM4v3cggb + here->BSIM4v3cdgb
+ here->BSIM4v3cbgb);
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq;
Csd = here->BSIM4v3cdsb;
Cdd = -(here->BSIM4v3cgsb + here->BSIM4v3cdsb
+ here->BSIM4v3cbsb);
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);
}
}
if (model->BSIM4v3rdsMod == 1)
{ gstot = here->BSIM4v3gstot;
gstotd = here->BSIM4v3gstotd;
gstotg = here->BSIM4v3gstotg;
gstots = here->BSIM4v3gstots - gstot;
gstotb = here->BSIM4v3gstotb;
gdtot = here->BSIM4v3gdtot;
gdtotd = here->BSIM4v3gdtotd - gdtot;
gdtotg = here->BSIM4v3gdtotg;
gdtots = here->BSIM4v3gdtots;
gdtotb = here->BSIM4v3gdtotb;
}
else
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0;
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0;
}
T1 = *(ckt->CKTstate0 + here->BSIM4v3qdef) * here->BSIM4v3gtau;
gds = here->BSIM4v3gds;
/*
* Loading PZ matrix
*/
m = here->BSIM4v3m;
if (!model->BSIM4v3rdsMod)
{ gdpr = here->BSIM4v3drainConductance;
gspr = here->BSIM4v3sourceConductance;
}
else
gdpr = gspr = 0.0;
if (!here->BSIM4v3rbodyMod)
{ gjbd = here->BSIM4v3gbd;
gjbs = here->BSIM4v3gbs;
}
else
gjbd = gjbs = 0.0;
geltd = here->BSIM4v3grgeltd;
if (here->BSIM4v3rgateMod == 1)
{ *(here->BSIM4v3GEgePtr) += m * geltd;
*(here->BSIM4v3GPgePtr) -= m * geltd;
*(here->BSIM4v3GEgpPtr) -= m * geltd;
*(here->BSIM4v3GPgpPtr ) += m * xcggb * s->real;
*(here->BSIM4v3GPgpPtr +1) += m * xcggb * s->imag;
*(here->BSIM4v3GPgpPtr) += m * (geltd - xgtg + gIgtotg);
*(here->BSIM4v3GPdpPtr ) += m * xcgdb * s->real;
*(here->BSIM4v3GPdpPtr +1) += m * xcgdb * s->imag;
*(here->BSIM4v3GPdpPtr) -= m * (xgtd - gIgtotd);
*(here->BSIM4v3GPspPtr ) += m * xcgsb * s->real;
*(here->BSIM4v3GPspPtr +1) += m * xcgsb * s->imag;
*(here->BSIM4v3GPspPtr) -= m * (xgts - gIgtots);
*(here->BSIM4v3GPbpPtr ) += m * xcgbb * s->real;
*(here->BSIM4v3GPbpPtr +1) += m * xcgbb * s->imag;
*(here->BSIM4v3GPbpPtr) -= m * (xgtb - gIgtotb);
}
else if (here->BSIM4v3rgateMod == 2)
{ *(here->BSIM4v3GEgePtr) += m * gcrg;
*(here->BSIM4v3GEgpPtr) += m * gcrgg;
*(here->BSIM4v3GEdpPtr) += m * gcrgd;
*(here->BSIM4v3GEspPtr) += m * gcrgs;
*(here->BSIM4v3GEbpPtr) += m * gcrgb;
*(here->BSIM4v3GPgePtr) -= m * gcrg;
*(here->BSIM4v3GPgpPtr ) += m * xcggb * s->real;
*(here->BSIM4v3GPgpPtr +1) += m * xcggb * s->imag;
*(here->BSIM4v3GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg);
*(here->BSIM4v3GPdpPtr ) += m * xcgdb * s->real;
*(here->BSIM4v3GPdpPtr +1) += m * xcgdb * s->imag;
*(here->BSIM4v3GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd);
*(here->BSIM4v3GPspPtr ) += m * xcgsb * s->real;
*(here->BSIM4v3GPspPtr +1) += m * xcgsb * s->imag;
*(here->BSIM4v3GPspPtr) -= m * (gcrgs + xgts - gIgtots);
*(here->BSIM4v3GPbpPtr ) += m * xcgbb * s->real;
*(here->BSIM4v3GPbpPtr +1) += m * xcgbb * s->imag;
*(here->BSIM4v3GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb);
}
else if (here->BSIM4v3rgateMod == 3)
{ *(here->BSIM4v3GEgePtr) += m * geltd;
*(here->BSIM4v3GEgmPtr) -= m * geltd;
*(here->BSIM4v3GMgePtr) -= m * geltd;
*(here->BSIM4v3GMgmPtr) += m * (geltd + gcrg);
*(here->BSIM4v3GMgmPtr ) += m * xcgmgmb * s->real;
*(here->BSIM4v3GMgmPtr +1) += m * xcgmgmb * s->imag;
*(here->BSIM4v3GMdpPtr) += m * gcrgd;
*(here->BSIM4v3GMdpPtr ) += m * xcgmdb * s->real;
*(here->BSIM4v3GMdpPtr +1) += m * xcgmdb * s->imag;
*(here->BSIM4v3GMgpPtr) += m * gcrgg;
*(here->BSIM4v3GMspPtr) += m * gcrgs;
*(here->BSIM4v3GMspPtr ) += m * xcgmsb * s->real;
*(here->BSIM4v3GMspPtr +1) += m * xcgmsb * s->imag;
*(here->BSIM4v3GMbpPtr) += m * gcrgb;
*(here->BSIM4v3GMbpPtr ) += m * xcgmbb * s->real;
*(here->BSIM4v3GMbpPtr +1) += m * xcgmbb * s->imag;
*(here->BSIM4v3DPgmPtr ) += m * xcdgmb * s->real;
*(here->BSIM4v3DPgmPtr +1) += m * xcdgmb * s->imag;
*(here->BSIM4v3GPgmPtr) -= m * gcrg;
*(here->BSIM4v3SPgmPtr ) += m * xcsgmb * s->real;
*(here->BSIM4v3SPgmPtr +1) += m * xcsgmb * s->imag;
*(here->BSIM4v3BPgmPtr ) += m * xcbgmb * s->real;
*(here->BSIM4v3BPgmPtr +1) += m * xcbgmb * s->imag;
*(here->BSIM4v3GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg);
*(here->BSIM4v3GPgpPtr ) += m * xcggb * s->real;
*(here->BSIM4v3GPgpPtr +1) += m * xcggb * s->imag;
*(here->BSIM4v3GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd);
*(here->BSIM4v3GPdpPtr ) += m * xcgdb * s->real;
*(here->BSIM4v3GPdpPtr +1) += m * xcgdb * s->imag;
*(here->BSIM4v3GPspPtr) -= m * (gcrgs + xgts - gIgtots);
*(here->BSIM4v3GPspPtr ) += m * xcgsb * s->real;
*(here->BSIM4v3GPspPtr +1) += m * xcgsb * s->imag;
*(here->BSIM4v3GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb);
*(here->BSIM4v3GPbpPtr ) += m * xcgbb * s->real;
*(here->BSIM4v3GPbpPtr +1) += m * xcgbb * s->imag;
}
else
{ *(here->BSIM4v3GPdpPtr ) += m * xcgdb * s->real;
*(here->BSIM4v3GPdpPtr +1) += m * xcgdb * s->imag;
*(here->BSIM4v3GPdpPtr) -= m * (xgtd - gIgtotd);
*(here->BSIM4v3GPgpPtr ) += m * xcggb * s->real;
*(here->BSIM4v3GPgpPtr +1) += m * xcggb * s->imag;
*(here->BSIM4v3GPgpPtr) -= m * (xgtg - gIgtotg);
*(here->BSIM4v3GPspPtr ) += m * xcgsb * s->real;
*(here->BSIM4v3GPspPtr +1) += m * xcgsb * s->imag;
*(here->BSIM4v3GPspPtr) -= m * (xgts - gIgtots);
*(here->BSIM4v3GPbpPtr ) += m * xcgbb * s->real;
*(here->BSIM4v3GPbpPtr +1) += m * xcgbb * s->imag;
*(here->BSIM4v3GPbpPtr) -= m * (xgtb - gIgtotb);
}
if (model->BSIM4v3rdsMod)
{ (*(here->BSIM4v3DgpPtr) += m * gdtotg);
(*(here->BSIM4v3DspPtr) += m * gdtots);
(*(here->BSIM4v3DbpPtr) += m * gdtotb);
(*(here->BSIM4v3SdpPtr) += m * gstotd);
(*(here->BSIM4v3SgpPtr) += m * gstotg);
(*(here->BSIM4v3SbpPtr) += m * gstotb);
}
*(here->BSIM4v3DPdpPtr ) += m * xcddb * s->real;
*(here->BSIM4v3DPdpPtr +1) += m * xcddb * s->imag;
*(here->BSIM4v3DPdpPtr) += m * (gdpr + gds + here->BSIM4v3gbd
- gdtotd + RevSum + gbdpdp - gIdtotd
+ dxpart * xgtd + T1 * ddxpart_dVd);
*(here->BSIM4v3DPdPtr) -= m * (gdpr + gdtot);
*(here->BSIM4v3DPgpPtr ) += m * xcdgb * s->real;
*(here->BSIM4v3DPgpPtr +1) += m * xcdgb * s->imag;
*(here->BSIM4v3DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg
+ T1 * ddxpart_dVg + dxpart * xgtg);
*(here->BSIM4v3DPspPtr ) += m * xcdsb * s->real;
*(here->BSIM4v3DPspPtr +1) += m * xcdsb * s->imag;
*(here->BSIM4v3DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots
- T1 * ddxpart_dVs - dxpart * xgts);
*(here->BSIM4v3DPbpPtr ) += m * xcdbb * s->real;
*(here->BSIM4v3DPbpPtr +1) += m * xcdbb * s->imag;
*(here->BSIM4v3DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb
- T1 * ddxpart_dVb - dxpart * xgtb);
*(here->BSIM4v3DdpPtr) -= m * (gdpr - gdtotd);
*(here->BSIM4v3DdPtr) += m * (gdpr + gdtot);
*(here->BSIM4v3SPdpPtr ) += m * xcsdb * s->real;
*(here->BSIM4v3SPdpPtr +1) += m * xcsdb * s->imag;
*(here->BSIM4v3SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd
- T1 * dsxpart_dVd - sxpart * xgtd);
*(here->BSIM4v3SPgpPtr ) += m * xcsgb * s->real;
*(here->BSIM4v3SPgpPtr +1) += m * xcsgb * s->imag;
*(here->BSIM4v3SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg
- T1 * dsxpart_dVg - sxpart * xgtg);
*(here->BSIM4v3SPspPtr ) += m * xcssb * s->real;
*(here->BSIM4v3SPspPtr +1) += m * xcssb * s->imag;
*(here->BSIM4v3SPspPtr) += m * (gspr + gds + here->BSIM4v3gbs - gIstots
- gstots + FwdSum + gbspsp
+ sxpart * xgts + T1 * dsxpart_dVs);
*(here->BSIM4v3SPsPtr) -= m * (gspr + gstot);
*(here->BSIM4v3SPbpPtr ) += m * xcsbb * s->real;
*(here->BSIM4v3SPbpPtr +1) += m * xcsbb * s->imag;
*(here->BSIM4v3SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb
- T1 * dsxpart_dVb - sxpart * xgtb);
*(here->BSIM4v3SspPtr) -= m * (gspr - gstots);
*(here->BSIM4v3SsPtr) += m * (gspr + gstot);
*(here->BSIM4v3BPdpPtr ) += m * xcbdb * s->real;
*(here->BSIM4v3BPdpPtr +1) += m * xcbdb * s->imag;
*(here->BSIM4v3BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd);
*(here->BSIM4v3BPgpPtr ) += m * xcbgb * s->real;
*(here->BSIM4v3BPgpPtr +1) += m * xcbgb * s->imag;
*(here->BSIM4v3BPgpPtr) -= m * (here->BSIM4v3gbgs + gIbtotg);
*(here->BSIM4v3BPspPtr ) += m * xcbsb * s->real;
*(here->BSIM4v3BPspPtr +1) += m * xcbsb * s->imag;
*(here->BSIM4v3BPspPtr) -= m * (gjbs - gbbsp + gIbtots);
*(here->BSIM4v3BPbpPtr ) += m * xcbbb * s->real;
*(here->BSIM4v3BPbpPtr +1) += m * xcbbb * s->imag;
*(here->BSIM4v3BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v3gbbs
- gIbtotb);
ggidld = here->BSIM4v3ggidld;
ggidlg = here->BSIM4v3ggidlg;
ggidlb = here->BSIM4v3ggidlb;
ggislg = here->BSIM4v3ggislg;
ggisls = here->BSIM4v3ggisls;
ggislb = here->BSIM4v3ggislb;
/* stamp gidl */
(*(here->BSIM4v3DPdpPtr) += m * ggidld);
(*(here->BSIM4v3DPgpPtr) += m * ggidlg);
(*(here->BSIM4v3DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb));
(*(here->BSIM4v3DPbpPtr) += m * ggidlb);
(*(here->BSIM4v3BPdpPtr) -= m * ggidld);
(*(here->BSIM4v3BPgpPtr) -= m * ggidlg);
(*(here->BSIM4v3BPspPtr) += m * ((ggidlg + ggidld) + ggidlb));
(*(here->BSIM4v3BPbpPtr) -= m * ggidlb);
/* stamp gisl */
(*(here->BSIM4v3SPdpPtr) -= m * ((ggisls + ggislg) + ggislb));
(*(here->BSIM4v3SPgpPtr) += m * ggislg);
(*(here->BSIM4v3SPspPtr) += m * ggisls);
(*(here->BSIM4v3SPbpPtr) += m * ggislb);
(*(here->BSIM4v3BPdpPtr) += m * ((ggislg + ggisls) + ggislb));
(*(here->BSIM4v3BPgpPtr) -= m * ggislg);
(*(here->BSIM4v3BPspPtr) -= m * ggisls);
(*(here->BSIM4v3BPbpPtr) -= m * ggislb);
if (here->BSIM4v3rbodyMod)
{ (*(here->BSIM4v3DPdbPtr ) += m * xcdbdb * s->real);
(*(here->BSIM4v3DPdbPtr +1) += m * xcdbdb * s->imag);
(*(here->BSIM4v3DPdbPtr) -= m * here->BSIM4v3gbd);
(*(here->BSIM4v3SPsbPtr ) += m * xcsbsb * s->real);
(*(here->BSIM4v3SPsbPtr +1) += m * xcsbsb * s->imag);
(*(here->BSIM4v3SPsbPtr) -= m * here->BSIM4v3gbs);
(*(here->BSIM4v3DBdpPtr ) += m * xcdbdb * s->real);
(*(here->BSIM4v3DBdpPtr +1) += m * xcdbdb * s->imag);
(*(here->BSIM4v3DBdpPtr) -= m * here->BSIM4v3gbd);
(*(here->BSIM4v3DBdbPtr ) -= m * xcdbdb * s->real);
(*(here->BSIM4v3DBdbPtr +1) -= m * xcdbdb * s->imag);
(*(here->BSIM4v3DBdbPtr) += m * (here->BSIM4v3gbd + here->BSIM4v3grbpd
+ here->BSIM4v3grbdb));
(*(here->BSIM4v3DBbpPtr) -= m * here->BSIM4v3grbpd);
(*(here->BSIM4v3DBbPtr) -= m * here->BSIM4v3grbdb);
(*(here->BSIM4v3BPdbPtr) -= m * here->BSIM4v3grbpd);
(*(here->BSIM4v3BPbPtr) -= m * here->BSIM4v3grbpb);
(*(here->BSIM4v3BPsbPtr) -= m * here->BSIM4v3grbps);
(*(here->BSIM4v3BPbpPtr) += m * (here->BSIM4v3grbpd + here->BSIM4v3grbps
+ here->BSIM4v3grbpb));
/* WDL: (-here->BSIM4v3gbbs) already added to BPbpPtr */
(*(here->BSIM4v3SBspPtr ) += m * xcsbsb * s->real);
(*(here->BSIM4v3SBspPtr +1) += m * xcsbsb * s->imag);
(*(here->BSIM4v3SBspPtr) -= m * here->BSIM4v3gbs);
(*(here->BSIM4v3SBbpPtr) -= m * here->BSIM4v3grbps);
(*(here->BSIM4v3SBbPtr) -= m * here->BSIM4v3grbsb);
(*(here->BSIM4v3SBsbPtr ) -= m * xcsbsb * s->real);
(*(here->BSIM4v3SBsbPtr +1) -= m * xcsbsb * s->imag);
(*(here->BSIM4v3SBsbPtr) += m * (here->BSIM4v3gbs
+ here->BSIM4v3grbps + here->BSIM4v3grbsb));
(*(here->BSIM4v3BdbPtr) -= m * here->BSIM4v3grbdb);
(*(here->BSIM4v3BbpPtr) -= m * here->BSIM4v3grbpb);
(*(here->BSIM4v3BsbPtr) -= m * here->BSIM4v3grbsb);
(*(here->BSIM4v3BbPtr) += m * (here->BSIM4v3grbsb + here->BSIM4v3grbdb
+ here->BSIM4v3grbpb));
}
if (here->BSIM4v3acnqsMod)
{ *(here->BSIM4v3QqPtr ) += m * s->real * ScalingFactor;
*(here->BSIM4v3QqPtr +1) += m * s->imag * ScalingFactor;
*(here->BSIM4v3QgpPtr ) -= m * xcqgb * s->real;
*(here->BSIM4v3QgpPtr +1) -= m * xcqgb * s->imag;
*(here->BSIM4v3QdpPtr ) -= m * xcqdb * s->real;
*(here->BSIM4v3QdpPtr +1) -= m * xcqdb * s->imag;
*(here->BSIM4v3QbpPtr ) -= m * xcqbb * s->real;
*(here->BSIM4v3QbpPtr +1) -= m * xcqbb * s->imag;
*(here->BSIM4v3QspPtr ) -= m * xcqsb * s->real;
*(here->BSIM4v3QspPtr +1) -= m * xcqsb * s->imag;
*(here->BSIM4v3GPqPtr) -= m * here->BSIM4v3gtau;
*(here->BSIM4v3DPqPtr) += m * dxpart * here->BSIM4v3gtau;
*(here->BSIM4v3SPqPtr) += m * sxpart * here->BSIM4v3gtau;
*(here->BSIM4v3QqPtr) += m * here->BSIM4v3gtau;
*(here->BSIM4v3QgpPtr) += m * xgtg;
*(here->BSIM4v3QdpPtr) += m * xgtd;
*(here->BSIM4v3QbpPtr) += m * xgtb;
*(here->BSIM4v3QspPtr) += m * xgts;
}
}
}
return(OK);
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,60 +0,0 @@
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/
/**********
* Copyright 2003 Regents of the University of California. All rights reserved.
* File: b4v3check.c of BSIM4.3.0.
* Author: 2000 Weidong Liu
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu.
* Project Director: Prof. Chenming Hu.
**********/
#include "ngspice.h"
#include <stdio.h>
#include <math.h>
#include "cktdefs.h"
#include "bsim4v3def.h"
#include "sperror.h"
int
BSIM4v3trunc(
GENmodel *inModel,
CKTcircuit *ckt,
double *timeStep)
{
BSIM4v3model *model = (BSIM4v3model*)inModel;
BSIM4v3instance *here;
#ifdef STEPDEBUG
double debugtemp;
#endif /* STEPDEBUG */
for (; model != NULL; model = model->BSIM4v3nextModel)
{ for (here = model->BSIM4v3instances; here != NULL;
here = here->BSIM4v3nextInstance)
{
if (here->BSIM4v3owner != ARCHme) continue;
#ifdef STEPDEBUG
debugtemp = *timeStep;
#endif /* STEPDEBUG */
CKTterr(here->BSIM4v3qb,ckt,timeStep);
CKTterr(here->BSIM4v3qg,ckt,timeStep);
CKTterr(here->BSIM4v3qd,ckt,timeStep);
if (here->BSIM4v3trnqsMod)
CKTterr(here->BSIM4v3qcdump,ckt,timeStep);
if (here->BSIM4v3rbodyMod)
{ CKTterr(here->BSIM4v3qbs,ckt,timeStep);
CKTterr(here->BSIM4v3qbd,ckt,timeStep);
}
if (here->BSIM4v3rgateMod == 3)
CKTterr(here->BSIM4v3qgmid,ckt,timeStep);
#ifdef STEPDEBUG
if(debugtemp != *timeStep)
{ printf("device %s reduces step from %g to %g\n",
here->BSIM4v3name,debugtemp,*timeStep);
}
#endif /* STEPDEBUG */
}
}
return(OK);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
/**********
Copyright 2003 Regents of the University of California. All rights reserved.
Author: 2000 Weidong Liu
Author: 2001- Xuemei Xi
File: bsim4v3ext.h
**********/
extern int BSIM4v3acLoad(GENmodel *,CKTcircuit*);
extern int BSIM4v3ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
extern int BSIM4v3convTest(GENmodel *,CKTcircuit*);
extern int BSIM4v3delete(GENmodel*,IFuid,GENinstance**);
extern void BSIM4v3destroy(GENmodel**);
extern int BSIM4v3getic(GENmodel*,CKTcircuit*);
extern int BSIM4v3load(GENmodel*,CKTcircuit*);
extern int BSIM4v3mAsk(CKTcircuit*,GENmodel *,int, IFvalue*);
extern int BSIM4v3mDelete(GENmodel**,IFuid,GENmodel*);
extern int BSIM4v3mParam(int,IFvalue*,GENmodel*);
extern void BSIM4v3mosCap(CKTcircuit*, double, double, double, double,
double, double, double, double, double, double, double,
double, double, double, double, double, double, double*,
double*, double*, double*, double*, double*, double*, double*,
double*, double*, double*, double*, double*, double*, double*,
double*);
extern int BSIM4v3param(int,IFvalue*,GENinstance*,IFvalue*);
extern int BSIM4v3pzLoad(GENmodel*,CKTcircuit*,SPcomplex*);
extern int BSIM4v3setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int BSIM4v3temp(GENmodel*,CKTcircuit*);
extern int BSIM4v3trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM4v3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM4v3unsetup(GENmodel*,CKTcircuit*);

View File

@ -1,83 +0,0 @@
#include "config.h"
#include "devdefs.h"
#include "bsim4v3itf.h"
#include "bsim4v3ext.h"
#include "bsim4v3init.h"
SPICEdev BSIM4v3info = {
{
"BSIM4v3",
"Berkeley Short Channel IGFET Model-4",
&BSIM4v3nSize,
&BSIM4v3nSize,
BSIM4v3names,
&BSIM4v3pTSize,
BSIM4v3pTable,
&BSIM4v3mPTSize,
BSIM4v3mPTable,
#ifdef XSPICE
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
/*--------------------------- End of SDB fix -------------------------*/
#endif
DEV_DEFAULT
},
/* DEVparam */ BSIM4v3param,
/* DEVmodParam */ BSIM4v3mParam,
/* DEVload */ BSIM4v3load,
/* DEVsetup */ BSIM4v3setup,
/* DEVunsetup */ BSIM4v3unsetup,
/* DEVpzSetup */ BSIM4v3setup,
/* DEVtemperature*/ BSIM4v3temp,
/* DEVtrunc */ BSIM4v3trunc,
/* DEVfindBranch */ NULL,
/* DEVacLoad */ BSIM4v3acLoad,
/* DEVaccept */ NULL,
/* DEVdestroy */ BSIM4v3destroy,
/* DEVmodDelete */ BSIM4v3mDelete,
/* DEVdelete */ BSIM4v3delete,
/* DEVsetic */ BSIM4v3getic,
/* DEVask */ BSIM4v3ask,
/* DEVmodAsk */ BSIM4v3mAsk,
/* DEVpzLoad */ BSIM4v3pzLoad,
/* DEVconvTest */ BSIM4v3convTest,
/* DEVsenSetup */ NULL,
/* DEVsenLoad */ NULL,
/* DEVsenUpdate */ NULL,
/* DEVsenAcLoad */ NULL,
/* DEVsenPrint */ NULL,
/* DEVsenTrunc */ NULL,
/* DEVdisto */ NULL,
/* DEVnoise */ BSIM4v3noise,
#ifdef CIDER
NULL, /* DEVdump */
NULL, /* DEVacct */
#endif
/* DEVinstSize */ &BSIM4v3iSize,
/* DEVmodSize */ &BSIM4v3mSize
};
SPICEdev *
get_bsim4v3_info(void)
{
return &BSIM4v3info;
}

View File

@ -1,13 +0,0 @@
#ifndef _BSIM4V3INIT_H
#define _BSIM4V3INIT_H
extern IFparm BSIM4v3pTable[ ];
extern IFparm BSIM4v3mPTable[ ];
extern char *BSIM4v3names[ ];
extern int BSIM4v3pTSize;
extern int BSIM4v3mPTSize;
extern int BSIM4v3nSize;
extern int BSIM4v3iSize;
extern int BSIM4v3mSize;
#endif

View File

@ -1,13 +0,0 @@
/**********
Copyright 2003 Regents of the University of California. All rights reserved.
Author: 2000 Weidong Liu.
Author: 2001- Xuemei Xi
File: bsim4v3itf.h
**********/
#ifndef DEV_BSIM4V3
#define DEV_BSIM4V3
SPICEdev *get_bsim4v3_info(void);
#endif