Code update. CIDER compatiblity. Variuous enhancements.
This commit is contained in:
parent
33c3e863b8
commit
1d5cfd8d10
|
|
@ -3,12 +3,16 @@
|
|||
SUBDIRS = \
|
||||
asrc \
|
||||
bjt \
|
||||
bjt2 \
|
||||
bsim1 \
|
||||
bsim2 \
|
||||
bsim3 \
|
||||
bsim3soi \
|
||||
bsim4 \
|
||||
bsim3v0 \
|
||||
bsim3v1 \
|
||||
bsim3v2 \
|
||||
bsim3v1s \
|
||||
bsim3v1a \
|
||||
bsim3soi_pd \
|
||||
bsim3soi_fd \
|
||||
bsim3soi_dd \
|
||||
|
|
@ -23,6 +27,7 @@ SUBDIRS = \
|
|||
isrc \
|
||||
hfet1 \
|
||||
hfet2 \
|
||||
hisim \
|
||||
jfet \
|
||||
jfet2 \
|
||||
ltra \
|
||||
|
|
@ -41,11 +46,9 @@ SUBDIRS = \
|
|||
urc \
|
||||
vccs \
|
||||
vcvs \
|
||||
vsrc
|
||||
vsrc \
|
||||
@NUMDEVDIR@
|
||||
|
||||
## This line move to here 'cause it was causing automake to choke
|
||||
## when it was in the list of subdirs
|
||||
## bjt2 \
|
||||
|
||||
|
||||
noinst_LIBRARIES = libdev.a
|
||||
|
|
@ -60,7 +63,8 @@ libdev_a_SOURCES = \
|
|||
cktbindnode.c \
|
||||
cktcrte.c \
|
||||
cktfinddev.c \
|
||||
cktinit.c
|
||||
cktinit.c \
|
||||
limit.c
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,10 @@ SPICEdev ASRCinfo = {
|
|||
DEVsenTrunc : NULL,
|
||||
DEVdisto : NULL, /* DISTO */
|
||||
DEVnoise : NULL, /* NOISE */
|
||||
|
||||
#ifdef CIDER
|
||||
DEVdump : NULL,
|
||||
DEVacct : NULL,
|
||||
#endif
|
||||
DEVinstSize : &ASRCiSize,
|
||||
DEVmodSize : &ASRCmSize
|
||||
};
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@ SPICEdev BJTinfo = { /* description from struct IFdevice */
|
|||
DEVsenTrunc : NULL,
|
||||
DEVdisto : BJTdisto,
|
||||
DEVnoise : BJTnoise,
|
||||
|
||||
#ifdef CIDER
|
||||
DEVdump : NULL,
|
||||
DEVacct : NULL,
|
||||
#endif
|
||||
DEVinstSize : &BJTiSize,
|
||||
DEVmodSize : &BJTmSize
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
pkglib_LTLIBRARIES = libbjt2.la
|
||||
noinst_LIBRARIES = libbjt2.a
|
||||
|
||||
libbjt2_la_SOURCES = \
|
||||
libbjt2_a_SOURCES = \
|
||||
bjt2.c \
|
||||
bjt2acld.c \
|
||||
bjt2ask.c \
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "devdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "suffix.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "sperror.h"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ Modified: Alan Gillespie
|
|||
|
||||
#include "ngspice.h"
|
||||
#include "const.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "ifsim.h"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "sperror.h"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bjt2defs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bjt2defs.h"
|
||||
#include "suffix.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Modified: Alan Gillespie
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "sperror.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Modified: Alan Gillespie
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "const.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "sperror.h"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@ SPICEdev BJT2info = {
|
|||
|
||||
&BJT2mPTSize,
|
||||
BJT2mPTable,
|
||||
|
||||
#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
|
||||
},
|
||||
|
||||
|
|
@ -51,7 +67,10 @@ SPICEdev BJT2info = {
|
|||
DEVsenTrunc : NULL,
|
||||
DEVdisto : BJT2disto,
|
||||
DEVnoise : BJT2noise,
|
||||
|
||||
#ifdef CIDER
|
||||
DEVdump : NULL,
|
||||
DEVacct : NULL,
|
||||
#endif
|
||||
DEVinstSize : &BJT2iSize,
|
||||
DEVmodSize : &BJT2mSize
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "const.h"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "const.h"
|
||||
#include "ifsim.h"
|
||||
#include "cktdefs.h"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bjt2defs.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "const.h"
|
||||
#include "ifsim.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Modified: Alan Gillespie
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bjt2defs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "iferrmsg.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "const.h"
|
||||
#include "ifsim.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "complex.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
@ -35,7 +34,7 @@ BJT2pzLoad(inModel,ckt,s)
|
|||
double xcpi;
|
||||
double xcmu;
|
||||
double xcbx;
|
||||
double xccs;
|
||||
double xcsub;
|
||||
double xcmcb;
|
||||
|
||||
for( ; model != NULL; model = model->BJT2nextModel) {
|
||||
|
|
@ -54,16 +53,22 @@ BJT2pzLoad(inModel,ckt,s)
|
|||
xcpi= *(ckt->CKTstate0 + here->BJT2cqbe);
|
||||
xcmu= *(ckt->CKTstate0 + here->BJT2cqbc);
|
||||
xcbx= *(ckt->CKTstate0 + here->BJT2cqbx);
|
||||
xccs= *(ckt->CKTstate0 + here->BJT2cqsub); /* PN */
|
||||
xcsub= *(ckt->CKTstate0 + here->BJT2cqsub);
|
||||
xcmcb= *(ckt->CKTstate0 + here->BJT2cexbc);
|
||||
*(here->BJT2colColPtr) += (gcpr);
|
||||
*(here->BJT2baseBasePtr) += (gx) + (xcbx) * (s->real);
|
||||
*(here->BJT2baseBasePtr + 1) += (xcbx) * (s->imag);
|
||||
*(here->BJT2emitEmitPtr) += (gepr);
|
||||
*(here->BJT2colPrimeColPrimePtr) += (gmu+go+gcpr)
|
||||
+ (xcmu+xccs+xcbx) * (s->real);
|
||||
*(here->BJT2colPrimeColPrimePtr + 1) += (xcmu+xccs+xcbx)
|
||||
|
||||
*(here->BJT2colPrimeColPrimePtr) += (gmu+go+gcpr)
|
||||
+ (xcmu+xcbx) * (s->real);
|
||||
*(here->BJT2colPrimeColPrimePtr + 1) += (xcmu+xcbx)
|
||||
* (s->imag);
|
||||
|
||||
*(here->BJT2substConSubstPtr) += (-xcsub) * (s->real);
|
||||
*(here->BJT2substConSubstPtr = 1) += (-xcsub) * (s->imag);
|
||||
|
||||
|
||||
*(here->BJT2basePrimeBasePrimePtr) += (gx+gpi+gmu)
|
||||
+ (xcpi+xcmu+xcmcb) * (s->real);
|
||||
*(here->BJT2basePrimeBasePrimePtr + 1) += (xcpi+xcmu+xcmcb)
|
||||
|
|
@ -102,12 +107,31 @@ BJT2pzLoad(inModel,ckt,s)
|
|||
+ (-xcpi-xgm-xcmcb) * (s->real);
|
||||
*(here->BJT2emitPrimeBasePrimePtr + 1) += (-xcpi-xgm-xcmcb)
|
||||
* (s->imag);
|
||||
*(here->BJT2substSubstPtr) += (xccs) * (s->real);
|
||||
*(here->BJT2substSubstPtr + 1) += (xccs) * (s->imag);
|
||||
*(here->BJT2colPrimeSubstPtr) += (-xccs) * (s->real);
|
||||
*(here->BJT2colPrimeSubstPtr + 1) += (-xccs) * (s->imag);
|
||||
*(here->BJT2substColPrimePtr) += (-xccs) * (s->real);
|
||||
*(here->BJT2substColPrimePtr + 1) += (-xccs) * (s->imag);
|
||||
|
||||
/*
|
||||
* Paolo Nenzi 2002
|
||||
*
|
||||
* This is a very quick and dirty hack to make BJ2 compile.
|
||||
* The code replacing the commented out one has been built using
|
||||
* the one in bjt2acld.c
|
||||
* DO NOT USE THIS DEVICE
|
||||
*
|
||||
* *(here->BJT2substSubstPtr) += (xccs) * (s->real);
|
||||
* *(here->BJT2substSubstPtr + 1) += (xccs) * (s->imag);
|
||||
* *(here->BJT2colPrimeSubstPtr) += (-xccs) * (s->real);
|
||||
* *(here->BJT2colPrimeSubstPtr + 1) += (-xccs) * (s->imag);
|
||||
* *(here->BJT2substColPrimePtr) += (-xccs) * (s->real);
|
||||
* *(here->BJT2substColPrimePtr + 1) += (-xccs) * (s->imag);
|
||||
*/
|
||||
|
||||
*(here->BJT2substSubstPtr) += (xcsub) * (s->real);
|
||||
*(here->BJT2substSubstPtr + 1) += (xcsub) * (s->imag);
|
||||
*(here->BJT2substConSubstPtr) += (-xcsub) * (s->real);
|
||||
*(here->BJT2substConSubstPtr = 1) += (-xcsub) * (s->imag);
|
||||
*(here->BJT2substSubstConPtr) += (-xcsub) * (s->real);
|
||||
*(here->BJT2substSubstConPtr = 1) += (-xcsub) * (s->imag);
|
||||
|
||||
|
||||
*(here->BJT2baseColPrimePtr) += (-xcbx) * (s->real);
|
||||
*(here->BJT2baseColPrimePtr + 1) += (-xcbx) * (s->imag);
|
||||
*(here->BJT2colPrimeBasePtr) += (-xcbx) * (s->real);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "smpdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "smpdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "smpdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "smpdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "smpdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ Modified: Alan Gillespie
|
|||
/* update the charge sensitivities and their derivatives */
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "smpdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Modified: Alan Gillespie
|
|||
**********/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "smpdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ Modified: Alan Gillespie
|
|||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bjt2defs.h"
|
||||
#include "sperror.h"
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@ SPICEdev B1info = {
|
|||
DEVsenTrunc : NULL,
|
||||
DEVdisto : B1disto,
|
||||
DEVnoise : NULL, /* NOISE */
|
||||
|
||||
#ifdef CIDER
|
||||
DEVdump : NULL,
|
||||
DEVacct : NULL,
|
||||
#endif
|
||||
DEVinstSize : &B1iSize,
|
||||
DEVmodSize : &B1mSize
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@ SPICEdev B2info = {
|
|||
DEVsenTrunc : NULL,
|
||||
DEVdisto : NULL,
|
||||
DEVnoise : NULL,
|
||||
|
||||
#ifdef CIDER
|
||||
DEVdump : NULL,
|
||||
DEVacct : NULL,
|
||||
#endif
|
||||
DEVinstSize : &B2iSize,
|
||||
DEVmodSize : &B2mSize
|
||||
|
||||
|
|
|
|||
|
|
@ -1,479 +1,488 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
Modified: 2000 AlansFixes
|
||||
File: b3.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "devdefs.h"
|
||||
#include "bsim3def.h"
|
||||
#include "suffix.h"
|
||||
|
||||
IFparm BSIM3pTable[] = { /* parameters */
|
||||
IOP( "l", BSIM3_L, IF_REAL , "Length"),
|
||||
IOP( "w", BSIM3_W, IF_REAL , "Width"),
|
||||
IOP( "m", BSIM3_M, IF_REAL , "Parallel multiplier"),
|
||||
IOP( "ad", BSIM3_AD, IF_REAL , "Drain area"),
|
||||
IOP( "as", BSIM3_AS, IF_REAL , "Source area"),
|
||||
IOP( "pd", BSIM3_PD, IF_REAL , "Drain perimeter"),
|
||||
IOP( "ps", BSIM3_PS, IF_REAL , "Source perimeter"),
|
||||
IOP( "nrd", BSIM3_NRD, IF_REAL , "Number of squares in drain"),
|
||||
IOP( "nrs", BSIM3_NRS, IF_REAL , "Number of squares in source"),
|
||||
IOP( "off", BSIM3_OFF, IF_FLAG , "Device is initially off"),
|
||||
IOP( "nqsmod", BSIM3_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"),
|
||||
IP( "ic", BSIM3_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"),
|
||||
OP( "gmbs", BSIM3_GMBS, IF_REAL, "Gmb"),
|
||||
OP( "gm", BSIM3_GM, IF_REAL, "Gm"),
|
||||
OP( "gds", BSIM3_GDS, IF_REAL, "Gds"),
|
||||
OP( "vdsat", BSIM3_VDSAT, IF_REAL, "Vdsat"),
|
||||
OP( "vth", BSIM3_VON, IF_REAL, "Vth"),
|
||||
OP( "id", BSIM3_CD, IF_REAL, "Ids"),
|
||||
OP( "vbs", BSIM3_VBS, IF_REAL, "Vbs"),
|
||||
OP( "vgs", BSIM3_VGS, IF_REAL, "Vgs"),
|
||||
OP( "vds", BSIM3_VDS, IF_REAL, "Vds"),
|
||||
IFparm BSIM3pTable[] = { /* parameters */
|
||||
IOP ("l", BSIM3_L, IF_REAL, "Length"),
|
||||
IOP ("w", BSIM3_W, IF_REAL, "Width"),
|
||||
IOP ("m", BSIM3_M, IF_REAL, "Parallel multiplier"),
|
||||
IOP ("ad", BSIM3_AD, IF_REAL, "Drain area"),
|
||||
IOP ("as", BSIM3_AS, IF_REAL, "Source area"),
|
||||
IOP ("pd", BSIM3_PD, IF_REAL, "Drain perimeter"),
|
||||
IOP ("ps", BSIM3_PS, IF_REAL, "Source perimeter"),
|
||||
IOP ("nrd", BSIM3_NRD, IF_REAL, "Number of squares in drain"),
|
||||
IOP ("nrs", BSIM3_NRS, IF_REAL, "Number of squares in source"),
|
||||
IOP ("off", BSIM3_OFF, IF_FLAG, "Device is initially off"),
|
||||
IOP ("nqsmod", BSIM3_NQSMOD, IF_INTEGER,
|
||||
"Non-quasi-static model selector"),
|
||||
IP ("ic", BSIM3_IC, IF_REALVEC,
|
||||
"Vector of DS,GS,BS initial voltages"),
|
||||
OP ("gmbs", BSIM3_GMBS, IF_REAL, "Gmb"),
|
||||
OP ("gm", BSIM3_GM, IF_REAL, "Gm"),
|
||||
OP ("gds", BSIM3_GDS, IF_REAL, "Gds"),
|
||||
OP ("vdsat", BSIM3_VDSAT, IF_REAL, "Vdsat"),
|
||||
OP ("vth", BSIM3_VON, IF_REAL, "Vth"),
|
||||
OP ("id", BSIM3_CD, IF_REAL, "Ids"),
|
||||
OP ("vbs", BSIM3_VBS, IF_REAL, "Vbs"),
|
||||
OP ("vgs", BSIM3_VGS, IF_REAL, "Vgs"),
|
||||
OP ("vds", BSIM3_VDS, IF_REAL, "Vds"),
|
||||
};
|
||||
|
||||
IFparm BSIM3mPTable[] = { /* model parameters */
|
||||
IOP( "capmod", BSIM3_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"),
|
||||
IOP( "mobmod", BSIM3_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"),
|
||||
IOP( "noimod", BSIM3_MOD_NOIMOD, IF_INTEGER, "Noise model selector"),
|
||||
IOP( "paramchk", BSIM3_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"),
|
||||
IOP( "binunit", BSIM3_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"),
|
||||
IOP( "version", BSIM3_MOD_VERSION, IF_STRING, " parameter for model version"),
|
||||
IOP( "tox", BSIM3_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"),
|
||||
IFparm BSIM3mPTable[] = { /* model parameters */
|
||||
IOP ("capmod", BSIM3_MOD_CAPMOD, IF_INTEGER,"Capacitance model selector"),
|
||||
IOP ("mobmod", BSIM3_MOD_MOBMOD, IF_INTEGER,"Mobility model selector"),
|
||||
IOP ("noimod", BSIM3_MOD_NOIMOD, IF_INTEGER, "Noise model selector"),
|
||||
IOP ("paramchk", BSIM3_MOD_PARAMCHK, IF_INTEGER,"Model parameter checking selector"),
|
||||
IOP ("binunit", BSIM3_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"),
|
||||
IOP ("version", BSIM3_MOD_VERSION, IF_STRING," parameter for model version"),
|
||||
IOP ("tox", BSIM3_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"),
|
||||
IOP ("toxm", BSIM3_MOD_TOXM, IF_REAL,"Gate oxide thickness used in extraction"),
|
||||
IOP ("cdsc", BSIM3_MOD_CDSC, IF_REAL,"Drain/Source and channel coupling capacitance"),
|
||||
IOP ("cdscb", BSIM3_MOD_CDSCB, IF_REAL,"Body-bias dependence of cdsc"),
|
||||
IOP ("cdscd", BSIM3_MOD_CDSCD, IF_REAL,"Drain-bias dependence of cdsc"),
|
||||
IOP ("cit", BSIM3_MOD_CIT, IF_REAL, "Interface state capacitance"),
|
||||
IOP ("nfactor", BSIM3_MOD_NFACTOR, IF_REAL,"Subthreshold swing Coefficient"),
|
||||
IOP ("xj", BSIM3_MOD_XJ, IF_REAL, "Junction depth in meters"),
|
||||
IOP ("vsat", BSIM3_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"),
|
||||
IOP ("at", BSIM3_MOD_AT, IF_REAL, "Temperature coefficient of vsat"),
|
||||
IOP ("a0", BSIM3_MOD_A0, IF_REAL,"Non-uniform depletion width effect coefficient."),
|
||||
IOP ("ags", BSIM3_MOD_AGS, IF_REAL,"Gate bias coefficient of Abulk."),
|
||||
IOP ("a1", BSIM3_MOD_A1, IF_REAL,"Non-saturation effect coefficient"),
|
||||
IOP ("a2", BSIM3_MOD_A2, IF_REAL,"Non-saturation effect coefficient"),
|
||||
IOP ("keta", BSIM3_MOD_KETA, IF_REAL,"Body-bias coefficient of non-uniform depletion width effect."),
|
||||
IOP ("nsub", BSIM3_MOD_NSUB, IF_REAL,"Substrate doping concentration"),
|
||||
IOP ("nch", BSIM3_MOD_NPEAK, IF_REAL, "Channel doping concentration"),
|
||||
IOP ("ngate", BSIM3_MOD_NGATE, IF_REAL,"Poly-gate doping concentration"),
|
||||
IOP ("gamma1", BSIM3_MOD_GAMMA1, IF_REAL, "Vth body coefficient"),
|
||||
IOP ("gamma2", BSIM3_MOD_GAMMA2, IF_REAL, "Vth body coefficient"),
|
||||
IOP ("vbx", BSIM3_MOD_VBX, IF_REAL, "Vth transition body Voltage"),
|
||||
IOP ("vbm", BSIM3_MOD_VBM, IF_REAL, "Maximum body voltage"),
|
||||
|
||||
IOP( "toxm", BSIM3_MOD_TOXM, IF_REAL, "Gate oxide thickness used in extraction"),
|
||||
IOP( "cdsc", BSIM3_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"),
|
||||
IOP( "cdscb", BSIM3_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"),
|
||||
IOP( "cdscd", BSIM3_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"),
|
||||
IOP( "cit", BSIM3_MOD_CIT, IF_REAL, "Interface state capacitance"),
|
||||
IOP( "nfactor", BSIM3_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"),
|
||||
IOP( "xj", BSIM3_MOD_XJ, IF_REAL, "Junction depth in meters"),
|
||||
IOP( "vsat", BSIM3_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"),
|
||||
IOP( "at", BSIM3_MOD_AT, IF_REAL, "Temperature coefficient of vsat"),
|
||||
IOP( "a0", BSIM3_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."),
|
||||
IOP( "ags", BSIM3_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."),
|
||||
IOP( "a1", BSIM3_MOD_A1, IF_REAL, "Non-saturation effect coefficient"),
|
||||
IOP( "a2", BSIM3_MOD_A2, IF_REAL, "Non-saturation effect coefficient"),
|
||||
IOP( "keta", BSIM3_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."),
|
||||
IOP( "nsub", BSIM3_MOD_NSUB, IF_REAL, "Substrate doping concentration"),
|
||||
IOP( "nch", BSIM3_MOD_NPEAK, IF_REAL, "Channel doping concentration"),
|
||||
IOP( "ngate", BSIM3_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"),
|
||||
IOP( "gamma1", BSIM3_MOD_GAMMA1, IF_REAL, "Vth body coefficient"),
|
||||
IOP( "gamma2", BSIM3_MOD_GAMMA2, IF_REAL, "Vth body coefficient"),
|
||||
IOP( "vbx", BSIM3_MOD_VBX, IF_REAL, "Vth transition body Voltage"),
|
||||
IOP( "vbm", BSIM3_MOD_VBM, IF_REAL, "Maximum body voltage"),
|
||||
IOP ("xt", BSIM3_MOD_XT, IF_REAL, "Doping depth"),
|
||||
IOP ("k1", BSIM3_MOD_K1, IF_REAL, "Bulk effect coefficient 1"),
|
||||
IOP ("kt1", BSIM3_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"),
|
||||
IOP ("kt1l", BSIM3_MOD_KT1L, IF_REAL,"Temperature coefficient of Vth"),
|
||||
IOP ("kt2", BSIM3_MOD_KT2, IF_REAL, "Body-coefficient of kt1"),
|
||||
IOP ("k2", BSIM3_MOD_K2, IF_REAL, "Bulk effect coefficient 2"),
|
||||
IOP ("k3", BSIM3_MOD_K3, IF_REAL, "Narrow width effect coefficient"),
|
||||
IOP ("k3b", BSIM3_MOD_K3B, IF_REAL, "Body effect coefficient of k3"),
|
||||
IOP ("w0", BSIM3_MOD_W0, IF_REAL, "Narrow width effect parameter"),
|
||||
IOP ("nlx", BSIM3_MOD_NLX, IF_REAL,"Lateral non-uniform doping effect"),
|
||||
IOP ("dvt0", BSIM3_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"),
|
||||
IOP ("dvt1", BSIM3_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"),
|
||||
IOP ("dvt2", BSIM3_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"),
|
||||
IOP ("dvt0w", BSIM3_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"),
|
||||
IOP ("dvt1w", BSIM3_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"),
|
||||
IOP ("dvt2w", BSIM3_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"),
|
||||
IOP ("drout", BSIM3_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"),
|
||||
IOP ("dsub", BSIM3_MOD_DSUB, IF_REAL,"DIBL coefficient in the subthreshold region"),
|
||||
IOP ("vth0", BSIM3_MOD_VTH0, IF_REAL, "Threshold voltage"),
|
||||
IOP ("vtho", BSIM3_MOD_VTH0, IF_REAL, "Threshold voltage"),
|
||||
IOP ("ua", BSIM3_MOD_UA, IF_REAL, "Linear gate dependence of mobility"),
|
||||
IOP ("ua1", BSIM3_MOD_UA1, IF_REAL, "Temperature coefficient of ua"),
|
||||
IOP ("ub", BSIM3_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"),
|
||||
IOP ("ub1", BSIM3_MOD_UB1, IF_REAL, "Temperature coefficient of ub"),
|
||||
IOP ("uc", BSIM3_MOD_UC, IF_REAL, "Body-bias dependence of mobility"),
|
||||
IOP ("uc1", BSIM3_MOD_UC1, IF_REAL, "Temperature coefficient of uc"),
|
||||
IOP ("u0", BSIM3_MOD_U0, IF_REAL, "Low-field mobility at Tnom"),
|
||||
IOP ("ute", BSIM3_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"),
|
||||
IOP ("voff", BSIM3_MOD_VOFF, IF_REAL, "Threshold voltage offset"),
|
||||
IOP ("tnom", BSIM3_MOD_TNOM, IF_REAL, "Parameter measurement temperature"),
|
||||
IOP ("cgso", BSIM3_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"),
|
||||
IOP ("cgdo", BSIM3_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"),
|
||||
IOP ("cgbo", BSIM3_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"),
|
||||
IOP ("xpart", BSIM3_MOD_XPART, IF_REAL, "Channel charge partitioning"),
|
||||
IOP ("elm", BSIM3_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"),
|
||||
IOP ("delta", BSIM3_MOD_DELTA, IF_REAL, "Effective Vds parameter"),
|
||||
IOP ("rsh", BSIM3_MOD_RSH, IF_REAL, "Source-drain sheet resistance"),
|
||||
IOP ("rdsw", BSIM3_MOD_RDSW, IF_REAL, "Source-drain resistance per width"),
|
||||
|
||||
IOP( "xt", BSIM3_MOD_XT, IF_REAL, "Doping depth"),
|
||||
IOP( "k1", BSIM3_MOD_K1, IF_REAL, "Bulk effect coefficient 1"),
|
||||
IOP( "kt1", BSIM3_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"),
|
||||
IOP( "kt1l", BSIM3_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"),
|
||||
IOP( "kt2", BSIM3_MOD_KT2, IF_REAL, "Body-coefficient of kt1"),
|
||||
IOP( "k2", BSIM3_MOD_K2, IF_REAL, "Bulk effect coefficient 2"),
|
||||
IOP( "k3", BSIM3_MOD_K3, IF_REAL, "Narrow width effect coefficient"),
|
||||
IOP( "k3b", BSIM3_MOD_K3B, IF_REAL, "Body effect coefficient of k3"),
|
||||
IOP( "w0", BSIM3_MOD_W0, IF_REAL, "Narrow width effect parameter"),
|
||||
IOP( "nlx", BSIM3_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"),
|
||||
IOP( "dvt0", BSIM3_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"),
|
||||
IOP( "dvt1", BSIM3_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"),
|
||||
IOP( "dvt2", BSIM3_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"),
|
||||
IOP( "dvt0w", BSIM3_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"),
|
||||
IOP( "dvt1w", BSIM3_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"),
|
||||
IOP( "dvt2w", BSIM3_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"),
|
||||
IOP( "drout", BSIM3_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"),
|
||||
IOP( "dsub", BSIM3_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"),
|
||||
IOP( "vth0", BSIM3_MOD_VTH0, IF_REAL,"Threshold voltage"),
|
||||
IOP( "vtho", BSIM3_MOD_VTH0, IF_REAL,"Threshold voltage"),
|
||||
IOP( "ua", BSIM3_MOD_UA, IF_REAL, "Linear gate dependence of mobility"),
|
||||
IOP( "ua1", BSIM3_MOD_UA1, IF_REAL, "Temperature coefficient of ua"),
|
||||
IOP( "ub", BSIM3_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"),
|
||||
IOP( "ub1", BSIM3_MOD_UB1, IF_REAL, "Temperature coefficient of ub"),
|
||||
IOP( "uc", BSIM3_MOD_UC, IF_REAL, "Body-bias dependence of mobility"),
|
||||
IOP( "uc1", BSIM3_MOD_UC1, IF_REAL, "Temperature coefficient of uc"),
|
||||
IOP( "u0", BSIM3_MOD_U0, IF_REAL, "Low-field mobility at Tnom"),
|
||||
IOP( "ute", BSIM3_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"),
|
||||
IOP( "voff", BSIM3_MOD_VOFF, IF_REAL, "Threshold voltage offset"),
|
||||
IOP( "tnom", BSIM3_MOD_TNOM, IF_REAL, "Parameter measurement temperature"),
|
||||
IOP( "cgso", BSIM3_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"),
|
||||
IOP( "cgdo", BSIM3_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"),
|
||||
IOP( "cgbo", BSIM3_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"),
|
||||
IOP( "xpart", BSIM3_MOD_XPART, IF_REAL, "Channel charge partitioning"),
|
||||
IOP( "elm", BSIM3_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"),
|
||||
IOP( "delta", BSIM3_MOD_DELTA, IF_REAL, "Effective Vds parameter"),
|
||||
IOP( "rsh", BSIM3_MOD_RSH, IF_REAL, "Source-drain sheet resistance"),
|
||||
IOP( "rdsw", BSIM3_MOD_RDSW, IF_REAL, "Source-drain resistance per width"),
|
||||
IOP ("prwg", BSIM3_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "),
|
||||
IOP ("prwb", BSIM3_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "),
|
||||
|
||||
IOP( "prwg", BSIM3_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "),
|
||||
IOP( "prwb", BSIM3_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "),
|
||||
IOP ("prt", BSIM3_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "),
|
||||
IOP ("eta0", BSIM3_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"),
|
||||
IOP ("etab", BSIM3_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"),
|
||||
IOP ("pclm", BSIM3_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"),
|
||||
IOP ("pdiblc1", BSIM3_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"),
|
||||
IOP ("pdiblc2", BSIM3_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"),
|
||||
IOP ("pdiblcb", BSIM3_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"),
|
||||
IOP ("pscbe1", BSIM3_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"),
|
||||
IOP ("pscbe2", BSIM3_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"),
|
||||
IOP ("pvag", BSIM3_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"),
|
||||
IOP ("js", BSIM3_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"),
|
||||
IOP ("jsw", BSIM3_MOD_JSW, IF_REAL, "Sidewall junction reverse saturation current density"),
|
||||
IOP ("pb", BSIM3_MOD_PB, IF_REAL, "Source/drain junction built-in potential"),
|
||||
IOP ("nj", BSIM3_MOD_NJ, IF_REAL, "Source/drain junction emission coefficient"),
|
||||
IOP ("xti", BSIM3_MOD_XTI, IF_REAL, "Junction current temperature exponent"),
|
||||
IOP ("mj", BSIM3_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"),
|
||||
IOP ("pbsw", BSIM3_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"),
|
||||
IOP ("mjsw", BSIM3_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"),
|
||||
IOP ("pbswg", BSIM3_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"),
|
||||
IOP ("mjswg", BSIM3_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"),
|
||||
IOP ("cj", BSIM3_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"),
|
||||
IOP ("vfbcv", BSIM3_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"),
|
||||
IOP ("vfb", BSIM3_MOD_VFB, IF_REAL, "Flat Band Voltage"),
|
||||
IOP ("cjsw", BSIM3_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit periphery"),
|
||||
IOP ("cjswg", BSIM3_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"),
|
||||
IOP ("tpb", BSIM3_MOD_TPB, IF_REAL, "Temperature coefficient of pb"),
|
||||
IOP ("tcj", BSIM3_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"),
|
||||
IOP ("tpbsw", BSIM3_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"),
|
||||
IOP ("tcjsw", BSIM3_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"),
|
||||
IOP ("tpbswg", BSIM3_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"),
|
||||
IOP ("tcjswg", BSIM3_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"),
|
||||
IOP ("acde", BSIM3_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"),
|
||||
IOP ("moin", BSIM3_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"),
|
||||
IOP ("noff", BSIM3_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"),
|
||||
IOP ("voffcv", BSIM3_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"),
|
||||
IOP ("lint", BSIM3_MOD_LINT, IF_REAL, "Length reduction parameter"),
|
||||
IOP ("ll", BSIM3_MOD_LL, IF_REAL, "Length reduction parameter"),
|
||||
IOP ("llc", BSIM3_MOD_LLC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP ("lln", BSIM3_MOD_LLN, IF_REAL, "Length reduction parameter"),
|
||||
IOP ("lw", BSIM3_MOD_LW, IF_REAL, "Length reduction parameter"),
|
||||
IOP ("lwc", BSIM3_MOD_LWC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP ("lwn", BSIM3_MOD_LWN, IF_REAL, "Length reduction parameter"),
|
||||
IOP ("lwl", BSIM3_MOD_LWL, IF_REAL, "Length reduction parameter"),
|
||||
IOP ("lwlc", BSIM3_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP ("lmin", BSIM3_MOD_LMIN, IF_REAL, "Minimum length for the model"),
|
||||
IOP ("lmax", BSIM3_MOD_LMAX, IF_REAL, "Maximum length for the model"),
|
||||
|
||||
IOP( "prt", BSIM3_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "),
|
||||
IOP( "eta0", BSIM3_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"),
|
||||
IOP( "etab", BSIM3_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"),
|
||||
IOP( "pclm", BSIM3_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"),
|
||||
IOP( "pdiblc1", BSIM3_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"),
|
||||
IOP( "pdiblc2", BSIM3_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"),
|
||||
IOP( "pdiblcb", BSIM3_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"),
|
||||
IOP( "pscbe1", BSIM3_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"),
|
||||
IOP( "pscbe2", BSIM3_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"),
|
||||
IOP( "pvag", BSIM3_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"),
|
||||
IOP( "js", BSIM3_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"),
|
||||
IOP( "jsw", BSIM3_MOD_JSW, IF_REAL, "Sidewall junction reverse saturation current density"),
|
||||
IOP( "pb", BSIM3_MOD_PB, IF_REAL, "Source/drain junction built-in potential"),
|
||||
IOP( "nj", BSIM3_MOD_NJ, IF_REAL, "Source/drain junction emission coefficient"),
|
||||
IOP( "xti", BSIM3_MOD_XTI, IF_REAL, "Junction current temperature exponent"),
|
||||
IOP( "mj", BSIM3_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"),
|
||||
IOP( "pbsw", BSIM3_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"),
|
||||
IOP( "mjsw", BSIM3_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"),
|
||||
IOP( "pbswg", BSIM3_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"),
|
||||
IOP( "mjswg", BSIM3_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"),
|
||||
IOP( "cj", BSIM3_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"),
|
||||
IOP( "vfbcv", BSIM3_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"),
|
||||
IOP( "vfb", BSIM3_MOD_VFB, IF_REAL, "Flat Band Voltage"),
|
||||
IOP( "cjsw", BSIM3_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit periphery"),
|
||||
IOP( "cjswg", BSIM3_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"),
|
||||
IOP( "tpb", BSIM3_MOD_TPB, IF_REAL, "Temperature coefficient of pb"),
|
||||
IOP( "tcj", BSIM3_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"),
|
||||
IOP( "tpbsw", BSIM3_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"),
|
||||
IOP( "tcjsw", BSIM3_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"),
|
||||
IOP( "tpbswg", BSIM3_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"),
|
||||
IOP( "tcjswg", BSIM3_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"),
|
||||
IOP( "acde", BSIM3_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"),
|
||||
IOP( "moin", BSIM3_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"),
|
||||
IOP( "noff", BSIM3_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"),
|
||||
IOP( "voffcv", BSIM3_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"),
|
||||
IOP( "lint", BSIM3_MOD_LINT, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "ll", BSIM3_MOD_LL, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "llc", BSIM3_MOD_LLC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP( "lln", BSIM3_MOD_LLN, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "lw", BSIM3_MOD_LW, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "lwc", BSIM3_MOD_LWC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP( "lwn", BSIM3_MOD_LWN, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "lwl", BSIM3_MOD_LWL, IF_REAL, "Length reduction parameter"),
|
||||
IOP( "lwlc", BSIM3_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"),
|
||||
IOP( "lmin", BSIM3_MOD_LMIN, IF_REAL, "Minimum length for the model"),
|
||||
IOP( "lmax", BSIM3_MOD_LMAX, IF_REAL, "Maximum length for the model"),
|
||||
IOP ("wr", BSIM3_MOD_WR, IF_REAL, "Width dependence of rds"),
|
||||
IOP ("wint", BSIM3_MOD_WINT, IF_REAL, "Width reduction parameter"),
|
||||
IOP ("dwg", BSIM3_MOD_DWG, IF_REAL, "Width reduction parameter"),
|
||||
IOP ("dwb", BSIM3_MOD_DWB, IF_REAL, "Width reduction parameter"),
|
||||
|
||||
IOP( "wr", BSIM3_MOD_WR, IF_REAL, "Width dependence of rds"),
|
||||
IOP( "wint", BSIM3_MOD_WINT, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "dwg", BSIM3_MOD_DWG, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "dwb", BSIM3_MOD_DWB, IF_REAL, "Width reduction parameter"),
|
||||
IOP ("wl", BSIM3_MOD_WL, IF_REAL, "Width reduction parameter"),
|
||||
IOP ("wlc", BSIM3_MOD_WLC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP ("wln", BSIM3_MOD_WLN, IF_REAL, "Width reduction parameter"),
|
||||
IOP ("ww", BSIM3_MOD_WW, IF_REAL, "Width reduction parameter"),
|
||||
IOP ("wwc", BSIM3_MOD_WWC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP ("wwn", BSIM3_MOD_WWN, IF_REAL, "Width reduction parameter"),
|
||||
IOP ("wwl", BSIM3_MOD_WWL, IF_REAL, "Width reduction parameter"),
|
||||
IOP ("wwlc", BSIM3_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP ("wmin", BSIM3_MOD_WMIN, IF_REAL, "Minimum width for the model"),
|
||||
IOP ("wmax", BSIM3_MOD_WMAX, IF_REAL, "Maximum width for the model"),
|
||||
|
||||
IOP( "wl", BSIM3_MOD_WL, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "wlc", BSIM3_MOD_WLC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP( "wln", BSIM3_MOD_WLN, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "ww", BSIM3_MOD_WW, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "wwc", BSIM3_MOD_WWC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP( "wwn", BSIM3_MOD_WWN, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "wwl", BSIM3_MOD_WWL, IF_REAL, "Width reduction parameter"),
|
||||
IOP( "wwlc", BSIM3_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"),
|
||||
IOP( "wmin", BSIM3_MOD_WMIN, IF_REAL, "Minimum width for the model"),
|
||||
IOP( "wmax", BSIM3_MOD_WMAX, IF_REAL, "Maximum width for the model"),
|
||||
IOP ("b0", BSIM3_MOD_B0, IF_REAL, "Abulk narrow width parameter"),
|
||||
IOP ("b1", BSIM3_MOD_B1, IF_REAL, "Abulk narrow width parameter"),
|
||||
|
||||
IOP( "b0", BSIM3_MOD_B0, IF_REAL, "Abulk narrow width parameter"),
|
||||
IOP( "b1", BSIM3_MOD_B1, IF_REAL, "Abulk narrow width parameter"),
|
||||
IOP ("cgsl", BSIM3_MOD_CGSL, IF_REAL, "New C-V model parameter"),
|
||||
IOP ("cgdl", BSIM3_MOD_CGDL, IF_REAL, "New C-V model parameter"),
|
||||
IOP ("ckappa", BSIM3_MOD_CKAPPA, IF_REAL, "New C-V model parameter"),
|
||||
IOP ("cf", BSIM3_MOD_CF, IF_REAL, "Fringe capacitance parameter"),
|
||||
IOP ("clc", BSIM3_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"),
|
||||
IOP ("cle", BSIM3_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"),
|
||||
IOP ("dwc", BSIM3_MOD_DWC, IF_REAL, "Delta W for C-V model"),
|
||||
IOP ("dlc", BSIM3_MOD_DLC, IF_REAL, "Delta L for C-V model"),
|
||||
|
||||
IOP( "cgsl", BSIM3_MOD_CGSL, IF_REAL, "New C-V model parameter"),
|
||||
IOP( "cgdl", BSIM3_MOD_CGDL, IF_REAL, "New C-V model parameter"),
|
||||
IOP( "ckappa", BSIM3_MOD_CKAPPA, IF_REAL, "New C-V model parameter"),
|
||||
IOP( "cf", BSIM3_MOD_CF, IF_REAL, "Fringe capacitance parameter"),
|
||||
IOP( "clc", BSIM3_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"),
|
||||
IOP( "cle", BSIM3_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"),
|
||||
IOP( "dwc", BSIM3_MOD_DWC, IF_REAL, "Delta W for C-V model"),
|
||||
IOP( "dlc", BSIM3_MOD_DLC, IF_REAL, "Delta L for C-V model"),
|
||||
IOP ("alpha0", BSIM3_MOD_ALPHA0, IF_REAL, "substrate current model parameter"),
|
||||
IOP ("alpha1", BSIM3_MOD_ALPHA1, IF_REAL, "substrate current model parameter"),
|
||||
IOP ("beta0", BSIM3_MOD_BETA0, IF_REAL, "substrate current model parameter"),
|
||||
IOP ("ijth", BSIM3_MOD_IJTH, IF_REAL, "Diode limiting current"),
|
||||
|
||||
IOP( "alpha0", BSIM3_MOD_ALPHA0, IF_REAL, "substrate current model parameter"),
|
||||
IOP( "alpha1", BSIM3_MOD_ALPHA1, IF_REAL, "substrate current model parameter"),
|
||||
IOP( "beta0", BSIM3_MOD_BETA0, IF_REAL, "substrate current model parameter"),
|
||||
IOP( "ijth", BSIM3_MOD_IJTH, IF_REAL, "Diode limiting current"),
|
||||
IOP ("lcdsc", BSIM3_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"),
|
||||
IOP ("lcdscb", BSIM3_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"),
|
||||
IOP ("lcdscd", BSIM3_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"),
|
||||
IOP ("lcit", BSIM3_MOD_LCIT, IF_REAL, "Length dependence of cit"),
|
||||
IOP ("lnfactor", BSIM3_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"),
|
||||
IOP ("lxj", BSIM3_MOD_LXJ, IF_REAL, "Length dependence of xj"),
|
||||
IOP ("lvsat", BSIM3_MOD_LVSAT, IF_REAL, "Length dependence of vsat"),
|
||||
IOP ("lat", BSIM3_MOD_LAT, IF_REAL, "Length dependence of at"),
|
||||
IOP ("la0", BSIM3_MOD_LA0, IF_REAL, "Length dependence of a0"),
|
||||
IOP ("lags", BSIM3_MOD_LAGS, IF_REAL, "Length dependence of ags"),
|
||||
IOP ("la1", BSIM3_MOD_LA1, IF_REAL, "Length dependence of a1"),
|
||||
IOP ("la2", BSIM3_MOD_LA2, IF_REAL, "Length dependence of a2"),
|
||||
IOP ("lketa", BSIM3_MOD_LKETA, IF_REAL, "Length dependence of keta"),
|
||||
IOP ("lnsub", BSIM3_MOD_LNSUB, IF_REAL, "Length dependence of nsub"),
|
||||
IOP ("lnch", BSIM3_MOD_LNPEAK, IF_REAL, "Length dependence of nch"),
|
||||
IOP ("lngate", BSIM3_MOD_LNGATE, IF_REAL, "Length dependence of ngate"),
|
||||
IOP ("lgamma1", BSIM3_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"),
|
||||
IOP ("lgamma2", BSIM3_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"),
|
||||
IOP ("lvbx", BSIM3_MOD_LVBX, IF_REAL, "Length dependence of vbx"),
|
||||
IOP ("lvbm", BSIM3_MOD_LVBM, IF_REAL, "Length dependence of vbm"),
|
||||
IOP ("lxt", BSIM3_MOD_LXT, IF_REAL, "Length dependence of xt"),
|
||||
IOP ("lk1", BSIM3_MOD_LK1, IF_REAL, "Length dependence of k1"),
|
||||
IOP ("lkt1", BSIM3_MOD_LKT1, IF_REAL, "Length dependence of kt1"),
|
||||
IOP ("lkt1l", BSIM3_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"),
|
||||
IOP ("lkt2", BSIM3_MOD_LKT2, IF_REAL, "Length dependence of kt2"),
|
||||
IOP ("lk2", BSIM3_MOD_LK2, IF_REAL, "Length dependence of k2"),
|
||||
IOP ("lk3", BSIM3_MOD_LK3, IF_REAL, "Length dependence of k3"),
|
||||
IOP ("lk3b", BSIM3_MOD_LK3B, IF_REAL, "Length dependence of k3b"),
|
||||
IOP ("lw0", BSIM3_MOD_LW0, IF_REAL, "Length dependence of w0"),
|
||||
IOP ("lnlx", BSIM3_MOD_LNLX, IF_REAL, "Length dependence of nlx"),
|
||||
IOP ("ldvt0", BSIM3_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"),
|
||||
IOP ("ldvt1", BSIM3_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"),
|
||||
IOP ("ldvt2", BSIM3_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"),
|
||||
IOP ("ldvt0w", BSIM3_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"),
|
||||
IOP ("ldvt1w", BSIM3_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"),
|
||||
IOP ("ldvt2w", BSIM3_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"),
|
||||
IOP ("ldrout", BSIM3_MOD_LDROUT, IF_REAL, "Length dependence of drout"),
|
||||
IOP ("ldsub", BSIM3_MOD_LDSUB, IF_REAL, "Length dependence of dsub"),
|
||||
IOP ("lvth0", BSIM3_MOD_LVTH0, IF_REAL, "Length dependence of vto"),
|
||||
IOP ("lvtho", BSIM3_MOD_LVTH0, IF_REAL, "Length dependence of vto"),
|
||||
IOP ("lua", BSIM3_MOD_LUA, IF_REAL, "Length dependence of ua"),
|
||||
IOP ("lua1", BSIM3_MOD_LUA1, IF_REAL, "Length dependence of ua1"),
|
||||
IOP ("lub", BSIM3_MOD_LUB, IF_REAL, "Length dependence of ub"),
|
||||
IOP ("lub1", BSIM3_MOD_LUB1, IF_REAL, "Length dependence of ub1"),
|
||||
IOP ("luc", BSIM3_MOD_LUC, IF_REAL, "Length dependence of uc"),
|
||||
IOP ("luc1", BSIM3_MOD_LUC1, IF_REAL, "Length dependence of uc1"),
|
||||
IOP ("lu0", BSIM3_MOD_LU0, IF_REAL, "Length dependence of u0"),
|
||||
IOP ("lute", BSIM3_MOD_LUTE, IF_REAL, "Length dependence of ute"),
|
||||
IOP ("lvoff", BSIM3_MOD_LVOFF, IF_REAL, "Length dependence of voff"),
|
||||
IOP ("lelm", BSIM3_MOD_LELM, IF_REAL, "Length dependence of elm"),
|
||||
IOP ("ldelta", BSIM3_MOD_LDELTA, IF_REAL, "Length dependence of delta"),
|
||||
IOP ("lrdsw", BSIM3_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "),
|
||||
|
||||
IOP( "lcdsc", BSIM3_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"),
|
||||
IOP( "lcdscb", BSIM3_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"),
|
||||
IOP( "lcdscd", BSIM3_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"),
|
||||
IOP( "lcit", BSIM3_MOD_LCIT, IF_REAL, "Length dependence of cit"),
|
||||
IOP( "lnfactor", BSIM3_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"),
|
||||
IOP( "lxj", BSIM3_MOD_LXJ, IF_REAL, "Length dependence of xj"),
|
||||
IOP( "lvsat", BSIM3_MOD_LVSAT, IF_REAL, "Length dependence of vsat"),
|
||||
IOP( "lat", BSIM3_MOD_LAT, IF_REAL, "Length dependence of at"),
|
||||
IOP( "la0", BSIM3_MOD_LA0, IF_REAL, "Length dependence of a0"),
|
||||
IOP( "lags", BSIM3_MOD_LAGS, IF_REAL, "Length dependence of ags"),
|
||||
IOP( "la1", BSIM3_MOD_LA1, IF_REAL, "Length dependence of a1"),
|
||||
IOP( "la2", BSIM3_MOD_LA2, IF_REAL, "Length dependence of a2"),
|
||||
IOP( "lketa", BSIM3_MOD_LKETA, IF_REAL, "Length dependence of keta"),
|
||||
IOP( "lnsub", BSIM3_MOD_LNSUB, IF_REAL, "Length dependence of nsub"),
|
||||
IOP( "lnch", BSIM3_MOD_LNPEAK, IF_REAL, "Length dependence of nch"),
|
||||
IOP( "lngate", BSIM3_MOD_LNGATE, IF_REAL, "Length dependence of ngate"),
|
||||
IOP( "lgamma1", BSIM3_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"),
|
||||
IOP( "lgamma2", BSIM3_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"),
|
||||
IOP( "lvbx", BSIM3_MOD_LVBX, IF_REAL, "Length dependence of vbx"),
|
||||
IOP( "lvbm", BSIM3_MOD_LVBM, IF_REAL, "Length dependence of vbm"),
|
||||
IOP( "lxt", BSIM3_MOD_LXT, IF_REAL, "Length dependence of xt"),
|
||||
IOP( "lk1", BSIM3_MOD_LK1, IF_REAL, "Length dependence of k1"),
|
||||
IOP( "lkt1", BSIM3_MOD_LKT1, IF_REAL, "Length dependence of kt1"),
|
||||
IOP( "lkt1l", BSIM3_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"),
|
||||
IOP( "lkt2", BSIM3_MOD_LKT2, IF_REAL, "Length dependence of kt2"),
|
||||
IOP( "lk2", BSIM3_MOD_LK2, IF_REAL, "Length dependence of k2"),
|
||||
IOP( "lk3", BSIM3_MOD_LK3, IF_REAL, "Length dependence of k3"),
|
||||
IOP( "lk3b", BSIM3_MOD_LK3B, IF_REAL, "Length dependence of k3b"),
|
||||
IOP( "lw0", BSIM3_MOD_LW0, IF_REAL, "Length dependence of w0"),
|
||||
IOP( "lnlx", BSIM3_MOD_LNLX, IF_REAL, "Length dependence of nlx"),
|
||||
IOP( "ldvt0", BSIM3_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"),
|
||||
IOP( "ldvt1", BSIM3_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"),
|
||||
IOP( "ldvt2", BSIM3_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"),
|
||||
IOP( "ldvt0w", BSIM3_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"),
|
||||
IOP( "ldvt1w", BSIM3_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"),
|
||||
IOP( "ldvt2w", BSIM3_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"),
|
||||
IOP( "ldrout", BSIM3_MOD_LDROUT, IF_REAL, "Length dependence of drout"),
|
||||
IOP( "ldsub", BSIM3_MOD_LDSUB, IF_REAL, "Length dependence of dsub"),
|
||||
IOP( "lvth0", BSIM3_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
|
||||
IOP( "lvtho", BSIM3_MOD_LVTH0, IF_REAL,"Length dependence of vto"),
|
||||
IOP( "lua", BSIM3_MOD_LUA, IF_REAL, "Length dependence of ua"),
|
||||
IOP( "lua1", BSIM3_MOD_LUA1, IF_REAL, "Length dependence of ua1"),
|
||||
IOP( "lub", BSIM3_MOD_LUB, IF_REAL, "Length dependence of ub"),
|
||||
IOP( "lub1", BSIM3_MOD_LUB1, IF_REAL, "Length dependence of ub1"),
|
||||
IOP( "luc", BSIM3_MOD_LUC, IF_REAL, "Length dependence of uc"),
|
||||
IOP( "luc1", BSIM3_MOD_LUC1, IF_REAL, "Length dependence of uc1"),
|
||||
IOP( "lu0", BSIM3_MOD_LU0, IF_REAL, "Length dependence of u0"),
|
||||
IOP( "lute", BSIM3_MOD_LUTE, IF_REAL, "Length dependence of ute"),
|
||||
IOP( "lvoff", BSIM3_MOD_LVOFF, IF_REAL, "Length dependence of voff"),
|
||||
IOP( "lelm", BSIM3_MOD_LELM, IF_REAL, "Length dependence of elm"),
|
||||
IOP( "ldelta", BSIM3_MOD_LDELTA, IF_REAL, "Length dependence of delta"),
|
||||
IOP( "lrdsw", BSIM3_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "),
|
||||
IOP ("lprwg", BSIM3_MOD_LPRWG, IF_REAL, "Length dependence of prwg "),
|
||||
IOP ("lprwb", BSIM3_MOD_LPRWB, IF_REAL, "Length dependence of prwb "),
|
||||
|
||||
IOP( "lprwg", BSIM3_MOD_LPRWG, IF_REAL, "Length dependence of prwg "),
|
||||
IOP( "lprwb", BSIM3_MOD_LPRWB, IF_REAL, "Length dependence of prwb "),
|
||||
IOP ("lprt", BSIM3_MOD_LPRT, IF_REAL, "Length dependence of prt "),
|
||||
IOP ("leta0", BSIM3_MOD_LETA0, IF_REAL, "Length dependence of eta0"),
|
||||
IOP ("letab", BSIM3_MOD_LETAB, IF_REAL, "Length dependence of etab"),
|
||||
IOP ("lpclm", BSIM3_MOD_LPCLM, IF_REAL, "Length dependence of pclm"),
|
||||
IOP ("lpdiblc1", BSIM3_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"),
|
||||
IOP ("lpdiblc2", BSIM3_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"),
|
||||
IOP ("lpdiblcb", BSIM3_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"),
|
||||
IOP ("lpscbe1", BSIM3_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"),
|
||||
IOP ("lpscbe2", BSIM3_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"),
|
||||
IOP ("lpvag", BSIM3_MOD_LPVAG, IF_REAL, "Length dependence of pvag"),
|
||||
IOP ("lwr", BSIM3_MOD_LWR, IF_REAL, "Length dependence of wr"),
|
||||
IOP ("ldwg", BSIM3_MOD_LDWG, IF_REAL, "Length dependence of dwg"),
|
||||
IOP ("ldwb", BSIM3_MOD_LDWB, IF_REAL, "Length dependence of dwb"),
|
||||
IOP ("lb0", BSIM3_MOD_LB0, IF_REAL, "Length dependence of b0"),
|
||||
IOP ("lb1", BSIM3_MOD_LB1, IF_REAL, "Length dependence of b1"),
|
||||
IOP ("lcgsl", BSIM3_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"),
|
||||
IOP ("lcgdl", BSIM3_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"),
|
||||
IOP ("lckappa", BSIM3_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"),
|
||||
IOP ("lcf", BSIM3_MOD_LCF, IF_REAL, "Length dependence of cf"),
|
||||
IOP ("lclc", BSIM3_MOD_LCLC, IF_REAL, "Length dependence of clc"),
|
||||
IOP ("lcle", BSIM3_MOD_LCLE, IF_REAL, "Length dependence of cle"),
|
||||
IOP ("lalpha0", BSIM3_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"),
|
||||
IOP ("lalpha1", BSIM3_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"),
|
||||
IOP ("lbeta0", BSIM3_MOD_LBETA0, IF_REAL, "Length dependence of beta0"),
|
||||
IOP ("lvfbcv", BSIM3_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"),
|
||||
IOP ("lvfb", BSIM3_MOD_LVFB, IF_REAL, "Length dependence of vfb"),
|
||||
IOP ("lacde", BSIM3_MOD_LACDE, IF_REAL, "Length dependence of acde"),
|
||||
IOP ("lmoin", BSIM3_MOD_LMOIN, IF_REAL, "Length dependence of moin"),
|
||||
IOP ("lnoff", BSIM3_MOD_LNOFF, IF_REAL, "Length dependence of noff"),
|
||||
IOP ("lvoffcv", BSIM3_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"),
|
||||
IOP ("wcdsc", BSIM3_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"),
|
||||
IOP ("wcdscb", BSIM3_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"),
|
||||
IOP ("wcdscd", BSIM3_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"),
|
||||
IOP ("wcit", BSIM3_MOD_WCIT, IF_REAL, "Width dependence of cit"),
|
||||
IOP ("wnfactor", BSIM3_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"),
|
||||
IOP ("wxj", BSIM3_MOD_WXJ, IF_REAL, "Width dependence of xj"),
|
||||
IOP ("wvsat", BSIM3_MOD_WVSAT, IF_REAL, "Width dependence of vsat"),
|
||||
IOP ("wat", BSIM3_MOD_WAT, IF_REAL, "Width dependence of at"),
|
||||
IOP ("wa0", BSIM3_MOD_WA0, IF_REAL, "Width dependence of a0"),
|
||||
IOP ("wags", BSIM3_MOD_WAGS, IF_REAL, "Width dependence of ags"),
|
||||
IOP ("wa1", BSIM3_MOD_WA1, IF_REAL, "Width dependence of a1"),
|
||||
IOP ("wa2", BSIM3_MOD_WA2, IF_REAL, "Width dependence of a2"),
|
||||
IOP ("wketa", BSIM3_MOD_WKETA, IF_REAL, "Width dependence of keta"),
|
||||
IOP ("wnsub", BSIM3_MOD_WNSUB, IF_REAL, "Width dependence of nsub"),
|
||||
IOP ("wnch", BSIM3_MOD_WNPEAK, IF_REAL, "Width dependence of nch"),
|
||||
IOP ("wngate", BSIM3_MOD_WNGATE, IF_REAL, "Width dependence of ngate"),
|
||||
IOP ("wgamma1", BSIM3_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"),
|
||||
IOP ("wgamma2", BSIM3_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"),
|
||||
IOP ("wvbx", BSIM3_MOD_WVBX, IF_REAL, "Width dependence of vbx"),
|
||||
IOP ("wvbm", BSIM3_MOD_WVBM, IF_REAL, "Width dependence of vbm"),
|
||||
IOP ("wxt", BSIM3_MOD_WXT, IF_REAL, "Width dependence of xt"),
|
||||
IOP ("wk1", BSIM3_MOD_WK1, IF_REAL, "Width dependence of k1"),
|
||||
IOP ("wkt1", BSIM3_MOD_WKT1, IF_REAL, "Width dependence of kt1"),
|
||||
IOP ("wkt1l", BSIM3_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"),
|
||||
IOP ("wkt2", BSIM3_MOD_WKT2, IF_REAL, "Width dependence of kt2"),
|
||||
IOP ("wk2", BSIM3_MOD_WK2, IF_REAL, "Width dependence of k2"),
|
||||
IOP ("wk3", BSIM3_MOD_WK3, IF_REAL, "Width dependence of k3"),
|
||||
IOP ("wk3b", BSIM3_MOD_WK3B, IF_REAL, "Width dependence of k3b"),
|
||||
IOP ("ww0", BSIM3_MOD_WW0, IF_REAL, "Width dependence of w0"),
|
||||
IOP ("wnlx", BSIM3_MOD_WNLX, IF_REAL, "Width dependence of nlx"),
|
||||
IOP ("wdvt0", BSIM3_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"),
|
||||
IOP ("wdvt1", BSIM3_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"),
|
||||
IOP ("wdvt2", BSIM3_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"),
|
||||
IOP ("wdvt0w", BSIM3_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"),
|
||||
IOP ("wdvt1w", BSIM3_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"),
|
||||
IOP ("wdvt2w", BSIM3_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"),
|
||||
IOP ("wdrout", BSIM3_MOD_WDROUT, IF_REAL, "Width dependence of drout"),
|
||||
IOP ("wdsub", BSIM3_MOD_WDSUB, IF_REAL, "Width dependence of dsub"),
|
||||
IOP ("wvth0", BSIM3_MOD_WVTH0, IF_REAL, "Width dependence of vto"),
|
||||
IOP ("wvtho", BSIM3_MOD_WVTH0, IF_REAL, "Width dependence of vto"),
|
||||
IOP ("wua", BSIM3_MOD_WUA, IF_REAL, "Width dependence of ua"),
|
||||
IOP ("wua1", BSIM3_MOD_WUA1, IF_REAL, "Width dependence of ua1"),
|
||||
IOP ("wub", BSIM3_MOD_WUB, IF_REAL, "Width dependence of ub"),
|
||||
IOP ("wub1", BSIM3_MOD_WUB1, IF_REAL, "Width dependence of ub1"),
|
||||
IOP ("wuc", BSIM3_MOD_WUC, IF_REAL, "Width dependence of uc"),
|
||||
IOP ("wuc1", BSIM3_MOD_WUC1, IF_REAL, "Width dependence of uc1"),
|
||||
IOP ("wu0", BSIM3_MOD_WU0, IF_REAL, "Width dependence of u0"),
|
||||
IOP ("wute", BSIM3_MOD_WUTE, IF_REAL, "Width dependence of ute"),
|
||||
IOP ("wvoff", BSIM3_MOD_WVOFF, IF_REAL, "Width dependence of voff"),
|
||||
IOP ("welm", BSIM3_MOD_WELM, IF_REAL, "Width dependence of elm"),
|
||||
IOP ("wdelta", BSIM3_MOD_WDELTA, IF_REAL, "Width dependence of delta"),
|
||||
IOP ("wrdsw", BSIM3_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "),
|
||||
|
||||
IOP( "lprt", BSIM3_MOD_LPRT, IF_REAL, "Length dependence of prt "),
|
||||
IOP( "leta0", BSIM3_MOD_LETA0, IF_REAL, "Length dependence of eta0"),
|
||||
IOP( "letab", BSIM3_MOD_LETAB, IF_REAL, "Length dependence of etab"),
|
||||
IOP( "lpclm", BSIM3_MOD_LPCLM, IF_REAL, "Length dependence of pclm"),
|
||||
IOP( "lpdiblc1", BSIM3_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"),
|
||||
IOP( "lpdiblc2", BSIM3_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"),
|
||||
IOP( "lpdiblcb", BSIM3_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"),
|
||||
IOP( "lpscbe1", BSIM3_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"),
|
||||
IOP( "lpscbe2", BSIM3_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"),
|
||||
IOP( "lpvag", BSIM3_MOD_LPVAG, IF_REAL, "Length dependence of pvag"),
|
||||
IOP( "lwr", BSIM3_MOD_LWR, IF_REAL, "Length dependence of wr"),
|
||||
IOP( "ldwg", BSIM3_MOD_LDWG, IF_REAL, "Length dependence of dwg"),
|
||||
IOP( "ldwb", BSIM3_MOD_LDWB, IF_REAL, "Length dependence of dwb"),
|
||||
IOP( "lb0", BSIM3_MOD_LB0, IF_REAL, "Length dependence of b0"),
|
||||
IOP( "lb1", BSIM3_MOD_LB1, IF_REAL, "Length dependence of b1"),
|
||||
IOP( "lcgsl", BSIM3_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"),
|
||||
IOP( "lcgdl", BSIM3_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"),
|
||||
IOP( "lckappa", BSIM3_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"),
|
||||
IOP( "lcf", BSIM3_MOD_LCF, IF_REAL, "Length dependence of cf"),
|
||||
IOP( "lclc", BSIM3_MOD_LCLC, IF_REAL, "Length dependence of clc"),
|
||||
IOP( "lcle", BSIM3_MOD_LCLE, IF_REAL, "Length dependence of cle"),
|
||||
IOP( "lalpha0", BSIM3_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"),
|
||||
IOP( "lalpha1", BSIM3_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"),
|
||||
IOP( "lbeta0", BSIM3_MOD_LBETA0, IF_REAL, "Length dependence of beta0"),
|
||||
IOP( "lvfbcv", BSIM3_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"),
|
||||
IOP( "lvfb", BSIM3_MOD_LVFB, IF_REAL, "Length dependence of vfb"),
|
||||
IOP( "lacde", BSIM3_MOD_LACDE, IF_REAL, "Length dependence of acde"),
|
||||
IOP( "lmoin", BSIM3_MOD_LMOIN, IF_REAL, "Length dependence of moin"),
|
||||
IOP( "lnoff", BSIM3_MOD_LNOFF, IF_REAL, "Length dependence of noff"),
|
||||
IOP( "lvoffcv", BSIM3_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"),
|
||||
IOP( "wcdsc", BSIM3_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"),
|
||||
IOP( "wcdscb", BSIM3_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"),
|
||||
IOP( "wcdscd", BSIM3_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"),
|
||||
IOP( "wcit", BSIM3_MOD_WCIT, IF_REAL, "Width dependence of cit"),
|
||||
IOP( "wnfactor", BSIM3_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"),
|
||||
IOP( "wxj", BSIM3_MOD_WXJ, IF_REAL, "Width dependence of xj"),
|
||||
IOP( "wvsat", BSIM3_MOD_WVSAT, IF_REAL, "Width dependence of vsat"),
|
||||
IOP( "wat", BSIM3_MOD_WAT, IF_REAL, "Width dependence of at"),
|
||||
IOP( "wa0", BSIM3_MOD_WA0, IF_REAL, "Width dependence of a0"),
|
||||
IOP( "wags", BSIM3_MOD_WAGS, IF_REAL, "Width dependence of ags"),
|
||||
IOP( "wa1", BSIM3_MOD_WA1, IF_REAL, "Width dependence of a1"),
|
||||
IOP( "wa2", BSIM3_MOD_WA2, IF_REAL, "Width dependence of a2"),
|
||||
IOP( "wketa", BSIM3_MOD_WKETA, IF_REAL, "Width dependence of keta"),
|
||||
IOP( "wnsub", BSIM3_MOD_WNSUB, IF_REAL, "Width dependence of nsub"),
|
||||
IOP( "wnch", BSIM3_MOD_WNPEAK, IF_REAL, "Width dependence of nch"),
|
||||
IOP( "wngate", BSIM3_MOD_WNGATE, IF_REAL, "Width dependence of ngate"),
|
||||
IOP( "wgamma1", BSIM3_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"),
|
||||
IOP( "wgamma2", BSIM3_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"),
|
||||
IOP( "wvbx", BSIM3_MOD_WVBX, IF_REAL, "Width dependence of vbx"),
|
||||
IOP( "wvbm", BSIM3_MOD_WVBM, IF_REAL, "Width dependence of vbm"),
|
||||
IOP( "wxt", BSIM3_MOD_WXT, IF_REAL, "Width dependence of xt"),
|
||||
IOP( "wk1", BSIM3_MOD_WK1, IF_REAL, "Width dependence of k1"),
|
||||
IOP( "wkt1", BSIM3_MOD_WKT1, IF_REAL, "Width dependence of kt1"),
|
||||
IOP( "wkt1l", BSIM3_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"),
|
||||
IOP( "wkt2", BSIM3_MOD_WKT2, IF_REAL, "Width dependence of kt2"),
|
||||
IOP( "wk2", BSIM3_MOD_WK2, IF_REAL, "Width dependence of k2"),
|
||||
IOP( "wk3", BSIM3_MOD_WK3, IF_REAL, "Width dependence of k3"),
|
||||
IOP( "wk3b", BSIM3_MOD_WK3B, IF_REAL, "Width dependence of k3b"),
|
||||
IOP( "ww0", BSIM3_MOD_WW0, IF_REAL, "Width dependence of w0"),
|
||||
IOP( "wnlx", BSIM3_MOD_WNLX, IF_REAL, "Width dependence of nlx"),
|
||||
IOP( "wdvt0", BSIM3_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"),
|
||||
IOP( "wdvt1", BSIM3_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"),
|
||||
IOP( "wdvt2", BSIM3_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"),
|
||||
IOP( "wdvt0w", BSIM3_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"),
|
||||
IOP( "wdvt1w", BSIM3_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"),
|
||||
IOP( "wdvt2w", BSIM3_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"),
|
||||
IOP( "wdrout", BSIM3_MOD_WDROUT, IF_REAL, "Width dependence of drout"),
|
||||
IOP( "wdsub", BSIM3_MOD_WDSUB, IF_REAL, "Width dependence of dsub"),
|
||||
IOP( "wvth0", BSIM3_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
|
||||
IOP( "wvtho", BSIM3_MOD_WVTH0, IF_REAL,"Width dependence of vto"),
|
||||
IOP( "wua", BSIM3_MOD_WUA, IF_REAL, "Width dependence of ua"),
|
||||
IOP( "wua1", BSIM3_MOD_WUA1, IF_REAL, "Width dependence of ua1"),
|
||||
IOP( "wub", BSIM3_MOD_WUB, IF_REAL, "Width dependence of ub"),
|
||||
IOP( "wub1", BSIM3_MOD_WUB1, IF_REAL, "Width dependence of ub1"),
|
||||
IOP( "wuc", BSIM3_MOD_WUC, IF_REAL, "Width dependence of uc"),
|
||||
IOP( "wuc1", BSIM3_MOD_WUC1, IF_REAL, "Width dependence of uc1"),
|
||||
IOP( "wu0", BSIM3_MOD_WU0, IF_REAL, "Width dependence of u0"),
|
||||
IOP( "wute", BSIM3_MOD_WUTE, IF_REAL, "Width dependence of ute"),
|
||||
IOP( "wvoff", BSIM3_MOD_WVOFF, IF_REAL, "Width dependence of voff"),
|
||||
IOP( "welm", BSIM3_MOD_WELM, IF_REAL, "Width dependence of elm"),
|
||||
IOP( "wdelta", BSIM3_MOD_WDELTA, IF_REAL, "Width dependence of delta"),
|
||||
IOP( "wrdsw", BSIM3_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "),
|
||||
IOP ("wprwg", BSIM3_MOD_WPRWG, IF_REAL, "Width dependence of prwg "),
|
||||
IOP ("wprwb", BSIM3_MOD_WPRWB, IF_REAL, "Width dependence of prwb "),
|
||||
|
||||
IOP( "wprwg", BSIM3_MOD_WPRWG, IF_REAL, "Width dependence of prwg "),
|
||||
IOP( "wprwb", BSIM3_MOD_WPRWB, IF_REAL, "Width dependence of prwb "),
|
||||
IOP ("wprt", BSIM3_MOD_WPRT, IF_REAL, "Width dependence of prt"),
|
||||
IOP ("weta0", BSIM3_MOD_WETA0, IF_REAL, "Width dependence of eta0"),
|
||||
IOP ("wetab", BSIM3_MOD_WETAB, IF_REAL, "Width dependence of etab"),
|
||||
IOP ("wpclm", BSIM3_MOD_WPCLM, IF_REAL, "Width dependence of pclm"),
|
||||
IOP ("wpdiblc1", BSIM3_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"),
|
||||
IOP ("wpdiblc2", BSIM3_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"),
|
||||
IOP ("wpdiblcb", BSIM3_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"),
|
||||
IOP ("wpscbe1", BSIM3_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"),
|
||||
IOP ("wpscbe2", BSIM3_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"),
|
||||
IOP ("wpvag", BSIM3_MOD_WPVAG, IF_REAL, "Width dependence of pvag"),
|
||||
IOP ("wwr", BSIM3_MOD_WWR, IF_REAL, "Width dependence of wr"),
|
||||
IOP ("wdwg", BSIM3_MOD_WDWG, IF_REAL, "Width dependence of dwg"),
|
||||
IOP ("wdwb", BSIM3_MOD_WDWB, IF_REAL, "Width dependence of dwb"),
|
||||
IOP ("wb0", BSIM3_MOD_WB0, IF_REAL, "Width dependence of b0"),
|
||||
IOP ("wb1", BSIM3_MOD_WB1, IF_REAL, "Width dependence of b1"),
|
||||
IOP ("wcgsl", BSIM3_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"),
|
||||
IOP ("wcgdl", BSIM3_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"),
|
||||
IOP ("wckappa", BSIM3_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"),
|
||||
IOP ("wcf", BSIM3_MOD_WCF, IF_REAL, "Width dependence of cf"),
|
||||
IOP ("wclc", BSIM3_MOD_WCLC, IF_REAL, "Width dependence of clc"),
|
||||
IOP ("wcle", BSIM3_MOD_WCLE, IF_REAL, "Width dependence of cle"),
|
||||
IOP ("walpha0", BSIM3_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"),
|
||||
IOP ("walpha1", BSIM3_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"),
|
||||
IOP ("wbeta0", BSIM3_MOD_WBETA0, IF_REAL, "Width dependence of beta0"),
|
||||
IOP ("wvfbcv", BSIM3_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"),
|
||||
IOP ("wvfb", BSIM3_MOD_WVFB, IF_REAL, "Width dependence of vfb"),
|
||||
IOP ("wacde", BSIM3_MOD_WACDE, IF_REAL, "Width dependence of acde"),
|
||||
IOP ("wmoin", BSIM3_MOD_WMOIN, IF_REAL, "Width dependence of moin"),
|
||||
IOP ("wnoff", BSIM3_MOD_WNOFF, IF_REAL, "Width dependence of noff"),
|
||||
IOP ("wvoffcv", BSIM3_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"),
|
||||
|
||||
IOP( "wprt", BSIM3_MOD_WPRT, IF_REAL, "Width dependence of prt"),
|
||||
IOP( "weta0", BSIM3_MOD_WETA0, IF_REAL, "Width dependence of eta0"),
|
||||
IOP( "wetab", BSIM3_MOD_WETAB, IF_REAL, "Width dependence of etab"),
|
||||
IOP( "wpclm", BSIM3_MOD_WPCLM, IF_REAL, "Width dependence of pclm"),
|
||||
IOP( "wpdiblc1", BSIM3_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"),
|
||||
IOP( "wpdiblc2", BSIM3_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"),
|
||||
IOP( "wpdiblcb", BSIM3_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"),
|
||||
IOP( "wpscbe1", BSIM3_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"),
|
||||
IOP( "wpscbe2", BSIM3_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"),
|
||||
IOP( "wpvag", BSIM3_MOD_WPVAG, IF_REAL, "Width dependence of pvag"),
|
||||
IOP( "wwr", BSIM3_MOD_WWR, IF_REAL, "Width dependence of wr"),
|
||||
IOP( "wdwg", BSIM3_MOD_WDWG, IF_REAL, "Width dependence of dwg"),
|
||||
IOP( "wdwb", BSIM3_MOD_WDWB, IF_REAL, "Width dependence of dwb"),
|
||||
IOP( "wb0", BSIM3_MOD_WB0, IF_REAL, "Width dependence of b0"),
|
||||
IOP( "wb1", BSIM3_MOD_WB1, IF_REAL, "Width dependence of b1"),
|
||||
IOP( "wcgsl", BSIM3_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"),
|
||||
IOP( "wcgdl", BSIM3_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"),
|
||||
IOP( "wckappa", BSIM3_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"),
|
||||
IOP( "wcf", BSIM3_MOD_WCF, IF_REAL, "Width dependence of cf"),
|
||||
IOP( "wclc", BSIM3_MOD_WCLC, IF_REAL, "Width dependence of clc"),
|
||||
IOP( "wcle", BSIM3_MOD_WCLE, IF_REAL, "Width dependence of cle"),
|
||||
IOP( "walpha0", BSIM3_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"),
|
||||
IOP( "walpha1", BSIM3_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"),
|
||||
IOP( "wbeta0", BSIM3_MOD_WBETA0, IF_REAL, "Width dependence of beta0"),
|
||||
IOP( "wvfbcv", BSIM3_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"),
|
||||
IOP( "wvfb", BSIM3_MOD_WVFB, IF_REAL, "Width dependence of vfb"),
|
||||
IOP( "wacde", BSIM3_MOD_WACDE, IF_REAL, "Width dependence of acde"),
|
||||
IOP( "wmoin", BSIM3_MOD_WMOIN, IF_REAL, "Width dependence of moin"),
|
||||
IOP( "wnoff", BSIM3_MOD_WNOFF, IF_REAL, "Width dependence of noff"),
|
||||
IOP( "wvoffcv", BSIM3_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"),
|
||||
IOP ("pcdsc", BSIM3_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"),
|
||||
IOP ("pcdscb", BSIM3_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"),
|
||||
IOP ("pcdscd", BSIM3_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"),
|
||||
IOP ("pcit", BSIM3_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"),
|
||||
IOP ("pnfactor", BSIM3_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"),
|
||||
IOP ("pxj", BSIM3_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"),
|
||||
IOP ("pvsat", BSIM3_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"),
|
||||
IOP ("pat", BSIM3_MOD_PAT, IF_REAL, "Cross-term dependence of at"),
|
||||
IOP ("pa0", BSIM3_MOD_PA0, IF_REAL, "Cross-term dependence of a0"),
|
||||
IOP ("pags", BSIM3_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"),
|
||||
IOP ("pa1", BSIM3_MOD_PA1, IF_REAL, "Cross-term dependence of a1"),
|
||||
IOP ("pa2", BSIM3_MOD_PA2, IF_REAL, "Cross-term dependence of a2"),
|
||||
IOP ("pketa", BSIM3_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"),
|
||||
IOP ("pnsub", BSIM3_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"),
|
||||
IOP ("pnch", BSIM3_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"),
|
||||
IOP ("pngate", BSIM3_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"),
|
||||
IOP ("pgamma1", BSIM3_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"),
|
||||
IOP ("pgamma2", BSIM3_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"),
|
||||
IOP ("pvbx", BSIM3_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"),
|
||||
IOP ("pvbm", BSIM3_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"),
|
||||
IOP ("pxt", BSIM3_MOD_PXT, IF_REAL, "Cross-term dependence of xt"),
|
||||
IOP ("pk1", BSIM3_MOD_PK1, IF_REAL, "Cross-term dependence of k1"),
|
||||
IOP ("pkt1", BSIM3_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"),
|
||||
IOP ("pkt1l", BSIM3_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"),
|
||||
IOP ("pkt2", BSIM3_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"),
|
||||
IOP ("pk2", BSIM3_MOD_PK2, IF_REAL, "Cross-term dependence of k2"),
|
||||
IOP ("pk3", BSIM3_MOD_PK3, IF_REAL, "Cross-term dependence of k3"),
|
||||
IOP ("pk3b", BSIM3_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"),
|
||||
IOP ("pw0", BSIM3_MOD_PW0, IF_REAL, "Cross-term dependence of w0"),
|
||||
IOP ("pnlx", BSIM3_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"),
|
||||
IOP ("pdvt0", BSIM3_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"),
|
||||
IOP ("pdvt1", BSIM3_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"),
|
||||
IOP ("pdvt2", BSIM3_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"),
|
||||
IOP ("pdvt0w", BSIM3_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"),
|
||||
IOP ("pdvt1w", BSIM3_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"),
|
||||
IOP ("pdvt2w", BSIM3_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"),
|
||||
IOP ("pdrout", BSIM3_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"),
|
||||
IOP ("pdsub", BSIM3_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"),
|
||||
IOP ("pvth0", BSIM3_MOD_PVTH0, IF_REAL, "Cross-term dependence of vto"),
|
||||
IOP ("pvtho", BSIM3_MOD_PVTH0, IF_REAL, "Cross-term dependence of vto"),
|
||||
IOP ("pua", BSIM3_MOD_PUA, IF_REAL, "Cross-term dependence of ua"),
|
||||
IOP ("pua1", BSIM3_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"),
|
||||
IOP ("pub", BSIM3_MOD_PUB, IF_REAL, "Cross-term dependence of ub"),
|
||||
IOP ("pub1", BSIM3_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"),
|
||||
IOP ("puc", BSIM3_MOD_PUC, IF_REAL, "Cross-term dependence of uc"),
|
||||
IOP ("puc1", BSIM3_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"),
|
||||
IOP ("pu0", BSIM3_MOD_PU0, IF_REAL, "Cross-term dependence of u0"),
|
||||
IOP ("pute", BSIM3_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"),
|
||||
IOP ("pvoff", BSIM3_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"),
|
||||
IOP ("pelm", BSIM3_MOD_PELM, IF_REAL, "Cross-term dependence of elm"),
|
||||
IOP ("pdelta", BSIM3_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"),
|
||||
IOP ("prdsw", BSIM3_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "),
|
||||
|
||||
IOP( "pcdsc", BSIM3_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"),
|
||||
IOP( "pcdscb", BSIM3_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"),
|
||||
IOP( "pcdscd", BSIM3_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"),
|
||||
IOP( "pcit", BSIM3_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"),
|
||||
IOP( "pnfactor", BSIM3_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"),
|
||||
IOP( "pxj", BSIM3_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"),
|
||||
IOP( "pvsat", BSIM3_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"),
|
||||
IOP( "pat", BSIM3_MOD_PAT, IF_REAL, "Cross-term dependence of at"),
|
||||
IOP( "pa0", BSIM3_MOD_PA0, IF_REAL, "Cross-term dependence of a0"),
|
||||
IOP( "pags", BSIM3_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"),
|
||||
IOP( "pa1", BSIM3_MOD_PA1, IF_REAL, "Cross-term dependence of a1"),
|
||||
IOP( "pa2", BSIM3_MOD_PA2, IF_REAL, "Cross-term dependence of a2"),
|
||||
IOP( "pketa", BSIM3_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"),
|
||||
IOP( "pnsub", BSIM3_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"),
|
||||
IOP( "pnch", BSIM3_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"),
|
||||
IOP( "pngate", BSIM3_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"),
|
||||
IOP( "pgamma1", BSIM3_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"),
|
||||
IOP( "pgamma2", BSIM3_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"),
|
||||
IOP( "pvbx", BSIM3_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"),
|
||||
IOP( "pvbm", BSIM3_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"),
|
||||
IOP( "pxt", BSIM3_MOD_PXT, IF_REAL, "Cross-term dependence of xt"),
|
||||
IOP( "pk1", BSIM3_MOD_PK1, IF_REAL, "Cross-term dependence of k1"),
|
||||
IOP( "pkt1", BSIM3_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"),
|
||||
IOP( "pkt1l", BSIM3_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"),
|
||||
IOP( "pkt2", BSIM3_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"),
|
||||
IOP( "pk2", BSIM3_MOD_PK2, IF_REAL, "Cross-term dependence of k2"),
|
||||
IOP( "pk3", BSIM3_MOD_PK3, IF_REAL, "Cross-term dependence of k3"),
|
||||
IOP( "pk3b", BSIM3_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"),
|
||||
IOP( "pw0", BSIM3_MOD_PW0, IF_REAL, "Cross-term dependence of w0"),
|
||||
IOP( "pnlx", BSIM3_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"),
|
||||
IOP( "pdvt0", BSIM3_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"),
|
||||
IOP( "pdvt1", BSIM3_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"),
|
||||
IOP( "pdvt2", BSIM3_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"),
|
||||
IOP( "pdvt0w", BSIM3_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"),
|
||||
IOP( "pdvt1w", BSIM3_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"),
|
||||
IOP( "pdvt2w", BSIM3_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"),
|
||||
IOP( "pdrout", BSIM3_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"),
|
||||
IOP( "pdsub", BSIM3_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"),
|
||||
IOP( "pvth0", BSIM3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
|
||||
IOP( "pvtho", BSIM3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"),
|
||||
IOP( "pua", BSIM3_MOD_PUA, IF_REAL, "Cross-term dependence of ua"),
|
||||
IOP( "pua1", BSIM3_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"),
|
||||
IOP( "pub", BSIM3_MOD_PUB, IF_REAL, "Cross-term dependence of ub"),
|
||||
IOP( "pub1", BSIM3_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"),
|
||||
IOP( "puc", BSIM3_MOD_PUC, IF_REAL, "Cross-term dependence of uc"),
|
||||
IOP( "puc1", BSIM3_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"),
|
||||
IOP( "pu0", BSIM3_MOD_PU0, IF_REAL, "Cross-term dependence of u0"),
|
||||
IOP( "pute", BSIM3_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"),
|
||||
IOP( "pvoff", BSIM3_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"),
|
||||
IOP( "pelm", BSIM3_MOD_PELM, IF_REAL, "Cross-term dependence of elm"),
|
||||
IOP( "pdelta", BSIM3_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"),
|
||||
IOP( "prdsw", BSIM3_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "),
|
||||
IOP ("pprwg", BSIM3_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "),
|
||||
IOP ("pprwb", BSIM3_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "),
|
||||
|
||||
IOP( "pprwg", BSIM3_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "),
|
||||
IOP( "pprwb", BSIM3_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "),
|
||||
IOP ("pprt", BSIM3_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "),
|
||||
IOP ("peta0", BSIM3_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"),
|
||||
IOP ("petab", BSIM3_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"),
|
||||
IOP ("ppclm", BSIM3_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"),
|
||||
IOP ("ppdiblc1", BSIM3_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"),
|
||||
IOP ("ppdiblc2", BSIM3_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"),
|
||||
IOP ("ppdiblcb", BSIM3_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"),
|
||||
IOP ("ppscbe1", BSIM3_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"),
|
||||
IOP ("ppscbe2", BSIM3_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"),
|
||||
IOP ("ppvag", BSIM3_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"),
|
||||
IOP ("pwr", BSIM3_MOD_PWR, IF_REAL, "Cross-term dependence of wr"),
|
||||
IOP ("pdwg", BSIM3_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"),
|
||||
IOP ("pdwb", BSIM3_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"),
|
||||
IOP ("pb0", BSIM3_MOD_PB0, IF_REAL, "Cross-term dependence of b0"),
|
||||
IOP ("pb1", BSIM3_MOD_PB1, IF_REAL, "Cross-term dependence of b1"),
|
||||
IOP ("pcgsl", BSIM3_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"),
|
||||
IOP ("pcgdl", BSIM3_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"),
|
||||
IOP ("pckappa", BSIM3_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"),
|
||||
IOP ("pcf", BSIM3_MOD_PCF, IF_REAL, "Cross-term dependence of cf"),
|
||||
IOP ("pclc", BSIM3_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"),
|
||||
IOP ("pcle", BSIM3_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"),
|
||||
IOP ("palpha0", BSIM3_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"),
|
||||
IOP ("palpha1", BSIM3_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"),
|
||||
IOP ("pbeta0", BSIM3_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"),
|
||||
IOP ("pvfbcv", BSIM3_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"),
|
||||
IOP ("pvfb", BSIM3_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"),
|
||||
IOP ("pacde", BSIM3_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"),
|
||||
IOP ("pmoin", BSIM3_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"),
|
||||
IOP ("pnoff", BSIM3_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"),
|
||||
IOP ("pvoffcv", BSIM3_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"),
|
||||
|
||||
IOP( "pprt", BSIM3_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "),
|
||||
IOP( "peta0", BSIM3_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"),
|
||||
IOP( "petab", BSIM3_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"),
|
||||
IOP( "ppclm", BSIM3_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"),
|
||||
IOP( "ppdiblc1", BSIM3_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"),
|
||||
IOP( "ppdiblc2", BSIM3_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"),
|
||||
IOP( "ppdiblcb", BSIM3_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"),
|
||||
IOP( "ppscbe1", BSIM3_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"),
|
||||
IOP( "ppscbe2", BSIM3_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"),
|
||||
IOP( "ppvag", BSIM3_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"),
|
||||
IOP( "pwr", BSIM3_MOD_PWR, IF_REAL, "Cross-term dependence of wr"),
|
||||
IOP( "pdwg", BSIM3_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"),
|
||||
IOP( "pdwb", BSIM3_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"),
|
||||
IOP( "pb0", BSIM3_MOD_PB0, IF_REAL, "Cross-term dependence of b0"),
|
||||
IOP( "pb1", BSIM3_MOD_PB1, IF_REAL, "Cross-term dependence of b1"),
|
||||
IOP( "pcgsl", BSIM3_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"),
|
||||
IOP( "pcgdl", BSIM3_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"),
|
||||
IOP( "pckappa", BSIM3_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"),
|
||||
IOP( "pcf", BSIM3_MOD_PCF, IF_REAL, "Cross-term dependence of cf"),
|
||||
IOP( "pclc", BSIM3_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"),
|
||||
IOP( "pcle", BSIM3_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"),
|
||||
IOP( "palpha0", BSIM3_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"),
|
||||
IOP( "palpha1", BSIM3_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"),
|
||||
IOP( "pbeta0", BSIM3_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"),
|
||||
IOP( "pvfbcv", BSIM3_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"),
|
||||
IOP( "pvfb", BSIM3_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"),
|
||||
IOP( "pacde", BSIM3_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"),
|
||||
IOP( "pmoin", BSIM3_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"),
|
||||
IOP( "pnoff", BSIM3_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"),
|
||||
IOP( "pvoffcv", BSIM3_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"),
|
||||
IOP ("noia", BSIM3_MOD_NOIA, IF_REAL, "Flicker noise parameter"),
|
||||
IOP ("noib", BSIM3_MOD_NOIB, IF_REAL, "Flicker noise parameter"),
|
||||
IOP ("noic", BSIM3_MOD_NOIC, IF_REAL, "Flicker noise parameter"),
|
||||
IOP ("em", BSIM3_MOD_EM, IF_REAL, "Flicker noise parameter"),
|
||||
IOP ("ef", BSIM3_MOD_EF, IF_REAL, "Flicker noise frequency exponent"),
|
||||
IOP ("af", BSIM3_MOD_AF, IF_REAL, "Flicker noise exponent"),
|
||||
IOP ("kf", BSIM3_MOD_KF, IF_REAL, "Flicker noise coefficient"),
|
||||
|
||||
IOP( "noia", BSIM3_MOD_NOIA, IF_REAL, "Flicker noise parameter"),
|
||||
IOP( "noib", BSIM3_MOD_NOIB, IF_REAL, "Flicker noise parameter"),
|
||||
IOP( "noic", BSIM3_MOD_NOIC, IF_REAL, "Flicker noise parameter"),
|
||||
IOP( "em", BSIM3_MOD_EM, IF_REAL, "Flicker noise parameter"),
|
||||
IOP( "ef", BSIM3_MOD_EF, IF_REAL, "Flicker noise frequency exponent"),
|
||||
IOP( "af", BSIM3_MOD_AF, IF_REAL, "Flicker noise exponent"),
|
||||
IOP( "kf", BSIM3_MOD_KF, IF_REAL, "Flicker noise coefficient"),
|
||||
|
||||
IP( "nmos", BSIM3_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"),
|
||||
IP( "pmos", BSIM3_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"),
|
||||
IP ("nmos", BSIM3_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"),
|
||||
IP ("pmos", BSIM3_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"),
|
||||
};
|
||||
|
||||
char *BSIM3names[] = {
|
||||
"Drain",
|
||||
"Gate",
|
||||
"Source",
|
||||
"Bulk",
|
||||
"Charge"
|
||||
"Drain",
|
||||
"Gate",
|
||||
"Source",
|
||||
"Bulk",
|
||||
"Charge"
|
||||
};
|
||||
|
||||
int BSIM3nSize = NUMELEMS(BSIM3names);
|
||||
int BSIM3pTSize = NUMELEMS(BSIM3pTable);
|
||||
int BSIM3mPTSize = NUMELEMS(BSIM3mPTable);
|
||||
int BSIM3iSize = sizeof(BSIM3instance);
|
||||
int BSIM3mSize = sizeof(BSIM3model);
|
||||
|
||||
|
||||
|
||||
int BSIM3nSize = NUMELEMS (BSIM3names);
|
||||
int BSIM3pTSize = NUMELEMS (BSIM3pTable);
|
||||
int BSIM3mPTSize = NUMELEMS (BSIM3mPTable);
|
||||
int BSIM3iSize = sizeof (BSIM3instance);
|
||||
int BSIM3mSize = sizeof (BSIM3model);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,23 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
Modified: 2000 AlansFixes
|
||||
File: b3acld.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3acld.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3def.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,319 +25,426 @@ File: b3acld.c
|
|||
|
||||
|
||||
int
|
||||
BSIM3acLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||
BSIM3acLoad (GENmodel * inModel, CKTcircuit * ckt)
|
||||
{
|
||||
BSIM3model *model = (BSIM3model*)inModel;
|
||||
BSIM3instance *here;
|
||||
double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb;
|
||||
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb;
|
||||
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega;
|
||||
double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm, Gmbs;
|
||||
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb, xcqbb;
|
||||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
|
||||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
|
||||
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
|
||||
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
|
||||
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css;
|
||||
double ScalingFactor = 1.0e-9;
|
||||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->BSIM3nextModel) {
|
||||
for (here = model->BSIM3instances; here!= NULL;
|
||||
here = here->BSIM3nextInstance) {
|
||||
if (here->BSIM3owner != ARCHme)
|
||||
continue;
|
||||
if (here->BSIM3mode >= 0) {
|
||||
Gm = here->BSIM3gm;
|
||||
Gmbs = here->BSIM3gmbs;
|
||||
FwdSum = Gm + Gmbs;
|
||||
RevSum = 0.0;
|
||||
BSIM3model *model = (BSIM3model *) inModel;
|
||||
BSIM3instance *here;
|
||||
double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb;
|
||||
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb;
|
||||
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega;
|
||||
double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm,
|
||||
Gmbs;
|
||||
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb,
|
||||
xcqbb;
|
||||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
|
||||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
|
||||
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
|
||||
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
|
||||
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Cdb, Csg, Csd, Css, Csb;
|
||||
double ScalingFactor = 1.0e-9;
|
||||
double m;
|
||||
|
||||
gbbdp = -here->BSIM3gbds;
|
||||
gbbsp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs;
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{
|
||||
for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
|
||||
gbdpg = here->BSIM3gbgs;
|
||||
gbdpb = here->BSIM3gbbs;
|
||||
gbdpdp = here->BSIM3gbds;
|
||||
gbdpsp = -(gbdpg + gbdpb + gbdpdp);
|
||||
|
||||
gbspdp = 0.0;
|
||||
gbspg = 0.0;
|
||||
gbspb = 0.0;
|
||||
gbspsp = 0.0;
|
||||
if (here->BSIM3owner != ARCHme)
|
||||
continue;
|
||||
|
||||
if (here->BSIM3nqsMod == 0) {
|
||||
cggb = here->BSIM3cggb;
|
||||
cgsb = here->BSIM3cgsb;
|
||||
cgdb = here->BSIM3cgdb;
|
||||
if (here->BSIM3mode >= 0)
|
||||
{
|
||||
Gm = here->BSIM3gm;
|
||||
Gmbs = here->BSIM3gmbs;
|
||||
FwdSum = Gm + Gmbs;
|
||||
RevSum = 0.0;
|
||||
|
||||
cbgb = here->BSIM3cbgb;
|
||||
cbsb = here->BSIM3cbsb;
|
||||
cbdb = here->BSIM3cbdb;
|
||||
gbbdp = -here->BSIM3gbds;
|
||||
gbbsp = here->BSIM3gbds + here->BSIM3gbgs +
|
||||
here->BSIM3gbbs;
|
||||
|
||||
cdgb = here->BSIM3cdgb;
|
||||
cdsb = here->BSIM3cdsb;
|
||||
cddb = here->BSIM3cddb;
|
||||
gbdpg = here->BSIM3gbgs;
|
||||
gbdpb = here->BSIM3gbbs;
|
||||
gbdpdp = here->BSIM3gbds;
|
||||
gbdpsp = -(gbdpg + gbdpb + gbdpdp);
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.6;
|
||||
dxpart = 0.4;
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
} else {
|
||||
cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
gbspdp = 0.0;
|
||||
gbspg = 0.0;
|
||||
gbspb = 0.0;
|
||||
gbspsp = 0.0;
|
||||
|
||||
xgtg = here->BSIM3gtg;
|
||||
xgtd = here->BSIM3gtd;
|
||||
xgts = here->BSIM3gts;
|
||||
xgtb = here->BSIM3gtb;
|
||||
|
||||
xcqgb = here->BSIM3cqgb * omega;
|
||||
xcqdb = here->BSIM3cqdb * omega;
|
||||
xcqsb = here->BSIM3cqsb * omega;
|
||||
xcqbb = here->BSIM3cqbb * omega;
|
||||
if (here->BSIM3nqsMod == 0)
|
||||
{
|
||||
cggb = here->BSIM3cggb;
|
||||
cgsb = here->BSIM3cgsb;
|
||||
cgdb = here->BSIM3cgdb;
|
||||
|
||||
CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV
|
||||
* here->pParam->BSIM3leffCV;
|
||||
qcheq = -(here->BSIM3qgate + here->BSIM3qbulk);
|
||||
if (fabs(qcheq) <= 1.0e-5 * CoxWL) {
|
||||
if (model->BSIM3xpart < 0.5) {
|
||||
dxpart = 0.4;
|
||||
cbgb = here->BSIM3cbgb;
|
||||
cbsb = here->BSIM3cbsb;
|
||||
cbdb = here->BSIM3cbdb;
|
||||
|
||||
cdgb = here->BSIM3cdgb;
|
||||
cdsb = here->BSIM3cdsb;
|
||||
cddb = here->BSIM3cddb;
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.6;
|
||||
dxpart = 0.4;
|
||||
ddxpart_dVd = ddxpart_dVg =
|
||||
ddxpart_dVb = ddxpart_dVs =
|
||||
0.0;
|
||||
dsxpart_dVd = dsxpart_dVg =
|
||||
dsxpart_dVb = dsxpart_dVs =
|
||||
0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3gtg;
|
||||
xgtd = here->BSIM3gtd;
|
||||
xgts = here->BSIM3gts;
|
||||
xgtb = here->BSIM3gtb;
|
||||
|
||||
xcqgb = here->BSIM3cqgb * omega;
|
||||
xcqdb = here->BSIM3cqdb * omega;
|
||||
xcqsb = here->BSIM3cqsb * omega;
|
||||
xcqbb = here->BSIM3cqbb * omega;
|
||||
|
||||
CoxWL = model->BSIM3cox *
|
||||
here->pParam->BSIM3weffCV *
|
||||
here->pParam->BSIM3leffCV;
|
||||
qcheq = -(here->BSIM3qgate +
|
||||
here->BSIM3qbulk);
|
||||
if (fabs (qcheq) <= 1.0e-5 * CoxWL)
|
||||
{
|
||||
if (model->BSIM3xpart < 0.5)
|
||||
{
|
||||
dxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3xpart >
|
||||
0.5)
|
||||
{
|
||||
dxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dxpart = 0.5;
|
||||
}
|
||||
ddxpart_dVd = ddxpart_dVg =
|
||||
ddxpart_dVb =
|
||||
ddxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dxpart = here->BSIM3qdrn /
|
||||
qcheq;
|
||||
Cdd = here->BSIM3cddb;
|
||||
Csd = -(here->BSIM3cgdb +
|
||||
here->BSIM3cddb +
|
||||
here->BSIM3cbdb);
|
||||
ddxpart_dVd =
|
||||
(Cdd -
|
||||
dxpart * (Cdd +
|
||||
Csd)) /
|
||||
qcheq;
|
||||
Cdg = here->BSIM3cdgb;
|
||||
Csg = -(here->BSIM3cggb +
|
||||
here->BSIM3cdgb +
|
||||
here->BSIM3cbgb);
|
||||
ddxpart_dVg =
|
||||
(Cdg -
|
||||
dxpart * (Cdg +
|
||||
Csg)) /
|
||||
qcheq;
|
||||
|
||||
Cds = here->BSIM3cdsb;
|
||||
Css = -(here->BSIM3cgsb +
|
||||
here->BSIM3cdsb +
|
||||
here->BSIM3cbsb);
|
||||
ddxpart_dVs =
|
||||
(Cds -
|
||||
dxpart * (Cds +
|
||||
Css)) /
|
||||
qcheq;
|
||||
|
||||
ddxpart_dVb =
|
||||
-(ddxpart_dVd +
|
||||
ddxpart_dVg +
|
||||
ddxpart_dVs);
|
||||
}
|
||||
sxpart = 1.0 - dxpart;
|
||||
dsxpart_dVd = -ddxpart_dVd;
|
||||
dsxpart_dVg = -ddxpart_dVg;
|
||||
dsxpart_dVs = -ddxpart_dVs;
|
||||
dsxpart_dVb =
|
||||
-(dsxpart_dVd + dsxpart_dVg +
|
||||
dsxpart_dVs);
|
||||
}
|
||||
}
|
||||
else if (model->BSIM3xpart > 0.5) {
|
||||
dxpart = 0.0;
|
||||
} else {
|
||||
dxpart = 0.5;
|
||||
else
|
||||
{
|
||||
Gm = -here->BSIM3gm;
|
||||
Gmbs = -here->BSIM3gmbs;
|
||||
FwdSum = 0.0;
|
||||
RevSum = -(Gm + Gmbs);
|
||||
|
||||
gbbsp = -here->BSIM3gbds;
|
||||
gbbdp = here->BSIM3gbds + here->BSIM3gbgs +
|
||||
here->BSIM3gbbs;
|
||||
|
||||
gbdpg = 0.0;
|
||||
gbdpsp = 0.0;
|
||||
gbdpb = 0.0;
|
||||
gbdpdp = 0.0;
|
||||
|
||||
gbspg = here->BSIM3gbgs;
|
||||
gbspsp = here->BSIM3gbds;
|
||||
gbspb = here->BSIM3gbbs;
|
||||
gbspdp = -(gbspg + gbspsp + gbspb);
|
||||
|
||||
if (here->BSIM3nqsMod == 0)
|
||||
{
|
||||
cggb = here->BSIM3cggb;
|
||||
cgsb = here->BSIM3cgdb;
|
||||
cgdb = here->BSIM3cgsb;
|
||||
|
||||
cbgb = here->BSIM3cbgb;
|
||||
cbsb = here->BSIM3cbdb;
|
||||
cbdb = here->BSIM3cbsb;
|
||||
|
||||
cdgb = -(here->BSIM3cdgb + cggb +
|
||||
cbgb);
|
||||
cdsb = -(here->BSIM3cddb + cgsb +
|
||||
cbsb);
|
||||
cddb = -(here->BSIM3cdsb + cgdb +
|
||||
cbdb);
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.4;
|
||||
dxpart = 0.6;
|
||||
ddxpart_dVd = ddxpart_dVg =
|
||||
ddxpart_dVb = ddxpart_dVs =
|
||||
0.0;
|
||||
dsxpart_dVd = dsxpart_dVg =
|
||||
dsxpart_dVb = dsxpart_dVs =
|
||||
0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3gtg;
|
||||
xgtd = here->BSIM3gts;
|
||||
xgts = here->BSIM3gtd;
|
||||
xgtb = here->BSIM3gtb;
|
||||
|
||||
xcqgb = here->BSIM3cqgb * omega;
|
||||
xcqdb = here->BSIM3cqsb * omega;
|
||||
xcqsb = here->BSIM3cqdb * omega;
|
||||
xcqbb = here->BSIM3cqbb * omega;
|
||||
|
||||
CoxWL = model->BSIM3cox *
|
||||
here->pParam->BSIM3weffCV *
|
||||
here->pParam->BSIM3leffCV;
|
||||
qcheq = -(here->BSIM3qgate +
|
||||
here->BSIM3qbulk);
|
||||
if (fabs (qcheq) <= 1.0e-5 * CoxWL)
|
||||
{
|
||||
if (model->BSIM3xpart < 0.5)
|
||||
{
|
||||
sxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3xpart >
|
||||
0.5)
|
||||
{
|
||||
sxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sxpart = 0.5;
|
||||
}
|
||||
dsxpart_dVd = dsxpart_dVg =
|
||||
dsxpart_dVb =
|
||||
dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sxpart = here->BSIM3qdrn /
|
||||
qcheq;
|
||||
Css = here->BSIM3cddb;
|
||||
Cds = -(here->BSIM3cgdb +
|
||||
here->BSIM3cddb +
|
||||
here->BSIM3cbdb);
|
||||
dsxpart_dVs =
|
||||
(Css -
|
||||
sxpart * (Css +
|
||||
Cds)) /
|
||||
qcheq;
|
||||
Csg = here->BSIM3cdgb;
|
||||
Cdg = -(here->BSIM3cggb +
|
||||
here->BSIM3cdgb +
|
||||
here->BSIM3cbgb);
|
||||
dsxpart_dVg =
|
||||
(Csg -
|
||||
sxpart * (Csg +
|
||||
Cdg)) /
|
||||
qcheq;
|
||||
|
||||
Csd = here->BSIM3cdsb;
|
||||
Cdd = -(here->BSIM3cgsb +
|
||||
here->BSIM3cdsb +
|
||||
here->BSIM3cbsb);
|
||||
dsxpart_dVd =
|
||||
(Csd -
|
||||
sxpart * (Csd +
|
||||
Cdd)) /
|
||||
qcheq;
|
||||
|
||||
dsxpart_dVb =
|
||||
-(dsxpart_dVd +
|
||||
dsxpart_dVg +
|
||||
dsxpart_dVs);
|
||||
}
|
||||
dxpart = 1.0 - sxpart;
|
||||
ddxpart_dVd = -dsxpart_dVd;
|
||||
ddxpart_dVg = -dsxpart_dVg;
|
||||
ddxpart_dVs = -dsxpart_dVs;
|
||||
ddxpart_dVb =
|
||||
-(ddxpart_dVd + ddxpart_dVg +
|
||||
ddxpart_dVs);
|
||||
}
|
||||
}
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
} else {
|
||||
dxpart = here->BSIM3qdrn / qcheq;
|
||||
Cdd = here->BSIM3cddb;
|
||||
Csd = -(here->BSIM3cgdb + here->BSIM3cddb
|
||||
+ here->BSIM3cbdb);
|
||||
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq;
|
||||
Cdg = here->BSIM3cdgb;
|
||||
Csg = -(here->BSIM3cggb + here->BSIM3cdgb
|
||||
+ here->BSIM3cbgb);
|
||||
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq;
|
||||
|
||||
Cds = here->BSIM3cdsb;
|
||||
Css = -(here->BSIM3cgsb + here->BSIM3cdsb
|
||||
+ here->BSIM3cbsb);
|
||||
ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq;
|
||||
T1 = *(ckt->CKTstate0 +
|
||||
here->BSIM3qdef) * here->BSIM3gtau;
|
||||
gdpr = here->BSIM3drainConductance;
|
||||
gspr = here->BSIM3sourceConductance;
|
||||
gds = here->BSIM3gds;
|
||||
gbd = here->BSIM3gbd;
|
||||
gbs = here->BSIM3gbs;
|
||||
capbd = here->BSIM3capbd;
|
||||
capbs = here->BSIM3capbs;
|
||||
|
||||
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);
|
||||
GSoverlapCap = here->BSIM3cgso;
|
||||
GDoverlapCap = here->BSIM3cgdo;
|
||||
GBoverlapCap = here->pParam->BSIM3cgbo;
|
||||
|
||||
xcdgb = (cdgb - GDoverlapCap) * omega;
|
||||
xcddb = (cddb + capbd + GDoverlapCap) * omega;
|
||||
xcdsb = cdsb * omega;
|
||||
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega;
|
||||
xcsdb = -(cgdb + cbdb + cddb) * omega;
|
||||
xcssb = (capbs + GSoverlapCap -
|
||||
(cgsb + cbsb + cdsb)) * omega;
|
||||
xcggb = (cggb + GDoverlapCap + GSoverlapCap +
|
||||
GBoverlapCap) * omega;
|
||||
xcgdb = (cgdb - GDoverlapCap) * omega;
|
||||
xcgsb = (cgsb - GSoverlapCap) * omega;
|
||||
xcbgb = (cbgb - GBoverlapCap) * omega;
|
||||
xcbdb = (cbdb - capbd) * omega;
|
||||
xcbsb = (cbsb - capbs) * omega;
|
||||
|
||||
|
||||
m = here->BSIM3m;
|
||||
|
||||
*(here->BSIM3GgPtr + 1) += m * xcggb;
|
||||
*(here->BSIM3BbPtr + 1) -=
|
||||
m * (xcbgb + xcbdb + xcbsb);
|
||||
*(here->BSIM3DPdpPtr + 1) += m * xcddb;
|
||||
*(here->BSIM3SPspPtr + 1) += m * xcssb;
|
||||
*(here->BSIM3GbPtr + 1) -=
|
||||
m * (xcggb + xcgdb + xcgsb);
|
||||
*(here->BSIM3GdpPtr + 1) += m * xcgdb;
|
||||
*(here->BSIM3GspPtr + 1) += m * xcgsb;
|
||||
*(here->BSIM3BgPtr + 1) += m * xcbgb;
|
||||
*(here->BSIM3BdpPtr + 1) += m * xcbdb;
|
||||
*(here->BSIM3BspPtr + 1) += m * xcbsb;
|
||||
*(here->BSIM3DPgPtr + 1) += m * xcdgb;
|
||||
*(here->BSIM3DPbPtr + 1) -=
|
||||
m * (xcdgb + xcddb + xcdsb);
|
||||
*(here->BSIM3DPspPtr + 1) += m * xcdsb;
|
||||
*(here->BSIM3SPgPtr + 1) += m * xcsgb;
|
||||
*(here->BSIM3SPbPtr + 1) -=
|
||||
m * (xcsgb + xcsdb + xcssb);
|
||||
*(here->BSIM3SPdpPtr + 1) += m * xcsdb;
|
||||
|
||||
*(here->BSIM3DdPtr) += m * gdpr;
|
||||
*(here->BSIM3SsPtr) += m * gspr;
|
||||
*(here->BSIM3BbPtr) +=
|
||||
m * (gbd + gbs - here->BSIM3gbbs);
|
||||
*(here->BSIM3DPdpPtr) +=
|
||||
m * (gdpr + gds + gbd + RevSum +
|
||||
dxpart * xgtd + T1 * ddxpart_dVd +
|
||||
gbdpdp);
|
||||
*(here->BSIM3SPspPtr) +=
|
||||
m * (gspr + gds + gbs + FwdSum +
|
||||
sxpart * xgts + T1 * dsxpart_dVs +
|
||||
gbspsp);
|
||||
|
||||
*(here->BSIM3DdpPtr) -= m * gdpr;
|
||||
*(here->BSIM3SspPtr) -= m * gspr;
|
||||
|
||||
*(here->BSIM3BgPtr) -= m * here->BSIM3gbgs;
|
||||
*(here->BSIM3BdpPtr) -= m * (gbd - gbbdp);
|
||||
*(here->BSIM3BspPtr) -= m * (gbs - gbbsp);
|
||||
|
||||
*(here->BSIM3DPdPtr) -= m * gdpr;
|
||||
*(here->BSIM3DPgPtr) +=
|
||||
m * (Gm + dxpart * xgtg + T1 * ddxpart_dVg +
|
||||
gbdpg);
|
||||
*(here->BSIM3DPbPtr) -=
|
||||
m * (gbd - Gmbs - dxpart * xgtb -
|
||||
T1 * ddxpart_dVb - gbdpb);
|
||||
*(here->BSIM3DPspPtr) -=
|
||||
m * (gds + FwdSum - dxpart * xgts -
|
||||
T1 * ddxpart_dVs - gbdpsp);
|
||||
|
||||
*(here->BSIM3SPgPtr) -=
|
||||
m * (Gm - sxpart * xgtg - T1 * dsxpart_dVg -
|
||||
gbspg);
|
||||
*(here->BSIM3SPsPtr) -= m * gspr;
|
||||
*(here->BSIM3SPbPtr) -=
|
||||
m * (gbs + Gmbs - sxpart * xgtb -
|
||||
T1 * dsxpart_dVb - gbspb);
|
||||
*(here->BSIM3SPdpPtr) -=
|
||||
m * (gds + RevSum - sxpart * xgtd -
|
||||
T1 * dsxpart_dVd - gbspdp);
|
||||
|
||||
*(here->BSIM3GgPtr) -= m * xgtg;
|
||||
*(here->BSIM3GbPtr) -= m * xgtb;
|
||||
*(here->BSIM3GdpPtr) -= m * xgtd;
|
||||
*(here->BSIM3GspPtr) -= m * xgts;
|
||||
|
||||
if (here->BSIM3nqsMod)
|
||||
{
|
||||
*(here->BSIM3QqPtr + 1) +=
|
||||
m * omega * ScalingFactor;
|
||||
*(here->BSIM3QgPtr + 1) -= m * xcqgb;
|
||||
*(here->BSIM3QdpPtr + 1) -= m * xcqdb;
|
||||
*(here->BSIM3QspPtr + 1) -= m * xcqsb;
|
||||
*(here->BSIM3QbPtr + 1) -= m * xcqbb;
|
||||
|
||||
*(here->BSIM3QqPtr) += m * here->BSIM3gtau;
|
||||
|
||||
*(here->BSIM3DPqPtr) +=
|
||||
m * (dxpart * here->BSIM3gtau);
|
||||
*(here->BSIM3SPqPtr) +=
|
||||
m * (sxpart * here->BSIM3gtau);
|
||||
*(here->BSIM3GqPtr) -= m * here->BSIM3gtau;
|
||||
|
||||
*(here->BSIM3QgPtr) += m * xgtg;
|
||||
*(here->BSIM3QdpPtr) += m * xgtd;
|
||||
*(here->BSIM3QspPtr) += m * xgts;
|
||||
*(here->BSIM3QbPtr) += m * xgtb;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Gm = -here->BSIM3gm;
|
||||
Gmbs = -here->BSIM3gmbs;
|
||||
FwdSum = 0.0;
|
||||
RevSum = -(Gm + Gmbs);
|
||||
|
||||
gbbsp = -here->BSIM3gbds;
|
||||
gbbdp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs;
|
||||
|
||||
gbdpg = 0.0;
|
||||
gbdpsp = 0.0;
|
||||
gbdpb = 0.0;
|
||||
gbdpdp = 0.0;
|
||||
|
||||
gbspg = here->BSIM3gbgs;
|
||||
gbspsp = here->BSIM3gbds;
|
||||
gbspb = here->BSIM3gbbs;
|
||||
gbspdp = -(gbspg + gbspsp + gbspb);
|
||||
|
||||
if (here->BSIM3nqsMod == 0) {
|
||||
cggb = here->BSIM3cggb;
|
||||
cgsb = here->BSIM3cgdb;
|
||||
cgdb = here->BSIM3cgsb;
|
||||
|
||||
cbgb = here->BSIM3cbgb;
|
||||
cbsb = here->BSIM3cbdb;
|
||||
cbdb = here->BSIM3cbsb;
|
||||
|
||||
cdgb = -(here->BSIM3cdgb + cggb + cbgb);
|
||||
cdsb = -(here->BSIM3cddb + cgsb + cbsb);
|
||||
cddb = -(here->BSIM3cdsb + cgdb + cbdb);
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.4;
|
||||
dxpart = 0.6;
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
} else {
|
||||
cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3gtg;
|
||||
xgtd = here->BSIM3gts;
|
||||
xgts = here->BSIM3gtd;
|
||||
xgtb = here->BSIM3gtb;
|
||||
|
||||
xcqgb = here->BSIM3cqgb * omega;
|
||||
xcqdb = here->BSIM3cqsb * omega;
|
||||
xcqsb = here->BSIM3cqdb * omega;
|
||||
xcqbb = here->BSIM3cqbb * omega;
|
||||
|
||||
CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV
|
||||
* here->pParam->BSIM3leffCV;
|
||||
qcheq = -(here->BSIM3qgate + here->BSIM3qbulk);
|
||||
if (fabs(qcheq) <= 1.0e-5 * CoxWL) {
|
||||
if (model->BSIM3xpart < 0.5) {
|
||||
sxpart = 0.4;
|
||||
} else if (model->BSIM3xpart > 0.5) {
|
||||
sxpart = 0.0;
|
||||
} else {
|
||||
sxpart = 0.5;
|
||||
}
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
} else {
|
||||
sxpart = here->BSIM3qdrn / qcheq;
|
||||
Css = here->BSIM3cddb;
|
||||
Cds = -(here->BSIM3cgdb + here->BSIM3cddb
|
||||
+ here->BSIM3cbdb);
|
||||
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq;
|
||||
Csg = here->BSIM3cdgb;
|
||||
Cdg = -(here->BSIM3cggb + here->BSIM3cdgb
|
||||
+ here->BSIM3cbgb);
|
||||
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq;
|
||||
|
||||
Csd = here->BSIM3cdsb;
|
||||
Cdd = -(here->BSIM3cgsb + here->BSIM3cdsb
|
||||
+ here->BSIM3cbsb);
|
||||
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq;
|
||||
|
||||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg
|
||||
+ dsxpart_dVs);
|
||||
}
|
||||
dxpart = 1.0 - sxpart;
|
||||
ddxpart_dVd = -dsxpart_dVd;
|
||||
ddxpart_dVg = -dsxpart_dVg;
|
||||
ddxpart_dVs = -dsxpart_dVs;
|
||||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs);
|
||||
}
|
||||
}
|
||||
|
||||
T1 = *(ckt->CKTstate0 + here->BSIM3qdef) * here->BSIM3gtau;
|
||||
gdpr = here->BSIM3drainConductance;
|
||||
gspr = here->BSIM3sourceConductance;
|
||||
gds = here->BSIM3gds;
|
||||
gbd = here->BSIM3gbd;
|
||||
gbs = here->BSIM3gbs;
|
||||
capbd = here->BSIM3capbd;
|
||||
capbs = here->BSIM3capbs;
|
||||
|
||||
GSoverlapCap = here->BSIM3cgso;
|
||||
GDoverlapCap = here->BSIM3cgdo;
|
||||
GBoverlapCap = here->pParam->BSIM3cgbo;
|
||||
|
||||
xcdgb = (cdgb - GDoverlapCap) * omega;
|
||||
xcddb = (cddb + capbd + GDoverlapCap) * omega;
|
||||
xcdsb = cdsb * omega;
|
||||
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega;
|
||||
xcsdb = -(cgdb + cbdb + cddb) * omega;
|
||||
xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)) * omega;
|
||||
xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap)
|
||||
* omega;
|
||||
xcgdb = (cgdb - GDoverlapCap ) * omega;
|
||||
xcgsb = (cgsb - GSoverlapCap) * omega;
|
||||
xcbgb = (cbgb - GBoverlapCap) * omega;
|
||||
xcbdb = (cbdb - capbd ) * omega;
|
||||
xcbsb = (cbsb - capbs ) * omega;
|
||||
|
||||
|
||||
m = here->BSIM3m;
|
||||
|
||||
*(here->BSIM3GgPtr +1) += m * xcggb;
|
||||
*(here->BSIM3BbPtr +1) -= xcbgb + xcbdb + xcbsb;
|
||||
*(here->BSIM3DPdpPtr +1) += m * xcddb;
|
||||
*(here->BSIM3SPspPtr +1) += m * xcssb;
|
||||
*(here->BSIM3GbPtr +1) -= xcggb + xcgdb + xcgsb;
|
||||
*(here->BSIM3GdpPtr +1) += m * xcgdb;
|
||||
*(here->BSIM3GspPtr +1) += m * xcgsb;
|
||||
*(here->BSIM3BgPtr +1) += m * xcbgb;
|
||||
*(here->BSIM3BdpPtr +1) += m * xcbdb;
|
||||
*(here->BSIM3BspPtr +1) += m * xcbsb;
|
||||
*(here->BSIM3DPgPtr +1) += m * xcdgb;
|
||||
*(here->BSIM3DPbPtr +1) -= xcdgb + xcddb + xcdsb;
|
||||
*(here->BSIM3DPspPtr +1) += m * xcdsb;
|
||||
*(here->BSIM3SPgPtr +1) += m * xcsgb;
|
||||
*(here->BSIM3SPbPtr +1) -= xcsgb + xcsdb + xcssb;
|
||||
*(here->BSIM3SPdpPtr +1) += m * xcsdb;
|
||||
|
||||
*(here->BSIM3DdPtr) += m * gdpr;
|
||||
*(here->BSIM3SsPtr) += m * gspr;
|
||||
*(here->BSIM3BbPtr) += m * (gbd + gbs - here->BSIM3gbbs);
|
||||
*(here->BSIM3DPdpPtr) += m * (gdpr + gds + gbd + RevSum
|
||||
+dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp);
|
||||
*(here->BSIM3SPspPtr) += m * (gspr + gds + gbs + FwdSum
|
||||
+sxpart * xgts + T1 * dsxpart_dVs + gbspsp);
|
||||
|
||||
*(here->BSIM3DdpPtr) -= m * gdpr;
|
||||
*(here->BSIM3SspPtr) -= m * gspr;
|
||||
|
||||
*(here->BSIM3BgPtr) -= m * here->BSIM3gbgs;
|
||||
*(here->BSIM3BdpPtr) -= m * (gbd - gbbdp);
|
||||
*(here->BSIM3BspPtr) -= m * (gbs - gbbsp);
|
||||
|
||||
*(here->BSIM3DPdPtr) -= m * gdpr;
|
||||
*(here->BSIM3DPgPtr) += m * (Gm + dxpart * xgtg + T1 * ddxpart_dVg
|
||||
+ gbdpg);
|
||||
*(here->BSIM3DPbPtr) -= m * (gbd - Gmbs - dxpart * xgtb
|
||||
- T1 * ddxpart_dVb - gbdpb);
|
||||
*(here->BSIM3DPspPtr) -= m * (gds + FwdSum - dxpart * xgts
|
||||
- T1 * ddxpart_dVs - gbdpsp);
|
||||
|
||||
*(here->BSIM3SPgPtr) -= m * (Gm - sxpart * xgtg - T1 * dsxpart_dVg
|
||||
- gbspg);
|
||||
*(here->BSIM3SPsPtr) -= m * gspr;
|
||||
*(here->BSIM3SPbPtr) -= m * (gbs + Gmbs - sxpart * xgtb
|
||||
- T1 * dsxpart_dVb - gbspb);
|
||||
*(here->BSIM3SPdpPtr) -= m * (gds + RevSum - sxpart * xgtd
|
||||
- T1 * dsxpart_dVd - gbspdp);
|
||||
|
||||
*(here->BSIM3GgPtr) -= m * xgtg;
|
||||
*(here->BSIM3GbPtr) -= m * xgtb;
|
||||
*(here->BSIM3GdpPtr) -= m * xgtd;
|
||||
*(here->BSIM3GspPtr) -= m * xgts;
|
||||
|
||||
if (here->BSIM3nqsMod) {
|
||||
*(here->BSIM3QqPtr +1) += m * (omega * ScalingFactor);
|
||||
*(here->BSIM3QgPtr +1) -= m * xcqgb;
|
||||
*(here->BSIM3QdpPtr +1) -= m * xcqdb;
|
||||
*(here->BSIM3QspPtr +1) -= m * xcqsb;
|
||||
*(here->BSIM3QbPtr +1) -= m * xcqbb;
|
||||
|
||||
*(here->BSIM3QqPtr) += m * here->BSIM3gtau;
|
||||
|
||||
*(here->BSIM3DPqPtr) += m * (dxpart * here->BSIM3gtau);
|
||||
*(here->BSIM3SPqPtr) += m * (sxpart * here->BSIM3gtau);
|
||||
*(here->BSIM3GqPtr) -= m * here->BSIM3gtau;
|
||||
|
||||
*(here->BSIM3QgPtr) += m * xgtg;
|
||||
*(here->BSIM3QdpPtr) += m * xgtd;
|
||||
*(here->BSIM3QspPtr) += m * xgts;
|
||||
*(here->BSIM3QbPtr) += m * xgtb;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,24 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3ask.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3ask.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified bt Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "ifsim.h"
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
|
|
@ -16,213 +27,209 @@ File: b3ask.c
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3ask(ckt,inst,which,value,select)
|
||||
CKTcircuit *ckt;
|
||||
GENinstance *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
IFvalue *select;
|
||||
BSIM3ask (CKTcircuit * ckt, GENinstance * inst, int which, IFvalue * value,
|
||||
IFvalue * select)
|
||||
{
|
||||
BSIM3instance *here = (BSIM3instance*)inst;
|
||||
BSIM3instance *here = (BSIM3instance *) inst;
|
||||
|
||||
switch(which)
|
||||
{ case BSIM3_L:
|
||||
value->rValue = here->BSIM3l;
|
||||
return(OK);
|
||||
case BSIM3_W:
|
||||
value->rValue = here->BSIM3w;
|
||||
return(OK);
|
||||
case BSIM3_M:
|
||||
value->rValue = here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_AS:
|
||||
value->rValue = here->BSIM3sourceArea;
|
||||
return(OK);
|
||||
case BSIM3_AD:
|
||||
value->rValue = here->BSIM3drainArea;
|
||||
return(OK);
|
||||
case BSIM3_PS:
|
||||
value->rValue = here->BSIM3sourcePerimeter;
|
||||
return(OK);
|
||||
case BSIM3_PD:
|
||||
value->rValue = here->BSIM3drainPerimeter;
|
||||
return(OK);
|
||||
case BSIM3_NRS:
|
||||
value->rValue = here->BSIM3sourceSquares;
|
||||
return(OK);
|
||||
case BSIM3_NRD:
|
||||
value->rValue = here->BSIM3drainSquares;
|
||||
return(OK);
|
||||
case BSIM3_OFF:
|
||||
value->rValue = here->BSIM3off;
|
||||
return(OK);
|
||||
case BSIM3_NQSMOD:
|
||||
value->iValue = here->BSIM3nqsMod;
|
||||
return(OK);
|
||||
case BSIM3_IC_VBS:
|
||||
value->rValue = here->BSIM3icVBS;
|
||||
return(OK);
|
||||
case BSIM3_IC_VDS:
|
||||
value->rValue = here->BSIM3icVDS;
|
||||
return(OK);
|
||||
case BSIM3_IC_VGS:
|
||||
value->rValue = here->BSIM3icVGS;
|
||||
return(OK);
|
||||
case BSIM3_DNODE:
|
||||
value->iValue = here->BSIM3dNode;
|
||||
return(OK);
|
||||
case BSIM3_GNODE:
|
||||
value->iValue = here->BSIM3gNode;
|
||||
return(OK);
|
||||
case BSIM3_SNODE:
|
||||
value->iValue = here->BSIM3sNode;
|
||||
return(OK);
|
||||
case BSIM3_BNODE:
|
||||
value->iValue = here->BSIM3bNode;
|
||||
return(OK);
|
||||
case BSIM3_DNODEPRIME:
|
||||
value->iValue = here->BSIM3dNodePrime;
|
||||
return(OK);
|
||||
case BSIM3_SNODEPRIME:
|
||||
value->iValue = here->BSIM3sNodePrime;
|
||||
return(OK);
|
||||
case BSIM3_SOURCECONDUCT:
|
||||
value->rValue = here->BSIM3sourceConductance;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_DRAINCONDUCT:
|
||||
value->rValue = here->BSIM3drainConductance;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_VBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3vbd);
|
||||
return(OK);
|
||||
case BSIM3_VBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3vbs);
|
||||
return(OK);
|
||||
case BSIM3_VGS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3vgs);
|
||||
return(OK);
|
||||
case BSIM3_VDS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3vds);
|
||||
return(OK);
|
||||
case BSIM3_CD:
|
||||
value->rValue = here->BSIM3cd;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CBS:
|
||||
value->rValue = here->BSIM3cbs;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CBD:
|
||||
value->rValue = here->BSIM3cbd;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_GM:
|
||||
value->rValue = here->BSIM3gm;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_GDS:
|
||||
value->rValue = here->BSIM3gds;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_GMBS:
|
||||
value->rValue = here->BSIM3gmbs;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_GBD:
|
||||
value->rValue = here->BSIM3gbd;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_GBS:
|
||||
value->rValue = here->BSIM3gbs;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_QB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qb);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CQB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqb);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_QG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qg);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CQG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqg);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_QD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qd);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CQD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqd);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CGG:
|
||||
value->rValue = here->BSIM3cggb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CGD:
|
||||
value->rValue = here->BSIM3cgdb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CGS:
|
||||
value->rValue = here->BSIM3cgsb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CDG:
|
||||
value->rValue = here->BSIM3cdgb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CDD:
|
||||
value->rValue = here->BSIM3cddb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CDS:
|
||||
value->rValue = here->BSIM3cdsb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CBG:
|
||||
value->rValue = here->BSIM3cbgb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CBDB:
|
||||
value->rValue = here->BSIM3cbdb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CBSB:
|
||||
value->rValue = here->BSIM3cbsb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CAPBD:
|
||||
value->rValue = here->BSIM3capbd;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_CAPBS:
|
||||
value->rValue = here->BSIM3capbs;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_VON:
|
||||
value->rValue = here->BSIM3von;
|
||||
return(OK);
|
||||
case BSIM3_VDSAT:
|
||||
value->rValue = here->BSIM3vdsat;
|
||||
return(OK);
|
||||
case BSIM3_QBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qbs);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
case BSIM3_QBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qbd);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return(OK);
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
switch (which)
|
||||
{
|
||||
case BSIM3_L:
|
||||
value->rValue = here->BSIM3l;
|
||||
return (OK);
|
||||
case BSIM3_W:
|
||||
value->rValue = here->BSIM3w;
|
||||
return (OK);
|
||||
case BSIM3_M:
|
||||
value->rValue = here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_AS:
|
||||
value->rValue = here->BSIM3sourceArea;
|
||||
return (OK);
|
||||
case BSIM3_AD:
|
||||
value->rValue = here->BSIM3drainArea;
|
||||
return (OK);
|
||||
case BSIM3_PS:
|
||||
value->rValue = here->BSIM3sourcePerimeter;
|
||||
return (OK);
|
||||
case BSIM3_PD:
|
||||
value->rValue = here->BSIM3drainPerimeter;
|
||||
return (OK);
|
||||
case BSIM3_NRS:
|
||||
value->rValue = here->BSIM3sourceSquares;
|
||||
return (OK);
|
||||
case BSIM3_NRD:
|
||||
value->rValue = here->BSIM3drainSquares;
|
||||
return (OK);
|
||||
case BSIM3_OFF:
|
||||
value->rValue = here->BSIM3off;
|
||||
return (OK);
|
||||
case BSIM3_NQSMOD:
|
||||
value->iValue = here->BSIM3nqsMod;
|
||||
return (OK);
|
||||
case BSIM3_IC_VBS:
|
||||
value->rValue = here->BSIM3icVBS;
|
||||
return (OK);
|
||||
case BSIM3_IC_VDS:
|
||||
value->rValue = here->BSIM3icVDS;
|
||||
return (OK);
|
||||
case BSIM3_IC_VGS:
|
||||
value->rValue = here->BSIM3icVGS;
|
||||
return (OK);
|
||||
case BSIM3_DNODE:
|
||||
value->iValue = here->BSIM3dNode;
|
||||
return (OK);
|
||||
case BSIM3_GNODE:
|
||||
value->iValue = here->BSIM3gNode;
|
||||
return (OK);
|
||||
case BSIM3_SNODE:
|
||||
value->iValue = here->BSIM3sNode;
|
||||
return (OK);
|
||||
case BSIM3_BNODE:
|
||||
value->iValue = here->BSIM3bNode;
|
||||
return (OK);
|
||||
case BSIM3_DNODEPRIME:
|
||||
value->iValue = here->BSIM3dNodePrime;
|
||||
return (OK);
|
||||
case BSIM3_SNODEPRIME:
|
||||
value->iValue = here->BSIM3sNodePrime;
|
||||
return (OK);
|
||||
case BSIM3_SOURCECONDUCT:
|
||||
value->rValue = here->BSIM3sourceConductance;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_DRAINCONDUCT:
|
||||
value->rValue = here->BSIM3drainConductance;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_VBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3vbd);
|
||||
return (OK);
|
||||
case BSIM3_VBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3vbs);
|
||||
return (OK);
|
||||
case BSIM3_VGS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3vgs);
|
||||
return (OK);
|
||||
case BSIM3_VDS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3vds);
|
||||
return (OK);
|
||||
case BSIM3_CD:
|
||||
value->rValue = here->BSIM3cd;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CBS:
|
||||
value->rValue = here->BSIM3cbs;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CBD:
|
||||
value->rValue = here->BSIM3cbd;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_GM:
|
||||
value->rValue = here->BSIM3gm;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_GDS:
|
||||
value->rValue = here->BSIM3gds;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_GMBS:
|
||||
value->rValue = here->BSIM3gmbs;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_GBD:
|
||||
value->rValue = here->BSIM3gbd;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_GBS:
|
||||
value->rValue = here->BSIM3gbs;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_QB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qb);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CQB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqb);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_QG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qg);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CQG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqg);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_QD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qd);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CQD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3cqd);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CGG:
|
||||
value->rValue = here->BSIM3cggb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CGD:
|
||||
value->rValue = here->BSIM3cgdb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CGS:
|
||||
value->rValue = here->BSIM3cgsb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CDG:
|
||||
value->rValue = here->BSIM3cdgb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CDD:
|
||||
value->rValue = here->BSIM3cddb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CDS:
|
||||
value->rValue = here->BSIM3cdsb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CBG:
|
||||
value->rValue = here->BSIM3cbgb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CBDB:
|
||||
value->rValue = here->BSIM3cbdb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CBSB:
|
||||
value->rValue = here->BSIM3cbsb;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CAPBD:
|
||||
value->rValue = here->BSIM3capbd;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_CAPBS:
|
||||
value->rValue = here->BSIM3capbs;
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_VON:
|
||||
value->rValue = here->BSIM3von;
|
||||
return (OK);
|
||||
case BSIM3_VDSAT:
|
||||
value->rValue = here->BSIM3vdsat;
|
||||
return (OK);
|
||||
case BSIM3_QBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qbs);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
case BSIM3_QBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BSIM3qbd);
|
||||
value->rValue *= here->BSIM3m;
|
||||
return (OK);
|
||||
default:
|
||||
return (E_BADPARM);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,25 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: Min-Chie Jeng.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3check.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3check.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Xuemei Xi, 10/05, 12/14, 2001.
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3def.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -17,414 +29,561 @@ File: b3check.c
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3checkModel(model, here, ckt)
|
||||
BSIM3model *model;
|
||||
BSIM3instance *here;
|
||||
CKTcircuit *ckt;
|
||||
BSIM3checkModel (BSIM3model * model, BSIM3instance * here, CKTcircuit * ckt)
|
||||
{
|
||||
struct bsim3SizeDependParam *pParam;
|
||||
int Fatal_Flag = 0;
|
||||
FILE *fplog;
|
||||
|
||||
if ((fplog = fopen("b3v3check.log", "w")) != NULL)
|
||||
{ pParam = here->pParam;
|
||||
fprintf(fplog, "BSIM3v3.2.2 Parameter Checking.\n");
|
||||
if (strcmp(model->BSIM3version, "3.2.2"))
|
||||
{ fprintf(fplog, "Warning: This model is BSIM3v3.2.2; you specified a wrong version number.\n");
|
||||
printf("Warning: This model is BSIM3v3.2.2; you specified a wrong version number.\n");
|
||||
}
|
||||
fprintf(fplog, "Model = %s\n", model->BSIM3modName);
|
||||
struct bsim3SizeDependParam *pParam;
|
||||
int Fatal_Flag = 0;
|
||||
FILE *fplog;
|
||||
|
||||
if (pParam->BSIM3nlx < -pParam->BSIM3leff)
|
||||
{ fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n",
|
||||
pParam->BSIM3nlx);
|
||||
printf("Fatal: Nlx = %g is less than -Leff.\n",
|
||||
pParam->BSIM3nlx);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if ((fplog = fopen ("b3v3check.log", "w")) != NULL)
|
||||
{
|
||||
pParam = here->pParam;
|
||||
|
||||
if (model->BSIM3tox <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Tox = %g is not positive.\n",
|
||||
model->BSIM3tox);
|
||||
printf("Fatal: Tox = %g is not positive.\n", model->BSIM3tox);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
fprintf (fplog,
|
||||
"BSIM3v3.2 Model (Supports: v3.2 and v3.2.{2,3,4}.\n");
|
||||
fprintf (fplog, "Parameter Checking.\n");
|
||||
fprintf (fplog, "Model = %s\n", model->BSIM3modName);
|
||||
fprintf (fplog, "W = %g, L = %g, M = %g\n", here->BSIM3w,
|
||||
here->BSIM3l, here->BSIM3m);
|
||||
|
||||
if (model->BSIM3toxm <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Toxm = %g is not positive.\n",
|
||||
model->BSIM3toxm);
|
||||
printf("Fatal: Toxm = %g is not positive.\n", model->BSIM3toxm);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if ((strcmp (model->BSIM3version, "3.2.4"))
|
||||
&& (strcmp (model->BSIM3version, "3.2.3"))
|
||||
&& (strcmp (model->BSIM3version, "3.2.2"))
|
||||
&& (strcmp (model->BSIM3version, "3.2")))
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: This model supports BSIM3v3.2 and BSIM3v3.{2,3,4}\n");
|
||||
fprintf (fplog,
|
||||
"You specified a wrong version number.\n.");
|
||||
printf ("Warning: This model supports BSIM3v3.2 and BSIM3v3.{2,3,4}\n");
|
||||
printf ("You specified a wrong version number.\n.");
|
||||
}
|
||||
|
||||
if (pParam->BSIM3npeak <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Nch = %g is not positive.\n",
|
||||
pParam->BSIM3npeak);
|
||||
printf("Fatal: Nch = %g is not positive.\n",
|
||||
pParam->BSIM3npeak);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3nsub <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Nsub = %g is not positive.\n",
|
||||
pParam->BSIM3nsub);
|
||||
printf("Fatal: Nsub = %g is not positive.\n",
|
||||
pParam->BSIM3nsub);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3ngate < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Ngate = %g is not positive.\n",
|
||||
pParam->BSIM3ngate);
|
||||
printf("Fatal: Ngate = %g Ngate is not positive.\n",
|
||||
pParam->BSIM3ngate);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3ngate > 1.e25)
|
||||
{ fprintf(fplog, "Fatal: Ngate = %g is too high.\n",
|
||||
pParam->BSIM3ngate);
|
||||
printf("Fatal: Ngate = %g Ngate is too high\n",
|
||||
pParam->BSIM3ngate);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3xj <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Xj = %g is not positive.\n",
|
||||
pParam->BSIM3xj);
|
||||
printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM3xj);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3nlx < -pParam->BSIM3leff)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Fatal: Nlx = %g is less than -Leff.\n",
|
||||
pParam->BSIM3nlx);
|
||||
printf ("Fatal: Nlx = %g is less than -Leff.\n",
|
||||
pParam->BSIM3nlx);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3dvt1 < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n",
|
||||
pParam->BSIM3dvt1);
|
||||
printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3dvt1);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3dvt1w < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n",
|
||||
pParam->BSIM3dvt1w);
|
||||
printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3dvt1w);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3w0 == -pParam->BSIM3weff)
|
||||
{ fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n");
|
||||
printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n");
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (model->BSIM3tox <= 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Tox = %g is not positive.\n",
|
||||
model->BSIM3tox);
|
||||
printf ("Fatal: Tox = %g is not positive.\n",
|
||||
model->BSIM3tox);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3dsub < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM3dsub);
|
||||
printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM3dsub);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3b1 == -pParam->BSIM3weff)
|
||||
{ fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n");
|
||||
printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n");
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3u0temp <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3u0temp);
|
||||
printf("Fatal: u0 at current temperature = %g is not positive.\n",
|
||||
pParam->BSIM3u0temp);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
/* Check delta parameter */
|
||||
if (pParam->BSIM3delta < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Delta = %g is less than zero.\n",
|
||||
pParam->BSIM3delta);
|
||||
printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM3delta);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (model->BSIM3toxm <= 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Toxm = %g is not positive.\n",
|
||||
model->BSIM3toxm);
|
||||
printf ("Fatal: Toxm = %g is not positive.\n",
|
||||
model->BSIM3toxm);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3vsattemp <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3vsattemp);
|
||||
printf("Fatal: Vsat at current temperature = %g is not positive.\n",
|
||||
pParam->BSIM3vsattemp);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3npeak <= 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Nch = %g is not positive.\n",
|
||||
pParam->BSIM3npeak);
|
||||
printf ("Fatal: Nch = %g is not positive.\n",
|
||||
pParam->BSIM3npeak);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3nsub <= 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Nsub = %g is not positive.\n",
|
||||
pParam->BSIM3nsub);
|
||||
printf ("Fatal: Nsub = %g is not positive.\n",
|
||||
pParam->BSIM3nsub);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3ngate < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Fatal: Ngate = %g is not positive.\n",
|
||||
pParam->BSIM3ngate);
|
||||
printf ("Fatal: Ngate = %g Ngate is not positive.\n",
|
||||
pParam->BSIM3ngate);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3ngate > 1.e25)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Ngate = %g is too high.\n",
|
||||
pParam->BSIM3ngate);
|
||||
printf ("Fatal: Ngate = %g Ngate is too high\n",
|
||||
pParam->BSIM3ngate);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3xj <= 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Xj = %g is not positive.\n",
|
||||
pParam->BSIM3xj);
|
||||
printf ("Fatal: Xj = %g is not positive.\n",
|
||||
pParam->BSIM3xj);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3dvt1 < 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Dvt1 = %g is negative.\n",
|
||||
pParam->BSIM3dvt1);
|
||||
printf ("Fatal: Dvt1 = %g is negative.\n",
|
||||
pParam->BSIM3dvt1);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3dvt1w < 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Dvt1w = %g is negative.\n",
|
||||
pParam->BSIM3dvt1w);
|
||||
printf ("Fatal: Dvt1w = %g is negative.\n",
|
||||
pParam->BSIM3dvt1w);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3w0 == -pParam->BSIM3weff)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n");
|
||||
printf ("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n");
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3dsub < 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Dsub = %g is negative.\n",
|
||||
pParam->BSIM3dsub);
|
||||
printf ("Fatal: Dsub = %g is negative.\n",
|
||||
pParam->BSIM3dsub);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3b1 == -pParam->BSIM3weff)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n");
|
||||
printf ("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n");
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3u0temp <= 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Fatal: u0 at current temperature = %g is not positive.\n",
|
||||
pParam->BSIM3u0temp);
|
||||
printf ("Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3u0temp);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
/* Check delta parameter */
|
||||
if (pParam->BSIM3delta < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Fatal: Delta = %g is less than zero.\n",
|
||||
pParam->BSIM3delta);
|
||||
printf ("Fatal: Delta = %g is less than zero.\n",
|
||||
pParam->BSIM3delta);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3vsattemp <= 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Fatal: Vsat at current temperature = %g is not positive.\n",
|
||||
pParam->BSIM3vsattemp);
|
||||
printf ("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3vsattemp);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
/* Check Rout parameters */
|
||||
if (pParam->BSIM3pclm <= 0.0)
|
||||
{ fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM3pclm);
|
||||
printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM3pclm);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3pclm <= 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Pclm = %g is not positive.\n",
|
||||
pParam->BSIM3pclm);
|
||||
printf ("Fatal: Pclm = %g is not positive.\n",
|
||||
pParam->BSIM3pclm);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3drout < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM3drout);
|
||||
printf("Fatal: Drout = %g is negative.\n", pParam->BSIM3drout);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3drout < 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Drout = %g is negative.\n",
|
||||
pParam->BSIM3drout);
|
||||
printf ("Fatal: Drout = %g is negative.\n",
|
||||
pParam->BSIM3drout);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3pscbe2 <= 0.0)
|
||||
{ fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n",
|
||||
pParam->BSIM3pscbe2);
|
||||
printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM3pscbe2);
|
||||
}
|
||||
if (pParam->BSIM3pscbe2 <= 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Pscbe2 = %g is not positive.\n",
|
||||
pParam->BSIM3pscbe2);
|
||||
printf ("Warning: Pscbe2 = %g is not positive.\n",
|
||||
pParam->BSIM3pscbe2);
|
||||
}
|
||||
|
||||
if (model->BSIM3unitLengthSidewallJctCap > 0.0 ||
|
||||
model->BSIM3unitLengthGateSidewallJctCap > 0.0)
|
||||
{
|
||||
if (here->BSIM3drainPerimeter < pParam->BSIM3weff)
|
||||
{ fprintf(fplog, "Warning: Pd = %g is less than W.\n",
|
||||
here->BSIM3drainPerimeter);
|
||||
printf("Warning: Pd = %g is less than W.\n",
|
||||
here->BSIM3drainPerimeter);
|
||||
}
|
||||
if (here->BSIM3sourcePerimeter < pParam->BSIM3weff)
|
||||
{ fprintf(fplog, "Warning: Ps = %g is less than W.\n",
|
||||
here->BSIM3sourcePerimeter);
|
||||
printf("Warning: Ps = %g is less than W.\n",
|
||||
here->BSIM3sourcePerimeter);
|
||||
}
|
||||
}
|
||||
if (model->BSIM3unitLengthSidewallJctCap > 0.0 ||
|
||||
model->BSIM3unitLengthGateSidewallJctCap > 0.0)
|
||||
{
|
||||
if (here->BSIM3drainPerimeter < pParam->BSIM3weff)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Pd = %g is less than W.\n",
|
||||
here->BSIM3drainPerimeter);
|
||||
printf ("Warning: Pd = %g is less than W.\n",
|
||||
here->BSIM3drainPerimeter);
|
||||
}
|
||||
if (here->BSIM3sourcePerimeter < pParam->BSIM3weff)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Ps = %g is less than W.\n",
|
||||
here->BSIM3sourcePerimeter);
|
||||
printf ("Warning: Ps = %g is less than W.\n",
|
||||
here->BSIM3sourcePerimeter);
|
||||
}
|
||||
}
|
||||
|
||||
if (pParam->BSIM3noff < 0.1)
|
||||
{ fprintf(fplog, "Warning: Noff = %g is too small.\n",
|
||||
pParam->BSIM3noff);
|
||||
printf("Warning: Noff = %g is too small.\n", pParam->BSIM3noff);
|
||||
}
|
||||
if (pParam->BSIM3noff > 4.0)
|
||||
{ fprintf(fplog, "Warning: Noff = %g is too large.\n",
|
||||
pParam->BSIM3noff);
|
||||
printf("Warning: Noff = %g is too large.\n", pParam->BSIM3noff);
|
||||
}
|
||||
if (pParam->BSIM3noff < 0.1)
|
||||
{
|
||||
fprintf (fplog, "Warning: Noff = %g is too small.\n",
|
||||
pParam->BSIM3noff);
|
||||
printf ("Warning: Noff = %g is too small.\n",
|
||||
pParam->BSIM3noff);
|
||||
}
|
||||
if (pParam->BSIM3noff > 4.0)
|
||||
{
|
||||
fprintf (fplog, "Warning: Noff = %g is too large.\n",
|
||||
pParam->BSIM3noff);
|
||||
printf ("Warning: Noff = %g is too large.\n",
|
||||
pParam->BSIM3noff);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3voffcv < -0.5)
|
||||
{ fprintf(fplog, "Warning: Voffcv = %g is too small.\n",
|
||||
pParam->BSIM3voffcv);
|
||||
printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM3voffcv);
|
||||
}
|
||||
if (pParam->BSIM3voffcv > 0.5)
|
||||
{ fprintf(fplog, "Warning: Voffcv = %g is too large.\n",
|
||||
pParam->BSIM3voffcv);
|
||||
printf("Warning: Voffcv = %g is too large.\n", pParam->BSIM3voffcv);
|
||||
}
|
||||
if (pParam->BSIM3voffcv < -0.5)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Voffcv = %g is too small.\n",
|
||||
pParam->BSIM3voffcv);
|
||||
printf ("Warning: Voffcv = %g is too small.\n",
|
||||
pParam->BSIM3voffcv);
|
||||
}
|
||||
if (pParam->BSIM3voffcv > 0.5)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Voffcv = %g is too large.\n",
|
||||
pParam->BSIM3voffcv);
|
||||
printf ("Warning: Voffcv = %g is too large.\n",
|
||||
pParam->BSIM3voffcv);
|
||||
}
|
||||
|
||||
if (model->BSIM3ijth < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Ijth = %g cannot be negative.\n",
|
||||
model->BSIM3ijth);
|
||||
printf("Fatal: Ijth = %g cannot be negative.\n", model->BSIM3ijth);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (model->BSIM3ijth < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Fatal: Ijth = %g cannot be negative.\n",
|
||||
model->BSIM3ijth);
|
||||
printf ("Fatal: Ijth = %g cannot be negative.\n",
|
||||
model->BSIM3ijth);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
/* Check capacitance parameters */
|
||||
if (pParam->BSIM3clc < 0.0)
|
||||
{ fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM3clc);
|
||||
printf("Fatal: Clc = %g is negative.\n", pParam->BSIM3clc);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
if (pParam->BSIM3clc < 0.0)
|
||||
{
|
||||
fprintf (fplog, "Fatal: Clc = %g is negative.\n",
|
||||
pParam->BSIM3clc);
|
||||
printf ("Fatal: Clc = %g is negative.\n",
|
||||
pParam->BSIM3clc);
|
||||
Fatal_Flag = 1;
|
||||
}
|
||||
|
||||
if (pParam->BSIM3moin < 5.0)
|
||||
{ fprintf(fplog, "Warning: Moin = %g is too small.\n",
|
||||
pParam->BSIM3moin);
|
||||
printf("Warning: Moin = %g is too small.\n", pParam->BSIM3moin);
|
||||
}
|
||||
if (pParam->BSIM3moin > 25.0)
|
||||
{ fprintf(fplog, "Warning: Moin = %g is too large.\n",
|
||||
pParam->BSIM3moin);
|
||||
printf("Warning: Moin = %g is too large.\n", pParam->BSIM3moin);
|
||||
}
|
||||
if (pParam->BSIM3moin < 5.0)
|
||||
{
|
||||
fprintf (fplog, "Warning: Moin = %g is too small.\n",
|
||||
pParam->BSIM3moin);
|
||||
printf ("Warning: Moin = %g is too small.\n",
|
||||
pParam->BSIM3moin);
|
||||
}
|
||||
if (pParam->BSIM3moin > 25.0)
|
||||
{
|
||||
fprintf (fplog, "Warning: Moin = %g is too large.\n",
|
||||
pParam->BSIM3moin);
|
||||
printf ("Warning: Moin = %g is too large.\n",
|
||||
pParam->BSIM3moin);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3acde < 0.4)
|
||||
{ fprintf(fplog, "Warning: Acde = %g is too small.\n",
|
||||
pParam->BSIM3acde);
|
||||
printf("Warning: Acde = %g is too small.\n", pParam->BSIM3acde);
|
||||
}
|
||||
if (pParam->BSIM3acde > 1.6)
|
||||
{ fprintf(fplog, "Warning: Acde = %g is too large.\n",
|
||||
pParam->BSIM3acde);
|
||||
printf("Warning: Acde = %g is too large.\n", pParam->BSIM3acde);
|
||||
}
|
||||
if (model->BSIM3capMod == 3)
|
||||
{
|
||||
if (pParam->BSIM3acde < 0.4)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Acde = %g is too small.\n",
|
||||
pParam->BSIM3acde);
|
||||
printf ("Warning: Acde = %g is too small.\n",
|
||||
pParam->BSIM3acde);
|
||||
}
|
||||
if (pParam->BSIM3acde > 1.6)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Acde = %g is too large.\n",
|
||||
pParam->BSIM3acde);
|
||||
printf ("Warning: Acde = %g is too large.\n",
|
||||
pParam->BSIM3acde);
|
||||
}
|
||||
}
|
||||
|
||||
if (model->BSIM3paramChk == 1)
|
||||
{
|
||||
/* Check L and W parameters */
|
||||
if (pParam->BSIM3leff <= 5.0e-8)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Leff = %g may be too small.\n",
|
||||
pParam->BSIM3leff);
|
||||
printf ("Warning: Leff = %g may be too small.\n", pParam->BSIM3leff);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3leffCV <= 5.0e-8)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Leff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3leffCV);
|
||||
printf ("Warning: Leff for CV = %g may be too small.\n", pParam->BSIM3leffCV);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3weff <= 1.0e-7)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Weff = %g may be too small.\n",
|
||||
pParam->BSIM3weff);
|
||||
printf ("Warning: Weff = %g may be too small.\n", pParam->BSIM3weff);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3weffCV <= 1.0e-7)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Weff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3weffCV);
|
||||
printf ("Warning: Weff for CV = %g may be too small.\n", pParam->BSIM3weffCV);
|
||||
}
|
||||
|
||||
if (model->BSIM3paramChk ==1)
|
||||
{
|
||||
/* Check L and W parameters */
|
||||
if (pParam->BSIM3leff <= 5.0e-8)
|
||||
{ fprintf(fplog, "Warning: Leff = %g may be too small.\n",
|
||||
pParam->BSIM3leff);
|
||||
printf("Warning: Leff = %g may be too small.\n",
|
||||
pParam->BSIM3leff);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3leffCV <= 5.0e-8)
|
||||
{ fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3leffCV);
|
||||
printf("Warning: Leff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3leffCV);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3weff <= 1.0e-7)
|
||||
{ fprintf(fplog, "Warning: Weff = %g may be too small.\n",
|
||||
pParam->BSIM3weff);
|
||||
printf("Warning: Weff = %g may be too small.\n",
|
||||
pParam->BSIM3weff);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3weffCV <= 1.0e-7)
|
||||
{ fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3weffCV);
|
||||
printf("Warning: Weff for CV = %g may be too small.\n",
|
||||
pParam->BSIM3weffCV);
|
||||
}
|
||||
|
||||
/* Check threshold voltage parameters */
|
||||
if (pParam->BSIM3nlx < 0.0)
|
||||
{ fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->BSIM3nlx);
|
||||
printf("Warning: Nlx = %g is negative.\n", pParam->BSIM3nlx);
|
||||
}
|
||||
if (model->BSIM3tox < 1.0e-9)
|
||||
{ fprintf(fplog, "Warning: Tox = %g is less than 10A.\n",
|
||||
model->BSIM3tox);
|
||||
printf("Warning: Tox = %g is less than 10A.\n", model->BSIM3tox);
|
||||
}
|
||||
if (pParam->BSIM3nlx < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Nlx = %g is negative.\n",
|
||||
pParam->BSIM3nlx);
|
||||
printf ("Warning: Nlx = %g is negative.\n",
|
||||
pParam->BSIM3nlx);
|
||||
}
|
||||
if (model->BSIM3tox < 1.0e-9)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Tox = %g is less than 10A.\n",
|
||||
model->BSIM3tox);
|
||||
printf ("Warning: Tox = %g is less than 10A.\n", model->BSIM3tox);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3npeak <= 1.0e15)
|
||||
{ fprintf(fplog, "Warning: Nch = %g may be too small.\n",
|
||||
pParam->BSIM3npeak);
|
||||
printf("Warning: Nch = %g may be too small.\n",
|
||||
pParam->BSIM3npeak);
|
||||
}
|
||||
else if (pParam->BSIM3npeak >= 1.0e21)
|
||||
{ fprintf(fplog, "Warning: Nch = %g may be too large.\n",
|
||||
pParam->BSIM3npeak);
|
||||
printf("Warning: Nch = %g may be too large.\n",
|
||||
pParam->BSIM3npeak);
|
||||
}
|
||||
if (pParam->BSIM3npeak <= 1.0e15)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Nch = %g may be too small.\n",
|
||||
pParam->BSIM3npeak);
|
||||
printf ("Warning: Nch = %g may be too small.\n", pParam->BSIM3npeak);
|
||||
}
|
||||
else if (pParam->BSIM3npeak >= 1.0e21)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Nch = %g may be too large.\n",
|
||||
pParam->BSIM3npeak);
|
||||
printf ("Warning: Nch = %g may be too large.\n", pParam->BSIM3npeak);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3nsub <= 1.0e14)
|
||||
{ fprintf(fplog, "Warning: Nsub = %g may be too small.\n",
|
||||
pParam->BSIM3nsub);
|
||||
printf("Warning: Nsub = %g may be too small.\n",
|
||||
pParam->BSIM3nsub);
|
||||
}
|
||||
else if (pParam->BSIM3nsub >= 1.0e21)
|
||||
{ fprintf(fplog, "Warning: Nsub = %g may be too large.\n",
|
||||
pParam->BSIM3nsub);
|
||||
printf("Warning: Nsub = %g may be too large.\n",
|
||||
pParam->BSIM3nsub);
|
||||
}
|
||||
if (pParam->BSIM3nsub <= 1.0e14)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Nsub = %g may be too small.\n",
|
||||
pParam->BSIM3nsub);
|
||||
printf ("Warning: Nsub = %g may be too small.\n", pParam->BSIM3nsub);
|
||||
}
|
||||
else if (pParam->BSIM3nsub >= 1.0e21)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Nsub = %g may be too large.\n",
|
||||
pParam->BSIM3nsub);
|
||||
printf ("Warning: Nsub = %g may be too large.\n", pParam->BSIM3nsub);
|
||||
}
|
||||
|
||||
if ((pParam->BSIM3ngate > 0.0) &&
|
||||
(pParam->BSIM3ngate <= 1.e18))
|
||||
{ fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n",
|
||||
pParam->BSIM3ngate);
|
||||
printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n",
|
||||
pParam->BSIM3ngate);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3dvt0 < 0.0)
|
||||
{ fprintf(fplog, "Warning: Dvt0 = %g is negative.\n",
|
||||
pParam->BSIM3dvt0);
|
||||
printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM3dvt0);
|
||||
}
|
||||
|
||||
if (fabs(1.0e-6 / (pParam->BSIM3w0 + pParam->BSIM3weff)) > 10.0)
|
||||
{ fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n");
|
||||
printf("Warning: (W0 + Weff) may be too small.\n");
|
||||
}
|
||||
if ((pParam->BSIM3ngate > 0.0) &&
|
||||
(pParam->BSIM3ngate <= 1.e18))
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Ngate = %g is less than 1.E18cm^-3.\n",
|
||||
pParam->BSIM3ngate);
|
||||
printf ("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM3ngate);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3dvt0 < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Dvt0 = %g is negative.\n",
|
||||
pParam->BSIM3dvt0);
|
||||
printf ("Warning: Dvt0 = %g is negative.\n",
|
||||
pParam->BSIM3dvt0);
|
||||
}
|
||||
|
||||
if (fabs
|
||||
(1.0e-6 / (pParam->BSIM3w0 + pParam->BSIM3weff)) >
|
||||
10.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: (W0 + Weff) may be too small.\n");
|
||||
printf ("Warning: (W0 + Weff) may be too small.\n");
|
||||
}
|
||||
|
||||
/* Check subthreshold parameters */
|
||||
if (pParam->BSIM3nfactor < 0.0)
|
||||
{ fprintf(fplog, "Warning: Nfactor = %g is negative.\n",
|
||||
pParam->BSIM3nfactor);
|
||||
printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM3nfactor);
|
||||
}
|
||||
if (pParam->BSIM3cdsc < 0.0)
|
||||
{ fprintf(fplog, "Warning: Cdsc = %g is negative.\n",
|
||||
pParam->BSIM3cdsc);
|
||||
printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM3cdsc);
|
||||
}
|
||||
if (pParam->BSIM3cdscd < 0.0)
|
||||
{ fprintf(fplog, "Warning: Cdscd = %g is negative.\n",
|
||||
pParam->BSIM3cdscd);
|
||||
printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM3cdscd);
|
||||
}
|
||||
if (pParam->BSIM3nfactor < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Nfactor = %g is negative.\n",
|
||||
pParam->BSIM3nfactor);
|
||||
printf ("Warning: Nfactor = %g is negative.\n", pParam->BSIM3nfactor);
|
||||
}
|
||||
if (pParam->BSIM3cdsc < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Cdsc = %g is negative.\n",
|
||||
pParam->BSIM3cdsc);
|
||||
printf ("Warning: Cdsc = %g is negative.\n",
|
||||
pParam->BSIM3cdsc);
|
||||
}
|
||||
if (pParam->BSIM3cdscd < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Cdscd = %g is negative.\n",
|
||||
pParam->BSIM3cdscd);
|
||||
printf ("Warning: Cdscd = %g is negative.\n",
|
||||
pParam->BSIM3cdscd);
|
||||
}
|
||||
/* Check DIBL parameters */
|
||||
if (pParam->BSIM3eta0 < 0.0)
|
||||
{ fprintf(fplog, "Warning: Eta0 = %g is negative.\n",
|
||||
pParam->BSIM3eta0);
|
||||
printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM3eta0);
|
||||
}
|
||||
|
||||
/* Check Abulk parameters */
|
||||
if (fabs(1.0e-6 / (pParam->BSIM3b1 + pParam->BSIM3weff)) > 10.0)
|
||||
{ fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n");
|
||||
printf("Warning: (B1 + Weff) may be too small.\n");
|
||||
}
|
||||
|
||||
if (pParam->BSIM3eta0 < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Eta0 = %g is negative.\n",
|
||||
pParam->BSIM3eta0);
|
||||
printf ("Warning: Eta0 = %g is negative.\n",
|
||||
pParam->BSIM3eta0);
|
||||
}
|
||||
|
||||
/* Check Abulk parameters */
|
||||
if (fabs
|
||||
(1.0e-6 / (pParam->BSIM3b1 + pParam->BSIM3weff)) >
|
||||
10.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: (B1 + Weff) may be too small.\n");
|
||||
printf ("Warning: (B1 + Weff) may be too small.\n");
|
||||
}
|
||||
|
||||
|
||||
/* Check Saturation parameters */
|
||||
if (pParam->BSIM3a2 < 0.01)
|
||||
{ fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3a2);
|
||||
printf("Warning: A2 = %g is too small. Set to 0.01.\n",
|
||||
pParam->BSIM3a2);
|
||||
pParam->BSIM3a2 = 0.01;
|
||||
}
|
||||
else if (pParam->BSIM3a2 > 1.0)
|
||||
{ fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
|
||||
pParam->BSIM3a2);
|
||||
printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
|
||||
pParam->BSIM3a2);
|
||||
pParam->BSIM3a2 = 1.0;
|
||||
pParam->BSIM3a1 = 0.0;
|
||||
if (pParam->BSIM3a2 < 0.01)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: A2 = %g is too small. Set to 0.01.\n",
|
||||
pParam->BSIM3a2);
|
||||
printf ("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3a2);
|
||||
pParam->BSIM3a2 = 0.01;
|
||||
}
|
||||
else if (pParam->BSIM3a2 > 1.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n",
|
||||
pParam->BSIM3a2);
|
||||
printf ("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM3a2);
|
||||
pParam->BSIM3a2 = 1.0;
|
||||
pParam->BSIM3a1 = 0.0;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (pParam->BSIM3rdsw < 0.0)
|
||||
{ fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n",
|
||||
pParam->BSIM3rdsw);
|
||||
printf("Warning: Rdsw = %g is negative. Set to zero.\n",
|
||||
pParam->BSIM3rdsw);
|
||||
pParam->BSIM3rdsw = 0.0;
|
||||
pParam->BSIM3rds0 = 0.0;
|
||||
}
|
||||
else if ((pParam->BSIM3rds0 > 0.0) && (pParam->BSIM3rds0 < 0.001))
|
||||
{ fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n",
|
||||
pParam->BSIM3rds0);
|
||||
printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n",
|
||||
pParam->BSIM3rds0);
|
||||
pParam->BSIM3rds0 = 0.0;
|
||||
}
|
||||
if (pParam->BSIM3vsattemp < 1.0e3)
|
||||
{ fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3vsattemp);
|
||||
printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3vsattemp);
|
||||
}
|
||||
if (pParam->BSIM3rdsw < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Rdsw = %g is negative. Set to zero.\n",
|
||||
pParam->BSIM3rdsw);
|
||||
printf ("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM3rdsw);
|
||||
pParam->BSIM3rdsw = 0.0;
|
||||
pParam->BSIM3rds0 = 0.0;
|
||||
}
|
||||
else if ((pParam->BSIM3rds0 > 0.0)
|
||||
&& (pParam->BSIM3rds0 < 0.001))
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n",
|
||||
pParam->BSIM3rds0);
|
||||
printf ("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->BSIM3rds0);
|
||||
pParam->BSIM3rds0 = 0.0;
|
||||
}
|
||||
if (pParam->BSIM3vsattemp < 1.0e3)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Vsat at current temperature = %g may be too small.\n",
|
||||
pParam->BSIM3vsattemp);
|
||||
printf ("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3vsattemp);
|
||||
}
|
||||
|
||||
if (pParam->BSIM3pdibl1 < 0.0)
|
||||
{ fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n",
|
||||
pParam->BSIM3pdibl1);
|
||||
printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3pdibl1);
|
||||
}
|
||||
if (pParam->BSIM3pdibl2 < 0.0)
|
||||
{ fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n",
|
||||
pParam->BSIM3pdibl2);
|
||||
printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3pdibl2);
|
||||
}
|
||||
if (pParam->BSIM3pdibl1 < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Pdibl1 = %g is negative.\n",
|
||||
pParam->BSIM3pdibl1);
|
||||
printf ("Warning: Pdibl1 = %g is negative.\n",
|
||||
pParam->BSIM3pdibl1);
|
||||
}
|
||||
if (pParam->BSIM3pdibl2 < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: Pdibl2 = %g is negative.\n",
|
||||
pParam->BSIM3pdibl2);
|
||||
printf ("Warning: Pdibl2 = %g is negative.\n",
|
||||
pParam->BSIM3pdibl2);
|
||||
}
|
||||
/* Check overlap capacitance parameters */
|
||||
if (model->BSIM3cgdo < 0.0)
|
||||
{ fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3cgdo);
|
||||
printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3cgdo);
|
||||
model->BSIM3cgdo = 0.0;
|
||||
}
|
||||
if (model->BSIM3cgso < 0.0)
|
||||
{ fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3cgso);
|
||||
printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3cgso);
|
||||
model->BSIM3cgso = 0.0;
|
||||
}
|
||||
if (model->BSIM3cgbo < 0.0)
|
||||
{ fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3cgbo);
|
||||
printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3cgbo);
|
||||
model->BSIM3cgbo = 0.0;
|
||||
}
|
||||
if (model->BSIM3cgdo < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: cgdo = %g is negative. Set to zero.\n",
|
||||
model->BSIM3cgdo);
|
||||
printf ("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3cgdo);
|
||||
model->BSIM3cgdo = 0.0;
|
||||
}
|
||||
if (model->BSIM3cgso < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: cgso = %g is negative. Set to zero.\n",
|
||||
model->BSIM3cgso);
|
||||
printf ("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3cgso);
|
||||
model->BSIM3cgso = 0.0;
|
||||
}
|
||||
if (model->BSIM3cgbo < 0.0)
|
||||
{
|
||||
fprintf (fplog,
|
||||
"Warning: cgbo = %g is negative. Set to zero.\n",
|
||||
model->BSIM3cgbo);
|
||||
printf ("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3cgbo);
|
||||
model->BSIM3cgbo = 0.0;
|
||||
}
|
||||
|
||||
}/* loop for the parameter check for warning messages */
|
||||
fclose(fplog);
|
||||
}
|
||||
else
|
||||
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
|
||||
}
|
||||
} /* 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);
|
||||
return (Fatal_Flag);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,23 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3cvtest.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3cvtest.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3def.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -18,90 +28,111 @@ File: b3cvtest.c
|
|||
|
||||
|
||||
int
|
||||
BSIM3convTest(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
BSIM3convTest (GENmodel * inModel, CKTcircuit * ckt)
|
||||
{
|
||||
BSIM3model *model = (BSIM3model*)inModel;
|
||||
BSIM3instance *here;
|
||||
double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
||||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
BSIM3model *model = (BSIM3model *) inModel;
|
||||
BSIM3instance *here;
|
||||
double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
||||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
/* loop through all the BSIM3 device models */
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3owner != ARCHme) continue;
|
||||
vbs = model->BSIM3type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3bNode)
|
||||
- *(ckt->CKTrhsOld+here->BSIM3sNodePrime));
|
||||
vgs = model->BSIM3type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3gNode)
|
||||
- *(ckt->CKTrhsOld+here->BSIM3sNodePrime));
|
||||
vds = model->BSIM3type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3dNodePrime)
|
||||
- *(ckt->CKTrhsOld+here->BSIM3sNodePrime));
|
||||
vbd = vbs - vds;
|
||||
vgd = vgs - vds;
|
||||
vgdo = *(ckt->CKTstate0 + here->BSIM3vgs)
|
||||
- *(ckt->CKTstate0 + here->BSIM3vds);
|
||||
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3vbs);
|
||||
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3vbd);
|
||||
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3vgs);
|
||||
delvds = vds - *(ckt->CKTstate0 + here->BSIM3vds);
|
||||
delvgd = vgd-vgdo;
|
||||
/* loop through all the BSIM3 device models */
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
|
||||
cd = here->BSIM3cd - here->BSIM3cbd;
|
||||
if (here->BSIM3mode >= 0)
|
||||
{ cd += here->BSIM3csub;
|
||||
cdhat = cd - here->BSIM3gbd * delvbd
|
||||
+ (here->BSIM3gmbs + here->BSIM3gbbs) * delvbs
|
||||
+ (here->BSIM3gm + here->BSIM3gbgs) * delvgs
|
||||
+ (here->BSIM3gds + here->BSIM3gbds) * delvds;
|
||||
}
|
||||
else
|
||||
{ cdhat = cd + (here->BSIM3gmbs - here->BSIM3gbd) * delvbd
|
||||
+ here->BSIM3gm * delvgd - here->BSIM3gds * delvds;
|
||||
}
|
||||
if (here->BSIM3owner != ARCHme)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* check convergence
|
||||
*/
|
||||
if ((here->BSIM3off == 0) || (!(ckt->CKTmode & MODEINITFIX)))
|
||||
{ tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd))
|
||||
+ ckt->CKTabstol;
|
||||
if (fabs(cdhat - cd) >= tol)
|
||||
{ ckt->CKTnoncon++;
|
||||
return(OK);
|
||||
}
|
||||
cbs = here->BSIM3cbs;
|
||||
cbd = here->BSIM3cbd;
|
||||
if (here->BSIM3mode >= 0)
|
||||
{ cbhat = cbs + cbd - here->BSIM3csub
|
||||
+ here->BSIM3gbd * delvbd
|
||||
+ (here->BSIM3gbs - here->BSIM3gbbs) * delvbs
|
||||
- here->BSIM3gbgs * delvgs
|
||||
- here->BSIM3gbds * delvds;
|
||||
}
|
||||
else
|
||||
{ cbhat = cbs + cbd - here->BSIM3csub
|
||||
+ here->BSIM3gbs * delvbs
|
||||
+ (here->BSIM3gbd - here->BSIM3gbbs) * delvbd
|
||||
- here->BSIM3gbgs * delvgd
|
||||
+ here->BSIM3gbds * delvds;
|
||||
}
|
||||
tol = ckt->CKTreltol * MAX(fabs(cbhat),
|
||||
fabs(cbs + cbd - here->BSIM3csub)) + ckt->CKTabstol;
|
||||
if (fabs(cbhat - (cbs + cbd - here->BSIM3csub)) > tol)
|
||||
{ ckt->CKTnoncon++;
|
||||
return(OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
vbs = model->BSIM3type
|
||||
* (*(ckt->CKTrhsOld + here->BSIM3bNode)
|
||||
- *(ckt->CKTrhsOld +
|
||||
here->BSIM3sNodePrime));
|
||||
vgs = model->BSIM3type *
|
||||
(*(ckt->CKTrhsOld + here->BSIM3gNode) -
|
||||
*(ckt->CKTrhsOld + here->BSIM3sNodePrime));
|
||||
vds = model->BSIM3type *
|
||||
(*(ckt->CKTrhsOld + here->BSIM3dNodePrime) -
|
||||
*(ckt->CKTrhsOld + here->BSIM3sNodePrime));
|
||||
vbd = vbs - vds;
|
||||
vgd = vgs - vds;
|
||||
vgdo = *(ckt->CKTstate0 + here->BSIM3vgs)
|
||||
- *(ckt->CKTstate0 + here->BSIM3vds);
|
||||
delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3vbs);
|
||||
delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3vbd);
|
||||
delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3vgs);
|
||||
delvds = vds - *(ckt->CKTstate0 + here->BSIM3vds);
|
||||
delvgd = vgd - vgdo;
|
||||
|
||||
cd = here->BSIM3cd - here->BSIM3cbd;
|
||||
if (here->BSIM3mode >= 0)
|
||||
{
|
||||
cd += here->BSIM3csub;
|
||||
cdhat = cd - here->BSIM3gbd * delvbd
|
||||
+ (here->BSIM3gmbs +
|
||||
here->BSIM3gbbs) * delvbs +
|
||||
(here->BSIM3gm +
|
||||
here->BSIM3gbgs) * delvgs +
|
||||
(here->BSIM3gds +
|
||||
here->BSIM3gbds) * delvds;
|
||||
}
|
||||
else
|
||||
{
|
||||
cdhat = cd + (here->BSIM3gmbs -
|
||||
here->BSIM3gbd) * delvbd +
|
||||
here->BSIM3gm * delvgd -
|
||||
here->BSIM3gds * delvds;
|
||||
}
|
||||
|
||||
/*
|
||||
* check convergence
|
||||
*/
|
||||
if ((here->BSIM3off == 0)
|
||||
|| (!(ckt->CKTmode & MODEINITFIX)))
|
||||
{
|
||||
tol = ckt->CKTreltol * MAX (fabs (cdhat),
|
||||
fabs (cd)) +
|
||||
ckt->CKTabstol;
|
||||
if (fabs (cdhat - cd) >= tol)
|
||||
{
|
||||
ckt->CKTnoncon++;
|
||||
return (OK);
|
||||
}
|
||||
cbs = here->BSIM3cbs;
|
||||
cbd = here->BSIM3cbd;
|
||||
if (here->BSIM3mode >= 0)
|
||||
{
|
||||
cbhat = cbs + cbd - here->BSIM3csub
|
||||
+ here->BSIM3gbd * delvbd
|
||||
+ (here->BSIM3gbs -
|
||||
here->BSIM3gbbs) * delvbs -
|
||||
here->BSIM3gbgs * delvgs -
|
||||
here->BSIM3gbds * delvds;
|
||||
}
|
||||
else
|
||||
{
|
||||
cbhat = cbs + cbd - here->BSIM3csub
|
||||
+ here->BSIM3gbs * delvbs
|
||||
+ (here->BSIM3gbd -
|
||||
here->BSIM3gbbs) * delvbd -
|
||||
here->BSIM3gbgs * delvgd +
|
||||
here->BSIM3gbds * delvds;
|
||||
}
|
||||
tol = ckt->CKTreltol * MAX (fabs (cbhat),
|
||||
fabs (cbs + cbd -
|
||||
here->
|
||||
BSIM3csub))
|
||||
+ ckt->CKTabstol;
|
||||
if (fabs
|
||||
(cbhat - (cbs + cbd - here->BSIM3csub)) >
|
||||
tol)
|
||||
{
|
||||
ckt->CKTnoncon++;
|
||||
return (OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,25 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3del.c
|
||||
**********/
|
||||
/*
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3del.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Xuemei Xi, 10/05, 12/14, 2001.
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bsim3def.h"
|
||||
#include "sperror.h"
|
||||
#include "gendefs.h"
|
||||
|
|
@ -16,28 +27,27 @@ File: b3del.c
|
|||
|
||||
|
||||
int
|
||||
BSIM3delete(inModel,name,inInst)
|
||||
GENmodel *inModel;
|
||||
IFuid name;
|
||||
GENinstance **inInst;
|
||||
BSIM3delete (GENmodel * inModel, IFuid name, GENinstance ** inInst)
|
||||
{
|
||||
BSIM3instance **fast = (BSIM3instance**)inInst;
|
||||
BSIM3model *model = (BSIM3model*)inModel;
|
||||
BSIM3instance **prev = NULL;
|
||||
BSIM3instance *here;
|
||||
BSIM3instance **fast = (BSIM3instance **) inInst;
|
||||
BSIM3model *model = (BSIM3model *) inModel;
|
||||
BSIM3instance **prev = NULL;
|
||||
BSIM3instance *here;
|
||||
|
||||
for (; model ; model = model->BSIM3nextModel)
|
||||
{ prev = &(model->BSIM3instances);
|
||||
for (here = *prev; here ; here = *prev)
|
||||
{ if (here->BSIM3name == name || (fast && here==*fast))
|
||||
{ *prev= here->BSIM3nextInstance;
|
||||
FREE(here);
|
||||
return(OK);
|
||||
}
|
||||
prev = &(here->BSIM3nextInstance);
|
||||
}
|
||||
}
|
||||
return(E_NODEV);
|
||||
for (; model; model = model->BSIM3nextModel)
|
||||
{
|
||||
prev = &(model->BSIM3instances);
|
||||
for (here = *prev; here; here = *prev)
|
||||
{
|
||||
if (here->BSIM3name == name
|
||||
|| (fast && here == *fast))
|
||||
{
|
||||
*prev = here->BSIM3nextInstance;
|
||||
FREE (here);
|
||||
return (OK);
|
||||
}
|
||||
prev = &(here->BSIM3nextInstance);
|
||||
}
|
||||
}
|
||||
return (E_NODEV);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,39 +1,54 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3dest.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3dest.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bsim3def.h"
|
||||
#include "suffix.h"
|
||||
|
||||
void
|
||||
BSIM3destroy(inModel)
|
||||
GENmodel **inModel;
|
||||
BSIM3destroy (GENmodel ** inModel)
|
||||
{
|
||||
BSIM3model **model = (BSIM3model**)inModel;
|
||||
BSIM3instance *here;
|
||||
BSIM3instance *prev = NULL;
|
||||
BSIM3model *mod = *model;
|
||||
BSIM3model *oldmod = NULL;
|
||||
BSIM3model **model = (BSIM3model **) inModel;
|
||||
BSIM3instance *here;
|
||||
BSIM3instance *prev = NULL;
|
||||
BSIM3model *mod = *model;
|
||||
BSIM3model *oldmod = NULL;
|
||||
|
||||
for (; mod ; mod = mod->BSIM3nextModel)
|
||||
{ if(oldmod) FREE(oldmod);
|
||||
oldmod = mod;
|
||||
prev = (BSIM3instance *)NULL;
|
||||
for (here = mod->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
}
|
||||
if(oldmod) FREE(oldmod);
|
||||
*model = NULL;
|
||||
return;
|
||||
for (; mod; mod = mod->BSIM3nextModel)
|
||||
{
|
||||
if (oldmod)
|
||||
FREE (oldmod);
|
||||
oldmod = mod;
|
||||
prev = (BSIM3instance *) NULL;
|
||||
for (here = mod->BSIM3instances; here;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (prev)
|
||||
FREE (prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev)
|
||||
FREE (prev);
|
||||
}
|
||||
if (oldmod)
|
||||
FREE (oldmod);
|
||||
*model = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,24 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3getic.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3getic.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3def.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,32 +26,39 @@ File: b3getic.c
|
|||
|
||||
|
||||
int
|
||||
BSIM3getic(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
BSIM3getic (GENmodel * inModel, CKTcircuit * ckt)
|
||||
{
|
||||
BSIM3model *model = (BSIM3model*)inModel;
|
||||
BSIM3instance *here;
|
||||
BSIM3model *model = (BSIM3model *) inModel;
|
||||
BSIM3instance *here;
|
||||
|
||||
for (; model ; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3owner != ARCHme) continue;
|
||||
if(!here->BSIM3icVBSGiven)
|
||||
{ here->BSIM3icVBS = *(ckt->CKTrhs + here->BSIM3bNode)
|
||||
- *(ckt->CKTrhs + here->BSIM3sNode);
|
||||
}
|
||||
if (!here->BSIM3icVDSGiven)
|
||||
{ here->BSIM3icVDS = *(ckt->CKTrhs + here->BSIM3dNode)
|
||||
- *(ckt->CKTrhs + here->BSIM3sNode);
|
||||
}
|
||||
if (!here->BSIM3icVGSGiven)
|
||||
{ here->BSIM3icVGS = *(ckt->CKTrhs + here->BSIM3gNode)
|
||||
- *(ckt->CKTrhs + here->BSIM3sNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
for (; model; model = model->BSIM3nextModel)
|
||||
{
|
||||
for (here = model->BSIM3instances; here;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
|
||||
if (here->BSIM3owner != ARCHme)
|
||||
continue;
|
||||
|
||||
if (!here->BSIM3icVBSGiven)
|
||||
{
|
||||
here->BSIM3icVBS =
|
||||
*(ckt->CKTrhs + here->BSIM3bNode) -
|
||||
*(ckt->CKTrhs + here->BSIM3sNode);
|
||||
}
|
||||
if (!here->BSIM3icVDSGiven)
|
||||
{
|
||||
here->BSIM3icVDS =
|
||||
*(ckt->CKTrhs + here->BSIM3dNode) -
|
||||
*(ckt->CKTrhs + here->BSIM3sNode);
|
||||
}
|
||||
if (!here->BSIM3icVGSGiven)
|
||||
{
|
||||
here->BSIM3icVGS =
|
||||
*(ckt->CKTrhs + here->BSIM3gNode) -
|
||||
*(ckt->CKTrhs + here->BSIM3sNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,47 +1,58 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3mdel.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3mdel.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "bsim3def.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3mDelete(inModel,modname,kill)
|
||||
GENmodel **inModel;
|
||||
IFuid modname;
|
||||
GENmodel *kill;
|
||||
BSIM3mDelete (GENmodel ** inModel, IFuid modname, GENmodel * kill)
|
||||
{
|
||||
BSIM3model **model = (BSIM3model**)inModel;
|
||||
BSIM3model *modfast = (BSIM3model*)kill;
|
||||
BSIM3instance *here;
|
||||
BSIM3instance *prev = NULL;
|
||||
BSIM3model **oldmod;
|
||||
BSIM3model **model = (BSIM3model **) inModel;
|
||||
BSIM3model *modfast = (BSIM3model *) kill;
|
||||
BSIM3instance *here;
|
||||
BSIM3instance *prev = NULL;
|
||||
BSIM3model **oldmod;
|
||||
|
||||
oldmod = model;
|
||||
for (; *model ; model = &((*model)->BSIM3nextModel))
|
||||
{ if ((*model)->BSIM3modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return(E_NOMOD);
|
||||
oldmod = model;
|
||||
for (; *model; model = &((*model)->BSIM3nextModel))
|
||||
{
|
||||
if ((*model)->BSIM3modName == modname ||
|
||||
(modfast && *model == modfast))
|
||||
goto delgot;
|
||||
oldmod = model;
|
||||
}
|
||||
return (E_NOMOD);
|
||||
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
{ if(prev) FREE(prev);
|
||||
prev = here;
|
||||
}
|
||||
if(prev) FREE(prev);
|
||||
FREE(*model);
|
||||
return(OK);
|
||||
delgot:
|
||||
*oldmod = (*model)->BSIM3nextModel; /* cut deleted device out of list */
|
||||
for (here = (*model)->BSIM3instances; here;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (prev)
|
||||
FREE (prev);
|
||||
prev = here;
|
||||
}
|
||||
if (prev)
|
||||
FREE (prev);
|
||||
FREE (*model);
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,19 +1,30 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Gary W. Ng and Min-Chie Jeng.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3noi.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3noi.c of BSIM3v3.2.4
|
||||
* Author: 1995 Gary W. Ng and Min-Chie Jeng.
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Xuemei Xi, 10/05, 12/21, 2001.
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "bsim3def.h"
|
||||
#include "cktdefs.h"
|
||||
#include "iferrmsg.h"
|
||||
#include "noisedef.h"
|
||||
#include "suffix.h"
|
||||
#include "const.h" /* jwan */
|
||||
#include "const.h" /* jwan */
|
||||
|
||||
/*
|
||||
* BSIM3noise (mode, operation, firstModel, ckt, data, OnDens)
|
||||
|
|
@ -41,344 +52,513 @@ File: b3noi.c
|
|||
Flicker noise = SPICE2 model
|
||||
*/
|
||||
|
||||
extern void NevalSrc();
|
||||
extern double Nintegrate();
|
||||
extern void NevalSrc ();
|
||||
extern double Nintegrate ();
|
||||
|
||||
|
||||
/*
|
||||
* The StrongInversionNoiseEval function has been modified in
|
||||
* the release 3.2.4 of BSIM3 model. To accomodate both the old
|
||||
* and the new code, I have renamed according to the following:
|
||||
*
|
||||
*
|
||||
* BSIM3v3.2.4 -> StrongInversionNoiseEvalNew
|
||||
* Previous -> StrongInversionNoiseEvalOld
|
||||
*
|
||||
* 2002 Paolo Nenzi
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* JX: 1/f noise model is smoothed out 12/18/01.
|
||||
*/
|
||||
double
|
||||
StrongInversionNoiseEvalNew (double Vds, BSIM3model * model,
|
||||
BSIM3instance * here, double freq, double temp)
|
||||
{
|
||||
struct bsim3SizeDependParam *pParam;
|
||||
double cd, esat, DelClm, EffFreq, N0, Nl, Vgst;
|
||||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
|
||||
|
||||
pParam = here->pParam;
|
||||
cd = fabs (here->BSIM3cd) * here->BSIM3m;
|
||||
esat = 2.0 * pParam->BSIM3vsattemp / here->BSIM3ueff;
|
||||
if (model->BSIM3em <= 0.0)
|
||||
DelClm = 0.0;
|
||||
else
|
||||
{
|
||||
T0 = ((((Vds - here->BSIM3Vdseff) / pParam->BSIM3litl)
|
||||
+ model->BSIM3em) / esat);
|
||||
DelClm = pParam->BSIM3litl * log (MAX (T0, N_MINLOG));
|
||||
}
|
||||
EffFreq = pow (freq, model->BSIM3ef);
|
||||
T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3ueff;
|
||||
T2 = 1.0e8 * EffFreq * here->BSIM3Abulk * model->BSIM3cox
|
||||
* pParam->BSIM3leff * pParam->BSIM3leff;
|
||||
N0 = model->BSIM3cox * here->BSIM3Vgsteff / CHARGE;
|
||||
Nl = model->BSIM3cox * here->BSIM3Vgsteff
|
||||
* (1.0 - here->BSIM3AbovVgst2Vtm * here->BSIM3Vdseff) / CHARGE;
|
||||
|
||||
T3 = model->BSIM3oxideTrapDensityA
|
||||
* log (MAX (((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG));
|
||||
T4 = model->BSIM3oxideTrapDensityB * (N0 - Nl);
|
||||
T5 = model->BSIM3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
|
||||
|
||||
T6 = 8.62e-5 * temp * cd * cd;
|
||||
T7 = 1.0e8 * EffFreq * pParam->BSIM3leff
|
||||
* pParam->BSIM3leff * pParam->BSIM3weff * here->BSIM3m;
|
||||
T8 = model->BSIM3oxideTrapDensityA +
|
||||
model->BSIM3oxideTrapDensityB * Nl +
|
||||
model->BSIM3oxideTrapDensityC * Nl * Nl;
|
||||
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
|
||||
|
||||
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
|
||||
return Ssi;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The code for releases: BSIM3V32, BSIM3V322, BSIM3V323
|
||||
* follows
|
||||
*/
|
||||
|
||||
double
|
||||
StrongInversionNoiseEval(vgs, vds, model, here, freq, temp)
|
||||
double vgs, vds, freq, temp;
|
||||
BSIM3model *model;
|
||||
BSIM3instance *here;
|
||||
StrongInversionNoiseEvalOld (double vgs, double vds, BSIM3model * model,
|
||||
BSIM3instance * here, double freq, double temp)
|
||||
{
|
||||
struct bsim3SizeDependParam *pParam;
|
||||
double cd, esat, DelClm, EffFreq, N0, Nl, Vgst;
|
||||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi;
|
||||
struct bsim3SizeDependParam *pParam;
|
||||
double cd, esat, DelClm, EffFreq, N0, Nl, Vgst;
|
||||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
|
||||
|
||||
pParam = here->pParam;
|
||||
cd = fabs(here->BSIM3cd);
|
||||
if (vds > here->BSIM3vdsat)
|
||||
{ esat = 2.0 * pParam->BSIM3vsattemp / here->BSIM3ueff;
|
||||
T0 = ((((vds - here->BSIM3vdsat) / pParam->BSIM3litl) + model->BSIM3em)
|
||||
/ esat);
|
||||
DelClm = pParam->BSIM3litl * log (MAX(T0, N_MINLOG));
|
||||
pParam = here->pParam;
|
||||
cd = fabs (here->BSIM3cd) * here->BSIM3m;
|
||||
if (model->BSIM3em <= 0.0) /* flicker noise modified -JX */
|
||||
DelClm = 0.0;
|
||||
else if (vds > here->BSIM3vdsat)
|
||||
{
|
||||
esat = 2.0 * pParam->BSIM3vsattemp / here->BSIM3ueff;
|
||||
T0 = ((((vds - here->BSIM3vdsat) / pParam->BSIM3litl) +
|
||||
model->BSIM3em) / esat);
|
||||
DelClm = pParam->BSIM3litl * log (MAX (T0, N_MINLOG));
|
||||
}
|
||||
else
|
||||
DelClm = 0.0;
|
||||
EffFreq = pow(freq, model->BSIM3ef);
|
||||
T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3ueff;
|
||||
T2 = 1.0e8 * EffFreq * model->BSIM3cox
|
||||
* pParam->BSIM3leff * pParam->BSIM3leff;
|
||||
Vgst = vgs - here->BSIM3von;
|
||||
N0 = model->BSIM3cox * Vgst / CHARGE;
|
||||
if (N0 < 0.0)
|
||||
N0 = 0.0;
|
||||
Nl = model->BSIM3cox * (Vgst - MIN(vds, here->BSIM3vdsat)) / CHARGE;
|
||||
if (Nl < 0.0)
|
||||
Nl = 0.0;
|
||||
else
|
||||
DelClm = 0.0;
|
||||
EffFreq = pow (freq, model->BSIM3ef);
|
||||
T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3ueff;
|
||||
T2 = 1.0e8 * EffFreq * model->BSIM3cox
|
||||
* pParam->BSIM3leff * pParam->BSIM3leff;
|
||||
Vgst = vgs - here->BSIM3von;
|
||||
N0 = model->BSIM3cox * Vgst / CHARGE;
|
||||
if (N0 < 0.0)
|
||||
N0 = 0.0;
|
||||
Nl = model->BSIM3cox * (Vgst - MIN (vds, here->BSIM3vdsat)) / CHARGE;
|
||||
if (Nl < 0.0)
|
||||
Nl = 0.0;
|
||||
|
||||
T3 = model->BSIM3oxideTrapDensityA
|
||||
* log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG));
|
||||
T4 = model->BSIM3oxideTrapDensityB * (N0 - Nl);
|
||||
T5 = model->BSIM3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
|
||||
T3 = model->BSIM3oxideTrapDensityA
|
||||
* log (MAX (((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG));
|
||||
T4 = model->BSIM3oxideTrapDensityB * (N0 - Nl);
|
||||
T5 = model->BSIM3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl);
|
||||
|
||||
T6 = 8.62e-5 * temp * cd * cd;
|
||||
T7 = 1.0e8 * EffFreq * pParam->BSIM3leff
|
||||
* pParam->BSIM3leff * pParam->BSIM3weff;
|
||||
T8 = model->BSIM3oxideTrapDensityA + model->BSIM3oxideTrapDensityB * Nl
|
||||
+ model->BSIM3oxideTrapDensityC * Nl * Nl;
|
||||
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
|
||||
T6 = 8.62e-5 * temp * cd * cd;
|
||||
T7 = 1.0e8 * EffFreq * pParam->BSIM3leff
|
||||
* pParam->BSIM3leff * pParam->BSIM3weff * here->BSIM3m;
|
||||
T8 = model->BSIM3oxideTrapDensityA +
|
||||
model->BSIM3oxideTrapDensityB * Nl +
|
||||
model->BSIM3oxideTrapDensityC * Nl * Nl;
|
||||
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
|
||||
|
||||
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
|
||||
return Ssi;
|
||||
Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
|
||||
return Ssi;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
BSIM3noise (mode, operation, inModel, ckt, data, OnDens)
|
||||
int mode, operation;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
Ndata *data;
|
||||
double *OnDens;
|
||||
BSIM3noise (int mode, int operation, GENmodel * inModel, CKTcircuit * ckt,
|
||||
Ndata * data, double *OnDens)
|
||||
{
|
||||
BSIM3model *model = (BSIM3model *)inModel;
|
||||
BSIM3instance *here;
|
||||
struct bsim3SizeDependParam *pParam;
|
||||
char name[N_MXVLNTH];
|
||||
double tempOnoise;
|
||||
double tempInoise;
|
||||
double noizDens[BSIM3NSRCS];
|
||||
double lnNdens[BSIM3NSRCS];
|
||||
BSIM3model *model = (BSIM3model *) inModel;
|
||||
BSIM3instance *here;
|
||||
struct bsim3SizeDependParam *pParam;
|
||||
char name[N_MXVLNTH];
|
||||
double tempOnoise;
|
||||
double tempInoise;
|
||||
double noizDens[BSIM3NSRCS];
|
||||
double lnNdens[BSIM3NSRCS];
|
||||
|
||||
double vgs, vds, Slimit;
|
||||
double T1, T10, T11;
|
||||
double Ssi, Swi;
|
||||
double vgs, vds, Slimit;
|
||||
double N0, Nl;
|
||||
double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13;
|
||||
double n, ExpArg, Ssi, Swi;
|
||||
|
||||
int i;
|
||||
int error, i;
|
||||
|
||||
/* define the names of the noise sources */
|
||||
static char *BSIM3nNames[BSIM3NSRCS] =
|
||||
{ /* Note that we have to keep the order */
|
||||
".rd", /* noise due to rd */
|
||||
/* consistent with thestrchr definitions */
|
||||
".rs", /* noise due to rs */
|
||||
/* in BSIM3defs.h */
|
||||
".id", /* noise due to id */
|
||||
".1overf", /* flicker (1/f) noise */
|
||||
"" /* total transistor noise */
|
||||
};
|
||||
/* define the names of the noise sources */
|
||||
static char *BSIM3nNames[BSIM3NSRCS] = { /* Note that we have to keep the order */
|
||||
".rd", /* noise due to rd */
|
||||
/* consistent with the index definitions */
|
||||
".rs", /* noise due to rs */
|
||||
/* in BSIM3defs.h */
|
||||
".id", /* noise due to id */
|
||||
".1overf", /* flicker (1/f) noise */
|
||||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{ pParam = here->pParam;
|
||||
switch (operation)
|
||||
{ case N_OPEN:
|
||||
/* see if we have to to produce a summary report */
|
||||
/* if so, name all the noise generators */
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{
|
||||
for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3owner != ARCHme)
|
||||
continue;
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
{
|
||||
case N_OPEN:
|
||||
/* see if we have to to produce a summary report */
|
||||
/* if so, name all the noise generators */
|
||||
|
||||
if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0)
|
||||
{ switch (mode)
|
||||
{ case N_DENS:
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{ (void) sprintf(name, "onoise.%s%s",
|
||||
here->BSIM3name,
|
||||
BSIM3nNames[i]);
|
||||
data->namelist = (IFuid *) trealloc(
|
||||
(char *) data->namelist,
|
||||
(data->numPlots + 1)
|
||||
* sizeof(IFuid));
|
||||
if (!data->namelist)
|
||||
return(E_NOMEM);
|
||||
(*(SPfrontEnd->IFnewUid)) (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
(void **) NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
break;
|
||||
case INT_NOIZ:
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{ (void) sprintf(name, "onoise_total.%s%s",
|
||||
here->BSIM3name,
|
||||
BSIM3nNames[i]);
|
||||
data->namelist = (IFuid *) trealloc(
|
||||
(char *) data->namelist,
|
||||
(data->numPlots + 1)
|
||||
* sizeof(IFuid));
|
||||
if (!data->namelist)
|
||||
return(E_NOMEM);
|
||||
(*(SPfrontEnd->IFnewUid)) (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
(void **) NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
(void) sprintf(name, "inoise_total.%s%s",
|
||||
here->BSIM3name,
|
||||
BSIM3nNames[i]);
|
||||
data->namelist = (IFuid *) trealloc(
|
||||
(char *) data->namelist,
|
||||
(data->numPlots + 1)
|
||||
* sizeof(IFuid));
|
||||
if (!data->namelist)
|
||||
return(E_NOMEM);
|
||||
(*(SPfrontEnd->IFnewUid)) (ckt,
|
||||
&(data->namelist[data->numPlots++]),
|
||||
(IFuid) NULL, name, UID_OTHER,
|
||||
(void **)NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (((NOISEAN *) ckt->CKTcurJob)->NStpsSm != 0)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case N_DENS:
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{
|
||||
(void) sprintf (name,
|
||||
"onoise.%s%s",
|
||||
here->BSIM3name, BSIM3nNames[i]);
|
||||
data->namelist =
|
||||
(IFuid *)
|
||||
trealloc ((char *) data->namelist,
|
||||
(data->numPlots + 1) * sizeof (IFuid));
|
||||
if (!data->namelist)
|
||||
return (E_NOMEM);
|
||||
(*
|
||||
(SPfrontEnd->
|
||||
IFnewUid)) (ckt,
|
||||
&(data->
|
||||
namelist
|
||||
[data->
|
||||
numPlots++]),
|
||||
(IFuid)
|
||||
NULL,
|
||||
name, UID_OTHER, (void **) NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
break;
|
||||
case N_CALC:
|
||||
switch (mode)
|
||||
{ case N_DENS:
|
||||
NevalSrc(&noizDens[BSIM3RDNOIZ],
|
||||
&lnNdens[BSIM3RDNOIZ], ckt, THERMNOISE,
|
||||
here->BSIM3dNodePrime, here->BSIM3dNode,
|
||||
here->BSIM3drainConductance);
|
||||
case INT_NOIZ:
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{
|
||||
(void) sprintf (name,
|
||||
"onoise_total.%s%s",
|
||||
here->BSIM3name, BSIM3nNames[i]);
|
||||
data->namelist =
|
||||
(IFuid *)
|
||||
trealloc ((char *) data->namelist,
|
||||
(data->numPlots + 1) * sizeof (IFuid));
|
||||
if (!data->namelist)
|
||||
return (E_NOMEM);
|
||||
(*
|
||||
(SPfrontEnd->
|
||||
IFnewUid)) (ckt,
|
||||
&(data->
|
||||
namelist
|
||||
[data->
|
||||
numPlots++]),
|
||||
(IFuid)
|
||||
NULL,
|
||||
name, UID_OTHER, (void **) NULL);
|
||||
/* we've added one more plot */
|
||||
|
||||
NevalSrc(&noizDens[BSIM3RSNOIZ],
|
||||
&lnNdens[BSIM3RSNOIZ], ckt, THERMNOISE,
|
||||
here->BSIM3sNodePrime, here->BSIM3sNode,
|
||||
here->BSIM3sourceConductance);
|
||||
(void) sprintf (name,
|
||||
"inoise_total.%s%s",
|
||||
here->BSIM3name, BSIM3nNames[i]);
|
||||
data->namelist =
|
||||
(IFuid *)
|
||||
trealloc ((char *) data->namelist,
|
||||
(data->numPlots + 1) * sizeof (IFuid));
|
||||
if (!data->namelist)
|
||||
return (E_NOMEM);
|
||||
(*
|
||||
(SPfrontEnd->
|
||||
IFnewUid)) (ckt,
|
||||
&(data->
|
||||
namelist
|
||||
[data->
|
||||
numPlots++]),
|
||||
(IFuid)
|
||||
NULL,
|
||||
name, UID_OTHER, (void **) NULL);
|
||||
/* we've added one more plot */
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case N_CALC:
|
||||
switch (mode)
|
||||
{
|
||||
case N_DENS:
|
||||
NevalSrc (&noizDens[BSIM3RDNOIZ],
|
||||
&lnNdens[BSIM3RDNOIZ], ckt,
|
||||
THERMNOISE,
|
||||
here->BSIM3dNodePrime,
|
||||
here->BSIM3dNode,
|
||||
here->BSIM3drainConductance * here->BSIM3m);
|
||||
NevalSrc (&noizDens[BSIM3RSNOIZ],
|
||||
&lnNdens[BSIM3RSNOIZ], ckt,
|
||||
THERMNOISE,
|
||||
here->BSIM3sNodePrime,
|
||||
here->BSIM3sNode,
|
||||
here->BSIM3sourceConductance * here->BSIM3m);
|
||||
|
||||
switch( model->BSIM3noiMod )
|
||||
{ case 1:
|
||||
case 3:
|
||||
NevalSrc(&noizDens[BSIM3IDNOIZ],
|
||||
&lnNdens[BSIM3IDNOIZ], ckt,
|
||||
THERMNOISE, here->BSIM3dNodePrime,
|
||||
here->BSIM3sNodePrime,
|
||||
(2.0 / 3.0 * fabs(here->BSIM3gm
|
||||
+ here->BSIM3gds
|
||||
+ here->BSIM3gmbs)));
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
NevalSrc(&noizDens[BSIM3IDNOIZ],
|
||||
&lnNdens[BSIM3IDNOIZ], ckt,
|
||||
THERMNOISE, here->BSIM3dNodePrime,
|
||||
here->BSIM3sNodePrime,
|
||||
(here->BSIM3ueff
|
||||
* fabs(here->BSIM3qinv
|
||||
/ (pParam->BSIM3leff
|
||||
* pParam->BSIM3leff))));
|
||||
break;
|
||||
}
|
||||
NevalSrc(&noizDens[BSIM3FLNOIZ], (double*) NULL,
|
||||
ckt, N_GAIN, here->BSIM3dNodePrime,
|
||||
here->BSIM3sNodePrime, (double) 0.0);
|
||||
switch (model->BSIM3noiMod)
|
||||
{
|
||||
case 1:
|
||||
case 3:
|
||||
NevalSrc (&noizDens
|
||||
[BSIM3IDNOIZ],
|
||||
&lnNdens
|
||||
[BSIM3IDNOIZ], ckt,
|
||||
THERMNOISE,
|
||||
here->
|
||||
BSIM3dNodePrime,
|
||||
here->
|
||||
BSIM3sNodePrime,
|
||||
(2.0 / 3.0 *
|
||||
fabs (here->
|
||||
BSIM3gm +
|
||||
here->
|
||||
BSIM3gds +
|
||||
here->BSIM3gmbs)) * here->BSIM3m);
|
||||
|
||||
switch( model->BSIM3noiMod )
|
||||
{ case 1:
|
||||
case 4:
|
||||
noizDens[BSIM3FLNOIZ] *= model->BSIM3kf
|
||||
* exp(model->BSIM3af
|
||||
* log(MAX(fabs(here->BSIM3cd),
|
||||
N_MINLOG)))
|
||||
/ (pow(data->freq, model->BSIM3ef)
|
||||
* pParam->BSIM3leff
|
||||
* pParam->BSIM3leff
|
||||
* model->BSIM3cox);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
vgs = *(ckt->CKTstates[0] + here->BSIM3vgs);
|
||||
vds = *(ckt->CKTstates[0] + here->BSIM3vds);
|
||||
if (vds < 0.0)
|
||||
{ vds = -vds;
|
||||
vgs = vgs + vds;
|
||||
}
|
||||
if (vgs >= here->BSIM3von + 0.1)
|
||||
{ Ssi = StrongInversionNoiseEval(vgs,
|
||||
vds, model, here, data->freq,
|
||||
ckt->CKTtemp);
|
||||
noizDens[BSIM3FLNOIZ] *= Ssi;
|
||||
}
|
||||
else
|
||||
{ pParam = here->pParam;
|
||||
T10 = model->BSIM3oxideTrapDensityA
|
||||
* 8.62e-5 * ckt->CKTtemp;
|
||||
T11 = pParam->BSIM3weff
|
||||
* pParam->BSIM3leff
|
||||
* pow(data->freq, model->BSIM3ef)
|
||||
* 4.0e36;
|
||||
Swi = T10 / T11 * here->BSIM3cd
|
||||
* here->BSIM3cd;
|
||||
Slimit = StrongInversionNoiseEval(
|
||||
here->BSIM3von + 0.1, vds, model,
|
||||
here, data->freq, ckt->CKTtemp);
|
||||
T1 = Swi + Slimit;
|
||||
if (T1 > 0.0)
|
||||
noizDens[BSIM3FLNOIZ] *= (Slimit
|
||||
* Swi) / T1;
|
||||
else
|
||||
noizDens[BSIM3FLNOIZ] *= 0.0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
NevalSrc (&noizDens[BSIM3IDNOIZ], &lnNdens[BSIM3IDNOIZ], ckt,
|
||||
THERMNOISE, here->BSIM3dNodePrime, here->BSIM3sNodePrime,
|
||||
(here->BSIM3ueff * fabs (here->BSIM3qinv) * here->BSIM3m /
|
||||
(pParam->BSIM3leff * pParam->BSIM3leff + here->BSIM3ueff *
|
||||
fabs (here->BSIM3qinv) * here->BSIM3m *
|
||||
(here->BSIM3rds / here->BSIM3m)))); /* bugfix */
|
||||
|
||||
lnNdens[BSIM3FLNOIZ] =
|
||||
log(MAX(noizDens[BSIM3FLNOIZ], N_MINLOG));
|
||||
|
||||
break;
|
||||
}
|
||||
NevalSrc (&noizDens[BSIM3FLNOIZ],
|
||||
(double *) NULL, ckt,
|
||||
N_GAIN,
|
||||
here->BSIM3dNodePrime,
|
||||
here->BSIM3sNodePrime, (double) 0.0);
|
||||
|
||||
noizDens[BSIM3TOTNOIZ] = noizDens[BSIM3RDNOIZ]
|
||||
+ noizDens[BSIM3RSNOIZ]
|
||||
+ noizDens[BSIM3IDNOIZ]
|
||||
+ noizDens[BSIM3FLNOIZ];
|
||||
lnNdens[BSIM3TOTNOIZ] =
|
||||
log(MAX(noizDens[BSIM3TOTNOIZ], N_MINLOG));
|
||||
|
||||
*OnDens += noizDens[BSIM3TOTNOIZ];
|
||||
|
||||
if (data->delFreq == 0.0)
|
||||
{ /* if we haven't done any previous
|
||||
integration, we need to initialize our
|
||||
"history" variables.
|
||||
*/
|
||||
switch (model->BSIM3noiMod)
|
||||
{
|
||||
case 1:
|
||||
case 4:
|
||||
noizDens[BSIM3FLNOIZ] *=
|
||||
model->BSIM3kf *
|
||||
exp (model->BSIM3af *
|
||||
log (MAX
|
||||
(fabs
|
||||
(here->
|
||||
BSIM3cd *
|
||||
here->
|
||||
BSIM3m),
|
||||
N_MINLOG)))
|
||||
/
|
||||
(pow
|
||||
(data->freq,
|
||||
model->BSIM3ef) *
|
||||
pParam->BSIM3leff *
|
||||
pParam->BSIM3leff * model->BSIM3cox);
|
||||
|
||||
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
vgs = *(ckt->CKTstates[0] + here->BSIM3vgs);
|
||||
vds = *(ckt->CKTstates[0] + here->BSIM3vds);
|
||||
if (vds < 0.0)
|
||||
{
|
||||
vds = -vds;
|
||||
vgs = vgs + vds;
|
||||
}
|
||||
/* Added revision dependent code */
|
||||
if (model->BSIM3intVersion == BSIM3V324)
|
||||
{
|
||||
Ssi =
|
||||
StrongInversionNoiseEvalNew (vds, model, here,
|
||||
data->freq,
|
||||
ckt->CKTtemp);
|
||||
T10 =
|
||||
model->BSIM3oxideTrapDensityA * 8.62e-5 *
|
||||
ckt->CKTtemp;
|
||||
T11 =
|
||||
pParam->BSIM3weff * here->BSIM3m *
|
||||
pParam->BSIM3leff * pow (data->freq,
|
||||
model->BSIM3ef) * 4.0e36;
|
||||
Swi =
|
||||
T10 / T11 * here->BSIM3cd * here->BSIM3m *
|
||||
here->BSIM3cd * here->BSIM3m;
|
||||
T1 = Swi + Ssi;
|
||||
if (T1 > 0.0)
|
||||
noizDens[BSIM3FLNOIZ] *= (Ssi * Swi) / T1;
|
||||
else
|
||||
noizDens[BSIM3FLNOIZ] *= 0.0;
|
||||
}
|
||||
else
|
||||
{ /*BSIM3V32 || BSIM3V322 || BSIM3V323 */
|
||||
if (vgs >= here->BSIM3von + 0.1)
|
||||
{
|
||||
Ssi =
|
||||
StrongInversionNoiseEvalOld (vgs, vds, model,
|
||||
here, data->freq,
|
||||
ckt->CKTtemp);
|
||||
noizDens[BSIM3FLNOIZ] *= Ssi;
|
||||
}
|
||||
else
|
||||
{
|
||||
pParam = here->pParam;
|
||||
T10 = model->
|
||||
BSIM3oxideTrapDensityA
|
||||
* 8.62e-5 * ckt->CKTtemp;
|
||||
T11 = pParam->BSIM3weff *
|
||||
here->BSIM3m * pParam-> BSIM3leff *
|
||||
pow (data->freq, model->BSIM3ef) * 4.0e36;
|
||||
Swi = T10 / T11 * (here->BSIM3cd * here->BSIM3m) * (here->BSIM3cd * here->BSIM3m);
|
||||
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{ here->BSIM3nVar[LNLSTDENS][i] =
|
||||
lnNdens[i];
|
||||
}
|
||||
|
||||
/* clear out our integration variables
|
||||
if it's the first pass
|
||||
*/
|
||||
if (data->freq ==
|
||||
((NOISEAN*) ckt->CKTcurJob)->NstartFreq)
|
||||
{ for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{ here->BSIM3nVar[OUTNOIZ][i] = 0.0;
|
||||
here->BSIM3nVar[INNOIZ][i] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Slimit =
|
||||
StrongInversionNoiseEvalOld (here->BSIM3von +
|
||||
0.1, vds, model,
|
||||
here, data->freq,
|
||||
ckt->CKTtemp);
|
||||
T1 = Swi + Slimit;
|
||||
if (T1 > 0.0)
|
||||
noizDens[BSIM3FLNOIZ] *= (Slimit * Swi) / T1;
|
||||
else
|
||||
{ /* data->delFreq != 0.0,
|
||||
we have to integrate.
|
||||
*/
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{ if (i != BSIM3TOTNOIZ)
|
||||
{ tempOnoise = Nintegrate(noizDens[i],
|
||||
lnNdens[i],
|
||||
here->BSIM3nVar[LNLSTDENS][i],
|
||||
data);
|
||||
tempInoise = Nintegrate(noizDens[i]
|
||||
* data->GainSqInv, lnNdens[i]
|
||||
+ data->lnGainInv,
|
||||
here->BSIM3nVar[LNLSTDENS][i]
|
||||
+ data->lnGainInv, data);
|
||||
here->BSIM3nVar[LNLSTDENS][i] =
|
||||
lnNdens[i];
|
||||
data->outNoiz += tempOnoise;
|
||||
data->inNoise += tempInoise;
|
||||
if (((NOISEAN*)
|
||||
ckt->CKTcurJob)->NStpsSm != 0)
|
||||
{ here->BSIM3nVar[OUTNOIZ][i]
|
||||
+= tempOnoise;
|
||||
here->BSIM3nVar[OUTNOIZ][BSIM3TOTNOIZ]
|
||||
+= tempOnoise;
|
||||
here->BSIM3nVar[INNOIZ][i]
|
||||
+= tempInoise;
|
||||
here->BSIM3nVar[INNOIZ][BSIM3TOTNOIZ]
|
||||
+= tempInoise;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data->prtSummary)
|
||||
{ for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{ /* print a summary report */
|
||||
data->outpVector[data->outNumber++]
|
||||
= noizDens[i];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case INT_NOIZ:
|
||||
/* already calculated, just output */
|
||||
if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0)
|
||||
{ for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{ data->outpVector[data->outNumber++]
|
||||
= here->BSIM3nVar[OUTNOIZ][i];
|
||||
data->outpVector[data->outNumber++]
|
||||
= here->BSIM3nVar[INNOIZ][i];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
noizDens[BSIM3FLNOIZ] *= 0.0;
|
||||
}
|
||||
}
|
||||
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);
|
||||
|
||||
lnNdens[BSIM3FLNOIZ] =
|
||||
log (MAX (noizDens[BSIM3FLNOIZ], N_MINLOG));
|
||||
|
||||
noizDens[BSIM3TOTNOIZ] =
|
||||
noizDens[BSIM3RDNOIZ] +
|
||||
noizDens[BSIM3RSNOIZ] +
|
||||
noizDens[BSIM3IDNOIZ] + noizDens[BSIM3FLNOIZ];
|
||||
|
||||
|
||||
lnNdens[BSIM3TOTNOIZ] =
|
||||
log (MAX (noizDens[BSIM3TOTNOIZ], N_MINLOG));
|
||||
|
||||
*OnDens += noizDens[BSIM3TOTNOIZ];
|
||||
|
||||
if (data->delFreq == 0.0)
|
||||
{ /* if we haven't done any previous
|
||||
* integration, we need to initialize our
|
||||
* "history" variables.
|
||||
*/
|
||||
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{
|
||||
here->BSIM3nVar[LNLSTDENS][i] = lnNdens[i];
|
||||
}
|
||||
|
||||
/* clear out our integration variables
|
||||
* if it's the first pass
|
||||
*/
|
||||
if (data->freq ==
|
||||
((NOISEAN *) ckt->CKTcurJob)->NstartFreq)
|
||||
{
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{
|
||||
here->BSIM3nVar[OUTNOIZ][i] = 0.0;
|
||||
here->BSIM3nVar[INNOIZ][i] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ /* data->delFreq != 0.0,
|
||||
* we have to integrate.
|
||||
*/
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{
|
||||
if (i != BSIM3TOTNOIZ)
|
||||
{
|
||||
tempOnoise =
|
||||
Nintegrate
|
||||
(noizDens
|
||||
[i],
|
||||
lnNdens
|
||||
[i], here->BSIM3nVar[LNLSTDENS][i], data);
|
||||
tempInoise =
|
||||
Nintegrate
|
||||
(noizDens
|
||||
[i] *
|
||||
data->
|
||||
GainSqInv,
|
||||
lnNdens
|
||||
[i] +
|
||||
data->
|
||||
lnGainInv,
|
||||
here->
|
||||
BSIM3nVar
|
||||
[LNLSTDENS][i] + data->lnGainInv, data);
|
||||
here->BSIM3nVar[LNLSTDENS][i] = lnNdens[i];
|
||||
data->outNoiz += tempOnoise;
|
||||
data->inNoise += tempInoise;
|
||||
if (((NOISEAN *) ckt->CKTcurJob)->NStpsSm != 0)
|
||||
{
|
||||
here->BSIM3nVar[OUTNOIZ][i] += tempOnoise;
|
||||
here->BSIM3nVar[OUTNOIZ][BSIM3TOTNOIZ] +=
|
||||
tempOnoise;
|
||||
here->BSIM3nVar[INNOIZ][i] += tempInoise;
|
||||
here->BSIM3nVar[INNOIZ][BSIM3TOTNOIZ] +=
|
||||
tempInoise;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data->prtSummary)
|
||||
{
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{ /* print a summary report */
|
||||
data->outpVector[data->outNumber++] = noizDens[i];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case INT_NOIZ:
|
||||
/* already calculated, just output */
|
||||
if (((NOISEAN *) ckt->CKTcurJob)->NStpsSm != 0)
|
||||
{
|
||||
for (i = 0; i < BSIM3NSRCS; i++)
|
||||
{
|
||||
data->outpVector
|
||||
[data->outNumber++] = here->BSIM3nVar[OUTNOIZ][i];
|
||||
data->outpVector
|
||||
[data->outNumber++] = here->BSIM3nVar[INNOIZ][i];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case N_CLOSE:
|
||||
/* do nothing, the main calling routine will close */
|
||||
return (OK);
|
||||
break; /* the plots */
|
||||
} /* switch (operation) */
|
||||
} /* for here */
|
||||
} /* for model */
|
||||
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,103 +1,109 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
Modified: 2000 AlansFixes
|
||||
File: b3par.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3par.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ifsim.h"
|
||||
#include "bsim3def.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3param(param,value,inst,select)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENinstance *inst;
|
||||
IFvalue *select;
|
||||
BSIM3param (int param, IFvalue * value, GENinstance * inst, IFvalue * select)
|
||||
{
|
||||
BSIM3instance *here = (BSIM3instance*)inst;
|
||||
switch(param)
|
||||
{ case BSIM3_W:
|
||||
here->BSIM3w = value->rValue;
|
||||
here->BSIM3wGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_L:
|
||||
here->BSIM3l = value->rValue;
|
||||
here->BSIM3lGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_M:
|
||||
here->BSIM3m = value->rValue;
|
||||
here->BSIM3mGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_AS:
|
||||
here->BSIM3sourceArea = value->rValue;
|
||||
here->BSIM3sourceAreaGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_AD:
|
||||
here->BSIM3drainArea = value->rValue;
|
||||
here->BSIM3drainAreaGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_PS:
|
||||
here->BSIM3sourcePerimeter = value->rValue;
|
||||
here->BSIM3sourcePerimeterGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_PD:
|
||||
here->BSIM3drainPerimeter = value->rValue;
|
||||
here->BSIM3drainPerimeterGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_NRS:
|
||||
here->BSIM3sourceSquares = value->rValue;
|
||||
here->BSIM3sourceSquaresGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_NRD:
|
||||
here->BSIM3drainSquares = value->rValue;
|
||||
here->BSIM3drainSquaresGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_OFF:
|
||||
here->BSIM3off = value->iValue;
|
||||
break;
|
||||
case BSIM3_IC_VBS:
|
||||
here->BSIM3icVBS = value->rValue;
|
||||
here->BSIM3icVBSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_IC_VDS:
|
||||
here->BSIM3icVDS = value->rValue;
|
||||
here->BSIM3icVDSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_IC_VGS:
|
||||
here->BSIM3icVGS = value->rValue;
|
||||
here->BSIM3icVGSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_NQSMOD:
|
||||
here->BSIM3nqsMod = value->iValue;
|
||||
here->BSIM3nqsModGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_IC:
|
||||
switch(value->v.numValue){
|
||||
case 3:
|
||||
here->BSIM3icVBS = *(value->v.vec.rVec+2);
|
||||
here->BSIM3icVBSGiven = TRUE;
|
||||
case 2:
|
||||
here->BSIM3icVGS = *(value->v.vec.rVec+1);
|
||||
here->BSIM3icVGSGiven = TRUE;
|
||||
case 1:
|
||||
here->BSIM3icVDS = *(value->v.vec.rVec);
|
||||
here->BSIM3icVDSGiven = TRUE;
|
||||
break;
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
return(OK);
|
||||
BSIM3instance *here = (BSIM3instance *) inst;
|
||||
switch (param)
|
||||
{
|
||||
case BSIM3_W:
|
||||
here->BSIM3w = value->rValue;
|
||||
here->BSIM3wGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_L:
|
||||
here->BSIM3l = value->rValue;
|
||||
here->BSIM3lGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_M:
|
||||
here->BSIM3m = value->rValue;
|
||||
here->BSIM3mGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_AS:
|
||||
here->BSIM3sourceArea = value->rValue;
|
||||
here->BSIM3sourceAreaGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_AD:
|
||||
here->BSIM3drainArea = value->rValue;
|
||||
here->BSIM3drainAreaGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_PS:
|
||||
here->BSIM3sourcePerimeter = value->rValue;
|
||||
here->BSIM3sourcePerimeterGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_PD:
|
||||
here->BSIM3drainPerimeter = value->rValue;
|
||||
here->BSIM3drainPerimeterGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_NRS:
|
||||
here->BSIM3sourceSquares = value->rValue;
|
||||
here->BSIM3sourceSquaresGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_NRD:
|
||||
here->BSIM3drainSquares = value->rValue;
|
||||
here->BSIM3drainSquaresGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_OFF:
|
||||
here->BSIM3off = value->iValue;
|
||||
break;
|
||||
case BSIM3_IC_VBS:
|
||||
here->BSIM3icVBS = value->rValue;
|
||||
here->BSIM3icVBSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_IC_VDS:
|
||||
here->BSIM3icVDS = value->rValue;
|
||||
here->BSIM3icVDSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_IC_VGS:
|
||||
here->BSIM3icVGS = value->rValue;
|
||||
here->BSIM3icVGSGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_NQSMOD:
|
||||
here->BSIM3nqsMod = value->iValue;
|
||||
here->BSIM3nqsModGiven = TRUE;
|
||||
break;
|
||||
case BSIM3_IC:
|
||||
switch (value->v.numValue)
|
||||
{
|
||||
case 3:
|
||||
here->BSIM3icVBS = *(value->v.vec.rVec + 2);
|
||||
here->BSIM3icVBSGiven = TRUE;
|
||||
case 2:
|
||||
here->BSIM3icVGS = *(value->v.vec.rVec + 1);
|
||||
here->BSIM3icVGSGiven = TRUE;
|
||||
case 1:
|
||||
here->BSIM3icVDS = *(value->v.vec.rVec);
|
||||
here->BSIM3icVDSGiven = TRUE;
|
||||
break;
|
||||
default:
|
||||
return (E_BADPARM);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return (E_BADPARM);
|
||||
}
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,24 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3pzld.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3pzld.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "complex.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,354 +26,453 @@ File: b3pzld.c
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
BSIM3pzLoad(inModel,ckt,s)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
SPcomplex *s;
|
||||
BSIM3pzLoad (GENmodel * inModel, CKTcircuit * ckt, SPcomplex * s)
|
||||
{
|
||||
BSIM3model *model = (BSIM3model*)inModel;
|
||||
BSIM3instance *here;
|
||||
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb;
|
||||
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb;
|
||||
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm, Gmbs;
|
||||
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb;
|
||||
double GSoverlapCap, GDoverlapCap, GBoverlapCap;
|
||||
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb, xcqbb;
|
||||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
|
||||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
|
||||
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
|
||||
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
|
||||
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css;
|
||||
double ScalingFactor = 1.0e-9;
|
||||
BSIM3model *model = (BSIM3model *) inModel;
|
||||
BSIM3instance *here;
|
||||
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb;
|
||||
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb;
|
||||
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm,
|
||||
Gmbs;
|
||||
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb;
|
||||
double GSoverlapCap, GDoverlapCap, GBoverlapCap;
|
||||
double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb, xcqdb, xcqsb,
|
||||
xcqbb;
|
||||
double gbspsp, gbbdp, gbbsp, gbspg, gbspb;
|
||||
double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp;
|
||||
double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs;
|
||||
double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs;
|
||||
double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Cdb, Csg, Csd, Css, Csb;
|
||||
double ScalingFactor = 1.0e-9;
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here!= NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3owner != ARCHme) continue;
|
||||
if (here->BSIM3mode >= 0)
|
||||
{ Gm = here->BSIM3gm;
|
||||
Gmbs = here->BSIM3gmbs;
|
||||
FwdSum = Gm + Gmbs;
|
||||
RevSum = 0.0;
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{
|
||||
for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3owner != ARCHme)
|
||||
continue;
|
||||
if (here->BSIM3mode >= 0)
|
||||
{
|
||||
Gm = here->BSIM3gm;
|
||||
Gmbs = here->BSIM3gmbs;
|
||||
FwdSum = Gm + Gmbs;
|
||||
RevSum = 0.0;
|
||||
|
||||
gbbdp = -here->BSIM3gbds;
|
||||
gbbsp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs;
|
||||
gbbdp = -here->BSIM3gbds;
|
||||
gbbsp = here->BSIM3gbds + here->BSIM3gbgs +
|
||||
here->BSIM3gbbs;
|
||||
|
||||
gbdpg = here->BSIM3gbgs;
|
||||
gbdpdp = here->BSIM3gbds;
|
||||
gbdpb = here->BSIM3gbbs;
|
||||
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
|
||||
gbdpg = here->BSIM3gbgs;
|
||||
gbdpdp = here->BSIM3gbds;
|
||||
gbdpb = here->BSIM3gbbs;
|
||||
gbdpsp = -(gbdpg + gbdpdp + gbdpb);
|
||||
|
||||
gbspg = 0.0;
|
||||
gbspdp = 0.0;
|
||||
gbspb = 0.0;
|
||||
gbspsp = 0.0;
|
||||
gbspg = 0.0;
|
||||
gbspdp = 0.0;
|
||||
gbspb = 0.0;
|
||||
gbspsp = 0.0;
|
||||
|
||||
if (here->BSIM3nqsMod == 0)
|
||||
{ cggb = here->BSIM3cggb;
|
||||
cgsb = here->BSIM3cgsb;
|
||||
cgdb = here->BSIM3cgdb;
|
||||
if (here->BSIM3nqsMod == 0)
|
||||
{
|
||||
cggb = here->BSIM3cggb;
|
||||
cgsb = here->BSIM3cgsb;
|
||||
cgdb = here->BSIM3cgdb;
|
||||
|
||||
cbgb = here->BSIM3cbgb;
|
||||
cbsb = here->BSIM3cbsb;
|
||||
cbdb = here->BSIM3cbdb;
|
||||
cbgb = here->BSIM3cbgb;
|
||||
cbsb = here->BSIM3cbsb;
|
||||
cbdb = here->BSIM3cbdb;
|
||||
|
||||
cdgb = here->BSIM3cdgb;
|
||||
cdsb = here->BSIM3cdsb;
|
||||
cddb = here->BSIM3cddb;
|
||||
cdgb = here->BSIM3cdgb;
|
||||
cdsb = here->BSIM3cdsb;
|
||||
cddb = here->BSIM3cddb;
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.6;
|
||||
dxpart = 0.4;
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.6;
|
||||
dxpart = 0.4;
|
||||
ddxpart_dVd = ddxpart_dVg =
|
||||
ddxpart_dVb = ddxpart_dVs =
|
||||
0.0;
|
||||
dsxpart_dVd = dsxpart_dVg =
|
||||
dsxpart_dVb = dsxpart_dVs =
|
||||
0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3gtg;
|
||||
xgtd = here->BSIM3gtd;
|
||||
xgts = here->BSIM3gts;
|
||||
xgtb = here->BSIM3gtb;
|
||||
xgtg = here->BSIM3gtg;
|
||||
xgtd = here->BSIM3gtd;
|
||||
xgts = here->BSIM3gts;
|
||||
xgtb = here->BSIM3gtb;
|
||||
|
||||
xcqgb = here->BSIM3cqgb;
|
||||
xcqdb = here->BSIM3cqdb;
|
||||
xcqsb = here->BSIM3cqsb;
|
||||
xcqbb = here->BSIM3cqbb;
|
||||
xcqgb = here->BSIM3cqgb;
|
||||
xcqdb = here->BSIM3cqdb;
|
||||
xcqsb = here->BSIM3cqsb;
|
||||
xcqbb = here->BSIM3cqbb;
|
||||
|
||||
CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV
|
||||
* here->pParam->BSIM3leffCV;
|
||||
qcheq = -(here->BSIM3qgate + here->BSIM3qbulk);
|
||||
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
|
||||
{ if (model->BSIM3xpart < 0.5)
|
||||
{ dxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3xpart > 0.5)
|
||||
{ dxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{ dxpart = 0.5;
|
||||
}
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ dxpart = here->BSIM3qdrn / qcheq;
|
||||
Cdd = here->BSIM3cddb;
|
||||
Csd = -(here->BSIM3cgdb + here->BSIM3cddb
|
||||
+ here->BSIM3cbdb);
|
||||
ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq;
|
||||
Cdg = here->BSIM3cdgb;
|
||||
Csg = -(here->BSIM3cggb + here->BSIM3cdgb
|
||||
+ here->BSIM3cbgb);
|
||||
ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq;
|
||||
CoxWL = model->BSIM3cox *
|
||||
here->pParam->BSIM3weffCV *
|
||||
here->pParam->BSIM3leffCV;
|
||||
qcheq = -(here->BSIM3qgate +
|
||||
here->BSIM3qbulk);
|
||||
if (fabs (qcheq) <= 1.0e-5 * CoxWL)
|
||||
{
|
||||
if (model->BSIM3xpart < 0.5)
|
||||
{
|
||||
dxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3xpart >
|
||||
0.5)
|
||||
{
|
||||
dxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dxpart = 0.5;
|
||||
}
|
||||
ddxpart_dVd = ddxpart_dVg =
|
||||
ddxpart_dVb =
|
||||
ddxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dxpart = here->BSIM3qdrn /
|
||||
qcheq;
|
||||
Cdd = here->BSIM3cddb;
|
||||
Csd = -(here->BSIM3cgdb +
|
||||
here->BSIM3cddb +
|
||||
here->BSIM3cbdb);
|
||||
ddxpart_dVd =
|
||||
(Cdd -
|
||||
dxpart * (Cdd +
|
||||
Csd)) /
|
||||
qcheq;
|
||||
Cdg = here->BSIM3cdgb;
|
||||
Csg = -(here->BSIM3cggb +
|
||||
here->BSIM3cdgb +
|
||||
here->BSIM3cbgb);
|
||||
ddxpart_dVg =
|
||||
(Cdg -
|
||||
dxpart * (Cdg +
|
||||
Csg)) /
|
||||
qcheq;
|
||||
|
||||
Cds = here->BSIM3cdsb;
|
||||
Css = -(here->BSIM3cgsb + here->BSIM3cdsb
|
||||
+ here->BSIM3cbsb);
|
||||
ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq;
|
||||
Cds = here->BSIM3cdsb;
|
||||
Css = -(here->BSIM3cgsb +
|
||||
here->BSIM3cdsb +
|
||||
here->BSIM3cbsb);
|
||||
ddxpart_dVs =
|
||||
(Cds -
|
||||
dxpart * (Cds +
|
||||
Css)) /
|
||||
qcheq;
|
||||
|
||||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg
|
||||
+ ddxpart_dVs);
|
||||
}
|
||||
sxpart = 1.0 - dxpart;
|
||||
dsxpart_dVd = -ddxpart_dVd;
|
||||
dsxpart_dVg = -ddxpart_dVg;
|
||||
dsxpart_dVs = -ddxpart_dVs;
|
||||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{ Gm = -here->BSIM3gm;
|
||||
Gmbs = -here->BSIM3gmbs;
|
||||
FwdSum = 0.0;
|
||||
RevSum = -(Gm + Gmbs);
|
||||
ddxpart_dVb =
|
||||
-(ddxpart_dVd +
|
||||
ddxpart_dVg +
|
||||
ddxpart_dVs);
|
||||
}
|
||||
sxpart = 1.0 - dxpart;
|
||||
dsxpart_dVd = -ddxpart_dVd;
|
||||
dsxpart_dVg = -ddxpart_dVg;
|
||||
dsxpart_dVs = -ddxpart_dVs;
|
||||
dsxpart_dVb =
|
||||
-(dsxpart_dVd + dsxpart_dVg +
|
||||
dsxpart_dVs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Gm = -here->BSIM3gm;
|
||||
Gmbs = -here->BSIM3gmbs;
|
||||
FwdSum = 0.0;
|
||||
RevSum = -(Gm + Gmbs);
|
||||
|
||||
gbbsp = -here->BSIM3gbds;
|
||||
gbbdp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs;
|
||||
gbbsp = -here->BSIM3gbds;
|
||||
gbbdp = here->BSIM3gbds + here->BSIM3gbgs +
|
||||
here->BSIM3gbbs;
|
||||
|
||||
gbdpg = 0.0;
|
||||
gbdpsp = 0.0;
|
||||
gbdpb = 0.0;
|
||||
gbdpdp = 0.0;
|
||||
gbdpg = 0.0;
|
||||
gbdpsp = 0.0;
|
||||
gbdpb = 0.0;
|
||||
gbdpdp = 0.0;
|
||||
|
||||
gbspg = here->BSIM3gbgs;
|
||||
gbspsp = here->BSIM3gbds;
|
||||
gbspb = here->BSIM3gbbs;
|
||||
gbspdp = -(gbspg + gbspsp + gbspb);
|
||||
gbspg = here->BSIM3gbgs;
|
||||
gbspsp = here->BSIM3gbds;
|
||||
gbspb = here->BSIM3gbbs;
|
||||
gbspdp = -(gbspg + gbspsp + gbspb);
|
||||
|
||||
if (here->BSIM3nqsMod == 0)
|
||||
{ cggb = here->BSIM3cggb;
|
||||
cgsb = here->BSIM3cgdb;
|
||||
cgdb = here->BSIM3cgsb;
|
||||
if (here->BSIM3nqsMod == 0)
|
||||
{
|
||||
cggb = here->BSIM3cggb;
|
||||
cgsb = here->BSIM3cgdb;
|
||||
cgdb = here->BSIM3cgsb;
|
||||
|
||||
cbgb = here->BSIM3cbgb;
|
||||
cbsb = here->BSIM3cbdb;
|
||||
cbdb = here->BSIM3cbsb;
|
||||
cbgb = here->BSIM3cbgb;
|
||||
cbsb = here->BSIM3cbdb;
|
||||
cbdb = here->BSIM3cbsb;
|
||||
|
||||
cdgb = -(here->BSIM3cdgb + cggb + cbgb);
|
||||
cdsb = -(here->BSIM3cddb + cgsb + cbsb);
|
||||
cddb = -(here->BSIM3cdsb + cgdb + cbdb);
|
||||
cdgb = -(here->BSIM3cdgb + cggb +
|
||||
cbgb);
|
||||
cdsb = -(here->BSIM3cddb + cgsb +
|
||||
cbsb);
|
||||
cddb = -(here->BSIM3cdsb + cgdb +
|
||||
cbdb);
|
||||
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.4;
|
||||
dxpart = 0.6;
|
||||
ddxpart_dVd = ddxpart_dVg = ddxpart_dVb
|
||||
= ddxpart_dVs = 0.0;
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
xgtg = xgtd = xgts = xgtb = 0.0;
|
||||
sxpart = 0.4;
|
||||
dxpart = 0.6;
|
||||
ddxpart_dVd = ddxpart_dVg =
|
||||
ddxpart_dVb = ddxpart_dVs =
|
||||
0.0;
|
||||
dsxpart_dVd = dsxpart_dVg =
|
||||
dsxpart_dVb = dsxpart_dVs =
|
||||
0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
cggb = cgdb = cgsb = 0.0;
|
||||
cbgb = cbdb = cbsb = 0.0;
|
||||
cdgb = cddb = cdsb = 0.0;
|
||||
|
||||
xgtg = here->BSIM3gtg;
|
||||
xgtd = here->BSIM3gts;
|
||||
xgts = here->BSIM3gtd;
|
||||
xgtb = here->BSIM3gtb;
|
||||
xgtg = here->BSIM3gtg;
|
||||
xgtd = here->BSIM3gts;
|
||||
xgts = here->BSIM3gtd;
|
||||
xgtb = here->BSIM3gtb;
|
||||
|
||||
xcqgb = here->BSIM3cqgb;
|
||||
xcqdb = here->BSIM3cqsb;
|
||||
xcqsb = here->BSIM3cqdb;
|
||||
xcqbb = here->BSIM3cqbb;
|
||||
xcqgb = here->BSIM3cqgb;
|
||||
xcqdb = here->BSIM3cqsb;
|
||||
xcqsb = here->BSIM3cqdb;
|
||||
xcqbb = here->BSIM3cqbb;
|
||||
|
||||
CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV
|
||||
* here->pParam->BSIM3leffCV;
|
||||
qcheq = -(here->BSIM3qgate + here->BSIM3qbulk);
|
||||
if (fabs(qcheq) <= 1.0e-5 * CoxWL)
|
||||
{ if (model->BSIM3xpart < 0.5)
|
||||
{ sxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3xpart > 0.5)
|
||||
{ sxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{ sxpart = 0.5;
|
||||
}
|
||||
dsxpart_dVd = dsxpart_dVg = dsxpart_dVb
|
||||
= dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{ sxpart = here->BSIM3qdrn / qcheq;
|
||||
Css = here->BSIM3cddb;
|
||||
Cds = -(here->BSIM3cgdb + here->BSIM3cddb
|
||||
+ here->BSIM3cbdb);
|
||||
dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq;
|
||||
Csg = here->BSIM3cdgb;
|
||||
Cdg = -(here->BSIM3cggb + here->BSIM3cdgb
|
||||
+ here->BSIM3cbgb);
|
||||
dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq;
|
||||
CoxWL = model->BSIM3cox *
|
||||
here->pParam->BSIM3weffCV *
|
||||
here->pParam->BSIM3leffCV;
|
||||
qcheq = -(here->BSIM3qgate +
|
||||
here->BSIM3qbulk);
|
||||
if (fabs (qcheq) <= 1.0e-5 * CoxWL)
|
||||
{
|
||||
if (model->BSIM3xpart < 0.5)
|
||||
{
|
||||
sxpart = 0.4;
|
||||
}
|
||||
else if (model->BSIM3xpart >
|
||||
0.5)
|
||||
{
|
||||
sxpart = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sxpart = 0.5;
|
||||
}
|
||||
dsxpart_dVd = dsxpart_dVg =
|
||||
dsxpart_dVb =
|
||||
dsxpart_dVs = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sxpart = here->BSIM3qdrn /
|
||||
qcheq;
|
||||
Css = here->BSIM3cddb;
|
||||
Cds = -(here->BSIM3cgdb +
|
||||
here->BSIM3cddb +
|
||||
here->BSIM3cbdb);
|
||||
dsxpart_dVs =
|
||||
(Css -
|
||||
sxpart * (Css +
|
||||
Cds)) /
|
||||
qcheq;
|
||||
Csg = here->BSIM3cdgb;
|
||||
Cdg = -(here->BSIM3cggb +
|
||||
here->BSIM3cdgb +
|
||||
here->BSIM3cbgb);
|
||||
dsxpart_dVg =
|
||||
(Csg -
|
||||
sxpart * (Csg +
|
||||
Cdg)) /
|
||||
qcheq;
|
||||
|
||||
Csd = here->BSIM3cdsb;
|
||||
Cdd = -(here->BSIM3cgsb + here->BSIM3cdsb
|
||||
+ here->BSIM3cbsb);
|
||||
dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq;
|
||||
Csd = here->BSIM3cdsb;
|
||||
Cdd = -(here->BSIM3cgsb +
|
||||
here->BSIM3cdsb +
|
||||
here->BSIM3cbsb);
|
||||
dsxpart_dVd =
|
||||
(Csd -
|
||||
sxpart * (Csd +
|
||||
Cdd)) /
|
||||
qcheq;
|
||||
|
||||
dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg
|
||||
+ dsxpart_dVs);
|
||||
}
|
||||
dxpart = 1.0 - sxpart;
|
||||
ddxpart_dVd = -dsxpart_dVd;
|
||||
ddxpart_dVg = -dsxpart_dVg;
|
||||
ddxpart_dVs = -dsxpart_dVs;
|
||||
ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs);
|
||||
}
|
||||
}
|
||||
dsxpart_dVb =
|
||||
-(dsxpart_dVd +
|
||||
dsxpart_dVg +
|
||||
dsxpart_dVs);
|
||||
}
|
||||
dxpart = 1.0 - sxpart;
|
||||
ddxpart_dVd = -dsxpart_dVd;
|
||||
ddxpart_dVg = -dsxpart_dVg;
|
||||
ddxpart_dVs = -dsxpart_dVs;
|
||||
ddxpart_dVb =
|
||||
-(ddxpart_dVd + ddxpart_dVg +
|
||||
ddxpart_dVs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
T1 = *(ckt->CKTstate0 + here->BSIM3qdef) * here->BSIM3gtau;
|
||||
gdpr = here->BSIM3drainConductance;
|
||||
gspr = here->BSIM3sourceConductance;
|
||||
gds = here->BSIM3gds;
|
||||
gbd = here->BSIM3gbd;
|
||||
gbs = here->BSIM3gbs;
|
||||
capbd = here->BSIM3capbd;
|
||||
capbs = here->BSIM3capbs;
|
||||
T1 = *(ckt->CKTstate0 +
|
||||
here->BSIM3qdef) * here->BSIM3gtau;
|
||||
gdpr = here->BSIM3drainConductance;
|
||||
gspr = here->BSIM3sourceConductance;
|
||||
gds = here->BSIM3gds;
|
||||
gbd = here->BSIM3gbd;
|
||||
gbs = here->BSIM3gbs;
|
||||
capbd = here->BSIM3capbd;
|
||||
capbs = here->BSIM3capbs;
|
||||
|
||||
GSoverlapCap = here->BSIM3cgso;
|
||||
GDoverlapCap = here->BSIM3cgdo;
|
||||
GBoverlapCap = here->pParam->BSIM3cgbo;
|
||||
GSoverlapCap = here->BSIM3cgso;
|
||||
GDoverlapCap = here->BSIM3cgdo;
|
||||
GBoverlapCap = here->pParam->BSIM3cgbo;
|
||||
|
||||
xcdgb = (cdgb - GDoverlapCap);
|
||||
xcddb = (cddb + capbd + GDoverlapCap);
|
||||
xcdsb = cdsb;
|
||||
xcdbb = -(xcdgb + xcddb + xcdsb);
|
||||
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap);
|
||||
xcsdb = -(cgdb + cbdb + cddb);
|
||||
xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb));
|
||||
xcsbb = -(xcsgb + xcsdb + xcssb);
|
||||
xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap);
|
||||
xcgdb = (cgdb - GDoverlapCap);
|
||||
xcgsb = (cgsb - GSoverlapCap);
|
||||
xcgbb = -(xcggb + xcgdb + xcgsb);
|
||||
xcbgb = (cbgb - GBoverlapCap);
|
||||
xcbdb = (cbdb - capbd);
|
||||
xcbsb = (cbsb - capbs);
|
||||
xcbbb = -(xcbgb + xcbdb + xcbsb);
|
||||
xcdgb = (cdgb - GDoverlapCap);
|
||||
xcddb = (cddb + capbd + GDoverlapCap);
|
||||
xcdsb = cdsb;
|
||||
xcdbb = -(xcdgb + xcddb + xcdsb);
|
||||
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap);
|
||||
xcsdb = -(cgdb + cbdb + cddb);
|
||||
xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb));
|
||||
xcsbb = -(xcsgb + xcsdb + xcssb);
|
||||
xcggb = (cggb + GDoverlapCap + GSoverlapCap +
|
||||
GBoverlapCap);
|
||||
xcgdb = (cgdb - GDoverlapCap);
|
||||
xcgsb = (cgsb - GSoverlapCap);
|
||||
xcgbb = -(xcggb + xcgdb + xcgsb);
|
||||
xcbgb = (cbgb - GBoverlapCap);
|
||||
xcbdb = (cbdb - capbd);
|
||||
xcbsb = (cbsb - capbs);
|
||||
xcbbb = -(xcbgb + xcbdb + xcbsb);
|
||||
|
||||
*(here->BSIM3GgPtr ) += xcggb * s->real;
|
||||
*(here->BSIM3GgPtr +1) += xcggb * s->imag;
|
||||
*(here->BSIM3BbPtr ) += xcbbb * s->real;
|
||||
*(here->BSIM3BbPtr +1) += xcbbb * s->imag;
|
||||
*(here->BSIM3DPdpPtr ) += xcddb * s->real;
|
||||
*(here->BSIM3DPdpPtr +1) += xcddb * s->imag;
|
||||
*(here->BSIM3SPspPtr ) += xcssb * s->real;
|
||||
*(here->BSIM3SPspPtr +1) += xcssb * s->imag;
|
||||
|
||||
*(here->BSIM3GbPtr ) += xcgbb * s->real;
|
||||
*(here->BSIM3GbPtr +1) += xcgbb * s->imag;
|
||||
*(here->BSIM3GdpPtr ) += xcgdb * s->real;
|
||||
*(here->BSIM3GdpPtr +1) += xcgdb * s->imag;
|
||||
*(here->BSIM3GspPtr ) += xcgsb * s->real;
|
||||
*(here->BSIM3GspPtr +1) += xcgsb * s->imag;
|
||||
m = here->BSIM3m;
|
||||
|
||||
*(here->BSIM3BgPtr ) += xcbgb * s->real;
|
||||
*(here->BSIM3BgPtr +1) += xcbgb * s->imag;
|
||||
*(here->BSIM3BdpPtr ) += xcbdb * s->real;
|
||||
*(here->BSIM3BdpPtr +1) += xcbdb * s->imag;
|
||||
*(here->BSIM3BspPtr ) += xcbsb * s->real;
|
||||
*(here->BSIM3BspPtr +1) += xcbsb * s->imag;
|
||||
*(here->BSIM3GgPtr) += m * (xcggb * s->real);
|
||||
*(here->BSIM3GgPtr + 1) += m * (xcggb * s->imag);
|
||||
*(here->BSIM3BbPtr) += m * (xcbbb * s->real);
|
||||
*(here->BSIM3BbPtr + 1) += m * (xcbbb * s->imag);
|
||||
*(here->BSIM3DPdpPtr) += m * (xcddb * s->real);
|
||||
*(here->BSIM3DPdpPtr + 1) += m * (xcddb * s->imag);
|
||||
*(here->BSIM3SPspPtr) += m * (xcssb * s->real);
|
||||
*(here->BSIM3SPspPtr + 1) += m * (xcssb * s->imag);
|
||||
|
||||
*(here->BSIM3DPgPtr ) += xcdgb * s->real;
|
||||
*(here->BSIM3DPgPtr +1) += xcdgb * s->imag;
|
||||
*(here->BSIM3DPbPtr ) += xcdbb * s->real;
|
||||
*(here->BSIM3DPbPtr +1) += xcdbb * s->imag;
|
||||
*(here->BSIM3DPspPtr ) += xcdsb * s->real;
|
||||
*(here->BSIM3DPspPtr +1) += xcdsb * s->imag;
|
||||
*(here->BSIM3GbPtr) += m * (xcgbb * s->real);
|
||||
*(here->BSIM3GbPtr + 1) += m * (xcgbb * s->imag);
|
||||
*(here->BSIM3GdpPtr) += m * (xcgdb * s->real);
|
||||
*(here->BSIM3GdpPtr + 1) += m * (xcgdb * s->imag);
|
||||
*(here->BSIM3GspPtr) += m * (xcgsb * s->real);
|
||||
*(here->BSIM3GspPtr + 1) += m * (xcgsb * s->imag);
|
||||
|
||||
*(here->BSIM3SPgPtr ) += xcsgb * s->real;
|
||||
*(here->BSIM3SPgPtr +1) += xcsgb * s->imag;
|
||||
*(here->BSIM3SPbPtr ) += xcsbb * s->real;
|
||||
*(here->BSIM3SPbPtr +1) += xcsbb * s->imag;
|
||||
*(here->BSIM3SPdpPtr ) += xcsdb * s->real;
|
||||
*(here->BSIM3SPdpPtr +1) += xcsdb * s->imag;
|
||||
*(here->BSIM3BgPtr) += m * (xcbgb * s->real);
|
||||
*(here->BSIM3BgPtr + 1) += m * (xcbgb * s->imag);
|
||||
*(here->BSIM3BdpPtr) += m * (xcbdb * s->real);
|
||||
*(here->BSIM3BdpPtr + 1) += m * (xcbdb * s->imag);
|
||||
*(here->BSIM3BspPtr) += m * (xcbsb * s->real);
|
||||
*(here->BSIM3BspPtr + 1) += m * (xcbsb * s->imag);
|
||||
|
||||
*(here->BSIM3DdPtr) += gdpr;
|
||||
*(here->BSIM3DdpPtr) -= gdpr;
|
||||
*(here->BSIM3DPdPtr) -= gdpr;
|
||||
*(here->BSIM3DPgPtr) += m * (xcdgb * s->real);
|
||||
*(here->BSIM3DPgPtr + 1) += m * (xcdgb * s->imag);
|
||||
*(here->BSIM3DPbPtr) += m * (xcdbb * s->real);
|
||||
*(here->BSIM3DPbPtr + 1) += m * (xcdbb * s->imag);
|
||||
*(here->BSIM3DPspPtr) += m * (xcdsb * s->real);
|
||||
*(here->BSIM3DPspPtr + 1) += m * (xcdsb * s->imag);
|
||||
|
||||
*(here->BSIM3SsPtr) += gspr;
|
||||
*(here->BSIM3SspPtr) -= gspr;
|
||||
*(here->BSIM3SPsPtr) -= gspr;
|
||||
*(here->BSIM3SPgPtr) += m * (xcsgb * s->real);
|
||||
*(here->BSIM3SPgPtr + 1) += m * (xcsgb * s->imag);
|
||||
*(here->BSIM3SPbPtr) += m * (xcsbb * s->real);
|
||||
*(here->BSIM3SPbPtr + 1) += m * (xcsbb * s->imag);
|
||||
*(here->BSIM3SPdpPtr) += m * (xcsdb * s->real);
|
||||
*(here->BSIM3SPdpPtr + 1) += m * (xcsdb * s->imag);
|
||||
|
||||
*(here->BSIM3BgPtr) -= here->BSIM3gbgs;
|
||||
*(here->BSIM3BbPtr) += gbd + gbs - here->BSIM3gbbs;
|
||||
*(here->BSIM3BdpPtr) -= gbd - gbbdp;
|
||||
*(here->BSIM3BspPtr) -= gbs - gbbsp;
|
||||
*(here->BSIM3DdPtr) += m * gdpr;
|
||||
*(here->BSIM3DdpPtr) -= m * gdpr;
|
||||
*(here->BSIM3DPdPtr) -= m * gdpr;
|
||||
|
||||
*(here->BSIM3DPgPtr) += Gm + dxpart * xgtg
|
||||
+ T1 * ddxpart_dVg + gbdpg;
|
||||
*(here->BSIM3DPdpPtr) += gdpr + gds + gbd + RevSum
|
||||
+ dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp;
|
||||
*(here->BSIM3DPspPtr) -= gds + FwdSum - dxpart * xgts
|
||||
- T1 * ddxpart_dVs - gbdpsp;
|
||||
*(here->BSIM3DPbPtr) -= gbd - Gmbs - dxpart * xgtb
|
||||
- T1 * ddxpart_dVb - gbdpb;
|
||||
*(here->BSIM3SsPtr) += m * gspr;
|
||||
*(here->BSIM3SspPtr) -= m * gspr;
|
||||
*(here->BSIM3SPsPtr) -= m * gspr;
|
||||
|
||||
*(here->BSIM3SPgPtr) -= Gm - sxpart * xgtg
|
||||
- T1 * dsxpart_dVg - gbspg;
|
||||
*(here->BSIM3SPspPtr) += gspr + gds + gbs + FwdSum
|
||||
+ sxpart * xgts + T1 * dsxpart_dVs + gbspsp;
|
||||
*(here->BSIM3SPbPtr) -= gbs + Gmbs - sxpart * xgtb
|
||||
- T1 * dsxpart_dVb - gbspb;
|
||||
*(here->BSIM3SPdpPtr) -= gds + RevSum - sxpart * xgtd
|
||||
- T1 * dsxpart_dVd - gbspdp;
|
||||
*(here->BSIM3BgPtr) -= m * here->BSIM3gbgs;
|
||||
*(here->BSIM3BbPtr) +=
|
||||
m * (gbd + gbs - here->BSIM3gbbs);
|
||||
*(here->BSIM3BdpPtr) -= m * (gbd - gbbdp);
|
||||
*(here->BSIM3BspPtr) -= m * (gbs - gbbsp);
|
||||
|
||||
*(here->BSIM3GgPtr) -= xgtg;
|
||||
*(here->BSIM3GbPtr) -= xgtb;
|
||||
*(here->BSIM3GdpPtr) -= xgtd;
|
||||
*(here->BSIM3GspPtr) -= xgts;
|
||||
*(here->BSIM3DPgPtr) += m * (Gm + dxpart * xgtg
|
||||
+ T1 * ddxpart_dVg +
|
||||
gbdpg);
|
||||
*(here->BSIM3DPdpPtr) +=
|
||||
m * (gdpr + gds + gbd + RevSum +
|
||||
dxpart * xgtd + T1 * ddxpart_dVd +
|
||||
gbdpdp);
|
||||
*(here->BSIM3DPspPtr) -=
|
||||
m * (gds + FwdSum - dxpart * xgts -
|
||||
T1 * ddxpart_dVs - gbdpsp);
|
||||
*(here->BSIM3DPbPtr) -=
|
||||
m * (gbd - Gmbs - dxpart * xgtb -
|
||||
T1 * ddxpart_dVb - gbdpb);
|
||||
|
||||
if (here->BSIM3nqsMod)
|
||||
{ *(here->BSIM3QqPtr ) += s->real * ScalingFactor;
|
||||
*(here->BSIM3QqPtr +1) += s->imag * ScalingFactor;
|
||||
*(here->BSIM3QgPtr ) -= xcqgb * s->real;
|
||||
*(here->BSIM3QgPtr +1) -= xcqgb * s->imag;
|
||||
*(here->BSIM3QdpPtr ) -= xcqdb * s->real;
|
||||
*(here->BSIM3QdpPtr +1) -= xcqdb * s->imag;
|
||||
*(here->BSIM3QbPtr ) -= xcqbb * s->real;
|
||||
*(here->BSIM3QbPtr +1) -= xcqbb * s->imag;
|
||||
*(here->BSIM3QspPtr ) -= xcqsb * s->real;
|
||||
*(here->BSIM3QspPtr +1) -= xcqsb * s->imag;
|
||||
*(here->BSIM3SPgPtr) -= m * (Gm - sxpart * xgtg
|
||||
- T1 * dsxpart_dVg -
|
||||
gbspg);
|
||||
*(here->BSIM3SPspPtr) +=
|
||||
m * (gspr + gds + gbs + FwdSum +
|
||||
sxpart * xgts + T1 * dsxpart_dVs +
|
||||
gbspsp);
|
||||
*(here->BSIM3SPbPtr) -=
|
||||
m * (gbs + Gmbs - sxpart * xgtb -
|
||||
T1 * dsxpart_dVb - gbspb);
|
||||
*(here->BSIM3SPdpPtr) -=
|
||||
m * (gds + RevSum - sxpart * xgtd -
|
||||
T1 * dsxpart_dVd - gbspdp);
|
||||
|
||||
*(here->BSIM3GqPtr) -= here->BSIM3gtau;
|
||||
*(here->BSIM3DPqPtr) += dxpart * here->BSIM3gtau;
|
||||
*(here->BSIM3SPqPtr) += sxpart * here->BSIM3gtau;
|
||||
*(here->BSIM3GgPtr) -= m * xgtg;
|
||||
*(here->BSIM3GbPtr) -= m * xgtb;
|
||||
*(here->BSIM3GdpPtr) -= m * xgtd;
|
||||
*(here->BSIM3GspPtr) -= m * xgts;
|
||||
|
||||
*(here->BSIM3QqPtr) += here->BSIM3gtau;
|
||||
*(here->BSIM3QgPtr) += xgtg;
|
||||
*(here->BSIM3QdpPtr) += xgtd;
|
||||
*(here->BSIM3QbPtr) += xgtb;
|
||||
*(here->BSIM3QspPtr) += xgts;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
if (here->BSIM3nqsMod)
|
||||
{
|
||||
*(here->BSIM3QqPtr) +=
|
||||
m * (s->real * ScalingFactor);
|
||||
*(here->BSIM3QqPtr + 1) +=
|
||||
m * (s->imag * ScalingFactor);
|
||||
*(here->BSIM3QgPtr) -= m * (xcqgb * s->real);
|
||||
*(here->BSIM3QgPtr + 1) -=
|
||||
m * (xcqgb * s->imag);
|
||||
*(here->BSIM3QdpPtr) -= m * (xcqdb * s->real);
|
||||
*(here->BSIM3QdpPtr + 1) -=
|
||||
m * (xcqdb * s->imag);
|
||||
*(here->BSIM3QbPtr) -= m * (xcqbb * s->real);
|
||||
*(here->BSIM3QbPtr + 1) -=
|
||||
m * (xcqbb * s->imag);
|
||||
*(here->BSIM3QspPtr) -= m * (xcqsb * s->real);
|
||||
*(here->BSIM3QspPtr + 1) -=
|
||||
m * (xcqsb * s->imag);
|
||||
|
||||
*(here->BSIM3GqPtr) -= m * here->BSIM3gtau;
|
||||
*(here->BSIM3DPqPtr) +=
|
||||
m * (dxpart * here->BSIM3gtau);
|
||||
*(here->BSIM3SPqPtr) +=
|
||||
m * (sxpart * here->BSIM3gtau);
|
||||
|
||||
*(here->BSIM3QqPtr) += m * (here->BSIM3gtau);
|
||||
*(here->BSIM3QgPtr) += m * xgtg;
|
||||
*(here->BSIM3QdpPtr) += m * xgtd;
|
||||
*(here->BSIM3QbPtr) += m * xgtb;
|
||||
*(here->BSIM3QspPtr) += m * xgts;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,13 +1,24 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
File: b3trunc.c
|
||||
**********/
|
||||
* Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
* File: b3trunc.c of BSIM3v3.2.4
|
||||
* Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
* Author: 1997-1999 Weidong Liu.
|
||||
* Author: 2001 Xuemei Xi
|
||||
* Modified by Poalo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Release Notes:
|
||||
* BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001
|
||||
* BSIM3v3.2.3, Released by Xuemei Xi 10/05/2001
|
||||
* BSIM3v3.2.2, Released by Weidong Liu 04/20/1999
|
||||
* BSIM3v3.2, Released by Weidong Liu 06/16/1998
|
||||
*/
|
||||
|
||||
|
||||
/*************************************/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "bsim3def.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,39 +26,35 @@ File: b3trunc.c
|
|||
|
||||
|
||||
int
|
||||
BSIM3trunc(inModel,ckt,timeStep)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
double *timeStep;
|
||||
BSIM3trunc (GENmodel * inModel, CKTcircuit * ckt, double *timeStep)
|
||||
{
|
||||
BSIM3model *model = (BSIM3model*)inModel;
|
||||
BSIM3instance *here;
|
||||
BSIM3model *model = (BSIM3model *) inModel;
|
||||
BSIM3instance *here;
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
double debugtemp;
|
||||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3owner != ARCHme) continue;
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{
|
||||
for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3owner != ARCHme)
|
||||
continue;
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
debugtemp = *timeStep;
|
||||
#endif /* STEPDEBUG */
|
||||
CKTterr(here->BSIM3qb,ckt,timeStep);
|
||||
CKTterr(here->BSIM3qg,ckt,timeStep);
|
||||
CKTterr(here->BSIM3qd,ckt,timeStep);
|
||||
CKTterr (here->BSIM3qb, ckt, timeStep);
|
||||
CKTterr (here->BSIM3qg, ckt, timeStep);
|
||||
CKTterr (here->BSIM3qd, ckt, timeStep);
|
||||
#ifdef STEPDEBUG
|
||||
if(debugtemp != *timeStep)
|
||||
{ printf("device %s reduces step from %g to %g\n",
|
||||
here->BSIM3name,debugtemp,*timeStep);
|
||||
}
|
||||
if (debugtemp != *timeStep)
|
||||
{
|
||||
printf ("device %s reduces step from %g to %g\n", here->BSIM3name, debugtemp, *timeStep);
|
||||
}
|
||||
#endif /* STEPDEBUG */
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
}
|
||||
}
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Copyright 2001 Regents of the University of California. All rights reserved.
|
||||
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
||||
Author: 1997-1999 Weidong Liu.
|
||||
Modified: 2000 AlansFixes
|
||||
Author: 2001 Xuemei Xi
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: bsim3def.h
|
||||
**********/
|
||||
|
||||
|
|
@ -20,9 +21,8 @@ typedef struct sBSIM3instance
|
|||
struct sBSIM3model *BSIM3modPtr;
|
||||
struct sBSIM3instance *BSIM3nextInstance;
|
||||
IFuid BSIM3name;
|
||||
int BSIM3owner; /* number of owner process */
|
||||
int BSIM3owner; /* number of owner process */
|
||||
int BSIM3states; /* index into state table for this device */
|
||||
|
||||
int BSIM3dNode;
|
||||
int BSIM3gNode;
|
||||
int BSIM3sNode;
|
||||
|
|
@ -39,13 +39,13 @@ typedef struct sBSIM3instance
|
|||
double BSIM3cgdo;
|
||||
double BSIM3cgso;
|
||||
double BSIM3vjsm;
|
||||
double BSIM3IsEvjsm;
|
||||
double BSIM3IsEvjsm;
|
||||
double BSIM3vjdm;
|
||||
double BSIM3IsEvjdm;
|
||||
double BSIM3IsEvjdm;
|
||||
|
||||
double BSIM3l;
|
||||
double BSIM3w;
|
||||
double BSIM3m;
|
||||
double BSIM3m;
|
||||
double BSIM3drainArea;
|
||||
double BSIM3sourceArea;
|
||||
double BSIM3drainSquares;
|
||||
|
|
@ -104,12 +104,17 @@ typedef struct sBSIM3instance
|
|||
double BSIM3gtd;
|
||||
double BSIM3gts;
|
||||
double BSIM3gtb;
|
||||
double BSIM3rds; /* Noise bugfix */
|
||||
double BSIM3Vgsteff;
|
||||
double BSIM3Vdseff;
|
||||
double BSIM3Abulk;
|
||||
double BSIM3AbovVgst2Vtm;
|
||||
|
||||
struct bsim3SizeDependParam *pParam;
|
||||
|
||||
unsigned BSIM3lGiven :1;
|
||||
unsigned BSIM3wGiven :1;
|
||||
unsigned BSIM3mGiven :1;
|
||||
unsigned BSIM3mGiven :1;
|
||||
unsigned BSIM3drainAreaGiven :1;
|
||||
unsigned BSIM3sourceAreaGiven :1;
|
||||
unsigned BSIM3drainSquaresGiven :1;
|
||||
|
|
@ -351,7 +356,17 @@ typedef struct sBSIM3model
|
|||
int BSIM3noiMod;
|
||||
int BSIM3binUnit;
|
||||
int BSIM3paramChk;
|
||||
char *BSIM3version;
|
||||
char *BSIM3version;
|
||||
|
||||
/* The following field is an integer coding
|
||||
* of BSIM3version.
|
||||
*/
|
||||
int BSIM3intVersion;
|
||||
#define BSIM3V324 324 /* BSIM3 V3.2.4 */
|
||||
#define BSIM3V323 323 /* BSIM3 V3.2.3 */
|
||||
#define BSIM3V322 322 /* BSIM3 V3.2.2 */
|
||||
#define BSIM3V32 32 /* BSIM3 V3.2 */
|
||||
#define BSIM3V3OLD 0 /* Old model */
|
||||
double BSIM3tox;
|
||||
double BSIM3toxm;
|
||||
double BSIM3cdsc;
|
||||
|
|
@ -773,6 +788,9 @@ typedef struct sBSIM3model
|
|||
double BSIM3PhiBSWG;
|
||||
double BSIM3jctTempSatCurDensity;
|
||||
double BSIM3jctSidewallTempSatCurDensity;
|
||||
double BSIM3unitAreaTempJctCap;
|
||||
double BSIM3unitLengthSidewallTempJctCap;
|
||||
double BSIM3unitLengthGateSidewallTempJctCap;
|
||||
|
||||
double BSIM3oxideTrapDensityA;
|
||||
double BSIM3oxideTrapDensityB;
|
||||
|
|
@ -1745,18 +1763,13 @@ typedef struct sBSIM3model
|
|||
|
||||
#include "bsim3ext.h"
|
||||
|
||||
#ifdef __STDC__
|
||||
extern void BSIM3evaluate(double,double,double,BSIM3instance*,BSIM3model*,
|
||||
double*,double*,double*, double*, double*, double*, double*,
|
||||
double*, double*, double*, double*, double*, double*, double*,
|
||||
double*, double*, double*, double*, CKTcircuit*);
|
||||
extern int BSIM3debug(BSIM3model*, BSIM3instance*, CKTcircuit*, int);
|
||||
extern int BSIM3checkModel(BSIM3model*, BSIM3instance*, CKTcircuit*);
|
||||
#else /* stdc */
|
||||
extern void BSIM3evaluate();
|
||||
extern int BSIM3debug();
|
||||
extern int BSIM3checkModel();
|
||||
#endif /* stdc */
|
||||
|
||||
|
||||
#endif /*BSIM3*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1991 JianHui Huang and Min-Chie Jeng.
|
||||
Modified by Yuhua Cheng to use BSIM3v3 in Spice3f5 (Jan. 1997)
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: bsim3ext.h
|
||||
**********/
|
||||
|
||||
#ifdef __STDC__
|
||||
extern int BSIM3acLoad(GENmodel *,CKTcircuit*);
|
||||
extern int BSIM3ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
|
||||
extern int BSIM3convTest(GENmodel *,CKTcircuit*);
|
||||
|
|
@ -24,30 +25,10 @@ extern void BSIM3mosCap(CKTcircuit*, double, double, double, double,
|
|||
extern int BSIM3param(int,IFvalue*,GENinstance*,IFvalue*);
|
||||
extern int BSIM3pzLoad(GENmodel*,CKTcircuit*,SPcomplex*);
|
||||
extern int BSIM3setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
|
||||
extern int BSIM3unsetup(GENmodel*, CKTcircuit*);
|
||||
extern int BSIM3temp(GENmodel*,CKTcircuit*);
|
||||
extern int BSIM3trunc(GENmodel*,CKTcircuit*,double*);
|
||||
extern int BSIM3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
|
||||
extern int BSIM3unsetup(GENmodel*,CKTcircuit*);
|
||||
|
||||
#else /* stdc */
|
||||
extern int BSIM3acLoad();
|
||||
extern int BSIM3delete();
|
||||
extern void BSIM3destroy();
|
||||
extern int BSIM3getic();
|
||||
extern int BSIM3load();
|
||||
extern int BSIM3mDelete();
|
||||
extern int BSIM3ask();
|
||||
extern int BSIM3mAsk();
|
||||
extern int BSIM3convTest();
|
||||
extern int BSIM3temp();
|
||||
extern int BSIM3mParam();
|
||||
extern void BSIM3mosCap();
|
||||
extern int BSIM3param();
|
||||
extern int BSIM3pzLoad();
|
||||
extern int BSIM3setup();
|
||||
extern int BSIM3unsetup();
|
||||
extern int BSIM3trunc();
|
||||
extern int BSIM3noise();
|
||||
|
||||
#endif /* stdc */
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#include "bsim3init.h"
|
||||
|
||||
|
||||
SPICEdev BSIM3info = {
|
||||
SPICEdev B3info = {
|
||||
{ "BSIM3",
|
||||
"Berkeley Short Channel IGFET Model Version-3",
|
||||
|
||||
|
|
@ -66,7 +66,10 @@ SPICEdev BSIM3info = {
|
|||
DEVsenTrunc : NULL,
|
||||
DEVdisto : NULL,
|
||||
DEVnoise : BSIM3noise,
|
||||
|
||||
#ifdef CIDER
|
||||
DEVdump : NULL,
|
||||
DEVacct : NULL,
|
||||
#endif
|
||||
DEVinstSize : &BSIM3iSize,
|
||||
DEVmodSize : &BSIM3mSize
|
||||
|
||||
|
|
@ -76,5 +79,5 @@ SPICEdev BSIM3info = {
|
|||
SPICEdev *
|
||||
get_bsim3_info(void)
|
||||
{
|
||||
return &BSIM3info;
|
||||
return &B3info;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1991 JianHui Huang and Min-Chie Jeng.
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: bsim3itf.h
|
||||
**********/
|
||||
|
||||
#ifndef DEV_BSIM3
|
||||
#define DEV_BSIM3
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,15 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soidd.c 98/5/01
|
||||
Modified by Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2001
|
||||
**********/
|
||||
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "devdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
#include "suffix.h"
|
||||
|
|
@ -16,6 +20,7 @@ Modified by Wei Jin 99/9/27
|
|||
IFparm B3SOIDDpTable[] = { /* parameters */
|
||||
IOP( "l", B3SOIDD_L, IF_REAL , "Length"),
|
||||
IOP( "w", B3SOIDD_W, IF_REAL , "Width"),
|
||||
IOP( "m", B3SOIDD_M, IF_REAL , "Parallel Multiplier"),
|
||||
IOP( "ad", B3SOIDD_AD, IF_REAL , "Drain area"),
|
||||
IOP( "as", B3SOIDD_AS, IF_REAL , "Source area"),
|
||||
IOP( "pd", B3SOIDD_PD, IF_REAL , "Drain perimeter"),
|
||||
|
|
|
|||
|
|
@ -3,10 +3,15 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddacld.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,13 +19,11 @@ File: b3soiddacld.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIDDacLoad(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
register CKTcircuit *ckt;
|
||||
B3SOIDDacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
register B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
register B3SOIDDinstance *here;
|
||||
register int selfheat;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
int selfheat;
|
||||
double xcggb, xcgdb, xcgsb, xcgeb, xcgT;
|
||||
double xcdgb, xcddb, xcdsb, xcdeb, xcdT;
|
||||
double xcsgb, xcsdb, xcssb, xcseb, xcsT;
|
||||
|
|
@ -43,6 +46,8 @@ double xcTt, cTt, gcTt, gTtt, gTtg, gTtb, gTte, gTtdp, gTtsp;
|
|||
double Dum1, Dum2, Dum3, Dum4, Dum5;
|
||||
FILE *fpdebug;
|
||||
|
||||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{
|
||||
|
|
@ -50,10 +55,14 @@ FILE *fpdebug;
|
|||
for (here = model->B3SOIDDinstances; here!= NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0);
|
||||
if (here->B3SOIDDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
|
||||
selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0);
|
||||
if (here->B3SOIDDdebugMod > 2)
|
||||
{
|
||||
fpdebug = fopen("b3soiDDac.log", "a");
|
||||
fpdebug = fopen("b3soiddac.log", "a");
|
||||
fprintf(fpdebug, ".......omega=%.5e\n", omega);
|
||||
}
|
||||
if (here->B3SOIDDmode >= 0)
|
||||
|
|
@ -257,49 +266,51 @@ FILE *fpdebug;
|
|||
xcbsb = cbsb * omega;
|
||||
xcbeb = cbeb * omega;
|
||||
xcbT = cbT * omega;
|
||||
|
||||
|
||||
xcTt = cTt * omega;
|
||||
|
||||
*(here->B3SOIDDEgPtr +1) += xcegb;
|
||||
*(here->B3SOIDDEdpPtr +1) += xcedb;
|
||||
*(here->B3SOIDDEspPtr +1) += xcesb;
|
||||
*(here->B3SOIDDGePtr +1) += xcgeb;
|
||||
*(here->B3SOIDDDPePtr +1) += xcdeb;
|
||||
*(here->B3SOIDDSPePtr +1) += xcseb;
|
||||
m = here->B3SOIDDm;
|
||||
|
||||
*(here->B3SOIDDEgPtr +1) += m * xcegb;
|
||||
*(here->B3SOIDDEdpPtr +1) += m * xcedb;
|
||||
*(here->B3SOIDDEspPtr +1) += m * xcesb;
|
||||
*(here->B3SOIDDGePtr +1) += m * xcgeb;
|
||||
*(here->B3SOIDDDPePtr +1) += m * xcdeb;
|
||||
*(here->B3SOIDDSPePtr +1) += m * xcseb;
|
||||
|
||||
*(here->B3SOIDDEePtr +1) += xceeb;
|
||||
*(here->B3SOIDDEePtr +1) += m * xceeb;
|
||||
|
||||
*(here->B3SOIDDGgPtr +1) += xcggb;
|
||||
*(here->B3SOIDDGdpPtr +1) += xcgdb;
|
||||
*(here->B3SOIDDGspPtr +1) += xcgsb;
|
||||
*(here->B3SOIDDGgPtr +1) += m * xcggb;
|
||||
*(here->B3SOIDDGdpPtr +1) += m * xcgdb;
|
||||
*(here->B3SOIDDGspPtr +1) += m * xcgsb;
|
||||
|
||||
*(here->B3SOIDDDPgPtr +1) += xcdgb;
|
||||
*(here->B3SOIDDDPdpPtr +1) += xcddb;
|
||||
*(here->B3SOIDDDPspPtr +1) += xcdsb;
|
||||
*(here->B3SOIDDDPgPtr +1) += m * xcdgb;
|
||||
*(here->B3SOIDDDPdpPtr +1) += m * xcddb;
|
||||
*(here->B3SOIDDDPspPtr +1) += m * xcdsb;
|
||||
|
||||
*(here->B3SOIDDSPgPtr +1) += xcsgb;
|
||||
*(here->B3SOIDDSPdpPtr +1) += xcsdb;
|
||||
*(here->B3SOIDDSPspPtr +1) += xcssb;
|
||||
*(here->B3SOIDDSPgPtr +1) += m * xcsgb;
|
||||
*(here->B3SOIDDSPdpPtr +1) += m * xcsdb;
|
||||
*(here->B3SOIDDSPspPtr +1) += m * xcssb;
|
||||
|
||||
*(here->B3SOIDDBePtr +1) += xcbeb;
|
||||
*(here->B3SOIDDBgPtr +1) += xcbgb;
|
||||
*(here->B3SOIDDBdpPtr +1) += xcbdb;
|
||||
*(here->B3SOIDDBspPtr +1) += xcbsb;
|
||||
*(here->B3SOIDDBePtr +1) += m * xcbeb;
|
||||
*(here->B3SOIDDBgPtr +1) += m * xcbgb;
|
||||
*(here->B3SOIDDBdpPtr +1) += m * xcbdb;
|
||||
*(here->B3SOIDDBspPtr +1) += m * xcbsb;
|
||||
|
||||
*(here->B3SOIDDEbPtr +1) -= xcegb + xcedb + xcesb + xceeb;
|
||||
*(here->B3SOIDDGbPtr +1) -= xcggb + xcgdb + xcgsb + xcgeb;
|
||||
*(here->B3SOIDDDPbPtr +1) -= xcdgb + xcddb + xcdsb + xcdeb;
|
||||
*(here->B3SOIDDSPbPtr +1) -= xcsgb + xcsdb + xcssb + xcseb;
|
||||
*(here->B3SOIDDBbPtr +1) -= xcbgb + xcbdb + xcbsb + xcbeb;
|
||||
*(here->B3SOIDDEbPtr +1) -= m * (xcegb + xcedb + xcesb + xceeb);
|
||||
*(here->B3SOIDDGbPtr +1) -= m * (xcggb + xcgdb + xcgsb + xcgeb);
|
||||
*(here->B3SOIDDDPbPtr +1) -= m * (xcdgb + xcddb + xcdsb + xcdeb);
|
||||
*(here->B3SOIDDSPbPtr +1) -= m * (xcsgb + xcsdb + xcssb + xcseb);
|
||||
*(here->B3SOIDDBbPtr +1) -= m * (xcbgb + xcbdb + xcbsb + xcbeb);
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
*(here->B3SOIDDTemptempPtr + 1) += xcTt;
|
||||
*(here->B3SOIDDDPtempPtr + 1) += xcdT;
|
||||
*(here->B3SOIDDSPtempPtr + 1) += xcsT;
|
||||
*(here->B3SOIDDBtempPtr + 1) += xcbT;
|
||||
*(here->B3SOIDDEtempPtr + 1) += xceT;
|
||||
*(here->B3SOIDDGtempPtr + 1) += xcgT;
|
||||
*(here->B3SOIDDTemptempPtr + 1) += m * xcTt;
|
||||
*(here->B3SOIDDDPtempPtr + 1) += m * xcdT;
|
||||
*(here->B3SOIDDSPtempPtr + 1) += m * xcsT;
|
||||
*(here->B3SOIDDBtempPtr + 1) += m * xcbT;
|
||||
*(here->B3SOIDDEtempPtr + 1) += m * xceT;
|
||||
*(here->B3SOIDDGtempPtr + 1) += m * xcgT;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -329,45 +340,45 @@ xcsgb, xcsdb, xcssb, -(xcsgb+xcsdb+xcssb+xcseb), xcseb);
|
|||
*(here->B3SOIDDEdpPtr) += 0.0;
|
||||
*(here->B3SOIDDEspPtr) += 0.0;
|
||||
*(here->B3SOIDDGePtr) -= 0.0;
|
||||
*(here->B3SOIDDDPePtr) += Gme + gddpe;
|
||||
*(here->B3SOIDDSPePtr) += gsspe - Gme;
|
||||
*(here->B3SOIDDDPePtr) += m * (Gme + gddpe);
|
||||
*(here->B3SOIDDSPePtr) += m * (gsspe - Gme);
|
||||
|
||||
*(here->B3SOIDDEePtr) += 0.0;
|
||||
|
||||
*(here->B3SOIDDDPgPtr) += Gm + gddpg;
|
||||
*(here->B3SOIDDDPdpPtr) += gdpr + gds + gddpdp + RevSum ;
|
||||
*(here->B3SOIDDDPspPtr) -= gds + FwdSum - gddpsp;
|
||||
*(here->B3SOIDDDPdPtr) -= gdpr;
|
||||
*(here->B3SOIDDDPgPtr) += m * (Gm + gddpg);
|
||||
*(here->B3SOIDDDPdpPtr) += m * (gdpr + gds + gddpdp + RevSum);
|
||||
*(here->B3SOIDDDPspPtr) -= m * (gds + FwdSum - gddpsp);
|
||||
*(here->B3SOIDDDPdPtr) -= m * gdpr;
|
||||
|
||||
*(here->B3SOIDDSPgPtr) -= Gm - gsspg;
|
||||
*(here->B3SOIDDSPdpPtr) -= gds + RevSum - gsspdp;
|
||||
*(here->B3SOIDDSPspPtr) += gspr + gds + FwdSum + gsspsp;
|
||||
*(here->B3SOIDDSPsPtr) -= gspr;
|
||||
*(here->B3SOIDDSPgPtr) -= m * (Gm - gsspg);
|
||||
*(here->B3SOIDDSPdpPtr) -= m * (gds + RevSum - gsspdp);
|
||||
*(here->B3SOIDDSPspPtr) += m * (gspr + gds + FwdSum + gsspsp);
|
||||
*(here->B3SOIDDSPsPtr) -= m * gspr;
|
||||
|
||||
*(here->B3SOIDDBePtr) += gbbe;
|
||||
*(here->B3SOIDDBgPtr) += gbbg;
|
||||
*(here->B3SOIDDBdpPtr) += gbbdp;
|
||||
*(here->B3SOIDDBspPtr) += gbbsp;
|
||||
*(here->B3SOIDDBbPtr) += gbbb;
|
||||
*(here->B3SOIDDBePtr) += m * gbbe;
|
||||
*(here->B3SOIDDBgPtr) += m * gbbg;
|
||||
*(here->B3SOIDDBdpPtr) += m * gbbdp;
|
||||
*(here->B3SOIDDBspPtr) += m * gbbsp;
|
||||
*(here->B3SOIDDBbPtr) += m * gbbb;
|
||||
*(here->B3SOIDDEbPtr) += 0.0;
|
||||
*(here->B3SOIDDSPbPtr) -= Gmbs - gsspb;
|
||||
*(here->B3SOIDDDPbPtr) -= (-gddpb - Gmbs);
|
||||
*(here->B3SOIDDSPbPtr) -= m * (Gmbs - gsspb);
|
||||
*(here->B3SOIDDDPbPtr) -= m * (-gddpb - Gmbs);
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
*(here->B3SOIDDDPtempPtr) += GmT + gddpT;
|
||||
*(here->B3SOIDDSPtempPtr) += -GmT + gsspT;
|
||||
*(here->B3SOIDDBtempPtr) += gbbT;
|
||||
*(here->B3SOIDDDPtempPtr) += m * (GmT + gddpT);
|
||||
*(here->B3SOIDDSPtempPtr) += m * (-GmT + gsspT);
|
||||
*(here->B3SOIDDBtempPtr) += m * gbbT;
|
||||
if (here->B3SOIDDbodyMod == 1) {
|
||||
(*(here->B3SOIDDPtempPtr) += gppT);
|
||||
(*(here->B3SOIDDPtempPtr) += m * gppT);
|
||||
}
|
||||
|
||||
*(here->B3SOIDDTemptempPtr) += gTtt + 1/here->pParam->B3SOIDDrth;
|
||||
*(here->B3SOIDDTempgPtr) += gTtg;
|
||||
*(here->B3SOIDDTempbPtr) += gTtb;
|
||||
*(here->B3SOIDDTempePtr) += gTte;
|
||||
*(here->B3SOIDDTempdpPtr) += gTtdp;
|
||||
*(here->B3SOIDDTempspPtr) += gTtsp;
|
||||
*(here->B3SOIDDTemptempPtr) += m * (gTtt + 1/here->pParam->B3SOIDDrth);
|
||||
*(here->B3SOIDDTempgPtr) += m * gTtg;
|
||||
*(here->B3SOIDDTempbPtr) += m * gTtb;
|
||||
*(here->B3SOIDDTempePtr) += m * gTte;
|
||||
*(here->B3SOIDDTempdpPtr) += m * gTtdp;
|
||||
*(here->B3SOIDDTempspPtr) += m * gTtsp;
|
||||
}
|
||||
|
||||
if (here->B3SOIDDdebugMod > 3)
|
||||
|
|
@ -389,68 +400,68 @@ if (here->B3SOIDDdebugMod > 3)
|
|||
gbbg, gbbdp, gbbsp, gbbb, gbbe);
|
||||
}
|
||||
|
||||
*(here->B3SOIDDDdPtr) += gdpr;
|
||||
*(here->B3SOIDDDdpPtr) -= gdpr;
|
||||
*(here->B3SOIDDSsPtr) += gspr;
|
||||
*(here->B3SOIDDSspPtr) -= gspr;
|
||||
*(here->B3SOIDDDdPtr) += m * gdpr;
|
||||
*(here->B3SOIDDDdpPtr) -= m * gdpr;
|
||||
*(here->B3SOIDDSsPtr) += m * gspr;
|
||||
*(here->B3SOIDDSspPtr) -= m * gspr;
|
||||
|
||||
|
||||
if (here->B3SOIDDbodyMod == 1) {
|
||||
(*(here->B3SOIDDBpPtr) -= gppp);
|
||||
(*(here->B3SOIDDPbPtr) += gppb);
|
||||
(*(here->B3SOIDDPpPtr) += gppp);
|
||||
(*(here->B3SOIDDPgPtr) += gppg);
|
||||
(*(here->B3SOIDDPdpPtr) += gppdp);
|
||||
(*(here->B3SOIDDPspPtr) += gppsp);
|
||||
(*(here->B3SOIDDPePtr) += gppe);
|
||||
(*(here->B3SOIDDBpPtr) -= m * gppp);
|
||||
(*(here->B3SOIDDPbPtr) += m * gppb);
|
||||
(*(here->B3SOIDDPpPtr) += m * gppp);
|
||||
(*(here->B3SOIDDPgPtr) += m * gppg);
|
||||
(*(here->B3SOIDDPdpPtr) += m * gppdp);
|
||||
(*(here->B3SOIDDPspPtr) += m * gppsp);
|
||||
(*(here->B3SOIDDPePtr) += m * gppe);
|
||||
}
|
||||
if (here->B3SOIDDdebugMod > 1)
|
||||
{
|
||||
*(here->B3SOIDDVbsPtr) += 1;
|
||||
*(here->B3SOIDDIdsPtr) += 1;
|
||||
*(here->B3SOIDDIcPtr) += 1;
|
||||
*(here->B3SOIDDIbsPtr) += 1;
|
||||
*(here->B3SOIDDIbdPtr) += 1;
|
||||
*(here->B3SOIDDIiiPtr) += 1;
|
||||
*(here->B3SOIDDIgidlPtr) += 1;
|
||||
*(here->B3SOIDDItunPtr) += 1;
|
||||
*(here->B3SOIDDIbpPtr) += 1;
|
||||
*(here->B3SOIDDAbeffPtr) += 1;
|
||||
*(here->B3SOIDDVbs0effPtr) += 1;
|
||||
*(here->B3SOIDDVbsPtr) += m * 1;
|
||||
*(here->B3SOIDDIdsPtr) += m * 1;
|
||||
*(here->B3SOIDDIcPtr) += m * 1;
|
||||
*(here->B3SOIDDIbsPtr) += m * 1;
|
||||
*(here->B3SOIDDIbdPtr) += m * 1;
|
||||
*(here->B3SOIDDIiiPtr) += m * 1;
|
||||
*(here->B3SOIDDIgidlPtr) += m * 1;
|
||||
*(here->B3SOIDDItunPtr) += m * 1;
|
||||
*(here->B3SOIDDIbpPtr) += m * 1;
|
||||
*(here->B3SOIDDAbeffPtr) += m * 1;
|
||||
*(here->B3SOIDDVbs0effPtr) += m * 1;
|
||||
*(here->B3SOIDDVbseffPtr) += 1;
|
||||
*(here->B3SOIDDXcPtr) += 1;
|
||||
*(here->B3SOIDDCbgPtr) += 1;
|
||||
*(here->B3SOIDDCbbPtr) += 1;
|
||||
*(here->B3SOIDDCbdPtr) += 1;
|
||||
*(here->B3SOIDDqbPtr) += 1;
|
||||
*(here->B3SOIDDQbfPtr) += 1;
|
||||
*(here->B3SOIDDQjsPtr) += 1;
|
||||
*(here->B3SOIDDQjdPtr) += 1;
|
||||
*(here->B3SOIDDXcPtr) += m * 1;
|
||||
*(here->B3SOIDDCbgPtr) += m * 1;
|
||||
*(here->B3SOIDDCbbPtr) += m * 1;
|
||||
*(here->B3SOIDDCbdPtr) += m * 1;
|
||||
*(here->B3SOIDDqbPtr) += m * 1;
|
||||
*(here->B3SOIDDQbfPtr) += m * 1;
|
||||
*(here->B3SOIDDQjsPtr) += m * 1;
|
||||
*(here->B3SOIDDQjdPtr) += m * 1;
|
||||
|
||||
/* clean up last */
|
||||
*(here->B3SOIDDGmPtr) += 1;
|
||||
*(here->B3SOIDDGmbsPtr) += 1;
|
||||
*(here->B3SOIDDGdsPtr) += 1;
|
||||
*(here->B3SOIDDGmePtr) += 1;
|
||||
*(here->B3SOIDDVbs0teffPtr) += 1;
|
||||
*(here->B3SOIDDVgsteffPtr) += 1;
|
||||
*(here->B3SOIDDCbePtr) += 1;
|
||||
*(here->B3SOIDDVthPtr) += 1;
|
||||
*(here->B3SOIDDXcsatPtr) += 1;
|
||||
*(here->B3SOIDDVdscvPtr) += 1;
|
||||
*(here->B3SOIDDVcscvPtr) += 1;
|
||||
*(here->B3SOIDDQaccPtr) += 1;
|
||||
*(here->B3SOIDDQsub0Ptr) += 1;
|
||||
*(here->B3SOIDDQsubs1Ptr) += 1;
|
||||
*(here->B3SOIDDQsubs2Ptr) += 1;
|
||||
*(here->B3SOIDDqgPtr) += 1;
|
||||
*(here->B3SOIDDqdPtr) += 1;
|
||||
*(here->B3SOIDDqePtr) += 1;
|
||||
*(here->B3SOIDDDum1Ptr) += 1;
|
||||
*(here->B3SOIDDDum2Ptr) += 1;
|
||||
*(here->B3SOIDDDum3Ptr) += 1;
|
||||
*(here->B3SOIDDDum4Ptr) += 1;
|
||||
*(here->B3SOIDDDum5Ptr) += 1;
|
||||
*(here->B3SOIDDGmPtr) += m * 1;
|
||||
*(here->B3SOIDDGmbsPtr) += m * 1;
|
||||
*(here->B3SOIDDGdsPtr) += m * 1;
|
||||
*(here->B3SOIDDGmePtr) += m * 1;
|
||||
*(here->B3SOIDDVbs0teffPtr) += m * 1;
|
||||
*(here->B3SOIDDVgsteffPtr) += m * 1;
|
||||
*(here->B3SOIDDCbePtr) += m * 1;
|
||||
*(here->B3SOIDDVthPtr) += m * 1;
|
||||
*(here->B3SOIDDXcsatPtr) += m * 1;
|
||||
*(here->B3SOIDDVdscvPtr) += m * 1;
|
||||
*(here->B3SOIDDVcscvPtr) += m * 1;
|
||||
*(here->B3SOIDDQaccPtr) += m * 1;
|
||||
*(here->B3SOIDDQsub0Ptr) += m * 1;
|
||||
*(here->B3SOIDDQsubs1Ptr) += m * 1;
|
||||
*(here->B3SOIDDQsubs2Ptr) += m * 1;
|
||||
*(here->B3SOIDDqgPtr) += m * 1;
|
||||
*(here->B3SOIDDqdPtr) += m * 1;
|
||||
*(here->B3SOIDDqePtr) += m * 1;
|
||||
*(here->B3SOIDDDum1Ptr) += m * 1;
|
||||
*(here->B3SOIDDDum2Ptr) += m * 1;
|
||||
*(here->B3SOIDDDum3Ptr) += m * 1;
|
||||
*(here->B3SOIDDDum4Ptr) += m * 1;
|
||||
*(here->B3SOIDDDum5Ptr) += m * 1;
|
||||
}
|
||||
|
||||
if (here->B3SOIDDdebugMod > 2)
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiask.c 98/5/01
|
||||
File: b3soiddask.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "ifsim.h"
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
|
|
@ -17,12 +20,8 @@ File: b3soiask.c 98/5/01
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIDDask(ckt,inst,which,value,select)
|
||||
CKTcircuit *ckt;
|
||||
GENinstance *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
IFvalue *select;
|
||||
B3SOIDDask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
||||
IFvalue *select)
|
||||
{
|
||||
B3SOIDDinstance *here = (B3SOIDDinstance*)inst;
|
||||
|
||||
|
|
@ -59,9 +58,11 @@ B3SOIDDinstance *here = (B3SOIDDinstance*)inst;
|
|||
return(OK);
|
||||
case B3SOIDD_RTH0:
|
||||
value->rValue = here->B3SOIDDrth0;
|
||||
value->rValue /= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CTH0:
|
||||
value->rValue = here->B3SOIDDcth0;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_NRB:
|
||||
value->rValue = here->B3SOIDDbodySquares;
|
||||
|
|
@ -104,9 +105,11 @@ B3SOIDDinstance *here = (B3SOIDDinstance*)inst;
|
|||
return(OK);
|
||||
case B3SOIDD_SOURCECONDUCT:
|
||||
value->rValue = here->B3SOIDDsourceConductance;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_DRAINCONDUCT:
|
||||
value->rValue = here->B3SOIDDdrainConductance;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_VBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDvbd);
|
||||
|
|
@ -125,75 +128,98 @@ B3SOIDDinstance *here = (B3SOIDDinstance*)inst;
|
|||
return(OK);
|
||||
case B3SOIDD_CD:
|
||||
value->rValue = here->B3SOIDDcd;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CBS:
|
||||
value->rValue = here->B3SOIDDcjs;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CBD:
|
||||
value->rValue = here->B3SOIDDcjd;
|
||||
value->rValue = here->B3SOIDDcjd;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_GM:
|
||||
value->rValue = here->B3SOIDDgm;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_GMID:
|
||||
value->rValue = here->B3SOIDDgm/here->B3SOIDDcd;
|
||||
return(OK);
|
||||
case B3SOIDD_GDS:
|
||||
value->rValue = here->B3SOIDDgds;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_GMBS:
|
||||
value->rValue = here->B3SOIDDgmbs;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_GBD:
|
||||
value->rValue = here->B3SOIDDgjdb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_GBS:
|
||||
value->rValue = here->B3SOIDDgjsb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_QB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqb);
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CQB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDcqb);
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_QG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqg);
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CQG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDcqg);
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDcqg);
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_QD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqd);
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CQD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDcqd);
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CGG:
|
||||
value->rValue = here->B3SOIDDcggb;
|
||||
value->rValue = here->B3SOIDDcggb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CGD:
|
||||
value->rValue = here->B3SOIDDcgdb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CGS:
|
||||
value->rValue = here->B3SOIDDcgsb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CDG:
|
||||
value->rValue = here->B3SOIDDcdgb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CDD:
|
||||
value->rValue = here->B3SOIDDcddb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CDS:
|
||||
value->rValue = here->B3SOIDDcdsb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CBG:
|
||||
value->rValue = here->B3SOIDDcbgb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CBDB:
|
||||
value->rValue = here->B3SOIDDcbdb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_CBSB:
|
||||
value->rValue = here->B3SOIDDcbsb;
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_VON:
|
||||
value->rValue = here->B3SOIDDvon;
|
||||
|
|
@ -203,9 +229,11 @@ B3SOIDDinstance *here = (B3SOIDDinstance*)inst;
|
|||
return(OK);
|
||||
case B3SOIDD_QBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqbs);
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
case B3SOIDD_QBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqbd);
|
||||
value->rValue *= here->B3SOIDDm;
|
||||
return(OK);
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
|
|
|
|||
|
|
@ -2,12 +2,15 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddcheck.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -17,20 +20,18 @@ File: b3soiddcheck.c 98/5/01
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIDDcheckModel(model, here, ckt)
|
||||
register B3SOIDDmodel *model;
|
||||
register B3SOIDDinstance *here;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIDDcheckModel(B3SOIDDmodel *model, B3SOIDDinstance *here, CKTcircuit *ckt)
|
||||
{
|
||||
struct b3soiddSizeDependParam *pParam;
|
||||
int Fatal_Flag = 0;
|
||||
FILE *fplog;
|
||||
|
||||
if ((fplog = fopen("b3soiddv1check.log", "w")) != NULL)
|
||||
if ((fplog = fopen("b3soiddv2check.log", "w")) != NULL)
|
||||
{ pParam = here->pParam;
|
||||
fprintf(fplog, "B3SOIDDV3 Parameter Check\n");
|
||||
fprintf(fplog, "B3SOI(DD)V2.1 Parameter Check\n");
|
||||
fprintf(fplog, "Model = %s\n", model->B3SOIDDmodName);
|
||||
fprintf(fplog, "W = %g, L = %g\n", here->B3SOIDDw, here->B3SOIDDl);
|
||||
fprintf(fplog, "W = %g, L = %g\n, M = %g\n", here->B3SOIDDw,
|
||||
here->B3SOIDDl, here->B3SOIDDm);
|
||||
|
||||
|
||||
if (pParam->B3SOIDDnlx < -pParam->B3SOIDDleff)
|
||||
|
|
|
|||
|
|
@ -2,12 +2,15 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddcvtest.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -18,12 +21,10 @@ File: b3soiddcvtest.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIDDconvTest(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
register CKTcircuit *ckt;
|
||||
B3SOIDDconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
register B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
register B3SOIDDinstance *here;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
||||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
|
|
@ -32,7 +33,12 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
|||
{ /* loop through all the instances of the model */
|
||||
for (here = model->B3SOIDDinstances; here != NULL ;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
{ vbs = model->B3SOIDDtype
|
||||
{
|
||||
|
||||
if (here->B3SOIDDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
vbs = model->B3SOIDDtype
|
||||
* (*(ckt->CKTrhsOld+here->B3SOIDDbNode)
|
||||
- *(ckt->CKTrhsOld+here->B3SOIDDsNodePrime));
|
||||
vgs = model->B3SOIDDtype
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung
|
||||
Modified by Pin Su, Wei Jin 99/9/27
|
||||
File: b3soidddef.h
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
#ifndef B3SOIDD
|
||||
|
|
@ -22,9 +23,10 @@ typedef struct sB3SOIDDinstance
|
|||
{
|
||||
struct sB3SOIDDmodel *B3SOIDDmodPtr;
|
||||
struct sB3SOIDDinstance *B3SOIDDnextInstance;
|
||||
IFuid B3SOIDDname;
|
||||
int B3SOIFDowner;
|
||||
IFuid B3SOIDDname;
|
||||
int B3SOIDDowner; /* number of owner process */
|
||||
int B3SOIDDstates; /* index into state table for this device */
|
||||
|
||||
int B3SOIDDdNode;
|
||||
int B3SOIDDgNode;
|
||||
int B3SOIDDsNode;
|
||||
|
|
@ -128,6 +130,7 @@ typedef struct sB3SOIDDinstance
|
|||
|
||||
double B3SOIDDl;
|
||||
double B3SOIDDw;
|
||||
double B3SOIDDm;
|
||||
double B3SOIDDdrainArea;
|
||||
double B3SOIDDsourceArea;
|
||||
double B3SOIDDdrainSquares;
|
||||
|
|
@ -211,7 +214,6 @@ typedef struct sB3SOIDDinstance
|
|||
|
||||
double B3SOIDDcggb;
|
||||
double B3SOIDDcgdb;
|
||||
double B3SOIDDcbs; /* XXX PN */
|
||||
double B3SOIDDcgsb;
|
||||
double B3SOIDDcgeb;
|
||||
double B3SOIDDcgT;
|
||||
|
|
@ -243,6 +245,7 @@ typedef struct sB3SOIDDinstance
|
|||
|
||||
unsigned B3SOIDDlGiven :1;
|
||||
unsigned B3SOIDDwGiven :1;
|
||||
unsigned B3SOIDDmGiven :1;
|
||||
unsigned B3SOIDDdrainAreaGiven :1;
|
||||
unsigned B3SOIDDsourceAreaGiven :1;
|
||||
unsigned B3SOIDDdrainSquaresGiven :1;
|
||||
|
|
@ -1470,6 +1473,7 @@ typedef struct sB3SOIDDmodel
|
|||
/* device parameters */
|
||||
#define B3SOIDD_W 1
|
||||
#define B3SOIDD_L 2
|
||||
#define B3SOIDD_M 22
|
||||
#define B3SOIDD_AS 3
|
||||
#define B3SOIDD_AD 4
|
||||
#define B3SOIDD_PS 5
|
||||
|
|
@ -1610,7 +1614,7 @@ typedef struct sB3SOIDDmodel
|
|||
#define B3SOIDD_MOD_BII 211
|
||||
#define B3SOIDD_MOD_CII 212
|
||||
#define B3SOIDD_MOD_DII 213
|
||||
#define B3SOIDD_MOD_ALPHA1 214
|
||||
#define B3SOIDD_MOD_ALPHA1 214
|
||||
#define B3SOIDD_MOD_NGIDL 215
|
||||
#define B3SOIDD_MOD_AGIDL 216
|
||||
#define B3SOIDD_MOD_BGIDL 217
|
||||
|
|
@ -1974,18 +1978,12 @@ typedef struct sB3SOIDDmodel
|
|||
|
||||
#include "b3soiddext.h"
|
||||
|
||||
#ifdef __STDC__
|
||||
extern void B3SOIDDevaluate(double,double,double,B3SOIDDinstance*,B3SOIDDmodel*,
|
||||
double*,double*,double*, double*, double*, double*, double*,
|
||||
double*, double*, double*, double*, double*, double*, double*,
|
||||
double*, double*, double*, double*, CKTcircuit*);
|
||||
extern int B3SOIDDdebug(B3SOIDDmodel*, B3SOIDDinstance*, CKTcircuit*, int);
|
||||
extern int B3SOIDDcheckModel(B3SOIDDmodel*, B3SOIDDinstance*, CKTcircuit*);
|
||||
#else /* stdc */
|
||||
extern void B3SOIDDevaluate();
|
||||
extern int B3SOIDDdebug();
|
||||
extern int B3SOIDDcheckModel();
|
||||
#endif /* stdc */
|
||||
|
||||
#endif /*B3SOIDD*/
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,15 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soidddel.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "b3soidddef.h"
|
||||
#include "sperror.h"
|
||||
#include "gendefs.h"
|
||||
|
|
@ -14,10 +18,7 @@ File: b3soidddel.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIDDdelete(inModel,name,inInst)
|
||||
GENmodel *inModel;
|
||||
IFuid name;
|
||||
GENinstance **inInst;
|
||||
B3SOIDDdelete(GENmodel *inModel, IFuid name, GENinstance **inInst)
|
||||
{
|
||||
B3SOIDDinstance **fast = (B3SOIDDinstance**)inInst;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
|
|
|
|||
|
|
@ -2,17 +2,20 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soidddest.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "b3soidddef.h"
|
||||
#include "suffix.h"
|
||||
|
||||
void
|
||||
B3SOIDDdestroy(inModel)
|
||||
GENmodel **inModel;
|
||||
B3SOIDDdestroy(GENmodel **inModel)
|
||||
{
|
||||
B3SOIDDmodel **model = (B3SOIDDmodel**)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung
|
||||
File: b3soiddext.h
|
||||
Modifed by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
|
||||
#ifdef __STDC__
|
||||
extern int B3SOIDDacLoad(GENmodel *,CKTcircuit*);
|
||||
extern int B3SOIDDask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
|
||||
extern int B3SOIDDconvTest(GENmodel *,CKTcircuit*);
|
||||
|
|
@ -29,26 +28,3 @@ extern int B3SOIDDtemp(GENmodel*,CKTcircuit*);
|
|||
extern int B3SOIDDtrunc(GENmodel*,CKTcircuit*,double*);
|
||||
extern int B3SOIDDnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
|
||||
extern int B3SOIDDunsetup(GENmodel*,CKTcircuit*);
|
||||
|
||||
#else /* stdc */
|
||||
extern int B3SOIDDacLoad();
|
||||
extern int B3SOIDDdelete();
|
||||
extern void B3SOIDDdestroy();
|
||||
extern int B3SOIDDgetic();
|
||||
extern int B3SOIDDload();
|
||||
extern int B3SOIDDmDelete();
|
||||
extern int B3SOIDDask();
|
||||
extern int B3SOIDDmAsk();
|
||||
extern int B3SOIDDconvTest();
|
||||
extern int B3SOIDDtemp();
|
||||
extern int B3SOIDDmParam();
|
||||
extern void B3SOIDDmosCap();
|
||||
extern int B3SOIDDparam();
|
||||
extern int B3SOIDDpzLoad();
|
||||
extern int B3SOIDDsetup();
|
||||
extern int B3SOIDDtrunc();
|
||||
extern int B3SOIDDnoise();
|
||||
extern int B3SOIDDunsetup();
|
||||
|
||||
#endif /* stdc */
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,15 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddgetic.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,16 +18,19 @@ File: b3soiddgetic.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIDDgetic(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIDDgetic(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
|
||||
for (; model ; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance)
|
||||
{ if(!here->B3SOIDDicVBSGiven)
|
||||
{
|
||||
|
||||
if (here->B3SOIDDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
if(!here->B3SOIDDicVBSGiven)
|
||||
{ here->B3SOIDDicVBS = *(ckt->CKTrhs + here->B3SOIDDbNode)
|
||||
- *(ckt->CKTrhs + here->B3SOIDDsNode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
SPICEdev B3SOIDDinfo = {
|
||||
{ "B3SOIDD",
|
||||
"Berkeley SOI MOSFET (DD) model version 1.0",
|
||||
"Berkeley SOI MOSFET (DD) model version 2.1",
|
||||
|
||||
&B3SOIDDnSize,
|
||||
&B3SOIDDnSize,
|
||||
|
|
@ -19,7 +19,7 @@ SPICEdev B3SOIDDinfo = {
|
|||
|
||||
&B3SOIDDmPTSize,
|
||||
B3SOIDDmPTable,
|
||||
|
||||
|
||||
#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 */
|
||||
|
|
@ -33,44 +33,48 @@ SPICEdev B3SOIDDinfo = {
|
|||
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 : B3SOIDDparam,
|
||||
DEVmodParam : B3SOIDDmParam,
|
||||
DEVload : B3SOIDDload,
|
||||
DEVsetup : B3SOIDDsetup,
|
||||
DEVunsetup : B3SOIDDunsetup,
|
||||
DEVpzSetup : B3SOIDDsetup,
|
||||
DEVtemperature: B3SOIDDtemp,
|
||||
DEVtrunc : B3SOIDDtrunc,
|
||||
DEVfindBranch : NULL,
|
||||
DEVacLoad : B3SOIDDacLoad,
|
||||
DEVaccept : NULL,
|
||||
DEVdestroy : B3SOIDDdestroy,
|
||||
DEVmodDelete : B3SOIDDmDelete,
|
||||
DEVdelete : B3SOIDDdelete,
|
||||
DEVsetic : B3SOIDDgetic,
|
||||
DEVask : B3SOIDDask,
|
||||
DEVmodAsk : B3SOIDDmAsk,
|
||||
DEVpzLoad : B3SOIDDpzLoad,
|
||||
DEVconvTest : B3SOIDDconvTest,
|
||||
DEVsenSetup : NULL,
|
||||
DEVsenLoad : NULL,
|
||||
DEVsenUpdate : NULL,
|
||||
DEVsenAcLoad : NULL,
|
||||
DEVsenPrint : NULL,
|
||||
DEVsenTrunc : NULL,
|
||||
DEVdisto : NULL,
|
||||
DEVnoise : B3SOIDDnoise,
|
||||
#ifdef CIDER
|
||||
DEVdump : NULL,
|
||||
DEVacct : NULL,
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT}
|
||||
,
|
||||
|
||||
DEVparam: B3SOIDDparam,
|
||||
DEVmodParam: B3SOIDDmParam,
|
||||
DEVload: B3SOIDDload,
|
||||
DEVsetup: B3SOIDDsetup,
|
||||
DEVunsetup: B3SOIDDunsetup,
|
||||
DEVpzSetup: B3SOIDDsetup,
|
||||
DEVtemperature:B3SOIDDtemp,
|
||||
DEVtrunc: B3SOIDDtrunc,
|
||||
DEVfindBranch: NULL,
|
||||
DEVacLoad: B3SOIDDacLoad,
|
||||
DEVaccept: NULL,
|
||||
DEVdestroy: B3SOIDDdestroy,
|
||||
DEVmodDelete: B3SOIDDmDelete,
|
||||
DEVdelete: B3SOIDDdelete,
|
||||
DEVsetic: B3SOIDDgetic,
|
||||
DEVask: B3SOIDDask,
|
||||
DEVmodAsk: B3SOIDDmAsk,
|
||||
DEVpzLoad: B3SOIDDpzLoad,
|
||||
DEVconvTest: B3SOIDDconvTest,
|
||||
DEVsenSetup: NULL,
|
||||
DEVsenLoad: NULL,
|
||||
DEVsenUpdate: NULL,
|
||||
DEVsenAcLoad: NULL,
|
||||
DEVsenPrint: NULL,
|
||||
DEVsenTrunc: NULL,
|
||||
DEVdisto: NULL,
|
||||
DEVnoise: B3SOIDDnoise,
|
||||
DEVinstSize: &B3SOIDDiSize,
|
||||
DEVmodSize: &B3SOIDDmSize
|
||||
DEVinstSize : &B3SOIDDiSize,
|
||||
DEVmodSize : &B3SOIDDmSize
|
||||
};
|
||||
|
||||
SPICEdev *
|
||||
get_bsim3soidd_info (void)
|
||||
get_b3soidd_info (void)
|
||||
{
|
||||
return &B3SOIDDinfo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ File: b3soidditf.h
|
|||
|
||||
#include "b3soiddext.h"
|
||||
|
||||
SPICEdev *get_bsim3soidd_info (void);
|
||||
SPICEdev *get_b3soidd_info (void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,13 +3,16 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Pin Su, Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soiddld.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -49,11 +52,8 @@ File: b3soiddld.c 98/5/01
|
|||
*/
|
||||
|
||||
double
|
||||
B3SOIDDSmartVbs(New, Old, here, ckt, check)
|
||||
double New, Old;
|
||||
B3SOIDDinstance *here;
|
||||
CKTcircuit *ckt;
|
||||
int *check;
|
||||
B3SOIDDSmartVbs(double New, double Old, B3SOIDDinstance *here,
|
||||
CKTcircuit *ckt, int *check)
|
||||
{
|
||||
double T0, T1, del;
|
||||
|
||||
|
|
@ -72,11 +72,7 @@ B3SOIDDSmartVbs(New, Old, here, ckt, check)
|
|||
*/
|
||||
|
||||
double
|
||||
B3SOIDDlimit(vnew, vold, limit, check)
|
||||
double vnew;
|
||||
double vold;
|
||||
double limit;
|
||||
int *check;
|
||||
B3SOIDDlimit(double vnew, double vold, double limit, int *check)
|
||||
{
|
||||
double T0, T1;
|
||||
|
||||
|
|
@ -102,13 +98,11 @@ B3SOIDDlimit(vnew, vold, limit, check)
|
|||
|
||||
|
||||
int
|
||||
B3SOIDDload(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
register CKTcircuit *ckt;
|
||||
B3SOIDDload(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
register B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
register B3SOIDDinstance *here;
|
||||
register int selfheat;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
int selfheat;
|
||||
|
||||
double SourceSatCurrent, DrainSatCurrent, Gmin;
|
||||
double ag0, qgd, qgs, qgb, von, cbhat, VgstNVt, ExpVgst;
|
||||
|
|
@ -297,12 +291,18 @@ int nandetect;
|
|||
static int nanfound = 0;
|
||||
char nanmessage [12];
|
||||
|
||||
double m;
|
||||
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{ Check = 0;
|
||||
{
|
||||
|
||||
if (here->B3SOIDDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
Check = 0;
|
||||
ByPass = 0;
|
||||
selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0);
|
||||
pParam = here->pParam;
|
||||
|
|
@ -339,7 +339,8 @@ for (; model != NULL; model = model->B3SOIDDnextModel)
|
|||
}
|
||||
if (here->B3SOIDDdebugMod > 0)
|
||||
{
|
||||
fprintf(stderr,"DC op. point converge with %d iterations\n");
|
||||
fprintf(stderr,"DC op. point converge with %d iterations\n",
|
||||
here->B3SOIDDiterations);
|
||||
}
|
||||
}
|
||||
else if ((ckt->CKTmode & MODEINITTRAN))
|
||||
|
|
@ -3877,6 +3878,8 @@ if (here->B3SOIDDdebugMod > 2)
|
|||
*/
|
||||
line900:
|
||||
|
||||
m = here->B3SOIDDm;
|
||||
|
||||
if (here->B3SOIDDmode >= 0)
|
||||
{ Gm = here->B3SOIDDgm;
|
||||
Gmbs = here->B3SOIDDgmbs;
|
||||
|
|
@ -4005,20 +4008,20 @@ if (here->B3SOIDDdebugMod > 2)
|
|||
ceqqe = -ceqqe;
|
||||
}
|
||||
|
||||
(*(ckt->CKTrhs + here->B3SOIDDbNode) -=(ceqbody+ceqqb));
|
||||
(*(ckt->CKTrhs + here->B3SOIDDbNode) -= m * (ceqbody+ceqqb));
|
||||
|
||||
(*(ckt->CKTrhs + here->B3SOIDDgNode) -= ceqqg);
|
||||
(*(ckt->CKTrhs + here->B3SOIDDdNodePrime) += (ceqbd - cdreq - ceqqd));
|
||||
(*(ckt->CKTrhs + here->B3SOIDDsNodePrime) += (cdreq + ceqbs + ceqqg
|
||||
+ ceqqb + ceqqd + ceqqe));
|
||||
(*(ckt->CKTrhs + here->B3SOIDDeNode) -= ceqqe);
|
||||
(*(ckt->CKTrhs + here->B3SOIDDgNode) -= m * ceqqg);
|
||||
(*(ckt->CKTrhs + here->B3SOIDDdNodePrime) += m * (ceqbd - cdreq - ceqqd));
|
||||
(*(ckt->CKTrhs + here->B3SOIDDsNodePrime) += m * ((cdreq + ceqbs + ceqqg
|
||||
+ ceqqb + ceqqd + ceqqe)));
|
||||
(*(ckt->CKTrhs + here->B3SOIDDeNode) -= m * ceqqe);
|
||||
|
||||
if (here->B3SOIDDbodyMod == 1) {
|
||||
(*(ckt->CKTrhs + here->B3SOIDDpNode) += ceqbodcon);
|
||||
(*(ckt->CKTrhs + here->B3SOIDDpNode) += m * ceqbodcon);
|
||||
}
|
||||
|
||||
if (selfheat) {
|
||||
(*(ckt->CKTrhs + here->B3SOIDDtempNode) -= ceqth + ceqqth);
|
||||
(*(ckt->CKTrhs + here->B3SOIDDtempNode) -= m * (ceqth + ceqqth));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -4077,128 +4080,128 @@ if (here->B3SOIDDdebugMod > 2)
|
|||
/*
|
||||
* load y matrix
|
||||
*/
|
||||
(*(here->B3SOIDDEgPtr) += gcegb);
|
||||
(*(here->B3SOIDDEdpPtr) += gcedb);
|
||||
(*(here->B3SOIDDEspPtr) += gcesb);
|
||||
(*(here->B3SOIDDGePtr) += gcgeb);
|
||||
(*(here->B3SOIDDDPePtr) += Gme + gddpe + gcdeb);
|
||||
(*(here->B3SOIDDSPePtr) += gsspe - Gme + gcseb);
|
||||
(*(here->B3SOIDDEgPtr) += m * gcegb);
|
||||
(*(here->B3SOIDDEdpPtr) += m * gcedb);
|
||||
(*(here->B3SOIDDEspPtr) += m * gcesb);
|
||||
(*(here->B3SOIDDGePtr) += m * gcgeb);
|
||||
(*(here->B3SOIDDDPePtr) += m * (Gme + gddpe + gcdeb));
|
||||
(*(here->B3SOIDDSPePtr) += m * (gsspe - Gme + gcseb));
|
||||
|
||||
Gmin = ckt->CKTgmin * 1e-6;
|
||||
(*(here->B3SOIDDEbPtr) -= gcegb + gcedb + gcesb + gceeb);
|
||||
(*(here->B3SOIDDGbPtr) -= gcggb + gcgdb + gcgsb + gcgeb);
|
||||
(*(here->B3SOIDDDPbPtr) -= (-gddpb - Gmbs + gcdgb + gcddb + gcdeb + gcdsb));
|
||||
(*(here->B3SOIDDSPbPtr) -= (-gsspb + Gmbs + gcsgb + gcsdb + gcseb + gcssb));
|
||||
(*(here->B3SOIDDBePtr) += gbbe + gcbeb);
|
||||
(*(here->B3SOIDDBgPtr) += gcbgb + gbbg);
|
||||
(*(here->B3SOIDDBdpPtr) += gcbdb + gbbdp );
|
||||
(*(here->B3SOIDDBspPtr) += gcbsb + gbbsp - Gmin);
|
||||
(*(here->B3SOIDDBbPtr) += gbbb - gcbgb - gcbdb - gcbsb - gcbeb + Gmin) ;
|
||||
(*(here->B3SOIDDEbPtr) -= m * (gcegb + gcedb + gcesb + gceeb));
|
||||
(*(here->B3SOIDDGbPtr) -= m * (gcggb + gcgdb + gcgsb + gcgeb));
|
||||
(*(here->B3SOIDDDPbPtr) -= m * (-gddpb - Gmbs + gcdgb + gcddb + gcdeb + gcdsb));
|
||||
(*(here->B3SOIDDSPbPtr) -= m * (-gsspb + Gmbs + gcsgb + gcsdb + gcseb + gcssb));
|
||||
(*(here->B3SOIDDBePtr) += m * (gbbe + gcbeb));
|
||||
(*(here->B3SOIDDBgPtr) += m * (gcbgb + gbbg));
|
||||
(*(here->B3SOIDDBdpPtr) += m * (gcbdb + gbbdp));
|
||||
(*(here->B3SOIDDBspPtr) += m * (gcbsb + gbbsp - Gmin));
|
||||
(*(here->B3SOIDDBbPtr) += m * (gbbb - gcbgb - gcbdb - gcbsb - gcbeb + Gmin)) ;
|
||||
|
||||
(*(here->B3SOIDDEePtr) += gceeb);
|
||||
(*(here->B3SOIDDEePtr) += m * gceeb);
|
||||
|
||||
(*(here->B3SOIDDGgPtr) += gcggb + ckt->CKTgmin);
|
||||
(*(here->B3SOIDDGdpPtr) += gcgdb - ckt->CKTgmin);
|
||||
(*(here->B3SOIDDGspPtr) += gcgsb );
|
||||
(*(here->B3SOIDDGgPtr) += m * (gcggb + ckt->CKTgmin));
|
||||
(*(here->B3SOIDDGdpPtr) += m * (gcgdb - ckt->CKTgmin));
|
||||
(*(here->B3SOIDDGspPtr) += m * gcgsb );
|
||||
|
||||
(*(here->B3SOIDDDPgPtr) += (Gm + gcdgb) + gddpg - ckt->CKTgmin);
|
||||
(*(here->B3SOIDDDPdpPtr) += (here->B3SOIDDdrainConductance
|
||||
(*(here->B3SOIDDDPgPtr) += m * ((Gm + gcdgb) + gddpg - ckt->CKTgmin));
|
||||
(*(here->B3SOIDDDPdpPtr) += m * ((here->B3SOIDDdrainConductance
|
||||
+ here->B3SOIDDgds + gddpdp
|
||||
+ RevSum + gcddb) + ckt->CKTgmin);
|
||||
(*(here->B3SOIDDDPspPtr) -= (-gddpsp + here->B3SOIDDgds + FwdSum - gcdsb));
|
||||
+ RevSum + gcddb) + ckt->CKTgmin));
|
||||
(*(here->B3SOIDDDPspPtr) -= m * (-gddpsp + here->B3SOIDDgds + FwdSum - gcdsb));
|
||||
|
||||
(*(here->B3SOIDDDPdPtr) -= here->B3SOIDDdrainConductance);
|
||||
(*(here->B3SOIDDDPdPtr) -= m * here->B3SOIDDdrainConductance);
|
||||
|
||||
(*(here->B3SOIDDSPgPtr) += gcsgb - Gm + gsspg );
|
||||
(*(here->B3SOIDDSPdpPtr) -= (here->B3SOIDDgds - gsspdp + RevSum - gcsdb));
|
||||
(*(here->B3SOIDDSPspPtr) += (here->B3SOIDDsourceConductance
|
||||
(*(here->B3SOIDDSPgPtr) += m * (gcsgb - Gm + gsspg));
|
||||
(*(here->B3SOIDDSPdpPtr) -= m * (here->B3SOIDDgds - gsspdp + RevSum - gcsdb));
|
||||
(*(here->B3SOIDDSPspPtr) += m * (here->B3SOIDDsourceConductance
|
||||
+ here->B3SOIDDgds + gsspsp
|
||||
+ FwdSum + gcssb));
|
||||
(*(here->B3SOIDDSPsPtr) -= here->B3SOIDDsourceConductance);
|
||||
(*(here->B3SOIDDSPsPtr) -= m * here->B3SOIDDsourceConductance);
|
||||
|
||||
|
||||
(*(here->B3SOIDDDdPtr) += here->B3SOIDDdrainConductance);
|
||||
(*(here->B3SOIDDDdpPtr) -= here->B3SOIDDdrainConductance);
|
||||
(*(here->B3SOIDDDdPtr) += m * here->B3SOIDDdrainConductance);
|
||||
(*(here->B3SOIDDDdpPtr) -= m * here->B3SOIDDdrainConductance);
|
||||
|
||||
|
||||
(*(here->B3SOIDDSsPtr) += here->B3SOIDDsourceConductance);
|
||||
(*(here->B3SOIDDSspPtr) -= here->B3SOIDDsourceConductance);
|
||||
(*(here->B3SOIDDSsPtr) += m * here->B3SOIDDsourceConductance);
|
||||
(*(here->B3SOIDDSspPtr) -= m * here->B3SOIDDsourceConductance);
|
||||
|
||||
if (here->B3SOIDDbodyMod == 1) {
|
||||
(*(here->B3SOIDDBpPtr) -= gppp);
|
||||
(*(here->B3SOIDDPbPtr) += gppb);
|
||||
(*(here->B3SOIDDPpPtr) += gppp);
|
||||
(*(here->B3SOIDDPgPtr) += gppg);
|
||||
(*(here->B3SOIDDPdpPtr) += gppdp);
|
||||
(*(here->B3SOIDDPspPtr) += gppsp);
|
||||
(*(here->B3SOIDDPePtr) += gppe);
|
||||
(*(here->B3SOIDDBpPtr) -= m * gppp);
|
||||
(*(here->B3SOIDDPbPtr) += m * gppb);
|
||||
(*(here->B3SOIDDPpPtr) += m * gppp);
|
||||
(*(here->B3SOIDDPgPtr) += m * gppg);
|
||||
(*(here->B3SOIDDPdpPtr) += m * gppdp);
|
||||
(*(here->B3SOIDDPspPtr) += m * gppsp);
|
||||
(*(here->B3SOIDDPePtr) += m * gppe);
|
||||
}
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
(*(here->B3SOIDDDPtempPtr) += GmT + gddpT + gcdT);
|
||||
(*(here->B3SOIDDSPtempPtr) += -GmT + gsspT + gcsT);
|
||||
(*(here->B3SOIDDBtempPtr) += gbbT + gcbT);
|
||||
(*(here->B3SOIDDEtempPtr) += gceT);
|
||||
(*(here->B3SOIDDGtempPtr) += gcgT);
|
||||
(*(here->B3SOIDDDPtempPtr) += m * (GmT + gddpT + gcdT));
|
||||
(*(here->B3SOIDDSPtempPtr) += m * (-GmT + gsspT + gcsT));
|
||||
(*(here->B3SOIDDBtempPtr) += m * (gbbT + gcbT));
|
||||
(*(here->B3SOIDDEtempPtr) += m * (gceT));
|
||||
(*(here->B3SOIDDGtempPtr) += m * (gcgT));
|
||||
if (here->B3SOIDDbodyMod == 1) {
|
||||
(*(here->B3SOIDDPtempPtr) += gppT);
|
||||
(*(here->B3SOIDDPtempPtr) += m * gppT);
|
||||
}
|
||||
(*(here->B3SOIDDTemptempPtr) += gTtt + 1/pParam->B3SOIDDrth + gcTt);
|
||||
(*(here->B3SOIDDTempgPtr) += gTtg);
|
||||
(*(here->B3SOIDDTempbPtr) += gTtb);
|
||||
(*(here->B3SOIDDTempePtr) += gTte);
|
||||
(*(here->B3SOIDDTempdpPtr) += gTtdp);
|
||||
(*(here->B3SOIDDTempspPtr) += gTtsp);
|
||||
(*(here->B3SOIDDTemptempPtr) += m * (gTtt + 1/pParam->B3SOIDDrth + gcTt));
|
||||
(*(here->B3SOIDDTempgPtr) += m * gTtg);
|
||||
(*(here->B3SOIDDTempbPtr) += m * gTtb);
|
||||
(*(here->B3SOIDDTempePtr) += m * gTte);
|
||||
(*(here->B3SOIDDTempdpPtr) += m * gTtdp);
|
||||
(*(here->B3SOIDDTempspPtr) += m * gTtsp);
|
||||
}
|
||||
|
||||
if ((here->B3SOIDDdebugMod > 1) || (here->B3SOIDDdebugMod == -1))
|
||||
{
|
||||
*(here->B3SOIDDVbsPtr) += 1;
|
||||
*(here->B3SOIDDIdsPtr) += 1;
|
||||
*(here->B3SOIDDIcPtr) += 1;
|
||||
*(here->B3SOIDDIbsPtr) += 1;
|
||||
*(here->B3SOIDDIbdPtr) += 1;
|
||||
*(here->B3SOIDDIiiPtr) += 1;
|
||||
*(here->B3SOIDDIgidlPtr) += 1;
|
||||
*(here->B3SOIDDItunPtr) += 1;
|
||||
*(here->B3SOIDDIbpPtr) += 1;
|
||||
*(here->B3SOIDDAbeffPtr) += 1;
|
||||
*(here->B3SOIDDVbs0effPtr) += 1;
|
||||
*(here->B3SOIDDVbseffPtr) += 1;
|
||||
*(here->B3SOIDDXcPtr) += 1;
|
||||
*(here->B3SOIDDCbgPtr) += 1;
|
||||
*(here->B3SOIDDCbbPtr) += 1;
|
||||
*(here->B3SOIDDCbdPtr) += 1;
|
||||
*(here->B3SOIDDqbPtr) += 1;
|
||||
*(here->B3SOIDDQbfPtr) += 1;
|
||||
*(here->B3SOIDDQjsPtr) += 1;
|
||||
*(here->B3SOIDDQjdPtr) += 1;
|
||||
*(here->B3SOIDDVbsPtr) += m * 1;
|
||||
*(here->B3SOIDDIdsPtr) += m * 1;
|
||||
*(here->B3SOIDDIcPtr) += m * 1;
|
||||
*(here->B3SOIDDIbsPtr) += m * 1;
|
||||
*(here->B3SOIDDIbdPtr) += m * 1;
|
||||
*(here->B3SOIDDIiiPtr) += m * 1;
|
||||
*(here->B3SOIDDIgidlPtr) += m * 1;
|
||||
*(here->B3SOIDDItunPtr) += m * 1;
|
||||
*(here->B3SOIDDIbpPtr) += m * 1;
|
||||
*(here->B3SOIDDAbeffPtr) += m * 1;
|
||||
*(here->B3SOIDDVbs0effPtr) += m * 1;
|
||||
*(here->B3SOIDDVbseffPtr) += m * 1;
|
||||
*(here->B3SOIDDXcPtr) += m * 1;
|
||||
*(here->B3SOIDDCbgPtr) += m * 1;
|
||||
*(here->B3SOIDDCbbPtr) += m * 1;
|
||||
*(here->B3SOIDDCbdPtr) += m * 1;
|
||||
*(here->B3SOIDDqbPtr) += m * 1;
|
||||
*(here->B3SOIDDQbfPtr) += m * 1;
|
||||
*(here->B3SOIDDQjsPtr) += m * 1;
|
||||
*(here->B3SOIDDQjdPtr) += m * 1;
|
||||
|
||||
/* clean up last */
|
||||
*(here->B3SOIDDGmPtr) += 1;
|
||||
*(here->B3SOIDDGmbsPtr) += 1;
|
||||
*(here->B3SOIDDGdsPtr) += 1;
|
||||
*(here->B3SOIDDGmePtr) += 1;
|
||||
*(here->B3SOIDDVbs0teffPtr) += 1;
|
||||
*(here->B3SOIDDVgsteffPtr) += 1;
|
||||
*(here->B3SOIDDCbePtr) += 1;
|
||||
*(here->B3SOIDDVthPtr) += 1;
|
||||
*(here->B3SOIDDXcsatPtr) += 1;
|
||||
*(here->B3SOIDDVdscvPtr) += 1;
|
||||
*(here->B3SOIDDVcscvPtr) += 1;
|
||||
*(here->B3SOIDDQaccPtr) += 1;
|
||||
*(here->B3SOIDDQsub0Ptr) += 1;
|
||||
*(here->B3SOIDDQsubs1Ptr) += 1;
|
||||
*(here->B3SOIDDQsubs2Ptr) += 1;
|
||||
*(here->B3SOIDDqgPtr) += 1;
|
||||
*(here->B3SOIDDqdPtr) += 1;
|
||||
*(here->B3SOIDDqePtr) += 1;
|
||||
*(here->B3SOIDDDum1Ptr) += 1;
|
||||
*(here->B3SOIDDDum2Ptr) += 1;
|
||||
*(here->B3SOIDDDum3Ptr) += 1;
|
||||
*(here->B3SOIDDDum4Ptr) += 1;
|
||||
*(here->B3SOIDDDum5Ptr) += 1;
|
||||
*(here->B3SOIDDGmPtr) += m * 1;
|
||||
*(here->B3SOIDDGmbsPtr) += m * 1;
|
||||
*(here->B3SOIDDGdsPtr) += m * 1;
|
||||
*(here->B3SOIDDGmePtr) += m * 1;
|
||||
*(here->B3SOIDDVbs0teffPtr) += m * 1;
|
||||
*(here->B3SOIDDVgsteffPtr) += m * 1;
|
||||
*(here->B3SOIDDCbePtr) += m * 1;
|
||||
*(here->B3SOIDDVthPtr) += m * 1;
|
||||
*(here->B3SOIDDXcsatPtr) += m * 1;
|
||||
*(here->B3SOIDDVdscvPtr) += m * 1;
|
||||
*(here->B3SOIDDVcscvPtr) += m * 1;
|
||||
*(here->B3SOIDDQaccPtr) += m * 1;
|
||||
*(here->B3SOIDDQsub0Ptr) += m * 1;
|
||||
*(here->B3SOIDDQsubs1Ptr) += m * 1;
|
||||
*(here->B3SOIDDQsubs2Ptr) += m * 1;
|
||||
*(here->B3SOIDDqgPtr) += m * 1;
|
||||
*(here->B3SOIDDqdPtr) += m * 1;
|
||||
*(here->B3SOIDDqePtr) += m * 1;
|
||||
*(here->B3SOIDDDum1Ptr) += m * 1;
|
||||
*(here->B3SOIDDDum2Ptr) += m * 1;
|
||||
*(here->B3SOIDDDum3Ptr) += m * 1;
|
||||
*(here->B3SOIDDDum4Ptr) += m * 1;
|
||||
*(here->B3SOIDDDum5Ptr) += m * 1;
|
||||
/* end clean up last */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Wei Jin 99/9/27
|
||||
File: b3soiddmask.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ifsim.h"
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
|
|
@ -17,11 +17,7 @@ File: b3soiddmask.c 98/5/01
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIDDmAsk(ckt,inst,which,value)
|
||||
CKTcircuit *ckt;
|
||||
GENmodel *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
B3SOIDDmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
|
||||
{
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel *)inst;
|
||||
switch(which)
|
||||
|
|
|
|||
|
|
@ -3,20 +3,21 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddmdel.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "b3soidddef.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIDDmDelete(inModel,modname,kill)
|
||||
GENmodel **inModel;
|
||||
IFuid modname;
|
||||
GENmodel *kill;
|
||||
B3SOIDDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B3SOIDDmodel **model = (B3SOIDDmodel**)inModel;
|
||||
B3SOIDDmodel *modfast = (B3SOIDDmodel*)kill;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,15 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Wei Jin 99/9/27
|
||||
File: b3soiddmpar.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "b3soidddef.h"
|
||||
#include "ifsim.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -16,10 +20,7 @@ File: b3soiddmpar.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIDDmParam(param,value,inMod)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENmodel *inMod;
|
||||
B3SOIDDmParam(int param, IFvalue *value, GENmodel *inMod)
|
||||
{
|
||||
B3SOIDDmodel *mod = (B3SOIDDmodel*)inMod;
|
||||
switch(param)
|
||||
|
|
|
|||
|
|
@ -3,11 +3,15 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddnoi.c 98/5/01
|
||||
Modofied by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "b3soidddef.h"
|
||||
#include "cktdefs.h"
|
||||
#include "iferrmsg.h"
|
||||
|
|
@ -45,10 +49,9 @@ extern void NevalSrc();
|
|||
extern double Nintegrate();
|
||||
|
||||
double
|
||||
B3SOIDDStrongInversionNoiseEval(vgs, vds, model, here, freq, temp)
|
||||
double vgs, vds, freq, temp;
|
||||
B3SOIDDmodel *model;
|
||||
B3SOIDDinstance *here;
|
||||
B3SOIDDStrongInversionNoiseEval(double vgs, double vds, B3SOIDDmodel *model,
|
||||
B3SOIDDinstance *here, double freq,
|
||||
double temp)
|
||||
{
|
||||
struct b3soiddSizeDependParam *pParam;
|
||||
double cd, esat, DelClm, EffFreq, N0, Nl, Vgst;
|
||||
|
|
@ -56,7 +59,7 @@ double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
|
|||
double req, ceq;
|
||||
|
||||
pParam = here->pParam;
|
||||
cd = fabs(here->B3SOIDDcd);
|
||||
cd = fabs(here->B3SOIDDcd) * here->B3SOIDDm;
|
||||
if (vds > here->B3SOIDDvdsat)
|
||||
{ esat = 2.0 * pParam->B3SOIDDvsattemp / here->B3SOIDDueff;
|
||||
T0 = ((((vds - here->B3SOIDDvdsat) / pParam->B3SOIDDlitl) + model->B3SOIDDem)
|
||||
|
|
@ -84,7 +87,7 @@ double req, ceq;
|
|||
|
||||
T6 = 8.62e-5 * temp * cd * cd;
|
||||
T7 = 1.0e8 * EffFreq * pParam->B3SOIDDleff
|
||||
* pParam->B3SOIDDleff * pParam->B3SOIDDweff;
|
||||
* pParam->B3SOIDDleff * pParam->B3SOIDDweff * here->B3SOIDDm;
|
||||
T8 = model->B3SOIDDoxideTrapDensityA + model->B3SOIDDoxideTrapDensityB * Nl
|
||||
+ model->B3SOIDDoxideTrapDensityC * Nl * Nl;
|
||||
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
|
||||
|
|
@ -95,15 +98,11 @@ double req, ceq;
|
|||
}
|
||||
|
||||
int
|
||||
B3SOIDDnoise (mode, operation, inModel, ckt, data, OnDens)
|
||||
int mode, operation;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
register Ndata *data;
|
||||
double *OnDens;
|
||||
B3SOIDDnoise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt,
|
||||
Ndata *data, double *OnDens)
|
||||
{
|
||||
register B3SOIDDmodel *model = (B3SOIDDmodel *)inModel;
|
||||
register B3SOIDDinstance *here;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel *)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
struct b3soiddSizeDependParam *pParam;
|
||||
char name[N_MXVLNTH];
|
||||
double tempOnoise;
|
||||
|
|
@ -134,7 +133,12 @@ int error, i;
|
|||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{ pParam = here->pParam;
|
||||
{
|
||||
|
||||
if (here->B3SOIDDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
{ case N_OPEN:
|
||||
/* see if we have to to produce a summary report */
|
||||
|
|
@ -202,12 +206,12 @@ int error, i;
|
|||
NevalSrc(&noizDens[B3SOIDDRDNOIZ],
|
||||
&lnNdens[B3SOIDDRDNOIZ], ckt, THERMNOISE,
|
||||
here->B3SOIDDdNodePrime, here->B3SOIDDdNode,
|
||||
here->B3SOIDDdrainConductance);
|
||||
here->B3SOIDDdrainConductance * here->B3SOIDDm);
|
||||
|
||||
NevalSrc(&noizDens[B3SOIDDRSNOIZ],
|
||||
&lnNdens[B3SOIDDRSNOIZ], ckt, THERMNOISE,
|
||||
here->B3SOIDDsNodePrime, here->B3SOIDDsNode,
|
||||
here->B3SOIDDsourceConductance);
|
||||
here->B3SOIDDsourceConductance * here->B3SOIDDm);
|
||||
|
||||
switch( model->B3SOIDDnoiMod )
|
||||
{ case 1:
|
||||
|
|
@ -216,9 +220,9 @@ int error, i;
|
|||
&lnNdens[B3SOIDDIDNOIZ], ckt,
|
||||
THERMNOISE, here->B3SOIDDdNodePrime,
|
||||
here->B3SOIDDsNodePrime,
|
||||
(2.0 / 3.0 * fabs(here->B3SOIDDgm
|
||||
(2.0 / 3.0 * fabs(here->B3SOIDDm * (here->B3SOIDDgm
|
||||
+ here->B3SOIDDgds
|
||||
+ here->B3SOIDDgmbs)));
|
||||
+ here->B3SOIDDgmbs))));
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
|
|
@ -227,7 +231,7 @@ int error, i;
|
|||
THERMNOISE, here->B3SOIDDdNodePrime,
|
||||
here->B3SOIDDsNodePrime,
|
||||
(here->B3SOIDDueff
|
||||
* fabs(here->B3SOIDDqinv
|
||||
* fabs((here->B3SOIDDqinv * here->B3SOIDDm)
|
||||
/ (pParam->B3SOIDDleff
|
||||
* pParam->B3SOIDDleff))));
|
||||
break;
|
||||
|
|
@ -241,7 +245,7 @@ int error, i;
|
|||
case 4:
|
||||
noizDens[B3SOIDDFLNOIZ] *= model->B3SOIDDkf
|
||||
* exp(model->B3SOIDDaf
|
||||
* log(MAX(fabs(here->B3SOIDDcd),
|
||||
* log(MAX(fabs(here->B3SOIDDcd * here->B3SOIDDm),
|
||||
N_MINLOG)))
|
||||
/ (pow(data->freq, model->B3SOIDDef)
|
||||
* pParam->B3SOIDDleff
|
||||
|
|
@ -266,12 +270,12 @@ int error, i;
|
|||
{ pParam = here->pParam;
|
||||
T10 = model->B3SOIDDoxideTrapDensityA
|
||||
* 8.62e-5 * ckt->CKTtemp;
|
||||
T11 = pParam->B3SOIDDweff
|
||||
T11 = pParam->B3SOIDDweff * here->B3SOIDDm
|
||||
* pParam->B3SOIDDleff
|
||||
* pow(data->freq, model->B3SOIDDef)
|
||||
* 4.0e36;
|
||||
Swi = T10 / T11 * here->B3SOIDDcd
|
||||
* here->B3SOIDDcd;
|
||||
Swi = T10 / T11 * here->B3SOIDDcd * here->B3SOIDDm
|
||||
* here->B3SOIDDcd * here->B3SOIDDm;
|
||||
Slimit = B3SOIDDStrongInversionNoiseEval(
|
||||
here->B3SOIDDvon + 0.1, vds, model,
|
||||
here, data->freq, ckt->CKTtemp);
|
||||
|
|
@ -292,7 +296,8 @@ int error, i;
|
|||
NevalSrc(&noizDens[B3SOIDDFBNOIZ], &lnNdens[B3SOIDDFBNOIZ],
|
||||
ckt, SHOTNOISE, here->B3SOIDDsNodePrime,
|
||||
here->B3SOIDDbNode,
|
||||
2.0 * model->B3SOIDDnoif * here->B3SOIDDibs);
|
||||
2.0 * model->B3SOIDDnoif * here->B3SOIDDibs *
|
||||
here->B3SOIDDm);
|
||||
|
||||
noizDens[B3SOIDDTOTNOIZ] = noizDens[B3SOIDDRDNOIZ]
|
||||
+ noizDens[B3SOIDDRSNOIZ]
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddpar.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ifsim.h"
|
||||
#include "b3soidddef.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIDDparam(param,value,inst,select)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENinstance *inst;
|
||||
IFvalue *select;
|
||||
B3SOIDDparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
||||
{
|
||||
B3SOIDDinstance *here = (B3SOIDDinstance*)inst;
|
||||
switch(param)
|
||||
|
|
@ -29,6 +29,10 @@ IFvalue *select;
|
|||
here->B3SOIDDl = value->rValue;
|
||||
here->B3SOIDDlGiven = TRUE;
|
||||
break;
|
||||
case B3SOIDD_M:
|
||||
here->B3SOIDDm = value->rValue;
|
||||
here->B3SOIDDmGiven = TRUE;
|
||||
break;
|
||||
case B3SOIDD_AS:
|
||||
here->B3SOIDDsourceArea = value->rValue;
|
||||
here->B3SOIDDsourceAreaGiven = TRUE;
|
||||
|
|
|
|||
|
|
@ -3,11 +3,15 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddpzld.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "complex.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,23 +19,26 @@ File: b3soiddpzld.c 98/5/01
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIDDpzLoad(inModel,ckt,s)
|
||||
GENmodel *inModel;
|
||||
register CKTcircuit *ckt;
|
||||
register SPcomplex *s;
|
||||
B3SOIDDpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
||||
{
|
||||
register B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
register B3SOIDDinstance *here;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb;
|
||||
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb;
|
||||
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb;
|
||||
double GSoverlapCap, GDoverlapCap, GBoverlapCap;
|
||||
double FwdSum, RevSum, Gm, Gmbs;
|
||||
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here!= NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
|
||||
if (here->B3SOIDDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
if (here->B3SOIDDmode >= 0)
|
||||
{ Gm = here->B3SOIDDgm;
|
||||
Gmbs = here->B3SOIDDgmbs;
|
||||
|
|
@ -94,56 +101,57 @@ double FwdSum, RevSum, Gm, Gmbs;
|
|||
xcbdb = (cbdb - capbd);
|
||||
xcbsb = (cbsb - capbs);
|
||||
|
||||
m = here->B3SOIDDm;
|
||||
|
||||
*(here->B3SOIDDGgPtr ) += xcggb * s->real;
|
||||
*(here->B3SOIDDGgPtr +1) += xcggb * s->imag;
|
||||
*(here->B3SOIDDBbPtr ) += (-xcbgb-xcbdb-xcbsb) * s->real;
|
||||
*(here->B3SOIDDBbPtr +1) += (-xcbgb-xcbdb-xcbsb) * s->imag;
|
||||
*(here->B3SOIDDDPdpPtr ) += xcddb * s->real;
|
||||
*(here->B3SOIDDDPdpPtr +1) += xcddb * s->imag;
|
||||
*(here->B3SOIDDSPspPtr ) += xcssb * s->real;
|
||||
*(here->B3SOIDDSPspPtr +1) += xcssb * s->imag;
|
||||
*(here->B3SOIDDGbPtr ) += (-xcggb-xcgdb-xcgsb) * s->real;
|
||||
*(here->B3SOIDDGbPtr +1) += (-xcggb-xcgdb-xcgsb) * s->imag;
|
||||
*(here->B3SOIDDGdpPtr ) += xcgdb * s->real;
|
||||
*(here->B3SOIDDGdpPtr +1) += xcgdb * s->imag;
|
||||
*(here->B3SOIDDGspPtr ) += xcgsb * s->real;
|
||||
*(here->B3SOIDDGspPtr +1) += xcgsb * s->imag;
|
||||
*(here->B3SOIDDBgPtr ) += xcbgb * s->real;
|
||||
*(here->B3SOIDDBgPtr +1) += xcbgb * s->imag;
|
||||
*(here->B3SOIDDBdpPtr ) += xcbdb * s->real;
|
||||
*(here->B3SOIDDBdpPtr +1) += xcbdb * s->imag;
|
||||
*(here->B3SOIDDBspPtr ) += xcbsb * s->real;
|
||||
*(here->B3SOIDDBspPtr +1) += xcbsb * s->imag;
|
||||
*(here->B3SOIDDDPgPtr ) += xcdgb * s->real;
|
||||
*(here->B3SOIDDDPgPtr +1) += xcdgb * s->imag;
|
||||
*(here->B3SOIDDDPbPtr ) += (-xcdgb-xcddb-xcdsb) * s->real;
|
||||
*(here->B3SOIDDDPbPtr +1) += (-xcdgb-xcddb-xcdsb) * s->imag;
|
||||
*(here->B3SOIDDDPspPtr ) += xcdsb * s->real;
|
||||
*(here->B3SOIDDDPspPtr +1) += xcdsb * s->imag;
|
||||
*(here->B3SOIDDSPgPtr ) += xcsgb * s->real;
|
||||
*(here->B3SOIDDSPgPtr +1) += xcsgb * s->imag;
|
||||
*(here->B3SOIDDSPbPtr ) += (-xcsgb-xcsdb-xcssb) * s->real;
|
||||
*(here->B3SOIDDSPbPtr +1) += (-xcsgb-xcsdb-xcssb) * s->imag;
|
||||
*(here->B3SOIDDSPdpPtr ) += xcsdb * s->real;
|
||||
*(here->B3SOIDDSPdpPtr +1) += xcsdb * s->imag;
|
||||
*(here->B3SOIDDDdPtr) += gdpr;
|
||||
*(here->B3SOIDDSsPtr) += gspr;
|
||||
*(here->B3SOIDDBbPtr) += gbd+gbs;
|
||||
*(here->B3SOIDDDPdpPtr) += gdpr+gds+gbd+RevSum;
|
||||
*(here->B3SOIDDSPspPtr) += gspr+gds+gbs+FwdSum;
|
||||
*(here->B3SOIDDDdpPtr) -= gdpr;
|
||||
*(here->B3SOIDDSspPtr) -= gspr;
|
||||
*(here->B3SOIDDBdpPtr) -= gbd;
|
||||
*(here->B3SOIDDBspPtr) -= gbs;
|
||||
*(here->B3SOIDDDPdPtr) -= gdpr;
|
||||
*(here->B3SOIDDDPgPtr) += Gm;
|
||||
*(here->B3SOIDDDPbPtr) -= gbd - Gmbs;
|
||||
*(here->B3SOIDDDPspPtr) -= gds + FwdSum;
|
||||
*(here->B3SOIDDSPgPtr) -= Gm;
|
||||
*(here->B3SOIDDSPsPtr) -= gspr;
|
||||
*(here->B3SOIDDSPbPtr) -= gbs + Gmbs;
|
||||
*(here->B3SOIDDSPdpPtr) -= gds + RevSum;
|
||||
*(here->B3SOIDDGgPtr ) += m * (xcggb * s->real);
|
||||
*(here->B3SOIDDGgPtr +1) += m * (xcggb * s->imag);
|
||||
*(here->B3SOIDDBbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real);
|
||||
*(here->B3SOIDDBbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag);
|
||||
*(here->B3SOIDDDPdpPtr ) += m * (xcddb * s->real);
|
||||
*(here->B3SOIDDDPdpPtr +1) += m * (xcddb * s->imag);
|
||||
*(here->B3SOIDDSPspPtr ) += m * (xcssb * s->real);
|
||||
*(here->B3SOIDDSPspPtr +1) += m * (xcssb * s->imag);
|
||||
*(here->B3SOIDDGbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real);
|
||||
*(here->B3SOIDDGbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag);
|
||||
*(here->B3SOIDDGdpPtr ) += m * (xcgdb * s->real);
|
||||
*(here->B3SOIDDGdpPtr +1) += m * (xcgdb * s->imag);
|
||||
*(here->B3SOIDDGspPtr ) += m * (xcgsb * s->real);
|
||||
*(here->B3SOIDDGspPtr +1) += m * (xcgsb * s->imag);
|
||||
*(here->B3SOIDDBgPtr ) += m * (xcbgb * s->real);
|
||||
*(here->B3SOIDDBgPtr +1) += m * (xcbgb * s->imag);
|
||||
*(here->B3SOIDDBdpPtr ) += m * (xcbdb * s->real);
|
||||
*(here->B3SOIDDBdpPtr +1) += m * (xcbdb * s->imag);
|
||||
*(here->B3SOIDDBspPtr ) += m * (xcbsb * s->real);
|
||||
*(here->B3SOIDDBspPtr +1) += (xcbsb * s->imag);
|
||||
*(here->B3SOIDDDPgPtr ) += m * (xcdgb * s->real);
|
||||
*(here->B3SOIDDDPgPtr +1) += m * (xcdgb * s->imag);
|
||||
*(here->B3SOIDDDPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real);
|
||||
*(here->B3SOIDDDPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag);
|
||||
*(here->B3SOIDDDPspPtr ) += m * (xcdsb * s->real);
|
||||
*(here->B3SOIDDDPspPtr +1) += m * (xcdsb * s->imag);
|
||||
*(here->B3SOIDDSPgPtr ) += m * (xcsgb * s->real);
|
||||
*(here->B3SOIDDSPgPtr +1) += m * (xcsgb * s->imag);
|
||||
*(here->B3SOIDDSPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real);
|
||||
*(here->B3SOIDDSPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag);
|
||||
*(here->B3SOIDDSPdpPtr ) += m * (xcsdb * s->real);
|
||||
*(here->B3SOIDDSPdpPtr +1) += m * (xcsdb * s->imag);
|
||||
*(here->B3SOIDDDdPtr) += m * gdpr;
|
||||
*(here->B3SOIDDSsPtr) += m * gspr;
|
||||
*(here->B3SOIDDBbPtr) += m * (gbd + gbs);
|
||||
*(here->B3SOIDDDPdpPtr) += m * (gdpr + gds + gbd + RevSum);
|
||||
*(here->B3SOIDDSPspPtr) += m * (gspr + gds + gbs + FwdSum);
|
||||
*(here->B3SOIDDDdpPtr) -= m * gdpr;
|
||||
*(here->B3SOIDDSspPtr) -= m * gspr;
|
||||
*(here->B3SOIDDBdpPtr) -= m * gbd;
|
||||
*(here->B3SOIDDBspPtr) -= m * gbs;
|
||||
*(here->B3SOIDDDPdPtr) -= m * gdpr;
|
||||
*(here->B3SOIDDDPgPtr) += m * Gm;
|
||||
*(here->B3SOIDDDPbPtr) -= m * (gbd - Gmbs);
|
||||
*(here->B3SOIDDDPspPtr) -= m * (gds + FwdSum);
|
||||
*(here->B3SOIDDSPgPtr) -= m * Gm;
|
||||
*(here->B3SOIDDSPsPtr) -= m * gspr;
|
||||
*(here->B3SOIDDSPbPtr) -= m * (gbs + Gmbs);
|
||||
*(here->B3SOIDDSPdpPtr) -= m * (gds + RevSum);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,15 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Pin Su, Wei Jin 99/9/27
|
||||
File: b3soiddset.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
|
|
@ -28,14 +31,11 @@ File: b3soiddset.c 98/5/01
|
|||
#define Meter2Micron 1.0e6
|
||||
|
||||
int
|
||||
B3SOIDDsetup(matrix,inModel,ckt,states)
|
||||
register SMPmatrix *matrix;
|
||||
register GENmodel *inModel;
|
||||
register CKTcircuit *ckt;
|
||||
int *states;
|
||||
B3SOIDDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
|
||||
int *states)
|
||||
{
|
||||
register B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
register B3SOIDDinstance *here;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
int error;
|
||||
CKTnode *tmp;
|
||||
|
||||
|
|
@ -43,6 +43,10 @@ double tmp1, tmp2;
|
|||
double nfb0, Cboxt;
|
||||
int itmp1;
|
||||
|
||||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
||||
|
||||
/* loop through all the B3SOIDD device models */
|
||||
for( ; model != NULL; model = model->B3SOIDDnextModel )
|
||||
{
|
||||
|
|
@ -873,10 +877,16 @@ int itmp1;
|
|||
/* loop through all the instances of the model */
|
||||
for (here = model->B3SOIDDinstances; here != NULL ;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
{ /* allocate a chunk of the state vector */
|
||||
here->B3SOIDDstates = *states;
|
||||
*states += B3SOIDDnumStates;
|
||||
/* perform the parameter defaulting */
|
||||
{
|
||||
|
||||
if (here->B3SOIDDowner == ARCHme)
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B3SOIDDstates = *states;
|
||||
*states += B3SOIDDnumStates;
|
||||
}
|
||||
|
||||
/* perform the parameter defaulting */
|
||||
if (!here->B3SOIDDdrainAreaGiven)
|
||||
here->B3SOIDDdrainArea = 0.0;
|
||||
if (!here->B3SOIDDdrainPerimeterGiven)
|
||||
|
|
@ -913,7 +923,11 @@ int itmp1;
|
|||
here->B3SOIDDsourceSquares = 1;
|
||||
if (!here->B3SOIDDwGiven)
|
||||
here->B3SOIDDw = 5e-6;
|
||||
if (!here->B3SOIDDoffGiven)
|
||||
|
||||
if (!here->B3SOIDDmGiven)
|
||||
here->B3SOIDDm = 1;
|
||||
|
||||
if (!here->B3SOIDDoffGiven)
|
||||
here->B3SOIDDoff = 0;
|
||||
|
||||
/* process drain series resistance */
|
||||
|
|
@ -923,6 +937,15 @@ int itmp1;
|
|||
{ error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"drain");
|
||||
if(error) return(error);
|
||||
here->B3SOIDDdNodePrime = tmp->number;
|
||||
if (ckt->CKTcopyNodesets) {
|
||||
if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) {
|
||||
if (tmpNode->nsGiven) {
|
||||
tmp->nodeset=tmpNode->nodeset;
|
||||
tmp->nsGiven=tmpNode->nsGiven;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{ here->B3SOIDDdNodePrime = here->B3SOIDDdNode;
|
||||
|
|
@ -935,6 +958,16 @@ int itmp1;
|
|||
{ error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"source");
|
||||
if(error) return(error);
|
||||
here->B3SOIDDsNodePrime = tmp->number;
|
||||
|
||||
if (ckt->CKTcopyNodesets) {
|
||||
if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) {
|
||||
if (tmpNode->nsGiven) {
|
||||
tmp->nodeset=tmpNode->nodeset;
|
||||
tmp->nsGiven=tmpNode->nsGiven;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{ here->B3SOIDDsNodePrime = here->B3SOIDDsNode;
|
||||
|
|
@ -1319,11 +1352,8 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
|||
}
|
||||
|
||||
int
|
||||
B3SOIDDunsetup(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIDDunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
#ifndef HAS_BATCHSIM
|
||||
B3SOIDDmodel *model;
|
||||
B3SOIDDinstance *here;
|
||||
|
||||
|
|
@ -1347,7 +1377,6 @@ B3SOIDDunsetup(inModel,ckt)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,13 +4,17 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Pin Su, Wei Jin 99/9/27
|
||||
File: b3soiddtemp.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
/* Lmin, Lmax, Wmin, Wmax */
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
|
|
@ -31,12 +35,10 @@ File: b3soiddtemp.c 98/5/01
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
B3SOIDDtemp(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIDDtemp(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
register B3SOIDDmodel *model = (B3SOIDDmodel*) inModel;
|
||||
register B3SOIDDinstance *here;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*) inModel;
|
||||
B3SOIDDinstance *here;
|
||||
struct b3soiddSizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam;
|
||||
double tmp, tmp1, tmp2, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, T6, Ldrn, Wdrn;
|
||||
double Temp, TRatio, Inv_L, Inv_W, Inv_LW, Dw, Dl, Vtm0, Tnom;
|
||||
|
|
@ -73,7 +75,11 @@ int Size_Not_Found;
|
|||
for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
here->B3SOIDDrbodyext = here->B3SOIDDbodySquares *
|
||||
|
||||
if (here->B3SOIDDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
here->B3SOIDDrbodyext = here->B3SOIDDbodySquares *
|
||||
model->B3SOIDDrbsh;
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
Size_Not_Found = 1;
|
||||
|
|
@ -92,7 +98,7 @@ int Size_Not_Found;
|
|||
}
|
||||
|
||||
if (Size_Not_Found)
|
||||
{ pParam = (struct b3soiddSizeDependParam *)malloc(
|
||||
{ pParam = (struct b3soiddSizeDependParam *)tmalloc(
|
||||
sizeof(struct b3soiddSizeDependParam));
|
||||
if (pLastKnot == NULL)
|
||||
model->pSizeDependParamKnot = pParam;
|
||||
|
|
@ -529,7 +535,7 @@ int Size_Not_Found;
|
|||
|
||||
T0 = (TRatio - 1.0);
|
||||
|
||||
pParam->B3SOIDDuatemp = pParam->B3SOIDDua; /* save ua, ub, and uc for b3soild.c */
|
||||
pParam->B3SOIDDuatemp = pParam->B3SOIDDua; /* save ua, ub, and uc for b3soiddld.c */
|
||||
pParam->B3SOIDDubtemp = pParam->B3SOIDDub;
|
||||
pParam->B3SOIDDuctemp = pParam->B3SOIDDuc;
|
||||
pParam->B3SOIDDrds0denom = pow(pParam->B3SOIDDweff * 1E6, pParam->B3SOIDDwr);
|
||||
|
|
|
|||
|
|
@ -2,12 +2,15 @@
|
|||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soiddtrunc.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMDD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soidddef.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,13 +18,10 @@ File: b3soiddtrunc.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIDDtrunc(inModel,ckt,timeStep)
|
||||
GENmodel *inModel;
|
||||
register CKTcircuit *ckt;
|
||||
double *timeStep;
|
||||
B3SOIDDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
||||
{
|
||||
register B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
register B3SOIDDinstance *here;
|
||||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
double debugtemp;
|
||||
|
|
@ -31,6 +31,9 @@ register B3SOIDDinstance *here;
|
|||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
if (here->B3SOIDDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
#endif /* STEPDEBUG */
|
||||
|
|
|
|||
|
|
@ -3,12 +3,16 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifd.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "devdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
#include "suffix.h"
|
||||
|
|
@ -16,6 +20,7 @@ File: b3soifd.c 98/5/01
|
|||
IFparm B3SOIFDpTable[] = { /* parameters */
|
||||
IOP( "l", B3SOIFD_L, IF_REAL , "Length"),
|
||||
IOP( "w", B3SOIFD_W, IF_REAL , "Width"),
|
||||
IOP( "m", B3SOIFD_M, IF_REAL , "Parallel Multiplier"),
|
||||
IOP( "ad", B3SOIFD_AD, IF_REAL , "Drain area"),
|
||||
IOP( "as", B3SOIFD_AS, IF_REAL , "Source area"),
|
||||
IOP( "pd", B3SOIFD_PD, IF_REAL , "Drain perimeter"),
|
||||
|
|
|
|||
|
|
@ -3,11 +3,16 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Pin Su 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdacld.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,13 +20,11 @@ File: b3soifdacld.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIFDacLoad(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIFDacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
int selfheat;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
int selfheat;
|
||||
double xcggb, xcgdb, xcgsb, xcgeb, xcgT;
|
||||
double xcdgb, xcddb, xcdsb, xcdeb, xcdT;
|
||||
double xcsgb, xcsdb, xcssb, xcseb, xcsT;
|
||||
|
|
@ -44,6 +47,8 @@ double xcTt, cTt, gcTt, gTtt, gTtg, gTtb, gTte, gTtdp, gTtsp;
|
|||
double Dum1, Dum2, Dum3, Dum4, Dum5;
|
||||
FILE *fpdebug;
|
||||
|
||||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{
|
||||
|
|
@ -51,7 +56,11 @@ FILE *fpdebug;
|
|||
for (here = model->B3SOIFDinstances; here!= NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0);
|
||||
|
||||
if (here->B3SOIFDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0);
|
||||
if (here->B3SOIFDdebugMod > 2)
|
||||
{
|
||||
fpdebug = fopen("b3soifdac.log", "a");
|
||||
|
|
@ -261,35 +270,37 @@ FILE *fpdebug;
|
|||
|
||||
xcTt = cTt * omega;
|
||||
|
||||
*(here->B3SOIFDEgPtr +1) += xcegb;
|
||||
*(here->B3SOIFDEdpPtr +1) += xcedb;
|
||||
*(here->B3SOIFDEspPtr +1) += xcesb;
|
||||
*(here->B3SOIFDGePtr +1) += xcgeb;
|
||||
*(here->B3SOIFDDPePtr +1) += xcdeb;
|
||||
*(here->B3SOIFDSPePtr +1) += xcseb;
|
||||
m = here->B3SOIFDm;
|
||||
|
||||
*(here->B3SOIFDEePtr +1) += xceeb;
|
||||
*(here->B3SOIFDEgPtr +1) += m * xcegb;
|
||||
*(here->B3SOIFDEdpPtr +1) += m * xcedb;
|
||||
*(here->B3SOIFDEspPtr +1) += m * xcesb;
|
||||
*(here->B3SOIFDGePtr +1) += m * xcgeb;
|
||||
*(here->B3SOIFDDPePtr +1) += m * xcdeb;
|
||||
*(here->B3SOIFDSPePtr +1) += m * xcseb;
|
||||
|
||||
*(here->B3SOIFDGgPtr +1) += xcggb;
|
||||
*(here->B3SOIFDGdpPtr +1) += xcgdb;
|
||||
*(here->B3SOIFDGspPtr +1) += xcgsb;
|
||||
*(here->B3SOIFDEePtr +1) += m * xceeb;
|
||||
|
||||
*(here->B3SOIFDDPgPtr +1) += xcdgb;
|
||||
*(here->B3SOIFDDPdpPtr +1) += xcddb;
|
||||
*(here->B3SOIFDDPspPtr +1) += xcdsb;
|
||||
*(here->B3SOIFDGgPtr +1) += m * xcggb;
|
||||
*(here->B3SOIFDGdpPtr +1) += m * xcgdb;
|
||||
*(here->B3SOIFDGspPtr +1) += m * xcgsb;
|
||||
|
||||
*(here->B3SOIFDSPgPtr +1) += xcsgb;
|
||||
*(here->B3SOIFDSPdpPtr +1) += xcsdb;
|
||||
*(here->B3SOIFDSPspPtr +1) += xcssb;
|
||||
*(here->B3SOIFDDPgPtr +1) += m * xcdgb;
|
||||
*(here->B3SOIFDDPdpPtr +1) += m * xcddb;
|
||||
*(here->B3SOIFDDPspPtr +1) += m * xcdsb;
|
||||
|
||||
*(here->B3SOIFDSPgPtr +1) += m * xcsgb;
|
||||
*(here->B3SOIFDSPdpPtr +1) += m * xcsdb;
|
||||
*(here->B3SOIFDSPspPtr +1) += m * xcssb;
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
*(here->B3SOIFDTemptempPtr + 1) += xcTt;
|
||||
*(here->B3SOIFDDPtempPtr + 1) += xcdT;
|
||||
*(here->B3SOIFDSPtempPtr + 1) += xcsT;
|
||||
*(here->B3SOIFDBtempPtr + 1) += xcbT;
|
||||
*(here->B3SOIFDEtempPtr + 1) += xceT;
|
||||
*(here->B3SOIFDGtempPtr + 1) += xcgT;
|
||||
*(here->B3SOIFDTemptempPtr + 1) += m * xcTt;
|
||||
*(here->B3SOIFDDPtempPtr + 1) += m * xcdT;
|
||||
*(here->B3SOIFDSPtempPtr + 1) += m * xcsT;
|
||||
*(here->B3SOIFDBtempPtr + 1) += m * xcbT;
|
||||
*(here->B3SOIFDEtempPtr + 1) += m * xceT;
|
||||
*(here->B3SOIFDGtempPtr + 1) += m * xcgT;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -319,36 +330,36 @@ xcsgb, xcsdb, xcssb, -(xcsgb+xcsdb+xcssb+xcseb), xcseb);
|
|||
*(here->B3SOIFDEdpPtr) += 0.0;
|
||||
*(here->B3SOIFDEspPtr) += 0.0;
|
||||
*(here->B3SOIFDGePtr) -= 0.0;
|
||||
*(here->B3SOIFDDPePtr) += Gme + gddpe;
|
||||
*(here->B3SOIFDSPePtr) += gsspe - Gme;
|
||||
*(here->B3SOIFDDPePtr) += m * (Gme + gddpe);
|
||||
*(here->B3SOIFDSPePtr) += m * (gsspe - Gme);
|
||||
|
||||
*(here->B3SOIFDEePtr) += 0.0;
|
||||
|
||||
*(here->B3SOIFDDPgPtr) += Gm + gddpg;
|
||||
*(here->B3SOIFDDPdpPtr) += gdpr + gds + gddpdp + RevSum ;
|
||||
*(here->B3SOIFDDPspPtr) -= gds + FwdSum - gddpsp;
|
||||
*(here->B3SOIFDDPdPtr) -= gdpr;
|
||||
*(here->B3SOIFDDPgPtr) += m * (Gm + gddpg);
|
||||
*(here->B3SOIFDDPdpPtr) += m * (gdpr + gds + gddpdp + RevSum);
|
||||
*(here->B3SOIFDDPspPtr) -= m * (gds + FwdSum - gddpsp);
|
||||
*(here->B3SOIFDDPdPtr) -= m * gdpr;
|
||||
|
||||
*(here->B3SOIFDSPgPtr) -= Gm - gsspg;
|
||||
*(here->B3SOIFDSPdpPtr) -= gds + RevSum - gsspdp;
|
||||
*(here->B3SOIFDSPspPtr) += gspr + gds + FwdSum + gsspsp;
|
||||
*(here->B3SOIFDSPsPtr) -= gspr;
|
||||
*(here->B3SOIFDSPgPtr) -= m * (Gm - gsspg);
|
||||
*(here->B3SOIFDSPdpPtr) -= m * (gds + RevSum - gsspdp);
|
||||
*(here->B3SOIFDSPspPtr) += m * (gspr + gds + FwdSum + gsspsp);
|
||||
*(here->B3SOIFDSPsPtr) -= m * gspr;
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
*(here->B3SOIFDDPtempPtr) += GmT + gddpT;
|
||||
*(here->B3SOIFDSPtempPtr) += -GmT + gsspT;
|
||||
*(here->B3SOIFDBtempPtr) += gbbT;
|
||||
*(here->B3SOIFDDPtempPtr) += m * (GmT + gddpT);
|
||||
*(here->B3SOIFDSPtempPtr) += m * (-GmT + gsspT);
|
||||
*(here->B3SOIFDBtempPtr) += m * gbbT;
|
||||
if (here->B3SOIFDbodyMod == 1) {
|
||||
(*(here->B3SOIFDPtempPtr) += gppT);
|
||||
(*(here->B3SOIFDPtempPtr) += m * gppT);
|
||||
}
|
||||
|
||||
*(here->B3SOIFDTemptempPtr) += gTtt + 1/here->pParam->B3SOIFDrth;
|
||||
*(here->B3SOIFDTempgPtr) += gTtg;
|
||||
*(here->B3SOIFDTempbPtr) += gTtb;
|
||||
*(here->B3SOIFDTempePtr) += gTte;
|
||||
*(here->B3SOIFDTempdpPtr) += gTtdp;
|
||||
*(here->B3SOIFDTempspPtr) += gTtsp;
|
||||
*(here->B3SOIFDTemptempPtr) += m * (gTtt + 1/here->pParam->B3SOIFDrth);
|
||||
*(here->B3SOIFDTempgPtr) += m * gTtg;
|
||||
*(here->B3SOIFDTempbPtr) += m * gTtb;
|
||||
*(here->B3SOIFDTempePtr) += m * gTte;
|
||||
*(here->B3SOIFDTempdpPtr) += m * gTtdp;
|
||||
*(here->B3SOIFDTempspPtr) += m * gTtsp;
|
||||
}
|
||||
|
||||
if (here->B3SOIFDdebugMod > 3)
|
||||
|
|
@ -370,68 +381,68 @@ if (here->B3SOIFDdebugMod > 3)
|
|||
gbbg, gbbdp, gbbsp, gbbb, gbbe);
|
||||
}
|
||||
|
||||
*(here->B3SOIFDDdPtr) += gdpr;
|
||||
*(here->B3SOIFDDdpPtr) -= gdpr;
|
||||
*(here->B3SOIFDSsPtr) += gspr;
|
||||
*(here->B3SOIFDSspPtr) -= gspr;
|
||||
*(here->B3SOIFDDdPtr) += m * gdpr;
|
||||
*(here->B3SOIFDDdpPtr) -= m * gdpr;
|
||||
*(here->B3SOIFDSsPtr) += m * gspr;
|
||||
*(here->B3SOIFDSspPtr) -= m * gspr;
|
||||
|
||||
|
||||
if (here->B3SOIFDbodyMod == 1) {
|
||||
(*(here->B3SOIFDBpPtr) -= gppp);
|
||||
(*(here->B3SOIFDPbPtr) += gppb);
|
||||
(*(here->B3SOIFDPpPtr) += gppp);
|
||||
(*(here->B3SOIFDPgPtr) += gppg);
|
||||
(*(here->B3SOIFDPdpPtr) += gppdp);
|
||||
(*(here->B3SOIFDPspPtr) += gppsp);
|
||||
(*(here->B3SOIFDPePtr) += gppe);
|
||||
(*(here->B3SOIFDBpPtr) -= m * gppp);
|
||||
(*(here->B3SOIFDPbPtr) += m * gppb);
|
||||
(*(here->B3SOIFDPpPtr) += m * gppp);
|
||||
(*(here->B3SOIFDPgPtr) += m * gppg);
|
||||
(*(here->B3SOIFDPdpPtr) += m * gppdp);
|
||||
(*(here->B3SOIFDPspPtr) += m * gppsp);
|
||||
(*(here->B3SOIFDPePtr) += m * gppe);
|
||||
}
|
||||
if (here->B3SOIFDdebugMod > 1)
|
||||
{
|
||||
*(here->B3SOIFDVbsPtr) += 1;
|
||||
*(here->B3SOIFDIdsPtr) += 1;
|
||||
*(here->B3SOIFDIcPtr) += 1;
|
||||
*(here->B3SOIFDIbsPtr) += 1;
|
||||
*(here->B3SOIFDIbdPtr) += 1;
|
||||
*(here->B3SOIFDIiiPtr) += 1;
|
||||
*(here->B3SOIFDIgidlPtr) += 1;
|
||||
*(here->B3SOIFDItunPtr) += 1;
|
||||
*(here->B3SOIFDIbpPtr) += 1;
|
||||
*(here->B3SOIFDAbeffPtr) += 1;
|
||||
*(here->B3SOIFDVbs0effPtr) += 1;
|
||||
*(here->B3SOIFDVbseffPtr) += 1;
|
||||
*(here->B3SOIFDXcPtr) += 1;
|
||||
*(here->B3SOIFDCbgPtr) += 1;
|
||||
*(here->B3SOIFDCbbPtr) += 1;
|
||||
*(here->B3SOIFDCbdPtr) += 1;
|
||||
*(here->B3SOIFDqbPtr) += 1;
|
||||
*(here->B3SOIFDQbfPtr) += 1;
|
||||
*(here->B3SOIFDQjsPtr) += 1;
|
||||
*(here->B3SOIFDQjdPtr) += 1;
|
||||
*(here->B3SOIFDVbsPtr) += m * 1;
|
||||
*(here->B3SOIFDIdsPtr) += m * 1;
|
||||
*(here->B3SOIFDIcPtr) += m * 1;
|
||||
*(here->B3SOIFDIbsPtr) += m * 1;
|
||||
*(here->B3SOIFDIbdPtr) += m * 1;
|
||||
*(here->B3SOIFDIiiPtr) += m * 1;
|
||||
*(here->B3SOIFDIgidlPtr) += m * 1;
|
||||
*(here->B3SOIFDItunPtr) += m * 1;
|
||||
*(here->B3SOIFDIbpPtr) += m * 1;
|
||||
*(here->B3SOIFDAbeffPtr) += m * 1;
|
||||
*(here->B3SOIFDVbs0effPtr) += m * 1;
|
||||
*(here->B3SOIFDVbseffPtr) += m * 1;
|
||||
*(here->B3SOIFDXcPtr) += m * 1;
|
||||
*(here->B3SOIFDCbgPtr) += m * 1;
|
||||
*(here->B3SOIFDCbbPtr) += m * 1;
|
||||
*(here->B3SOIFDCbdPtr) += m * 1;
|
||||
*(here->B3SOIFDqbPtr) += m * 1;
|
||||
*(here->B3SOIFDQbfPtr) += m * 1;
|
||||
*(here->B3SOIFDQjsPtr) += m * 1;
|
||||
*(here->B3SOIFDQjdPtr) += m * 1;
|
||||
|
||||
/* clean up last */
|
||||
*(here->B3SOIFDGmPtr) += 1;
|
||||
*(here->B3SOIFDGmbsPtr) += 1;
|
||||
*(here->B3SOIFDGdsPtr) += 1;
|
||||
*(here->B3SOIFDGmePtr) += 1;
|
||||
*(here->B3SOIFDVbs0teffPtr) += 1;
|
||||
*(here->B3SOIFDVgsteffPtr) += 1;
|
||||
*(here->B3SOIFDCbePtr) += 1;
|
||||
*(here->B3SOIFDVthPtr) += 1;
|
||||
*(here->B3SOIFDXcsatPtr) += 1;
|
||||
*(here->B3SOIFDVdscvPtr) += 1;
|
||||
*(here->B3SOIFDVcscvPtr) += 1;
|
||||
*(here->B3SOIFDQaccPtr) += 1;
|
||||
*(here->B3SOIFDQsub0Ptr) += 1;
|
||||
*(here->B3SOIFDQsubs1Ptr) += 1;
|
||||
*(here->B3SOIFDQsubs2Ptr) += 1;
|
||||
*(here->B3SOIFDqgPtr) += 1;
|
||||
*(here->B3SOIFDqdPtr) += 1;
|
||||
*(here->B3SOIFDqePtr) += 1;
|
||||
*(here->B3SOIFDDum1Ptr) += 1;
|
||||
*(here->B3SOIFDDum2Ptr) += 1;
|
||||
*(here->B3SOIFDDum3Ptr) += 1;
|
||||
*(here->B3SOIFDDum4Ptr) += 1;
|
||||
*(here->B3SOIFDDum5Ptr) += 1;
|
||||
*(here->B3SOIFDGmPtr) += m * 1;
|
||||
*(here->B3SOIFDGmbsPtr) += m * 1;
|
||||
*(here->B3SOIFDGdsPtr) += m * 1;
|
||||
*(here->B3SOIFDGmePtr) += m * 1;
|
||||
*(here->B3SOIFDVbs0teffPtr) += m * 1;
|
||||
*(here->B3SOIFDVgsteffPtr) += m * 1;
|
||||
*(here->B3SOIFDCbePtr) += m * 1;
|
||||
*(here->B3SOIFDVthPtr) += m * 1;
|
||||
*(here->B3SOIFDXcsatPtr) += m * 1;
|
||||
*(here->B3SOIFDVdscvPtr) += m * 1;
|
||||
*(here->B3SOIFDVcscvPtr) += m * 1;
|
||||
*(here->B3SOIFDQaccPtr) += m * 1;
|
||||
*(here->B3SOIFDQsub0Ptr) += m * 1;
|
||||
*(here->B3SOIFDQsubs1Ptr) += m * 1;
|
||||
*(here->B3SOIFDQsubs2Ptr) += m * 1;
|
||||
*(here->B3SOIFDqgPtr) += m * 1;
|
||||
*(here->B3SOIFDqdPtr) += m * 1;
|
||||
*(here->B3SOIFDqePtr) += m * 1;
|
||||
*(here->B3SOIFDDum1Ptr) += m * 1;
|
||||
*(here->B3SOIFDDum2Ptr) += m * 1;
|
||||
*(here->B3SOIFDDum3Ptr) += m * 1;
|
||||
*(here->B3SOIFDDum4Ptr) += m * 1;
|
||||
*(here->B3SOIFDDum5Ptr) += m * 1;
|
||||
}
|
||||
|
||||
if (here->B3SOIFDdebugMod > 2)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdask.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "ifsim.h"
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
|
|
@ -16,12 +19,8 @@ File: b3soifdask.c 98/5/01
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIFDask(ckt,inst,which,value,select)
|
||||
CKTcircuit *ckt;
|
||||
GENinstance *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
IFvalue *select;
|
||||
B3SOIFDask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
||||
IFvalue *select)
|
||||
{
|
||||
B3SOIFDinstance *here = (B3SOIFDinstance*)inst;
|
||||
|
||||
|
|
@ -32,6 +31,9 @@ B3SOIFDinstance *here = (B3SOIFDinstance*)inst;
|
|||
case B3SOIFD_W:
|
||||
value->rValue = here->B3SOIFDw;
|
||||
return(OK);
|
||||
case B3SOIFD_M:
|
||||
value->rValue = here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_AS:
|
||||
value->rValue = here->B3SOIFDsourceArea;
|
||||
return(OK);
|
||||
|
|
@ -58,9 +60,11 @@ B3SOIFDinstance *here = (B3SOIFDinstance*)inst;
|
|||
return(OK);
|
||||
case B3SOIFD_RTH0:
|
||||
value->rValue = here->B3SOIFDrth0;
|
||||
value->rValue /= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CTH0:
|
||||
value->rValue = here->B3SOIFDcth0;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_NRB:
|
||||
value->rValue = here->B3SOIFDbodySquares;
|
||||
|
|
@ -103,9 +107,11 @@ B3SOIFDinstance *here = (B3SOIFDinstance*)inst;
|
|||
return(OK);
|
||||
case B3SOIFD_SOURCECONDUCT:
|
||||
value->rValue = here->B3SOIFDsourceConductance;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_DRAINCONDUCT:
|
||||
value->rValue = here->B3SOIFDdrainConductance;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_VBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDvbd);
|
||||
|
|
@ -123,76 +129,99 @@ B3SOIFDinstance *here = (B3SOIFDinstance*)inst;
|
|||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDvds);
|
||||
return(OK);
|
||||
case B3SOIFD_CD:
|
||||
value->rValue = here->B3SOIFDcd;
|
||||
value->rValue = here->B3SOIFDcd;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CBS:
|
||||
value->rValue = here->B3SOIFDcjs;
|
||||
value->rValue = here->B3SOIFDcjs;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CBD:
|
||||
value->rValue = here->B3SOIFDcjd;
|
||||
value->rValue = here->B3SOIFDcjd;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_GM:
|
||||
value->rValue = here->B3SOIFDgm;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_GMID:
|
||||
value->rValue = here->B3SOIFDgm/here->B3SOIFDcd;
|
||||
return(OK);
|
||||
case B3SOIFD_GDS:
|
||||
value->rValue = here->B3SOIFDgds;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_GMBS:
|
||||
value->rValue = here->B3SOIFDgmbs;
|
||||
value->rValue = here->B3SOIFDgmbs;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_GBD:
|
||||
value->rValue = here->B3SOIFDgjdb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_GBS:
|
||||
value->rValue = here->B3SOIFDgjsb;
|
||||
value->rValue = here->B3SOIFDgjsb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_QB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqb);
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CQB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDcqb);
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDcqb);
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_QG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqg);
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CQG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDcqg);
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDcqg);
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_QD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqd);
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CQD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDcqd);
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CGG:
|
||||
value->rValue = here->B3SOIFDcggb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CGD:
|
||||
value->rValue = here->B3SOIFDcgdb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CGS:
|
||||
value->rValue = here->B3SOIFDcgsb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CDG:
|
||||
value->rValue = here->B3SOIFDcdgb;
|
||||
value->rValue = here->B3SOIFDcdgb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CDD:
|
||||
value->rValue = here->B3SOIFDcddb;
|
||||
value->rValue = here->B3SOIFDcddb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CDS:
|
||||
value->rValue = here->B3SOIFDcdsb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CBG:
|
||||
value->rValue = here->B3SOIFDcbgb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CBDB:
|
||||
value->rValue = here->B3SOIFDcbdb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_CBSB:
|
||||
value->rValue = here->B3SOIFDcbsb;
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_VON:
|
||||
value->rValue = here->B3SOIFDvon;
|
||||
|
|
@ -201,10 +230,12 @@ B3SOIFDinstance *here = (B3SOIFDinstance*)inst;
|
|||
value->rValue = here->B3SOIFDvdsat;
|
||||
return(OK);
|
||||
case B3SOIFD_QBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqbs);
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqbs);
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
case B3SOIFD_QBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqbd);
|
||||
value->rValue *= here->B3SOIFDm;
|
||||
return(OK);
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdcheck.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -17,20 +20,18 @@ File: b3soifdcheck.c 98/5/01
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIFDcheckModel(model, here, ckt)
|
||||
B3SOIFDmodel *model;
|
||||
B3SOIFDinstance *here;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIFDcheckModel(B3SOIFDmodel *model, B3SOIFDinstance *here, CKTcircuit *ckt)
|
||||
{
|
||||
struct b3soifdSizeDependParam *pParam;
|
||||
int Fatal_Flag = 0;
|
||||
FILE *fplog;
|
||||
|
||||
if ((fplog = fopen("b3soifdv1check.log", "w")) != NULL)
|
||||
if ((fplog = fopen("b3soifdv2check.log", "w")) != NULL)
|
||||
{ pParam = here->pParam;
|
||||
fprintf(fplog, "B3SOIFDV3 Parameter Check\n");
|
||||
fprintf(fplog, "B3SOI (FD) Version 2.1 Parameter Check\n");
|
||||
fprintf(fplog, "Model = %s\n", model->B3SOIFDmodName);
|
||||
fprintf(fplog, "W = %g, L = %g\n", here->B3SOIFDw, here->B3SOIFDl);
|
||||
fprintf(fplog, "W = %g, L = %g M = %g\n", here->B3SOIFDw,
|
||||
here->B3SOIFDl, here->B3SOIFDm);
|
||||
|
||||
|
||||
if (pParam->B3SOIFDnlx < -pParam->B3SOIFDleff)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdcvtest.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -18,12 +21,10 @@ File: b3soifdcvtest.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIFDconvTest(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIFDconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
||||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
|
|
@ -32,7 +33,12 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
|||
{ /* loop through all the instances of the model */
|
||||
for (here = model->B3SOIFDinstances; here != NULL ;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
{ vbs = model->B3SOIFDtype
|
||||
{
|
||||
|
||||
if (here->B3SOIFDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
vbs = model->B3SOIFDtype
|
||||
* (*(ckt->CKTrhsOld+here->B3SOIFDbNode)
|
||||
- *(ckt->CKTrhsOld+here->B3SOIFDsNodePrime));
|
||||
vgs = model->B3SOIFDtype
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung
|
||||
Modified by Pin Su, Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifddef.h
|
||||
**********/
|
||||
|
||||
|
|
@ -23,8 +24,9 @@ typedef struct sB3SOIFDinstance
|
|||
struct sB3SOIFDmodel *B3SOIFDmodPtr;
|
||||
struct sB3SOIFDinstance *B3SOIFDnextInstance;
|
||||
IFuid B3SOIFDname;
|
||||
int B3SOIPDowner;
|
||||
int B3SOIFDstates; /* index into state table for this device */
|
||||
int B3SOIFDowner; /* number of owner process */
|
||||
int B3SOIFDstates; /* index into state table for this device */
|
||||
|
||||
int B3SOIFDdNode;
|
||||
int B3SOIFDgNode;
|
||||
int B3SOIFDsNode;
|
||||
|
|
@ -128,6 +130,7 @@ typedef struct sB3SOIFDinstance
|
|||
|
||||
double B3SOIFDl;
|
||||
double B3SOIFDw;
|
||||
double B3SOIFDm;
|
||||
double B3SOIFDdrainArea;
|
||||
double B3SOIFDsourceArea;
|
||||
double B3SOIFDdrainSquares;
|
||||
|
|
@ -217,7 +220,6 @@ typedef struct sB3SOIFDinstance
|
|||
|
||||
double B3SOIFDcbgb;
|
||||
double B3SOIFDcbdb;
|
||||
double B3SOIFDcbs; /* XXX PN */
|
||||
double B3SOIFDcbsb;
|
||||
double B3SOIFDcbeb;
|
||||
double B3SOIFDcbT;
|
||||
|
|
@ -243,6 +245,7 @@ typedef struct sB3SOIFDinstance
|
|||
|
||||
unsigned B3SOIFDlGiven :1;
|
||||
unsigned B3SOIFDwGiven :1;
|
||||
unsigned B3SOIFDmGiven :1;
|
||||
unsigned B3SOIFDdrainAreaGiven :1;
|
||||
unsigned B3SOIFDsourceAreaGiven :1;
|
||||
unsigned B3SOIFDdrainSquaresGiven :1;
|
||||
|
|
@ -1469,6 +1472,7 @@ typedef struct sB3SOIFDmodel
|
|||
/* device parameters */
|
||||
#define B3SOIFD_W 1
|
||||
#define B3SOIFD_L 2
|
||||
#define B3SOIFD_M 22
|
||||
#define B3SOIFD_AS 3
|
||||
#define B3SOIFD_AD 4
|
||||
#define B3SOIFD_PS 5
|
||||
|
|
@ -1973,18 +1977,12 @@ typedef struct sB3SOIFDmodel
|
|||
|
||||
#include "b3soifdext.h"
|
||||
|
||||
#ifdef __STDC__
|
||||
extern void B3SOIFDevaluate(double,double,double,B3SOIFDinstance*,B3SOIFDmodel*,
|
||||
double*,double*,double*, double*, double*, double*, double*,
|
||||
double*, double*, double*, double*, double*, double*, double*,
|
||||
double*, double*, double*, double*, CKTcircuit*);
|
||||
extern int B3SOIFDdebug(B3SOIFDmodel*, B3SOIFDinstance*, CKTcircuit*, int);
|
||||
extern int B3SOIFDcheckModel(B3SOIFDmodel*, B3SOIFDinstance*, CKTcircuit*);
|
||||
#else /* stdc */
|
||||
extern void B3SOIFDevaluate();
|
||||
extern int B3SOIFDdebug();
|
||||
extern int B3SOIFDcheckModel();
|
||||
#endif /* stdc */
|
||||
|
||||
#endif /*B3SOIFD*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifddel.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "b3soifddef.h"
|
||||
#include "sperror.h"
|
||||
#include "gendefs.h"
|
||||
|
|
@ -14,10 +18,7 @@ File: b3soifddel.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIFDdelete(inModel,name,inInst)
|
||||
GENmodel *inModel;
|
||||
IFuid name;
|
||||
GENinstance **inInst;
|
||||
B3SOIFDdelete(GENmodel *inModel, IFuid name, GENinstance **inInst)
|
||||
{
|
||||
B3SOIFDinstance **fast = (B3SOIFDinstance**)inInst;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifddest.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "b3soifddef.h"
|
||||
#include "suffix.h"
|
||||
|
||||
void
|
||||
B3SOIFDdestroy(inModel)
|
||||
GENmodel **inModel;
|
||||
B3SOIFDdestroy(GENmodel **inModel)
|
||||
{
|
||||
B3SOIFDmodel **model = (B3SOIFDmodel**)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdext.h
|
||||
**********/
|
||||
|
||||
#ifdef __STDC__
|
||||
extern int B3SOIFDacLoad(GENmodel *,CKTcircuit*);
|
||||
extern int B3SOIFDask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
|
||||
extern int B3SOIFDconvTest(GENmodel *,CKTcircuit*);
|
||||
|
|
@ -29,25 +29,3 @@ extern int B3SOIFDtrunc(GENmodel*,CKTcircuit*,double*);
|
|||
extern int B3SOIFDnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
|
||||
extern int B3SOIFDunsetup(GENmodel*,CKTcircuit*);
|
||||
|
||||
#else /* stdc */
|
||||
extern int B3SOIFDacLoad();
|
||||
extern int B3SOIFDdelete();
|
||||
extern void B3SOIFDdestroy();
|
||||
extern int B3SOIFDgetic();
|
||||
extern int B3SOIFDload();
|
||||
extern int B3SOIFDmDelete();
|
||||
extern int B3SOIFDask();
|
||||
extern int B3SOIFDmAsk();
|
||||
extern int B3SOIFDconvTest();
|
||||
extern int B3SOIFDtemp();
|
||||
extern int B3SOIFDmParam();
|
||||
extern void B3SOIFDmosCap();
|
||||
extern int B3SOIFDparam();
|
||||
extern int B3SOIFDpzLoad();
|
||||
extern int B3SOIFDsetup();
|
||||
extern int B3SOIFDtrunc();
|
||||
extern int B3SOIFDnoise();
|
||||
extern int B3SOIFDunsetup();
|
||||
|
||||
#endif /* stdc */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdgetic.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,16 +18,20 @@ File: b3soifdgetic.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIFDgetic(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIFDgetic(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
|
||||
for (; model ; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance)
|
||||
{ if(!here->B3SOIFDicVBSGiven)
|
||||
{
|
||||
|
||||
if (here->B3SOIFDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
|
||||
if(!here->B3SOIFDicVBSGiven)
|
||||
{ here->B3SOIFDicVBS = *(ckt->CKTrhs + here->B3SOIFDbNode)
|
||||
- *(ckt->CKTrhs + here->B3SOIFDsNode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
SPICEdev B3SOIFDinfo = {
|
||||
{ "B3SOIFD",
|
||||
"Berkeley SOI MOSFET (FD) model version 1.0",
|
||||
"Berkeley SOI MOSFET (FD) model version 2.1",
|
||||
|
||||
&B3SOIFDnSize,
|
||||
&B3SOIFDnSize,
|
||||
|
|
@ -19,7 +19,7 @@ SPICEdev B3SOIFDinfo = {
|
|||
|
||||
&B3SOIFDmPTSize,
|
||||
B3SOIFDmPTable,
|
||||
|
||||
|
||||
#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 */
|
||||
|
|
@ -33,40 +33,45 @@ SPICEdev B3SOIFDinfo = {
|
|||
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
|
||||
#endif
|
||||
|
||||
DEV_DEFAULT
|
||||
|
||||
},
|
||||
|
||||
DEV_DEFAULT}
|
||||
,
|
||||
|
||||
DEVparam: B3SOIFDparam,
|
||||
DEVmodParam: B3SOIFDmParam,
|
||||
DEVload: B3SOIFDload,
|
||||
DEVsetup: B3SOIFDsetup,
|
||||
DEVunsetup: B3SOIFDunsetup,
|
||||
DEVpzSetup: B3SOIFDsetup,
|
||||
DEVtemperature:B3SOIFDtemp,
|
||||
DEVtrunc: B3SOIFDtrunc,
|
||||
DEVfindBranch: NULL,
|
||||
DEVacLoad: B3SOIFDacLoad,
|
||||
DEVaccept: NULL,
|
||||
DEVdestroy: B3SOIFDdestroy,
|
||||
DEVmodDelete: B3SOIFDmDelete,
|
||||
DEVdelete: B3SOIFDdelete,
|
||||
DEVsetic: B3SOIFDgetic,
|
||||
DEVask: B3SOIFDask,
|
||||
DEVmodAsk: B3SOIFDmAsk,
|
||||
DEVpzLoad: B3SOIFDpzLoad,
|
||||
DEVconvTest: B3SOIFDconvTest,
|
||||
DEVsenSetup: NULL,
|
||||
DEVsenLoad: NULL,
|
||||
DEVsenUpdate: NULL,
|
||||
DEVsenAcLoad: NULL,
|
||||
DEVsenPrint: NULL,
|
||||
DEVsenTrunc: NULL,
|
||||
DEVdisto: NULL,
|
||||
DEVnoise: B3SOIFDnoise,
|
||||
DEVinstSize: &B3SOIFDiSize,
|
||||
DEVmodSize: &B3SOIFDmSize
|
||||
DEVparam : B3SOIFDparam,
|
||||
DEVmodParam : B3SOIFDmParam,
|
||||
DEVload : B3SOIFDload,
|
||||
DEVsetup : B3SOIFDsetup,
|
||||
DEVunsetup : B3SOIFDunsetup,
|
||||
DEVpzSetup : B3SOIFDsetup,
|
||||
DEVtemperature: B3SOIFDtemp,
|
||||
DEVtrunc : B3SOIFDtrunc,
|
||||
DEVfindBranch : NULL,
|
||||
DEVacLoad : B3SOIFDacLoad,
|
||||
DEVaccept : NULL,
|
||||
DEVdestroy : B3SOIFDdestroy,
|
||||
DEVmodDelete : B3SOIFDmDelete,
|
||||
DEVdelete : B3SOIFDdelete,
|
||||
DEVsetic : B3SOIFDgetic,
|
||||
DEVask : B3SOIFDask,
|
||||
DEVmodAsk : B3SOIFDmAsk,
|
||||
DEVpzLoad : B3SOIFDpzLoad,
|
||||
DEVconvTest : B3SOIFDconvTest,
|
||||
DEVsenSetup : NULL,
|
||||
DEVsenLoad : NULL,
|
||||
DEVsenUpdate : NULL,
|
||||
DEVsenAcLoad : NULL,
|
||||
DEVsenPrint : NULL,
|
||||
DEVsenTrunc : NULL,
|
||||
DEVdisto : NULL,
|
||||
DEVnoise : B3SOIFDnoise,
|
||||
#ifdef CIDER
|
||||
DEVdump : NULL,
|
||||
DEVacct : NULL,
|
||||
#endif
|
||||
DEVinstSize: &B3SOIFDiSize,
|
||||
DEVmodSize: &B3SOIFDmSize
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -75,7 +80,7 @@ DEVmodSize: &B3SOIFDmSize
|
|||
|
||||
|
||||
SPICEdev *
|
||||
get_bsim3soifd_info (void)
|
||||
get_b3soifd_info (void)
|
||||
{
|
||||
return &B3SOIFDinfo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ File: b3soifditf.h
|
|||
|
||||
#include "b3soifdext.h"
|
||||
|
||||
SPICEdev *get_bsim3soifd_info (void);
|
||||
SPICEdev *get_b3soifd_info (void);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,16 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Pin Su, Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdld.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
#include "trandefs.h"
|
||||
|
|
@ -49,11 +52,8 @@ File: b3soifdld.c 98/5/01
|
|||
*/
|
||||
|
||||
double
|
||||
B3SOIFDSmartVbs(New, Old, here, ckt, check)
|
||||
double New, Old;
|
||||
B3SOIFDinstance *here;
|
||||
CKTcircuit *ckt;
|
||||
int *check;
|
||||
B3SOIFDSmartVbs(double New, double Old, B3SOIFDinstance *here,
|
||||
CKTcircuit *ckt, int *check)
|
||||
{
|
||||
double T0, T1, del;
|
||||
|
||||
|
|
@ -72,11 +72,7 @@ B3SOIFDSmartVbs(New, Old, here, ckt, check)
|
|||
*/
|
||||
|
||||
double
|
||||
B3SOIFDlimit(vnew, vold, limit, check)
|
||||
double vnew;
|
||||
double vold;
|
||||
double limit;
|
||||
int *check;
|
||||
B3SOIFDlimit(double vnew, double vold, double limit, int *check)
|
||||
{
|
||||
double T0, T1;
|
||||
|
||||
|
|
@ -102,13 +98,11 @@ B3SOIFDlimit(vnew, vold, limit, check)
|
|||
|
||||
|
||||
int
|
||||
B3SOIFDload(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIFDload(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
int selfheat;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
int selfheat;
|
||||
|
||||
double SourceSatCurrent, DrainSatCurrent, Gmin;
|
||||
double ag0, qgd, qgs, qgb, von, cbhat, VgstNVt, ExpVgst;
|
||||
|
|
@ -297,12 +291,17 @@ int nandetect;
|
|||
static int nanfound = 0;
|
||||
char nanmessage [12];
|
||||
|
||||
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{ Check = 0;
|
||||
{
|
||||
|
||||
if (here->B3SOIFDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
Check = 0;
|
||||
ByPass = 0;
|
||||
selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0);
|
||||
pParam = here->pParam;
|
||||
|
|
@ -2769,6 +2768,7 @@ fprintf(stderr, "Bypass for %s...\n", here->B3SOIFDname);
|
|||
{ ckt->CKTnoncon++;
|
||||
if (here->B3SOIFDdebugMod > 2)
|
||||
fprintf(fpdebug, "Check is on, noncon=%d\n", ckt->CKTnoncon++);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3025,6 +3025,8 @@ if (here->B3SOIFDdebugMod > 2)
|
|||
*/
|
||||
line900:
|
||||
|
||||
m = here->B3SOIFDm;
|
||||
|
||||
if (here->B3SOIFDmode >= 0)
|
||||
{ Gm = here->B3SOIFDgm;
|
||||
Gmbs = here->B3SOIFDgmbs;
|
||||
|
|
@ -3153,18 +3155,18 @@ if (here->B3SOIFDdebugMod > 2)
|
|||
ceqqe = -ceqqe;
|
||||
}
|
||||
|
||||
(*(ckt->CKTrhs + here->B3SOIFDgNode) -= ceqqg);
|
||||
(*(ckt->CKTrhs + here->B3SOIFDdNodePrime) += (ceqbd - cdreq - ceqqd));
|
||||
(*(ckt->CKTrhs + here->B3SOIFDsNodePrime) += (cdreq + ceqbs + ceqqg
|
||||
(*(ckt->CKTrhs + here->B3SOIFDgNode) -= m * ceqqg);
|
||||
(*(ckt->CKTrhs + here->B3SOIFDdNodePrime) += m * (ceqbd - cdreq - ceqqd));
|
||||
(*(ckt->CKTrhs + here->B3SOIFDsNodePrime) += m * (cdreq + ceqbs + ceqqg
|
||||
+ ceqqb + ceqqd + ceqqe));
|
||||
(*(ckt->CKTrhs + here->B3SOIFDeNode) -= ceqqe);
|
||||
(*(ckt->CKTrhs + here->B3SOIFDeNode) -= m * ceqqe);
|
||||
|
||||
if (here->B3SOIFDbodyMod == 1) {
|
||||
(*(ckt->CKTrhs + here->B3SOIFDpNode) += ceqbodcon);
|
||||
(*(ckt->CKTrhs + here->B3SOIFDpNode) += m * ceqbodcon);
|
||||
}
|
||||
|
||||
if (selfheat) {
|
||||
(*(ckt->CKTrhs + here->B3SOIFDtempNode) -= ceqth + ceqqth);
|
||||
(*(ckt->CKTrhs + here->B3SOIFDtempNode) -= m * (ceqth + ceqqth));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3223,117 +3225,117 @@ if (here->B3SOIFDdebugMod > 2)
|
|||
/*
|
||||
* load y matrix
|
||||
*/
|
||||
(*(here->B3SOIFDEgPtr) += gcegb);
|
||||
(*(here->B3SOIFDEdpPtr) += gcedb);
|
||||
(*(here->B3SOIFDEspPtr) += gcesb);
|
||||
(*(here->B3SOIFDGePtr) += gcgeb);
|
||||
(*(here->B3SOIFDDPePtr) += Gme + gddpe + gcdeb);
|
||||
(*(here->B3SOIFDSPePtr) += gsspe - Gme + gcseb);
|
||||
(*(here->B3SOIFDEgPtr) += m * gcegb);
|
||||
(*(here->B3SOIFDEdpPtr) += m * gcedb);
|
||||
(*(here->B3SOIFDEspPtr) += m * gcesb);
|
||||
(*(here->B3SOIFDGePtr) += m * gcgeb);
|
||||
(*(here->B3SOIFDDPePtr) += m * (Gme + gddpe + gcdeb));
|
||||
(*(here->B3SOIFDSPePtr) += m * (gsspe - Gme + gcseb));
|
||||
|
||||
(*(here->B3SOIFDEePtr) += gceeb);
|
||||
(*(here->B3SOIFDEePtr) += m * gceeb);
|
||||
|
||||
(*(here->B3SOIFDGgPtr) += gcggb + ckt->CKTgmin);
|
||||
(*(here->B3SOIFDGdpPtr) += gcgdb - ckt->CKTgmin);
|
||||
(*(here->B3SOIFDGspPtr) += gcgsb );
|
||||
(*(here->B3SOIFDGgPtr) += m * (gcggb + ckt->CKTgmin));
|
||||
(*(here->B3SOIFDGdpPtr) += m * (gcgdb - ckt->CKTgmin));
|
||||
(*(here->B3SOIFDGspPtr) += m * gcgsb );
|
||||
|
||||
(*(here->B3SOIFDDPgPtr) += (Gm + gcdgb) + gddpg - ckt->CKTgmin);
|
||||
(*(here->B3SOIFDDPdpPtr) += (here->B3SOIFDdrainConductance
|
||||
(*(here->B3SOIFDDPgPtr) += m * ((Gm + gcdgb) + gddpg - ckt->CKTgmin));
|
||||
(*(here->B3SOIFDDPdpPtr) += m * ((here->B3SOIFDdrainConductance
|
||||
+ here->B3SOIFDgds + gddpdp
|
||||
+ RevSum + gcddb) + ckt->CKTgmin);
|
||||
(*(here->B3SOIFDDPspPtr) -= (-gddpsp + here->B3SOIFDgds + FwdSum - gcdsb));
|
||||
+ RevSum + gcddb) + ckt->CKTgmin));
|
||||
(*(here->B3SOIFDDPspPtr) -= m * (-gddpsp + here->B3SOIFDgds + FwdSum - gcdsb));
|
||||
|
||||
(*(here->B3SOIFDDPdPtr) -= here->B3SOIFDdrainConductance);
|
||||
(*(here->B3SOIFDDPdPtr) -= m * here->B3SOIFDdrainConductance);
|
||||
|
||||
(*(here->B3SOIFDSPgPtr) += gcsgb - Gm + gsspg );
|
||||
(*(here->B3SOIFDSPdpPtr) -= (here->B3SOIFDgds - gsspdp + RevSum - gcsdb));
|
||||
(*(here->B3SOIFDSPspPtr) += (here->B3SOIFDsourceConductance
|
||||
(*(here->B3SOIFDSPgPtr) += m * (gcsgb - Gm + gsspg));
|
||||
(*(here->B3SOIFDSPdpPtr) -= m * (here->B3SOIFDgds - gsspdp + RevSum - gcsdb));
|
||||
(*(here->B3SOIFDSPspPtr) += m * (here->B3SOIFDsourceConductance
|
||||
+ here->B3SOIFDgds + gsspsp
|
||||
+ FwdSum + gcssb));
|
||||
(*(here->B3SOIFDSPsPtr) -= here->B3SOIFDsourceConductance);
|
||||
(*(here->B3SOIFDSPsPtr) -= m * here->B3SOIFDsourceConductance);
|
||||
|
||||
|
||||
(*(here->B3SOIFDDdPtr) += here->B3SOIFDdrainConductance);
|
||||
(*(here->B3SOIFDDdpPtr) -= here->B3SOIFDdrainConductance);
|
||||
(*(here->B3SOIFDDdPtr) += m * here->B3SOIFDdrainConductance);
|
||||
(*(here->B3SOIFDDdpPtr) -= m * here->B3SOIFDdrainConductance);
|
||||
|
||||
|
||||
(*(here->B3SOIFDSsPtr) += here->B3SOIFDsourceConductance);
|
||||
(*(here->B3SOIFDSspPtr) -= here->B3SOIFDsourceConductance);
|
||||
(*(here->B3SOIFDSsPtr) += m * here->B3SOIFDsourceConductance);
|
||||
(*(here->B3SOIFDSspPtr) -= m * here->B3SOIFDsourceConductance);
|
||||
|
||||
if (here->B3SOIFDbodyMod == 1) {
|
||||
(*(here->B3SOIFDBpPtr) -= gppp);
|
||||
(*(here->B3SOIFDPbPtr) += gppb);
|
||||
(*(here->B3SOIFDPpPtr) += gppp);
|
||||
(*(here->B3SOIFDPgPtr) += gppg);
|
||||
(*(here->B3SOIFDPdpPtr) += gppdp);
|
||||
(*(here->B3SOIFDPspPtr) += gppsp);
|
||||
(*(here->B3SOIFDPePtr) += gppe);
|
||||
(*(here->B3SOIFDBpPtr) -= m * gppp);
|
||||
(*(here->B3SOIFDPbPtr) += m * gppb);
|
||||
(*(here->B3SOIFDPpPtr) += m * gppp);
|
||||
(*(here->B3SOIFDPgPtr) += m * gppg);
|
||||
(*(here->B3SOIFDPdpPtr) += m * gppdp);
|
||||
(*(here->B3SOIFDPspPtr) += m * gppsp);
|
||||
(*(here->B3SOIFDPePtr) += m * gppe);
|
||||
}
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
(*(here->B3SOIFDDPtempPtr) += GmT + gddpT + gcdT);
|
||||
(*(here->B3SOIFDSPtempPtr) += -GmT + gsspT + gcsT);
|
||||
(*(here->B3SOIFDBtempPtr) += gbbT + gcbT);
|
||||
(*(here->B3SOIFDEtempPtr) += gceT);
|
||||
(*(here->B3SOIFDGtempPtr) += gcgT);
|
||||
(*(here->B3SOIFDDPtempPtr) += m * (GmT + gddpT + gcdT));
|
||||
(*(here->B3SOIFDSPtempPtr) += m * (-GmT + gsspT + gcsT));
|
||||
(*(here->B3SOIFDBtempPtr) += m * (gbbT + gcbT));
|
||||
(*(here->B3SOIFDEtempPtr) += m * gceT);
|
||||
(*(here->B3SOIFDGtempPtr) += m * gcgT);
|
||||
if (here->B3SOIFDbodyMod == 1) {
|
||||
(*(here->B3SOIFDPtempPtr) += gppT);
|
||||
(*(here->B3SOIFDPtempPtr) += m * gppT);
|
||||
}
|
||||
(*(here->B3SOIFDTemptempPtr) += gTtt + 1/pParam->B3SOIFDrth + gcTt);
|
||||
(*(here->B3SOIFDTempgPtr) += gTtg);
|
||||
(*(here->B3SOIFDTempbPtr) += gTtb);
|
||||
(*(here->B3SOIFDTempePtr) += gTte);
|
||||
(*(here->B3SOIFDTempdpPtr) += gTtdp);
|
||||
(*(here->B3SOIFDTempspPtr) += gTtsp);
|
||||
(*(here->B3SOIFDTemptempPtr) += m * (gTtt + 1/pParam->B3SOIFDrth + gcTt));
|
||||
(*(here->B3SOIFDTempgPtr) += m * gTtg);
|
||||
(*(here->B3SOIFDTempbPtr) += m * gTtb);
|
||||
(*(here->B3SOIFDTempePtr) += m * gTte);
|
||||
(*(here->B3SOIFDTempdpPtr) += m * gTtdp);
|
||||
(*(here->B3SOIFDTempspPtr) += m * gTtsp);
|
||||
}
|
||||
|
||||
if ((here->B3SOIFDdebugMod > 1) || (here->B3SOIFDdebugMod == -1))
|
||||
{
|
||||
*(here->B3SOIFDVbsPtr) += 1;
|
||||
*(here->B3SOIFDIdsPtr) += 1;
|
||||
*(here->B3SOIFDIcPtr) += 1;
|
||||
*(here->B3SOIFDIbsPtr) += 1;
|
||||
*(here->B3SOIFDIbdPtr) += 1;
|
||||
*(here->B3SOIFDIiiPtr) += 1;
|
||||
*(here->B3SOIFDIgidlPtr) += 1;
|
||||
*(here->B3SOIFDItunPtr) += 1;
|
||||
*(here->B3SOIFDIbpPtr) += 1;
|
||||
*(here->B3SOIFDAbeffPtr) += 1;
|
||||
*(here->B3SOIFDVbs0effPtr) += 1;
|
||||
*(here->B3SOIFDVbseffPtr) += 1;
|
||||
*(here->B3SOIFDXcPtr) += 1;
|
||||
*(here->B3SOIFDCbgPtr) += 1;
|
||||
*(here->B3SOIFDCbbPtr) += 1;
|
||||
*(here->B3SOIFDCbdPtr) += 1;
|
||||
*(here->B3SOIFDqbPtr) += 1;
|
||||
*(here->B3SOIFDQbfPtr) += 1;
|
||||
*(here->B3SOIFDQjsPtr) += 1;
|
||||
*(here->B3SOIFDQjdPtr) += 1;
|
||||
*(here->B3SOIFDVbsPtr) += m * 1;
|
||||
*(here->B3SOIFDIdsPtr) += m * 1;
|
||||
*(here->B3SOIFDIcPtr) += m * 1;
|
||||
*(here->B3SOIFDIbsPtr) += m * 1;
|
||||
*(here->B3SOIFDIbdPtr) += m * 1;
|
||||
*(here->B3SOIFDIiiPtr) += m * 1;
|
||||
*(here->B3SOIFDIgidlPtr) += m * 1;
|
||||
*(here->B3SOIFDItunPtr) += m * 1;
|
||||
*(here->B3SOIFDIbpPtr) += m * 1;
|
||||
*(here->B3SOIFDAbeffPtr) += m * 1;
|
||||
*(here->B3SOIFDVbs0effPtr) += m * 1;
|
||||
*(here->B3SOIFDVbseffPtr) += m * 1;
|
||||
*(here->B3SOIFDXcPtr) += m * 1;
|
||||
*(here->B3SOIFDCbgPtr) += m * 1;
|
||||
*(here->B3SOIFDCbbPtr) += m * 1;
|
||||
*(here->B3SOIFDCbdPtr) += m * 1;
|
||||
*(here->B3SOIFDqbPtr) += m * 1;
|
||||
*(here->B3SOIFDQbfPtr) += m * 1;
|
||||
*(here->B3SOIFDQjsPtr) += m * 1;
|
||||
*(here->B3SOIFDQjdPtr) += m * 1;
|
||||
|
||||
/* clean up last */
|
||||
*(here->B3SOIFDGmPtr) += 1;
|
||||
*(here->B3SOIFDGmbsPtr) += 1;
|
||||
*(here->B3SOIFDGdsPtr) += 1;
|
||||
*(here->B3SOIFDGmePtr) += 1;
|
||||
*(here->B3SOIFDVbs0teffPtr) += 1;
|
||||
*(here->B3SOIFDVgsteffPtr) += 1;
|
||||
*(here->B3SOIFDCbePtr) += 1;
|
||||
*(here->B3SOIFDVthPtr) += 1;
|
||||
*(here->B3SOIFDXcsatPtr) += 1;
|
||||
*(here->B3SOIFDVdscvPtr) += 1;
|
||||
*(here->B3SOIFDVcscvPtr) += 1;
|
||||
*(here->B3SOIFDQaccPtr) += 1;
|
||||
*(here->B3SOIFDQsub0Ptr) += 1;
|
||||
*(here->B3SOIFDQsubs1Ptr) += 1;
|
||||
*(here->B3SOIFDQsubs2Ptr) += 1;
|
||||
*(here->B3SOIFDqgPtr) += 1;
|
||||
*(here->B3SOIFDqdPtr) += 1;
|
||||
*(here->B3SOIFDqePtr) += 1;
|
||||
*(here->B3SOIFDDum1Ptr) += 1;
|
||||
*(here->B3SOIFDDum2Ptr) += 1;
|
||||
*(here->B3SOIFDDum3Ptr) += 1;
|
||||
*(here->B3SOIFDDum4Ptr) += 1;
|
||||
*(here->B3SOIFDDum5Ptr) += 1;
|
||||
*(here->B3SOIFDGmPtr) += m * 1;
|
||||
*(here->B3SOIFDGmbsPtr) += m * 1;
|
||||
*(here->B3SOIFDGdsPtr) += m * 1;
|
||||
*(here->B3SOIFDGmePtr) += m * 1;
|
||||
*(here->B3SOIFDVbs0teffPtr) += m * 1;
|
||||
*(here->B3SOIFDVgsteffPtr) += m * 1;
|
||||
*(here->B3SOIFDCbePtr) += m * 1;
|
||||
*(here->B3SOIFDVthPtr) += m * 1;
|
||||
*(here->B3SOIFDXcsatPtr) += m * 1;
|
||||
*(here->B3SOIFDVdscvPtr) += m * 1;
|
||||
*(here->B3SOIFDVcscvPtr) += m * 1;
|
||||
*(here->B3SOIFDQaccPtr) += m * 1;
|
||||
*(here->B3SOIFDQsub0Ptr) += m * 1;
|
||||
*(here->B3SOIFDQsubs1Ptr) += m * 1;
|
||||
*(here->B3SOIFDQsubs2Ptr) += m * 1;
|
||||
*(here->B3SOIFDqgPtr) += m * 1;
|
||||
*(here->B3SOIFDqdPtr) += m * 1;
|
||||
*(here->B3SOIFDqePtr) += m * 1;
|
||||
*(here->B3SOIFDDum1Ptr) += m * 1;
|
||||
*(here->B3SOIFDDum2Ptr) += m * 1;
|
||||
*(here->B3SOIFDDum3Ptr) += m * 1;
|
||||
*(here->B3SOIFDDum4Ptr) += m * 1;
|
||||
*(here->B3SOIFDDum5Ptr) += m * 1;
|
||||
/* end clean up last */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,15 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soifdmask.c 98/5/01
|
||||
Modified by Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ifsim.h"
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
|
|
@ -17,11 +21,7 @@ Modified by Wei Jin 99/9/27
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIFDmAsk(ckt,inst,which,value)
|
||||
CKTcircuit *ckt;
|
||||
GENmodel *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
B3SOIFDmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel *)inst;
|
||||
switch(which)
|
||||
|
|
|
|||
|
|
@ -1,21 +1,22 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdmdel.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "b3soifddef.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIFDmDelete(inModel,modname,kill)
|
||||
GENmodel **inModel;
|
||||
IFuid modname;
|
||||
GENmodel *kill;
|
||||
B3SOIFDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill)
|
||||
{
|
||||
B3SOIFDmodel **model = (B3SOIFDmodel**)inModel;
|
||||
B3SOIFDmodel *modfast = (B3SOIFDmodel*)kill;
|
||||
|
|
|
|||
|
|
@ -4,11 +4,15 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soifdmpar.c 98/5/01
|
||||
Modified by Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "b3soifddef.h"
|
||||
#include "ifsim.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -16,10 +20,7 @@ Modified by Wei Jin 99/9/27
|
|||
|
||||
|
||||
int
|
||||
B3SOIFDmParam(param,value,inMod)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENmodel *inMod;
|
||||
B3SOIFDmParam(int param, IFvalue *value, GENmodel *inMod)
|
||||
{
|
||||
B3SOIFDmodel *mod = (B3SOIFDmodel*)inMod;
|
||||
switch(param)
|
||||
|
|
|
|||
|
|
@ -3,11 +3,15 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: Weidong Liu and Pin Su Feb 1999
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soifdnoi.c 98/5/01
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "b3soifddef.h"
|
||||
#include "cktdefs.h"
|
||||
#include "iferrmsg.h"
|
||||
|
|
@ -45,10 +49,9 @@ extern void NevalSrc();
|
|||
extern double Nintegrate();
|
||||
|
||||
double
|
||||
B3SOIFDStrongInversionNoiseEval(vgs, vds, model, here, freq, temp)
|
||||
double vgs, vds, freq, temp;
|
||||
B3SOIFDmodel *model;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDStrongInversionNoiseEval(double vgs, double vds, B3SOIFDmodel *model,
|
||||
B3SOIFDinstance *here, double freq,
|
||||
double temp)
|
||||
{
|
||||
struct b3soifdSizeDependParam *pParam;
|
||||
double cd, esat, DelClm, EffFreq, N0, Nl, Vgst;
|
||||
|
|
@ -56,7 +59,7 @@ double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
|
|||
double req, ceq;
|
||||
|
||||
pParam = here->pParam;
|
||||
cd = fabs(here->B3SOIFDcd);
|
||||
cd = fabs(here->B3SOIFDcd) * here->B3SOIFDm;
|
||||
if (vds > here->B3SOIFDvdsat)
|
||||
{ esat = 2.0 * pParam->B3SOIFDvsattemp / here->B3SOIFDueff;
|
||||
T0 = ((((vds - here->B3SOIFDvdsat) / pParam->B3SOIFDlitl) + model->B3SOIFDem)
|
||||
|
|
@ -84,7 +87,7 @@ double req, ceq;
|
|||
|
||||
T6 = 8.62e-5 * temp * cd * cd;
|
||||
T7 = 1.0e8 * EffFreq * pParam->B3SOIFDleff
|
||||
* pParam->B3SOIFDleff * pParam->B3SOIFDweff;
|
||||
* pParam->B3SOIFDleff * pParam->B3SOIFDweff * here->B3SOIFDm;
|
||||
T8 = model->B3SOIFDoxideTrapDensityA + model->B3SOIFDoxideTrapDensityB * Nl
|
||||
+ model->B3SOIFDoxideTrapDensityC * Nl * Nl;
|
||||
T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
|
||||
|
|
@ -95,15 +98,11 @@ double req, ceq;
|
|||
}
|
||||
|
||||
int
|
||||
B3SOIFDnoise (mode, operation, inModel, ckt, data, OnDens)
|
||||
int mode, operation;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
Ndata *data;
|
||||
double *OnDens;
|
||||
B3SOIFDnoise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt,
|
||||
Ndata *data, double *OnDens)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel *)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel *)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
struct b3soifdSizeDependParam *pParam;
|
||||
char name[N_MXVLNTH];
|
||||
double tempOnoise;
|
||||
|
|
@ -134,7 +133,12 @@ int error, i;
|
|||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{ pParam = here->pParam;
|
||||
{
|
||||
|
||||
if (here->B3SOIFDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
{ case N_OPEN:
|
||||
/* see if we have to to produce a summary report */
|
||||
|
|
@ -202,12 +206,12 @@ int error, i;
|
|||
NevalSrc(&noizDens[B3SOIFDRDNOIZ],
|
||||
&lnNdens[B3SOIFDRDNOIZ], ckt, THERMNOISE,
|
||||
here->B3SOIFDdNodePrime, here->B3SOIFDdNode,
|
||||
here->B3SOIFDdrainConductance);
|
||||
here->B3SOIFDdrainConductance * here->B3SOIFDm);
|
||||
|
||||
NevalSrc(&noizDens[B3SOIFDRSNOIZ],
|
||||
&lnNdens[B3SOIFDRSNOIZ], ckt, THERMNOISE,
|
||||
here->B3SOIFDsNodePrime, here->B3SOIFDsNode,
|
||||
here->B3SOIFDsourceConductance);
|
||||
here->B3SOIFDsourceConductance * here->B3SOIFDm);
|
||||
|
||||
switch( model->B3SOIFDnoiMod )
|
||||
{ case 1:
|
||||
|
|
@ -216,9 +220,10 @@ int error, i;
|
|||
&lnNdens[B3SOIFDIDNOIZ], ckt,
|
||||
THERMNOISE, here->B3SOIFDdNodePrime,
|
||||
here->B3SOIFDsNodePrime,
|
||||
(2.0 / 3.0 * fabs(here->B3SOIFDgm
|
||||
(2.0 / 3.0 * fabs(here->B3SOIFDm *
|
||||
(here->B3SOIFDgm
|
||||
+ here->B3SOIFDgds
|
||||
+ here->B3SOIFDgmbs)));
|
||||
+ here->B3SOIFDgmbs))));
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
|
|
@ -227,7 +232,7 @@ int error, i;
|
|||
THERMNOISE, here->B3SOIFDdNodePrime,
|
||||
here->B3SOIFDsNodePrime,
|
||||
(here->B3SOIFDueff
|
||||
* fabs(here->B3SOIFDqinv
|
||||
* fabs((here->B3SOIFDqinv * here->B3SOIFDm)
|
||||
/ (pParam->B3SOIFDleff
|
||||
* pParam->B3SOIFDleff))));
|
||||
break;
|
||||
|
|
@ -241,7 +246,7 @@ int error, i;
|
|||
case 4:
|
||||
noizDens[B3SOIFDFLNOIZ] *= model->B3SOIFDkf
|
||||
* exp(model->B3SOIFDaf
|
||||
* log(MAX(fabs(here->B3SOIFDcd),
|
||||
* log(MAX(fabs(here->B3SOIFDcd * here->B3SOIFDm),
|
||||
N_MINLOG)))
|
||||
/ (pow(data->freq, model->B3SOIFDef)
|
||||
* pParam->B3SOIFDleff
|
||||
|
|
@ -266,12 +271,12 @@ int error, i;
|
|||
{ pParam = here->pParam;
|
||||
T10 = model->B3SOIFDoxideTrapDensityA
|
||||
* 8.62e-5 * ckt->CKTtemp;
|
||||
T11 = pParam->B3SOIFDweff
|
||||
T11 = pParam->B3SOIFDweff * here->B3SOIFDm
|
||||
* pParam->B3SOIFDleff
|
||||
* pow(data->freq, model->B3SOIFDef)
|
||||
* 4.0e36;
|
||||
Swi = T10 / T11 * here->B3SOIFDcd
|
||||
* here->B3SOIFDcd;
|
||||
Swi = T10 / T11 * here->B3SOIFDcd * here->B3SOIFDm
|
||||
* here->B3SOIFDcd * here->B3SOIFDm;
|
||||
Slimit = B3SOIFDStrongInversionNoiseEval(
|
||||
here->B3SOIFDvon + 0.1, vds, model,
|
||||
here, data->freq, ckt->CKTtemp);
|
||||
|
|
|
|||
|
|
@ -1,23 +1,24 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdpar.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "ifsim.h"
|
||||
#include "b3soifddef.h"
|
||||
#include "sperror.h"
|
||||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIFDparam(param,value,inst,select)
|
||||
int param;
|
||||
IFvalue *value;
|
||||
GENinstance *inst;
|
||||
IFvalue *select;
|
||||
B3SOIFDparam(int param, IFvalue *value, GENinstance *inst,
|
||||
IFvalue *select)
|
||||
{
|
||||
B3SOIFDinstance *here = (B3SOIFDinstance*)inst;
|
||||
switch(param)
|
||||
|
|
@ -29,6 +30,10 @@ IFvalue *select;
|
|||
here->B3SOIFDl = value->rValue;
|
||||
here->B3SOIFDlGiven = TRUE;
|
||||
break;
|
||||
case B3SOIFD_M:
|
||||
here->B3SOIFDm = value->rValue;
|
||||
here->B3SOIFDmGiven = TRUE;
|
||||
break;
|
||||
case B3SOIFD_AS:
|
||||
here->B3SOIFDsourceArea = value->rValue;
|
||||
here->B3SOIFDsourceAreaGiven = TRUE;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdpzld.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "complex.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -14,24 +18,27 @@ File: b3soifdpzld.c 98/5/01
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIFDpzLoad(inModel,ckt,s)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
SPcomplex *s;
|
||||
B3SOIFDpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb;
|
||||
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb;
|
||||
double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb;
|
||||
double GSoverlapCap, GDoverlapCap, GBoverlapCap;
|
||||
double FwdSum, RevSum, Gm, Gmbs;
|
||||
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here!= NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
if (here->B3SOIFDmode >= 0)
|
||||
|
||||
if (here->B3SOIFDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
if (here->B3SOIFDmode >= 0)
|
||||
{ Gm = here->B3SOIFDgm;
|
||||
Gmbs = here->B3SOIFDgmbs;
|
||||
FwdSum = Gm + Gmbs;
|
||||
|
|
@ -93,56 +100,57 @@ double FwdSum, RevSum, Gm, Gmbs;
|
|||
xcbdb = (cbdb - capbd);
|
||||
xcbsb = (cbsb - capbs);
|
||||
|
||||
m = here->B3SOIFDm;
|
||||
|
||||
*(here->B3SOIFDGgPtr ) += xcggb * s->real;
|
||||
*(here->B3SOIFDGgPtr +1) += xcggb * s->imag;
|
||||
*(here->B3SOIFDBbPtr ) += (-xcbgb-xcbdb-xcbsb) * s->real;
|
||||
*(here->B3SOIFDBbPtr +1) += (-xcbgb-xcbdb-xcbsb) * s->imag;
|
||||
*(here->B3SOIFDDPdpPtr ) += xcddb * s->real;
|
||||
*(here->B3SOIFDDPdpPtr +1) += xcddb * s->imag;
|
||||
*(here->B3SOIFDSPspPtr ) += xcssb * s->real;
|
||||
*(here->B3SOIFDSPspPtr +1) += xcssb * s->imag;
|
||||
*(here->B3SOIFDGbPtr ) += (-xcggb-xcgdb-xcgsb) * s->real;
|
||||
*(here->B3SOIFDGbPtr +1) += (-xcggb-xcgdb-xcgsb) * s->imag;
|
||||
*(here->B3SOIFDGdpPtr ) += xcgdb * s->real;
|
||||
*(here->B3SOIFDGdpPtr +1) += xcgdb * s->imag;
|
||||
*(here->B3SOIFDGspPtr ) += xcgsb * s->real;
|
||||
*(here->B3SOIFDGspPtr +1) += xcgsb * s->imag;
|
||||
*(here->B3SOIFDBgPtr ) += xcbgb * s->real;
|
||||
*(here->B3SOIFDBgPtr +1) += xcbgb * s->imag;
|
||||
*(here->B3SOIFDBdpPtr ) += xcbdb * s->real;
|
||||
*(here->B3SOIFDBdpPtr +1) += xcbdb * s->imag;
|
||||
*(here->B3SOIFDBspPtr ) += xcbsb * s->real;
|
||||
*(here->B3SOIFDBspPtr +1) += xcbsb * s->imag;
|
||||
*(here->B3SOIFDDPgPtr ) += xcdgb * s->real;
|
||||
*(here->B3SOIFDDPgPtr +1) += xcdgb * s->imag;
|
||||
*(here->B3SOIFDDPbPtr ) += (-xcdgb-xcddb-xcdsb) * s->real;
|
||||
*(here->B3SOIFDDPbPtr +1) += (-xcdgb-xcddb-xcdsb) * s->imag;
|
||||
*(here->B3SOIFDDPspPtr ) += xcdsb * s->real;
|
||||
*(here->B3SOIFDDPspPtr +1) += xcdsb * s->imag;
|
||||
*(here->B3SOIFDSPgPtr ) += xcsgb * s->real;
|
||||
*(here->B3SOIFDSPgPtr +1) += xcsgb * s->imag;
|
||||
*(here->B3SOIFDSPbPtr ) += (-xcsgb-xcsdb-xcssb) * s->real;
|
||||
*(here->B3SOIFDSPbPtr +1) += (-xcsgb-xcsdb-xcssb) * s->imag;
|
||||
*(here->B3SOIFDSPdpPtr ) += xcsdb * s->real;
|
||||
*(here->B3SOIFDSPdpPtr +1) += xcsdb * s->imag;
|
||||
*(here->B3SOIFDDdPtr) += gdpr;
|
||||
*(here->B3SOIFDSsPtr) += gspr;
|
||||
*(here->B3SOIFDBbPtr) += gbd+gbs;
|
||||
*(here->B3SOIFDDPdpPtr) += gdpr+gds+gbd+RevSum;
|
||||
*(here->B3SOIFDSPspPtr) += gspr+gds+gbs+FwdSum;
|
||||
*(here->B3SOIFDDdpPtr) -= gdpr;
|
||||
*(here->B3SOIFDSspPtr) -= gspr;
|
||||
*(here->B3SOIFDBdpPtr) -= gbd;
|
||||
*(here->B3SOIFDBspPtr) -= gbs;
|
||||
*(here->B3SOIFDDPdPtr) -= gdpr;
|
||||
*(here->B3SOIFDDPgPtr) += Gm;
|
||||
*(here->B3SOIFDDPbPtr) -= gbd - Gmbs;
|
||||
*(here->B3SOIFDDPspPtr) -= gds + FwdSum;
|
||||
*(here->B3SOIFDSPgPtr) -= Gm;
|
||||
*(here->B3SOIFDSPsPtr) -= gspr;
|
||||
*(here->B3SOIFDSPbPtr) -= gbs + Gmbs;
|
||||
*(here->B3SOIFDSPdpPtr) -= gds + RevSum;
|
||||
*(here->B3SOIFDGgPtr ) += m * (xcggb * s->real);
|
||||
*(here->B3SOIFDGgPtr +1) += m * (xcggb * s->imag);
|
||||
*(here->B3SOIFDBbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real);
|
||||
*(here->B3SOIFDBbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag);
|
||||
*(here->B3SOIFDDPdpPtr ) += m * (xcddb * s->real);
|
||||
*(here->B3SOIFDDPdpPtr +1) += m * (xcddb * s->imag);
|
||||
*(here->B3SOIFDSPspPtr ) += m * (xcssb * s->real);
|
||||
*(here->B3SOIFDSPspPtr +1) += m * (xcssb * s->imag);
|
||||
*(here->B3SOIFDGbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real);
|
||||
*(here->B3SOIFDGbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag);
|
||||
*(here->B3SOIFDGdpPtr ) += m * (xcgdb * s->real);
|
||||
*(here->B3SOIFDGdpPtr +1) += m * (xcgdb * s->imag);
|
||||
*(here->B3SOIFDGspPtr ) += m * (xcgsb * s->real);
|
||||
*(here->B3SOIFDGspPtr +1) += m * (xcgsb * s->imag);
|
||||
*(here->B3SOIFDBgPtr ) += m * (xcbgb * s->real);
|
||||
*(here->B3SOIFDBgPtr +1) += m * (xcbgb * s->imag);
|
||||
*(here->B3SOIFDBdpPtr ) += m * (xcbdb * s->real);
|
||||
*(here->B3SOIFDBdpPtr +1) += m * (xcbdb * s->imag);
|
||||
*(here->B3SOIFDBspPtr ) += m * (xcbsb * s->real);
|
||||
*(here->B3SOIFDBspPtr +1) += m * (xcbsb * s->imag);
|
||||
*(here->B3SOIFDDPgPtr ) += m * (xcdgb * s->real);
|
||||
*(here->B3SOIFDDPgPtr +1) += m * (xcdgb * s->imag);
|
||||
*(here->B3SOIFDDPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real);
|
||||
*(here->B3SOIFDDPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag);
|
||||
*(here->B3SOIFDDPspPtr ) += m * (xcdsb * s->real);
|
||||
*(here->B3SOIFDDPspPtr +1) += m * (xcdsb * s->imag);
|
||||
*(here->B3SOIFDSPgPtr ) += m * (xcsgb * s->real);
|
||||
*(here->B3SOIFDSPgPtr +1) += m * (xcsgb * s->imag);
|
||||
*(here->B3SOIFDSPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real);
|
||||
*(here->B3SOIFDSPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag);
|
||||
*(here->B3SOIFDSPdpPtr ) += m * (xcsdb * s->real);
|
||||
*(here->B3SOIFDSPdpPtr +1) += m * (xcsdb * s->imag);
|
||||
*(here->B3SOIFDDdPtr) += m * gdpr;
|
||||
*(here->B3SOIFDSsPtr) += m * gspr;
|
||||
*(here->B3SOIFDBbPtr) += m * (gbd + gbs);
|
||||
*(here->B3SOIFDDPdpPtr) += m * (gdpr + gds + gbd + RevSum);
|
||||
*(here->B3SOIFDSPspPtr) += m * (gspr + gds + gbs + FwdSum);
|
||||
*(here->B3SOIFDDdpPtr) -= m * gdpr;
|
||||
*(here->B3SOIFDSspPtr) -= m * gspr;
|
||||
*(here->B3SOIFDBdpPtr) -= m * gbd;
|
||||
*(here->B3SOIFDBspPtr) -= m * gbs;
|
||||
*(here->B3SOIFDDPdPtr) -= m * gdpr;
|
||||
*(here->B3SOIFDDPgPtr) += m * Gm;
|
||||
*(here->B3SOIFDDPbPtr) -= m * (gbd - Gmbs);
|
||||
*(here->B3SOIFDDPspPtr) -= m * (gds + FwdSum);
|
||||
*(here->B3SOIFDSPgPtr) -= m * Gm;
|
||||
*(here->B3SOIFDSPsPtr) -= m * gspr;
|
||||
*(here->B3SOIFDSPbPtr) -= m * (gbs + Gmbs);
|
||||
*(here->B3SOIFDSPdpPtr) -= m * (gds + RevSum);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,15 @@ Author: Weidong Liu and Pin Su Feb 1999
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soifdset.c 98/5/01
|
||||
Modified by Pin Su, Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
|
|
@ -28,14 +31,11 @@ Modified by Pin Su, Wei Jin 99/9/27
|
|||
#define Meter2Micron 1.0e6
|
||||
|
||||
int
|
||||
B3SOIFDsetup(matrix,inModel,ckt,states)
|
||||
SMPmatrix *matrix;
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
int *states;
|
||||
B3SOIFDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
|
||||
int *states)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
int error;
|
||||
CKTnode *tmp;
|
||||
|
||||
|
|
@ -43,6 +43,10 @@ double tmp1, tmp2;
|
|||
double nfb0, Cboxt;
|
||||
int itmp1;
|
||||
|
||||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
||||
|
||||
/* loop through all the B3SOIFD device models */
|
||||
for( ; model != NULL; model = model->B3SOIFDnextModel )
|
||||
{
|
||||
|
|
@ -874,10 +878,16 @@ int itmp1;
|
|||
/* loop through all the instances of the model */
|
||||
for (here = model->B3SOIFDinstances; here != NULL ;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
{ /* allocate a chunk of the state vector */
|
||||
here->B3SOIFDstates = *states;
|
||||
*states += B3SOIFDnumStates;
|
||||
/* perform the parameter defaulting */
|
||||
{
|
||||
|
||||
if (here->B3SOIFDowner == ARCHme)
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B3SOIFDstates = *states;
|
||||
*states += B3SOIFDnumStates;
|
||||
}
|
||||
|
||||
/* perform the parameter defaulting */
|
||||
if (!here->B3SOIFDdrainAreaGiven)
|
||||
here->B3SOIFDdrainArea = 0.0;
|
||||
if (!here->B3SOIFDdrainPerimeterGiven)
|
||||
|
|
@ -915,6 +925,9 @@ int itmp1;
|
|||
if (!here->B3SOIFDwGiven)
|
||||
here->B3SOIFDw = 5e-6;
|
||||
|
||||
if (!here->B3SOIFDmGiven)
|
||||
here->B3SOIFDm = 1;
|
||||
|
||||
if (!here->B3SOIFDoffGiven)
|
||||
here->B3SOIFDoff = 0;
|
||||
|
||||
|
|
@ -926,6 +939,16 @@ int itmp1;
|
|||
{ error = CKTmkVolt(ckt,&tmp,here->B3SOIFDname,"drain");
|
||||
if(error) return(error);
|
||||
here->B3SOIFDdNodePrime = tmp->number;
|
||||
|
||||
if (ckt->CKTcopyNodesets) {
|
||||
if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) {
|
||||
if (tmpNode->nsGiven) {
|
||||
tmp->nodeset=tmpNode->nodeset;
|
||||
tmp->nsGiven=tmpNode->nsGiven;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{ here->B3SOIFDdNodePrime = here->B3SOIFDdNode;
|
||||
|
|
@ -938,6 +961,16 @@ int itmp1;
|
|||
{ error = CKTmkVolt(ckt,&tmp,here->B3SOIFDname,"source");
|
||||
if(error) return(error);
|
||||
here->B3SOIFDsNodePrime = tmp->number;
|
||||
|
||||
if (ckt->CKTcopyNodesets) {
|
||||
if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) {
|
||||
if (tmpNode->nsGiven) {
|
||||
tmp->nodeset=tmpNode->nodeset;
|
||||
tmp->nsGiven=tmpNode->nsGiven;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{ here->B3SOIFDsNodePrime = here->B3SOIFDsNode;
|
||||
|
|
@ -1307,11 +1340,8 @@ if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
|
|||
}
|
||||
|
||||
int
|
||||
B3SOIFDunsetup(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIFDunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
#ifndef HAS_BATCHSIM
|
||||
B3SOIFDmodel *model;
|
||||
B3SOIFDinstance *here;
|
||||
|
||||
|
|
@ -1335,7 +1365,6 @@ B3SOIFDunsetup(inModel,ckt)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,17 @@ Copyright 1999 Regents of the University of California. All rights reserved.
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soifdtemp.c 98/5/01
|
||||
Modified by Pin Su, Wei Jin 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
/* Lmin, Lmax, Wmin, Wmax */
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "smpdefs.h"
|
||||
#include "cktdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
|
|
@ -30,12 +34,10 @@ Modified by Pin Su, Wei Jin 99/9/27
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
B3SOIFDtemp(inModel,ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIFDtemp(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*) inModel;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*) inModel;
|
||||
B3SOIFDinstance *here;
|
||||
struct b3soifdSizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam;
|
||||
double tmp, tmp1, tmp2, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, T6, Ldrn, Wdrn;
|
||||
double Temp, TRatio, Inv_L, Inv_W, Inv_LW, Dw, Dl, Vtm0, Tnom;
|
||||
|
|
@ -72,7 +74,11 @@ int Size_Not_Found;
|
|||
for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
here->B3SOIFDrbodyext = here->B3SOIFDbodySquares *
|
||||
|
||||
if (here->B3SOIFDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
here->B3SOIFDrbodyext = here->B3SOIFDbodySquares *
|
||||
model->B3SOIFDrbsh;
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
Size_Not_Found = 1;
|
||||
|
|
@ -91,7 +97,7 @@ int Size_Not_Found;
|
|||
}
|
||||
|
||||
if (Size_Not_Found)
|
||||
{ pParam = (struct b3soifdSizeDependParam *)malloc(
|
||||
{ pParam = (struct b3soifdSizeDependParam *)tmalloc(
|
||||
sizeof(struct b3soifdSizeDependParam));
|
||||
if (pLastKnot == NULL)
|
||||
model->pSizeDependParamKnot = pParam;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
/**********
|
||||
Copyright 1999 Regents of the University of California. All rights reserved.
|
||||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
Modified by Paolo Nenzi 2002
|
||||
File: b3soifdtrunc.c 98/5/01
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.1 99/9/27 Pin Su
|
||||
* BSIMFD2.1 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soifddef.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,13 +18,10 @@ File: b3soifdtrunc.c 98/5/01
|
|||
|
||||
|
||||
int
|
||||
B3SOIFDtrunc(inModel,ckt,timeStep)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
double *timeStep;
|
||||
B3SOIFDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
||||
{
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
double debugtemp;
|
||||
|
|
@ -31,6 +31,10 @@ double *timeStep;
|
|||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
|
||||
if (here->B3SOIFDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
#endif /* STEPDEBUG */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -4,10 +4,15 @@ Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
|||
File: b3soipdacld.c 98/5/01
|
||||
Modified by Pin Su 99/4/30
|
||||
Modified by Pin Su 99/9/27
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.2.3 02/3/5 Pin Su
|
||||
* BSIMPD2.2.3 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include "cktdefs.h"
|
||||
#include "b3soipddef.h"
|
||||
#include "sperror.h"
|
||||
|
|
@ -15,344 +20,339 @@ Modified by Pin Su 99/9/27
|
|||
|
||||
|
||||
int
|
||||
B3SOIPDacLoad (inModel, ckt)
|
||||
GENmodel *inModel;
|
||||
CKTcircuit *ckt;
|
||||
B3SOIPDacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||
{
|
||||
B3SOIPDmodel *model = (B3SOIPDmodel *) inModel;
|
||||
B3SOIPDinstance *here;
|
||||
int selfheat;
|
||||
double xcggb, xcgdb, xcgsb, xcgeb, xcgT;
|
||||
double xcdgb, xcddb, xcdsb, xcdeb, xcdT;
|
||||
double xcsgb, xcsdb, xcssb, xcseb, xcsT;
|
||||
double xcbgb, xcbdb, xcbsb, xcbeb, xcbT;
|
||||
double xcegb, xceeb, xceT;
|
||||
double gdpr, gspr, gds;
|
||||
double cggb, cgdb, cgsb, cgT;
|
||||
double cdgb, cddb, cdsb, cdeb, cdT;
|
||||
double cbgb, cbdb, cbsb, cbeb, cbT;
|
||||
double ceeb, ceT;
|
||||
double GSoverlapCap, GDoverlapCap, GEoverlapCap, FwdSum, RevSum, Gm, Gmbs,
|
||||
GmT;
|
||||
double omega;
|
||||
double dxpart, sxpart;
|
||||
double gbbg, gbbdp, gbbb, gbbp, gbbsp, gbbT;
|
||||
double gddpg, gddpdp, gddpsp, gddpb, gddpT;
|
||||
double gsspg, gsspdp, gsspsp, gsspb, gsspT;
|
||||
double gppdp, gppb, gppp, gppT;
|
||||
double xcTt, cTt, gcTt, gTtt, gTtg, gTtb, gTtdp, gTtsp;
|
||||
double EDextrinsicCap, ESextrinsicCap;
|
||||
double xcedb, xcesb;
|
||||
B3SOIPDmodel *model = (B3SOIPDmodel*)inModel;
|
||||
B3SOIPDinstance *here;
|
||||
int selfheat;
|
||||
double xcggb, xcgdb, xcgsb, xcgeb, xcgT;
|
||||
double xcdgb, xcddb, xcdsb, xcdeb, xcdT;
|
||||
double xcsgb, xcsdb, xcssb, xcseb, xcsT;
|
||||
double xcbgb, xcbdb, xcbsb, xcbeb, xcbT;
|
||||
double xcegb, xceeb, xceT;
|
||||
double gdpr, gspr, gds;
|
||||
double cggb, cgdb, cgsb, cgT;
|
||||
double cdgb, cddb, cdsb, cdeb, cdT;
|
||||
double cbgb, cbdb, cbsb, cbeb, cbT;
|
||||
double ceeb, ceT;
|
||||
double GSoverlapCap, GDoverlapCap, GEoverlapCap, FwdSum, RevSum, Gm, Gmbs, GmT;
|
||||
double omega;
|
||||
double dxpart, sxpart;
|
||||
double gbbg, gbbdp, gbbb, gbbp, gbbsp, gbbT;
|
||||
double gddpg, gddpdp, gddpsp, gddpb, gddpT;
|
||||
double gsspg, gsspdp, gsspsp, gsspb, gsspT;
|
||||
double gppdp, gppb, gppp, gppT;
|
||||
double xcTt, cTt, gcTt, gTtt, gTtg, gTtb, gTtdp, gTtsp;
|
||||
double EDextrinsicCap, ESextrinsicCap;
|
||||
double xcedb, xcesb;
|
||||
|
||||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{
|
||||
|
||||
for (here = model->B3SOIPDinstances; here!= NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
{
|
||||
|
||||
if (here->B3SOIPDowner != ARCHme)
|
||||
continue;
|
||||
|
||||
selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0);
|
||||
if (here->B3SOIPDmode >= 0)
|
||||
{ Gm = here->B3SOIPDgm;
|
||||
Gmbs = here->B3SOIPDgmbs;
|
||||
GmT = model->B3SOIPDtype * here->B3SOIPDgmT;
|
||||
FwdSum = Gm + Gmbs;
|
||||
RevSum = 0.0;
|
||||
|
||||
cbgb = here->B3SOIPDcbgb;
|
||||
cbsb = here->B3SOIPDcbsb;
|
||||
cbdb = here->B3SOIPDcbdb;
|
||||
cbeb = here->B3SOIPDcbeb;
|
||||
cbT = model->B3SOIPDtype * here->B3SOIPDcbT;
|
||||
|
||||
ceeb = here->B3SOIPDceeb;
|
||||
ceT = model->B3SOIPDtype * here->B3SOIPDceT;
|
||||
|
||||
cggb = here->B3SOIPDcggb;
|
||||
cgsb = here->B3SOIPDcgsb;
|
||||
cgdb = here->B3SOIPDcgdb;
|
||||
cgT = model->B3SOIPDtype * here->B3SOIPDcgT;
|
||||
|
||||
cdgb = here->B3SOIPDcdgb;
|
||||
cdsb = here->B3SOIPDcdsb;
|
||||
cddb = here->B3SOIPDcddb;
|
||||
cdeb = here->B3SOIPDcdeb;
|
||||
cdT = model->B3SOIPDtype * here->B3SOIPDcdT;
|
||||
|
||||
cTt = here->pParam->B3SOIPDcth;
|
||||
|
||||
gbbg = -here->B3SOIPDgbgs;
|
||||
gbbdp = -here->B3SOIPDgbds;
|
||||
gbbb = -here->B3SOIPDgbbs;
|
||||
gbbp = -here->B3SOIPDgbps;
|
||||
gbbT = -model->B3SOIPDtype * here->B3SOIPDgbT;
|
||||
gbbsp = - ( gbbg + gbbdp + gbbb + gbbp);
|
||||
|
||||
gddpg = -here->B3SOIPDgjdg;
|
||||
gddpdp = -here->B3SOIPDgjdd;
|
||||
gddpb = -here->B3SOIPDgjdb;
|
||||
gddpT = -model->B3SOIPDtype * here->B3SOIPDgjdT;
|
||||
gddpsp = - ( gddpg + gddpdp + gddpb );
|
||||
|
||||
gsspg = -here->B3SOIPDgjsg;
|
||||
gsspdp = -here->B3SOIPDgjsd;
|
||||
gsspb = -here->B3SOIPDgjsb;
|
||||
gsspT = -model->B3SOIPDtype * here->B3SOIPDgjsT;
|
||||
gsspsp = - (gsspg + gsspdp + gsspb );
|
||||
|
||||
gppdp = 0;
|
||||
gppb = -here->B3SOIPDgbpbs;
|
||||
gppp = -here->B3SOIPDgbpps;
|
||||
gppT = -model->B3SOIPDtype * here->B3SOIPDgbpT;
|
||||
|
||||
gTtg = here->B3SOIPDgtempg;
|
||||
gTtb = here->B3SOIPDgtempb;
|
||||
gTtdp = here->B3SOIPDgtempd;
|
||||
gTtt = here->B3SOIPDgtempT;
|
||||
gTtsp = - (gTtg + gTtb + gTtdp);
|
||||
|
||||
sxpart = 0.6;
|
||||
dxpart = 0.4;
|
||||
|
||||
}
|
||||
else
|
||||
{ Gm = -here->B3SOIPDgm;
|
||||
Gmbs = -here->B3SOIPDgmbs;
|
||||
GmT = -model->B3SOIPDtype * here->B3SOIPDgmT;
|
||||
FwdSum = 0.0;
|
||||
RevSum = -Gm - Gmbs ;
|
||||
|
||||
cdgb = - (here->B3SOIPDcdgb + here->B3SOIPDcggb + here->B3SOIPDcbgb);
|
||||
cdsb = - (here->B3SOIPDcddb + here->B3SOIPDcgdb + here->B3SOIPDcbdb);
|
||||
cddb = - (here->B3SOIPDcdsb + here->B3SOIPDcgsb + here->B3SOIPDcbsb);
|
||||
cdeb = - (here->B3SOIPDcdeb + here->B3SOIPDcbeb + here->B3SOIPDceeb);
|
||||
cdT = - model->B3SOIPDtype * (here->B3SOIPDcgT + here->B3SOIPDcbT
|
||||
+ here->B3SOIPDcdT + here->B3SOIPDceT);
|
||||
|
||||
ceeb = here->B3SOIPDceeb;
|
||||
ceT = model->B3SOIPDtype * here->B3SOIPDceT;
|
||||
|
||||
cggb = here->B3SOIPDcggb;
|
||||
cgsb = here->B3SOIPDcgdb;
|
||||
cgdb = here->B3SOIPDcgsb;
|
||||
cgT = model->B3SOIPDtype * here->B3SOIPDcgT;
|
||||
|
||||
cbgb = here->B3SOIPDcbgb;
|
||||
cbsb = here->B3SOIPDcbdb;
|
||||
cbdb = here->B3SOIPDcbsb;
|
||||
cbeb = here->B3SOIPDcbeb;
|
||||
cbT = model->B3SOIPDtype * here->B3SOIPDcbT;
|
||||
|
||||
cTt = here->pParam->B3SOIPDcth;
|
||||
|
||||
gbbg = -here->B3SOIPDgbgs;
|
||||
gbbb = -here->B3SOIPDgbbs;
|
||||
gbbp = -here->B3SOIPDgbps;
|
||||
gbbsp = -here->B3SOIPDgbds;
|
||||
gbbT = -model->B3SOIPDtype * here->B3SOIPDgbT;
|
||||
gbbdp = - ( gbbg + gbbsp + gbbb + gbbp);
|
||||
|
||||
gddpg = -here->B3SOIPDgjsg;
|
||||
gddpsp = -here->B3SOIPDgjsd;
|
||||
gddpb = -here->B3SOIPDgjsb;
|
||||
gddpT = -model->B3SOIPDtype * here->B3SOIPDgjsT;
|
||||
gddpdp = - (gddpg + gddpsp + gddpb );
|
||||
|
||||
gsspg = -here->B3SOIPDgjdg;
|
||||
gsspsp = -here->B3SOIPDgjdd;
|
||||
gsspb = -here->B3SOIPDgjdb;
|
||||
gsspT = -model->B3SOIPDtype * here->B3SOIPDgjdT;
|
||||
gsspdp = - ( gsspg + gsspsp + gsspb );
|
||||
|
||||
gppb = -here->B3SOIPDgbpbs;
|
||||
gppp = -here->B3SOIPDgbpps;
|
||||
gppT = -model->B3SOIPDtype * here->B3SOIPDgbpT;
|
||||
gppdp = - (gppb + gppp);
|
||||
|
||||
gTtt = here->B3SOIPDgtempT;
|
||||
gTtg = here->B3SOIPDgtempg;
|
||||
gTtb = here->B3SOIPDgtempb;
|
||||
gTtdp = here->B3SOIPDgtempd;
|
||||
gTtsp = - (gTtt + gTtg + gTtb + gTtdp);
|
||||
|
||||
gTtg = here->B3SOIPDgtempg;
|
||||
gTtb = here->B3SOIPDgtempb;
|
||||
gTtsp = here->B3SOIPDgtempd;
|
||||
gTtt = here->B3SOIPDgtempT;
|
||||
gTtdp = - (gTtg + gTtb + gTtsp);
|
||||
|
||||
sxpart = 0.6;
|
||||
sxpart = 0.4;
|
||||
dxpart = 0.6;
|
||||
}
|
||||
|
||||
gdpr=here->B3SOIPDdrainConductance;
|
||||
gspr=here->B3SOIPDsourceConductance;
|
||||
gds= here->B3SOIPDgds;
|
||||
|
||||
GSoverlapCap = here->B3SOIPDcgso;
|
||||
GDoverlapCap = here->B3SOIPDcgdo;
|
||||
GEoverlapCap = here->pParam->B3SOIPDcgeo;
|
||||
|
||||
EDextrinsicCap = here->B3SOIPDgcde;
|
||||
ESextrinsicCap = here->B3SOIPDgcse;
|
||||
xcedb = -EDextrinsicCap * omega;
|
||||
xcdeb = (cdeb - EDextrinsicCap) * omega;
|
||||
xcddb = (cddb + GDoverlapCap + EDextrinsicCap) * omega;
|
||||
xceeb = (ceeb + GEoverlapCap + EDextrinsicCap + ESextrinsicCap) * omega;
|
||||
xcesb = -ESextrinsicCap * omega;
|
||||
xcssb = (GSoverlapCap + ESextrinsicCap - (cgsb + cbsb + cdsb)) * omega;
|
||||
|
||||
xcseb = -(cbeb + cdeb + ceeb + ESextrinsicCap) * omega;
|
||||
|
||||
xcegb = (- GEoverlapCap) * omega;
|
||||
xceT = ceT * omega;
|
||||
xcggb = (cggb + GDoverlapCap + GSoverlapCap + GEoverlapCap)
|
||||
* omega;
|
||||
xcgdb = (cgdb - GDoverlapCap ) * omega;
|
||||
xcgsb = (cgsb - GSoverlapCap) * omega;
|
||||
xcgeb = (- GEoverlapCap) * omega;
|
||||
xcgT = cgT * omega;
|
||||
|
||||
xcdgb = (cdgb - GDoverlapCap) * omega;
|
||||
xcdsb = cdsb * omega;
|
||||
xcdT = cdT * omega;
|
||||
|
||||
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega;
|
||||
xcsdb = -(cgdb + cbdb + cddb) * omega;
|
||||
xcsT = -(cgT + cbT + cdT + ceT) * omega;
|
||||
|
||||
xcbgb = cbgb * omega;
|
||||
xcbdb = cbdb * omega;
|
||||
xcbsb = cbsb * omega;
|
||||
xcbeb = cbeb * omega;
|
||||
xcbT = cbT * omega;
|
||||
|
||||
xcTt = cTt * omega;
|
||||
|
||||
m = here->B3SOIPDm;
|
||||
|
||||
*(here->B3SOIPDEdpPtr +1) += m * xcedb;
|
||||
*(here->B3SOIPDEspPtr +1) += m * xcesb;
|
||||
*(here->B3SOIPDDPePtr +1) += m * xcdeb;
|
||||
*(here->B3SOIPDSPePtr +1) += m * xcseb;
|
||||
*(here->B3SOIPDEgPtr +1) += m * xcegb;
|
||||
*(here->B3SOIPDGePtr +1) += m * xcgeb;
|
||||
|
||||
*(here->B3SOIPDEePtr +1) += m * xceeb;
|
||||
|
||||
*(here->B3SOIPDGgPtr +1) += m * xcggb;
|
||||
*(here->B3SOIPDGdpPtr +1) += m * xcgdb;
|
||||
*(here->B3SOIPDGspPtr +1) += m * xcgsb;
|
||||
|
||||
*(here->B3SOIPDDPgPtr +1) += m * xcdgb;
|
||||
*(here->B3SOIPDDPdpPtr +1) += m * xcddb;
|
||||
*(here->B3SOIPDDPspPtr +1) += m * xcdsb;
|
||||
|
||||
*(here->B3SOIPDSPgPtr +1) += m * xcsgb;
|
||||
*(here->B3SOIPDSPdpPtr +1) += m * xcsdb;
|
||||
*(here->B3SOIPDSPspPtr +1) += m * xcssb;
|
||||
|
||||
*(here->B3SOIPDBePtr +1) += m * xcbeb;
|
||||
*(here->B3SOIPDBgPtr +1) += m * xcbgb;
|
||||
*(here->B3SOIPDBdpPtr +1) += m * xcbdb;
|
||||
*(here->B3SOIPDBspPtr +1) += m * xcbsb;
|
||||
|
||||
*(here->B3SOIPDEbPtr +1) -= m * (xcegb + xceeb + xcedb + xcesb);
|
||||
|
||||
*(here->B3SOIPDGbPtr +1) -= m * (xcggb + xcgdb + xcgsb + xcgeb);
|
||||
*(here->B3SOIPDDPbPtr +1) -= m * (xcdgb + xcddb + xcdsb + xcdeb);
|
||||
*(here->B3SOIPDSPbPtr +1) -= m * (xcsgb + xcsdb + xcssb + xcseb);
|
||||
*(here->B3SOIPDBbPtr +1) -= m * (xcbgb + xcbdb + xcbsb + xcbeb);
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
*(here->B3SOIPDTemptempPtr + 1) += m * xcTt;
|
||||
*(here->B3SOIPDDPtempPtr + 1) += m * xcdT;
|
||||
*(here->B3SOIPDSPtempPtr + 1) += m * xcsT;
|
||||
*(here->B3SOIPDBtempPtr + 1) += m * xcbT;
|
||||
*(here->B3SOIPDEtempPtr + 1) += m * xceT;
|
||||
*(here->B3SOIPDGtempPtr + 1) += m * xcgT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
*(here->B3SOIPDEePtr) += 0.0;
|
||||
|
||||
*(here->B3SOIPDDPgPtr) += m * (Gm + gddpg);
|
||||
*(here->B3SOIPDDPdpPtr) += m * (gdpr + gds + gddpdp + RevSum);
|
||||
*(here->B3SOIPDDPspPtr) -= m * (gds + FwdSum - gddpsp);
|
||||
*(here->B3SOIPDDPdPtr) -= m * gdpr;
|
||||
|
||||
*(here->B3SOIPDSPgPtr) -= m * (Gm - gsspg);
|
||||
*(here->B3SOIPDSPdpPtr) -= m * (gds + RevSum - gsspdp);
|
||||
*(here->B3SOIPDSPspPtr) += m * (gspr + gds + FwdSum + gsspsp);
|
||||
*(here->B3SOIPDSPsPtr) -= m * gspr;
|
||||
|
||||
*(here->B3SOIPDBePtr) += 0;
|
||||
*(here->B3SOIPDBgPtr) += m * gbbg;
|
||||
*(here->B3SOIPDBdpPtr) += m * gbbdp;
|
||||
*(here->B3SOIPDBspPtr) += m * gbbsp;
|
||||
*(here->B3SOIPDBbPtr) += m * gbbb;
|
||||
*(here->B3SOIPDEbPtr) += 0.0;
|
||||
*(here->B3SOIPDSPbPtr) -= m * Gmbs - gsspb;
|
||||
*(here->B3SOIPDDPbPtr) -= m * (-gddpb - Gmbs);
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
*(here->B3SOIPDDPtempPtr) += m * (GmT + gddpT);
|
||||
*(here->B3SOIPDSPtempPtr) += m * (-GmT + gsspT);
|
||||
*(here->B3SOIPDBtempPtr) += m * gbbT;
|
||||
|
||||
*(here->B3SOIPDTemptempPtr) += m * (gTtt + 1/here->pParam->B3SOIPDrth);
|
||||
*(here->B3SOIPDTempgPtr) += m * gTtg;
|
||||
*(here->B3SOIPDTempbPtr) += m * gTtb;
|
||||
*(here->B3SOIPDTempdpPtr) += m * gTtdp;
|
||||
*(here->B3SOIPDTempspPtr) += m * gTtsp;
|
||||
}
|
||||
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{
|
||||
|
||||
for (here = model->B3SOIPDinstances; here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
{
|
||||
selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0);
|
||||
if (here->B3SOIPDmode >= 0)
|
||||
{
|
||||
Gm = here->B3SOIPDgm;
|
||||
Gmbs = here->B3SOIPDgmbs;
|
||||
GmT = model->B3SOIPDtype * here->B3SOIPDgmT;
|
||||
FwdSum = Gm + Gmbs;
|
||||
RevSum = 0.0;
|
||||
|
||||
cbgb = here->B3SOIPDcbgb;
|
||||
cbsb = here->B3SOIPDcbsb;
|
||||
cbdb = here->B3SOIPDcbdb;
|
||||
cbeb = here->B3SOIPDcbeb;
|
||||
cbT = model->B3SOIPDtype * here->B3SOIPDcbT;
|
||||
|
||||
ceeb = here->B3SOIPDceeb;
|
||||
ceT = model->B3SOIPDtype * here->B3SOIPDceT;
|
||||
|
||||
cggb = here->B3SOIPDcggb;
|
||||
cgsb = here->B3SOIPDcgsb;
|
||||
cgdb = here->B3SOIPDcgdb;
|
||||
cgT = model->B3SOIPDtype * here->B3SOIPDcgT;
|
||||
|
||||
cdgb = here->B3SOIPDcdgb;
|
||||
cdsb = here->B3SOIPDcdsb;
|
||||
cddb = here->B3SOIPDcddb;
|
||||
cdeb = here->B3SOIPDcdeb;
|
||||
cdT = model->B3SOIPDtype * here->B3SOIPDcdT;
|
||||
|
||||
cTt = here->pParam->B3SOIPDcth;
|
||||
|
||||
gbbg = -here->B3SOIPDgbgs;
|
||||
gbbdp = -here->B3SOIPDgbds;
|
||||
gbbb = -here->B3SOIPDgbbs;
|
||||
gbbp = -here->B3SOIPDgbps;
|
||||
gbbT = -model->B3SOIPDtype * here->B3SOIPDgbT;
|
||||
gbbsp = -(gbbg + gbbdp + gbbb + gbbp);
|
||||
|
||||
gddpg = -here->B3SOIPDgjdg;
|
||||
gddpdp = -here->B3SOIPDgjdd;
|
||||
gddpb = -here->B3SOIPDgjdb;
|
||||
gddpT = -model->B3SOIPDtype * here->B3SOIPDgjdT;
|
||||
gddpsp = -(gddpg + gddpdp + gddpb);
|
||||
|
||||
gsspg = -here->B3SOIPDgjsg;
|
||||
gsspdp = -here->B3SOIPDgjsd;
|
||||
gsspb = -here->B3SOIPDgjsb;
|
||||
gsspT = -model->B3SOIPDtype * here->B3SOIPDgjsT;
|
||||
gsspsp = -(gsspg + gsspdp + gsspb);
|
||||
|
||||
gppdp = 0;
|
||||
gppb = -here->B3SOIPDgbpbs;
|
||||
gppp = -here->B3SOIPDgbpps;
|
||||
gppT = -model->B3SOIPDtype * here->B3SOIPDgbpT;
|
||||
|
||||
gTtg = here->B3SOIPDgtempg;
|
||||
gTtb = here->B3SOIPDgtempb;
|
||||
gTtdp = here->B3SOIPDgtempd;
|
||||
gTtt = here->B3SOIPDgtempT;
|
||||
gTtsp = -(gTtg + gTtb + gTtdp);
|
||||
|
||||
sxpart = 0.6;
|
||||
dxpart = 0.4;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Gm = -here->B3SOIPDgm;
|
||||
Gmbs = -here->B3SOIPDgmbs;
|
||||
GmT = -model->B3SOIPDtype * here->B3SOIPDgmT;
|
||||
FwdSum = 0.0;
|
||||
RevSum = -Gm - Gmbs;
|
||||
|
||||
cdgb =
|
||||
-(here->B3SOIPDcdgb + here->B3SOIPDcggb + here->B3SOIPDcbgb);
|
||||
cdsb =
|
||||
-(here->B3SOIPDcddb + here->B3SOIPDcgdb + here->B3SOIPDcbdb);
|
||||
cddb =
|
||||
-(here->B3SOIPDcdsb + here->B3SOIPDcgsb + here->B3SOIPDcbsb);
|
||||
cdeb =
|
||||
-(here->B3SOIPDcdeb + here->B3SOIPDcbeb + here->B3SOIPDceeb);
|
||||
cdT =
|
||||
-model->B3SOIPDtype * (here->B3SOIPDcgT + here->B3SOIPDcbT +
|
||||
here->B3SOIPDcdT + here->B3SOIPDceT);
|
||||
|
||||
ceeb = here->B3SOIPDceeb;
|
||||
ceT = model->B3SOIPDtype * here->B3SOIPDceT;
|
||||
|
||||
cggb = here->B3SOIPDcggb;
|
||||
cgsb = here->B3SOIPDcgdb;
|
||||
cgdb = here->B3SOIPDcgsb;
|
||||
cgT = model->B3SOIPDtype * here->B3SOIPDcgT;
|
||||
|
||||
cbgb = here->B3SOIPDcbgb;
|
||||
cbsb = here->B3SOIPDcbdb;
|
||||
cbdb = here->B3SOIPDcbsb;
|
||||
cbeb = here->B3SOIPDcbeb;
|
||||
cbT = model->B3SOIPDtype * here->B3SOIPDcbT;
|
||||
|
||||
cTt = here->pParam->B3SOIPDcth;
|
||||
|
||||
gbbg = -here->B3SOIPDgbgs;
|
||||
gbbb = -here->B3SOIPDgbbs;
|
||||
gbbp = -here->B3SOIPDgbps;
|
||||
gbbsp = -here->B3SOIPDgbds;
|
||||
gbbT = -model->B3SOIPDtype * here->B3SOIPDgbT;
|
||||
gbbdp = -(gbbg + gbbsp + gbbb + gbbp);
|
||||
|
||||
gddpg = -here->B3SOIPDgjsg;
|
||||
gddpsp = -here->B3SOIPDgjsd;
|
||||
gddpb = -here->B3SOIPDgjsb;
|
||||
gddpT = -model->B3SOIPDtype * here->B3SOIPDgjsT;
|
||||
gddpdp = -(gddpg + gddpsp + gddpb);
|
||||
|
||||
gsspg = -here->B3SOIPDgjdg;
|
||||
gsspsp = -here->B3SOIPDgjdd;
|
||||
gsspb = -here->B3SOIPDgjdb;
|
||||
gsspT = -model->B3SOIPDtype * here->B3SOIPDgjdT;
|
||||
gsspdp = -(gsspg + gsspsp + gsspb);
|
||||
|
||||
gppb = -here->B3SOIPDgbpbs;
|
||||
gppp = -here->B3SOIPDgbpps;
|
||||
gppT = -model->B3SOIPDtype * here->B3SOIPDgbpT;
|
||||
gppdp = -(gppb + gppp);
|
||||
|
||||
gTtt = here->B3SOIPDgtempT;
|
||||
gTtg = here->B3SOIPDgtempg;
|
||||
gTtb = here->B3SOIPDgtempb;
|
||||
gTtdp = here->B3SOIPDgtempd;
|
||||
gTtsp = -(gTtt + gTtg + gTtb + gTtdp);
|
||||
|
||||
gTtg = here->B3SOIPDgtempg;
|
||||
gTtb = here->B3SOIPDgtempb;
|
||||
gTtsp = here->B3SOIPDgtempd;
|
||||
gTtt = here->B3SOIPDgtempT;
|
||||
gTtdp = -(gTtg + gTtb + gTtsp);
|
||||
|
||||
sxpart = 0.6;
|
||||
sxpart = 0.4;
|
||||
dxpart = 0.6;
|
||||
}
|
||||
|
||||
gdpr = here->B3SOIPDdrainConductance;
|
||||
gspr = here->B3SOIPDsourceConductance;
|
||||
gds = here->B3SOIPDgds;
|
||||
|
||||
GSoverlapCap = here->B3SOIPDcgso;
|
||||
GDoverlapCap = here->B3SOIPDcgdo;
|
||||
GEoverlapCap = here->pParam->B3SOIPDcgeo;
|
||||
|
||||
EDextrinsicCap = here->B3SOIPDgcde;
|
||||
ESextrinsicCap = here->B3SOIPDgcse;
|
||||
xcedb = -EDextrinsicCap * omega;
|
||||
xcdeb = (cdeb - EDextrinsicCap) * omega;
|
||||
xcddb = (cddb + GDoverlapCap + EDextrinsicCap) * omega;
|
||||
xceeb =
|
||||
(ceeb + GEoverlapCap + EDextrinsicCap + ESextrinsicCap) * omega;
|
||||
xcesb = -ESextrinsicCap * omega;
|
||||
xcssb =
|
||||
(GSoverlapCap + ESextrinsicCap - (cgsb + cbsb + cdsb)) * omega;
|
||||
|
||||
xcseb = -(cbeb + cdeb + ceeb + ESextrinsicCap) * omega;
|
||||
|
||||
xcegb = (-GEoverlapCap) * omega;
|
||||
xceT = ceT * omega;
|
||||
xcggb = (cggb + GDoverlapCap + GSoverlapCap + GEoverlapCap) * omega;
|
||||
xcgdb = (cgdb - GDoverlapCap) * omega;
|
||||
xcgsb = (cgsb - GSoverlapCap) * omega;
|
||||
xcgeb = (-GEoverlapCap) * omega;
|
||||
xcgT = cgT * omega;
|
||||
|
||||
xcdgb = (cdgb - GDoverlapCap) * omega;
|
||||
xcdsb = cdsb * omega;
|
||||
xcdT = cdT * omega;
|
||||
|
||||
xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega;
|
||||
xcsdb = -(cgdb + cbdb + cddb) * omega;
|
||||
xcsT = -(cgT + cbT + cdT + ceT) * omega;
|
||||
|
||||
xcbgb = cbgb * omega;
|
||||
xcbdb = cbdb * omega;
|
||||
xcbsb = cbsb * omega;
|
||||
xcbeb = cbeb * omega;
|
||||
xcbT = cbT * omega;
|
||||
|
||||
xcTt = cTt * omega;
|
||||
|
||||
*(here->B3SOIPDEdpPtr + 1) += xcedb;
|
||||
*(here->B3SOIPDEspPtr + 1) += xcesb;
|
||||
*(here->B3SOIPDDPePtr + 1) += xcdeb;
|
||||
*(here->B3SOIPDSPePtr + 1) += xcseb;
|
||||
*(here->B3SOIPDEgPtr + 1) += xcegb;
|
||||
*(here->B3SOIPDGePtr + 1) += xcgeb;
|
||||
|
||||
*(here->B3SOIPDEePtr + 1) += xceeb;
|
||||
|
||||
*(here->B3SOIPDGgPtr + 1) += xcggb;
|
||||
*(here->B3SOIPDGdpPtr + 1) += xcgdb;
|
||||
*(here->B3SOIPDGspPtr + 1) += xcgsb;
|
||||
|
||||
*(here->B3SOIPDDPgPtr + 1) += xcdgb;
|
||||
*(here->B3SOIPDDPdpPtr + 1) += xcddb;
|
||||
*(here->B3SOIPDDPspPtr + 1) += xcdsb;
|
||||
|
||||
*(here->B3SOIPDSPgPtr + 1) += xcsgb;
|
||||
*(here->B3SOIPDSPdpPtr + 1) += xcsdb;
|
||||
*(here->B3SOIPDSPspPtr + 1) += xcssb;
|
||||
|
||||
*(here->B3SOIPDBePtr + 1) += xcbeb;
|
||||
*(here->B3SOIPDBgPtr + 1) += xcbgb;
|
||||
*(here->B3SOIPDBdpPtr + 1) += xcbdb;
|
||||
*(here->B3SOIPDBspPtr + 1) += xcbsb;
|
||||
|
||||
*(here->B3SOIPDEbPtr + 1) -= xcegb + xceeb + xcedb + xcesb;
|
||||
|
||||
*(here->B3SOIPDGbPtr + 1) -= xcggb + xcgdb + xcgsb + xcgeb;
|
||||
*(here->B3SOIPDDPbPtr + 1) -= xcdgb + xcddb + xcdsb + xcdeb;
|
||||
*(here->B3SOIPDSPbPtr + 1) -= xcsgb + xcsdb + xcssb + xcseb;
|
||||
*(here->B3SOIPDBbPtr + 1) -= xcbgb + xcbdb + xcbsb + xcbeb;
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
*(here->B3SOIPDTemptempPtr + 1) += xcTt;
|
||||
*(here->B3SOIPDDPtempPtr + 1) += xcdT;
|
||||
*(here->B3SOIPDSPtempPtr + 1) += xcsT;
|
||||
*(here->B3SOIPDBtempPtr + 1) += xcbT;
|
||||
*(here->B3SOIPDEtempPtr + 1) += xceT;
|
||||
*(here->B3SOIPDGtempPtr + 1) += xcgT;
|
||||
}
|
||||
*(here->B3SOIPDDdPtr) += m * gdpr;
|
||||
*(here->B3SOIPDDdpPtr) -= m * gdpr;
|
||||
*(here->B3SOIPDSsPtr) += m * gspr;
|
||||
*(here->B3SOIPDSspPtr) -= m * gspr;
|
||||
|
||||
|
||||
if (here->B3SOIPDbodyMod == 1) {
|
||||
(*(here->B3SOIPDBpPtr) -= m * gppp);
|
||||
(*(here->B3SOIPDPbPtr) += m * gppb);
|
||||
(*(here->B3SOIPDPpPtr) += m * gppp);
|
||||
}
|
||||
if (here->B3SOIPDdebugMod != 0)
|
||||
{
|
||||
*(here->B3SOIPDVbsPtr) += m * 1;
|
||||
*(here->B3SOIPDIdsPtr) += m * 1;
|
||||
*(here->B3SOIPDIcPtr) += m * 1;
|
||||
*(here->B3SOIPDIbsPtr) += m * 1;
|
||||
*(here->B3SOIPDIbdPtr) += m * 1;
|
||||
*(here->B3SOIPDIiiPtr) += m * 1;
|
||||
*(here->B3SOIPDIgidlPtr) += m * 1;
|
||||
*(here->B3SOIPDItunPtr) += m * 1;
|
||||
*(here->B3SOIPDIbpPtr) += m * 1;
|
||||
*(here->B3SOIPDCbgPtr) += m * 1;
|
||||
*(here->B3SOIPDCbbPtr) += m * 1;
|
||||
*(here->B3SOIPDCbdPtr) += m * 1;
|
||||
*(here->B3SOIPDQbfPtr) += m * 1;
|
||||
*(here->B3SOIPDQjsPtr) += m * 1;
|
||||
*(here->B3SOIPDQjdPtr) += m * 1;
|
||||
|
||||
*(here->B3SOIPDEePtr) += 0.0;
|
||||
}
|
||||
|
||||
*(here->B3SOIPDDPgPtr) += Gm + gddpg;
|
||||
*(here->B3SOIPDDPdpPtr) += gdpr + gds + gddpdp + RevSum;
|
||||
*(here->B3SOIPDDPspPtr) -= gds + FwdSum - gddpsp;
|
||||
*(here->B3SOIPDDPdPtr) -= gdpr;
|
||||
|
||||
*(here->B3SOIPDSPgPtr) -= Gm - gsspg;
|
||||
*(here->B3SOIPDSPdpPtr) -= gds + RevSum - gsspdp;
|
||||
*(here->B3SOIPDSPspPtr) += gspr + gds + FwdSum + gsspsp;
|
||||
*(here->B3SOIPDSPsPtr) -= gspr;
|
||||
|
||||
*(here->B3SOIPDBePtr) += 0;
|
||||
*(here->B3SOIPDBgPtr) += gbbg;
|
||||
*(here->B3SOIPDBdpPtr) += gbbdp;
|
||||
*(here->B3SOIPDBspPtr) += gbbsp;
|
||||
*(here->B3SOIPDBbPtr) += gbbb;
|
||||
*(here->B3SOIPDEbPtr) += 0.0;
|
||||
*(here->B3SOIPDSPbPtr) -= Gmbs - gsspb;
|
||||
*(here->B3SOIPDDPbPtr) -= (-gddpb - Gmbs);
|
||||
|
||||
if (selfheat)
|
||||
{
|
||||
*(here->B3SOIPDDPtempPtr) += GmT + gddpT;
|
||||
*(here->B3SOIPDSPtempPtr) += -GmT + gsspT;
|
||||
*(here->B3SOIPDBtempPtr) += gbbT;
|
||||
|
||||
*(here->B3SOIPDTemptempPtr) +=
|
||||
gTtt + 1 / here->pParam->B3SOIPDrth;
|
||||
*(here->B3SOIPDTempgPtr) += gTtg;
|
||||
*(here->B3SOIPDTempbPtr) += gTtb;
|
||||
*(here->B3SOIPDTempdpPtr) += gTtdp;
|
||||
*(here->B3SOIPDTempspPtr) += gTtsp;
|
||||
}
|
||||
|
||||
|
||||
*(here->B3SOIPDDdPtr) += gdpr;
|
||||
*(here->B3SOIPDDdpPtr) -= gdpr;
|
||||
*(here->B3SOIPDSsPtr) += gspr;
|
||||
*(here->B3SOIPDSspPtr) -= gspr;
|
||||
|
||||
|
||||
if (here->B3SOIPDbodyMod == 1)
|
||||
{
|
||||
(*(here->B3SOIPDBpPtr) -= gppp);
|
||||
(*(here->B3SOIPDPbPtr) += gppb);
|
||||
(*(here->B3SOIPDPpPtr) += gppp);
|
||||
}
|
||||
if (here->B3SOIPDdebugMod != 0)
|
||||
{
|
||||
*(here->B3SOIPDVbsPtr) += 1;
|
||||
*(here->B3SOIPDIdsPtr) += 1;
|
||||
*(here->B3SOIPDIcPtr) += 1;
|
||||
*(here->B3SOIPDIbsPtr) += 1;
|
||||
*(here->B3SOIPDIbdPtr) += 1;
|
||||
*(here->B3SOIPDIiiPtr) += 1;
|
||||
*(here->B3SOIPDIgidlPtr) += 1;
|
||||
*(here->B3SOIPDItunPtr) += 1;
|
||||
*(here->B3SOIPDIbpPtr) += 1;
|
||||
*(here->B3SOIPDCbgPtr) += 1;
|
||||
*(here->B3SOIPDCbbPtr) += 1;
|
||||
*(here->B3SOIPDCbdPtr) += 1;
|
||||
*(here->B3SOIPDQbfPtr) += 1;
|
||||
*(here->B3SOIPDQjsPtr) += 1;
|
||||
*(here->B3SOIPDQjdPtr) += 1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return (OK);
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,16 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
|
||||
File: b3soipdask.c 98/5/01
|
||||
Modified by Pin Su 99/4/30
|
||||
Modified by Pin Su 01/2/15
|
||||
Modified by Paolo Nenzi 2002
|
||||
**********/
|
||||
|
||||
/*
|
||||
* Revision 2.2.3 02/3/5 Pin Su
|
||||
* BSIMPD2.2.3 release
|
||||
*/
|
||||
|
||||
#include "ngspice.h"
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "ifsim.h"
|
||||
#include "cktdefs.h"
|
||||
#include "devdefs.h"
|
||||
|
|
@ -17,228 +21,259 @@ Modified by Pin Su 99/4/30
|
|||
#include "suffix.h"
|
||||
|
||||
int
|
||||
B3SOIPDask (ckt, inst, which, value, select)
|
||||
CKTcircuit *ckt;
|
||||
GENinstance *inst;
|
||||
int which;
|
||||
IFvalue *value;
|
||||
IFvalue *select;
|
||||
B3SOIPDask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
||||
IFvalue *select)
|
||||
{
|
||||
B3SOIPDinstance *here = (B3SOIPDinstance *) inst;
|
||||
B3SOIPDinstance *here = (B3SOIPDinstance*)inst;
|
||||
|
||||
switch (which)
|
||||
{
|
||||
case B3SOIPD_L:
|
||||
value->rValue = here->B3SOIPDl;
|
||||
return (OK);
|
||||
case B3SOIPD_W:
|
||||
value->rValue = here->B3SOIPDw;
|
||||
return (OK);
|
||||
case B3SOIPD_AS:
|
||||
value->rValue = here->B3SOIPDsourceArea;
|
||||
return (OK);
|
||||
case B3SOIPD_AD:
|
||||
value->rValue = here->B3SOIPDdrainArea;
|
||||
return (OK);
|
||||
case B3SOIPD_PS:
|
||||
value->rValue = here->B3SOIPDsourcePerimeter;
|
||||
return (OK);
|
||||
case B3SOIPD_PD:
|
||||
value->rValue = here->B3SOIPDdrainPerimeter;
|
||||
return (OK);
|
||||
case B3SOIPD_NRS:
|
||||
value->rValue = here->B3SOIPDsourceSquares;
|
||||
return (OK);
|
||||
case B3SOIPD_NRD:
|
||||
value->rValue = here->B3SOIPDdrainSquares;
|
||||
return (OK);
|
||||
case B3SOIPD_OFF:
|
||||
value->iValue = here->B3SOIPDoff;
|
||||
return (OK);
|
||||
case B3SOIPD_BJTOFF:
|
||||
value->iValue = here->B3SOIPDbjtoff;
|
||||
return (OK);
|
||||
case B3SOIPD_RTH0:
|
||||
value->rValue = here->B3SOIPDrth0;
|
||||
return (OK);
|
||||
case B3SOIPD_CTH0:
|
||||
value->rValue = here->B3SOIPDcth0;
|
||||
return (OK);
|
||||
case B3SOIPD_NRB:
|
||||
value->rValue = here->B3SOIPDbodySquares;
|
||||
return (OK);
|
||||
switch(which)
|
||||
{ case B3SOIPD_L:
|
||||
value->rValue = here->B3SOIPDl;
|
||||
return(OK);
|
||||
case B3SOIPD_W:
|
||||
value->rValue = here->B3SOIPDw;
|
||||
return(OK);
|
||||
case B3SOIPD_M:
|
||||
value->rValue = here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_AS:
|
||||
value->rValue = here->B3SOIPDsourceArea;
|
||||
return(OK);
|
||||
case B3SOIPD_AD:
|
||||
value->rValue = here->B3SOIPDdrainArea;
|
||||
return(OK);
|
||||
case B3SOIPD_PS:
|
||||
value->rValue = here->B3SOIPDsourcePerimeter;
|
||||
return(OK);
|
||||
case B3SOIPD_PD:
|
||||
value->rValue = here->B3SOIPDdrainPerimeter;
|
||||
return(OK);
|
||||
case B3SOIPD_NRS:
|
||||
value->rValue = here->B3SOIPDsourceSquares;
|
||||
return(OK);
|
||||
case B3SOIPD_NRD:
|
||||
value->rValue = here->B3SOIPDdrainSquares;
|
||||
return(OK);
|
||||
case B3SOIPD_OFF:
|
||||
value->iValue = here->B3SOIPDoff;
|
||||
return(OK);
|
||||
case B3SOIPD_BJTOFF:
|
||||
value->iValue = here->B3SOIPDbjtoff;
|
||||
return(OK);
|
||||
case B3SOIPD_RTH0:
|
||||
value->rValue = here->B3SOIPDrth0;
|
||||
value->rValue /= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CTH0:
|
||||
value->rValue = here->B3SOIPDcth0;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_NRB:
|
||||
value->rValue = here->B3SOIPDbodySquares;
|
||||
return(OK);
|
||||
case B3SOIPD_FRBODY:
|
||||
value->rValue = here->B3SOIPDfrbody;
|
||||
return(OK);
|
||||
|
||||
|
||||
/* v2.0 release */
|
||||
case B3SOIPD_NBC:
|
||||
value->rValue = here->B3SOIPDnbc;
|
||||
return (OK);
|
||||
case B3SOIPD_NSEG:
|
||||
value->rValue = here->B3SOIPDnseg;
|
||||
return (OK);
|
||||
case B3SOIPD_PDBCP:
|
||||
value->rValue = here->B3SOIPDpdbcp;
|
||||
return (OK);
|
||||
case B3SOIPD_PSBCP:
|
||||
value->rValue = here->B3SOIPDpsbcp;
|
||||
return (OK);
|
||||
case B3SOIPD_AGBCP:
|
||||
value->rValue = here->B3SOIPDagbcp;
|
||||
return (OK);
|
||||
case B3SOIPD_AEBCP:
|
||||
value->rValue = here->B3SOIPDaebcp;
|
||||
return (OK);
|
||||
case B3SOIPD_VBSUSR:
|
||||
value->rValue = here->B3SOIPDvbsusr;
|
||||
return (OK);
|
||||
case B3SOIPD_TNODEOUT:
|
||||
value->iValue = here->B3SOIPDtnodeout;
|
||||
return (OK);
|
||||
case B3SOIPD_NBC:
|
||||
value->rValue = here->B3SOIPDnbc;
|
||||
return(OK);
|
||||
case B3SOIPD_NSEG:
|
||||
value->rValue = here->B3SOIPDnseg;
|
||||
return(OK);
|
||||
case B3SOIPD_PDBCP:
|
||||
value->rValue = here->B3SOIPDpdbcp;
|
||||
return(OK);
|
||||
case B3SOIPD_PSBCP:
|
||||
value->rValue = here->B3SOIPDpsbcp;
|
||||
return(OK);
|
||||
case B3SOIPD_AGBCP:
|
||||
value->rValue = here->B3SOIPDagbcp;
|
||||
return(OK);
|
||||
case B3SOIPD_AEBCP:
|
||||
value->rValue = here->B3SOIPDaebcp;
|
||||
return(OK);
|
||||
case B3SOIPD_VBSUSR:
|
||||
value->rValue = here->B3SOIPDvbsusr;
|
||||
return(OK);
|
||||
case B3SOIPD_TNODEOUT:
|
||||
value->iValue = here->B3SOIPDtnodeout;
|
||||
return(OK);
|
||||
|
||||
|
||||
case B3SOIPD_IC_VBS:
|
||||
value->rValue = here->B3SOIPDicVBS;
|
||||
return (OK);
|
||||
case B3SOIPD_IC_VDS:
|
||||
value->rValue = here->B3SOIPDicVDS;
|
||||
return (OK);
|
||||
case B3SOIPD_IC_VGS:
|
||||
value->rValue = here->B3SOIPDicVGS;
|
||||
return (OK);
|
||||
case B3SOIPD_IC_VES:
|
||||
value->rValue = here->B3SOIPDicVES;
|
||||
return (OK);
|
||||
case B3SOIPD_IC_VPS:
|
||||
value->rValue = here->B3SOIPDicVPS;
|
||||
return (OK);
|
||||
case B3SOIPD_DNODE:
|
||||
value->iValue = here->B3SOIPDdNode;
|
||||
return (OK);
|
||||
case B3SOIPD_GNODE:
|
||||
value->iValue = here->B3SOIPDgNode;
|
||||
return (OK);
|
||||
case B3SOIPD_SNODE:
|
||||
value->iValue = here->B3SOIPDsNode;
|
||||
return (OK);
|
||||
case B3SOIPD_BNODE:
|
||||
value->iValue = here->B3SOIPDbNode;
|
||||
return (OK);
|
||||
case B3SOIPD_ENODE:
|
||||
value->iValue = here->B3SOIPDeNode;
|
||||
return (OK);
|
||||
case B3SOIPD_DNODEPRIME:
|
||||
value->iValue = here->B3SOIPDdNodePrime;
|
||||
return (OK);
|
||||
case B3SOIPD_SNODEPRIME:
|
||||
value->iValue = here->B3SOIPDsNodePrime;
|
||||
return (OK);
|
||||
case B3SOIPD_SOURCECONDUCT:
|
||||
value->rValue = here->B3SOIPDsourceConductance;
|
||||
return (OK);
|
||||
case B3SOIPD_DRAINCONDUCT:
|
||||
value->rValue = here->B3SOIPDdrainConductance;
|
||||
return (OK);
|
||||
case B3SOIPD_VBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvbd);
|
||||
return (OK);
|
||||
case B3SOIPD_VBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvbs);
|
||||
return (OK);
|
||||
case B3SOIPD_VGS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvgs);
|
||||
return (OK);
|
||||
case B3SOIPD_VES:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDves);
|
||||
return (OK);
|
||||
case B3SOIPD_VDS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvds);
|
||||
return (OK);
|
||||
case B3SOIPD_CD:
|
||||
value->rValue = here->B3SOIPDcd;
|
||||
return (OK);
|
||||
case B3SOIPD_CBS:
|
||||
value->rValue = here->B3SOIPDcjs;
|
||||
return (OK);
|
||||
case B3SOIPD_CBD:
|
||||
value->rValue = here->B3SOIPDcjd;
|
||||
return (OK);
|
||||
case B3SOIPD_GM:
|
||||
value->rValue = here->B3SOIPDgm;
|
||||
return (OK);
|
||||
case B3SOIPD_GMID:
|
||||
value->rValue = here->B3SOIPDgm / here->B3SOIPDcd;
|
||||
return (OK);
|
||||
case B3SOIPD_GDS:
|
||||
value->rValue = here->B3SOIPDgds;
|
||||
return (OK);
|
||||
case B3SOIPD_GMBS:
|
||||
value->rValue = here->B3SOIPDgmbs;
|
||||
return (OK);
|
||||
case B3SOIPD_GBD:
|
||||
value->rValue = here->B3SOIPDgjdb;
|
||||
return (OK);
|
||||
case B3SOIPD_GBS:
|
||||
value->rValue = here->B3SOIPDgjsb;
|
||||
return (OK);
|
||||
case B3SOIPD_QB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqb);
|
||||
return (OK);
|
||||
case B3SOIPD_CQB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqb);
|
||||
return (OK);
|
||||
case B3SOIPD_QG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqg);
|
||||
return (OK);
|
||||
case B3SOIPD_CQG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqg);
|
||||
return (OK);
|
||||
case B3SOIPD_QD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqd);
|
||||
return (OK);
|
||||
case B3SOIPD_CQD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqd);
|
||||
return (OK);
|
||||
case B3SOIPD_CGG:
|
||||
value->rValue = here->B3SOIPDcggb;
|
||||
return (OK);
|
||||
case B3SOIPD_CGD:
|
||||
value->rValue = here->B3SOIPDcgdb;
|
||||
return (OK);
|
||||
case B3SOIPD_CGS:
|
||||
value->rValue = here->B3SOIPDcgsb;
|
||||
return (OK);
|
||||
case B3SOIPD_CDG:
|
||||
value->rValue = here->B3SOIPDcdgb;
|
||||
return (OK);
|
||||
case B3SOIPD_CDD:
|
||||
value->rValue = here->B3SOIPDcddb;
|
||||
return (OK);
|
||||
case B3SOIPD_CDS:
|
||||
value->rValue = here->B3SOIPDcdsb;
|
||||
return (OK);
|
||||
case B3SOIPD_CBG:
|
||||
value->rValue = here->B3SOIPDcbgb;
|
||||
return (OK);
|
||||
case B3SOIPD_CBDB:
|
||||
value->rValue = here->B3SOIPDcbdb;
|
||||
return (OK);
|
||||
case B3SOIPD_CBSB:
|
||||
value->rValue = here->B3SOIPDcbsb;
|
||||
return (OK);
|
||||
case B3SOIPD_VON:
|
||||
value->rValue = here->B3SOIPDvon;
|
||||
return (OK);
|
||||
case B3SOIPD_VDSAT:
|
||||
value->rValue = here->B3SOIPDvdsat;
|
||||
return (OK);
|
||||
case B3SOIPD_QBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqbs);
|
||||
return (OK);
|
||||
case B3SOIPD_QBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqbd);
|
||||
return (OK);
|
||||
default:
|
||||
return (E_BADPARM);
|
||||
case B3SOIPD_IC_VBS:
|
||||
value->rValue = here->B3SOIPDicVBS;
|
||||
return(OK);
|
||||
case B3SOIPD_IC_VDS:
|
||||
value->rValue = here->B3SOIPDicVDS;
|
||||
return(OK);
|
||||
case B3SOIPD_IC_VGS:
|
||||
value->rValue = here->B3SOIPDicVGS;
|
||||
return(OK);
|
||||
case B3SOIPD_IC_VES:
|
||||
value->rValue = here->B3SOIPDicVES;
|
||||
return(OK);
|
||||
case B3SOIPD_IC_VPS:
|
||||
value->rValue = here->B3SOIPDicVPS;
|
||||
return(OK);
|
||||
case B3SOIPD_DNODE:
|
||||
value->iValue = here->B3SOIPDdNode;
|
||||
return(OK);
|
||||
case B3SOIPD_GNODE:
|
||||
value->iValue = here->B3SOIPDgNode;
|
||||
return(OK);
|
||||
case B3SOIPD_SNODE:
|
||||
value->iValue = here->B3SOIPDsNode;
|
||||
return(OK);
|
||||
case B3SOIPD_BNODE:
|
||||
value->iValue = here->B3SOIPDbNode;
|
||||
return(OK);
|
||||
case B3SOIPD_ENODE:
|
||||
value->iValue = here->B3SOIPDeNode;
|
||||
return(OK);
|
||||
case B3SOIPD_DNODEPRIME:
|
||||
value->iValue = here->B3SOIPDdNodePrime;
|
||||
return(OK);
|
||||
case B3SOIPD_SNODEPRIME:
|
||||
value->iValue = here->B3SOIPDsNodePrime;
|
||||
return(OK);
|
||||
case B3SOIPD_SOURCECONDUCT:
|
||||
value->rValue = here->B3SOIPDsourceConductance;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_DRAINCONDUCT:
|
||||
value->rValue = here->B3SOIPDdrainConductance;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_VBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvbd);
|
||||
return(OK);
|
||||
case B3SOIPD_VBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvbs);
|
||||
return(OK);
|
||||
case B3SOIPD_VGS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvgs);
|
||||
return(OK);
|
||||
case B3SOIPD_VES:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDves);
|
||||
return(OK);
|
||||
case B3SOIPD_VDS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvds);
|
||||
return(OK);
|
||||
case B3SOIPD_CD:
|
||||
value->rValue = here->B3SOIPDcd;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CBS:
|
||||
value->rValue = here->B3SOIPDcjs;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CBD:
|
||||
value->rValue = here->B3SOIPDcjd;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_GM:
|
||||
value->rValue = here->B3SOIPDgm;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_GMID:
|
||||
value->rValue = here->B3SOIPDgm/here->B3SOIPDcd;
|
||||
return(OK);
|
||||
case B3SOIPD_GDS:
|
||||
value->rValue = here->B3SOIPDgds;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_GMBS:
|
||||
value->rValue = here->B3SOIPDgmbs;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_GBD:
|
||||
value->rValue = here->B3SOIPDgjdb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_GBS:
|
||||
value->rValue = here->B3SOIPDgjsb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_QB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqb);
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CQB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqb);
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_QG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqg);
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CQG:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqg);
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_QD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqd);
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CQD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqd);
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CGG:
|
||||
value->rValue = here->B3SOIPDcggb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CGD:
|
||||
value->rValue = here->B3SOIPDcgdb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CGS:
|
||||
value->rValue = here->B3SOIPDcgsb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CDG:
|
||||
value->rValue = here->B3SOIPDcdgb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CDD:
|
||||
value->rValue = here->B3SOIPDcddb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CDS:
|
||||
value->rValue = here->B3SOIPDcdsb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CBG:
|
||||
value->rValue = here->B3SOIPDcbgb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CBDB:
|
||||
value->rValue = here->B3SOIPDcbdb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_CBSB:
|
||||
value->rValue = here->B3SOIPDcbsb;
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_VON:
|
||||
value->rValue = here->B3SOIPDvon;
|
||||
return(OK);
|
||||
case B3SOIPD_VDSAT:
|
||||
value->rValue = here->B3SOIPDvdsat;
|
||||
return(OK);
|
||||
case B3SOIPD_QBS:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqbs);
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
case B3SOIPD_QBD:
|
||||
value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqbd);
|
||||
value->rValue *= here->B3SOIPDm;
|
||||
return(OK);
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue