85 changed files with 62428 additions and 62 deletions
-
3configure.in
-
3src/Makefile.am
-
6src/spicelib/devices/Makefile.am
-
33src/spicelib/devices/bsim4v2/B4TERMS_OF_USE
-
35src/spicelib/devices/bsim4v2/Makefile.am
-
744src/spicelib/devices/bsim4v2/b4v2.c
-
670src/spicelib/devices/bsim4v2/b4v2acld.c
-
300src/spicelib/devices/bsim4v2/b4v2ask.c
-
564src/spicelib/devices/bsim4v2/b4v2check.c
-
201src/spicelib/devices/bsim4v2/b4v2cvtest.c
-
41src/spicelib/devices/bsim4v2/b4v2del.c
-
38src/spicelib/devices/bsim4v2/b4v2dest.c
-
382src/spicelib/devices/bsim4v2/b4v2geo.c
-
44src/spicelib/devices/bsim4v2/b4v2getic.c
-
4492src/spicelib/devices/bsim4v2/b4v2ld.c
-
1877src/spicelib/devices/bsim4v2/b4v2mask.c
-
47src/spicelib/devices/bsim4v2/b4v2mdel.c
-
2532src/spicelib/devices/bsim4v2/b4v2mpar.c
-
474src/spicelib/devices/bsim4v2/b4v2noi.c
-
150src/spicelib/devices/bsim4v2/b4v2par.c
-
756src/spicelib/devices/bsim4v2/b4v2pzld.c
-
1679src/spicelib/devices/bsim4v2/b4v2set.c
-
1497src/spicelib/devices/bsim4v2/b4v2temp.c
-
60src/spicelib/devices/bsim4v2/b4v2trunc.c
-
2663src/spicelib/devices/bsim4v2/bsim4v2def.h
-
54src/spicelib/devices/bsim4v2/bsim4v2ext.h
-
64src/spicelib/devices/bsim4v2/bsim4v2init.c
-
13src/spicelib/devices/bsim4v2/bsim4v2init.h
-
13src/spicelib/devices/bsim4v2/bsim4v2itf.h
-
33src/spicelib/devices/bsim4v3/B4TERMS_OF_USE
-
35src/spicelib/devices/bsim4v3/Makefile.am
-
786src/spicelib/devices/bsim4v3/b4v3.c
-
668src/spicelib/devices/bsim4v3/b4v3acld.c
-
309src/spicelib/devices/bsim4v3/b4v3ask.c
-
663src/spicelib/devices/bsim4v3/b4v3check.c
-
201src/spicelib/devices/bsim4v3/b4v3cvtest.c
-
41src/spicelib/devices/bsim4v3/b4v3del.c
-
38src/spicelib/devices/bsim4v3/b4v3dest.c
-
382src/spicelib/devices/bsim4v3/b4v3geo.c
-
44src/spicelib/devices/bsim4v3/b4v3getic.c
-
4612src/spicelib/devices/bsim4v3/b4v3ld.c
-
1967src/spicelib/devices/bsim4v3/b4v3mask.c
-
46src/spicelib/devices/bsim4v3/b4v3mdel.c
-
2682src/spicelib/devices/bsim4v3/b4v3mpar.c
-
486src/spicelib/devices/bsim4v3/b4v3noi.c
-
165src/spicelib/devices/bsim4v3/b4v3par.c
-
755src/spicelib/devices/bsim4v3/b4v3pzld.c
-
1763src/spicelib/devices/bsim4v3/b4v3set.c
-
1646src/spicelib/devices/bsim4v3/b4v3temp.c
-
60src/spicelib/devices/bsim4v3/b4v3trunc.c
-
2816src/spicelib/devices/bsim4v3/bsim4v3def.h
-
54src/spicelib/devices/bsim4v3/bsim4v3ext.h
-
80src/spicelib/devices/bsim4v3/bsim4v3init.c
-
13src/spicelib/devices/bsim4v3/bsim4v3init.h
-
13src/spicelib/devices/bsim4v3/bsim4v3itf.h
-
33src/spicelib/devices/bsim4v5/B4TERMS_OF_USE
-
35src/spicelib/devices/bsim4v5/Makefile.am
-
913src/spicelib/devices/bsim4v5/b4v5.c
-
672src/spicelib/devices/bsim4v5/b4v5acld.c
-
355src/spicelib/devices/bsim4v5/b4v5ask.c
-
816src/spicelib/devices/bsim4v5/b4v5check.c
-
199src/spicelib/devices/bsim4v5/b4v5cvtest.c
-
41src/spicelib/devices/bsim4v5/b4v5del.c
-
38src/spicelib/devices/bsim4v5/b4v5dest.c
-
385src/spicelib/devices/bsim4v5/b4v5geo.c
-
44src/spicelib/devices/bsim4v5/b4v5getic.c
-
4783src/spicelib/devices/bsim4v5/b4v5ld.c
-
2269src/spicelib/devices/bsim4v5/b4v5mask.c
-
46src/spicelib/devices/bsim4v5/b4v5mdel.c
-
3093src/spicelib/devices/bsim4v5/b4v5mpar.c
-
541src/spicelib/devices/bsim4v5/b4v5noi.c
-
198src/spicelib/devices/bsim4v5/b4v5par.c
-
758src/spicelib/devices/bsim4v5/b4v5pzld.c
-
2084src/spicelib/devices/bsim4v5/b4v5set.c
-
1834src/spicelib/devices/bsim4v5/b4v5temp.c
-
59src/spicelib/devices/bsim4v5/b4v5trunc.c
-
3193src/spicelib/devices/bsim4v5/bsim4v5def.h
-
54src/spicelib/devices/bsim4v5/bsim4v5ext.h
-
83src/spicelib/devices/bsim4v5/bsim4v5init.c
-
13src/spicelib/devices/bsim4v5/bsim4v5init.h
-
13src/spicelib/devices/bsim4v5/bsim4v5itf.h
-
128src/spicelib/devices/dev.c
-
3src/spicelib/parser/inp2m.c
-
11src/spicelib/parser/inpdomod.c
-
3src/spicelib/parser/inpgmod.c
@ -0,0 +1,33 @@ |
|||
|
|||
The terms under which the software is provided are as the following. |
|||
|
|||
Software is distributed as is, completely without warranty or service |
|||
support. The University of California and its employees are not liable |
|||
for the condition or performance of the software. |
|||
|
|||
The University owns the copyright but shall not be liable for any |
|||
infringement of copyright or other proprietary rights brought by third |
|||
parties against the users of the software. |
|||
|
|||
The University of California hereby disclaims all implied warranties. |
|||
|
|||
The University of California grants the users the right to modify, copy, |
|||
and redistribute the software and documentation, both within the user's |
|||
organization and externally, subject to the following restrictions: |
|||
|
|||
1. The users agree not to charge for the University of California code |
|||
itself but may charge for additions, extensions, or support. |
|||
|
|||
2. In any product based on the software, the users agree to acknowledge |
|||
the UC Berkeley BSIM Research Group that developed the software. This |
|||
acknowledgment shall appear in the product documentation. |
|||
|
|||
3. The users agree to obey all U.S. Government restrictions governing |
|||
redistribution or export of the software. |
|||
|
|||
4. The users agree to reproduce any copyright notice which appears on |
|||
the software on any copy or modification of such made available |
|||
to others. |
|||
|
|||
Chenming Hu, and Weidong Liu |
|||
Oct. 2000 |
|||
@ -0,0 +1,35 @@ |
|||
## Process this file with automake to produce Makefile.in
|
|||
|
|||
noinst_LIBRARIES = libbsim4v2.a |
|||
|
|||
libbsim4v2_a_SOURCES = \
|
|||
b4v2.c \
|
|||
b4v2acld.c \
|
|||
b4v2ask.c \
|
|||
b4v2check.c \
|
|||
b4v2cvtest.c \
|
|||
b4v2del.c \
|
|||
b4v2dest.c \
|
|||
b4v2geo.c \
|
|||
b4v2getic.c \
|
|||
b4v2ld.c \
|
|||
b4v2mask.c \
|
|||
b4v2mdel.c \
|
|||
b4v2mpar.c \
|
|||
b4v2noi.c \
|
|||
b4v2par.c \
|
|||
b4v2pzld.c \
|
|||
b4v2set.c \
|
|||
b4v2temp.c \
|
|||
b4v2trunc.c \
|
|||
bsim4v2def.h \
|
|||
bsim4v2ext.h \
|
|||
bsim4v2init.c \
|
|||
bsim4v2init.h \
|
|||
bsim4v2itf.h |
|||
|
|||
|
|||
|
|||
INCLUDES = -I$(top_srcdir)/src/include |
|||
|
|||
MAINTAINERCLEANFILES = Makefile.in |
|||
@ -0,0 +1,744 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "devdefs.h" |
|||
#include "bsim4v2def.h" |
|||
#include "suffix.h" |
|||
|
|||
IFparm BSIM4v2pTable[] = { /* parameters */ |
|||
IOP( "l", BSIM4v2_L, IF_REAL , "Length"), |
|||
IOP( "w", BSIM4v2_W, IF_REAL , "Width"), |
|||
IOP( "nf", BSIM4v2_NF, IF_REAL , "Number of fingers"), |
|||
IOP( "min", BSIM4v2_MIN, IF_INTEGER , "Minimize either D or S"), |
|||
IOP( "ad", BSIM4v2_AD, IF_REAL , "Drain area"), |
|||
IOP( "as", BSIM4v2_AS, IF_REAL , "Source area"), |
|||
IOP( "pd", BSIM4v2_PD, IF_REAL , "Drain perimeter"), |
|||
IOP( "ps", BSIM4v2_PS, IF_REAL , "Source perimeter"), |
|||
IOP( "nrd", BSIM4v2_NRD, IF_REAL , "Number of squares in drain"), |
|||
IOP( "nrs", BSIM4v2_NRS, IF_REAL , "Number of squares in source"), |
|||
IOP( "off", BSIM4v2_OFF, IF_FLAG , "Device is initially off"), |
|||
IOP( "rbdb", BSIM4v2_RBDB, IF_REAL , "Body resistance"), |
|||
IOP( "rbsb", BSIM4v2_RBSB, IF_REAL , "Body resistance"), |
|||
IOP( "rbpb", BSIM4v2_RBPB, IF_REAL , "Body resistance"), |
|||
IOP( "rbps", BSIM4v2_RBPS, IF_REAL , "Body resistance"), |
|||
IOP( "rbpd", BSIM4v2_RBPD, IF_REAL , "Body resistance"), |
|||
|
|||
IOP( "trnqsmod", BSIM4v2_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), |
|||
IOP( "acnqsmod", BSIM4v2_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), |
|||
IOP( "rbodymod", BSIM4v2_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), |
|||
IOP( "rgatemod", BSIM4v2_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), |
|||
IOP( "geomod", BSIM4v2_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), |
|||
IOP( "rgeomod", BSIM4v2_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), |
|||
IP( "ic", BSIM4v2_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), |
|||
OP( "gmbs", BSIM4v2_GMBS, IF_REAL, "Gmb"), |
|||
OP( "gm", BSIM4v2_GM, IF_REAL, "Gm"), |
|||
OP( "gds", BSIM4v2_GDS, IF_REAL, "Gds"), |
|||
OP( "vdsat", BSIM4v2_VDSAT, IF_REAL, "Vdsat"), |
|||
OP( "vth", BSIM4v2_VON, IF_REAL, "Vth"), |
|||
OP( "id", BSIM4v2_CD, IF_REAL, "Ids"), |
|||
OP( "ibd", BSIM4v2_CBD, IF_REAL, "Ibd"), |
|||
OP( "ibs", BSIM4v2_CBS, IF_REAL, "Ibs"), |
|||
OP( "isub", BSIM4v2_CSUB, IF_REAL, "Isub"), |
|||
OP( "igidl", BSIM4v2_IGIDL, IF_REAL, "Igidl"), |
|||
OP( "igisl", BSIM4v2_IGISL, IF_REAL, "Igisl"), |
|||
OP( "igs", BSIM4v2_IGS, IF_REAL, "Igs"), |
|||
OP( "igd", BSIM4v2_IGD, IF_REAL, "Igd"), |
|||
OP( "igb", BSIM4v2_IGB, IF_REAL, "Igb"), |
|||
OP( "igcs", BSIM4v2_IGCS, IF_REAL, "Igcs"), |
|||
OP( "igcd", BSIM4v2_IGCD, IF_REAL, "Igcd"), |
|||
OP( "vbs", BSIM4v2_VBS, IF_REAL, "Vbs"), |
|||
OP( "vgs", BSIM4v2_VGS, IF_REAL, "Vgs"), |
|||
OP( "vds", BSIM4v2_VDS, IF_REAL, "Vds"), |
|||
OP( "cgg", BSIM4v2_CGGB, IF_REAL, "Cggb"), |
|||
OP( "cgs", BSIM4v2_CGSB, IF_REAL, "Cgsb"), |
|||
OP( "cgd", BSIM4v2_CGDB, IF_REAL, "Cgdb"), |
|||
OP( "cbg", BSIM4v2_CBGB, IF_REAL, "Cbgb"), |
|||
OP( "cbd", BSIM4v2_CBDB, IF_REAL, "Cbdb"), |
|||
OP( "cbs", BSIM4v2_CBSB, IF_REAL, "Cbsb"), |
|||
OP( "cdg", BSIM4v2_CDGB, IF_REAL, "Cdgb"), |
|||
OP( "cdd", BSIM4v2_CDDB, IF_REAL, "Cddb"), |
|||
OP( "cds", BSIM4v2_CDSB, IF_REAL, "Cdsb"), |
|||
OP( "csg", BSIM4v2_CSGB, IF_REAL, "Csgb"), |
|||
OP( "csd", BSIM4v2_CSDB, IF_REAL, "Csdb"), |
|||
OP( "css", BSIM4v2_CSSB, IF_REAL, "Cssb"), |
|||
OP( "cgb", BSIM4v2_CGBB, IF_REAL, "Cgbb"), |
|||
OP( "cdb", BSIM4v2_CDBB, IF_REAL, "Cdbb"), |
|||
OP( "csb", BSIM4v2_CSBB, IF_REAL, "Csbb"), |
|||
OP( "cbb", BSIM4v2_CBBB, IF_REAL, "Cbbb"), |
|||
OP( "capbd", BSIM4v2_CAPBD, IF_REAL, "Capbd"), |
|||
OP( "capbs", BSIM4v2_CAPBS, IF_REAL, "Capbs"), |
|||
OP( "qg", BSIM4v2_QG, IF_REAL, "Qgate"), |
|||
OP( "qb", BSIM4v2_QB, IF_REAL, "Qbulk"), |
|||
OP( "qd", BSIM4v2_QD, IF_REAL, "Qdrain"), |
|||
OP( "qs", BSIM4v2_QS, IF_REAL, "Qsource"), |
|||
OP( "qinv", BSIM4v2_QINV, IF_REAL, "Qinversion"), |
|||
}; |
|||
|
|||
IFparm BSIM4v2mPTable[] = { /* model parameters */ |
|||
IOP( "capmod", BSIM4v2_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), |
|||
IOP( "diomod", BSIM4v2_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), |
|||
IOP( "rdsmod", BSIM4v2_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), |
|||
IOP( "trnqsmod", BSIM4v2_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), |
|||
IOP( "acnqsmod", BSIM4v2_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), |
|||
IOP( "mobmod", BSIM4v2_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), |
|||
IOP( "rbodymod", BSIM4v2_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), |
|||
IOP( "rgatemod", BSIM4v2_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), |
|||
IOP( "permod", BSIM4v2_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), |
|||
IOP( "geomod", BSIM4v2_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), |
|||
IOP( "fnoimod", BSIM4v2_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), |
|||
IOP( "tnoimod", BSIM4v2_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), |
|||
IOP( "igcmod", BSIM4v2_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), |
|||
IOP( "igbmod", BSIM4v2_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), |
|||
IOP( "paramchk", BSIM4v2_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), |
|||
IOP( "binunit", BSIM4v2_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), |
|||
IOP( "version", BSIM4v2_MOD_VERSION, IF_STRING, "parameter for model version"), |
|||
IOP( "toxe", BSIM4v2_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), |
|||
IOP( "toxp", BSIM4v2_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), |
|||
IOP( "toxm", BSIM4v2_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), |
|||
IOP( "toxref", BSIM4v2_MOD_TOXREF, IF_REAL, "Target tox value"), |
|||
IOP( "dtox", BSIM4v2_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), |
|||
IOP( "epsrox", BSIM4v2_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), |
|||
IOP( "cdsc", BSIM4v2_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), |
|||
IOP( "cdscb", BSIM4v2_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), |
|||
IOP( "cdscd", BSIM4v2_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), |
|||
IOP( "cit", BSIM4v2_MOD_CIT, IF_REAL, "Interface state capacitance"), |
|||
IOP( "nfactor", BSIM4v2_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), |
|||
IOP( "xj", BSIM4v2_MOD_XJ, IF_REAL, "Junction depth in meters"), |
|||
IOP( "vsat", BSIM4v2_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), |
|||
IOP( "at", BSIM4v2_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), |
|||
IOP( "a0", BSIM4v2_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), |
|||
IOP( "ags", BSIM4v2_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), |
|||
IOP( "a1", BSIM4v2_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), |
|||
IOP( "a2", BSIM4v2_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), |
|||
IOP( "keta", BSIM4v2_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), |
|||
IOP( "nsub", BSIM4v2_MOD_NSUB, IF_REAL, "Substrate doping concentration"), |
|||
IOP( "ndep", BSIM4v2_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), |
|||
IOP( "nsd", BSIM4v2_MOD_NSD, IF_REAL, "S/D doping concentration"), |
|||
IOP( "phin", BSIM4v2_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), |
|||
IOP( "ngate", BSIM4v2_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), |
|||
IOP( "gamma1", BSIM4v2_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), |
|||
IOP( "gamma2", BSIM4v2_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), |
|||
IOP( "vbx", BSIM4v2_MOD_VBX, IF_REAL, "Vth transition body Voltage"), |
|||
IOP( "vbm", BSIM4v2_MOD_VBM, IF_REAL, "Maximum body voltage"), |
|||
|
|||
IOP( "xt", BSIM4v2_MOD_XT, IF_REAL, "Doping depth"), |
|||
IOP( "k1", BSIM4v2_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), |
|||
IOP( "kt1", BSIM4v2_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), |
|||
IOP( "kt1l", BSIM4v2_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), |
|||
IOP( "kt2", BSIM4v2_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), |
|||
IOP( "k2", BSIM4v2_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), |
|||
IOP( "k3", BSIM4v2_MOD_K3, IF_REAL, "Narrow width effect coefficient"), |
|||
IOP( "k3b", BSIM4v2_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), |
|||
IOP( "w0", BSIM4v2_MOD_W0, IF_REAL, "Narrow width effect parameter"), |
|||
IOP( "dvtp0", BSIM4v2_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), |
|||
IOP( "dvtp1", BSIM4v2_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), |
|||
IOP( "lpe0", BSIM4v2_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), |
|||
IOP( "lpeb", BSIM4v2_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), |
|||
IOP( "dvt0", BSIM4v2_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), |
|||
IOP( "dvt1", BSIM4v2_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), |
|||
IOP( "dvt2", BSIM4v2_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), |
|||
IOP( "dvt0w", BSIM4v2_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), |
|||
IOP( "dvt1w", BSIM4v2_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), |
|||
IOP( "dvt2w", BSIM4v2_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), |
|||
IOP( "drout", BSIM4v2_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), |
|||
IOP( "dsub", BSIM4v2_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), |
|||
IOP( "vth0", BSIM4v2_MOD_VTH0, IF_REAL,"Threshold voltage"), |
|||
IOP( "vtho", BSIM4v2_MOD_VTH0, IF_REAL,"Threshold voltage"), |
|||
IOP( "ua", BSIM4v2_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), |
|||
IOP( "ua1", BSIM4v2_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), |
|||
IOP( "ub", BSIM4v2_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), |
|||
IOP( "ub1", BSIM4v2_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), |
|||
IOP( "uc", BSIM4v2_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), |
|||
IOP( "uc1", BSIM4v2_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), |
|||
IOP( "u0", BSIM4v2_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), |
|||
IOP( "eu", BSIM4v2_MOD_EU, IF_REAL, "Mobility exponent"), |
|||
IOP( "ute", BSIM4v2_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), |
|||
IOP( "voff", BSIM4v2_MOD_VOFF, IF_REAL, "Threshold voltage offset"), |
|||
IOP( "minv", BSIM4v2_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"), |
|||
IOP( "voffl", BSIM4v2_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), |
|||
IOP( "tnom", BSIM4v2_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), |
|||
IOP( "cgso", BSIM4v2_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), |
|||
IOP( "cgdo", BSIM4v2_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), |
|||
IOP( "cgbo", BSIM4v2_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), |
|||
IOP( "xpart", BSIM4v2_MOD_XPART, IF_REAL, "Channel charge partitioning"), |
|||
IOP( "delta", BSIM4v2_MOD_DELTA, IF_REAL, "Effective Vds parameter"), |
|||
IOP( "rsh", BSIM4v2_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), |
|||
IOP( "rdsw", BSIM4v2_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), |
|||
IOP( "rdswmin", BSIM4v2_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), |
|||
IOP( "rsw", BSIM4v2_MOD_RSW, IF_REAL, "Source resistance per width"), |
|||
IOP( "rdw", BSIM4v2_MOD_RDW, IF_REAL, "Drain resistance per width"), |
|||
IOP( "rdwmin", BSIM4v2_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), |
|||
IOP( "rswmin", BSIM4v2_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), |
|||
|
|||
IOP( "prwg", BSIM4v2_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), |
|||
IOP( "prwb", BSIM4v2_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), |
|||
|
|||
IOP( "prt", BSIM4v2_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), |
|||
IOP( "eta0", BSIM4v2_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), |
|||
IOP( "etab", BSIM4v2_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), |
|||
IOP( "pclm", BSIM4v2_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), |
|||
IOP( "pdiblc1", BSIM4v2_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), |
|||
IOP( "pdiblc2", BSIM4v2_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), |
|||
IOP( "pdiblcb", BSIM4v2_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), |
|||
IOP( "fprout", BSIM4v2_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), |
|||
IOP( "pdits", BSIM4v2_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), |
|||
IOP( "pditsl", BSIM4v2_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), |
|||
IOP( "pditsd", BSIM4v2_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), |
|||
IOP( "pscbe1", BSIM4v2_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), |
|||
IOP( "pscbe2", BSIM4v2_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), |
|||
IOP( "pvag", BSIM4v2_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), |
|||
|
|||
IOP( "jss", BSIM4v2_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), |
|||
IOP( "jsws", BSIM4v2_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), |
|||
IOP( "jswgs", BSIM4v2_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), |
|||
IOP( "pbs", BSIM4v2_MOD_PBS, IF_REAL, "Source junction built-in potential"), |
|||
IOP( "njs", BSIM4v2_MOD_NJS, IF_REAL, "Source junction emission coefficient"), |
|||
IOP( "xtis", BSIM4v2_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), |
|||
IOP( "mjs", BSIM4v2_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), |
|||
IOP( "pbsws", BSIM4v2_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), |
|||
IOP( "mjsws", BSIM4v2_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), |
|||
IOP( "pbswgs", BSIM4v2_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), |
|||
IOP( "mjswgs", BSIM4v2_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), |
|||
IOP( "cjs", BSIM4v2_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), |
|||
IOP( "cjsws", BSIM4v2_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), |
|||
IOP( "cjswgs", BSIM4v2_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), |
|||
|
|||
IOP( "jsd", BSIM4v2_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), |
|||
IOP( "jswd", BSIM4v2_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), |
|||
IOP( "jswgd", BSIM4v2_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), |
|||
IOP( "pbd", BSIM4v2_MOD_PBD, IF_REAL, "Drain junction built-in potential"), |
|||
IOP( "njd", BSIM4v2_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), |
|||
IOP( "xtid", BSIM4v2_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), |
|||
IOP( "mjd", BSIM4v2_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), |
|||
IOP( "pbswd", BSIM4v2_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), |
|||
IOP( "mjswd", BSIM4v2_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), |
|||
IOP( "pbswgd", BSIM4v2_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), |
|||
IOP( "mjswgd", BSIM4v2_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), |
|||
IOP( "cjd", BSIM4v2_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), |
|||
IOP( "cjswd", BSIM4v2_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), |
|||
IOP( "cjswgd", BSIM4v2_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), |
|||
|
|||
IOP( "vfbcv", BSIM4v2_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), |
|||
IOP( "vfb", BSIM4v2_MOD_VFB, IF_REAL, "Flat Band Voltage"), |
|||
IOP( "tpb", BSIM4v2_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), |
|||
IOP( "tcj", BSIM4v2_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), |
|||
IOP( "tpbsw", BSIM4v2_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), |
|||
IOP( "tcjsw", BSIM4v2_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), |
|||
IOP( "tpbswg", BSIM4v2_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), |
|||
IOP( "tcjswg", BSIM4v2_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), |
|||
IOP( "acde", BSIM4v2_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), |
|||
IOP( "moin", BSIM4v2_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), |
|||
IOP( "noff", BSIM4v2_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), |
|||
IOP( "voffcv", BSIM4v2_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), |
|||
IOP( "dmcg", BSIM4v2_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), |
|||
IOP( "dmci", BSIM4v2_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), |
|||
IOP( "dmdg", BSIM4v2_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), |
|||
IOP( "dmcgt", BSIM4v2_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), |
|||
IOP( "xgw", BSIM4v2_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), |
|||
IOP( "xgl", BSIM4v2_MOD_XGL, IF_REAL, "Variation in Ldrawn"), |
|||
IOP( "rshg", BSIM4v2_MOD_RSHG, IF_REAL, "Gate sheet resistance"), |
|||
IOP( "ngcon", BSIM4v2_MOD_NGCON, IF_REAL, "Number of gate contacts"), |
|||
IOP( "xrcrg1", BSIM4v2_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), |
|||
IOP( "xrcrg2", BSIM4v2_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), |
|||
IOP( "lint", BSIM4v2_MOD_LINT, IF_REAL, "Length reduction parameter"), |
|||
IOP( "ll", BSIM4v2_MOD_LL, IF_REAL, "Length reduction parameter"), |
|||
IOP( "llc", BSIM4v2_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lln", BSIM4v2_MOD_LLN, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lw", BSIM4v2_MOD_LW, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwc", BSIM4v2_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lwn", BSIM4v2_MOD_LWN, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwl", BSIM4v2_MOD_LWL, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwlc", BSIM4v2_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lmin", BSIM4v2_MOD_LMIN, IF_REAL, "Minimum length for the model"), |
|||
IOP( "lmax", BSIM4v2_MOD_LMAX, IF_REAL, "Maximum length for the model"), |
|||
|
|||
IOP( "wr", BSIM4v2_MOD_WR, IF_REAL, "Width dependence of rds"), |
|||
IOP( "wint", BSIM4v2_MOD_WINT, IF_REAL, "Width reduction parameter"), |
|||
IOP( "dwg", BSIM4v2_MOD_DWG, IF_REAL, "Width reduction parameter"), |
|||
IOP( "dwb", BSIM4v2_MOD_DWB, IF_REAL, "Width reduction parameter"), |
|||
|
|||
IOP( "wl", BSIM4v2_MOD_WL, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wlc", BSIM4v2_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wln", BSIM4v2_MOD_WLN, IF_REAL, "Width reduction parameter"), |
|||
IOP( "ww", BSIM4v2_MOD_WW, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwc", BSIM4v2_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wwn", BSIM4v2_MOD_WWN, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwl", BSIM4v2_MOD_WWL, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwlc", BSIM4v2_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wmin", BSIM4v2_MOD_WMIN, IF_REAL, "Minimum width for the model"), |
|||
IOP( "wmax", BSIM4v2_MOD_WMAX, IF_REAL, "Maximum width for the model"), |
|||
|
|||
IOP( "b0", BSIM4v2_MOD_B0, IF_REAL, "Abulk narrow width parameter"), |
|||
IOP( "b1", BSIM4v2_MOD_B1, IF_REAL, "Abulk narrow width parameter"), |
|||
|
|||
IOP( "cgsl", BSIM4v2_MOD_CGSL, IF_REAL, "New C-V model parameter"), |
|||
IOP( "cgdl", BSIM4v2_MOD_CGDL, IF_REAL, "New C-V model parameter"), |
|||
IOP( "ckappas", BSIM4v2_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), |
|||
IOP( "ckappad", BSIM4v2_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), |
|||
IOP( "cf", BSIM4v2_MOD_CF, IF_REAL, "Fringe capacitance parameter"), |
|||
IOP( "clc", BSIM4v2_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), |
|||
IOP( "cle", BSIM4v2_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), |
|||
IOP( "dwc", BSIM4v2_MOD_DWC, IF_REAL, "Delta W for C-V model"), |
|||
IOP( "dlc", BSIM4v2_MOD_DLC, IF_REAL, "Delta L for C-V model"), |
|||
IOP( "xw", BSIM4v2_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), |
|||
IOP( "xl", BSIM4v2_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), |
|||
IOP( "dlcig", BSIM4v2_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), |
|||
IOP( "dwj", BSIM4v2_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), |
|||
|
|||
IOP( "alpha0", BSIM4v2_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), |
|||
IOP( "alpha1", BSIM4v2_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), |
|||
IOP( "beta0", BSIM4v2_MOD_BETA0, IF_REAL, "substrate current model parameter"), |
|||
IOP( "agidl", BSIM4v2_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), |
|||
IOP( "bgidl", BSIM4v2_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), |
|||
IOP( "cgidl", BSIM4v2_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), |
|||
IOP( "egidl", BSIM4v2_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), |
|||
IOP( "aigc", BSIM4v2_MOD_AIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "bigc", BSIM4v2_MOD_BIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "cigc", BSIM4v2_MOD_CIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "aigsd", BSIM4v2_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "bigsd", BSIM4v2_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "cigsd", BSIM4v2_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "aigbacc", BSIM4v2_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "bigbacc", BSIM4v2_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "cigbacc", BSIM4v2_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "aigbinv", BSIM4v2_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "bigbinv", BSIM4v2_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "cigbinv", BSIM4v2_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "nigc", BSIM4v2_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), |
|||
IOP( "nigbinv", BSIM4v2_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), |
|||
IOP( "nigbacc", BSIM4v2_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), |
|||
IOP( "ntox", BSIM4v2_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), |
|||
IOP( "eigbinv", BSIM4v2_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), |
|||
IOP( "pigcd", BSIM4v2_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), |
|||
IOP( "poxedge", BSIM4v2_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), |
|||
|
|||
IOP( "ijthdfwd", BSIM4v2_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), |
|||
IOP( "ijthsfwd", BSIM4v2_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), |
|||
IOP( "ijthdrev", BSIM4v2_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), |
|||
IOP( "ijthsrev", BSIM4v2_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), |
|||
IOP( "xjbvd", BSIM4v2_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), |
|||
IOP( "xjbvs", BSIM4v2_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), |
|||
IOP( "bvd", BSIM4v2_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), |
|||
IOP( "bvs", BSIM4v2_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), |
|||
|
|||
IOP( "gbmin", BSIM4v2_MOD_GBMIN, IF_REAL, "Minimum body conductance"), |
|||
IOP( "rbdb", BSIM4v2_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), |
|||
IOP( "rbpb", BSIM4v2_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), |
|||
IOP( "rbsb", BSIM4v2_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), |
|||
IOP( "rbps", BSIM4v2_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), |
|||
IOP( "rbpd", BSIM4v2_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), |
|||
|
|||
IOP( "lcdsc", BSIM4v2_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), |
|||
IOP( "lcdscb", BSIM4v2_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), |
|||
IOP( "lcdscd", BSIM4v2_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), |
|||
IOP( "lcit", BSIM4v2_MOD_LCIT, IF_REAL, "Length dependence of cit"), |
|||
IOP( "lnfactor", BSIM4v2_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), |
|||
IOP( "lxj", BSIM4v2_MOD_LXJ, IF_REAL, "Length dependence of xj"), |
|||
IOP( "lvsat", BSIM4v2_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), |
|||
IOP( "lat", BSIM4v2_MOD_LAT, IF_REAL, "Length dependence of at"), |
|||
IOP( "la0", BSIM4v2_MOD_LA0, IF_REAL, "Length dependence of a0"), |
|||
IOP( "lags", BSIM4v2_MOD_LAGS, IF_REAL, "Length dependence of ags"), |
|||
IOP( "la1", BSIM4v2_MOD_LA1, IF_REAL, "Length dependence of a1"), |
|||
IOP( "la2", BSIM4v2_MOD_LA2, IF_REAL, "Length dependence of a2"), |
|||
IOP( "lketa", BSIM4v2_MOD_LKETA, IF_REAL, "Length dependence of keta"), |
|||
IOP( "lnsub", BSIM4v2_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), |
|||
IOP( "lndep", BSIM4v2_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), |
|||
IOP( "lnsd", BSIM4v2_MOD_LNSD, IF_REAL, "Length dependence of nsd"), |
|||
IOP( "lphin", BSIM4v2_MOD_LPHIN, IF_REAL, "Length dependence of phin"), |
|||
IOP( "lngate", BSIM4v2_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), |
|||
IOP( "lgamma1", BSIM4v2_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), |
|||
IOP( "lgamma2", BSIM4v2_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), |
|||
IOP( "lvbx", BSIM4v2_MOD_LVBX, IF_REAL, "Length dependence of vbx"), |
|||
IOP( "lvbm", BSIM4v2_MOD_LVBM, IF_REAL, "Length dependence of vbm"), |
|||
IOP( "lxt", BSIM4v2_MOD_LXT, IF_REAL, "Length dependence of xt"), |
|||
IOP( "lk1", BSIM4v2_MOD_LK1, IF_REAL, "Length dependence of k1"), |
|||
IOP( "lkt1", BSIM4v2_MOD_LKT1, IF_REAL, "Length dependence of kt1"), |
|||
IOP( "lkt1l", BSIM4v2_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), |
|||
IOP( "lkt2", BSIM4v2_MOD_LKT2, IF_REAL, "Length dependence of kt2"), |
|||
IOP( "lk2", BSIM4v2_MOD_LK2, IF_REAL, "Length dependence of k2"), |
|||
IOP( "lk3", BSIM4v2_MOD_LK3, IF_REAL, "Length dependence of k3"), |
|||
IOP( "lk3b", BSIM4v2_MOD_LK3B, IF_REAL, "Length dependence of k3b"), |
|||
IOP( "lw0", BSIM4v2_MOD_LW0, IF_REAL, "Length dependence of w0"), |
|||
IOP( "ldvtp0", BSIM4v2_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), |
|||
IOP( "ldvtp1", BSIM4v2_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), |
|||
IOP( "llpe0", BSIM4v2_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), |
|||
IOP( "llpeb", BSIM4v2_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), |
|||
IOP( "ldvt0", BSIM4v2_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), |
|||
IOP( "ldvt1", BSIM4v2_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), |
|||
IOP( "ldvt2", BSIM4v2_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), |
|||
IOP( "ldvt0w", BSIM4v2_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), |
|||
IOP( "ldvt1w", BSIM4v2_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), |
|||
IOP( "ldvt2w", BSIM4v2_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), |
|||
IOP( "ldrout", BSIM4v2_MOD_LDROUT, IF_REAL, "Length dependence of drout"), |
|||
IOP( "ldsub", BSIM4v2_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), |
|||
IOP( "lvth0", BSIM4v2_MOD_LVTH0, IF_REAL,"Length dependence of vto"), |
|||
IOP( "lvtho", BSIM4v2_MOD_LVTH0, IF_REAL,"Length dependence of vto"), |
|||
IOP( "lua", BSIM4v2_MOD_LUA, IF_REAL, "Length dependence of ua"), |
|||
IOP( "lua1", BSIM4v2_MOD_LUA1, IF_REAL, "Length dependence of ua1"), |
|||
IOP( "lub", BSIM4v2_MOD_LUB, IF_REAL, "Length dependence of ub"), |
|||
IOP( "lub1", BSIM4v2_MOD_LUB1, IF_REAL, "Length dependence of ub1"), |
|||
IOP( "luc", BSIM4v2_MOD_LUC, IF_REAL, "Length dependence of uc"), |
|||
IOP( "luc1", BSIM4v2_MOD_LUC1, IF_REAL, "Length dependence of uc1"), |
|||
IOP( "lu0", BSIM4v2_MOD_LU0, IF_REAL, "Length dependence of u0"), |
|||
IOP( "lute", BSIM4v2_MOD_LUTE, IF_REAL, "Length dependence of ute"), |
|||
IOP( "lvoff", BSIM4v2_MOD_LVOFF, IF_REAL, "Length dependence of voff"), |
|||
IOP( "lminv", BSIM4v2_MOD_LMINV, IF_REAL, "Length dependence of minv"), |
|||
IOP( "ldelta", BSIM4v2_MOD_LDELTA, IF_REAL, "Length dependence of delta"), |
|||
IOP( "lrdsw", BSIM4v2_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), |
|||
IOP( "lrsw", BSIM4v2_MOD_LRSW, IF_REAL, "Length dependence of rsw"), |
|||
IOP( "lrdw", BSIM4v2_MOD_LRDW, IF_REAL, "Length dependence of rdw"), |
|||
|
|||
IOP( "lprwg", BSIM4v2_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), |
|||
IOP( "lprwb", BSIM4v2_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), |
|||
|
|||
IOP( "lprt", BSIM4v2_MOD_LPRT, IF_REAL, "Length dependence of prt "), |
|||
IOP( "leta0", BSIM4v2_MOD_LETA0, IF_REAL, "Length dependence of eta0"), |
|||
IOP( "letab", BSIM4v2_MOD_LETAB, IF_REAL, "Length dependence of etab"), |
|||
IOP( "lpclm", BSIM4v2_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), |
|||
IOP( "lpdiblc1", BSIM4v2_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), |
|||
IOP( "lpdiblc2", BSIM4v2_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), |
|||
IOP( "lpdiblcb", BSIM4v2_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), |
|||
IOP( "lfprout", BSIM4v2_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), |
|||
IOP( "lpdits", BSIM4v2_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), |
|||
IOP( "lpditsd", BSIM4v2_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), |
|||
IOP( "lpscbe1", BSIM4v2_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), |
|||
IOP( "lpscbe2", BSIM4v2_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), |
|||
IOP( "lpvag", BSIM4v2_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), |
|||
IOP( "lwr", BSIM4v2_MOD_LWR, IF_REAL, "Length dependence of wr"), |
|||
IOP( "ldwg", BSIM4v2_MOD_LDWG, IF_REAL, "Length dependence of dwg"), |
|||
IOP( "ldwb", BSIM4v2_MOD_LDWB, IF_REAL, "Length dependence of dwb"), |
|||
IOP( "lb0", BSIM4v2_MOD_LB0, IF_REAL, "Length dependence of b0"), |
|||
IOP( "lb1", BSIM4v2_MOD_LB1, IF_REAL, "Length dependence of b1"), |
|||
IOP( "lcgsl", BSIM4v2_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), |
|||
IOP( "lcgdl", BSIM4v2_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), |
|||
IOP( "lckappas", BSIM4v2_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), |
|||
IOP( "lckappad", BSIM4v2_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), |
|||
IOP( "lcf", BSIM4v2_MOD_LCF, IF_REAL, "Length dependence of cf"), |
|||
IOP( "lclc", BSIM4v2_MOD_LCLC, IF_REAL, "Length dependence of clc"), |
|||
IOP( "lcle", BSIM4v2_MOD_LCLE, IF_REAL, "Length dependence of cle"), |
|||
IOP( "lalpha0", BSIM4v2_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), |
|||
IOP( "lalpha1", BSIM4v2_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), |
|||
IOP( "lbeta0", BSIM4v2_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), |
|||
IOP( "lagidl", BSIM4v2_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), |
|||
IOP( "lbgidl", BSIM4v2_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), |
|||
IOP( "lcgidl", BSIM4v2_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), |
|||
IOP( "legidl", BSIM4v2_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), |
|||
IOP( "laigc", BSIM4v2_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), |
|||
IOP( "lbigc", BSIM4v2_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), |
|||
IOP( "lcigc", BSIM4v2_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), |
|||
IOP( "laigsd", BSIM4v2_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), |
|||
IOP( "lbigsd", BSIM4v2_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), |
|||
IOP( "lcigsd", BSIM4v2_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), |
|||
IOP( "laigbacc", BSIM4v2_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), |
|||
IOP( "lbigbacc", BSIM4v2_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), |
|||
IOP( "lcigbacc", BSIM4v2_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), |
|||
IOP( "laigbinv", BSIM4v2_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), |
|||
IOP( "lbigbinv", BSIM4v2_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), |
|||
IOP( "lcigbinv", BSIM4v2_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), |
|||
IOP( "lnigc", BSIM4v2_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), |
|||
IOP( "lnigbinv", BSIM4v2_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), |
|||
IOP( "lnigbacc", BSIM4v2_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), |
|||
IOP( "lntox", BSIM4v2_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), |
|||
IOP( "leigbinv", BSIM4v2_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), |
|||
IOP( "lpigcd", BSIM4v2_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), |
|||
IOP( "lpoxedge", BSIM4v2_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), |
|||
|
|||
IOP( "lvfbcv", BSIM4v2_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), |
|||
IOP( "lvfb", BSIM4v2_MOD_LVFB, IF_REAL, "Length dependence of vfb"), |
|||
IOP( "lacde", BSIM4v2_MOD_LACDE, IF_REAL, "Length dependence of acde"), |
|||
IOP( "lmoin", BSIM4v2_MOD_LMOIN, IF_REAL, "Length dependence of moin"), |
|||
IOP( "lnoff", BSIM4v2_MOD_LNOFF, IF_REAL, "Length dependence of noff"), |
|||
IOP( "lvoffcv", BSIM4v2_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), |
|||
IOP( "lxrcrg1", BSIM4v2_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), |
|||
IOP( "lxrcrg2", BSIM4v2_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), |
|||
IOP( "leu", BSIM4v2_MOD_LEU, IF_REAL, "Length dependence of eu"), |
|||
IOP( "wcdsc", BSIM4v2_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), |
|||
IOP( "wcdscb", BSIM4v2_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), |
|||
IOP( "wcdscd", BSIM4v2_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), |
|||
IOP( "wcit", BSIM4v2_MOD_WCIT, IF_REAL, "Width dependence of cit"), |
|||
IOP( "wnfactor", BSIM4v2_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), |
|||
IOP( "wxj", BSIM4v2_MOD_WXJ, IF_REAL, "Width dependence of xj"), |
|||
IOP( "wvsat", BSIM4v2_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), |
|||
IOP( "wat", BSIM4v2_MOD_WAT, IF_REAL, "Width dependence of at"), |
|||
IOP( "wa0", BSIM4v2_MOD_WA0, IF_REAL, "Width dependence of a0"), |
|||
IOP( "wags", BSIM4v2_MOD_WAGS, IF_REAL, "Width dependence of ags"), |
|||
IOP( "wa1", BSIM4v2_MOD_WA1, IF_REAL, "Width dependence of a1"), |
|||
IOP( "wa2", BSIM4v2_MOD_WA2, IF_REAL, "Width dependence of a2"), |
|||
IOP( "wketa", BSIM4v2_MOD_WKETA, IF_REAL, "Width dependence of keta"), |
|||
IOP( "wnsub", BSIM4v2_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), |
|||
IOP( "wndep", BSIM4v2_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), |
|||
IOP( "wnsd", BSIM4v2_MOD_WNSD, IF_REAL, "Width dependence of nsd"), |
|||
IOP( "wphin", BSIM4v2_MOD_WPHIN, IF_REAL, "Width dependence of phin"), |
|||
IOP( "wngate", BSIM4v2_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), |
|||
IOP( "wgamma1", BSIM4v2_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), |
|||
IOP( "wgamma2", BSIM4v2_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), |
|||
IOP( "wvbx", BSIM4v2_MOD_WVBX, IF_REAL, "Width dependence of vbx"), |
|||
IOP( "wvbm", BSIM4v2_MOD_WVBM, IF_REAL, "Width dependence of vbm"), |
|||
IOP( "wxt", BSIM4v2_MOD_WXT, IF_REAL, "Width dependence of xt"), |
|||
IOP( "wk1", BSIM4v2_MOD_WK1, IF_REAL, "Width dependence of k1"), |
|||
IOP( "wkt1", BSIM4v2_MOD_WKT1, IF_REAL, "Width dependence of kt1"), |
|||
IOP( "wkt1l", BSIM4v2_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), |
|||
IOP( "wkt2", BSIM4v2_MOD_WKT2, IF_REAL, "Width dependence of kt2"), |
|||
IOP( "wk2", BSIM4v2_MOD_WK2, IF_REAL, "Width dependence of k2"), |
|||
IOP( "wk3", BSIM4v2_MOD_WK3, IF_REAL, "Width dependence of k3"), |
|||
IOP( "wk3b", BSIM4v2_MOD_WK3B, IF_REAL, "Width dependence of k3b"), |
|||
IOP( "ww0", BSIM4v2_MOD_WW0, IF_REAL, "Width dependence of w0"), |
|||
IOP( "wdvtp0", BSIM4v2_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), |
|||
IOP( "wdvtp1", BSIM4v2_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), |
|||
IOP( "wlpe0", BSIM4v2_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), |
|||
IOP( "wlpeb", BSIM4v2_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), |
|||
IOP( "wdvt0", BSIM4v2_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), |
|||
IOP( "wdvt1", BSIM4v2_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), |
|||
IOP( "wdvt2", BSIM4v2_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), |
|||
IOP( "wdvt0w", BSIM4v2_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), |
|||
IOP( "wdvt1w", BSIM4v2_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), |
|||
IOP( "wdvt2w", BSIM4v2_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), |
|||
IOP( "wdrout", BSIM4v2_MOD_WDROUT, IF_REAL, "Width dependence of drout"), |
|||
IOP( "wdsub", BSIM4v2_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), |
|||
IOP( "wvth0", BSIM4v2_MOD_WVTH0, IF_REAL,"Width dependence of vto"), |
|||
IOP( "wvtho", BSIM4v2_MOD_WVTH0, IF_REAL,"Width dependence of vto"), |
|||
IOP( "wua", BSIM4v2_MOD_WUA, IF_REAL, "Width dependence of ua"), |
|||
IOP( "wua1", BSIM4v2_MOD_WUA1, IF_REAL, "Width dependence of ua1"), |
|||
IOP( "wub", BSIM4v2_MOD_WUB, IF_REAL, "Width dependence of ub"), |
|||
IOP( "wub1", BSIM4v2_MOD_WUB1, IF_REAL, "Width dependence of ub1"), |
|||
IOP( "wuc", BSIM4v2_MOD_WUC, IF_REAL, "Width dependence of uc"), |
|||
IOP( "wuc1", BSIM4v2_MOD_WUC1, IF_REAL, "Width dependence of uc1"), |
|||
IOP( "wu0", BSIM4v2_MOD_WU0, IF_REAL, "Width dependence of u0"), |
|||
IOP( "wute", BSIM4v2_MOD_WUTE, IF_REAL, "Width dependence of ute"), |
|||
IOP( "wvoff", BSIM4v2_MOD_WVOFF, IF_REAL, "Width dependence of voff"), |
|||
IOP( "wminv", BSIM4v2_MOD_WMINV, IF_REAL, "Width dependence of minv"), |
|||
IOP( "wdelta", BSIM4v2_MOD_WDELTA, IF_REAL, "Width dependence of delta"), |
|||
IOP( "wrdsw", BSIM4v2_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), |
|||
IOP( "wrsw", BSIM4v2_MOD_WRSW, IF_REAL, "Width dependence of rsw"), |
|||
IOP( "wrdw", BSIM4v2_MOD_WRDW, IF_REAL, "Width dependence of rdw"), |
|||
|
|||
IOP( "wprwg", BSIM4v2_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), |
|||
IOP( "wprwb", BSIM4v2_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), |
|||
|
|||
IOP( "wprt", BSIM4v2_MOD_WPRT, IF_REAL, "Width dependence of prt"), |
|||
IOP( "weta0", BSIM4v2_MOD_WETA0, IF_REAL, "Width dependence of eta0"), |
|||
IOP( "wetab", BSIM4v2_MOD_WETAB, IF_REAL, "Width dependence of etab"), |
|||
IOP( "wpclm", BSIM4v2_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), |
|||
IOP( "wpdiblc1", BSIM4v2_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), |
|||
IOP( "wpdiblc2", BSIM4v2_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), |
|||
IOP( "wpdiblcb", BSIM4v2_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), |
|||
IOP( "wfprout", BSIM4v2_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), |
|||
IOP( "wpdits", BSIM4v2_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), |
|||
IOP( "wpditsd", BSIM4v2_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), |
|||
IOP( "wpscbe1", BSIM4v2_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), |
|||
IOP( "wpscbe2", BSIM4v2_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), |
|||
IOP( "wpvag", BSIM4v2_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), |
|||
IOP( "wwr", BSIM4v2_MOD_WWR, IF_REAL, "Width dependence of wr"), |
|||
IOP( "wdwg", BSIM4v2_MOD_WDWG, IF_REAL, "Width dependence of dwg"), |
|||
IOP( "wdwb", BSIM4v2_MOD_WDWB, IF_REAL, "Width dependence of dwb"), |
|||
IOP( "wb0", BSIM4v2_MOD_WB0, IF_REAL, "Width dependence of b0"), |
|||
IOP( "wb1", BSIM4v2_MOD_WB1, IF_REAL, "Width dependence of b1"), |
|||
IOP( "wcgsl", BSIM4v2_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), |
|||
IOP( "wcgdl", BSIM4v2_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), |
|||
IOP( "wckappas", BSIM4v2_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), |
|||
IOP( "wckappad", BSIM4v2_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), |
|||
IOP( "wcf", BSIM4v2_MOD_WCF, IF_REAL, "Width dependence of cf"), |
|||
IOP( "wclc", BSIM4v2_MOD_WCLC, IF_REAL, "Width dependence of clc"), |
|||
IOP( "wcle", BSIM4v2_MOD_WCLE, IF_REAL, "Width dependence of cle"), |
|||
IOP( "walpha0", BSIM4v2_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), |
|||
IOP( "walpha1", BSIM4v2_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), |
|||
IOP( "wbeta0", BSIM4v2_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), |
|||
IOP( "wagidl", BSIM4v2_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), |
|||
IOP( "wbgidl", BSIM4v2_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), |
|||
IOP( "wcgidl", BSIM4v2_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), |
|||
IOP( "wegidl", BSIM4v2_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), |
|||
IOP( "waigc", BSIM4v2_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), |
|||
IOP( "wbigc", BSIM4v2_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), |
|||
IOP( "wcigc", BSIM4v2_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), |
|||
IOP( "waigsd", BSIM4v2_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), |
|||
IOP( "wbigsd", BSIM4v2_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), |
|||
IOP( "wcigsd", BSIM4v2_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), |
|||
IOP( "waigbacc", BSIM4v2_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), |
|||
IOP( "wbigbacc", BSIM4v2_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), |
|||
IOP( "wcigbacc", BSIM4v2_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), |
|||
IOP( "waigbinv", BSIM4v2_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), |
|||
IOP( "wbigbinv", BSIM4v2_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), |
|||
IOP( "wcigbinv", BSIM4v2_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), |
|||
IOP( "wnigc", BSIM4v2_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), |
|||
IOP( "wnigbinv", BSIM4v2_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), |
|||
IOP( "wnigbacc", BSIM4v2_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), |
|||
IOP( "wntox", BSIM4v2_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), |
|||
IOP( "weigbinv", BSIM4v2_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), |
|||
IOP( "wpigcd", BSIM4v2_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), |
|||
IOP( "wpoxedge", BSIM4v2_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), |
|||
IOP( "wvfbcv", BSIM4v2_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), |
|||
IOP( "wvfb", BSIM4v2_MOD_WVFB, IF_REAL, "Width dependence of vfb"), |
|||
IOP( "wacde", BSIM4v2_MOD_WACDE, IF_REAL, "Width dependence of acde"), |
|||
IOP( "wmoin", BSIM4v2_MOD_WMOIN, IF_REAL, "Width dependence of moin"), |
|||
IOP( "wnoff", BSIM4v2_MOD_WNOFF, IF_REAL, "Width dependence of noff"), |
|||
IOP( "wvoffcv", BSIM4v2_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), |
|||
IOP( "wxrcrg1", BSIM4v2_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), |
|||
IOP( "wxrcrg2", BSIM4v2_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), |
|||
IOP( "weu", BSIM4v2_MOD_WEU, IF_REAL, "Width dependence of eu"), |
|||
|
|||
IOP( "pcdsc", BSIM4v2_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), |
|||
IOP( "pcdscb", BSIM4v2_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), |
|||
IOP( "pcdscd", BSIM4v2_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), |
|||
IOP( "pcit", BSIM4v2_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), |
|||
IOP( "pnfactor", BSIM4v2_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), |
|||
IOP( "pxj", BSIM4v2_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), |
|||
IOP( "pvsat", BSIM4v2_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), |
|||
IOP( "pat", BSIM4v2_MOD_PAT, IF_REAL, "Cross-term dependence of at"), |
|||
IOP( "pa0", BSIM4v2_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), |
|||
IOP( "pags", BSIM4v2_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), |
|||
IOP( "pa1", BSIM4v2_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), |
|||
IOP( "pa2", BSIM4v2_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), |
|||
IOP( "pketa", BSIM4v2_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), |
|||
IOP( "pnsub", BSIM4v2_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), |
|||
IOP( "pndep", BSIM4v2_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), |
|||
IOP( "pnsd", BSIM4v2_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), |
|||
IOP( "pphin", BSIM4v2_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), |
|||
IOP( "pngate", BSIM4v2_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), |
|||
IOP( "pgamma1", BSIM4v2_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), |
|||
IOP( "pgamma2", BSIM4v2_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), |
|||
IOP( "pvbx", BSIM4v2_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), |
|||
IOP( "pvbm", BSIM4v2_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), |
|||
IOP( "pxt", BSIM4v2_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), |
|||
IOP( "pk1", BSIM4v2_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), |
|||
IOP( "pkt1", BSIM4v2_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), |
|||
IOP( "pkt1l", BSIM4v2_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), |
|||
IOP( "pkt2", BSIM4v2_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), |
|||
IOP( "pk2", BSIM4v2_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), |
|||
IOP( "pk3", BSIM4v2_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), |
|||
IOP( "pk3b", BSIM4v2_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), |
|||
IOP( "pw0", BSIM4v2_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), |
|||
IOP( "pdvtp0", BSIM4v2_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), |
|||
IOP( "pdvtp1", BSIM4v2_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), |
|||
IOP( "plpe0", BSIM4v2_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), |
|||
IOP( "plpeb", BSIM4v2_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), |
|||
IOP( "pdvt0", BSIM4v2_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), |
|||
IOP( "pdvt1", BSIM4v2_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), |
|||
IOP( "pdvt2", BSIM4v2_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), |
|||
IOP( "pdvt0w", BSIM4v2_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), |
|||
IOP( "pdvt1w", BSIM4v2_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), |
|||
IOP( "pdvt2w", BSIM4v2_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), |
|||
IOP( "pdrout", BSIM4v2_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), |
|||
IOP( "pdsub", BSIM4v2_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), |
|||
IOP( "pvth0", BSIM4v2_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), |
|||
IOP( "pvtho", BSIM4v2_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), |
|||
IOP( "pua", BSIM4v2_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), |
|||
IOP( "pua1", BSIM4v2_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), |
|||
IOP( "pub", BSIM4v2_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), |
|||
IOP( "pub1", BSIM4v2_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), |
|||
IOP( "puc", BSIM4v2_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), |
|||
IOP( "puc1", BSIM4v2_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), |
|||
IOP( "pu0", BSIM4v2_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), |
|||
IOP( "pute", BSIM4v2_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), |
|||
IOP( "pvoff", BSIM4v2_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), |
|||
IOP( "pminv", BSIM4v2_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), |
|||
IOP( "pdelta", BSIM4v2_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), |
|||
IOP( "prdsw", BSIM4v2_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), |
|||
IOP( "prsw", BSIM4v2_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), |
|||
IOP( "prdw", BSIM4v2_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), |
|||
|
|||
IOP( "pprwg", BSIM4v2_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), |
|||
IOP( "pprwb", BSIM4v2_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), |
|||
|
|||
IOP( "pprt", BSIM4v2_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), |
|||
IOP( "peta0", BSIM4v2_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), |
|||
IOP( "petab", BSIM4v2_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), |
|||
IOP( "ppclm", BSIM4v2_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), |
|||
IOP( "ppdiblc1", BSIM4v2_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), |
|||
IOP( "ppdiblc2", BSIM4v2_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), |
|||
IOP( "ppdiblcb", BSIM4v2_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), |
|||
IOP( "pfprout", BSIM4v2_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), |
|||
IOP( "ppdits", BSIM4v2_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), |
|||
IOP( "ppditsd", BSIM4v2_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), |
|||
IOP( "ppscbe1", BSIM4v2_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), |
|||
IOP( "ppscbe2", BSIM4v2_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), |
|||
IOP( "ppvag", BSIM4v2_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), |
|||
IOP( "pwr", BSIM4v2_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), |
|||
IOP( "pdwg", BSIM4v2_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), |
|||
IOP( "pdwb", BSIM4v2_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), |
|||
IOP( "pb0", BSIM4v2_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), |
|||
IOP( "pb1", BSIM4v2_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), |
|||
IOP( "pcgsl", BSIM4v2_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), |
|||
IOP( "pcgdl", BSIM4v2_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), |
|||
IOP( "pckappas", BSIM4v2_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), |
|||
IOP( "pckappad", BSIM4v2_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), |
|||
IOP( "pcf", BSIM4v2_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), |
|||
IOP( "pclc", BSIM4v2_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), |
|||
IOP( "pcle", BSIM4v2_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), |
|||
IOP( "palpha0", BSIM4v2_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), |
|||
IOP( "palpha1", BSIM4v2_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), |
|||
IOP( "pbeta0", BSIM4v2_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), |
|||
IOP( "pagidl", BSIM4v2_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), |
|||
IOP( "pbgidl", BSIM4v2_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), |
|||
IOP( "pcgidl", BSIM4v2_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), |
|||
IOP( "pegidl", BSIM4v2_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), |
|||
IOP( "paigc", BSIM4v2_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), |
|||
IOP( "pbigc", BSIM4v2_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), |
|||
IOP( "pcigc", BSIM4v2_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), |
|||
IOP( "paigsd", BSIM4v2_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), |
|||
IOP( "pbigsd", BSIM4v2_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), |
|||
IOP( "pcigsd", BSIM4v2_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), |
|||
IOP( "paigbacc", BSIM4v2_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), |
|||
IOP( "pbigbacc", BSIM4v2_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), |
|||
IOP( "pcigbacc", BSIM4v2_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), |
|||
IOP( "paigbinv", BSIM4v2_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), |
|||
IOP( "pbigbinv", BSIM4v2_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), |
|||
IOP( "pcigbinv", BSIM4v2_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), |
|||
IOP( "pnigc", BSIM4v2_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), |
|||
IOP( "pnigbinv", BSIM4v2_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), |
|||
IOP( "pnigbacc", BSIM4v2_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), |
|||
IOP( "pntox", BSIM4v2_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), |
|||
IOP( "peigbinv", BSIM4v2_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), |
|||
IOP( "ppigcd", BSIM4v2_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), |
|||
IOP( "ppoxedge", BSIM4v2_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), |
|||
IOP( "pvfbcv", BSIM4v2_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), |
|||
IOP( "pvfb", BSIM4v2_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), |
|||
IOP( "pacde", BSIM4v2_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), |
|||
IOP( "pmoin", BSIM4v2_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), |
|||
IOP( "pnoff", BSIM4v2_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), |
|||
IOP( "pvoffcv", BSIM4v2_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), |
|||
IOP( "pxrcrg1", BSIM4v2_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), |
|||
IOP( "pxrcrg2", BSIM4v2_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), |
|||
IOP( "peu", BSIM4v2_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), |
|||
|
|||
IOP( "noia", BSIM4v2_MOD_NOIA, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "noib", BSIM4v2_MOD_NOIB, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "noic", BSIM4v2_MOD_NOIC, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "tnoia", BSIM4v2_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "tnoib", BSIM4v2_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "ntnoi", BSIM4v2_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "em", BSIM4v2_MOD_EM, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "ef", BSIM4v2_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), |
|||
IOP( "af", BSIM4v2_MOD_AF, IF_REAL, "Flicker noise exponent"), |
|||
IOP( "kf", BSIM4v2_MOD_KF, IF_REAL, "Flicker noise coefficient"), |
|||
|
|||
IP( "nmos", BSIM4v2_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), |
|||
IP( "pmos", BSIM4v2_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), |
|||
}; |
|||
|
|||
char *BSIM4v2names[] = { |
|||
"Drain", |
|||
"Gate", |
|||
"Source", |
|||
"Bulk", |
|||
"Charge" |
|||
}; |
|||
|
|||
int BSIM4v2nSize = NUMELEMS(BSIM4v2names); |
|||
int BSIM4v2pTSize = NUMELEMS(BSIM4v2pTable); |
|||
int BSIM4v2mPTSize = NUMELEMS(BSIM4v2mPTable); |
|||
int BSIM4v2iSize = sizeof(BSIM4v2instance); |
|||
int BSIM4v2mSize = sizeof(BSIM4v2model); |
|||
|
|||
|
|||
|
|||
@ -0,0 +1,670 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4acld.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* |
|||
* Modified by Xuemei Xi 10/05/2001 |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v2def.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
|
|||
int |
|||
BSIM4v2acLoad(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v2model *model = (BSIM4v2model*)inModel; |
|||
BSIM4v2instance *here; |
|||
|
|||
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; |
|||
double xcbgb, xcbdb, xcbsb, xcbbb; |
|||
double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi; |
|||
double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi; |
|||
double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr; |
|||
double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi; |
|||
double xcdbdb, xcsbsb, xcgmgmb, xcgmdb, xcgmsb, xcdgmb, xcsgmb; |
|||
double xcgmbb, xcbgmb; |
|||
double capbd, capbs, omega; |
|||
double gstot, gstotd, gstotg, gstots, gstotb, gspr; |
|||
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; |
|||
double gIstotg, gIstotd, gIstots, gIstotb; |
|||
double gIdtotg, gIdtotd, gIdtots, gIdtotb; |
|||
double gIbtotg, gIbtotd, gIbtots, gIbtotb; |
|||
double gIgtotg, gIgtotd, gIgtots, gIgtotb; |
|||
double cgso, cgdo, cgbo; |
|||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb; |
|||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; |
|||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11; |
|||
double Csg, Csd, Css, Csb; |
|||
double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr; |
|||
double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi; |
|||
double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi; |
|||
double FwdSumr, RevSumr, Gmr, Gmbsr, Gdsr; |
|||
double FwdSumi, RevSumi, Gmi, Gmbsi, Gdsi; |
|||
struct bsim4SizeDependParam *pParam; |
|||
double ggidld, ggidlg, ggidlb,ggisld, ggislg, ggislb, ggisls; |
|||
|
|||
omega = ckt->CKTomega; |
|||
for (; model != NULL; model = model->BSIM4v2nextModel) |
|||
{ for (here = model->BSIM4v2instances; here!= NULL; |
|||
here = here->BSIM4v2nextInstance) |
|||
{ if (here->BSIM4v2owner != ARCHme) continue; |
|||
pParam = here->pParam; |
|||
capbd = here->BSIM4v2capbd; |
|||
capbs = here->BSIM4v2capbs; |
|||
cgso = here->BSIM4v2cgso; |
|||
cgdo = here->BSIM4v2cgdo; |
|||
cgbo = pParam->BSIM4v2cgbo; |
|||
|
|||
Csd = -(here->BSIM4v2cddb + here->BSIM4v2cgdb + here->BSIM4v2cbdb); |
|||
Csg = -(here->BSIM4v2cdgb + here->BSIM4v2cggb + here->BSIM4v2cbgb); |
|||
Css = -(here->BSIM4v2cdsb + here->BSIM4v2cgsb + here->BSIM4v2cbsb); |
|||
|
|||
if (here->BSIM4v2acnqsMod) |
|||
{ T0 = omega * here->BSIM4v2taunet; |
|||
T1 = T0 * T0; |
|||
T2 = 1.0 / (1.0 + T1); |
|||
T3 = T0 * T2; |
|||
|
|||
gmr = here->BSIM4v2gm * T2; |
|||
gmbsr = here->BSIM4v2gmbs * T2; |
|||
gdsr = here->BSIM4v2gds * T2; |
|||
|
|||
gmi = -here->BSIM4v2gm * T3; |
|||
gmbsi = -here->BSIM4v2gmbs * T3; |
|||
gdsi = -here->BSIM4v2gds * T3; |
|||
|
|||
Cddr = here->BSIM4v2cddb * T2; |
|||
Cdgr = here->BSIM4v2cdgb * T2; |
|||
Cdsr = here->BSIM4v2cdsb * T2; |
|||
Cdbr = -(Cddr + Cdgr + Cdsr); |
|||
|
|||
/* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */ |
|||
Cddi = here->BSIM4v2cddb * T3 * omega; |
|||
Cdgi = here->BSIM4v2cdgb * T3 * omega; |
|||
Cdsi = here->BSIM4v2cdsb * T3 * omega; |
|||
Cdbi = -(Cddi + Cdgi + Cdsi); |
|||
|
|||
Csdr = Csd * T2; |
|||
Csgr = Csg * T2; |
|||
Cssr = Css * T2; |
|||
Csbr = -(Csdr + Csgr + Cssr); |
|||
|
|||
Csdi = Csd * T3 * omega; |
|||
Csgi = Csg * T3 * omega; |
|||
Cssi = Css * T3 * omega; |
|||
Csbi = -(Csdi + Csgi + Cssi); |
|||
|
|||
Cgdr = -(Cddr + Csdr + here->BSIM4v2cbdb); |
|||
Cggr = -(Cdgr + Csgr + here->BSIM4v2cbgb); |
|||
Cgsr = -(Cdsr + Cssr + here->BSIM4v2cbsb); |
|||
Cgbr = -(Cgdr + Cggr + Cgsr); |
|||
|
|||
Cgdi = -(Cddi + Csdi); |
|||
Cggi = -(Cdgi + Csgi); |
|||
Cgsi = -(Cdsi + Cssi); |
|||
Cgbi = -(Cgdi + Cggi + Cgsi); |
|||
} |
|||
else /* QS */ |
|||
{ gmr = here->BSIM4v2gm; |
|||
gmbsr = here->BSIM4v2gmbs; |
|||
gdsr = here->BSIM4v2gds; |
|||
gmi = gmbsi = gdsi = 0.0; |
|||
|
|||
Cddr = here->BSIM4v2cddb; |
|||
Cdgr = here->BSIM4v2cdgb; |
|||
Cdsr = here->BSIM4v2cdsb; |
|||
Cdbr = -(Cddr + Cdgr + Cdsr); |
|||
Cddi = Cdgi = Cdsi = Cdbi = 0.0; |
|||
|
|||
Csdr = Csd; |
|||
Csgr = Csg; |
|||
Cssr = Css; |
|||
Csbr = -(Csdr + Csgr + Cssr); |
|||
Csdi = Csgi = Cssi = Csbi = 0.0; |
|||
|
|||
Cgdr = here->BSIM4v2cgdb; |
|||
Cggr = here->BSIM4v2cggb; |
|||
Cgsr = here->BSIM4v2cgsb; |
|||
Cgbr = -(Cgdr + Cggr + Cgsr); |
|||
Cgdi = Cggi = Cgsi = Cgbi = 0.0; |
|||
} |
|||
|
|||
|
|||
if (here->BSIM4v2mode >= 0) |
|||
{ Gmr = gmr; |
|||
Gmbsr = gmbsr; |
|||
FwdSumr = Gmr + Gmbsr; |
|||
RevSumr = 0.0; |
|||
Gmi = gmi; |
|||
Gmbsi = gmbsi; |
|||
FwdSumi = Gmi + Gmbsi; |
|||
RevSumi = 0.0; |
|||
|
|||
gbbdp = -(here->BSIM4v2gbds); |
|||
gbbsp = here->BSIM4v2gbds + here->BSIM4v2gbgs + here->BSIM4v2gbbs; |
|||
gbdpg = here->BSIM4v2gbgs; |
|||
gbdpdp = here->BSIM4v2gbds; |
|||
gbdpb = here->BSIM4v2gbbs; |
|||
gbdpsp = -(gbdpg + gbdpdp + gbdpb); |
|||
|
|||
gbspdp = 0.0; |
|||
gbspg = 0.0; |
|||
gbspb = 0.0; |
|||
gbspsp = 0.0; |
|||
|
|||
if (model->BSIM4v2igcMod) |
|||
{ gIstotg = here->BSIM4v2gIgsg + here->BSIM4v2gIgcsg; |
|||
gIstotd = here->BSIM4v2gIgcsd; |
|||
gIstots = here->BSIM4v2gIgss + here->BSIM4v2gIgcss; |
|||
gIstotb = here->BSIM4v2gIgcsb; |
|||
|
|||
gIdtotg = here->BSIM4v2gIgdg + here->BSIM4v2gIgcdg; |
|||
gIdtotd = here->BSIM4v2gIgdd + here->BSIM4v2gIgcdd; |
|||
gIdtots = here->BSIM4v2gIgcds; |
|||
gIdtotb = here->BSIM4v2gIgcdb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v2igbMod) |
|||
{ gIbtotg = here->BSIM4v2gIgbg; |
|||
gIbtotd = here->BSIM4v2gIgbd; |
|||
gIbtots = here->BSIM4v2gIgbs; |
|||
gIbtotb = here->BSIM4v2gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v2igcMod != 0) || (model->BSIM4v2igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v2rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v2vgs); |
|||
else if (here->BSIM4v2rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v2vgs); |
|||
if (here->BSIM4v2rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v2gcrgd * T0; |
|||
gcrgg = here->BSIM4v2gcrgg * T0; |
|||
gcrgs = here->BSIM4v2gcrgs * T0; |
|||
gcrgb = here->BSIM4v2gcrgb * T0; |
|||
gcrgg -= here->BSIM4v2gcrg; |
|||
gcrg = here->BSIM4v2gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v2rgateMod == 3) |
|||
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v2cgbo) * omega; |
|||
xcgmdb = -cgdo * omega; |
|||
xcgmsb = -cgso * omega; |
|||
xcgmbb = -pParam->BSIM4v2cgbo * omega; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggbr = Cggr * omega; |
|||
xcgdbr = Cgdr * omega; |
|||
xcgsbr = Cgsr * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = Cdgr * omega; |
|||
xcsgbr = Csgr * omega; |
|||
xcbgb = here->BSIM4v2cbgb * omega; |
|||
} |
|||
else |
|||
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v2cgbo ) * omega; |
|||
xcgdbr = (Cgdr - cgdo) * omega; |
|||
xcgsbr = (Cgsr - cgso) * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = (Cdgr - cgdo) * omega; |
|||
xcsgbr = (Csgr - cgso) * omega; |
|||
xcbgb = (here->BSIM4v2cbgb - pParam->BSIM4v2cgbo) * omega; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddbr = (Cddr + here->BSIM4v2capbd + cgdo) * omega; |
|||
xcdsbr = Cdsr * omega; |
|||
xcsdbr = Csdr * omega; |
|||
xcssbr = (here->BSIM4v2capbs + cgso + Cssr) * omega; |
|||
|
|||
if (!here->BSIM4v2rbodyMod) |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); |
|||
|
|||
xcbdb = (here->BSIM4v2cbdb - here->BSIM4v2capbd) * omega; |
|||
xcbsb = (here->BSIM4v2cbsb - here->BSIM4v2capbs) * omega; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbbr = Cdbr * omega; |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb) |
|||
+ here->BSIM4v2capbs * omega; |
|||
|
|||
xcbdb = here->BSIM4v2cbdb * omega; |
|||
xcbsb = here->BSIM4v2cbsb * omega; |
|||
|
|||
xcdbdb = -here->BSIM4v2capbd * omega; |
|||
xcsbsb = -here->BSIM4v2capbs * omega; |
|||
} |
|||
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); |
|||
|
|||
xcdgbi = Cdgi; |
|||
xcsgbi = Csgi; |
|||
xcddbi = Cddi; |
|||
xcdsbi = Cdsi; |
|||
xcsdbi = Csdi; |
|||
xcssbi = Cssi; |
|||
xcdbbi = Cdbi; |
|||
xcsbbi = Csbi; |
|||
xcggbi = Cggi; |
|||
xcgdbi = Cgdi; |
|||
xcgsbi = Cgsi; |
|||
xcgbbi = Cgbi; |
|||
} |
|||
else /* Reverse mode */ |
|||
{ Gmr = -gmr; |
|||
Gmbsr = -gmbsr; |
|||
FwdSumr = 0.0; |
|||
RevSumr = -(Gmr + Gmbsr); |
|||
Gmi = -gmi; |
|||
Gmbsi = -gmbsi; |
|||
FwdSumi = 0.0; |
|||
RevSumi = -(Gmi + Gmbsi); |
|||
|
|||
gbbsp = -(here->BSIM4v2gbds); |
|||
gbbdp = here->BSIM4v2gbds + here->BSIM4v2gbgs + here->BSIM4v2gbbs; |
|||
|
|||
gbdpg = 0.0; |
|||
gbdpsp = 0.0; |
|||
gbdpb = 0.0; |
|||
gbdpdp = 0.0; |
|||
|
|||
gbspg = here->BSIM4v2gbgs; |
|||
gbspsp = here->BSIM4v2gbds; |
|||
gbspb = here->BSIM4v2gbbs; |
|||
gbspdp = -(gbspg + gbspsp + gbspb); |
|||
|
|||
if (model->BSIM4v2igcMod) |
|||
{ gIstotg = here->BSIM4v2gIgsg + here->BSIM4v2gIgcdg; |
|||
gIstotd = here->BSIM4v2gIgcds; |
|||
gIstots = here->BSIM4v2gIgss + here->BSIM4v2gIgcdd; |
|||
gIstotb = here->BSIM4v2gIgcdb; |
|||
|
|||
gIdtotg = here->BSIM4v2gIgdg + here->BSIM4v2gIgcsg; |
|||
gIdtotd = here->BSIM4v2gIgdd + here->BSIM4v2gIgcss; |
|||
gIdtots = here->BSIM4v2gIgcsd; |
|||
gIdtotb = here->BSIM4v2gIgcsb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v2igbMod) |
|||
{ gIbtotg = here->BSIM4v2gIgbg; |
|||
gIbtotd = here->BSIM4v2gIgbs; |
|||
gIbtots = here->BSIM4v2gIgbd; |
|||
gIbtotb = here->BSIM4v2gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v2igcMod != 0) || (model->BSIM4v2igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v2rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v2vgs); |
|||
else if (here->BSIM4v2rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v2vgs); |
|||
if (here->BSIM4v2rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v2gcrgs * T0; |
|||
gcrgg = here->BSIM4v2gcrgg * T0; |
|||
gcrgs = here->BSIM4v2gcrgd * T0; |
|||
gcrgb = here->BSIM4v2gcrgb * T0; |
|||
gcrgg -= here->BSIM4v2gcrg; |
|||
gcrg = here->BSIM4v2gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v2rgateMod == 3) |
|||
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v2cgbo) * omega; |
|||
xcgmdb = -cgdo * omega; |
|||
xcgmsb = -cgso * omega; |
|||
xcgmbb = -pParam->BSIM4v2cgbo * omega; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggbr = Cggr * omega; |
|||
xcgdbr = Cgsr * omega; |
|||
xcgsbr = Cgdr * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = Csgr * omega; |
|||
xcsgbr = Cdgr * omega; |
|||
xcbgb = here->BSIM4v2cbgb * omega; |
|||
} |
|||
else |
|||
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v2cgbo ) * omega; |
|||
xcgdbr = (Cgsr - cgdo) * omega; |
|||
xcgsbr = (Cgdr - cgso) * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = (Csgr - cgdo) * omega; |
|||
xcsgbr = (Cdgr - cgso) * omega; |
|||
xcbgb = (here->BSIM4v2cbgb - pParam->BSIM4v2cgbo) * omega; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddbr = (here->BSIM4v2capbd + cgdo + Cssr) * omega; |
|||
xcdsbr = Csdr * omega; |
|||
xcsdbr = Cdsr * omega; |
|||
xcssbr = (Cddr + here->BSIM4v2capbs + cgso) * omega; |
|||
|
|||
if (!here->BSIM4v2rbodyMod) |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); |
|||
|
|||
xcbdb = (here->BSIM4v2cbsb - here->BSIM4v2capbd) * omega; |
|||
xcbsb = (here->BSIM4v2cbdb - here->BSIM4v2capbs) * omega; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb) |
|||
+ here->BSIM4v2capbd * omega; |
|||
xcsbbr = Cdbr * omega; |
|||
|
|||
xcbdb = here->BSIM4v2cbsb * omega; |
|||
xcbsb = here->BSIM4v2cbdb * omega; |
|||
xcdbdb = -here->BSIM4v2capbd * omega; |
|||
xcsbsb = -here->BSIM4v2capbs * omega; |
|||
} |
|||
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); |
|||
|
|||
xcdgbi = Csgi; |
|||
xcsgbi = Cdgi; |
|||
xcddbi = Cssi; |
|||
xcdsbi = Csdi; |
|||
xcsdbi = Cdsi; |
|||
xcssbi = Cddi; |
|||
xcdbbi = Csbi; |
|||
xcsbbi = Cdbi; |
|||
xcggbi = Cggi; |
|||
xcgdbi = Cgsi; |
|||
xcgsbi = Cgdi; |
|||
xcgbbi = Cgbi; |
|||
} |
|||
|
|||
if (model->BSIM4v2rdsMod == 1) |
|||
{ gstot = here->BSIM4v2gstot; |
|||
gstotd = here->BSIM4v2gstotd; |
|||
gstotg = here->BSIM4v2gstotg; |
|||
gstots = here->BSIM4v2gstots - gstot; |
|||
gstotb = here->BSIM4v2gstotb; |
|||
|
|||
gdtot = here->BSIM4v2gdtot; |
|||
gdtotd = here->BSIM4v2gdtotd - gdtot; |
|||
gdtotg = here->BSIM4v2gdtotg; |
|||
gdtots = here->BSIM4v2gdtots; |
|||
gdtotb = here->BSIM4v2gdtotb; |
|||
} |
|||
else |
|||
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0; |
|||
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; |
|||
} |
|||
|
|||
|
|||
/* |
|||
* Loading AC matrix |
|||
*/ |
|||
|
|||
if (!model->BSIM4v2rdsMod) |
|||
{ gdpr = here->BSIM4v2drainConductance; |
|||
gspr = here->BSIM4v2sourceConductance; |
|||
} |
|||
else |
|||
gdpr = gspr = 0.0; |
|||
|
|||
if (!here->BSIM4v2rbodyMod) |
|||
{ gjbd = here->BSIM4v2gbd; |
|||
gjbs = here->BSIM4v2gbs; |
|||
} |
|||
else |
|||
gjbd = gjbs = 0.0; |
|||
|
|||
geltd = here->BSIM4v2grgeltd; |
|||
|
|||
if (here->BSIM4v2rgateMod == 1) |
|||
{ *(here->BSIM4v2GEgePtr) += geltd; |
|||
*(here->BSIM4v2GPgePtr) -= geltd; |
|||
*(here->BSIM4v2GEgpPtr) -= geltd; |
|||
|
|||
*(here->BSIM4v2GPgpPtr +1) += xcggbr; |
|||
*(here->BSIM4v2GPgpPtr) += geltd + xcggbi + gIgtotg; |
|||
*(here->BSIM4v2GPdpPtr +1) += xcgdbr; |
|||
*(here->BSIM4v2GPdpPtr) += xcgdbi + gIgtotd; |
|||
*(here->BSIM4v2GPspPtr +1) += xcgsbr; |
|||
*(here->BSIM4v2GPspPtr) += xcgsbi + gIgtots; |
|||
*(here->BSIM4v2GPbpPtr +1) += xcgbbr; |
|||
*(here->BSIM4v2GPbpPtr) += xcgbbi + gIgtotb; |
|||
} /* WDLiu: gcrg already subtracted from all gcrgg below */ |
|||
else if (here->BSIM4v2rgateMod == 2) |
|||
{ *(here->BSIM4v2GEgePtr) += gcrg; |
|||
*(here->BSIM4v2GEgpPtr) += gcrgg; |
|||
*(here->BSIM4v2GEdpPtr) += gcrgd; |
|||
*(here->BSIM4v2GEspPtr) += gcrgs; |
|||
*(here->BSIM4v2GEbpPtr) += gcrgb; |
|||
|
|||
*(here->BSIM4v2GPgePtr) -= gcrg; |
|||
*(here->BSIM4v2GPgpPtr +1) += xcggbr; |
|||
*(here->BSIM4v2GPgpPtr) -= gcrgg - xcggbi - gIgtotg; |
|||
*(here->BSIM4v2GPdpPtr +1) += xcgdbr; |
|||
*(here->BSIM4v2GPdpPtr) -= gcrgd - xcgdbi - gIgtotd; |
|||
*(here->BSIM4v2GPspPtr +1) += xcgsbr; |
|||
*(here->BSIM4v2GPspPtr) -= gcrgs - xcgsbi - gIgtots; |
|||
*(here->BSIM4v2GPbpPtr +1) += xcgbbr; |
|||
*(here->BSIM4v2GPbpPtr) -= gcrgb - xcgbbi - gIgtotb; |
|||
} |
|||
else if (here->BSIM4v2rgateMod == 3) |
|||
{ *(here->BSIM4v2GEgePtr) += geltd; |
|||
*(here->BSIM4v2GEgmPtr) -= geltd; |
|||
*(here->BSIM4v2GMgePtr) -= geltd; |
|||
*(here->BSIM4v2GMgmPtr) += geltd + gcrg; |
|||
*(here->BSIM4v2GMgmPtr +1) += xcgmgmb; |
|||
|
|||
*(here->BSIM4v2GMdpPtr) += gcrgd; |
|||
*(here->BSIM4v2GMdpPtr +1) += xcgmdb; |
|||
*(here->BSIM4v2GMgpPtr) += gcrgg; |
|||
*(here->BSIM4v2GMspPtr) += gcrgs; |
|||
*(here->BSIM4v2GMspPtr +1) += xcgmsb; |
|||
*(here->BSIM4v2GMbpPtr) += gcrgb; |
|||
*(here->BSIM4v2GMbpPtr +1) += xcgmbb; |
|||
|
|||
*(here->BSIM4v2DPgmPtr +1) += xcdgmb; |
|||
*(here->BSIM4v2GPgmPtr) -= gcrg; |
|||
*(here->BSIM4v2SPgmPtr +1) += xcsgmb; |
|||
*(here->BSIM4v2BPgmPtr +1) += xcbgmb; |
|||
|
|||
*(here->BSIM4v2GPgpPtr) -= gcrgg - xcggbi - gIgtotg; |
|||
*(here->BSIM4v2GPgpPtr +1) += xcggbr; |
|||
*(here->BSIM4v2GPdpPtr) -= gcrgd - xcgdbi - gIgtotd; |
|||
*(here->BSIM4v2GPdpPtr +1) += xcgdbr; |
|||
*(here->BSIM4v2GPspPtr) -= gcrgs - xcgsbi - gIgtots; |
|||
*(here->BSIM4v2GPspPtr +1) += xcgsbr; |
|||
*(here->BSIM4v2GPbpPtr) -= gcrgb - xcgbbi - gIgtotb; |
|||
*(here->BSIM4v2GPbpPtr +1) += xcgbbr; |
|||
} |
|||
else |
|||
{ *(here->BSIM4v2GPgpPtr +1) += xcggbr; |
|||
*(here->BSIM4v2GPgpPtr) += xcggbi + gIgtotg; |
|||
*(here->BSIM4v2GPdpPtr +1) += xcgdbr; |
|||
*(here->BSIM4v2GPdpPtr) += xcgdbi + gIgtotd; |
|||
*(here->BSIM4v2GPspPtr +1) += xcgsbr; |
|||
*(here->BSIM4v2GPspPtr) += xcgsbi + gIgtots; |
|||
*(here->BSIM4v2GPbpPtr +1) += xcgbbr; |
|||
*(here->BSIM4v2GPbpPtr) += xcgbbi + gIgtotb; |
|||
} |
|||
|
|||
if (model->BSIM4v2rdsMod) |
|||
{ (*(here->BSIM4v2DgpPtr) += gdtotg); |
|||
(*(here->BSIM4v2DspPtr) += gdtots); |
|||
(*(here->BSIM4v2DbpPtr) += gdtotb); |
|||
(*(here->BSIM4v2SdpPtr) += gstotd); |
|||
(*(here->BSIM4v2SgpPtr) += gstotg); |
|||
(*(here->BSIM4v2SbpPtr) += gstotb); |
|||
} |
|||
|
|||
*(here->BSIM4v2DPdpPtr +1) += xcddbr + gdsi + RevSumi; |
|||
*(here->BSIM4v2DPdpPtr) += gdpr + xcddbi + gdsr + here->BSIM4v2gbd |
|||
- gdtotd + RevSumr + gbdpdp - gIdtotd; |
|||
*(here->BSIM4v2DPdPtr) -= gdpr + gdtot; |
|||
*(here->BSIM4v2DPgpPtr +1) += xcdgbr + Gmi; |
|||
*(here->BSIM4v2DPgpPtr) += Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg; |
|||
*(here->BSIM4v2DPspPtr +1) += xcdsbr - gdsi - FwdSumi; |
|||
*(here->BSIM4v2DPspPtr) -= gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots; |
|||
*(here->BSIM4v2DPbpPtr +1) += xcdbbr + Gmbsi; |
|||
*(here->BSIM4v2DPbpPtr) -= gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb; |
|||
|
|||
*(here->BSIM4v2DdpPtr) -= gdpr - gdtotd; |
|||
*(here->BSIM4v2DdPtr) += gdpr + gdtot; |
|||
|
|||
*(here->BSIM4v2SPdpPtr +1) += xcsdbr - gdsi - RevSumi; |
|||
*(here->BSIM4v2SPdpPtr) -= gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd; |
|||
*(here->BSIM4v2SPgpPtr +1) += xcsgbr - Gmi; |
|||
*(here->BSIM4v2SPgpPtr) -= Gmr - xcsgbi + gstotg - gbspg + gIstotg; |
|||
*(here->BSIM4v2SPspPtr +1) += xcssbr + gdsi + FwdSumi; |
|||
*(here->BSIM4v2SPspPtr) += gspr + xcssbi + gdsr + here->BSIM4v2gbs |
|||
- gstots + FwdSumr + gbspsp - gIstots; |
|||
*(here->BSIM4v2SPsPtr) -= gspr + gstot; |
|||
*(here->BSIM4v2SPbpPtr +1) += xcsbbr - Gmbsi; |
|||
*(here->BSIM4v2SPbpPtr) -= gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb; |
|||
|
|||
*(here->BSIM4v2SspPtr) -= gspr - gstots; |
|||
*(here->BSIM4v2SsPtr) += gspr + gstot; |
|||
|
|||
*(here->BSIM4v2BPdpPtr +1) += xcbdb; |
|||
*(here->BSIM4v2BPdpPtr) -= gjbd - gbbdp + gIbtotd; |
|||
*(here->BSIM4v2BPgpPtr +1) += xcbgb; |
|||
*(here->BSIM4v2BPgpPtr) -= here->BSIM4v2gbgs + gIbtotg; |
|||
*(here->BSIM4v2BPspPtr +1) += xcbsb; |
|||
*(here->BSIM4v2BPspPtr) -= gjbs - gbbsp + gIbtots; |
|||
*(here->BSIM4v2BPbpPtr +1) += xcbbb; |
|||
*(here->BSIM4v2BPbpPtr) += gjbd + gjbs - here->BSIM4v2gbbs |
|||
- gIbtotb; |
|||
ggidld = here->BSIM4v2ggidld; |
|||
ggidlg = here->BSIM4v2ggidlg; |
|||
ggidlb = here->BSIM4v2ggidlb; |
|||
ggislg = here->BSIM4v2ggislg; |
|||
ggisls = here->BSIM4v2ggisls; |
|||
ggislb = here->BSIM4v2ggislb; |
|||
|
|||
/* stamp gidl */ |
|||
(*(here->BSIM4v2DPdpPtr) += ggidld); |
|||
(*(here->BSIM4v2DPgpPtr) += ggidlg); |
|||
(*(here->BSIM4v2DPspPtr) -= (ggidlg + ggidld) + ggidlb); |
|||
(*(here->BSIM4v2DPbpPtr) += ggidlb); |
|||
(*(here->BSIM4v2BPdpPtr) -= ggidld); |
|||
(*(here->BSIM4v2BPgpPtr) -= ggidlg); |
|||
(*(here->BSIM4v2BPspPtr) += (ggidlg + ggidld) + ggidlb); |
|||
(*(here->BSIM4v2BPbpPtr) -= ggidlb); |
|||
/* stamp gisl */ |
|||
(*(here->BSIM4v2SPdpPtr) -= (ggisls + ggislg) + ggislb); |
|||
(*(here->BSIM4v2SPgpPtr) += ggislg); |
|||
(*(here->BSIM4v2SPspPtr) += ggisls); |
|||
(*(here->BSIM4v2SPbpPtr) += ggislb); |
|||
(*(here->BSIM4v2BPdpPtr) += (ggislg + ggisls) + ggislb); |
|||
(*(here->BSIM4v2BPgpPtr) -= ggislg); |
|||
(*(here->BSIM4v2BPspPtr) -= ggisls); |
|||
(*(here->BSIM4v2BPbpPtr) -= ggislb); |
|||
|
|||
if (here->BSIM4v2rbodyMod) |
|||
{ (*(here->BSIM4v2DPdbPtr +1) += xcdbdb); |
|||
(*(here->BSIM4v2DPdbPtr) -= here->BSIM4v2gbd); |
|||
(*(here->BSIM4v2SPsbPtr +1) += xcsbsb); |
|||
(*(here->BSIM4v2SPsbPtr) -= here->BSIM4v2gbs); |
|||
|
|||
(*(here->BSIM4v2DBdpPtr +1) += xcdbdb); |
|||
(*(here->BSIM4v2DBdpPtr) -= here->BSIM4v2gbd); |
|||
(*(here->BSIM4v2DBdbPtr +1) -= xcdbdb); |
|||
(*(here->BSIM4v2DBdbPtr) += here->BSIM4v2gbd + here->BSIM4v2grbpd |
|||
+ here->BSIM4v2grbdb); |
|||
(*(here->BSIM4v2DBbpPtr) -= here->BSIM4v2grbpd); |
|||
(*(here->BSIM4v2DBbPtr) -= here->BSIM4v2grbdb); |
|||
|
|||
(*(here->BSIM4v2BPdbPtr) -= here->BSIM4v2grbpd); |
|||
(*(here->BSIM4v2BPbPtr) -= here->BSIM4v2grbpb); |
|||
(*(here->BSIM4v2BPsbPtr) -= here->BSIM4v2grbps); |
|||
(*(here->BSIM4v2BPbpPtr) += here->BSIM4v2grbpd + here->BSIM4v2grbps |
|||
+ here->BSIM4v2grbpb); |
|||
/* WDLiu: (-here->BSIM4v2gbbs) already added to BPbpPtr */ |
|||
|
|||
(*(here->BSIM4v2SBspPtr +1) += xcsbsb); |
|||
(*(here->BSIM4v2SBspPtr) -= here->BSIM4v2gbs); |
|||
(*(here->BSIM4v2SBbpPtr) -= here->BSIM4v2grbps); |
|||
(*(here->BSIM4v2SBbPtr) -= here->BSIM4v2grbsb); |
|||
(*(here->BSIM4v2SBsbPtr +1) -= xcsbsb); |
|||
(*(here->BSIM4v2SBsbPtr) += here->BSIM4v2gbs |
|||
+ here->BSIM4v2grbps + here->BSIM4v2grbsb); |
|||
|
|||
(*(here->BSIM4v2BdbPtr) -= here->BSIM4v2grbdb); |
|||
(*(here->BSIM4v2BbpPtr) -= here->BSIM4v2grbpb); |
|||
(*(here->BSIM4v2BsbPtr) -= here->BSIM4v2grbsb); |
|||
(*(here->BSIM4v2BbPtr) += here->BSIM4v2grbsb + here->BSIM4v2grbdb |
|||
+ here->BSIM4v2grbpb); |
|||
} |
|||
|
|||
|
|||
/* |
|||
* WDLiu: The internal charge node generated for transient NQS is not needed for |
|||
* AC NQS. The following is not doing a real job, but we have to keep it; |
|||
* otherwise a singular AC NQS matrix may occur if the transient NQS is on. |
|||
* The charge node is isolated from the instance. |
|||
*/ |
|||
if (here->BSIM4v2trnqsMod) |
|||
{ (*(here->BSIM4v2QqPtr) += 1.0); |
|||
(*(here->BSIM4v2QgpPtr) += 0.0); |
|||
(*(here->BSIM4v2QdpPtr) += 0.0); |
|||
(*(here->BSIM4v2QspPtr) += 0.0); |
|||
(*(here->BSIM4v2QbpPtr) += 0.0); |
|||
|
|||
(*(here->BSIM4v2DPqPtr) += 0.0); |
|||
(*(here->BSIM4v2SPqPtr) += 0.0); |
|||
(*(here->BSIM4v2GPqPtr) += 0.0); |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,300 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4ask.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "ifsim.h" |
|||
#include "cktdefs.h" |
|||
#include "devdefs.h" |
|||
#include "bsim4v2def.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v2ask(ckt,inst,which,value,select) |
|||
CKTcircuit *ckt; |
|||
GENinstance *inst; |
|||
int which; |
|||
IFvalue *value; |
|||
IFvalue *select; |
|||
{ |
|||
BSIM4v2instance *here = (BSIM4v2instance*)inst; |
|||
|
|||
switch(which) |
|||
{ case BSIM4v2_L: |
|||
value->rValue = here->BSIM4v2l; |
|||
return(OK); |
|||
case BSIM4v2_W: |
|||
value->rValue = here->BSIM4v2w; |
|||
return(OK); |
|||
case BSIM4v2_NF: |
|||
value->rValue = here->BSIM4v2nf; |
|||
return(OK); |
|||
case BSIM4v2_MIN: |
|||
value->iValue = here->BSIM4v2min; |
|||
return(OK); |
|||
case BSIM4v2_AS: |
|||
value->rValue = here->BSIM4v2sourceArea; |
|||
return(OK); |
|||
case BSIM4v2_AD: |
|||
value->rValue = here->BSIM4v2drainArea; |
|||
return(OK); |
|||
case BSIM4v2_PS: |
|||
value->rValue = here->BSIM4v2sourcePerimeter; |
|||
return(OK); |
|||
case BSIM4v2_PD: |
|||
value->rValue = here->BSIM4v2drainPerimeter; |
|||
return(OK); |
|||
case BSIM4v2_NRS: |
|||
value->rValue = here->BSIM4v2sourceSquares; |
|||
return(OK); |
|||
case BSIM4v2_NRD: |
|||
value->rValue = here->BSIM4v2drainSquares; |
|||
return(OK); |
|||
case BSIM4v2_OFF: |
|||
value->rValue = here->BSIM4v2off; |
|||
return(OK); |
|||
case BSIM4v2_RBSB: |
|||
value->rValue = here->BSIM4v2rbsb; |
|||
return(OK); |
|||
case BSIM4v2_RBDB: |
|||
value->rValue = here->BSIM4v2rbdb; |
|||
return(OK); |
|||
case BSIM4v2_RBPB: |
|||
value->rValue = here->BSIM4v2rbpb; |
|||
return(OK); |
|||
case BSIM4v2_RBPS: |
|||
value->rValue = here->BSIM4v2rbps; |
|||
return(OK); |
|||
case BSIM4v2_RBPD: |
|||
value->rValue = here->BSIM4v2rbpd; |
|||
return(OK); |
|||
case BSIM4v2_TRNQSMOD: |
|||
value->iValue = here->BSIM4v2trnqsMod; |
|||
return(OK); |
|||
case BSIM4v2_ACNQSMOD: |
|||
value->iValue = here->BSIM4v2acnqsMod; |
|||
return(OK); |
|||
case BSIM4v2_RBODYMOD: |
|||
value->iValue = here->BSIM4v2rbodyMod; |
|||
return(OK); |
|||
case BSIM4v2_RGATEMOD: |
|||
value->iValue = here->BSIM4v2rgateMod; |
|||
return(OK); |
|||
case BSIM4v2_GEOMOD: |
|||
value->iValue = here->BSIM4v2geoMod; |
|||
return(OK); |
|||
case BSIM4v2_RGEOMOD: |
|||
value->iValue = here->BSIM4v2rgeoMod; |
|||
return(OK); |
|||
case BSIM4v2_IC_VDS: |
|||
value->rValue = here->BSIM4v2icVDS; |
|||
return(OK); |
|||
case BSIM4v2_IC_VGS: |
|||
value->rValue = here->BSIM4v2icVGS; |
|||
return(OK); |
|||
case BSIM4v2_IC_VBS: |
|||
value->rValue = here->BSIM4v2icVBS; |
|||
return(OK); |
|||
case BSIM4v2_DNODE: |
|||
value->iValue = here->BSIM4v2dNode; |
|||
return(OK); |
|||
case BSIM4v2_GNODEEXT: |
|||
value->iValue = here->BSIM4v2gNodeExt; |
|||
return(OK); |
|||
case BSIM4v2_SNODE: |
|||
value->iValue = here->BSIM4v2sNode; |
|||
return(OK); |
|||
case BSIM4v2_BNODE: |
|||
value->iValue = here->BSIM4v2bNode; |
|||
return(OK); |
|||
case BSIM4v2_DNODEPRIME: |
|||
value->iValue = here->BSIM4v2dNodePrime; |
|||
return(OK); |
|||
case BSIM4v2_GNODEPRIME: |
|||
value->iValue = here->BSIM4v2gNodePrime; |
|||
return(OK); |
|||
case BSIM4v2_GNODEMID: |
|||
value->iValue = here->BSIM4v2gNodeMid; |
|||
return(OK); |
|||
case BSIM4v2_SNODEPRIME: |
|||
value->iValue = here->BSIM4v2sNodePrime; |
|||
return(OK); |
|||
case BSIM4v2_DBNODE: |
|||
value->iValue = here->BSIM4v2dbNode; |
|||
return(OK); |
|||
case BSIM4v2_BNODEPRIME: |
|||
value->iValue = here->BSIM4v2bNodePrime; |
|||
return(OK); |
|||
case BSIM4v2_SBNODE: |
|||
value->iValue = here->BSIM4v2sbNode; |
|||
return(OK); |
|||
case BSIM4v2_SOURCECONDUCT: |
|||
value->rValue = here->BSIM4v2sourceConductance; |
|||
return(OK); |
|||
case BSIM4v2_DRAINCONDUCT: |
|||
value->rValue = here->BSIM4v2drainConductance; |
|||
return(OK); |
|||
case BSIM4v2_VBD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2vbd); |
|||
return(OK); |
|||
case BSIM4v2_VBS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2vbs); |
|||
return(OK); |
|||
case BSIM4v2_VGS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2vgs); |
|||
return(OK); |
|||
case BSIM4v2_VDS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2vds); |
|||
return(OK); |
|||
case BSIM4v2_CD: |
|||
value->rValue = here->BSIM4v2cd; |
|||
return(OK); |
|||
case BSIM4v2_CBS: |
|||
value->rValue = here->BSIM4v2cbs; |
|||
return(OK); |
|||
case BSIM4v2_CBD: |
|||
value->rValue = here->BSIM4v2cbd; |
|||
return(OK); |
|||
case BSIM4v2_CSUB: |
|||
value->rValue = here->BSIM4v2csub; |
|||
return(OK); |
|||
case BSIM4v2_IGIDL: |
|||
value->rValue = here->BSIM4v2Igidl; |
|||
return(OK); |
|||
case BSIM4v2_IGISL: |
|||
value->rValue = here->BSIM4v2Igisl; |
|||
return(OK); |
|||
case BSIM4v2_IGS: |
|||
value->rValue = here->BSIM4v2Igs; |
|||
return(OK); |
|||
case BSIM4v2_IGD: |
|||
value->rValue = here->BSIM4v2Igd; |
|||
return(OK); |
|||
case BSIM4v2_IGB: |
|||
value->rValue = here->BSIM4v2Igb; |
|||
return(OK); |
|||
case BSIM4v2_IGCS: |
|||
value->rValue = here->BSIM4v2Igcs; |
|||
return(OK); |
|||
case BSIM4v2_IGCD: |
|||
value->rValue = here->BSIM4v2Igcd; |
|||
return(OK); |
|||
case BSIM4v2_GM: |
|||
value->rValue = here->BSIM4v2gm; |
|||
return(OK); |
|||
case BSIM4v2_GDS: |
|||
value->rValue = here->BSIM4v2gds; |
|||
return(OK); |
|||
case BSIM4v2_GMBS: |
|||
value->rValue = here->BSIM4v2gmbs; |
|||
return(OK); |
|||
case BSIM4v2_GBD: |
|||
value->rValue = here->BSIM4v2gbd; |
|||
return(OK); |
|||
case BSIM4v2_GBS: |
|||
value->rValue = here->BSIM4v2gbs; |
|||
return(OK); |
|||
case BSIM4v2_QB: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qb); |
|||
return(OK); |
|||
case BSIM4v2_CQB: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2cqb); |
|||
return(OK); |
|||
case BSIM4v2_QG: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qg); |
|||
return(OK); |
|||
case BSIM4v2_CQG: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2cqg); |
|||
return(OK); |
|||
case BSIM4v2_QD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qd); |
|||
return(OK); |
|||
case BSIM4v2_CQD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2cqd); |
|||
return(OK); |
|||
case BSIM4v2_QS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qs); |
|||
return(OK); |
|||
case BSIM4v2_CGGB: |
|||
value->rValue = here->BSIM4v2cggb; |
|||
return(OK); |
|||
case BSIM4v2_CGDB: |
|||
value->rValue = here->BSIM4v2cgdb; |
|||
return(OK); |
|||
case BSIM4v2_CGSB: |
|||
value->rValue = here->BSIM4v2cgsb; |
|||
return(OK); |
|||
case BSIM4v2_CDGB: |
|||
value->rValue = here->BSIM4v2cdgb; |
|||
return(OK); |
|||
case BSIM4v2_CDDB: |
|||
value->rValue = here->BSIM4v2cddb; |
|||
return(OK); |
|||
case BSIM4v2_CDSB: |
|||
value->rValue = here->BSIM4v2cdsb; |
|||
return(OK); |
|||
case BSIM4v2_CBGB: |
|||
value->rValue = here->BSIM4v2cbgb; |
|||
return(OK); |
|||
case BSIM4v2_CBDB: |
|||
value->rValue = here->BSIM4v2cbdb; |
|||
return(OK); |
|||
case BSIM4v2_CBSB: |
|||
value->rValue = here->BSIM4v2cbsb; |
|||
return(OK); |
|||
case BSIM4v2_CSGB: |
|||
value->rValue = here->BSIM4v2csgb; |
|||
return(OK); |
|||
case BSIM4v2_CSDB: |
|||
value->rValue = here->BSIM4v2csdb; |
|||
return(OK); |
|||
case BSIM4v2_CSSB: |
|||
value->rValue = here->BSIM4v2cssb; |
|||
return(OK); |
|||
case BSIM4v2_CGBB: |
|||
value->rValue = here->BSIM4v2cgbb; |
|||
return(OK); |
|||
case BSIM4v2_CDBB: |
|||
value->rValue = here->BSIM4v2cdbb; |
|||
return(OK); |
|||
case BSIM4v2_CSBB: |
|||
value->rValue = here->BSIM4v2csbb; |
|||
return(OK); |
|||
case BSIM4v2_CBBB: |
|||
value->rValue = here->BSIM4v2cbbb; |
|||
return(OK); |
|||
case BSIM4v2_CAPBD: |
|||
value->rValue = here->BSIM4v2capbd; |
|||
return(OK); |
|||
case BSIM4v2_CAPBS: |
|||
value->rValue = here->BSIM4v2capbs; |
|||
return(OK); |
|||
case BSIM4v2_VON: |
|||
value->rValue = here->BSIM4v2von; |
|||
return(OK); |
|||
case BSIM4v2_VDSAT: |
|||
value->rValue = here->BSIM4v2vdsat; |
|||
return(OK); |
|||
case BSIM4v2_QBS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qbs); |
|||
return(OK); |
|||
case BSIM4v2_QBD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v2qbd); |
|||
return(OK); |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
/* NOTREACHED */ |
|||
} |
|||
|
|||
@ -0,0 +1,564 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4check.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v2def.h" |
|||
#include "trandefs.h" |
|||
#include "const.h" |
|||
#include "sperror.h" |
|||
#include "devdefs.h" |
|||
|
|||
int |
|||
BSIM4v2checkModel(model, here, ckt) |
|||
BSIM4v2model *model; |
|||
BSIM4v2instance *here; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
struct bsim4SizeDependParam *pParam; |
|||
int Fatal_Flag = 0; |
|||
FILE *fplog; |
|||
|
|||
if ((fplog = fopen("bsim4.out", "w")) != NULL) |
|||
{ pParam = here->pParam; |
|||
fprintf(fplog, "BSIM4v2: Berkeley Short Channel IGFET Model-4\n"); |
|||
fprintf(fplog, "Developed by Weidong Liu, Xuemei Xi , Xiaodong Jin, Kanyu M. Cao and Prof. Chenming Hu in 2001.\n"); |
|||
fprintf(fplog, "\n"); |
|||
fprintf(fplog, "++++++++++ BSIM4v2 PARAMETER CHECKING BELOW ++++++++++\n"); |
|||
|
|||
if (strcmp(model->BSIM4v2version, "4.2.1") != 0) |
|||
{ fprintf(fplog, "Warning: This model is BSIM4.2.1; you specified a wrong version number.\n"); |
|||
printf("Warning: This model is BSIM4.2.1; you specified a wrong version number.\n"); |
|||
} |
|||
fprintf(fplog, "Model = %s\n", model->BSIM4v2modName); |
|||
|
|||
|
|||
if ((here->BSIM4v2rgateMod == 2) || (here->BSIM4v2rgateMod == 3)) |
|||
{ if ((here->BSIM4v2trnqsMod == 1) || (here->BSIM4v2acnqsMod == 1)) |
|||
{ fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); |
|||
printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); |
|||
} |
|||
} |
|||
|
|||
|
|||
if (model->BSIM4v2toxe <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxe = %g is not positive.\n", |
|||
model->BSIM4v2toxe); |
|||
printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v2toxe); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v2toxp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", |
|||
model->BSIM4v2toxp); |
|||
printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v2toxp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (model->BSIM4v2toxm <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", |
|||
model->BSIM4v2toxm); |
|||
printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v2toxm); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (model->BSIM4v2toxref <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxref = %g is not positive.\n", |
|||
model->BSIM4v2toxref); |
|||
printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v2toxref); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2lpe0 < -pParam->BSIM4v2leff) |
|||
{ fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", |
|||
pParam->BSIM4v2lpe0); |
|||
printf("Fatal: Lpe0 = %g is less than -Leff.\n", |
|||
pParam->BSIM4v2lpe0); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2lpeb < -pParam->BSIM4v2leff) |
|||
{ fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", |
|||
pParam->BSIM4v2lpeb); |
|||
printf("Fatal: Lpeb = %g is less than -Leff.\n", |
|||
pParam->BSIM4v2lpeb); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2phin < -0.4) |
|||
{ fprintf(fplog, "Fatal: Phin = %g is less than -0.4.\n", |
|||
pParam->BSIM4v2phin); |
|||
printf("Fatal: Phin = %g is less than -0.4.\n", |
|||
pParam->BSIM4v2phin); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2ndep <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Ndep = %g is not positive.\n", |
|||
pParam->BSIM4v2ndep); |
|||
printf("Fatal: Ndep = %g is not positive.\n", |
|||
pParam->BSIM4v2ndep); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2nsub <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", |
|||
pParam->BSIM4v2nsub); |
|||
printf("Fatal: Nsub = %g is not positive.\n", |
|||
pParam->BSIM4v2nsub); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2ngate < 0.0) |
|||
{ fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", |
|||
pParam->BSIM4v2ngate); |
|||
printf("Fatal: Ngate = %g Ngate is not positive.\n", |
|||
pParam->BSIM4v2ngate); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2ngate > 1.e25) |
|||
{ fprintf(fplog, "Fatal: Ngate = %g is too high.\n", |
|||
pParam->BSIM4v2ngate); |
|||
printf("Fatal: Ngate = %g Ngate is too high\n", |
|||
pParam->BSIM4v2ngate); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2xj <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Xj = %g is not positive.\n", |
|||
pParam->BSIM4v2xj); |
|||
printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v2xj); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2dvt1 < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", |
|||
pParam->BSIM4v2dvt1); |
|||
printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v2dvt1); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2dvt1w < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", |
|||
pParam->BSIM4v2dvt1w); |
|||
printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v2dvt1w); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2w0 == -pParam->BSIM4v2weff) |
|||
{ fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); |
|||
printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2dsub < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v2dsub); |
|||
printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v2dsub); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2b1 == -pParam->BSIM4v2weff) |
|||
{ fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); |
|||
printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2u0temp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM4v2u0temp); |
|||
printf("Fatal: u0 at current temperature = %g is not positive.\n", |
|||
pParam->BSIM4v2u0temp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2delta < 0.0) |
|||
{ fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", |
|||
pParam->BSIM4v2delta); |
|||
printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v2delta); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2vsattemp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM4v2vsattemp); |
|||
printf("Fatal: Vsat at current temperature = %g is not positive.\n", |
|||
pParam->BSIM4v2vsattemp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2pclm <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v2pclm); |
|||
printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v2pclm); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2drout < 0.0) |
|||
{ fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v2drout); |
|||
printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v2drout); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2pscbe2 <= 0.0) |
|||
{ fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", |
|||
pParam->BSIM4v2pscbe2); |
|||
printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v2pscbe2); |
|||
} |
|||
|
|||
if (here->BSIM4v2nf < 1.0) |
|||
{ fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v2nf); |
|||
printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v2nf); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if ((here->BSIM4v2l + model->BSIM4v2xl) <= model->BSIM4v2xgl) |
|||
{ fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); |
|||
printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v2ngcon < 1.0) |
|||
{ fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n"); |
|||
printf("Fatal: The parameter ngcon cannot be smaller than one.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if ((model->BSIM4v2ngcon != 1.0) && (model->BSIM4v2ngcon != 2.0)) |
|||
{ model->BSIM4v2ngcon = 1.0; |
|||
fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); |
|||
printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); |
|||
} |
|||
|
|||
if (model->BSIM4v2gbmin < 1.0e-20) |
|||
{ fprintf(fplog, "Warning: Gbmin = %g is too small.\n", |
|||
model->BSIM4v2gbmin); |
|||
printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v2gbmin); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2noff < 0.1) |
|||
{ fprintf(fplog, "Warning: Noff = %g is too small.\n", |
|||
pParam->BSIM4v2noff); |
|||
printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v2noff); |
|||
} |
|||
if (pParam->BSIM4v2noff > 4.0) |
|||
{ fprintf(fplog, "Warning: Noff = %g is too large.\n", |
|||
pParam->BSIM4v2noff); |
|||
printf("Warning: Noff = %g is too large.\n", pParam->BSIM4v2noff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2voffcv < -0.5) |
|||
{ fprintf(fplog, "Warning: Voffcv = %g is too small.\n", |
|||
pParam->BSIM4v2voffcv); |
|||
printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v2voffcv); |
|||
} |
|||
if (pParam->BSIM4v2voffcv > 0.5) |
|||
{ fprintf(fplog, "Warning: Voffcv = %g is too large.\n", |
|||
pParam->BSIM4v2voffcv); |
|||
printf("Warning: Voffcv = %g is too large.\n", pParam->BSIM4v2voffcv); |
|||
} |
|||
|
|||
/* Check capacitance parameters */ |
|||
if (pParam->BSIM4v2clc < 0.0) |
|||
{ fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v2clc); |
|||
printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v2clc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2moin < 5.0) |
|||
{ fprintf(fplog, "Warning: Moin = %g is too small.\n", |
|||
pParam->BSIM4v2moin); |
|||
printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v2moin); |
|||
} |
|||
if (pParam->BSIM4v2moin > 25.0) |
|||
{ fprintf(fplog, "Warning: Moin = %g is too large.\n", |
|||
pParam->BSIM4v2moin); |
|||
printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v2moin); |
|||
} |
|||
if(model->BSIM4v2capMod ==2) { |
|||
if (pParam->BSIM4v2acde < 0.4) |
|||
{ fprintf(fplog, "Warning: Acde = %g is too small.\n", |
|||
pParam->BSIM4v2acde); |
|||
printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v2acde); |
|||
} |
|||
if (pParam->BSIM4v2acde > 1.6) |
|||
{ fprintf(fplog, "Warning: Acde = %g is too large.\n", |
|||
pParam->BSIM4v2acde); |
|||
printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v2acde); |
|||
} |
|||
} |
|||
|
|||
if (model->BSIM4v2paramChk ==1) |
|||
{ |
|||
/* Check L and W parameters */ |
|||
if (pParam->BSIM4v2leff <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", |
|||
pParam->BSIM4v2leff); |
|||
printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", |
|||
pParam->BSIM4v2leff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2leffCV <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", |
|||
pParam->BSIM4v2leffCV); |
|||
printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", |
|||
pParam->BSIM4v2leffCV); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2weff <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", |
|||
pParam->BSIM4v2weff); |
|||
printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", |
|||
pParam->BSIM4v2weff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2weffCV <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", |
|||
pParam->BSIM4v2weffCV); |
|||
printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", |
|||
pParam->BSIM4v2weffCV); |
|||
} |
|||
|
|||
/* Check threshold voltage parameters */ |
|||
if (model->BSIM4v2toxe < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", |
|||
model->BSIM4v2toxe); |
|||
printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v2toxe); |
|||
} |
|||
if (model->BSIM4v2toxp < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", |
|||
model->BSIM4v2toxp); |
|||
printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v2toxp); |
|||
} |
|||
if (model->BSIM4v2toxm < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", |
|||
model->BSIM4v2toxm); |
|||
printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v2toxm); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2ndep <= 1.0e12) |
|||
{ fprintf(fplog, "Warning: Ndep = %g may be too small.\n", |
|||
pParam->BSIM4v2ndep); |
|||
printf("Warning: Ndep = %g may be too small.\n", |
|||
pParam->BSIM4v2ndep); |
|||
} |
|||
else if (pParam->BSIM4v2ndep >= 1.0e21) |
|||
{ fprintf(fplog, "Warning: Ndep = %g may be too large.\n", |
|||
pParam->BSIM4v2ndep); |
|||
printf("Warning: Ndep = %g may be too large.\n", |
|||
pParam->BSIM4v2ndep); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2nsub <= 1.0e14) |
|||
{ fprintf(fplog, "Warning: Nsub = %g may be too small.\n", |
|||
pParam->BSIM4v2nsub); |
|||
printf("Warning: Nsub = %g may be too small.\n", |
|||
pParam->BSIM4v2nsub); |
|||
} |
|||
else if (pParam->BSIM4v2nsub >= 1.0e21) |
|||
{ fprintf(fplog, "Warning: Nsub = %g may be too large.\n", |
|||
pParam->BSIM4v2nsub); |
|||
printf("Warning: Nsub = %g may be too large.\n", |
|||
pParam->BSIM4v2nsub); |
|||
} |
|||
|
|||
if ((pParam->BSIM4v2ngate > 0.0) && |
|||
(pParam->BSIM4v2ngate <= 1.e18)) |
|||
{ fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", |
|||
pParam->BSIM4v2ngate); |
|||
printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", |
|||
pParam->BSIM4v2ngate); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2dvt0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", |
|||
pParam->BSIM4v2dvt0); |
|||
printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v2dvt0); |
|||
} |
|||
|
|||
if (fabs(1.0e-6 / (pParam->BSIM4v2w0 + pParam->BSIM4v2weff)) > 10.0) |
|||
{ fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); |
|||
printf("Warning: (W0 + Weff) may be too small.\n"); |
|||
} |
|||
|
|||
/* Check subthreshold parameters */ |
|||
if (pParam->BSIM4v2nfactor < 0.0) |
|||
{ fprintf(fplog, "Warning: Nfactor = %g is negative.\n", |
|||
pParam->BSIM4v2nfactor); |
|||
printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v2nfactor); |
|||
} |
|||
if (pParam->BSIM4v2cdsc < 0.0) |
|||
{ fprintf(fplog, "Warning: Cdsc = %g is negative.\n", |
|||
pParam->BSIM4v2cdsc); |
|||
printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v2cdsc); |
|||
} |
|||
if (pParam->BSIM4v2cdscd < 0.0) |
|||
{ fprintf(fplog, "Warning: Cdscd = %g is negative.\n", |
|||
pParam->BSIM4v2cdscd); |
|||
printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v2cdscd); |
|||
} |
|||
/* Check DIBL parameters */ |
|||
if (pParam->BSIM4v2eta0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Eta0 = %g is negative.\n", |
|||
pParam->BSIM4v2eta0); |
|||
printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM4v2eta0); |
|||
} |
|||
|
|||
/* Check Abulk parameters */ |
|||
if (fabs(1.0e-6 / (pParam->BSIM4v2b1 + pParam->BSIM4v2weff)) > 10.0) |
|||
{ fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); |
|||
printf("Warning: (B1 + Weff) may be too small.\n"); |
|||
} |
|||
|
|||
|
|||
/* Check Saturation parameters */ |
|||
if (pParam->BSIM4v2a2 < 0.01) |
|||
{ fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v2a2); |
|||
printf("Warning: A2 = %g is too small. Set to 0.01.\n", |
|||
pParam->BSIM4v2a2); |
|||
pParam->BSIM4v2a2 = 0.01; |
|||
} |
|||
else if (pParam->BSIM4v2a2 > 1.0) |
|||
{ fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", |
|||
pParam->BSIM4v2a2); |
|||
printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", |
|||
pParam->BSIM4v2a2); |
|||
pParam->BSIM4v2a2 = 1.0; |
|||
pParam->BSIM4v2a1 = 0.0; |
|||
|
|||
} |
|||
|
|||
if (pParam->BSIM4v2prwg < 0.0) |
|||
{ fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v2prwg); |
|||
printf("Warning: Prwg = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v2prwg); |
|||
pParam->BSIM4v2prwg = 0.0; |
|||
} |
|||
if (pParam->BSIM4v2rdsw < 0.0) |
|||
{ fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v2rdsw); |
|||
printf("Warning: Rdsw = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v2rdsw); |
|||
pParam->BSIM4v2rdsw = 0.0; |
|||
pParam->BSIM4v2rds0 = 0.0; |
|||
} |
|||
if (pParam->BSIM4v2rds0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v2rds0); |
|||
printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v2rds0); |
|||
pParam->BSIM4v2rds0 = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2rdswmin < 0.0) |
|||
{ fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v2rdswmin); |
|||
printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v2rdswmin); |
|||
pParam->BSIM4v2rdswmin = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2vsattemp < 1.0e3) |
|||
{ fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v2vsattemp); |
|||
printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v2vsattemp); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2fprout < 0.0) |
|||
{ fprintf(fplog, "Fatal: fprout = %g is negative.\n", |
|||
pParam->BSIM4v2fprout); |
|||
printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v2fprout); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2pdits < 0.0) |
|||
{ fprintf(fplog, "Fatal: pdits = %g is negative.\n", |
|||
pParam->BSIM4v2pdits); |
|||
printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v2pdits); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v2pditsl < 0.0) |
|||
{ fprintf(fplog, "Fatal: pditsl = %g is negative.\n", |
|||
model->BSIM4v2pditsl); |
|||
printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v2pditsl); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v2pdibl1 < 0.0) |
|||
{ fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", |
|||
pParam->BSIM4v2pdibl1); |
|||
printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v2pdibl1); |
|||
} |
|||
if (pParam->BSIM4v2pdibl2 < 0.0) |
|||
{ fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", |
|||
pParam->BSIM4v2pdibl2); |
|||
printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v2pdibl2); |
|||
} |
|||
|
|||
if (pParam->BSIM4v2nigbinv <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", |
|||
pParam->BSIM4v2nigbinv); |
|||
printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v2nigbinv); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2nigbacc <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", |
|||
pParam->BSIM4v2nigbacc); |
|||
printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v2nigbacc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2nigc <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", |
|||
pParam->BSIM4v2nigc); |
|||
printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v2nigc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2poxedge <= 0.0) |
|||
{ fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", |
|||
pParam->BSIM4v2poxedge); |
|||
printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v2poxedge); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v2pigcd <= 0.0) |
|||
{ fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", |
|||
pParam->BSIM4v2pigcd); |
|||
printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v2pigcd); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
|
|||
/* Check overlap capacitance parameters */ |
|||
if (model->BSIM4v2cgdo < 0.0) |
|||
{ fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v2cgdo); |
|||
printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v2cgdo); |
|||
model->BSIM4v2cgdo = 0.0; |
|||
} |
|||
if (model->BSIM4v2cgso < 0.0) |
|||
{ fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v2cgso); |
|||
printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v2cgso); |
|||
model->BSIM4v2cgso = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v2tnoia < 0.0) |
|||
{ fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v2tnoia); |
|||
printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v2tnoia); |
|||
model->BSIM4v2tnoia = 0.0; |
|||
} |
|||
if (model->BSIM4v2tnoib < 0.0) |
|||
{ fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v2tnoib); |
|||
printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v2tnoib); |
|||
model->BSIM4v2tnoib = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v2ntnoi < 0.0) |
|||
{ fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v2ntnoi); |
|||
printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v2ntnoi); |
|||
model->BSIM4v2ntnoi = 0.0; |
|||
} |
|||
|
|||
}/* loop for the parameter check for warning messages */ |
|||
fclose(fplog); |
|||
} |
|||
else |
|||
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); |
|||
} |
|||
|
|||
return(Fatal_Flag); |
|||
} |
|||
|
|||
@ -0,0 +1,201 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4cvtest.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v2def.h" |
|||
#include "trandefs.h" |
|||
#include "const.h" |
|||
#include "devdefs.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
|
|||
int |
|||
BSIM4v2convTest(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v2model *model = (BSIM4v2model*)inModel; |
|||
BSIM4v2instance *here; |
|||
double delvbd, delvbs, delvds, delvgd, delvgs; |
|||
double delvdbd, delvsbs; |
|||
double delvbd_jct, delvbs_jct; |
|||
double vds, vgs, vgd, vgdo, vbs, vbd; |
|||
double vdbd, vdbs, vsbs; |
|||
double cbhat, cdhat, Idtot, Ibtot; |
|||
double vses, vdes, vdedo, delvses, delvded, delvdes; |
|||
double Isestot, cseshat, Idedtot, cdedhat; |
|||
double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; |
|||
double tol0, tol1, tol2, tol3, tol4, tol5, tol6; |
|||
|
|||
for (; model != NULL; model = model->BSIM4v2nextModel) |
|||
{ for (here = model->BSIM4v2instances; here != NULL ; |
|||
here=here->BSIM4v2nextInstance) |
|||
{ |
|||
if (here->BSIM4v2owner != ARCHme) continue; |
|||
|
|||
vds = model->BSIM4v2type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v2dNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime)); |
|||
vgs = model->BSIM4v2type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v2gNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime)); |
|||
vbs = model->BSIM4v2type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v2bNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime)); |
|||
vdbs = model->BSIM4v2type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v2dbNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime)); |
|||
vsbs = model->BSIM4v2type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v2sbNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime)); |
|||
vses = model->BSIM4v2type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v2sNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime)); |
|||
vdes = model->BSIM4v2type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v2dNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v2sNodePrime)); |
|||
|
|||
vgdo = *(ckt->CKTstate0 + here->BSIM4v2vgs) |
|||
- *(ckt->CKTstate0 + here->BSIM4v2vds); |
|||
vbd = vbs - vds; |
|||
vdbd = vdbs - vds; |
|||
vgd = vgs - vds; |
|||
|
|||
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v2vbd); |
|||
delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v2vdbd); |
|||
delvgd = vgd - vgdo; |
|||
|
|||
delvds = vds - *(ckt->CKTstate0 + here->BSIM4v2vds); |
|||
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v2vgs); |
|||
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v2vbs); |
|||
delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v2vsbs); |
|||
|
|||
delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v2vses)); |
|||
vdedo = *(ckt->CKTstate0 + here->BSIM4v2vdes) |
|||
- *(ckt->CKTstate0 + here->BSIM4v2vds); |
|||
delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v2vdes); |
|||
delvded = vdes - vds - vdedo; |
|||
|
|||
delvbd_jct = (!here->BSIM4v2rbodyMod) ? delvbd : delvdbd; |
|||
delvbs_jct = (!here->BSIM4v2rbodyMod) ? delvbs : delvsbs; |
|||
|
|||
if (here->BSIM4v2mode >= 0) |
|||
{ Idtot = here->BSIM4v2cd + here->BSIM4v2csub - here->BSIM4v2cbd |
|||
+ here->BSIM4v2Igidl; |
|||
cdhat = Idtot - here->BSIM4v2gbd * delvbd_jct |
|||
+ (here->BSIM4v2gmbs + here->BSIM4v2gbbs + here->BSIM4v2ggidlb) * delvbs |
|||
+ (here->BSIM4v2gm + here->BSIM4v2gbgs + here->BSIM4v2ggidlg) * delvgs |
|||
+ (here->BSIM4v2gds + here->BSIM4v2gbds + here->BSIM4v2ggidld) * delvds; |
|||
|
|||
Igstot = here->BSIM4v2Igs + here->BSIM4v2Igcs; |
|||
cgshat = Igstot + (here->BSIM4v2gIgsg + here->BSIM4v2gIgcsg) * delvgs |
|||
+ here->BSIM4v2gIgcsd * delvds + here->BSIM4v2gIgcsb * delvbs; |
|||
|
|||
Igdtot = here->BSIM4v2Igd + here->BSIM4v2Igcd; |
|||
cgdhat = Igdtot + here->BSIM4v2gIgdg * delvgd + here->BSIM4v2gIgcdg * delvgs |
|||
+ here->BSIM4v2gIgcdd * delvds + here->BSIM4v2gIgcdb * delvbs; |
|||
|
|||
Igbtot = here->BSIM4v2Igb; |
|||
cgbhat = here->BSIM4v2Igb + here->BSIM4v2gIgbg * delvgs + here->BSIM4v2gIgbd |
|||
* delvds + here->BSIM4v2gIgbb * delvbs; |
|||
} |
|||
else |
|||
{ Idtot = here->BSIM4v2cd + here->BSIM4v2cbd - here->BSIM4v2Igisl; |
|||
cdhat = Idtot + here->BSIM4v2gbd * delvbd_jct + here->BSIM4v2gmbs |
|||
* delvbd + here->BSIM4v2gm * delvgd |
|||
- here->BSIM4v2gds * delvds - here->BSIM4v2ggislg * vgd |
|||
- here->BSIM4v2ggislb * vbd + here->BSIM4v2ggisls * vds; |
|||
|
|||
Igstot = here->BSIM4v2Igs + here->BSIM4v2Igcd; |
|||
cgshat = Igstot + here->BSIM4v2gIgsg * delvgs + here->BSIM4v2gIgcdg * delvgd |
|||
- here->BSIM4v2gIgcdd * delvds + here->BSIM4v2gIgcdb * delvbd; |
|||
|
|||
Igdtot = here->BSIM4v2Igd + here->BSIM4v2Igcs; |
|||
cgdhat = Igdtot + (here->BSIM4v2gIgdg + here->BSIM4v2gIgcsg) * delvgd |
|||
- here->BSIM4v2gIgcsd * delvds + here->BSIM4v2gIgcsb * delvbd; |
|||
|
|||
Igbtot = here->BSIM4v2Igb; |
|||
cgbhat = here->BSIM4v2Igb + here->BSIM4v2gIgbg * delvgd - here->BSIM4v2gIgbd |
|||
* delvds + here->BSIM4v2gIgbb * delvbd; |
|||
} |
|||
|
|||
Isestot = here->BSIM4v2gstot * (*(ckt->CKTstate0 + here->BSIM4v2vses)); |
|||
cseshat = Isestot + here->BSIM4v2gstot * delvses |
|||
+ here->BSIM4v2gstotd * delvds + here->BSIM4v2gstotg * delvgs |
|||
+ here->BSIM4v2gstotb * delvbs; |
|||
|
|||
Idedtot = here->BSIM4v2gdtot * vdedo; |
|||
cdedhat = Idedtot + here->BSIM4v2gdtot * delvded |
|||
+ here->BSIM4v2gdtotd * delvds + here->BSIM4v2gdtotg * delvgs |
|||
+ here->BSIM4v2gdtotb * delvbs; |
|||
|
|||
/* |
|||
* Check convergence |
|||
*/ |
|||
|
|||
if ((here->BSIM4v2off == 0) || (!(ckt->CKTmode & MODEINITFIX))) |
|||
{ tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) |
|||
+ ckt->CKTabstol; |
|||
tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) |
|||
+ ckt->CKTabstol; |
|||
tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) |
|||
+ ckt->CKTabstol; |
|||
tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) |
|||
+ ckt->CKTabstol; |
|||
tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) |
|||
+ ckt->CKTabstol; |
|||
tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) |
|||
+ ckt->CKTabstol; |
|||
|
|||
if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) |
|||
|| (fabs(cdedhat - Idedtot) >= tol2)) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
|
|||
if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) |
|||
|| (fabs(cgbhat - Igbtot) >= tol5)) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
|
|||
Ibtot = here->BSIM4v2cbs + here->BSIM4v2cbd |
|||
- here->BSIM4v2Igidl - here->BSIM4v2Igisl - here->BSIM4v2csub; |
|||
if (here->BSIM4v2mode >= 0) |
|||
{ cbhat = Ibtot + here->BSIM4v2gbd * delvbd_jct |
|||
+ here->BSIM4v2gbs * delvbs_jct - (here->BSIM4v2gbbs + here->BSIM4v2ggidlb) |
|||
* delvbs - (here->BSIM4v2gbgs + here->BSIM4v2ggidlg) * delvgs |
|||
- (here->BSIM4v2gbds + here->BSIM4v2ggidld) * delvds |
|||
- here->BSIM4v2ggislg * delvgd - here->BSIM4v2ggislb* delvbd + here->BSIM4v2ggisls * delvds ; |
|||
} |
|||
else |
|||
{ cbhat = Ibtot + here->BSIM4v2gbs * delvbs_jct + here->BSIM4v2gbd |
|||
* delvbd_jct - (here->BSIM4v2gbbs + here->BSIM4v2ggidlb) * delvbd |
|||
- (here->BSIM4v2gbgs + here->BSIM4v2ggidlg) * delvgd |
|||
+ (here->BSIM4v2gbds + here->BSIM4v2ggidld) * delvds |
|||
- here->BSIM4v2ggislg * delvgs - here->BSIM4v2ggislb * delvbs + here->BSIM4v2ggisls * delvds; |
|||
} |
|||
tol6 = ckt->CKTreltol * MAX(fabs(cbhat), |
|||
fabs(Ibtot)) + ckt->CKTabstol; |
|||
if (fabs(cbhat - Ibtot) > tol6) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4del.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "bsim4v2def.h" |
|||
#include "sperror.h" |
|||
#include "gendefs.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v2delete(inModel,name,inInst) |
|||
GENmodel *inModel; |
|||
IFuid name; |
|||
GENinstance **inInst; |
|||
{ |
|||
BSIM4v2instance **fast = (BSIM4v2instance**)inInst; |
|||
BSIM4v2model *model = (BSIM4v2model*)inModel; |
|||
BSIM4v2instance **prev = NULL; |
|||
BSIM4v2instance *here; |
|||
|
|||
for (; model ; model = model->BSIM4v2nextModel) |
|||
{ prev = &(model->BSIM4v2instances); |
|||
for (here = *prev; here ; here = *prev) |
|||
{ if (here->BSIM4v2name == name || (fast && here==*fast)) |
|||
{ *prev= here->BSIM4v2nextInstance; |
|||
FREE(here); |
|||
return(OK); |
|||
} |
|||
prev = &(here->BSIM4v2nextInstance); |
|||
} |
|||
} |
|||
return(E_NODEV); |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4dest.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "bsim4v2def.h" |
|||
|
|||
void |
|||
BSIM4v2destroy(inModel) |
|||
GENmodel **inModel; |
|||
{ |
|||
BSIM4v2model **model = (BSIM4v2model**)inModel; |
|||
BSIM4v2instance *here; |
|||
BSIM4v2instance *prev = NULL; |
|||
BSIM4v2model *mod = *model; |
|||
BSIM4v2model *oldmod = NULL; |
|||
|
|||
for (; mod ; mod = mod->BSIM4v2nextModel) |
|||
{ if(oldmod) FREE(oldmod); |
|||
oldmod = mod; |
|||
prev = (BSIM4v2instance *)NULL; |
|||
for (here = mod->BSIM4v2instances; here; here = here->BSIM4v2nextInstance) |
|||
{ if(prev) FREE(prev); |
|||
prev = here; |
|||
} |
|||
if(prev) FREE(prev); |
|||
} |
|||
if(oldmod) FREE(oldmod); |
|||
*model = NULL; |
|||
return; |
|||
} |
|||
@ -0,0 +1,382 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4geo.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
|
|||
/* |
|||
* WDLiu: |
|||
* This subrutine is a special module to process the geometry dependent |
|||
* parasitics for BSIM4v2, which calculates Ps, Pd, As, Ad, and Rs and Rd |
|||
* for multi-fingers and varous GEO and RGEO options. |
|||
*/ |
|||
|
|||
int |
|||
BSIM4v2NumFingerDiff(nf, minSD, nuIntD, nuEndD, nuIntS, nuEndS) |
|||
int minSD; |
|||
double nf, *nuIntD, *nuEndD, *nuIntS, *nuEndS; |
|||
{ |
|||
int NF; |
|||
NF = (int)nf; |
|||
if ((NF%2) != 0) |
|||
{ *nuEndD = *nuEndS = 1.0; |
|||
*nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0); |
|||
} |
|||
else |
|||
{ if (minSD == 1) /* minimize # of source */ |
|||
{ *nuEndD = 2.0; |
|||
*nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); |
|||
*nuEndS = 0.0; |
|||
*nuIntS = nf; |
|||
} |
|||
else |
|||
{ *nuEndD = 0.0; |
|||
*nuIntD = nf; |
|||
*nuEndS = 2.0; |
|||
*nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v2PAeffGeo(nf, geo, minSD, Weffcj, DMCG, DMCI, DMDG, Ps, Pd, As, Ad) |
|||
int geo, minSD; |
|||
double Weffcj, DMCG, DMCI, DMDG; |
|||
double nf, *Ps, *Pd, *As, *Ad; |
|||
{ |
|||
double T0, T1, T2; |
|||
double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer; |
|||
double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer; |
|||
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; |
|||
|
|||
if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */ |
|||
BSIM4v2NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); |
|||
|
|||
T0 = DMCG + DMCI; |
|||
T1 = DMCG + DMCG; |
|||
T2 = DMDG + DMDG; |
|||
|
|||
PSiso = PDiso = T0 + T0 + Weffcj; |
|||
PSsha = PDsha = T1; |
|||
PSmer = PDmer = T2; |
|||
|
|||
ASiso = ADiso = T0 * Weffcj; |
|||
ASsha = ADsha = DMCG * Weffcj; |
|||
ASmer = ADmer = DMDG * Weffcj; |
|||
|
|||
switch(geo) |
|||
{ case 0: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 1: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 2: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 3: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 4: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 5: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 6: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 7: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 8: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 9: /* geo = 9 and 10 happen only when nf = even */ |
|||
*Ps = PSiso + (nf - 1.0) * PSsha; |
|||
*Pd = nf * PDsha; |
|||
*As = ASiso + (nf - 1.0) * ASsha; |
|||
*Ad = nf * ADsha; |
|||
break; |
|||
case 10: |
|||
*Ps = nf * PSsha; |
|||
*Pd = PDiso + (nf - 1.0) * PDsha; |
|||
*As = nf * ASsha; |
|||
*Ad = ADiso + (nf - 1.0) * ADsha; |
|||
break; |
|||
default: |
|||
printf("Warning: Specified GEO = %d not matched\n", geo); |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v2RdseffGeo(nf, geo, rgeo, minSD, Weffcj, Rsh, DMCG, DMCI, DMDG, Type, Rtot) |
|||
int geo, rgeo, minSD, Type; |
|||
double nf, Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
double *Rtot; |
|||
{ |
|||
double Rint, Rend = 0.0; |
|||
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; |
|||
|
|||
if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */ |
|||
{ BSIM4v2NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); |
|||
|
|||
/* Internal S/D resistance -- assume shared S or D and all wide contacts */ |
|||
if (Type == 1) |
|||
{ if (nuIntS == 0.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / ( Weffcj * nuIntS); |
|||
} |
|||
else |
|||
{ if (nuIntD == 0.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / ( Weffcj * nuIntD); |
|||
} |
|||
} |
|||
|
|||
/* End S/D resistance -- geo dependent */ |
|||
switch(geo) |
|||
{ case 0: |
|||
if (Type == 1) BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 1: |
|||
if (Type == 1) BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 2: |
|||
if (Type == 1) BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 3: |
|||
if (Type == 1) BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 4: |
|||
if (Type == 1) BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else Rend = Rsh * DMDG / Weffcj; |
|||
break; |
|||
case 5: |
|||
if (Type == 1) BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else Rend = Rsh * DMDG / (Weffcj * nuEndD); |
|||
break; |
|||
case 6: |
|||
if (Type == 1) Rend = Rsh * DMDG / Weffcj; |
|||
else BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 7: |
|||
if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS); |
|||
else BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 8: |
|||
Rend = Rsh * DMDG / Weffcj; |
|||
break; |
|||
case 9: /* all wide contacts assumed for geo = 9 and 10 */ |
|||
if (Type == 1) |
|||
{ Rend = 0.5 * Rsh * DMCG / Weffcj; |
|||
if (nf == 2.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); |
|||
} |
|||
else |
|||
{ Rend = 0.0; |
|||
Rint = Rsh * DMCG / (Weffcj * nf); |
|||
} |
|||
break; |
|||
case 10: |
|||
if (Type == 1) |
|||
{ Rend = 0.0; |
|||
Rint = Rsh * DMCG / (Weffcj * nf); |
|||
} |
|||
else |
|||
{ Rend = 0.5 * Rsh * DMCG / Weffcj;; |
|||
if (nf == 2.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); |
|||
} |
|||
break; |
|||
default: |
|||
printf("Warning: Specified GEO = %d not matched\n", geo); |
|||
} |
|||
|
|||
if (Rint <= 0.0) |
|||
*Rtot = Rend; |
|||
else if (Rend <= 0.0) |
|||
*Rtot = Rint; |
|||
else |
|||
*Rtot = Rint * Rend / (Rint + Rend); |
|||
if(*Rtot==0.0) |
|||
printf("Warning: Zero resistance returned from RdseffGeo\n"); |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v2RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) |
|||
double Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
int rgeo, Type; |
|||
double nuEnd, *Rend; |
|||
{ |
|||
if (Type == 1) |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 2: |
|||
case 5: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 3: |
|||
case 4: |
|||
case 6: |
|||
if ((DMCG + DMCI) == 0.0) |
|||
printf("(DMCG + DMCI) can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
else |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 3: |
|||
case 7: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 2: |
|||
case 4: |
|||
case 8: |
|||
if ((DMCG + DMCI) == 0.0) |
|||
printf("(DMCG + DMCI) can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v2RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) |
|||
double Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
int rgeo, Type; |
|||
double nuEnd, *Rend; |
|||
{ |
|||
if (Type == 1) |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 2: |
|||
case 5: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 3: |
|||
case 4: |
|||
case 6: |
|||
if (DMCG == 0.0) |
|||
printf("DMCG can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
else |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 3: |
|||
case 7: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 2: |
|||
case 4: |
|||
case 8: |
|||
if (DMCG == 0.0) |
|||
printf("DMCG can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4getic.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v2def.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v2getic(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v2model *model = (BSIM4v2model*)inModel; |
|||
BSIM4v2instance *here; |
|||
|
|||
for (; model ; model = model->BSIM4v2nextModel) |
|||
{ for (here = model->BSIM4v2instances; here; here = here->BSIM4v2nextInstance) |
|||
{ if (here->BSIM4v2owner != ARCHme) continue; |
|||
if (!here->BSIM4v2icVDSGiven) |
|||
{ here->BSIM4v2icVDS = *(ckt->CKTrhs + here->BSIM4v2dNode) |
|||
- *(ckt->CKTrhs + here->BSIM4v2sNode); |
|||
} |
|||
if (!here->BSIM4v2icVGSGiven) |
|||
{ here->BSIM4v2icVGS = *(ckt->CKTrhs + here->BSIM4v2gNodeExt) |
|||
- *(ckt->CKTrhs + here->BSIM4v2sNode); |
|||
} |
|||
if(!here->BSIM4v2icVBSGiven) |
|||
{ here->BSIM4v2icVBS = *(ckt->CKTrhs + here->BSIM4v2bNode) |
|||
- *(ckt->CKTrhs + here->BSIM4v2sNode); |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
4492
src/spicelib/devices/bsim4v2/b4v2ld.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1877
src/spicelib/devices/bsim4v2/b4v2mask.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,47 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4mdel.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "bsim4v2def.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v2mDelete(inModel,modname,kill) |
|||
GENmodel **inModel; |
|||
IFuid modname; |
|||
GENmodel *kill; |
|||
{ |
|||
BSIM4v2model **model = (BSIM4v2model**)inModel; |
|||
BSIM4v2model *modfast = (BSIM4v2model*)kill; |
|||
BSIM4v2instance *here; |
|||
BSIM4v2instance *prev = NULL; |
|||
BSIM4v2model **oldmod; |
|||
|
|||
oldmod = model; |
|||
for (; *model ; model = &((*model)->BSIM4v2nextModel)) |
|||
{ if ((*model)->BSIM4v2modName == modname || |
|||
(modfast && *model == modfast)) |
|||
goto delgot; |
|||
oldmod = model; |
|||
} |
|||
return(E_NOMOD); |
|||
|
|||
delgot: |
|||
*oldmod = (*model)->BSIM4v2nextModel; /* cut deleted device out of list */ |
|||
for (here = (*model)->BSIM4v2instances; here; here = here->BSIM4v2nextInstance) |
|||
{ if(prev) FREE(prev); |
|||
prev = here; |
|||
} |
|||
if(prev) FREE(prev); |
|||
FREE(*model); |
|||
return(OK); |
|||
} |
|||
2532
src/spicelib/devices/bsim4v2/b4v2mpar.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,474 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4noi.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
|
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "bsim4v2def.h" |
|||
#include "cktdefs.h" |
|||
#include "iferrmsg.h" |
|||
#include "noisedef.h" |
|||
#include "const.h" |
|||
|
|||
|
|||
extern void NevalSrc(); |
|||
extern double Nintegrate(); |
|||
|
|||
/* |
|||
* WDL: 1/f noise model has been smoothed out and enhanced with |
|||
* bulk charge effect as well as physical N* equ. and necessary |
|||
* conversion into the SI unit system. |
|||
*/ |
|||
|
|||
double |
|||
BSIM4v2Eval1ovFNoise(Vds, model, here, freq, temp) |
|||
double Vds, freq, temp; |
|||
BSIM4v2model *model; |
|||
BSIM4v2instance *here; |
|||
{ |
|||
struct bsim4SizeDependParam *pParam; |
|||
double cd, esat, DelClm, EffFreq, N0, Nl; |
|||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi; |
|||
|
|||
pParam = here->pParam; |
|||
cd = fabs(here->BSIM4v2cd); |
|||
esat = 2.0 * pParam->BSIM4v2vsattemp / here->BSIM4v2ueff; |
|||
if(model->BSIM4v2em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ |
|||
else { |
|||
T0 = ((((Vds - here->BSIM4v2Vdseff) / pParam->BSIM4v2litl) |
|||
+ model->BSIM4v2em) / esat); |
|||
DelClm = pParam->BSIM4v2litl * log (MAX(T0, N_MINLOG)); |
|||
} |
|||
EffFreq = pow(freq, model->BSIM4v2ef); |
|||
T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v2ueff; |
|||
T2 = 1.0e10 * EffFreq * here->BSIM4v2Abulk * model->BSIM4v2coxe |
|||
* pParam->BSIM4v2leff * pParam->BSIM4v2leff; |
|||
N0 = model->BSIM4v2coxe * here->BSIM4v2Vgsteff / CHARGE; |
|||
Nl = model->BSIM4v2coxe * here->BSIM4v2Vgsteff |
|||
* (1.0 - here->BSIM4v2AbovVgst2Vtm * here->BSIM4v2Vdseff) / CHARGE; |
|||
|
|||
T3 = model->BSIM4v2oxideTrapDensityA |
|||
* log(MAX(((N0 + here->BSIM4v2nstar) / (Nl + here->BSIM4v2nstar)), N_MINLOG)); |
|||
T4 = model->BSIM4v2oxideTrapDensityB * (N0 - Nl); |
|||
T5 = model->BSIM4v2oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); |
|||
|
|||
T6 = CONSTboltz * temp * cd * cd; |
|||
T7 = 1.0e10 * EffFreq * pParam->BSIM4v2leff |
|||
* pParam->BSIM4v2leff * pParam->BSIM4v2weff; |
|||
T8 = model->BSIM4v2oxideTrapDensityA + model->BSIM4v2oxideTrapDensityB * Nl |
|||
+ model->BSIM4v2oxideTrapDensityC * Nl * Nl; |
|||
T9 = (Nl + here->BSIM4v2nstar) * (Nl + here->BSIM4v2nstar); |
|||
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; |
|||
return Ssi; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v2noise (mode, operation, inModel, ckt, data, OnDens) |
|||
int mode, operation; |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
Ndata *data; |
|||
double *OnDens; |
|||
{ |
|||
BSIM4v2model *model = (BSIM4v2model *)inModel; |
|||
BSIM4v2instance *here; |
|||
struct bsim4SizeDependParam *pParam; |
|||
char name[N_MXVLNTH]; |
|||
double tempOnoise; |
|||
double tempInoise; |
|||
double noizDens[BSIM4v2NSRCS]; |
|||
double lnNdens[BSIM4v2NSRCS]; |
|||
|
|||
double N0, Nl; |
|||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13; |
|||
double Vds, n, ExpArg, Ssi, Swi; |
|||
double tmp, gdpr, gspr, npart_theta, npart_beta, igsquare; |
|||
|
|||
int error, i; |
|||
|
|||
/* define the names of the noise sources */ |
|||
static char *BSIM4v2nNames[BSIM4v2NSRCS] = |
|||
{ /* Note that we have to keep the order */ |
|||
".rd", /* noise due to rd */ |
|||
".rs", /* noise due to rs */ |
|||
".rg", /* noise due to rgeltd */ |
|||
".rbps", /* noise due to rbps */ |
|||
".rbpd", /* noise due to rbpd */ |
|||
".rbpb", /* noise due to rbpb */ |
|||
".rbsb", /* noise due to rbsb */ |
|||
".rbdb", /* noise due to rbdb */ |
|||
".id", /* noise due to id */ |
|||
".1overf", /* flicker (1/f) noise */ |
|||
".igs", /* shot noise due to IGS */ |
|||
".igd", /* shot noise due to IGD */ |
|||
".igb", /* shot noise due to IGB */ |
|||
"" /* total transistor noise */ |
|||
}; |
|||
|
|||
for (; model != NULL; model = model->BSIM4v2nextModel) |
|||
{ for (here = model->BSIM4v2instances; here != NULL; |
|||
here = here->BSIM4v2nextInstance) |
|||
{ pParam = here->pParam; |
|||
switch (operation) |
|||
{ case N_OPEN: |
|||
/* see if we have to to produce a summary report */ |
|||
/* if so, name all the noise generators */ |
|||
|
|||
if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) |
|||
{ switch (mode) |
|||
{ case N_DENS: |
|||
for (i = 0; i < BSIM4v2NSRCS; i++) |
|||
{ (void) sprintf(name, "onoise.%s%s", |
|||
here->BSIM4v2name, |
|||
BSIM4v2nNames[i]); |
|||
data->namelist = (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 < BSIM4v2NSRCS; i++) |
|||
{ (void) sprintf(name, "onoise_total.%s%s", |
|||
here->BSIM4v2name, |
|||
BSIM4v2nNames[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->BSIM4v2name, |
|||
BSIM4v2nNames[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: |
|||
if (model->BSIM4v2tnoiMod == 0) |
|||
{ if (model->BSIM4v2rdsMod == 0) |
|||
{ gspr = here->BSIM4v2sourceConductance; |
|||
gdpr = here->BSIM4v2drainConductance; |
|||
if (here->BSIM4v2grdsw > 0.0) |
|||
tmp = 1.0 / here->BSIM4v2grdsw; /* tmp used below */ |
|||
else |
|||
tmp = 0.0; |
|||
} |
|||
else |
|||
{ gspr = here->BSIM4v2gstot; |
|||
gdpr = here->BSIM4v2gdtot; |
|||
tmp = 0.0; |
|||
} |
|||
} |
|||
else |
|||
{ T5 = here->BSIM4v2Vgsteff / here->BSIM4v2EsatL; |
|||
T5 *= T5; |
|||
npart_beta = 0.577 * (1.0 + T5 |
|||
* model->BSIM4v2tnoia * pParam->BSIM4v2leff); |
|||
npart_theta = 0.37 * (1.0 + T5 |
|||
* model->BSIM4v2tnoib * pParam->BSIM4v2leff); |
|||
|
|||
if (model->BSIM4v2rdsMod == 0) |
|||
{ gspr = here->BSIM4v2sourceConductance; |
|||
gdpr = here->BSIM4v2drainConductance; |
|||
} |
|||
else |
|||
{ gspr = here->BSIM4v2gstot; |
|||
gdpr = here->BSIM4v2gdtot; |
|||
} |
|||
|
|||
if ((*(ckt->CKTstates[0] + here->BSIM4v2vds)) >= 0.0) |
|||
gspr = gspr * (1.0 + npart_theta * npart_theta * gspr |
|||
/ here->BSIM4v2IdovVds); |
|||
else |
|||
gdpr = gdpr * (1.0 + npart_theta * npart_theta * gdpr |
|||
/ here->BSIM4v2IdovVds); |
|||
} |
|||
|
|||
NevalSrc(&noizDens[BSIM4v2RDNOIZ], |
|||
&lnNdens[BSIM4v2RDNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2dNodePrime, here->BSIM4v2dNode, |
|||
gdpr); |
|||
|
|||
NevalSrc(&noizDens[BSIM4v2RSNOIZ], |
|||
&lnNdens[BSIM4v2RSNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2sNodePrime, here->BSIM4v2sNode, |
|||
gspr); |
|||
|
|||
|
|||
if ((here->BSIM4v2rgateMod == 1) || (here->BSIM4v2rgateMod == 2)) |
|||
{ NevalSrc(&noizDens[BSIM4v2RGNOIZ], |
|||
&lnNdens[BSIM4v2RGNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2gNodePrime, here->BSIM4v2gNodeExt, |
|||
here->BSIM4v2grgeltd); |
|||
} |
|||
else if (here->BSIM4v2rgateMod == 3) |
|||
{ NevalSrc(&noizDens[BSIM4v2RGNOIZ], |
|||
&lnNdens[BSIM4v2RGNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2gNodeMid, here->BSIM4v2gNodeExt, |
|||
here->BSIM4v2grgeltd); |
|||
} |
|||
else |
|||
{ noizDens[BSIM4v2RGNOIZ] = 0.0; |
|||
lnNdens[BSIM4v2RGNOIZ] = |
|||
log(MAX(noizDens[BSIM4v2RGNOIZ], N_MINLOG)); |
|||
} |
|||
|
|||
|
|||
if (here->BSIM4v2rbodyMod) |
|||
{ NevalSrc(&noizDens[BSIM4v2RBPSNOIZ], |
|||
&lnNdens[BSIM4v2RBPSNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2bNodePrime, here->BSIM4v2sbNode, |
|||
here->BSIM4v2grbps); |
|||
NevalSrc(&noizDens[BSIM4v2RBPDNOIZ], |
|||
&lnNdens[BSIM4v2RBPDNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2bNodePrime, here->BSIM4v2dbNode, |
|||
here->BSIM4v2grbpd); |
|||
NevalSrc(&noizDens[BSIM4v2RBPBNOIZ], |
|||
&lnNdens[BSIM4v2RBPBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2bNodePrime, here->BSIM4v2bNode, |
|||
here->BSIM4v2grbpb); |
|||
NevalSrc(&noizDens[BSIM4v2RBSBNOIZ], |
|||
&lnNdens[BSIM4v2RBSBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2bNode, here->BSIM4v2sbNode, |
|||
here->BSIM4v2grbsb); |
|||
NevalSrc(&noizDens[BSIM4v2RBDBNOIZ], |
|||
&lnNdens[BSIM4v2RBDBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v2bNode, here->BSIM4v2dbNode, |
|||
here->BSIM4v2grbdb); |
|||
} |
|||
else |
|||
{ noizDens[BSIM4v2RBPSNOIZ] = noizDens[BSIM4v2RBPDNOIZ] = 0.0; |
|||
noizDens[BSIM4v2RBPBNOIZ] = 0.0; |
|||
noizDens[BSIM4v2RBSBNOIZ] = noizDens[BSIM4v2RBDBNOIZ] = 0.0; |
|||
lnNdens[BSIM4v2RBPSNOIZ] = |
|||
log(MAX(noizDens[BSIM4v2RBPSNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v2RBPDNOIZ] = |
|||
log(MAX(noizDens[BSIM4v2RBPDNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v2RBPBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v2RBPBNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v2RBSBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v2RBSBNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v2RBDBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v2RBDBNOIZ], N_MINLOG)); |
|||
} |
|||
|
|||
|
|||
switch(model->BSIM4v2tnoiMod) |
|||
{ case 0: |
|||
T0 = here->BSIM4v2ueff * fabs(here->BSIM4v2qinv); |
|||
T1 = T0 * tmp + pParam->BSIM4v2leff |
|||
* pParam->BSIM4v2leff; |
|||
NevalSrc(&noizDens[BSIM4v2IDNOIZ], |
|||
&lnNdens[BSIM4v2IDNOIZ], ckt, |
|||
THERMNOISE, here->BSIM4v2dNodePrime, |
|||
here->BSIM4v2sNodePrime, |
|||
(T0 / T1) * model->BSIM4v2ntnoi); |
|||
break; |
|||
case 1: |
|||
T0 = here->BSIM4v2gm + here->BSIM4v2gmbs + here->BSIM4v2gds; |
|||
T0 *= T0; |
|||
igsquare = npart_theta * npart_theta * T0 / here->BSIM4v2IdovVds; |
|||
T1 = npart_beta * (here->BSIM4v2gm |
|||
+ here->BSIM4v2gmbs) + here->BSIM4v2gds; |
|||
T2 = T1 * T1 / here->BSIM4v2IdovVds; |
|||
NevalSrc(&noizDens[BSIM4v2IDNOIZ], |
|||
&lnNdens[BSIM4v2IDNOIZ], ckt, |
|||
THERMNOISE, here->BSIM4v2dNodePrime, |
|||
here->BSIM4v2sNodePrime, (T2 - igsquare)); |
|||
break; |
|||
} |
|||
|
|||
NevalSrc(&noizDens[BSIM4v2FLNOIZ], (double*) NULL, |
|||
ckt, N_GAIN, here->BSIM4v2dNodePrime, |
|||
here->BSIM4v2sNodePrime, (double) 0.0); |
|||
|
|||
switch(model->BSIM4v2fnoiMod) |
|||
{ case 0: |
|||
noizDens[BSIM4v2FLNOIZ] *= model->BSIM4v2kf |
|||
* exp(model->BSIM4v2af |
|||
* log(MAX(fabs(here->BSIM4v2cd), |
|||
N_MINLOG))) |
|||
/ (pow(data->freq, model->BSIM4v2ef) |
|||
* pParam->BSIM4v2leff |
|||
* pParam->BSIM4v2leff |
|||
* model->BSIM4v2coxe); |
|||
break; |
|||
case 1: |
|||
Vds = *(ckt->CKTstates[0] + here->BSIM4v2vds); |
|||
if (Vds < 0.0) |
|||
Vds = -Vds; |
|||
|
|||
Ssi = BSIM4v2Eval1ovFNoise(Vds, model, here, |
|||
data->freq, ckt->CKTtemp); |
|||
T10 = model->BSIM4v2oxideTrapDensityA |
|||
* CONSTboltz * ckt->CKTtemp; |
|||
T11 = pParam->BSIM4v2weff * pParam->BSIM4v2leff |
|||
* pow(data->freq, model->BSIM4v2ef) * 1.0e10 |
|||
* here->BSIM4v2nstar * here->BSIM4v2nstar; |
|||
Swi = T10 / T11 * here->BSIM4v2cd |
|||
* here->BSIM4v2cd; |
|||
T1 = Swi + Ssi; |
|||
if (T1 > 0.0) |
|||
noizDens[BSIM4v2FLNOIZ] *= (Ssi * Swi) / T1; |
|||
else |
|||
noizDens[BSIM4v2FLNOIZ] *= 0.0; |
|||
break; |
|||
} |
|||
|
|||
lnNdens[BSIM4v2FLNOIZ] = |
|||
log(MAX(noizDens[BSIM4v2FLNOIZ], N_MINLOG)); |
|||
|
|||
|
|||
NevalSrc(&noizDens[BSIM4v2IGSNOIZ], |
|||
&lnNdens[BSIM4v2IGSNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v2gNodePrime, here->BSIM4v2sNodePrime, |
|||
(here->BSIM4v2Igs + here->BSIM4v2Igcs)); |
|||
NevalSrc(&noizDens[BSIM4v2IGDNOIZ], |
|||
&lnNdens[BSIM4v2IGDNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v2gNodePrime, here->BSIM4v2dNodePrime, |
|||
(here->BSIM4v2Igd + here->BSIM4v2Igcd)); |
|||
|
|||
NevalSrc(&noizDens[BSIM4v2IGBNOIZ], |
|||
&lnNdens[BSIM4v2IGBNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v2gNodePrime, here->BSIM4v2bNodePrime, |
|||
here->BSIM4v2Igb); |
|||
|
|||
|
|||
noizDens[BSIM4v2TOTNOIZ] = noizDens[BSIM4v2RDNOIZ] |
|||
+ noizDens[BSIM4v2RSNOIZ] + noizDens[BSIM4v2RGNOIZ] |
|||
+ noizDens[BSIM4v2RBPSNOIZ] + noizDens[BSIM4v2RBPDNOIZ] |
|||
+ noizDens[BSIM4v2RBPBNOIZ] |
|||
+ noizDens[BSIM4v2RBSBNOIZ] + noizDens[BSIM4v2RBDBNOIZ] |
|||
+ noizDens[BSIM4v2IDNOIZ] + noizDens[BSIM4v2FLNOIZ] |
|||
+ noizDens[BSIM4v2IGSNOIZ] + noizDens[BSIM4v2IGDNOIZ] |
|||
+ noizDens[BSIM4v2IGBNOIZ]; |
|||
lnNdens[BSIM4v2TOTNOIZ] = |
|||
log(MAX(noizDens[BSIM4v2TOTNOIZ], N_MINLOG)); |
|||
|
|||
*OnDens += noizDens[BSIM4v2TOTNOIZ]; |
|||
|
|||
if (data->delFreq == 0.0) |
|||
{ /* if we haven't done any previous |
|||
integration, we need to initialize our |
|||
"history" variables. |
|||
*/ |
|||
|
|||
for (i = 0; i < BSIM4v2NSRCS; i++) |
|||
{ here->BSIM4v2nVar[LNLSTDENS][i] = |
|||
lnNdens[i]; |
|||
} |
|||
|
|||
/* clear out our integration variables |
|||
if it's the first pass |
|||
*/ |
|||
if (data->freq == |
|||
((NOISEAN*) ckt->CKTcurJob)->NstartFreq) |
|||
{ for (i = 0; i < BSIM4v2NSRCS; i++) |
|||
{ here->BSIM4v2nVar[OUTNOIZ][i] = 0.0; |
|||
here->BSIM4v2nVar[INNOIZ][i] = 0.0; |
|||
} |
|||
} |
|||
} |
|||
else |
|||
{ /* data->delFreq != 0.0, |
|||
we have to integrate. |
|||
*/ |
|||
for (i = 0; i < BSIM4v2NSRCS; i++) |
|||
{ if (i != BSIM4v2TOTNOIZ) |
|||
{ tempOnoise = Nintegrate(noizDens[i], |
|||
lnNdens[i], |
|||
here->BSIM4v2nVar[LNLSTDENS][i], |
|||
data); |
|||
tempInoise = Nintegrate(noizDens[i] |
|||
* data->GainSqInv, lnNdens[i] |
|||
+ data->lnGainInv, |
|||
here->BSIM4v2nVar[LNLSTDENS][i] |
|||
+ data->lnGainInv, data); |
|||
here->BSIM4v2nVar[LNLSTDENS][i] = |
|||
lnNdens[i]; |
|||
data->outNoiz += tempOnoise; |
|||
data->inNoise += tempInoise; |
|||
if (((NOISEAN*) |
|||
ckt->CKTcurJob)->NStpsSm != 0) |
|||
{ here->BSIM4v2nVar[OUTNOIZ][i] |
|||
+= tempOnoise; |
|||
here->BSIM4v2nVar[OUTNOIZ][BSIM4v2TOTNOIZ] |
|||
+= tempOnoise; |
|||
here->BSIM4v2nVar[INNOIZ][i] |
|||
+= tempInoise; |
|||
here->BSIM4v2nVar[INNOIZ][BSIM4v2TOTNOIZ] |
|||
+= tempInoise; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if (data->prtSummary) |
|||
{ for (i = 0; i < BSIM4v2NSRCS; i++) |
|||
{ /* print a summary report */ |
|||
data->outpVector[data->outNumber++] |
|||
= noizDens[i]; |
|||
} |
|||
} |
|||
break; |
|||
case INT_NOIZ: |
|||
/* already calculated, just output */ |
|||
if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) |
|||
{ for (i = 0; i < BSIM4v2NSRCS; i++) |
|||
{ data->outpVector[data->outNumber++] |
|||
= here->BSIM4v2nVar[OUTNOIZ][i]; |
|||
data->outpVector[data->outNumber++] |
|||
= here->BSIM4v2nVar[INNOIZ][i]; |
|||
} |
|||
} |
|||
break; |
|||
} |
|||
break; |
|||
case N_CLOSE: |
|||
/* do nothing, the main calling routine will close */ |
|||
return (OK); |
|||
break; /* the plots */ |
|||
} /* switch (operation) */ |
|||
} /* for here */ |
|||
} /* for model */ |
|||
|
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,150 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4par.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "ifsim.h" |
|||
#include "bsim4v2def.h" |
|||
#include "sperror.h" |
|||
#include "fteext.h" |
|||
|
|||
int |
|||
BSIM4v2param(param,value,inst,select) |
|||
int param; |
|||
IFvalue *value; |
|||
GENinstance *inst; |
|||
IFvalue *select; |
|||
{ |
|||
double scale; |
|||
|
|||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1; |
|||
|
|||
BSIM4v2instance *here = (BSIM4v2instance*)inst; |
|||
switch(param) |
|||
{ case BSIM4v2_W: |
|||
here->BSIM4v2w = value->rValue*scale; |
|||
here->BSIM4v2wGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_L: |
|||
here->BSIM4v2l = value->rValue*scale; |
|||
here->BSIM4v2lGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_NF: |
|||
here->BSIM4v2nf = value->rValue; |
|||
here->BSIM4v2nfGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_MIN: |
|||
here->BSIM4v2min = value->iValue; |
|||
here->BSIM4v2minGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_AS: |
|||
here->BSIM4v2sourceArea = value->rValue*scale*scale; |
|||
here->BSIM4v2sourceAreaGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_AD: |
|||
here->BSIM4v2drainArea = value->rValue*scale*scale; |
|||
here->BSIM4v2drainAreaGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_PS: |
|||
here->BSIM4v2sourcePerimeter = value->rValue*scale; |
|||
here->BSIM4v2sourcePerimeterGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_PD: |
|||
here->BSIM4v2drainPerimeter = value->rValue*scale; |
|||
here->BSIM4v2drainPerimeterGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_NRS: |
|||
here->BSIM4v2sourceSquares = value->rValue; |
|||
here->BSIM4v2sourceSquaresGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_NRD: |
|||
here->BSIM4v2drainSquares = value->rValue; |
|||
here->BSIM4v2drainSquaresGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_OFF: |
|||
here->BSIM4v2off = value->iValue; |
|||
break; |
|||
case BSIM4v2_RBSB: |
|||
here->BSIM4v2rbsb = value->rValue; |
|||
here->BSIM4v2rbsbGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_RBDB: |
|||
here->BSIM4v2rbdb = value->rValue; |
|||
here->BSIM4v2rbdbGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_RBPB: |
|||
here->BSIM4v2rbpb = value->rValue; |
|||
here->BSIM4v2rbpbGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_RBPS: |
|||
here->BSIM4v2rbps = value->rValue; |
|||
here->BSIM4v2rbpsGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_RBPD: |
|||
here->BSIM4v2rbpd = value->rValue; |
|||
here->BSIM4v2rbpdGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_TRNQSMOD: |
|||
here->BSIM4v2trnqsMod = value->iValue; |
|||
here->BSIM4v2trnqsModGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_ACNQSMOD: |
|||
here->BSIM4v2acnqsMod = value->iValue; |
|||
here->BSIM4v2acnqsModGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_RBODYMOD: |
|||
here->BSIM4v2rbodyMod = value->iValue; |
|||
here->BSIM4v2rbodyModGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_RGATEMOD: |
|||
here->BSIM4v2rgateMod = value->iValue; |
|||
here->BSIM4v2rgateModGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_GEOMOD: |
|||
here->BSIM4v2geoMod = value->iValue; |
|||
here->BSIM4v2geoModGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_RGEOMOD: |
|||
here->BSIM4v2rgeoMod = value->iValue; |
|||
here->BSIM4v2rgeoModGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_IC_VDS: |
|||
here->BSIM4v2icVDS = value->rValue; |
|||
here->BSIM4v2icVDSGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_IC_VGS: |
|||
here->BSIM4v2icVGS = value->rValue; |
|||
here->BSIM4v2icVGSGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_IC_VBS: |
|||
here->BSIM4v2icVBS = value->rValue; |
|||
here->BSIM4v2icVBSGiven = TRUE; |
|||
break; |
|||
case BSIM4v2_IC: |
|||
switch(value->v.numValue) |
|||
{ case 3: |
|||
here->BSIM4v2icVBS = *(value->v.vec.rVec+2); |
|||
here->BSIM4v2icVBSGiven = TRUE; |
|||
case 2: |
|||
here->BSIM4v2icVGS = *(value->v.vec.rVec+1); |
|||
here->BSIM4v2icVGSGiven = TRUE; |
|||
case 1: |
|||
here->BSIM4v2icVDS = *(value->v.vec.rVec); |
|||
here->BSIM4v2icVDSGiven = TRUE; |
|||
break; |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
break; |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,756 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4pzld.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
|
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "cktdefs.h" |
|||
#include "complex.h" |
|||
#include "sperror.h" |
|||
#include "bsim4v2def.h" |
|||
|
|||
int |
|||
BSIM4v2pzLoad(inModel,ckt,s) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
SPcomplex *s; |
|||
{ |
|||
BSIM4v2model *model = (BSIM4v2model*)inModel; |
|||
BSIM4v2instance *here; |
|||
|
|||
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; |
|||
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; |
|||
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; |
|||
double gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; |
|||
double gstot, gstotd, gstotg, gstots, gstotb, gspr; |
|||
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; |
|||
double gIstotg, gIstotd, gIstots, gIstotb; |
|||
double gIdtotg, gIdtotd, gIdtots, gIdtotb; |
|||
double gIbtotg, gIbtotd, gIbtots, gIbtotb; |
|||
double gIgtotg, gIgtotd, gIgtots, gIgtotb; |
|||
double cgso, cgdo, cgbo; |
|||
double xcdbdb, xcsbsb, xcgmgmb, xcgmdb, xcgmsb, xcdgmb, xcsgmb; |
|||
double xcgmbb, xcbgmb; |
|||
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 T0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Cdb, Csg, Csd, Css, Csb; |
|||
double ScalingFactor = 1.0e-9; |
|||
struct bsim4SizeDependParam *pParam; |
|||
double ggidld, ggidlg, ggidlb,ggisld, ggislg, ggislb, ggisls; |
|||
|
|||
|
|||
for (; model != NULL; model = model->BSIM4v2nextModel) |
|||
{ for (here = model->BSIM4v2instances; here!= NULL; |
|||
here = here->BSIM4v2nextInstance) |
|||
{ if (here->BSIM4v2owner != ARCHme) continue; |
|||
pParam = here->pParam; |
|||
capbd = here->BSIM4v2capbd; |
|||
capbs = here->BSIM4v2capbs; |
|||
cgso = here->BSIM4v2cgso; |
|||
cgdo = here->BSIM4v2cgdo; |
|||
cgbo = pParam->BSIM4v2cgbo; |
|||
|
|||
if (here->BSIM4v2mode >= 0) |
|||
{ Gm = here->BSIM4v2gm; |
|||
Gmbs = here->BSIM4v2gmbs; |
|||
FwdSum = Gm + Gmbs; |
|||
RevSum = 0.0; |
|||
|
|||
gbbdp = -(here->BSIM4v2gbds); |
|||
gbbsp = here->BSIM4v2gbds + here->BSIM4v2gbgs + here->BSIM4v2gbbs; |
|||
gbdpg = here->BSIM4v2gbgs; |
|||
gbdpdp = here->BSIM4v2gbds; |
|||
gbdpb = here->BSIM4v2gbbs; |
|||
gbdpsp = -(gbdpg + gbdpdp + gbdpb); |
|||
|
|||
gbspdp = 0.0; |
|||
gbspg = 0.0; |
|||
gbspb = 0.0; |
|||
gbspsp = 0.0; |
|||
|
|||
if (model->BSIM4v2igcMod) |
|||
{ gIstotg = here->BSIM4v2gIgsg + here->BSIM4v2gIgcsg; |
|||
gIstotd = here->BSIM4v2gIgcsd; |
|||
gIstots = here->BSIM4v2gIgss + here->BSIM4v2gIgcss; |
|||
gIstotb = here->BSIM4v2gIgcsb; |
|||
|
|||
gIdtotg = here->BSIM4v2gIgdg + here->BSIM4v2gIgcdg; |
|||
gIdtotd = here->BSIM4v2gIgdd + here->BSIM4v2gIgcdd; |
|||
gIdtots = here->BSIM4v2gIgcds; |
|||
gIdtotb = here->BSIM4v2gIgcdb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v2igbMod) |
|||
{ gIbtotg = here->BSIM4v2gIgbg; |
|||
gIbtotd = here->BSIM4v2gIgbd; |
|||
gIbtots = here->BSIM4v2gIgbs; |
|||
gIbtotb = here->BSIM4v2gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v2igcMod != 0) || (model->BSIM4v2igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v2rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v2vgs); |
|||
else if (here->BSIM4v2rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v2vgs); |
|||
if (here->BSIM4v2rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v2gcrgd * T0; |
|||
gcrgg = here->BSIM4v2gcrgg * T0; |
|||
gcrgs = here->BSIM4v2gcrgs * T0; |
|||
gcrgb = here->BSIM4v2gcrgb * T0; |
|||
gcrgg -= here->BSIM4v2gcrg; |
|||
gcrg = here->BSIM4v2gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v2acnqsMod == 0) |
|||
{ if (here->BSIM4v2rgateMod == 3) |
|||
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v2cgbo; |
|||
xcgmdb = -cgdo; |
|||
xcgmsb = -cgso; |
|||
xcgmbb = -pParam->BSIM4v2cgbo; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggb = here->BSIM4v2cggb; |
|||
xcgdb = here->BSIM4v2cgdb; |
|||
xcgsb = here->BSIM4v2cgsb; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = here->BSIM4v2cdgb; |
|||
xcsgb = -(here->BSIM4v2cggb + here->BSIM4v2cbgb |
|||
+ here->BSIM4v2cdgb); |
|||
xcbgb = here->BSIM4v2cbgb; |
|||
} |
|||
else |
|||
{ xcggb = here->BSIM4v2cggb + cgdo + cgso |
|||
+ pParam->BSIM4v2cgbo; |
|||
xcgdb = here->BSIM4v2cgdb - cgdo; |
|||
xcgsb = here->BSIM4v2cgsb - cgso; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = here->BSIM4v2cdgb - cgdo; |
|||
xcsgb = -(here->BSIM4v2cggb + here->BSIM4v2cbgb |
|||
+ here->BSIM4v2cdgb + cgso); |
|||
xcbgb = here->BSIM4v2cbgb - pParam->BSIM4v2cgbo; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddb = here->BSIM4v2cddb + here->BSIM4v2capbd + cgdo; |
|||
xcdsb = here->BSIM4v2cdsb; |
|||
|
|||
xcsdb = -(here->BSIM4v2cgdb + here->BSIM4v2cbdb |
|||
+ here->BSIM4v2cddb); |
|||
xcssb = here->BSIM4v2capbs + cgso - (here->BSIM4v2cgsb |
|||
+ here->BSIM4v2cbsb + here->BSIM4v2cdsb); |
|||
|
|||
if (!here->BSIM4v2rbodyMod) |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); |
|||
xcbdb = here->BSIM4v2cbdb - here->BSIM4v2capbd; |
|||
xcbsb = here->BSIM4v2cbsb - here->BSIM4v2capbs; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbb = -(here->BSIM4v2cddb + here->BSIM4v2cdgb |
|||
+ here->BSIM4v2cdsb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb) |
|||
+ here->BSIM4v2capbs; |
|||
xcbdb = here->BSIM4v2cbdb; |
|||
xcbsb = here->BSIM4v2cbsb; |
|||
|
|||
xcdbdb = -here->BSIM4v2capbd; |
|||
xcsbsb = -here->BSIM4v2capbs; |
|||
} |
|||
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); |
|||
|
|||
xgtg = xgtd = xgts = xgtb = 0.0; |
|||
sxpart = 0.6; |
|||
dxpart = 0.4; |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0; |
|||
xcbgb = xcbdb = xcbsb = xcbbb = 0.0; |
|||
xcdgb = xcddb = xcdsb = xcdbb = 0.0; |
|||
xcsgb = xcsdb = xcssb = xcsbb = 0.0; |
|||
|
|||
xgtg = here->BSIM4v2gtg; |
|||
xgtd = here->BSIM4v2gtd; |
|||
xgts = here->BSIM4v2gts; |
|||
xgtb = here->BSIM4v2gtb; |
|||
|
|||
xcqgb = here->BSIM4v2cqgb; |
|||
xcqdb = here->BSIM4v2cqdb; |
|||
xcqsb = here->BSIM4v2cqsb; |
|||
xcqbb = here->BSIM4v2cqbb; |
|||
|
|||
CoxWL = model->BSIM4v2coxe * here->pParam->BSIM4v2weffCV |
|||
* here->BSIM4v2nf * here->pParam->BSIM4v2leffCV; |
|||
qcheq = -(here->BSIM4v2qgate + here->BSIM4v2qbulk); |
|||
if (fabs(qcheq) <= 1.0e-5 * CoxWL) |
|||
{ if (model->BSIM4v2xpart < 0.5) |
|||
{ dxpart = 0.4; |
|||
} |
|||
else if (model->BSIM4v2xpart > 0.5) |
|||
{ dxpart = 0.0; |
|||
} |
|||
else |
|||
{ dxpart = 0.5; |
|||
} |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ dxpart = here->BSIM4v2qdrn / qcheq; |
|||
Cdd = here->BSIM4v2cddb; |
|||
Csd = -(here->BSIM4v2cgdb + here->BSIM4v2cddb |
|||
+ here->BSIM4v2cbdb); |
|||
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; |
|||
Cdg = here->BSIM4v2cdgb; |
|||
Csg = -(here->BSIM4v2cggb + here->BSIM4v2cdgb |
|||
+ here->BSIM4v2cbgb); |
|||
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; |
|||
|
|||
Cds = here->BSIM4v2cdsb; |
|||
Css = -(here->BSIM4v2cgsb + here->BSIM4v2cdsb |
|||
+ here->BSIM4v2cbsb); |
|||
ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; |
|||
|
|||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg |
|||
+ ddxpart_dVs); |
|||
} |
|||
sxpart = 1.0 - dxpart; |
|||
dsxpart_dVd = -ddxpart_dVd; |
|||
dsxpart_dVg = -ddxpart_dVg; |
|||
dsxpart_dVs = -ddxpart_dVs; |
|||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); |
|||
} |
|||
} |
|||
else |
|||
{ Gm = -here->BSIM4v2gm; |
|||
Gmbs = -here->BSIM4v2gmbs; |
|||
FwdSum = 0.0; |
|||
RevSum = -(Gm + Gmbs); |
|||
|
|||
gbbsp = -(here->BSIM4v2gbds); |
|||
gbbdp = here->BSIM4v2gbds + here->BSIM4v2gbgs + here->BSIM4v2gbbs; |
|||
|
|||
gbdpg = 0.0; |
|||
gbdpsp = 0.0; |
|||
gbdpb = 0.0; |
|||
gbdpdp = 0.0; |
|||
|
|||
gbspg = here->BSIM4v2gbgs; |
|||
gbspsp = here->BSIM4v2gbds; |
|||
gbspb = here->BSIM4v2gbbs; |
|||
gbspdp = -(gbspg + gbspsp + gbspb); |
|||
|
|||
if (model->BSIM4v2igcMod) |
|||
{ gIstotg = here->BSIM4v2gIgsg + here->BSIM4v2gIgcdg; |
|||
gIstotd = here->BSIM4v2gIgcds; |
|||
gIstots = here->BSIM4v2gIgss + here->BSIM4v2gIgcdd; |
|||
gIstotb = here->BSIM4v2gIgcdb; |
|||
|
|||
gIdtotg = here->BSIM4v2gIgdg + here->BSIM4v2gIgcsg; |
|||
gIdtotd = here->BSIM4v2gIgdd + here->BSIM4v2gIgcss; |
|||
gIdtots = here->BSIM4v2gIgcsd; |
|||
gIdtotb = here->BSIM4v2gIgcsb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v2igbMod) |
|||
{ gIbtotg = here->BSIM4v2gIgbg; |
|||
gIbtotd = here->BSIM4v2gIgbs; |
|||
gIbtots = here->BSIM4v2gIgbd; |
|||
gIbtotb = here->BSIM4v2gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v2igcMod != 0) || (model->BSIM4v2igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v2rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v2vgs); |
|||
else if (here->BSIM4v2rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v2vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v2vgs); |
|||
if (here->BSIM4v2rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v2gcrgs * T0; |
|||
gcrgg = here->BSIM4v2gcrgg * T0; |
|||
gcrgs = here->BSIM4v2gcrgd * T0; |
|||
gcrgb = here->BSIM4v2gcrgb * T0; |
|||
gcrgg -= here->BSIM4v2gcrg; |
|||
gcrg = here->BSIM4v2gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v2acnqsMod == 0) |
|||
{ if (here->BSIM4v2rgateMod == 3) |
|||
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v2cgbo; |
|||
xcgmdb = -cgdo; |
|||
xcgmsb = -cgso; |
|||
xcgmbb = -pParam->BSIM4v2cgbo; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggb = here->BSIM4v2cggb; |
|||
xcgdb = here->BSIM4v2cgsb; |
|||
xcgsb = here->BSIM4v2cgdb; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = -(here->BSIM4v2cggb + here->BSIM4v2cbgb |
|||
+ here->BSIM4v2cdgb); |
|||
xcsgb = here->BSIM4v2cdgb; |
|||
xcbgb = here->BSIM4v2cbgb; |
|||
} |
|||
else |
|||
{ xcggb = here->BSIM4v2cggb + cgdo + cgso |
|||
+ pParam->BSIM4v2cgbo; |
|||
xcgdb = here->BSIM4v2cgsb - cgdo; |
|||
xcgsb = here->BSIM4v2cgdb - cgso; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = -(here->BSIM4v2cggb + here->BSIM4v2cbgb |
|||
+ here->BSIM4v2cdgb + cgdo); |
|||
xcsgb = here->BSIM4v2cdgb - cgso; |
|||
xcbgb = here->BSIM4v2cbgb - pParam->BSIM4v2cgbo; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddb = here->BSIM4v2capbd + cgdo - (here->BSIM4v2cgsb |
|||
+ here->BSIM4v2cbsb + here->BSIM4v2cdsb); |
|||
xcdsb = -(here->BSIM4v2cgdb + here->BSIM4v2cbdb |
|||
+ here->BSIM4v2cddb); |
|||
|
|||
xcsdb = here->BSIM4v2cdsb; |
|||
xcssb = here->BSIM4v2cddb + here->BSIM4v2capbs + cgso; |
|||
|
|||
if (!here->BSIM4v2rbodyMod) |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); |
|||
xcbdb = here->BSIM4v2cbsb - here->BSIM4v2capbd; |
|||
xcbsb = here->BSIM4v2cbdb - here->BSIM4v2capbs; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) |
|||
+ here->BSIM4v2capbd; |
|||
xcsbb = -(here->BSIM4v2cddb + here->BSIM4v2cdgb |
|||
+ here->BSIM4v2cdsb); |
|||
xcbdb = here->BSIM4v2cbsb; |
|||
xcbsb = here->BSIM4v2cbdb; |
|||
xcdbdb = -here->BSIM4v2capbd; |
|||
xcsbsb = -here->BSIM4v2capbs; |
|||
} |
|||
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); |
|||
|
|||
xgtg = xgtd = xgts = xgtb = 0.0; |
|||
sxpart = 0.4; |
|||
dxpart = 0.6; |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0; |
|||
xcbgb = xcbdb = xcbsb = xcbbb = 0.0; |
|||
xcdgb = xcddb = xcdsb = xcdbb = 0.0; |
|||
xcsgb = xcsdb = xcssb = xcsbb = 0.0; |
|||
|
|||
xgtg = here->BSIM4v2gtg; |
|||
xgtd = here->BSIM4v2gts; |
|||
xgts = here->BSIM4v2gtd; |
|||
xgtb = here->BSIM4v2gtb; |
|||
|
|||
xcqgb = here->BSIM4v2cqgb; |
|||
xcqdb = here->BSIM4v2cqsb; |
|||
xcqsb = here->BSIM4v2cqdb; |
|||
xcqbb = here->BSIM4v2cqbb; |
|||
|
|||
CoxWL = model->BSIM4v2coxe * here->pParam->BSIM4v2weffCV |
|||
* here->BSIM4v2nf * here->pParam->BSIM4v2leffCV; |
|||
qcheq = -(here->BSIM4v2qgate + here->BSIM4v2qbulk); |
|||
if (fabs(qcheq) <= 1.0e-5 * CoxWL) |
|||
{ if (model->BSIM4v2xpart < 0.5) |
|||
{ sxpart = 0.4; |
|||
} |
|||
else if (model->BSIM4v2xpart > 0.5) |
|||
{ sxpart = 0.0; |
|||
} |
|||
else |
|||
{ sxpart = 0.5; |
|||
} |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ sxpart = here->BSIM4v2qdrn / qcheq; |
|||
Css = here->BSIM4v2cddb; |
|||
Cds = -(here->BSIM4v2cgdb + here->BSIM4v2cddb |
|||
+ here->BSIM4v2cbdb); |
|||
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; |
|||
Csg = here->BSIM4v2cdgb; |
|||
Cdg = -(here->BSIM4v2cggb + here->BSIM4v2cdgb |
|||
+ here->BSIM4v2cbgb); |
|||
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; |
|||
|
|||
Csd = here->BSIM4v2cdsb; |
|||
Cdd = -(here->BSIM4v2cgsb + here->BSIM4v2cdsb |
|||
+ here->BSIM4v2cbsb); |
|||
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; |
|||
|
|||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg |
|||
+ dsxpart_dVs); |
|||
} |
|||
dxpart = 1.0 - sxpart; |
|||
ddxpart_dVd = -dsxpart_dVd; |
|||
ddxpart_dVg = -dsxpart_dVg; |
|||
ddxpart_dVs = -dsxpart_dVs; |
|||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); |
|||
} |
|||
} |
|||
|
|||
if (model->BSIM4v2rdsMod == 1) |
|||
{ gstot = here->BSIM4v2gstot; |
|||
gstotd = here->BSIM4v2gstotd; |
|||
gstotg = here->BSIM4v2gstotg; |
|||
gstots = here->BSIM4v2gstots - gstot; |
|||
gstotb = here->BSIM4v2gstotb; |
|||
|
|||
gdtot = here->BSIM4v2gdtot; |
|||
gdtotd = here->BSIM4v2gdtotd - gdtot; |
|||
gdtotg = here->BSIM4v2gdtotg; |
|||
gdtots = here->BSIM4v2gdtots; |
|||
gdtotb = here->BSIM4v2gdtotb; |
|||
} |
|||
else |
|||
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0; |
|||
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; |
|||
} |
|||
|
|||
|
|||
T1 = *(ckt->CKTstate0 + here->BSIM4v2qdef) * here->BSIM4v2gtau; |
|||
gds = here->BSIM4v2gds; |
|||
|
|||
/* |
|||
* Loading PZ matrix |
|||
*/ |
|||
|
|||
if (!model->BSIM4v2rdsMod) |
|||
{ gdpr = here->BSIM4v2drainConductance; |
|||
gspr = here->BSIM4v2sourceConductance; |
|||
} |
|||
else |
|||
gdpr = gspr = 0.0; |
|||
|
|||
if (!here->BSIM4v2rbodyMod) |
|||
{ gjbd = here->BSIM4v2gbd; |
|||
gjbs = here->BSIM4v2gbs; |
|||
} |
|||
else |
|||
gjbd = gjbs = 0.0; |
|||
|
|||
geltd = here->BSIM4v2grgeltd; |
|||
|
|||
if (here->BSIM4v2rgateMod == 1) |
|||
{ *(here->BSIM4v2GEgePtr) += geltd; |
|||
*(here->BSIM4v2GPgePtr) -= geltd; |
|||
*(here->BSIM4v2GEgpPtr) -= geltd; |
|||
|
|||
*(here->BSIM4v2GPgpPtr ) += xcggb * s->real; |
|||
*(here->BSIM4v2GPgpPtr +1) += xcggb * s->imag; |
|||
*(here->BSIM4v2GPgpPtr) += geltd - xgtg + gIgtotg; |
|||
*(here->BSIM4v2GPdpPtr ) += xcgdb * s->real; |
|||
*(here->BSIM4v2GPdpPtr +1) += xcgdb * s->imag; |
|||
*(here->BSIM4v2GPdpPtr) -= xgtd - gIgtotd; |
|||
*(here->BSIM4v2GPspPtr ) += xcgsb * s->real; |
|||
*(here->BSIM4v2GPspPtr +1) += xcgsb * s->imag; |
|||
*(here->BSIM4v2GPspPtr) -= xgts - gIgtots; |
|||
*(here->BSIM4v2GPbpPtr ) += xcgbb * s->real; |
|||
*(here->BSIM4v2GPbpPtr +1) += xcgbb * s->imag; |
|||
*(here->BSIM4v2GPbpPtr) -= xgtb - gIgtotb; |
|||
} |
|||
else if (here->BSIM4v2rgateMod == 2) |
|||
{ *(here->BSIM4v2GEgePtr) += gcrg; |
|||
*(here->BSIM4v2GEgpPtr) += gcrgg; |
|||
*(here->BSIM4v2GEdpPtr) += gcrgd; |
|||
*(here->BSIM4v2GEspPtr) += gcrgs; |
|||
*(here->BSIM4v2GEbpPtr) += gcrgb; |
|||
|
|||
*(here->BSIM4v2GPgePtr) -= gcrg; |
|||
*(here->BSIM4v2GPgpPtr ) += xcggb * s->real; |
|||
*(here->BSIM4v2GPgpPtr +1) += xcggb * s->imag; |
|||
*(here->BSIM4v2GPgpPtr) -= gcrgg + xgtg - gIgtotg; |
|||
*(here->BSIM4v2GPdpPtr ) += xcgdb * s->real; |
|||
*(here->BSIM4v2GPdpPtr +1) += xcgdb * s->imag; |
|||
*(here->BSIM4v2GPdpPtr) -= gcrgd + xgtd - gIgtotd; |
|||
*(here->BSIM4v2GPspPtr ) += xcgsb * s->real; |
|||
*(here->BSIM4v2GPspPtr +1) += xcgsb * s->imag; |
|||
*(here->BSIM4v2GPspPtr) -= gcrgs + xgts - gIgtots; |
|||
*(here->BSIM4v2GPbpPtr ) += xcgbb * s->real; |
|||
*(here->BSIM4v2GPbpPtr +1) += xcgbb * s->imag; |
|||
*(here->BSIM4v2GPbpPtr) -= gcrgb + xgtb - gIgtotb; |
|||
} |
|||
else if (here->BSIM4v2rgateMod == 3) |
|||
{ *(here->BSIM4v2GEgePtr) += geltd; |
|||
*(here->BSIM4v2GEgmPtr) -= geltd; |
|||
*(here->BSIM4v2GMgePtr) -= geltd; |
|||
*(here->BSIM4v2GMgmPtr) += geltd + gcrg; |
|||
*(here->BSIM4v2GMgmPtr ) += xcgmgmb * s->real; |
|||
*(here->BSIM4v2GMgmPtr +1) += xcgmgmb * s->imag; |
|||
|
|||
*(here->BSIM4v2GMdpPtr) += gcrgd; |
|||
*(here->BSIM4v2GMdpPtr ) += xcgmdb * s->real; |
|||
*(here->BSIM4v2GMdpPtr +1) += xcgmdb * s->imag; |
|||
*(here->BSIM4v2GMgpPtr) += gcrgg; |
|||
*(here->BSIM4v2GMspPtr) += gcrgs; |
|||
*(here->BSIM4v2GMspPtr ) += xcgmsb * s->real; |
|||
*(here->BSIM4v2GMspPtr +1) += xcgmsb * s->imag; |
|||
*(here->BSIM4v2GMbpPtr) += gcrgb; |
|||
*(here->BSIM4v2GMbpPtr ) += xcgmbb * s->real; |
|||
*(here->BSIM4v2GMbpPtr +1) += xcgmbb * s->imag; |
|||
|
|||
*(here->BSIM4v2DPgmPtr ) += xcdgmb * s->real; |
|||
*(here->BSIM4v2DPgmPtr +1) += xcdgmb * s->imag; |
|||
*(here->BSIM4v2GPgmPtr) -= gcrg; |
|||
*(here->BSIM4v2SPgmPtr ) += xcsgmb * s->real; |
|||
*(here->BSIM4v2SPgmPtr +1) += xcsgmb * s->imag; |
|||
*(here->BSIM4v2BPgmPtr ) += xcbgmb * s->real; |
|||
*(here->BSIM4v2BPgmPtr +1) += xcbgmb * s->imag; |
|||
|
|||
*(here->BSIM4v2GPgpPtr) -= gcrgg + xgtg - gIgtotg; |
|||
*(here->BSIM4v2GPgpPtr ) += xcggb * s->real; |
|||
*(here->BSIM4v2GPgpPtr +1) += xcggb * s->imag; |
|||
*(here->BSIM4v2GPdpPtr) -= gcrgd + xgtd - gIgtotd; |
|||
*(here->BSIM4v2GPdpPtr ) += xcgdb * s->real; |
|||
*(here->BSIM4v2GPdpPtr +1) += xcgdb * s->imag; |
|||
*(here->BSIM4v2GPspPtr) -= gcrgs + xgts - gIgtots; |
|||
*(here->BSIM4v2GPspPtr ) += xcgsb * s->real; |
|||
*(here->BSIM4v2GPspPtr +1) += xcgsb * s->imag; |
|||
*(here->BSIM4v2GPbpPtr) -= gcrgb + xgtb - gIgtotb; |
|||
*(here->BSIM4v2GPbpPtr ) += xcgbb * s->real; |
|||
*(here->BSIM4v2GPbpPtr +1) += xcgbb * s->imag; |
|||
} |
|||
else |
|||
{ *(here->BSIM4v2GPdpPtr ) += xcgdb * s->real; |
|||
*(here->BSIM4v2GPdpPtr +1) += xcgdb * s->imag; |
|||
*(here->BSIM4v2GPdpPtr) -= xgtd - gIgtotd; |
|||
*(here->BSIM4v2GPgpPtr ) += xcggb * s->real; |
|||
*(here->BSIM4v2GPgpPtr +1) += xcggb * s->imag; |
|||
*(here->BSIM4v2GPgpPtr) -= xgtg - gIgtotg; |
|||
*(here->BSIM4v2GPspPtr ) += xcgsb * s->real; |
|||
*(here->BSIM4v2GPspPtr +1) += xcgsb * s->imag; |
|||
*(here->BSIM4v2GPspPtr) -= xgts - gIgtots; |
|||
*(here->BSIM4v2GPbpPtr ) += xcgbb * s->real; |
|||
*(here->BSIM4v2GPbpPtr +1) += xcgbb * s->imag; |
|||
*(here->BSIM4v2GPbpPtr) -= xgtb - gIgtotb; |
|||
} |
|||
|
|||
if (model->BSIM4v2rdsMod) |
|||
{ (*(here->BSIM4v2DgpPtr) += gdtotg); |
|||
(*(here->BSIM4v2DspPtr) += gdtots); |
|||
(*(here->BSIM4v2DbpPtr) += gdtotb); |
|||
(*(here->BSIM4v2SdpPtr) += gstotd); |
|||
(*(here->BSIM4v2SgpPtr) += gstotg); |
|||
(*(here->BSIM4v2SbpPtr) += gstotb); |
|||
} |
|||
|
|||
*(here->BSIM4v2DPdpPtr ) += xcddb * s->real; |
|||
*(here->BSIM4v2DPdpPtr +1) += xcddb * s->imag; |
|||
*(here->BSIM4v2DPdpPtr) += gdpr + gds + here->BSIM4v2gbd |
|||
- gdtotd + RevSum + gbdpdp - gIdtotd |
|||
+ dxpart * xgtd + T1 * ddxpart_dVd; |
|||
*(here->BSIM4v2DPdPtr) -= gdpr + gdtot; |
|||
*(here->BSIM4v2DPgpPtr ) += xcdgb * s->real; |
|||
*(here->BSIM4v2DPgpPtr +1) += xcdgb * s->imag; |
|||
*(here->BSIM4v2DPgpPtr) += Gm - gdtotg + gbdpg - gIdtotg |
|||
+ T1 * ddxpart_dVg + dxpart * xgtg; |
|||
*(here->BSIM4v2DPspPtr ) += xcdsb * s->real; |
|||
*(here->BSIM4v2DPspPtr +1) += xcdsb * s->imag; |
|||
*(here->BSIM4v2DPspPtr) -= gds + FwdSum + gdtots - gbdpsp + gIdtots |
|||
- T1 * ddxpart_dVs - dxpart * xgts; |
|||
*(here->BSIM4v2DPbpPtr ) += xcdbb * s->real; |
|||
*(here->BSIM4v2DPbpPtr +1) += xcdbb * s->imag; |
|||
*(here->BSIM4v2DPbpPtr) -= gjbd + gdtotb - Gmbs - gbdpb + gIdtotb |
|||
- T1 * ddxpart_dVb - dxpart * xgtb; |
|||
|
|||
*(here->BSIM4v2DdpPtr) -= gdpr - gdtotd; |
|||
*(here->BSIM4v2DdPtr) += gdpr + gdtot; |
|||
|
|||
*(here->BSIM4v2SPdpPtr ) += xcsdb * s->real; |
|||
*(here->BSIM4v2SPdpPtr +1) += xcsdb * s->imag; |
|||
*(here->BSIM4v2SPdpPtr) -= gds + gstotd + RevSum - gbspdp + gIstotd |
|||
- T1 * dsxpart_dVd - sxpart * xgtd; |
|||
*(here->BSIM4v2SPgpPtr ) += xcsgb * s->real; |
|||
*(here->BSIM4v2SPgpPtr +1) += xcsgb * s->imag; |
|||
*(here->BSIM4v2SPgpPtr) -= Gm + gstotg - gbspg + gIstotg |
|||
- T1 * dsxpart_dVg - sxpart * xgtg; |
|||
*(here->BSIM4v2SPspPtr ) += xcssb * s->real; |
|||
*(here->BSIM4v2SPspPtr +1) += xcssb * s->imag; |
|||
*(here->BSIM4v2SPspPtr) += gspr + gds + here->BSIM4v2gbs - gIstots |
|||
- gstots + FwdSum + gbspsp |
|||
+ sxpart * xgts + T1 * dsxpart_dVs; |
|||
*(here->BSIM4v2SPsPtr) -= gspr + gstot; |
|||
*(here->BSIM4v2SPbpPtr ) += xcsbb * s->real; |
|||
*(here->BSIM4v2SPbpPtr +1) += xcsbb * s->imag; |
|||
*(here->BSIM4v2SPbpPtr) -= gjbs + gstotb + Gmbs - gbspb + gIstotb |
|||
- T1 * dsxpart_dVb - sxpart * xgtb; |
|||
|
|||
*(here->BSIM4v2SspPtr) -= gspr - gstots; |
|||
*(here->BSIM4v2SsPtr) += gspr + gstot; |
|||
|
|||
*(here->BSIM4v2BPdpPtr ) += xcbdb * s->real; |
|||
*(here->BSIM4v2BPdpPtr +1) += xcbdb * s->imag; |
|||
*(here->BSIM4v2BPdpPtr) -= gjbd - gbbdp + gIbtotd; |
|||
*(here->BSIM4v2BPgpPtr ) += xcbgb * s->real; |
|||
*(here->BSIM4v2BPgpPtr +1) += xcbgb * s->imag; |
|||
*(here->BSIM4v2BPgpPtr) -= here->BSIM4v2gbgs + gIbtotg; |
|||
*(here->BSIM4v2BPspPtr ) += xcbsb * s->real; |
|||
*(here->BSIM4v2BPspPtr +1) += xcbsb * s->imag; |
|||
*(here->BSIM4v2BPspPtr) -= gjbs - gbbsp + gIbtots; |
|||
*(here->BSIM4v2BPbpPtr ) += xcbbb * s->real; |
|||
*(here->BSIM4v2BPbpPtr +1) += xcbbb * s->imag; |
|||
*(here->BSIM4v2BPbpPtr) += gjbd + gjbs - here->BSIM4v2gbbs |
|||
- gIbtotb; |
|||
ggidld = here->BSIM4v2ggidld; |
|||
ggidlg = here->BSIM4v2ggidlg; |
|||
ggidlb = here->BSIM4v2ggidlb; |
|||
ggislg = here->BSIM4v2ggislg; |
|||
ggisls = here->BSIM4v2ggisls; |
|||
ggislb = here->BSIM4v2ggislb; |
|||
|
|||
/* stamp gidl */ |
|||
(*(here->BSIM4v2DPdpPtr) += ggidld); |
|||
(*(here->BSIM4v2DPgpPtr) += ggidlg); |
|||
(*(here->BSIM4v2DPspPtr) -= (ggidlg + ggidld) + ggidlb); |
|||
(*(here->BSIM4v2DPbpPtr) += ggidlb); |
|||
(*(here->BSIM4v2BPdpPtr) -= ggidld); |
|||
(*(here->BSIM4v2BPgpPtr) -= ggidlg); |
|||
(*(here->BSIM4v2BPspPtr) += (ggidlg + ggidld) + ggidlb); |
|||
(*(here->BSIM4v2BPbpPtr) -= ggidlb); |
|||
/* stamp gisl */ |
|||
(*(here->BSIM4v2SPdpPtr) -= (ggisls + ggislg) + ggislb); |
|||
(*(here->BSIM4v2SPgpPtr) += ggislg); |
|||
(*(here->BSIM4v2SPspPtr) += ggisls); |
|||
(*(here->BSIM4v2SPbpPtr) += ggislb); |
|||
(*(here->BSIM4v2BPdpPtr) += (ggislg + ggisls) + ggislb); |
|||
(*(here->BSIM4v2BPgpPtr) -= ggislg); |
|||
(*(here->BSIM4v2BPspPtr) -= ggisls); |
|||
(*(here->BSIM4v2BPbpPtr) -= ggislb); |
|||
|
|||
if (here->BSIM4v2rbodyMod) |
|||
{ (*(here->BSIM4v2DPdbPtr ) += xcdbdb * s->real); |
|||
(*(here->BSIM4v2DPdbPtr +1) += xcdbdb * s->imag); |
|||
(*(here->BSIM4v2DPdbPtr) -= here->BSIM4v2gbd); |
|||
(*(here->BSIM4v2SPsbPtr ) += xcsbsb * s->real); |
|||
(*(here->BSIM4v2SPsbPtr +1) += xcsbsb * s->imag); |
|||
(*(here->BSIM4v2SPsbPtr) -= here->BSIM4v2gbs); |
|||
|
|||
(*(here->BSIM4v2DBdpPtr ) += xcdbdb * s->real); |
|||
(*(here->BSIM4v2DBdpPtr +1) += xcdbdb * s->imag); |
|||
(*(here->BSIM4v2DBdpPtr) -= here->BSIM4v2gbd); |
|||
(*(here->BSIM4v2DBdbPtr ) -= xcdbdb * s->real); |
|||
(*(here->BSIM4v2DBdbPtr +1) -= xcdbdb * s->imag); |
|||
(*(here->BSIM4v2DBdbPtr) += here->BSIM4v2gbd + here->BSIM4v2grbpd |
|||
+ here->BSIM4v2grbdb); |
|||
(*(here->BSIM4v2DBbpPtr) -= here->BSIM4v2grbpd); |
|||
(*(here->BSIM4v2DBbPtr) -= here->BSIM4v2grbdb); |
|||
|
|||
(*(here->BSIM4v2BPdbPtr) -= here->BSIM4v2grbpd); |
|||
(*(here->BSIM4v2BPbPtr) -= here->BSIM4v2grbpb); |
|||
(*(here->BSIM4v2BPsbPtr) -= here->BSIM4v2grbps); |
|||
(*(here->BSIM4v2BPbpPtr) += here->BSIM4v2grbpd + here->BSIM4v2grbps |
|||
+ here->BSIM4v2grbpb); |
|||
/* WDL: (-here->BSIM4v2gbbs) already added to BPbpPtr */ |
|||
|
|||
(*(here->BSIM4v2SBspPtr ) += xcsbsb * s->real); |
|||
(*(here->BSIM4v2SBspPtr +1) += xcsbsb * s->imag); |
|||
(*(here->BSIM4v2SBspPtr) -= here->BSIM4v2gbs); |
|||
(*(here->BSIM4v2SBbpPtr) -= here->BSIM4v2grbps); |
|||
(*(here->BSIM4v2SBbPtr) -= here->BSIM4v2grbsb); |
|||
(*(here->BSIM4v2SBsbPtr ) -= xcsbsb * s->real); |
|||
(*(here->BSIM4v2SBsbPtr +1) -= xcsbsb * s->imag); |
|||
(*(here->BSIM4v2SBsbPtr) += here->BSIM4v2gbs |
|||
+ here->BSIM4v2grbps + here->BSIM4v2grbsb); |
|||
|
|||
(*(here->BSIM4v2BdbPtr) -= here->BSIM4v2grbdb); |
|||
(*(here->BSIM4v2BbpPtr) -= here->BSIM4v2grbpb); |
|||
(*(here->BSIM4v2BsbPtr) -= here->BSIM4v2grbsb); |
|||
(*(here->BSIM4v2BbPtr) += here->BSIM4v2grbsb + here->BSIM4v2grbdb |
|||
+ here->BSIM4v2grbpb); |
|||
} |
|||
|
|||
if (here->BSIM4v2acnqsMod) |
|||
{ *(here->BSIM4v2QqPtr ) += s->real * ScalingFactor; |
|||
*(here->BSIM4v2QqPtr +1) += s->imag * ScalingFactor; |
|||
*(here->BSIM4v2QgpPtr ) -= xcqgb * s->real; |
|||
*(here->BSIM4v2QgpPtr +1) -= xcqgb * s->imag; |
|||
*(here->BSIM4v2QdpPtr ) -= xcqdb * s->real; |
|||
*(here->BSIM4v2QdpPtr +1) -= xcqdb * s->imag; |
|||
*(here->BSIM4v2QbpPtr ) -= xcqbb * s->real; |
|||
*(here->BSIM4v2QbpPtr +1) -= xcqbb * s->imag; |
|||
*(here->BSIM4v2QspPtr ) -= xcqsb * s->real; |
|||
*(here->BSIM4v2QspPtr +1) -= xcqsb * s->imag; |
|||
|
|||
*(here->BSIM4v2GPqPtr) -= here->BSIM4v2gtau; |
|||
*(here->BSIM4v2DPqPtr) += dxpart * here->BSIM4v2gtau; |
|||
*(here->BSIM4v2SPqPtr) += sxpart * here->BSIM4v2gtau; |
|||
|
|||
*(here->BSIM4v2QqPtr) += here->BSIM4v2gtau; |
|||
*(here->BSIM4v2QgpPtr) += xgtg; |
|||
*(here->BSIM4v2QdpPtr) += xgtd; |
|||
*(here->BSIM4v2QbpPtr) += xgtb; |
|||
*(here->BSIM4v2QspPtr) += xgts; |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
1679
src/spicelib/devices/bsim4v2/b4v2set.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1497
src/spicelib/devices/bsim4v2/b4v2temp.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,60 @@ |
|||
/**** BSIM4.2.1, Released by Xuemei Xi 10/05/2001 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2001 Regents of the University of California. All rights reserved. |
|||
* File: b4trunc.c of BSIM4.2.1. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: Xuemei Xi, Kanyu M. Cao, Hui Wan, Mansun Chan, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v2def.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v2trunc(inModel,ckt,timeStep) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
double *timeStep; |
|||
{ |
|||
BSIM4v2model *model = (BSIM4v2model*)inModel; |
|||
BSIM4v2instance *here; |
|||
|
|||
#ifdef STEPDEBUG |
|||
double debugtemp; |
|||
#endif /* STEPDEBUG */ |
|||
|
|||
for (; model != NULL; model = model->BSIM4v2nextModel) |
|||
{ for (here = model->BSIM4v2instances; here != NULL; |
|||
here = here->BSIM4v2nextInstance) |
|||
{ |
|||
if (here->BSIM4v2owner != ARCHme) continue; |
|||
#ifdef STEPDEBUG |
|||
debugtemp = *timeStep; |
|||
#endif /* STEPDEBUG */ |
|||
CKTterr(here->BSIM4v2qb,ckt,timeStep); |
|||
CKTterr(here->BSIM4v2qg,ckt,timeStep); |
|||
CKTterr(here->BSIM4v2qd,ckt,timeStep); |
|||
if (here->BSIM4v2trnqsMod) |
|||
CKTterr(here->BSIM4v2qcdump,ckt,timeStep); |
|||
if (here->BSIM4v2rbodyMod) |
|||
{ CKTterr(here->BSIM4v2qbs,ckt,timeStep); |
|||
CKTterr(here->BSIM4v2qbd,ckt,timeStep); |
|||
} |
|||
if (here->BSIM4v2rgateMod == 3) |
|||
CKTterr(here->BSIM4v2qgmid,ckt,timeStep); |
|||
#ifdef STEPDEBUG |
|||
if(debugtemp != *timeStep) |
|||
{ printf("device %s reduces step from %g to %g\n", |
|||
here->BSIM4v2name,debugtemp,*timeStep); |
|||
} |
|||
#endif /* STEPDEBUG */ |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
2663
src/spicelib/devices/bsim4v2/bsim4v2def.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,54 @@ |
|||
/********** |
|||
Copyright 2001 Regents of the University of California. All rights reserved. |
|||
Author: 2000 Weidong Liu |
|||
Author: 2001 Xuemei Xi |
|||
File: bsim4ext.h |
|||
**********/ |
|||
|
|||
#ifdef __STDC__ |
|||
extern int BSIM4v2acLoad(GENmodel *,CKTcircuit*); |
|||
extern int BSIM4v2ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); |
|||
extern int BSIM4v2convTest(GENmodel *,CKTcircuit*); |
|||
extern int BSIM4v2delete(GENmodel*,IFuid,GENinstance**); |
|||
extern void BSIM4v2destroy(GENmodel**); |
|||
extern int BSIM4v2getic(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v2load(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v2mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); |
|||
extern int BSIM4v2mDelete(GENmodel**,IFuid,GENmodel*); |
|||
extern int BSIM4v2mParam(int,IFvalue*,GENmodel*); |
|||
extern void BSIM4v2mosCap(CKTcircuit*, double, double, double, double, |
|||
double, double, double, double, double, double, double, |
|||
double, double, double, double, double, double, double*, |
|||
double*, double*, double*, double*, double*, double*, double*, |
|||
double*, double*, double*, double*, double*, double*, double*, |
|||
double*); |
|||
extern int BSIM4v2param(int,IFvalue*,GENinstance*,IFvalue*); |
|||
extern int BSIM4v2pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); |
|||
extern int BSIM4v2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); |
|||
extern int BSIM4v2temp(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v2trunc(GENmodel*,CKTcircuit*,double*); |
|||
extern int BSIM4v2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); |
|||
extern int BSIM4v2unsetup(GENmodel*,CKTcircuit*); |
|||
|
|||
#else /* stdc */ |
|||
extern int BSIM4v2acLoad(); |
|||
extern int BSIM4v2delete(); |
|||
extern void BSIM4v2destroy(); |
|||
extern int BSIM4v2getic(); |
|||
extern int BSIM4v2load(); |
|||
extern int BSIM4v2mDelete(); |
|||
extern int BSIM4v2ask(); |
|||
extern int BSIM4v2mAsk(); |
|||
extern int BSIM4v2convTest(); |
|||
extern int BSIM4v2temp(); |
|||
extern int BSIM4v2mParam(); |
|||
extern void BSIM4v2mosCap(); |
|||
extern int BSIM4v2param(); |
|||
extern int BSIM4v2pzLoad(); |
|||
extern int BSIM4v2setup(); |
|||
extern int BSIM4v2trunc(); |
|||
extern int BSIM4v2noise(); |
|||
extern int BSIM4v2unsetup(); |
|||
|
|||
#endif /* stdc */ |
|||
|
|||
@ -0,0 +1,64 @@ |
|||
#include <config.h> |
|||
|
|||
#include <devdefs.h> |
|||
|
|||
#include "bsim4v2itf.h" |
|||
#include "bsim4v2ext.h" |
|||
#include "bsim4v2init.h" |
|||
|
|||
|
|||
SPICEdev BSIM4v2info = { |
|||
{ |
|||
"BSIM4v2", |
|||
"Berkeley Short Channel IGFET Model-4", |
|||
|
|||
&BSIM4v2nSize, |
|||
&BSIM4v2nSize, |
|||
BSIM4v2names, |
|||
|
|||
&BSIM4v2pTSize, |
|||
BSIM4v2pTable, |
|||
|
|||
&BSIM4v2mPTSize, |
|||
BSIM4v2mPTable, |
|||
DEV_DEFAULT |
|||
}, |
|||
|
|||
DEVparam : BSIM4v2param, |
|||
DEVmodParam : BSIM4v2mParam, |
|||
DEVload : BSIM4v2load, |
|||
DEVsetup : BSIM4v2setup, |
|||
DEVunsetup : BSIM4v2unsetup, |
|||
DEVpzSetup : BSIM4v2setup, |
|||
DEVtemperature: BSIM4v2temp, |
|||
DEVtrunc : BSIM4v2trunc, |
|||
DEVfindBranch : NULL, |
|||
DEVacLoad : BSIM4v2acLoad, |
|||
DEVaccept : NULL, |
|||
DEVdestroy : BSIM4v2destroy, |
|||
DEVmodDelete : BSIM4v2mDelete, |
|||
DEVdelete : BSIM4v2delete, |
|||
DEVsetic : BSIM4v2getic, |
|||
DEVask : BSIM4v2ask, |
|||
DEVmodAsk : BSIM4v2mAsk, |
|||
DEVpzLoad : BSIM4v2pzLoad, |
|||
DEVconvTest : BSIM4v2convTest, |
|||
DEVsenSetup : NULL, |
|||
DEVsenLoad : NULL, |
|||
DEVsenUpdate : NULL, |
|||
DEVsenAcLoad : NULL, |
|||
DEVsenPrint : NULL, |
|||
DEVsenTrunc : NULL, |
|||
DEVdisto : NULL, |
|||
DEVnoise : BSIM4v2noise, |
|||
|
|||
DEVinstSize : &BSIM4v2iSize, |
|||
DEVmodSize : &BSIM4v2mSize |
|||
}; |
|||
|
|||
|
|||
SPICEdev * |
|||
get_bsim4v2_info(void) |
|||
{ |
|||
return &BSIM4v2info; |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
#ifndef _BSIM4V2INIT_H |
|||
#define _BSIM4V2INIT_H |
|||
|
|||
extern IFparm BSIM4v2pTable[ ]; |
|||
extern IFparm BSIM4v2mPTable[ ]; |
|||
extern char *BSIM4v2names[ ]; |
|||
extern int BSIM4v2pTSize; |
|||
extern int BSIM4v2mPTSize; |
|||
extern int BSIM4v2nSize; |
|||
extern int BSIM4v2iSize; |
|||
extern int BSIM4v2mSize; |
|||
|
|||
#endif |
|||
@ -0,0 +1,13 @@ |
|||
/********** |
|||
Copyright 2001 Regents of the University of California. All rights reserved. |
|||
Author: 2000 Weidong Liu. |
|||
Author: 2001 Xuemei Xi |
|||
File: bsim4itf.h |
|||
**********/ |
|||
|
|||
#ifndef DEV_BSIM4V2 |
|||
#define DEV_BSIM4V2 |
|||
|
|||
SPICEdev *get_bsim4v2_info(void); |
|||
|
|||
#endif |
|||
@ -0,0 +1,33 @@ |
|||
|
|||
The terms under which the software is provided are as the following. |
|||
|
|||
Software is distributed as is, completely without warranty or service |
|||
support. The University of California and its employees are not liable |
|||
for the condition or performance of the software. |
|||
|
|||
The University owns the copyright but shall not be liable for any |
|||
infringement of copyright or other proprietary rights brought by third |
|||
parties against the users of the software. |
|||
|
|||
The University of California hereby disclaims all implied warranties. |
|||
|
|||
The University of California grants the users the right to modify, copy, |
|||
and redistribute the software and documentation, both within the user's |
|||
organization and externally, subject to the following restrictions: |
|||
|
|||
1. The users agree not to charge for the University of California code |
|||
itself but may charge for additions, extensions, or support. |
|||
|
|||
2. In any product based on the software, the users agree to acknowledge |
|||
the UC Berkeley BSIM Research Group that developed the software. This |
|||
acknowledgment shall appear in the product documentation. |
|||
|
|||
3. The users agree to obey all U.S. Government restrictions governing |
|||
redistribution or export of the software. |
|||
|
|||
4. The users agree to reproduce any copyright notice which appears on |
|||
the software on any copy or modification of such made available |
|||
to others. |
|||
|
|||
Chenming Hu, and Weidong Liu |
|||
Mar. 2000 |
|||
@ -0,0 +1,35 @@ |
|||
## Process this file with automake to produce Makefile.in
|
|||
|
|||
noinst_LIBRARIES = libbsim4v3.a |
|||
|
|||
libbsim4v3_a_SOURCES = \
|
|||
b4v3.c \
|
|||
b4v3acld.c \
|
|||
b4v3ask.c \
|
|||
b4v3check.c \
|
|||
b4v3cvtest.c \
|
|||
b4v3del.c \
|
|||
b4v3dest.c \
|
|||
b4v3geo.c \
|
|||
b4v3getic.c \
|
|||
b4v3ld.c \
|
|||
b4v3mask.c \
|
|||
b4v3mdel.c \
|
|||
b4v3mpar.c \
|
|||
b4v3noi.c \
|
|||
b4v3par.c \
|
|||
b4v3pzld.c \
|
|||
b4v3set.c \
|
|||
b4v3temp.c \
|
|||
b4v3trunc.c \
|
|||
bsim4v3def.h \
|
|||
bsim4v3ext.h \
|
|||
bsim4v3init.c \
|
|||
bsim4v3init.h \
|
|||
bsim4v3itf.h |
|||
|
|||
|
|||
|
|||
INCLUDES = -I$(top_srcdir)/src/include |
|||
|
|||
MAINTAINERCLEANFILES = Makefile.in |
|||
@ -0,0 +1,786 @@ |
|||
/**** BSIM4.3.0 Released by Jane Xuemei Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 11/15/2002. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "devdefs.h" |
|||
#include "bsim4v3def.h" |
|||
#include "suffix.h" |
|||
|
|||
IFparm BSIM4v3pTable[] = { /* parameters */ |
|||
IOP( "l", BSIM4v3_L, IF_REAL , "Length"), |
|||
IOP( "w", BSIM4v3_W, IF_REAL , "Width"), |
|||
IOP( "nf", BSIM4v3_NF, IF_REAL , "Number of fingers"), |
|||
IOP( "sa", BSIM4v3_SA, IF_REAL , "distance between OD edge to poly of one side "), |
|||
IOP( "sb", BSIM4v3_SB, IF_REAL , "distance between OD edge to poly of the other side"), |
|||
IOP( "sd", BSIM4v3_SD, IF_REAL , "distance between neighbour fingers"), |
|||
IOP( "min", BSIM4v3_MIN, IF_INTEGER , "Minimize either D or S"), |
|||
IOP( "ad", BSIM4v3_AD, IF_REAL , "Drain area"), |
|||
IOP( "as", BSIM4v3_AS, IF_REAL , "Source area"), |
|||
IOP( "pd", BSIM4v3_PD, IF_REAL , "Drain perimeter"), |
|||
IOP( "ps", BSIM4v3_PS, IF_REAL , "Source perimeter"), |
|||
IOP( "nrd", BSIM4v3_NRD, IF_REAL , "Number of squares in drain"), |
|||
IOP( "nrs", BSIM4v3_NRS, IF_REAL , "Number of squares in source"), |
|||
IOP( "off", BSIM4v3_OFF, IF_FLAG , "Device is initially off"), |
|||
IOP( "rbdb", BSIM4v3_RBDB, IF_REAL , "Body resistance"), |
|||
IOP( "rbsb", BSIM4v3_RBSB, IF_REAL , "Body resistance"), |
|||
IOP( "rbpb", BSIM4v3_RBPB, IF_REAL , "Body resistance"), |
|||
IOP( "rbps", BSIM4v3_RBPS, IF_REAL , "Body resistance"), |
|||
IOP( "rbpd", BSIM4v3_RBPD, IF_REAL , "Body resistance"), |
|||
IOP( "trnqsmod", BSIM4v3_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), |
|||
IOP( "acnqsmod", BSIM4v3_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), |
|||
IOP( "rbodymod", BSIM4v3_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), |
|||
IOP( "rgatemod", BSIM4v3_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), |
|||
IOP( "geomod", BSIM4v3_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), |
|||
IOP( "rgeomod", BSIM4v3_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), |
|||
IP( "ic", BSIM4v3_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), |
|||
OP( "gmbs", BSIM4v3_GMBS, IF_REAL, "Gmb"), |
|||
OP( "gm", BSIM4v3_GM, IF_REAL, "Gm"), |
|||
OP( "gds", BSIM4v3_GDS, IF_REAL, "Gds"), |
|||
OP( "vdsat", BSIM4v3_VDSAT, IF_REAL, "Vdsat"), |
|||
OP( "vth", BSIM4v3_VON, IF_REAL, "Vth"), |
|||
OP( "id", BSIM4v3_CD, IF_REAL, "Ids"), |
|||
OP( "ibd", BSIM4v3_CBD, IF_REAL, "Ibd"), |
|||
OP( "ibs", BSIM4v3_CBS, IF_REAL, "Ibs"), |
|||
OP( "isub", BSIM4v3_CSUB, IF_REAL, "Isub"), |
|||
OP( "igidl", BSIM4v3_IGIDL, IF_REAL, "Igidl"), |
|||
OP( "igisl", BSIM4v3_IGISL, IF_REAL, "Igisl"), |
|||
OP( "igs", BSIM4v3_IGS, IF_REAL, "Igs"), |
|||
OP( "igd", BSIM4v3_IGD, IF_REAL, "Igd"), |
|||
OP( "igb", BSIM4v3_IGB, IF_REAL, "Igb"), |
|||
OP( "igcs", BSIM4v3_IGCS, IF_REAL, "Igcs"), |
|||
OP( "igcd", BSIM4v3_IGCD, IF_REAL, "Igcd"), |
|||
OP( "vbs", BSIM4v3_VBS, IF_REAL, "Vbs"), |
|||
OP( "vgs", BSIM4v3_VGS, IF_REAL, "Vgs"), |
|||
OP( "vds", BSIM4v3_VDS, IF_REAL, "Vds"), |
|||
OP( "cgg", BSIM4v3_CGGB, IF_REAL, "Cggb"), |
|||
OP( "cgs", BSIM4v3_CGSB, IF_REAL, "Cgsb"), |
|||
OP( "cgd", BSIM4v3_CGDB, IF_REAL, "Cgdb"), |
|||
OP( "cbg", BSIM4v3_CBGB, IF_REAL, "Cbgb"), |
|||
OP( "cbd", BSIM4v3_CBDB, IF_REAL, "Cbdb"), |
|||
OP( "cbs", BSIM4v3_CBSB, IF_REAL, "Cbsb"), |
|||
OP( "cdg", BSIM4v3_CDGB, IF_REAL, "Cdgb"), |
|||
OP( "cdd", BSIM4v3_CDDB, IF_REAL, "Cddb"), |
|||
OP( "cds", BSIM4v3_CDSB, IF_REAL, "Cdsb"), |
|||
OP( "csg", BSIM4v3_CSGB, IF_REAL, "Csgb"), |
|||
OP( "csd", BSIM4v3_CSDB, IF_REAL, "Csdb"), |
|||
OP( "css", BSIM4v3_CSSB, IF_REAL, "Cssb"), |
|||
OP( "cgb", BSIM4v3_CGBB, IF_REAL, "Cgbb"), |
|||
OP( "cdb", BSIM4v3_CDBB, IF_REAL, "Cdbb"), |
|||
OP( "csb", BSIM4v3_CSBB, IF_REAL, "Csbb"), |
|||
OP( "cbb", BSIM4v3_CBBB, IF_REAL, "Cbbb"), |
|||
OP( "capbd", BSIM4v3_CAPBD, IF_REAL, "Capbd"), |
|||
OP( "capbs", BSIM4v3_CAPBS, IF_REAL, "Capbs"), |
|||
OP( "qg", BSIM4v3_QG, IF_REAL, "Qgate"), |
|||
OP( "qb", BSIM4v3_QB, IF_REAL, "Qbulk"), |
|||
OP( "qd", BSIM4v3_QD, IF_REAL, "Qdrain"), |
|||
OP( "qs", BSIM4v3_QS, IF_REAL, "Qsource"), |
|||
OP( "qinv", BSIM4v3_QINV, IF_REAL, "Qinversion"), |
|||
}; |
|||
|
|||
IFparm BSIM4v3mPTable[] = { /* model parameters */ |
|||
IOP( "capmod", BSIM4v3_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), |
|||
IOP( "diomod", BSIM4v3_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), |
|||
IOP( "rdsmod", BSIM4v3_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), |
|||
IOP( "trnqsmod", BSIM4v3_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), |
|||
IOP( "acnqsmod", BSIM4v3_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), |
|||
IOP( "mobmod", BSIM4v3_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), |
|||
IOP( "rbodymod", BSIM4v3_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), |
|||
IOP( "rgatemod", BSIM4v3_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), |
|||
IOP( "permod", BSIM4v3_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), |
|||
IOP( "geomod", BSIM4v3_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), |
|||
IOP( "fnoimod", BSIM4v3_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), |
|||
IOP( "tnoimod", BSIM4v3_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), |
|||
IOP( "igcmod", BSIM4v3_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), |
|||
IOP( "igbmod", BSIM4v3_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), |
|||
IOP( "tempmod", BSIM4v3_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"), |
|||
IOP( "paramchk", BSIM4v3_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), |
|||
IOP( "binunit", BSIM4v3_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), |
|||
IOP( "version", BSIM4v3_MOD_VERSION, IF_STRING, "parameter for model version"), |
|||
IOP( "toxe", BSIM4v3_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), |
|||
IOP( "toxp", BSIM4v3_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), |
|||
IOP( "toxm", BSIM4v3_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), |
|||
IOP( "toxref", BSIM4v3_MOD_TOXREF, IF_REAL, "Target tox value"), |
|||
IOP( "dtox", BSIM4v3_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), |
|||
IOP( "epsrox", BSIM4v3_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), |
|||
IOP( "cdsc", BSIM4v3_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), |
|||
IOP( "cdscb", BSIM4v3_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), |
|||
IOP( "cdscd", BSIM4v3_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), |
|||
IOP( "cit", BSIM4v3_MOD_CIT, IF_REAL, "Interface state capacitance"), |
|||
IOP( "nfactor", BSIM4v3_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), |
|||
IOP( "xj", BSIM4v3_MOD_XJ, IF_REAL, "Junction depth in meters"), |
|||
IOP( "vsat", BSIM4v3_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), |
|||
IOP( "at", BSIM4v3_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), |
|||
IOP( "a0", BSIM4v3_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), |
|||
IOP( "ags", BSIM4v3_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), |
|||
IOP( "a1", BSIM4v3_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), |
|||
IOP( "a2", BSIM4v3_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), |
|||
IOP( "keta", BSIM4v3_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), |
|||
IOP( "nsub", BSIM4v3_MOD_NSUB, IF_REAL, "Substrate doping concentration"), |
|||
IOP( "ndep", BSIM4v3_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), |
|||
IOP( "nsd", BSIM4v3_MOD_NSD, IF_REAL, "S/D doping concentration"), |
|||
IOP( "phin", BSIM4v3_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), |
|||
IOP( "ngate", BSIM4v3_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), |
|||
IOP( "gamma1", BSIM4v3_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), |
|||
IOP( "gamma2", BSIM4v3_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), |
|||
IOP( "vbx", BSIM4v3_MOD_VBX, IF_REAL, "Vth transition body Voltage"), |
|||
IOP( "vbm", BSIM4v3_MOD_VBM, IF_REAL, "Maximum body voltage"), |
|||
|
|||
IOP( "xt", BSIM4v3_MOD_XT, IF_REAL, "Doping depth"), |
|||
IOP( "k1", BSIM4v3_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), |
|||
IOP( "kt1", BSIM4v3_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), |
|||
IOP( "kt1l", BSIM4v3_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), |
|||
IOP( "kt2", BSIM4v3_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), |
|||
IOP( "k2", BSIM4v3_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), |
|||
IOP( "k3", BSIM4v3_MOD_K3, IF_REAL, "Narrow width effect coefficient"), |
|||
IOP( "k3b", BSIM4v3_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), |
|||
IOP( "w0", BSIM4v3_MOD_W0, IF_REAL, "Narrow width effect parameter"), |
|||
IOP( "dvtp0", BSIM4v3_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), |
|||
IOP( "dvtp1", BSIM4v3_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), |
|||
IOP( "lpe0", BSIM4v3_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), |
|||
IOP( "lpeb", BSIM4v3_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), |
|||
IOP( "dvt0", BSIM4v3_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), |
|||
IOP( "dvt1", BSIM4v3_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), |
|||
IOP( "dvt2", BSIM4v3_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), |
|||
IOP( "dvt0w", BSIM4v3_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), |
|||
IOP( "dvt1w", BSIM4v3_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), |
|||
IOP( "dvt2w", BSIM4v3_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), |
|||
IOP( "drout", BSIM4v3_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), |
|||
IOP( "dsub", BSIM4v3_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), |
|||
IOP( "vth0", BSIM4v3_MOD_VTH0, IF_REAL,"Threshold voltage"), |
|||
IOP( "vtho", BSIM4v3_MOD_VTH0, IF_REAL,"Threshold voltage"), |
|||
IOP( "ua", BSIM4v3_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), |
|||
IOP( "ua1", BSIM4v3_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), |
|||
IOP( "ub", BSIM4v3_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), |
|||
IOP( "ub1", BSIM4v3_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), |
|||
IOP( "uc", BSIM4v3_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), |
|||
IOP( "uc1", BSIM4v3_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), |
|||
IOP( "u0", BSIM4v3_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), |
|||
IOP( "eu", BSIM4v3_MOD_EU, IF_REAL, "Mobility exponent"), |
|||
IOP( "ute", BSIM4v3_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), |
|||
IOP( "voff", BSIM4v3_MOD_VOFF, IF_REAL, "Threshold voltage offset"), |
|||
IOP( "minv", BSIM4v3_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"), |
|||
IOP( "voffl", BSIM4v3_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), |
|||
IOP( "tnom", BSIM4v3_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), |
|||
IOP( "cgso", BSIM4v3_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), |
|||
IOP( "cgdo", BSIM4v3_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), |
|||
IOP( "cgbo", BSIM4v3_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), |
|||
IOP( "xpart", BSIM4v3_MOD_XPART, IF_REAL, "Channel charge partitioning"), |
|||
IOP( "delta", BSIM4v3_MOD_DELTA, IF_REAL, "Effective Vds parameter"), |
|||
IOP( "rsh", BSIM4v3_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), |
|||
IOP( "rdsw", BSIM4v3_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), |
|||
IOP( "rdswmin", BSIM4v3_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), |
|||
IOP( "rsw", BSIM4v3_MOD_RSW, IF_REAL, "Source resistance per width"), |
|||
IOP( "rdw", BSIM4v3_MOD_RDW, IF_REAL, "Drain resistance per width"), |
|||
IOP( "rdwmin", BSIM4v3_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), |
|||
IOP( "rswmin", BSIM4v3_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), |
|||
|
|||
IOP( "prwg", BSIM4v3_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), |
|||
IOP( "prwb", BSIM4v3_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), |
|||
|
|||
IOP( "prt", BSIM4v3_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), |
|||
IOP( "eta0", BSIM4v3_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), |
|||
IOP( "etab", BSIM4v3_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), |
|||
IOP( "pclm", BSIM4v3_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), |
|||
IOP( "pdiblc1", BSIM4v3_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), |
|||
IOP( "pdiblc2", BSIM4v3_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), |
|||
IOP( "pdiblcb", BSIM4v3_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), |
|||
IOP( "fprout", BSIM4v3_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), |
|||
IOP( "pdits", BSIM4v3_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), |
|||
IOP( "pditsl", BSIM4v3_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), |
|||
IOP( "pditsd", BSIM4v3_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), |
|||
IOP( "pscbe1", BSIM4v3_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), |
|||
IOP( "pscbe2", BSIM4v3_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), |
|||
IOP( "pvag", BSIM4v3_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), |
|||
|
|||
IOP( "jss", BSIM4v3_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), |
|||
IOP( "jsws", BSIM4v3_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), |
|||
IOP( "jswgs", BSIM4v3_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), |
|||
IOP( "pbs", BSIM4v3_MOD_PBS, IF_REAL, "Source junction built-in potential"), |
|||
IOP( "njs", BSIM4v3_MOD_NJS, IF_REAL, "Source junction emission coefficient"), |
|||
IOP( "xtis", BSIM4v3_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), |
|||
IOP( "mjs", BSIM4v3_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), |
|||
IOP( "pbsws", BSIM4v3_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), |
|||
IOP( "mjsws", BSIM4v3_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), |
|||
IOP( "pbswgs", BSIM4v3_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), |
|||
IOP( "mjswgs", BSIM4v3_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), |
|||
IOP( "cjs", BSIM4v3_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), |
|||
IOP( "cjsws", BSIM4v3_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), |
|||
IOP( "cjswgs", BSIM4v3_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), |
|||
|
|||
IOP( "jsd", BSIM4v3_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), |
|||
IOP( "jswd", BSIM4v3_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), |
|||
IOP( "jswgd", BSIM4v3_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), |
|||
IOP( "pbd", BSIM4v3_MOD_PBD, IF_REAL, "Drain junction built-in potential"), |
|||
IOP( "njd", BSIM4v3_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), |
|||
IOP( "xtid", BSIM4v3_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), |
|||
IOP( "mjd", BSIM4v3_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), |
|||
IOP( "pbswd", BSIM4v3_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), |
|||
IOP( "mjswd", BSIM4v3_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), |
|||
IOP( "pbswgd", BSIM4v3_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), |
|||
IOP( "mjswgd", BSIM4v3_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), |
|||
IOP( "cjd", BSIM4v3_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), |
|||
IOP( "cjswd", BSIM4v3_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), |
|||
IOP( "cjswgd", BSIM4v3_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), |
|||
|
|||
IOP( "vfbcv", BSIM4v3_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), |
|||
IOP( "vfb", BSIM4v3_MOD_VFB, IF_REAL, "Flat Band Voltage"), |
|||
IOP( "tpb", BSIM4v3_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), |
|||
IOP( "tcj", BSIM4v3_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), |
|||
IOP( "tpbsw", BSIM4v3_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), |
|||
IOP( "tcjsw", BSIM4v3_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), |
|||
IOP( "tpbswg", BSIM4v3_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), |
|||
IOP( "tcjswg", BSIM4v3_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), |
|||
IOP( "acde", BSIM4v3_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), |
|||
IOP( "moin", BSIM4v3_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), |
|||
IOP( "noff", BSIM4v3_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), |
|||
IOP( "voffcv", BSIM4v3_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), |
|||
IOP( "dmcg", BSIM4v3_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), |
|||
IOP( "dmci", BSIM4v3_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), |
|||
IOP( "dmdg", BSIM4v3_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), |
|||
IOP( "dmcgt", BSIM4v3_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), |
|||
IOP( "xgw", BSIM4v3_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), |
|||
IOP( "xgl", BSIM4v3_MOD_XGL, IF_REAL, "Variation in Ldrawn"), |
|||
IOP( "rshg", BSIM4v3_MOD_RSHG, IF_REAL, "Gate sheet resistance"), |
|||
IOP( "ngcon", BSIM4v3_MOD_NGCON, IF_REAL, "Number of gate contacts"), |
|||
IOP( "xrcrg1", BSIM4v3_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), |
|||
IOP( "xrcrg2", BSIM4v3_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), |
|||
IOP( "lambda", BSIM4v3_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"), |
|||
IOP( "vtl", BSIM4v3_MOD_VTL, IF_REAL, " thermal velocity"), |
|||
IOP( "lc", BSIM4v3_MOD_LC, IF_REAL, " back scattering parameter"), |
|||
IOP( "xn", BSIM4v3_MOD_XN, IF_REAL, " back scattering parameter"), |
|||
IOP( "lint", BSIM4v3_MOD_LINT, IF_REAL, "Length reduction parameter"), |
|||
IOP( "ll", BSIM4v3_MOD_LL, IF_REAL, "Length reduction parameter"), |
|||
IOP( "llc", BSIM4v3_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lln", BSIM4v3_MOD_LLN, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lw", BSIM4v3_MOD_LW, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwc", BSIM4v3_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lwn", BSIM4v3_MOD_LWN, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwl", BSIM4v3_MOD_LWL, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwlc", BSIM4v3_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lmin", BSIM4v3_MOD_LMIN, IF_REAL, "Minimum length for the model"), |
|||
IOP( "lmax", BSIM4v3_MOD_LMAX, IF_REAL, "Maximum length for the model"), |
|||
|
|||
IOP( "wr", BSIM4v3_MOD_WR, IF_REAL, "Width dependence of rds"), |
|||
IOP( "wint", BSIM4v3_MOD_WINT, IF_REAL, "Width reduction parameter"), |
|||
IOP( "dwg", BSIM4v3_MOD_DWG, IF_REAL, "Width reduction parameter"), |
|||
IOP( "dwb", BSIM4v3_MOD_DWB, IF_REAL, "Width reduction parameter"), |
|||
|
|||
IOP( "wl", BSIM4v3_MOD_WL, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wlc", BSIM4v3_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wln", BSIM4v3_MOD_WLN, IF_REAL, "Width reduction parameter"), |
|||
IOP( "ww", BSIM4v3_MOD_WW, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwc", BSIM4v3_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wwn", BSIM4v3_MOD_WWN, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwl", BSIM4v3_MOD_WWL, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwlc", BSIM4v3_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wmin", BSIM4v3_MOD_WMIN, IF_REAL, "Minimum width for the model"), |
|||
IOP( "wmax", BSIM4v3_MOD_WMAX, IF_REAL, "Maximum width for the model"), |
|||
|
|||
IOP( "b0", BSIM4v3_MOD_B0, IF_REAL, "Abulk narrow width parameter"), |
|||
IOP( "b1", BSIM4v3_MOD_B1, IF_REAL, "Abulk narrow width parameter"), |
|||
|
|||
IOP( "cgsl", BSIM4v3_MOD_CGSL, IF_REAL, "New C-V model parameter"), |
|||
IOP( "cgdl", BSIM4v3_MOD_CGDL, IF_REAL, "New C-V model parameter"), |
|||
IOP( "ckappas", BSIM4v3_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), |
|||
IOP( "ckappad", BSIM4v3_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), |
|||
IOP( "cf", BSIM4v3_MOD_CF, IF_REAL, "Fringe capacitance parameter"), |
|||
IOP( "clc", BSIM4v3_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), |
|||
IOP( "cle", BSIM4v3_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), |
|||
IOP( "dwc", BSIM4v3_MOD_DWC, IF_REAL, "Delta W for C-V model"), |
|||
IOP( "dlc", BSIM4v3_MOD_DLC, IF_REAL, "Delta L for C-V model"), |
|||
IOP( "xw", BSIM4v3_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), |
|||
IOP( "xl", BSIM4v3_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), |
|||
IOP( "dlcig", BSIM4v3_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), |
|||
IOP( "dwj", BSIM4v3_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), |
|||
|
|||
IOP( "alpha0", BSIM4v3_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), |
|||
IOP( "alpha1", BSIM4v3_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), |
|||
IOP( "beta0", BSIM4v3_MOD_BETA0, IF_REAL, "substrate current model parameter"), |
|||
IOP( "agidl", BSIM4v3_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), |
|||
IOP( "bgidl", BSIM4v3_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), |
|||
IOP( "cgidl", BSIM4v3_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), |
|||
IOP( "egidl", BSIM4v3_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), |
|||
IOP( "aigc", BSIM4v3_MOD_AIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "bigc", BSIM4v3_MOD_BIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "cigc", BSIM4v3_MOD_CIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "aigsd", BSIM4v3_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "bigsd", BSIM4v3_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "cigsd", BSIM4v3_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "aigbacc", BSIM4v3_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "bigbacc", BSIM4v3_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "cigbacc", BSIM4v3_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "aigbinv", BSIM4v3_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "bigbinv", BSIM4v3_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "cigbinv", BSIM4v3_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "nigc", BSIM4v3_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), |
|||
IOP( "nigbinv", BSIM4v3_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), |
|||
IOP( "nigbacc", BSIM4v3_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), |
|||
IOP( "ntox", BSIM4v3_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), |
|||
IOP( "eigbinv", BSIM4v3_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), |
|||
IOP( "pigcd", BSIM4v3_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), |
|||
IOP( "poxedge", BSIM4v3_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), |
|||
|
|||
IOP( "ijthdfwd", BSIM4v3_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), |
|||
IOP( "ijthsfwd", BSIM4v3_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), |
|||
IOP( "ijthdrev", BSIM4v3_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), |
|||
IOP( "ijthsrev", BSIM4v3_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), |
|||
IOP( "xjbvd", BSIM4v3_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), |
|||
IOP( "xjbvs", BSIM4v3_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), |
|||
IOP( "bvd", BSIM4v3_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), |
|||
IOP( "bvs", BSIM4v3_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), |
|||
|
|||
IOP( "gbmin", BSIM4v3_MOD_GBMIN, IF_REAL, "Minimum body conductance"), |
|||
IOP( "rbdb", BSIM4v3_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), |
|||
IOP( "rbpb", BSIM4v3_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), |
|||
IOP( "rbsb", BSIM4v3_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), |
|||
IOP( "rbps", BSIM4v3_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), |
|||
IOP( "rbpd", BSIM4v3_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), |
|||
|
|||
IOP( "lcdsc", BSIM4v3_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), |
|||
IOP( "lcdscb", BSIM4v3_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), |
|||
IOP( "lcdscd", BSIM4v3_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), |
|||
IOP( "lcit", BSIM4v3_MOD_LCIT, IF_REAL, "Length dependence of cit"), |
|||
IOP( "lnfactor", BSIM4v3_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), |
|||
IOP( "lxj", BSIM4v3_MOD_LXJ, IF_REAL, "Length dependence of xj"), |
|||
IOP( "lvsat", BSIM4v3_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), |
|||
IOP( "lat", BSIM4v3_MOD_LAT, IF_REAL, "Length dependence of at"), |
|||
IOP( "la0", BSIM4v3_MOD_LA0, IF_REAL, "Length dependence of a0"), |
|||
IOP( "lags", BSIM4v3_MOD_LAGS, IF_REAL, "Length dependence of ags"), |
|||
IOP( "la1", BSIM4v3_MOD_LA1, IF_REAL, "Length dependence of a1"), |
|||
IOP( "la2", BSIM4v3_MOD_LA2, IF_REAL, "Length dependence of a2"), |
|||
IOP( "lketa", BSIM4v3_MOD_LKETA, IF_REAL, "Length dependence of keta"), |
|||
IOP( "lnsub", BSIM4v3_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), |
|||
IOP( "lndep", BSIM4v3_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), |
|||
IOP( "lnsd", BSIM4v3_MOD_LNSD, IF_REAL, "Length dependence of nsd"), |
|||
IOP( "lphin", BSIM4v3_MOD_LPHIN, IF_REAL, "Length dependence of phin"), |
|||
IOP( "lngate", BSIM4v3_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), |
|||
IOP( "lgamma1", BSIM4v3_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), |
|||
IOP( "lgamma2", BSIM4v3_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), |
|||
IOP( "lvbx", BSIM4v3_MOD_LVBX, IF_REAL, "Length dependence of vbx"), |
|||
IOP( "lvbm", BSIM4v3_MOD_LVBM, IF_REAL, "Length dependence of vbm"), |
|||
IOP( "lxt", BSIM4v3_MOD_LXT, IF_REAL, "Length dependence of xt"), |
|||
IOP( "lk1", BSIM4v3_MOD_LK1, IF_REAL, "Length dependence of k1"), |
|||
IOP( "lkt1", BSIM4v3_MOD_LKT1, IF_REAL, "Length dependence of kt1"), |
|||
IOP( "lkt1l", BSIM4v3_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), |
|||
IOP( "lkt2", BSIM4v3_MOD_LKT2, IF_REAL, "Length dependence of kt2"), |
|||
IOP( "lk2", BSIM4v3_MOD_LK2, IF_REAL, "Length dependence of k2"), |
|||
IOP( "lk3", BSIM4v3_MOD_LK3, IF_REAL, "Length dependence of k3"), |
|||
IOP( "lk3b", BSIM4v3_MOD_LK3B, IF_REAL, "Length dependence of k3b"), |
|||
IOP( "lw0", BSIM4v3_MOD_LW0, IF_REAL, "Length dependence of w0"), |
|||
IOP( "ldvtp0", BSIM4v3_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), |
|||
IOP( "ldvtp1", BSIM4v3_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), |
|||
IOP( "llpe0", BSIM4v3_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), |
|||
IOP( "llpeb", BSIM4v3_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), |
|||
IOP( "ldvt0", BSIM4v3_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), |
|||
IOP( "ldvt1", BSIM4v3_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), |
|||
IOP( "ldvt2", BSIM4v3_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), |
|||
IOP( "ldvt0w", BSIM4v3_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), |
|||
IOP( "ldvt1w", BSIM4v3_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), |
|||
IOP( "ldvt2w", BSIM4v3_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), |
|||
IOP( "ldrout", BSIM4v3_MOD_LDROUT, IF_REAL, "Length dependence of drout"), |
|||
IOP( "ldsub", BSIM4v3_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), |
|||
IOP( "lvth0", BSIM4v3_MOD_LVTH0, IF_REAL,"Length dependence of vto"), |
|||
IOP( "lvtho", BSIM4v3_MOD_LVTH0, IF_REAL,"Length dependence of vto"), |
|||
IOP( "lua", BSIM4v3_MOD_LUA, IF_REAL, "Length dependence of ua"), |
|||
IOP( "lua1", BSIM4v3_MOD_LUA1, IF_REAL, "Length dependence of ua1"), |
|||
IOP( "lub", BSIM4v3_MOD_LUB, IF_REAL, "Length dependence of ub"), |
|||
IOP( "lub1", BSIM4v3_MOD_LUB1, IF_REAL, "Length dependence of ub1"), |
|||
IOP( "luc", BSIM4v3_MOD_LUC, IF_REAL, "Length dependence of uc"), |
|||
IOP( "luc1", BSIM4v3_MOD_LUC1, IF_REAL, "Length dependence of uc1"), |
|||
IOP( "lu0", BSIM4v3_MOD_LU0, IF_REAL, "Length dependence of u0"), |
|||
IOP( "lute", BSIM4v3_MOD_LUTE, IF_REAL, "Length dependence of ute"), |
|||
IOP( "lvoff", BSIM4v3_MOD_LVOFF, IF_REAL, "Length dependence of voff"), |
|||
IOP( "lminv", BSIM4v3_MOD_LMINV, IF_REAL, "Length dependence of minv"), |
|||
IOP( "ldelta", BSIM4v3_MOD_LDELTA, IF_REAL, "Length dependence of delta"), |
|||
IOP( "lrdsw", BSIM4v3_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), |
|||
IOP( "lrsw", BSIM4v3_MOD_LRSW, IF_REAL, "Length dependence of rsw"), |
|||
IOP( "lrdw", BSIM4v3_MOD_LRDW, IF_REAL, "Length dependence of rdw"), |
|||
|
|||
IOP( "lprwg", BSIM4v3_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), |
|||
IOP( "lprwb", BSIM4v3_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), |
|||
|
|||
IOP( "lprt", BSIM4v3_MOD_LPRT, IF_REAL, "Length dependence of prt "), |
|||
IOP( "leta0", BSIM4v3_MOD_LETA0, IF_REAL, "Length dependence of eta0"), |
|||
IOP( "letab", BSIM4v3_MOD_LETAB, IF_REAL, "Length dependence of etab"), |
|||
IOP( "lpclm", BSIM4v3_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), |
|||
IOP( "lpdiblc1", BSIM4v3_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), |
|||
IOP( "lpdiblc2", BSIM4v3_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), |
|||
IOP( "lpdiblcb", BSIM4v3_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), |
|||
IOP( "lfprout", BSIM4v3_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), |
|||
IOP( "lpdits", BSIM4v3_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), |
|||
IOP( "lpditsd", BSIM4v3_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), |
|||
IOP( "lpscbe1", BSIM4v3_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), |
|||
IOP( "lpscbe2", BSIM4v3_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), |
|||
IOP( "lpvag", BSIM4v3_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), |
|||
IOP( "lwr", BSIM4v3_MOD_LWR, IF_REAL, "Length dependence of wr"), |
|||
IOP( "ldwg", BSIM4v3_MOD_LDWG, IF_REAL, "Length dependence of dwg"), |
|||
IOP( "ldwb", BSIM4v3_MOD_LDWB, IF_REAL, "Length dependence of dwb"), |
|||
IOP( "lb0", BSIM4v3_MOD_LB0, IF_REAL, "Length dependence of b0"), |
|||
IOP( "lb1", BSIM4v3_MOD_LB1, IF_REAL, "Length dependence of b1"), |
|||
IOP( "lcgsl", BSIM4v3_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), |
|||
IOP( "lcgdl", BSIM4v3_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), |
|||
IOP( "lckappas", BSIM4v3_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), |
|||
IOP( "lckappad", BSIM4v3_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), |
|||
IOP( "lcf", BSIM4v3_MOD_LCF, IF_REAL, "Length dependence of cf"), |
|||
IOP( "lclc", BSIM4v3_MOD_LCLC, IF_REAL, "Length dependence of clc"), |
|||
IOP( "lcle", BSIM4v3_MOD_LCLE, IF_REAL, "Length dependence of cle"), |
|||
IOP( "lalpha0", BSIM4v3_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), |
|||
IOP( "lalpha1", BSIM4v3_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), |
|||
IOP( "lbeta0", BSIM4v3_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), |
|||
IOP( "lagidl", BSIM4v3_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), |
|||
IOP( "lbgidl", BSIM4v3_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), |
|||
IOP( "lcgidl", BSIM4v3_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), |
|||
IOP( "legidl", BSIM4v3_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), |
|||
IOP( "laigc", BSIM4v3_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), |
|||
IOP( "lbigc", BSIM4v3_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), |
|||
IOP( "lcigc", BSIM4v3_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), |
|||
IOP( "laigsd", BSIM4v3_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), |
|||
IOP( "lbigsd", BSIM4v3_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), |
|||
IOP( "lcigsd", BSIM4v3_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), |
|||
IOP( "laigbacc", BSIM4v3_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), |
|||
IOP( "lbigbacc", BSIM4v3_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), |
|||
IOP( "lcigbacc", BSIM4v3_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), |
|||
IOP( "laigbinv", BSIM4v3_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), |
|||
IOP( "lbigbinv", BSIM4v3_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), |
|||
IOP( "lcigbinv", BSIM4v3_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), |
|||
IOP( "lnigc", BSIM4v3_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), |
|||
IOP( "lnigbinv", BSIM4v3_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), |
|||
IOP( "lnigbacc", BSIM4v3_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), |
|||
IOP( "lntox", BSIM4v3_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), |
|||
IOP( "leigbinv", BSIM4v3_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), |
|||
IOP( "lpigcd", BSIM4v3_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), |
|||
IOP( "lpoxedge", BSIM4v3_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), |
|||
|
|||
IOP( "lvfbcv", BSIM4v3_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), |
|||
IOP( "lvfb", BSIM4v3_MOD_LVFB, IF_REAL, "Length dependence of vfb"), |
|||
IOP( "lacde", BSIM4v3_MOD_LACDE, IF_REAL, "Length dependence of acde"), |
|||
IOP( "lmoin", BSIM4v3_MOD_LMOIN, IF_REAL, "Length dependence of moin"), |
|||
IOP( "lnoff", BSIM4v3_MOD_LNOFF, IF_REAL, "Length dependence of noff"), |
|||
IOP( "lvoffcv", BSIM4v3_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), |
|||
IOP( "lxrcrg1", BSIM4v3_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), |
|||
IOP( "lxrcrg2", BSIM4v3_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), |
|||
IOP( "llambda", BSIM4v3_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"), |
|||
IOP( "lvtl", BSIM4v3_MOD_LVTL, IF_REAL, " Length dependence of vtl"), |
|||
IOP( "lxn", BSIM4v3_MOD_LXN, IF_REAL, " Length dependence of xn"), |
|||
IOP( "leu", BSIM4v3_MOD_LEU, IF_REAL, "Length dependence of eu"), |
|||
|
|||
IOP( "wcdsc", BSIM4v3_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), |
|||
IOP( "wcdscb", BSIM4v3_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), |
|||
IOP( "wcdscd", BSIM4v3_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), |
|||
IOP( "wcit", BSIM4v3_MOD_WCIT, IF_REAL, "Width dependence of cit"), |
|||
IOP( "wnfactor", BSIM4v3_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), |
|||
IOP( "wxj", BSIM4v3_MOD_WXJ, IF_REAL, "Width dependence of xj"), |
|||
IOP( "wvsat", BSIM4v3_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), |
|||
IOP( "wat", BSIM4v3_MOD_WAT, IF_REAL, "Width dependence of at"), |
|||
IOP( "wa0", BSIM4v3_MOD_WA0, IF_REAL, "Width dependence of a0"), |
|||
IOP( "wags", BSIM4v3_MOD_WAGS, IF_REAL, "Width dependence of ags"), |
|||
IOP( "wa1", BSIM4v3_MOD_WA1, IF_REAL, "Width dependence of a1"), |
|||
IOP( "wa2", BSIM4v3_MOD_WA2, IF_REAL, "Width dependence of a2"), |
|||
IOP( "wketa", BSIM4v3_MOD_WKETA, IF_REAL, "Width dependence of keta"), |
|||
IOP( "wnsub", BSIM4v3_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), |
|||
IOP( "wndep", BSIM4v3_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), |
|||
IOP( "wnsd", BSIM4v3_MOD_WNSD, IF_REAL, "Width dependence of nsd"), |
|||
IOP( "wphin", BSIM4v3_MOD_WPHIN, IF_REAL, "Width dependence of phin"), |
|||
IOP( "wngate", BSIM4v3_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), |
|||
IOP( "wgamma1", BSIM4v3_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), |
|||
IOP( "wgamma2", BSIM4v3_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), |
|||
IOP( "wvbx", BSIM4v3_MOD_WVBX, IF_REAL, "Width dependence of vbx"), |
|||
IOP( "wvbm", BSIM4v3_MOD_WVBM, IF_REAL, "Width dependence of vbm"), |
|||
IOP( "wxt", BSIM4v3_MOD_WXT, IF_REAL, "Width dependence of xt"), |
|||
IOP( "wk1", BSIM4v3_MOD_WK1, IF_REAL, "Width dependence of k1"), |
|||
IOP( "wkt1", BSIM4v3_MOD_WKT1, IF_REAL, "Width dependence of kt1"), |
|||
IOP( "wkt1l", BSIM4v3_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), |
|||
IOP( "wkt2", BSIM4v3_MOD_WKT2, IF_REAL, "Width dependence of kt2"), |
|||
IOP( "wk2", BSIM4v3_MOD_WK2, IF_REAL, "Width dependence of k2"), |
|||
IOP( "wk3", BSIM4v3_MOD_WK3, IF_REAL, "Width dependence of k3"), |
|||
IOP( "wk3b", BSIM4v3_MOD_WK3B, IF_REAL, "Width dependence of k3b"), |
|||
IOP( "ww0", BSIM4v3_MOD_WW0, IF_REAL, "Width dependence of w0"), |
|||
IOP( "wdvtp0", BSIM4v3_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), |
|||
IOP( "wdvtp1", BSIM4v3_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), |
|||
IOP( "wlpe0", BSIM4v3_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), |
|||
IOP( "wlpeb", BSIM4v3_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), |
|||
IOP( "wdvt0", BSIM4v3_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), |
|||
IOP( "wdvt1", BSIM4v3_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), |
|||
IOP( "wdvt2", BSIM4v3_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), |
|||
IOP( "wdvt0w", BSIM4v3_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), |
|||
IOP( "wdvt1w", BSIM4v3_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), |
|||
IOP( "wdvt2w", BSIM4v3_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), |
|||
IOP( "wdrout", BSIM4v3_MOD_WDROUT, IF_REAL, "Width dependence of drout"), |
|||
IOP( "wdsub", BSIM4v3_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), |
|||
IOP( "wvth0", BSIM4v3_MOD_WVTH0, IF_REAL,"Width dependence of vto"), |
|||
IOP( "wvtho", BSIM4v3_MOD_WVTH0, IF_REAL,"Width dependence of vto"), |
|||
IOP( "wua", BSIM4v3_MOD_WUA, IF_REAL, "Width dependence of ua"), |
|||
IOP( "wua1", BSIM4v3_MOD_WUA1, IF_REAL, "Width dependence of ua1"), |
|||
IOP( "wub", BSIM4v3_MOD_WUB, IF_REAL, "Width dependence of ub"), |
|||
IOP( "wub1", BSIM4v3_MOD_WUB1, IF_REAL, "Width dependence of ub1"), |
|||
IOP( "wuc", BSIM4v3_MOD_WUC, IF_REAL, "Width dependence of uc"), |
|||
IOP( "wuc1", BSIM4v3_MOD_WUC1, IF_REAL, "Width dependence of uc1"), |
|||
IOP( "wu0", BSIM4v3_MOD_WU0, IF_REAL, "Width dependence of u0"), |
|||
IOP( "wute", BSIM4v3_MOD_WUTE, IF_REAL, "Width dependence of ute"), |
|||
IOP( "wvoff", BSIM4v3_MOD_WVOFF, IF_REAL, "Width dependence of voff"), |
|||
IOP( "wminv", BSIM4v3_MOD_WMINV, IF_REAL, "Width dependence of minv"), |
|||
IOP( "wdelta", BSIM4v3_MOD_WDELTA, IF_REAL, "Width dependence of delta"), |
|||
IOP( "wrdsw", BSIM4v3_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), |
|||
IOP( "wrsw", BSIM4v3_MOD_WRSW, IF_REAL, "Width dependence of rsw"), |
|||
IOP( "wrdw", BSIM4v3_MOD_WRDW, IF_REAL, "Width dependence of rdw"), |
|||
|
|||
IOP( "wprwg", BSIM4v3_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), |
|||
IOP( "wprwb", BSIM4v3_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), |
|||
|
|||
IOP( "wprt", BSIM4v3_MOD_WPRT, IF_REAL, "Width dependence of prt"), |
|||
IOP( "weta0", BSIM4v3_MOD_WETA0, IF_REAL, "Width dependence of eta0"), |
|||
IOP( "wetab", BSIM4v3_MOD_WETAB, IF_REAL, "Width dependence of etab"), |
|||
IOP( "wpclm", BSIM4v3_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), |
|||
IOP( "wpdiblc1", BSIM4v3_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), |
|||
IOP( "wpdiblc2", BSIM4v3_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), |
|||
IOP( "wpdiblcb", BSIM4v3_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), |
|||
IOP( "wfprout", BSIM4v3_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), |
|||
IOP( "wpdits", BSIM4v3_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), |
|||
IOP( "wpditsd", BSIM4v3_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), |
|||
IOP( "wpscbe1", BSIM4v3_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), |
|||
IOP( "wpscbe2", BSIM4v3_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), |
|||
IOP( "wpvag", BSIM4v3_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), |
|||
IOP( "wwr", BSIM4v3_MOD_WWR, IF_REAL, "Width dependence of wr"), |
|||
IOP( "wdwg", BSIM4v3_MOD_WDWG, IF_REAL, "Width dependence of dwg"), |
|||
IOP( "wdwb", BSIM4v3_MOD_WDWB, IF_REAL, "Width dependence of dwb"), |
|||
IOP( "wb0", BSIM4v3_MOD_WB0, IF_REAL, "Width dependence of b0"), |
|||
IOP( "wb1", BSIM4v3_MOD_WB1, IF_REAL, "Width dependence of b1"), |
|||
IOP( "wcgsl", BSIM4v3_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), |
|||
IOP( "wcgdl", BSIM4v3_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), |
|||
IOP( "wckappas", BSIM4v3_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), |
|||
IOP( "wckappad", BSIM4v3_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), |
|||
IOP( "wcf", BSIM4v3_MOD_WCF, IF_REAL, "Width dependence of cf"), |
|||
IOP( "wclc", BSIM4v3_MOD_WCLC, IF_REAL, "Width dependence of clc"), |
|||
IOP( "wcle", BSIM4v3_MOD_WCLE, IF_REAL, "Width dependence of cle"), |
|||
IOP( "walpha0", BSIM4v3_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), |
|||
IOP( "walpha1", BSIM4v3_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), |
|||
IOP( "wbeta0", BSIM4v3_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), |
|||
IOP( "wagidl", BSIM4v3_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), |
|||
IOP( "wbgidl", BSIM4v3_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), |
|||
IOP( "wcgidl", BSIM4v3_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), |
|||
IOP( "wegidl", BSIM4v3_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), |
|||
IOP( "waigc", BSIM4v3_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), |
|||
IOP( "wbigc", BSIM4v3_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), |
|||
IOP( "wcigc", BSIM4v3_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), |
|||
IOP( "waigsd", BSIM4v3_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), |
|||
IOP( "wbigsd", BSIM4v3_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), |
|||
IOP( "wcigsd", BSIM4v3_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), |
|||
IOP( "waigbacc", BSIM4v3_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), |
|||
IOP( "wbigbacc", BSIM4v3_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), |
|||
IOP( "wcigbacc", BSIM4v3_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), |
|||
IOP( "waigbinv", BSIM4v3_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), |
|||
IOP( "wbigbinv", BSIM4v3_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), |
|||
IOP( "wcigbinv", BSIM4v3_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), |
|||
IOP( "wnigc", BSIM4v3_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), |
|||
IOP( "wnigbinv", BSIM4v3_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), |
|||
IOP( "wnigbacc", BSIM4v3_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), |
|||
IOP( "wntox", BSIM4v3_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), |
|||
IOP( "weigbinv", BSIM4v3_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), |
|||
IOP( "wpigcd", BSIM4v3_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), |
|||
IOP( "wpoxedge", BSIM4v3_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), |
|||
IOP( "wvfbcv", BSIM4v3_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), |
|||
IOP( "wvfb", BSIM4v3_MOD_WVFB, IF_REAL, "Width dependence of vfb"), |
|||
IOP( "wacde", BSIM4v3_MOD_WACDE, IF_REAL, "Width dependence of acde"), |
|||
IOP( "wmoin", BSIM4v3_MOD_WMOIN, IF_REAL, "Width dependence of moin"), |
|||
IOP( "wnoff", BSIM4v3_MOD_WNOFF, IF_REAL, "Width dependence of noff"), |
|||
IOP( "wvoffcv", BSIM4v3_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), |
|||
IOP( "wxrcrg1", BSIM4v3_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), |
|||
IOP( "wxrcrg2", BSIM4v3_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), |
|||
IOP( "wlambda", BSIM4v3_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"), |
|||
IOP( "wvtl", BSIM4v3_MOD_WVTL, IF_REAL, "Width dependence of vtl"), |
|||
IOP( "wxn", BSIM4v3_MOD_WXN, IF_REAL, "Width dependence of xn"), |
|||
IOP( "weu", BSIM4v3_MOD_WEU, IF_REAL, "Width dependence of eu"), |
|||
|
|||
IOP( "pcdsc", BSIM4v3_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), |
|||
IOP( "pcdscb", BSIM4v3_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), |
|||
IOP( "pcdscd", BSIM4v3_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), |
|||
IOP( "pcit", BSIM4v3_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), |
|||
IOP( "pnfactor", BSIM4v3_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), |
|||
IOP( "pxj", BSIM4v3_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), |
|||
IOP( "pvsat", BSIM4v3_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), |
|||
IOP( "pat", BSIM4v3_MOD_PAT, IF_REAL, "Cross-term dependence of at"), |
|||
IOP( "pa0", BSIM4v3_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), |
|||
IOP( "pags", BSIM4v3_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), |
|||
IOP( "pa1", BSIM4v3_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), |
|||
IOP( "pa2", BSIM4v3_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), |
|||
IOP( "pketa", BSIM4v3_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), |
|||
IOP( "pnsub", BSIM4v3_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), |
|||
IOP( "pndep", BSIM4v3_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), |
|||
IOP( "pnsd", BSIM4v3_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), |
|||
IOP( "pphin", BSIM4v3_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), |
|||
IOP( "pngate", BSIM4v3_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), |
|||
IOP( "pgamma1", BSIM4v3_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), |
|||
IOP( "pgamma2", BSIM4v3_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), |
|||
IOP( "pvbx", BSIM4v3_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), |
|||
IOP( "pvbm", BSIM4v3_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), |
|||
IOP( "pxt", BSIM4v3_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), |
|||
IOP( "pk1", BSIM4v3_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), |
|||
IOP( "pkt1", BSIM4v3_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), |
|||
IOP( "pkt1l", BSIM4v3_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), |
|||
IOP( "pkt2", BSIM4v3_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), |
|||
IOP( "pk2", BSIM4v3_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), |
|||
IOP( "pk3", BSIM4v3_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), |
|||
IOP( "pk3b", BSIM4v3_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), |
|||
IOP( "pw0", BSIM4v3_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), |
|||
IOP( "pdvtp0", BSIM4v3_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), |
|||
IOP( "pdvtp1", BSIM4v3_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), |
|||
IOP( "plpe0", BSIM4v3_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), |
|||
IOP( "plpeb", BSIM4v3_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), |
|||
IOP( "pdvt0", BSIM4v3_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), |
|||
IOP( "pdvt1", BSIM4v3_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), |
|||
IOP( "pdvt2", BSIM4v3_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), |
|||
IOP( "pdvt0w", BSIM4v3_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), |
|||
IOP( "pdvt1w", BSIM4v3_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), |
|||
IOP( "pdvt2w", BSIM4v3_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), |
|||
IOP( "pdrout", BSIM4v3_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), |
|||
IOP( "pdsub", BSIM4v3_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), |
|||
IOP( "pvth0", BSIM4v3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), |
|||
IOP( "pvtho", BSIM4v3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), |
|||
IOP( "pua", BSIM4v3_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), |
|||
IOP( "pua1", BSIM4v3_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), |
|||
IOP( "pub", BSIM4v3_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), |
|||
IOP( "pub1", BSIM4v3_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), |
|||
IOP( "puc", BSIM4v3_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), |
|||
IOP( "puc1", BSIM4v3_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), |
|||
IOP( "pu0", BSIM4v3_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), |
|||
IOP( "pute", BSIM4v3_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), |
|||
IOP( "pvoff", BSIM4v3_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), |
|||
IOP( "pminv", BSIM4v3_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), |
|||
IOP( "pdelta", BSIM4v3_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), |
|||
IOP( "prdsw", BSIM4v3_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), |
|||
IOP( "prsw", BSIM4v3_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), |
|||
IOP( "prdw", BSIM4v3_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), |
|||
|
|||
IOP( "pprwg", BSIM4v3_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), |
|||
IOP( "pprwb", BSIM4v3_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), |
|||
|
|||
IOP( "pprt", BSIM4v3_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), |
|||
IOP( "peta0", BSIM4v3_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), |
|||
IOP( "petab", BSIM4v3_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), |
|||
IOP( "ppclm", BSIM4v3_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), |
|||
IOP( "ppdiblc1", BSIM4v3_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), |
|||
IOP( "ppdiblc2", BSIM4v3_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), |
|||
IOP( "ppdiblcb", BSIM4v3_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), |
|||
IOP( "pfprout", BSIM4v3_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), |
|||
IOP( "ppdits", BSIM4v3_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), |
|||
IOP( "ppditsd", BSIM4v3_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), |
|||
IOP( "ppscbe1", BSIM4v3_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), |
|||
IOP( "ppscbe2", BSIM4v3_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), |
|||
IOP( "ppvag", BSIM4v3_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), |
|||
IOP( "pwr", BSIM4v3_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), |
|||
IOP( "pdwg", BSIM4v3_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), |
|||
IOP( "pdwb", BSIM4v3_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), |
|||
IOP( "pb0", BSIM4v3_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), |
|||
IOP( "pb1", BSIM4v3_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), |
|||
IOP( "pcgsl", BSIM4v3_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), |
|||
IOP( "pcgdl", BSIM4v3_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), |
|||
IOP( "pckappas", BSIM4v3_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), |
|||
IOP( "pckappad", BSIM4v3_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), |
|||
IOP( "pcf", BSIM4v3_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), |
|||
IOP( "pclc", BSIM4v3_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), |
|||
IOP( "pcle", BSIM4v3_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), |
|||
IOP( "palpha0", BSIM4v3_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), |
|||
IOP( "palpha1", BSIM4v3_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), |
|||
IOP( "pbeta0", BSIM4v3_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), |
|||
IOP( "pagidl", BSIM4v3_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), |
|||
IOP( "pbgidl", BSIM4v3_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), |
|||
IOP( "pcgidl", BSIM4v3_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), |
|||
IOP( "pegidl", BSIM4v3_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), |
|||
IOP( "paigc", BSIM4v3_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), |
|||
IOP( "pbigc", BSIM4v3_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), |
|||
IOP( "pcigc", BSIM4v3_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), |
|||
IOP( "paigsd", BSIM4v3_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), |
|||
IOP( "pbigsd", BSIM4v3_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), |
|||
IOP( "pcigsd", BSIM4v3_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), |
|||
IOP( "paigbacc", BSIM4v3_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), |
|||
IOP( "pbigbacc", BSIM4v3_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), |
|||
IOP( "pcigbacc", BSIM4v3_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), |
|||
IOP( "paigbinv", BSIM4v3_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), |
|||
IOP( "pbigbinv", BSIM4v3_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), |
|||
IOP( "pcigbinv", BSIM4v3_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), |
|||
IOP( "pnigc", BSIM4v3_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), |
|||
IOP( "pnigbinv", BSIM4v3_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), |
|||
IOP( "pnigbacc", BSIM4v3_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), |
|||
IOP( "pntox", BSIM4v3_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), |
|||
IOP( "peigbinv", BSIM4v3_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), |
|||
IOP( "ppigcd", BSIM4v3_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), |
|||
IOP( "ppoxedge", BSIM4v3_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), |
|||
IOP( "pvfbcv", BSIM4v3_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), |
|||
IOP( "pvfb", BSIM4v3_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), |
|||
IOP( "pacde", BSIM4v3_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), |
|||
IOP( "pmoin", BSIM4v3_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), |
|||
IOP( "pnoff", BSIM4v3_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), |
|||
IOP( "pvoffcv", BSIM4v3_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), |
|||
IOP( "pxrcrg1", BSIM4v3_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), |
|||
IOP( "pxrcrg2", BSIM4v3_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), |
|||
IOP( "plambda", BSIM4v3_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"), |
|||
IOP( "pvtl", BSIM4v3_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"), |
|||
IOP( "pxn", BSIM4v3_MOD_PXN, IF_REAL, "Cross-term dependence of xn"), |
|||
IOP( "peu", BSIM4v3_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), |
|||
|
|||
/* stress effect*/ |
|||
IOP( "saref", BSIM4v3_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), |
|||
IOP( "sbref", BSIM4v3_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), |
|||
IOP( "wlod", BSIM4v3_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), |
|||
IOP( "ku0", BSIM4v3_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), |
|||
IOP( "kvsat", BSIM4v3_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), |
|||
IOP( "kvth0", BSIM4v3_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), |
|||
IOP( "tku0", BSIM4v3_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), |
|||
IOP( "llodku0", BSIM4v3_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), |
|||
IOP( "wlodku0", BSIM4v3_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), |
|||
IOP( "llodvth", BSIM4v3_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), |
|||
IOP( "wlodvth", BSIM4v3_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), |
|||
IOP( "lku0", BSIM4v3_MOD_LKU0, IF_REAL, "Length dependence of ku0"), |
|||
IOP( "wku0", BSIM4v3_MOD_WKU0, IF_REAL, "Width dependence of ku0"), |
|||
IOP( "pku0", BSIM4v3_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), |
|||
IOP( "lkvth0", BSIM4v3_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), |
|||
IOP( "wkvth0", BSIM4v3_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), |
|||
IOP( "pkvth0", BSIM4v3_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), |
|||
IOP( "stk2", BSIM4v3_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), |
|||
IOP( "lodk2", BSIM4v3_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), |
|||
IOP( "steta0", BSIM4v3_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), |
|||
IOP( "lodeta0", BSIM4v3_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), |
|||
|
|||
|
|||
IOP( "noia", BSIM4v3_MOD_NOIA, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "noib", BSIM4v3_MOD_NOIB, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "noic", BSIM4v3_MOD_NOIC, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "tnoia", BSIM4v3_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "tnoib", BSIM4v3_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "rnoia", BSIM4v3_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), |
|||
IOP( "rnoib", BSIM4v3_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), |
|||
IOP( "ntnoi", BSIM4v3_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "em", BSIM4v3_MOD_EM, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "ef", BSIM4v3_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), |
|||
IOP( "af", BSIM4v3_MOD_AF, IF_REAL, "Flicker noise exponent"), |
|||
IOP( "kf", BSIM4v3_MOD_KF, IF_REAL, "Flicker noise coefficient"), |
|||
|
|||
IP( "nmos", BSIM4v3_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), |
|||
IP( "pmos", BSIM4v3_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), |
|||
}; |
|||
|
|||
char *BSIM4v3names[] = { |
|||
"Drain", |
|||
"Gate", |
|||
"Source", |
|||
"Bulk", |
|||
"Charge" |
|||
}; |
|||
|
|||
int BSIM4v3nSize = NUMELEMS(BSIM4v3names); |
|||
int BSIM4v3pTSize = NUMELEMS(BSIM4v3pTable); |
|||
int BSIM4v3mPTSize = NUMELEMS(BSIM4v3mPTable); |
|||
int BSIM4v3iSize = sizeof(BSIM4v3instance); |
|||
int BSIM4v3mSize = sizeof(BSIM4v3model); |
|||
@ -0,0 +1,668 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3acld.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v3def.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v3acLoad(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v3model *model = (BSIM4v3model*)inModel; |
|||
BSIM4v3instance *here; |
|||
|
|||
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; |
|||
double xcbgb, xcbdb, xcbsb, xcbbb; |
|||
double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi; |
|||
double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi; |
|||
double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr; |
|||
double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi; |
|||
double xcdbdb, xcsbsb, xcgmgmb, xcgmdb, xcgmsb, xcdgmb, xcsgmb; |
|||
double xcgmbb, xcbgmb; |
|||
double capbd, capbs, omega; |
|||
double gstot, gstotd, gstotg, gstots, gstotb, gspr; |
|||
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; |
|||
double gIstotg, gIstotd, gIstots, gIstotb; |
|||
double gIdtotg, gIdtotd, gIdtots, gIdtotb; |
|||
double gIbtotg, gIbtotd, gIbtots, gIbtotb; |
|||
double gIgtotg, gIgtotd, gIgtots, gIgtotb; |
|||
double cgso, cgdo, cgbo; |
|||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb; |
|||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; |
|||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11; |
|||
double Csg, Csd, Css, Csb; |
|||
double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr; |
|||
double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi; |
|||
double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi; |
|||
double FwdSumr, RevSumr, Gmr, Gmbsr, Gdsr; |
|||
double FwdSumi, RevSumi, Gmi, Gmbsi, Gdsi; |
|||
struct bsim4v3SizeDependParam *pParam; |
|||
double ggidld, ggidlg, ggidlb,ggisld, ggislg, ggislb, ggisls; |
|||
|
|||
omega = ckt->CKTomega; |
|||
for (; model != NULL; model = model->BSIM4v3nextModel) |
|||
{ for (here = model->BSIM4v3instances; here!= NULL; |
|||
here = here->BSIM4v3nextInstance) |
|||
{ if (here->BSIM4v3owner != ARCHme) continue; |
|||
pParam = here->pParam; |
|||
capbd = here->BSIM4v3capbd; |
|||
capbs = here->BSIM4v3capbs; |
|||
cgso = here->BSIM4v3cgso; |
|||
cgdo = here->BSIM4v3cgdo; |
|||
cgbo = pParam->BSIM4v3cgbo; |
|||
|
|||
Csd = -(here->BSIM4v3cddb + here->BSIM4v3cgdb + here->BSIM4v3cbdb); |
|||
Csg = -(here->BSIM4v3cdgb + here->BSIM4v3cggb + here->BSIM4v3cbgb); |
|||
Css = -(here->BSIM4v3cdsb + here->BSIM4v3cgsb + here->BSIM4v3cbsb); |
|||
|
|||
if (here->BSIM4v3acnqsMod) |
|||
{ T0 = omega * here->BSIM4v3taunet; |
|||
T1 = T0 * T0; |
|||
T2 = 1.0 / (1.0 + T1); |
|||
T3 = T0 * T2; |
|||
|
|||
gmr = here->BSIM4v3gm * T2; |
|||
gmbsr = here->BSIM4v3gmbs * T2; |
|||
gdsr = here->BSIM4v3gds * T2; |
|||
|
|||
gmi = -here->BSIM4v3gm * T3; |
|||
gmbsi = -here->BSIM4v3gmbs * T3; |
|||
gdsi = -here->BSIM4v3gds * T3; |
|||
|
|||
Cddr = here->BSIM4v3cddb * T2; |
|||
Cdgr = here->BSIM4v3cdgb * T2; |
|||
Cdsr = here->BSIM4v3cdsb * T2; |
|||
Cdbr = -(Cddr + Cdgr + Cdsr); |
|||
|
|||
/* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */ |
|||
Cddi = here->BSIM4v3cddb * T3 * omega; |
|||
Cdgi = here->BSIM4v3cdgb * T3 * omega; |
|||
Cdsi = here->BSIM4v3cdsb * T3 * omega; |
|||
Cdbi = -(Cddi + Cdgi + Cdsi); |
|||
|
|||
Csdr = Csd * T2; |
|||
Csgr = Csg * T2; |
|||
Cssr = Css * T2; |
|||
Csbr = -(Csdr + Csgr + Cssr); |
|||
|
|||
Csdi = Csd * T3 * omega; |
|||
Csgi = Csg * T3 * omega; |
|||
Cssi = Css * T3 * omega; |
|||
Csbi = -(Csdi + Csgi + Cssi); |
|||
|
|||
Cgdr = -(Cddr + Csdr + here->BSIM4v3cbdb); |
|||
Cggr = -(Cdgr + Csgr + here->BSIM4v3cbgb); |
|||
Cgsr = -(Cdsr + Cssr + here->BSIM4v3cbsb); |
|||
Cgbr = -(Cgdr + Cggr + Cgsr); |
|||
|
|||
Cgdi = -(Cddi + Csdi); |
|||
Cggi = -(Cdgi + Csgi); |
|||
Cgsi = -(Cdsi + Cssi); |
|||
Cgbi = -(Cgdi + Cggi + Cgsi); |
|||
} |
|||
else /* QS */ |
|||
{ gmr = here->BSIM4v3gm; |
|||
gmbsr = here->BSIM4v3gmbs; |
|||
gdsr = here->BSIM4v3gds; |
|||
gmi = gmbsi = gdsi = 0.0; |
|||
|
|||
Cddr = here->BSIM4v3cddb; |
|||
Cdgr = here->BSIM4v3cdgb; |
|||
Cdsr = here->BSIM4v3cdsb; |
|||
Cdbr = -(Cddr + Cdgr + Cdsr); |
|||
Cddi = Cdgi = Cdsi = Cdbi = 0.0; |
|||
|
|||
Csdr = Csd; |
|||
Csgr = Csg; |
|||
Cssr = Css; |
|||
Csbr = -(Csdr + Csgr + Cssr); |
|||
Csdi = Csgi = Cssi = Csbi = 0.0; |
|||
|
|||
Cgdr = here->BSIM4v3cgdb; |
|||
Cggr = here->BSIM4v3cggb; |
|||
Cgsr = here->BSIM4v3cgsb; |
|||
Cgbr = -(Cgdr + Cggr + Cgsr); |
|||
Cgdi = Cggi = Cgsi = Cgbi = 0.0; |
|||
} |
|||
|
|||
|
|||
if (here->BSIM4v3mode >= 0) |
|||
{ Gmr = gmr; |
|||
Gmbsr = gmbsr; |
|||
FwdSumr = Gmr + Gmbsr; |
|||
RevSumr = 0.0; |
|||
Gmi = gmi; |
|||
Gmbsi = gmbsi; |
|||
FwdSumi = Gmi + Gmbsi; |
|||
RevSumi = 0.0; |
|||
|
|||
gbbdp = -(here->BSIM4v3gbds); |
|||
gbbsp = here->BSIM4v3gbds + here->BSIM4v3gbgs + here->BSIM4v3gbbs; |
|||
gbdpg = here->BSIM4v3gbgs; |
|||
gbdpdp = here->BSIM4v3gbds; |
|||
gbdpb = here->BSIM4v3gbbs; |
|||
gbdpsp = -(gbdpg + gbdpdp + gbdpb); |
|||
|
|||
gbspdp = 0.0; |
|||
gbspg = 0.0; |
|||
gbspb = 0.0; |
|||
gbspsp = 0.0; |
|||
|
|||
if (model->BSIM4v3igcMod) |
|||
{ gIstotg = here->BSIM4v3gIgsg + here->BSIM4v3gIgcsg; |
|||
gIstotd = here->BSIM4v3gIgcsd; |
|||
gIstots = here->BSIM4v3gIgss + here->BSIM4v3gIgcss; |
|||
gIstotb = here->BSIM4v3gIgcsb; |
|||
|
|||
gIdtotg = here->BSIM4v3gIgdg + here->BSIM4v3gIgcdg; |
|||
gIdtotd = here->BSIM4v3gIgdd + here->BSIM4v3gIgcdd; |
|||
gIdtots = here->BSIM4v3gIgcds; |
|||
gIdtotb = here->BSIM4v3gIgcdb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v3igbMod) |
|||
{ gIbtotg = here->BSIM4v3gIgbg; |
|||
gIbtotd = here->BSIM4v3gIgbd; |
|||
gIbtots = here->BSIM4v3gIgbs; |
|||
gIbtotb = here->BSIM4v3gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v3igcMod != 0) || (model->BSIM4v3igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v3rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v3vgs); |
|||
else if (here->BSIM4v3rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v3vgs); |
|||
if (here->BSIM4v3rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v3gcrgd * T0; |
|||
gcrgg = here->BSIM4v3gcrgg * T0; |
|||
gcrgs = here->BSIM4v3gcrgs * T0; |
|||
gcrgb = here->BSIM4v3gcrgb * T0; |
|||
gcrgg -= here->BSIM4v3gcrg; |
|||
gcrg = here->BSIM4v3gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v3rgateMod == 3) |
|||
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v3cgbo) * omega; |
|||
xcgmdb = -cgdo * omega; |
|||
xcgmsb = -cgso * omega; |
|||
xcgmbb = -pParam->BSIM4v3cgbo * omega; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggbr = Cggr * omega; |
|||
xcgdbr = Cgdr * omega; |
|||
xcgsbr = Cgsr * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = Cdgr * omega; |
|||
xcsgbr = Csgr * omega; |
|||
xcbgb = here->BSIM4v3cbgb * omega; |
|||
} |
|||
else |
|||
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v3cgbo ) * omega; |
|||
xcgdbr = (Cgdr - cgdo) * omega; |
|||
xcgsbr = (Cgsr - cgso) * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = (Cdgr - cgdo) * omega; |
|||
xcsgbr = (Csgr - cgso) * omega; |
|||
xcbgb = (here->BSIM4v3cbgb - pParam->BSIM4v3cgbo) * omega; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddbr = (Cddr + here->BSIM4v3capbd + cgdo) * omega; |
|||
xcdsbr = Cdsr * omega; |
|||
xcsdbr = Csdr * omega; |
|||
xcssbr = (here->BSIM4v3capbs + cgso + Cssr) * omega; |
|||
|
|||
if (!here->BSIM4v3rbodyMod) |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); |
|||
|
|||
xcbdb = (here->BSIM4v3cbdb - here->BSIM4v3capbd) * omega; |
|||
xcbsb = (here->BSIM4v3cbsb - here->BSIM4v3capbs) * omega; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbbr = Cdbr * omega; |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb) |
|||
+ here->BSIM4v3capbs * omega; |
|||
|
|||
xcbdb = here->BSIM4v3cbdb * omega; |
|||
xcbsb = here->BSIM4v3cbsb * omega; |
|||
|
|||
xcdbdb = -here->BSIM4v3capbd * omega; |
|||
xcsbsb = -here->BSIM4v3capbs * omega; |
|||
} |
|||
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); |
|||
|
|||
xcdgbi = Cdgi; |
|||
xcsgbi = Csgi; |
|||
xcddbi = Cddi; |
|||
xcdsbi = Cdsi; |
|||
xcsdbi = Csdi; |
|||
xcssbi = Cssi; |
|||
xcdbbi = Cdbi; |
|||
xcsbbi = Csbi; |
|||
xcggbi = Cggi; |
|||
xcgdbi = Cgdi; |
|||
xcgsbi = Cgsi; |
|||
xcgbbi = Cgbi; |
|||
} |
|||
else /* Reverse mode */ |
|||
{ Gmr = -gmr; |
|||
Gmbsr = -gmbsr; |
|||
FwdSumr = 0.0; |
|||
RevSumr = -(Gmr + Gmbsr); |
|||
Gmi = -gmi; |
|||
Gmbsi = -gmbsi; |
|||
FwdSumi = 0.0; |
|||
RevSumi = -(Gmi + Gmbsi); |
|||
|
|||
gbbsp = -(here->BSIM4v3gbds); |
|||
gbbdp = here->BSIM4v3gbds + here->BSIM4v3gbgs + here->BSIM4v3gbbs; |
|||
|
|||
gbdpg = 0.0; |
|||
gbdpsp = 0.0; |
|||
gbdpb = 0.0; |
|||
gbdpdp = 0.0; |
|||
|
|||
gbspg = here->BSIM4v3gbgs; |
|||
gbspsp = here->BSIM4v3gbds; |
|||
gbspb = here->BSIM4v3gbbs; |
|||
gbspdp = -(gbspg + gbspsp + gbspb); |
|||
|
|||
if (model->BSIM4v3igcMod) |
|||
{ gIstotg = here->BSIM4v3gIgsg + here->BSIM4v3gIgcdg; |
|||
gIstotd = here->BSIM4v3gIgcds; |
|||
gIstots = here->BSIM4v3gIgss + here->BSIM4v3gIgcdd; |
|||
gIstotb = here->BSIM4v3gIgcdb; |
|||
|
|||
gIdtotg = here->BSIM4v3gIgdg + here->BSIM4v3gIgcsg; |
|||
gIdtotd = here->BSIM4v3gIgdd + here->BSIM4v3gIgcss; |
|||
gIdtots = here->BSIM4v3gIgcsd; |
|||
gIdtotb = here->BSIM4v3gIgcsb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v3igbMod) |
|||
{ gIbtotg = here->BSIM4v3gIgbg; |
|||
gIbtotd = here->BSIM4v3gIgbs; |
|||
gIbtots = here->BSIM4v3gIgbd; |
|||
gIbtotb = here->BSIM4v3gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v3igcMod != 0) || (model->BSIM4v3igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v3rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v3vgs); |
|||
else if (here->BSIM4v3rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v3vgs); |
|||
if (here->BSIM4v3rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v3gcrgs * T0; |
|||
gcrgg = here->BSIM4v3gcrgg * T0; |
|||
gcrgs = here->BSIM4v3gcrgd * T0; |
|||
gcrgb = here->BSIM4v3gcrgb * T0; |
|||
gcrgg -= here->BSIM4v3gcrg; |
|||
gcrg = here->BSIM4v3gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v3rgateMod == 3) |
|||
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v3cgbo) * omega; |
|||
xcgmdb = -cgdo * omega; |
|||
xcgmsb = -cgso * omega; |
|||
xcgmbb = -pParam->BSIM4v3cgbo * omega; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggbr = Cggr * omega; |
|||
xcgdbr = Cgsr * omega; |
|||
xcgsbr = Cgdr * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = Csgr * omega; |
|||
xcsgbr = Cdgr * omega; |
|||
xcbgb = here->BSIM4v3cbgb * omega; |
|||
} |
|||
else |
|||
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v3cgbo ) * omega; |
|||
xcgdbr = (Cgsr - cgdo) * omega; |
|||
xcgsbr = (Cgdr - cgso) * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = (Csgr - cgdo) * omega; |
|||
xcsgbr = (Cdgr - cgso) * omega; |
|||
xcbgb = (here->BSIM4v3cbgb - pParam->BSIM4v3cgbo) * omega; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddbr = (here->BSIM4v3capbd + cgdo + Cssr) * omega; |
|||
xcdsbr = Csdr * omega; |
|||
xcsdbr = Cdsr * omega; |
|||
xcssbr = (Cddr + here->BSIM4v3capbs + cgso) * omega; |
|||
|
|||
if (!here->BSIM4v3rbodyMod) |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); |
|||
|
|||
xcbdb = (here->BSIM4v3cbsb - here->BSIM4v3capbd) * omega; |
|||
xcbsb = (here->BSIM4v3cbdb - here->BSIM4v3capbs) * omega; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb) |
|||
+ here->BSIM4v3capbd * omega; |
|||
xcsbbr = Cdbr * omega; |
|||
|
|||
xcbdb = here->BSIM4v3cbsb * omega; |
|||
xcbsb = here->BSIM4v3cbdb * omega; |
|||
xcdbdb = -here->BSIM4v3capbd * omega; |
|||
xcsbsb = -here->BSIM4v3capbs * omega; |
|||
} |
|||
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); |
|||
|
|||
xcdgbi = Csgi; |
|||
xcsgbi = Cdgi; |
|||
xcddbi = Cssi; |
|||
xcdsbi = Csdi; |
|||
xcsdbi = Cdsi; |
|||
xcssbi = Cddi; |
|||
xcdbbi = Csbi; |
|||
xcsbbi = Cdbi; |
|||
xcggbi = Cggi; |
|||
xcgdbi = Cgsi; |
|||
xcgsbi = Cgdi; |
|||
xcgbbi = Cgbi; |
|||
} |
|||
|
|||
if (model->BSIM4v3rdsMod == 1) |
|||
{ gstot = here->BSIM4v3gstot; |
|||
gstotd = here->BSIM4v3gstotd; |
|||
gstotg = here->BSIM4v3gstotg; |
|||
gstots = here->BSIM4v3gstots - gstot; |
|||
gstotb = here->BSIM4v3gstotb; |
|||
|
|||
gdtot = here->BSIM4v3gdtot; |
|||
gdtotd = here->BSIM4v3gdtotd - gdtot; |
|||
gdtotg = here->BSIM4v3gdtotg; |
|||
gdtots = here->BSIM4v3gdtots; |
|||
gdtotb = here->BSIM4v3gdtotb; |
|||
} |
|||
else |
|||
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0; |
|||
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; |
|||
} |
|||
|
|||
|
|||
/* |
|||
* Loading AC matrix |
|||
*/ |
|||
|
|||
if (!model->BSIM4v3rdsMod) |
|||
{ gdpr = here->BSIM4v3drainConductance; |
|||
gspr = here->BSIM4v3sourceConductance; |
|||
} |
|||
else |
|||
gdpr = gspr = 0.0; |
|||
|
|||
if (!here->BSIM4v3rbodyMod) |
|||
{ gjbd = here->BSIM4v3gbd; |
|||
gjbs = here->BSIM4v3gbs; |
|||
} |
|||
else |
|||
gjbd = gjbs = 0.0; |
|||
|
|||
geltd = here->BSIM4v3grgeltd; |
|||
|
|||
if (here->BSIM4v3rgateMod == 1) |
|||
{ *(here->BSIM4v3GEgePtr) += geltd; |
|||
*(here->BSIM4v3GPgePtr) -= geltd; |
|||
*(here->BSIM4v3GEgpPtr) -= geltd; |
|||
|
|||
*(here->BSIM4v3GPgpPtr +1) += xcggbr; |
|||
*(here->BSIM4v3GPgpPtr) += geltd + xcggbi + gIgtotg; |
|||
*(here->BSIM4v3GPdpPtr +1) += xcgdbr; |
|||
*(here->BSIM4v3GPdpPtr) += xcgdbi + gIgtotd; |
|||
*(here->BSIM4v3GPspPtr +1) += xcgsbr; |
|||
*(here->BSIM4v3GPspPtr) += xcgsbi + gIgtots; |
|||
*(here->BSIM4v3GPbpPtr +1) += xcgbbr; |
|||
*(here->BSIM4v3GPbpPtr) += xcgbbi + gIgtotb; |
|||
} /* WDLiu: gcrg already subtracted from all gcrgg below */ |
|||
else if (here->BSIM4v3rgateMod == 2) |
|||
{ *(here->BSIM4v3GEgePtr) += gcrg; |
|||
*(here->BSIM4v3GEgpPtr) += gcrgg; |
|||
*(here->BSIM4v3GEdpPtr) += gcrgd; |
|||
*(here->BSIM4v3GEspPtr) += gcrgs; |
|||
*(here->BSIM4v3GEbpPtr) += gcrgb; |
|||
|
|||
*(here->BSIM4v3GPgePtr) -= gcrg; |
|||
*(here->BSIM4v3GPgpPtr +1) += xcggbr; |
|||
*(here->BSIM4v3GPgpPtr) -= gcrgg - xcggbi - gIgtotg; |
|||
*(here->BSIM4v3GPdpPtr +1) += xcgdbr; |
|||
*(here->BSIM4v3GPdpPtr) -= gcrgd - xcgdbi - gIgtotd; |
|||
*(here->BSIM4v3GPspPtr +1) += xcgsbr; |
|||
*(here->BSIM4v3GPspPtr) -= gcrgs - xcgsbi - gIgtots; |
|||
*(here->BSIM4v3GPbpPtr +1) += xcgbbr; |
|||
*(here->BSIM4v3GPbpPtr) -= gcrgb - xcgbbi - gIgtotb; |
|||
} |
|||
else if (here->BSIM4v3rgateMod == 3) |
|||
{ *(here->BSIM4v3GEgePtr) += geltd; |
|||
*(here->BSIM4v3GEgmPtr) -= geltd; |
|||
*(here->BSIM4v3GMgePtr) -= geltd; |
|||
*(here->BSIM4v3GMgmPtr) += geltd + gcrg; |
|||
*(here->BSIM4v3GMgmPtr +1) += xcgmgmb; |
|||
|
|||
*(here->BSIM4v3GMdpPtr) += gcrgd; |
|||
*(here->BSIM4v3GMdpPtr +1) += xcgmdb; |
|||
*(here->BSIM4v3GMgpPtr) += gcrgg; |
|||
*(here->BSIM4v3GMspPtr) += gcrgs; |
|||
*(here->BSIM4v3GMspPtr +1) += xcgmsb; |
|||
*(here->BSIM4v3GMbpPtr) += gcrgb; |
|||
*(here->BSIM4v3GMbpPtr +1) += xcgmbb; |
|||
|
|||
*(here->BSIM4v3DPgmPtr +1) += xcdgmb; |
|||
*(here->BSIM4v3GPgmPtr) -= gcrg; |
|||
*(here->BSIM4v3SPgmPtr +1) += xcsgmb; |
|||
*(here->BSIM4v3BPgmPtr +1) += xcbgmb; |
|||
|
|||
*(here->BSIM4v3GPgpPtr) -= gcrgg - xcggbi - gIgtotg; |
|||
*(here->BSIM4v3GPgpPtr +1) += xcggbr; |
|||
*(here->BSIM4v3GPdpPtr) -= gcrgd - xcgdbi - gIgtotd; |
|||
*(here->BSIM4v3GPdpPtr +1) += xcgdbr; |
|||
*(here->BSIM4v3GPspPtr) -= gcrgs - xcgsbi - gIgtots; |
|||
*(here->BSIM4v3GPspPtr +1) += xcgsbr; |
|||
*(here->BSIM4v3GPbpPtr) -= gcrgb - xcgbbi - gIgtotb; |
|||
*(here->BSIM4v3GPbpPtr +1) += xcgbbr; |
|||
} |
|||
else |
|||
{ *(here->BSIM4v3GPgpPtr +1) += xcggbr; |
|||
*(here->BSIM4v3GPgpPtr) += xcggbi + gIgtotg; |
|||
*(here->BSIM4v3GPdpPtr +1) += xcgdbr; |
|||
*(here->BSIM4v3GPdpPtr) += xcgdbi + gIgtotd; |
|||
*(here->BSIM4v3GPspPtr +1) += xcgsbr; |
|||
*(here->BSIM4v3GPspPtr) += xcgsbi + gIgtots; |
|||
*(here->BSIM4v3GPbpPtr +1) += xcgbbr; |
|||
*(here->BSIM4v3GPbpPtr) += xcgbbi + gIgtotb; |
|||
} |
|||
|
|||
if (model->BSIM4v3rdsMod) |
|||
{ (*(here->BSIM4v3DgpPtr) += gdtotg); |
|||
(*(here->BSIM4v3DspPtr) += gdtots); |
|||
(*(here->BSIM4v3DbpPtr) += gdtotb); |
|||
(*(here->BSIM4v3SdpPtr) += gstotd); |
|||
(*(here->BSIM4v3SgpPtr) += gstotg); |
|||
(*(here->BSIM4v3SbpPtr) += gstotb); |
|||
} |
|||
|
|||
*(here->BSIM4v3DPdpPtr +1) += xcddbr + gdsi + RevSumi; |
|||
*(here->BSIM4v3DPdpPtr) += gdpr + xcddbi + gdsr + here->BSIM4v3gbd |
|||
- gdtotd + RevSumr + gbdpdp - gIdtotd; |
|||
*(here->BSIM4v3DPdPtr) -= gdpr + gdtot; |
|||
*(here->BSIM4v3DPgpPtr +1) += xcdgbr + Gmi; |
|||
*(here->BSIM4v3DPgpPtr) += Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg; |
|||
*(here->BSIM4v3DPspPtr +1) += xcdsbr - gdsi - FwdSumi; |
|||
*(here->BSIM4v3DPspPtr) -= gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots; |
|||
*(here->BSIM4v3DPbpPtr +1) += xcdbbr + Gmbsi; |
|||
*(here->BSIM4v3DPbpPtr) -= gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb; |
|||
|
|||
*(here->BSIM4v3DdpPtr) -= gdpr - gdtotd; |
|||
*(here->BSIM4v3DdPtr) += gdpr + gdtot; |
|||
|
|||
*(here->BSIM4v3SPdpPtr +1) += xcsdbr - gdsi - RevSumi; |
|||
*(here->BSIM4v3SPdpPtr) -= gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd; |
|||
*(here->BSIM4v3SPgpPtr +1) += xcsgbr - Gmi; |
|||
*(here->BSIM4v3SPgpPtr) -= Gmr - xcsgbi + gstotg - gbspg + gIstotg; |
|||
*(here->BSIM4v3SPspPtr +1) += xcssbr + gdsi + FwdSumi; |
|||
*(here->BSIM4v3SPspPtr) += gspr + xcssbi + gdsr + here->BSIM4v3gbs |
|||
- gstots + FwdSumr + gbspsp - gIstots; |
|||
*(here->BSIM4v3SPsPtr) -= gspr + gstot; |
|||
*(here->BSIM4v3SPbpPtr +1) += xcsbbr - Gmbsi; |
|||
*(here->BSIM4v3SPbpPtr) -= gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb; |
|||
|
|||
*(here->BSIM4v3SspPtr) -= gspr - gstots; |
|||
*(here->BSIM4v3SsPtr) += gspr + gstot; |
|||
|
|||
*(here->BSIM4v3BPdpPtr +1) += xcbdb; |
|||
*(here->BSIM4v3BPdpPtr) -= gjbd - gbbdp + gIbtotd; |
|||
*(here->BSIM4v3BPgpPtr +1) += xcbgb; |
|||
*(here->BSIM4v3BPgpPtr) -= here->BSIM4v3gbgs + gIbtotg; |
|||
*(here->BSIM4v3BPspPtr +1) += xcbsb; |
|||
*(here->BSIM4v3BPspPtr) -= gjbs - gbbsp + gIbtots; |
|||
*(here->BSIM4v3BPbpPtr +1) += xcbbb; |
|||
*(here->BSIM4v3BPbpPtr) += gjbd + gjbs - here->BSIM4v3gbbs |
|||
- gIbtotb; |
|||
ggidld = here->BSIM4v3ggidld; |
|||
ggidlg = here->BSIM4v3ggidlg; |
|||
ggidlb = here->BSIM4v3ggidlb; |
|||
ggislg = here->BSIM4v3ggislg; |
|||
ggisls = here->BSIM4v3ggisls; |
|||
ggislb = here->BSIM4v3ggislb; |
|||
|
|||
/* stamp gidl */ |
|||
(*(here->BSIM4v3DPdpPtr) += ggidld); |
|||
(*(here->BSIM4v3DPgpPtr) += ggidlg); |
|||
(*(here->BSIM4v3DPspPtr) -= (ggidlg + ggidld) + ggidlb); |
|||
(*(here->BSIM4v3DPbpPtr) += ggidlb); |
|||
(*(here->BSIM4v3BPdpPtr) -= ggidld); |
|||
(*(here->BSIM4v3BPgpPtr) -= ggidlg); |
|||
(*(here->BSIM4v3BPspPtr) += (ggidlg + ggidld) + ggidlb); |
|||
(*(here->BSIM4v3BPbpPtr) -= ggidlb); |
|||
/* stamp gisl */ |
|||
(*(here->BSIM4v3SPdpPtr) -= (ggisls + ggislg) + ggislb); |
|||
(*(here->BSIM4v3SPgpPtr) += ggislg); |
|||
(*(here->BSIM4v3SPspPtr) += ggisls); |
|||
(*(here->BSIM4v3SPbpPtr) += ggislb); |
|||
(*(here->BSIM4v3BPdpPtr) += (ggislg + ggisls) + ggislb); |
|||
(*(here->BSIM4v3BPgpPtr) -= ggislg); |
|||
(*(here->BSIM4v3BPspPtr) -= ggisls); |
|||
(*(here->BSIM4v3BPbpPtr) -= ggislb); |
|||
|
|||
if (here->BSIM4v3rbodyMod) |
|||
{ (*(here->BSIM4v3DPdbPtr +1) += xcdbdb); |
|||
(*(here->BSIM4v3DPdbPtr) -= here->BSIM4v3gbd); |
|||
(*(here->BSIM4v3SPsbPtr +1) += xcsbsb); |
|||
(*(here->BSIM4v3SPsbPtr) -= here->BSIM4v3gbs); |
|||
|
|||
(*(here->BSIM4v3DBdpPtr +1) += xcdbdb); |
|||
(*(here->BSIM4v3DBdpPtr) -= here->BSIM4v3gbd); |
|||
(*(here->BSIM4v3DBdbPtr +1) -= xcdbdb); |
|||
(*(here->BSIM4v3DBdbPtr) += here->BSIM4v3gbd + here->BSIM4v3grbpd |
|||
+ here->BSIM4v3grbdb); |
|||
(*(here->BSIM4v3DBbpPtr) -= here->BSIM4v3grbpd); |
|||
(*(here->BSIM4v3DBbPtr) -= here->BSIM4v3grbdb); |
|||
|
|||
(*(here->BSIM4v3BPdbPtr) -= here->BSIM4v3grbpd); |
|||
(*(here->BSIM4v3BPbPtr) -= here->BSIM4v3grbpb); |
|||
(*(here->BSIM4v3BPsbPtr) -= here->BSIM4v3grbps); |
|||
(*(here->BSIM4v3BPbpPtr) += here->BSIM4v3grbpd + here->BSIM4v3grbps |
|||
+ here->BSIM4v3grbpb); |
|||
/* WDLiu: (-here->BSIM4v3gbbs) already added to BPbpPtr */ |
|||
|
|||
(*(here->BSIM4v3SBspPtr +1) += xcsbsb); |
|||
(*(here->BSIM4v3SBspPtr) -= here->BSIM4v3gbs); |
|||
(*(here->BSIM4v3SBbpPtr) -= here->BSIM4v3grbps); |
|||
(*(here->BSIM4v3SBbPtr) -= here->BSIM4v3grbsb); |
|||
(*(here->BSIM4v3SBsbPtr +1) -= xcsbsb); |
|||
(*(here->BSIM4v3SBsbPtr) += here->BSIM4v3gbs |
|||
+ here->BSIM4v3grbps + here->BSIM4v3grbsb); |
|||
|
|||
(*(here->BSIM4v3BdbPtr) -= here->BSIM4v3grbdb); |
|||
(*(here->BSIM4v3BbpPtr) -= here->BSIM4v3grbpb); |
|||
(*(here->BSIM4v3BsbPtr) -= here->BSIM4v3grbsb); |
|||
(*(here->BSIM4v3BbPtr) += here->BSIM4v3grbsb + here->BSIM4v3grbdb |
|||
+ here->BSIM4v3grbpb); |
|||
} |
|||
|
|||
|
|||
/* |
|||
* WDLiu: The internal charge node generated for transient NQS is not needed for |
|||
* AC NQS. The following is not doing a real job, but we have to keep it; |
|||
* otherwise a singular AC NQS matrix may occur if the transient NQS is on. |
|||
* The charge node is isolated from the instance. |
|||
*/ |
|||
if (here->BSIM4v3trnqsMod) |
|||
{ (*(here->BSIM4v3QqPtr) += 1.0); |
|||
(*(here->BSIM4v3QgpPtr) += 0.0); |
|||
(*(here->BSIM4v3QdpPtr) += 0.0); |
|||
(*(here->BSIM4v3QspPtr) += 0.0); |
|||
(*(here->BSIM4v3QbpPtr) += 0.0); |
|||
|
|||
(*(here->BSIM4v3DPqPtr) += 0.0); |
|||
(*(here->BSIM4v3SPqPtr) += 0.0); |
|||
(*(here->BSIM4v3GPqPtr) += 0.0); |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,309 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3ask.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "ifsim.h" |
|||
#include "cktdefs.h" |
|||
#include "devdefs.h" |
|||
#include "bsim4v3def.h" |
|||
#include "sperror.h" |
|||
|
|||
int |
|||
BSIM4v3ask(ckt,inst,which,value,select) |
|||
CKTcircuit *ckt; |
|||
GENinstance *inst; |
|||
int which; |
|||
IFvalue *value; |
|||
IFvalue *select; |
|||
{ |
|||
BSIM4v3instance *here = (BSIM4v3instance*)inst; |
|||
|
|||
switch(which) |
|||
{ case BSIM4v3_L: |
|||
value->rValue = here->BSIM4v3l; |
|||
return(OK); |
|||
case BSIM4v3_W: |
|||
value->rValue = here->BSIM4v3w; |
|||
return(OK); |
|||
case BSIM4v3_NF: |
|||
value->rValue = here->BSIM4v3nf; |
|||
return(OK); |
|||
case BSIM4v3_MIN: |
|||
value->iValue = here->BSIM4v3min; |
|||
return(OK); |
|||
case BSIM4v3_AS: |
|||
value->rValue = here->BSIM4v3sourceArea; |
|||
return(OK); |
|||
case BSIM4v3_AD: |
|||
value->rValue = here->BSIM4v3drainArea; |
|||
return(OK); |
|||
case BSIM4v3_PS: |
|||
value->rValue = here->BSIM4v3sourcePerimeter; |
|||
return(OK); |
|||
case BSIM4v3_PD: |
|||
value->rValue = here->BSIM4v3drainPerimeter; |
|||
return(OK); |
|||
case BSIM4v3_NRS: |
|||
value->rValue = here->BSIM4v3sourceSquares; |
|||
return(OK); |
|||
case BSIM4v3_NRD: |
|||
value->rValue = here->BSIM4v3drainSquares; |
|||
return(OK); |
|||
case BSIM4v3_OFF: |
|||
value->rValue = here->BSIM4v3off; |
|||
return(OK); |
|||
case BSIM4v3_SA: |
|||
value->rValue = here->BSIM4v3sa ; |
|||
return(OK); |
|||
case BSIM4v3_SB: |
|||
value->rValue = here->BSIM4v3sb ; |
|||
return(OK); |
|||
case BSIM4v3_SD: |
|||
value->rValue = here->BSIM4v3sd ; |
|||
return(OK); |
|||
case BSIM4v3_RBSB: |
|||
value->rValue = here->BSIM4v3rbsb; |
|||
return(OK); |
|||
case BSIM4v3_RBDB: |
|||
value->rValue = here->BSIM4v3rbdb; |
|||
return(OK); |
|||
case BSIM4v3_RBPB: |
|||
value->rValue = here->BSIM4v3rbpb; |
|||
return(OK); |
|||
case BSIM4v3_RBPS: |
|||
value->rValue = here->BSIM4v3rbps; |
|||
return(OK); |
|||
case BSIM4v3_RBPD: |
|||
value->rValue = here->BSIM4v3rbpd; |
|||
return(OK); |
|||
case BSIM4v3_TRNQSMOD: |
|||
value->iValue = here->BSIM4v3trnqsMod; |
|||
return(OK); |
|||
case BSIM4v3_ACNQSMOD: |
|||
value->iValue = here->BSIM4v3acnqsMod; |
|||
return(OK); |
|||
case BSIM4v3_RBODYMOD: |
|||
value->iValue = here->BSIM4v3rbodyMod; |
|||
return(OK); |
|||
case BSIM4v3_RGATEMOD: |
|||
value->iValue = here->BSIM4v3rgateMod; |
|||
return(OK); |
|||
case BSIM4v3_GEOMOD: |
|||
value->iValue = here->BSIM4v3geoMod; |
|||
return(OK); |
|||
case BSIM4v3_RGEOMOD: |
|||
value->iValue = here->BSIM4v3rgeoMod; |
|||
return(OK); |
|||
case BSIM4v3_IC_VDS: |
|||
value->rValue = here->BSIM4v3icVDS; |
|||
return(OK); |
|||
case BSIM4v3_IC_VGS: |
|||
value->rValue = here->BSIM4v3icVGS; |
|||
return(OK); |
|||
case BSIM4v3_IC_VBS: |
|||
value->rValue = here->BSIM4v3icVBS; |
|||
return(OK); |
|||
case BSIM4v3_DNODE: |
|||
value->iValue = here->BSIM4v3dNode; |
|||
return(OK); |
|||
case BSIM4v3_GNODEEXT: |
|||
value->iValue = here->BSIM4v3gNodeExt; |
|||
return(OK); |
|||
case BSIM4v3_SNODE: |
|||
value->iValue = here->BSIM4v3sNode; |
|||
return(OK); |
|||
case BSIM4v3_BNODE: |
|||
value->iValue = here->BSIM4v3bNode; |
|||
return(OK); |
|||
case BSIM4v3_DNODEPRIME: |
|||
value->iValue = here->BSIM4v3dNodePrime; |
|||
return(OK); |
|||
case BSIM4v3_GNODEPRIME: |
|||
value->iValue = here->BSIM4v3gNodePrime; |
|||
return(OK); |
|||
case BSIM4v3_GNODEMID: |
|||
value->iValue = here->BSIM4v3gNodeMid; |
|||
return(OK); |
|||
case BSIM4v3_SNODEPRIME: |
|||
value->iValue = here->BSIM4v3sNodePrime; |
|||
return(OK); |
|||
case BSIM4v3_DBNODE: |
|||
value->iValue = here->BSIM4v3dbNode; |
|||
return(OK); |
|||
case BSIM4v3_BNODEPRIME: |
|||
value->iValue = here->BSIM4v3bNodePrime; |
|||
return(OK); |
|||
case BSIM4v3_SBNODE: |
|||
value->iValue = here->BSIM4v3sbNode; |
|||
return(OK); |
|||
case BSIM4v3_SOURCECONDUCT: |
|||
value->rValue = here->BSIM4v3sourceConductance; |
|||
return(OK); |
|||
case BSIM4v3_DRAINCONDUCT: |
|||
value->rValue = here->BSIM4v3drainConductance; |
|||
return(OK); |
|||
case BSIM4v3_VBD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3vbd); |
|||
return(OK); |
|||
case BSIM4v3_VBS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3vbs); |
|||
return(OK); |
|||
case BSIM4v3_VGS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3vgs); |
|||
return(OK); |
|||
case BSIM4v3_VDS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3vds); |
|||
return(OK); |
|||
case BSIM4v3_CD: |
|||
value->rValue = here->BSIM4v3cd; |
|||
return(OK); |
|||
case BSIM4v3_CBS: |
|||
value->rValue = here->BSIM4v3cbs; |
|||
return(OK); |
|||
case BSIM4v3_CBD: |
|||
value->rValue = here->BSIM4v3cbd; |
|||
return(OK); |
|||
case BSIM4v3_CSUB: |
|||
value->rValue = here->BSIM4v3csub; |
|||
return(OK); |
|||
case BSIM4v3_IGIDL: |
|||
value->rValue = here->BSIM4v3Igidl; |
|||
return(OK); |
|||
case BSIM4v3_IGISL: |
|||
value->rValue = here->BSIM4v3Igisl; |
|||
return(OK); |
|||
case BSIM4v3_IGS: |
|||
value->rValue = here->BSIM4v3Igs; |
|||
return(OK); |
|||
case BSIM4v3_IGD: |
|||
value->rValue = here->BSIM4v3Igd; |
|||
return(OK); |
|||
case BSIM4v3_IGB: |
|||
value->rValue = here->BSIM4v3Igb; |
|||
return(OK); |
|||
case BSIM4v3_IGCS: |
|||
value->rValue = here->BSIM4v3Igcs; |
|||
return(OK); |
|||
case BSIM4v3_IGCD: |
|||
value->rValue = here->BSIM4v3Igcd; |
|||
return(OK); |
|||
case BSIM4v3_GM: |
|||
value->rValue = here->BSIM4v3gm; |
|||
return(OK); |
|||
case BSIM4v3_GDS: |
|||
value->rValue = here->BSIM4v3gds; |
|||
return(OK); |
|||
case BSIM4v3_GMBS: |
|||
value->rValue = here->BSIM4v3gmbs; |
|||
return(OK); |
|||
case BSIM4v3_GBD: |
|||
value->rValue = here->BSIM4v3gbd; |
|||
return(OK); |
|||
case BSIM4v3_GBS: |
|||
value->rValue = here->BSIM4v3gbs; |
|||
return(OK); |
|||
case BSIM4v3_QB: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qb); |
|||
return(OK); |
|||
case BSIM4v3_CQB: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3cqb); |
|||
return(OK); |
|||
case BSIM4v3_QG: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qg); |
|||
return(OK); |
|||
case BSIM4v3_CQG: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3cqg); |
|||
return(OK); |
|||
case BSIM4v3_QD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qd); |
|||
return(OK); |
|||
case BSIM4v3_CQD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3cqd); |
|||
return(OK); |
|||
case BSIM4v3_QS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qs); |
|||
return(OK); |
|||
case BSIM4v3_CGGB: |
|||
value->rValue = here->BSIM4v3cggb; |
|||
return(OK); |
|||
case BSIM4v3_CGDB: |
|||
value->rValue = here->BSIM4v3cgdb; |
|||
return(OK); |
|||
case BSIM4v3_CGSB: |
|||
value->rValue = here->BSIM4v3cgsb; |
|||
return(OK); |
|||
case BSIM4v3_CDGB: |
|||
value->rValue = here->BSIM4v3cdgb; |
|||
return(OK); |
|||
case BSIM4v3_CDDB: |
|||
value->rValue = here->BSIM4v3cddb; |
|||
return(OK); |
|||
case BSIM4v3_CDSB: |
|||
value->rValue = here->BSIM4v3cdsb; |
|||
return(OK); |
|||
case BSIM4v3_CBGB: |
|||
value->rValue = here->BSIM4v3cbgb; |
|||
return(OK); |
|||
case BSIM4v3_CBDB: |
|||
value->rValue = here->BSIM4v3cbdb; |
|||
return(OK); |
|||
case BSIM4v3_CBSB: |
|||
value->rValue = here->BSIM4v3cbsb; |
|||
return(OK); |
|||
case BSIM4v3_CSGB: |
|||
value->rValue = here->BSIM4v3csgb; |
|||
return(OK); |
|||
case BSIM4v3_CSDB: |
|||
value->rValue = here->BSIM4v3csdb; |
|||
return(OK); |
|||
case BSIM4v3_CSSB: |
|||
value->rValue = here->BSIM4v3cssb; |
|||
return(OK); |
|||
case BSIM4v3_CGBB: |
|||
value->rValue = here->BSIM4v3cgbb; |
|||
return(OK); |
|||
case BSIM4v3_CDBB: |
|||
value->rValue = here->BSIM4v3cdbb; |
|||
return(OK); |
|||
case BSIM4v3_CSBB: |
|||
value->rValue = here->BSIM4v3csbb; |
|||
return(OK); |
|||
case BSIM4v3_CBBB: |
|||
value->rValue = here->BSIM4v3cbbb; |
|||
return(OK); |
|||
case BSIM4v3_CAPBD: |
|||
value->rValue = here->BSIM4v3capbd; |
|||
return(OK); |
|||
case BSIM4v3_CAPBS: |
|||
value->rValue = here->BSIM4v3capbs; |
|||
return(OK); |
|||
case BSIM4v3_VON: |
|||
value->rValue = here->BSIM4v3von; |
|||
return(OK); |
|||
case BSIM4v3_VDSAT: |
|||
value->rValue = here->BSIM4v3vdsat; |
|||
return(OK); |
|||
case BSIM4v3_QBS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qbs); |
|||
return(OK); |
|||
case BSIM4v3_QBD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v3qbd); |
|||
return(OK); |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
/* NOTREACHED */ |
|||
} |
|||
|
|||
@ -0,0 +1,663 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3check.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 11/15/2002. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v3def.h" |
|||
#include "trandefs.h" |
|||
#include "const.h" |
|||
#include "sperror.h" |
|||
#include "devdefs.h" |
|||
|
|||
int |
|||
BSIM4v3checkModel(model, here, ckt) |
|||
BSIM4v3model *model; |
|||
BSIM4v3instance *here; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
struct bsim4v3SizeDependParam *pParam; |
|||
int Fatal_Flag = 0; |
|||
FILE *fplog; |
|||
|
|||
if ((fplog = fopen("bsim4v3.out", "w")) != NULL) |
|||
{ pParam = here->pParam; |
|||
fprintf(fplog, "BSIM4v3: Berkeley Short Channel IGFET Model-4\n"); |
|||
fprintf(fplog, "Developed by Xuemei (Jane) Xi, Jin He, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n"); |
|||
fprintf(fplog, "\n"); |
|||
fprintf(fplog, "++++++++++ BSIM4v3 PARAMETER CHECKING BELOW ++++++++++\n"); |
|||
|
|||
if (strcmp(model->BSIM4v3version, "4.3.0") != 0) |
|||
{ fprintf(fplog, "Warning: This model is BSIM4.3.0; you specified a wrong version number.\n"); |
|||
printf("Warning: This model is BSIM4.3.0; you specified a wrong version number.\n"); |
|||
} |
|||
fprintf(fplog, "Model = %s\n", model->BSIM4v3modName); |
|||
|
|||
|
|||
if ((here->BSIM4v3rgateMod == 2) || (here->BSIM4v3rgateMod == 3)) |
|||
{ if ((here->BSIM4v3trnqsMod == 1) || (here->BSIM4v3acnqsMod == 1)) |
|||
{ fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); |
|||
printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); |
|||
} |
|||
} |
|||
|
|||
|
|||
if (model->BSIM4v3toxe <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxe = %g is not positive.\n", |
|||
model->BSIM4v3toxe); |
|||
printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v3toxe); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v3toxp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", |
|||
model->BSIM4v3toxp); |
|||
printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v3toxp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (model->BSIM4v3toxm <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", |
|||
model->BSIM4v3toxm); |
|||
printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v3toxm); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (model->BSIM4v3toxref <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxref = %g is not positive.\n", |
|||
model->BSIM4v3toxref); |
|||
printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v3toxref); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3lpe0 < -pParam->BSIM4v3leff) |
|||
{ fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", |
|||
pParam->BSIM4v3lpe0); |
|||
printf("Fatal: Lpe0 = %g is less than -Leff.\n", |
|||
pParam->BSIM4v3lpe0); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3lpeb < -pParam->BSIM4v3leff) |
|||
{ fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", |
|||
pParam->BSIM4v3lpeb); |
|||
printf("Fatal: Lpeb = %g is less than -Leff.\n", |
|||
pParam->BSIM4v3lpeb); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3phin < -0.4) |
|||
{ fprintf(fplog, "Fatal: Phin = %g is less than -0.4.\n", |
|||
pParam->BSIM4v3phin); |
|||
printf("Fatal: Phin = %g is less than -0.4.\n", |
|||
pParam->BSIM4v3phin); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3ndep <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Ndep = %g is not positive.\n", |
|||
pParam->BSIM4v3ndep); |
|||
printf("Fatal: Ndep = %g is not positive.\n", |
|||
pParam->BSIM4v3ndep); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3nsub <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", |
|||
pParam->BSIM4v3nsub); |
|||
printf("Fatal: Nsub = %g is not positive.\n", |
|||
pParam->BSIM4v3nsub); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3ngate < 0.0) |
|||
{ fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", |
|||
pParam->BSIM4v3ngate); |
|||
printf("Fatal: Ngate = %g Ngate is not positive.\n", |
|||
pParam->BSIM4v3ngate); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3ngate > 1.e25) |
|||
{ fprintf(fplog, "Fatal: Ngate = %g is too high.\n", |
|||
pParam->BSIM4v3ngate); |
|||
printf("Fatal: Ngate = %g Ngate is too high\n", |
|||
pParam->BSIM4v3ngate); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3xj <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Xj = %g is not positive.\n", |
|||
pParam->BSIM4v3xj); |
|||
printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v3xj); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3dvt1 < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", |
|||
pParam->BSIM4v3dvt1); |
|||
printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v3dvt1); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3dvt1w < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", |
|||
pParam->BSIM4v3dvt1w); |
|||
printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v3dvt1w); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3w0 == -pParam->BSIM4v3weff) |
|||
{ fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); |
|||
printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3dsub < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v3dsub); |
|||
printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v3dsub); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3b1 == -pParam->BSIM4v3weff) |
|||
{ fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); |
|||
printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3u0temp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM4v3u0temp); |
|||
printf("Fatal: u0 at current temperature = %g is not positive.\n", |
|||
pParam->BSIM4v3u0temp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3delta < 0.0) |
|||
{ fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", |
|||
pParam->BSIM4v3delta); |
|||
printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v3delta); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3vsattemp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM4v3vsattemp); |
|||
printf("Fatal: Vsat at current temperature = %g is not positive.\n", |
|||
pParam->BSIM4v3vsattemp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3pclm <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v3pclm); |
|||
printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v3pclm); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3drout < 0.0) |
|||
{ fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v3drout); |
|||
printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v3drout); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3pscbe2 <= 0.0) |
|||
{ fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", |
|||
pParam->BSIM4v3pscbe2); |
|||
printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v3pscbe2); |
|||
} |
|||
|
|||
if (here->BSIM4v3nf < 1.0) |
|||
{ fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v3nf); |
|||
printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v3nf); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if((here->BSIM4v3sa > 0.0) && (here->BSIM4v3sb > 0.0) && |
|||
((here->BSIM4v3nf == 1.0) || ((here->BSIM4v3nf > 1.0) && (here->BSIM4v3sd > 0.0))) ) |
|||
{ if (model->BSIM4v3saref <= 0.0) |
|||
{ fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4v3saref); |
|||
printf("Fatal: SAref = %g is not positive.\n",model->BSIM4v3saref); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v3sbref <= 0.0) |
|||
{ fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4v3sbref); |
|||
printf("Fatal: SBref = %g is not positive.\n",model->BSIM4v3sbref); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v3wlod < 0.0) |
|||
{ fprintf(fplog, "Warning: WLOD = %g is less than 0. Set to 0.0\n",model->BSIM4v3wlod); |
|||
printf("Warning: WLOD = %g is less than 0.\n",model->BSIM4v3wlod); |
|||
model->BSIM4v3wlod = 0.0; |
|||
} |
|||
if (model->BSIM4v3kvsat < -1.0 ) |
|||
{ fprintf(fplog, "Warning: KVSAT = %g is too small; Reset to -1.0.\n",model->BSIM4v3kvsat); |
|||
printf("Warning: KVSAT = %g is is too small; Reset to -1.0.\n",model->BSIM4v3kvsat); |
|||
model->BSIM4v3kvsat = -1.0; |
|||
} |
|||
if (model->BSIM4v3kvsat > 1.0) |
|||
{ fprintf(fplog, "Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4v3kvsat); |
|||
printf("Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4v3kvsat); |
|||
model->BSIM4v3kvsat = 1.0; |
|||
} |
|||
if (model->BSIM4v3lodk2 <= 0.0) |
|||
{ fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4v3lodk2); |
|||
printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4v3lodk2); |
|||
} |
|||
if (model->BSIM4v3lodeta0 <= 0.0) |
|||
{ fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4v3lodeta0); |
|||
printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4v3lodeta0); |
|||
} |
|||
} |
|||
|
|||
if ((here->BSIM4v3l + model->BSIM4v3xl) <= model->BSIM4v3xgl) |
|||
{ fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); |
|||
printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v3ngcon < 1.0) |
|||
{ fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n"); |
|||
printf("Fatal: The parameter ngcon cannot be smaller than one.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if ((model->BSIM4v3ngcon != 1.0) && (model->BSIM4v3ngcon != 2.0)) |
|||
{ model->BSIM4v3ngcon = 1.0; |
|||
fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); |
|||
printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); |
|||
} |
|||
|
|||
if (model->BSIM4v3gbmin < 1.0e-20) |
|||
{ fprintf(fplog, "Warning: Gbmin = %g is too small.\n", |
|||
model->BSIM4v3gbmin); |
|||
printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v3gbmin); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3noff < 0.1) |
|||
{ fprintf(fplog, "Warning: Noff = %g is too small.\n", |
|||
pParam->BSIM4v3noff); |
|||
printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v3noff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3voffcv < -0.5) |
|||
{ fprintf(fplog, "Warning: Voffcv = %g is too small.\n", |
|||
pParam->BSIM4v3voffcv); |
|||
printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v3voffcv); |
|||
} |
|||
|
|||
/* Check capacitance parameters */ |
|||
if (pParam->BSIM4v3clc < 0.0) |
|||
{ fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v3clc); |
|||
printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v3clc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3moin < 5.0) |
|||
{ fprintf(fplog, "Warning: Moin = %g is too small.\n", |
|||
pParam->BSIM4v3moin); |
|||
printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v3moin); |
|||
} |
|||
if (pParam->BSIM4v3moin > 25.0) |
|||
{ fprintf(fplog, "Warning: Moin = %g is too large.\n", |
|||
pParam->BSIM4v3moin); |
|||
printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v3moin); |
|||
} |
|||
if(model->BSIM4v3capMod ==2) { |
|||
if (pParam->BSIM4v3acde < 0.1) |
|||
{ fprintf(fplog, "Warning: Acde = %g is too small.\n", |
|||
pParam->BSIM4v3acde); |
|||
printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v3acde); |
|||
} |
|||
if (pParam->BSIM4v3acde > 1.6) |
|||
{ fprintf(fplog, "Warning: Acde = %g is too large.\n", |
|||
pParam->BSIM4v3acde); |
|||
printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v3acde); |
|||
} |
|||
} |
|||
|
|||
/* Check overlap capacitance parameters */ |
|||
if (pParam->BSIM4v3ckappas < 0.02) |
|||
{ fprintf(fplog, "Warning: ckappas = %g is too small. Set to 0.02\n", |
|||
pParam->BSIM4v3ckappas); |
|||
printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4v3ckappas); |
|||
pParam->BSIM4v3ckappas = 0.02; |
|||
} |
|||
if (pParam->BSIM4v3ckappad < 0.02) |
|||
{ fprintf(fplog, "Warning: ckappad = %g is too small. Set to 0.02\n", |
|||
pParam->BSIM4v3ckappad); |
|||
printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4v3ckappad); |
|||
pParam->BSIM4v3ckappad = 0.02; |
|||
} |
|||
|
|||
if (model->BSIM4v3paramChk ==1) |
|||
{ |
|||
/* Check L and W parameters */ |
|||
if (pParam->BSIM4v3leff <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", |
|||
pParam->BSIM4v3leff); |
|||
printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", |
|||
pParam->BSIM4v3leff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3leffCV <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", |
|||
pParam->BSIM4v3leffCV); |
|||
printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", |
|||
pParam->BSIM4v3leffCV); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3weff <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", |
|||
pParam->BSIM4v3weff); |
|||
printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", |
|||
pParam->BSIM4v3weff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3weffCV <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", |
|||
pParam->BSIM4v3weffCV); |
|||
printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", |
|||
pParam->BSIM4v3weffCV); |
|||
} |
|||
|
|||
/* Check threshold voltage parameters */ |
|||
if (model->BSIM4v3toxe < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", |
|||
model->BSIM4v3toxe); |
|||
printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v3toxe); |
|||
} |
|||
if (model->BSIM4v3toxp < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", |
|||
model->BSIM4v3toxp); |
|||
printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v3toxp); |
|||
} |
|||
if (model->BSIM4v3toxm < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", |
|||
model->BSIM4v3toxm); |
|||
printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v3toxm); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3ndep <= 1.0e12) |
|||
{ fprintf(fplog, "Warning: Ndep = %g may be too small.\n", |
|||
pParam->BSIM4v3ndep); |
|||
printf("Warning: Ndep = %g may be too small.\n", |
|||
pParam->BSIM4v3ndep); |
|||
} |
|||
else if (pParam->BSIM4v3ndep >= 1.0e21) |
|||
{ fprintf(fplog, "Warning: Ndep = %g may be too large.\n", |
|||
pParam->BSIM4v3ndep); |
|||
printf("Warning: Ndep = %g may be too large.\n", |
|||
pParam->BSIM4v3ndep); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3nsub <= 1.0e14) |
|||
{ fprintf(fplog, "Warning: Nsub = %g may be too small.\n", |
|||
pParam->BSIM4v3nsub); |
|||
printf("Warning: Nsub = %g may be too small.\n", |
|||
pParam->BSIM4v3nsub); |
|||
} |
|||
else if (pParam->BSIM4v3nsub >= 1.0e21) |
|||
{ fprintf(fplog, "Warning: Nsub = %g may be too large.\n", |
|||
pParam->BSIM4v3nsub); |
|||
printf("Warning: Nsub = %g may be too large.\n", |
|||
pParam->BSIM4v3nsub); |
|||
} |
|||
|
|||
if ((pParam->BSIM4v3ngate > 0.0) && |
|||
(pParam->BSIM4v3ngate <= 1.e18)) |
|||
{ fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", |
|||
pParam->BSIM4v3ngate); |
|||
printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", |
|||
pParam->BSIM4v3ngate); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3dvt0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", |
|||
pParam->BSIM4v3dvt0); |
|||
printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v3dvt0); |
|||
} |
|||
|
|||
if (fabs(1.0e-6 / (pParam->BSIM4v3w0 + pParam->BSIM4v3weff)) > 10.0) |
|||
{ fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); |
|||
printf("Warning: (W0 + Weff) may be too small.\n"); |
|||
} |
|||
|
|||
/* Check subthreshold parameters */ |
|||
if (pParam->BSIM4v3nfactor < 0.0) |
|||
{ fprintf(fplog, "Warning: Nfactor = %g is negative.\n", |
|||
pParam->BSIM4v3nfactor); |
|||
printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v3nfactor); |
|||
} |
|||
if (pParam->BSIM4v3cdsc < 0.0) |
|||
{ fprintf(fplog, "Warning: Cdsc = %g is negative.\n", |
|||
pParam->BSIM4v3cdsc); |
|||
printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v3cdsc); |
|||
} |
|||
if (pParam->BSIM4v3cdscd < 0.0) |
|||
{ fprintf(fplog, "Warning: Cdscd = %g is negative.\n", |
|||
pParam->BSIM4v3cdscd); |
|||
printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v3cdscd); |
|||
} |
|||
/* Check DIBL parameters */ |
|||
if (pParam->BSIM4v3eta0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Eta0 = %g is negative.\n", |
|||
pParam->BSIM4v3eta0); |
|||
printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM4v3eta0); |
|||
} |
|||
|
|||
/* Check Abulk parameters */ |
|||
if (fabs(1.0e-6 / (pParam->BSIM4v3b1 + pParam->BSIM4v3weff)) > 10.0) |
|||
{ fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); |
|||
printf("Warning: (B1 + Weff) may be too small.\n"); |
|||
} |
|||
|
|||
|
|||
/* Check Saturation parameters */ |
|||
if (pParam->BSIM4v3a2 < 0.01) |
|||
{ fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v3a2); |
|||
printf("Warning: A2 = %g is too small. Set to 0.01.\n", |
|||
pParam->BSIM4v3a2); |
|||
pParam->BSIM4v3a2 = 0.01; |
|||
} |
|||
else if (pParam->BSIM4v3a2 > 1.0) |
|||
{ fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", |
|||
pParam->BSIM4v3a2); |
|||
printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", |
|||
pParam->BSIM4v3a2); |
|||
pParam->BSIM4v3a2 = 1.0; |
|||
pParam->BSIM4v3a1 = 0.0; |
|||
|
|||
} |
|||
|
|||
if (pParam->BSIM4v3prwg < 0.0) |
|||
{ fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v3prwg); |
|||
printf("Warning: Prwg = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v3prwg); |
|||
pParam->BSIM4v3prwg = 0.0; |
|||
} |
|||
if (pParam->BSIM4v3rdsw < 0.0) |
|||
{ fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v3rdsw); |
|||
printf("Warning: Rdsw = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v3rdsw); |
|||
pParam->BSIM4v3rdsw = 0.0; |
|||
pParam->BSIM4v3rds0 = 0.0; |
|||
} |
|||
if (pParam->BSIM4v3rds0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v3rds0); |
|||
printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v3rds0); |
|||
pParam->BSIM4v3rds0 = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3rdswmin < 0.0) |
|||
{ fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v3rdswmin); |
|||
printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v3rdswmin); |
|||
pParam->BSIM4v3rdswmin = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3vsattemp < 1.0e3) |
|||
{ fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v3vsattemp); |
|||
printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v3vsattemp); |
|||
} |
|||
|
|||
if((model->BSIM4v3lambdaGiven) && (pParam->BSIM4v3lambda > 0.0) ) |
|||
{ |
|||
if (pParam->BSIM4v3lambda > 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4v3lambda); |
|||
printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4v3lambda); |
|||
} |
|||
} |
|||
|
|||
if((model->BSIM4v3vtlGiven) && (pParam->BSIM4v3vtl > 0.0) ) |
|||
{ |
|||
if (pParam->BSIM4v3vtl < 6.0e4) |
|||
{ fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v3vtl); |
|||
printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v3vtl); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3xn < 3.0) |
|||
{ fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4v3xn); |
|||
printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4v3xn); |
|||
pParam->BSIM4v3xn = 3.0; |
|||
|
|||
} |
|||
if (model->BSIM4v3lc < 0.0) |
|||
{ fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4v3lc); |
|||
printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4v3lc); |
|||
pParam->BSIM4v3lc = 0.0; |
|||
} |
|||
} |
|||
|
|||
if (pParam->BSIM4v3fprout < 0.0) |
|||
{ fprintf(fplog, "Fatal: fprout = %g is negative.\n", |
|||
pParam->BSIM4v3fprout); |
|||
printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v3fprout); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3pdits < 0.0) |
|||
{ fprintf(fplog, "Fatal: pdits = %g is negative.\n", |
|||
pParam->BSIM4v3pdits); |
|||
printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v3pdits); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v3pditsl < 0.0) |
|||
{ fprintf(fplog, "Fatal: pditsl = %g is negative.\n", |
|||
model->BSIM4v3pditsl); |
|||
printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v3pditsl); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v3pdibl1 < 0.0) |
|||
{ fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", |
|||
pParam->BSIM4v3pdibl1); |
|||
printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v3pdibl1); |
|||
} |
|||
if (pParam->BSIM4v3pdibl2 < 0.0) |
|||
{ fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", |
|||
pParam->BSIM4v3pdibl2); |
|||
printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v3pdibl2); |
|||
} |
|||
|
|||
if (pParam->BSIM4v3nigbinv <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", |
|||
pParam->BSIM4v3nigbinv); |
|||
printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v3nigbinv); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3nigbacc <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", |
|||
pParam->BSIM4v3nigbacc); |
|||
printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v3nigbacc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3nigc <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", |
|||
pParam->BSIM4v3nigc); |
|||
printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v3nigc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3poxedge <= 0.0) |
|||
{ fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", |
|||
pParam->BSIM4v3poxedge); |
|||
printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v3poxedge); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v3pigcd <= 0.0) |
|||
{ fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", |
|||
pParam->BSIM4v3pigcd); |
|||
printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v3pigcd); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
/* Check gate resistance parameters */ |
|||
if (here->BSIM4v3rgateMod == 1) |
|||
{ if (model->BSIM4v3rshg <= 0.0) |
|||
printf("Warning: rshg should be positive for rgateMod = 1.\n"); |
|||
} |
|||
else if (here->BSIM4v3rgateMod == 2) |
|||
{ if (model->BSIM4v3rshg <= 0.0) |
|||
printf("Warning: rshg <= 0.0 for rgateMod = 2.\n"); |
|||
else if (pParam->BSIM4v3xrcrg1 <= 0.0) |
|||
printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n"); |
|||
} |
|||
if (here->BSIM4v3rgateMod == 3) |
|||
{ if (model->BSIM4v3rshg <= 0.0) |
|||
printf("Warning: rshg should be positive for rgateMod = 3.\n"); |
|||
else if (pParam->BSIM4v3xrcrg1 <= 0.0) |
|||
printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n"); |
|||
} |
|||
|
|||
/* Check overlap capacitance parameters */ |
|||
if (model->BSIM4v3cgdo < 0.0) |
|||
{ fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v3cgdo); |
|||
printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v3cgdo); |
|||
model->BSIM4v3cgdo = 0.0; |
|||
} |
|||
if (model->BSIM4v3cgso < 0.0) |
|||
{ fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v3cgso); |
|||
printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v3cgso); |
|||
model->BSIM4v3cgso = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v3tnoia < 0.0) |
|||
{ fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v3tnoia); |
|||
printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v3tnoia); |
|||
model->BSIM4v3tnoia = 0.0; |
|||
} |
|||
if (model->BSIM4v3tnoib < 0.0) |
|||
{ fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v3tnoib); |
|||
printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v3tnoib); |
|||
model->BSIM4v3tnoib = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v3rnoia < 0.0) |
|||
{ fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v3rnoia); |
|||
printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v3rnoia); |
|||
model->BSIM4v3rnoia = 0.0; |
|||
} |
|||
if (model->BSIM4v3rnoib < 0.0) |
|||
{ fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v3rnoib); |
|||
printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v3rnoib); |
|||
model->BSIM4v3rnoib = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v3ntnoi < 0.0) |
|||
{ fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v3ntnoi); |
|||
printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v3ntnoi); |
|||
model->BSIM4v3ntnoi = 0.0; |
|||
} |
|||
|
|||
}/* loop for the parameter check for warning messages */ |
|||
fclose(fplog); |
|||
} |
|||
else |
|||
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); |
|||
} |
|||
|
|||
return(Fatal_Flag); |
|||
} |
|||
|
|||
@ -0,0 +1,201 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3cvtest.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v3def.h" |
|||
#include "trandefs.h" |
|||
#include "const.h" |
|||
#include "devdefs.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v3convTest(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v3model *model = (BSIM4v3model*)inModel; |
|||
BSIM4v3instance *here; |
|||
double delvbd, delvbs, delvds, delvgd, delvgs; |
|||
double delvdbd, delvsbs; |
|||
double delvbd_jct, delvbs_jct; |
|||
double vds, vgs, vgd, vgdo, vbs, vbd; |
|||
double vdbd, vdbs, vsbs; |
|||
double cbhat, cdhat, Idtot, Ibtot; |
|||
double vses, vdes, vdedo, delvses, delvded, delvdes; |
|||
double Isestot, cseshat, Idedtot, cdedhat; |
|||
double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; |
|||
double tol0, tol1, tol2, tol3, tol4, tol5, tol6; |
|||
|
|||
for (; model != NULL; model = model->BSIM4v3nextModel) |
|||
{ for (here = model->BSIM4v3instances; here != NULL ; |
|||
here=here->BSIM4v3nextInstance) |
|||
{ |
|||
if (here->BSIM4v3owner != ARCHme) continue; |
|||
|
|||
vds = model->BSIM4v3type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v3dNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime)); |
|||
vgs = model->BSIM4v3type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v3gNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime)); |
|||
vbs = model->BSIM4v3type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v3bNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime)); |
|||
vdbs = model->BSIM4v3type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v3dbNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime)); |
|||
vsbs = model->BSIM4v3type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v3sbNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime)); |
|||
vses = model->BSIM4v3type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v3sNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime)); |
|||
vdes = model->BSIM4v3type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v3dNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v3sNodePrime)); |
|||
|
|||
vgdo = *(ckt->CKTstate0 + here->BSIM4v3vgs) |
|||
- *(ckt->CKTstate0 + here->BSIM4v3vds); |
|||
vbd = vbs - vds; |
|||
vdbd = vdbs - vds; |
|||
vgd = vgs - vds; |
|||
|
|||
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v3vbd); |
|||
delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v3vdbd); |
|||
delvgd = vgd - vgdo; |
|||
|
|||
delvds = vds - *(ckt->CKTstate0 + here->BSIM4v3vds); |
|||
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v3vgs); |
|||
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v3vbs); |
|||
delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v3vsbs); |
|||
|
|||
delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v3vses)); |
|||
vdedo = *(ckt->CKTstate0 + here->BSIM4v3vdes) |
|||
- *(ckt->CKTstate0 + here->BSIM4v3vds); |
|||
delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v3vdes); |
|||
delvded = vdes - vds - vdedo; |
|||
|
|||
delvbd_jct = (!here->BSIM4v3rbodyMod) ? delvbd : delvdbd; |
|||
delvbs_jct = (!here->BSIM4v3rbodyMod) ? delvbs : delvsbs; |
|||
|
|||
if (here->BSIM4v3mode >= 0) |
|||
{ Idtot = here->BSIM4v3cd + here->BSIM4v3csub - here->BSIM4v3cbd |
|||
+ here->BSIM4v3Igidl; |
|||
cdhat = Idtot - here->BSIM4v3gbd * delvbd_jct |
|||
+ (here->BSIM4v3gmbs + here->BSIM4v3gbbs + here->BSIM4v3ggidlb) * delvbs |
|||
+ (here->BSIM4v3gm + here->BSIM4v3gbgs + here->BSIM4v3ggidlg) * delvgs |
|||
+ (here->BSIM4v3gds + here->BSIM4v3gbds + here->BSIM4v3ggidld) * delvds; |
|||
|
|||
Igstot = here->BSIM4v3Igs + here->BSIM4v3Igcs; |
|||
cgshat = Igstot + (here->BSIM4v3gIgsg + here->BSIM4v3gIgcsg) * delvgs |
|||
+ here->BSIM4v3gIgcsd * delvds + here->BSIM4v3gIgcsb * delvbs; |
|||
|
|||
Igdtot = here->BSIM4v3Igd + here->BSIM4v3Igcd; |
|||
cgdhat = Igdtot + here->BSIM4v3gIgdg * delvgd + here->BSIM4v3gIgcdg * delvgs |
|||
+ here->BSIM4v3gIgcdd * delvds + here->BSIM4v3gIgcdb * delvbs; |
|||
|
|||
Igbtot = here->BSIM4v3Igb; |
|||
cgbhat = here->BSIM4v3Igb + here->BSIM4v3gIgbg * delvgs + here->BSIM4v3gIgbd |
|||
* delvds + here->BSIM4v3gIgbb * delvbs; |
|||
} |
|||
else |
|||
{ Idtot = here->BSIM4v3cd + here->BSIM4v3cbd - here->BSIM4v3Igidl; /* bugfix */ |
|||
cdhat = Idtot + here->BSIM4v3gbd * delvbd_jct + here->BSIM4v3gmbs |
|||
* delvbd + here->BSIM4v3gm * delvgd |
|||
- (here->BSIM4v3gds + here->BSIM4v3ggidls) * delvds |
|||
- here->BSIM4v3ggidlg * delvgs - here->BSIM4v3ggidlb * delvbs; |
|||
|
|||
Igstot = here->BSIM4v3Igs + here->BSIM4v3Igcd; |
|||
cgshat = Igstot + here->BSIM4v3gIgsg * delvgs + here->BSIM4v3gIgcdg * delvgd |
|||
- here->BSIM4v3gIgcdd * delvds + here->BSIM4v3gIgcdb * delvbd; |
|||
|
|||
Igdtot = here->BSIM4v3Igd + here->BSIM4v3Igcs; |
|||
cgdhat = Igdtot + (here->BSIM4v3gIgdg + here->BSIM4v3gIgcsg) * delvgd |
|||
- here->BSIM4v3gIgcsd * delvds + here->BSIM4v3gIgcsb * delvbd; |
|||
|
|||
Igbtot = here->BSIM4v3Igb; |
|||
cgbhat = here->BSIM4v3Igb + here->BSIM4v3gIgbg * delvgd - here->BSIM4v3gIgbd |
|||
* delvds + here->BSIM4v3gIgbb * delvbd; |
|||
} |
|||
|
|||
Isestot = here->BSIM4v3gstot * (*(ckt->CKTstate0 + here->BSIM4v3vses)); |
|||
cseshat = Isestot + here->BSIM4v3gstot * delvses |
|||
+ here->BSIM4v3gstotd * delvds + here->BSIM4v3gstotg * delvgs |
|||
+ here->BSIM4v3gstotb * delvbs; |
|||
|
|||
Idedtot = here->BSIM4v3gdtot * vdedo; |
|||
cdedhat = Idedtot + here->BSIM4v3gdtot * delvded |
|||
+ here->BSIM4v3gdtotd * delvds + here->BSIM4v3gdtotg * delvgs |
|||
+ here->BSIM4v3gdtotb * delvbs; |
|||
|
|||
/* |
|||
* Check convergence |
|||
*/ |
|||
|
|||
if ((here->BSIM4v3off == 0) || (!(ckt->CKTmode & MODEINITFIX))) |
|||
{ tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) |
|||
+ ckt->CKTabstol; |
|||
tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) |
|||
+ ckt->CKTabstol; |
|||
tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) |
|||
+ ckt->CKTabstol; |
|||
tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) |
|||
+ ckt->CKTabstol; |
|||
tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) |
|||
+ ckt->CKTabstol; |
|||
tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) |
|||
+ ckt->CKTabstol; |
|||
|
|||
if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) |
|||
|| (fabs(cdedhat - Idedtot) >= tol2)) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
|
|||
if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) |
|||
|| (fabs(cgbhat - Igbtot) >= tol5)) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
|
|||
Ibtot = here->BSIM4v3cbs + here->BSIM4v3cbd |
|||
- here->BSIM4v3Igidl - here->BSIM4v3Igisl - here->BSIM4v3csub; |
|||
if (here->BSIM4v3mode >= 0) |
|||
{ cbhat = Ibtot + here->BSIM4v3gbd * delvbd_jct |
|||
+ here->BSIM4v3gbs * delvbs_jct - (here->BSIM4v3gbbs + here->BSIM4v3ggidlb) |
|||
* delvbs - (here->BSIM4v3gbgs + here->BSIM4v3ggidlg) * delvgs |
|||
- (here->BSIM4v3gbds + here->BSIM4v3ggidld) * delvds |
|||
- here->BSIM4v3ggislg * delvgd - here->BSIM4v3ggislb* delvbd + here->BSIM4v3ggisls * delvds ; |
|||
} |
|||
else |
|||
{ cbhat = Ibtot + here->BSIM4v3gbs * delvbs_jct + here->BSIM4v3gbd |
|||
* delvbd_jct - (here->BSIM4v3gbbs + here->BSIM4v3ggislb) * delvbd |
|||
- (here->BSIM4v3gbgs + here->BSIM4v3ggislg) * delvgd |
|||
+ (here->BSIM4v3gbds + here->BSIM4v3ggisld - here->BSIM4v3ggidls) * delvds |
|||
- here->BSIM4v3ggidlg * delvgs - here->BSIM4v3ggidlb * delvbs; |
|||
} |
|||
tol6 = ckt->CKTreltol * MAX(fabs(cbhat), |
|||
fabs(Ibtot)) + ckt->CKTabstol; |
|||
if (fabs(cbhat - Ibtot) > tol6) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3del.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "bsim4v3def.h" |
|||
#include "sperror.h" |
|||
#include "gendefs.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v3delete(inModel,name,inInst) |
|||
GENmodel *inModel; |
|||
IFuid name; |
|||
GENinstance **inInst; |
|||
{ |
|||
BSIM4v3instance **fast = (BSIM4v3instance**)inInst; |
|||
BSIM4v3model *model = (BSIM4v3model*)inModel; |
|||
BSIM4v3instance **prev = NULL; |
|||
BSIM4v3instance *here; |
|||
|
|||
for (; model ; model = model->BSIM4v3nextModel) |
|||
{ prev = &(model->BSIM4v3instances); |
|||
for (here = *prev; here ; here = *prev) |
|||
{ if (here->BSIM4v3name == name || (fast && here==*fast)) |
|||
{ *prev= here->BSIM4v3nextInstance; |
|||
FREE(here); |
|||
return(OK); |
|||
} |
|||
prev = &(here->BSIM4v3nextInstance); |
|||
} |
|||
} |
|||
return(E_NODEV); |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3dest.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "bsim4v3def.h" |
|||
|
|||
void |
|||
BSIM4v3destroy(inModel) |
|||
GENmodel **inModel; |
|||
{ |
|||
BSIM4v3model **model = (BSIM4v3model**)inModel; |
|||
BSIM4v3instance *here; |
|||
BSIM4v3instance *prev = NULL; |
|||
BSIM4v3model *mod = *model; |
|||
BSIM4v3model *oldmod = NULL; |
|||
|
|||
for (; mod ; mod = mod->BSIM4v3nextModel) |
|||
{ if(oldmod) FREE(oldmod); |
|||
oldmod = mod; |
|||
prev = (BSIM4v3instance *)NULL; |
|||
for (here = mod->BSIM4v3instances; here; here = here->BSIM4v3nextInstance) |
|||
{ if(prev) FREE(prev); |
|||
prev = here; |
|||
} |
|||
if(prev) FREE(prev); |
|||
} |
|||
if(oldmod) FREE(oldmod); |
|||
*model = NULL; |
|||
return; |
|||
} |
|||
@ -0,0 +1,382 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3geo.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
|
|||
/* |
|||
* WDLiu: |
|||
* This subrutine is a special module to process the geometry dependent |
|||
* parasitics for BSIM4v3, which calculates Ps, Pd, As, Ad, and Rs and Rd |
|||
* for multi-fingers and varous GEO and RGEO options. |
|||
*/ |
|||
|
|||
int |
|||
BSIM4v3NumFingerDiff(nf, minSD, nuIntD, nuEndD, nuIntS, nuEndS) |
|||
int minSD; |
|||
double nf, *nuIntD, *nuEndD, *nuIntS, *nuEndS; |
|||
{ |
|||
int NF; |
|||
NF = (int)nf; |
|||
if ((NF%2) != 0) |
|||
{ *nuEndD = *nuEndS = 1.0; |
|||
*nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0); |
|||
} |
|||
else |
|||
{ if (minSD == 1) /* minimize # of source */ |
|||
{ *nuEndD = 2.0; |
|||
*nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); |
|||
*nuEndS = 0.0; |
|||
*nuIntS = nf; |
|||
} |
|||
else |
|||
{ *nuEndD = 0.0; |
|||
*nuIntD = nf; |
|||
*nuEndS = 2.0; |
|||
*nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v3PAeffGeo(nf, geo, minSD, Weffcj, DMCG, DMCI, DMDG, Ps, Pd, As, Ad) |
|||
int geo, minSD; |
|||
double Weffcj, DMCG, DMCI, DMDG; |
|||
double nf, *Ps, *Pd, *As, *Ad; |
|||
{ |
|||
double T0, T1, T2; |
|||
double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer; |
|||
double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer; |
|||
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; |
|||
|
|||
if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */ |
|||
BSIM4v3NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); |
|||
|
|||
T0 = DMCG + DMCI; |
|||
T1 = DMCG + DMCG; |
|||
T2 = DMDG + DMDG; |
|||
|
|||
PSiso = PDiso = T0 + T0 + Weffcj; |
|||
PSsha = PDsha = T1; |
|||
PSmer = PDmer = T2; |
|||
|
|||
ASiso = ADiso = T0 * Weffcj; |
|||
ASsha = ADsha = DMCG * Weffcj; |
|||
ASmer = ADmer = DMDG * Weffcj; |
|||
|
|||
switch(geo) |
|||
{ case 0: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 1: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 2: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 3: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 4: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 5: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 6: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 7: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 8: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 9: /* geo = 9 and 10 happen only when nf = even */ |
|||
*Ps = PSiso + (nf - 1.0) * PSsha; |
|||
*Pd = nf * PDsha; |
|||
*As = ASiso + (nf - 1.0) * ASsha; |
|||
*Ad = nf * ADsha; |
|||
break; |
|||
case 10: |
|||
*Ps = nf * PSsha; |
|||
*Pd = PDiso + (nf - 1.0) * PDsha; |
|||
*As = nf * ASsha; |
|||
*Ad = ADiso + (nf - 1.0) * ADsha; |
|||
break; |
|||
default: |
|||
printf("Warning: Specified GEO = %d not matched\n", geo); |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v3RdseffGeo(nf, geo, rgeo, minSD, Weffcj, Rsh, DMCG, DMCI, DMDG, Type, Rtot) |
|||
int geo, rgeo, minSD, Type; |
|||
double nf, Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
double *Rtot; |
|||
{ |
|||
double Rint, Rend = 0.0; |
|||
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; |
|||
|
|||
if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */ |
|||
{ BSIM4v3NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); |
|||
|
|||
/* Internal S/D resistance -- assume shared S or D and all wide contacts */ |
|||
if (Type == 1) |
|||
{ if (nuIntS == 0.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / ( Weffcj * nuIntS); |
|||
} |
|||
else |
|||
{ if (nuIntD == 0.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / ( Weffcj * nuIntD); |
|||
} |
|||
} |
|||
|
|||
/* End S/D resistance -- geo dependent */ |
|||
switch(geo) |
|||
{ case 0: |
|||
if (Type == 1) BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 1: |
|||
if (Type == 1) BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 2: |
|||
if (Type == 1) BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 3: |
|||
if (Type == 1) BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 4: |
|||
if (Type == 1) BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else Rend = Rsh * DMDG / Weffcj; |
|||
break; |
|||
case 5: |
|||
if (Type == 1) BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else Rend = Rsh * DMDG / (Weffcj * nuEndD); |
|||
break; |
|||
case 6: |
|||
if (Type == 1) Rend = Rsh * DMDG / Weffcj; |
|||
else BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 7: |
|||
if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS); |
|||
else BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 8: |
|||
Rend = Rsh * DMDG / Weffcj; |
|||
break; |
|||
case 9: /* all wide contacts assumed for geo = 9 and 10 */ |
|||
if (Type == 1) |
|||
{ Rend = 0.5 * Rsh * DMCG / Weffcj; |
|||
if (nf == 2.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); |
|||
} |
|||
else |
|||
{ Rend = 0.0; |
|||
Rint = Rsh * DMCG / (Weffcj * nf); |
|||
} |
|||
break; |
|||
case 10: |
|||
if (Type == 1) |
|||
{ Rend = 0.0; |
|||
Rint = Rsh * DMCG / (Weffcj * nf); |
|||
} |
|||
else |
|||
{ Rend = 0.5 * Rsh * DMCG / Weffcj;; |
|||
if (nf == 2.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); |
|||
} |
|||
break; |
|||
default: |
|||
printf("Warning: Specified GEO = %d not matched\n", geo); |
|||
} |
|||
|
|||
if (Rint <= 0.0) |
|||
*Rtot = Rend; |
|||
else if (Rend <= 0.0) |
|||
*Rtot = Rint; |
|||
else |
|||
*Rtot = Rint * Rend / (Rint + Rend); |
|||
if(*Rtot==0.0) |
|||
printf("Warning: Zero resistance returned from RdseffGeo\n"); |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v3RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) |
|||
double Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
int rgeo, Type; |
|||
double nuEnd, *Rend; |
|||
{ |
|||
if (Type == 1) |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 2: |
|||
case 5: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 3: |
|||
case 4: |
|||
case 6: |
|||
if ((DMCG + DMCI) == 0.0) |
|||
printf("(DMCG + DMCI) can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
else |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 3: |
|||
case 7: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 2: |
|||
case 4: |
|||
case 8: |
|||
if ((DMCG + DMCI) == 0.0) |
|||
printf("(DMCG + DMCI) can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v3RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) |
|||
double Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
int rgeo, Type; |
|||
double nuEnd, *Rend; |
|||
{ |
|||
if (Type == 1) |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 2: |
|||
case 5: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 3: |
|||
case 4: |
|||
case 6: |
|||
if (DMCG == 0.0) |
|||
printf("DMCG can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
else |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 3: |
|||
case 7: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 2: |
|||
case 4: |
|||
case 8: |
|||
if (DMCG == 0.0) |
|||
printf("DMCG can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3getic.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v3def.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v3getic(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v3model *model = (BSIM4v3model*)inModel; |
|||
BSIM4v3instance *here; |
|||
|
|||
for (; model ; model = model->BSIM4v3nextModel) |
|||
{ for (here = model->BSIM4v3instances; here; here = here->BSIM4v3nextInstance) |
|||
{ if (here->BSIM4v3owner != ARCHme) continue; |
|||
if (!here->BSIM4v3icVDSGiven) |
|||
{ here->BSIM4v3icVDS = *(ckt->CKTrhs + here->BSIM4v3dNode) |
|||
- *(ckt->CKTrhs + here->BSIM4v3sNode); |
|||
} |
|||
if (!here->BSIM4v3icVGSGiven) |
|||
{ here->BSIM4v3icVGS = *(ckt->CKTrhs + here->BSIM4v3gNodeExt) |
|||
- *(ckt->CKTrhs + here->BSIM4v3sNode); |
|||
} |
|||
if(!here->BSIM4v3icVBSGiven) |
|||
{ here->BSIM4v3icVBS = *(ckt->CKTrhs + here->BSIM4v3bNode) |
|||
- *(ckt->CKTrhs + here->BSIM4v3sNode); |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
4612
src/spicelib/devices/bsim4v3/b4v3ld.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1967
src/spicelib/devices/bsim4v3/b4v3mask.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,46 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3mdel.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "bsim4v3def.h" |
|||
#include "sperror.h" |
|||
|
|||
int |
|||
BSIM4v3mDelete(inModel,modname,kill) |
|||
GENmodel **inModel; |
|||
IFuid modname; |
|||
GENmodel *kill; |
|||
{ |
|||
BSIM4v3model **model = (BSIM4v3model**)inModel; |
|||
BSIM4v3model *modfast = (BSIM4v3model*)kill; |
|||
BSIM4v3instance *here; |
|||
BSIM4v3instance *prev = NULL; |
|||
BSIM4v3model **oldmod; |
|||
|
|||
oldmod = model; |
|||
for (; *model ; model = &((*model)->BSIM4v3nextModel)) |
|||
{ if ((*model)->BSIM4v3modName == modname || |
|||
(modfast && *model == modfast)) |
|||
goto delgot; |
|||
oldmod = model; |
|||
} |
|||
return(E_NOMOD); |
|||
|
|||
delgot: |
|||
*oldmod = (*model)->BSIM4v3nextModel; /* cut deleted device out of list */ |
|||
for (here = (*model)->BSIM4v3instances; here; here = here->BSIM4v3nextInstance) |
|||
{ if(prev) FREE(prev); |
|||
prev = here; |
|||
} |
|||
if(prev) FREE(prev); |
|||
FREE(*model); |
|||
return(OK); |
|||
} |
|||
2682
src/spicelib/devices/bsim4v3/b4v3mpar.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,486 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3noi.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 11/15/2002. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "bsim4v3def.h" |
|||
#include "cktdefs.h" |
|||
#include "iferrmsg.h" |
|||
#include "noisedef.h" |
|||
#include "const.h" |
|||
|
|||
|
|||
extern void NevalSrc(); |
|||
extern double Nintegrate(); |
|||
|
|||
/* |
|||
* WDL: 1/f noise model has been smoothed out and enhanced with |
|||
* bulk charge effect as well as physical N* equ. and necessary |
|||
* conversion into the SI unit system. |
|||
*/ |
|||
|
|||
static double |
|||
BSIM4v3Eval1ovFNoise(Vds, model, here, freq, temp) |
|||
double Vds, freq, temp; |
|||
BSIM4v3model *model; |
|||
BSIM4v3instance *here; |
|||
{ |
|||
struct bsim4v3SizeDependParam *pParam; |
|||
double cd, esat, DelClm, EffFreq, N0, Nl; |
|||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi; |
|||
|
|||
pParam = here->pParam; |
|||
cd = fabs(here->BSIM4v3cd); |
|||
esat = 2.0 * pParam->BSIM4v3vsattemp / here->BSIM4v3ueff; |
|||
if(model->BSIM4v3em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ |
|||
else { |
|||
T0 = ((((Vds - here->BSIM4v3Vdseff) / pParam->BSIM4v3litl) |
|||
+ model->BSIM4v3em) / esat); |
|||
DelClm = pParam->BSIM4v3litl * log (MAX(T0, N_MINLOG)); |
|||
} |
|||
EffFreq = pow(freq, model->BSIM4v3ef); |
|||
T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v3ueff; |
|||
T2 = 1.0e10 * EffFreq * here->BSIM4v3Abulk * model->BSIM4v3coxe |
|||
* pParam->BSIM4v3leff * pParam->BSIM4v3leff; |
|||
N0 = model->BSIM4v3coxe * here->BSIM4v3Vgsteff / CHARGE; |
|||
Nl = model->BSIM4v3coxe * here->BSIM4v3Vgsteff |
|||
* (1.0 - here->BSIM4v3AbovVgst2Vtm * here->BSIM4v3Vdseff) / CHARGE; |
|||
|
|||
T3 = model->BSIM4v3oxideTrapDensityA |
|||
* log(MAX(((N0 + here->BSIM4v3nstar) / (Nl + here->BSIM4v3nstar)), N_MINLOG)); |
|||
T4 = model->BSIM4v3oxideTrapDensityB * (N0 - Nl); |
|||
T5 = model->BSIM4v3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); |
|||
|
|||
T6 = CONSTboltz * temp * cd * cd; |
|||
T7 = 1.0e10 * EffFreq * pParam->BSIM4v3leff |
|||
* pParam->BSIM4v3leff * pParam->BSIM4v3weff; |
|||
T8 = model->BSIM4v3oxideTrapDensityA + model->BSIM4v3oxideTrapDensityB * Nl |
|||
+ model->BSIM4v3oxideTrapDensityC * Nl * Nl; |
|||
T9 = (Nl + here->BSIM4v3nstar) * (Nl + here->BSIM4v3nstar); |
|||
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; |
|||
return Ssi; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v3noise (mode, operation, inModel, ckt, data, OnDens) |
|||
int mode, operation; |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
Ndata *data; |
|||
double *OnDens; |
|||
{ |
|||
BSIM4v3model *model = (BSIM4v3model *)inModel; |
|||
BSIM4v3instance *here; |
|||
struct bsim4v3SizeDependParam *pParam; |
|||
char name[N_MXVLNTH]; |
|||
double tempOnoise; |
|||
double tempInoise; |
|||
double noizDens[BSIM4v3NSRCS]; |
|||
double lnNdens[BSIM4v3NSRCS]; |
|||
|
|||
double N0, Nl; |
|||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13; |
|||
double Vds, n, ExpArg, Ssi, Swi; |
|||
double tmp, gdpr, gspr, npart_theta, npart_beta, igsquare; |
|||
|
|||
int error, i; |
|||
|
|||
/* define the names of the noise sources */ |
|||
static char *BSIM4v3nNames[BSIM4v3NSRCS] = |
|||
{ /* Note that we have to keep the order */ |
|||
".rd", /* noise due to rd */ |
|||
".rs", /* noise due to rs */ |
|||
".rg", /* noise due to rgeltd */ |
|||
".rbps", /* noise due to rbps */ |
|||
".rbpd", /* noise due to rbpd */ |
|||
".rbpb", /* noise due to rbpb */ |
|||
".rbsb", /* noise due to rbsb */ |
|||
".rbdb", /* noise due to rbdb */ |
|||
".id", /* noise due to id */ |
|||
".1overf", /* flicker (1/f) noise */ |
|||
".igs", /* shot noise due to IGS */ |
|||
".igd", /* shot noise due to IGD */ |
|||
".igb", /* shot noise due to IGB */ |
|||
"" /* total transistor noise */ |
|||
}; |
|||
|
|||
for (; model != NULL; model = model->BSIM4v3nextModel) |
|||
{ for (here = model->BSIM4v3instances; here != NULL; |
|||
here = here->BSIM4v3nextInstance) |
|||
{ pParam = here->pParam; |
|||
switch (operation) |
|||
{ case N_OPEN: |
|||
/* see if we have to to produce a summary report */ |
|||
/* if so, name all the noise generators */ |
|||
|
|||
if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) |
|||
{ switch (mode) |
|||
{ case N_DENS: |
|||
for (i = 0; i < BSIM4v3NSRCS; i++) |
|||
{ (void) sprintf(name, "onoise.%s%s", |
|||
here->BSIM4v3name, |
|||
BSIM4v3nNames[i]); |
|||
data->namelist = (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 < BSIM4v3NSRCS; i++) |
|||
{ (void) sprintf(name, "onoise_total.%s%s", |
|||
here->BSIM4v3name, |
|||
BSIM4v3nNames[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->BSIM4v3name, |
|||
BSIM4v3nNames[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: |
|||
if (model->BSIM4v3tnoiMod == 0) |
|||
{ if (model->BSIM4v3rdsMod == 0) |
|||
{ gspr = here->BSIM4v3sourceConductance; |
|||
gdpr = here->BSIM4v3drainConductance; |
|||
if (here->BSIM4v3grdsw > 0.0) |
|||
tmp = 1.0 / here->BSIM4v3grdsw; /* tmp used below */ |
|||
else |
|||
tmp = 0.0; |
|||
} |
|||
else |
|||
{ gspr = here->BSIM4v3gstot; |
|||
gdpr = here->BSIM4v3gdtot; |
|||
tmp = 0.0; |
|||
} |
|||
} |
|||
else |
|||
{ T5 = here->BSIM4v3Vgsteff / here->BSIM4v3EsatL; |
|||
T5 *= T5; |
|||
npart_beta = model->BSIM4v3rnoia * (1.0 + T5 |
|||
* model->BSIM4v3tnoia * pParam->BSIM4v3leff); |
|||
npart_theta = model->BSIM4v3rnoib * (1.0 + T5 |
|||
* model->BSIM4v3tnoib * pParam->BSIM4v3leff); |
|||
|
|||
if (model->BSIM4v3rdsMod == 0) |
|||
{ gspr = here->BSIM4v3sourceConductance; |
|||
gdpr = here->BSIM4v3drainConductance; |
|||
} |
|||
else |
|||
{ gspr = here->BSIM4v3gstot; |
|||
gdpr = here->BSIM4v3gdtot; |
|||
} |
|||
|
|||
if ((*(ckt->CKTstates[0] + here->BSIM4v3vds)) >= 0.0) |
|||
gspr = gspr / (1.0 + npart_theta * npart_theta * gspr |
|||
/ here->BSIM4v3IdovVds); /* bugfix */ |
|||
else |
|||
gdpr = gdpr / (1.0 + npart_theta * npart_theta * gdpr |
|||
/ here->BSIM4v3IdovVds); |
|||
} |
|||
|
|||
NevalSrc(&noizDens[BSIM4v3RDNOIZ], |
|||
&lnNdens[BSIM4v3RDNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3dNodePrime, here->BSIM4v3dNode, |
|||
gdpr); |
|||
|
|||
NevalSrc(&noizDens[BSIM4v3RSNOIZ], |
|||
&lnNdens[BSIM4v3RSNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3sNodePrime, here->BSIM4v3sNode, |
|||
gspr); |
|||
|
|||
|
|||
if ((here->BSIM4v3rgateMod == 1) || (here->BSIM4v3rgateMod == 2)) |
|||
{ NevalSrc(&noizDens[BSIM4v3RGNOIZ], |
|||
&lnNdens[BSIM4v3RGNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3gNodePrime, here->BSIM4v3gNodeExt, |
|||
here->BSIM4v3grgeltd); |
|||
} |
|||
else if (here->BSIM4v3rgateMod == 3) |
|||
{ NevalSrc(&noizDens[BSIM4v3RGNOIZ], |
|||
&lnNdens[BSIM4v3RGNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3gNodeMid, here->BSIM4v3gNodeExt, |
|||
here->BSIM4v3grgeltd); |
|||
} |
|||
else |
|||
{ noizDens[BSIM4v3RGNOIZ] = 0.0; |
|||
lnNdens[BSIM4v3RGNOIZ] = |
|||
log(MAX(noizDens[BSIM4v3RGNOIZ], N_MINLOG)); |
|||
} |
|||
|
|||
|
|||
if (here->BSIM4v3rbodyMod) |
|||
{ NevalSrc(&noizDens[BSIM4v3RBPSNOIZ], |
|||
&lnNdens[BSIM4v3RBPSNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3bNodePrime, here->BSIM4v3sbNode, |
|||
here->BSIM4v3grbps); |
|||
NevalSrc(&noizDens[BSIM4v3RBPDNOIZ], |
|||
&lnNdens[BSIM4v3RBPDNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3bNodePrime, here->BSIM4v3dbNode, |
|||
here->BSIM4v3grbpd); |
|||
NevalSrc(&noizDens[BSIM4v3RBPBNOIZ], |
|||
&lnNdens[BSIM4v3RBPBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3bNodePrime, here->BSIM4v3bNode, |
|||
here->BSIM4v3grbpb); |
|||
NevalSrc(&noizDens[BSIM4v3RBSBNOIZ], |
|||
&lnNdens[BSIM4v3RBSBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3bNode, here->BSIM4v3sbNode, |
|||
here->BSIM4v3grbsb); |
|||
NevalSrc(&noizDens[BSIM4v3RBDBNOIZ], |
|||
&lnNdens[BSIM4v3RBDBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v3bNode, here->BSIM4v3dbNode, |
|||
here->BSIM4v3grbdb); |
|||
} |
|||
else |
|||
{ noizDens[BSIM4v3RBPSNOIZ] = noizDens[BSIM4v3RBPDNOIZ] = 0.0; |
|||
noizDens[BSIM4v3RBPBNOIZ] = 0.0; |
|||
noizDens[BSIM4v3RBSBNOIZ] = noizDens[BSIM4v3RBDBNOIZ] = 0.0; |
|||
lnNdens[BSIM4v3RBPSNOIZ] = |
|||
log(MAX(noizDens[BSIM4v3RBPSNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v3RBPDNOIZ] = |
|||
log(MAX(noizDens[BSIM4v3RBPDNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v3RBPBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v3RBPBNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v3RBSBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v3RBSBNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v3RBDBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v3RBDBNOIZ], N_MINLOG)); |
|||
} |
|||
|
|||
|
|||
switch(model->BSIM4v3tnoiMod) |
|||
{ case 0: |
|||
T0 = here->BSIM4v3ueff * fabs(here->BSIM4v3qinv); |
|||
T1 = T0 * tmp + pParam->BSIM4v3leff |
|||
* pParam->BSIM4v3leff; |
|||
NevalSrc(&noizDens[BSIM4v3IDNOIZ], |
|||
&lnNdens[BSIM4v3IDNOIZ], ckt, |
|||
THERMNOISE, here->BSIM4v3dNodePrime, |
|||
here->BSIM4v3sNodePrime, |
|||
(T0 / T1) * model->BSIM4v3ntnoi); |
|||
break; |
|||
case 1: |
|||
T0 = here->BSIM4v3gm + here->BSIM4v3gmbs + here->BSIM4v3gds; |
|||
T0 *= T0; |
|||
igsquare = npart_theta * npart_theta * T0 / here->BSIM4v3IdovVds; |
|||
T1 = npart_beta * (here->BSIM4v3gm |
|||
+ here->BSIM4v3gmbs) + here->BSIM4v3gds; |
|||
T2 = T1 * T1 / here->BSIM4v3IdovVds; |
|||
NevalSrc(&noizDens[BSIM4v3IDNOIZ], |
|||
&lnNdens[BSIM4v3IDNOIZ], ckt, |
|||
THERMNOISE, here->BSIM4v3dNodePrime, |
|||
here->BSIM4v3sNodePrime, (T2 - igsquare)); |
|||
break; |
|||
} |
|||
|
|||
NevalSrc(&noizDens[BSIM4v3FLNOIZ], (double*) NULL, |
|||
ckt, N_GAIN, here->BSIM4v3dNodePrime, |
|||
here->BSIM4v3sNodePrime, (double) 0.0); |
|||
|
|||
switch(model->BSIM4v3fnoiMod) |
|||
{ case 0: |
|||
noizDens[BSIM4v3FLNOIZ] *= model->BSIM4v3kf |
|||
* exp(model->BSIM4v3af |
|||
* log(MAX(fabs(here->BSIM4v3cd), |
|||
N_MINLOG))) |
|||
/ (pow(data->freq, model->BSIM4v3ef) |
|||
* pParam->BSIM4v3leff |
|||
* pParam->BSIM4v3leff |
|||
* model->BSIM4v3coxe); |
|||
break; |
|||
case 1: |
|||
Vds = *(ckt->CKTstates[0] + here->BSIM4v3vds); |
|||
if (Vds < 0.0) |
|||
Vds = -Vds; |
|||
|
|||
Ssi = BSIM4v3Eval1ovFNoise(Vds, model, here, |
|||
data->freq, ckt->CKTtemp); |
|||
T10 = model->BSIM4v3oxideTrapDensityA |
|||
* CONSTboltz * ckt->CKTtemp; |
|||
T11 = pParam->BSIM4v3weff * pParam->BSIM4v3leff |
|||
* pow(data->freq, model->BSIM4v3ef) * 1.0e10 |
|||
* here->BSIM4v3nstar * here->BSIM4v3nstar; |
|||
Swi = T10 / T11 * here->BSIM4v3cd |
|||
* here->BSIM4v3cd; |
|||
T1 = Swi + Ssi; |
|||
if (T1 > 0.0) |
|||
noizDens[BSIM4v3FLNOIZ] *= (Ssi * Swi) / T1; |
|||
else |
|||
noizDens[BSIM4v3FLNOIZ] *= 0.0; |
|||
break; |
|||
} |
|||
|
|||
lnNdens[BSIM4v3FLNOIZ] = |
|||
log(MAX(noizDens[BSIM4v3FLNOIZ], N_MINLOG)); |
|||
|
|||
|
|||
if(here->BSIM4v3mode >= 0) { /* bugfix */ |
|||
NevalSrc(&noizDens[BSIM4v3IGSNOIZ], |
|||
&lnNdens[BSIM4v3IGSNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v3gNodePrime, here->BSIM4v3sNodePrime, |
|||
(here->BSIM4v3Igs + here->BSIM4v3Igcs)); |
|||
NevalSrc(&noizDens[BSIM4v3IGDNOIZ], |
|||
&lnNdens[BSIM4v3IGDNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v3gNodePrime, here->BSIM4v3dNodePrime, |
|||
(here->BSIM4v3Igd + here->BSIM4v3Igcd)); |
|||
} else { |
|||
NevalSrc(&noizDens[BSIM4v3IGSNOIZ], |
|||
&lnNdens[BSIM4v3IGSNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v3gNodePrime, here->BSIM4v3sNodePrime, |
|||
(here->BSIM4v3Igs + here->BSIM4v3Igcd)); |
|||
NevalSrc(&noizDens[BSIM4v3IGDNOIZ], |
|||
&lnNdens[BSIM4v3IGDNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v3gNodePrime, here->BSIM4v3dNodePrime, |
|||
(here->BSIM4v3Igd + here->BSIM4v3Igcs)); |
|||
} |
|||
NevalSrc(&noizDens[BSIM4v3IGBNOIZ], |
|||
&lnNdens[BSIM4v3IGBNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v3gNodePrime, here->BSIM4v3bNodePrime, |
|||
here->BSIM4v3Igb); |
|||
|
|||
|
|||
noizDens[BSIM4v3TOTNOIZ] = noizDens[BSIM4v3RDNOIZ] |
|||
+ noizDens[BSIM4v3RSNOIZ] + noizDens[BSIM4v3RGNOIZ] |
|||
+ noizDens[BSIM4v3RBPSNOIZ] + noizDens[BSIM4v3RBPDNOIZ] |
|||
+ noizDens[BSIM4v3RBPBNOIZ] |
|||
+ noizDens[BSIM4v3RBSBNOIZ] + noizDens[BSIM4v3RBDBNOIZ] |
|||
+ noizDens[BSIM4v3IDNOIZ] + noizDens[BSIM4v3FLNOIZ] |
|||
+ noizDens[BSIM4v3IGSNOIZ] + noizDens[BSIM4v3IGDNOIZ] |
|||
+ noizDens[BSIM4v3IGBNOIZ]; |
|||
lnNdens[BSIM4v3TOTNOIZ] = |
|||
log(MAX(noizDens[BSIM4v3TOTNOIZ], N_MINLOG)); |
|||
|
|||
*OnDens += noizDens[BSIM4v3TOTNOIZ]; |
|||
|
|||
if (data->delFreq == 0.0) |
|||
{ /* if we haven't done any previous |
|||
integration, we need to initialize our |
|||
"history" variables. |
|||
*/ |
|||
|
|||
for (i = 0; i < BSIM4v3NSRCS; i++) |
|||
{ here->BSIM4v3nVar[LNLSTDENS][i] = |
|||
lnNdens[i]; |
|||
} |
|||
|
|||
/* clear out our integration variables |
|||
if it's the first pass |
|||
*/ |
|||
if (data->freq == |
|||
((NOISEAN*) ckt->CKTcurJob)->NstartFreq) |
|||
{ for (i = 0; i < BSIM4v3NSRCS; i++) |
|||
{ here->BSIM4v3nVar[OUTNOIZ][i] = 0.0; |
|||
here->BSIM4v3nVar[INNOIZ][i] = 0.0; |
|||
} |
|||
} |
|||
} |
|||
else |
|||
{ /* data->delFreq != 0.0, |
|||
we have to integrate. |
|||
*/ |
|||
for (i = 0; i < BSIM4v3NSRCS; i++) |
|||
{ if (i != BSIM4v3TOTNOIZ) |
|||
{ tempOnoise = Nintegrate(noizDens[i], |
|||
lnNdens[i], |
|||
here->BSIM4v3nVar[LNLSTDENS][i], |
|||
data); |
|||
tempInoise = Nintegrate(noizDens[i] |
|||
* data->GainSqInv, lnNdens[i] |
|||
+ data->lnGainInv, |
|||
here->BSIM4v3nVar[LNLSTDENS][i] |
|||
+ data->lnGainInv, data); |
|||
here->BSIM4v3nVar[LNLSTDENS][i] = |
|||
lnNdens[i]; |
|||
data->outNoiz += tempOnoise; |
|||
data->inNoise += tempInoise; |
|||
if (((NOISEAN*) |
|||
ckt->CKTcurJob)->NStpsSm != 0) |
|||
{ here->BSIM4v3nVar[OUTNOIZ][i] |
|||
+= tempOnoise; |
|||
here->BSIM4v3nVar[OUTNOIZ][BSIM4v3TOTNOIZ] |
|||
+= tempOnoise; |
|||
here->BSIM4v3nVar[INNOIZ][i] |
|||
+= tempInoise; |
|||
here->BSIM4v3nVar[INNOIZ][BSIM4v3TOTNOIZ] |
|||
+= tempInoise; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if (data->prtSummary) |
|||
{ for (i = 0; i < BSIM4v3NSRCS; i++) |
|||
{ /* print a summary report */ |
|||
data->outpVector[data->outNumber++] |
|||
= noizDens[i]; |
|||
} |
|||
} |
|||
break; |
|||
case INT_NOIZ: |
|||
/* already calculated, just output */ |
|||
if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) |
|||
{ for (i = 0; i < BSIM4v3NSRCS; i++) |
|||
{ data->outpVector[data->outNumber++] |
|||
= here->BSIM4v3nVar[OUTNOIZ][i]; |
|||
data->outpVector[data->outNumber++] |
|||
= here->BSIM4v3nVar[INNOIZ][i]; |
|||
} |
|||
} |
|||
break; |
|||
} |
|||
break; |
|||
case N_CLOSE: |
|||
/* do nothing, the main calling routine will close */ |
|||
return (OK); |
|||
break; /* the plots */ |
|||
} /* switch (operation) */ |
|||
} /* for here */ |
|||
} /* for model */ |
|||
|
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,165 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3par.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 11/15/2002. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "ifsim.h" |
|||
#include "bsim4v3def.h" |
|||
#include "sperror.h" |
|||
#include "fteext.h" |
|||
|
|||
int |
|||
BSIM4v3param(param,value,inst,select) |
|||
int param; |
|||
IFvalue *value; |
|||
GENinstance *inst; |
|||
IFvalue *select; |
|||
{ |
|||
double scale; |
|||
|
|||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1; |
|||
|
|||
BSIM4v3instance *here = (BSIM4v3instance*)inst; |
|||
switch(param) |
|||
{ case BSIM4v3_W: |
|||
here->BSIM4v3w = value->rValue*scale; |
|||
here->BSIM4v3wGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_L: |
|||
here->BSIM4v3l = value->rValue*scale; |
|||
here->BSIM4v3lGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_NF: |
|||
here->BSIM4v3nf = value->rValue; |
|||
here->BSIM4v3nfGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_MIN: |
|||
here->BSIM4v3min = value->iValue; |
|||
here->BSIM4v3minGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_AS: |
|||
here->BSIM4v3sourceArea = value->rValue*scale*scale; |
|||
here->BSIM4v3sourceAreaGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_AD: |
|||
here->BSIM4v3drainArea = value->rValue*scale*scale; |
|||
here->BSIM4v3drainAreaGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_PS: |
|||
here->BSIM4v3sourcePerimeter = value->rValue*scale; |
|||
here->BSIM4v3sourcePerimeterGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_PD: |
|||
here->BSIM4v3drainPerimeter = value->rValue*scale; |
|||
here->BSIM4v3drainPerimeterGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_NRS: |
|||
here->BSIM4v3sourceSquares = value->rValue; |
|||
here->BSIM4v3sourceSquaresGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_NRD: |
|||
here->BSIM4v3drainSquares = value->rValue; |
|||
here->BSIM4v3drainSquaresGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_OFF: |
|||
here->BSIM4v3off = value->iValue; |
|||
break; |
|||
case BSIM4v3_SA: |
|||
here->BSIM4v3sa = value->rValue; |
|||
here->BSIM4v3saGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_SB: |
|||
here->BSIM4v3sb = value->rValue; |
|||
here->BSIM4v3sbGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_SD: |
|||
here->BSIM4v3sd = value->rValue; |
|||
here->BSIM4v3sdGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_RBSB: |
|||
here->BSIM4v3rbsb = value->rValue; |
|||
here->BSIM4v3rbsbGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_RBDB: |
|||
here->BSIM4v3rbdb = value->rValue; |
|||
here->BSIM4v3rbdbGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_RBPB: |
|||
here->BSIM4v3rbpb = value->rValue; |
|||
here->BSIM4v3rbpbGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_RBPS: |
|||
here->BSIM4v3rbps = value->rValue; |
|||
here->BSIM4v3rbpsGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_RBPD: |
|||
here->BSIM4v3rbpd = value->rValue; |
|||
here->BSIM4v3rbpdGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_TRNQSMOD: |
|||
here->BSIM4v3trnqsMod = value->iValue; |
|||
here->BSIM4v3trnqsModGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_ACNQSMOD: |
|||
here->BSIM4v3acnqsMod = value->iValue; |
|||
here->BSIM4v3acnqsModGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_RBODYMOD: |
|||
here->BSIM4v3rbodyMod = value->iValue; |
|||
here->BSIM4v3rbodyModGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_RGATEMOD: |
|||
here->BSIM4v3rgateMod = value->iValue; |
|||
here->BSIM4v3rgateModGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_GEOMOD: |
|||
here->BSIM4v3geoMod = value->iValue; |
|||
here->BSIM4v3geoModGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_RGEOMOD: |
|||
here->BSIM4v3rgeoMod = value->iValue; |
|||
here->BSIM4v3rgeoModGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_IC_VDS: |
|||
here->BSIM4v3icVDS = value->rValue; |
|||
here->BSIM4v3icVDSGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_IC_VGS: |
|||
here->BSIM4v3icVGS = value->rValue; |
|||
here->BSIM4v3icVGSGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_IC_VBS: |
|||
here->BSIM4v3icVBS = value->rValue; |
|||
here->BSIM4v3icVBSGiven = TRUE; |
|||
break; |
|||
case BSIM4v3_IC: |
|||
switch(value->v.numValue) |
|||
{ case 3: |
|||
here->BSIM4v3icVBS = *(value->v.vec.rVec+2); |
|||
here->BSIM4v3icVBSGiven = TRUE; |
|||
case 2: |
|||
here->BSIM4v3icVGS = *(value->v.vec.rVec+1); |
|||
here->BSIM4v3icVGSGiven = TRUE; |
|||
case 1: |
|||
here->BSIM4v3icVDS = *(value->v.vec.rVec); |
|||
here->BSIM4v3icVDSGiven = TRUE; |
|||
break; |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
break; |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,755 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei (Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3pzld.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include "cktdefs.h" |
|||
#include "complex.h" |
|||
#include "sperror.h" |
|||
#include "bsim4v3def.h" |
|||
|
|||
int |
|||
BSIM4v3pzLoad(inModel,ckt,s) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
SPcomplex *s; |
|||
{ |
|||
BSIM4v3model *model = (BSIM4v3model*)inModel; |
|||
BSIM4v3instance *here; |
|||
|
|||
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; |
|||
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; |
|||
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; |
|||
double gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; |
|||
double gstot, gstotd, gstotg, gstots, gstotb, gspr; |
|||
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; |
|||
double gIstotg, gIstotd, gIstots, gIstotb; |
|||
double gIdtotg, gIdtotd, gIdtots, gIdtotb; |
|||
double gIbtotg, gIbtotd, gIbtots, gIbtotb; |
|||
double gIgtotg, gIgtotd, gIgtots, gIgtotb; |
|||
double cgso, cgdo, cgbo; |
|||
double xcdbdb, xcsbsb, xcgmgmb, xcgmdb, xcgmsb, xcdgmb, xcsgmb; |
|||
double xcgmbb, xcbgmb; |
|||
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 T0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Cdb, Csg, Csd, Css, Csb; |
|||
double ScalingFactor = 1.0e-9; |
|||
struct bsim4v3SizeDependParam *pParam; |
|||
double ggidld, ggidlg, ggidlb,ggisld, ggislg, ggislb, ggisls; |
|||
|
|||
|
|||
for (; model != NULL; model = model->BSIM4v3nextModel) |
|||
{ for (here = model->BSIM4v3instances; here!= NULL; |
|||
here = here->BSIM4v3nextInstance) |
|||
{ if (here->BSIM4v3owner != ARCHme) continue; |
|||
pParam = here->pParam; |
|||
capbd = here->BSIM4v3capbd; |
|||
capbs = here->BSIM4v3capbs; |
|||
cgso = here->BSIM4v3cgso; |
|||
cgdo = here->BSIM4v3cgdo; |
|||
cgbo = pParam->BSIM4v3cgbo; |
|||
|
|||
if (here->BSIM4v3mode >= 0) |
|||
{ Gm = here->BSIM4v3gm; |
|||
Gmbs = here->BSIM4v3gmbs; |
|||
FwdSum = Gm + Gmbs; |
|||
RevSum = 0.0; |
|||
|
|||
gbbdp = -(here->BSIM4v3gbds); |
|||
gbbsp = here->BSIM4v3gbds + here->BSIM4v3gbgs + here->BSIM4v3gbbs; |
|||
gbdpg = here->BSIM4v3gbgs; |
|||
gbdpdp = here->BSIM4v3gbds; |
|||
gbdpb = here->BSIM4v3gbbs; |
|||
gbdpsp = -(gbdpg + gbdpdp + gbdpb); |
|||
|
|||
gbspdp = 0.0; |
|||
gbspg = 0.0; |
|||
gbspb = 0.0; |
|||
gbspsp = 0.0; |
|||
|
|||
if (model->BSIM4v3igcMod) |
|||
{ gIstotg = here->BSIM4v3gIgsg + here->BSIM4v3gIgcsg; |
|||
gIstotd = here->BSIM4v3gIgcsd; |
|||
gIstots = here->BSIM4v3gIgss + here->BSIM4v3gIgcss; |
|||
gIstotb = here->BSIM4v3gIgcsb; |
|||
|
|||
gIdtotg = here->BSIM4v3gIgdg + here->BSIM4v3gIgcdg; |
|||
gIdtotd = here->BSIM4v3gIgdd + here->BSIM4v3gIgcdd; |
|||
gIdtots = here->BSIM4v3gIgcds; |
|||
gIdtotb = here->BSIM4v3gIgcdb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v3igbMod) |
|||
{ gIbtotg = here->BSIM4v3gIgbg; |
|||
gIbtotd = here->BSIM4v3gIgbd; |
|||
gIbtots = here->BSIM4v3gIgbs; |
|||
gIbtotb = here->BSIM4v3gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v3igcMod != 0) || (model->BSIM4v3igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v3rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v3vgs); |
|||
else if (here->BSIM4v3rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v3vgs); |
|||
if (here->BSIM4v3rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v3gcrgd * T0; |
|||
gcrgg = here->BSIM4v3gcrgg * T0; |
|||
gcrgs = here->BSIM4v3gcrgs * T0; |
|||
gcrgb = here->BSIM4v3gcrgb * T0; |
|||
gcrgg -= here->BSIM4v3gcrg; |
|||
gcrg = here->BSIM4v3gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v3acnqsMod == 0) |
|||
{ if (here->BSIM4v3rgateMod == 3) |
|||
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v3cgbo; |
|||
xcgmdb = -cgdo; |
|||
xcgmsb = -cgso; |
|||
xcgmbb = -pParam->BSIM4v3cgbo; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggb = here->BSIM4v3cggb; |
|||
xcgdb = here->BSIM4v3cgdb; |
|||
xcgsb = here->BSIM4v3cgsb; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = here->BSIM4v3cdgb; |
|||
xcsgb = -(here->BSIM4v3cggb + here->BSIM4v3cbgb |
|||
+ here->BSIM4v3cdgb); |
|||
xcbgb = here->BSIM4v3cbgb; |
|||
} |
|||
else |
|||
{ xcggb = here->BSIM4v3cggb + cgdo + cgso |
|||
+ pParam->BSIM4v3cgbo; |
|||
xcgdb = here->BSIM4v3cgdb - cgdo; |
|||
xcgsb = here->BSIM4v3cgsb - cgso; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = here->BSIM4v3cdgb - cgdo; |
|||
xcsgb = -(here->BSIM4v3cggb + here->BSIM4v3cbgb |
|||
+ here->BSIM4v3cdgb + cgso); |
|||
xcbgb = here->BSIM4v3cbgb - pParam->BSIM4v3cgbo; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddb = here->BSIM4v3cddb + here->BSIM4v3capbd + cgdo; |
|||
xcdsb = here->BSIM4v3cdsb; |
|||
|
|||
xcsdb = -(here->BSIM4v3cgdb + here->BSIM4v3cbdb |
|||
+ here->BSIM4v3cddb); |
|||
xcssb = here->BSIM4v3capbs + cgso - (here->BSIM4v3cgsb |
|||
+ here->BSIM4v3cbsb + here->BSIM4v3cdsb); |
|||
|
|||
if (!here->BSIM4v3rbodyMod) |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); |
|||
xcbdb = here->BSIM4v3cbdb - here->BSIM4v3capbd; |
|||
xcbsb = here->BSIM4v3cbsb - here->BSIM4v3capbs; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbb = -(here->BSIM4v3cddb + here->BSIM4v3cdgb |
|||
+ here->BSIM4v3cdsb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb) |
|||
+ here->BSIM4v3capbs; |
|||
xcbdb = here->BSIM4v3cbdb; |
|||
xcbsb = here->BSIM4v3cbsb; |
|||
|
|||
xcdbdb = -here->BSIM4v3capbd; |
|||
xcsbsb = -here->BSIM4v3capbs; |
|||
} |
|||
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); |
|||
|
|||
xgtg = xgtd = xgts = xgtb = 0.0; |
|||
sxpart = 0.6; |
|||
dxpart = 0.4; |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0; |
|||
xcbgb = xcbdb = xcbsb = xcbbb = 0.0; |
|||
xcdgb = xcddb = xcdsb = xcdbb = 0.0; |
|||
xcsgb = xcsdb = xcssb = xcsbb = 0.0; |
|||
|
|||
xgtg = here->BSIM4v3gtg; |
|||
xgtd = here->BSIM4v3gtd; |
|||
xgts = here->BSIM4v3gts; |
|||
xgtb = here->BSIM4v3gtb; |
|||
|
|||
xcqgb = here->BSIM4v3cqgb; |
|||
xcqdb = here->BSIM4v3cqdb; |
|||
xcqsb = here->BSIM4v3cqsb; |
|||
xcqbb = here->BSIM4v3cqbb; |
|||
|
|||
CoxWL = model->BSIM4v3coxe * here->pParam->BSIM4v3weffCV |
|||
* here->BSIM4v3nf * here->pParam->BSIM4v3leffCV; |
|||
qcheq = -(here->BSIM4v3qgate + here->BSIM4v3qbulk); |
|||
if (fabs(qcheq) <= 1.0e-5 * CoxWL) |
|||
{ if (model->BSIM4v3xpart < 0.5) |
|||
{ dxpart = 0.4; |
|||
} |
|||
else if (model->BSIM4v3xpart > 0.5) |
|||
{ dxpart = 0.0; |
|||
} |
|||
else |
|||
{ dxpart = 0.5; |
|||
} |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ dxpart = here->BSIM4v3qdrn / qcheq; |
|||
Cdd = here->BSIM4v3cddb; |
|||
Csd = -(here->BSIM4v3cgdb + here->BSIM4v3cddb |
|||
+ here->BSIM4v3cbdb); |
|||
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; |
|||
Cdg = here->BSIM4v3cdgb; |
|||
Csg = -(here->BSIM4v3cggb + here->BSIM4v3cdgb |
|||
+ here->BSIM4v3cbgb); |
|||
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; |
|||
|
|||
Cds = here->BSIM4v3cdsb; |
|||
Css = -(here->BSIM4v3cgsb + here->BSIM4v3cdsb |
|||
+ here->BSIM4v3cbsb); |
|||
ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; |
|||
|
|||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg |
|||
+ ddxpart_dVs); |
|||
} |
|||
sxpart = 1.0 - dxpart; |
|||
dsxpart_dVd = -ddxpart_dVd; |
|||
dsxpart_dVg = -ddxpart_dVg; |
|||
dsxpart_dVs = -ddxpart_dVs; |
|||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); |
|||
} |
|||
} |
|||
else |
|||
{ Gm = -here->BSIM4v3gm; |
|||
Gmbs = -here->BSIM4v3gmbs; |
|||
FwdSum = 0.0; |
|||
RevSum = -(Gm + Gmbs); |
|||
|
|||
gbbsp = -(here->BSIM4v3gbds); |
|||
gbbdp = here->BSIM4v3gbds + here->BSIM4v3gbgs + here->BSIM4v3gbbs; |
|||
|
|||
gbdpg = 0.0; |
|||
gbdpsp = 0.0; |
|||
gbdpb = 0.0; |
|||
gbdpdp = 0.0; |
|||
|
|||
gbspg = here->BSIM4v3gbgs; |
|||
gbspsp = here->BSIM4v3gbds; |
|||
gbspb = here->BSIM4v3gbbs; |
|||
gbspdp = -(gbspg + gbspsp + gbspb); |
|||
|
|||
if (model->BSIM4v3igcMod) |
|||
{ gIstotg = here->BSIM4v3gIgsg + here->BSIM4v3gIgcdg; |
|||
gIstotd = here->BSIM4v3gIgcds; |
|||
gIstots = here->BSIM4v3gIgss + here->BSIM4v3gIgcdd; |
|||
gIstotb = here->BSIM4v3gIgcdb; |
|||
|
|||
gIdtotg = here->BSIM4v3gIgdg + here->BSIM4v3gIgcsg; |
|||
gIdtotd = here->BSIM4v3gIgdd + here->BSIM4v3gIgcss; |
|||
gIdtots = here->BSIM4v3gIgcsd; |
|||
gIdtotb = here->BSIM4v3gIgcsb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v3igbMod) |
|||
{ gIbtotg = here->BSIM4v3gIgbg; |
|||
gIbtotd = here->BSIM4v3gIgbs; |
|||
gIbtots = here->BSIM4v3gIgbd; |
|||
gIbtotb = here->BSIM4v3gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v3igcMod != 0) || (model->BSIM4v3igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v3rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v3vgs); |
|||
else if (here->BSIM4v3rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v3vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v3vgs); |
|||
if (here->BSIM4v3rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v3gcrgs * T0; |
|||
gcrgg = here->BSIM4v3gcrgg * T0; |
|||
gcrgs = here->BSIM4v3gcrgd * T0; |
|||
gcrgb = here->BSIM4v3gcrgb * T0; |
|||
gcrgg -= here->BSIM4v3gcrg; |
|||
gcrg = here->BSIM4v3gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v3acnqsMod == 0) |
|||
{ if (here->BSIM4v3rgateMod == 3) |
|||
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v3cgbo; |
|||
xcgmdb = -cgdo; |
|||
xcgmsb = -cgso; |
|||
xcgmbb = -pParam->BSIM4v3cgbo; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggb = here->BSIM4v3cggb; |
|||
xcgdb = here->BSIM4v3cgsb; |
|||
xcgsb = here->BSIM4v3cgdb; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = -(here->BSIM4v3cggb + here->BSIM4v3cbgb |
|||
+ here->BSIM4v3cdgb); |
|||
xcsgb = here->BSIM4v3cdgb; |
|||
xcbgb = here->BSIM4v3cbgb; |
|||
} |
|||
else |
|||
{ xcggb = here->BSIM4v3cggb + cgdo + cgso |
|||
+ pParam->BSIM4v3cgbo; |
|||
xcgdb = here->BSIM4v3cgsb - cgdo; |
|||
xcgsb = here->BSIM4v3cgdb - cgso; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = -(here->BSIM4v3cggb + here->BSIM4v3cbgb |
|||
+ here->BSIM4v3cdgb + cgdo); |
|||
xcsgb = here->BSIM4v3cdgb - cgso; |
|||
xcbgb = here->BSIM4v3cbgb - pParam->BSIM4v3cgbo; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddb = here->BSIM4v3capbd + cgdo - (here->BSIM4v3cgsb |
|||
+ here->BSIM4v3cbsb + here->BSIM4v3cdsb); |
|||
xcdsb = -(here->BSIM4v3cgdb + here->BSIM4v3cbdb |
|||
+ here->BSIM4v3cddb); |
|||
|
|||
xcsdb = here->BSIM4v3cdsb; |
|||
xcssb = here->BSIM4v3cddb + here->BSIM4v3capbs + cgso; |
|||
|
|||
if (!here->BSIM4v3rbodyMod) |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); |
|||
xcbdb = here->BSIM4v3cbsb - here->BSIM4v3capbd; |
|||
xcbsb = here->BSIM4v3cbdb - here->BSIM4v3capbs; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) |
|||
+ here->BSIM4v3capbd; |
|||
xcsbb = -(here->BSIM4v3cddb + here->BSIM4v3cdgb |
|||
+ here->BSIM4v3cdsb); |
|||
xcbdb = here->BSIM4v3cbsb; |
|||
xcbsb = here->BSIM4v3cbdb; |
|||
xcdbdb = -here->BSIM4v3capbd; |
|||
xcsbsb = -here->BSIM4v3capbs; |
|||
} |
|||
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); |
|||
|
|||
xgtg = xgtd = xgts = xgtb = 0.0; |
|||
sxpart = 0.4; |
|||
dxpart = 0.6; |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0; |
|||
xcbgb = xcbdb = xcbsb = xcbbb = 0.0; |
|||
xcdgb = xcddb = xcdsb = xcdbb = 0.0; |
|||
xcsgb = xcsdb = xcssb = xcsbb = 0.0; |
|||
|
|||
xgtg = here->BSIM4v3gtg; |
|||
xgtd = here->BSIM4v3gts; |
|||
xgts = here->BSIM4v3gtd; |
|||
xgtb = here->BSIM4v3gtb; |
|||
|
|||
xcqgb = here->BSIM4v3cqgb; |
|||
xcqdb = here->BSIM4v3cqsb; |
|||
xcqsb = here->BSIM4v3cqdb; |
|||
xcqbb = here->BSIM4v3cqbb; |
|||
|
|||
CoxWL = model->BSIM4v3coxe * here->pParam->BSIM4v3weffCV |
|||
* here->BSIM4v3nf * here->pParam->BSIM4v3leffCV; |
|||
qcheq = -(here->BSIM4v3qgate + here->BSIM4v3qbulk); |
|||
if (fabs(qcheq) <= 1.0e-5 * CoxWL) |
|||
{ if (model->BSIM4v3xpart < 0.5) |
|||
{ sxpart = 0.4; |
|||
} |
|||
else if (model->BSIM4v3xpart > 0.5) |
|||
{ sxpart = 0.0; |
|||
} |
|||
else |
|||
{ sxpart = 0.5; |
|||
} |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ sxpart = here->BSIM4v3qdrn / qcheq; |
|||
Css = here->BSIM4v3cddb; |
|||
Cds = -(here->BSIM4v3cgdb + here->BSIM4v3cddb |
|||
+ here->BSIM4v3cbdb); |
|||
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; |
|||
Csg = here->BSIM4v3cdgb; |
|||
Cdg = -(here->BSIM4v3cggb + here->BSIM4v3cdgb |
|||
+ here->BSIM4v3cbgb); |
|||
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; |
|||
|
|||
Csd = here->BSIM4v3cdsb; |
|||
Cdd = -(here->BSIM4v3cgsb + here->BSIM4v3cdsb |
|||
+ here->BSIM4v3cbsb); |
|||
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; |
|||
|
|||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg |
|||
+ dsxpart_dVs); |
|||
} |
|||
dxpart = 1.0 - sxpart; |
|||
ddxpart_dVd = -dsxpart_dVd; |
|||
ddxpart_dVg = -dsxpart_dVg; |
|||
ddxpart_dVs = -dsxpart_dVs; |
|||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); |
|||
} |
|||
} |
|||
|
|||
if (model->BSIM4v3rdsMod == 1) |
|||
{ gstot = here->BSIM4v3gstot; |
|||
gstotd = here->BSIM4v3gstotd; |
|||
gstotg = here->BSIM4v3gstotg; |
|||
gstots = here->BSIM4v3gstots - gstot; |
|||
gstotb = here->BSIM4v3gstotb; |
|||
|
|||
gdtot = here->BSIM4v3gdtot; |
|||
gdtotd = here->BSIM4v3gdtotd - gdtot; |
|||
gdtotg = here->BSIM4v3gdtotg; |
|||
gdtots = here->BSIM4v3gdtots; |
|||
gdtotb = here->BSIM4v3gdtotb; |
|||
} |
|||
else |
|||
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0; |
|||
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; |
|||
} |
|||
|
|||
|
|||
T1 = *(ckt->CKTstate0 + here->BSIM4v3qdef) * here->BSIM4v3gtau; |
|||
gds = here->BSIM4v3gds; |
|||
|
|||
/* |
|||
* Loading PZ matrix |
|||
*/ |
|||
|
|||
if (!model->BSIM4v3rdsMod) |
|||
{ gdpr = here->BSIM4v3drainConductance; |
|||
gspr = here->BSIM4v3sourceConductance; |
|||
} |
|||
else |
|||
gdpr = gspr = 0.0; |
|||
|
|||
if (!here->BSIM4v3rbodyMod) |
|||
{ gjbd = here->BSIM4v3gbd; |
|||
gjbs = here->BSIM4v3gbs; |
|||
} |
|||
else |
|||
gjbd = gjbs = 0.0; |
|||
|
|||
geltd = here->BSIM4v3grgeltd; |
|||
|
|||
if (here->BSIM4v3rgateMod == 1) |
|||
{ *(here->BSIM4v3GEgePtr) += geltd; |
|||
*(here->BSIM4v3GPgePtr) -= geltd; |
|||
*(here->BSIM4v3GEgpPtr) -= geltd; |
|||
|
|||
*(here->BSIM4v3GPgpPtr ) += xcggb * s->real; |
|||
*(here->BSIM4v3GPgpPtr +1) += xcggb * s->imag; |
|||
*(here->BSIM4v3GPgpPtr) += geltd - xgtg + gIgtotg; |
|||
*(here->BSIM4v3GPdpPtr ) += xcgdb * s->real; |
|||
*(here->BSIM4v3GPdpPtr +1) += xcgdb * s->imag; |
|||
*(here->BSIM4v3GPdpPtr) -= xgtd - gIgtotd; |
|||
*(here->BSIM4v3GPspPtr ) += xcgsb * s->real; |
|||
*(here->BSIM4v3GPspPtr +1) += xcgsb * s->imag; |
|||
*(here->BSIM4v3GPspPtr) -= xgts - gIgtots; |
|||
*(here->BSIM4v3GPbpPtr ) += xcgbb * s->real; |
|||
*(here->BSIM4v3GPbpPtr +1) += xcgbb * s->imag; |
|||
*(here->BSIM4v3GPbpPtr) -= xgtb - gIgtotb; |
|||
} |
|||
else if (here->BSIM4v3rgateMod == 2) |
|||
{ *(here->BSIM4v3GEgePtr) += gcrg; |
|||
*(here->BSIM4v3GEgpPtr) += gcrgg; |
|||
*(here->BSIM4v3GEdpPtr) += gcrgd; |
|||
*(here->BSIM4v3GEspPtr) += gcrgs; |
|||
*(here->BSIM4v3GEbpPtr) += gcrgb; |
|||
|
|||
*(here->BSIM4v3GPgePtr) -= gcrg; |
|||
*(here->BSIM4v3GPgpPtr ) += xcggb * s->real; |
|||
*(here->BSIM4v3GPgpPtr +1) += xcggb * s->imag; |
|||
*(here->BSIM4v3GPgpPtr) -= gcrgg + xgtg - gIgtotg; |
|||
*(here->BSIM4v3GPdpPtr ) += xcgdb * s->real; |
|||
*(here->BSIM4v3GPdpPtr +1) += xcgdb * s->imag; |
|||
*(here->BSIM4v3GPdpPtr) -= gcrgd + xgtd - gIgtotd; |
|||
*(here->BSIM4v3GPspPtr ) += xcgsb * s->real; |
|||
*(here->BSIM4v3GPspPtr +1) += xcgsb * s->imag; |
|||
*(here->BSIM4v3GPspPtr) -= gcrgs + xgts - gIgtots; |
|||
*(here->BSIM4v3GPbpPtr ) += xcgbb * s->real; |
|||
*(here->BSIM4v3GPbpPtr +1) += xcgbb * s->imag; |
|||
*(here->BSIM4v3GPbpPtr) -= gcrgb + xgtb - gIgtotb; |
|||
} |
|||
else if (here->BSIM4v3rgateMod == 3) |
|||
{ *(here->BSIM4v3GEgePtr) += geltd; |
|||
*(here->BSIM4v3GEgmPtr) -= geltd; |
|||
*(here->BSIM4v3GMgePtr) -= geltd; |
|||
*(here->BSIM4v3GMgmPtr) += geltd + gcrg; |
|||
*(here->BSIM4v3GMgmPtr ) += xcgmgmb * s->real; |
|||
*(here->BSIM4v3GMgmPtr +1) += xcgmgmb * s->imag; |
|||
|
|||
*(here->BSIM4v3GMdpPtr) += gcrgd; |
|||
*(here->BSIM4v3GMdpPtr ) += xcgmdb * s->real; |
|||
*(here->BSIM4v3GMdpPtr +1) += xcgmdb * s->imag; |
|||
*(here->BSIM4v3GMgpPtr) += gcrgg; |
|||
*(here->BSIM4v3GMspPtr) += gcrgs; |
|||
*(here->BSIM4v3GMspPtr ) += xcgmsb * s->real; |
|||
*(here->BSIM4v3GMspPtr +1) += xcgmsb * s->imag; |
|||
*(here->BSIM4v3GMbpPtr) += gcrgb; |
|||
*(here->BSIM4v3GMbpPtr ) += xcgmbb * s->real; |
|||
*(here->BSIM4v3GMbpPtr +1) += xcgmbb * s->imag; |
|||
|
|||
*(here->BSIM4v3DPgmPtr ) += xcdgmb * s->real; |
|||
*(here->BSIM4v3DPgmPtr +1) += xcdgmb * s->imag; |
|||
*(here->BSIM4v3GPgmPtr) -= gcrg; |
|||
*(here->BSIM4v3SPgmPtr ) += xcsgmb * s->real; |
|||
*(here->BSIM4v3SPgmPtr +1) += xcsgmb * s->imag; |
|||
*(here->BSIM4v3BPgmPtr ) += xcbgmb * s->real; |
|||
*(here->BSIM4v3BPgmPtr +1) += xcbgmb * s->imag; |
|||
|
|||
*(here->BSIM4v3GPgpPtr) -= gcrgg + xgtg - gIgtotg; |
|||
*(here->BSIM4v3GPgpPtr ) += xcggb * s->real; |
|||
*(here->BSIM4v3GPgpPtr +1) += xcggb * s->imag; |
|||
*(here->BSIM4v3GPdpPtr) -= gcrgd + xgtd - gIgtotd; |
|||
*(here->BSIM4v3GPdpPtr ) += xcgdb * s->real; |
|||
*(here->BSIM4v3GPdpPtr +1) += xcgdb * s->imag; |
|||
*(here->BSIM4v3GPspPtr) -= gcrgs + xgts - gIgtots; |
|||
*(here->BSIM4v3GPspPtr ) += xcgsb * s->real; |
|||
*(here->BSIM4v3GPspPtr +1) += xcgsb * s->imag; |
|||
*(here->BSIM4v3GPbpPtr) -= gcrgb + xgtb - gIgtotb; |
|||
*(here->BSIM4v3GPbpPtr ) += xcgbb * s->real; |
|||
*(here->BSIM4v3GPbpPtr +1) += xcgbb * s->imag; |
|||
} |
|||
else |
|||
{ *(here->BSIM4v3GPdpPtr ) += xcgdb * s->real; |
|||
*(here->BSIM4v3GPdpPtr +1) += xcgdb * s->imag; |
|||
*(here->BSIM4v3GPdpPtr) -= xgtd - gIgtotd; |
|||
*(here->BSIM4v3GPgpPtr ) += xcggb * s->real; |
|||
*(here->BSIM4v3GPgpPtr +1) += xcggb * s->imag; |
|||
*(here->BSIM4v3GPgpPtr) -= xgtg - gIgtotg; |
|||
*(here->BSIM4v3GPspPtr ) += xcgsb * s->real; |
|||
*(here->BSIM4v3GPspPtr +1) += xcgsb * s->imag; |
|||
*(here->BSIM4v3GPspPtr) -= xgts - gIgtots; |
|||
*(here->BSIM4v3GPbpPtr ) += xcgbb * s->real; |
|||
*(here->BSIM4v3GPbpPtr +1) += xcgbb * s->imag; |
|||
*(here->BSIM4v3GPbpPtr) -= xgtb - gIgtotb; |
|||
} |
|||
|
|||
if (model->BSIM4v3rdsMod) |
|||
{ (*(here->BSIM4v3DgpPtr) += gdtotg); |
|||
(*(here->BSIM4v3DspPtr) += gdtots); |
|||
(*(here->BSIM4v3DbpPtr) += gdtotb); |
|||
(*(here->BSIM4v3SdpPtr) += gstotd); |
|||
(*(here->BSIM4v3SgpPtr) += gstotg); |
|||
(*(here->BSIM4v3SbpPtr) += gstotb); |
|||
} |
|||
|
|||
*(here->BSIM4v3DPdpPtr ) += xcddb * s->real; |
|||
*(here->BSIM4v3DPdpPtr +1) += xcddb * s->imag; |
|||
*(here->BSIM4v3DPdpPtr) += gdpr + gds + here->BSIM4v3gbd |
|||
- gdtotd + RevSum + gbdpdp - gIdtotd |
|||
+ dxpart * xgtd + T1 * ddxpart_dVd; |
|||
*(here->BSIM4v3DPdPtr) -= gdpr + gdtot; |
|||
*(here->BSIM4v3DPgpPtr ) += xcdgb * s->real; |
|||
*(here->BSIM4v3DPgpPtr +1) += xcdgb * s->imag; |
|||
*(here->BSIM4v3DPgpPtr) += Gm - gdtotg + gbdpg - gIdtotg |
|||
+ T1 * ddxpart_dVg + dxpart * xgtg; |
|||
*(here->BSIM4v3DPspPtr ) += xcdsb * s->real; |
|||
*(here->BSIM4v3DPspPtr +1) += xcdsb * s->imag; |
|||
*(here->BSIM4v3DPspPtr) -= gds + FwdSum + gdtots - gbdpsp + gIdtots |
|||
- T1 * ddxpart_dVs - dxpart * xgts; |
|||
*(here->BSIM4v3DPbpPtr ) += xcdbb * s->real; |
|||
*(here->BSIM4v3DPbpPtr +1) += xcdbb * s->imag; |
|||
*(here->BSIM4v3DPbpPtr) -= gjbd + gdtotb - Gmbs - gbdpb + gIdtotb |
|||
- T1 * ddxpart_dVb - dxpart * xgtb; |
|||
|
|||
*(here->BSIM4v3DdpPtr) -= gdpr - gdtotd; |
|||
*(here->BSIM4v3DdPtr) += gdpr + gdtot; |
|||
|
|||
*(here->BSIM4v3SPdpPtr ) += xcsdb * s->real; |
|||
*(here->BSIM4v3SPdpPtr +1) += xcsdb * s->imag; |
|||
*(here->BSIM4v3SPdpPtr) -= gds + gstotd + RevSum - gbspdp + gIstotd |
|||
- T1 * dsxpart_dVd - sxpart * xgtd; |
|||
*(here->BSIM4v3SPgpPtr ) += xcsgb * s->real; |
|||
*(here->BSIM4v3SPgpPtr +1) += xcsgb * s->imag; |
|||
*(here->BSIM4v3SPgpPtr) -= Gm + gstotg - gbspg + gIstotg |
|||
- T1 * dsxpart_dVg - sxpart * xgtg; |
|||
*(here->BSIM4v3SPspPtr ) += xcssb * s->real; |
|||
*(here->BSIM4v3SPspPtr +1) += xcssb * s->imag; |
|||
*(here->BSIM4v3SPspPtr) += gspr + gds + here->BSIM4v3gbs - gIstots |
|||
- gstots + FwdSum + gbspsp |
|||
+ sxpart * xgts + T1 * dsxpart_dVs; |
|||
*(here->BSIM4v3SPsPtr) -= gspr + gstot; |
|||
*(here->BSIM4v3SPbpPtr ) += xcsbb * s->real; |
|||
*(here->BSIM4v3SPbpPtr +1) += xcsbb * s->imag; |
|||
*(here->BSIM4v3SPbpPtr) -= gjbs + gstotb + Gmbs - gbspb + gIstotb |
|||
- T1 * dsxpart_dVb - sxpart * xgtb; |
|||
|
|||
*(here->BSIM4v3SspPtr) -= gspr - gstots; |
|||
*(here->BSIM4v3SsPtr) += gspr + gstot; |
|||
|
|||
*(here->BSIM4v3BPdpPtr ) += xcbdb * s->real; |
|||
*(here->BSIM4v3BPdpPtr +1) += xcbdb * s->imag; |
|||
*(here->BSIM4v3BPdpPtr) -= gjbd - gbbdp + gIbtotd; |
|||
*(here->BSIM4v3BPgpPtr ) += xcbgb * s->real; |
|||
*(here->BSIM4v3BPgpPtr +1) += xcbgb * s->imag; |
|||
*(here->BSIM4v3BPgpPtr) -= here->BSIM4v3gbgs + gIbtotg; |
|||
*(here->BSIM4v3BPspPtr ) += xcbsb * s->real; |
|||
*(here->BSIM4v3BPspPtr +1) += xcbsb * s->imag; |
|||
*(here->BSIM4v3BPspPtr) -= gjbs - gbbsp + gIbtots; |
|||
*(here->BSIM4v3BPbpPtr ) += xcbbb * s->real; |
|||
*(here->BSIM4v3BPbpPtr +1) += xcbbb * s->imag; |
|||
*(here->BSIM4v3BPbpPtr) += gjbd + gjbs - here->BSIM4v3gbbs |
|||
- gIbtotb; |
|||
ggidld = here->BSIM4v3ggidld; |
|||
ggidlg = here->BSIM4v3ggidlg; |
|||
ggidlb = here->BSIM4v3ggidlb; |
|||
ggislg = here->BSIM4v3ggislg; |
|||
ggisls = here->BSIM4v3ggisls; |
|||
ggislb = here->BSIM4v3ggislb; |
|||
|
|||
/* stamp gidl */ |
|||
(*(here->BSIM4v3DPdpPtr) += ggidld); |
|||
(*(here->BSIM4v3DPgpPtr) += ggidlg); |
|||
(*(here->BSIM4v3DPspPtr) -= (ggidlg + ggidld) + ggidlb); |
|||
(*(here->BSIM4v3DPbpPtr) += ggidlb); |
|||
(*(here->BSIM4v3BPdpPtr) -= ggidld); |
|||
(*(here->BSIM4v3BPgpPtr) -= ggidlg); |
|||
(*(here->BSIM4v3BPspPtr) += (ggidlg + ggidld) + ggidlb); |
|||
(*(here->BSIM4v3BPbpPtr) -= ggidlb); |
|||
/* stamp gisl */ |
|||
(*(here->BSIM4v3SPdpPtr) -= (ggisls + ggislg) + ggislb); |
|||
(*(here->BSIM4v3SPgpPtr) += ggislg); |
|||
(*(here->BSIM4v3SPspPtr) += ggisls); |
|||
(*(here->BSIM4v3SPbpPtr) += ggislb); |
|||
(*(here->BSIM4v3BPdpPtr) += (ggislg + ggisls) + ggislb); |
|||
(*(here->BSIM4v3BPgpPtr) -= ggislg); |
|||
(*(here->BSIM4v3BPspPtr) -= ggisls); |
|||
(*(here->BSIM4v3BPbpPtr) -= ggislb); |
|||
|
|||
if (here->BSIM4v3rbodyMod) |
|||
{ (*(here->BSIM4v3DPdbPtr ) += xcdbdb * s->real); |
|||
(*(here->BSIM4v3DPdbPtr +1) += xcdbdb * s->imag); |
|||
(*(here->BSIM4v3DPdbPtr) -= here->BSIM4v3gbd); |
|||
(*(here->BSIM4v3SPsbPtr ) += xcsbsb * s->real); |
|||
(*(here->BSIM4v3SPsbPtr +1) += xcsbsb * s->imag); |
|||
(*(here->BSIM4v3SPsbPtr) -= here->BSIM4v3gbs); |
|||
|
|||
(*(here->BSIM4v3DBdpPtr ) += xcdbdb * s->real); |
|||
(*(here->BSIM4v3DBdpPtr +1) += xcdbdb * s->imag); |
|||
(*(here->BSIM4v3DBdpPtr) -= here->BSIM4v3gbd); |
|||
(*(here->BSIM4v3DBdbPtr ) -= xcdbdb * s->real); |
|||
(*(here->BSIM4v3DBdbPtr +1) -= xcdbdb * s->imag); |
|||
(*(here->BSIM4v3DBdbPtr) += here->BSIM4v3gbd + here->BSIM4v3grbpd |
|||
+ here->BSIM4v3grbdb); |
|||
(*(here->BSIM4v3DBbpPtr) -= here->BSIM4v3grbpd); |
|||
(*(here->BSIM4v3DBbPtr) -= here->BSIM4v3grbdb); |
|||
|
|||
(*(here->BSIM4v3BPdbPtr) -= here->BSIM4v3grbpd); |
|||
(*(here->BSIM4v3BPbPtr) -= here->BSIM4v3grbpb); |
|||
(*(here->BSIM4v3BPsbPtr) -= here->BSIM4v3grbps); |
|||
(*(here->BSIM4v3BPbpPtr) += here->BSIM4v3grbpd + here->BSIM4v3grbps |
|||
+ here->BSIM4v3grbpb); |
|||
/* WDL: (-here->BSIM4v3gbbs) already added to BPbpPtr */ |
|||
|
|||
(*(here->BSIM4v3SBspPtr ) += xcsbsb * s->real); |
|||
(*(here->BSIM4v3SBspPtr +1) += xcsbsb * s->imag); |
|||
(*(here->BSIM4v3SBspPtr) -= here->BSIM4v3gbs); |
|||
(*(here->BSIM4v3SBbpPtr) -= here->BSIM4v3grbps); |
|||
(*(here->BSIM4v3SBbPtr) -= here->BSIM4v3grbsb); |
|||
(*(here->BSIM4v3SBsbPtr ) -= xcsbsb * s->real); |
|||
(*(here->BSIM4v3SBsbPtr +1) -= xcsbsb * s->imag); |
|||
(*(here->BSIM4v3SBsbPtr) += here->BSIM4v3gbs |
|||
+ here->BSIM4v3grbps + here->BSIM4v3grbsb); |
|||
|
|||
(*(here->BSIM4v3BdbPtr) -= here->BSIM4v3grbdb); |
|||
(*(here->BSIM4v3BbpPtr) -= here->BSIM4v3grbpb); |
|||
(*(here->BSIM4v3BsbPtr) -= here->BSIM4v3grbsb); |
|||
(*(here->BSIM4v3BbPtr) += here->BSIM4v3grbsb + here->BSIM4v3grbdb |
|||
+ here->BSIM4v3grbpb); |
|||
} |
|||
|
|||
if (here->BSIM4v3acnqsMod) |
|||
{ *(here->BSIM4v3QqPtr ) += s->real * ScalingFactor; |
|||
*(here->BSIM4v3QqPtr +1) += s->imag * ScalingFactor; |
|||
*(here->BSIM4v3QgpPtr ) -= xcqgb * s->real; |
|||
*(here->BSIM4v3QgpPtr +1) -= xcqgb * s->imag; |
|||
*(here->BSIM4v3QdpPtr ) -= xcqdb * s->real; |
|||
*(here->BSIM4v3QdpPtr +1) -= xcqdb * s->imag; |
|||
*(here->BSIM4v3QbpPtr ) -= xcqbb * s->real; |
|||
*(here->BSIM4v3QbpPtr +1) -= xcqbb * s->imag; |
|||
*(here->BSIM4v3QspPtr ) -= xcqsb * s->real; |
|||
*(here->BSIM4v3QspPtr +1) -= xcqsb * s->imag; |
|||
|
|||
*(here->BSIM4v3GPqPtr) -= here->BSIM4v3gtau; |
|||
*(here->BSIM4v3DPqPtr) += dxpart * here->BSIM4v3gtau; |
|||
*(here->BSIM4v3SPqPtr) += sxpart * here->BSIM4v3gtau; |
|||
|
|||
*(here->BSIM4v3QqPtr) += here->BSIM4v3gtau; |
|||
*(here->BSIM4v3QgpPtr) += xgtg; |
|||
*(here->BSIM4v3QdpPtr) += xgtd; |
|||
*(here->BSIM4v3QbpPtr) += xgtb; |
|||
*(here->BSIM4v3QspPtr) += xgts; |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
1763
src/spicelib/devices/bsim4v3/b4v3set.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1646
src/spicelib/devices/bsim4v3/b4v3temp.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,60 @@ |
|||
/**** BSIM4.3.0 Released by Xuemei(Jane) Xi 05/09/2003 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2003 Regents of the University of California. All rights reserved. |
|||
* File: b4v3check.c of BSIM4.3.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include <stdio.h> |
|||
#include <math.h> |
|||
#include "cktdefs.h" |
|||
#include "bsim4v3def.h" |
|||
#include "sperror.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v3trunc(inModel,ckt,timeStep) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
double *timeStep; |
|||
{ |
|||
BSIM4v3model *model = (BSIM4v3model*)inModel; |
|||
BSIM4v3instance *here; |
|||
|
|||
#ifdef STEPDEBUG |
|||
double debugtemp; |
|||
#endif /* STEPDEBUG */ |
|||
|
|||
for (; model != NULL; model = model->BSIM4v3nextModel) |
|||
{ for (here = model->BSIM4v3instances; here != NULL; |
|||
here = here->BSIM4v3nextInstance) |
|||
{ |
|||
if (here->BSIM4v3owner != ARCHme) continue; |
|||
#ifdef STEPDEBUG |
|||
debugtemp = *timeStep; |
|||
#endif /* STEPDEBUG */ |
|||
CKTterr(here->BSIM4v3qb,ckt,timeStep); |
|||
CKTterr(here->BSIM4v3qg,ckt,timeStep); |
|||
CKTterr(here->BSIM4v3qd,ckt,timeStep); |
|||
if (here->BSIM4v3trnqsMod) |
|||
CKTterr(here->BSIM4v3qcdump,ckt,timeStep); |
|||
if (here->BSIM4v3rbodyMod) |
|||
{ CKTterr(here->BSIM4v3qbs,ckt,timeStep); |
|||
CKTterr(here->BSIM4v3qbd,ckt,timeStep); |
|||
} |
|||
if (here->BSIM4v3rgateMod == 3) |
|||
CKTterr(here->BSIM4v3qgmid,ckt,timeStep); |
|||
#ifdef STEPDEBUG |
|||
if(debugtemp != *timeStep) |
|||
{ printf("device %s reduces step from %g to %g\n", |
|||
here->BSIM4v3name,debugtemp,*timeStep); |
|||
} |
|||
#endif /* STEPDEBUG */ |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
2816
src/spicelib/devices/bsim4v3/bsim4v3def.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,54 @@ |
|||
/********** |
|||
Copyright 2003 Regents of the University of California. All rights reserved. |
|||
Author: 2000 Weidong Liu |
|||
Author: 2001- Xuemei Xi |
|||
File: bsim4v3ext.h |
|||
**********/ |
|||
|
|||
#ifdef __STDC__ |
|||
extern int BSIM4v3acLoad(GENmodel *,CKTcircuit*); |
|||
extern int BSIM4v3ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); |
|||
extern int BSIM4v3convTest(GENmodel *,CKTcircuit*); |
|||
extern int BSIM4v3delete(GENmodel*,IFuid,GENinstance**); |
|||
extern void BSIM4v3destroy(GENmodel**); |
|||
extern int BSIM4v3getic(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v3load(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v3mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); |
|||
extern int BSIM4v3mDelete(GENmodel**,IFuid,GENmodel*); |
|||
extern int BSIM4v3mParam(int,IFvalue*,GENmodel*); |
|||
extern void BSIM4v3mosCap(CKTcircuit*, double, double, double, double, |
|||
double, double, double, double, double, double, double, |
|||
double, double, double, double, double, double, double*, |
|||
double*, double*, double*, double*, double*, double*, double*, |
|||
double*, double*, double*, double*, double*, double*, double*, |
|||
double*); |
|||
extern int BSIM4v3param(int,IFvalue*,GENinstance*,IFvalue*); |
|||
extern int BSIM4v3pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); |
|||
extern int BSIM4v3setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); |
|||
extern int BSIM4v3temp(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v3trunc(GENmodel*,CKTcircuit*,double*); |
|||
extern int BSIM4v3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); |
|||
extern int BSIM4v3unsetup(GENmodel*,CKTcircuit*); |
|||
|
|||
#else /* stdc */ |
|||
extern int BSIM4v3acLoad(); |
|||
extern int BSIM4v3delete(); |
|||
extern void BSIM4v3destroy(); |
|||
extern int BSIM4v3getic(); |
|||
extern int BSIM4v3load(); |
|||
extern int BSIM4v3mDelete(); |
|||
extern int BSIM4v3ask(); |
|||
extern int BSIM4v3mAsk(); |
|||
extern int BSIM4v3convTest(); |
|||
extern int BSIM4v3temp(); |
|||
extern int BSIM4v3mParam(); |
|||
extern void BSIM4v3mosCap(); |
|||
extern int BSIM4v3param(); |
|||
extern int BSIM4v3pzLoad(); |
|||
extern int BSIM4v3setup(); |
|||
extern int BSIM4v3trunc(); |
|||
extern int BSIM4v3noise(); |
|||
extern int BSIM4v3unsetup(); |
|||
|
|||
#endif /* stdc */ |
|||
|
|||
@ -0,0 +1,80 @@ |
|||
#include <config.h> |
|||
|
|||
#include <devdefs.h> |
|||
|
|||
#include "bsim4v3itf.h" |
|||
#include "bsim4v3ext.h" |
|||
#include "bsim4v3init.h" |
|||
|
|||
|
|||
SPICEdev BSIM4v3info = { |
|||
{ |
|||
"BSIM4v3", |
|||
"Berkeley Short Channel IGFET Model-4", |
|||
|
|||
&BSIM4v3nSize, |
|||
&BSIM4v3nSize, |
|||
BSIM4v3names, |
|||
|
|||
&BSIM4v3pTSize, |
|||
BSIM4v3pTable, |
|||
|
|||
&BSIM4v3mPTSize, |
|||
BSIM4v3mPTable, |
|||
|
|||
#ifdef XSPICE |
|||
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ |
|||
NULL, /* This is a SPICE device, it has no MIF info data */ |
|||
|
|||
0, /* This is a SPICE device, it has no MIF info data */ |
|||
NULL, /* This is a SPICE device, it has no MIF info data */ |
|||
|
|||
0, /* This is a SPICE device, it has no MIF info data */ |
|||
NULL, /* This is a SPICE device, it has no MIF info data */ |
|||
|
|||
0, /* This is a SPICE device, it has no MIF info data */ |
|||
NULL, /* This is a SPICE device, it has no MIF info data */ |
|||
/*--------------------------- End of SDB fix -------------------------*/ |
|||
#endif |
|||
|
|||
DEV_DEFAULT |
|||
}, |
|||
|
|||
DEVparam : BSIM4v3param, |
|||
DEVmodParam : BSIM4v3mParam, |
|||
DEVload : BSIM4v3load, |
|||
DEVsetup : BSIM4v3setup, |
|||
DEVunsetup : BSIM4v3unsetup, |
|||
DEVpzSetup : BSIM4v3setup, |
|||
DEVtemperature: BSIM4v3temp, |
|||
DEVtrunc : BSIM4v3trunc, |
|||
DEVfindBranch : NULL, |
|||
DEVacLoad : BSIM4v3acLoad, |
|||
DEVaccept : NULL, |
|||
DEVdestroy : BSIM4v3destroy, |
|||
DEVmodDelete : BSIM4v3mDelete, |
|||
DEVdelete : BSIM4v3delete, |
|||
DEVsetic : BSIM4v3getic, |
|||
DEVask : BSIM4v3ask, |
|||
DEVmodAsk : BSIM4v3mAsk, |
|||
DEVpzLoad : BSIM4v3pzLoad, |
|||
DEVconvTest : BSIM4v3convTest, |
|||
DEVsenSetup : NULL, |
|||
DEVsenLoad : NULL, |
|||
DEVsenUpdate : NULL, |
|||
DEVsenAcLoad : NULL, |
|||
DEVsenPrint : NULL, |
|||
DEVsenTrunc : NULL, |
|||
DEVdisto : NULL, |
|||
DEVnoise : BSIM4v3noise, |
|||
|
|||
DEVinstSize : &BSIM4v3iSize, |
|||
DEVmodSize : &BSIM4v3mSize |
|||
}; |
|||
|
|||
|
|||
SPICEdev * |
|||
get_bsim4v3_info(void) |
|||
{ |
|||
return &BSIM4v3info; |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
#ifndef _BSIM4V3INIT_H |
|||
#define _BSIM4V3INIT_H |
|||
|
|||
extern IFparm BSIM4v3pTable[ ]; |
|||
extern IFparm BSIM4v3mPTable[ ]; |
|||
extern char *BSIM4v3names[ ]; |
|||
extern int BSIM4v3pTSize; |
|||
extern int BSIM4v3mPTSize; |
|||
extern int BSIM4v3nSize; |
|||
extern int BSIM4v3iSize; |
|||
extern int BSIM4v3mSize; |
|||
|
|||
#endif |
|||
@ -0,0 +1,13 @@ |
|||
/********** |
|||
Copyright 2003 Regents of the University of California. All rights reserved. |
|||
Author: 2000 Weidong Liu. |
|||
Author: 2001- Xuemei Xi |
|||
File: bsim4v3itf.h |
|||
**********/ |
|||
|
|||
#ifndef DEV_BSIM4V3 |
|||
#define DEV_BSIM4V3 |
|||
|
|||
SPICEdev *get_bsim4v3_info(void); |
|||
|
|||
#endif |
|||
@ -0,0 +1,33 @@ |
|||
|
|||
The terms under which the software is provided are as the following. |
|||
|
|||
Software is distributed as is, completely without warranty or service |
|||
support. The University of California and its employees are not liable |
|||
for the condition or performance of the software. |
|||
|
|||
The University owns the copyright but shall not be liable for any |
|||
infringement of copyright or other proprietary rights brought by third |
|||
parties against the users of the software. |
|||
|
|||
The University of California hereby disclaims all implied warranties. |
|||
|
|||
The University of California grants the users the right to modify, copy, |
|||
and redistribute the software and documentation, both within the user's |
|||
organization and externally, subject to the following restrictions: |
|||
|
|||
1. The users agree not to charge for the University of California code |
|||
itself but may charge for additions, extensions, or support. |
|||
|
|||
2. In any product based on the software, the users agree to acknowledge |
|||
the UC Berkeley BSIM Research Group that developed the software. This |
|||
acknowledgment shall appear in the product documentation. |
|||
|
|||
3. The users agree to obey all U.S. Government restrictions governing |
|||
redistribution or export of the software. |
|||
|
|||
4. The users agree to reproduce any copyright notice which appears on |
|||
the software on any copy or modification of such made available |
|||
to others. |
|||
|
|||
Chenming Hu, and Jane Xuemei Xi |
|||
April. 2003 |
|||
@ -0,0 +1,35 @@ |
|||
## Process this file with automake to produce Makefile.in
|
|||
|
|||
noinst_LIBRARIES = libbsim4v5.a |
|||
|
|||
libbsim4v5_a_SOURCES = \
|
|||
b4v5.c \
|
|||
b4v5acld.c \
|
|||
b4v5ask.c \
|
|||
b4v5check.c \
|
|||
b4v5cvtest.c \
|
|||
b4v5del.c \
|
|||
b4v5dest.c \
|
|||
b4v5geo.c \
|
|||
b4v5getic.c \
|
|||
b4v5ld.c \
|
|||
b4v5mask.c \
|
|||
b4v5mdel.c \
|
|||
b4v5mpar.c \
|
|||
b4v5noi.c \
|
|||
b4v5par.c \
|
|||
b4v5pzld.c \
|
|||
b4v5set.c \
|
|||
b4v5temp.c \
|
|||
b4v5trunc.c \
|
|||
bsim4v5def.h \
|
|||
bsim4v5ext.h \
|
|||
bsim4v5init.c \
|
|||
bsim4v5init.h \
|
|||
bsim4v5itf.h |
|||
|
|||
|
|||
|
|||
INCLUDES = -I$(top_srcdir)/src/include |
|||
|
|||
MAINTAINERCLEANFILES = Makefile.in |
|||
@ -0,0 +1,913 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 11/15/2002. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
* Modified by Xuemei Xi, 03/04/2004. |
|||
* Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "devdefs.h" |
|||
#include "bsim4v5def.h" |
|||
#include "suffix.h" |
|||
|
|||
IFparm BSIM4v5pTable[] = { /* parameters */ |
|||
IOP( "l", BSIM4v5_L, IF_REAL , "Length"), |
|||
IOP( "w", BSIM4v5_W, IF_REAL , "Width"), |
|||
IOP( "m", BSIM4v5_M, IF_REAL , "Separate Parallel multiplier"), |
|||
IOP( "nf", BSIM4v5_NF, IF_REAL , "Number of fingers"), |
|||
IOP( "sa", BSIM4v5_SA, IF_REAL , "distance between OD edge to poly of one side "), |
|||
IOP( "sb", BSIM4v5_SB, IF_REAL , "distance between OD edge to poly of the other side"), |
|||
IOP( "sd", BSIM4v5_SD, IF_REAL , "distance between neighbour fingers"), |
|||
IOP( "sca", BSIM4v5_SCA, IF_REAL , "Integral of the first distribution function for scattered well dopant"), |
|||
IOP( "scb", BSIM4v5_SCB, IF_REAL , "Integral of the second distribution function for scattered well dopant"), |
|||
IOP( "scc", BSIM4v5_SCC, IF_REAL , "Integral of the third distribution function for scattered well dopant"), |
|||
IOP( "sc", BSIM4v5_SCA, IF_REAL , "Distance to a single well edge "), |
|||
IOP( "min", BSIM4v5_MIN, IF_INTEGER , "Minimize either D or S"), |
|||
IOP( "ad", BSIM4v5_AD, IF_REAL , "Drain area"), |
|||
IOP( "as", BSIM4v5_AS, IF_REAL , "Source area"), |
|||
IOP( "pd", BSIM4v5_PD, IF_REAL , "Drain perimeter"), |
|||
IOP( "ps", BSIM4v5_PS, IF_REAL , "Source perimeter"), |
|||
IOP( "nrd", BSIM4v5_NRD, IF_REAL , "Number of squares in drain"), |
|||
IOP( "nrs", BSIM4v5_NRS, IF_REAL , "Number of squares in source"), |
|||
IOP( "off", BSIM4v5_OFF, IF_FLAG , "Device is initially off"), |
|||
IOP( "rbdb", BSIM4v5_RBDB, IF_REAL , "Body resistance"), |
|||
IOP( "rbsb", BSIM4v5_RBSB, IF_REAL , "Body resistance"), |
|||
IOP( "rbpb", BSIM4v5_RBPB, IF_REAL , "Body resistance"), |
|||
IOP( "rbps", BSIM4v5_RBPS, IF_REAL , "Body resistance"), |
|||
IOP( "rbpd", BSIM4v5_RBPD, IF_REAL , "Body resistance"), |
|||
IOP( "delvto", BSIM4v5_DELVTO, IF_REAL , "Zero bias threshold voltage variation"), |
|||
IOP( "xgw", BSIM4v5_XGW, IF_REAL, "Distance from gate contact center to device edge"), |
|||
IOP( "ngcon", BSIM4v5_NGCON, IF_REAL, "Number of gate contacts"), |
|||
|
|||
|
|||
IOP( "trnqsmod", BSIM4v5_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), |
|||
IOP( "acnqsmod", BSIM4v5_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), |
|||
IOP( "rbodymod", BSIM4v5_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), |
|||
IOP( "rgatemod", BSIM4v5_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), |
|||
IOP( "geomod", BSIM4v5_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), |
|||
IOP( "rgeomod", BSIM4v5_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), |
|||
IP( "ic", BSIM4v5_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), |
|||
OP( "gmbs", BSIM4v5_GMBS, IF_REAL, "Gmb"), |
|||
OP( "gm", BSIM4v5_GM, IF_REAL, "Gm"), |
|||
OP( "gds", BSIM4v5_GDS, IF_REAL, "Gds"), |
|||
OP( "vdsat", BSIM4v5_VDSAT, IF_REAL, "Vdsat"), |
|||
OP( "vth", BSIM4v5_VON, IF_REAL, "Vth"), |
|||
OP( "id", BSIM4v5_CD, IF_REAL, "Ids"), |
|||
OP( "ibd", BSIM4v5_CBD, IF_REAL, "Ibd"), |
|||
OP( "ibs", BSIM4v5_CBS, IF_REAL, "Ibs"), |
|||
OP( "gbd", BSIM4v5_GBD, IF_REAL, "gbd"), |
|||
OP( "gbs", BSIM4v5_GBS, IF_REAL, "gbs"), |
|||
OP( "isub", BSIM4v5_CSUB, IF_REAL, "Isub"), |
|||
OP( "igidl", BSIM4v5_IGIDL, IF_REAL, "Igidl"), |
|||
OP( "igisl", BSIM4v5_IGISL, IF_REAL, "Igisl"), |
|||
OP( "igs", BSIM4v5_IGS, IF_REAL, "Igs"), |
|||
OP( "igd", BSIM4v5_IGD, IF_REAL, "Igd"), |
|||
OP( "igb", BSIM4v5_IGB, IF_REAL, "Igb"), |
|||
OP( "igcs", BSIM4v5_IGCS, IF_REAL, "Igcs"), |
|||
OP( "igcd", BSIM4v5_IGCD, IF_REAL, "Igcd"), |
|||
OP( "vbs", BSIM4v5_VBS, IF_REAL, "Vbs"), |
|||
OP( "vgs", BSIM4v5_VGS, IF_REAL, "Vgs"), |
|||
OP( "vds", BSIM4v5_VDS, IF_REAL, "Vds"), |
|||
OP( "cgg", BSIM4v5_CGGB, IF_REAL, "Cggb"), |
|||
OP( "cgs", BSIM4v5_CGSB, IF_REAL, "Cgsb"), |
|||
OP( "cgd", BSIM4v5_CGDB, IF_REAL, "Cgdb"), |
|||
OP( "cbg", BSIM4v5_CBGB, IF_REAL, "Cbgb"), |
|||
OP( "cbd", BSIM4v5_CBDB, IF_REAL, "Cbdb"), |
|||
OP( "cbs", BSIM4v5_CBSB, IF_REAL, "Cbsb"), |
|||
OP( "cdg", BSIM4v5_CDGB, IF_REAL, "Cdgb"), |
|||
OP( "cdd", BSIM4v5_CDDB, IF_REAL, "Cddb"), |
|||
OP( "cds", BSIM4v5_CDSB, IF_REAL, "Cdsb"), |
|||
OP( "csg", BSIM4v5_CSGB, IF_REAL, "Csgb"), |
|||
OP( "csd", BSIM4v5_CSDB, IF_REAL, "Csdb"), |
|||
OP( "css", BSIM4v5_CSSB, IF_REAL, "Cssb"), |
|||
OP( "cgb", BSIM4v5_CGBB, IF_REAL, "Cgbb"), |
|||
OP( "cdb", BSIM4v5_CDBB, IF_REAL, "Cdbb"), |
|||
OP( "csb", BSIM4v5_CSBB, IF_REAL, "Csbb"), |
|||
OP( "cbb", BSIM4v5_CBBB, IF_REAL, "Cbbb"), |
|||
OP( "capbd", BSIM4v5_CAPBD, IF_REAL, "Capbd"), |
|||
OP( "capbs", BSIM4v5_CAPBS, IF_REAL, "Capbs"), |
|||
OP( "qg", BSIM4v5_QG, IF_REAL, "Qgate"), |
|||
OP( "qb", BSIM4v5_QB, IF_REAL, "Qbulk"), |
|||
OP( "qd", BSIM4v5_QD, IF_REAL, "Qdrain"), |
|||
OP( "qs", BSIM4v5_QS, IF_REAL, "Qsource"), |
|||
OP( "qinv", BSIM4v5_QINV, IF_REAL, "Qinversion"), |
|||
OP( "qdef", BSIM4v5_QDEF, IF_REAL, "Qdef"), |
|||
OP( "gcrg", BSIM4v5_GCRG, IF_REAL, "Gcrg"), |
|||
OP( "gtau", BSIM4v5_GTAU, IF_REAL, "Gtau"), |
|||
}; |
|||
|
|||
IFparm BSIM4v5mPTable[] = { /* model parameters */ |
|||
IOP( "rgeomod", BSIM4v5_MOD_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), |
|||
IOP( "capmod", BSIM4v5_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), |
|||
IOP( "diomod", BSIM4v5_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), |
|||
IOP( "rdsmod", BSIM4v5_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), |
|||
IOP( "trnqsmod", BSIM4v5_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), |
|||
IOP( "acnqsmod", BSIM4v5_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), |
|||
IOP( "mobmod", BSIM4v5_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), |
|||
IOP( "rbodymod", BSIM4v5_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), |
|||
IOP( "rgatemod", BSIM4v5_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), |
|||
IOP( "permod", BSIM4v5_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), |
|||
IOP( "geomod", BSIM4v5_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), |
|||
IOP( "fnoimod", BSIM4v5_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), |
|||
IOP( "tnoimod", BSIM4v5_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), |
|||
IOP( "igcmod", BSIM4v5_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), |
|||
IOP( "igbmod", BSIM4v5_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), |
|||
IOP( "tempmod", BSIM4v5_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"), |
|||
IOP( "paramchk", BSIM4v5_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), |
|||
IOP( "binunit", BSIM4v5_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), |
|||
IOP( "version", BSIM4v5_MOD_VERSION, IF_STRING, "parameter for model version"), |
|||
IOP( "toxe", BSIM4v5_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), |
|||
IOP( "toxp", BSIM4v5_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), |
|||
IOP( "toxm", BSIM4v5_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), |
|||
IOP( "toxref", BSIM4v5_MOD_TOXREF, IF_REAL, "Target tox value"), |
|||
IOP( "dtox", BSIM4v5_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), |
|||
IOP( "epsrox", BSIM4v5_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), |
|||
IOP( "cdsc", BSIM4v5_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), |
|||
IOP( "cdscb", BSIM4v5_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), |
|||
IOP( "cdscd", BSIM4v5_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), |
|||
IOP( "cit", BSIM4v5_MOD_CIT, IF_REAL, "Interface state capacitance"), |
|||
IOP( "nfactor", BSIM4v5_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), |
|||
IOP( "xj", BSIM4v5_MOD_XJ, IF_REAL, "Junction depth in meters"), |
|||
IOP( "vsat", BSIM4v5_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), |
|||
IOP( "at", BSIM4v5_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), |
|||
IOP( "a0", BSIM4v5_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), |
|||
IOP( "ags", BSIM4v5_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), |
|||
IOP( "a1", BSIM4v5_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), |
|||
IOP( "a2", BSIM4v5_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), |
|||
IOP( "keta", BSIM4v5_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), |
|||
IOP( "nsub", BSIM4v5_MOD_NSUB, IF_REAL, "Substrate doping concentration"), |
|||
IOP( "ndep", BSIM4v5_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), |
|||
IOP( "nsd", BSIM4v5_MOD_NSD, IF_REAL, "S/D doping concentration"), |
|||
IOP( "phin", BSIM4v5_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), |
|||
IOP( "ngate", BSIM4v5_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), |
|||
IOP( "gamma1", BSIM4v5_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), |
|||
IOP( "gamma2", BSIM4v5_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), |
|||
IOP( "vbx", BSIM4v5_MOD_VBX, IF_REAL, "Vth transition body Voltage"), |
|||
IOP( "vbm", BSIM4v5_MOD_VBM, IF_REAL, "Maximum body voltage"), |
|||
|
|||
IOP( "xt", BSIM4v5_MOD_XT, IF_REAL, "Doping depth"), |
|||
IOP( "k1", BSIM4v5_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), |
|||
IOP( "kt1", BSIM4v5_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), |
|||
IOP( "kt1l", BSIM4v5_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), |
|||
IOP( "kt2", BSIM4v5_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), |
|||
IOP( "k2", BSIM4v5_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), |
|||
IOP( "k3", BSIM4v5_MOD_K3, IF_REAL, "Narrow width effect coefficient"), |
|||
IOP( "k3b", BSIM4v5_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), |
|||
IOP( "w0", BSIM4v5_MOD_W0, IF_REAL, "Narrow width effect parameter"), |
|||
IOP( "dvtp0", BSIM4v5_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), |
|||
IOP( "dvtp1", BSIM4v5_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), |
|||
IOP( "lpe0", BSIM4v5_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), |
|||
IOP( "lpeb", BSIM4v5_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), |
|||
IOP( "dvt0", BSIM4v5_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), |
|||
IOP( "dvt1", BSIM4v5_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), |
|||
IOP( "dvt2", BSIM4v5_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), |
|||
IOP( "dvt0w", BSIM4v5_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), |
|||
IOP( "dvt1w", BSIM4v5_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), |
|||
IOP( "dvt2w", BSIM4v5_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), |
|||
IOP( "drout", BSIM4v5_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), |
|||
IOP( "dsub", BSIM4v5_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), |
|||
IOP( "vth0", BSIM4v5_MOD_VTH0, IF_REAL,"Threshold voltage"), |
|||
IOP( "vtho", BSIM4v5_MOD_VTH0, IF_REAL,"Threshold voltage"), |
|||
IOP( "ua", BSIM4v5_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), |
|||
IOP( "ua1", BSIM4v5_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), |
|||
IOP( "ub", BSIM4v5_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), |
|||
IOP( "ub1", BSIM4v5_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), |
|||
IOP( "uc", BSIM4v5_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), |
|||
IOP( "uc1", BSIM4v5_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), |
|||
IOP( "ud", BSIM4v5_MOD_UD, IF_REAL, "Coulomb scattering factor of mobility"), |
|||
IOP( "ud1", BSIM4v5_MOD_UD1, IF_REAL, "Temperature coefficient of ud"), |
|||
IOP( "up", BSIM4v5_MOD_UP, IF_REAL, "Channel length linear factor of mobility"), |
|||
IOP( "lp", BSIM4v5_MOD_LP, IF_REAL, "Channel length exponential factor of mobility"), |
|||
IOP( "u0", BSIM4v5_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), |
|||
IOP( "eu", BSIM4v5_MOD_EU, IF_REAL, "Mobility exponent"), |
|||
IOP( "ute", BSIM4v5_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), |
|||
IOP( "voff", BSIM4v5_MOD_VOFF, IF_REAL, "Threshold voltage offset"), |
|||
IOP( "minv", BSIM4v5_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"), |
|||
IOP( "voffl", BSIM4v5_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), |
|||
IOP( "tnom", BSIM4v5_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), |
|||
IOP( "cgso", BSIM4v5_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), |
|||
IOP( "cgdo", BSIM4v5_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), |
|||
IOP( "cgbo", BSIM4v5_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), |
|||
IOP( "xpart", BSIM4v5_MOD_XPART, IF_REAL, "Channel charge partitioning"), |
|||
IOP( "delta", BSIM4v5_MOD_DELTA, IF_REAL, "Effective Vds parameter"), |
|||
IOP( "rsh", BSIM4v5_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), |
|||
IOP( "rdsw", BSIM4v5_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), |
|||
IOP( "rdswmin", BSIM4v5_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), |
|||
IOP( "rsw", BSIM4v5_MOD_RSW, IF_REAL, "Source resistance per width"), |
|||
IOP( "rdw", BSIM4v5_MOD_RDW, IF_REAL, "Drain resistance per width"), |
|||
IOP( "rdwmin", BSIM4v5_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), |
|||
IOP( "rswmin", BSIM4v5_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), |
|||
|
|||
IOP( "prwg", BSIM4v5_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), |
|||
IOP( "prwb", BSIM4v5_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), |
|||
|
|||
IOP( "prt", BSIM4v5_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), |
|||
IOP( "eta0", BSIM4v5_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), |
|||
IOP( "etab", BSIM4v5_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), |
|||
IOP( "pclm", BSIM4v5_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), |
|||
IOP( "pdiblc1", BSIM4v5_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), |
|||
IOP( "pdiblc2", BSIM4v5_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), |
|||
IOP( "pdiblcb", BSIM4v5_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), |
|||
IOP( "fprout", BSIM4v5_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), |
|||
IOP( "pdits", BSIM4v5_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), |
|||
IOP( "pditsl", BSIM4v5_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), |
|||
IOP( "pditsd", BSIM4v5_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), |
|||
IOP( "pscbe1", BSIM4v5_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), |
|||
IOP( "pscbe2", BSIM4v5_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), |
|||
IOP( "pvag", BSIM4v5_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), |
|||
|
|||
IOP( "jss", BSIM4v5_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), |
|||
IOP( "jsws", BSIM4v5_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), |
|||
IOP( "jswgs", BSIM4v5_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), |
|||
IOP( "pbs", BSIM4v5_MOD_PBS, IF_REAL, "Source junction built-in potential"), |
|||
IOP( "njs", BSIM4v5_MOD_NJS, IF_REAL, "Source junction emission coefficient"), |
|||
IOP( "xtis", BSIM4v5_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), |
|||
IOP( "mjs", BSIM4v5_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), |
|||
IOP( "pbsws", BSIM4v5_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), |
|||
IOP( "mjsws", BSIM4v5_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), |
|||
IOP( "pbswgs", BSIM4v5_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), |
|||
IOP( "mjswgs", BSIM4v5_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), |
|||
IOP( "cjs", BSIM4v5_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), |
|||
IOP( "cjsws", BSIM4v5_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), |
|||
IOP( "cjswgs", BSIM4v5_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), |
|||
|
|||
IOP( "jsd", BSIM4v5_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), |
|||
IOP( "jswd", BSIM4v5_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), |
|||
IOP( "jswgd", BSIM4v5_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), |
|||
IOP( "pbd", BSIM4v5_MOD_PBD, IF_REAL, "Drain junction built-in potential"), |
|||
IOP( "njd", BSIM4v5_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), |
|||
IOP( "xtid", BSIM4v5_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), |
|||
IOP( "mjd", BSIM4v5_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), |
|||
IOP( "pbswd", BSIM4v5_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), |
|||
IOP( "mjswd", BSIM4v5_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), |
|||
IOP( "pbswgd", BSIM4v5_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), |
|||
IOP( "mjswgd", BSIM4v5_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), |
|||
IOP( "cjd", BSIM4v5_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), |
|||
IOP( "cjswd", BSIM4v5_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), |
|||
IOP( "cjswgd", BSIM4v5_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), |
|||
|
|||
IOP( "vfbcv", BSIM4v5_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), |
|||
IOP( "vfb", BSIM4v5_MOD_VFB, IF_REAL, "Flat Band Voltage"), |
|||
IOP( "tpb", BSIM4v5_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), |
|||
IOP( "tcj", BSIM4v5_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), |
|||
IOP( "tpbsw", BSIM4v5_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), |
|||
IOP( "tcjsw", BSIM4v5_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), |
|||
IOP( "tpbswg", BSIM4v5_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), |
|||
IOP( "tcjswg", BSIM4v5_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), |
|||
IOP( "acde", BSIM4v5_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), |
|||
IOP( "moin", BSIM4v5_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), |
|||
IOP( "noff", BSIM4v5_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), |
|||
IOP( "voffcv", BSIM4v5_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), |
|||
IOP( "dmcg", BSIM4v5_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), |
|||
IOP( "dmci", BSIM4v5_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), |
|||
IOP( "dmdg", BSIM4v5_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), |
|||
IOP( "dmcgt", BSIM4v5_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), |
|||
IOP( "xgw", BSIM4v5_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), |
|||
IOP( "xgl", BSIM4v5_MOD_XGL, IF_REAL, "Variation in Ldrawn"), |
|||
IOP( "rshg", BSIM4v5_MOD_RSHG, IF_REAL, "Gate sheet resistance"), |
|||
IOP( "ngcon", BSIM4v5_MOD_NGCON, IF_REAL, "Number of gate contacts"), |
|||
IOP( "xrcrg1", BSIM4v5_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), |
|||
IOP( "xrcrg2", BSIM4v5_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), |
|||
IOP( "lambda", BSIM4v5_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"), |
|||
IOP( "vtl", BSIM4v5_MOD_VTL, IF_REAL, " thermal velocity"), |
|||
IOP( "lc", BSIM4v5_MOD_LC, IF_REAL, " back scattering parameter"), |
|||
IOP( "xn", BSIM4v5_MOD_XN, IF_REAL, " back scattering parameter"), |
|||
IOP( "vfbsdoff", BSIM4v5_MOD_VFBSDOFF, IF_REAL, "S/D flatband voltage offset"), |
|||
IOP( "tvfbsdoff", BSIM4v5_MOD_TVFBSDOFF, IF_REAL, "Temperature parameter for vfbsdoff"), |
|||
IOP( "tvoff", BSIM4v5_MOD_TVOFF, IF_REAL, "Temperature parameter for voff"), |
|||
|
|||
IOP( "lintnoi", BSIM4v5_MOD_LINTNOI, IF_REAL, "lint offset for noise calculation"), |
|||
IOP( "lint", BSIM4v5_MOD_LINT, IF_REAL, "Length reduction parameter"), |
|||
IOP( "ll", BSIM4v5_MOD_LL, IF_REAL, "Length reduction parameter"), |
|||
IOP( "llc", BSIM4v5_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lln", BSIM4v5_MOD_LLN, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lw", BSIM4v5_MOD_LW, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwc", BSIM4v5_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lwn", BSIM4v5_MOD_LWN, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwl", BSIM4v5_MOD_LWL, IF_REAL, "Length reduction parameter"), |
|||
IOP( "lwlc", BSIM4v5_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), |
|||
IOP( "lmin", BSIM4v5_MOD_LMIN, IF_REAL, "Minimum length for the model"), |
|||
IOP( "lmax", BSIM4v5_MOD_LMAX, IF_REAL, "Maximum length for the model"), |
|||
|
|||
IOP( "wr", BSIM4v5_MOD_WR, IF_REAL, "Width dependence of rds"), |
|||
IOP( "wint", BSIM4v5_MOD_WINT, IF_REAL, "Width reduction parameter"), |
|||
IOP( "dwg", BSIM4v5_MOD_DWG, IF_REAL, "Width reduction parameter"), |
|||
IOP( "dwb", BSIM4v5_MOD_DWB, IF_REAL, "Width reduction parameter"), |
|||
|
|||
IOP( "wl", BSIM4v5_MOD_WL, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wlc", BSIM4v5_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wln", BSIM4v5_MOD_WLN, IF_REAL, "Width reduction parameter"), |
|||
IOP( "ww", BSIM4v5_MOD_WW, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwc", BSIM4v5_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wwn", BSIM4v5_MOD_WWN, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwl", BSIM4v5_MOD_WWL, IF_REAL, "Width reduction parameter"), |
|||
IOP( "wwlc", BSIM4v5_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), |
|||
IOP( "wmin", BSIM4v5_MOD_WMIN, IF_REAL, "Minimum width for the model"), |
|||
IOP( "wmax", BSIM4v5_MOD_WMAX, IF_REAL, "Maximum width for the model"), |
|||
|
|||
IOP( "b0", BSIM4v5_MOD_B0, IF_REAL, "Abulk narrow width parameter"), |
|||
IOP( "b1", BSIM4v5_MOD_B1, IF_REAL, "Abulk narrow width parameter"), |
|||
|
|||
IOP( "cgsl", BSIM4v5_MOD_CGSL, IF_REAL, "New C-V model parameter"), |
|||
IOP( "cgdl", BSIM4v5_MOD_CGDL, IF_REAL, "New C-V model parameter"), |
|||
IOP( "ckappas", BSIM4v5_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), |
|||
IOP( "ckappad", BSIM4v5_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), |
|||
IOP( "cf", BSIM4v5_MOD_CF, IF_REAL, "Fringe capacitance parameter"), |
|||
IOP( "clc", BSIM4v5_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), |
|||
IOP( "cle", BSIM4v5_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), |
|||
IOP( "dwc", BSIM4v5_MOD_DWC, IF_REAL, "Delta W for C-V model"), |
|||
IOP( "dlc", BSIM4v5_MOD_DLC, IF_REAL, "Delta L for C-V model"), |
|||
IOP( "xw", BSIM4v5_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), |
|||
IOP( "xl", BSIM4v5_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), |
|||
IOP( "dlcig", BSIM4v5_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), |
|||
IOP( "dwj", BSIM4v5_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), |
|||
|
|||
IOP( "alpha0", BSIM4v5_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), |
|||
IOP( "alpha1", BSIM4v5_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), |
|||
IOP( "beta0", BSIM4v5_MOD_BETA0, IF_REAL, "substrate current model parameter"), |
|||
|
|||
IOP( "agidl", BSIM4v5_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), |
|||
IOP( "bgidl", BSIM4v5_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), |
|||
IOP( "cgidl", BSIM4v5_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), |
|||
IOP( "egidl", BSIM4v5_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), |
|||
IOP( "aigc", BSIM4v5_MOD_AIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "bigc", BSIM4v5_MOD_BIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "cigc", BSIM4v5_MOD_CIGC, IF_REAL, "Parameter for Igc"), |
|||
IOP( "aigsd", BSIM4v5_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "bigsd", BSIM4v5_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "cigsd", BSIM4v5_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), |
|||
IOP( "aigbacc", BSIM4v5_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "bigbacc", BSIM4v5_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "cigbacc", BSIM4v5_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), |
|||
IOP( "aigbinv", BSIM4v5_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "bigbinv", BSIM4v5_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "cigbinv", BSIM4v5_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), |
|||
IOP( "nigc", BSIM4v5_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), |
|||
IOP( "nigbinv", BSIM4v5_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), |
|||
IOP( "nigbacc", BSIM4v5_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), |
|||
IOP( "ntox", BSIM4v5_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), |
|||
IOP( "eigbinv", BSIM4v5_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), |
|||
IOP( "pigcd", BSIM4v5_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), |
|||
IOP( "poxedge", BSIM4v5_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), |
|||
|
|||
IOP( "ijthdfwd", BSIM4v5_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), |
|||
IOP( "ijthsfwd", BSIM4v5_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), |
|||
IOP( "ijthdrev", BSIM4v5_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), |
|||
IOP( "ijthsrev", BSIM4v5_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), |
|||
IOP( "xjbvd", BSIM4v5_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), |
|||
IOP( "xjbvs", BSIM4v5_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), |
|||
IOP( "bvd", BSIM4v5_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), |
|||
IOP( "bvs", BSIM4v5_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), |
|||
|
|||
IOP( "jtss", BSIM4v5_MOD_JTSS, IF_REAL, "Source bottom trap-assisted saturation current density"), |
|||
IOP( "jtsd", BSIM4v5_MOD_JTSD, IF_REAL, "Drain bottom trap-assisted saturation current density"), |
|||
IOP( "jtssws", BSIM4v5_MOD_JTSSWS, IF_REAL, "Source STI sidewall trap-assisted saturation current density"), |
|||
IOP( "jtsswd", BSIM4v5_MOD_JTSSWD, IF_REAL, "Drain STI sidewall trap-assisted saturation current density"), |
|||
IOP( "jtsswgs", BSIM4v5_MOD_JTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted saturation current density"), |
|||
IOP( "jtsswgd", BSIM4v5_MOD_JTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted saturation current density"), |
|||
IOP( "njts", BSIM4v5_MOD_NJTS, IF_REAL, "Non-ideality factor for bottom junction"), |
|||
IOP( "njtssw", BSIM4v5_MOD_NJTSSW, IF_REAL, "Non-ideality factor for STI sidewall junction"), |
|||
IOP( "njtsswg", BSIM4v5_MOD_NJTSSWG, IF_REAL, "Non-ideality factor for gate-edge sidewall junction"), |
|||
IOP( "xtss", BSIM4v5_MOD_XTSS, IF_REAL, "Power dependence of JTSS on temperature"), |
|||
IOP( "xtsd", BSIM4v5_MOD_XTSD, IF_REAL, "Power dependence of JTSD on temperature"), |
|||
IOP( "xtssws", BSIM4v5_MOD_XTSSWS, IF_REAL, "Power dependence of JTSSWS on temperature"), |
|||
IOP( "xtsswd", BSIM4v5_MOD_XTSSWD, IF_REAL, "Power dependence of JTSSWD on temperature"), |
|||
IOP( "xtsswgs", BSIM4v5_MOD_XTSSWGS, IF_REAL, "Power dependence of JTSSWGS on temperature"), |
|||
IOP( "xtsswgd", BSIM4v5_MOD_XTSSWGD, IF_REAL, "Power dependence of JTSSWGD on temperature"), |
|||
IOP( "tnjts", BSIM4v5_MOD_TNJTS, IF_REAL, "Temperature coefficient for NJTS"), |
|||
IOP( "tnjtssw", BSIM4v5_MOD_TNJTSSW, IF_REAL, "Temperature coefficient for NJTSSW"), |
|||
IOP( "tnjtsswg", BSIM4v5_MOD_TNJTSSWG, IF_REAL, "Temperature coefficient for NJTSSWG"), |
|||
IOP( "vtss", BSIM4v5_MOD_VTSS, IF_REAL, "Source bottom trap-assisted voltage dependent parameter"), |
|||
IOP( "vtsd", BSIM4v5_MOD_VTSD, IF_REAL, "Drain bottom trap-assisted voltage dependent parameter"), |
|||
IOP( "vtssws", BSIM4v5_MOD_VTSSWS, IF_REAL, "Source STI sidewall trap-assisted voltage dependent parameter"), |
|||
IOP( "vtsswd", BSIM4v5_MOD_VTSSWD, IF_REAL, "Drain STI sidewall trap-assisted voltage dependent parameter"), |
|||
IOP( "vtsswgs", BSIM4v5_MOD_VTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted voltage dependent parameter"), |
|||
IOP( "vtsswgd", BSIM4v5_MOD_VTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted voltage dependent parameter"), |
|||
|
|||
IOP( "gbmin", BSIM4v5_MOD_GBMIN, IF_REAL, "Minimum body conductance"), |
|||
IOP( "rbdb", BSIM4v5_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), |
|||
IOP( "rbpb", BSIM4v5_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), |
|||
IOP( "rbsb", BSIM4v5_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), |
|||
IOP( "rbps", BSIM4v5_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), |
|||
IOP( "rbpd", BSIM4v5_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), |
|||
|
|||
IOP( "rbps0", BSIM4v5_MOD_RBPS0, IF_REAL , "Body resistance RBPS scaling"), |
|||
IOP( "rbpsl", BSIM4v5_MOD_RBPSL, IF_REAL , "Body resistance RBPS L scaling"), |
|||
IOP( "rbpsw", BSIM4v5_MOD_RBPSW, IF_REAL , "Body resistance RBPS W scaling"), |
|||
IOP( "rbpsnf", BSIM4v5_MOD_RBPSNF, IF_REAL , "Body resistance RBPS NF scaling"), |
|||
|
|||
IOP( "rbpd0", BSIM4v5_MOD_RBPD0, IF_REAL , "Body resistance RBPD scaling"), |
|||
IOP( "rbpdl", BSIM4v5_MOD_RBPDL, IF_REAL , "Body resistance RBPD L scaling"), |
|||
IOP( "rbpdw", BSIM4v5_MOD_RBPDW, IF_REAL , "Body resistance RBPD W scaling"), |
|||
IOP( "rbpdnf", BSIM4v5_MOD_RBPDNF, IF_REAL , "Body resistance RBPD NF scaling"), |
|||
|
|||
IOP( "rbpbx0", BSIM4v5_MOD_RBPBX0, IF_REAL , "Body resistance RBPBX scaling"), |
|||
IOP( "rbpbxl", BSIM4v5_MOD_RBPBXL, IF_REAL , "Body resistance RBPBX L scaling"), |
|||
IOP( "rbpbxw", BSIM4v5_MOD_RBPBXW, IF_REAL , "Body resistance RBPBX W scaling"), |
|||
IOP( "rbpbxnf", BSIM4v5_MOD_RBPBXNF, IF_REAL , "Body resistance RBPBX NF scaling"), |
|||
IOP( "rbpby0", BSIM4v5_MOD_RBPBY0, IF_REAL , "Body resistance RBPBY scaling"), |
|||
IOP( "rbpbyl", BSIM4v5_MOD_RBPBYL, IF_REAL , "Body resistance RBPBY L scaling"), |
|||
IOP( "rbpbyw", BSIM4v5_MOD_RBPBYW, IF_REAL , "Body resistance RBPBY W scaling"), |
|||
IOP( "rbpbynf", BSIM4v5_MOD_RBPBYNF, IF_REAL , "Body resistance RBPBY NF scaling"), |
|||
|
|||
IOP( "rbsbx0", BSIM4v5_MOD_RBSBX0, IF_REAL , "Body resistance RBSBX scaling"), |
|||
IOP( "rbsby0", BSIM4v5_MOD_RBSBY0, IF_REAL , "Body resistance RBSBY scaling"), |
|||
IOP( "rbdbx0", BSIM4v5_MOD_RBDBX0, IF_REAL , "Body resistance RBDBX scaling"), |
|||
IOP( "rbdby0", BSIM4v5_MOD_RBDBY0, IF_REAL , "Body resistance RBDBY scaling"), |
|||
|
|||
IOP( "rbsdbxl", BSIM4v5_MOD_RBSDBXL, IF_REAL , "Body resistance RBSDBX L scaling"), |
|||
IOP( "rbsdbxw", BSIM4v5_MOD_RBSDBXW, IF_REAL , "Body resistance RBSDBX W scaling"), |
|||
IOP( "rbsdbxnf", BSIM4v5_MOD_RBSDBXNF, IF_REAL , "Body resistance RBSDBX NF scaling"), |
|||
IOP( "rbsdbyl", BSIM4v5_MOD_RBSDBYL, IF_REAL , "Body resistance RBSDBY L scaling"), |
|||
IOP( "rbsdbyw", BSIM4v5_MOD_RBSDBYW, IF_REAL , "Body resistance RBSDBY W scaling"), |
|||
IOP( "rbsdbynf", BSIM4v5_MOD_RBSDBYNF, IF_REAL , "Body resistance RBSDBY NF scaling"), |
|||
|
|||
IOP( "lcdsc", BSIM4v5_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), |
|||
IOP( "lcdscb", BSIM4v5_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), |
|||
IOP( "lcdscd", BSIM4v5_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), |
|||
IOP( "lcit", BSIM4v5_MOD_LCIT, IF_REAL, "Length dependence of cit"), |
|||
IOP( "lnfactor", BSIM4v5_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), |
|||
IOP( "lxj", BSIM4v5_MOD_LXJ, IF_REAL, "Length dependence of xj"), |
|||
IOP( "lvsat", BSIM4v5_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), |
|||
IOP( "lat", BSIM4v5_MOD_LAT, IF_REAL, "Length dependence of at"), |
|||
IOP( "la0", BSIM4v5_MOD_LA0, IF_REAL, "Length dependence of a0"), |
|||
IOP( "lags", BSIM4v5_MOD_LAGS, IF_REAL, "Length dependence of ags"), |
|||
IOP( "la1", BSIM4v5_MOD_LA1, IF_REAL, "Length dependence of a1"), |
|||
IOP( "la2", BSIM4v5_MOD_LA2, IF_REAL, "Length dependence of a2"), |
|||
IOP( "lketa", BSIM4v5_MOD_LKETA, IF_REAL, "Length dependence of keta"), |
|||
IOP( "lnsub", BSIM4v5_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), |
|||
IOP( "lndep", BSIM4v5_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), |
|||
IOP( "lnsd", BSIM4v5_MOD_LNSD, IF_REAL, "Length dependence of nsd"), |
|||
IOP( "lphin", BSIM4v5_MOD_LPHIN, IF_REAL, "Length dependence of phin"), |
|||
IOP( "lngate", BSIM4v5_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), |
|||
IOP( "lgamma1", BSIM4v5_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), |
|||
IOP( "lgamma2", BSIM4v5_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), |
|||
IOP( "lvbx", BSIM4v5_MOD_LVBX, IF_REAL, "Length dependence of vbx"), |
|||
IOP( "lvbm", BSIM4v5_MOD_LVBM, IF_REAL, "Length dependence of vbm"), |
|||
IOP( "lxt", BSIM4v5_MOD_LXT, IF_REAL, "Length dependence of xt"), |
|||
IOP( "lk1", BSIM4v5_MOD_LK1, IF_REAL, "Length dependence of k1"), |
|||
IOP( "lkt1", BSIM4v5_MOD_LKT1, IF_REAL, "Length dependence of kt1"), |
|||
IOP( "lkt1l", BSIM4v5_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), |
|||
IOP( "lkt2", BSIM4v5_MOD_LKT2, IF_REAL, "Length dependence of kt2"), |
|||
IOP( "lk2", BSIM4v5_MOD_LK2, IF_REAL, "Length dependence of k2"), |
|||
IOP( "lk3", BSIM4v5_MOD_LK3, IF_REAL, "Length dependence of k3"), |
|||
IOP( "lk3b", BSIM4v5_MOD_LK3B, IF_REAL, "Length dependence of k3b"), |
|||
IOP( "lw0", BSIM4v5_MOD_LW0, IF_REAL, "Length dependence of w0"), |
|||
IOP( "ldvtp0", BSIM4v5_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), |
|||
IOP( "ldvtp1", BSIM4v5_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), |
|||
IOP( "llpe0", BSIM4v5_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), |
|||
IOP( "llpeb", BSIM4v5_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), |
|||
IOP( "ldvt0", BSIM4v5_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), |
|||
IOP( "ldvt1", BSIM4v5_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), |
|||
IOP( "ldvt2", BSIM4v5_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), |
|||
IOP( "ldvt0w", BSIM4v5_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), |
|||
IOP( "ldvt1w", BSIM4v5_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), |
|||
IOP( "ldvt2w", BSIM4v5_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), |
|||
IOP( "ldrout", BSIM4v5_MOD_LDROUT, IF_REAL, "Length dependence of drout"), |
|||
IOP( "ldsub", BSIM4v5_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), |
|||
IOP( "lvth0", BSIM4v5_MOD_LVTH0, IF_REAL,"Length dependence of vto"), |
|||
IOP( "lvtho", BSIM4v5_MOD_LVTH0, IF_REAL,"Length dependence of vto"), |
|||
IOP( "lua", BSIM4v5_MOD_LUA, IF_REAL, "Length dependence of ua"), |
|||
IOP( "lua1", BSIM4v5_MOD_LUA1, IF_REAL, "Length dependence of ua1"), |
|||
IOP( "lub", BSIM4v5_MOD_LUB, IF_REAL, "Length dependence of ub"), |
|||
IOP( "lub1", BSIM4v5_MOD_LUB1, IF_REAL, "Length dependence of ub1"), |
|||
IOP( "luc", BSIM4v5_MOD_LUC, IF_REAL, "Length dependence of uc"), |
|||
IOP( "luc1", BSIM4v5_MOD_LUC1, IF_REAL, "Length dependence of uc1"), |
|||
IOP( "lud", BSIM4v5_MOD_LUD, IF_REAL, "Length dependence of ud"), |
|||
IOP( "lud1", BSIM4v5_MOD_LUD1, IF_REAL, "Length dependence of ud1"), |
|||
IOP( "lup", BSIM4v5_MOD_LUP, IF_REAL, "Length dependence of up"), |
|||
IOP( "llp", BSIM4v5_MOD_LLP, IF_REAL, "Length dependence of lp"), |
|||
IOP( "lu0", BSIM4v5_MOD_LU0, IF_REAL, "Length dependence of u0"), |
|||
IOP( "lute", BSIM4v5_MOD_LUTE, IF_REAL, "Length dependence of ute"), |
|||
IOP( "lvoff", BSIM4v5_MOD_LVOFF, IF_REAL, "Length dependence of voff"), |
|||
IOP( "lminv", BSIM4v5_MOD_LMINV, IF_REAL, "Length dependence of minv"), |
|||
IOP( "ldelta", BSIM4v5_MOD_LDELTA, IF_REAL, "Length dependence of delta"), |
|||
IOP( "lrdsw", BSIM4v5_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), |
|||
IOP( "lrsw", BSIM4v5_MOD_LRSW, IF_REAL, "Length dependence of rsw"), |
|||
IOP( "lrdw", BSIM4v5_MOD_LRDW, IF_REAL, "Length dependence of rdw"), |
|||
|
|||
IOP( "lprwg", BSIM4v5_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), |
|||
IOP( "lprwb", BSIM4v5_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), |
|||
|
|||
IOP( "lprt", BSIM4v5_MOD_LPRT, IF_REAL, "Length dependence of prt "), |
|||
IOP( "leta0", BSIM4v5_MOD_LETA0, IF_REAL, "Length dependence of eta0"), |
|||
IOP( "letab", BSIM4v5_MOD_LETAB, IF_REAL, "Length dependence of etab"), |
|||
IOP( "lpclm", BSIM4v5_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), |
|||
IOP( "lpdiblc1", BSIM4v5_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), |
|||
IOP( "lpdiblc2", BSIM4v5_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), |
|||
IOP( "lpdiblcb", BSIM4v5_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), |
|||
IOP( "lfprout", BSIM4v5_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), |
|||
IOP( "lpdits", BSIM4v5_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), |
|||
IOP( "lpditsd", BSIM4v5_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), |
|||
IOP( "lpscbe1", BSIM4v5_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), |
|||
IOP( "lpscbe2", BSIM4v5_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), |
|||
IOP( "lpvag", BSIM4v5_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), |
|||
IOP( "lwr", BSIM4v5_MOD_LWR, IF_REAL, "Length dependence of wr"), |
|||
IOP( "ldwg", BSIM4v5_MOD_LDWG, IF_REAL, "Length dependence of dwg"), |
|||
IOP( "ldwb", BSIM4v5_MOD_LDWB, IF_REAL, "Length dependence of dwb"), |
|||
IOP( "lb0", BSIM4v5_MOD_LB0, IF_REAL, "Length dependence of b0"), |
|||
IOP( "lb1", BSIM4v5_MOD_LB1, IF_REAL, "Length dependence of b1"), |
|||
IOP( "lcgsl", BSIM4v5_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), |
|||
IOP( "lcgdl", BSIM4v5_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), |
|||
IOP( "lckappas", BSIM4v5_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), |
|||
IOP( "lckappad", BSIM4v5_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), |
|||
IOP( "lcf", BSIM4v5_MOD_LCF, IF_REAL, "Length dependence of cf"), |
|||
IOP( "lclc", BSIM4v5_MOD_LCLC, IF_REAL, "Length dependence of clc"), |
|||
IOP( "lcle", BSIM4v5_MOD_LCLE, IF_REAL, "Length dependence of cle"), |
|||
IOP( "lalpha0", BSIM4v5_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), |
|||
IOP( "lalpha1", BSIM4v5_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), |
|||
IOP( "lbeta0", BSIM4v5_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), |
|||
|
|||
IOP( "lagidl", BSIM4v5_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), |
|||
IOP( "lbgidl", BSIM4v5_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), |
|||
IOP( "lcgidl", BSIM4v5_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), |
|||
IOP( "legidl", BSIM4v5_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), |
|||
IOP( "laigc", BSIM4v5_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), |
|||
IOP( "lbigc", BSIM4v5_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), |
|||
IOP( "lcigc", BSIM4v5_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), |
|||
IOP( "laigsd", BSIM4v5_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), |
|||
IOP( "lbigsd", BSIM4v5_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), |
|||
IOP( "lcigsd", BSIM4v5_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), |
|||
IOP( "laigbacc", BSIM4v5_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), |
|||
IOP( "lbigbacc", BSIM4v5_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), |
|||
IOP( "lcigbacc", BSIM4v5_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), |
|||
IOP( "laigbinv", BSIM4v5_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), |
|||
IOP( "lbigbinv", BSIM4v5_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), |
|||
IOP( "lcigbinv", BSIM4v5_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), |
|||
IOP( "lnigc", BSIM4v5_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), |
|||
IOP( "lnigbinv", BSIM4v5_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), |
|||
IOP( "lnigbacc", BSIM4v5_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), |
|||
IOP( "lntox", BSIM4v5_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), |
|||
IOP( "leigbinv", BSIM4v5_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), |
|||
IOP( "lpigcd", BSIM4v5_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), |
|||
IOP( "lpoxedge", BSIM4v5_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), |
|||
|
|||
IOP( "lvfbcv", BSIM4v5_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), |
|||
IOP( "lvfb", BSIM4v5_MOD_LVFB, IF_REAL, "Length dependence of vfb"), |
|||
IOP( "lacde", BSIM4v5_MOD_LACDE, IF_REAL, "Length dependence of acde"), |
|||
IOP( "lmoin", BSIM4v5_MOD_LMOIN, IF_REAL, "Length dependence of moin"), |
|||
IOP( "lnoff", BSIM4v5_MOD_LNOFF, IF_REAL, "Length dependence of noff"), |
|||
IOP( "lvoffcv", BSIM4v5_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), |
|||
IOP( "lxrcrg1", BSIM4v5_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), |
|||
IOP( "lxrcrg2", BSIM4v5_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), |
|||
IOP( "llambda", BSIM4v5_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"), |
|||
IOP( "lvtl", BSIM4v5_MOD_LVTL, IF_REAL, " Length dependence of vtl"), |
|||
IOP( "lxn", BSIM4v5_MOD_LXN, IF_REAL, " Length dependence of xn"), |
|||
IOP( "leu", BSIM4v5_MOD_LEU, IF_REAL, " Length dependence of eu"), |
|||
IOP( "lvfbsdoff", BSIM4v5_MOD_LVFBSDOFF, IF_REAL, "Length dependence of vfbsdoff"), |
|||
IOP( "ltvfbsdoff", BSIM4v5_MOD_LTVFBSDOFF, IF_REAL, "Length dependence of tvfbsdoff"), |
|||
IOP( "ltvoff", BSIM4v5_MOD_LTVOFF, IF_REAL, "Length dependence of tvoff"), |
|||
|
|||
IOP( "wcdsc", BSIM4v5_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), |
|||
IOP( "wcdscb", BSIM4v5_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), |
|||
IOP( "wcdscd", BSIM4v5_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), |
|||
IOP( "wcit", BSIM4v5_MOD_WCIT, IF_REAL, "Width dependence of cit"), |
|||
IOP( "wnfactor", BSIM4v5_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), |
|||
IOP( "wxj", BSIM4v5_MOD_WXJ, IF_REAL, "Width dependence of xj"), |
|||
IOP( "wvsat", BSIM4v5_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), |
|||
IOP( "wat", BSIM4v5_MOD_WAT, IF_REAL, "Width dependence of at"), |
|||
IOP( "wa0", BSIM4v5_MOD_WA0, IF_REAL, "Width dependence of a0"), |
|||
IOP( "wags", BSIM4v5_MOD_WAGS, IF_REAL, "Width dependence of ags"), |
|||
IOP( "wa1", BSIM4v5_MOD_WA1, IF_REAL, "Width dependence of a1"), |
|||
IOP( "wa2", BSIM4v5_MOD_WA2, IF_REAL, "Width dependence of a2"), |
|||
IOP( "wketa", BSIM4v5_MOD_WKETA, IF_REAL, "Width dependence of keta"), |
|||
IOP( "wnsub", BSIM4v5_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), |
|||
IOP( "wndep", BSIM4v5_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), |
|||
IOP( "wnsd", BSIM4v5_MOD_WNSD, IF_REAL, "Width dependence of nsd"), |
|||
IOP( "wphin", BSIM4v5_MOD_WPHIN, IF_REAL, "Width dependence of phin"), |
|||
IOP( "wngate", BSIM4v5_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), |
|||
IOP( "wgamma1", BSIM4v5_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), |
|||
IOP( "wgamma2", BSIM4v5_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), |
|||
IOP( "wvbx", BSIM4v5_MOD_WVBX, IF_REAL, "Width dependence of vbx"), |
|||
IOP( "wvbm", BSIM4v5_MOD_WVBM, IF_REAL, "Width dependence of vbm"), |
|||
IOP( "wxt", BSIM4v5_MOD_WXT, IF_REAL, "Width dependence of xt"), |
|||
IOP( "wk1", BSIM4v5_MOD_WK1, IF_REAL, "Width dependence of k1"), |
|||
IOP( "wkt1", BSIM4v5_MOD_WKT1, IF_REAL, "Width dependence of kt1"), |
|||
IOP( "wkt1l", BSIM4v5_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), |
|||
IOP( "wkt2", BSIM4v5_MOD_WKT2, IF_REAL, "Width dependence of kt2"), |
|||
IOP( "wk2", BSIM4v5_MOD_WK2, IF_REAL, "Width dependence of k2"), |
|||
IOP( "wk3", BSIM4v5_MOD_WK3, IF_REAL, "Width dependence of k3"), |
|||
IOP( "wk3b", BSIM4v5_MOD_WK3B, IF_REAL, "Width dependence of k3b"), |
|||
IOP( "ww0", BSIM4v5_MOD_WW0, IF_REAL, "Width dependence of w0"), |
|||
IOP( "wdvtp0", BSIM4v5_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), |
|||
IOP( "wdvtp1", BSIM4v5_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), |
|||
IOP( "wlpe0", BSIM4v5_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), |
|||
IOP( "wlpeb", BSIM4v5_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), |
|||
IOP( "wdvt0", BSIM4v5_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), |
|||
IOP( "wdvt1", BSIM4v5_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), |
|||
IOP( "wdvt2", BSIM4v5_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), |
|||
IOP( "wdvt0w", BSIM4v5_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), |
|||
IOP( "wdvt1w", BSIM4v5_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), |
|||
IOP( "wdvt2w", BSIM4v5_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), |
|||
IOP( "wdrout", BSIM4v5_MOD_WDROUT, IF_REAL, "Width dependence of drout"), |
|||
IOP( "wdsub", BSIM4v5_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), |
|||
IOP( "wvth0", BSIM4v5_MOD_WVTH0, IF_REAL,"Width dependence of vto"), |
|||
IOP( "wvtho", BSIM4v5_MOD_WVTH0, IF_REAL,"Width dependence of vto"), |
|||
IOP( "wua", BSIM4v5_MOD_WUA, IF_REAL, "Width dependence of ua"), |
|||
IOP( "wua1", BSIM4v5_MOD_WUA1, IF_REAL, "Width dependence of ua1"), |
|||
IOP( "wub", BSIM4v5_MOD_WUB, IF_REAL, "Width dependence of ub"), |
|||
IOP( "wub1", BSIM4v5_MOD_WUB1, IF_REAL, "Width dependence of ub1"), |
|||
IOP( "wuc", BSIM4v5_MOD_WUC, IF_REAL, "Width dependence of uc"), |
|||
IOP( "wuc1", BSIM4v5_MOD_WUC1, IF_REAL, "Width dependence of uc1"), |
|||
IOP( "wud", BSIM4v5_MOD_WUD, IF_REAL, "Width dependence of ud"), |
|||
IOP( "wud1", BSIM4v5_MOD_WUD1, IF_REAL, "Width dependence of ud1"), |
|||
IOP( "wup", BSIM4v5_MOD_WUP, IF_REAL, "Width dependence of up"), |
|||
IOP( "wlp", BSIM4v5_MOD_WLP, IF_REAL, "Width dependence of lp"), |
|||
IOP( "wu0", BSIM4v5_MOD_WU0, IF_REAL, "Width dependence of u0"), |
|||
IOP( "wute", BSIM4v5_MOD_WUTE, IF_REAL, "Width dependence of ute"), |
|||
IOP( "wvoff", BSIM4v5_MOD_WVOFF, IF_REAL, "Width dependence of voff"), |
|||
IOP( "wminv", BSIM4v5_MOD_WMINV, IF_REAL, "Width dependence of minv"), |
|||
IOP( "wdelta", BSIM4v5_MOD_WDELTA, IF_REAL, "Width dependence of delta"), |
|||
IOP( "wrdsw", BSIM4v5_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), |
|||
IOP( "wrsw", BSIM4v5_MOD_WRSW, IF_REAL, "Width dependence of rsw"), |
|||
IOP( "wrdw", BSIM4v5_MOD_WRDW, IF_REAL, "Width dependence of rdw"), |
|||
|
|||
IOP( "wprwg", BSIM4v5_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), |
|||
IOP( "wprwb", BSIM4v5_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), |
|||
|
|||
IOP( "wprt", BSIM4v5_MOD_WPRT, IF_REAL, "Width dependence of prt"), |
|||
IOP( "weta0", BSIM4v5_MOD_WETA0, IF_REAL, "Width dependence of eta0"), |
|||
IOP( "wetab", BSIM4v5_MOD_WETAB, IF_REAL, "Width dependence of etab"), |
|||
IOP( "wpclm", BSIM4v5_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), |
|||
IOP( "wpdiblc1", BSIM4v5_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), |
|||
IOP( "wpdiblc2", BSIM4v5_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), |
|||
IOP( "wpdiblcb", BSIM4v5_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), |
|||
IOP( "wfprout", BSIM4v5_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), |
|||
IOP( "wpdits", BSIM4v5_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), |
|||
IOP( "wpditsd", BSIM4v5_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), |
|||
IOP( "wpscbe1", BSIM4v5_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), |
|||
IOP( "wpscbe2", BSIM4v5_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), |
|||
IOP( "wpvag", BSIM4v5_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), |
|||
IOP( "wwr", BSIM4v5_MOD_WWR, IF_REAL, "Width dependence of wr"), |
|||
IOP( "wdwg", BSIM4v5_MOD_WDWG, IF_REAL, "Width dependence of dwg"), |
|||
IOP( "wdwb", BSIM4v5_MOD_WDWB, IF_REAL, "Width dependence of dwb"), |
|||
IOP( "wb0", BSIM4v5_MOD_WB0, IF_REAL, "Width dependence of b0"), |
|||
IOP( "wb1", BSIM4v5_MOD_WB1, IF_REAL, "Width dependence of b1"), |
|||
IOP( "wcgsl", BSIM4v5_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), |
|||
IOP( "wcgdl", BSIM4v5_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), |
|||
IOP( "wckappas", BSIM4v5_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), |
|||
IOP( "wckappad", BSIM4v5_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), |
|||
IOP( "wcf", BSIM4v5_MOD_WCF, IF_REAL, "Width dependence of cf"), |
|||
IOP( "wclc", BSIM4v5_MOD_WCLC, IF_REAL, "Width dependence of clc"), |
|||
IOP( "wcle", BSIM4v5_MOD_WCLE, IF_REAL, "Width dependence of cle"), |
|||
IOP( "walpha0", BSIM4v5_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), |
|||
IOP( "walpha1", BSIM4v5_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), |
|||
IOP( "wbeta0", BSIM4v5_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), |
|||
|
|||
IOP( "wagidl", BSIM4v5_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), |
|||
IOP( "wbgidl", BSIM4v5_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), |
|||
IOP( "wcgidl", BSIM4v5_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), |
|||
IOP( "wegidl", BSIM4v5_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), |
|||
IOP( "waigc", BSIM4v5_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), |
|||
IOP( "wbigc", BSIM4v5_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), |
|||
IOP( "wcigc", BSIM4v5_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), |
|||
IOP( "waigsd", BSIM4v5_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), |
|||
IOP( "wbigsd", BSIM4v5_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), |
|||
IOP( "wcigsd", BSIM4v5_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), |
|||
IOP( "waigbacc", BSIM4v5_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), |
|||
IOP( "wbigbacc", BSIM4v5_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), |
|||
IOP( "wcigbacc", BSIM4v5_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), |
|||
IOP( "waigbinv", BSIM4v5_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), |
|||
IOP( "wbigbinv", BSIM4v5_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), |
|||
IOP( "wcigbinv", BSIM4v5_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), |
|||
IOP( "wnigc", BSIM4v5_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), |
|||
IOP( "wnigbinv", BSIM4v5_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), |
|||
IOP( "wnigbacc", BSIM4v5_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), |
|||
IOP( "wntox", BSIM4v5_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), |
|||
IOP( "weigbinv", BSIM4v5_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), |
|||
IOP( "wpigcd", BSIM4v5_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), |
|||
IOP( "wpoxedge", BSIM4v5_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), |
|||
IOP( "wvfbcv", BSIM4v5_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), |
|||
IOP( "wvfb", BSIM4v5_MOD_WVFB, IF_REAL, "Width dependence of vfb"), |
|||
IOP( "wacde", BSIM4v5_MOD_WACDE, IF_REAL, "Width dependence of acde"), |
|||
IOP( "wmoin", BSIM4v5_MOD_WMOIN, IF_REAL, "Width dependence of moin"), |
|||
IOP( "wnoff", BSIM4v5_MOD_WNOFF, IF_REAL, "Width dependence of noff"), |
|||
IOP( "wvoffcv", BSIM4v5_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), |
|||
IOP( "wxrcrg1", BSIM4v5_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), |
|||
IOP( "wxrcrg2", BSIM4v5_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), |
|||
IOP( "wlambda", BSIM4v5_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"), |
|||
IOP( "wvtl", BSIM4v5_MOD_WVTL, IF_REAL, "Width dependence of vtl"), |
|||
IOP( "wxn", BSIM4v5_MOD_WXN, IF_REAL, "Width dependence of xn"), |
|||
IOP( "weu", BSIM4v5_MOD_WEU, IF_REAL, "Width dependence of eu"), |
|||
IOP( "wvfbsdoff", BSIM4v5_MOD_WVFBSDOFF, IF_REAL, "Width dependence of vfbsdoff"), |
|||
IOP( "wtvfbsdoff", BSIM4v5_MOD_WTVFBSDOFF, IF_REAL, "Width dependence of tvfbsdoff"), |
|||
IOP( "wtvoff", BSIM4v5_MOD_WTVOFF, IF_REAL, "Width dependence of tvoff"), |
|||
|
|||
IOP( "pcdsc", BSIM4v5_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), |
|||
IOP( "pcdscb", BSIM4v5_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), |
|||
IOP( "pcdscd", BSIM4v5_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), |
|||
IOP( "pcit", BSIM4v5_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), |
|||
IOP( "pnfactor", BSIM4v5_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), |
|||
IOP( "pxj", BSIM4v5_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), |
|||
IOP( "pvsat", BSIM4v5_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), |
|||
IOP( "pat", BSIM4v5_MOD_PAT, IF_REAL, "Cross-term dependence of at"), |
|||
IOP( "pa0", BSIM4v5_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), |
|||
IOP( "pags", BSIM4v5_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), |
|||
IOP( "pa1", BSIM4v5_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), |
|||
IOP( "pa2", BSIM4v5_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), |
|||
IOP( "pketa", BSIM4v5_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), |
|||
IOP( "pnsub", BSIM4v5_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), |
|||
IOP( "pndep", BSIM4v5_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), |
|||
IOP( "pnsd", BSIM4v5_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), |
|||
IOP( "pphin", BSIM4v5_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), |
|||
IOP( "pngate", BSIM4v5_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), |
|||
IOP( "pgamma1", BSIM4v5_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), |
|||
IOP( "pgamma2", BSIM4v5_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), |
|||
IOP( "pvbx", BSIM4v5_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), |
|||
IOP( "pvbm", BSIM4v5_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), |
|||
IOP( "pxt", BSIM4v5_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), |
|||
IOP( "pk1", BSIM4v5_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), |
|||
IOP( "pkt1", BSIM4v5_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), |
|||
IOP( "pkt1l", BSIM4v5_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), |
|||
IOP( "pkt2", BSIM4v5_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), |
|||
IOP( "pk2", BSIM4v5_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), |
|||
IOP( "pk3", BSIM4v5_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), |
|||
IOP( "pk3b", BSIM4v5_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), |
|||
IOP( "pw0", BSIM4v5_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), |
|||
IOP( "pdvtp0", BSIM4v5_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), |
|||
IOP( "pdvtp1", BSIM4v5_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), |
|||
IOP( "plpe0", BSIM4v5_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), |
|||
IOP( "plpeb", BSIM4v5_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), |
|||
IOP( "pdvt0", BSIM4v5_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), |
|||
IOP( "pdvt1", BSIM4v5_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), |
|||
IOP( "pdvt2", BSIM4v5_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), |
|||
IOP( "pdvt0w", BSIM4v5_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), |
|||
IOP( "pdvt1w", BSIM4v5_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), |
|||
IOP( "pdvt2w", BSIM4v5_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), |
|||
IOP( "pdrout", BSIM4v5_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), |
|||
IOP( "pdsub", BSIM4v5_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), |
|||
IOP( "pvth0", BSIM4v5_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), |
|||
IOP( "pvtho", BSIM4v5_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), |
|||
IOP( "pua", BSIM4v5_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), |
|||
IOP( "pua1", BSIM4v5_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), |
|||
IOP( "pub", BSIM4v5_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), |
|||
IOP( "pub1", BSIM4v5_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), |
|||
IOP( "puc", BSIM4v5_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), |
|||
IOP( "puc1", BSIM4v5_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), |
|||
IOP( "pud", BSIM4v5_MOD_PUD, IF_REAL, "Cross-term dependence of ud"), |
|||
IOP( "pud1", BSIM4v5_MOD_PUD1, IF_REAL, "Cross-term dependence of ud1"), |
|||
IOP( "pup", BSIM4v5_MOD_PUP, IF_REAL, "Cross-term dependence of up"), |
|||
IOP( "plp", BSIM4v5_MOD_PLP, IF_REAL, "Cross-term dependence of lp"), |
|||
IOP( "pu0", BSIM4v5_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), |
|||
IOP( "pute", BSIM4v5_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), |
|||
IOP( "pvoff", BSIM4v5_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), |
|||
IOP( "pminv", BSIM4v5_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), |
|||
IOP( "pdelta", BSIM4v5_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), |
|||
IOP( "prdsw", BSIM4v5_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), |
|||
IOP( "prsw", BSIM4v5_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), |
|||
IOP( "prdw", BSIM4v5_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), |
|||
|
|||
IOP( "pprwg", BSIM4v5_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), |
|||
IOP( "pprwb", BSIM4v5_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), |
|||
|
|||
IOP( "pprt", BSIM4v5_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), |
|||
IOP( "peta0", BSIM4v5_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), |
|||
IOP( "petab", BSIM4v5_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), |
|||
IOP( "ppclm", BSIM4v5_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), |
|||
IOP( "ppdiblc1", BSIM4v5_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), |
|||
IOP( "ppdiblc2", BSIM4v5_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), |
|||
IOP( "ppdiblcb", BSIM4v5_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), |
|||
IOP( "pfprout", BSIM4v5_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), |
|||
IOP( "ppdits", BSIM4v5_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), |
|||
IOP( "ppditsd", BSIM4v5_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), |
|||
IOP( "ppscbe1", BSIM4v5_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), |
|||
IOP( "ppscbe2", BSIM4v5_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), |
|||
IOP( "ppvag", BSIM4v5_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), |
|||
IOP( "pwr", BSIM4v5_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), |
|||
IOP( "pdwg", BSIM4v5_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), |
|||
IOP( "pdwb", BSIM4v5_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), |
|||
IOP( "pb0", BSIM4v5_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), |
|||
IOP( "pb1", BSIM4v5_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), |
|||
IOP( "pcgsl", BSIM4v5_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), |
|||
IOP( "pcgdl", BSIM4v5_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), |
|||
IOP( "pckappas", BSIM4v5_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), |
|||
IOP( "pckappad", BSIM4v5_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), |
|||
IOP( "pcf", BSIM4v5_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), |
|||
IOP( "pclc", BSIM4v5_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), |
|||
IOP( "pcle", BSIM4v5_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), |
|||
IOP( "palpha0", BSIM4v5_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), |
|||
IOP( "palpha1", BSIM4v5_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), |
|||
IOP( "pbeta0", BSIM4v5_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), |
|||
|
|||
IOP( "pagidl", BSIM4v5_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), |
|||
IOP( "pbgidl", BSIM4v5_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), |
|||
IOP( "pcgidl", BSIM4v5_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), |
|||
IOP( "pegidl", BSIM4v5_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), |
|||
IOP( "paigc", BSIM4v5_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), |
|||
IOP( "pbigc", BSIM4v5_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), |
|||
IOP( "pcigc", BSIM4v5_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), |
|||
IOP( "paigsd", BSIM4v5_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), |
|||
IOP( "pbigsd", BSIM4v5_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), |
|||
IOP( "pcigsd", BSIM4v5_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), |
|||
IOP( "paigbacc", BSIM4v5_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), |
|||
IOP( "pbigbacc", BSIM4v5_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), |
|||
IOP( "pcigbacc", BSIM4v5_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), |
|||
IOP( "paigbinv", BSIM4v5_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), |
|||
IOP( "pbigbinv", BSIM4v5_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), |
|||
IOP( "pcigbinv", BSIM4v5_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), |
|||
IOP( "pnigc", BSIM4v5_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), |
|||
IOP( "pnigbinv", BSIM4v5_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), |
|||
IOP( "pnigbacc", BSIM4v5_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), |
|||
IOP( "pntox", BSIM4v5_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), |
|||
IOP( "peigbinv", BSIM4v5_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), |
|||
IOP( "ppigcd", BSIM4v5_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), |
|||
IOP( "ppoxedge", BSIM4v5_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), |
|||
IOP( "pvfbcv", BSIM4v5_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), |
|||
IOP( "pvfb", BSIM4v5_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), |
|||
IOP( "pacde", BSIM4v5_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), |
|||
IOP( "pmoin", BSIM4v5_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), |
|||
IOP( "pnoff", BSIM4v5_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), |
|||
IOP( "pvoffcv", BSIM4v5_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), |
|||
IOP( "pxrcrg1", BSIM4v5_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), |
|||
IOP( "pxrcrg2", BSIM4v5_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), |
|||
IOP( "plambda", BSIM4v5_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"), |
|||
IOP( "pvtl", BSIM4v5_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"), |
|||
IOP( "pxn", BSIM4v5_MOD_PXN, IF_REAL, "Cross-term dependence of xn"), |
|||
IOP( "peu", BSIM4v5_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), |
|||
IOP( "pvfbsdoff", BSIM4v5_MOD_PVFBSDOFF, IF_REAL, "Cross-term dependence of vfbsdoff"), |
|||
IOP( "ptvfbsdoff", BSIM4v5_MOD_PTVFBSDOFF, IF_REAL, "Cross-term dependence of tvfbsdoff"), |
|||
IOP( "ptvoff", BSIM4v5_MOD_PTVOFF, IF_REAL, "Cross-term dependence of tvoff"), |
|||
|
|||
/* stress effect*/ |
|||
IOP( "saref", BSIM4v5_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), |
|||
IOP( "sbref", BSIM4v5_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), |
|||
IOP( "wlod", BSIM4v5_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), |
|||
IOP( "ku0", BSIM4v5_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), |
|||
IOP( "kvsat", BSIM4v5_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), |
|||
IOP( "kvth0", BSIM4v5_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), |
|||
IOP( "tku0", BSIM4v5_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), |
|||
IOP( "llodku0", BSIM4v5_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), |
|||
IOP( "wlodku0", BSIM4v5_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), |
|||
IOP( "llodvth", BSIM4v5_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), |
|||
IOP( "wlodvth", BSIM4v5_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), |
|||
IOP( "lku0", BSIM4v5_MOD_LKU0, IF_REAL, "Length dependence of ku0"), |
|||
IOP( "wku0", BSIM4v5_MOD_WKU0, IF_REAL, "Width dependence of ku0"), |
|||
IOP( "pku0", BSIM4v5_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), |
|||
IOP( "lkvth0", BSIM4v5_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), |
|||
IOP( "wkvth0", BSIM4v5_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), |
|||
IOP( "pkvth0", BSIM4v5_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), |
|||
IOP( "stk2", BSIM4v5_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), |
|||
IOP( "lodk2", BSIM4v5_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), |
|||
IOP( "steta0", BSIM4v5_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), |
|||
IOP( "lodeta0", BSIM4v5_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), |
|||
/* Well Proximity Effect */ |
|||
IOP( "web", BSIM4v5_MOD_WEB, IF_REAL, "Coefficient for SCB"), |
|||
IOP( "wec", BSIM4v5_MOD_WEC, IF_REAL, "Coefficient for SCC"), |
|||
IOP( "kvth0we", BSIM4v5_MOD_KVTH0WE, IF_REAL, "Threshold shift factor for well proximity effect"), |
|||
IOP( "k2we", BSIM4v5_MOD_K2WE, IF_REAL, " K2 shift factor for well proximity effect "), |
|||
IOP( "ku0we", BSIM4v5_MOD_KU0WE, IF_REAL, " Mobility degradation factor for well proximity effect "), |
|||
IOP( "scref", BSIM4v5_MOD_SCREF, IF_REAL, " Reference distance to calculate SCA, SCB and SCC"), |
|||
IOP( "wpemod", BSIM4v5_MOD_WPEMOD, IF_REAL, " Flag for WPE model (WPEMOD=1 to activate this model) "), |
|||
IOP( "lkvth0we", BSIM4v5_MOD_LKVTH0WE, IF_REAL, "Length dependence of kvth0we"), |
|||
IOP( "lk2we", BSIM4v5_MOD_LK2WE, IF_REAL, " Length dependence of k2we "), |
|||
IOP( "lku0we", BSIM4v5_MOD_LKU0WE, IF_REAL, " Length dependence of ku0we "), |
|||
IOP( "wkvth0we", BSIM4v5_MOD_WKVTH0WE, IF_REAL, "Width dependence of kvth0we"), |
|||
IOP( "wk2we", BSIM4v5_MOD_WK2WE, IF_REAL, " Width dependence of k2we "), |
|||
IOP( "wku0we", BSIM4v5_MOD_WKU0WE, IF_REAL, " Width dependence of ku0we "), |
|||
IOP( "pkvth0we", BSIM4v5_MOD_PKVTH0WE, IF_REAL, "Cross-term dependence of kvth0we"), |
|||
IOP( "pk2we", BSIM4v5_MOD_PK2WE, IF_REAL, " Cross-term dependence of k2we "), |
|||
IOP( "pku0we", BSIM4v5_MOD_PKU0WE, IF_REAL, " Cross-term dependence of ku0we "), |
|||
|
|||
IOP( "noia", BSIM4v5_MOD_NOIA, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "noib", BSIM4v5_MOD_NOIB, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "noic", BSIM4v5_MOD_NOIC, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "tnoia", BSIM4v5_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "tnoib", BSIM4v5_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "rnoia", BSIM4v5_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), |
|||
IOP( "rnoib", BSIM4v5_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), |
|||
IOP( "ntnoi", BSIM4v5_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), |
|||
IOP( "em", BSIM4v5_MOD_EM, IF_REAL, "Flicker noise parameter"), |
|||
IOP( "ef", BSIM4v5_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), |
|||
IOP( "af", BSIM4v5_MOD_AF, IF_REAL, "Flicker noise exponent"), |
|||
IOP( "kf", BSIM4v5_MOD_KF, IF_REAL, "Flicker noise coefficient"), |
|||
|
|||
IOP( "stimod", BSIM4v5_MOD_STIMOD, IF_REAL, "Stress effect model selector"), |
|||
IOP( "sa0", BSIM4v5_MOD_SA0, IF_REAL, "Distance between OD edge to poly of one side"), |
|||
IOP( "sb0", BSIM4v5_MOD_SB0, IF_REAL, "Distance between OD edge to poly of other side"), |
|||
|
|||
IP( "nmos", BSIM4v5_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), |
|||
IP( "pmos", BSIM4v5_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), |
|||
}; |
|||
|
|||
char *BSIM4v5names[] = { |
|||
"Drain", |
|||
"Gate", |
|||
"Source", |
|||
"Bulk", |
|||
"Charge" |
|||
}; |
|||
|
|||
int BSIM4v5nSize = NUMELEMS(BSIM4v5names); |
|||
int BSIM4v5pTSize = NUMELEMS(BSIM4v5pTable); |
|||
int BSIM4v5mPTSize = NUMELEMS(BSIM4v5mPTable); |
|||
int BSIM4v5iSize = sizeof(BSIM4v5instance); |
|||
int BSIM4v5mSize = sizeof(BSIM4v5model); |
|||
@ -0,0 +1,672 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4acld.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "cktdefs.h" |
|||
#include "bsim4v5def.h" |
|||
#include "sperror.h" |
|||
#include "suffix.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v5acLoad(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v5model *model = (BSIM4v5model*)inModel; |
|||
BSIM4v5instance *here; |
|||
|
|||
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; |
|||
double xcbgb, xcbdb, xcbsb, xcbbb; |
|||
double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi; |
|||
double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi; |
|||
double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr; |
|||
double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi; |
|||
double xcdbdb, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb, xcsgmb; |
|||
double xcgmbb=0.0, xcbgmb; |
|||
double capbd, capbs, omega; |
|||
double gstot, gstotd, gstotg, gstots, gstotb, gspr; |
|||
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; |
|||
double gIstotg, gIstotd, gIstots, gIstotb; |
|||
double gIdtotg, gIdtotd, gIdtots, gIdtotb; |
|||
double gIbtotg, gIbtotd, gIbtots, gIbtotb; |
|||
double gIgtotg, gIgtotd, gIgtots, gIgtotb; |
|||
double cgso, cgdo, cgbo; |
|||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb; |
|||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; |
|||
double T0=0.0, T1, T2, T3; |
|||
double Csg, Csd, Css; |
|||
double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr; |
|||
double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi; |
|||
double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi; |
|||
double FwdSumr, RevSumr, Gmr, Gmbsr; |
|||
double FwdSumi, RevSumi, Gmi, Gmbsi; |
|||
struct bsim4v5SizeDependParam *pParam; |
|||
double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; |
|||
|
|||
double m; |
|||
|
|||
omega = ckt->CKTomega; |
|||
for (; model != NULL; model = model->BSIM4v5nextModel) |
|||
{ for (here = model->BSIM4v5instances; here!= NULL; |
|||
here = here->BSIM4v5nextInstance) |
|||
{ if (here->BSIM4v5owner != ARCHme) continue; |
|||
pParam = here->pParam; |
|||
capbd = here->BSIM4v5capbd; |
|||
capbs = here->BSIM4v5capbs; |
|||
cgso = here->BSIM4v5cgso; |
|||
cgdo = here->BSIM4v5cgdo; |
|||
cgbo = pParam->BSIM4v5cgbo; |
|||
|
|||
Csd = -(here->BSIM4v5cddb + here->BSIM4v5cgdb + here->BSIM4v5cbdb); |
|||
Csg = -(here->BSIM4v5cdgb + here->BSIM4v5cggb + here->BSIM4v5cbgb); |
|||
Css = -(here->BSIM4v5cdsb + here->BSIM4v5cgsb + here->BSIM4v5cbsb); |
|||
|
|||
if (here->BSIM4v5acnqsMod) |
|||
{ T0 = omega * here->BSIM4v5taunet; |
|||
T1 = T0 * T0; |
|||
T2 = 1.0 / (1.0 + T1); |
|||
T3 = T0 * T2; |
|||
|
|||
gmr = here->BSIM4v5gm * T2; |
|||
gmbsr = here->BSIM4v5gmbs * T2; |
|||
gdsr = here->BSIM4v5gds * T2; |
|||
|
|||
gmi = -here->BSIM4v5gm * T3; |
|||
gmbsi = -here->BSIM4v5gmbs * T3; |
|||
gdsi = -here->BSIM4v5gds * T3; |
|||
|
|||
Cddr = here->BSIM4v5cddb * T2; |
|||
Cdgr = here->BSIM4v5cdgb * T2; |
|||
Cdsr = here->BSIM4v5cdsb * T2; |
|||
Cdbr = -(Cddr + Cdgr + Cdsr); |
|||
|
|||
/* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */ |
|||
Cddi = here->BSIM4v5cddb * T3 * omega; |
|||
Cdgi = here->BSIM4v5cdgb * T3 * omega; |
|||
Cdsi = here->BSIM4v5cdsb * T3 * omega; |
|||
Cdbi = -(Cddi + Cdgi + Cdsi); |
|||
|
|||
Csdr = Csd * T2; |
|||
Csgr = Csg * T2; |
|||
Cssr = Css * T2; |
|||
Csbr = -(Csdr + Csgr + Cssr); |
|||
|
|||
Csdi = Csd * T3 * omega; |
|||
Csgi = Csg * T3 * omega; |
|||
Cssi = Css * T3 * omega; |
|||
Csbi = -(Csdi + Csgi + Cssi); |
|||
|
|||
Cgdr = -(Cddr + Csdr + here->BSIM4v5cbdb); |
|||
Cggr = -(Cdgr + Csgr + here->BSIM4v5cbgb); |
|||
Cgsr = -(Cdsr + Cssr + here->BSIM4v5cbsb); |
|||
Cgbr = -(Cgdr + Cggr + Cgsr); |
|||
|
|||
Cgdi = -(Cddi + Csdi); |
|||
Cggi = -(Cdgi + Csgi); |
|||
Cgsi = -(Cdsi + Cssi); |
|||
Cgbi = -(Cgdi + Cggi + Cgsi); |
|||
} |
|||
else /* QS */ |
|||
{ gmr = here->BSIM4v5gm; |
|||
gmbsr = here->BSIM4v5gmbs; |
|||
gdsr = here->BSIM4v5gds; |
|||
gmi = gmbsi = gdsi = 0.0; |
|||
|
|||
Cddr = here->BSIM4v5cddb; |
|||
Cdgr = here->BSIM4v5cdgb; |
|||
Cdsr = here->BSIM4v5cdsb; |
|||
Cdbr = -(Cddr + Cdgr + Cdsr); |
|||
Cddi = Cdgi = Cdsi = Cdbi = 0.0; |
|||
|
|||
Csdr = Csd; |
|||
Csgr = Csg; |
|||
Cssr = Css; |
|||
Csbr = -(Csdr + Csgr + Cssr); |
|||
Csdi = Csgi = Cssi = Csbi = 0.0; |
|||
|
|||
Cgdr = here->BSIM4v5cgdb; |
|||
Cggr = here->BSIM4v5cggb; |
|||
Cgsr = here->BSIM4v5cgsb; |
|||
Cgbr = -(Cgdr + Cggr + Cgsr); |
|||
Cgdi = Cggi = Cgsi = Cgbi = 0.0; |
|||
} |
|||
|
|||
|
|||
if (here->BSIM4v5mode >= 0) |
|||
{ Gmr = gmr; |
|||
Gmbsr = gmbsr; |
|||
FwdSumr = Gmr + Gmbsr; |
|||
RevSumr = 0.0; |
|||
Gmi = gmi; |
|||
Gmbsi = gmbsi; |
|||
FwdSumi = Gmi + Gmbsi; |
|||
RevSumi = 0.0; |
|||
|
|||
gbbdp = -(here->BSIM4v5gbds); |
|||
gbbsp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; |
|||
gbdpg = here->BSIM4v5gbgs; |
|||
gbdpdp = here->BSIM4v5gbds; |
|||
gbdpb = here->BSIM4v5gbbs; |
|||
gbdpsp = -(gbdpg + gbdpdp + gbdpb); |
|||
|
|||
gbspdp = 0.0; |
|||
gbspg = 0.0; |
|||
gbspb = 0.0; |
|||
gbspsp = 0.0; |
|||
|
|||
if (model->BSIM4v5igcMod) |
|||
{ gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcsg; |
|||
gIstotd = here->BSIM4v5gIgcsd; |
|||
gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcss; |
|||
gIstotb = here->BSIM4v5gIgcsb; |
|||
|
|||
gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcdg; |
|||
gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcdd; |
|||
gIdtots = here->BSIM4v5gIgcds; |
|||
gIdtotb = here->BSIM4v5gIgcdb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v5igbMod) |
|||
{ gIbtotg = here->BSIM4v5gIgbg; |
|||
gIbtotd = here->BSIM4v5gIgbd; |
|||
gIbtots = here->BSIM4v5gIgbs; |
|||
gIbtotb = here->BSIM4v5gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v5rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v5vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v5vgs); |
|||
else if (here->BSIM4v5rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v5vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v5vgs); |
|||
if (here->BSIM4v5rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v5gcrgd * T0; |
|||
gcrgg = here->BSIM4v5gcrgg * T0; |
|||
gcrgs = here->BSIM4v5gcrgs * T0; |
|||
gcrgb = here->BSIM4v5gcrgb * T0; |
|||
gcrgg -= here->BSIM4v5gcrg; |
|||
gcrg = here->BSIM4v5gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v5rgateMod == 3) |
|||
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v5cgbo) * omega; |
|||
xcgmdb = -cgdo * omega; |
|||
xcgmsb = -cgso * omega; |
|||
xcgmbb = -pParam->BSIM4v5cgbo * omega; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggbr = Cggr * omega; |
|||
xcgdbr = Cgdr * omega; |
|||
xcgsbr = Cgsr * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = Cdgr * omega; |
|||
xcsgbr = Csgr * omega; |
|||
xcbgb = here->BSIM4v5cbgb * omega; |
|||
} |
|||
else |
|||
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v5cgbo ) * omega; |
|||
xcgdbr = (Cgdr - cgdo) * omega; |
|||
xcgsbr = (Cgsr - cgso) * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = (Cdgr - cgdo) * omega; |
|||
xcsgbr = (Csgr - cgso) * omega; |
|||
xcbgb = (here->BSIM4v5cbgb - pParam->BSIM4v5cgbo) * omega; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddbr = (Cddr + here->BSIM4v5capbd + cgdo) * omega; |
|||
xcdsbr = Cdsr * omega; |
|||
xcsdbr = Csdr * omega; |
|||
xcssbr = (here->BSIM4v5capbs + cgso + Cssr) * omega; |
|||
|
|||
if (!here->BSIM4v5rbodyMod) |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); |
|||
|
|||
xcbdb = (here->BSIM4v5cbdb - here->BSIM4v5capbd) * omega; |
|||
xcbsb = (here->BSIM4v5cbsb - here->BSIM4v5capbs) * omega; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbbr = Cdbr * omega; |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb) |
|||
+ here->BSIM4v5capbs * omega; |
|||
|
|||
xcbdb = here->BSIM4v5cbdb * omega; |
|||
xcbsb = here->BSIM4v5cbsb * omega; |
|||
|
|||
xcdbdb = -here->BSIM4v5capbd * omega; |
|||
xcsbsb = -here->BSIM4v5capbs * omega; |
|||
} |
|||
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); |
|||
|
|||
xcdgbi = Cdgi; |
|||
xcsgbi = Csgi; |
|||
xcddbi = Cddi; |
|||
xcdsbi = Cdsi; |
|||
xcsdbi = Csdi; |
|||
xcssbi = Cssi; |
|||
xcdbbi = Cdbi; |
|||
xcsbbi = Csbi; |
|||
xcggbi = Cggi; |
|||
xcgdbi = Cgdi; |
|||
xcgsbi = Cgsi; |
|||
xcgbbi = Cgbi; |
|||
} |
|||
else /* Reverse mode */ |
|||
{ Gmr = -gmr; |
|||
Gmbsr = -gmbsr; |
|||
FwdSumr = 0.0; |
|||
RevSumr = -(Gmr + Gmbsr); |
|||
Gmi = -gmi; |
|||
Gmbsi = -gmbsi; |
|||
FwdSumi = 0.0; |
|||
RevSumi = -(Gmi + Gmbsi); |
|||
|
|||
gbbsp = -(here->BSIM4v5gbds); |
|||
gbbdp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; |
|||
|
|||
gbdpg = 0.0; |
|||
gbdpsp = 0.0; |
|||
gbdpb = 0.0; |
|||
gbdpdp = 0.0; |
|||
|
|||
gbspg = here->BSIM4v5gbgs; |
|||
gbspsp = here->BSIM4v5gbds; |
|||
gbspb = here->BSIM4v5gbbs; |
|||
gbspdp = -(gbspg + gbspsp + gbspb); |
|||
|
|||
if (model->BSIM4v5igcMod) |
|||
{ gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcdg; |
|||
gIstotd = here->BSIM4v5gIgcds; |
|||
gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcdd; |
|||
gIstotb = here->BSIM4v5gIgcdb; |
|||
|
|||
gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg; |
|||
gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcss; |
|||
gIdtots = here->BSIM4v5gIgcsd; |
|||
gIdtotb = here->BSIM4v5gIgcsb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v5igbMod) |
|||
{ gIbtotg = here->BSIM4v5gIgbg; |
|||
gIbtotd = here->BSIM4v5gIgbs; |
|||
gIbtots = here->BSIM4v5gIgbd; |
|||
gIbtotb = here->BSIM4v5gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v5rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v5vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v5vgs); |
|||
else if (here->BSIM4v5rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v5vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v5vgs); |
|||
if (here->BSIM4v5rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v5gcrgs * T0; |
|||
gcrgg = here->BSIM4v5gcrgg * T0; |
|||
gcrgs = here->BSIM4v5gcrgd * T0; |
|||
gcrgb = here->BSIM4v5gcrgb * T0; |
|||
gcrgg -= here->BSIM4v5gcrg; |
|||
gcrg = here->BSIM4v5gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v5rgateMod == 3) |
|||
{ xcgmgmb = (cgdo + cgso + pParam->BSIM4v5cgbo) * omega; |
|||
xcgmdb = -cgdo * omega; |
|||
xcgmsb = -cgso * omega; |
|||
xcgmbb = -pParam->BSIM4v5cgbo * omega; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggbr = Cggr * omega; |
|||
xcgdbr = Cgsr * omega; |
|||
xcgsbr = Cgdr * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = Csgr * omega; |
|||
xcsgbr = Cdgr * omega; |
|||
xcbgb = here->BSIM4v5cbgb * omega; |
|||
} |
|||
else |
|||
{ xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v5cgbo ) * omega; |
|||
xcgdbr = (Cgsr - cgdo) * omega; |
|||
xcgsbr = (Cgdr - cgso) * omega; |
|||
xcgbbr = -(xcggbr + xcgdbr + xcgsbr); |
|||
|
|||
xcdgbr = (Csgr - cgdo) * omega; |
|||
xcsgbr = (Cdgr - cgso) * omega; |
|||
xcbgb = (here->BSIM4v5cbgb - pParam->BSIM4v5cgbo) * omega; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddbr = (here->BSIM4v5capbd + cgdo + Cssr) * omega; |
|||
xcdsbr = Csdr * omega; |
|||
xcsdbr = Cdsr * omega; |
|||
xcssbr = (Cddr + here->BSIM4v5capbs + cgso) * omega; |
|||
|
|||
if (!here->BSIM4v5rbodyMod) |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); |
|||
xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); |
|||
|
|||
xcbdb = (here->BSIM4v5cbsb - here->BSIM4v5capbd) * omega; |
|||
xcbsb = (here->BSIM4v5cbdb - here->BSIM4v5capbs) * omega; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb) |
|||
+ here->BSIM4v5capbd * omega; |
|||
xcsbbr = Cdbr * omega; |
|||
|
|||
xcbdb = here->BSIM4v5cbsb * omega; |
|||
xcbsb = here->BSIM4v5cbdb * omega; |
|||
xcdbdb = -here->BSIM4v5capbd * omega; |
|||
xcsbsb = -here->BSIM4v5capbs * omega; |
|||
} |
|||
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); |
|||
|
|||
xcdgbi = Csgi; |
|||
xcsgbi = Cdgi; |
|||
xcddbi = Cssi; |
|||
xcdsbi = Csdi; |
|||
xcsdbi = Cdsi; |
|||
xcssbi = Cddi; |
|||
xcdbbi = Csbi; |
|||
xcsbbi = Cdbi; |
|||
xcggbi = Cggi; |
|||
xcgdbi = Cgsi; |
|||
xcgsbi = Cgdi; |
|||
xcgbbi = Cgbi; |
|||
} |
|||
|
|||
if (model->BSIM4v5rdsMod == 1) |
|||
{ gstot = here->BSIM4v5gstot; |
|||
gstotd = here->BSIM4v5gstotd; |
|||
gstotg = here->BSIM4v5gstotg; |
|||
gstots = here->BSIM4v5gstots - gstot; |
|||
gstotb = here->BSIM4v5gstotb; |
|||
|
|||
gdtot = here->BSIM4v5gdtot; |
|||
gdtotd = here->BSIM4v5gdtotd - gdtot; |
|||
gdtotg = here->BSIM4v5gdtotg; |
|||
gdtots = here->BSIM4v5gdtots; |
|||
gdtotb = here->BSIM4v5gdtotb; |
|||
} |
|||
else |
|||
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0; |
|||
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; |
|||
} |
|||
|
|||
|
|||
/* |
|||
* Loading AC matrix |
|||
*/ |
|||
|
|||
m = here->BSIM4v5m; |
|||
|
|||
if (!model->BSIM4v5rdsMod) |
|||
{ gdpr = here->BSIM4v5drainConductance; |
|||
gspr = here->BSIM4v5sourceConductance; |
|||
} |
|||
else |
|||
gdpr = gspr = 0.0; |
|||
|
|||
if (!here->BSIM4v5rbodyMod) |
|||
{ gjbd = here->BSIM4v5gbd; |
|||
gjbs = here->BSIM4v5gbs; |
|||
} |
|||
else |
|||
gjbd = gjbs = 0.0; |
|||
|
|||
geltd = here->BSIM4v5grgeltd; |
|||
|
|||
if (here->BSIM4v5rgateMod == 1) |
|||
{ *(here->BSIM4v5GEgePtr) += m * geltd; |
|||
*(here->BSIM4v5GPgePtr) -= m * geltd; |
|||
*(here->BSIM4v5GEgpPtr) -= m * geltd; |
|||
|
|||
*(here->BSIM4v5GPgpPtr +1) += m * xcggbr; |
|||
*(here->BSIM4v5GPgpPtr) += m * (geltd + xcggbi + gIgtotg); |
|||
*(here->BSIM4v5GPdpPtr +1) += m * xcgdbr; |
|||
*(here->BSIM4v5GPdpPtr) += m * (xcgdbi + gIgtotd); |
|||
*(here->BSIM4v5GPspPtr +1) += m * xcgsbr; |
|||
*(here->BSIM4v5GPspPtr) += m * (xcgsbi + gIgtots); |
|||
*(here->BSIM4v5GPbpPtr +1) += m * xcgbbr; |
|||
*(here->BSIM4v5GPbpPtr) += m * (xcgbbi + gIgtotb); |
|||
} /* WDLiu: gcrg already subtracted from all gcrgg below */ |
|||
else if (here->BSIM4v5rgateMod == 2) |
|||
{ *(here->BSIM4v5GEgePtr) += m * gcrg; |
|||
*(here->BSIM4v5GEgpPtr) += m * gcrgg; |
|||
*(here->BSIM4v5GEdpPtr) += m * gcrgd; |
|||
*(here->BSIM4v5GEspPtr) += m * gcrgs; |
|||
*(here->BSIM4v5GEbpPtr) += m * gcrgb; |
|||
|
|||
*(here->BSIM4v5GPgePtr) -= m * gcrg; |
|||
*(here->BSIM4v5GPgpPtr +1) += m * xcggbr; |
|||
*(here->BSIM4v5GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); |
|||
*(here->BSIM4v5GPdpPtr +1) += m * xcgdbr; |
|||
*(here->BSIM4v5GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); |
|||
*(here->BSIM4v5GPspPtr +1) += m * xcgsbr; |
|||
*(here->BSIM4v5GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); |
|||
*(here->BSIM4v5GPbpPtr +1) += m * xcgbbr; |
|||
*(here->BSIM4v5GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); |
|||
} |
|||
else if (here->BSIM4v5rgateMod == 3) |
|||
{ *(here->BSIM4v5GEgePtr) += m * geltd; |
|||
*(here->BSIM4v5GEgmPtr) -= m * geltd; |
|||
*(here->BSIM4v5GMgePtr) -= m * geltd; |
|||
*(here->BSIM4v5GMgmPtr) += m * (geltd + gcrg); |
|||
*(here->BSIM4v5GMgmPtr +1) += m * xcgmgmb; |
|||
|
|||
*(here->BSIM4v5GMdpPtr) += m * gcrgd; |
|||
*(here->BSIM4v5GMdpPtr +1) += m * xcgmdb; |
|||
*(here->BSIM4v5GMgpPtr) += m * gcrgg; |
|||
*(here->BSIM4v5GMspPtr) += m * gcrgs; |
|||
*(here->BSIM4v5GMspPtr +1) += m * xcgmsb; |
|||
*(here->BSIM4v5GMbpPtr) += m * gcrgb; |
|||
*(here->BSIM4v5GMbpPtr +1) += m * xcgmbb; |
|||
|
|||
*(here->BSIM4v5DPgmPtr +1) += m * xcdgmb; |
|||
*(here->BSIM4v5GPgmPtr) -= m * gcrg; |
|||
*(here->BSIM4v5SPgmPtr +1) += m * xcsgmb; |
|||
*(here->BSIM4v5BPgmPtr +1) += m * xcbgmb; |
|||
|
|||
*(here->BSIM4v5GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); |
|||
*(here->BSIM4v5GPgpPtr +1) += m * xcggbr; |
|||
*(here->BSIM4v5GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); |
|||
*(here->BSIM4v5GPdpPtr +1) += m * xcgdbr; |
|||
*(here->BSIM4v5GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); |
|||
*(here->BSIM4v5GPspPtr +1) += m * xcgsbr; |
|||
*(here->BSIM4v5GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); |
|||
*(here->BSIM4v5GPbpPtr +1) += m * xcgbbr; |
|||
} |
|||
else |
|||
{ *(here->BSIM4v5GPgpPtr +1) += m * xcggbr; |
|||
*(here->BSIM4v5GPgpPtr) += m * (xcggbi + gIgtotg); |
|||
*(here->BSIM4v5GPdpPtr +1) += m * xcgdbr; |
|||
*(here->BSIM4v5GPdpPtr) += m * (xcgdbi + gIgtotd); |
|||
*(here->BSIM4v5GPspPtr +1) += m * xcgsbr; |
|||
*(here->BSIM4v5GPspPtr) += m * (xcgsbi + gIgtots); |
|||
*(here->BSIM4v5GPbpPtr +1) += m * xcgbbr; |
|||
*(here->BSIM4v5GPbpPtr) += m * (xcgbbi + gIgtotb); |
|||
} |
|||
|
|||
if (model->BSIM4v5rdsMod) |
|||
{ (*(here->BSIM4v5DgpPtr) += m * gdtotg); |
|||
(*(here->BSIM4v5DspPtr) += m * gdtots); |
|||
(*(here->BSIM4v5DbpPtr) += m * gdtotb); |
|||
(*(here->BSIM4v5SdpPtr) += m * gstotd); |
|||
(*(here->BSIM4v5SgpPtr) += m * gstotg); |
|||
(*(here->BSIM4v5SbpPtr) += m * gstotb); |
|||
} |
|||
|
|||
*(here->BSIM4v5DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi); |
|||
*(here->BSIM4v5DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4v5gbd |
|||
- gdtotd + RevSumr + gbdpdp - gIdtotd); |
|||
*(here->BSIM4v5DPdPtr) -= m * (gdpr + gdtot); |
|||
*(here->BSIM4v5DPgpPtr +1) += m * (xcdgbr + Gmi); |
|||
*(here->BSIM4v5DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg); |
|||
*(here->BSIM4v5DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi); |
|||
*(here->BSIM4v5DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots); |
|||
*(here->BSIM4v5DPbpPtr +1) += m * (xcdbbr + Gmbsi); |
|||
*(here->BSIM4v5DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb); |
|||
|
|||
*(here->BSIM4v5DdpPtr) -= m * (gdpr - gdtotd); |
|||
*(here->BSIM4v5DdPtr) += m * (gdpr + gdtot); |
|||
|
|||
*(here->BSIM4v5SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi); |
|||
*(here->BSIM4v5SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd); |
|||
*(here->BSIM4v5SPgpPtr +1) += m * (xcsgbr - Gmi); |
|||
*(here->BSIM4v5SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg); |
|||
*(here->BSIM4v5SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi); |
|||
*(here->BSIM4v5SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4v5gbs |
|||
- gstots + FwdSumr + gbspsp - gIstots); |
|||
*(here->BSIM4v5SPsPtr) -= m * (gspr + gstot); |
|||
*(here->BSIM4v5SPbpPtr +1) += m * (xcsbbr - Gmbsi); |
|||
*(here->BSIM4v5SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb); |
|||
|
|||
*(here->BSIM4v5SspPtr) -= m * (gspr - gstots); |
|||
*(here->BSIM4v5SsPtr) += m * (gspr + gstot); |
|||
|
|||
*(here->BSIM4v5BPdpPtr +1) += m * xcbdb; |
|||
*(here->BSIM4v5BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); |
|||
*(here->BSIM4v5BPgpPtr +1) += m * xcbgb; |
|||
*(here->BSIM4v5BPgpPtr) -= m * (here->BSIM4v5gbgs + gIbtotg); |
|||
*(here->BSIM4v5BPspPtr +1) += m * xcbsb; |
|||
*(here->BSIM4v5BPspPtr) -= m * (gjbs - gbbsp + gIbtots); |
|||
*(here->BSIM4v5BPbpPtr +1) += m * xcbbb; |
|||
*(here->BSIM4v5BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v5gbbs |
|||
- gIbtotb); |
|||
ggidld = here->BSIM4v5ggidld; |
|||
ggidlg = here->BSIM4v5ggidlg; |
|||
ggidlb = here->BSIM4v5ggidlb; |
|||
ggislg = here->BSIM4v5ggislg; |
|||
ggisls = here->BSIM4v5ggisls; |
|||
ggislb = here->BSIM4v5ggislb; |
|||
|
|||
/* stamp gidl */ |
|||
(*(here->BSIM4v5DPdpPtr) += m * ggidld); |
|||
(*(here->BSIM4v5DPgpPtr) += m * ggidlg); |
|||
(*(here->BSIM4v5DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); |
|||
(*(here->BSIM4v5DPbpPtr) += m * ggidlb); |
|||
(*(here->BSIM4v5BPdpPtr) -= m * ggidld); |
|||
(*(here->BSIM4v5BPgpPtr) -= m * ggidlg); |
|||
(*(here->BSIM4v5BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); |
|||
(*(here->BSIM4v5BPbpPtr) -= m * ggidlb); |
|||
/* stamp gisl */ |
|||
(*(here->BSIM4v5SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); |
|||
(*(here->BSIM4v5SPgpPtr) += m * ggislg); |
|||
(*(here->BSIM4v5SPspPtr) += m * ggisls); |
|||
(*(here->BSIM4v5SPbpPtr) += m * ggislb); |
|||
(*(here->BSIM4v5BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); |
|||
(*(here->BSIM4v5BPgpPtr) -= m * ggislg); |
|||
(*(here->BSIM4v5BPspPtr) -= m * ggisls); |
|||
(*(here->BSIM4v5BPbpPtr) -= m * ggislb); |
|||
|
|||
if (here->BSIM4v5rbodyMod) |
|||
{ (*(here->BSIM4v5DPdbPtr +1) += m * xcdbdb); |
|||
(*(here->BSIM4v5DPdbPtr) -= m * here->BSIM4v5gbd); |
|||
(*(here->BSIM4v5SPsbPtr +1) += m * xcsbsb); |
|||
(*(here->BSIM4v5SPsbPtr) -= m * here->BSIM4v5gbs); |
|||
|
|||
(*(here->BSIM4v5DBdpPtr +1) += m * xcdbdb); |
|||
(*(here->BSIM4v5DBdpPtr) -= m * here->BSIM4v5gbd); |
|||
(*(here->BSIM4v5DBdbPtr +1) -= m * xcdbdb); |
|||
(*(here->BSIM4v5DBdbPtr) += m * (here->BSIM4v5gbd + here->BSIM4v5grbpd |
|||
+ here->BSIM4v5grbdb)); |
|||
(*(here->BSIM4v5DBbpPtr) -= m * here->BSIM4v5grbpd); |
|||
(*(here->BSIM4v5DBbPtr) -= m * here->BSIM4v5grbdb); |
|||
|
|||
(*(here->BSIM4v5BPdbPtr) -= m * here->BSIM4v5grbpd); |
|||
(*(here->BSIM4v5BPbPtr) -= m * here->BSIM4v5grbpb); |
|||
(*(here->BSIM4v5BPsbPtr) -= m * here->BSIM4v5grbps); |
|||
(*(here->BSIM4v5BPbpPtr) += m * (here->BSIM4v5grbpd + here->BSIM4v5grbps |
|||
+ here->BSIM4v5grbpb)); |
|||
/* WDLiu: (-here->BSIM4v5gbbs) already added to BPbpPtr */ |
|||
|
|||
(*(here->BSIM4v5SBspPtr +1) += m * xcsbsb); |
|||
(*(here->BSIM4v5SBspPtr) -= m * here->BSIM4v5gbs); |
|||
(*(here->BSIM4v5SBbpPtr) -= m * here->BSIM4v5grbps); |
|||
(*(here->BSIM4v5SBbPtr) -= m * here->BSIM4v5grbsb); |
|||
(*(here->BSIM4v5SBsbPtr +1) -= m * xcsbsb); |
|||
(*(here->BSIM4v5SBsbPtr) += m * (here->BSIM4v5gbs |
|||
+ here->BSIM4v5grbps + here->BSIM4v5grbsb)); |
|||
|
|||
(*(here->BSIM4v5BdbPtr) -= m * here->BSIM4v5grbdb); |
|||
(*(here->BSIM4v5BbpPtr) -= m * here->BSIM4v5grbpb); |
|||
(*(here->BSIM4v5BsbPtr) -= m * here->BSIM4v5grbsb); |
|||
(*(here->BSIM4v5BbPtr) += m * (here->BSIM4v5grbsb + here->BSIM4v5grbdb |
|||
+ here->BSIM4v5grbpb)); |
|||
} |
|||
|
|||
|
|||
/* |
|||
* WDLiu: The internal charge node generated for transient NQS is not needed for |
|||
* AC NQS. The following is not doing a real job, but we have to keep it; |
|||
* otherwise a singular AC NQS matrix may occur if the transient NQS is on. |
|||
* The charge node is isolated from the instance. |
|||
*/ |
|||
if (here->BSIM4v5trnqsMod) |
|||
{ (*(here->BSIM4v5QqPtr) += m * 1.0); |
|||
(*(here->BSIM4v5QgpPtr) += 0.0); |
|||
(*(here->BSIM4v5QdpPtr) += 0.0); |
|||
(*(here->BSIM4v5QspPtr) += 0.0); |
|||
(*(here->BSIM4v5QbpPtr) += 0.0); |
|||
|
|||
(*(here->BSIM4v5DPqPtr) += 0.0); |
|||
(*(here->BSIM4v5SPqPtr) += 0.0); |
|||
(*(here->BSIM4v5GPqPtr) += 0.0); |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,355 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/27/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4ask.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
* Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "ifsim.h" |
|||
#include "cktdefs.h" |
|||
#include "devdefs.h" |
|||
#include "bsim4v5def.h" |
|||
#include "sperror.h" |
|||
#include "suffix.h" |
|||
|
|||
int |
|||
BSIM4v5ask(ckt,inst,which,value,select) |
|||
CKTcircuit *ckt; |
|||
GENinstance *inst; |
|||
int which; |
|||
IFvalue *value; |
|||
IFvalue *select; |
|||
{ |
|||
BSIM4v5instance *here = (BSIM4v5instance*)inst; |
|||
|
|||
switch(which) |
|||
{ case BSIM4v5_L: |
|||
value->rValue = here->BSIM4v5l; |
|||
return(OK); |
|||
case BSIM4v5_W: |
|||
value->rValue = here->BSIM4v5w; |
|||
return(OK); |
|||
case BSIM4v5_M: |
|||
value->rValue = here->BSIM4v5m; |
|||
return(OK); |
|||
case BSIM4v5_NF: |
|||
value->rValue = here->BSIM4v5nf; |
|||
return(OK); |
|||
case BSIM4v5_MIN: |
|||
value->iValue = here->BSIM4v5min; |
|||
return(OK); |
|||
case BSIM4v5_AS: |
|||
value->rValue = here->BSIM4v5sourceArea; |
|||
return(OK); |
|||
case BSIM4v5_AD: |
|||
value->rValue = here->BSIM4v5drainArea; |
|||
return(OK); |
|||
case BSIM4v5_PS: |
|||
value->rValue = here->BSIM4v5sourcePerimeter; |
|||
return(OK); |
|||
case BSIM4v5_PD: |
|||
value->rValue = here->BSIM4v5drainPerimeter; |
|||
return(OK); |
|||
case BSIM4v5_NRS: |
|||
value->rValue = here->BSIM4v5sourceSquares; |
|||
return(OK); |
|||
case BSIM4v5_NRD: |
|||
value->rValue = here->BSIM4v5drainSquares; |
|||
return(OK); |
|||
case BSIM4v5_OFF: |
|||
value->rValue = here->BSIM4v5off; |
|||
return(OK); |
|||
case BSIM4v5_SA: |
|||
value->rValue = here->BSIM4v5sa ; |
|||
return(OK); |
|||
case BSIM4v5_SB: |
|||
value->rValue = here->BSIM4v5sb ; |
|||
return(OK); |
|||
case BSIM4v5_SD: |
|||
value->rValue = here->BSIM4v5sd ; |
|||
return(OK); |
|||
case BSIM4v5_SCA: |
|||
value->rValue = here->BSIM4v5sca ; |
|||
return(OK); |
|||
case BSIM4v5_SCB: |
|||
value->rValue = here->BSIM4v5scb ; |
|||
return(OK); |
|||
case BSIM4v5_SCC: |
|||
value->rValue = here->BSIM4v5scc ; |
|||
return(OK); |
|||
case BSIM4v5_SC: |
|||
value->rValue = here->BSIM4v5sc ; |
|||
return(OK); |
|||
|
|||
case BSIM4v5_RBSB: |
|||
value->rValue = here->BSIM4v5rbsb; |
|||
return(OK); |
|||
case BSIM4v5_RBDB: |
|||
value->rValue = here->BSIM4v5rbdb; |
|||
return(OK); |
|||
case BSIM4v5_RBPB: |
|||
value->rValue = here->BSIM4v5rbpb; |
|||
return(OK); |
|||
case BSIM4v5_RBPS: |
|||
value->rValue = here->BSIM4v5rbps; |
|||
return(OK); |
|||
case BSIM4v5_RBPD: |
|||
value->rValue = here->BSIM4v5rbpd; |
|||
return(OK); |
|||
case BSIM4v5_DELVTO: |
|||
value->rValue = here->BSIM4v5delvto; |
|||
return(OK); |
|||
case BSIM4v5_XGW: |
|||
value->rValue = here->BSIM4v5xgw; |
|||
return(OK); |
|||
case BSIM4v5_NGCON: |
|||
value->rValue = here->BSIM4v5ngcon; |
|||
return(OK); |
|||
case BSIM4v5_TRNQSMOD: |
|||
value->iValue = here->BSIM4v5trnqsMod; |
|||
return(OK); |
|||
case BSIM4v5_ACNQSMOD: |
|||
value->iValue = here->BSIM4v5acnqsMod; |
|||
return(OK); |
|||
case BSIM4v5_RBODYMOD: |
|||
value->iValue = here->BSIM4v5rbodyMod; |
|||
return(OK); |
|||
case BSIM4v5_RGATEMOD: |
|||
value->iValue = here->BSIM4v5rgateMod; |
|||
return(OK); |
|||
case BSIM4v5_GEOMOD: |
|||
value->iValue = here->BSIM4v5geoMod; |
|||
return(OK); |
|||
case BSIM4v5_RGEOMOD: |
|||
value->iValue = here->BSIM4v5rgeoMod; |
|||
return(OK); |
|||
case BSIM4v5_IC_VDS: |
|||
value->rValue = here->BSIM4v5icVDS; |
|||
return(OK); |
|||
case BSIM4v5_IC_VGS: |
|||
value->rValue = here->BSIM4v5icVGS; |
|||
return(OK); |
|||
case BSIM4v5_IC_VBS: |
|||
value->rValue = here->BSIM4v5icVBS; |
|||
return(OK); |
|||
case BSIM4v5_DNODE: |
|||
value->iValue = here->BSIM4v5dNode; |
|||
return(OK); |
|||
case BSIM4v5_GNODEEXT: |
|||
value->iValue = here->BSIM4v5gNodeExt; |
|||
return(OK); |
|||
case BSIM4v5_SNODE: |
|||
value->iValue = here->BSIM4v5sNode; |
|||
return(OK); |
|||
case BSIM4v5_BNODE: |
|||
value->iValue = here->BSIM4v5bNode; |
|||
return(OK); |
|||
case BSIM4v5_DNODEPRIME: |
|||
value->iValue = here->BSIM4v5dNodePrime; |
|||
return(OK); |
|||
case BSIM4v5_GNODEPRIME: |
|||
value->iValue = here->BSIM4v5gNodePrime; |
|||
return(OK); |
|||
case BSIM4v5_GNODEMID: |
|||
value->iValue = here->BSIM4v5gNodeMid; |
|||
return(OK); |
|||
case BSIM4v5_SNODEPRIME: |
|||
value->iValue = here->BSIM4v5sNodePrime; |
|||
return(OK); |
|||
case BSIM4v5_DBNODE: |
|||
value->iValue = here->BSIM4v5dbNode; |
|||
return(OK); |
|||
case BSIM4v5_BNODEPRIME: |
|||
value->iValue = here->BSIM4v5bNodePrime; |
|||
return(OK); |
|||
case BSIM4v5_SBNODE: |
|||
value->iValue = here->BSIM4v5sbNode; |
|||
return(OK); |
|||
case BSIM4v5_SOURCECONDUCT: |
|||
value->rValue = here->BSIM4v5sourceConductance; |
|||
return(OK); |
|||
case BSIM4v5_DRAINCONDUCT: |
|||
value->rValue = here->BSIM4v5drainConductance; |
|||
return(OK); |
|||
case BSIM4v5_VBD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5vbd); |
|||
return(OK); |
|||
case BSIM4v5_VBS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5vbs); |
|||
return(OK); |
|||
case BSIM4v5_VGS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5vgs); |
|||
return(OK); |
|||
case BSIM4v5_VDS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5vds); |
|||
return(OK); |
|||
case BSIM4v5_CD: |
|||
value->rValue = here->BSIM4v5cd; |
|||
return(OK); |
|||
case BSIM4v5_CBS: |
|||
value->rValue = here->BSIM4v5cbs; |
|||
return(OK); |
|||
case BSIM4v5_CBD: |
|||
value->rValue = here->BSIM4v5cbd; |
|||
return(OK); |
|||
case BSIM4v5_CSUB: |
|||
value->rValue = here->BSIM4v5csub; |
|||
return(OK); |
|||
case BSIM4v5_IGIDL: |
|||
value->rValue = here->BSIM4v5Igidl; |
|||
return(OK); |
|||
case BSIM4v5_IGISL: |
|||
value->rValue = here->BSIM4v5Igisl; |
|||
return(OK); |
|||
case BSIM4v5_IGS: |
|||
value->rValue = here->BSIM4v5Igs; |
|||
return(OK); |
|||
case BSIM4v5_IGD: |
|||
value->rValue = here->BSIM4v5Igd; |
|||
return(OK); |
|||
case BSIM4v5_IGB: |
|||
value->rValue = here->BSIM4v5Igb; |
|||
return(OK); |
|||
case BSIM4v5_IGCS: |
|||
value->rValue = here->BSIM4v5Igcs; |
|||
return(OK); |
|||
case BSIM4v5_IGCD: |
|||
value->rValue = here->BSIM4v5Igcd; |
|||
return(OK); |
|||
case BSIM4v5_GM: |
|||
value->rValue = here->BSIM4v5gm; |
|||
return(OK); |
|||
case BSIM4v5_GDS: |
|||
value->rValue = here->BSIM4v5gds; |
|||
return(OK); |
|||
case BSIM4v5_GMBS: |
|||
value->rValue = here->BSIM4v5gmbs; |
|||
return(OK); |
|||
case BSIM4v5_GBD: |
|||
value->rValue = here->BSIM4v5gbd; |
|||
return(OK); |
|||
case BSIM4v5_GBS: |
|||
value->rValue = here->BSIM4v5gbs; |
|||
return(OK); |
|||
/* case BSIM4v5_QB: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qb); |
|||
return(OK); */ |
|||
case BSIM4v5_CQB: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5cqb); |
|||
return(OK); |
|||
/* case BSIM4v5_QG: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qg); |
|||
return(OK); */ |
|||
case BSIM4v5_CQG: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5cqg); |
|||
return(OK); |
|||
/* case BSIM4v5_QD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qd); |
|||
return(OK); */ |
|||
case BSIM4v5_CQD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5cqd); |
|||
return(OK); |
|||
/* case BSIM4v5_QS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qs); |
|||
return(OK); */ |
|||
case BSIM4v5_QB: |
|||
value->rValue = here->BSIM4v5qbulk; |
|||
return(OK); |
|||
case BSIM4v5_QG: |
|||
value->rValue = here->BSIM4v5qgate; |
|||
return(OK); |
|||
case BSIM4v5_QS: |
|||
value->rValue = here->BSIM4v5qsrc; |
|||
return(OK); |
|||
case BSIM4v5_QD: |
|||
value->rValue = here->BSIM4v5qdrn; |
|||
return(OK); |
|||
case BSIM4v5_QDEF: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qdef); |
|||
return(OK); |
|||
case BSIM4v5_GCRG: |
|||
value->rValue = here->BSIM4v5gcrg; |
|||
return(OK); |
|||
case BSIM4v5_GTAU: |
|||
value->rValue = here->BSIM4v5gtau; |
|||
return(OK); |
|||
case BSIM4v5_CGGB: |
|||
value->rValue = here->BSIM4v5cggb; |
|||
return(OK); |
|||
case BSIM4v5_CGDB: |
|||
value->rValue = here->BSIM4v5cgdb; |
|||
return(OK); |
|||
case BSIM4v5_CGSB: |
|||
value->rValue = here->BSIM4v5cgsb; |
|||
return(OK); |
|||
case BSIM4v5_CDGB: |
|||
value->rValue = here->BSIM4v5cdgb; |
|||
return(OK); |
|||
case BSIM4v5_CDDB: |
|||
value->rValue = here->BSIM4v5cddb; |
|||
return(OK); |
|||
case BSIM4v5_CDSB: |
|||
value->rValue = here->BSIM4v5cdsb; |
|||
return(OK); |
|||
case BSIM4v5_CBGB: |
|||
value->rValue = here->BSIM4v5cbgb; |
|||
return(OK); |
|||
case BSIM4v5_CBDB: |
|||
value->rValue = here->BSIM4v5cbdb; |
|||
return(OK); |
|||
case BSIM4v5_CBSB: |
|||
value->rValue = here->BSIM4v5cbsb; |
|||
return(OK); |
|||
case BSIM4v5_CSGB: |
|||
value->rValue = here->BSIM4v5csgb; |
|||
return(OK); |
|||
case BSIM4v5_CSDB: |
|||
value->rValue = here->BSIM4v5csdb; |
|||
return(OK); |
|||
case BSIM4v5_CSSB: |
|||
value->rValue = here->BSIM4v5cssb; |
|||
return(OK); |
|||
case BSIM4v5_CGBB: |
|||
value->rValue = here->BSIM4v5cgbb; |
|||
return(OK); |
|||
case BSIM4v5_CDBB: |
|||
value->rValue = here->BSIM4v5cdbb; |
|||
return(OK); |
|||
case BSIM4v5_CSBB: |
|||
value->rValue = here->BSIM4v5csbb; |
|||
return(OK); |
|||
case BSIM4v5_CBBB: |
|||
value->rValue = here->BSIM4v5cbbb; |
|||
return(OK); |
|||
case BSIM4v5_CAPBD: |
|||
value->rValue = here->BSIM4v5capbd; |
|||
return(OK); |
|||
case BSIM4v5_CAPBS: |
|||
value->rValue = here->BSIM4v5capbs; |
|||
return(OK); |
|||
case BSIM4v5_VON: |
|||
value->rValue = here->BSIM4v5von; |
|||
return(OK); |
|||
case BSIM4v5_VDSAT: |
|||
value->rValue = here->BSIM4v5vdsat; |
|||
return(OK); |
|||
case BSIM4v5_QBS: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qbs); |
|||
return(OK); |
|||
case BSIM4v5_QBD: |
|||
value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qbd); |
|||
return(OK); |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
/* NOTREACHED */ |
|||
} |
|||
|
|||
@ -0,0 +1,816 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4check.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 11/15/2002. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
* Modified by Xuemei Xi, 03/04/2004. |
|||
* Modified by Xuemei Xi, 07/29/2005. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "cktdefs.h" |
|||
#include "bsim4v5def.h" |
|||
#include "trandefs.h" |
|||
#include "const.h" |
|||
#include "sperror.h" |
|||
#include "devdefs.h" |
|||
#include "suffix.h" |
|||
|
|||
int |
|||
BSIM4v5checkModel(model, here, ckt) |
|||
BSIM4v5model *model; |
|||
BSIM4v5instance *here; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
struct bsim4v5SizeDependParam *pParam; |
|||
int Fatal_Flag = 0; |
|||
FILE *fplog; |
|||
|
|||
if ((fplog = fopen("bsim4v5.out", "w")) != NULL) |
|||
{ pParam = here->pParam; |
|||
fprintf(fplog, "BSIM4v5: Berkeley Short Channel IGFET Model-4\n"); |
|||
fprintf(fplog, "Developed by Xuemei (Jane) Xi, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n"); |
|||
fprintf(fplog, "\n"); |
|||
fprintf(fplog, "++++++++++ BSIM4v5 PARAMETER CHECKING BELOW ++++++++++\n"); |
|||
|
|||
if (!strstr(model->BSIM4v5version, "4.5")) |
|||
{ fprintf(fplog, "Warning: This model is BSIM4.5.0; you specified a wrong version number '%s'.\n", model->BSIM4v5version); |
|||
printf("Warning: This model is BSIM4.5.0; you specified a wrong version number '%s'.\n", model->BSIM4v5version); |
|||
} |
|||
fprintf(fplog, "Model = %s\n", model->BSIM4v5modName); |
|||
|
|||
|
|||
if ((here->BSIM4v5rgateMod == 2) || (here->BSIM4v5rgateMod == 3)) |
|||
{ if ((here->BSIM4v5trnqsMod == 1) || (here->BSIM4v5acnqsMod == 1)) |
|||
{ fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); |
|||
printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); |
|||
} |
|||
} |
|||
|
|||
if (model->BSIM4v5toxe <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxe = %g is not positive.\n", |
|||
model->BSIM4v5toxe); |
|||
printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v5toxe); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5toxp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", |
|||
model->BSIM4v5toxp); |
|||
printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v5toxp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (model->BSIM4v5toxm <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", |
|||
model->BSIM4v5toxm); |
|||
printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v5toxm); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (model->BSIM4v5toxref <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Toxref = %g is not positive.\n", |
|||
model->BSIM4v5toxref); |
|||
printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v5toxref); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5lpe0 < -pParam->BSIM4v5leff) |
|||
{ fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", |
|||
pParam->BSIM4v5lpe0); |
|||
printf("Fatal: Lpe0 = %g is less than -Leff.\n", |
|||
pParam->BSIM4v5lpe0); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5lintnoi > pParam->BSIM4v5leff/2) |
|||
{ fprintf(fplog, "Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", |
|||
model->BSIM4v5lintnoi); |
|||
printf("Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", |
|||
model->BSIM4v5lintnoi); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5lpeb < -pParam->BSIM4v5leff) |
|||
{ fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", |
|||
pParam->BSIM4v5lpeb); |
|||
printf("Fatal: Lpeb = %g is less than -Leff.\n", |
|||
pParam->BSIM4v5lpeb); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5ndep <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Ndep = %g is not positive.\n", |
|||
pParam->BSIM4v5ndep); |
|||
printf("Fatal: Ndep = %g is not positive.\n", |
|||
pParam->BSIM4v5ndep); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5phi <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", |
|||
pParam->BSIM4v5phi); |
|||
fprintf(fplog, " Phin = %g Ndep = %g \n", |
|||
pParam->BSIM4v5phin, pParam->BSIM4v5ndep); |
|||
printf("Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", |
|||
pParam->BSIM4v5phi); |
|||
printf(" Phin = %g Ndep = %g \n", |
|||
pParam->BSIM4v5phin, pParam->BSIM4v5ndep); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5nsub <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", |
|||
pParam->BSIM4v5nsub); |
|||
printf("Fatal: Nsub = %g is not positive.\n", |
|||
pParam->BSIM4v5nsub); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5ngate < 0.0) |
|||
{ fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", |
|||
pParam->BSIM4v5ngate); |
|||
printf("Fatal: Ngate = %g Ngate is not positive.\n", |
|||
pParam->BSIM4v5ngate); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5ngate > 1.e25) |
|||
{ fprintf(fplog, "Fatal: Ngate = %g is too high.\n", |
|||
pParam->BSIM4v5ngate); |
|||
printf("Fatal: Ngate = %g Ngate is too high\n", |
|||
pParam->BSIM4v5ngate); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5xj <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Xj = %g is not positive.\n", |
|||
pParam->BSIM4v5xj); |
|||
printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v5xj); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5dvt1 < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", |
|||
pParam->BSIM4v5dvt1); |
|||
printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v5dvt1); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5dvt1w < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", |
|||
pParam->BSIM4v5dvt1w); |
|||
printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v5dvt1w); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5w0 == -pParam->BSIM4v5weff) |
|||
{ 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->BSIM4v5dsub < 0.0) |
|||
{ fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v5dsub); |
|||
printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v5dsub); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5b1 == -pParam->BSIM4v5weff) |
|||
{ fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); |
|||
printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (here->BSIM4v5u0temp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4v5u0temp); |
|||
printf("Fatal: u0 at current temperature = %g is not positive.\n", |
|||
here->BSIM4v5u0temp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5delta < 0.0) |
|||
{ fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", |
|||
pParam->BSIM4v5delta); |
|||
printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v5delta); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (here->BSIM4v5vsattemp <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4v5vsattemp); |
|||
printf("Fatal: Vsat at current temperature = %g is not positive.\n", |
|||
here->BSIM4v5vsattemp); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5pclm <= 0.0) |
|||
{ fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v5pclm); |
|||
printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v5pclm); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5drout < 0.0) |
|||
{ fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v5drout); |
|||
printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v5drout); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if (here->BSIM4v5m <= 0.0) |
|||
{ fprintf(fplog, "Fatal: multiplier = %g is not positive.\n", here->BSIM4v5m); |
|||
printf("Fatal: multiplier = %g is not positive.\n", here->BSIM4v5m); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (here->BSIM4v5nf < 1.0) |
|||
{ fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v5nf); |
|||
printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v5nf); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
if((here->BSIM4v5sa > 0.0) && (here->BSIM4v5sb > 0.0) && |
|||
((here->BSIM4v5nf == 1.0) || ((here->BSIM4v5nf > 1.0) && (here->BSIM4v5sd > 0.0))) ) |
|||
{ if (model->BSIM4v5saref <= 0.0) |
|||
{ fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4v5saref); |
|||
printf("Fatal: SAref = %g is not positive.\n",model->BSIM4v5saref); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5sbref <= 0.0) |
|||
{ fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4v5sbref); |
|||
printf("Fatal: SBref = %g is not positive.\n",model->BSIM4v5sbref); |
|||
Fatal_Flag = 1; |
|||
} |
|||
} |
|||
|
|||
if ((here->BSIM4v5l + model->BSIM4v5xl) <= model->BSIM4v5xgl) |
|||
{ fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); |
|||
printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (here->BSIM4v5ngcon < 1.0) |
|||
{ fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n"); |
|||
printf("Fatal: The parameter ngcon cannot be smaller than one.\n"); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if ((here->BSIM4v5ngcon != 1.0) && (here->BSIM4v5ngcon != 2.0)) |
|||
{ here->BSIM4v5ngcon = 1.0; |
|||
fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); |
|||
printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); |
|||
} |
|||
|
|||
if (model->BSIM4v5gbmin < 1.0e-20) |
|||
{ fprintf(fplog, "Warning: Gbmin = %g is too small.\n", |
|||
model->BSIM4v5gbmin); |
|||
printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v5gbmin); |
|||
} |
|||
|
|||
/* Check saturation parameters */ |
|||
if (pParam->BSIM4v5fprout < 0.0) |
|||
{ fprintf(fplog, "Fatal: fprout = %g is negative.\n", |
|||
pParam->BSIM4v5fprout); |
|||
printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v5fprout); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5pdits < 0.0) |
|||
{ fprintf(fplog, "Fatal: pdits = %g is negative.\n", |
|||
pParam->BSIM4v5pdits); |
|||
printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v5pdits); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5pditsl < 0.0) |
|||
{ fprintf(fplog, "Fatal: pditsl = %g is negative.\n", |
|||
model->BSIM4v5pditsl); |
|||
printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v5pditsl); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
/* Check gate current parameters */ |
|||
if (model->BSIM4v5igbMod) { |
|||
if (pParam->BSIM4v5nigbinv <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", |
|||
pParam->BSIM4v5nigbinv); |
|||
printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v5nigbinv); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5nigbacc <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", |
|||
pParam->BSIM4v5nigbacc); |
|||
printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v5nigbacc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
} |
|||
if (model->BSIM4v5igcMod) { |
|||
if (pParam->BSIM4v5nigc <= 0.0) |
|||
{ fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", |
|||
pParam->BSIM4v5nigc); |
|||
printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v5nigc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5poxedge <= 0.0) |
|||
{ fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", |
|||
pParam->BSIM4v5poxedge); |
|||
printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v5poxedge); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (pParam->BSIM4v5pigcd <= 0.0) |
|||
{ fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", |
|||
pParam->BSIM4v5pigcd); |
|||
printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v5pigcd); |
|||
Fatal_Flag = 1; |
|||
} |
|||
} |
|||
|
|||
/* Check capacitance parameters */ |
|||
if (pParam->BSIM4v5clc < 0.0) |
|||
{ fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v5clc); |
|||
printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v5clc); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
/* Check overlap capacitance parameters */ |
|||
if (pParam->BSIM4v5ckappas < 0.02) |
|||
{ fprintf(fplog, "Warning: ckappas = %g is too small. Set to 0.02\n", |
|||
pParam->BSIM4v5ckappas); |
|||
printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4v5ckappas); |
|||
pParam->BSIM4v5ckappas = 0.02; |
|||
} |
|||
if (pParam->BSIM4v5ckappad < 0.02) |
|||
{ fprintf(fplog, "Warning: ckappad = %g is too small. Set to 0.02\n", |
|||
pParam->BSIM4v5ckappad); |
|||
printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4v5ckappad); |
|||
pParam->BSIM4v5ckappad = 0.02; |
|||
} |
|||
|
|||
if (model->BSIM4v5vtss < 0.0) |
|||
{ fprintf(fplog, "Fatal: Vtss = %g is negative.\n", |
|||
model->BSIM4v5vtss); |
|||
printf("Fatal: Vtss = %g is negative.\n", |
|||
model->BSIM4v5vtss); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5vtsd < 0.0) |
|||
{ fprintf(fplog, "Fatal: Vtsd = %g is negative.\n", |
|||
model->BSIM4v5vtsd); |
|||
printf("Fatal: Vtsd = %g is negative.\n", |
|||
model->BSIM4v5vtsd); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5vtssws < 0.0) |
|||
{ fprintf(fplog, "Fatal: Vtssws = %g is negative.\n", |
|||
model->BSIM4v5vtssws); |
|||
printf("Fatal: Vtssws = %g is negative.\n", |
|||
model->BSIM4v5vtssws); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5vtsswd < 0.0) |
|||
{ fprintf(fplog, "Fatal: Vtsswd = %g is negative.\n", |
|||
model->BSIM4v5vtsswd); |
|||
printf("Fatal: Vtsswd = %g is negative.\n", |
|||
model->BSIM4v5vtsswd); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5vtsswgs < 0.0) |
|||
{ fprintf(fplog, "Fatal: Vtsswgs = %g is negative.\n", |
|||
model->BSIM4v5vtsswgs); |
|||
printf("Fatal: Vtsswgs = %g is negative.\n", |
|||
model->BSIM4v5vtsswgs); |
|||
Fatal_Flag = 1; |
|||
} |
|||
if (model->BSIM4v5vtsswgd < 0.0) |
|||
{ fprintf(fplog, "Fatal: Vtsswgd = %g is negative.\n", |
|||
model->BSIM4v5vtsswgd); |
|||
printf("Fatal: Vtsswgd = %g is negative.\n", |
|||
model->BSIM4v5vtsswgd); |
|||
Fatal_Flag = 1; |
|||
} |
|||
|
|||
|
|||
if (model->BSIM4v5paramChk ==1) |
|||
{ |
|||
/* Check L and W parameters */ |
|||
if (pParam->BSIM4v5leff <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", |
|||
pParam->BSIM4v5leff); |
|||
printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", |
|||
pParam->BSIM4v5leff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5leffCV <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", |
|||
pParam->BSIM4v5leffCV); |
|||
printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", |
|||
pParam->BSIM4v5leffCV); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5weff <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", |
|||
pParam->BSIM4v5weff); |
|||
printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", |
|||
pParam->BSIM4v5weff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5weffCV <= 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", |
|||
pParam->BSIM4v5weffCV); |
|||
printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", |
|||
pParam->BSIM4v5weffCV); |
|||
} |
|||
|
|||
/* Check threshold voltage parameters */ |
|||
if (model->BSIM4v5toxe < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", |
|||
model->BSIM4v5toxe); |
|||
printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v5toxe); |
|||
} |
|||
if (model->BSIM4v5toxp < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", |
|||
model->BSIM4v5toxp); |
|||
printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v5toxp); |
|||
} |
|||
if (model->BSIM4v5toxm < 1.0e-10) |
|||
{ fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", |
|||
model->BSIM4v5toxm); |
|||
printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v5toxm); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5ndep <= 1.0e12) |
|||
{ fprintf(fplog, "Warning: Ndep = %g may be too small.\n", |
|||
pParam->BSIM4v5ndep); |
|||
printf("Warning: Ndep = %g may be too small.\n", |
|||
pParam->BSIM4v5ndep); |
|||
} |
|||
else if (pParam->BSIM4v5ndep >= 1.0e21) |
|||
{ fprintf(fplog, "Warning: Ndep = %g may be too large.\n", |
|||
pParam->BSIM4v5ndep); |
|||
printf("Warning: Ndep = %g may be too large.\n", |
|||
pParam->BSIM4v5ndep); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5nsub <= 1.0e14) |
|||
{ fprintf(fplog, "Warning: Nsub = %g may be too small.\n", |
|||
pParam->BSIM4v5nsub); |
|||
printf("Warning: Nsub = %g may be too small.\n", |
|||
pParam->BSIM4v5nsub); |
|||
} |
|||
else if (pParam->BSIM4v5nsub >= 1.0e21) |
|||
{ fprintf(fplog, "Warning: Nsub = %g may be too large.\n", |
|||
pParam->BSIM4v5nsub); |
|||
printf("Warning: Nsub = %g may be too large.\n", |
|||
pParam->BSIM4v5nsub); |
|||
} |
|||
|
|||
if ((pParam->BSIM4v5ngate > 0.0) && |
|||
(pParam->BSIM4v5ngate <= 1.e18)) |
|||
{ fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", |
|||
pParam->BSIM4v5ngate); |
|||
printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", |
|||
pParam->BSIM4v5ngate); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5dvt0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", |
|||
pParam->BSIM4v5dvt0); |
|||
printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v5dvt0); |
|||
} |
|||
|
|||
if (fabs(1.0e-8 / (pParam->BSIM4v5w0 + pParam->BSIM4v5weff)) > 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->BSIM4v5nfactor < 0.0) |
|||
{ fprintf(fplog, "Warning: Nfactor = %g is negative.\n", |
|||
pParam->BSIM4v5nfactor); |
|||
printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v5nfactor); |
|||
} |
|||
if (pParam->BSIM4v5cdsc < 0.0) |
|||
{ fprintf(fplog, "Warning: Cdsc = %g is negative.\n", |
|||
pParam->BSIM4v5cdsc); |
|||
printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v5cdsc); |
|||
} |
|||
if (pParam->BSIM4v5cdscd < 0.0) |
|||
{ fprintf(fplog, "Warning: Cdscd = %g is negative.\n", |
|||
pParam->BSIM4v5cdscd); |
|||
printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v5cdscd); |
|||
} |
|||
/* Check DIBL parameters */ |
|||
if (here->BSIM4v5eta0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Eta0 = %g is negative.\n", |
|||
here->BSIM4v5eta0); |
|||
printf("Warning: Eta0 = %g is negative.\n", here->BSIM4v5eta0); |
|||
} |
|||
|
|||
/* Check Abulk parameters */ |
|||
if (fabs(1.0e-8 / (pParam->BSIM4v5b1 + pParam->BSIM4v5weff)) > 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->BSIM4v5a2 < 0.01) |
|||
{ fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v5a2); |
|||
printf("Warning: A2 = %g is too small. Set to 0.01.\n", |
|||
pParam->BSIM4v5a2); |
|||
pParam->BSIM4v5a2 = 0.01; |
|||
} |
|||
else if (pParam->BSIM4v5a2 > 1.0) |
|||
{ fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", |
|||
pParam->BSIM4v5a2); |
|||
printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", |
|||
pParam->BSIM4v5a2); |
|||
pParam->BSIM4v5a2 = 1.0; |
|||
pParam->BSIM4v5a1 = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5prwg < 0.0) |
|||
{ fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v5prwg); |
|||
printf("Warning: Prwg = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v5prwg); |
|||
pParam->BSIM4v5prwg = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5rdsw < 0.0) |
|||
{ fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v5rdsw); |
|||
printf("Warning: Rdsw = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v5rdsw); |
|||
pParam->BSIM4v5rdsw = 0.0; |
|||
pParam->BSIM4v5rds0 = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5rds0 < 0.0) |
|||
{ fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v5rds0); |
|||
printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v5rds0); |
|||
pParam->BSIM4v5rds0 = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5rdswmin < 0.0) |
|||
{ fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v5rdswmin); |
|||
printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", |
|||
pParam->BSIM4v5rdswmin); |
|||
pParam->BSIM4v5rdswmin = 0.0; |
|||
} |
|||
|
|||
if (pParam->BSIM4v5pscbe2 <= 0.0) |
|||
{ fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", |
|||
pParam->BSIM4v5pscbe2); |
|||
printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v5pscbe2); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5vsattemp < 1.0e3) |
|||
{ fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v5vsattemp); |
|||
printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v5vsattemp); |
|||
} |
|||
|
|||
if((model->BSIM4v5lambdaGiven) && (pParam->BSIM4v5lambda > 0.0) ) |
|||
{ |
|||
if (pParam->BSIM4v5lambda > 1.0e-9) |
|||
{ fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4v5lambda); |
|||
printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4v5lambda); |
|||
} |
|||
} |
|||
|
|||
if((model->BSIM4v5vtlGiven) && (pParam->BSIM4v5vtl > 0.0) ) |
|||
{ |
|||
if (pParam->BSIM4v5vtl < 6.0e4) |
|||
{ fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v5vtl); |
|||
printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v5vtl); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5xn < 3.0) |
|||
{ fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4v5xn); |
|||
printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4v5xn); |
|||
pParam->BSIM4v5xn = 3.0; |
|||
} |
|||
|
|||
if (model->BSIM4v5lc < 0.0) |
|||
{ fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4v5lc); |
|||
printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4v5lc); |
|||
pParam->BSIM4v5lc = 0.0; |
|||
} |
|||
} |
|||
|
|||
if (pParam->BSIM4v5pdibl1 < 0.0) |
|||
{ fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", |
|||
pParam->BSIM4v5pdibl1); |
|||
printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v5pdibl1); |
|||
} |
|||
if (pParam->BSIM4v5pdibl2 < 0.0) |
|||
{ fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", |
|||
pParam->BSIM4v5pdibl2); |
|||
printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v5pdibl2); |
|||
} |
|||
|
|||
/* Check stress effect parameters */ |
|||
if((here->BSIM4v5sa > 0.0) && (here->BSIM4v5sb > 0.0) && |
|||
((here->BSIM4v5nf == 1.0) || ((here->BSIM4v5nf > 1.0) && (here->BSIM4v5sd > 0.0))) ) |
|||
{ if (model->BSIM4v5lodk2 <= 0.0) |
|||
{ fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4v5lodk2); |
|||
printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4v5lodk2); |
|||
} |
|||
if (model->BSIM4v5lodeta0 <= 0.0) |
|||
{ fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4v5lodeta0); |
|||
printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4v5lodeta0); |
|||
} |
|||
} |
|||
|
|||
/* Check gate resistance parameters */ |
|||
if (here->BSIM4v5rgateMod == 1) |
|||
{ if (model->BSIM4v5rshg <= 0.0) |
|||
printf("Warning: rshg should be positive for rgateMod = 1.\n"); |
|||
} |
|||
else if (here->BSIM4v5rgateMod == 2) |
|||
{ if (model->BSIM4v5rshg <= 0.0) |
|||
printf("Warning: rshg <= 0.0 for rgateMod = 2.\n"); |
|||
else if (pParam->BSIM4v5xrcrg1 <= 0.0) |
|||
printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n"); |
|||
} |
|||
if (here->BSIM4v5rgateMod == 3) |
|||
{ if (model->BSIM4v5rshg <= 0.0) |
|||
printf("Warning: rshg should be positive for rgateMod = 3.\n"); |
|||
else if (pParam->BSIM4v5xrcrg1 <= 0.0) |
|||
printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n"); |
|||
} |
|||
|
|||
/* Check capacitance parameters */ |
|||
if (pParam->BSIM4v5noff < 0.1) |
|||
{ fprintf(fplog, "Warning: Noff = %g is too small.\n", |
|||
pParam->BSIM4v5noff); |
|||
printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v5noff); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5voffcv < -0.5) |
|||
{ fprintf(fplog, "Warning: Voffcv = %g is too small.\n", |
|||
pParam->BSIM4v5voffcv); |
|||
printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v5voffcv); |
|||
} |
|||
|
|||
if (pParam->BSIM4v5moin < 5.0) |
|||
{ fprintf(fplog, "Warning: Moin = %g is too small.\n", |
|||
pParam->BSIM4v5moin); |
|||
printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v5moin); |
|||
} |
|||
if (pParam->BSIM4v5moin > 25.0) |
|||
{ fprintf(fplog, "Warning: Moin = %g is too large.\n", |
|||
pParam->BSIM4v5moin); |
|||
printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v5moin); |
|||
} |
|||
if(model->BSIM4v5capMod ==2) { |
|||
if (pParam->BSIM4v5acde < 0.1) |
|||
{ fprintf(fplog, "Warning: Acde = %g is too small.\n", |
|||
pParam->BSIM4v5acde); |
|||
printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v5acde); |
|||
} |
|||
if (pParam->BSIM4v5acde > 1.6) |
|||
{ fprintf(fplog, "Warning: Acde = %g is too large.\n", |
|||
pParam->BSIM4v5acde); |
|||
printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v5acde); |
|||
} |
|||
} |
|||
|
|||
/* Check overlap capacitance parameters */ |
|||
if (model->BSIM4v5cgdo < 0.0) |
|||
{ fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v5cgdo); |
|||
printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v5cgdo); |
|||
model->BSIM4v5cgdo = 0.0; |
|||
} |
|||
if (model->BSIM4v5cgso < 0.0) |
|||
{ fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v5cgso); |
|||
printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v5cgso); |
|||
model->BSIM4v5cgso = 0.0; |
|||
} |
|||
if (model->BSIM4v5cgbo < 0.0) |
|||
{ fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM4v5cgbo); |
|||
printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM4v5cgbo); |
|||
model->BSIM4v5cgbo = 0.0; |
|||
} |
|||
if (model->BSIM4v5tnoiMod == 1) { |
|||
if (model->BSIM4v5tnoia < 0.0) |
|||
{ fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v5tnoia); |
|||
printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v5tnoia); |
|||
model->BSIM4v5tnoia = 0.0; |
|||
} |
|||
if (model->BSIM4v5tnoib < 0.0) |
|||
{ fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v5tnoib); |
|||
printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v5tnoib); |
|||
model->BSIM4v5tnoib = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v5rnoia < 0.0) |
|||
{ fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v5rnoia); |
|||
printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v5rnoia); |
|||
model->BSIM4v5rnoia = 0.0; |
|||
} |
|||
if (model->BSIM4v5rnoib < 0.0) |
|||
{ fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v5rnoib); |
|||
printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v5rnoib); |
|||
model->BSIM4v5rnoib = 0.0; |
|||
} |
|||
} |
|||
|
|||
if (model->BSIM4v5SjctEmissionCoeff < 0.0) |
|||
{ fprintf(fplog, "Warning: Njs = %g is negative.\n", |
|||
model->BSIM4v5SjctEmissionCoeff); |
|||
printf("Warning: Njs = %g is negative.\n", |
|||
model->BSIM4v5SjctEmissionCoeff); |
|||
} |
|||
if (model->BSIM4v5DjctEmissionCoeff < 0.0) |
|||
{ fprintf(fplog, "Warning: Njd = %g is negative.\n", |
|||
model->BSIM4v5DjctEmissionCoeff); |
|||
printf("Warning: Njd = %g is negative.\n", |
|||
model->BSIM4v5DjctEmissionCoeff); |
|||
} |
|||
if (model->BSIM4v5njtstemp < 0.0) |
|||
{ fprintf(fplog, "Warning: Njts = %g is negative at temperature = %g.\n", |
|||
model->BSIM4v5njtstemp, ckt->CKTtemp); |
|||
printf("Warning: Njts = %g is negative at temperature = %g.\n", |
|||
model->BSIM4v5njtstemp, ckt->CKTtemp); |
|||
} |
|||
if (model->BSIM4v5njtsswtemp < 0.0) |
|||
{ fprintf(fplog, "Warning: Njtssw = %g is negative at temperature = %g.\n", |
|||
model->BSIM4v5njtsswtemp, ckt->CKTtemp); |
|||
printf("Warning: Njtssw = %g is negative at temperature = %g.\n", |
|||
model->BSIM4v5njtsswtemp, ckt->CKTtemp); |
|||
} |
|||
if (model->BSIM4v5njtsswgtemp < 0.0) |
|||
{ fprintf(fplog, "Warning: Njtsswg = %g is negative at temperature = %g.\n", |
|||
model->BSIM4v5njtsswgtemp, ckt->CKTtemp); |
|||
printf("Warning: Njtsswg = %g is negative at temperature = %g.\n", |
|||
model->BSIM4v5njtsswgtemp, ckt->CKTtemp); |
|||
} |
|||
if (model->BSIM4v5ntnoi < 0.0) |
|||
{ fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v5ntnoi); |
|||
printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v5ntnoi); |
|||
model->BSIM4v5ntnoi = 0.0; |
|||
} |
|||
|
|||
/* diode model */ |
|||
if (model->BSIM4v5SbulkJctBotGradingCoeff >= 0.99) |
|||
{ fprintf(fplog, "Warning: MJS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctBotGradingCoeff); |
|||
printf("Warning: MJS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctBotGradingCoeff); |
|||
model->BSIM4v5SbulkJctBotGradingCoeff = 0.99; |
|||
} |
|||
if (model->BSIM4v5SbulkJctSideGradingCoeff >= 0.99) |
|||
{ fprintf(fplog, "Warning: MJSWS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctSideGradingCoeff); |
|||
printf("Warning: MJSWS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctSideGradingCoeff); |
|||
model->BSIM4v5SbulkJctSideGradingCoeff = 0.99; |
|||
} |
|||
if (model->BSIM4v5SbulkJctGateSideGradingCoeff >= 0.99) |
|||
{ fprintf(fplog, "Warning: MJSWGS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctGateSideGradingCoeff); |
|||
printf("Warning: MJSWGS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctGateSideGradingCoeff); |
|||
model->BSIM4v5SbulkJctGateSideGradingCoeff = 0.99; |
|||
} |
|||
|
|||
if (model->BSIM4v5DbulkJctBotGradingCoeff >= 0.99) |
|||
{ fprintf(fplog, "Warning: MJD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctBotGradingCoeff); |
|||
printf("Warning: MJD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctBotGradingCoeff); |
|||
model->BSIM4v5DbulkJctBotGradingCoeff = 0.99; |
|||
} |
|||
if (model->BSIM4v5DbulkJctSideGradingCoeff >= 0.99) |
|||
{ fprintf(fplog, "Warning: MJSWD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctSideGradingCoeff); |
|||
printf("Warning: MJSWD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctSideGradingCoeff); |
|||
model->BSIM4v5DbulkJctSideGradingCoeff = 0.99; |
|||
} |
|||
if (model->BSIM4v5DbulkJctGateSideGradingCoeff >= 0.99) |
|||
{ fprintf(fplog, "Warning: MJSWGD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctGateSideGradingCoeff); |
|||
printf("Warning: MJSWGD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctGateSideGradingCoeff); |
|||
model->BSIM4v5DbulkJctGateSideGradingCoeff = 0.99; |
|||
} |
|||
if (model->BSIM4v5wpemod == 1) |
|||
{ |
|||
if (model->BSIM4v5scref <= 0.0) |
|||
{ fprintf(fplog, "Warning: SCREF = %g is not positive. Set to 1e-6.\n", model->BSIM4v5scref); |
|||
//printf("Warning: SCREF = %g is not positive. Set to 1e-6.\n", model->BSIM4v5scref); |
|||
model->BSIM4v5scref = 1e-6; |
|||
} |
|||
if (here->BSIM4v5sca < 0.0) |
|||
{ fprintf(fplog, "Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4v5sca); |
|||
//printf("Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4v5sca); |
|||
here->BSIM4v5sca = 0.0; |
|||
} |
|||
if (here->BSIM4v5scb < 0.0) |
|||
{ fprintf(fplog, "Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4v5scb); |
|||
//printf("Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4v5scb); |
|||
here->BSIM4v5scb = 0.0; |
|||
} |
|||
if (here->BSIM4v5scc < 0.0) |
|||
{ fprintf(fplog, "Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4v5scc); |
|||
//printf("Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4v5scc); |
|||
here->BSIM4v5scc = 0.0; |
|||
} |
|||
if (here->BSIM4v5sc < 0.0) |
|||
{ fprintf(fplog, "Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4v5sc); |
|||
//printf("Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4v5sc); |
|||
here->BSIM4v5sc = 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); |
|||
} |
|||
|
|||
@ -0,0 +1,199 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4cvtest.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "cktdefs.h" |
|||
#include "bsim4v5def.h" |
|||
#include "trandefs.h" |
|||
#include "const.h" |
|||
#include "devdefs.h" |
|||
#include "sperror.h" |
|||
#include "suffix.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v5convTest(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v5model *model = (BSIM4v5model*)inModel; |
|||
BSIM4v5instance *here; |
|||
double delvbd, delvbs, delvds, delvgd, delvgs; |
|||
double delvdbd, delvsbs; |
|||
double delvbd_jct, delvbs_jct; |
|||
double vds, vgs, vgd, vgdo, vbs, vbd; |
|||
double vdbd, vdbs, vsbs; |
|||
double cbhat, cdhat, Idtot, Ibtot; |
|||
double vses, vdes, vdedo, delvses, delvded, delvdes; |
|||
double Isestot, cseshat, Idedtot, cdedhat; |
|||
double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; |
|||
double tol0, tol1, tol2, tol3, tol4, tol5, tol6; |
|||
|
|||
for (; model != NULL; model = model->BSIM4v5nextModel) |
|||
{ for (here = model->BSIM4v5instances; here != NULL ; |
|||
here=here->BSIM4v5nextInstance) |
|||
{ |
|||
if (here->BSIM4v5owner != ARCHme) continue; |
|||
vds = model->BSIM4v5type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v5dNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); |
|||
vgs = model->BSIM4v5type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v5gNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); |
|||
vbs = model->BSIM4v5type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v5bNodePrime) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); |
|||
vdbs = model->BSIM4v5type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v5dbNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); |
|||
vsbs = model->BSIM4v5type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v5sbNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); |
|||
vses = model->BSIM4v5type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v5sNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); |
|||
vdes = model->BSIM4v5type |
|||
* (*(ckt->CKTrhsOld + here->BSIM4v5dNode) |
|||
- *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); |
|||
|
|||
vgdo = *(ckt->CKTstate0 + here->BSIM4v5vgs) |
|||
- *(ckt->CKTstate0 + here->BSIM4v5vds); |
|||
vbd = vbs - vds; |
|||
vdbd = vdbs - vds; |
|||
vgd = vgs - vds; |
|||
|
|||
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v5vbd); |
|||
delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v5vdbd); |
|||
delvgd = vgd - vgdo; |
|||
|
|||
delvds = vds - *(ckt->CKTstate0 + here->BSIM4v5vds); |
|||
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v5vgs); |
|||
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v5vbs); |
|||
delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v5vsbs); |
|||
|
|||
delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v5vses)); |
|||
vdedo = *(ckt->CKTstate0 + here->BSIM4v5vdes) |
|||
- *(ckt->CKTstate0 + here->BSIM4v5vds); |
|||
delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v5vdes); |
|||
delvded = vdes - vds - vdedo; |
|||
|
|||
delvbd_jct = (!here->BSIM4v5rbodyMod) ? delvbd : delvdbd; |
|||
delvbs_jct = (!here->BSIM4v5rbodyMod) ? delvbs : delvsbs; |
|||
|
|||
if (here->BSIM4v5mode >= 0) |
|||
{ Idtot = here->BSIM4v5cd + here->BSIM4v5csub - here->BSIM4v5cbd |
|||
+ here->BSIM4v5Igidl; |
|||
cdhat = Idtot - here->BSIM4v5gbd * delvbd_jct |
|||
+ (here->BSIM4v5gmbs + here->BSIM4v5gbbs + here->BSIM4v5ggidlb) * delvbs |
|||
+ (here->BSIM4v5gm + here->BSIM4v5gbgs + here->BSIM4v5ggidlg) * delvgs |
|||
+ (here->BSIM4v5gds + here->BSIM4v5gbds + here->BSIM4v5ggidld) * delvds; |
|||
|
|||
Igstot = here->BSIM4v5Igs + here->BSIM4v5Igcs; |
|||
cgshat = Igstot + (here->BSIM4v5gIgsg + here->BSIM4v5gIgcsg) * delvgs |
|||
+ here->BSIM4v5gIgcsd * delvds + here->BSIM4v5gIgcsb * delvbs; |
|||
|
|||
Igdtot = here->BSIM4v5Igd + here->BSIM4v5Igcd; |
|||
cgdhat = Igdtot + here->BSIM4v5gIgdg * delvgd + here->BSIM4v5gIgcdg * delvgs |
|||
+ here->BSIM4v5gIgcdd * delvds + here->BSIM4v5gIgcdb * delvbs; |
|||
|
|||
Igbtot = here->BSIM4v5Igb; |
|||
cgbhat = here->BSIM4v5Igb + here->BSIM4v5gIgbg * delvgs + here->BSIM4v5gIgbd |
|||
* delvds + here->BSIM4v5gIgbb * delvbs; |
|||
} |
|||
else |
|||
{ Idtot = here->BSIM4v5cd + here->BSIM4v5cbd - here->BSIM4v5Igidl; /* bugfix */ |
|||
cdhat = Idtot + here->BSIM4v5gbd * delvbd_jct + here->BSIM4v5gmbs |
|||
* delvbd + here->BSIM4v5gm * delvgd |
|||
- (here->BSIM4v5gds + here->BSIM4v5ggidls) * delvds |
|||
- here->BSIM4v5ggidlg * delvgs - here->BSIM4v5ggidlb * delvbs; |
|||
|
|||
Igstot = here->BSIM4v5Igs + here->BSIM4v5Igcd; |
|||
cgshat = Igstot + here->BSIM4v5gIgsg * delvgs + here->BSIM4v5gIgcdg * delvgd |
|||
- here->BSIM4v5gIgcdd * delvds + here->BSIM4v5gIgcdb * delvbd; |
|||
|
|||
Igdtot = here->BSIM4v5Igd + here->BSIM4v5Igcs; |
|||
cgdhat = Igdtot + (here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg) * delvgd |
|||
- here->BSIM4v5gIgcsd * delvds + here->BSIM4v5gIgcsb * delvbd; |
|||
|
|||
Igbtot = here->BSIM4v5Igb; |
|||
cgbhat = here->BSIM4v5Igb + here->BSIM4v5gIgbg * delvgd - here->BSIM4v5gIgbd |
|||
* delvds + here->BSIM4v5gIgbb * delvbd; |
|||
} |
|||
|
|||
Isestot = here->BSIM4v5gstot * (*(ckt->CKTstate0 + here->BSIM4v5vses)); |
|||
cseshat = Isestot + here->BSIM4v5gstot * delvses |
|||
+ here->BSIM4v5gstotd * delvds + here->BSIM4v5gstotg * delvgs |
|||
+ here->BSIM4v5gstotb * delvbs; |
|||
|
|||
Idedtot = here->BSIM4v5gdtot * vdedo; |
|||
cdedhat = Idedtot + here->BSIM4v5gdtot * delvded |
|||
+ here->BSIM4v5gdtotd * delvds + here->BSIM4v5gdtotg * delvgs |
|||
+ here->BSIM4v5gdtotb * delvbs; |
|||
|
|||
/* |
|||
* Check convergence |
|||
*/ |
|||
|
|||
if ((here->BSIM4v5off == 0) || (!(ckt->CKTmode & MODEINITFIX))) |
|||
{ tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) |
|||
+ ckt->CKTabstol; |
|||
tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) |
|||
+ ckt->CKTabstol; |
|||
tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) |
|||
+ ckt->CKTabstol; |
|||
tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) |
|||
+ ckt->CKTabstol; |
|||
tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) |
|||
+ ckt->CKTabstol; |
|||
tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) |
|||
+ ckt->CKTabstol; |
|||
|
|||
if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) |
|||
|| (fabs(cdedhat - Idedtot) >= tol2)) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
|
|||
if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) |
|||
|| (fabs(cgbhat - Igbtot) >= tol5)) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
|
|||
Ibtot = here->BSIM4v5cbs + here->BSIM4v5cbd |
|||
- here->BSIM4v5Igidl - here->BSIM4v5Igisl - here->BSIM4v5csub; |
|||
if (here->BSIM4v5mode >= 0) |
|||
{ cbhat = Ibtot + here->BSIM4v5gbd * delvbd_jct |
|||
+ here->BSIM4v5gbs * delvbs_jct - (here->BSIM4v5gbbs + here->BSIM4v5ggidlb) |
|||
* delvbs - (here->BSIM4v5gbgs + here->BSIM4v5ggidlg) * delvgs |
|||
- (here->BSIM4v5gbds + here->BSIM4v5ggidld) * delvds |
|||
- here->BSIM4v5ggislg * delvgd - here->BSIM4v5ggislb* delvbd + here->BSIM4v5ggisls * delvds ; |
|||
} |
|||
else |
|||
{ cbhat = Ibtot + here->BSIM4v5gbs * delvbs_jct + here->BSIM4v5gbd |
|||
* delvbd_jct - (here->BSIM4v5gbbs + here->BSIM4v5ggislb) * delvbd |
|||
- (here->BSIM4v5gbgs + here->BSIM4v5ggislg) * delvgd |
|||
+ (here->BSIM4v5gbds + here->BSIM4v5ggisld - here->BSIM4v5ggidls) * delvds |
|||
- here->BSIM4v5ggidlg * delvgs - here->BSIM4v5ggidlb * delvbs; |
|||
} |
|||
tol6 = ckt->CKTreltol * MAX(fabs(cbhat), |
|||
fabs(Ibtot)) + ckt->CKTabstol; |
|||
if (fabs(cbhat - Ibtot) > tol6) |
|||
{ ckt->CKTnoncon++; |
|||
return(OK); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4del.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "bsim4v5def.h" |
|||
#include "sperror.h" |
|||
#include "gendefs.h" |
|||
#include "suffix.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v5delete(inModel,name,inInst) |
|||
GENmodel *inModel; |
|||
IFuid name; |
|||
GENinstance **inInst; |
|||
{ |
|||
BSIM4v5instance **fast = (BSIM4v5instance**)inInst; |
|||
BSIM4v5model *model = (BSIM4v5model*)inModel; |
|||
BSIM4v5instance **prev = NULL; |
|||
BSIM4v5instance *here; |
|||
|
|||
for (; model ; model = model->BSIM4v5nextModel) |
|||
{ prev = &(model->BSIM4v5instances); |
|||
for (here = *prev; here ; here = *prev) |
|||
{ if (here->BSIM4v5name == name || (fast && here==*fast)) |
|||
{ *prev= here->BSIM4v5nextInstance; |
|||
FREE(here); |
|||
return(OK); |
|||
} |
|||
prev = &(here->BSIM4v5nextInstance); |
|||
} |
|||
} |
|||
return(E_NODEV); |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4dest.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "bsim4v5def.h" |
|||
#include "suffix.h" |
|||
|
|||
void |
|||
BSIM4v5destroy(inModel) |
|||
GENmodel **inModel; |
|||
{ |
|||
BSIM4v5model **model = (BSIM4v5model**)inModel; |
|||
BSIM4v5instance *here; |
|||
BSIM4v5instance *prev = NULL; |
|||
BSIM4v5model *mod = *model; |
|||
BSIM4v5model *oldmod = NULL; |
|||
|
|||
for (; mod ; mod = mod->BSIM4v5nextModel) |
|||
{ if(oldmod) FREE(oldmod); |
|||
oldmod = mod; |
|||
prev = (BSIM4v5instance *)NULL; |
|||
for (here = mod->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) |
|||
{ if(prev) FREE(prev); |
|||
prev = here; |
|||
} |
|||
if(prev) FREE(prev); |
|||
} |
|||
if(oldmod) FREE(oldmod); |
|||
*model = NULL; |
|||
return; |
|||
} |
|||
@ -0,0 +1,385 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4geo.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
|
|||
/* |
|||
* WDLiu: |
|||
* This subrutine is a special module to process the geometry dependent |
|||
* parasitics for BSIM4v5, which calculates Ps, Pd, As, Ad, and Rs and Rd |
|||
* for multi-fingers and varous GEO and RGEO options. |
|||
*/ |
|||
|
|||
int |
|||
BSIM4v5RdsEndIso(double, double, double, double, double, double, int, int, double *); |
|||
int |
|||
BSIM4v5RdsEndSha(double, double, double, double, double, double, int, int, double *); |
|||
|
|||
int |
|||
BSIM4v5NumFingerDiff(nf, minSD, nuIntD, nuEndD, nuIntS, nuEndS) |
|||
int minSD; |
|||
double nf, *nuIntD, *nuEndD, *nuIntS, *nuEndS; |
|||
{ |
|||
int NF; |
|||
NF = (int)nf; |
|||
if ((NF%2) != 0) |
|||
{ *nuEndD = *nuEndS = 1.0; |
|||
*nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0); |
|||
} |
|||
else |
|||
{ if (minSD == 1) /* minimize # of source */ |
|||
{ *nuEndD = 2.0; |
|||
*nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); |
|||
*nuEndS = 0.0; |
|||
*nuIntS = nf; |
|||
} |
|||
else |
|||
{ *nuEndD = 0.0; |
|||
*nuIntD = nf; |
|||
*nuEndS = 2.0; |
|||
*nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v5PAeffGeo(nf, geo, minSD, Weffcj, DMCG, DMCI, DMDG, Ps, Pd, As, Ad) |
|||
int geo, minSD; |
|||
double Weffcj, DMCG, DMCI, DMDG; |
|||
double nf, *Ps, *Pd, *As, *Ad; |
|||
{ |
|||
double T0, T1, T2; |
|||
double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer; |
|||
double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer; |
|||
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; |
|||
|
|||
if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */ |
|||
BSIM4v5NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); |
|||
|
|||
T0 = DMCG + DMCI; |
|||
T1 = DMCG + DMCG; |
|||
T2 = DMDG + DMDG; |
|||
|
|||
PSiso = PDiso = T0 + T0 + Weffcj; |
|||
PSsha = PDsha = T1; |
|||
PSmer = PDmer = T2; |
|||
|
|||
ASiso = ADiso = T0 * Weffcj; |
|||
ASsha = ADsha = DMCG * Weffcj; |
|||
ASmer = ADmer = DMDG * Weffcj; |
|||
|
|||
switch(geo) |
|||
{ case 0: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 1: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 2: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 3: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 4: |
|||
*Ps = nuEndS * PSiso + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = nuEndS * ASiso + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 5: |
|||
*Ps = (nuEndS + nuIntS) * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = (nuEndS + nuIntS) * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 6: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDiso + nuIntD * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADiso + nuIntD * ADsha; |
|||
break; |
|||
case 7: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = (nuEndD + nuIntD) * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = (nuEndD + nuIntD) * ADsha; |
|||
break; |
|||
case 8: |
|||
*Ps = nuEndS * PSmer + nuIntS * PSsha; |
|||
*Pd = nuEndD * PDmer + nuIntD * PDsha; |
|||
*As = nuEndS * ASmer + nuIntS * ASsha; |
|||
*Ad = nuEndD * ADmer + nuIntD * ADsha; |
|||
break; |
|||
case 9: /* geo = 9 and 10 happen only when nf = even */ |
|||
*Ps = PSiso + (nf - 1.0) * PSsha; |
|||
*Pd = nf * PDsha; |
|||
*As = ASiso + (nf - 1.0) * ASsha; |
|||
*Ad = nf * ADsha; |
|||
break; |
|||
case 10: |
|||
*Ps = nf * PSsha; |
|||
*Pd = PDiso + (nf - 1.0) * PDsha; |
|||
*As = nf * ASsha; |
|||
*Ad = ADiso + (nf - 1.0) * ADsha; |
|||
break; |
|||
default: |
|||
printf("Warning: Specified GEO = %d not matched\n", geo); |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v5RdseffGeo(nf, geo, rgeo, minSD, Weffcj, Rsh, DMCG, DMCI, DMDG, Type, Rtot) |
|||
int geo, rgeo, minSD, Type; |
|||
double nf, Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
double *Rtot; |
|||
{ |
|||
double Rint=0.0, Rend = 0.0; |
|||
double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; |
|||
|
|||
if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */ |
|||
{ BSIM4v5NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); |
|||
|
|||
/* Internal S/D resistance -- assume shared S or D and all wide contacts */ |
|||
if (Type == 1) |
|||
{ if (nuIntS == 0.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / ( Weffcj * nuIntS); |
|||
} |
|||
else |
|||
{ if (nuIntD == 0.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / ( Weffcj * nuIntD); |
|||
} |
|||
} |
|||
|
|||
/* End S/D resistance -- geo dependent */ |
|||
switch(geo) |
|||
{ case 0: |
|||
if (Type == 1) BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 1: |
|||
if (Type == 1) BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 2: |
|||
if (Type == 1) BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 3: |
|||
if (Type == 1) BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 4: |
|||
if (Type == 1) BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else Rend = Rsh * DMDG / Weffcj; |
|||
break; |
|||
case 5: |
|||
if (Type == 1) BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndS, rgeo, 1, &Rend); |
|||
else Rend = Rsh * DMDG / (Weffcj * nuEndD); |
|||
break; |
|||
case 6: |
|||
if (Type == 1) Rend = Rsh * DMDG / Weffcj; |
|||
else BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 7: |
|||
if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS); |
|||
else BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, |
|||
nuEndD, rgeo, 0, &Rend); |
|||
break; |
|||
case 8: |
|||
Rend = Rsh * DMDG / Weffcj; |
|||
break; |
|||
case 9: /* all wide contacts assumed for geo = 9 and 10 */ |
|||
if (Type == 1) |
|||
{ Rend = 0.5 * Rsh * DMCG / Weffcj; |
|||
if (nf == 2.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); |
|||
} |
|||
else |
|||
{ Rend = 0.0; |
|||
Rint = Rsh * DMCG / (Weffcj * nf); |
|||
} |
|||
break; |
|||
case 10: |
|||
if (Type == 1) |
|||
{ Rend = 0.0; |
|||
Rint = Rsh * DMCG / (Weffcj * nf); |
|||
} |
|||
else |
|||
{ Rend = 0.5 * Rsh * DMCG / Weffcj;; |
|||
if (nf == 2.0) |
|||
Rint = 0.0; |
|||
else |
|||
Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); |
|||
} |
|||
break; |
|||
default: |
|||
printf("Warning: Specified GEO = %d not matched\n", geo); |
|||
} |
|||
|
|||
if (Rint <= 0.0) |
|||
*Rtot = Rend; |
|||
else if (Rend <= 0.0) |
|||
*Rtot = Rint; |
|||
else |
|||
*Rtot = Rint * Rend / (Rint + Rend); |
|||
if(*Rtot==0.0) |
|||
printf("Warning: Zero resistance returned from RdseffGeo\n"); |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) |
|||
double Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
int rgeo, Type; |
|||
double nuEnd, *Rend; |
|||
{ |
|||
if (Type == 1) |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 2: |
|||
case 5: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 3: |
|||
case 4: |
|||
case 6: |
|||
if ((DMCG + DMCI) == 0.0) |
|||
printf("(DMCG + DMCI) can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
else |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 3: |
|||
case 7: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 2: |
|||
case 4: |
|||
case 8: |
|||
if ((DMCG + DMCI) == 0.0) |
|||
printf("(DMCG + DMCI) can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, Type, Rend) |
|||
double Weffcj, Rsh, DMCG, DMCI, DMDG; |
|||
int rgeo, Type; |
|||
double nuEnd, *Rend; |
|||
{ |
|||
if (Type == 1) |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 2: |
|||
case 5: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 3: |
|||
case 4: |
|||
case 6: |
|||
if (DMCG == 0.0) |
|||
printf("DMCG can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
else |
|||
{ switch(rgeo) |
|||
{ case 1: |
|||
case 3: |
|||
case 7: |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * DMCG / (Weffcj * nuEnd); |
|||
break; |
|||
case 2: |
|||
case 4: |
|||
case 8: |
|||
if (DMCG == 0.0) |
|||
printf("DMCG can not be equal to zero\n"); |
|||
if (nuEnd == 0.0) |
|||
*Rend = 0.0; |
|||
else |
|||
*Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); |
|||
break; |
|||
default: |
|||
printf("Warning: Specified RGEO = %d not matched\n", rgeo); |
|||
} |
|||
} |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4getic.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "cktdefs.h" |
|||
#include "bsim4v5def.h" |
|||
#include "sperror.h" |
|||
#include "suffix.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v5getic(inModel,ckt) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
{ |
|||
BSIM4v5model *model = (BSIM4v5model*)inModel; |
|||
BSIM4v5instance *here; |
|||
|
|||
for (; model ; model = model->BSIM4v5nextModel) |
|||
{ for (here = model->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) |
|||
{ if (here->BSIM4v5owner != ARCHme) continue; |
|||
if (!here->BSIM4v5icVDSGiven) |
|||
{ here->BSIM4v5icVDS = *(ckt->CKTrhs + here->BSIM4v5dNode) |
|||
- *(ckt->CKTrhs + here->BSIM4v5sNode); |
|||
} |
|||
if (!here->BSIM4v5icVGSGiven) |
|||
{ here->BSIM4v5icVGS = *(ckt->CKTrhs + here->BSIM4v5gNodeExt) |
|||
- *(ckt->CKTrhs + here->BSIM4v5sNode); |
|||
} |
|||
if(!here->BSIM4v5icVBSGiven) |
|||
{ here->BSIM4v5icVBS = *(ckt->CKTrhs + here->BSIM4v5bNode) |
|||
- *(ckt->CKTrhs + here->BSIM4v5sNode); |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
4783
src/spicelib/devices/bsim4v5/b4v5ld.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2269
src/spicelib/devices/bsim4v5/b4v5mask.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,46 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4mdel.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "bsim4v5def.h" |
|||
#include "sperror.h" |
|||
#include "suffix.h" |
|||
|
|||
int |
|||
BSIM4v5mDelete(inModel,modname,kill) |
|||
GENmodel **inModel; |
|||
IFuid modname; |
|||
GENmodel *kill; |
|||
{ |
|||
BSIM4v5model **model = (BSIM4v5model**)inModel; |
|||
BSIM4v5model *modfast = (BSIM4v5model*)kill; |
|||
BSIM4v5instance *here; |
|||
BSIM4v5instance *prev = NULL; |
|||
BSIM4v5model **oldmod; |
|||
|
|||
oldmod = model; |
|||
for (; *model ; model = &((*model)->BSIM4v5nextModel)) |
|||
{ if ((*model)->BSIM4v5modName == modname || |
|||
(modfast && *model == modfast)) |
|||
goto delgot; |
|||
oldmod = model; |
|||
} |
|||
return(E_NOMOD); |
|||
|
|||
delgot: |
|||
*oldmod = (*model)->BSIM4v5nextModel; /* cut deleted device out of list */ |
|||
for (here = (*model)->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) |
|||
{ if(prev) FREE(prev); |
|||
prev = here; |
|||
} |
|||
if(prev) FREE(prev); |
|||
FREE(*model); |
|||
return(OK); |
|||
} |
|||
3093
src/spicelib/devices/bsim4v5/b4v5mpar.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,541 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4noi.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
* Modified by Xuemei Xi, 11/15/2002. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
* Modified by Xuemei Xi, 03/04/2004. |
|||
* Modified by Xuemei Xi, 07/29/2005. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "bsim4v5def.h" |
|||
#include "cktdefs.h" |
|||
#include "iferrmsg.h" |
|||
#include "noisedef.h" |
|||
#include "suffix.h" |
|||
#include "const.h" |
|||
|
|||
|
|||
extern void NevalSrc(); |
|||
extern double Nintegrate(); |
|||
|
|||
/* |
|||
* WDL: 1/f noise model has been smoothed out and enhanced with |
|||
* bulk charge effect as well as physical N* equ. and necessary |
|||
* conversion into the SI unit system. |
|||
*/ |
|||
|
|||
static double |
|||
BSIM4v5Eval1ovFNoise(Vds, model, here, freq, temp) |
|||
double Vds, freq, temp; |
|||
BSIM4v5model *model; |
|||
BSIM4v5instance *here; |
|||
{ |
|||
struct bsim4v5SizeDependParam *pParam; |
|||
double cd, esat, DelClm, EffFreq, N0, Nl, Leff, Leffsq; |
|||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; |
|||
|
|||
pParam = here->pParam; |
|||
cd = fabs(here->BSIM4v5cd); |
|||
Leff = pParam->BSIM4v5leff - 2.0 * model->BSIM4v5lintnoi; |
|||
Leffsq = Leff * Leff; |
|||
esat = 2.0 * here->BSIM4v5vsattemp / here->BSIM4v5ueff; |
|||
if(model->BSIM4v5em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ |
|||
else { |
|||
T0 = ((((Vds - here->BSIM4v5Vdseff) / pParam->BSIM4v5litl) |
|||
+ model->BSIM4v5em) / esat); |
|||
DelClm = pParam->BSIM4v5litl * log (MAX(T0, N_MINLOG)); |
|||
if (DelClm < 0.0) DelClm = 0.0; /* bugfix */ |
|||
} |
|||
EffFreq = pow(freq, model->BSIM4v5ef); |
|||
T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v5ueff; |
|||
T2 = 1.0e10 * EffFreq * here->BSIM4v5Abulk * model->BSIM4v5coxe * Leffsq; |
|||
N0 = model->BSIM4v5coxe * here->BSIM4v5Vgsteff / CHARGE; |
|||
Nl = model->BSIM4v5coxe * here->BSIM4v5Vgsteff |
|||
* (1.0 - here->BSIM4v5AbovVgst2Vtm * here->BSIM4v5Vdseff) / CHARGE; |
|||
|
|||
T3 = model->BSIM4v5oxideTrapDensityA |
|||
* log(MAX(((N0 + here->BSIM4v5nstar) / (Nl + here->BSIM4v5nstar)), N_MINLOG)); |
|||
T4 = model->BSIM4v5oxideTrapDensityB * (N0 - Nl); |
|||
T5 = model->BSIM4v5oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); |
|||
|
|||
T6 = CONSTboltz * temp * cd * cd; |
|||
T7 = 1.0e10 * EffFreq * Leffsq * pParam->BSIM4v5weff * here->BSIM4v5nf; |
|||
T8 = model->BSIM4v5oxideTrapDensityA + model->BSIM4v5oxideTrapDensityB * Nl |
|||
+ model->BSIM4v5oxideTrapDensityC * Nl * Nl; |
|||
T9 = (Nl + here->BSIM4v5nstar) * (Nl + here->BSIM4v5nstar); |
|||
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; |
|||
return Ssi; |
|||
} |
|||
|
|||
|
|||
int |
|||
BSIM4v5noise (mode, operation, inModel, ckt, data, OnDens) |
|||
int mode, operation; |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
Ndata *data; |
|||
double *OnDens; |
|||
{ |
|||
BSIM4v5model *model = (BSIM4v5model *)inModel; |
|||
BSIM4v5instance *here; |
|||
struct bsim4v5SizeDependParam *pParam; |
|||
char name[N_MXVLNTH]; |
|||
double tempOnoise; |
|||
double tempInoise; |
|||
double noizDens[BSIM4v5NSRCS]; |
|||
double lnNdens[BSIM4v5NSRCS]; |
|||
|
|||
double T0, T1, T2, T5, T10, T11; |
|||
double Vds, Ssi, Swi; |
|||
double tmp=0.0, gdpr, gspr, npart_theta=0.0, npart_beta=0.0, igsquare, bodymode; |
|||
|
|||
double m; |
|||
|
|||
int i; |
|||
|
|||
/* define the names of the noise sources */ |
|||
static char *BSIM4v5nNames[BSIM4v5NSRCS] = |
|||
{ /* Note that we have to keep the order */ |
|||
".rd", /* noise due to rd */ |
|||
".rs", /* noise due to rs */ |
|||
".rg", /* noise due to rgeltd */ |
|||
".rbps", /* noise due to rbps */ |
|||
".rbpd", /* noise due to rbpd */ |
|||
".rbpb", /* noise due to rbpb */ |
|||
".rbsb", /* noise due to rbsb */ |
|||
".rbdb", /* noise due to rbdb */ |
|||
".id", /* noise due to id */ |
|||
".1overf", /* flicker (1/f) noise */ |
|||
".igs", /* shot noise due to IGS */ |
|||
".igd", /* shot noise due to IGD */ |
|||
".igb", /* shot noise due to IGB */ |
|||
"" /* total transistor noise */ |
|||
}; |
|||
|
|||
for (; model != NULL; model = model->BSIM4v5nextModel) |
|||
{ for (here = model->BSIM4v5instances; here != NULL; |
|||
here = here->BSIM4v5nextInstance) |
|||
{ 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 < BSIM4v5NSRCS; i++) |
|||
{ (void) sprintf(name, "onoise.%s%s", |
|||
here->BSIM4v5name, |
|||
BSIM4v5nNames[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 < BSIM4v5NSRCS; i++) |
|||
{ (void) sprintf(name, "onoise_total.%s%s", |
|||
here->BSIM4v5name, |
|||
BSIM4v5nNames[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->BSIM4v5name, |
|||
BSIM4v5nNames[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: |
|||
m = here->BSIM4v5m; |
|||
switch (mode) |
|||
{ case N_DENS: |
|||
if (model->BSIM4v5tnoiMod == 0) |
|||
{ if (model->BSIM4v5rdsMod == 0) |
|||
{ gspr = here->BSIM4v5sourceConductance; |
|||
gdpr = here->BSIM4v5drainConductance; |
|||
if (here->BSIM4v5grdsw > 0.0) |
|||
tmp = 1.0 / here->BSIM4v5grdsw; /* tmp used below */ |
|||
else |
|||
tmp = 0.0; |
|||
} |
|||
else |
|||
{ gspr = here->BSIM4v5gstot; |
|||
gdpr = here->BSIM4v5gdtot; |
|||
tmp = 0.0; |
|||
} |
|||
} |
|||
else |
|||
{ T5 = here->BSIM4v5Vgsteff / here->BSIM4v5EsatL; |
|||
T5 *= T5; |
|||
npart_beta = model->BSIM4v5rnoia * (1.0 + T5 |
|||
* model->BSIM4v5tnoia * pParam->BSIM4v5leff); |
|||
npart_theta = model->BSIM4v5rnoib * (1.0 + T5 |
|||
* model->BSIM4v5tnoib * pParam->BSIM4v5leff); |
|||
|
|||
if (model->BSIM4v5rdsMod == 0) |
|||
{ gspr = here->BSIM4v5sourceConductance; |
|||
gdpr = here->BSIM4v5drainConductance; |
|||
} |
|||
else |
|||
{ gspr = here->BSIM4v5gstot; |
|||
gdpr = here->BSIM4v5gdtot; |
|||
} |
|||
|
|||
if ((*(ckt->CKTstates[0] + here->BSIM4v5vds)) >= 0.0) |
|||
gspr = gspr / (1.0 + npart_theta * npart_theta * gspr |
|||
/ here->BSIM4v5IdovVds); /* bugfix */ |
|||
else |
|||
gdpr = gdpr / (1.0 + npart_theta * npart_theta * gdpr |
|||
/ here->BSIM4v5IdovVds); |
|||
} |
|||
|
|||
NevalSrc(&noizDens[BSIM4v5RDNOIZ], |
|||
&lnNdens[BSIM4v5RDNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5dNodePrime, here->BSIM4v5dNode, |
|||
gdpr * m); |
|||
|
|||
NevalSrc(&noizDens[BSIM4v5RSNOIZ], |
|||
&lnNdens[BSIM4v5RSNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5sNodePrime, here->BSIM4v5sNode, |
|||
gspr * m); |
|||
|
|||
|
|||
if ((here->BSIM4v5rgateMod == 1) || (here->BSIM4v5rgateMod == 2)) |
|||
{ NevalSrc(&noizDens[BSIM4v5RGNOIZ], |
|||
&lnNdens[BSIM4v5RGNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5gNodePrime, here->BSIM4v5gNodeExt, |
|||
here->BSIM4v5grgeltd * m); |
|||
} |
|||
else if (here->BSIM4v5rgateMod == 3) |
|||
{ NevalSrc(&noizDens[BSIM4v5RGNOIZ], |
|||
&lnNdens[BSIM4v5RGNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5gNodeMid, here->BSIM4v5gNodeExt, |
|||
here->BSIM4v5grgeltd * m); |
|||
} |
|||
else |
|||
{ noizDens[BSIM4v5RGNOIZ] = 0.0; |
|||
lnNdens[BSIM4v5RGNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RGNOIZ], N_MINLOG)); |
|||
} |
|||
|
|||
bodymode = 5; |
|||
if (here->BSIM4v5rbodyMod == 2) |
|||
{ if( ( !model->BSIM4v5rbps0Given) || |
|||
( !model->BSIM4v5rbpd0Given) ) |
|||
bodymode = 1; |
|||
else |
|||
if( (!model->BSIM4v5rbsbx0Given && !model->BSIM4v5rbsby0Given) || |
|||
(!model->BSIM4v5rbdbx0Given && !model->BSIM4v5rbdby0Given) ) |
|||
bodymode = 3; |
|||
} |
|||
|
|||
if (here->BSIM4v5rbodyMod) |
|||
{ |
|||
if(bodymode == 5) |
|||
{ |
|||
NevalSrc(&noizDens[BSIM4v5RBPSNOIZ], |
|||
&lnNdens[BSIM4v5RBPSNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNodePrime, here->BSIM4v5sbNode, |
|||
here->BSIM4v5grbps * m); |
|||
NevalSrc(&noizDens[BSIM4v5RBPDNOIZ], |
|||
&lnNdens[BSIM4v5RBPDNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNodePrime, here->BSIM4v5dbNode, |
|||
here->BSIM4v5grbpd * m); |
|||
NevalSrc(&noizDens[BSIM4v5RBPBNOIZ], |
|||
&lnNdens[BSIM4v5RBPBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNodePrime, here->BSIM4v5bNode, |
|||
here->BSIM4v5grbpb * m); |
|||
NevalSrc(&noizDens[BSIM4v5RBSBNOIZ], |
|||
&lnNdens[BSIM4v5RBSBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNode, here->BSIM4v5sbNode, |
|||
here->BSIM4v5grbsb * m); |
|||
NevalSrc(&noizDens[BSIM4v5RBDBNOIZ], |
|||
&lnNdens[BSIM4v5RBDBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNode, here->BSIM4v5dbNode, |
|||
here->BSIM4v5grbdb * m); |
|||
} |
|||
if(bodymode == 3) |
|||
{ |
|||
NevalSrc(&noizDens[BSIM4v5RBPSNOIZ], |
|||
&lnNdens[BSIM4v5RBPSNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNodePrime, here->BSIM4v5sbNode, |
|||
here->BSIM4v5grbps * m); |
|||
NevalSrc(&noizDens[BSIM4v5RBPDNOIZ], |
|||
&lnNdens[BSIM4v5RBPDNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNodePrime, here->BSIM4v5dbNode, |
|||
here->BSIM4v5grbpd * m); |
|||
NevalSrc(&noizDens[BSIM4v5RBPBNOIZ], |
|||
&lnNdens[BSIM4v5RBPBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNodePrime, here->BSIM4v5bNode, |
|||
here->BSIM4v5grbpb * m); |
|||
noizDens[BSIM4v5RBSBNOIZ] = noizDens[BSIM4v5RBDBNOIZ] = 0.0; |
|||
lnNdens[BSIM4v5RBSBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBSBNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v5RBDBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBDBNOIZ], N_MINLOG)); |
|||
} |
|||
if(bodymode == 1) |
|||
{ |
|||
NevalSrc(&noizDens[BSIM4v5RBPBNOIZ], |
|||
&lnNdens[BSIM4v5RBPBNOIZ], ckt, THERMNOISE, |
|||
here->BSIM4v5bNodePrime, here->BSIM4v5bNode, |
|||
here->BSIM4v5grbpb * m); |
|||
noizDens[BSIM4v5RBPSNOIZ] = noizDens[BSIM4v5RBPDNOIZ] = 0.0; |
|||
noizDens[BSIM4v5RBSBNOIZ] = noizDens[BSIM4v5RBDBNOIZ] = 0.0; |
|||
lnNdens[BSIM4v5RBPSNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBPSNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v5RBPDNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBPDNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v5RBSBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBSBNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v5RBDBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBDBNOIZ], N_MINLOG)); |
|||
} |
|||
} |
|||
else |
|||
{ noizDens[BSIM4v5RBPSNOIZ] = noizDens[BSIM4v5RBPDNOIZ] = 0.0; |
|||
noizDens[BSIM4v5RBPBNOIZ] = 0.0; |
|||
noizDens[BSIM4v5RBSBNOIZ] = noizDens[BSIM4v5RBDBNOIZ] = 0.0; |
|||
lnNdens[BSIM4v5RBPSNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBPSNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v5RBPDNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBPDNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v5RBPBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBPBNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v5RBSBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBSBNOIZ], N_MINLOG)); |
|||
lnNdens[BSIM4v5RBDBNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5RBDBNOIZ], N_MINLOG)); |
|||
} |
|||
|
|||
|
|||
switch(model->BSIM4v5tnoiMod) |
|||
{ case 0: |
|||
T0 = m * here->BSIM4v5ueff * fabs(here->BSIM4v5qinv); |
|||
T1 = T0 * tmp + pParam->BSIM4v5leff |
|||
* pParam->BSIM4v5leff; |
|||
NevalSrc(&noizDens[BSIM4v5IDNOIZ], |
|||
&lnNdens[BSIM4v5IDNOIZ], ckt, |
|||
THERMNOISE, here->BSIM4v5dNodePrime, |
|||
here->BSIM4v5sNodePrime, |
|||
(T0 / T1) * model->BSIM4v5ntnoi); |
|||
break; |
|||
case 1: |
|||
T0 = m * (here->BSIM4v5gm + here->BSIM4v5gmbs + here->BSIM4v5gds); |
|||
T0 *= T0; |
|||
igsquare = npart_theta * npart_theta * T0 / here->BSIM4v5IdovVds; |
|||
T1 = npart_beta * (here->BSIM4v5gm |
|||
+ here->BSIM4v5gmbs) + here->BSIM4v5gds; |
|||
T2 = T1 * T1 / here->BSIM4v5IdovVds; |
|||
NevalSrc(&noizDens[BSIM4v5IDNOIZ], |
|||
&lnNdens[BSIM4v5IDNOIZ], ckt, |
|||
THERMNOISE, here->BSIM4v5dNodePrime, |
|||
here->BSIM4v5sNodePrime, (T2 - igsquare)); |
|||
break; |
|||
} |
|||
|
|||
NevalSrc(&noizDens[BSIM4v5FLNOIZ], (double*) NULL, |
|||
ckt, N_GAIN, here->BSIM4v5dNodePrime, |
|||
here->BSIM4v5sNodePrime, (double) 0.0); |
|||
|
|||
switch(model->BSIM4v5fnoiMod) |
|||
{ case 0: |
|||
noizDens[BSIM4v5FLNOIZ] *= m * model->BSIM4v5kf |
|||
* exp(model->BSIM4v5af |
|||
* log(MAX(fabs(here->BSIM4v5cd), |
|||
N_MINLOG))) |
|||
/ (pow(data->freq, model->BSIM4v5ef) |
|||
* pParam->BSIM4v5leff |
|||
* pParam->BSIM4v5leff |
|||
* model->BSIM4v5coxe); |
|||
break; |
|||
case 1: |
|||
Vds = *(ckt->CKTstates[0] + here->BSIM4v5vds); |
|||
if (Vds < 0.0) |
|||
Vds = -Vds; |
|||
|
|||
Ssi = BSIM4v5Eval1ovFNoise(Vds, model, here, |
|||
data->freq, ckt->CKTtemp); |
|||
T10 = model->BSIM4v5oxideTrapDensityA |
|||
* CONSTboltz * ckt->CKTtemp; |
|||
T11 = pParam->BSIM4v5weff * here->BSIM4v5nf * pParam->BSIM4v5leff |
|||
* pow(data->freq, model->BSIM4v5ef) * 1.0e10 |
|||
* here->BSIM4v5nstar * here->BSIM4v5nstar; |
|||
Swi = T10 / T11 * here->BSIM4v5cd |
|||
* here->BSIM4v5cd; |
|||
T1 = Swi + Ssi; |
|||
if (T1 > 0.0) |
|||
noizDens[BSIM4v5FLNOIZ] *= m * (Ssi * Swi) / T1; |
|||
else |
|||
noizDens[BSIM4v5FLNOIZ] *= 0.0; |
|||
break; |
|||
} |
|||
|
|||
lnNdens[BSIM4v5FLNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5FLNOIZ], N_MINLOG)); |
|||
|
|||
|
|||
if(here->BSIM4v5mode >= 0) { /* bugfix */ |
|||
NevalSrc(&noizDens[BSIM4v5IGSNOIZ], |
|||
&lnNdens[BSIM4v5IGSNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v5gNodePrime, here->BSIM4v5sNodePrime, |
|||
m * (here->BSIM4v5Igs + here->BSIM4v5Igcs)); |
|||
NevalSrc(&noizDens[BSIM4v5IGDNOIZ], |
|||
&lnNdens[BSIM4v5IGDNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v5gNodePrime, here->BSIM4v5dNodePrime, |
|||
m * (here->BSIM4v5Igd + here->BSIM4v5Igcd)); |
|||
} else { |
|||
NevalSrc(&noizDens[BSIM4v5IGSNOIZ], |
|||
&lnNdens[BSIM4v5IGSNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v5gNodePrime, here->BSIM4v5sNodePrime, |
|||
m * (here->BSIM4v5Igs + here->BSIM4v5Igcd)); |
|||
NevalSrc(&noizDens[BSIM4v5IGDNOIZ], |
|||
&lnNdens[BSIM4v5IGDNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v5gNodePrime, here->BSIM4v5dNodePrime, |
|||
m * (here->BSIM4v5Igd + here->BSIM4v5Igcs)); |
|||
} |
|||
NevalSrc(&noizDens[BSIM4v5IGBNOIZ], |
|||
&lnNdens[BSIM4v5IGBNOIZ], ckt, SHOTNOISE, |
|||
here->BSIM4v5gNodePrime, here->BSIM4v5bNodePrime, |
|||
m * here->BSIM4v5Igb); |
|||
|
|||
|
|||
noizDens[BSIM4v5TOTNOIZ] = noizDens[BSIM4v5RDNOIZ] |
|||
+ noizDens[BSIM4v5RSNOIZ] + noizDens[BSIM4v5RGNOIZ] |
|||
+ noizDens[BSIM4v5RBPSNOIZ] + noizDens[BSIM4v5RBPDNOIZ] |
|||
+ noizDens[BSIM4v5RBPBNOIZ] |
|||
+ noizDens[BSIM4v5RBSBNOIZ] + noizDens[BSIM4v5RBDBNOIZ] |
|||
+ noizDens[BSIM4v5IDNOIZ] + noizDens[BSIM4v5FLNOIZ] |
|||
+ noizDens[BSIM4v5IGSNOIZ] + noizDens[BSIM4v5IGDNOIZ] |
|||
+ noizDens[BSIM4v5IGBNOIZ]; |
|||
lnNdens[BSIM4v5TOTNOIZ] = |
|||
log(MAX(noizDens[BSIM4v5TOTNOIZ], N_MINLOG)); |
|||
|
|||
*OnDens += noizDens[BSIM4v5TOTNOIZ]; |
|||
|
|||
if (data->delFreq == 0.0) |
|||
{ /* if we haven't done any previous |
|||
integration, we need to initialize our |
|||
"history" variables. |
|||
*/ |
|||
|
|||
for (i = 0; i < BSIM4v5NSRCS; i++) |
|||
{ here->BSIM4v5nVar[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 < BSIM4v5NSRCS; i++) |
|||
{ here->BSIM4v5nVar[OUTNOIZ][i] = 0.0; |
|||
here->BSIM4v5nVar[INNOIZ][i] = 0.0; |
|||
} |
|||
} |
|||
} |
|||
else |
|||
{ /* data->delFreq != 0.0, |
|||
we have to integrate. |
|||
*/ |
|||
for (i = 0; i < BSIM4v5NSRCS; i++) |
|||
{ if (i != BSIM4v5TOTNOIZ) |
|||
{ tempOnoise = Nintegrate(noizDens[i], |
|||
lnNdens[i], |
|||
here->BSIM4v5nVar[LNLSTDENS][i], |
|||
data); |
|||
tempInoise = Nintegrate(noizDens[i] |
|||
* data->GainSqInv, lnNdens[i] |
|||
+ data->lnGainInv, |
|||
here->BSIM4v5nVar[LNLSTDENS][i] |
|||
+ data->lnGainInv, data); |
|||
here->BSIM4v5nVar[LNLSTDENS][i] = |
|||
lnNdens[i]; |
|||
data->outNoiz += tempOnoise; |
|||
data->inNoise += tempInoise; |
|||
if (((NOISEAN*) |
|||
ckt->CKTcurJob)->NStpsSm != 0) |
|||
{ here->BSIM4v5nVar[OUTNOIZ][i] |
|||
+= tempOnoise; |
|||
here->BSIM4v5nVar[OUTNOIZ][BSIM4v5TOTNOIZ] |
|||
+= tempOnoise; |
|||
here->BSIM4v5nVar[INNOIZ][i] |
|||
+= tempInoise; |
|||
here->BSIM4v5nVar[INNOIZ][BSIM4v5TOTNOIZ] |
|||
+= tempInoise; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if (data->prtSummary) |
|||
{ for (i = 0; i < BSIM4v5NSRCS; 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 < BSIM4v5NSRCS; i++) |
|||
{ data->outpVector[data->outNumber++] |
|||
= here->BSIM4v5nVar[OUTNOIZ][i]; |
|||
data->outpVector[data->outNumber++] |
|||
= here->BSIM4v5nVar[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); |
|||
} |
|||
@ -0,0 +1,198 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2004 Regents of the University of California. All rights reserved. |
|||
* File: b4par.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 04/06/2001. |
|||
* Modified by Xuemei Xi, 11/15/2002. |
|||
* Modified by Xuemei Xi, 05/09/2003. |
|||
* Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "ifsim.h" |
|||
#include "bsim4v5def.h" |
|||
#include "sperror.h" |
|||
#include "suffix.h" |
|||
#include "fteext.h" |
|||
|
|||
int |
|||
BSIM4v5param(param,value,inst,select) |
|||
int param; |
|||
IFvalue *value; |
|||
GENinstance *inst; |
|||
IFvalue *select; |
|||
{ |
|||
double scale; |
|||
|
|||
if ( !cp_getvar( "scale", CP_REAL, (double*) &scale ) ) scale = 1; |
|||
|
|||
BSIM4v5instance *here = (BSIM4v5instance*)inst; |
|||
switch(param) |
|||
{ case BSIM4v5_W: |
|||
here->BSIM4v5w = value->rValue*scale; |
|||
here->BSIM4v5wGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_L: |
|||
here->BSIM4v5l = value->rValue*scale; |
|||
here->BSIM4v5lGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_M: |
|||
here->BSIM4v5m = value->rValue; |
|||
here->BSIM4v5mGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_NF: |
|||
here->BSIM4v5nf = value->rValue; |
|||
here->BSIM4v5nfGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_MIN: |
|||
here->BSIM4v5min = value->iValue; |
|||
here->BSIM4v5minGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_AS: |
|||
here->BSIM4v5sourceArea = value->rValue*scale*scale; |
|||
here->BSIM4v5sourceAreaGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_AD: |
|||
here->BSIM4v5drainArea = value->rValue*scale*scale; |
|||
here->BSIM4v5drainAreaGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_PS: |
|||
here->BSIM4v5sourcePerimeter = value->rValue*scale; |
|||
here->BSIM4v5sourcePerimeterGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_PD: |
|||
here->BSIM4v5drainPerimeter = value->rValue*scale; |
|||
here->BSIM4v5drainPerimeterGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_NRS: |
|||
here->BSIM4v5sourceSquares = value->rValue; |
|||
here->BSIM4v5sourceSquaresGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_NRD: |
|||
here->BSIM4v5drainSquares = value->rValue; |
|||
here->BSIM4v5drainSquaresGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_OFF: |
|||
here->BSIM4v5off = value->iValue; |
|||
break; |
|||
case BSIM4v5_SA: |
|||
here->BSIM4v5sa = value->rValue*scale; |
|||
here->BSIM4v5saGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_SB: |
|||
here->BSIM4v5sb = value->rValue*scale; |
|||
here->BSIM4v5sbGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_SD: |
|||
here->BSIM4v5sd = value->rValue*scale; |
|||
here->BSIM4v5sdGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_SCA: |
|||
here->BSIM4v5sca = value->rValue; |
|||
here->BSIM4v5scaGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_SCB: |
|||
here->BSIM4v5scb = value->rValue; |
|||
here->BSIM4v5scbGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_SCC: |
|||
here->BSIM4v5scc = value->rValue; |
|||
here->BSIM4v5sccGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_SC: |
|||
here->BSIM4v5sc = value->rValue*scale; |
|||
here->BSIM4v5scGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_RBSB: |
|||
here->BSIM4v5rbsb = value->rValue; |
|||
here->BSIM4v5rbsbGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_RBDB: |
|||
here->BSIM4v5rbdb = value->rValue; |
|||
here->BSIM4v5rbdbGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_RBPB: |
|||
here->BSIM4v5rbpb = value->rValue; |
|||
here->BSIM4v5rbpbGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_RBPS: |
|||
here->BSIM4v5rbps = value->rValue; |
|||
here->BSIM4v5rbpsGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_RBPD: |
|||
here->BSIM4v5rbpd = value->rValue; |
|||
here->BSIM4v5rbpdGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_DELVTO: |
|||
here->BSIM4v5delvto = value->rValue; |
|||
here->BSIM4v5delvtoGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_XGW: |
|||
here->BSIM4v5xgw = value->rValue; |
|||
here->BSIM4v5xgwGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_NGCON: |
|||
here->BSIM4v5ngcon = value->rValue; |
|||
here->BSIM4v5ngconGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_TRNQSMOD: |
|||
here->BSIM4v5trnqsMod = value->iValue; |
|||
here->BSIM4v5trnqsModGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_ACNQSMOD: |
|||
here->BSIM4v5acnqsMod = value->iValue; |
|||
here->BSIM4v5acnqsModGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_RBODYMOD: |
|||
here->BSIM4v5rbodyMod = value->iValue; |
|||
here->BSIM4v5rbodyModGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_RGATEMOD: |
|||
here->BSIM4v5rgateMod = value->iValue; |
|||
here->BSIM4v5rgateModGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_GEOMOD: |
|||
here->BSIM4v5geoMod = value->iValue; |
|||
here->BSIM4v5geoModGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_RGEOMOD: |
|||
here->BSIM4v5rgeoMod = value->iValue; |
|||
here->BSIM4v5rgeoModGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_IC_VDS: |
|||
here->BSIM4v5icVDS = value->rValue; |
|||
here->BSIM4v5icVDSGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_IC_VGS: |
|||
here->BSIM4v5icVGS = value->rValue; |
|||
here->BSIM4v5icVGSGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_IC_VBS: |
|||
here->BSIM4v5icVBS = value->rValue; |
|||
here->BSIM4v5icVBSGiven = TRUE; |
|||
break; |
|||
case BSIM4v5_IC: |
|||
switch(value->v.numValue) |
|||
{ case 3: |
|||
here->BSIM4v5icVBS = *(value->v.vec.rVec+2); |
|||
here->BSIM4v5icVBSGiven = TRUE; |
|||
case 2: |
|||
here->BSIM4v5icVGS = *(value->v.vec.rVec+1); |
|||
here->BSIM4v5icVGSGiven = TRUE; |
|||
case 1: |
|||
here->BSIM4v5icVDS = *(value->v.vec.rVec); |
|||
here->BSIM4v5icVDSGiven = TRUE; |
|||
break; |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
break; |
|||
default: |
|||
return(E_BADPARM); |
|||
} |
|||
return(OK); |
|||
} |
|||
@ -0,0 +1,758 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2005 Regents of the University of California. All rights reserved. |
|||
* File: b4pzld.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
* Modified by Xuemei Xi, 10/05/2001. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "cktdefs.h" |
|||
#include "complex.h" |
|||
#include "sperror.h" |
|||
#include "bsim4v5def.h" |
|||
#include "suffix.h" |
|||
|
|||
int |
|||
BSIM4v5pzLoad(inModel,ckt,s) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
SPcomplex *s; |
|||
{ |
|||
BSIM4v5model *model = (BSIM4v5model*)inModel; |
|||
BSIM4v5instance *here; |
|||
|
|||
double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; |
|||
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; |
|||
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; |
|||
double gds, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; |
|||
double gstot, gstotd, gstotg, gstots, gstotb, gspr; |
|||
double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; |
|||
double gIstotg, gIstotd, gIstots, gIstotb; |
|||
double gIdtotg, gIdtotd, gIdtots, gIdtotb; |
|||
double gIbtotg, gIbtotd, gIbtots, gIbtotb; |
|||
double gIgtotg, gIgtotd, gIgtots, gIgtotb; |
|||
double cgso, cgdo, cgbo; |
|||
double xcdbdb=0.0, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb=0.0, xcsgmb=0.0; |
|||
double xcgmbb=0.0, xcbgmb=0.0; |
|||
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0; |
|||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb; |
|||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; |
|||
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; |
|||
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; |
|||
double T0=0.0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; |
|||
double ScalingFactor = 1.0e-9; |
|||
struct bsim4v5SizeDependParam *pParam; |
|||
double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; |
|||
|
|||
double m; |
|||
|
|||
for (; model != NULL; model = model->BSIM4v5nextModel) |
|||
{ for (here = model->BSIM4v5instances; here!= NULL; |
|||
here = here->BSIM4v5nextInstance) |
|||
{ if (here->BSIM4v5owner != ARCHme) continue; |
|||
pParam = here->pParam; |
|||
capbd = here->BSIM4v5capbd; |
|||
capbs = here->BSIM4v5capbs; |
|||
cgso = here->BSIM4v5cgso; |
|||
cgdo = here->BSIM4v5cgdo; |
|||
cgbo = pParam->BSIM4v5cgbo; |
|||
|
|||
if (here->BSIM4v5mode >= 0) |
|||
{ Gm = here->BSIM4v5gm; |
|||
Gmbs = here->BSIM4v5gmbs; |
|||
FwdSum = Gm + Gmbs; |
|||
RevSum = 0.0; |
|||
|
|||
gbbdp = -(here->BSIM4v5gbds); |
|||
gbbsp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; |
|||
gbdpg = here->BSIM4v5gbgs; |
|||
gbdpdp = here->BSIM4v5gbds; |
|||
gbdpb = here->BSIM4v5gbbs; |
|||
gbdpsp = -(gbdpg + gbdpdp + gbdpb); |
|||
|
|||
gbspdp = 0.0; |
|||
gbspg = 0.0; |
|||
gbspb = 0.0; |
|||
gbspsp = 0.0; |
|||
|
|||
if (model->BSIM4v5igcMod) |
|||
{ gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcsg; |
|||
gIstotd = here->BSIM4v5gIgcsd; |
|||
gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcss; |
|||
gIstotb = here->BSIM4v5gIgcsb; |
|||
|
|||
gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcdg; |
|||
gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcdd; |
|||
gIdtots = here->BSIM4v5gIgcds; |
|||
gIdtotb = here->BSIM4v5gIgcdb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v5igbMod) |
|||
{ gIbtotg = here->BSIM4v5gIgbg; |
|||
gIbtotd = here->BSIM4v5gIgbd; |
|||
gIbtots = here->BSIM4v5gIgbs; |
|||
gIbtotb = here->BSIM4v5gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v5rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v5vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v5vgs); |
|||
else if (here->BSIM4v5rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v5vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v5vgs); |
|||
if (here->BSIM4v5rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v5gcrgd * T0; |
|||
gcrgg = here->BSIM4v5gcrgg * T0; |
|||
gcrgs = here->BSIM4v5gcrgs * T0; |
|||
gcrgb = here->BSIM4v5gcrgb * T0; |
|||
gcrgg -= here->BSIM4v5gcrg; |
|||
gcrg = here->BSIM4v5gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v5acnqsMod == 0) |
|||
{ if (here->BSIM4v5rgateMod == 3) |
|||
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v5cgbo; |
|||
xcgmdb = -cgdo; |
|||
xcgmsb = -cgso; |
|||
xcgmbb = -pParam->BSIM4v5cgbo; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggb = here->BSIM4v5cggb; |
|||
xcgdb = here->BSIM4v5cgdb; |
|||
xcgsb = here->BSIM4v5cgsb; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = here->BSIM4v5cdgb; |
|||
xcsgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb |
|||
+ here->BSIM4v5cdgb); |
|||
xcbgb = here->BSIM4v5cbgb; |
|||
} |
|||
else |
|||
{ xcggb = here->BSIM4v5cggb + cgdo + cgso |
|||
+ pParam->BSIM4v5cgbo; |
|||
xcgdb = here->BSIM4v5cgdb - cgdo; |
|||
xcgsb = here->BSIM4v5cgsb - cgso; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = here->BSIM4v5cdgb - cgdo; |
|||
xcsgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb |
|||
+ here->BSIM4v5cdgb + cgso); |
|||
xcbgb = here->BSIM4v5cbgb - pParam->BSIM4v5cgbo; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddb = here->BSIM4v5cddb + here->BSIM4v5capbd + cgdo; |
|||
xcdsb = here->BSIM4v5cdsb; |
|||
|
|||
xcsdb = -(here->BSIM4v5cgdb + here->BSIM4v5cbdb |
|||
+ here->BSIM4v5cddb); |
|||
xcssb = here->BSIM4v5capbs + cgso - (here->BSIM4v5cgsb |
|||
+ here->BSIM4v5cbsb + here->BSIM4v5cdsb); |
|||
|
|||
if (!here->BSIM4v5rbodyMod) |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); |
|||
xcbdb = here->BSIM4v5cbdb - here->BSIM4v5capbd; |
|||
xcbsb = here->BSIM4v5cbsb - here->BSIM4v5capbs; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbb = -(here->BSIM4v5cddb + here->BSIM4v5cdgb |
|||
+ here->BSIM4v5cdsb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb) |
|||
+ here->BSIM4v5capbs; |
|||
xcbdb = here->BSIM4v5cbdb; |
|||
xcbsb = here->BSIM4v5cbsb; |
|||
|
|||
xcdbdb = -here->BSIM4v5capbd; |
|||
xcsbsb = -here->BSIM4v5capbs; |
|||
} |
|||
xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); |
|||
|
|||
xgtg = xgtd = xgts = xgtb = 0.0; |
|||
sxpart = 0.6; |
|||
dxpart = 0.4; |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0; |
|||
xcbgb = xcbdb = xcbsb = xcbbb = 0.0; |
|||
xcdgb = xcddb = xcdsb = xcdbb = 0.0; |
|||
xcsgb = xcsdb = xcssb = xcsbb = 0.0; |
|||
|
|||
xgtg = here->BSIM4v5gtg; |
|||
xgtd = here->BSIM4v5gtd; |
|||
xgts = here->BSIM4v5gts; |
|||
xgtb = here->BSIM4v5gtb; |
|||
|
|||
xcqgb = here->BSIM4v5cqgb; |
|||
xcqdb = here->BSIM4v5cqdb; |
|||
xcqsb = here->BSIM4v5cqsb; |
|||
xcqbb = here->BSIM4v5cqbb; |
|||
|
|||
CoxWL = model->BSIM4v5coxe * here->pParam->BSIM4v5weffCV |
|||
* here->BSIM4v5nf * here->pParam->BSIM4v5leffCV; |
|||
qcheq = -(here->BSIM4v5qgate + here->BSIM4v5qbulk); |
|||
if (fabs(qcheq) <= 1.0e-5 * CoxWL) |
|||
{ if (model->BSIM4v5xpart < 0.5) |
|||
{ dxpart = 0.4; |
|||
} |
|||
else if (model->BSIM4v5xpart > 0.5) |
|||
{ dxpart = 0.0; |
|||
} |
|||
else |
|||
{ dxpart = 0.5; |
|||
} |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ dxpart = here->BSIM4v5qdrn / qcheq; |
|||
Cdd = here->BSIM4v5cddb; |
|||
Csd = -(here->BSIM4v5cgdb + here->BSIM4v5cddb |
|||
+ here->BSIM4v5cbdb); |
|||
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; |
|||
Cdg = here->BSIM4v5cdgb; |
|||
Csg = -(here->BSIM4v5cggb + here->BSIM4v5cdgb |
|||
+ here->BSIM4v5cbgb); |
|||
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; |
|||
|
|||
Cds = here->BSIM4v5cdsb; |
|||
Css = -(here->BSIM4v5cgsb + here->BSIM4v5cdsb |
|||
+ here->BSIM4v5cbsb); |
|||
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->BSIM4v5gm; |
|||
Gmbs = -here->BSIM4v5gmbs; |
|||
FwdSum = 0.0; |
|||
RevSum = -(Gm + Gmbs); |
|||
|
|||
gbbsp = -(here->BSIM4v5gbds); |
|||
gbbdp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; |
|||
|
|||
gbdpg = 0.0; |
|||
gbdpsp = 0.0; |
|||
gbdpb = 0.0; |
|||
gbdpdp = 0.0; |
|||
|
|||
gbspg = here->BSIM4v5gbgs; |
|||
gbspsp = here->BSIM4v5gbds; |
|||
gbspb = here->BSIM4v5gbbs; |
|||
gbspdp = -(gbspg + gbspsp + gbspb); |
|||
|
|||
if (model->BSIM4v5igcMod) |
|||
{ gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcdg; |
|||
gIstotd = here->BSIM4v5gIgcds; |
|||
gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcdd; |
|||
gIstotb = here->BSIM4v5gIgcdb; |
|||
|
|||
gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg; |
|||
gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcss; |
|||
gIdtots = here->BSIM4v5gIgcsd; |
|||
gIdtotb = here->BSIM4v5gIgcsb; |
|||
} |
|||
else |
|||
{ gIstotg = gIstotd = gIstots = gIstotb = 0.0; |
|||
gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; |
|||
} |
|||
|
|||
if (model->BSIM4v5igbMod) |
|||
{ gIbtotg = here->BSIM4v5gIgbg; |
|||
gIbtotd = here->BSIM4v5gIgbs; |
|||
gIbtots = here->BSIM4v5gIgbd; |
|||
gIbtotb = here->BSIM4v5gIgbb; |
|||
} |
|||
else |
|||
gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; |
|||
|
|||
if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) |
|||
{ gIgtotg = gIstotg + gIdtotg + gIbtotg; |
|||
gIgtotd = gIstotd + gIdtotd + gIbtotd ; |
|||
gIgtots = gIstots + gIdtots + gIbtots; |
|||
gIgtotb = gIstotb + gIdtotb + gIbtotb; |
|||
} |
|||
else |
|||
gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; |
|||
|
|||
if (here->BSIM4v5rgateMod == 2) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v5vges) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v5vgs); |
|||
else if (here->BSIM4v5rgateMod == 3) |
|||
T0 = *(ckt->CKTstates[0] + here->BSIM4v5vgms) |
|||
- *(ckt->CKTstates[0] + here->BSIM4v5vgs); |
|||
if (here->BSIM4v5rgateMod > 1) |
|||
{ gcrgd = here->BSIM4v5gcrgs * T0; |
|||
gcrgg = here->BSIM4v5gcrgg * T0; |
|||
gcrgs = here->BSIM4v5gcrgd * T0; |
|||
gcrgb = here->BSIM4v5gcrgb * T0; |
|||
gcrgg -= here->BSIM4v5gcrg; |
|||
gcrg = here->BSIM4v5gcrg; |
|||
} |
|||
else |
|||
gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; |
|||
|
|||
if (here->BSIM4v5acnqsMod == 0) |
|||
{ if (here->BSIM4v5rgateMod == 3) |
|||
{ xcgmgmb = cgdo + cgso + pParam->BSIM4v5cgbo; |
|||
xcgmdb = -cgdo; |
|||
xcgmsb = -cgso; |
|||
xcgmbb = -pParam->BSIM4v5cgbo; |
|||
|
|||
xcdgmb = xcgmdb; |
|||
xcsgmb = xcgmsb; |
|||
xcbgmb = xcgmbb; |
|||
|
|||
xcggb = here->BSIM4v5cggb; |
|||
xcgdb = here->BSIM4v5cgsb; |
|||
xcgsb = here->BSIM4v5cgdb; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb |
|||
+ here->BSIM4v5cdgb); |
|||
xcsgb = here->BSIM4v5cdgb; |
|||
xcbgb = here->BSIM4v5cbgb; |
|||
} |
|||
else |
|||
{ xcggb = here->BSIM4v5cggb + cgdo + cgso |
|||
+ pParam->BSIM4v5cgbo; |
|||
xcgdb = here->BSIM4v5cgsb - cgdo; |
|||
xcgsb = here->BSIM4v5cgdb - cgso; |
|||
xcgbb = -(xcggb + xcgdb + xcgsb); |
|||
|
|||
xcdgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb |
|||
+ here->BSIM4v5cdgb + cgdo); |
|||
xcsgb = here->BSIM4v5cdgb - cgso; |
|||
xcbgb = here->BSIM4v5cbgb - pParam->BSIM4v5cgbo; |
|||
|
|||
xcdgmb = xcsgmb = xcbgmb = 0.0; |
|||
} |
|||
xcddb = here->BSIM4v5capbd + cgdo - (here->BSIM4v5cgsb |
|||
+ here->BSIM4v5cbsb + here->BSIM4v5cdsb); |
|||
xcdsb = -(here->BSIM4v5cgdb + here->BSIM4v5cbdb |
|||
+ here->BSIM4v5cddb); |
|||
|
|||
xcsdb = here->BSIM4v5cdsb; |
|||
xcssb = here->BSIM4v5cddb + here->BSIM4v5capbs + cgso; |
|||
|
|||
if (!here->BSIM4v5rbodyMod) |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); |
|||
xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); |
|||
xcbdb = here->BSIM4v5cbsb - here->BSIM4v5capbd; |
|||
xcbsb = here->BSIM4v5cbdb - here->BSIM4v5capbs; |
|||
xcdbdb = 0.0; |
|||
} |
|||
else |
|||
{ xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) |
|||
+ here->BSIM4v5capbd; |
|||
xcsbb = -(here->BSIM4v5cddb + here->BSIM4v5cdgb |
|||
+ here->BSIM4v5cdsb); |
|||
xcbdb = here->BSIM4v5cbsb; |
|||
xcbsb = here->BSIM4v5cbdb; |
|||
xcdbdb = -here->BSIM4v5capbd; |
|||
xcsbsb = -here->BSIM4v5capbs; |
|||
} |
|||
xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); |
|||
|
|||
xgtg = xgtd = xgts = xgtb = 0.0; |
|||
sxpart = 0.4; |
|||
dxpart = 0.6; |
|||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb |
|||
= ddxpart_dVs = 0.0; |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ xcggb = xcgdb = xcgsb = xcgbb = 0.0; |
|||
xcbgb = xcbdb = xcbsb = xcbbb = 0.0; |
|||
xcdgb = xcddb = xcdsb = xcdbb = 0.0; |
|||
xcsgb = xcsdb = xcssb = xcsbb = 0.0; |
|||
|
|||
xgtg = here->BSIM4v5gtg; |
|||
xgtd = here->BSIM4v5gts; |
|||
xgts = here->BSIM4v5gtd; |
|||
xgtb = here->BSIM4v5gtb; |
|||
|
|||
xcqgb = here->BSIM4v5cqgb; |
|||
xcqdb = here->BSIM4v5cqsb; |
|||
xcqsb = here->BSIM4v5cqdb; |
|||
xcqbb = here->BSIM4v5cqbb; |
|||
|
|||
CoxWL = model->BSIM4v5coxe * here->pParam->BSIM4v5weffCV |
|||
* here->BSIM4v5nf * here->pParam->BSIM4v5leffCV; |
|||
qcheq = -(here->BSIM4v5qgate + here->BSIM4v5qbulk); |
|||
if (fabs(qcheq) <= 1.0e-5 * CoxWL) |
|||
{ if (model->BSIM4v5xpart < 0.5) |
|||
{ sxpart = 0.4; |
|||
} |
|||
else if (model->BSIM4v5xpart > 0.5) |
|||
{ sxpart = 0.0; |
|||
} |
|||
else |
|||
{ sxpart = 0.5; |
|||
} |
|||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb |
|||
= dsxpart_dVs = 0.0; |
|||
} |
|||
else |
|||
{ sxpart = here->BSIM4v5qdrn / qcheq; |
|||
Css = here->BSIM4v5cddb; |
|||
Cds = -(here->BSIM4v5cgdb + here->BSIM4v5cddb |
|||
+ here->BSIM4v5cbdb); |
|||
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; |
|||
Csg = here->BSIM4v5cdgb; |
|||
Cdg = -(here->BSIM4v5cggb + here->BSIM4v5cdgb |
|||
+ here->BSIM4v5cbgb); |
|||
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; |
|||
|
|||
Csd = here->BSIM4v5cdsb; |
|||
Cdd = -(here->BSIM4v5cgsb + here->BSIM4v5cdsb |
|||
+ here->BSIM4v5cbsb); |
|||
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; |
|||
|
|||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg |
|||
+ dsxpart_dVs); |
|||
} |
|||
dxpart = 1.0 - sxpart; |
|||
ddxpart_dVd = -dsxpart_dVd; |
|||
ddxpart_dVg = -dsxpart_dVg; |
|||
ddxpart_dVs = -dsxpart_dVs; |
|||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); |
|||
} |
|||
} |
|||
|
|||
if (model->BSIM4v5rdsMod == 1) |
|||
{ gstot = here->BSIM4v5gstot; |
|||
gstotd = here->BSIM4v5gstotd; |
|||
gstotg = here->BSIM4v5gstotg; |
|||
gstots = here->BSIM4v5gstots - gstot; |
|||
gstotb = here->BSIM4v5gstotb; |
|||
|
|||
gdtot = here->BSIM4v5gdtot; |
|||
gdtotd = here->BSIM4v5gdtotd - gdtot; |
|||
gdtotg = here->BSIM4v5gdtotg; |
|||
gdtots = here->BSIM4v5gdtots; |
|||
gdtotb = here->BSIM4v5gdtotb; |
|||
} |
|||
else |
|||
{ gstot = gstotd = gstotg = gstots = gstotb = 0.0; |
|||
gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; |
|||
} |
|||
|
|||
|
|||
T1 = *(ckt->CKTstate0 + here->BSIM4v5qdef) * here->BSIM4v5gtau; |
|||
gds = here->BSIM4v5gds; |
|||
|
|||
/* |
|||
* Loading PZ matrix |
|||
*/ |
|||
|
|||
m = here->BSIM4v5m; |
|||
|
|||
if (!model->BSIM4v5rdsMod) |
|||
{ gdpr = here->BSIM4v5drainConductance; |
|||
gspr = here->BSIM4v5sourceConductance; |
|||
} |
|||
else |
|||
gdpr = gspr = 0.0; |
|||
|
|||
if (!here->BSIM4v5rbodyMod) |
|||
{ gjbd = here->BSIM4v5gbd; |
|||
gjbs = here->BSIM4v5gbs; |
|||
} |
|||
else |
|||
gjbd = gjbs = 0.0; |
|||
|
|||
geltd = here->BSIM4v5grgeltd; |
|||
|
|||
if (here->BSIM4v5rgateMod == 1) |
|||
{ *(here->BSIM4v5GEgePtr) += m * geltd; |
|||
*(here->BSIM4v5GPgePtr) -= m * geltd; |
|||
*(here->BSIM4v5GEgpPtr) -= m * geltd; |
|||
|
|||
*(here->BSIM4v5GPgpPtr ) += m * xcggb * s->real; |
|||
*(here->BSIM4v5GPgpPtr +1) += m * xcggb * s->imag; |
|||
*(here->BSIM4v5GPgpPtr) += m * (geltd - xgtg + gIgtotg); |
|||
*(here->BSIM4v5GPdpPtr ) += m * xcgdb * s->real; |
|||
*(here->BSIM4v5GPdpPtr +1) += m * xcgdb * s->imag; |
|||
*(here->BSIM4v5GPdpPtr) -= m * (xgtd - gIgtotd); |
|||
*(here->BSIM4v5GPspPtr ) += m * xcgsb * s->real; |
|||
*(here->BSIM4v5GPspPtr +1) += m * xcgsb * s->imag; |
|||
*(here->BSIM4v5GPspPtr) -= m * (xgts - gIgtots); |
|||
*(here->BSIM4v5GPbpPtr ) += m * xcgbb * s->real; |
|||
*(here->BSIM4v5GPbpPtr +1) += m * xcgbb * s->imag; |
|||
*(here->BSIM4v5GPbpPtr) -= m * (xgtb - gIgtotb); |
|||
} |
|||
else if (here->BSIM4v5rgateMod == 2) |
|||
{ *(here->BSIM4v5GEgePtr) += m * gcrg; |
|||
*(here->BSIM4v5GEgpPtr) += m * gcrgg; |
|||
*(here->BSIM4v5GEdpPtr) += m * gcrgd; |
|||
*(here->BSIM4v5GEspPtr) += m * gcrgs; |
|||
*(here->BSIM4v5GEbpPtr) += m * gcrgb; |
|||
|
|||
*(here->BSIM4v5GPgePtr) -= m * gcrg; |
|||
*(here->BSIM4v5GPgpPtr ) += m * xcggb * s->real; |
|||
*(here->BSIM4v5GPgpPtr +1) += m * xcggb * s->imag; |
|||
*(here->BSIM4v5GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); |
|||
*(here->BSIM4v5GPdpPtr ) += m * xcgdb * s->real; |
|||
*(here->BSIM4v5GPdpPtr +1) += m * xcgdb * s->imag; |
|||
*(here->BSIM4v5GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); |
|||
*(here->BSIM4v5GPspPtr ) += m * xcgsb * s->real; |
|||
*(here->BSIM4v5GPspPtr +1) += m * xcgsb * s->imag; |
|||
*(here->BSIM4v5GPspPtr) -= m * (gcrgs + xgts - gIgtots); |
|||
*(here->BSIM4v5GPbpPtr ) += m * xcgbb * s->real; |
|||
*(here->BSIM4v5GPbpPtr +1) += m * xcgbb * s->imag; |
|||
*(here->BSIM4v5GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); |
|||
} |
|||
else if (here->BSIM4v5rgateMod == 3) |
|||
{ *(here->BSIM4v5GEgePtr) += m * geltd; |
|||
*(here->BSIM4v5GEgmPtr) -= m * geltd; |
|||
*(here->BSIM4v5GMgePtr) -= m * geltd; |
|||
*(here->BSIM4v5GMgmPtr) += m * (geltd + gcrg); |
|||
*(here->BSIM4v5GMgmPtr ) += m * xcgmgmb * s->real; |
|||
*(here->BSIM4v5GMgmPtr +1) += m * xcgmgmb * s->imag; |
|||
|
|||
*(here->BSIM4v5GMdpPtr) += m * gcrgd; |
|||
*(here->BSIM4v5GMdpPtr ) += m * xcgmdb * s->real; |
|||
*(here->BSIM4v5GMdpPtr +1) += m * xcgmdb * s->imag; |
|||
*(here->BSIM4v5GMgpPtr) += m * gcrgg; |
|||
*(here->BSIM4v5GMspPtr) += m * gcrgs; |
|||
*(here->BSIM4v5GMspPtr ) += m * xcgmsb * s->real; |
|||
*(here->BSIM4v5GMspPtr +1) += m * xcgmsb * s->imag; |
|||
*(here->BSIM4v5GMbpPtr) += m * gcrgb; |
|||
*(here->BSIM4v5GMbpPtr ) += m * xcgmbb * s->real; |
|||
*(here->BSIM4v5GMbpPtr +1) += m * xcgmbb * s->imag; |
|||
|
|||
*(here->BSIM4v5DPgmPtr ) += m * xcdgmb * s->real; |
|||
*(here->BSIM4v5DPgmPtr +1) += m * xcdgmb * s->imag; |
|||
*(here->BSIM4v5GPgmPtr) -= m * gcrg; |
|||
*(here->BSIM4v5SPgmPtr ) += m * xcsgmb * s->real; |
|||
*(here->BSIM4v5SPgmPtr +1) += m * xcsgmb * s->imag; |
|||
*(here->BSIM4v5BPgmPtr ) += m * xcbgmb * s->real; |
|||
*(here->BSIM4v5BPgmPtr +1) += m * xcbgmb * s->imag; |
|||
|
|||
*(here->BSIM4v5GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); |
|||
*(here->BSIM4v5GPgpPtr ) += m * xcggb * s->real; |
|||
*(here->BSIM4v5GPgpPtr +1) += m * xcggb * s->imag; |
|||
*(here->BSIM4v5GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); |
|||
*(here->BSIM4v5GPdpPtr ) += m * xcgdb * s->real; |
|||
*(here->BSIM4v5GPdpPtr +1) += m * xcgdb * s->imag; |
|||
*(here->BSIM4v5GPspPtr) -= m * (gcrgs + xgts - gIgtots); |
|||
*(here->BSIM4v5GPspPtr ) += m * xcgsb * s->real; |
|||
*(here->BSIM4v5GPspPtr +1) += m * xcgsb * s->imag; |
|||
*(here->BSIM4v5GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); |
|||
*(here->BSIM4v5GPbpPtr ) += m * xcgbb * s->real; |
|||
*(here->BSIM4v5GPbpPtr +1) += m * xcgbb * s->imag; |
|||
} |
|||
else |
|||
{ *(here->BSIM4v5GPdpPtr ) += m * xcgdb * s->real; |
|||
*(here->BSIM4v5GPdpPtr +1) += m * xcgdb * s->imag; |
|||
*(here->BSIM4v5GPdpPtr) -= m * (xgtd - gIgtotd); |
|||
*(here->BSIM4v5GPgpPtr ) += m * xcggb * s->real; |
|||
*(here->BSIM4v5GPgpPtr +1) += m * xcggb * s->imag; |
|||
*(here->BSIM4v5GPgpPtr) -= m * (xgtg - gIgtotg); |
|||
*(here->BSIM4v5GPspPtr ) += m * xcgsb * s->real; |
|||
*(here->BSIM4v5GPspPtr +1) += m * xcgsb * s->imag; |
|||
*(here->BSIM4v5GPspPtr) -= m * (xgts - gIgtots); |
|||
*(here->BSIM4v5GPbpPtr ) += m * xcgbb * s->real; |
|||
*(here->BSIM4v5GPbpPtr +1) += m * xcgbb * s->imag; |
|||
*(here->BSIM4v5GPbpPtr) -= m * (xgtb - gIgtotb); |
|||
} |
|||
|
|||
if (model->BSIM4v5rdsMod) |
|||
{ (*(here->BSIM4v5DgpPtr) += m * gdtotg); |
|||
(*(here->BSIM4v5DspPtr) += m * gdtots); |
|||
(*(here->BSIM4v5DbpPtr) += m * gdtotb); |
|||
(*(here->BSIM4v5SdpPtr) += m * gstotd); |
|||
(*(here->BSIM4v5SgpPtr) += m * gstotg); |
|||
(*(here->BSIM4v5SbpPtr) += m * gstotb); |
|||
} |
|||
|
|||
*(here->BSIM4v5DPdpPtr ) += m * xcddb * s->real; |
|||
*(here->BSIM4v5DPdpPtr +1) += m * xcddb * s->imag; |
|||
*(here->BSIM4v5DPdpPtr) += m * (gdpr + gds + here->BSIM4v5gbd |
|||
- gdtotd + RevSum + gbdpdp - gIdtotd |
|||
+ dxpart * xgtd + T1 * ddxpart_dVd); |
|||
*(here->BSIM4v5DPdPtr) -= m * (gdpr + gdtot); |
|||
*(here->BSIM4v5DPgpPtr ) += m * xcdgb * s->real; |
|||
*(here->BSIM4v5DPgpPtr +1) += m * xcdgb * s->imag; |
|||
*(here->BSIM4v5DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg |
|||
+ T1 * ddxpart_dVg + dxpart * xgtg); |
|||
*(here->BSIM4v5DPspPtr ) += m * xcdsb * s->real; |
|||
*(here->BSIM4v5DPspPtr +1) += m * xcdsb * s->imag; |
|||
*(here->BSIM4v5DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots |
|||
- T1 * ddxpart_dVs - dxpart * xgts); |
|||
*(here->BSIM4v5DPbpPtr ) += m * xcdbb * s->real; |
|||
*(here->BSIM4v5DPbpPtr +1) += m * xcdbb * s->imag; |
|||
*(here->BSIM4v5DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb |
|||
- T1 * ddxpart_dVb - dxpart * xgtb); |
|||
|
|||
*(here->BSIM4v5DdpPtr) -= m * (gdpr - gdtotd); |
|||
*(here->BSIM4v5DdPtr) += m * (gdpr + gdtot); |
|||
|
|||
*(here->BSIM4v5SPdpPtr ) += m * xcsdb * s->real; |
|||
*(here->BSIM4v5SPdpPtr +1) += m * xcsdb * s->imag; |
|||
*(here->BSIM4v5SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd |
|||
- T1 * dsxpart_dVd - sxpart * xgtd); |
|||
*(here->BSIM4v5SPgpPtr ) += m * xcsgb * s->real; |
|||
*(here->BSIM4v5SPgpPtr +1) += m * xcsgb * s->imag; |
|||
*(here->BSIM4v5SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg |
|||
- T1 * dsxpart_dVg - sxpart * xgtg); |
|||
*(here->BSIM4v5SPspPtr ) += m * xcssb * s->real; |
|||
*(here->BSIM4v5SPspPtr +1) += m * xcssb * s->imag; |
|||
*(here->BSIM4v5SPspPtr) += m * (gspr + gds + here->BSIM4v5gbs - gIstots |
|||
- gstots + FwdSum + gbspsp |
|||
+ sxpart * xgts + T1 * dsxpart_dVs); |
|||
*(here->BSIM4v5SPsPtr) -= m * (gspr + gstot); |
|||
*(here->BSIM4v5SPbpPtr ) += m * xcsbb * s->real; |
|||
*(here->BSIM4v5SPbpPtr +1) += m * xcsbb * s->imag; |
|||
*(here->BSIM4v5SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb |
|||
- T1 * dsxpart_dVb - sxpart * xgtb); |
|||
|
|||
*(here->BSIM4v5SspPtr) -= m * (gspr - gstots); |
|||
*(here->BSIM4v5SsPtr) += m * (gspr + gstot); |
|||
|
|||
*(here->BSIM4v5BPdpPtr ) += m * xcbdb * s->real; |
|||
*(here->BSIM4v5BPdpPtr +1) += m * xcbdb * s->imag; |
|||
*(here->BSIM4v5BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); |
|||
*(here->BSIM4v5BPgpPtr ) += m * xcbgb * s->real; |
|||
*(here->BSIM4v5BPgpPtr +1) += m * xcbgb * s->imag; |
|||
*(here->BSIM4v5BPgpPtr) -= m * (here->BSIM4v5gbgs + gIbtotg); |
|||
*(here->BSIM4v5BPspPtr ) += m * xcbsb * s->real; |
|||
*(here->BSIM4v5BPspPtr +1) += m * xcbsb * s->imag; |
|||
*(here->BSIM4v5BPspPtr) -= m * (gjbs - gbbsp + gIbtots); |
|||
*(here->BSIM4v5BPbpPtr ) += m * xcbbb * s->real; |
|||
*(here->BSIM4v5BPbpPtr +1) += m * xcbbb * s->imag; |
|||
*(here->BSIM4v5BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v5gbbs |
|||
- gIbtotb); |
|||
ggidld = here->BSIM4v5ggidld; |
|||
ggidlg = here->BSIM4v5ggidlg; |
|||
ggidlb = here->BSIM4v5ggidlb; |
|||
ggislg = here->BSIM4v5ggislg; |
|||
ggisls = here->BSIM4v5ggisls; |
|||
ggislb = here->BSIM4v5ggislb; |
|||
|
|||
/* stamp gidl */ |
|||
(*(here->BSIM4v5DPdpPtr) += m * ggidld); |
|||
(*(here->BSIM4v5DPgpPtr) += m * ggidlg); |
|||
(*(here->BSIM4v5DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); |
|||
(*(here->BSIM4v5DPbpPtr) += m * ggidlb); |
|||
(*(here->BSIM4v5BPdpPtr) -= m * ggidld); |
|||
(*(here->BSIM4v5BPgpPtr) -= m * ggidlg); |
|||
(*(here->BSIM4v5BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); |
|||
(*(here->BSIM4v5BPbpPtr) -= m * ggidlb); |
|||
/* stamp gisl */ |
|||
(*(here->BSIM4v5SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); |
|||
(*(here->BSIM4v5SPgpPtr) += m * ggislg); |
|||
(*(here->BSIM4v5SPspPtr) += m * ggisls); |
|||
(*(here->BSIM4v5SPbpPtr) += m * ggislb); |
|||
(*(here->BSIM4v5BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); |
|||
(*(here->BSIM4v5BPgpPtr) -= m * ggislg); |
|||
(*(here->BSIM4v5BPspPtr) -= m * ggisls); |
|||
(*(here->BSIM4v5BPbpPtr) -= m * ggislb); |
|||
|
|||
if (here->BSIM4v5rbodyMod) |
|||
{ (*(here->BSIM4v5DPdbPtr ) += m * xcdbdb * s->real); |
|||
(*(here->BSIM4v5DPdbPtr +1) += m * xcdbdb * s->imag); |
|||
(*(here->BSIM4v5DPdbPtr) -= m * here->BSIM4v5gbd); |
|||
(*(here->BSIM4v5SPsbPtr ) += m * xcsbsb * s->real); |
|||
(*(here->BSIM4v5SPsbPtr +1) += m * xcsbsb * s->imag); |
|||
(*(here->BSIM4v5SPsbPtr) -= m * here->BSIM4v5gbs); |
|||
|
|||
(*(here->BSIM4v5DBdpPtr ) += m * xcdbdb * s->real); |
|||
(*(here->BSIM4v5DBdpPtr +1) += m * xcdbdb * s->imag); |
|||
(*(here->BSIM4v5DBdpPtr) -= m * here->BSIM4v5gbd); |
|||
(*(here->BSIM4v5DBdbPtr ) -= m * xcdbdb * s->real); |
|||
(*(here->BSIM4v5DBdbPtr +1) -= m * xcdbdb * s->imag); |
|||
(*(here->BSIM4v5DBdbPtr) += m * (here->BSIM4v5gbd + here->BSIM4v5grbpd |
|||
+ here->BSIM4v5grbdb)); |
|||
(*(here->BSIM4v5DBbpPtr) -= m * here->BSIM4v5grbpd); |
|||
(*(here->BSIM4v5DBbPtr) -= m * here->BSIM4v5grbdb); |
|||
|
|||
(*(here->BSIM4v5BPdbPtr) -= m * here->BSIM4v5grbpd); |
|||
(*(here->BSIM4v5BPbPtr) -= m * here->BSIM4v5grbpb); |
|||
(*(here->BSIM4v5BPsbPtr) -= m * here->BSIM4v5grbps); |
|||
(*(here->BSIM4v5BPbpPtr) += m * (here->BSIM4v5grbpd + here->BSIM4v5grbps |
|||
+ here->BSIM4v5grbpb)); |
|||
/* WDL: (-here->BSIM4v5gbbs) already added to BPbpPtr */ |
|||
|
|||
(*(here->BSIM4v5SBspPtr ) += m * xcsbsb * s->real); |
|||
(*(here->BSIM4v5SBspPtr +1) += m * xcsbsb * s->imag); |
|||
(*(here->BSIM4v5SBspPtr) -= m * here->BSIM4v5gbs); |
|||
(*(here->BSIM4v5SBbpPtr) -= m * here->BSIM4v5grbps); |
|||
(*(here->BSIM4v5SBbPtr) -= m * here->BSIM4v5grbsb); |
|||
(*(here->BSIM4v5SBsbPtr ) -= m * xcsbsb * s->real); |
|||
(*(here->BSIM4v5SBsbPtr +1) -= m * xcsbsb * s->imag); |
|||
(*(here->BSIM4v5SBsbPtr) += m * (here->BSIM4v5gbs |
|||
+ here->BSIM4v5grbps + here->BSIM4v5grbsb)); |
|||
|
|||
(*(here->BSIM4v5BdbPtr) -= m * here->BSIM4v5grbdb); |
|||
(*(here->BSIM4v5BbpPtr) -= m * here->BSIM4v5grbpb); |
|||
(*(here->BSIM4v5BsbPtr) -= m * here->BSIM4v5grbsb); |
|||
(*(here->BSIM4v5BbPtr) += m * (here->BSIM4v5grbsb + here->BSIM4v5grbdb |
|||
+ here->BSIM4v5grbpb)); |
|||
} |
|||
|
|||
if (here->BSIM4v5acnqsMod) |
|||
{ *(here->BSIM4v5QqPtr ) += m * s->real * ScalingFactor; |
|||
*(here->BSIM4v5QqPtr +1) += m * s->imag * ScalingFactor; |
|||
*(here->BSIM4v5QgpPtr ) -= m * xcqgb * s->real; |
|||
*(here->BSIM4v5QgpPtr +1) -= m * xcqgb * s->imag; |
|||
*(here->BSIM4v5QdpPtr ) -= m * xcqdb * s->real; |
|||
*(here->BSIM4v5QdpPtr +1) -= m * xcqdb * s->imag; |
|||
*(here->BSIM4v5QbpPtr ) -= m * xcqbb * s->real; |
|||
*(here->BSIM4v5QbpPtr +1) -= m * xcqbb * s->imag; |
|||
*(here->BSIM4v5QspPtr ) -= m * xcqsb * s->real; |
|||
*(here->BSIM4v5QspPtr +1) -= m * xcqsb * s->imag; |
|||
|
|||
*(here->BSIM4v5GPqPtr) -= m * here->BSIM4v5gtau; |
|||
*(here->BSIM4v5DPqPtr) += m * dxpart * here->BSIM4v5gtau; |
|||
*(here->BSIM4v5SPqPtr) += m * sxpart * here->BSIM4v5gtau; |
|||
|
|||
*(here->BSIM4v5QqPtr) += m * here->BSIM4v5gtau; |
|||
*(here->BSIM4v5QgpPtr) += m * xgtg; |
|||
*(here->BSIM4v5QdpPtr) += m * xgtd; |
|||
*(here->BSIM4v5QbpPtr) += m * xgtb; |
|||
*(here->BSIM4v5QspPtr) += m * xgts; |
|||
} |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
2084
src/spicelib/devices/bsim4v5/b4v5set.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1834
src/spicelib/devices/bsim4v5/b4v5temp.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,59 @@ |
|||
/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ |
|||
|
|||
/********** |
|||
* Copyright 2004 Regents of the University of California. All rights reserved. |
|||
* File: b4trunc.c of BSIM4.5.0. |
|||
* Author: 2000 Weidong Liu |
|||
* Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. |
|||
* Project Director: Prof. Chenming Hu. |
|||
**********/ |
|||
|
|||
#include "ngspice.h" |
|||
#include "cktdefs.h" |
|||
#include "bsim4v5def.h" |
|||
#include "sperror.h" |
|||
#include "suffix.h" |
|||
|
|||
|
|||
int |
|||
BSIM4v5trunc(inModel,ckt,timeStep) |
|||
GENmodel *inModel; |
|||
CKTcircuit *ckt; |
|||
double *timeStep; |
|||
{ |
|||
BSIM4v5model *model = (BSIM4v5model*)inModel; |
|||
BSIM4v5instance *here; |
|||
|
|||
#ifdef STEPDEBUG |
|||
double debugtemp; |
|||
#endif /* STEPDEBUG */ |
|||
|
|||
for (; model != NULL; model = model->BSIM4v5nextModel) |
|||
{ for (here = model->BSIM4v5instances; here != NULL; |
|||
here = here->BSIM4v5nextInstance) |
|||
{ |
|||
if (here->BSIM4v5owner != ARCHme) continue; |
|||
#ifdef STEPDEBUG |
|||
debugtemp = *timeStep; |
|||
#endif /* STEPDEBUG */ |
|||
CKTterr(here->BSIM4v5qb,ckt,timeStep); |
|||
CKTterr(here->BSIM4v5qg,ckt,timeStep); |
|||
CKTterr(here->BSIM4v5qd,ckt,timeStep); |
|||
if (here->BSIM4v5trnqsMod) |
|||
CKTterr(here->BSIM4v5qcdump,ckt,timeStep); |
|||
if (here->BSIM4v5rbodyMod) |
|||
{ CKTterr(here->BSIM4v5qbs,ckt,timeStep); |
|||
CKTterr(here->BSIM4v5qbd,ckt,timeStep); |
|||
} |
|||
if (here->BSIM4v5rgateMod == 3) |
|||
CKTterr(here->BSIM4v5qgmid,ckt,timeStep); |
|||
#ifdef STEPDEBUG |
|||
if(debugtemp != *timeStep) |
|||
{ printf("device %s reduces step from %g to %g\n", |
|||
here->BSIM4v5name,debugtemp,*timeStep); |
|||
} |
|||
#endif /* STEPDEBUG */ |
|||
} |
|||
} |
|||
return(OK); |
|||
} |
|||
3193
src/spicelib/devices/bsim4v5/bsim4v5def.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,54 @@ |
|||
/********** |
|||
Copyright 2004 Regents of the University of California. All rights reserved. |
|||
Author: 2000 Weidong Liu |
|||
Author: 2001- Xuemei Xi |
|||
File: bsim4v5ext.h |
|||
**********/ |
|||
|
|||
#ifdef __STDC__ |
|||
extern int BSIM4v5acLoad(GENmodel *,CKTcircuit*); |
|||
extern int BSIM4v5ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); |
|||
extern int BSIM4v5convTest(GENmodel *,CKTcircuit*); |
|||
extern int BSIM4v5delete(GENmodel*,IFuid,GENinstance**); |
|||
extern void BSIM4v5destroy(GENmodel**); |
|||
extern int BSIM4v5getic(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v5load(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v5mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); |
|||
extern int BSIM4v5mDelete(GENmodel**,IFuid,GENmodel*); |
|||
extern int BSIM4v5mParam(int,IFvalue*,GENmodel*); |
|||
extern void BSIM4v5mosCap(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 BSIM4v5param(int,IFvalue*,GENinstance*,IFvalue*); |
|||
extern int BSIM4v5pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); |
|||
extern int BSIM4v5setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); |
|||
extern int BSIM4v5temp(GENmodel*,CKTcircuit*); |
|||
extern int BSIM4v5trunc(GENmodel*,CKTcircuit*,double*); |
|||
extern int BSIM4v5noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); |
|||
extern int BSIM4v5unsetup(GENmodel*,CKTcircuit*); |
|||
|
|||
#else /* stdc */ |
|||
extern int BSIM4v5acLoad(); |
|||
extern int BSIM4v5delete(); |
|||
extern void BSIM4v5destroy(); |
|||
extern int BSIM4v5getic(); |
|||
extern int BSIM4v5load(); |
|||
extern int BSIM4v5mDelete(); |
|||
extern int BSIM4v5ask(); |
|||
extern int BSIM4v5mAsk(); |
|||
extern int BSIM4v5convTest(); |
|||
extern int BSIM4v5temp(); |
|||
extern int BSIM4v5mParam(); |
|||
extern void BSIM4v5mosCap(); |
|||
extern int BSIM4v5param(); |
|||
extern int BSIM4v5pzLoad(); |
|||
extern int BSIM4v5setup(); |
|||
extern int BSIM4v5trunc(); |
|||
extern int BSIM4v5noise(); |
|||
extern int BSIM4v5unsetup(); |
|||
|
|||
#endif /* stdc */ |
|||
|
|||
@ -0,0 +1,83 @@ |
|||
#include "config.h" |
|||
|
|||
#include "devdefs.h" |
|||
|
|||
#include "bsim4v5itf.h" |
|||
#include "bsim4v5ext.h" |
|||
#include "bsim4v5init.h" |
|||
|
|||
|
|||
SPICEdev BSIM4v5info = { |
|||
{ |
|||
"BSIM4v5", |
|||
"Berkeley Short Channel IGFET Model-4", |
|||
|
|||
&BSIM4v5nSize, |
|||
&BSIM4v5nSize, |
|||
BSIM4v5names, |
|||
|
|||
&BSIM4v5pTSize, |
|||
BSIM4v5pTable, |
|||
|
|||
&BSIM4v5mPTSize, |
|||
BSIM4v5mPTable, |
|||
|
|||
#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 |
|||
}, |
|||
|
|||
BSIM4v5param, /* DEVparam */ |
|||
BSIM4v5mParam, /* DEVmodParam */ |
|||
BSIM4v5load, /* DEVload */ |
|||
BSIM4v5setup, /* DEVsetup */ |
|||
BSIM4v5unsetup, /* DEVunsetup */ |
|||
BSIM4v5setup, /* DEVpzSetup */ |
|||
BSIM4v5temp, /* DEVtemperature */ |
|||
BSIM4v5trunc, /* DEVtrunc */ |
|||
NULL, /* DEVfindBranch */ |
|||
BSIM4v5acLoad, /* DEVacLoad */ |
|||
NULL, /* DEVaccept */ |
|||
BSIM4v5destroy, /* DEVdestroy */ |
|||
BSIM4v5mDelete, /* DEVmodDelete */ |
|||
BSIM4v5delete, /* DEVdelete */ |
|||
BSIM4v5getic, /* DEVsetic */ |
|||
BSIM4v5ask, /* DEVask */ |
|||
BSIM4v5mAsk, /* DEVmodAsk */ |
|||
BSIM4v5pzLoad, /* DEVpzLoad */ |
|||
BSIM4v5convTest, /* DEVconvTest */ |
|||
NULL, /* DEVsenSetup */ |
|||
NULL, /* DEVsenLoad */ |
|||
NULL, /* DEVsenUpdate */ |
|||
NULL, /* DEVsenAcLoad */ |
|||
NULL, /* DEVsenPrint */ |
|||
NULL, /* DEVsenTrunc */ |
|||
NULL, /* DEVdisto */ |
|||
BSIM4v5noise, /* DEVnoise */ |
|||
#ifdef CIDER |
|||
NULL, /* DEVdump */ |
|||
NULL, /* DEVacct */ |
|||
#endif |
|||
&BSIM4v5iSize, /* DEVinstSize */ |
|||
&BSIM4v5mSize /* DEVmodSize */ |
|||
}; |
|||
|
|||
|
|||
SPICEdev * |
|||
get_bsim4v5_info(void) |
|||
{ |
|||
return &BSIM4v5info; |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
#ifndef _BSIM4V5INIT_H |
|||
#define _BSIM4V5INIT_H |
|||
|
|||
extern IFparm BSIM4v5pTable[ ]; |
|||
extern IFparm BSIM4v5mPTable[ ]; |
|||
extern char *BSIM4v5names[ ]; |
|||
extern int BSIM4v5pTSize; |
|||
extern int BSIM4v5mPTSize; |
|||
extern int BSIM4v5nSize; |
|||
extern int BSIM4v5iSize; |
|||
extern int BSIM4v5mSize; |
|||
|
|||
#endif |
|||
@ -0,0 +1,13 @@ |
|||
/********** |
|||
Copyright 2004 Regents of the University of California. All rights reserved. |
|||
Author: 2000 Weidong Liu. |
|||
Author: 2001- Xuemei Xi |
|||
File: bsim4v5itf.h |
|||
**********/ |
|||
|
|||
#ifndef DEV_BSIM4V5 |
|||
#define DEV_BSIM4V5 |
|||
|
|||
SPICEdev *get_bsim4v5_info(void); |
|||
|
|||
#endif |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue