Bsim 3v2 model is now in bsim3 directory. Multirevision code.
This commit is contained in:
parent
623418b603
commit
ae57bef3b4
|
|
@ -1,6 +0,0 @@
|
|||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
||||
*.lo
|
||||
*.la
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
2000-01-29 Paolo Nenzi <p.nenzi@ieee.org>
|
||||
* bsim3v2def.h : Added BSIM3V2owner to the BSIM3V2instance structure
|
||||
for compatibility with Cider. This spice uses a modificed version of
|
||||
devices, as desscribed in the CIDer package, for a "parallel"
|
||||
processing support.
|
||||
|
||||
* b3v2{acld,cvtest,getic,ld,pzld,set,temp,trunc}.c:
|
||||
added the check if the current instance is a task of this
|
||||
processor. This is part of the "parallel" support of Cider.
|
||||
|
||||
2000-01-16 Emmanuel Rouat <emmanuel.rouat@wanadoo.fr>
|
||||
|
||||
* *.c : replaced all FABS macros by the 'fabs' function
|
||||
|
||||
* *.c : had to rename structure bsim3SizeDependParam into
|
||||
BSIM3V2SizeDependParam for consistency
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
noinst_LIBRARIES = libbsim3v2.a
|
||||
|
||||
libbsim3v2_a_SOURCES = \
|
||||
b3v2.c \
|
||||
b3v2acld.c \
|
||||
b3v2ask.c \
|
||||
b3v2check.c \
|
||||
b3v2cvtest.c \
|
||||
b3v2del.c \
|
||||
b3v2dest.c \
|
||||
b3v2getic.c \
|
||||
b3v2ld.c \
|
||||
b3v2mask.c \
|
||||
b3v2mdel.c \
|
||||
b3v2mpar.c \
|
||||
b3v2noi.c \
|
||||
b3v2par.c \
|
||||
b3v2pzld.c \
|
||||
b3v2set.c \
|
||||
b3v2temp.c \
|
||||
b3v2trunc.c \
|
||||
bsim3v2def.h \
|
||||
bsim3v2ext.h \
|
||||
bsim3v2init.c \
|
||||
bsim3v2init.h \
|
||||
bsim3v2itf.h
|
||||
|
||||
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/include
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
|
@ -1,477 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Modified by Weidong Liu (1997-1998).
|
||||
File: b3v2.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "devdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "suffix.h"
|
||||
|
||||
IFparm BSIM3V2pTable[] = { /* parameters */
|
||||
IOP( "l", BSIM3V2_L, IF_REAL , "Length"),
|
||||
IOP( "w", BSIM3V2_W, IF_REAL , "Width"),
|
||||
IOP( "ad", BSIM3V2_AD, IF_REAL , "Drain area"),
|
||||
IOP( "as", BSIM3V2_AS, IF_REAL , "Source area"),
|
||||
IOP( "pd", BSIM3V2_PD, IF_REAL , "Drain perimeter"),
|
||||
IOP( "ps", BSIM3V2_PS, IF_REAL , "Source perimeter"),
|
||||
IOP( "nrd", BSIM3V2_NRD, IF_REAL , "Number of squares in drain"),
|
||||
IOP( "nrs", BSIM3V2_NRS, IF_REAL , "Number of squares in source"),
|
||||
IOP( "off", BSIM3V2_OFF, IF_FLAG , "Device is initially off"),
|
||||
IOP( "nqsmod", BSIM3V2_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"),
|
||||
IP( "ic", BSIM3V2_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"),
|
||||
OP( "gmbs", BSIM3V2_GMBS, IF_REAL, "Gmb"),
|
||||
OP( "gm", BSIM3V2_GM, IF_REAL, "Gm"),
|
||||
OP( "gds", BSIM3V2_GDS, IF_REAL, "Gds"),
|
||||
OP( "vdsat", BSIM3V2_VDSAT, IF_REAL, "Vdsat"),
|
||||
OP( "vth", BSIM3V2_VON, IF_REAL, "Vth"),
|
||||
OP( "id", BSIM3V2_CD, IF_REAL, "Ids"),
|
||||
OP( "vbs", BSIM3V2_VBS, IF_REAL, "Vbs"),
|
||||
OP( "vgs", BSIM3V2_VGS, IF_REAL, "Vgs"),
|
||||
OP( "vds", BSIM3V2_VDS, IF_REAL, "Vds"),
|
||||
};
|
||||
|
||||
IFparm BSIM3V2mPTable[] = { /* model parameters */
|
||||
IOP( "capmod", BSIM3V2_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"),
|
||||
IOP( "mobmod", BSIM3V2_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"),
|
||||
IOP( "noimod", BSIM3V2_MOD_NOIMOD, IF_INTEGER, "Noise model selector"),
|
||||
IOP( "paramchk", BSIM3V2_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"),
|
||||
IOP( "binunit", BSIM3V2_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"),
|
||||
IOP( "version", BSIM3V2_MOD_VERSION, IF_REAL, " parameter for model version"),
|
||||
IOP( "tox", BSIM3V2_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"),
|
||||
|
||||
IOP( "toxm", BSIM3V2_MOD_TOXM, IF_REAL, "Gate oxide thickness used in extraction"),
|
||||
IOP( "cdsc", BSIM3V2_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"),
|
||||
IOP( "cdscb", BSIM3V2_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"),
|
||||
IOP( "cdscd", BSIM3V2_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"),
|
||||
IOP( "cit", BSIM3V2_MOD_CIT, IF_REAL, "Interface state capacitance"),
|
||||
IOP( "nfactor", BSIM3V2_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"),
|
||||
IOP( "xj", BSIM3V2_MOD_XJ, IF_REAL, "Junction depth in meters"),
|
||||
IOP( "vsat", BSIM3V2_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"),
|
||||
IOP( "at", BSIM3V2_MOD_AT, IF_REAL, "Temperature coefficient of vsat"),
|
||||
IOP( "a0", BSIM3V2_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."),
|
||||
IOP( "ags", BSIM3V2_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."),
|
||||
IOP( "a1", BSIM3V2_MOD_A1, IF_REAL, "Non-saturation effect coefficient"),
|
||||
IOP( "a2", BSIM3V2_MOD_A2, IF_REAL, "Non-saturation effect coefficient"),
|
||||
IOP( "keta", BSIM3V2_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."),
|
||||
IOP( "nsub", BSIM3V2_MOD_NSUB, IF_REAL, "Substrate doping concentration"),
|
||||
IOP( "nch", BSIM3V2_MOD_NPEAK, IF_REAL, "Channel doping concentration"),
|
||||
IOP( "ngate", BSIM3V2_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"),
|
||||
IOP( "gamma1", BSIM3V2_MOD_GAMMA1, IF_REAL, "Vth body coefficient"),
|
||||
IOP( "gamma2", BSIM3V2_MOD_GAMMA2, IF_REAL, "Vth body coefficient"),
|
||||
IOP( "vbx", BSIM3V2_MOD_VBX, IF_REAL, "Vth transition body Voltage"),
|
||||
IOP( "vbm", BSIM3V2_MOD_VBM, IF_REAL, "Maximum body voltage"),
|
||||
|
||||
IOP( "xt", BSIM3V2_MOD_XT, IF_REAL, "Doping depth"),
|
||||
IOP( "k1", BSIM3V2_MOD_K1, IF_REAL, "Bulk effect coefficient 1"),
|
||||
IOP( "kt1", BSIM3V2_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"),
|
||||
IOP( "kt1l", BSIM3V2_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"),
|
||||
IOP( "kt2", BSIM3V2_MOD_KT2, IF_REAL, "Body-coefficient of kt1"),
|
||||
IOP( "k2", BSIM3V2_MOD_K2, IF_REAL, "Bulk effect coefficient 2"),
|
||||
IOP( "k3", BSIM3V2_MOD_K3, IF_REAL, "Narrow width effect coefficient"),
|
||||
IOP( "k3b", BSIM3V2_MOD_K3B, IF_REAL, "Body effect coefficient of k3"),
|
||||
IOP( "w0", BSIM3V2_MOD_W0, IF_REAL, "Narrow width effect parameter"),
|
||||
IOP( "nlx", BSIM3V2_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"),
|
||||
IOP( "dvt0", BSIM3V2_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"),
|
||||
IOP( "dvt1", BSIM3V2_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"),
|
||||
IOP( "dvt2", BSIM3V2_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"),
|
||||
IOP( "dvt0w", BSIM3V2_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"),
|
||||
IOP( "dvt1w", BSIM3V2_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"),
|
||||
IOP( "dvt2w", BSIM3V2_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"),
|
||||
IOP( "drout", BSIM3V2_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"),
|
||||
IOP( "dsub", BSIM3V2_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"),
|
||||
IOP( "vth0", BSIM3V2_MOD_VTH0, IF_REAL,"Threshold voltage"),
|
||||
IOP( "vtho", BSIM3V2_MOD_VTH0, IF_REAL,"Threshold voltage"),
|
||||
IOP( "ua", BSIM3V2_MOD_UA, IF_REAL, "Linear gate dependence of mobility"),
|
||||
IOP( "ua1", BSIM3V2_MOD_UA1, IF_REAL, "Temperature coefficient of ua"),
|
||||
IOP( "ub", BSIM3V2_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"),
|
||||
IOP( "ub1", BSIM3V2_MOD_UB1, IF_REAL, "Temperature coefficient of ub"),
|
||||
IOP( "uc", BSIM3V2_MOD_UC, IF_REAL, "Body-bias dependence of mobility"),
|
||||
IOP( "uc1", BSIM3V2_MOD_UC1, IF_REAL, "Temperature coefficient of uc"),
|
||||
IOP( "u0", BSIM3V2_MOD_U0, IF_REAL, "Low-field mobility at Tnom"),
|
||||
IOP( "ute", BSIM3V2_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"),
|
||||
IOP( "voff", BSIM3V2_MOD_VOFF, IF_REAL, "Threshold voltage offset"),
|
||||
IOP( "tnom", BSIM3V2_MOD_TNOM, IF_REAL, "Parameter measurement temperature"),
|
||||
IOP( "cgso", BSIM3V2_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"),
|
||||
IOP( "cgdo", BSIM3V2_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"),
|
||||
IOP( "cgbo", BSIM3V2_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"),
|
||||
IOP( "xpart", BSIM3V2_MOD_XPART, IF_REAL, "Channel charge partitioning"),
|
||||
IOP( "elm", BSIM3V2_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"),
|
||||
IOP( "delta", BSIM3V2_MOD_DELTA, IF_REAL, "Effective Vds parameter"),
|
||||
IOP( "rsh", BSIM3V2_MOD_RSH, IF_REAL, "Source-drain sheet resistance"),
|
||||
IOP( "rdsw", BSIM3V2_MOD_RDSW, IF_REAL, "Source-drain resistance per width"),
|
||||
|
||||
IOP( "prwg", BSIM3V2_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "),
|
||||
IOP( "prwb", BSIM3V2_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "),
|
||||
|
||||
IOP( "prt", BSIM3V2_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "),
|
||||
IOP( "eta0", BSIM3V2_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"),
|
||||
IOP( "etab", BSIM3V2_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"),
|
||||
IOP( "pclm", BSIM3V2_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"),
|
||||
IOP( "pdiblc1", BSIM3V2_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"),
|
||||
IOP( "pdiblc2", BSIM3V2_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"),
|
||||
IOP( "pdiblcb", BSIM3V2_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"),
|
||||
IOP( "pscbe1", BSIM3V2_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"),
|
||||
IOP( "pscbe2", BSIM3V2_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"),
|
||||
IOP( "pvag", BSIM3V2_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"),
|
||||
IOP( "js", BSIM3V2_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"),
|
||||
IOP( "jsw", BSIM3V2_MOD_JSW, IF_REAL, "Sidewall junction reverse saturation current density"),
|
||||
IOP( "pb", BSIM3V2_MOD_PB, IF_REAL, "Source/drain junction built-in potential"),
|
||||
IOP( "nj", BSIM3V2_MOD_NJ, IF_REAL, "Source/drain junction emission coefficient"),
|
||||
IOP( "xti", BSIM3V2_MOD_XTI, IF_REAL, "Junction current temperature exponent"),
|
||||
IOP( "mj", BSIM3V2_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"),
|
||||
IOP( "pbsw", BSIM3V2_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"),
|
||||
IOP( "mjsw", BSIM3V2_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"),
|
||||
IOP( "pbswg", BSIM3V2_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"),
|
||||
IOP( "mjswg", BSIM3V2_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"),
|
||||
IOP( "cj", BSIM3V2_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"),
|
||||
IOP( "vfbcv", BSIM3V2_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"),
|
||||
IOP( "vfb", BSIM3V2_MOD_VFB, IF_REAL, "Flat Band Voltage"),
|
||||
IOP( "cjsw", BSIM3V2_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit periphery"),
|
||||
IOP( "cjswg", BSIM3V2_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"),
|
||||
IOP( "tpb", BSIM3V2_MOD_TPB, IF_REAL, "Temperature coefficient of pb"),
|
||||
IOP( "tcj", BSIM3V2_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"),
|
||||
IOP( "tpbsw", BSIM3V2_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"),
|
||||
IOP( "tcjsw", BSIM3V2_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"),
|
||||
IOP( "tpbswg", BSIM3V2_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"),
|
||||
IOP( "tcjswg", BSIM3V2_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"),
|
||||
IOP( "acde", BSIM3V2_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"),
|
||||
IOP( "moin", BSIM3V2_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"),
|
||||
IOP( "noff", BSIM3V2_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"),
|
||||
IOP( "voffcv", BSIM3V2_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"),
|
||||
IOP( "lint", BSIM3V2_MOD_LINT, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "ll", BSIM3V2_MOD_LL, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "llc", BSIM3V2_MOD_LLC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP( "lln", BSIM3V2_MOD_LLN, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "lw", BSIM3V2_MOD_LW, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "lwc", BSIM3V2_MOD_LWC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP( "lwn", BSIM3V2_MOD_LWN, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "lwl", BSIM3V2_MOD_LWL, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "lwlc", BSIM3V2_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP( "lmin", BSIM3V2_MOD_LMIN, IF_REAL, "Minimum length for the model"),
|
||||
IOP( "lmax", BSIM3V2_MOD_LMAX, IF_REAL, "Maximum length for the model"),
|
||||
|
||||
IOP( "wr", BSIM3V2_MOD_WR, IF_REAL, "Width dependence of rds"),
|
||||
IOP( "wint", BSIM3V2_MOD_WINT, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "dwg", BSIM3V2_MOD_DWG, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "dwb", BSIM3V2_MOD_DWB, IF_REAL, "Width reduction parameter"),
|
||||
|
||||
IOP( "wl", BSIM3V2_MOD_WL, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "wlc", BSIM3V2_MOD_WLC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP( "wln", BSIM3V2_MOD_WLN, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "ww", BSIM3V2_MOD_WW, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "wwc", BSIM3V2_MOD_WWC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP( "wwn", BSIM3V2_MOD_WWN, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "wwl", BSIM3V2_MOD_WWL, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "wwlc", BSIM3V2_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP( "wmin", BSIM3V2_MOD_WMIN, IF_REAL, "Minimum width for the model"),
|
||||
IOP( "wmax", BSIM3V2_MOD_WMAX, IF_REAL, "Maximum width for the model"),
|
||||
|
||||
IOP( "b0", BSIM3V2_MOD_B0, IF_REAL, "Abulk narrow width parameter"),
|
||||
IOP( "b1", BSIM3V2_MOD_B1, IF_REAL, "Abulk narrow width parameter"),
|
||||
|
||||
IOP( "cgsl", BSIM3V2_MOD_CGSL, IF_REAL, "New C-V model parameter"),
|
||||
IOP( "cgdl", BSIM3V2_MOD_CGDL, IF_REAL, "New C-V model parameter"),
|
||||
IOP( "ckappa", BSIM3V2_MOD_CKAPPA, IF_REAL, "New C-V model parameter"),
|
||||
IOP( "cf", BSIM3V2_MOD_CF, IF_REAL, "Fringe capacitance parameter"),
|
||||
IOP( "clc", BSIM3V2_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"),
|
||||
IOP( "cle", BSIM3V2_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"),
|
||||
IOP( "dwc", BSIM3V2_MOD_DWC, IF_REAL, "Delta W for C-V model"),
|
||||
IOP( "dlc", BSIM3V2_MOD_DLC, IF_REAL, "Delta L for C-V model"),
|
||||
|
||||
IOP( "alpha0", BSIM3V2_MOD_ALPHA0, IF_REAL, "substrate current model parameter"),
|
||||
IOP( "alpha1", BSIM3V2_MOD_ALPHA1, IF_REAL, "substrate current model parameter"),
|
||||
IOP( "beta0", BSIM3V2_MOD_BETA0, IF_REAL, "substrate current model parameter"),
|
||||
IOP( "ijth", BSIM3V2_MOD_IJTH, IF_REAL, "Diode limiting current"),
|
||||
|
||||
IOP( "lcdsc", BSIM3V2_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"),
|
||||
IOP( "lcdscb", BSIM3V2_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"),
|
||||
IOP( "lcdscd", BSIM3V2_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"),
|
||||
IOP( "lcit", BSIM3V2_MOD_LCIT, IF_REAL, "Length dependence of cit"),
|
||||
IOP( "lnfactor", BSIM3V2_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"),
|
||||
IOP( "lxj", BSIM3V2_MOD_LXJ, IF_REAL, "Length dependence of xj"),
|
||||
IOP( "lvsat", BSIM3V2_MOD_LVSAT, IF_REAL, "Length dependence of vsat"),
|
||||
IOP( "lat", BSIM3V2_MOD_LAT, IF_REAL, "Length dependence of at"),
|
||||
IOP( "la0", BSIM3V2_MOD_LA0, IF_REAL, "Length dependence of a0"),
|
||||
IOP( "lags", BSIM3V2_MOD_LAGS, IF_REAL, "Length dependence of ags"),
|
||||
IOP( "la1", BSIM3V2_MOD_LA1, IF_REAL, "Length dependence of a1"),
|
||||
IOP( "la2", BSIM3V2_MOD_LA2, IF_REAL, "Length dependence of a2"),
|
||||
IOP( "lketa", BSIM3V2_MOD_LKETA, IF_REAL, "Length dependence of keta"),
|
||||
IOP( "lnsub", BSIM3V2_MOD_LNSUB, IF_REAL, "Length dependence of nsub"),
|
||||
IOP( "lnch", BSIM3V2_MOD_LNPEAK, IF_REAL, "Length dependence of nch"),
|
||||
IOP( "lngate", BSIM3V2_MOD_LNGATE, IF_REAL, "Length dependence of ngate"),
|
||||
IOP( "lgamma1", BSIM3V2_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"),
|
||||
IOP( "lgamma2", BSIM3V2_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"),
|
||||
IOP( "lvbx", BSIM3V2_MOD_LVBX, IF_REAL, "Length dependence of vbx"),
|
||||
IOP( "lvbm", BSIM3V2_MOD_LVBM, IF_REAL, "Length dependence of vbm"),
|
||||
IOP( "lxt", BSIM3V2_MOD_LXT, IF_REAL, "Length dependence of xt"),
|
||||
IOP( "lk1", BSIM3V2_MOD_LK1, IF_REAL, "Length dependence of k1"),
|
||||
IOP( "lkt1", BSIM3V2_MOD_LKT1, IF_REAL, "Length dependence of kt1"),
|
||||
IOP( "lkt1l", BSIM3V2_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"),
|
||||
IOP( "lkt2", BSIM3V2_MOD_LKT2, IF_REAL, "Length dependence of kt2"),
|
||||
IOP( "lk2", BSIM3V2_MOD_LK2, IF_REAL, "Length dependence of k2"),
|
||||
IOP( "lk3", BSIM3V2_MOD_LK3, IF_REAL, "Length dependence of k3"),
|
||||
IOP( "lk3b", BSIM3V2_MOD_LK3B, IF_REAL, "Length dependence of k3b"),
|
||||
IOP( "lw0", BSIM3V2_MOD_LW0, IF_REAL, "Length dependence of w0"),
|
||||
IOP( "lnlx", BSIM3V2_MOD_LNLX, IF_REAL, "Length dependence of nlx"),
|
||||
IOP( "ldvt0", BSIM3V2_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"),
|
||||
IOP( "ldvt1", BSIM3V2_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"),
|
||||
IOP( "ldvt2", BSIM3V2_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"),
|
||||
IOP( "ldvt0w", BSIM3V2_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"),
|
||||
IOP( "ldvt1w", BSIM3V2_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"),
|
||||
IOP( "ldvt2w", BSIM3V2_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"),
|
||||
IOP( "ldrout", BSIM3V2_MOD_LDROUT, IF_REAL, "Length dependence of drout"),
|
||||
IOP( "ldsub", BSIM3V2_MOD_LDSUB, IF_REAL, "Length dependence of dsub"),
|
||||
IOP( "lvth0", BSIM3V2_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
|
||||
IOP( "lvtho", BSIM3V2_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
|
||||
IOP( "lua", BSIM3V2_MOD_LUA, IF_REAL, "Length dependence of ua"),
|
||||
IOP( "lua1", BSIM3V2_MOD_LUA1, IF_REAL, "Length dependence of ua1"),
|
||||
IOP( "lub", BSIM3V2_MOD_LUB, IF_REAL, "Length dependence of ub"),
|
||||
IOP( "lub1", BSIM3V2_MOD_LUB1, IF_REAL, "Length dependence of ub1"),
|
||||
IOP( "luc", BSIM3V2_MOD_LUC, IF_REAL, "Length dependence of uc"),
|
||||
IOP( "luc1", BSIM3V2_MOD_LUC1, IF_REAL, "Length dependence of uc1"),
|
||||
IOP( "lu0", BSIM3V2_MOD_LU0, IF_REAL, "Length dependence of u0"),
|
||||
IOP( "lute", BSIM3V2_MOD_LUTE, IF_REAL, "Length dependence of ute"),
|
||||
IOP( "lvoff", BSIM3V2_MOD_LVOFF, IF_REAL, "Length dependence of voff"),
|
||||
IOP( "lelm", BSIM3V2_MOD_LELM, IF_REAL, "Length dependence of elm"),
|
||||
IOP( "ldelta", BSIM3V2_MOD_LDELTA, IF_REAL, "Length dependence of delta"),
|
||||
IOP( "lrdsw", BSIM3V2_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "),
|
||||
|
||||
IOP( "lprwg", BSIM3V2_MOD_LPRWG, IF_REAL, "Length dependence of prwg "),
|
||||
IOP( "lprwb", BSIM3V2_MOD_LPRWB, IF_REAL, "Length dependence of prwb "),
|
||||
|
||||
IOP( "lprt", BSIM3V2_MOD_LPRT, IF_REAL, "Length dependence of prt "),
|
||||
IOP( "leta0", BSIM3V2_MOD_LETA0, IF_REAL, "Length dependence of eta0"),
|
||||
IOP( "letab", BSIM3V2_MOD_LETAB, IF_REAL, "Length dependence of etab"),
|
||||
IOP( "lpclm", BSIM3V2_MOD_LPCLM, IF_REAL, "Length dependence of pclm"),
|
||||
IOP( "lpdiblc1", BSIM3V2_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"),
|
||||
IOP( "lpdiblc2", BSIM3V2_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"),
|
||||
IOP( "lpdiblcb", BSIM3V2_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"),
|
||||
IOP( "lpscbe1", BSIM3V2_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"),
|
||||
IOP( "lpscbe2", BSIM3V2_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"),
|
||||
IOP( "lpvag", BSIM3V2_MOD_LPVAG, IF_REAL, "Length dependence of pvag"),
|
||||
IOP( "lwr", BSIM3V2_MOD_LWR, IF_REAL, "Length dependence of wr"),
|
||||
IOP( "ldwg", BSIM3V2_MOD_LDWG, IF_REAL, "Length dependence of dwg"),
|
||||
IOP( "ldwb", BSIM3V2_MOD_LDWB, IF_REAL, "Length dependence of dwb"),
|
||||
IOP( "lb0", BSIM3V2_MOD_LB0, IF_REAL, "Length dependence of b0"),
|
||||
IOP( "lb1", BSIM3V2_MOD_LB1, IF_REAL, "Length dependence of b1"),
|
||||
IOP( "lcgsl", BSIM3V2_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"),
|
||||
IOP( "lcgdl", BSIM3V2_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"),
|
||||
IOP( "lckappa", BSIM3V2_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"),
|
||||
IOP( "lcf", BSIM3V2_MOD_LCF, IF_REAL, "Length dependence of cf"),
|
||||
IOP( "lclc", BSIM3V2_MOD_LCLC, IF_REAL, "Length dependence of clc"),
|
||||
IOP( "lcle", BSIM3V2_MOD_LCLE, IF_REAL, "Length dependence of cle"),
|
||||
IOP( "lalpha0", BSIM3V2_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"),
|
||||
IOP( "lalpha1", BSIM3V2_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"),
|
||||
IOP( "lbeta0", BSIM3V2_MOD_LBETA0, IF_REAL, "Length dependence of beta0"),
|
||||
IOP( "lvfbcv", BSIM3V2_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"),
|
||||
IOP( "lvfb", BSIM3V2_MOD_LVFB, IF_REAL, "Length dependence of vfb"),
|
||||
IOP( "lacde", BSIM3V2_MOD_LACDE, IF_REAL, "Length dependence of acde"),
|
||||
IOP( "lmoin", BSIM3V2_MOD_LMOIN, IF_REAL, "Length dependence of moin"),
|
||||
IOP( "lnoff", BSIM3V2_MOD_LNOFF, IF_REAL, "Length dependence of noff"),
|
||||
IOP( "lvoffcv", BSIM3V2_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"),
|
||||
IOP( "wcdsc", BSIM3V2_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"),
|
||||
IOP( "wcdscb", BSIM3V2_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"),
|
||||
IOP( "wcdscd", BSIM3V2_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"),
|
||||
IOP( "wcit", BSIM3V2_MOD_WCIT, IF_REAL, "Width dependence of cit"),
|
||||
IOP( "wnfactor", BSIM3V2_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"),
|
||||
IOP( "wxj", BSIM3V2_MOD_WXJ, IF_REAL, "Width dependence of xj"),
|
||||
IOP( "wvsat", BSIM3V2_MOD_WVSAT, IF_REAL, "Width dependence of vsat"),
|
||||
IOP( "wat", BSIM3V2_MOD_WAT, IF_REAL, "Width dependence of at"),
|
||||
IOP( "wa0", BSIM3V2_MOD_WA0, IF_REAL, "Width dependence of a0"),
|
||||
IOP( "wags", BSIM3V2_MOD_WAGS, IF_REAL, "Width dependence of ags"),
|
||||
IOP( "wa1", BSIM3V2_MOD_WA1, IF_REAL, "Width dependence of a1"),
|
||||
IOP( "wa2", BSIM3V2_MOD_WA2, IF_REAL, "Width dependence of a2"),
|
||||
IOP( "wketa", BSIM3V2_MOD_WKETA, IF_REAL, "Width dependence of keta"),
|
||||
IOP( "wnsub", BSIM3V2_MOD_WNSUB, IF_REAL, "Width dependence of nsub"),
|
||||
IOP( "wnch", BSIM3V2_MOD_WNPEAK, IF_REAL, "Width dependence of nch"),
|
||||
IOP( "wngate", BSIM3V2_MOD_WNGATE, IF_REAL, "Width dependence of ngate"),
|
||||
IOP( "wgamma1", BSIM3V2_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"),
|
||||
IOP( "wgamma2", BSIM3V2_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"),
|
||||
IOP( "wvbx", BSIM3V2_MOD_WVBX, IF_REAL, "Width dependence of vbx"),
|
||||
IOP( "wvbm", BSIM3V2_MOD_WVBM, IF_REAL, "Width dependence of vbm"),
|
||||
IOP( "wxt", BSIM3V2_MOD_WXT, IF_REAL, "Width dependence of xt"),
|
||||
IOP( "wk1", BSIM3V2_MOD_WK1, IF_REAL, "Width dependence of k1"),
|
||||
IOP( "wkt1", BSIM3V2_MOD_WKT1, IF_REAL, "Width dependence of kt1"),
|
||||
IOP( "wkt1l", BSIM3V2_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"),
|
||||
IOP( "wkt2", BSIM3V2_MOD_WKT2, IF_REAL, "Width dependence of kt2"),
|
||||
IOP( "wk2", BSIM3V2_MOD_WK2, IF_REAL, "Width dependence of k2"),
|
||||
IOP( "wk3", BSIM3V2_MOD_WK3, IF_REAL, "Width dependence of k3"),
|
||||
IOP( "wk3b", BSIM3V2_MOD_WK3B, IF_REAL, "Width dependence of k3b"),
|
||||
IOP( "ww0", BSIM3V2_MOD_WW0, IF_REAL, "Width dependence of w0"),
|
||||
IOP( "wnlx", BSIM3V2_MOD_WNLX, IF_REAL, "Width dependence of nlx"),
|
||||
IOP( "wdvt0", BSIM3V2_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"),
|
||||
IOP( "wdvt1", BSIM3V2_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"),
|
||||
IOP( "wdvt2", BSIM3V2_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"),
|
||||
IOP( "wdvt0w", BSIM3V2_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"),
|
||||
IOP( "wdvt1w", BSIM3V2_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"),
|
||||
IOP( "wdvt2w", BSIM3V2_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"),
|
||||
IOP( "wdrout", BSIM3V2_MOD_WDROUT, IF_REAL, "Width dependence of drout"),
|
||||
IOP( "wdsub", BSIM3V2_MOD_WDSUB, IF_REAL, "Width dependence of dsub"),
|
||||
IOP( "wvth0", BSIM3V2_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
|
||||
IOP( "wvtho", BSIM3V2_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
|
||||
IOP( "wua", BSIM3V2_MOD_WUA, IF_REAL, "Width dependence of ua"),
|
||||
IOP( "wua1", BSIM3V2_MOD_WUA1, IF_REAL, "Width dependence of ua1"),
|
||||
IOP( "wub", BSIM3V2_MOD_WUB, IF_REAL, "Width dependence of ub"),
|
||||
IOP( "wub1", BSIM3V2_MOD_WUB1, IF_REAL, "Width dependence of ub1"),
|
||||
IOP( "wuc", BSIM3V2_MOD_WUC, IF_REAL, "Width dependence of uc"),
|
||||
IOP( "wuc1", BSIM3V2_MOD_WUC1, IF_REAL, "Width dependence of uc1"),
|
||||
IOP( "wu0", BSIM3V2_MOD_WU0, IF_REAL, "Width dependence of u0"),
|
||||
IOP( "wute", BSIM3V2_MOD_WUTE, IF_REAL, "Width dependence of ute"),
|
||||
IOP( "wvoff", BSIM3V2_MOD_WVOFF, IF_REAL, "Width dependence of voff"),
|
||||
IOP( "welm", BSIM3V2_MOD_WELM, IF_REAL, "Width dependence of elm"),
|
||||
IOP( "wdelta", BSIM3V2_MOD_WDELTA, IF_REAL, "Width dependence of delta"),
|
||||
IOP( "wrdsw", BSIM3V2_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "),
|
||||
|
||||
IOP( "wprwg", BSIM3V2_MOD_WPRWG, IF_REAL, "Width dependence of prwg "),
|
||||
IOP( "wprwb", BSIM3V2_MOD_WPRWB, IF_REAL, "Width dependence of prwb "),
|
||||
|
||||
IOP( "wprt", BSIM3V2_MOD_WPRT, IF_REAL, "Width dependence of prt"),
|
||||
IOP( "weta0", BSIM3V2_MOD_WETA0, IF_REAL, "Width dependence of eta0"),
|
||||
IOP( "wetab", BSIM3V2_MOD_WETAB, IF_REAL, "Width dependence of etab"),
|
||||
IOP( "wpclm", BSIM3V2_MOD_WPCLM, IF_REAL, "Width dependence of pclm"),
|
||||
IOP( "wpdiblc1", BSIM3V2_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"),
|
||||
IOP( "wpdiblc2", BSIM3V2_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"),
|
||||
IOP( "wpdiblcb", BSIM3V2_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"),
|
||||
IOP( "wpscbe1", BSIM3V2_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"),
|
||||
IOP( "wpscbe2", BSIM3V2_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"),
|
||||
IOP( "wpvag", BSIM3V2_MOD_WPVAG, IF_REAL, "Width dependence of pvag"),
|
||||
IOP( "wwr", BSIM3V2_MOD_WWR, IF_REAL, "Width dependence of wr"),
|
||||
IOP( "wdwg", BSIM3V2_MOD_WDWG, IF_REAL, "Width dependence of dwg"),
|
||||
IOP( "wdwb", BSIM3V2_MOD_WDWB, IF_REAL, "Width dependence of dwb"),
|
||||
IOP( "wb0", BSIM3V2_MOD_WB0, IF_REAL, "Width dependence of b0"),
|
||||
IOP( "wb1", BSIM3V2_MOD_WB1, IF_REAL, "Width dependence of b1"),
|
||||
IOP( "wcgsl", BSIM3V2_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"),
|
||||
IOP( "wcgdl", BSIM3V2_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"),
|
||||
IOP( "wckappa", BSIM3V2_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"),
|
||||
IOP( "wcf", BSIM3V2_MOD_WCF, IF_REAL, "Width dependence of cf"),
|
||||
IOP( "wclc", BSIM3V2_MOD_WCLC, IF_REAL, "Width dependence of clc"),
|
||||
IOP( "wcle", BSIM3V2_MOD_WCLE, IF_REAL, "Width dependence of cle"),
|
||||
IOP( "walpha0", BSIM3V2_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"),
|
||||
IOP( "walpha1", BSIM3V2_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"),
|
||||
IOP( "wbeta0", BSIM3V2_MOD_WBETA0, IF_REAL, "Width dependence of beta0"),
|
||||
IOP( "wvfbcv", BSIM3V2_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"),
|
||||
IOP( "wvfb", BSIM3V2_MOD_WVFB, IF_REAL, "Width dependence of vfb"),
|
||||
IOP( "wacde", BSIM3V2_MOD_WACDE, IF_REAL, "Width dependence of acde"),
|
||||
IOP( "wmoin", BSIM3V2_MOD_WMOIN, IF_REAL, "Width dependence of moin"),
|
||||
IOP( "wnoff", BSIM3V2_MOD_WNOFF, IF_REAL, "Width dependence of noff"),
|
||||
IOP( "wvoffcv", BSIM3V2_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"),
|
||||
|
||||
IOP( "pcdsc", BSIM3V2_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"),
|
||||
IOP( "pcdscb", BSIM3V2_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"),
|
||||
IOP( "pcdscd", BSIM3V2_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"),
|
||||
IOP( "pcit", BSIM3V2_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"),
|
||||
IOP( "pnfactor", BSIM3V2_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"),
|
||||
IOP( "pxj", BSIM3V2_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"),
|
||||
IOP( "pvsat", BSIM3V2_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"),
|
||||
IOP( "pat", BSIM3V2_MOD_PAT, IF_REAL, "Cross-term dependence of at"),
|
||||
IOP( "pa0", BSIM3V2_MOD_PA0, IF_REAL, "Cross-term dependence of a0"),
|
||||
IOP( "pags", BSIM3V2_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"),
|
||||
IOP( "pa1", BSIM3V2_MOD_PA1, IF_REAL, "Cross-term dependence of a1"),
|
||||
IOP( "pa2", BSIM3V2_MOD_PA2, IF_REAL, "Cross-term dependence of a2"),
|
||||
IOP( "pketa", BSIM3V2_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"),
|
||||
IOP( "pnsub", BSIM3V2_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"),
|
||||
IOP( "pnch", BSIM3V2_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"),
|
||||
IOP( "pngate", BSIM3V2_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"),
|
||||
IOP( "pgamma1", BSIM3V2_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"),
|
||||
IOP( "pgamma2", BSIM3V2_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"),
|
||||
IOP( "pvbx", BSIM3V2_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"),
|
||||
IOP( "pvbm", BSIM3V2_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"),
|
||||
IOP( "pxt", BSIM3V2_MOD_PXT, IF_REAL, "Cross-term dependence of xt"),
|
||||
IOP( "pk1", BSIM3V2_MOD_PK1, IF_REAL, "Cross-term dependence of k1"),
|
||||
IOP( "pkt1", BSIM3V2_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"),
|
||||
IOP( "pkt1l", BSIM3V2_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"),
|
||||
IOP( "pkt2", BSIM3V2_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"),
|
||||
IOP( "pk2", BSIM3V2_MOD_PK2, IF_REAL, "Cross-term dependence of k2"),
|
||||
IOP( "pk3", BSIM3V2_MOD_PK3, IF_REAL, "Cross-term dependence of k3"),
|
||||
IOP( "pk3b", BSIM3V2_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"),
|
||||
IOP( "pw0", BSIM3V2_MOD_PW0, IF_REAL, "Cross-term dependence of w0"),
|
||||
IOP( "pnlx", BSIM3V2_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"),
|
||||
IOP( "pdvt0", BSIM3V2_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"),
|
||||
IOP( "pdvt1", BSIM3V2_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"),
|
||||
IOP( "pdvt2", BSIM3V2_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"),
|
||||
IOP( "pdvt0w", BSIM3V2_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"),
|
||||
IOP( "pdvt1w", BSIM3V2_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"),
|
||||
IOP( "pdvt2w", BSIM3V2_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"),
|
||||
IOP( "pdrout", BSIM3V2_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"),
|
||||
IOP( "pdsub", BSIM3V2_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"),
|
||||
IOP( "pvth0", BSIM3V2_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
|
||||
IOP( "pvtho", BSIM3V2_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
|
||||
IOP( "pua", BSIM3V2_MOD_PUA, IF_REAL, "Cross-term dependence of ua"),
|
||||
IOP( "pua1", BSIM3V2_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"),
|
||||
IOP( "pub", BSIM3V2_MOD_PUB, IF_REAL, "Cross-term dependence of ub"),
|
||||
IOP( "pub1", BSIM3V2_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"),
|
||||
IOP( "puc", BSIM3V2_MOD_PUC, IF_REAL, "Cross-term dependence of uc"),
|
||||
IOP( "puc1", BSIM3V2_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"),
|
||||
IOP( "pu0", BSIM3V2_MOD_PU0, IF_REAL, "Cross-term dependence of u0"),
|
||||
IOP( "pute", BSIM3V2_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"),
|
||||
IOP( "pvoff", BSIM3V2_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"),
|
||||
IOP( "pelm", BSIM3V2_MOD_PELM, IF_REAL, "Cross-term dependence of elm"),
|
||||
IOP( "pdelta", BSIM3V2_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"),
|
||||
IOP( "prdsw", BSIM3V2_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "),
|
||||
|
||||
IOP( "pprwg", BSIM3V2_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "),
|
||||
IOP( "pprwb", BSIM3V2_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "),
|
||||
|
||||
IOP( "pprt", BSIM3V2_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "),
|
||||
IOP( "peta0", BSIM3V2_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"),
|
||||
IOP( "petab", BSIM3V2_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"),
|
||||
IOP( "ppclm", BSIM3V2_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"),
|
||||
IOP( "ppdiblc1", BSIM3V2_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"),
|
||||
IOP( "ppdiblc2", BSIM3V2_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"),
|
||||
IOP( "ppdiblcb", BSIM3V2_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"),
|
||||
IOP( "ppscbe1", BSIM3V2_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"),
|
||||
IOP( "ppscbe2", BSIM3V2_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"),
|
||||
IOP( "ppvag", BSIM3V2_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"),
|
||||
IOP( "pwr", BSIM3V2_MOD_PWR, IF_REAL, "Cross-term dependence of wr"),
|
||||
IOP( "pdwg", BSIM3V2_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"),
|
||||
IOP( "pdwb", BSIM3V2_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"),
|
||||
IOP( "pb0", BSIM3V2_MOD_PB0, IF_REAL, "Cross-term dependence of b0"),
|
||||
IOP( "pb1", BSIM3V2_MOD_PB1, IF_REAL, "Cross-term dependence of b1"),
|
||||
IOP( "pcgsl", BSIM3V2_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"),
|
||||
IOP( "pcgdl", BSIM3V2_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"),
|
||||
IOP( "pckappa", BSIM3V2_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"),
|
||||
IOP( "pcf", BSIM3V2_MOD_PCF, IF_REAL, "Cross-term dependence of cf"),
|
||||
IOP( "pclc", BSIM3V2_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"),
|
||||
IOP( "pcle", BSIM3V2_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"),
|
||||
IOP( "palpha0", BSIM3V2_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"),
|
||||
IOP( "palpha1", BSIM3V2_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"),
|
||||
IOP( "pbeta0", BSIM3V2_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"),
|
||||
IOP( "pvfbcv", BSIM3V2_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"),
|
||||
IOP( "pvfb", BSIM3V2_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"),
|
||||
IOP( "pacde", BSIM3V2_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"),
|
||||
IOP( "pmoin", BSIM3V2_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"),
|
||||
IOP( "pnoff", BSIM3V2_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"),
|
||||
IOP( "pvoffcv", BSIM3V2_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"),
|
||||
|
||||
IOP( "noia", BSIM3V2_MOD_NOIA, IF_REAL, "Flicker noise parameter"),
|
||||
IOP( "noib", BSIM3V2_MOD_NOIB, IF_REAL, "Flicker noise parameter"),
|
||||
IOP( "noic", BSIM3V2_MOD_NOIC, IF_REAL, "Flicker noise parameter"),
|
||||
IOP( "em", BSIM3V2_MOD_EM, IF_REAL, "Flicker noise parameter"),
|
||||
IOP( "ef", BSIM3V2_MOD_EF, IF_REAL, "Flicker noise frequency exponent"),
|
||||
IOP( "af", BSIM3V2_MOD_AF, IF_REAL, "Flicker noise exponent"),
|
||||
IOP( "kf", BSIM3V2_MOD_KF, IF_REAL, "Flicker noise coefficient"),
|
||||
|
||||
IP( "nmos", BSIM3V2_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"),
|
||||
IP( "pmos", BSIM3V2_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"),
|
||||
};
|
||||
|
||||
char *BSIM3V2names[] = {
|
||||
"Drain",
|
||||
"Gate",
|
||||
"Source",
|
||||
"Bulk",
|
||||
"Charge"
|
||||
};
|
||||
|
||||
int BSIM3V2nSize = NUMELEMS(BSIM3V2names);
|
||||
int BSIM3V2pTSize = NUMELEMS(BSIM3V2pTable);
|
||||
int BSIM3V2mPTSize = NUMELEMS(BSIM3V2mPTable);
|
||||
int BSIM3V2iSize = sizeof(BSIM3V2instance);
|
||||
int BSIM3V2mSize = sizeof(BSIM3V2model);
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,337 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Modified by Weidong Liu (1997-1998).
|
||||
File: b3acld.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3V2acLoad(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
{
|
||||
BSIM3V2model *model = (BSIM3V2model*)inModel;
|
||||
BSIM3V2instance *here;
|
||||
double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb;
|
||||
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb;
|
||||
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega;
|
||||
double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm, Gmbs;
|
||||
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb, xcqbb;
|
||||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
|
||||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
|
||||
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
|
||||
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
|
||||
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->BSIM3V2nextModel)
|
||||
{ for (here = model->BSIM3V2instances; here!= NULL;
|
||||
here = here->BSIM3V2nextInstance)
|
||||
|
||||
{ if (here->BSIM3V2owner != ARCHme) continue;
|
||||
if (here->BSIM3V2mode >= 0)
|
||||
{ Gm = here->BSIM3V2gm;
|
||||
Gmbs = here->BSIM3V2gmbs;
|
||||
FwdSum = Gm + Gmbs;
|
||||
RevSum = 0.0;
|
||||
|
||||
gbbdp = -here->BSIM3V2gbds;
|
||||
gbbsp = here->BSIM3V2gbds + here->BSIM3V2gbgs + here->BSIM3V2gbbs;
|
||||
|
||||
gbdpg = here->BSIM3V2gbgs;
|
||||
gbdpb = here->BSIM3V2gbbs;
|
||||
gbdpdp = here->BSIM3V2gbds;
|
||||
gbdpsp = -(gbdpg + gbdpb + gbdpdp);
|
||||
|
||||
gbspdp = 0.0;
|
||||
gbspg = 0.0;
|
||||
gbspb = 0.0;
|
||||
gbspsp = 0.0;
|
||||
|
||||
if (here->BSIM3V2nqsMod == 0)
|
||||
{ cggb = here->BSIM3V2cggb;
|
||||
cgsb = here->BSIM3V2cgsb;
|
||||
cgdb = here->BSIM3V2cgdb;
|
||||
|
||||
cbgb = here->BSIM3V2cbgb;
|
||||
cbsb = here->BSIM3V2cbsb;
|
||||
cbdb = here->BSIM3V2cbdb;
|
||||
|
||||
cdgb = here->BSIM3V2cdgb;
|
||||
cdsb = here->BSIM3V2cdsb;
|
||||
cddb = here->BSIM3V2cddb;
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.6;
|
||||
dxpart = 0.4;
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3V2gtg;
|
||||
xgtd = here->BSIM3V2gtd;
|
||||
xgts = here->BSIM3V2gts;
|
||||
xgtb = here->BSIM3V2gtb;
|
||||
|
||||
xcqgb = here->BSIM3V2cqgb * omega;
|
||||
xcqdb = here->BSIM3V2cqdb * omega;
|
||||
xcqsb = here->BSIM3V2cqsb * omega;
|
||||
xcqbb = here->BSIM3V2cqbb * omega;
|
||||
|
||||
CoxWL = model->BSIM3V2cox * here->pParam->BSIM3V2weffCV
|
||||
* here->pParam->BSIM3V2leffCV;
|
||||
qcheq = -(here->BSIM3V2qgate + here->BSIM3V2qbulk);
|
||||
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
|
||||
{ if (model->BSIM3V2xpart < 0.5)
|
||||
{ dxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3V2xpart > 0.5)
|
||||
{ dxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{ dxpart = 0.5;
|
||||
}
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ dxpart = here->BSIM3V2qdrn / qcheq;
|
||||
Cdd = here->BSIM3V2cddb;
|
||||
Csd = -(here->BSIM3V2cgdb + here->BSIM3V2cddb
|
||||
+ here->BSIM3V2cbdb);
|
||||
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq;
|
||||
Cdg = here->BSIM3V2cdgb;
|
||||
Csg = -(here->BSIM3V2cggb + here->BSIM3V2cdgb
|
||||
+ here->BSIM3V2cbgb);
|
||||
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq;
|
||||
|
||||
Cds = here->BSIM3V2cdsb;
|
||||
Css = -(here->BSIM3V2cgsb + here->BSIM3V2cdsb
|
||||
+ here->BSIM3V2cbsb);
|
||||
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->BSIM3V2gm;
|
||||
Gmbs = -here->BSIM3V2gmbs;
|
||||
FwdSum = 0.0;
|
||||
RevSum = -(Gm + Gmbs);
|
||||
|
||||
gbbsp = -here->BSIM3V2gbds;
|
||||
gbbdp = here->BSIM3V2gbds + here->BSIM3V2gbgs + here->BSIM3V2gbbs;
|
||||
|
||||
gbdpg = 0.0;
|
||||
gbdpsp = 0.0;
|
||||
gbdpb = 0.0;
|
||||
gbdpdp = 0.0;
|
||||
|
||||
gbspg = here->BSIM3V2gbgs;
|
||||
gbspsp = here->BSIM3V2gbds;
|
||||
gbspb = here->BSIM3V2gbbs;
|
||||
gbspdp = -(gbspg + gbspsp + gbspb);
|
||||
|
||||
if (here->BSIM3V2nqsMod == 0)
|
||||
{ cggb = here->BSIM3V2cggb;
|
||||
cgsb = here->BSIM3V2cgdb;
|
||||
cgdb = here->BSIM3V2cgsb;
|
||||
|
||||
cbgb = here->BSIM3V2cbgb;
|
||||
cbsb = here->BSIM3V2cbdb;
|
||||
cbdb = here->BSIM3V2cbsb;
|
||||
|
||||
cdgb = -(here->BSIM3V2cdgb + cggb + cbgb);
|
||||
cdsb = -(here->BSIM3V2cddb + cgsb + cbsb);
|
||||
cddb = -(here->BSIM3V2cdsb + cgdb + cbdb);
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.4;
|
||||
dxpart = 0.6;
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3V2gtg;
|
||||
xgtd = here->BSIM3V2gts;
|
||||
xgts = here->BSIM3V2gtd;
|
||||
xgtb = here->BSIM3V2gtb;
|
||||
|
||||
xcqgb = here->BSIM3V2cqgb * omega;
|
||||
xcqdb = here->BSIM3V2cqsb * omega;
|
||||
xcqsb = here->BSIM3V2cqdb * omega;
|
||||
xcqbb = here->BSIM3V2cqbb * omega;
|
||||
|
||||
CoxWL = model->BSIM3V2cox * here->pParam->BSIM3V2weffCV
|
||||
* here->pParam->BSIM3V2leffCV;
|
||||
qcheq = -(here->BSIM3V2qgate + here->BSIM3V2qbulk);
|
||||
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
|
||||
{ if (model->BSIM3V2xpart < 0.5)
|
||||
{ sxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3V2xpart > 0.5)
|
||||
{ sxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{ sxpart = 0.5;
|
||||
}
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ sxpart = here->BSIM3V2qdrn / qcheq;
|
||||
Css = here->BSIM3V2cddb;
|
||||
Cds = -(here->BSIM3V2cgdb + here->BSIM3V2cddb
|
||||
+ here->BSIM3V2cbdb);
|
||||
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq;
|
||||
Csg = here->BSIM3V2cdgb;
|
||||
Cdg = -(here->BSIM3V2cggb + here->BSIM3V2cdgb
|
||||
+ here->BSIM3V2cbgb);
|
||||
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq;
|
||||
|
||||
Csd = here->BSIM3V2cdsb;
|
||||
Cdd = -(here->BSIM3V2cgsb + here->BSIM3V2cdsb
|
||||
+ here->BSIM3V2cbsb);
|
||||
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq;
|
||||
|
||||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg
|
||||
+ dsxpart_dVs);
|
||||
}
|
||||
dxpart = 1.0 - sxpart;
|
||||
ddxpart_dVd = -dsxpart_dVd;
|
||||
ddxpart_dVg = -dsxpart_dVg;
|
||||
ddxpart_dVs = -dsxpart_dVs;
|
||||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs);
|
||||
}
|
||||
}
|
||||
|
||||
T1 = *(ckt->CKTstate0 + here->BSIM3V2qdef) * here->BSIM3V2gtau;
|
||||
gdpr = here->BSIM3V2drainConductance;
|
||||
gspr = here->BSIM3V2sourceConductance;
|
||||
gds = here->BSIM3V2gds;
|
||||
gbd = here->BSIM3V2gbd;
|
||||
gbs = here->BSIM3V2gbs;
|
||||
capbd = here->BSIM3V2capbd;
|
||||
capbs = here->BSIM3V2capbs;
|
||||
|
||||
GSoverlapCap = here->BSIM3V2cgso;
|
||||
GDoverlapCap = here->BSIM3V2cgdo;
|
||||
GBoverlapCap = here->pParam->BSIM3V2cgbo;
|
||||
|
||||
xcdgb = (cdgb - GDoverlapCap) * omega;
|
||||
xcddb = (cddb + capbd + GDoverlapCap) * omega;
|
||||
xcdsb = cdsb * omega;
|
||||
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega;
|
||||
xcsdb = -(cgdb + cbdb + cddb) * omega;
|
||||
xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)) * omega;
|
||||
xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap)
|
||||
* omega;
|
||||
xcgdb = (cgdb - GDoverlapCap ) * omega;
|
||||
xcgsb = (cgsb - GSoverlapCap) * omega;
|
||||
xcbgb = (cbgb - GBoverlapCap) * omega;
|
||||
xcbdb = (cbdb - capbd ) * omega;
|
||||
xcbsb = (cbsb - capbs ) * omega;
|
||||
|
||||
*(here->BSIM3V2GgPtr +1) += xcggb;
|
||||
*(here->BSIM3V2BbPtr +1) -= xcbgb + xcbdb + xcbsb;
|
||||
*(here->BSIM3V2DPdpPtr +1) += xcddb;
|
||||
*(here->BSIM3V2SPspPtr +1) += xcssb;
|
||||
*(here->BSIM3V2GbPtr +1) -= xcggb + xcgdb + xcgsb;
|
||||
*(here->BSIM3V2GdpPtr +1) += xcgdb;
|
||||
*(here->BSIM3V2GspPtr +1) += xcgsb;
|
||||
*(here->BSIM3V2BgPtr +1) += xcbgb;
|
||||
*(here->BSIM3V2BdpPtr +1) += xcbdb;
|
||||
*(here->BSIM3V2BspPtr +1) += xcbsb;
|
||||
*(here->BSIM3V2DPgPtr +1) += xcdgb;
|
||||
*(here->BSIM3V2DPbPtr +1) -= xcdgb + xcddb + xcdsb;
|
||||
*(here->BSIM3V2DPspPtr +1) += xcdsb;
|
||||
*(here->BSIM3V2SPgPtr +1) += xcsgb;
|
||||
*(here->BSIM3V2SPbPtr +1) -= xcsgb + xcsdb + xcssb;
|
||||
*(here->BSIM3V2SPdpPtr +1) += xcsdb;
|
||||
|
||||
*(here->BSIM3V2DdPtr) += gdpr;
|
||||
*(here->BSIM3V2SsPtr) += gspr;
|
||||
*(here->BSIM3V2BbPtr) += gbd + gbs - here->BSIM3V2gbbs;
|
||||
*(here->BSIM3V2DPdpPtr) += gdpr + gds + gbd + RevSum
|
||||
+ dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp;
|
||||
*(here->BSIM3V2SPspPtr) += gspr + gds + gbs + FwdSum
|
||||
+ sxpart * xgts + T1 * dsxpart_dVs + gbspsp;
|
||||
|
||||
*(here->BSIM3V2DdpPtr) -= gdpr;
|
||||
*(here->BSIM3V2SspPtr) -= gspr;
|
||||
|
||||
*(here->BSIM3V2BgPtr) -= here->BSIM3V2gbgs;
|
||||
*(here->BSIM3V2BdpPtr) -= gbd - gbbdp;
|
||||
*(here->BSIM3V2BspPtr) -= gbs - gbbsp;
|
||||
|
||||
*(here->BSIM3V2DPdPtr) -= gdpr;
|
||||
*(here->BSIM3V2DPgPtr) += Gm + dxpart * xgtg + T1 * ddxpart_dVg
|
||||
+ gbdpg;
|
||||
*(here->BSIM3V2DPbPtr) -= gbd - Gmbs - dxpart * xgtb
|
||||
- T1 * ddxpart_dVb - gbdpb;
|
||||
*(here->BSIM3V2DPspPtr) -= gds + FwdSum - dxpart * xgts
|
||||
- T1 * ddxpart_dVs - gbdpsp;
|
||||
|
||||
*(here->BSIM3V2SPgPtr) -= Gm - sxpart * xgtg - T1 * dsxpart_dVg
|
||||
- gbspg;
|
||||
*(here->BSIM3V2SPsPtr) -= gspr;
|
||||
*(here->BSIM3V2SPbPtr) -= gbs + Gmbs - sxpart * xgtb
|
||||
- T1 * dsxpart_dVb - gbspb;
|
||||
*(here->BSIM3V2SPdpPtr) -= gds + RevSum - sxpart * xgtd
|
||||
- T1 * dsxpart_dVd - gbspdp;
|
||||
|
||||
*(here->BSIM3V2GgPtr) -= xgtg;
|
||||
*(here->BSIM3V2GbPtr) -= xgtb;
|
||||
*(here->BSIM3V2GdpPtr) -= xgtd;
|
||||
*(here->BSIM3V2GspPtr) -= xgts;
|
||||
|
||||
if (here->BSIM3V2nqsMod)
|
||||
{ *(here->BSIM3V2QqPtr +1) += omega;
|
||||
*(here->BSIM3V2QgPtr +1) -= xcqgb;
|
||||
*(here->BSIM3V2QdpPtr +1) -= xcqdb;
|
||||
*(here->BSIM3V2QspPtr +1) -= xcqsb;
|
||||
*(here->BSIM3V2QbPtr +1) -= xcqbb;
|
||||
|
||||
*(here->BSIM3V2QqPtr) += here->BSIM3V2gtau;
|
||||
|
||||
*(here->BSIM3V2DPqPtr) += dxpart * here->BSIM3V2gtau;
|
||||
*(here->BSIM3V2SPqPtr) += sxpart * here->BSIM3V2gtau;
|
||||
*(here->BSIM3V2GqPtr) -= here->BSIM3V2gtau;
|
||||
|
||||
*(here->BSIM3V2QgPtr) += xgtg;
|
||||
*(here->BSIM3V2QdpPtr) += xgtd;
|
||||
*(here->BSIM3V2QspPtr) += xgts;
|
||||
*(here->BSIM3V2QbPtr) += xgtb;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
|
@ -1,195 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
File: b3v2ask.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "ifsim.h"
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3V2ask(ckt,inst,which,value,select)
|
||||
CKTcircuit *ckt;
|
||||
GENinstance *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
IFvalue *select;
|
||||
{
|
||||
BSIM3V2instance *here = (BSIM3V2instance*)inst;
|
||||
|
||||
switch(which)
|
||||
{ case BSIM3V2_L:
|
||||
value->rValue = here->BSIM3V2l;
|
||||
return(OK);
|
||||
case BSIM3V2_W:
|
||||
value->rValue = here->BSIM3V2w;
|
||||
return(OK);
|
||||
case BSIM3V2_AS:
|
||||
value->rValue = here->BSIM3V2sourceArea;
|
||||
return(OK);
|
||||
case BSIM3V2_AD:
|
||||
value->rValue = here->BSIM3V2drainArea;
|
||||
return(OK);
|
||||
case BSIM3V2_PS:
|
||||
value->rValue = here->BSIM3V2sourcePerimeter;
|
||||
return(OK);
|
||||
case BSIM3V2_PD:
|
||||
value->rValue = here->BSIM3V2drainPerimeter;
|
||||
return(OK);
|
||||
case BSIM3V2_NRS:
|
||||
value->rValue = here->BSIM3V2sourceSquares;
|
||||
return(OK);
|
||||
case BSIM3V2_NRD:
|
||||
value->rValue = here->BSIM3V2drainSquares;
|
||||
return(OK);
|
||||
case BSIM3V2_OFF:
|
||||
value->rValue = here->BSIM3V2off;
|
||||
return(OK);
|
||||
case BSIM3V2_NQSMOD:
|
||||
value->iValue = here->BSIM3V2nqsMod;
|
||||
return(OK);
|
||||
case BSIM3V2_IC_VBS:
|
||||
value->rValue = here->BSIM3V2icVBS;
|
||||
return(OK);
|
||||
case BSIM3V2_IC_VDS:
|
||||
value->rValue = here->BSIM3V2icVDS;
|
||||
return(OK);
|
||||
case BSIM3V2_IC_VGS:
|
||||
value->rValue = here->BSIM3V2icVGS;
|
||||
return(OK);
|
||||
case BSIM3V2_DNODE:
|
||||
value->iValue = here->BSIM3V2dNode;
|
||||
return(OK);
|
||||
case BSIM3V2_GNODE:
|
||||
value->iValue = here->BSIM3V2gNode;
|
||||
return(OK);
|
||||
case BSIM3V2_SNODE:
|
||||
value->iValue = here->BSIM3V2sNode;
|
||||
return(OK);
|
||||
case BSIM3V2_BNODE:
|
||||
value->iValue = here->BSIM3V2bNode;
|
||||
return(OK);
|
||||
case BSIM3V2_DNODEPRIME:
|
||||
value->iValue = here->BSIM3V2dNodePrime;
|
||||
return(OK);
|
||||
case BSIM3V2_SNODEPRIME:
|
||||
value->iValue = here->BSIM3V2sNodePrime;
|
||||
return(OK);
|
||||
case BSIM3V2_SOURCECONDUCT:
|
||||
value->rValue = here->BSIM3V2sourceConductance;
|
||||
return(OK);
|
||||
case BSIM3V2_DRAINCONDUCT:
|
||||
value->rValue = here->BSIM3V2drainConductance;
|
||||
return(OK);
|
||||
case BSIM3V2_VBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2vbd);
|
||||
return(OK);
|
||||
case BSIM3V2_VBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2vbs);
|
||||
return(OK);
|
||||
case BSIM3V2_VGS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2vgs);
|
||||
return(OK);
|
||||
case BSIM3V2_VDS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2vds);
|
||||
return(OK);
|
||||
case BSIM3V2_CD:
|
||||
value->rValue = here->BSIM3V2cd;
|
||||
return(OK);
|
||||
case BSIM3V2_CBS:
|
||||
value->rValue = here->BSIM3V2cbs;
|
||||
return(OK);
|
||||
case BSIM3V2_CBD:
|
||||
value->rValue = here->BSIM3V2cbd;
|
||||
return(OK);
|
||||
case BSIM3V2_GM:
|
||||
value->rValue = here->BSIM3V2gm;
|
||||
return(OK);
|
||||
case BSIM3V2_GDS:
|
||||
value->rValue = here->BSIM3V2gds;
|
||||
return(OK);
|
||||
case BSIM3V2_GMBS:
|
||||
value->rValue = here->BSIM3V2gmbs;
|
||||
return(OK);
|
||||
case BSIM3V2_GBD:
|
||||
value->rValue = here->BSIM3V2gbd;
|
||||
return(OK);
|
||||
case BSIM3V2_GBS:
|
||||
value->rValue = here->BSIM3V2gbs;
|
||||
return(OK);
|
||||
case BSIM3V2_QB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2qb);
|
||||
return(OK);
|
||||
case BSIM3V2_CQB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2cqb);
|
||||
return(OK);
|
||||
case BSIM3V2_QG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2qg);
|
||||
return(OK);
|
||||
case BSIM3V2_CQG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2cqg);
|
||||
return(OK);
|
||||
case BSIM3V2_QD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2qd);
|
||||
return(OK);
|
||||
case BSIM3V2_CQD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2cqd);
|
||||
return(OK);
|
||||
case BSIM3V2_CGG:
|
||||
value->rValue = here->BSIM3V2cggb;
|
||||
return(OK);
|
||||
case BSIM3V2_CGD:
|
||||
value->rValue = here->BSIM3V2cgdb;
|
||||
return(OK);
|
||||
case BSIM3V2_CGS:
|
||||
value->rValue = here->BSIM3V2cgsb;
|
||||
return(OK);
|
||||
case BSIM3V2_CDG:
|
||||
value->rValue = here->BSIM3V2cdgb;
|
||||
return(OK);
|
||||
case BSIM3V2_CDD:
|
||||
value->rValue = here->BSIM3V2cddb;
|
||||
return(OK);
|
||||
case BSIM3V2_CDS:
|
||||
value->rValue = here->BSIM3V2cdsb;
|
||||
return(OK);
|
||||
case BSIM3V2_CBG:
|
||||
value->rValue = here->BSIM3V2cbgb;
|
||||
return(OK);
|
||||
case BSIM3V2_CBDB:
|
||||
value->rValue = here->BSIM3V2cbdb;
|
||||
return(OK);
|
||||
case BSIM3V2_CBSB:
|
||||
value->rValue = here->BSIM3V2cbsb;
|
||||
return(OK);
|
||||
case BSIM3V2_CAPBD:
|
||||
value->rValue = here->BSIM3V2capbd;
|
||||
return(OK);
|
||||
case BSIM3V2_CAPBS:
|
||||
value->rValue = here->BSIM3V2capbs;
|
||||
return(OK);
|
||||
case BSIM3V2_VON:
|
||||
value->rValue = here->BSIM3V2von;
|
||||
return(OK);
|
||||
case BSIM3V2_VDSAT:
|
||||
value->rValue = here->BSIM3V2vdsat;
|
||||
return(OK);
|
||||
case BSIM3V2_QBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2qbs);
|
||||
return(OK);
|
||||
case BSIM3V2_QBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3V2qbd);
|
||||
return(OK);
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
|
|
@ -1,428 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: Min-Chie Jeng.
|
||||
Modified by Weidong Liu (1997-1998).
|
||||
File: b3v2check.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "trandefs.h"
|
||||
#include "const.h"
|
||||
#include "sperror.h"
|
||||
#include "devdefs.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3V2checkModel(model, here, ckt)
|
||||
BSIM3V2model *model;
|
||||
BSIM3V2instance *here;
|
||||
CKTcircuit *ckt;
|
||||
{
|
||||
struct BSIM3V2SizeDependParam *pParam;
|
||||
int Fatal_Flag = 0;
|
||||
FILE *fplog;
|
||||
|
||||
if ((fplog = fopen("b3v3check.log", "w")) != NULL)
|
||||
{ pParam = here->pParam;
|
||||
fprintf(fplog, "BSIM3V3.2 Parameter Check\n");
|
||||
fprintf(fplog, "Model = %s\n", model->BSIM3V2modName);
|
||||
fprintf(fplog, "W = %g, L = %g\n", here->BSIM3V2w, here->BSIM3V2l);
|
||||
|
||||
|
||||
if (pParam->BSIM3V2nlx < -pParam->BSIM3V2leff)
|
||||
{ fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n",
|
||||
pParam->BSIM3V2nlx);
|
||||
printf("Fatal: Nlx = %g is less than -Leff.\n",
|
||||
pParam->BSIM3V2nlx);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (model->BSIM3V2tox <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Tox = %g is not positive.\n",
|
||||
model->BSIM3V2tox);
|
||||
printf("Fatal: Tox = %g is not positive.\n", model->BSIM3V2tox);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (model->BSIM3V2toxm <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Toxm = %g is not positive.\n",
|
||||
model->BSIM3V2toxm);
|
||||
printf("Fatal: Toxm = %g is not positive.\n", model->BSIM3V2toxm);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2npeak <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Nch = %g is not positive.\n",
|
||||
pParam->BSIM3V2npeak);
|
||||
printf("Fatal: Nch = %g is not positive.\n",
|
||||
pParam->BSIM3V2npeak);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3V2nsub <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Nsub = %g is not positive.\n",
|
||||
pParam->BSIM3V2nsub);
|
||||
printf("Fatal: Nsub = %g is not positive.\n",
|
||||
pParam->BSIM3V2nsub);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3V2ngate < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Ngate = %g is not positive.\n",
|
||||
pParam->BSIM3V2ngate);
|
||||
printf("Fatal: Ngate = %g Ngate is not positive.\n",
|
||||
pParam->BSIM3V2ngate);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3V2ngate > 1.e25)
|
||||
{ fprintf(fplog, "Fatal: Ngate = %g is too high.\n",
|
||||
pParam->BSIM3V2ngate);
|
||||
printf("Fatal: Ngate = %g Ngate is too high\n",
|
||||
pParam->BSIM3V2ngate);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3V2xj <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Xj = %g is not positive.\n",
|
||||
pParam->BSIM3V2xj);
|
||||
printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM3V2xj);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2dvt1 < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n",
|
||||
pParam->BSIM3V2dvt1);
|
||||
printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3V2dvt1);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2dvt1w < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n",
|
||||
pParam->BSIM3V2dvt1w);
|
||||
printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3V2dvt1w);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2w0 == -pParam->BSIM3V2weff)
|
||||
{ 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->BSIM3V2dsub < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM3V2dsub);
|
||||
printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM3V2dsub);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3V2b1 == -pParam->BSIM3V2weff)
|
||||
{ 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->BSIM3V2u0temp <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3V2u0temp);
|
||||
printf("Fatal: u0 at current temperature = %g is not positive.\n",
|
||||
pParam->BSIM3V2u0temp);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
/* Check delta parameter */
|
||||
if (pParam->BSIM3V2delta < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Delta = %g is less than zero.\n",
|
||||
pParam->BSIM3V2delta);
|
||||
printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM3V2delta);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2vsattemp <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3V2vsattemp);
|
||||
printf("Fatal: Vsat at current temperature = %g is not positive.\n",
|
||||
pParam->BSIM3V2vsattemp);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
/* Check Rout parameters */
|
||||
if (pParam->BSIM3V2pclm <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM3V2pclm);
|
||||
printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM3V2pclm);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2drout < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM3V2drout);
|
||||
printf("Fatal: Drout = %g is negative.\n", pParam->BSIM3V2drout);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2pscbe2 <= 0.0)
|
||||
{ fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n",
|
||||
pParam->BSIM3V2pscbe2);
|
||||
printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM3V2pscbe2);
|
||||
}
|
||||
|
||||
if (model->BSIM3V2unitLengthSidewallJctCap > 0.0 ||
|
||||
model->BSIM3V2unitLengthGateSidewallJctCap > 0.0)
|
||||
{
|
||||
if (here->BSIM3V2drainPerimeter < pParam->BSIM3V2weff)
|
||||
{ fprintf(fplog, "Warning: Pd = %g is less than W.\n",
|
||||
here->BSIM3V2drainPerimeter);
|
||||
printf("Warning: Pd = %g is less than W.\n",
|
||||
here->BSIM3V2drainPerimeter);
|
||||
}
|
||||
if (here->BSIM3V2sourcePerimeter < pParam->BSIM3V2weff)
|
||||
{ fprintf(fplog, "Warning: Ps = %g is less than W.\n",
|
||||
here->BSIM3V2sourcePerimeter);
|
||||
printf("Warning: Ps = %g is less than W.\n",
|
||||
here->BSIM3V2sourcePerimeter);
|
||||
}
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2noff < 0.1)
|
||||
{ fprintf(fplog, "Warning: Noff = %g is too small.\n",
|
||||
pParam->BSIM3V2noff);
|
||||
printf("Warning: Noff = %g is too small.\n", pParam->BSIM3V2noff);
|
||||
}
|
||||
if (pParam->BSIM3V2noff > 4.0)
|
||||
{ fprintf(fplog, "Warning: Noff = %g is too large.\n",
|
||||
pParam->BSIM3V2noff);
|
||||
printf("Warning: Noff = %g is too large.\n", pParam->BSIM3V2noff);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2voffcv < -0.5)
|
||||
{ fprintf(fplog, "Warning: Voffcv = %g is too small.\n",
|
||||
pParam->BSIM3V2voffcv);
|
||||
printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM3V2voffcv);
|
||||
}
|
||||
if (pParam->BSIM3V2voffcv > 0.5)
|
||||
{ fprintf(fplog, "Warning: Voffcv = %g is too large.\n",
|
||||
pParam->BSIM3V2voffcv);
|
||||
printf("Warning: Voffcv = %g is too large.\n", pParam->BSIM3V2voffcv);
|
||||
}
|
||||
|
||||
if (model->BSIM3V2ijth < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Ijth = %g cannot be negative.\n",
|
||||
model->BSIM3V2ijth);
|
||||
printf("Fatal: Ijth = %g cannot be negative.\n", model->BSIM3V2ijth);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
/* Check capacitance parameters */
|
||||
if (pParam->BSIM3V2clc < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM3V2clc);
|
||||
printf("Fatal: Clc = %g is negative.\n", pParam->BSIM3V2clc);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2moin < 5.0)
|
||||
{ fprintf(fplog, "Warning: Moin = %g is too small.\n",
|
||||
pParam->BSIM3V2moin);
|
||||
printf("Warning: Moin = %g is too small.\n", pParam->BSIM3V2moin);
|
||||
}
|
||||
if (pParam->BSIM3V2moin > 25.0)
|
||||
{ fprintf(fplog, "Warning: Moin = %g is too large.\n",
|
||||
pParam->BSIM3V2moin);
|
||||
printf("Warning: Moin = %g is too large.\n", pParam->BSIM3V2moin);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2acde < 0.4)
|
||||
{ fprintf(fplog, "Warning: Acde = %g is too small.\n",
|
||||
pParam->BSIM3V2acde);
|
||||
printf("Warning: Acde = %g is too small.\n", pParam->BSIM3V2acde);
|
||||
}
|
||||
if (pParam->BSIM3V2acde > 1.6)
|
||||
{ fprintf(fplog, "Warning: Acde = %g is too large.\n",
|
||||
pParam->BSIM3V2acde);
|
||||
printf("Warning: Acde = %g is too large.\n", pParam->BSIM3V2acde);
|
||||
}
|
||||
|
||||
if (model->BSIM3V2paramChk ==1)
|
||||
{
|
||||
/* Check L and W parameters */
|
||||
if (pParam->BSIM3V2leff <= 5.0e-8)
|
||||
{ fprintf(fplog, "Warning: Leff = %g may be too small.\n",
|
||||
pParam->BSIM3V2leff);
|
||||
printf("Warning: Leff = %g may be too small.\n",
|
||||
pParam->BSIM3V2leff);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2leffCV <= 5.0e-8)
|
||||
{ fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3V2leffCV);
|
||||
printf("Warning: Leff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3V2leffCV);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2weff <= 1.0e-7)
|
||||
{ fprintf(fplog, "Warning: Weff = %g may be too small.\n",
|
||||
pParam->BSIM3V2weff);
|
||||
printf("Warning: Weff = %g may be too small.\n",
|
||||
pParam->BSIM3V2weff);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2weffCV <= 1.0e-7)
|
||||
{ fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3V2weffCV);
|
||||
printf("Warning: Weff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3V2weffCV);
|
||||
}
|
||||
|
||||
/* Check threshold voltage parameters */
|
||||
if (pParam->BSIM3V2nlx < 0.0)
|
||||
{ fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->BSIM3V2nlx);
|
||||
printf("Warning: Nlx = %g is negative.\n", pParam->BSIM3V2nlx);
|
||||
}
|
||||
if (model->BSIM3V2tox < 1.0e-9)
|
||||
{ fprintf(fplog, "Warning: Tox = %g is less than 10A.\n",
|
||||
model->BSIM3V2tox);
|
||||
printf("Warning: Tox = %g is less than 10A.\n", model->BSIM3V2tox);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2npeak <= 1.0e15)
|
||||
{ fprintf(fplog, "Warning: Nch = %g may be too small.\n",
|
||||
pParam->BSIM3V2npeak);
|
||||
printf("Warning: Nch = %g may be too small.\n",
|
||||
pParam->BSIM3V2npeak);
|
||||
}
|
||||
else if (pParam->BSIM3V2npeak >= 1.0e21)
|
||||
{ fprintf(fplog, "Warning: Nch = %g may be too large.\n",
|
||||
pParam->BSIM3V2npeak);
|
||||
printf("Warning: Nch = %g may be too large.\n",
|
||||
pParam->BSIM3V2npeak);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2nsub <= 1.0e14)
|
||||
{ fprintf(fplog, "Warning: Nsub = %g may be too small.\n",
|
||||
pParam->BSIM3V2nsub);
|
||||
printf("Warning: Nsub = %g may be too small.\n",
|
||||
pParam->BSIM3V2nsub);
|
||||
}
|
||||
else if (pParam->BSIM3V2nsub >= 1.0e21)
|
||||
{ fprintf(fplog, "Warning: Nsub = %g may be too large.\n",
|
||||
pParam->BSIM3V2nsub);
|
||||
printf("Warning: Nsub = %g may be too large.\n",
|
||||
pParam->BSIM3V2nsub);
|
||||
}
|
||||
|
||||
if ((pParam->BSIM3V2ngate > 0.0) &&
|
||||
(pParam->BSIM3V2ngate <= 1.e18))
|
||||
{ fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n",
|
||||
pParam->BSIM3V2ngate);
|
||||
printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n",
|
||||
pParam->BSIM3V2ngate);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2dvt0 < 0.0)
|
||||
{ fprintf(fplog, "Warning: Dvt0 = %g is negative.\n",
|
||||
pParam->BSIM3V2dvt0);
|
||||
printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM3V2dvt0);
|
||||
}
|
||||
|
||||
if (fabs(1.0e-6 / (pParam->BSIM3V2w0 + pParam->BSIM3V2weff)) > 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->BSIM3V2nfactor < 0.0)
|
||||
{ fprintf(fplog, "Warning: Nfactor = %g is negative.\n",
|
||||
pParam->BSIM3V2nfactor);
|
||||
printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM3V2nfactor);
|
||||
}
|
||||
if (pParam->BSIM3V2cdsc < 0.0)
|
||||
{ fprintf(fplog, "Warning: Cdsc = %g is negative.\n",
|
||||
pParam->BSIM3V2cdsc);
|
||||
printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM3V2cdsc);
|
||||
}
|
||||
if (pParam->BSIM3V2cdscd < 0.0)
|
||||
{ fprintf(fplog, "Warning: Cdscd = %g is negative.\n",
|
||||
pParam->BSIM3V2cdscd);
|
||||
printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM3V2cdscd);
|
||||
}
|
||||
/* Check DIBL parameters */
|
||||
if (pParam->BSIM3V2eta0 < 0.0)
|
||||
{ fprintf(fplog, "Warning: Eta0 = %g is negative.\n",
|
||||
pParam->BSIM3V2eta0);
|
||||
printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM3V2eta0);
|
||||
}
|
||||
|
||||
/* Check Abulk parameters */
|
||||
if (fabs(1.0e-6 / (pParam->BSIM3V2b1 + pParam->BSIM3V2weff)) > 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->BSIM3V2a2 < 0.01)
|
||||
{ fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3V2a2);
|
||||
printf("Warning: A2 = %g is too small. Set to 0.01.\n",
|
||||
pParam->BSIM3V2a2);
|
||||
pParam->BSIM3V2a2 = 0.01;
|
||||
}
|
||||
else if (pParam->BSIM3V2a2 > 1.0)
|
||||
{ fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
|
||||
pParam->BSIM3V2a2);
|
||||
printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
|
||||
pParam->BSIM3V2a2);
|
||||
pParam->BSIM3V2a2 = 1.0;
|
||||
pParam->BSIM3V2a1 = 0.0;
|
||||
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2rdsw < 0.0)
|
||||
{ fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n",
|
||||
pParam->BSIM3V2rdsw);
|
||||
printf("Warning: Rdsw = %g is negative. Set to zero.\n",
|
||||
pParam->BSIM3V2rdsw);
|
||||
pParam->BSIM3V2rdsw = 0.0;
|
||||
pParam->BSIM3V2rds0 = 0.0;
|
||||
}
|
||||
else if ((pParam->BSIM3V2rds0 > 0.0) && (pParam->BSIM3V2rds0 < 0.001))
|
||||
{ fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n",
|
||||
pParam->BSIM3V2rds0);
|
||||
printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n",
|
||||
pParam->BSIM3V2rds0);
|
||||
pParam->BSIM3V2rds0 = 0.0;
|
||||
}
|
||||
if (pParam->BSIM3V2vsattemp < 1.0e3)
|
||||
{ fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3V2vsattemp);
|
||||
printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3V2vsattemp);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2pdibl1 < 0.0)
|
||||
{ fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n",
|
||||
pParam->BSIM3V2pdibl1);
|
||||
printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3V2pdibl1);
|
||||
}
|
||||
if (pParam->BSIM3V2pdibl2 < 0.0)
|
||||
{ fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n",
|
||||
pParam->BSIM3V2pdibl2);
|
||||
printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3V2pdibl2);
|
||||
}
|
||||
/* Check overlap capacitance parameters */
|
||||
if (model->BSIM3V2cgdo < 0.0)
|
||||
{ fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3V2cgdo);
|
||||
printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3V2cgdo);
|
||||
model->BSIM3V2cgdo = 0.0;
|
||||
}
|
||||
if (model->BSIM3V2cgso < 0.0)
|
||||
{ fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3V2cgso);
|
||||
printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3V2cgso);
|
||||
model->BSIM3V2cgso = 0.0;
|
||||
}
|
||||
if (model->BSIM3V2cgbo < 0.0)
|
||||
{ fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3V2cgbo);
|
||||
printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3V2cgbo);
|
||||
model->BSIM3V2cgbo = 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);
|
||||
}
|
||||
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
File: b3v2cvtest.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "trandefs.h"
|
||||
#include "const.h"
|
||||
#include "devdefs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3V2convTest(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
{
|
||||
BSIM3V2model *model = (BSIM3V2model*)inModel;
|
||||
BSIM3V2instance *here;
|
||||
double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
||||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
/* loop through all the BSIM3V2 device models */
|
||||
for (; model != NULL; model = model->BSIM3V2nextModel)
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->BSIM3V2instances; here != NULL ;
|
||||
here=here->BSIM3V2nextInstance)
|
||||
{
|
||||
if (here->BSIM3V2owner != ARCHme) continue;
|
||||
vbs = model->BSIM3V2type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3V2bNode)
|
||||
- *(ckt->CKTrhsOld+here->BSIM3V2sNodePrime));
|
||||
vgs = model->BSIM3V2type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3V2gNode)
|
||||
- *(ckt->CKTrhsOld+here->BSIM3V2sNodePrime));
|
||||
vds = model->BSIM3V2type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3V2dNodePrime)
|
||||
- *(ckt->CKTrhsOld+here->BSIM3V2sNodePrime));
|
||||
vbd = vbs - vds;
|
||||
vgd = vgs - vds;
|
||||
vgdo = *(ckt->CKTstate0 + here->BSIM3V2vgs)
|
||||
- *(ckt->CKTstate0 + here->BSIM3V2vds);
|
||||
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3V2vbs);
|
||||
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3V2vbd);
|
||||
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3V2vgs);
|
||||
delvds = vds - *(ckt->CKTstate0 + here->BSIM3V2vds);
|
||||
delvgd = vgd-vgdo;
|
||||
|
||||
cd = here->BSIM3V2cd - here->BSIM3V2cbd;
|
||||
if (here->BSIM3V2mode >= 0)
|
||||
{ cd += here->BSIM3V2csub;
|
||||
cdhat = cd - here->BSIM3V2gbd * delvbd
|
||||
+ (here->BSIM3V2gmbs + here->BSIM3V2gbbs) * delvbs
|
||||
+ (here->BSIM3V2gm + here->BSIM3V2gbgs) * delvgs
|
||||
+ (here->BSIM3V2gds + here->BSIM3V2gbds) * delvds;
|
||||
}
|
||||
else
|
||||
{ cdhat = cd + (here->BSIM3V2gmbs - here->BSIM3V2gbd) * delvbd
|
||||
+ here->BSIM3V2gm * delvgd - here->BSIM3V2gds * delvds;
|
||||
}
|
||||
|
||||
/*
|
||||
* check convergence
|
||||
*/
|
||||
if ((here->BSIM3V2off == 0) || (!(ckt->CKTmode & MODEINITFIX)))
|
||||
{ tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd))
|
||||
+ ckt->CKTabstol;
|
||||
if (fabs(cdhat - cd) >= tol)
|
||||
{ ckt->CKTnoncon++;
|
||||
return(OK);
|
||||
}
|
||||
cbs = here->BSIM3V2cbs;
|
||||
cbd = here->BSIM3V2cbd;
|
||||
if (here->BSIM3V2mode >= 0)
|
||||
{ cbhat = cbs + cbd - here->BSIM3V2csub
|
||||
+ here->BSIM3V2gbd * delvbd
|
||||
+ (here->BSIM3V2gbs - here->BSIM3V2gbbs) * delvbs
|
||||
- here->BSIM3V2gbgs * delvgs
|
||||
- here->BSIM3V2gbds * delvds;
|
||||
}
|
||||
else
|
||||
{ cbhat = cbs + cbd - here->BSIM3V2csub
|
||||
+ here->BSIM3V2gbs * delvbs
|
||||
+ (here->BSIM3V2gbd - here->BSIM3V2gbbs) * delvbd
|
||||
- here->BSIM3V2gbgs * delvgd
|
||||
+ here->BSIM3V2gbds * delvds;
|
||||
}
|
||||
tol = ckt->CKTreltol * MAX(fabs(cbhat),
|
||||
fabs(cbs + cbd - here->BSIM3V2csub)) + ckt->CKTabstol;
|
||||
if (fabs(cbhat - (cbs + cbd - here->BSIM3V2csub)) > tol)
|
||||
{ ckt->CKTnoncon++;
|
||||
return(OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
File: b3v2del.c
|
||||
**********/
|
||||
/*
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bsim3v2def.h"
|
||||
#include "sperror.h"
|
||||
#include "gendefs.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3V2delete(inModel,name,inInst)
|
||||
GENmodel *inModel;
|
||||
IFuid name;
|
||||
GENinstance **inInst;
|
||||
{
|
||||
BSIM3V2instance **fast = (BSIM3V2instance**)inInst;
|
||||
BSIM3V2model *model = (BSIM3V2model*)inModel;
|
||||
BSIM3V2instance **prev = NULL;
|
||||
BSIM3V2instance *here;
|
||||
|
||||
for (; model ; model = model->BSIM3V2nextModel)
|
||||
{ prev = &(model->BSIM3V2instances);
|
||||
for (here = *prev; here ; here = *prev)
|
||||
{ if (here->BSIM3V2name == name || (fast && here==*fast))
|
||||
{ *prev= here->BSIM3V2nextInstance;
|
||||
FREE(here);
|
||||
return(OK);
|
||||
}
|
||||
prev = &(here->BSIM3V2nextInstance);
|
||||
}
|
||||
}
|
||||
return(E_NODEV);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
File: b3v2dest.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bsim3v2def.h"
|
||||
#include "suffix.h"
|
||||
|
||||
void
|
||||
BSIM3V2destroy(inModel)
|
||||
GENmodel **inModel;
|
||||
{
|
||||
BSIM3V2model **model = (BSIM3V2model**)inModel;
|
||||
BSIM3V2instance *here;
|
||||
BSIM3V2instance *prev = NULL;
|
||||
BSIM3V2model *mod = *model;
|
||||
BSIM3V2model *oldmod = NULL;
|
||||
|
||||
for (; mod ; mod = mod->BSIM3V2nextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (BSIM3V2instance *)NULL;
|
||||
for (here = mod->BSIM3V2instances; here; here = here->BSIM3V2nextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
}
|
||||
if(oldmod) FREE(oldmod);
|
||||
*model = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
File: b3v2getic.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3V2getic(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
{
|
||||
BSIM3V2model *model = (BSIM3V2model*)inModel;
|
||||
BSIM3V2instance *here;
|
||||
|
||||
for (; model ; model = model->BSIM3V2nextModel)
|
||||
{ for (here = model->BSIM3V2instances; here; here = here->BSIM3V2nextInstance)
|
||||
{
|
||||
if (here->BSIM3V2owner != ARCHme) continue;
|
||||
if(!here->BSIM3V2icVBSGiven)
|
||||
{ here->BSIM3V2icVBS = *(ckt->CKTrhs + here->BSIM3V2bNode)
|
||||
- *(ckt->CKTrhs + here->BSIM3V2sNode);
|
||||
}
|
||||
if (!here->BSIM3V2icVDSGiven)
|
||||
{ here->BSIM3V2icVDS = *(ckt->CKTrhs + here->BSIM3V2dNode)
|
||||
- *(ckt->CKTrhs + here->BSIM3V2sNode);
|
||||
}
|
||||
if (!here->BSIM3V2icVGSGiven)
|
||||
{ here->BSIM3V2icVGS = *(ckt->CKTrhs + here->BSIM3V2gNode)
|
||||
- *(ckt->CKTrhs + here->BSIM3V2sNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,46 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
File: b3v2mdel.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bsim3v2def.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3V2mDelete(inModel,modname,kill)
|
||||
GENmodel **inModel;
|
||||
IFuid modname;
|
||||
GENmodel *kill;
|
||||
{
|
||||
BSIM3V2model **model = (BSIM3V2model**)inModel;
|
||||
BSIM3V2model *modfast = (BSIM3V2model*)kill;
|
||||
BSIM3V2instance *here;
|
||||
BSIM3V2instance *prev = NULL;
|
||||
BSIM3V2model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM3V2nextModel))
|
||||
{ if ((*model)->BSIM3V2modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3V2nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3V2instances; here; here = here->BSIM3V2nextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,384 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Gary W. Ng and Min-Chie Jeng.
|
||||
File: b3v2noi.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "bsim3v2def.h"
|
||||
#include "cktdefs.h"
|
||||
#include "iferrmsg.h"
|
||||
#include "noisedef.h"
|
||||
#include "suffix.h"
|
||||
#include "const.h" /* jwan */
|
||||
|
||||
/*
|
||||
* BSIM3V2noise (mode, operation, firstModel, ckt, data, OnDens)
|
||||
* This routine names and evaluates all of the noise sources
|
||||
* associated with MOSFET's. It starts with the model *firstModel and
|
||||
* traverses all of its insts. It then proceeds to any other models
|
||||
* on the linked list. The total output noise density generated by
|
||||
* all of the MOSFET's is summed with the variable "OnDens".
|
||||
*/
|
||||
|
||||
/*
|
||||
Channel thermal and flicker noises are calculated based on the value
|
||||
of model->BSIM3V2noiMod.
|
||||
If model->BSIM3V2noiMod = 1,
|
||||
Channel thermal noise = SPICE2 model
|
||||
Flicker noise = SPICE2 model
|
||||
If model->BSIM3V2noiMod = 2,
|
||||
Channel thermal noise = BSIM3V2 model
|
||||
Flicker noise = BSIM3V2 model
|
||||
If model->BSIM3V2noiMod = 3,
|
||||
Channel thermal noise = SPICE2 model
|
||||
Flicker noise = BSIM3V2 model
|
||||
If model->BSIM3V2noiMod = 4,
|
||||
Channel thermal noise = BSIM3V2 model
|
||||
Flicker noise = SPICE2 model
|
||||
*/
|
||||
|
||||
extern void NevalSrc();
|
||||
extern double Nintegrate();
|
||||
|
||||
double
|
||||
BSIM3V2StrongInversionNoiseEval(vgs, vds, model, here, freq, temp)
|
||||
double vgs, vds, freq, temp;
|
||||
BSIM3V2model *model;
|
||||
BSIM3V2instance *here;
|
||||
{
|
||||
struct BSIM3V2SizeDependParam *pParam;
|
||||
double cd, esat, DelClm, EffFreq, N0, Nl, Vgst;
|
||||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
|
||||
|
||||
pParam = here->pParam;
|
||||
cd = fabs(here->BSIM3V2cd);
|
||||
if (vds > here->BSIM3V2vdsat)
|
||||
{ esat = 2.0 * pParam->BSIM3V2vsattemp / here->BSIM3V2ueff;
|
||||
T0 = ((((vds - here->BSIM3V2vdsat) / pParam->BSIM3V2litl) + model->BSIM3V2em)
|
||||
/ esat);
|
||||
DelClm = pParam->BSIM3V2litl * log (MAX(T0, N_MINLOG));
|
||||
}
|
||||
else
|
||||
DelClm = 0.0;
|
||||
EffFreq = pow(freq, model->BSIM3V2ef);
|
||||
T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3V2ueff;
|
||||
T2 = 1.0e8 * EffFreq * model->BSIM3V2cox
|
||||
* pParam->BSIM3V2leff * pParam->BSIM3V2leff;
|
||||
Vgst = vgs - here->BSIM3V2von;
|
||||
N0 = model->BSIM3V2cox * Vgst / CHARGE;
|
||||
if (N0 < 0.0)
|
||||
N0 = 0.0;
|
||||
Nl = model->BSIM3V2cox * (Vgst - MIN(vds, here->BSIM3V2vdsat)) / CHARGE;
|
||||
if (Nl < 0.0)
|
||||
Nl = 0.0;
|
||||
|
||||
T3 = model->BSIM3V2oxideTrapDensityA
|
||||
* log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG));
|
||||
T4 = model->BSIM3V2oxideTrapDensityB * (N0 - Nl);
|
||||
T5 = model->BSIM3V2oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
|
||||
|
||||
T6 = 8.62e-5 * temp * cd * cd;
|
||||
T7 = 1.0e8 * EffFreq * pParam->BSIM3V2leff
|
||||
* pParam->BSIM3V2leff * pParam->BSIM3V2weff;
|
||||
T8 = model->BSIM3V2oxideTrapDensityA + model->BSIM3V2oxideTrapDensityB * Nl
|
||||
+ model->BSIM3V2oxideTrapDensityC * Nl * Nl;
|
||||
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
|
||||
|
||||
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
|
||||
return Ssi;
|
||||
}
|
||||
|
||||
int
|
||||
BSIM3V2noise (mode, operation, inModel, ckt, data, OnDens)
|
||||
int mode, operation;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
Ndata *data;
|
||||
double *OnDens;
|
||||
{
|
||||
BSIM3V2model *model = (BSIM3V2model *)inModel;
|
||||
BSIM3V2instance *here;
|
||||
struct BSIM3V2SizeDependParam *pParam;
|
||||
char name[N_MXVLNTH];
|
||||
double tempOnoise;
|
||||
double tempInoise;
|
||||
double noizDens[BSIM3V2NSRCS];
|
||||
double lnNdens[BSIM3V2NSRCS];
|
||||
|
||||
double vgs, vds, Slimit;
|
||||
double N0, Nl;
|
||||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13;
|
||||
double n, ExpArg, Ssi, Swi;
|
||||
|
||||
int error, i;
|
||||
|
||||
/* define the names of the noise sources */
|
||||
static char *BSIM3V2nNames[BSIM3V2NSRCS] =
|
||||
{ /* Note that we have to keep the order */
|
||||
".rd", /* noise due to rd */
|
||||
/* consistent with the index definitions */
|
||||
".rs", /* noise due to rs */
|
||||
/* in BSIM3V2defs.h */
|
||||
".id", /* noise due to id */
|
||||
".1overf", /* flicker (1/f) noise */
|
||||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->BSIM3V2nextModel)
|
||||
{ for (here = model->BSIM3V2instances; here != NULL;
|
||||
here = here->BSIM3V2nextInstance)
|
||||
{ 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 < BSIM3V2NSRCS; i++)
|
||||
{ (void) sprintf(name, "onoise.%s%s",
|
||||
here->BSIM3V2name,
|
||||
BSIM3V2nNames[i]);
|
||||
data->namelist = (IFuid *) trealloc(
|
||||
(char *) data->namelist,
|
||||
(data->numPlots + 1)
|
||||
* sizeof(IFuid));
|
||||
if (!data->namelist)
|
||||
return(E_NOMEM);
|
||||
(*(SPfrontEnd->IFnewUid)) (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
(void **) NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
break;
|
||||
case INT_NOIZ:
|
||||
for (i = 0; i < BSIM3V2NSRCS; i++)
|
||||
{ (void) sprintf(name, "onoise_total.%s%s",
|
||||
here->BSIM3V2name,
|
||||
BSIM3V2nNames[i]);
|
||||
data->namelist = (IFuid *) trealloc(
|
||||
(char *) data->namelist,
|
||||
(data->numPlots + 1)
|
||||
* sizeof(IFuid));
|
||||
if (!data->namelist)
|
||||
return(E_NOMEM);
|
||||
(*(SPfrontEnd->IFnewUid)) (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
(void **) NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
(void) sprintf(name, "inoise_total.%s%s",
|
||||
here->BSIM3V2name,
|
||||
BSIM3V2nNames[i]);
|
||||
data->namelist = (IFuid *) trealloc(
|
||||
(char *) data->namelist,
|
||||
(data->numPlots + 1)
|
||||
* sizeof(IFuid));
|
||||
if (!data->namelist)
|
||||
return(E_NOMEM);
|
||||
(*(SPfrontEnd->IFnewUid)) (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
(void **)NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case N_CALC:
|
||||
switch (mode)
|
||||
{ case N_DENS:
|
||||
NevalSrc(&noizDens[BSIM3V2RDNOIZ],
|
||||
&lnNdens[BSIM3V2RDNOIZ], ckt, THERMNOISE,
|
||||
here->BSIM3V2dNodePrime, here->BSIM3V2dNode,
|
||||
here->BSIM3V2drainConductance);
|
||||
|
||||
NevalSrc(&noizDens[BSIM3V2RSNOIZ],
|
||||
&lnNdens[BSIM3V2RSNOIZ], ckt, THERMNOISE,
|
||||
here->BSIM3V2sNodePrime, here->BSIM3V2sNode,
|
||||
here->BSIM3V2sourceConductance);
|
||||
|
||||
switch( model->BSIM3V2noiMod )
|
||||
{ case 1:
|
||||
case 3:
|
||||
NevalSrc(&noizDens[BSIM3V2IDNOIZ],
|
||||
&lnNdens[BSIM3V2IDNOIZ], ckt,
|
||||
THERMNOISE, here->BSIM3V2dNodePrime,
|
||||
here->BSIM3V2sNodePrime,
|
||||
(2.0 / 3.0 * fabs(here->BSIM3V2gm
|
||||
+ here->BSIM3V2gds
|
||||
+ here->BSIM3V2gmbs)));
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
NevalSrc(&noizDens[BSIM3V2IDNOIZ],
|
||||
&lnNdens[BSIM3V2IDNOIZ], ckt,
|
||||
THERMNOISE, here->BSIM3V2dNodePrime,
|
||||
here->BSIM3V2sNodePrime,
|
||||
(here->BSIM3V2ueff
|
||||
* fabs(here->BSIM3V2qinv
|
||||
/ (pParam->BSIM3V2leff
|
||||
* pParam->BSIM3V2leff))));
|
||||
break;
|
||||
}
|
||||
NevalSrc(&noizDens[BSIM3V2FLNOIZ], (double*) NULL,
|
||||
ckt, N_GAIN, here->BSIM3V2dNodePrime,
|
||||
here->BSIM3V2sNodePrime, (double) 0.0);
|
||||
|
||||
switch( model->BSIM3V2noiMod )
|
||||
{ case 1:
|
||||
case 4:
|
||||
noizDens[BSIM3V2FLNOIZ] *= model->BSIM3V2kf
|
||||
* exp(model->BSIM3V2af
|
||||
* log(MAX(fabs(here->BSIM3V2cd),
|
||||
N_MINLOG)))
|
||||
/ (pow(data->freq, model->BSIM3V2ef)
|
||||
* pParam->BSIM3V2leff
|
||||
* pParam->BSIM3V2leff
|
||||
* model->BSIM3V2cox);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
vgs = *(ckt->CKTstates[0] + here->BSIM3V2vgs);
|
||||
vds = *(ckt->CKTstates[0] + here->BSIM3V2vds);
|
||||
if (vds < 0.0)
|
||||
{ vds = -vds;
|
||||
vgs = vgs + vds;
|
||||
}
|
||||
if (vgs >= here->BSIM3V2von + 0.1)
|
||||
{ Ssi = BSIM3V2StrongInversionNoiseEval(vgs,
|
||||
vds, model, here, data->freq,
|
||||
ckt->CKTtemp);
|
||||
noizDens[BSIM3V2FLNOIZ] *= Ssi;
|
||||
}
|
||||
else
|
||||
{ pParam = here->pParam;
|
||||
T10 = model->BSIM3V2oxideTrapDensityA
|
||||
* 8.62e-5 * ckt->CKTtemp;
|
||||
T11 = pParam->BSIM3V2weff
|
||||
* pParam->BSIM3V2leff
|
||||
* pow(data->freq, model->BSIM3V2ef)
|
||||
* 4.0e36;
|
||||
Swi = T10 / T11 * here->BSIM3V2cd
|
||||
* here->BSIM3V2cd;
|
||||
Slimit = BSIM3V2StrongInversionNoiseEval(
|
||||
here->BSIM3V2von + 0.1, vds, model,
|
||||
here, data->freq, ckt->CKTtemp);
|
||||
T1 = Swi + Slimit;
|
||||
if (T1 > 0.0)
|
||||
noizDens[BSIM3V2FLNOIZ] *= (Slimit
|
||||
* Swi) / T1;
|
||||
else
|
||||
noizDens[BSIM3V2FLNOIZ] *= 0.0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
lnNdens[BSIM3V2FLNOIZ] =
|
||||
log(MAX(noizDens[BSIM3V2FLNOIZ], N_MINLOG));
|
||||
|
||||
noizDens[BSIM3V2TOTNOIZ] = noizDens[BSIM3V2RDNOIZ]
|
||||
+ noizDens[BSIM3V2RSNOIZ]
|
||||
+ noizDens[BSIM3V2IDNOIZ]
|
||||
+ noizDens[BSIM3V2FLNOIZ];
|
||||
lnNdens[BSIM3V2TOTNOIZ] =
|
||||
log(MAX(noizDens[BSIM3V2TOTNOIZ], N_MINLOG));
|
||||
|
||||
*OnDens += noizDens[BSIM3V2TOTNOIZ];
|
||||
|
||||
if (data->delFreq == 0.0)
|
||||
{ /* if we haven't done any previous
|
||||
integration, we need to initialize our
|
||||
"history" variables.
|
||||
*/
|
||||
|
||||
for (i = 0; i < BSIM3V2NSRCS; i++)
|
||||
{ here->BSIM3V2nVar[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 < BSIM3V2NSRCS; i++)
|
||||
{ here->BSIM3V2nVar[OUTNOIZ][i] = 0.0;
|
||||
here->BSIM3V2nVar[INNOIZ][i] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ /* data->delFreq != 0.0,
|
||||
we have to integrate.
|
||||
*/
|
||||
for (i = 0; i < BSIM3V2NSRCS; i++)
|
||||
{ if (i != BSIM3V2TOTNOIZ)
|
||||
{ tempOnoise = Nintegrate(noizDens[i],
|
||||
lnNdens[i],
|
||||
here->BSIM3V2nVar[LNLSTDENS][i],
|
||||
data);
|
||||
tempInoise = Nintegrate(noizDens[i]
|
||||
* data->GainSqInv, lnNdens[i]
|
||||
+ data->lnGainInv,
|
||||
here->BSIM3V2nVar[LNLSTDENS][i]
|
||||
+ data->lnGainInv, data);
|
||||
here->BSIM3V2nVar[LNLSTDENS][i] =
|
||||
lnNdens[i];
|
||||
data->outNoiz += tempOnoise;
|
||||
data->inNoise += tempInoise;
|
||||
if (((NOISEAN*)
|
||||
ckt->CKTcurJob)->NStpsSm != 0)
|
||||
{ here->BSIM3V2nVar[OUTNOIZ][i]
|
||||
+= tempOnoise;
|
||||
here->BSIM3V2nVar[OUTNOIZ][BSIM3V2TOTNOIZ]
|
||||
+= tempOnoise;
|
||||
here->BSIM3V2nVar[INNOIZ][i]
|
||||
+= tempInoise;
|
||||
here->BSIM3V2nVar[INNOIZ][BSIM3V2TOTNOIZ]
|
||||
+= tempInoise;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data->prtSummary)
|
||||
{ for (i = 0; i < BSIM3V2NSRCS; 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 < BSIM3V2NSRCS; i++)
|
||||
{ data->outpVector[data->outNumber++]
|
||||
= here->BSIM3V2nVar[OUTNOIZ][i];
|
||||
data->outpVector[data->outNumber++]
|
||||
= here->BSIM3V2nVar[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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
File: b3v2par.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ifsim.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3V2param(param,value,inst,select)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENinstance *inst;
|
||||
IFvalue *select;
|
||||
{
|
||||
BSIM3V2instance *here = (BSIM3V2instance*)inst;
|
||||
switch(param)
|
||||
{ case BSIM3V2_W:
|
||||
here->BSIM3V2w = value->rValue;
|
||||
here->BSIM3V2wGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_L:
|
||||
here->BSIM3V2l = value->rValue;
|
||||
here->BSIM3V2lGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_AS:
|
||||
here->BSIM3V2sourceArea = value->rValue;
|
||||
here->BSIM3V2sourceAreaGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_AD:
|
||||
here->BSIM3V2drainArea = value->rValue;
|
||||
here->BSIM3V2drainAreaGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_PS:
|
||||
here->BSIM3V2sourcePerimeter = value->rValue;
|
||||
here->BSIM3V2sourcePerimeterGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_PD:
|
||||
here->BSIM3V2drainPerimeter = value->rValue;
|
||||
here->BSIM3V2drainPerimeterGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_NRS:
|
||||
here->BSIM3V2sourceSquares = value->rValue;
|
||||
here->BSIM3V2sourceSquaresGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_NRD:
|
||||
here->BSIM3V2drainSquares = value->rValue;
|
||||
here->BSIM3V2drainSquaresGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_OFF:
|
||||
here->BSIM3V2off = value->iValue;
|
||||
break;
|
||||
case BSIM3V2_IC_VBS:
|
||||
here->BSIM3V2icVBS = value->rValue;
|
||||
here->BSIM3V2icVBSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_IC_VDS:
|
||||
here->BSIM3V2icVDS = value->rValue;
|
||||
here->BSIM3V2icVDSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_IC_VGS:
|
||||
here->BSIM3V2icVGS = value->rValue;
|
||||
here->BSIM3V2icVGSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_NQSMOD:
|
||||
here->BSIM3V2nqsMod = value->iValue;
|
||||
here->BSIM3V2nqsModGiven = TRUE;
|
||||
break;
|
||||
case BSIM3V2_IC:
|
||||
switch(value->v.numValue){
|
||||
case 3:
|
||||
here->BSIM3V2icVBS = *(value->v.vec.rVec+2);
|
||||
here->BSIM3V2icVBSGiven = TRUE;
|
||||
case 2:
|
||||
here->BSIM3V2icVGS = *(value->v.vec.rVec+1);
|
||||
here->BSIM3V2icVGSGiven = TRUE;
|
||||
case 1:
|
||||
here->BSIM3V2icVDS = *(value->v.vec.rVec);
|
||||
here->BSIM3V2icVDSGiven = TRUE;
|
||||
break;
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,366 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Modified by Weidong Liu (1997-1998).
|
||||
File: b3v2pzld.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "complex.h"
|
||||
#include "sperror.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3V2pzLoad(inModel,ckt,s)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
SPcomplex *s;
|
||||
{
|
||||
BSIM3V2model *model = (BSIM3V2model*)inModel;
|
||||
BSIM3V2instance *here;
|
||||
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb;
|
||||
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb;
|
||||
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm, Gmbs;
|
||||
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb;
|
||||
double GSoverlapCap, GDoverlapCap, GBoverlapCap;
|
||||
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb, xcqbb;
|
||||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
|
||||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
|
||||
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
|
||||
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
|
||||
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Cdb, Csg, Csd, Css, Csb;
|
||||
|
||||
for (; model != NULL; model = model->BSIM3V2nextModel)
|
||||
{ for (here = model->BSIM3V2instances; here!= NULL;
|
||||
here = here->BSIM3V2nextInstance)
|
||||
{
|
||||
if (here->BSIM3V2owner != ARCHme) continue;
|
||||
if (here->BSIM3V2mode >= 0)
|
||||
{ Gm = here->BSIM3V2gm;
|
||||
Gmbs = here->BSIM3V2gmbs;
|
||||
FwdSum = Gm + Gmbs;
|
||||
RevSum = 0.0;
|
||||
|
||||
gbbdp = -here->BSIM3V2gbds;
|
||||
gbbsp = here->BSIM3V2gbds + here->BSIM3V2gbgs + here->BSIM3V2gbbs;
|
||||
|
||||
gbdpg = here->BSIM3V2gbgs;
|
||||
gbdpdp = here->BSIM3V2gbds;
|
||||
gbdpb = here->BSIM3V2gbbs;
|
||||
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
|
||||
|
||||
gbspg = 0.0;
|
||||
gbspdp = 0.0;
|
||||
gbspb = 0.0;
|
||||
gbspsp = 0.0;
|
||||
|
||||
if (here->BSIM3V2nqsMod == 0)
|
||||
{ cggb = here->BSIM3V2cggb;
|
||||
cgsb = here->BSIM3V2cgsb;
|
||||
cgdb = here->BSIM3V2cgdb;
|
||||
|
||||
cbgb = here->BSIM3V2cbgb;
|
||||
cbsb = here->BSIM3V2cbsb;
|
||||
cbdb = here->BSIM3V2cbdb;
|
||||
|
||||
cdgb = here->BSIM3V2cdgb;
|
||||
cdsb = here->BSIM3V2cdsb;
|
||||
cddb = here->BSIM3V2cddb;
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.6;
|
||||
dxpart = 0.4;
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3V2gtg;
|
||||
xgtd = here->BSIM3V2gtd;
|
||||
xgts = here->BSIM3V2gts;
|
||||
xgtb = here->BSIM3V2gtb;
|
||||
|
||||
xcqgb = here->BSIM3V2cqgb;
|
||||
xcqdb = here->BSIM3V2cqdb;
|
||||
xcqsb = here->BSIM3V2cqsb;
|
||||
xcqbb = here->BSIM3V2cqbb;
|
||||
|
||||
CoxWL = model->BSIM3V2cox * here->pParam->BSIM3V2weffCV
|
||||
* here->pParam->BSIM3V2leffCV;
|
||||
qcheq = -(here->BSIM3V2qgate + here->BSIM3V2qbulk);
|
||||
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
|
||||
{ if (model->BSIM3V2xpart < 0.5)
|
||||
{ dxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3V2xpart > 0.5)
|
||||
{ dxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{ dxpart = 0.5;
|
||||
}
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ dxpart = here->BSIM3V2qdrn / qcheq;
|
||||
Cdd = here->BSIM3V2cddb;
|
||||
Csd = -(here->BSIM3V2cgdb + here->BSIM3V2cddb
|
||||
+ here->BSIM3V2cbdb);
|
||||
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq;
|
||||
Cdg = here->BSIM3V2cdgb;
|
||||
Csg = -(here->BSIM3V2cggb + here->BSIM3V2cdgb
|
||||
+ here->BSIM3V2cbgb);
|
||||
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq;
|
||||
|
||||
Cds = here->BSIM3V2cdsb;
|
||||
Css = -(here->BSIM3V2cgsb + here->BSIM3V2cdsb
|
||||
+ here->BSIM3V2cbsb);
|
||||
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->BSIM3V2gm;
|
||||
Gmbs = -here->BSIM3V2gmbs;
|
||||
FwdSum = 0.0;
|
||||
RevSum = -(Gm + Gmbs);
|
||||
|
||||
gbbsp = -here->BSIM3V2gbds;
|
||||
gbbdp = here->BSIM3V2gbds + here->BSIM3V2gbgs + here->BSIM3V2gbbs;
|
||||
|
||||
gbdpg = 0.0;
|
||||
gbdpsp = 0.0;
|
||||
gbdpb = 0.0;
|
||||
gbdpdp = 0.0;
|
||||
|
||||
gbspg = here->BSIM3V2gbgs;
|
||||
gbspsp = here->BSIM3V2gbds;
|
||||
gbspb = here->BSIM3V2gbbs;
|
||||
gbspdp = -(gbspg + gbspsp + gbspb);
|
||||
|
||||
if (here->BSIM3V2nqsMod == 0)
|
||||
{ cggb = here->BSIM3V2cggb;
|
||||
cgsb = here->BSIM3V2cgdb;
|
||||
cgdb = here->BSIM3V2cgsb;
|
||||
|
||||
cbgb = here->BSIM3V2cbgb;
|
||||
cbsb = here->BSIM3V2cbdb;
|
||||
cbdb = here->BSIM3V2cbsb;
|
||||
|
||||
cdgb = -(here->BSIM3V2cdgb + cggb + cbgb);
|
||||
cdsb = -(here->BSIM3V2cddb + cgsb + cbsb);
|
||||
cddb = -(here->BSIM3V2cdsb + cgdb + cbdb);
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.4;
|
||||
dxpart = 0.6;
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3V2gtg;
|
||||
xgtd = here->BSIM3V2gts;
|
||||
xgts = here->BSIM3V2gtd;
|
||||
xgtb = here->BSIM3V2gtb;
|
||||
|
||||
xcqgb = here->BSIM3V2cqgb;
|
||||
xcqdb = here->BSIM3V2cqsb;
|
||||
xcqsb = here->BSIM3V2cqdb;
|
||||
xcqbb = here->BSIM3V2cqbb;
|
||||
|
||||
CoxWL = model->BSIM3V2cox * here->pParam->BSIM3V2weffCV
|
||||
* here->pParam->BSIM3V2leffCV;
|
||||
qcheq = -(here->BSIM3V2qgate + here->BSIM3V2qbulk);
|
||||
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
|
||||
{ if (model->BSIM3V2xpart < 0.5)
|
||||
{ sxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3V2xpart > 0.5)
|
||||
{ sxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{ sxpart = 0.5;
|
||||
}
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ sxpart = here->BSIM3V2qdrn / qcheq;
|
||||
Css = here->BSIM3V2cddb;
|
||||
Cds = -(here->BSIM3V2cgdb + here->BSIM3V2cddb
|
||||
+ here->BSIM3V2cbdb);
|
||||
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq;
|
||||
Csg = here->BSIM3V2cdgb;
|
||||
Cdg = -(here->BSIM3V2cggb + here->BSIM3V2cdgb
|
||||
+ here->BSIM3V2cbgb);
|
||||
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq;
|
||||
|
||||
Csd = here->BSIM3V2cdsb;
|
||||
Cdd = -(here->BSIM3V2cgsb + here->BSIM3V2cdsb
|
||||
+ here->BSIM3V2cbsb);
|
||||
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq;
|
||||
|
||||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg
|
||||
+ dsxpart_dVs);
|
||||
}
|
||||
dxpart = 1.0 - sxpart;
|
||||
ddxpart_dVd = -dsxpart_dVd;
|
||||
ddxpart_dVg = -dsxpart_dVg;
|
||||
ddxpart_dVs = -dsxpart_dVs;
|
||||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
T1 = *(ckt->CKTstate0 + here->BSIM3V2qdef) * here->BSIM3V2gtau;
|
||||
gdpr = here->BSIM3V2drainConductance;
|
||||
gspr = here->BSIM3V2sourceConductance;
|
||||
gds = here->BSIM3V2gds;
|
||||
gbd = here->BSIM3V2gbd;
|
||||
gbs = here->BSIM3V2gbs;
|
||||
capbd = here->BSIM3V2capbd;
|
||||
capbs = here->BSIM3V2capbs;
|
||||
|
||||
GSoverlapCap = here->BSIM3V2cgso;
|
||||
GDoverlapCap = here->BSIM3V2cgdo;
|
||||
GBoverlapCap = here->pParam->BSIM3V2cgbo;
|
||||
|
||||
xcdgb = (cdgb - GDoverlapCap);
|
||||
xcddb = (cddb + capbd + GDoverlapCap);
|
||||
xcdsb = cdsb;
|
||||
xcdbb = -(xcdgb + xcddb + xcdsb);
|
||||
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap);
|
||||
xcsdb = -(cgdb + cbdb + cddb);
|
||||
xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb));
|
||||
xcsbb = -(xcsgb + xcsdb + xcssb);
|
||||
xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap);
|
||||
xcgdb = (cgdb - GDoverlapCap);
|
||||
xcgsb = (cgsb - GSoverlapCap);
|
||||
xcgbb = -(xcggb + xcgdb + xcgsb);
|
||||
xcbgb = (cbgb - GBoverlapCap);
|
||||
xcbdb = (cbdb - capbd);
|
||||
xcbsb = (cbsb - capbs);
|
||||
xcbbb = -(xcbgb + xcbdb + xcbsb);
|
||||
|
||||
*(here->BSIM3V2GgPtr ) += xcggb * s->real;
|
||||
*(here->BSIM3V2GgPtr +1) += xcggb * s->imag;
|
||||
*(here->BSIM3V2BbPtr ) += xcbbb * s->real;
|
||||
*(here->BSIM3V2BbPtr +1) += xcbbb * s->imag;
|
||||
*(here->BSIM3V2DPdpPtr ) += xcddb * s->real;
|
||||
*(here->BSIM3V2DPdpPtr +1) += xcddb * s->imag;
|
||||
*(here->BSIM3V2SPspPtr ) += xcssb * s->real;
|
||||
*(here->BSIM3V2SPspPtr +1) += xcssb * s->imag;
|
||||
|
||||
*(here->BSIM3V2GbPtr ) += xcgbb * s->real;
|
||||
*(here->BSIM3V2GbPtr +1) += xcgbb * s->imag;
|
||||
*(here->BSIM3V2GdpPtr ) += xcgdb * s->real;
|
||||
*(here->BSIM3V2GdpPtr +1) += xcgdb * s->imag;
|
||||
*(here->BSIM3V2GspPtr ) += xcgsb * s->real;
|
||||
*(here->BSIM3V2GspPtr +1) += xcgsb * s->imag;
|
||||
|
||||
*(here->BSIM3V2BgPtr ) += xcbgb * s->real;
|
||||
*(here->BSIM3V2BgPtr +1) += xcbgb * s->imag;
|
||||
*(here->BSIM3V2BdpPtr ) += xcbdb * s->real;
|
||||
*(here->BSIM3V2BdpPtr +1) += xcbdb * s->imag;
|
||||
*(here->BSIM3V2BspPtr ) += xcbsb * s->real;
|
||||
*(here->BSIM3V2BspPtr +1) += xcbsb * s->imag;
|
||||
|
||||
*(here->BSIM3V2DPgPtr ) += xcdgb * s->real;
|
||||
*(here->BSIM3V2DPgPtr +1) += xcdgb * s->imag;
|
||||
*(here->BSIM3V2DPbPtr ) += xcdbb * s->real;
|
||||
*(here->BSIM3V2DPbPtr +1) += xcdbb * s->imag;
|
||||
*(here->BSIM3V2DPspPtr ) += xcdsb * s->real;
|
||||
*(here->BSIM3V2DPspPtr +1) += xcdsb * s->imag;
|
||||
|
||||
*(here->BSIM3V2SPgPtr ) += xcsgb * s->real;
|
||||
*(here->BSIM3V2SPgPtr +1) += xcsgb * s->imag;
|
||||
*(here->BSIM3V2SPbPtr ) += xcsbb * s->real;
|
||||
*(here->BSIM3V2SPbPtr +1) += xcsbb * s->imag;
|
||||
*(here->BSIM3V2SPdpPtr ) += xcsdb * s->real;
|
||||
*(here->BSIM3V2SPdpPtr +1) += xcsdb * s->imag;
|
||||
|
||||
*(here->BSIM3V2DdPtr) += gdpr;
|
||||
*(here->BSIM3V2DdpPtr) -= gdpr;
|
||||
*(here->BSIM3V2DPdPtr) -= gdpr;
|
||||
|
||||
*(here->BSIM3V2SsPtr) += gspr;
|
||||
*(here->BSIM3V2SspPtr) -= gspr;
|
||||
*(here->BSIM3V2SPsPtr) -= gspr;
|
||||
|
||||
*(here->BSIM3V2BgPtr) -= here->BSIM3V2gbgs;
|
||||
*(here->BSIM3V2BbPtr) += gbd + gbs - here->BSIM3V2gbbs;
|
||||
*(here->BSIM3V2BdpPtr) -= gbd - gbbdp;
|
||||
*(here->BSIM3V2BspPtr) -= gbs - gbbsp;
|
||||
|
||||
*(here->BSIM3V2DPgPtr) += Gm + dxpart * xgtg
|
||||
+ T1 * ddxpart_dVg + gbdpg;
|
||||
*(here->BSIM3V2DPdpPtr) += gdpr + gds + gbd + RevSum
|
||||
+ dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp;
|
||||
*(here->BSIM3V2DPspPtr) -= gds + FwdSum - dxpart * xgts
|
||||
- T1 * ddxpart_dVs - gbdpsp;
|
||||
*(here->BSIM3V2DPbPtr) -= gbd - Gmbs - dxpart * xgtb
|
||||
- T1 * ddxpart_dVb - gbdpb;
|
||||
|
||||
*(here->BSIM3V2SPgPtr) -= Gm - sxpart * xgtg
|
||||
- T1 * dsxpart_dVg - gbspg;
|
||||
*(here->BSIM3V2SPspPtr) += gspr + gds + gbs + FwdSum
|
||||
+ sxpart * xgts + T1 * dsxpart_dVs + gbspsp;
|
||||
*(here->BSIM3V2SPbPtr) -= gbs + Gmbs - sxpart * xgtb
|
||||
- T1 * dsxpart_dVb - gbspb;
|
||||
*(here->BSIM3V2SPdpPtr) -= gds + RevSum - sxpart * xgtd
|
||||
- T1 * dsxpart_dVd - gbspdp;
|
||||
|
||||
*(here->BSIM3V2GgPtr) -= xgtg;
|
||||
*(here->BSIM3V2GbPtr) -= xgtb;
|
||||
*(here->BSIM3V2GdpPtr) -= xgtd;
|
||||
*(here->BSIM3V2GspPtr) -= xgts;
|
||||
|
||||
if (here->BSIM3V2nqsMod)
|
||||
{ *(here->BSIM3V2QqPtr ) += s->real;
|
||||
*(here->BSIM3V2QqPtr +1) += s->imag;
|
||||
*(here->BSIM3V2QgPtr ) -= xcqgb * s->real;
|
||||
*(here->BSIM3V2QgPtr +1) -= xcqgb * s->imag;
|
||||
*(here->BSIM3V2QdpPtr ) -= xcqdb * s->real;
|
||||
*(here->BSIM3V2QdpPtr +1) -= xcqdb * s->imag;
|
||||
*(here->BSIM3V2QbPtr ) -= xcqbb * s->real;
|
||||
*(here->BSIM3V2QbPtr +1) -= xcqbb * s->imag;
|
||||
*(here->BSIM3V2QspPtr ) -= xcqsb * s->real;
|
||||
*(here->BSIM3V2QspPtr +1) -= xcqsb * s->imag;
|
||||
|
||||
*(here->BSIM3V2GqPtr) -= here->BSIM3V2gtau;
|
||||
*(here->BSIM3V2DPqPtr) += dxpart * here->BSIM3V2gtau;
|
||||
*(here->BSIM3V2SPqPtr) += sxpart * here->BSIM3V2gtau;
|
||||
|
||||
*(here->BSIM3V2QqPtr) += here->BSIM3V2gtau;
|
||||
*(here->BSIM3V2QgPtr) += xgtg;
|
||||
*(here->BSIM3V2QdpPtr) += xgtd;
|
||||
*(here->BSIM3V2QbPtr) += xgtb;
|
||||
*(here->BSIM3V2QspPtr) += xgts;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
|
@ -1,995 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Modified by Weidong Liu (1997-1998).
|
||||
File: b3v2set.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "const.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
#define MAX_EXP 5.834617425e14
|
||||
#define MIN_EXP 1.713908431e-15
|
||||
#define EXP_THRESHOLD 34.0
|
||||
#define SMOOTHFACTOR 0.1
|
||||
#define EPSOX 3.453133e-11
|
||||
#define EPSSI 1.03594e-10
|
||||
#define PI 3.141592654
|
||||
#define Charge_q 1.60219e-19
|
||||
#define Meter2Micron 1.0e6
|
||||
|
||||
int
|
||||
BSIM3V2setup(matrix,inModel,ckt,states)
|
||||
SMPmatrix *matrix;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
int *states;
|
||||
{
|
||||
BSIM3V2model *model = (BSIM3V2model*)inModel;
|
||||
BSIM3V2instance *here;
|
||||
int error;
|
||||
CKTnode *tmp;
|
||||
|
||||
double tmp1, tmp2;
|
||||
|
||||
/* loop through all the BSIM3V2 device models */
|
||||
for( ; model != NULL; model = model->BSIM3V2nextModel )
|
||||
{
|
||||
/* Default value Processing for BSIM3V2 MOSFET Models */
|
||||
if (!model->BSIM3V2typeGiven)
|
||||
model->BSIM3V2type = NMOS;
|
||||
if (!model->BSIM3V2mobModGiven)
|
||||
model->BSIM3V2mobMod = 1;
|
||||
if (!model->BSIM3V2binUnitGiven)
|
||||
model->BSIM3V2binUnit = 1;
|
||||
if (!model->BSIM3V2paramChkGiven)
|
||||
model->BSIM3V2paramChk = 0;
|
||||
if (!model->BSIM3V2capModGiven)
|
||||
model->BSIM3V2capMod = 3;
|
||||
if (!model->BSIM3V2noiModGiven)
|
||||
model->BSIM3V2noiMod = 1;
|
||||
if (!model->BSIM3V2versionGiven)
|
||||
model->BSIM3V2version = 3.2;
|
||||
if (!model->BSIM3V2toxGiven)
|
||||
model->BSIM3V2tox = 150.0e-10;
|
||||
model->BSIM3V2cox = 3.453133e-11 / model->BSIM3V2tox;
|
||||
if (!model->BSIM3V2toxmGiven)
|
||||
model->BSIM3V2toxm = model->BSIM3V2tox;
|
||||
|
||||
if (!model->BSIM3V2cdscGiven)
|
||||
model->BSIM3V2cdsc = 2.4e-4; /* unit Q/V/m^2 */
|
||||
if (!model->BSIM3V2cdscbGiven)
|
||||
model->BSIM3V2cdscb = 0.0; /* unit Q/V/m^2 */
|
||||
if (!model->BSIM3V2cdscdGiven)
|
||||
model->BSIM3V2cdscd = 0.0; /* unit Q/V/m^2 */
|
||||
if (!model->BSIM3V2citGiven)
|
||||
model->BSIM3V2cit = 0.0; /* unit Q/V/m^2 */
|
||||
if (!model->BSIM3V2nfactorGiven)
|
||||
model->BSIM3V2nfactor = 1;
|
||||
if (!model->BSIM3V2xjGiven)
|
||||
model->BSIM3V2xj = .15e-6;
|
||||
if (!model->BSIM3V2vsatGiven)
|
||||
model->BSIM3V2vsat = 8.0e4; /* unit m/s */
|
||||
if (!model->BSIM3V2atGiven)
|
||||
model->BSIM3V2at = 3.3e4; /* unit m/s */
|
||||
if (!model->BSIM3V2a0Given)
|
||||
model->BSIM3V2a0 = 1.0;
|
||||
if (!model->BSIM3V2agsGiven)
|
||||
model->BSIM3V2ags = 0.0;
|
||||
if (!model->BSIM3V2a1Given)
|
||||
model->BSIM3V2a1 = 0.0;
|
||||
if (!model->BSIM3V2a2Given)
|
||||
model->BSIM3V2a2 = 1.0;
|
||||
if (!model->BSIM3V2ketaGiven)
|
||||
model->BSIM3V2keta = -0.047; /* unit / V */
|
||||
if (!model->BSIM3V2nsubGiven)
|
||||
model->BSIM3V2nsub = 6.0e16; /* unit 1/cm3 */
|
||||
if (!model->BSIM3V2npeakGiven)
|
||||
model->BSIM3V2npeak = 1.7e17; /* unit 1/cm3 */
|
||||
if (!model->BSIM3V2ngateGiven)
|
||||
model->BSIM3V2ngate = 0; /* unit 1/cm3 */
|
||||
if (!model->BSIM3V2vbmGiven)
|
||||
model->BSIM3V2vbm = -3.0;
|
||||
if (!model->BSIM3V2xtGiven)
|
||||
model->BSIM3V2xt = 1.55e-7;
|
||||
if (!model->BSIM3V2kt1Given)
|
||||
model->BSIM3V2kt1 = -0.11; /* unit V */
|
||||
if (!model->BSIM3V2kt1lGiven)
|
||||
model->BSIM3V2kt1l = 0.0; /* unit V*m */
|
||||
if (!model->BSIM3V2kt2Given)
|
||||
model->BSIM3V2kt2 = 0.022; /* No unit */
|
||||
if (!model->BSIM3V2k3Given)
|
||||
model->BSIM3V2k3 = 80.0;
|
||||
if (!model->BSIM3V2k3bGiven)
|
||||
model->BSIM3V2k3b = 0.0;
|
||||
if (!model->BSIM3V2w0Given)
|
||||
model->BSIM3V2w0 = 2.5e-6;
|
||||
if (!model->BSIM3V2nlxGiven)
|
||||
model->BSIM3V2nlx = 1.74e-7;
|
||||
if (!model->BSIM3V2dvt0Given)
|
||||
model->BSIM3V2dvt0 = 2.2;
|
||||
if (!model->BSIM3V2dvt1Given)
|
||||
model->BSIM3V2dvt1 = 0.53;
|
||||
if (!model->BSIM3V2dvt2Given)
|
||||
model->BSIM3V2dvt2 = -0.032; /* unit 1 / V */
|
||||
|
||||
if (!model->BSIM3V2dvt0wGiven)
|
||||
model->BSIM3V2dvt0w = 0.0;
|
||||
if (!model->BSIM3V2dvt1wGiven)
|
||||
model->BSIM3V2dvt1w = 5.3e6;
|
||||
if (!model->BSIM3V2dvt2wGiven)
|
||||
model->BSIM3V2dvt2w = -0.032;
|
||||
|
||||
if (!model->BSIM3V2droutGiven)
|
||||
model->BSIM3V2drout = 0.56;
|
||||
if (!model->BSIM3V2dsubGiven)
|
||||
model->BSIM3V2dsub = model->BSIM3V2drout;
|
||||
if (!model->BSIM3V2vth0Given)
|
||||
model->BSIM3V2vth0 = (model->BSIM3V2type == NMOS) ? 0.7 : -0.7;
|
||||
if (!model->BSIM3V2uaGiven)
|
||||
model->BSIM3V2ua = 2.25e-9; /* unit m/V */
|
||||
if (!model->BSIM3V2ua1Given)
|
||||
model->BSIM3V2ua1 = 4.31e-9; /* unit m/V */
|
||||
if (!model->BSIM3V2ubGiven)
|
||||
model->BSIM3V2ub = 5.87e-19; /* unit (m/V)**2 */
|
||||
if (!model->BSIM3V2ub1Given)
|
||||
model->BSIM3V2ub1 = -7.61e-18; /* unit (m/V)**2 */
|
||||
if (!model->BSIM3V2ucGiven)
|
||||
model->BSIM3V2uc = (model->BSIM3V2mobMod == 3) ? -0.0465 : -0.0465e-9;
|
||||
if (!model->BSIM3V2uc1Given)
|
||||
model->BSIM3V2uc1 = (model->BSIM3V2mobMod == 3) ? -0.056 : -0.056e-9;
|
||||
if (!model->BSIM3V2u0Given)
|
||||
model->BSIM3V2u0 = (model->BSIM3V2type == NMOS) ? 0.067 : 0.025;
|
||||
if (!model->BSIM3V2uteGiven)
|
||||
model->BSIM3V2ute = -1.5;
|
||||
if (!model->BSIM3V2voffGiven)
|
||||
model->BSIM3V2voff = -0.08;
|
||||
if (!model->BSIM3V2deltaGiven)
|
||||
model->BSIM3V2delta = 0.01;
|
||||
if (!model->BSIM3V2rdswGiven)
|
||||
model->BSIM3V2rdsw = 0;
|
||||
if (!model->BSIM3V2prwgGiven)
|
||||
model->BSIM3V2prwg = 0.0; /* unit 1/V */
|
||||
if (!model->BSIM3V2prwbGiven)
|
||||
model->BSIM3V2prwb = 0.0;
|
||||
if (!model->BSIM3V2prtGiven)
|
||||
if (!model->BSIM3V2prtGiven)
|
||||
model->BSIM3V2prt = 0.0;
|
||||
if (!model->BSIM3V2eta0Given)
|
||||
model->BSIM3V2eta0 = 0.08; /* no unit */
|
||||
if (!model->BSIM3V2etabGiven)
|
||||
model->BSIM3V2etab = -0.07; /* unit 1/V */
|
||||
if (!model->BSIM3V2pclmGiven)
|
||||
model->BSIM3V2pclm = 1.3; /* no unit */
|
||||
if (!model->BSIM3V2pdibl1Given)
|
||||
model->BSIM3V2pdibl1 = .39; /* no unit */
|
||||
if (!model->BSIM3V2pdibl2Given)
|
||||
model->BSIM3V2pdibl2 = 0.0086; /* no unit */
|
||||
if (!model->BSIM3V2pdiblbGiven)
|
||||
model->BSIM3V2pdiblb = 0.0; /* 1/V */
|
||||
if (!model->BSIM3V2pscbe1Given)
|
||||
model->BSIM3V2pscbe1 = 4.24e8;
|
||||
if (!model->BSIM3V2pscbe2Given)
|
||||
model->BSIM3V2pscbe2 = 1.0e-5;
|
||||
if (!model->BSIM3V2pvagGiven)
|
||||
model->BSIM3V2pvag = 0.0;
|
||||
if (!model->BSIM3V2wrGiven)
|
||||
model->BSIM3V2wr = 1.0;
|
||||
if (!model->BSIM3V2dwgGiven)
|
||||
model->BSIM3V2dwg = 0.0;
|
||||
if (!model->BSIM3V2dwbGiven)
|
||||
model->BSIM3V2dwb = 0.0;
|
||||
if (!model->BSIM3V2b0Given)
|
||||
model->BSIM3V2b0 = 0.0;
|
||||
if (!model->BSIM3V2b1Given)
|
||||
model->BSIM3V2b1 = 0.0;
|
||||
if (!model->BSIM3V2alpha0Given)
|
||||
model->BSIM3V2alpha0 = 0.0;
|
||||
if (!model->BSIM3V2alpha1Given)
|
||||
model->BSIM3V2alpha1 = 0.0;
|
||||
if (!model->BSIM3V2beta0Given)
|
||||
model->BSIM3V2beta0 = 30.0;
|
||||
if (!model->BSIM3V2ijthGiven)
|
||||
model->BSIM3V2ijth = 0.1; /* unit A */
|
||||
|
||||
if (!model->BSIM3V2elmGiven)
|
||||
model->BSIM3V2elm = 5.0;
|
||||
if (!model->BSIM3V2cgslGiven)
|
||||
model->BSIM3V2cgsl = 0.0;
|
||||
if (!model->BSIM3V2cgdlGiven)
|
||||
model->BSIM3V2cgdl = 0.0;
|
||||
if (!model->BSIM3V2ckappaGiven)
|
||||
model->BSIM3V2ckappa = 0.6;
|
||||
if (!model->BSIM3V2clcGiven)
|
||||
model->BSIM3V2clc = 0.1e-6;
|
||||
if (!model->BSIM3V2cleGiven)
|
||||
model->BSIM3V2cle = 0.6;
|
||||
if (!model->BSIM3V2vfbcvGiven)
|
||||
model->BSIM3V2vfbcv = -1.0;
|
||||
if (!model->BSIM3V2acdeGiven)
|
||||
model->BSIM3V2acde = 1.0;
|
||||
if (!model->BSIM3V2moinGiven)
|
||||
model->BSIM3V2moin = 15.0;
|
||||
if (!model->BSIM3V2noffGiven)
|
||||
model->BSIM3V2noff = 1.0;
|
||||
if (!model->BSIM3V2voffcvGiven)
|
||||
model->BSIM3V2voffcv = 0.0;
|
||||
if (!model->BSIM3V2tcjGiven)
|
||||
model->BSIM3V2tcj = 0.0;
|
||||
if (!model->BSIM3V2tpbGiven)
|
||||
model->BSIM3V2tpb = 0.0;
|
||||
if (!model->BSIM3V2tcjswGiven)
|
||||
model->BSIM3V2tcjsw = 0.0;
|
||||
if (!model->BSIM3V2tpbswGiven)
|
||||
model->BSIM3V2tpbsw = 0.0;
|
||||
if (!model->BSIM3V2tcjswgGiven)
|
||||
model->BSIM3V2tcjswg = 0.0;
|
||||
if (!model->BSIM3V2tpbswgGiven)
|
||||
model->BSIM3V2tpbswg = 0.0;
|
||||
|
||||
/* Length dependence */
|
||||
if (!model->BSIM3V2lcdscGiven)
|
||||
model->BSIM3V2lcdsc = 0.0;
|
||||
if (!model->BSIM3V2lcdscbGiven)
|
||||
model->BSIM3V2lcdscb = 0.0;
|
||||
if (!model->BSIM3V2lcdscdGiven)
|
||||
model->BSIM3V2lcdscd = 0.0;
|
||||
if (!model->BSIM3V2lcitGiven)
|
||||
model->BSIM3V2lcit = 0.0;
|
||||
if (!model->BSIM3V2lnfactorGiven)
|
||||
model->BSIM3V2lnfactor = 0.0;
|
||||
if (!model->BSIM3V2lxjGiven)
|
||||
model->BSIM3V2lxj = 0.0;
|
||||
if (!model->BSIM3V2lvsatGiven)
|
||||
model->BSIM3V2lvsat = 0.0;
|
||||
if (!model->BSIM3V2latGiven)
|
||||
model->BSIM3V2lat = 0.0;
|
||||
if (!model->BSIM3V2la0Given)
|
||||
model->BSIM3V2la0 = 0.0;
|
||||
if (!model->BSIM3V2lagsGiven)
|
||||
model->BSIM3V2lags = 0.0;
|
||||
if (!model->BSIM3V2la1Given)
|
||||
model->BSIM3V2la1 = 0.0;
|
||||
if (!model->BSIM3V2la2Given)
|
||||
model->BSIM3V2la2 = 0.0;
|
||||
if (!model->BSIM3V2lketaGiven)
|
||||
model->BSIM3V2lketa = 0.0;
|
||||
if (!model->BSIM3V2lnsubGiven)
|
||||
model->BSIM3V2lnsub = 0.0;
|
||||
if (!model->BSIM3V2lnpeakGiven)
|
||||
model->BSIM3V2lnpeak = 0.0;
|
||||
if (!model->BSIM3V2lngateGiven)
|
||||
model->BSIM3V2lngate = 0.0;
|
||||
if (!model->BSIM3V2lvbmGiven)
|
||||
model->BSIM3V2lvbm = 0.0;
|
||||
if (!model->BSIM3V2lxtGiven)
|
||||
model->BSIM3V2lxt = 0.0;
|
||||
if (!model->BSIM3V2lkt1Given)
|
||||
model->BSIM3V2lkt1 = 0.0;
|
||||
if (!model->BSIM3V2lkt1lGiven)
|
||||
model->BSIM3V2lkt1l = 0.0;
|
||||
if (!model->BSIM3V2lkt2Given)
|
||||
model->BSIM3V2lkt2 = 0.0;
|
||||
if (!model->BSIM3V2lk3Given)
|
||||
model->BSIM3V2lk3 = 0.0;
|
||||
if (!model->BSIM3V2lk3bGiven)
|
||||
model->BSIM3V2lk3b = 0.0;
|
||||
if (!model->BSIM3V2lw0Given)
|
||||
model->BSIM3V2lw0 = 0.0;
|
||||
if (!model->BSIM3V2lnlxGiven)
|
||||
model->BSIM3V2lnlx = 0.0;
|
||||
if (!model->BSIM3V2ldvt0Given)
|
||||
model->BSIM3V2ldvt0 = 0.0;
|
||||
if (!model->BSIM3V2ldvt1Given)
|
||||
model->BSIM3V2ldvt1 = 0.0;
|
||||
if (!model->BSIM3V2ldvt2Given)
|
||||
model->BSIM3V2ldvt2 = 0.0;
|
||||
if (!model->BSIM3V2ldvt0wGiven)
|
||||
model->BSIM3V2ldvt0w = 0.0;
|
||||
if (!model->BSIM3V2ldvt1wGiven)
|
||||
model->BSIM3V2ldvt1w = 0.0;
|
||||
if (!model->BSIM3V2ldvt2wGiven)
|
||||
model->BSIM3V2ldvt2w = 0.0;
|
||||
if (!model->BSIM3V2ldroutGiven)
|
||||
model->BSIM3V2ldrout = 0.0;
|
||||
if (!model->BSIM3V2ldsubGiven)
|
||||
model->BSIM3V2ldsub = 0.0;
|
||||
if (!model->BSIM3V2lvth0Given)
|
||||
model->BSIM3V2lvth0 = 0.0;
|
||||
if (!model->BSIM3V2luaGiven)
|
||||
model->BSIM3V2lua = 0.0;
|
||||
if (!model->BSIM3V2lua1Given)
|
||||
model->BSIM3V2lua1 = 0.0;
|
||||
if (!model->BSIM3V2lubGiven)
|
||||
model->BSIM3V2lub = 0.0;
|
||||
if (!model->BSIM3V2lub1Given)
|
||||
model->BSIM3V2lub1 = 0.0;
|
||||
if (!model->BSIM3V2lucGiven)
|
||||
model->BSIM3V2luc = 0.0;
|
||||
if (!model->BSIM3V2luc1Given)
|
||||
model->BSIM3V2luc1 = 0.0;
|
||||
if (!model->BSIM3V2lu0Given)
|
||||
model->BSIM3V2lu0 = 0.0;
|
||||
if (!model->BSIM3V2luteGiven)
|
||||
model->BSIM3V2lute = 0.0;
|
||||
if (!model->BSIM3V2lvoffGiven)
|
||||
model->BSIM3V2lvoff = 0.0;
|
||||
if (!model->BSIM3V2ldeltaGiven)
|
||||
model->BSIM3V2ldelta = 0.0;
|
||||
if (!model->BSIM3V2lrdswGiven)
|
||||
model->BSIM3V2lrdsw = 0.0;
|
||||
if (!model->BSIM3V2lprwbGiven)
|
||||
model->BSIM3V2lprwb = 0.0;
|
||||
if (!model->BSIM3V2lprwgGiven)
|
||||
model->BSIM3V2lprwg = 0.0;
|
||||
if (!model->BSIM3V2lprtGiven)
|
||||
model->BSIM3V2lprt = 0.0;
|
||||
if (!model->BSIM3V2leta0Given)
|
||||
model->BSIM3V2leta0 = 0.0;
|
||||
if (!model->BSIM3V2letabGiven)
|
||||
model->BSIM3V2letab = -0.0;
|
||||
if (!model->BSIM3V2lpclmGiven)
|
||||
model->BSIM3V2lpclm = 0.0;
|
||||
if (!model->BSIM3V2lpdibl1Given)
|
||||
model->BSIM3V2lpdibl1 = 0.0;
|
||||
if (!model->BSIM3V2lpdibl2Given)
|
||||
model->BSIM3V2lpdibl2 = 0.0;
|
||||
if (!model->BSIM3V2lpdiblbGiven)
|
||||
model->BSIM3V2lpdiblb = 0.0;
|
||||
if (!model->BSIM3V2lpscbe1Given)
|
||||
model->BSIM3V2lpscbe1 = 0.0;
|
||||
if (!model->BSIM3V2lpscbe2Given)
|
||||
model->BSIM3V2lpscbe2 = 0.0;
|
||||
if (!model->BSIM3V2lpvagGiven)
|
||||
model->BSIM3V2lpvag = 0.0;
|
||||
if (!model->BSIM3V2lwrGiven)
|
||||
model->BSIM3V2lwr = 0.0;
|
||||
if (!model->BSIM3V2ldwgGiven)
|
||||
model->BSIM3V2ldwg = 0.0;
|
||||
if (!model->BSIM3V2ldwbGiven)
|
||||
model->BSIM3V2ldwb = 0.0;
|
||||
if (!model->BSIM3V2lb0Given)
|
||||
model->BSIM3V2lb0 = 0.0;
|
||||
if (!model->BSIM3V2lb1Given)
|
||||
model->BSIM3V2lb1 = 0.0;
|
||||
if (!model->BSIM3V2lalpha0Given)
|
||||
model->BSIM3V2lalpha0 = 0.0;
|
||||
if (!model->BSIM3V2lalpha1Given)
|
||||
model->BSIM3V2lalpha1 = 0.0;
|
||||
if (!model->BSIM3V2lbeta0Given)
|
||||
model->BSIM3V2lbeta0 = 0.0;
|
||||
if (!model->BSIM3V2lvfbGiven)
|
||||
model->BSIM3V2lvfb = 0.0;
|
||||
|
||||
if (!model->BSIM3V2lelmGiven)
|
||||
model->BSIM3V2lelm = 0.0;
|
||||
if (!model->BSIM3V2lcgslGiven)
|
||||
model->BSIM3V2lcgsl = 0.0;
|
||||
if (!model->BSIM3V2lcgdlGiven)
|
||||
model->BSIM3V2lcgdl = 0.0;
|
||||
if (!model->BSIM3V2lckappaGiven)
|
||||
model->BSIM3V2lckappa = 0.0;
|
||||
if (!model->BSIM3V2lclcGiven)
|
||||
model->BSIM3V2lclc = 0.0;
|
||||
if (!model->BSIM3V2lcleGiven)
|
||||
model->BSIM3V2lcle = 0.0;
|
||||
if (!model->BSIM3V2lcfGiven)
|
||||
model->BSIM3V2lcf = 0.0;
|
||||
if (!model->BSIM3V2lvfbcvGiven)
|
||||
model->BSIM3V2lvfbcv = 0.0;
|
||||
if (!model->BSIM3V2lacdeGiven)
|
||||
model->BSIM3V2lacde = 0.0;
|
||||
if (!model->BSIM3V2lmoinGiven)
|
||||
model->BSIM3V2lmoin = 0.0;
|
||||
if (!model->BSIM3V2lnoffGiven)
|
||||
model->BSIM3V2lnoff = 0.0;
|
||||
if (!model->BSIM3V2lvoffcvGiven)
|
||||
model->BSIM3V2lvoffcv = 0.0;
|
||||
|
||||
/* Width dependence */
|
||||
if (!model->BSIM3V2wcdscGiven)
|
||||
model->BSIM3V2wcdsc = 0.0;
|
||||
if (!model->BSIM3V2wcdscbGiven)
|
||||
model->BSIM3V2wcdscb = 0.0;
|
||||
if (!model->BSIM3V2wcdscdGiven)
|
||||
model->BSIM3V2wcdscd = 0.0;
|
||||
if (!model->BSIM3V2wcitGiven)
|
||||
model->BSIM3V2wcit = 0.0;
|
||||
if (!model->BSIM3V2wnfactorGiven)
|
||||
model->BSIM3V2wnfactor = 0.0;
|
||||
if (!model->BSIM3V2wxjGiven)
|
||||
model->BSIM3V2wxj = 0.0;
|
||||
if (!model->BSIM3V2wvsatGiven)
|
||||
model->BSIM3V2wvsat = 0.0;
|
||||
if (!model->BSIM3V2watGiven)
|
||||
model->BSIM3V2wat = 0.0;
|
||||
if (!model->BSIM3V2wa0Given)
|
||||
model->BSIM3V2wa0 = 0.0;
|
||||
if (!model->BSIM3V2wagsGiven)
|
||||
model->BSIM3V2wags = 0.0;
|
||||
if (!model->BSIM3V2wa1Given)
|
||||
model->BSIM3V2wa1 = 0.0;
|
||||
if (!model->BSIM3V2wa2Given)
|
||||
model->BSIM3V2wa2 = 0.0;
|
||||
if (!model->BSIM3V2wketaGiven)
|
||||
model->BSIM3V2wketa = 0.0;
|
||||
if (!model->BSIM3V2wnsubGiven)
|
||||
model->BSIM3V2wnsub = 0.0;
|
||||
if (!model->BSIM3V2wnpeakGiven)
|
||||
model->BSIM3V2wnpeak = 0.0;
|
||||
if (!model->BSIM3V2wngateGiven)
|
||||
model->BSIM3V2wngate = 0.0;
|
||||
if (!model->BSIM3V2wvbmGiven)
|
||||
model->BSIM3V2wvbm = 0.0;
|
||||
if (!model->BSIM3V2wxtGiven)
|
||||
model->BSIM3V2wxt = 0.0;
|
||||
if (!model->BSIM3V2wkt1Given)
|
||||
model->BSIM3V2wkt1 = 0.0;
|
||||
if (!model->BSIM3V2wkt1lGiven)
|
||||
model->BSIM3V2wkt1l = 0.0;
|
||||
if (!model->BSIM3V2wkt2Given)
|
||||
model->BSIM3V2wkt2 = 0.0;
|
||||
if (!model->BSIM3V2wk3Given)
|
||||
model->BSIM3V2wk3 = 0.0;
|
||||
if (!model->BSIM3V2wk3bGiven)
|
||||
model->BSIM3V2wk3b = 0.0;
|
||||
if (!model->BSIM3V2ww0Given)
|
||||
model->BSIM3V2ww0 = 0.0;
|
||||
if (!model->BSIM3V2wnlxGiven)
|
||||
model->BSIM3V2wnlx = 0.0;
|
||||
if (!model->BSIM3V2wdvt0Given)
|
||||
model->BSIM3V2wdvt0 = 0.0;
|
||||
if (!model->BSIM3V2wdvt1Given)
|
||||
model->BSIM3V2wdvt1 = 0.0;
|
||||
if (!model->BSIM3V2wdvt2Given)
|
||||
model->BSIM3V2wdvt2 = 0.0;
|
||||
if (!model->BSIM3V2wdvt0wGiven)
|
||||
model->BSIM3V2wdvt0w = 0.0;
|
||||
if (!model->BSIM3V2wdvt1wGiven)
|
||||
model->BSIM3V2wdvt1w = 0.0;
|
||||
if (!model->BSIM3V2wdvt2wGiven)
|
||||
model->BSIM3V2wdvt2w = 0.0;
|
||||
if (!model->BSIM3V2wdroutGiven)
|
||||
model->BSIM3V2wdrout = 0.0;
|
||||
if (!model->BSIM3V2wdsubGiven)
|
||||
model->BSIM3V2wdsub = 0.0;
|
||||
if (!model->BSIM3V2wvth0Given)
|
||||
model->BSIM3V2wvth0 = 0.0;
|
||||
if (!model->BSIM3V2wuaGiven)
|
||||
model->BSIM3V2wua = 0.0;
|
||||
if (!model->BSIM3V2wua1Given)
|
||||
model->BSIM3V2wua1 = 0.0;
|
||||
if (!model->BSIM3V2wubGiven)
|
||||
model->BSIM3V2wub = 0.0;
|
||||
if (!model->BSIM3V2wub1Given)
|
||||
model->BSIM3V2wub1 = 0.0;
|
||||
if (!model->BSIM3V2wucGiven)
|
||||
model->BSIM3V2wuc = 0.0;
|
||||
if (!model->BSIM3V2wuc1Given)
|
||||
model->BSIM3V2wuc1 = 0.0;
|
||||
if (!model->BSIM3V2wu0Given)
|
||||
model->BSIM3V2wu0 = 0.0;
|
||||
if (!model->BSIM3V2wuteGiven)
|
||||
model->BSIM3V2wute = 0.0;
|
||||
if (!model->BSIM3V2wvoffGiven)
|
||||
model->BSIM3V2wvoff = 0.0;
|
||||
if (!model->BSIM3V2wdeltaGiven)
|
||||
model->BSIM3V2wdelta = 0.0;
|
||||
if (!model->BSIM3V2wrdswGiven)
|
||||
model->BSIM3V2wrdsw = 0.0;
|
||||
if (!model->BSIM3V2wprwbGiven)
|
||||
model->BSIM3V2wprwb = 0.0;
|
||||
if (!model->BSIM3V2wprwgGiven)
|
||||
model->BSIM3V2wprwg = 0.0;
|
||||
if (!model->BSIM3V2wprtGiven)
|
||||
model->BSIM3V2wprt = 0.0;
|
||||
if (!model->BSIM3V2weta0Given)
|
||||
model->BSIM3V2weta0 = 0.0;
|
||||
if (!model->BSIM3V2wetabGiven)
|
||||
model->BSIM3V2wetab = 0.0;
|
||||
if (!model->BSIM3V2wpclmGiven)
|
||||
model->BSIM3V2wpclm = 0.0;
|
||||
if (!model->BSIM3V2wpdibl1Given)
|
||||
model->BSIM3V2wpdibl1 = 0.0;
|
||||
if (!model->BSIM3V2wpdibl2Given)
|
||||
model->BSIM3V2wpdibl2 = 0.0;
|
||||
if (!model->BSIM3V2wpdiblbGiven)
|
||||
model->BSIM3V2wpdiblb = 0.0;
|
||||
if (!model->BSIM3V2wpscbe1Given)
|
||||
model->BSIM3V2wpscbe1 = 0.0;
|
||||
if (!model->BSIM3V2wpscbe2Given)
|
||||
model->BSIM3V2wpscbe2 = 0.0;
|
||||
if (!model->BSIM3V2wpvagGiven)
|
||||
model->BSIM3V2wpvag = 0.0;
|
||||
if (!model->BSIM3V2wwrGiven)
|
||||
model->BSIM3V2wwr = 0.0;
|
||||
if (!model->BSIM3V2wdwgGiven)
|
||||
model->BSIM3V2wdwg = 0.0;
|
||||
if (!model->BSIM3V2wdwbGiven)
|
||||
model->BSIM3V2wdwb = 0.0;
|
||||
if (!model->BSIM3V2wb0Given)
|
||||
model->BSIM3V2wb0 = 0.0;
|
||||
if (!model->BSIM3V2wb1Given)
|
||||
model->BSIM3V2wb1 = 0.0;
|
||||
if (!model->BSIM3V2walpha0Given)
|
||||
model->BSIM3V2walpha0 = 0.0;
|
||||
if (!model->BSIM3V2walpha1Given)
|
||||
model->BSIM3V2walpha1 = 0.0;
|
||||
if (!model->BSIM3V2wbeta0Given)
|
||||
model->BSIM3V2wbeta0 = 0.0;
|
||||
if (!model->BSIM3V2wvfbGiven)
|
||||
model->BSIM3V2wvfb = 0.0;
|
||||
|
||||
if (!model->BSIM3V2welmGiven)
|
||||
model->BSIM3V2welm = 0.0;
|
||||
if (!model->BSIM3V2wcgslGiven)
|
||||
model->BSIM3V2wcgsl = 0.0;
|
||||
if (!model->BSIM3V2wcgdlGiven)
|
||||
model->BSIM3V2wcgdl = 0.0;
|
||||
if (!model->BSIM3V2wckappaGiven)
|
||||
model->BSIM3V2wckappa = 0.0;
|
||||
if (!model->BSIM3V2wcfGiven)
|
||||
model->BSIM3V2wcf = 0.0;
|
||||
if (!model->BSIM3V2wclcGiven)
|
||||
model->BSIM3V2wclc = 0.0;
|
||||
if (!model->BSIM3V2wcleGiven)
|
||||
model->BSIM3V2wcle = 0.0;
|
||||
if (!model->BSIM3V2wvfbcvGiven)
|
||||
model->BSIM3V2wvfbcv = 0.0;
|
||||
if (!model->BSIM3V2wacdeGiven)
|
||||
model->BSIM3V2wacde = 0.0;
|
||||
if (!model->BSIM3V2wmoinGiven)
|
||||
model->BSIM3V2wmoin = 0.0;
|
||||
if (!model->BSIM3V2wnoffGiven)
|
||||
model->BSIM3V2wnoff = 0.0;
|
||||
if (!model->BSIM3V2wvoffcvGiven)
|
||||
model->BSIM3V2wvoffcv = 0.0;
|
||||
|
||||
/* Cross-term dependence */
|
||||
if (!model->BSIM3V2pcdscGiven)
|
||||
model->BSIM3V2pcdsc = 0.0;
|
||||
if (!model->BSIM3V2pcdscbGiven)
|
||||
model->BSIM3V2pcdscb = 0.0;
|
||||
if (!model->BSIM3V2pcdscdGiven)
|
||||
model->BSIM3V2pcdscd = 0.0;
|
||||
if (!model->BSIM3V2pcitGiven)
|
||||
model->BSIM3V2pcit = 0.0;
|
||||
if (!model->BSIM3V2pnfactorGiven)
|
||||
model->BSIM3V2pnfactor = 0.0;
|
||||
if (!model->BSIM3V2pxjGiven)
|
||||
model->BSIM3V2pxj = 0.0;
|
||||
if (!model->BSIM3V2pvsatGiven)
|
||||
model->BSIM3V2pvsat = 0.0;
|
||||
if (!model->BSIM3V2patGiven)
|
||||
model->BSIM3V2pat = 0.0;
|
||||
if (!model->BSIM3V2pa0Given)
|
||||
model->BSIM3V2pa0 = 0.0;
|
||||
|
||||
if (!model->BSIM3V2pagsGiven)
|
||||
model->BSIM3V2pags = 0.0;
|
||||
if (!model->BSIM3V2pa1Given)
|
||||
model->BSIM3V2pa1 = 0.0;
|
||||
if (!model->BSIM3V2pa2Given)
|
||||
model->BSIM3V2pa2 = 0.0;
|
||||
if (!model->BSIM3V2pketaGiven)
|
||||
model->BSIM3V2pketa = 0.0;
|
||||
if (!model->BSIM3V2pnsubGiven)
|
||||
model->BSIM3V2pnsub = 0.0;
|
||||
if (!model->BSIM3V2pnpeakGiven)
|
||||
model->BSIM3V2pnpeak = 0.0;
|
||||
if (!model->BSIM3V2pngateGiven)
|
||||
model->BSIM3V2pngate = 0.0;
|
||||
if (!model->BSIM3V2pvbmGiven)
|
||||
model->BSIM3V2pvbm = 0.0;
|
||||
if (!model->BSIM3V2pxtGiven)
|
||||
model->BSIM3V2pxt = 0.0;
|
||||
if (!model->BSIM3V2pkt1Given)
|
||||
model->BSIM3V2pkt1 = 0.0;
|
||||
if (!model->BSIM3V2pkt1lGiven)
|
||||
model->BSIM3V2pkt1l = 0.0;
|
||||
if (!model->BSIM3V2pkt2Given)
|
||||
model->BSIM3V2pkt2 = 0.0;
|
||||
if (!model->BSIM3V2pk3Given)
|
||||
model->BSIM3V2pk3 = 0.0;
|
||||
if (!model->BSIM3V2pk3bGiven)
|
||||
model->BSIM3V2pk3b = 0.0;
|
||||
if (!model->BSIM3V2pw0Given)
|
||||
model->BSIM3V2pw0 = 0.0;
|
||||
if (!model->BSIM3V2pnlxGiven)
|
||||
model->BSIM3V2pnlx = 0.0;
|
||||
if (!model->BSIM3V2pdvt0Given)
|
||||
model->BSIM3V2pdvt0 = 0.0;
|
||||
if (!model->BSIM3V2pdvt1Given)
|
||||
model->BSIM3V2pdvt1 = 0.0;
|
||||
if (!model->BSIM3V2pdvt2Given)
|
||||
model->BSIM3V2pdvt2 = 0.0;
|
||||
if (!model->BSIM3V2pdvt0wGiven)
|
||||
model->BSIM3V2pdvt0w = 0.0;
|
||||
if (!model->BSIM3V2pdvt1wGiven)
|
||||
model->BSIM3V2pdvt1w = 0.0;
|
||||
if (!model->BSIM3V2pdvt2wGiven)
|
||||
model->BSIM3V2pdvt2w = 0.0;
|
||||
if (!model->BSIM3V2pdroutGiven)
|
||||
model->BSIM3V2pdrout = 0.0;
|
||||
if (!model->BSIM3V2pdsubGiven)
|
||||
model->BSIM3V2pdsub = 0.0;
|
||||
if (!model->BSIM3V2pvth0Given)
|
||||
model->BSIM3V2pvth0 = 0.0;
|
||||
if (!model->BSIM3V2puaGiven)
|
||||
model->BSIM3V2pua = 0.0;
|
||||
if (!model->BSIM3V2pua1Given)
|
||||
model->BSIM3V2pua1 = 0.0;
|
||||
if (!model->BSIM3V2pubGiven)
|
||||
model->BSIM3V2pub = 0.0;
|
||||
if (!model->BSIM3V2pub1Given)
|
||||
model->BSIM3V2pub1 = 0.0;
|
||||
if (!model->BSIM3V2pucGiven)
|
||||
model->BSIM3V2puc = 0.0;
|
||||
if (!model->BSIM3V2puc1Given)
|
||||
model->BSIM3V2puc1 = 0.0;
|
||||
if (!model->BSIM3V2pu0Given)
|
||||
model->BSIM3V2pu0 = 0.0;
|
||||
if (!model->BSIM3V2puteGiven)
|
||||
model->BSIM3V2pute = 0.0;
|
||||
if (!model->BSIM3V2pvoffGiven)
|
||||
model->BSIM3V2pvoff = 0.0;
|
||||
if (!model->BSIM3V2pdeltaGiven)
|
||||
model->BSIM3V2pdelta = 0.0;
|
||||
if (!model->BSIM3V2prdswGiven)
|
||||
model->BSIM3V2prdsw = 0.0;
|
||||
if (!model->BSIM3V2pprwbGiven)
|
||||
model->BSIM3V2pprwb = 0.0;
|
||||
if (!model->BSIM3V2pprwgGiven)
|
||||
model->BSIM3V2pprwg = 0.0;
|
||||
if (!model->BSIM3V2pprtGiven)
|
||||
model->BSIM3V2pprt = 0.0;
|
||||
if (!model->BSIM3V2peta0Given)
|
||||
model->BSIM3V2peta0 = 0.0;
|
||||
if (!model->BSIM3V2petabGiven)
|
||||
model->BSIM3V2petab = 0.0;
|
||||
if (!model->BSIM3V2ppclmGiven)
|
||||
model->BSIM3V2ppclm = 0.0;
|
||||
if (!model->BSIM3V2ppdibl1Given)
|
||||
model->BSIM3V2ppdibl1 = 0.0;
|
||||
if (!model->BSIM3V2ppdibl2Given)
|
||||
model->BSIM3V2ppdibl2 = 0.0;
|
||||
if (!model->BSIM3V2ppdiblbGiven)
|
||||
model->BSIM3V2ppdiblb = 0.0;
|
||||
if (!model->BSIM3V2ppscbe1Given)
|
||||
model->BSIM3V2ppscbe1 = 0.0;
|
||||
if (!model->BSIM3V2ppscbe2Given)
|
||||
model->BSIM3V2ppscbe2 = 0.0;
|
||||
if (!model->BSIM3V2ppvagGiven)
|
||||
model->BSIM3V2ppvag = 0.0;
|
||||
if (!model->BSIM3V2pwrGiven)
|
||||
model->BSIM3V2pwr = 0.0;
|
||||
if (!model->BSIM3V2pdwgGiven)
|
||||
model->BSIM3V2pdwg = 0.0;
|
||||
if (!model->BSIM3V2pdwbGiven)
|
||||
model->BSIM3V2pdwb = 0.0;
|
||||
if (!model->BSIM3V2pb0Given)
|
||||
model->BSIM3V2pb0 = 0.0;
|
||||
if (!model->BSIM3V2pb1Given)
|
||||
model->BSIM3V2pb1 = 0.0;
|
||||
if (!model->BSIM3V2palpha0Given)
|
||||
model->BSIM3V2palpha0 = 0.0;
|
||||
if (!model->BSIM3V2palpha1Given)
|
||||
model->BSIM3V2palpha1 = 0.0;
|
||||
if (!model->BSIM3V2pbeta0Given)
|
||||
model->BSIM3V2pbeta0 = 0.0;
|
||||
if (!model->BSIM3V2pvfbGiven)
|
||||
model->BSIM3V2pvfb = 0.0;
|
||||
|
||||
if (!model->BSIM3V2pelmGiven)
|
||||
model->BSIM3V2pelm = 0.0;
|
||||
if (!model->BSIM3V2pcgslGiven)
|
||||
model->BSIM3V2pcgsl = 0.0;
|
||||
if (!model->BSIM3V2pcgdlGiven)
|
||||
model->BSIM3V2pcgdl = 0.0;
|
||||
if (!model->BSIM3V2pckappaGiven)
|
||||
model->BSIM3V2pckappa = 0.0;
|
||||
if (!model->BSIM3V2pcfGiven)
|
||||
model->BSIM3V2pcf = 0.0;
|
||||
if (!model->BSIM3V2pclcGiven)
|
||||
model->BSIM3V2pclc = 0.0;
|
||||
if (!model->BSIM3V2pcleGiven)
|
||||
model->BSIM3V2pcle = 0.0;
|
||||
if (!model->BSIM3V2pvfbcvGiven)
|
||||
model->BSIM3V2pvfbcv = 0.0;
|
||||
if (!model->BSIM3V2pacdeGiven)
|
||||
model->BSIM3V2pacde = 0.0;
|
||||
if (!model->BSIM3V2pmoinGiven)
|
||||
model->BSIM3V2pmoin = 0.0;
|
||||
if (!model->BSIM3V2pnoffGiven)
|
||||
model->BSIM3V2pnoff = 0.0;
|
||||
if (!model->BSIM3V2pvoffcvGiven)
|
||||
model->BSIM3V2pvoffcv = 0.0;
|
||||
|
||||
/* unit degree celcius */
|
||||
if (!model->BSIM3V2tnomGiven)
|
||||
model->BSIM3V2tnom = ckt->CKTnomTemp;
|
||||
/* else
|
||||
model->BSIM3V2tnom = model->BSIM3V2tnom + 273.15; */
|
||||
if (!model->BSIM3V2LintGiven)
|
||||
model->BSIM3V2Lint = 0.0;
|
||||
if (!model->BSIM3V2LlGiven)
|
||||
model->BSIM3V2Ll = 0.0;
|
||||
if (!model->BSIM3V2LlcGiven)
|
||||
model->BSIM3V2Llc = model->BSIM3V2Ll;
|
||||
if (!model->BSIM3V2LlnGiven)
|
||||
model->BSIM3V2Lln = 1.0;
|
||||
if (!model->BSIM3V2LwGiven)
|
||||
model->BSIM3V2Lw = 0.0;
|
||||
if (!model->BSIM3V2LwcGiven)
|
||||
model->BSIM3V2Lwc = model->BSIM3V2Lw;
|
||||
if (!model->BSIM3V2LwnGiven)
|
||||
model->BSIM3V2Lwn = 1.0;
|
||||
if (!model->BSIM3V2LwlGiven)
|
||||
model->BSIM3V2Lwl = 0.0;
|
||||
if (!model->BSIM3V2LwlcGiven)
|
||||
model->BSIM3V2Lwlc = model->BSIM3V2Lwl;
|
||||
if (!model->BSIM3V2LminGiven)
|
||||
model->BSIM3V2Lmin = 0.0;
|
||||
if (!model->BSIM3V2LmaxGiven)
|
||||
model->BSIM3V2Lmax = 1.0;
|
||||
if (!model->BSIM3V2WintGiven)
|
||||
model->BSIM3V2Wint = 0.0;
|
||||
if (!model->BSIM3V2WlGiven)
|
||||
model->BSIM3V2Wl = 0.0;
|
||||
if (!model->BSIM3V2WlcGiven)
|
||||
model->BSIM3V2Wlc = model->BSIM3V2Wl;
|
||||
if (!model->BSIM3V2WlnGiven)
|
||||
model->BSIM3V2Wln = 1.0;
|
||||
if (!model->BSIM3V2WwGiven)
|
||||
model->BSIM3V2Ww = 0.0;
|
||||
if (!model->BSIM3V2WwcGiven)
|
||||
model->BSIM3V2Wwc = model->BSIM3V2Ww;
|
||||
if (!model->BSIM3V2WwnGiven)
|
||||
model->BSIM3V2Wwn = 1.0;
|
||||
if (!model->BSIM3V2WwlGiven)
|
||||
model->BSIM3V2Wwl = 0.0;
|
||||
if (!model->BSIM3V2WwlcGiven)
|
||||
model->BSIM3V2Wwlc = model->BSIM3V2Wwl;
|
||||
if (!model->BSIM3V2WminGiven)
|
||||
model->BSIM3V2Wmin = 0.0;
|
||||
if (!model->BSIM3V2WmaxGiven)
|
||||
model->BSIM3V2Wmax = 1.0;
|
||||
if (!model->BSIM3V2dwcGiven)
|
||||
model->BSIM3V2dwc = model->BSIM3V2Wint;
|
||||
if (!model->BSIM3V2dlcGiven)
|
||||
model->BSIM3V2dlc = model->BSIM3V2Lint;
|
||||
if (!model->BSIM3V2cfGiven)
|
||||
model->BSIM3V2cf = 2.0 * EPSOX / PI
|
||||
* log(1.0 + 0.4e-6 / model->BSIM3V2tox);
|
||||
if (!model->BSIM3V2cgdoGiven)
|
||||
{ if (model->BSIM3V2dlcGiven && (model->BSIM3V2dlc > 0.0))
|
||||
{ model->BSIM3V2cgdo = model->BSIM3V2dlc * model->BSIM3V2cox
|
||||
- model->BSIM3V2cgdl ;
|
||||
}
|
||||
else
|
||||
model->BSIM3V2cgdo = 0.6 * model->BSIM3V2xj * model->BSIM3V2cox;
|
||||
}
|
||||
if (!model->BSIM3V2cgsoGiven)
|
||||
{ if (model->BSIM3V2dlcGiven && (model->BSIM3V2dlc > 0.0))
|
||||
{ model->BSIM3V2cgso = model->BSIM3V2dlc * model->BSIM3V2cox
|
||||
- model->BSIM3V2cgsl ;
|
||||
}
|
||||
else
|
||||
model->BSIM3V2cgso = 0.6 * model->BSIM3V2xj * model->BSIM3V2cox;
|
||||
}
|
||||
|
||||
if (!model->BSIM3V2cgboGiven)
|
||||
{ model->BSIM3V2cgbo = 2.0 * model->BSIM3V2dwc * model->BSIM3V2cox;
|
||||
}
|
||||
if (!model->BSIM3V2xpartGiven)
|
||||
model->BSIM3V2xpart = 0.0;
|
||||
if (!model->BSIM3V2sheetResistanceGiven)
|
||||
model->BSIM3V2sheetResistance = 0.0;
|
||||
if (!model->BSIM3V2unitAreaJctCapGiven)
|
||||
model->BSIM3V2unitAreaJctCap = 5.0E-4;
|
||||
if (!model->BSIM3V2unitLengthSidewallJctCapGiven)
|
||||
model->BSIM3V2unitLengthSidewallJctCap = 5.0E-10;
|
||||
if (!model->BSIM3V2unitLengthGateSidewallJctCapGiven)
|
||||
model->BSIM3V2unitLengthGateSidewallJctCap = model->BSIM3V2unitLengthSidewallJctCap ;
|
||||
if (!model->BSIM3V2jctSatCurDensityGiven)
|
||||
model->BSIM3V2jctSatCurDensity = 1.0E-4;
|
||||
if (!model->BSIM3V2jctSidewallSatCurDensityGiven)
|
||||
model->BSIM3V2jctSidewallSatCurDensity = 0.0;
|
||||
if (!model->BSIM3V2bulkJctPotentialGiven)
|
||||
model->BSIM3V2bulkJctPotential = 1.0;
|
||||
if (!model->BSIM3V2sidewallJctPotentialGiven)
|
||||
model->BSIM3V2sidewallJctPotential = 1.0;
|
||||
if (!model->BSIM3V2GatesidewallJctPotentialGiven)
|
||||
model->BSIM3V2GatesidewallJctPotential = model->BSIM3V2sidewallJctPotential;
|
||||
if (!model->BSIM3V2bulkJctBotGradingCoeffGiven)
|
||||
model->BSIM3V2bulkJctBotGradingCoeff = 0.5;
|
||||
if (!model->BSIM3V2bulkJctSideGradingCoeffGiven)
|
||||
model->BSIM3V2bulkJctSideGradingCoeff = 0.33;
|
||||
if (!model->BSIM3V2bulkJctGateSideGradingCoeffGiven)
|
||||
model->BSIM3V2bulkJctGateSideGradingCoeff = model->BSIM3V2bulkJctSideGradingCoeff;
|
||||
if (!model->BSIM3V2jctEmissionCoeffGiven)
|
||||
model->BSIM3V2jctEmissionCoeff = 1.0;
|
||||
if (!model->BSIM3V2jctTempExponentGiven)
|
||||
model->BSIM3V2jctTempExponent = 3.0;
|
||||
if (!model->BSIM3V2oxideTrapDensityAGiven)
|
||||
{ if (model->BSIM3V2type == NMOS)
|
||||
model->BSIM3V2oxideTrapDensityA = 1e20;
|
||||
else
|
||||
model->BSIM3V2oxideTrapDensityA=9.9e18;
|
||||
}
|
||||
if (!model->BSIM3V2oxideTrapDensityBGiven)
|
||||
{ if (model->BSIM3V2type == NMOS)
|
||||
model->BSIM3V2oxideTrapDensityB = 5e4;
|
||||
else
|
||||
model->BSIM3V2oxideTrapDensityB = 2.4e3;
|
||||
}
|
||||
if (!model->BSIM3V2oxideTrapDensityCGiven)
|
||||
{ if (model->BSIM3V2type == NMOS)
|
||||
model->BSIM3V2oxideTrapDensityC = -1.4e-12;
|
||||
else
|
||||
model->BSIM3V2oxideTrapDensityC = 1.4e-12;
|
||||
|
||||
}
|
||||
if (!model->BSIM3V2emGiven)
|
||||
model->BSIM3V2em = 4.1e7; /* V/m */
|
||||
if (!model->BSIM3V2efGiven)
|
||||
model->BSIM3V2ef = 1.0;
|
||||
if (!model->BSIM3V2afGiven)
|
||||
model->BSIM3V2af = 1.0;
|
||||
if (!model->BSIM3V2kfGiven)
|
||||
model->BSIM3V2kf = 0.0;
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3V2instances; here != NULL ;
|
||||
here=here->BSIM3V2nextInstance)
|
||||
{
|
||||
if (here->BSIM3V2owner == ARCHme) {
|
||||
/* allocate a chunk of the state vector */
|
||||
here->BSIM3V2states = *states;
|
||||
*states += BSIM3V2numStates;
|
||||
}
|
||||
/* perform the parameter defaulting */
|
||||
if (!here->BSIM3V2drainAreaGiven)
|
||||
here->BSIM3V2drainArea = 0.0;
|
||||
if (!here->BSIM3V2drainPerimeterGiven)
|
||||
here->BSIM3V2drainPerimeter = 0.0;
|
||||
if (!here->BSIM3V2drainSquaresGiven)
|
||||
here->BSIM3V2drainSquares = 1.0;
|
||||
if (!here->BSIM3V2icVBSGiven)
|
||||
here->BSIM3V2icVBS = 0.0;
|
||||
if (!here->BSIM3V2icVDSGiven)
|
||||
here->BSIM3V2icVDS = 0.0;
|
||||
if (!here->BSIM3V2icVGSGiven)
|
||||
here->BSIM3V2icVGS = 0.0;
|
||||
if (!here->BSIM3V2lGiven)
|
||||
here->BSIM3V2l = 5.0e-6;
|
||||
if (!here->BSIM3V2sourceAreaGiven)
|
||||
here->BSIM3V2sourceArea = 0.0;
|
||||
if (!here->BSIM3V2sourcePerimeterGiven)
|
||||
here->BSIM3V2sourcePerimeter = 0.0;
|
||||
if (!here->BSIM3V2sourceSquaresGiven)
|
||||
here->BSIM3V2sourceSquares = 1.0;
|
||||
if (!here->BSIM3V2wGiven)
|
||||
here->BSIM3V2w = 5.0e-6;
|
||||
if (!here->BSIM3V2nqsModGiven)
|
||||
here->BSIM3V2nqsMod = 0;
|
||||
|
||||
/* process drain series resistance */
|
||||
if ((model->BSIM3V2sheetResistance > 0.0) &&
|
||||
(here->BSIM3V2drainSquares > 0.0 ) &&
|
||||
(here->BSIM3V2dNodePrime == 0))
|
||||
{ error = CKTmkVolt(ckt,&tmp,here->BSIM3V2name,"drain");
|
||||
if(error) return(error);
|
||||
here->BSIM3V2dNodePrime = tmp->number;
|
||||
}
|
||||
else
|
||||
{ here->BSIM3V2dNodePrime = here->BSIM3V2dNode;
|
||||
}
|
||||
|
||||
/* process source series resistance */
|
||||
if ((model->BSIM3V2sheetResistance > 0.0) &&
|
||||
(here->BSIM3V2sourceSquares > 0.0 ) &&
|
||||
(here->BSIM3V2sNodePrime == 0))
|
||||
{ error = CKTmkVolt(ckt,&tmp,here->BSIM3V2name,"source");
|
||||
if(error) return(error);
|
||||
here->BSIM3V2sNodePrime = tmp->number;
|
||||
}
|
||||
else
|
||||
{ here->BSIM3V2sNodePrime = here->BSIM3V2sNode;
|
||||
}
|
||||
|
||||
/* internal charge node */
|
||||
|
||||
if ((here->BSIM3V2nqsMod) && (here->BSIM3V2qNode == 0))
|
||||
{ error = CKTmkVolt(ckt,&tmp,here->BSIM3V2name,"charge");
|
||||
if(error) return(error);
|
||||
here->BSIM3V2qNode = tmp->number;
|
||||
}
|
||||
else
|
||||
{ here->BSIM3V2qNode = 0;
|
||||
}
|
||||
|
||||
/* set Sparse Matrix Pointers */
|
||||
|
||||
/* macro to make elements with built in test for out of memory */
|
||||
#define TSTALLOC(ptr,first,second) \
|
||||
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
||||
return(E_NOMEM);\
|
||||
}
|
||||
|
||||
TSTALLOC(BSIM3V2DdPtr, BSIM3V2dNode, BSIM3V2dNode)
|
||||
TSTALLOC(BSIM3V2GgPtr, BSIM3V2gNode, BSIM3V2gNode)
|
||||
TSTALLOC(BSIM3V2SsPtr, BSIM3V2sNode, BSIM3V2sNode)
|
||||
TSTALLOC(BSIM3V2BbPtr, BSIM3V2bNode, BSIM3V2bNode)
|
||||
TSTALLOC(BSIM3V2DPdpPtr, BSIM3V2dNodePrime, BSIM3V2dNodePrime)
|
||||
TSTALLOC(BSIM3V2SPspPtr, BSIM3V2sNodePrime, BSIM3V2sNodePrime)
|
||||
TSTALLOC(BSIM3V2DdpPtr, BSIM3V2dNode, BSIM3V2dNodePrime)
|
||||
TSTALLOC(BSIM3V2GbPtr, BSIM3V2gNode, BSIM3V2bNode)
|
||||
TSTALLOC(BSIM3V2GdpPtr, BSIM3V2gNode, BSIM3V2dNodePrime)
|
||||
TSTALLOC(BSIM3V2GspPtr, BSIM3V2gNode, BSIM3V2sNodePrime)
|
||||
TSTALLOC(BSIM3V2SspPtr, BSIM3V2sNode, BSIM3V2sNodePrime)
|
||||
TSTALLOC(BSIM3V2BdpPtr, BSIM3V2bNode, BSIM3V2dNodePrime)
|
||||
TSTALLOC(BSIM3V2BspPtr, BSIM3V2bNode, BSIM3V2sNodePrime)
|
||||
TSTALLOC(BSIM3V2DPspPtr, BSIM3V2dNodePrime, BSIM3V2sNodePrime)
|
||||
TSTALLOC(BSIM3V2DPdPtr, BSIM3V2dNodePrime, BSIM3V2dNode)
|
||||
TSTALLOC(BSIM3V2BgPtr, BSIM3V2bNode, BSIM3V2gNode)
|
||||
TSTALLOC(BSIM3V2DPgPtr, BSIM3V2dNodePrime, BSIM3V2gNode)
|
||||
TSTALLOC(BSIM3V2SPgPtr, BSIM3V2sNodePrime, BSIM3V2gNode)
|
||||
TSTALLOC(BSIM3V2SPsPtr, BSIM3V2sNodePrime, BSIM3V2sNode)
|
||||
TSTALLOC(BSIM3V2DPbPtr, BSIM3V2dNodePrime, BSIM3V2bNode)
|
||||
TSTALLOC(BSIM3V2SPbPtr, BSIM3V2sNodePrime, BSIM3V2bNode)
|
||||
TSTALLOC(BSIM3V2SPdpPtr, BSIM3V2sNodePrime, BSIM3V2dNodePrime)
|
||||
|
||||
TSTALLOC(BSIM3V2QqPtr, BSIM3V2qNode, BSIM3V2qNode)
|
||||
|
||||
TSTALLOC(BSIM3V2QdpPtr, BSIM3V2qNode, BSIM3V2dNodePrime)
|
||||
TSTALLOC(BSIM3V2QspPtr, BSIM3V2qNode, BSIM3V2sNodePrime)
|
||||
TSTALLOC(BSIM3V2QgPtr, BSIM3V2qNode, BSIM3V2gNode)
|
||||
TSTALLOC(BSIM3V2QbPtr, BSIM3V2qNode, BSIM3V2bNode)
|
||||
TSTALLOC(BSIM3V2DPqPtr, BSIM3V2dNodePrime, BSIM3V2qNode)
|
||||
TSTALLOC(BSIM3V2SPqPtr, BSIM3V2sNodePrime, BSIM3V2qNode)
|
||||
TSTALLOC(BSIM3V2GqPtr, BSIM3V2gNode, BSIM3V2qNode)
|
||||
TSTALLOC(BSIM3V2BqPtr, BSIM3V2bNode, BSIM3V2qNode)
|
||||
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
BSIM3V2unsetup(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
{
|
||||
BSIM3V2model *model;
|
||||
BSIM3V2instance *here;
|
||||
|
||||
for (model = (BSIM3V2model *)inModel; model != NULL;
|
||||
model = model->BSIM3V2nextModel)
|
||||
{
|
||||
for (here = model->BSIM3V2instances; here != NULL;
|
||||
here=here->BSIM3V2nextInstance)
|
||||
{
|
||||
if (here->BSIM3V2dNodePrime
|
||||
&& here->BSIM3V2dNodePrime != here->BSIM3V2dNode)
|
||||
{
|
||||
CKTdltNNum(ckt, here->BSIM3V2dNodePrime);
|
||||
here->BSIM3V2dNodePrime = 0;
|
||||
}
|
||||
if (here->BSIM3V2sNodePrime
|
||||
&& here->BSIM3V2sNodePrime != here->BSIM3V2sNode)
|
||||
{
|
||||
CKTdltNNum(ckt, here->BSIM3V2sNodePrime);
|
||||
here->BSIM3V2sNodePrime = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
|
@ -1,846 +0,0 @@
|
|||
/***********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Modified by Weidong Liu (1997-1998).
|
||||
File: b3v2temp.c
|
||||
**********/
|
||||
/* Lmin, Lmax, Wmin, Wmax */
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "const.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
#define Kb 1.3806226e-23
|
||||
#define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */
|
||||
#define EPSOX 3.453133e-11
|
||||
#define EPSSI 1.03594e-10
|
||||
#define PI 3.141592654
|
||||
#define MAX_EXP 5.834617425e14
|
||||
#define MIN_EXP 1.713908431e-15
|
||||
#define EXP_THRESHOLD 34.0
|
||||
#define Charge_q 1.60219e-19
|
||||
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
BSIM3V2temp(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
{
|
||||
BSIM3V2model *model = (BSIM3V2model*) inModel;
|
||||
BSIM3V2instance *here;
|
||||
struct BSIM3V2SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam;
|
||||
double tmp, tmp1, tmp2, tmp3, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, Ldrn, Wdrn;
|
||||
double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Dw, Dl, Vtm0, Tnom;
|
||||
double Nvtm, SourceSatCurrent, DrainSatCurrent;
|
||||
int Size_Not_Found;
|
||||
|
||||
/* loop through all the BSIM3V2 device models */
|
||||
for (; model != NULL; model = model->BSIM3V2nextModel)
|
||||
{ Temp = ckt->CKTtemp;
|
||||
if (model->BSIM3V2bulkJctPotential < 0.1)
|
||||
{ model->BSIM3V2bulkJctPotential = 0.1;
|
||||
fprintf(stderr, "Given pb is less than 0.1. Pb is set to 0.1.\n");
|
||||
}
|
||||
if (model->BSIM3V2sidewallJctPotential < 0.1)
|
||||
{ model->BSIM3V2sidewallJctPotential = 0.1;
|
||||
fprintf(stderr, "Given pbsw is less than 0.1. Pbsw is set to 0.1.\n");
|
||||
}
|
||||
if (model->BSIM3V2GatesidewallJctPotential < 0.1)
|
||||
{ model->BSIM3V2GatesidewallJctPotential = 0.1;
|
||||
fprintf(stderr, "Given pbswg is less than 0.1. Pbswg is set to 0.1.\n");
|
||||
}
|
||||
model->pSizeDependParamKnot = NULL;
|
||||
pLastKnot = NULL;
|
||||
|
||||
Tnom = model->BSIM3V2tnom;
|
||||
TRatio = Temp / Tnom;
|
||||
|
||||
model->BSIM3V2vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14));
|
||||
model->BSIM3V2factor1 = sqrt(EPSSI / EPSOX * model->BSIM3V2tox);
|
||||
|
||||
Vtm0 = KboQ * Tnom;
|
||||
Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0);
|
||||
ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15)
|
||||
* exp(21.5565981 - Eg0 / (2.0 * Vtm0));
|
||||
|
||||
model->BSIM3V2vtm = KboQ * Temp;
|
||||
Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0);
|
||||
if (Temp != Tnom)
|
||||
{ T0 = Eg0 / Vtm0 - Eg / model->BSIM3V2vtm + model->BSIM3V2jctTempExponent
|
||||
* log(Temp / Tnom);
|
||||
T1 = exp(T0 / model->BSIM3V2jctEmissionCoeff);
|
||||
model->BSIM3V2jctTempSatCurDensity = model->BSIM3V2jctSatCurDensity
|
||||
* T1;
|
||||
model->BSIM3V2jctSidewallTempSatCurDensity
|
||||
= model->BSIM3V2jctSidewallSatCurDensity * T1;
|
||||
}
|
||||
else
|
||||
{ model->BSIM3V2jctTempSatCurDensity = model->BSIM3V2jctSatCurDensity;
|
||||
model->BSIM3V2jctSidewallTempSatCurDensity
|
||||
= model->BSIM3V2jctSidewallSatCurDensity;
|
||||
}
|
||||
|
||||
if (model->BSIM3V2jctTempSatCurDensity < 0.0)
|
||||
model->BSIM3V2jctTempSatCurDensity = 0.0;
|
||||
if (model->BSIM3V2jctSidewallTempSatCurDensity < 0.0)
|
||||
model->BSIM3V2jctSidewallTempSatCurDensity = 0.0;
|
||||
|
||||
/* Temperature dependence of D/B and S/B diode capacitance begins */
|
||||
delTemp = ckt->CKTtemp - model->BSIM3V2tnom;
|
||||
T0 = model->BSIM3V2tcj * delTemp;
|
||||
if (T0 >= -1.0)
|
||||
{ model->BSIM3V2unitAreaJctCap *= 1.0 + T0;
|
||||
}
|
||||
else if (model->BSIM3V2unitAreaJctCap > 0.0)
|
||||
{ model->BSIM3V2unitAreaJctCap = 0.0;
|
||||
fprintf(stderr, "Temperature effect has caused cj to be negative. Cj is clamped to zero.\n");
|
||||
}
|
||||
T0 = model->BSIM3V2tcjsw * delTemp;
|
||||
if (T0 >= -1.0)
|
||||
{ model->BSIM3V2unitLengthSidewallJctCap *= 1.0 + T0;
|
||||
}
|
||||
else if (model->BSIM3V2unitLengthSidewallJctCap > 0.0)
|
||||
{ model->BSIM3V2unitLengthSidewallJctCap = 0.0;
|
||||
fprintf(stderr, "Temperature effect has caused cjsw to be negative. Cjsw is clamped to zero.\n");
|
||||
}
|
||||
T0 = model->BSIM3V2tcjswg * delTemp;
|
||||
if (T0 >= -1.0)
|
||||
{ model->BSIM3V2unitLengthGateSidewallJctCap *= 1.0 + T0;
|
||||
}
|
||||
else if (model->BSIM3V2unitLengthGateSidewallJctCap > 0.0)
|
||||
{ model->BSIM3V2unitLengthGateSidewallJctCap = 0.0;
|
||||
fprintf(stderr, "Temperature effect has caused cjswg to be negative. Cjswg is clamped to zero.\n");
|
||||
}
|
||||
|
||||
model->BSIM3V2PhiB = model->BSIM3V2bulkJctPotential
|
||||
- model->BSIM3V2tpb * delTemp;
|
||||
if (model->BSIM3V2PhiB < 0.01)
|
||||
{ model->BSIM3V2PhiB = 0.01;
|
||||
fprintf(stderr, "Temperature effect has caused pb to be less than 0.01. Pb is clamped to 0.01.\n");
|
||||
}
|
||||
model->BSIM3V2PhiBSW = model->BSIM3V2sidewallJctPotential
|
||||
- model->BSIM3V2tpbsw * delTemp;
|
||||
if (model->BSIM3V2PhiBSW <= 0.01)
|
||||
{ model->BSIM3V2PhiBSW = 0.01;
|
||||
fprintf(stderr, "Temperature effect has caused pbsw to be less than 0.01. Pbsw is clamped to 0.01.\n");
|
||||
}
|
||||
model->BSIM3V2PhiBSWG = model->BSIM3V2GatesidewallJctPotential
|
||||
- model->BSIM3V2tpbswg * delTemp;
|
||||
if (model->BSIM3V2PhiBSWG <= 0.01)
|
||||
{ model->BSIM3V2PhiBSWG = 0.01;
|
||||
fprintf(stderr, "Temperature effect has caused pbswg to be less than 0.01. Pbswg is clamped to 0.01.\n");
|
||||
}
|
||||
/* End of junction capacitance - Weidong & Min-Chie 5/1998 */
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = model->BSIM3V2instances; here != NULL;
|
||||
here = here->BSIM3V2nextInstance)
|
||||
{
|
||||
if (here->BSIM3V2owner != ARCHme) continue;
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
Size_Not_Found = 1;
|
||||
while ((pSizeDependParamKnot != NULL) && Size_Not_Found)
|
||||
{ if ((here->BSIM3V2l == pSizeDependParamKnot->Length)
|
||||
&& (here->BSIM3V2w == pSizeDependParamKnot->Width))
|
||||
{ Size_Not_Found = 0;
|
||||
here->pParam = pSizeDependParamKnot;
|
||||
}
|
||||
else
|
||||
{ pLastKnot = pSizeDependParamKnot;
|
||||
pSizeDependParamKnot = pSizeDependParamKnot->pNext;
|
||||
}
|
||||
}
|
||||
|
||||
if (Size_Not_Found)
|
||||
{ pParam = (struct BSIM3V2SizeDependParam *)tmalloc(
|
||||
sizeof(struct BSIM3V2SizeDependParam));
|
||||
if (pLastKnot == NULL)
|
||||
model->pSizeDependParamKnot = pParam;
|
||||
else
|
||||
pLastKnot->pNext = pParam;
|
||||
pParam->pNext = NULL;
|
||||
here->pParam = pParam;
|
||||
|
||||
Ldrn = here->BSIM3V2l;
|
||||
Wdrn = here->BSIM3V2w;
|
||||
pParam->Length = Ldrn;
|
||||
pParam->Width = Wdrn;
|
||||
|
||||
T0 = pow(Ldrn, model->BSIM3V2Lln);
|
||||
T1 = pow(Wdrn, model->BSIM3V2Lwn);
|
||||
tmp1 = model->BSIM3V2Ll / T0 + model->BSIM3V2Lw / T1
|
||||
+ model->BSIM3V2Lwl / (T0 * T1);
|
||||
pParam->BSIM3V2dl = model->BSIM3V2Lint + tmp1;
|
||||
tmp2 = model->BSIM3V2Llc / T0 + model->BSIM3V2Lwc / T1
|
||||
+ model->BSIM3V2Lwlc / (T0 * T1);
|
||||
pParam->BSIM3V2dlc = model->BSIM3V2dlc + tmp2;
|
||||
|
||||
T2 = pow(Ldrn, model->BSIM3V2Wln);
|
||||
T3 = pow(Wdrn, model->BSIM3V2Wwn);
|
||||
tmp1 = model->BSIM3V2Wl / T2 + model->BSIM3V2Ww / T3
|
||||
+ model->BSIM3V2Wwl / (T2 * T3);
|
||||
pParam->BSIM3V2dw = model->BSIM3V2Wint + tmp1;
|
||||
tmp2 = model->BSIM3V2Wlc / T2 + model->BSIM3V2Wwc / T3
|
||||
+ model->BSIM3V2Wwlc / (T2 * T3);
|
||||
pParam->BSIM3V2dwc = model->BSIM3V2dwc + tmp2;
|
||||
|
||||
pParam->BSIM3V2leff = here->BSIM3V2l - 2.0 * pParam->BSIM3V2dl;
|
||||
if (pParam->BSIM3V2leff <= 0.0)
|
||||
{ IFuid namarray[2];
|
||||
namarray[0] = model->BSIM3V2modName;
|
||||
namarray[1] = here->BSIM3V2name;
|
||||
(*(SPfrontEnd->IFerror))(ERR_FATAL,
|
||||
"BSIM3V2: mosfet %s, model %s: Effective channel length <= 0",
|
||||
namarray);
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
||||
pParam->BSIM3V2weff = here->BSIM3V2w - 2.0 * pParam->BSIM3V2dw;
|
||||
if (pParam->BSIM3V2weff <= 0.0)
|
||||
{ IFuid namarray[2];
|
||||
namarray[0] = model->BSIM3V2modName;
|
||||
namarray[1] = here->BSIM3V2name;
|
||||
(*(SPfrontEnd->IFerror))(ERR_FATAL,
|
||||
"BSIM3V2: mosfet %s, model %s: Effective channel width <= 0",
|
||||
namarray);
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
||||
pParam->BSIM3V2leffCV = here->BSIM3V2l - 2.0 * pParam->BSIM3V2dlc;
|
||||
if (pParam->BSIM3V2leffCV <= 0.0)
|
||||
{ IFuid namarray[2];
|
||||
namarray[0] = model->BSIM3V2modName;
|
||||
namarray[1] = here->BSIM3V2name;
|
||||
(*(SPfrontEnd->IFerror))(ERR_FATAL,
|
||||
"BSIM3V2: mosfet %s, model %s: Effective channel length for C-V <= 0",
|
||||
namarray);
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
||||
pParam->BSIM3V2weffCV = here->BSIM3V2w - 2.0 * pParam->BSIM3V2dwc;
|
||||
if (pParam->BSIM3V2weffCV <= 0.0)
|
||||
{ IFuid namarray[2];
|
||||
namarray[0] = model->BSIM3V2modName;
|
||||
namarray[1] = here->BSIM3V2name;
|
||||
(*(SPfrontEnd->IFerror))(ERR_FATAL,
|
||||
"BSIM3V2: mosfet %s, model %s: Effective channel width for C-V <= 0",
|
||||
namarray);
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
||||
|
||||
if (model->BSIM3V2binUnit == 1)
|
||||
{ Inv_L = 1.0e-6 / pParam->BSIM3V2leff;
|
||||
Inv_W = 1.0e-6 / pParam->BSIM3V2weff;
|
||||
Inv_LW = 1.0e-12 / (pParam->BSIM3V2leff
|
||||
* pParam->BSIM3V2weff);
|
||||
}
|
||||
else
|
||||
{ Inv_L = 1.0 / pParam->BSIM3V2leff;
|
||||
Inv_W = 1.0 / pParam->BSIM3V2weff;
|
||||
Inv_LW = 1.0 / (pParam->BSIM3V2leff
|
||||
* pParam->BSIM3V2weff);
|
||||
}
|
||||
pParam->BSIM3V2cdsc = model->BSIM3V2cdsc
|
||||
+ model->BSIM3V2lcdsc * Inv_L
|
||||
+ model->BSIM3V2wcdsc * Inv_W
|
||||
+ model->BSIM3V2pcdsc * Inv_LW;
|
||||
pParam->BSIM3V2cdscb = model->BSIM3V2cdscb
|
||||
+ model->BSIM3V2lcdscb * Inv_L
|
||||
+ model->BSIM3V2wcdscb * Inv_W
|
||||
+ model->BSIM3V2pcdscb * Inv_LW;
|
||||
|
||||
pParam->BSIM3V2cdscd = model->BSIM3V2cdscd
|
||||
+ model->BSIM3V2lcdscd * Inv_L
|
||||
+ model->BSIM3V2wcdscd * Inv_W
|
||||
+ model->BSIM3V2pcdscd * Inv_LW;
|
||||
|
||||
pParam->BSIM3V2cit = model->BSIM3V2cit
|
||||
+ model->BSIM3V2lcit * Inv_L
|
||||
+ model->BSIM3V2wcit * Inv_W
|
||||
+ model->BSIM3V2pcit * Inv_LW;
|
||||
pParam->BSIM3V2nfactor = model->BSIM3V2nfactor
|
||||
+ model->BSIM3V2lnfactor * Inv_L
|
||||
+ model->BSIM3V2wnfactor * Inv_W
|
||||
+ model->BSIM3V2pnfactor * Inv_LW;
|
||||
pParam->BSIM3V2xj = model->BSIM3V2xj
|
||||
+ model->BSIM3V2lxj * Inv_L
|
||||
+ model->BSIM3V2wxj * Inv_W
|
||||
+ model->BSIM3V2pxj * Inv_LW;
|
||||
pParam->BSIM3V2vsat = model->BSIM3V2vsat
|
||||
+ model->BSIM3V2lvsat * Inv_L
|
||||
+ model->BSIM3V2wvsat * Inv_W
|
||||
+ model->BSIM3V2pvsat * Inv_LW;
|
||||
pParam->BSIM3V2at = model->BSIM3V2at
|
||||
+ model->BSIM3V2lat * Inv_L
|
||||
+ model->BSIM3V2wat * Inv_W
|
||||
+ model->BSIM3V2pat * Inv_LW;
|
||||
pParam->BSIM3V2a0 = model->BSIM3V2a0
|
||||
+ model->BSIM3V2la0 * Inv_L
|
||||
+ model->BSIM3V2wa0 * Inv_W
|
||||
+ model->BSIM3V2pa0 * Inv_LW;
|
||||
|
||||
pParam->BSIM3V2ags = model->BSIM3V2ags
|
||||
+ model->BSIM3V2lags * Inv_L
|
||||
+ model->BSIM3V2wags * Inv_W
|
||||
+ model->BSIM3V2pags * Inv_LW;
|
||||
|
||||
pParam->BSIM3V2a1 = model->BSIM3V2a1
|
||||
+ model->BSIM3V2la1 * Inv_L
|
||||
+ model->BSIM3V2wa1 * Inv_W
|
||||
+ model->BSIM3V2pa1 * Inv_LW;
|
||||
pParam->BSIM3V2a2 = model->BSIM3V2a2
|
||||
+ model->BSIM3V2la2 * Inv_L
|
||||
+ model->BSIM3V2wa2 * Inv_W
|
||||
+ model->BSIM3V2pa2 * Inv_LW;
|
||||
pParam->BSIM3V2keta = model->BSIM3V2keta
|
||||
+ model->BSIM3V2lketa * Inv_L
|
||||
+ model->BSIM3V2wketa * Inv_W
|
||||
+ model->BSIM3V2pketa * Inv_LW;
|
||||
pParam->BSIM3V2nsub = model->BSIM3V2nsub
|
||||
+ model->BSIM3V2lnsub * Inv_L
|
||||
+ model->BSIM3V2wnsub * Inv_W
|
||||
+ model->BSIM3V2pnsub * Inv_LW;
|
||||
pParam->BSIM3V2npeak = model->BSIM3V2npeak
|
||||
+ model->BSIM3V2lnpeak * Inv_L
|
||||
+ model->BSIM3V2wnpeak * Inv_W
|
||||
+ model->BSIM3V2pnpeak * Inv_LW;
|
||||
pParam->BSIM3V2ngate = model->BSIM3V2ngate
|
||||
+ model->BSIM3V2lngate * Inv_L
|
||||
+ model->BSIM3V2wngate * Inv_W
|
||||
+ model->BSIM3V2pngate * Inv_LW;
|
||||
pParam->BSIM3V2gamma1 = model->BSIM3V2gamma1
|
||||
+ model->BSIM3V2lgamma1 * Inv_L
|
||||
+ model->BSIM3V2wgamma1 * Inv_W
|
||||
+ model->BSIM3V2pgamma1 * Inv_LW;
|
||||
pParam->BSIM3V2gamma2 = model->BSIM3V2gamma2
|
||||
+ model->BSIM3V2lgamma2 * Inv_L
|
||||
+ model->BSIM3V2wgamma2 * Inv_W
|
||||
+ model->BSIM3V2pgamma2 * Inv_LW;
|
||||
pParam->BSIM3V2vbx = model->BSIM3V2vbx
|
||||
+ model->BSIM3V2lvbx * Inv_L
|
||||
+ model->BSIM3V2wvbx * Inv_W
|
||||
+ model->BSIM3V2pvbx * Inv_LW;
|
||||
pParam->BSIM3V2vbm = model->BSIM3V2vbm
|
||||
+ model->BSIM3V2lvbm * Inv_L
|
||||
+ model->BSIM3V2wvbm * Inv_W
|
||||
+ model->BSIM3V2pvbm * Inv_LW;
|
||||
pParam->BSIM3V2xt = model->BSIM3V2xt
|
||||
+ model->BSIM3V2lxt * Inv_L
|
||||
+ model->BSIM3V2wxt * Inv_W
|
||||
+ model->BSIM3V2pxt * Inv_LW;
|
||||
pParam->BSIM3V2vfb = model->BSIM3V2vfb
|
||||
+ model->BSIM3V2lvfb * Inv_L
|
||||
+ model->BSIM3V2wvfb * Inv_W
|
||||
+ model->BSIM3V2pvfb * Inv_LW;
|
||||
pParam->BSIM3V2k1 = model->BSIM3V2k1
|
||||
+ model->BSIM3V2lk1 * Inv_L
|
||||
+ model->BSIM3V2wk1 * Inv_W
|
||||
+ model->BSIM3V2pk1 * Inv_LW;
|
||||
pParam->BSIM3V2kt1 = model->BSIM3V2kt1
|
||||
+ model->BSIM3V2lkt1 * Inv_L
|
||||
+ model->BSIM3V2wkt1 * Inv_W
|
||||
+ model->BSIM3V2pkt1 * Inv_LW;
|
||||
pParam->BSIM3V2kt1l = model->BSIM3V2kt1l
|
||||
+ model->BSIM3V2lkt1l * Inv_L
|
||||
+ model->BSIM3V2wkt1l * Inv_W
|
||||
+ model->BSIM3V2pkt1l * Inv_LW;
|
||||
pParam->BSIM3V2k2 = model->BSIM3V2k2
|
||||
+ model->BSIM3V2lk2 * Inv_L
|
||||
+ model->BSIM3V2wk2 * Inv_W
|
||||
+ model->BSIM3V2pk2 * Inv_LW;
|
||||
pParam->BSIM3V2kt2 = model->BSIM3V2kt2
|
||||
+ model->BSIM3V2lkt2 * Inv_L
|
||||
+ model->BSIM3V2wkt2 * Inv_W
|
||||
+ model->BSIM3V2pkt2 * Inv_LW;
|
||||
pParam->BSIM3V2k3 = model->BSIM3V2k3
|
||||
+ model->BSIM3V2lk3 * Inv_L
|
||||
+ model->BSIM3V2wk3 * Inv_W
|
||||
+ model->BSIM3V2pk3 * Inv_LW;
|
||||
pParam->BSIM3V2k3b = model->BSIM3V2k3b
|
||||
+ model->BSIM3V2lk3b * Inv_L
|
||||
+ model->BSIM3V2wk3b * Inv_W
|
||||
+ model->BSIM3V2pk3b * Inv_LW;
|
||||
pParam->BSIM3V2w0 = model->BSIM3V2w0
|
||||
+ model->BSIM3V2lw0 * Inv_L
|
||||
+ model->BSIM3V2ww0 * Inv_W
|
||||
+ model->BSIM3V2pw0 * Inv_LW;
|
||||
pParam->BSIM3V2nlx = model->BSIM3V2nlx
|
||||
+ model->BSIM3V2lnlx * Inv_L
|
||||
+ model->BSIM3V2wnlx * Inv_W
|
||||
+ model->BSIM3V2pnlx * Inv_LW;
|
||||
pParam->BSIM3V2dvt0 = model->BSIM3V2dvt0
|
||||
+ model->BSIM3V2ldvt0 * Inv_L
|
||||
+ model->BSIM3V2wdvt0 * Inv_W
|
||||
+ model->BSIM3V2pdvt0 * Inv_LW;
|
||||
pParam->BSIM3V2dvt1 = model->BSIM3V2dvt1
|
||||
+ model->BSIM3V2ldvt1 * Inv_L
|
||||
+ model->BSIM3V2wdvt1 * Inv_W
|
||||
+ model->BSIM3V2pdvt1 * Inv_LW;
|
||||
pParam->BSIM3V2dvt2 = model->BSIM3V2dvt2
|
||||
+ model->BSIM3V2ldvt2 * Inv_L
|
||||
+ model->BSIM3V2wdvt2 * Inv_W
|
||||
+ model->BSIM3V2pdvt2 * Inv_LW;
|
||||
pParam->BSIM3V2dvt0w = model->BSIM3V2dvt0w
|
||||
+ model->BSIM3V2ldvt0w * Inv_L
|
||||
+ model->BSIM3V2wdvt0w * Inv_W
|
||||
+ model->BSIM3V2pdvt0w * Inv_LW;
|
||||
pParam->BSIM3V2dvt1w = model->BSIM3V2dvt1w
|
||||
+ model->BSIM3V2ldvt1w * Inv_L
|
||||
+ model->BSIM3V2wdvt1w * Inv_W
|
||||
+ model->BSIM3V2pdvt1w * Inv_LW;
|
||||
pParam->BSIM3V2dvt2w = model->BSIM3V2dvt2w
|
||||
+ model->BSIM3V2ldvt2w * Inv_L
|
||||
+ model->BSIM3V2wdvt2w * Inv_W
|
||||
+ model->BSIM3V2pdvt2w * Inv_LW;
|
||||
pParam->BSIM3V2drout = model->BSIM3V2drout
|
||||
+ model->BSIM3V2ldrout * Inv_L
|
||||
+ model->BSIM3V2wdrout * Inv_W
|
||||
+ model->BSIM3V2pdrout * Inv_LW;
|
||||
pParam->BSIM3V2dsub = model->BSIM3V2dsub
|
||||
+ model->BSIM3V2ldsub * Inv_L
|
||||
+ model->BSIM3V2wdsub * Inv_W
|
||||
+ model->BSIM3V2pdsub * Inv_LW;
|
||||
pParam->BSIM3V2vth0 = model->BSIM3V2vth0
|
||||
+ model->BSIM3V2lvth0 * Inv_L
|
||||
+ model->BSIM3V2wvth0 * Inv_W
|
||||
+ model->BSIM3V2pvth0 * Inv_LW;
|
||||
pParam->BSIM3V2ua = model->BSIM3V2ua
|
||||
+ model->BSIM3V2lua * Inv_L
|
||||
+ model->BSIM3V2wua * Inv_W
|
||||
+ model->BSIM3V2pua * Inv_LW;
|
||||
pParam->BSIM3V2ua1 = model->BSIM3V2ua1
|
||||
+ model->BSIM3V2lua1 * Inv_L
|
||||
+ model->BSIM3V2wua1 * Inv_W
|
||||
+ model->BSIM3V2pua1 * Inv_LW;
|
||||
pParam->BSIM3V2ub = model->BSIM3V2ub
|
||||
+ model->BSIM3V2lub * Inv_L
|
||||
+ model->BSIM3V2wub * Inv_W
|
||||
+ model->BSIM3V2pub * Inv_LW;
|
||||
pParam->BSIM3V2ub1 = model->BSIM3V2ub1
|
||||
+ model->BSIM3V2lub1 * Inv_L
|
||||
+ model->BSIM3V2wub1 * Inv_W
|
||||
+ model->BSIM3V2pub1 * Inv_LW;
|
||||
pParam->BSIM3V2uc = model->BSIM3V2uc
|
||||
+ model->BSIM3V2luc * Inv_L
|
||||
+ model->BSIM3V2wuc * Inv_W
|
||||
+ model->BSIM3V2puc * Inv_LW;
|
||||
pParam->BSIM3V2uc1 = model->BSIM3V2uc1
|
||||
+ model->BSIM3V2luc1 * Inv_L
|
||||
+ model->BSIM3V2wuc1 * Inv_W
|
||||
+ model->BSIM3V2puc1 * Inv_LW;
|
||||
pParam->BSIM3V2u0 = model->BSIM3V2u0
|
||||
+ model->BSIM3V2lu0 * Inv_L
|
||||
+ model->BSIM3V2wu0 * Inv_W
|
||||
+ model->BSIM3V2pu0 * Inv_LW;
|
||||
pParam->BSIM3V2ute = model->BSIM3V2ute
|
||||
+ model->BSIM3V2lute * Inv_L
|
||||
+ model->BSIM3V2wute * Inv_W
|
||||
+ model->BSIM3V2pute * Inv_LW;
|
||||
pParam->BSIM3V2voff = model->BSIM3V2voff
|
||||
+ model->BSIM3V2lvoff * Inv_L
|
||||
+ model->BSIM3V2wvoff * Inv_W
|
||||
+ model->BSIM3V2pvoff * Inv_LW;
|
||||
pParam->BSIM3V2delta = model->BSIM3V2delta
|
||||
+ model->BSIM3V2ldelta * Inv_L
|
||||
+ model->BSIM3V2wdelta * Inv_W
|
||||
+ model->BSIM3V2pdelta * Inv_LW;
|
||||
pParam->BSIM3V2rdsw = model->BSIM3V2rdsw
|
||||
+ model->BSIM3V2lrdsw * Inv_L
|
||||
+ model->BSIM3V2wrdsw * Inv_W
|
||||
+ model->BSIM3V2prdsw * Inv_LW;
|
||||
pParam->BSIM3V2prwg = model->BSIM3V2prwg
|
||||
+ model->BSIM3V2lprwg * Inv_L
|
||||
+ model->BSIM3V2wprwg * Inv_W
|
||||
+ model->BSIM3V2pprwg * Inv_LW;
|
||||
pParam->BSIM3V2prwb = model->BSIM3V2prwb
|
||||
+ model->BSIM3V2lprwb * Inv_L
|
||||
+ model->BSIM3V2wprwb * Inv_W
|
||||
+ model->BSIM3V2pprwb * Inv_LW;
|
||||
pParam->BSIM3V2prt = model->BSIM3V2prt
|
||||
+ model->BSIM3V2lprt * Inv_L
|
||||
+ model->BSIM3V2wprt * Inv_W
|
||||
+ model->BSIM3V2pprt * Inv_LW;
|
||||
pParam->BSIM3V2eta0 = model->BSIM3V2eta0
|
||||
+ model->BSIM3V2leta0 * Inv_L
|
||||
+ model->BSIM3V2weta0 * Inv_W
|
||||
+ model->BSIM3V2peta0 * Inv_LW;
|
||||
pParam->BSIM3V2etab = model->BSIM3V2etab
|
||||
+ model->BSIM3V2letab * Inv_L
|
||||
+ model->BSIM3V2wetab * Inv_W
|
||||
+ model->BSIM3V2petab * Inv_LW;
|
||||
pParam->BSIM3V2pclm = model->BSIM3V2pclm
|
||||
+ model->BSIM3V2lpclm * Inv_L
|
||||
+ model->BSIM3V2wpclm * Inv_W
|
||||
+ model->BSIM3V2ppclm * Inv_LW;
|
||||
pParam->BSIM3V2pdibl1 = model->BSIM3V2pdibl1
|
||||
+ model->BSIM3V2lpdibl1 * Inv_L
|
||||
+ model->BSIM3V2wpdibl1 * Inv_W
|
||||
+ model->BSIM3V2ppdibl1 * Inv_LW;
|
||||
pParam->BSIM3V2pdibl2 = model->BSIM3V2pdibl2
|
||||
+ model->BSIM3V2lpdibl2 * Inv_L
|
||||
+ model->BSIM3V2wpdibl2 * Inv_W
|
||||
+ model->BSIM3V2ppdibl2 * Inv_LW;
|
||||
pParam->BSIM3V2pdiblb = model->BSIM3V2pdiblb
|
||||
+ model->BSIM3V2lpdiblb * Inv_L
|
||||
+ model->BSIM3V2wpdiblb * Inv_W
|
||||
+ model->BSIM3V2ppdiblb * Inv_LW;
|
||||
pParam->BSIM3V2pscbe1 = model->BSIM3V2pscbe1
|
||||
+ model->BSIM3V2lpscbe1 * Inv_L
|
||||
+ model->BSIM3V2wpscbe1 * Inv_W
|
||||
+ model->BSIM3V2ppscbe1 * Inv_LW;
|
||||
pParam->BSIM3V2pscbe2 = model->BSIM3V2pscbe2
|
||||
+ model->BSIM3V2lpscbe2 * Inv_L
|
||||
+ model->BSIM3V2wpscbe2 * Inv_W
|
||||
+ model->BSIM3V2ppscbe2 * Inv_LW;
|
||||
pParam->BSIM3V2pvag = model->BSIM3V2pvag
|
||||
+ model->BSIM3V2lpvag * Inv_L
|
||||
+ model->BSIM3V2wpvag * Inv_W
|
||||
+ model->BSIM3V2ppvag * Inv_LW;
|
||||
pParam->BSIM3V2wr = model->BSIM3V2wr
|
||||
+ model->BSIM3V2lwr * Inv_L
|
||||
+ model->BSIM3V2wwr * Inv_W
|
||||
+ model->BSIM3V2pwr * Inv_LW;
|
||||
pParam->BSIM3V2dwg = model->BSIM3V2dwg
|
||||
+ model->BSIM3V2ldwg * Inv_L
|
||||
+ model->BSIM3V2wdwg * Inv_W
|
||||
+ model->BSIM3V2pdwg * Inv_LW;
|
||||
pParam->BSIM3V2dwb = model->BSIM3V2dwb
|
||||
+ model->BSIM3V2ldwb * Inv_L
|
||||
+ model->BSIM3V2wdwb * Inv_W
|
||||
+ model->BSIM3V2pdwb * Inv_LW;
|
||||
pParam->BSIM3V2b0 = model->BSIM3V2b0
|
||||
+ model->BSIM3V2lb0 * Inv_L
|
||||
+ model->BSIM3V2wb0 * Inv_W
|
||||
+ model->BSIM3V2pb0 * Inv_LW;
|
||||
pParam->BSIM3V2b1 = model->BSIM3V2b1
|
||||
+ model->BSIM3V2lb1 * Inv_L
|
||||
+ model->BSIM3V2wb1 * Inv_W
|
||||
+ model->BSIM3V2pb1 * Inv_LW;
|
||||
pParam->BSIM3V2alpha0 = model->BSIM3V2alpha0
|
||||
+ model->BSIM3V2lalpha0 * Inv_L
|
||||
+ model->BSIM3V2walpha0 * Inv_W
|
||||
+ model->BSIM3V2palpha0 * Inv_LW;
|
||||
pParam->BSIM3V2alpha1 = model->BSIM3V2alpha1
|
||||
+ model->BSIM3V2lalpha1 * Inv_L
|
||||
+ model->BSIM3V2walpha1 * Inv_W
|
||||
+ model->BSIM3V2palpha1 * Inv_LW;
|
||||
pParam->BSIM3V2beta0 = model->BSIM3V2beta0
|
||||
+ model->BSIM3V2lbeta0 * Inv_L
|
||||
+ model->BSIM3V2wbeta0 * Inv_W
|
||||
+ model->BSIM3V2pbeta0 * Inv_LW;
|
||||
/* CV model */
|
||||
pParam->BSIM3V2elm = model->BSIM3V2elm
|
||||
+ model->BSIM3V2lelm * Inv_L
|
||||
+ model->BSIM3V2welm * Inv_W
|
||||
+ model->BSIM3V2pelm * Inv_LW;
|
||||
pParam->BSIM3V2cgsl = model->BSIM3V2cgsl
|
||||
+ model->BSIM3V2lcgsl * Inv_L
|
||||
+ model->BSIM3V2wcgsl * Inv_W
|
||||
+ model->BSIM3V2pcgsl * Inv_LW;
|
||||
pParam->BSIM3V2cgdl = model->BSIM3V2cgdl
|
||||
+ model->BSIM3V2lcgdl * Inv_L
|
||||
+ model->BSIM3V2wcgdl * Inv_W
|
||||
+ model->BSIM3V2pcgdl * Inv_LW;
|
||||
pParam->BSIM3V2ckappa = model->BSIM3V2ckappa
|
||||
+ model->BSIM3V2lckappa * Inv_L
|
||||
+ model->BSIM3V2wckappa * Inv_W
|
||||
+ model->BSIM3V2pckappa * Inv_LW;
|
||||
pParam->BSIM3V2cf = model->BSIM3V2cf
|
||||
+ model->BSIM3V2lcf * Inv_L
|
||||
+ model->BSIM3V2wcf * Inv_W
|
||||
+ model->BSIM3V2pcf * Inv_LW;
|
||||
pParam->BSIM3V2clc = model->BSIM3V2clc
|
||||
+ model->BSIM3V2lclc * Inv_L
|
||||
+ model->BSIM3V2wclc * Inv_W
|
||||
+ model->BSIM3V2pclc * Inv_LW;
|
||||
pParam->BSIM3V2cle = model->BSIM3V2cle
|
||||
+ model->BSIM3V2lcle * Inv_L
|
||||
+ model->BSIM3V2wcle * Inv_W
|
||||
+ model->BSIM3V2pcle * Inv_LW;
|
||||
pParam->BSIM3V2vfbcv = model->BSIM3V2vfbcv
|
||||
+ model->BSIM3V2lvfbcv * Inv_L
|
||||
+ model->BSIM3V2wvfbcv * Inv_W
|
||||
+ model->BSIM3V2pvfbcv * Inv_LW;
|
||||
pParam->BSIM3V2acde = model->BSIM3V2acde
|
||||
+ model->BSIM3V2lacde * Inv_L
|
||||
+ model->BSIM3V2wacde * Inv_W
|
||||
+ model->BSIM3V2pacde * Inv_LW;
|
||||
pParam->BSIM3V2moin = model->BSIM3V2moin
|
||||
+ model->BSIM3V2lmoin * Inv_L
|
||||
+ model->BSIM3V2wmoin * Inv_W
|
||||
+ model->BSIM3V2pmoin * Inv_LW;
|
||||
pParam->BSIM3V2noff = model->BSIM3V2noff
|
||||
+ model->BSIM3V2lnoff * Inv_L
|
||||
+ model->BSIM3V2wnoff * Inv_W
|
||||
+ model->BSIM3V2pnoff * Inv_LW;
|
||||
pParam->BSIM3V2voffcv = model->BSIM3V2voffcv
|
||||
+ model->BSIM3V2lvoffcv * Inv_L
|
||||
+ model->BSIM3V2wvoffcv * Inv_W
|
||||
+ model->BSIM3V2pvoffcv * Inv_LW;
|
||||
|
||||
pParam->BSIM3V2abulkCVfactor = 1.0 + pow((pParam->BSIM3V2clc
|
||||
/ pParam->BSIM3V2leffCV),
|
||||
pParam->BSIM3V2cle);
|
||||
|
||||
T0 = (TRatio - 1.0);
|
||||
pParam->BSIM3V2ua = pParam->BSIM3V2ua + pParam->BSIM3V2ua1 * T0;
|
||||
pParam->BSIM3V2ub = pParam->BSIM3V2ub + pParam->BSIM3V2ub1 * T0;
|
||||
pParam->BSIM3V2uc = pParam->BSIM3V2uc + pParam->BSIM3V2uc1 * T0;
|
||||
if (pParam->BSIM3V2u0 > 1.0)
|
||||
pParam->BSIM3V2u0 = pParam->BSIM3V2u0 / 1.0e4;
|
||||
|
||||
pParam->BSIM3V2u0temp = pParam->BSIM3V2u0
|
||||
* pow(TRatio, pParam->BSIM3V2ute);
|
||||
pParam->BSIM3V2vsattemp = pParam->BSIM3V2vsat - pParam->BSIM3V2at
|
||||
* T0;
|
||||
pParam->BSIM3V2rds0 = (pParam->BSIM3V2rdsw + pParam->BSIM3V2prt * T0)
|
||||
/ pow(pParam->BSIM3V2weff * 1E6, pParam->BSIM3V2wr);
|
||||
|
||||
if (BSIM3V2checkModel(model, here, ckt))
|
||||
{ IFuid namarray[2];
|
||||
namarray[0] = model->BSIM3V2modName;
|
||||
namarray[1] = here->BSIM3V2name;
|
||||
(*(SPfrontEnd->IFerror)) (ERR_FATAL, "Fatal error(s) detected during BSIM3V2V3.2 parameter checking for %s in model %s", namarray);
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
||||
pParam->BSIM3V2cgdo = (model->BSIM3V2cgdo + pParam->BSIM3V2cf)
|
||||
* pParam->BSIM3V2weffCV;
|
||||
pParam->BSIM3V2cgso = (model->BSIM3V2cgso + pParam->BSIM3V2cf)
|
||||
* pParam->BSIM3V2weffCV;
|
||||
pParam->BSIM3V2cgbo = model->BSIM3V2cgbo * pParam->BSIM3V2leffCV;
|
||||
|
||||
T0 = pParam->BSIM3V2leffCV * pParam->BSIM3V2leffCV;
|
||||
pParam->BSIM3V2tconst = pParam->BSIM3V2u0temp * pParam->BSIM3V2elm / (model->BSIM3V2cox
|
||||
* pParam->BSIM3V2weffCV * pParam->BSIM3V2leffCV * T0);
|
||||
|
||||
if (!model->BSIM3V2npeakGiven && model->BSIM3V2gamma1Given)
|
||||
{ T0 = pParam->BSIM3V2gamma1 * model->BSIM3V2cox;
|
||||
pParam->BSIM3V2npeak = 3.021E22 * T0 * T0;
|
||||
}
|
||||
|
||||
pParam->BSIM3V2phi = 2.0 * Vtm0
|
||||
* log(pParam->BSIM3V2npeak / ni);
|
||||
|
||||
pParam->BSIM3V2sqrtPhi = sqrt(pParam->BSIM3V2phi);
|
||||
pParam->BSIM3V2phis3 = pParam->BSIM3V2sqrtPhi * pParam->BSIM3V2phi;
|
||||
|
||||
pParam->BSIM3V2Xdep0 = sqrt(2.0 * EPSSI / (Charge_q
|
||||
* pParam->BSIM3V2npeak * 1.0e6))
|
||||
* pParam->BSIM3V2sqrtPhi;
|
||||
pParam->BSIM3V2sqrtXdep0 = sqrt(pParam->BSIM3V2Xdep0);
|
||||
pParam->BSIM3V2litl = sqrt(3.0 * pParam->BSIM3V2xj
|
||||
* model->BSIM3V2tox);
|
||||
pParam->BSIM3V2vbi = Vtm0 * log(1.0e20
|
||||
* pParam->BSIM3V2npeak / (ni * ni));
|
||||
pParam->BSIM3V2cdep0 = sqrt(Charge_q * EPSSI
|
||||
* pParam->BSIM3V2npeak * 1.0e6 / 2.0
|
||||
/ pParam->BSIM3V2phi);
|
||||
|
||||
pParam->BSIM3V2ldeb = sqrt(EPSSI * Vtm0 / (Charge_q
|
||||
* pParam->BSIM3V2npeak * 1.0e6)) / 3.0;
|
||||
pParam->BSIM3V2acde *= pow((pParam->BSIM3V2npeak / 2.0e16), -0.25);
|
||||
|
||||
|
||||
if (model->BSIM3V2k1Given || model->BSIM3V2k2Given)
|
||||
{ if (!model->BSIM3V2k1Given)
|
||||
{ fprintf(stdout, "Warning: k1 should be specified with k2.\n");
|
||||
pParam->BSIM3V2k1 = 0.53;
|
||||
}
|
||||
if (!model->BSIM3V2k2Given)
|
||||
{ fprintf(stdout, "Warning: k2 should be specified with k1.\n");
|
||||
pParam->BSIM3V2k2 = -0.0186;
|
||||
}
|
||||
if (model->BSIM3V2nsubGiven)
|
||||
fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n");
|
||||
if (model->BSIM3V2xtGiven)
|
||||
fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n");
|
||||
if (model->BSIM3V2vbxGiven)
|
||||
fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n");
|
||||
if (model->BSIM3V2gamma1Given)
|
||||
fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n");
|
||||
if (model->BSIM3V2gamma2Given)
|
||||
fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n");
|
||||
}
|
||||
else
|
||||
{ if (!model->BSIM3V2vbxGiven)
|
||||
pParam->BSIM3V2vbx = pParam->BSIM3V2phi - 7.7348e-4
|
||||
* pParam->BSIM3V2npeak
|
||||
* pParam->BSIM3V2xt * pParam->BSIM3V2xt;
|
||||
if (pParam->BSIM3V2vbx > 0.0)
|
||||
pParam->BSIM3V2vbx = -pParam->BSIM3V2vbx;
|
||||
if (pParam->BSIM3V2vbm > 0.0)
|
||||
pParam->BSIM3V2vbm = -pParam->BSIM3V2vbm;
|
||||
|
||||
if (!model->BSIM3V2gamma1Given)
|
||||
pParam->BSIM3V2gamma1 = 5.753e-12
|
||||
* sqrt(pParam->BSIM3V2npeak)
|
||||
/ model->BSIM3V2cox;
|
||||
if (!model->BSIM3V2gamma2Given)
|
||||
pParam->BSIM3V2gamma2 = 5.753e-12
|
||||
* sqrt(pParam->BSIM3V2nsub)
|
||||
/ model->BSIM3V2cox;
|
||||
|
||||
T0 = pParam->BSIM3V2gamma1 - pParam->BSIM3V2gamma2;
|
||||
T1 = sqrt(pParam->BSIM3V2phi - pParam->BSIM3V2vbx)
|
||||
- pParam->BSIM3V2sqrtPhi;
|
||||
T2 = sqrt(pParam->BSIM3V2phi * (pParam->BSIM3V2phi
|
||||
- pParam->BSIM3V2vbm)) - pParam->BSIM3V2phi;
|
||||
pParam->BSIM3V2k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM3V2vbm);
|
||||
pParam->BSIM3V2k1 = pParam->BSIM3V2gamma2 - 2.0
|
||||
* pParam->BSIM3V2k2 * sqrt(pParam->BSIM3V2phi
|
||||
- pParam->BSIM3V2vbm);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3V2k2 < 0.0)
|
||||
{ T0 = 0.5 * pParam->BSIM3V2k1 / pParam->BSIM3V2k2;
|
||||
pParam->BSIM3V2vbsc = 0.9 * (pParam->BSIM3V2phi - T0 * T0);
|
||||
if (pParam->BSIM3V2vbsc > -3.0)
|
||||
pParam->BSIM3V2vbsc = -3.0;
|
||||
else if (pParam->BSIM3V2vbsc < -30.0)
|
||||
pParam->BSIM3V2vbsc = -30.0;
|
||||
}
|
||||
else
|
||||
{ pParam->BSIM3V2vbsc = -30.0;
|
||||
}
|
||||
if (pParam->BSIM3V2vbsc > pParam->BSIM3V2vbm)
|
||||
pParam->BSIM3V2vbsc = pParam->BSIM3V2vbm;
|
||||
|
||||
if (!model->BSIM3V2vfbGiven)
|
||||
{ if (model->BSIM3V2vth0Given)
|
||||
{ pParam->BSIM3V2vfb = model->BSIM3V2type * pParam->BSIM3V2vth0
|
||||
- pParam->BSIM3V2phi - pParam->BSIM3V2k1
|
||||
* pParam->BSIM3V2sqrtPhi;
|
||||
}
|
||||
else
|
||||
{ pParam->BSIM3V2vfb = -1.0;
|
||||
}
|
||||
}
|
||||
if (!model->BSIM3V2vth0Given)
|
||||
{ pParam->BSIM3V2vth0 = model->BSIM3V2type * (pParam->BSIM3V2vfb
|
||||
+ pParam->BSIM3V2phi + pParam->BSIM3V2k1
|
||||
* pParam->BSIM3V2sqrtPhi);
|
||||
}
|
||||
|
||||
pParam->BSIM3V2k1ox = pParam->BSIM3V2k1 * model->BSIM3V2tox
|
||||
/ model->BSIM3V2toxm;
|
||||
pParam->BSIM3V2k2ox = pParam->BSIM3V2k2 * model->BSIM3V2tox
|
||||
/ model->BSIM3V2toxm;
|
||||
|
||||
T1 = sqrt(EPSSI / EPSOX * model->BSIM3V2tox
|
||||
* pParam->BSIM3V2Xdep0);
|
||||
T0 = exp(-0.5 * pParam->BSIM3V2dsub * pParam->BSIM3V2leff / T1);
|
||||
pParam->BSIM3V2theta0vb0 = (T0 + 2.0 * T0 * T0);
|
||||
|
||||
T0 = exp(-0.5 * pParam->BSIM3V2drout * pParam->BSIM3V2leff / T1);
|
||||
T2 = (T0 + 2.0 * T0 * T0);
|
||||
pParam->BSIM3V2thetaRout = pParam->BSIM3V2pdibl1 * T2
|
||||
+ pParam->BSIM3V2pdibl2;
|
||||
|
||||
/* vfbzb for capMod 1, 2 & 3 - Weidong 4/1997 */
|
||||
tmp = sqrt(pParam->BSIM3V2Xdep0);
|
||||
tmp1 = pParam->BSIM3V2vbi - pParam->BSIM3V2phi;
|
||||
tmp2 = model->BSIM3V2factor1 * tmp;
|
||||
|
||||
T0 = -0.5 * pParam->BSIM3V2dvt1w * pParam->BSIM3V2weff
|
||||
* pParam->BSIM3V2leff / tmp2;
|
||||
if (T0 > -EXP_THRESHOLD)
|
||||
{ T1 = exp(T0);
|
||||
T2 = T1 * (1.0 + 2.0 * T1);
|
||||
}
|
||||
else
|
||||
{ T1 = MIN_EXP;
|
||||
T2 = T1 * (1.0 + 2.0 * T1);
|
||||
}
|
||||
T0 = pParam->BSIM3V2dvt0w * T2;
|
||||
T2 = T0 * tmp1;
|
||||
|
||||
T0 = -0.5 * pParam->BSIM3V2dvt1 * pParam->BSIM3V2leff / tmp2;
|
||||
if (T0 > -EXP_THRESHOLD)
|
||||
{ T1 = exp(T0);
|
||||
T3 = T1 * (1.0 + 2.0 * T1);
|
||||
}
|
||||
else
|
||||
{ T1 = MIN_EXP;
|
||||
T3 = T1 * (1.0 + 2.0 * T1);
|
||||
}
|
||||
T3 = pParam->BSIM3V2dvt0 * T3 * tmp1;
|
||||
|
||||
T4 = model->BSIM3V2tox * pParam->BSIM3V2phi
|
||||
/ (pParam->BSIM3V2weff + pParam->BSIM3V2w0);
|
||||
|
||||
T0 = sqrt(1.0 + pParam->BSIM3V2nlx / pParam->BSIM3V2leff);
|
||||
T5 = pParam->BSIM3V2k1ox * (T0 - 1.0) * pParam->BSIM3V2sqrtPhi
|
||||
+ (pParam->BSIM3V2kt1 + pParam->BSIM3V2kt1l / pParam->BSIM3V2leff)
|
||||
* (TRatio - 1.0);
|
||||
|
||||
tmp3 = model->BSIM3V2type * pParam->BSIM3V2vth0
|
||||
- T2 - T3 + pParam->BSIM3V2k3 * T4 + T5;
|
||||
pParam->BSIM3V2vfbzb = tmp3 - pParam->BSIM3V2phi - pParam->BSIM3V2k1
|
||||
* pParam->BSIM3V2sqrtPhi;
|
||||
/* End of vfbzb */
|
||||
}
|
||||
|
||||
/* process source/drain series resistance */
|
||||
here->BSIM3V2drainConductance = model->BSIM3V2sheetResistance
|
||||
* here->BSIM3V2drainSquares;
|
||||
if (here->BSIM3V2drainConductance > 0.0)
|
||||
here->BSIM3V2drainConductance = 1.0
|
||||
/ here->BSIM3V2drainConductance;
|
||||
else
|
||||
here->BSIM3V2drainConductance = 0.0;
|
||||
|
||||
here->BSIM3V2sourceConductance = model->BSIM3V2sheetResistance
|
||||
* here->BSIM3V2sourceSquares;
|
||||
if (here->BSIM3V2sourceConductance > 0.0)
|
||||
here->BSIM3V2sourceConductance = 1.0
|
||||
/ here->BSIM3V2sourceConductance;
|
||||
else
|
||||
here->BSIM3V2sourceConductance = 0.0;
|
||||
here->BSIM3V2cgso = pParam->BSIM3V2cgso;
|
||||
here->BSIM3V2cgdo = pParam->BSIM3V2cgdo;
|
||||
|
||||
Nvtm = model->BSIM3V2vtm * model->BSIM3V2jctEmissionCoeff;
|
||||
if ((here->BSIM3V2sourceArea <= 0.0) &&
|
||||
(here->BSIM3V2sourcePerimeter <= 0.0))
|
||||
{ SourceSatCurrent = 1.0e-14;
|
||||
}
|
||||
else
|
||||
{ SourceSatCurrent = here->BSIM3V2sourceArea
|
||||
* model->BSIM3V2jctTempSatCurDensity
|
||||
+ here->BSIM3V2sourcePerimeter
|
||||
* model->BSIM3V2jctSidewallTempSatCurDensity;
|
||||
}
|
||||
if ((SourceSatCurrent > 0.0) && (model->BSIM3V2ijth > 0.0))
|
||||
{ here->BSIM3V2vjsm = Nvtm * log(model->BSIM3V2ijth
|
||||
/ SourceSatCurrent + 1.0);
|
||||
}
|
||||
|
||||
if ((here->BSIM3V2drainArea <= 0.0) &&
|
||||
(here->BSIM3V2drainPerimeter <= 0.0))
|
||||
{ DrainSatCurrent = 1.0e-14;
|
||||
}
|
||||
else
|
||||
{ DrainSatCurrent = here->BSIM3V2drainArea
|
||||
* model->BSIM3V2jctTempSatCurDensity
|
||||
+ here->BSIM3V2drainPerimeter
|
||||
* model->BSIM3V2jctSidewallTempSatCurDensity;
|
||||
}
|
||||
if ((DrainSatCurrent > 0.0) && (model->BSIM3V2ijth > 0.0))
|
||||
{ here->BSIM3V2vjdm = Nvtm * log(model->BSIM3V2ijth
|
||||
/ DrainSatCurrent + 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
File: b3v2trunc.c
|
||||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3v2def.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
||||
int
|
||||
BSIM3V2trunc(inModel,ckt,timeStep)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
double *timeStep;
|
||||
{
|
||||
BSIM3V2model *model = (BSIM3V2model*)inModel;
|
||||
BSIM3V2instance *here;
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->BSIM3V2nextModel)
|
||||
{ for (here = model->BSIM3V2instances; here != NULL;
|
||||
here = here->BSIM3V2nextInstance)
|
||||
{
|
||||
if (here->BSIM3V2owner != ARCHme) continue;
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
#endif /* STEPDEBUG */
|
||||
CKTterr(here->BSIM3V2qb,ckt,timeStep);
|
||||
CKTterr(here->BSIM3V2qg,ckt,timeStep);
|
||||
CKTterr(here->BSIM3V2qd,ckt,timeStep);
|
||||
#ifdef STEPDEBUG
|
||||
if(debugtemp != *timeStep)
|
||||
{ printf("device %s reduces step from %g to %g\n",
|
||||
here->BSIM3V2name,debugtemp,*timeStep);
|
||||
}
|
||||
#endif /* STEPDEBUG */
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,53 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1991 JianHui Huang and Min-Chie Jeng.
|
||||
File: bsim3v2ext.h
|
||||
**********/
|
||||
|
||||
#ifdef __STDC__
|
||||
extern int BSIM3V2acLoad(GENmodel *,CKTcircuit*);
|
||||
extern int BSIM3V2ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
|
||||
extern int BSIM3V2convTest(GENmodel *,CKTcircuit*);
|
||||
extern int BSIM3V2delete(GENmodel*,IFuid,GENinstance**);
|
||||
extern void BSIM3V2destroy(GENmodel**);
|
||||
extern int BSIM3V2getic(GENmodel*,CKTcircuit*);
|
||||
extern int BSIM3V2load(GENmodel*,CKTcircuit*);
|
||||
extern int BSIM3V2mAsk(CKTcircuit*,GENmodel *,int, IFvalue*);
|
||||
extern int BSIM3V2mDelete(GENmodel**,IFuid,GENmodel*);
|
||||
extern int BSIM3V2mParam(int,IFvalue*,GENmodel*);
|
||||
extern void BSIM3V2mosCap(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 BSIM3V2param(int,IFvalue*,GENinstance*,IFvalue*);
|
||||
extern int BSIM3V2pzLoad(GENmodel*,CKTcircuit*,SPcomplex*);
|
||||
extern int BSIM3V2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
|
||||
extern int BSIM3V2unsetup(GENmodel*,CKTcircuit*);
|
||||
extern int BSIM3V2temp(GENmodel*,CKTcircuit*);
|
||||
extern int BSIM3V2trunc(GENmodel*,CKTcircuit*,double*);
|
||||
extern int BSIM3V2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
|
||||
|
||||
#else /* stdc */
|
||||
extern int BSIM3V2acLoad();
|
||||
extern int BSIM3V2delete();
|
||||
extern void BSIM3V2destroy();
|
||||
extern int BSIM3V2getic();
|
||||
extern int BSIM3V2load();
|
||||
extern int BSIM3V2mDelete();
|
||||
extern int BSIM3V2ask();
|
||||
extern int BSIM3V2mAsk();
|
||||
extern int BSIM3V2convTest();
|
||||
extern int BSIM3V2temp();
|
||||
extern int BSIM3V2mParam();
|
||||
extern void BSIM3V2mosCap();
|
||||
extern int BSIM3V2param();
|
||||
extern int BSIM3V2pzLoad();
|
||||
extern int BSIM3V2setup();
|
||||
extern int BSIM3V2unsetup();
|
||||
extern int BSIM3V2trunc();
|
||||
extern int BSIM3V2noise();
|
||||
|
||||
#endif /* stdc */
|
||||
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
#include <config.h>
|
||||
|
||||
#include <devdefs.h>
|
||||
|
||||
#include "bsim3v2itf.h"
|
||||
#include "bsim3v2ext.h"
|
||||
#include "bsim3v2init.h"
|
||||
|
||||
|
||||
SPICEdev BSIM3V2info = {
|
||||
{ "BSIM3V2",
|
||||
"Berkeley Short Channel IGFET Model Version-3 (3v3.2)",
|
||||
|
||||
&BSIM3V2nSize,
|
||||
&BSIM3V2nSize,
|
||||
BSIM3V2names,
|
||||
|
||||
&BSIM3V2pTSize,
|
||||
BSIM3V2pTable,
|
||||
|
||||
&BSIM3V2mPTSize,
|
||||
BSIM3V2mPTable,
|
||||
|
||||
#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 : BSIM3V2param,
|
||||
DEVmodParam : BSIM3V2mParam,
|
||||
DEVload : BSIM3V2load,
|
||||
DEVsetup : BSIM3V2setup,
|
||||
DEVunsetup : BSIM3V2unsetup,
|
||||
DEVpzSetup : BSIM3V2setup,
|
||||
DEVtemperature: BSIM3V2temp,
|
||||
DEVtrunc : BSIM3V2trunc,
|
||||
DEVfindBranch : NULL,
|
||||
DEVacLoad : BSIM3V2acLoad,
|
||||
DEVaccept : NULL,
|
||||
DEVdestroy : BSIM3V2destroy,
|
||||
DEVmodDelete : BSIM3V2mDelete,
|
||||
DEVdelete : BSIM3V2delete,
|
||||
DEVsetic : BSIM3V2getic,
|
||||
DEVask : BSIM3V2ask,
|
||||
DEVmodAsk : BSIM3V2mAsk,
|
||||
DEVpzLoad : BSIM3V2pzLoad,
|
||||
DEVconvTest : BSIM3V2convTest,
|
||||
DEVsenSetup : NULL,
|
||||
DEVsenLoad : NULL,
|
||||
DEVsenUpdate : NULL,
|
||||
DEVsenAcLoad : NULL,
|
||||
DEVsenPrint : NULL,
|
||||
DEVsenTrunc : NULL,
|
||||
DEVdisto : NULL,
|
||||
DEVnoise : BSIM3V2noise,
|
||||
|
||||
DEVinstSize : &BSIM3V2iSize,
|
||||
DEVmodSize : &BSIM3V2mSize
|
||||
|
||||
};
|
||||
|
||||
|
||||
SPICEdev *
|
||||
get_bsim3v2_info(void)
|
||||
{
|
||||
return &BSIM3V2info;
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
#ifndef _BSIM3V2INIT_H
|
||||
#define _BSIM3V2INIT_H
|
||||
|
||||
extern IFparm BSIM3V2pTable[ ];
|
||||
extern IFparm BSIM3V2mPTable[ ];
|
||||
extern char *BSIM3V2names[ ];
|
||||
extern int BSIM3V2pTSize;
|
||||
extern int BSIM3V2mPTSize;
|
||||
extern int BSIM3V2nSize;
|
||||
extern int BSIM3V2iSize;
|
||||
extern int BSIM3V2mSize;
|
||||
|
||||
#endif
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
/**********
|
||||
Copyright 1990 Regents of the University of California. All rights reserved.
|
||||
Author: 1991 JianHui Huang and Min-Chie Jeng.
|
||||
File: bsim3v2itf.h
|
||||
**********/
|
||||
#ifndef DEV_BSIM3V2
|
||||
#define DEV_BSIM3V2
|
||||
|
||||
SPICEdev *get_bsim3v2_info(void);
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue