new hisimhv model version 2.2.0 in a separate directory

This commit is contained in:
dwarning 2015-03-25 15:17:16 +01:00
parent adcec9fa5f
commit 9ed2da9ad9
43 changed files with 29430 additions and 12 deletions

View File

@ -1097,6 +1097,7 @@ AC_CONFIG_FILES([Makefile
src/spicelib/devices/hfet2/Makefile
src/spicelib/devices/hisim2/Makefile
src/spicelib/devices/hisimhv1/Makefile
src/spicelib/devices/hisimhv2/Makefile
src/spicelib/devices/jfet/Makefile
src/spicelib/devices/jfet2/Makefile
src/spicelib/devices/ltra/Makefile

View File

@ -72,6 +72,7 @@ DYNAMIC_DEVICELIBS = \
spicelib/devices/hfet2/libhfet2.la \
spicelib/devices/hisim2/libhisim2.la \
spicelib/devices/hisimhv1/libhisimhv1.la \
spicelib/devices/hisimhv2/libhisimhv2.la \
spicelib/devices/jfet/libjfet.la \
spicelib/devices/jfet2/libjfet2.la \
spicelib/devices/ltra/libltra.la \

View File

@ -29,6 +29,7 @@ SUBDIRS = \
hfet2 \
hisim2 \
hisimhv1 \
hisimhv2 \
jfet \
jfet2 \
ltra \
@ -89,6 +90,7 @@ DIST_SUBDIRS = \
hfet2 \
hisim2 \
hisimhv1 \
hisimhv2 \
jfet \
jfet2 \
ltra \

View File

@ -95,6 +95,7 @@ int add_udn(int,Evt_Udn_Info_t **);
#include "hfet2/hfet2itf.h"
#include "hisim2/hsm2itf.h"
#include "hisimhv1/hsmhvitf.h"
#include "hisimhv2/hsmhvitf.h"
#include "ind/inditf.h"
#include "isrc/isrcitf.h"
#include "jfet/jfetitf.h"
@ -285,12 +286,12 @@ SPICEdev ** devices(void)
#ifdef ADMS
#define DEVICES_USED {"asrc", "bjt", "vbic", "bsim1", "bsim2", "bsim3", "bsim3v32", "bsim3v2", "bsim3v1", "bsim4", "bsim4v5", "bsim4v6", "bsim4v7", \
"bsim4soi", "bsim3soipd", "bsim3soifd", "bsim3soidd", "hisim2", "hisimhv1", \
"bsim4soi", "bsim3soipd", "bsim3soifd", "bsim3soidd", "hisim2", "hisimhv1", "hisimhv2", \
"cap", "cccs", "ccvs", "csw", "dio", "hfet", "hfet2", "ind", "isrc", "jfet", "ltra", "mes", "mesa" ,"mos1", "mos2", "mos3", \
"mos6", "mos9", "res", "soi3", "sw", "tra", "urc", "vccs", "vcvs", "vsrc", "hicum0", "hicum2", "bjt504t", "ekv", "psp102"}
#else
#define DEVICES_USED {"asrc", "bjt", "vbic", "bsim1", "bsim2", "bsim3", "bsim3v32", "bsim3v2", "bsim3v1", "bsim4", "bsim4v5", "bsim4v6", "bsim4v7", \
"bsim4soi", "bsim3soipd", "bsim3soifd", "bsim3soidd", "hisim2", "hisimhv1", \
"bsim4soi", "bsim3soipd", "bsim3soifd", "bsim3soidd", "hisim2", "hisimhv1", "hisimhv2", \
"cap", "cccs", "ccvs", "csw", "dio", "hfet", "hfet2", "ind", "isrc", "jfet", "ltra", "mes", "mesa" ,"mos1", "mos2", "mos3", \
"mos6", "mos9", "res", "soi3", "sw", "tra", "urc", "vccs", "vcvs", "vsrc"}
#endif

View File

@ -7,8 +7,8 @@
#include "hsmhvinit.h"
SPICEdev HSMHVinfo = {
{ "HiSIMHV",
"Hiroshima University STARC IGFET Model - HiSIM_HV",
{ "HiSIMHV1",
"Hiroshima University STARC IGFET Model - HiSIM_HV v.1",
&HSMHVnSize,
&HSMHVnSize,

View File

@ -0,0 +1,43 @@
## Process this file with automake to produce Makefile.in
noinst_LTLIBRARIES = libhisimhv2.la
libhisimhv2_la_SOURCES = hisimhv.h \
hsmhv.c \
hsmhvacld.c \
hsmhvask.c \
hsmhvcvtest.c \
hsmhvdef.h \
hsmhvdel.c \
hsmhvdest.c \
hsmhveval.c \
hsmhveval_dep.h \
hsmhveval_dio.c \
hsmhveval_qover.h \
hsmhveval_rdrift.c \
hsmhvevalenv.h \
hsmhvext.h \
hsmhvgetic.c \
hsmhvinit.c \
hsmhvinit.h \
hsmhvitf.h \
hsmhvld.c \
hsmhvld_info_eval.h \
hsmhvmask.c \
hsmhvmdel.c \
hsmhvmpar.c \
hsmhvnoi.c \
hsmhvpar.c \
hsmhvpzld.c \
hsmhvset.c \
hsmhvsoachk.c \
hsmhvtemp.c \
hsmhvtemp_eval.h \
hsmhvtemp_eval_dio.h \
hsmhvtemp_eval_rdri.h \
hsmhvtrunc.c
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include
AM_CFLAGS = $(STATIC)
MAINTAINERCLEANFILES = Makefile.in

View File

@ -0,0 +1,140 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hisimhv.h
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "hsmhvdef.h"
#include "ngspice/cktdefs.h"
#ifndef _HiSIMHV_H
#define _HiSIMHV_H
/* return value */
#ifndef OK
#define HiSIM_OK 0
#define HiSIM_ERROR 1
#else
#define HiSIM_OK OK
#define HiSIM_ERROR E_PANIC
#endif
/* MOS type */
#ifndef NMOS
#define NMOS 1
#define PMOS -1
#endif
/* device working mode */
#ifndef CMI_NORMAL_MODE
#define HiSIM_NORMAL_MODE 1
#define HiSIM_REVERSE_MODE -1
#else
#define HiSIM_NORMAL_MODE CMI_NORMAL_MODE
#define HiSIM_REVERSE_MODE CMI_REVERSE_MODE
#endif
/* others */
#ifndef NULL
#define NULL 0
#endif
#define HiSIM_FALSE 0
#define HiSIM_TRUE 1
#ifndef return_if_error
#define return_if_error(s) { int error = s; if(error) return(error); }
#endif
extern int HSMHV2evaluate
(
double ivds,
double ivgs,
double ivbs,
double ivdsi,
double ivgsi,
double ivbsi,
double vbs_jct,
double vbd_jct,
double vsubs,
double vddp,
double deltemp,
HSMHV2instance *here,
HSMHV2model *model,
CKTcircuit *ckt
) ;
extern int HSMHV2rdrift
(
double vddp,
double ivds,
double ivbs,
double vsubs,
double deltemp,
HSMHV2instance *here,
HSMHV2model *model,
CKTcircuit *ckt
) ;
extern int HSMHV2dio
(
double vbs_jct,
double vbd_jct,
double deltemp,
HSMHV2instance *here,
HSMHV2model *model,
CKTcircuit *ckt
) ;
#endif /* _HiSIMHV_H */

View File

@ -0,0 +1,929 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhv.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/devdefs.h"
#include "hsmhvdef.h"
#include "ngspice/suffix.h"
IFparm HSMHV2pTable[] = { /* parameters */
IOP( "coselfheat", HSMHV2_COSELFHEAT, IF_INTEGER, "Calculation of self heating model"),
IOP( "cosubnode", HSMHV2_COSUBNODE, IF_INTEGER, "Switch tempNode to subNode"),
IOP( "l", HSMHV2_L, IF_REAL , "Length"),
IOP( "w", HSMHV2_W, IF_REAL , "Width"),
IOP( "ad", HSMHV2_AD, IF_REAL , "Drain area"),
IOP( "as", HSMHV2_AS, IF_REAL , "Source area"),
IOP( "pd", HSMHV2_PD, IF_REAL , "Drain perimeter"),
IOP( "ps", HSMHV2_PS, IF_REAL , "Source perimeter"),
IOP( "nrd", HSMHV2_NRD, IF_REAL , "Number of squares in drain"),
IOP( "nrs", HSMHV2_NRS, IF_REAL , "Number of squares in source"),
IOP( "dtemp", HSMHV2_DTEMP,IF_REAL , ""),
IOP( "off", HSMHV2_OFF, IF_FLAG , "Device is initially off"),
IP ( "ic", HSMHV2_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"),
IOP("corbnet", HSMHV2_CORBNET, IF_INTEGER, "Activate body resistance (1) or not (0)"),
IOP("rbpb", HSMHV2_RBPB, IF_REAL, ""),
IOP("rbpd", HSMHV2_RBPD, IF_REAL, ""),
IOP("rbps", HSMHV2_RBPS, IF_REAL, ""),
IOP("rbdb", HSMHV2_RBDB, IF_REAL, ""),
IOP("rbsb", HSMHV2_RBSB, IF_REAL, ""),
IOP("corg", HSMHV2_CORG, IF_INTEGER, "Activate gate resistance (1) or not (0)"),
IOP("ngcon", HSMHV2_NGCON, IF_REAL, "Number of gate contacts"),
IOP("xgw", HSMHV2_XGW, IF_REAL, "Distance from gate contact to channel edge"),
IOP("xgl", HSMHV2_XGL, IF_REAL, "Offset of gate length due to variation in patterning"),
IOP("nf", HSMHV2_NF, IF_REAL, "Number of fingers"),
IOP("sa", HSMHV2_SA, IF_REAL, "Distance from STI edge to Gate edge [m]"),
IOP("sb", HSMHV2_SB, IF_REAL, "Distance from STI edge to Gate edge [m]"),
IOP("sd", HSMHV2_SD, IF_REAL, "Distance from Gate edge to Gate edge [m]"),
IOP("nsubcdfm", HSMHV2_NSUBCDFM, IF_REAL, "Constant part of Nsub for DFM [1/cm^3]"),
IOP("m", HSMHV2_M, IF_REAL, "Multiplication factor [-]"),
IOP("subld1", HSMHV2_SUBLD1, IF_REAL, "Parameter for impact-ionization current in the drift region [-]"),
IOP("subld2", HSMHV2_SUBLD2, IF_REAL, "Parameter for impact-ionization current in the drift region [m^{-1}*V^{3/2}]"),
IOP("lover", HSMHV2_LOVER, IF_REAL, "Overlap length on source side [m]"),
IOP("lovers", HSMHV2_LOVERS, IF_REAL, "Overlap length on source side [m]"),
IOP("loverld", HSMHV2_LOVERLD, IF_REAL, "Overlap length on drain side [m]"),
IOP("ldrift1", HSMHV2_LDRIFT1, IF_REAL, "Parameter for drift region length-1 [m]"),
IOP("ldrift2", HSMHV2_LDRIFT2, IF_REAL, "Parameter for drift region length-2 [m]"),
IOP("ldrift1s", HSMHV2_LDRIFT1S, IF_REAL, "Parameter for drift region length-1 on source side[m]"),
IOP("ldrift2s", HSMHV2_LDRIFT2S, IF_REAL, "Parameter for drift region length-2 on source side[m]"),
/* Output Physical Values: */
OP ( "ids", HSMHV2_CD, IF_REAL , "Ids"), /* Drain-Source current */
OP ( "isub", HSMHV2_ISUB, IF_REAL , "Isub"), /* Substrate current */
OP ( "isubld", HSMHV2_ISUBLD, IF_REAL , "IsubLD"), /* Substrate current */
OP ( "idsibpc", HSMHV2_IDSIBPC, IF_REAL , "IdsIBPC"), /* Impact-Ionization Induced Bulk Potential Change (IBPC)*/
OP ( "igidl", HSMHV2_IGIDL, IF_REAL , "Igidl"), /* Gate-Induced Drain Leakage current */
OP ( "igisl", HSMHV2_IGISL, IF_REAL , "Igisl"), /* Gate-Induced Source Leakage current */
OP ( "igd", HSMHV2_IGD, IF_REAL , "Igd"), /* Gate-Drain current */
OP ( "igs", HSMHV2_IGS, IF_REAL , "Igs"), /* Gate-Source current */
OP ( "igb", HSMHV2_IGB, IF_REAL , "Igb"), /* Gate-Substrate current */
OP ( "gm", HSMHV2_GM, IF_REAL , "Gm"), /* Transconductance */
OP ( "gds", HSMHV2_GDS, IF_REAL , "Gds"), /* Channel conductance */
OP ( "gmbs", HSMHV2_GMBS, IF_REAL , "Gmbs"), /* Body effect (Back gate) transconductance */
OP ( "gmt", HSMHV2_GMT, IF_REAL , "GmT"), /* Temp - transconductance ----SHE----*/
OP ( "von", HSMHV2_VON, IF_REAL , "Von"), /* Threshold voltage */
OP ( "vdsat", HSMHV2_VDSAT, IF_REAL , "Vdsat"), /* Saturation voltage */
OP ( "qb", HSMHV2_QB, IF_REAL , "Qb"), /* Bulk charge */
OP ( "qg", HSMHV2_QG, IF_REAL , "Qg"), /* Gate charge */
OP ( "qd", HSMHV2_QD, IF_REAL , "Qd"), /* Drain charge */
OP ( "cgg", HSMHV2_CGG, IF_REAL , "Cgg"), /* MOSFET capacitance */
OP ( "cgd", HSMHV2_CGD, IF_REAL , "Cgd"), /* MOSFET capacitance */
OP ( "cgs", HSMHV2_CGS, IF_REAL , "Cgs"), /* MOSFET capacitance */
OP ( "cbg", HSMHV2_CBG, IF_REAL , "Cbg"), /* MOSFET capacitance */
OP ( "cbs", HSMHV2_CBSB, IF_REAL , "Cbs"), /* MOSFET capacitance */
OP ( "cbd", HSMHV2_CBDB, IF_REAL , "Cbd"), /* MOSFET capacitance */
OP ( "cdg", HSMHV2_CDG, IF_REAL , "Cdg"), /* MOSFET capacitance */
OP ( "cdd", HSMHV2_CDD, IF_REAL , "Cdd"), /* MOSFET capacitance */
OP ( "cds", HSMHV2_CDS, IF_REAL , "Cds"), /* MOSFET capacitance */
OP ( "cgdo", HSMHV2_CGDO, IF_REAL , "Cgdo"), /* MOSFET overlap capacitance */
OP ( "cgso", HSMHV2_CGSO, IF_REAL , "Cgso"), /* MOSFET overlap capacitance */
OP ( "cgbo", HSMHV2_CGBO, IF_REAL , "Cgbo"), /* MOSFET overlap capacitance */
OP ( "ibd", HSMHV2_CBD, IF_REAL , "Ibd"), /* Diode current */
OP ( "ibs", HSMHV2_CBS, IF_REAL , "Ibs"), /* Diode current */
OP ( "gbd", HSMHV2_GBD, IF_REAL , "Gbd"), /* Diode conductance */
OP ( "gbs", HSMHV2_GBS, IF_REAL , "Gbs"), /* Diode conductance */
OP ( "capbd", HSMHV2_CAPBD, IF_REAL , "Capbd"), /* Diode capacitance */
OP ( "capbs", HSMHV2_CAPBS, IF_REAL , "Capbs") /* Diode capacitance */
};
IFparm HSMHV2mPTable[] = { /* model parameters */
IP("nmos", HSMHV2_MOD_NMOS, IF_FLAG, ""),
IP("pmos", HSMHV2_MOD_PMOS, IF_FLAG, ""),
IOP("level", HSMHV2_MOD_LEVEL, IF_INTEGER, ""),
IOP("info", HSMHV2_MOD_INFO, IF_INTEGER, "Information level (for debug, etc.)"),
IOP("noise", HSMHV2_MOD_NOISE, IF_INTEGER, "Noise model selector"),
IOP("version", HSMHV2_MOD_VERSION, IF_STRING, "Model version"),
IOP("show", HSMHV2_MOD_SHOW, IF_INTEGER, "Show physical value"),
IOP("corsrd", HSMHV2_MOD_CORSRD, IF_INTEGER, "Handling of Rs and Rd"),
IOP("corg", HSMHV2_MOD_CORG, IF_INTEGER, "Activate gate resistance (1) or not (0)"),
IOP("coiprv", HSMHV2_MOD_COIPRV, IF_INTEGER, "Use ids_prv as initial guess of Ids (internal flag)"),
IOP("copprv", HSMHV2_MOD_COPPRV, IF_INTEGER, "Use ps{0/l}_prv as initial guess of Ps{0/l} (internal flag)"),
IOP("coadov", HSMHV2_MOD_COADOV, IF_INTEGER, "Add overlap to intrisic"),
IOP("coisub", HSMHV2_MOD_COISUB, IF_INTEGER, "Calculate isub"),
IOP("coiigs", HSMHV2_MOD_COIIGS, IF_INTEGER, "Calculate igate"),
IOP("cogidl", HSMHV2_MOD_COGIDL, IF_INTEGER, "Calculate igidl"),
IOP("coovlp", HSMHV2_MOD_COOVLP, IF_INTEGER, "Calculate overlap charge on the drain side"),
IOP("coovlps", HSMHV2_MOD_COOVLPS, IF_INTEGER, "Calculate overlap charge on the source side"),
IOP("coflick", HSMHV2_MOD_COFLICK, IF_INTEGER, "Calculate 1/f noise"),
IOP("coisti", HSMHV2_MOD_COISTI, IF_INTEGER, "Calculate STI"),
IOP("conqs", HSMHV2_MOD_CONQS, IF_INTEGER, "Calculate in nqs mode or qs mode"),
IOP("corbnet", HSMHV2_MOD_CORBNET, IF_INTEGER, ""),
IOP("cothrml", HSMHV2_MOD_COTHRML, IF_INTEGER, "Calculate thermal noise"),
IOP("coign", HSMHV2_MOD_COIGN, IF_INTEGER, "Calculate induced gate noise"),
IOP("codfm", HSMHV2_MOD_CODFM, IF_INTEGER, "Calculation of model for DFM"),
IOP("coqovsm", HSMHV2_MOD_COQOVSM, IF_INTEGER, "select smoothing method of Qover"),
IOP("coselfheat", HSMHV2_MOD_COSELFHEAT, IF_INTEGER, "Calculation of self heating model"),
IOP("cosubnode", HSMHV2_MOD_COSUBNODE, IF_INTEGER, "Switch tempNode to subNode"),
IOP("cosym", HSMHV2_MOD_COSYM, IF_INTEGER, "Model selector for symmetry device"),
IOP("cotemp", HSMHV2_MOD_COTEMP, IF_INTEGER, "Model flag for temperature dependence"),
IOP("coldrift", HSMHV2_MOD_COLDRIFT, IF_INTEGER, "selector for Ldrift parameter"),
IOP("cordrift", HSMHV2_MOD_CORDRIFT, IF_INTEGER, ""),
IOP("coerrrep", HSMHV2_MOD_COERRREP, IF_INTEGER, "selector for error report"),
IOP("codep", HSMHV2_MOD_CODEP, IF_INTEGER, "selector for depletion device"),
IOP("coddlt", HSMHV2_MOD_CODDLT, IF_INTEGER, "selector for DDLT model"),
IOP("vbsmin", HSMHV2_MOD_VBSMIN, IF_REAL, "Minimum back bias voltage to be treated in hsmhveval [V]"),
IOP("vmax", HSMHV2_MOD_VMAX, IF_REAL, "Saturation velocity [cm/s]"),
IOP("vmaxt1", HSMHV2_MOD_VMAXT1, IF_REAL, "Saturation velocity coeff. [-]"),
IOP("vmaxt2", HSMHV2_MOD_VMAXT2, IF_REAL, "Saturation velocity coeff. [-]"),
IOP("bgtmp1", HSMHV2_MOD_BGTMP1, IF_REAL, "First order temp. coeff. for band gap [V/K]"),
IOP("bgtmp2", HSMHV2_MOD_BGTMP2, IF_REAL, "Second order temp. coeff. for band gap [V/K^2]"),
IOP("eg0", HSMHV2_MOD_EG0, IF_REAL, ""),
IOP("tox", HSMHV2_MOD_TOX, IF_REAL, "Oxide thickness [m]"),
IOP("xld", HSMHV2_MOD_XLD, IF_REAL, "Lateral diffusion of S/D under the gate [m]"),
IOP("xldld", HSMHV2_MOD_XLDLD, IF_REAL, "Lateral diffusion of Drain under the gate [m]"),
IOP("xwdld", HSMHV2_MOD_XWDLD, IF_REAL, ""),
IOP("lover", HSMHV2_MOD_LOVER, IF_REAL, "Overlap length on source side [m], alias for lovers"),
IOP("lovers", HSMHV2_MOD_LOVERS, IF_REAL, "Overlap length on source side [m]"),
IOP("rdov11", HSMHV2_MOD_RDOV11, IF_REAL, "Dependence coeff. for overlap length"),
IOP("rdov12", HSMHV2_MOD_RDOV12, IF_REAL, "Dependence coeff. for overlap length"),
IOP("rdov13", HSMHV2_MOD_RDOV13, IF_REAL, "Dependence coeff. for overlap length"),
IOP("rdslp1", HSMHV2_MOD_RDSLP1, IF_REAL, "LDRIFT1 dependence of resistance for CORSRD=1,3"),
IOP("rdict1", HSMHV2_MOD_RDICT1, IF_REAL, "LDRIFT1 dependence of resistance for CORSRD=1,3"),
IOP("rdslp2", HSMHV2_MOD_RDSLP2, IF_REAL, "LDRIFT2 dependence of resistance for CORSRD=1,3"),
IOP("rdict2", HSMHV2_MOD_RDICT2, IF_REAL, "LDRIFT2 dependence of resistance for CORSRD=1,3"),
IOP("loverld", HSMHV2_MOD_LOVERLD, IF_REAL, "Overlap length on the drain side"),
IOP("ldrift1", HSMHV2_MOD_LDRIFT1, IF_REAL, "Drift region length-1 on the drain side[m]"),
IOP("ldrift2", HSMHV2_MOD_LDRIFT2, IF_REAL, "Drift region length-2 on the drain side[m]"),
IOP("ldrift1s", HSMHV2_MOD_LDRIFT1S, IF_REAL, "Drift region length-1 on the source side[m]"),
IOP("ldrift2s", HSMHV2_MOD_LDRIFT2S, IF_REAL, "Drift region length-2 on the source side[m]"),
IOP("subld1", HSMHV2_MOD_SUBLD1, IF_REAL, "Impact-ionization current in the drift region [-]"),
IOP("subld1l", HSMHV2_MOD_SUBLD1L, IF_REAL, "Impact-ionization current in the drift region [um^{subld1lp}]"),
IOP("subld1lp", HSMHV2_MOD_SUBLD1LP, IF_REAL, "Impact-ionization current in the drift region [-]"),
IOP("subld2", HSMHV2_MOD_SUBLD2, IF_REAL, "Impact-ionization current in the drift region [m^{-1}*V^{3/2}]"),
IOP("xpdv", HSMHV2_MOD_XPDV, IF_REAL, "Impact-ionization current in the drift region [m^{-1}]"),
IOP("xpvdth", HSMHV2_MOD_XPVDTH, IF_REAL, "Impact-ionization current in the drift region [V]"),
IOP("xpvdthg", HSMHV2_MOD_XPVDTHG, IF_REAL, "Impact-ionization current in the drift region [V^{-1}]"),
IOP("ddltmax", HSMHV2_MOD_DDLTMAX, IF_REAL, ""), /* Vdseff */
IOP("ddltslp", HSMHV2_MOD_DDLTSLP, IF_REAL, ""), /* Vdseff */
IOP("ddltict", HSMHV2_MOD_DDLTICT, IF_REAL, ""), /* Vdseff */
IOP("vfbover", HSMHV2_MOD_VFBOVER, IF_REAL, ""),
IOP("nover", HSMHV2_MOD_NOVER, IF_REAL, ""),
IOP("novers", HSMHV2_MOD_NOVERS, IF_REAL, ""),
IOP("xwd", HSMHV2_MOD_XWD, IF_REAL, "Lateral diffusion along the width dir. [m]"),
IOP("xwdc", HSMHV2_MOD_XWDC, IF_REAL, "Lateral diffusion along the width dir. for capacitance [m]"),
IOP("xl", HSMHV2_MOD_XL, IF_REAL, "Gate length offset due to mask/etch effect [m]"),
IOP("xw", HSMHV2_MOD_XW, IF_REAL, "Gate width offset due to mask/etch effect [m]"),
IOP("saref", HSMHV2_MOD_SAREF, IF_REAL, "Reference distance from STI edge to Gate edge [m]"),
IOP("sbref", HSMHV2_MOD_SBREF, IF_REAL, "Reference distance from STI edge to Gate edge [m]"),
IOP("ll", HSMHV2_MOD_LL, IF_REAL, "Gate length parameter"),
IOP("lld", HSMHV2_MOD_LLD, IF_REAL, "Gate length parameter"),
IOP("lln", HSMHV2_MOD_LLN, IF_REAL, "Gate length parameter"),
IOP("wl", HSMHV2_MOD_WL, IF_REAL, "Gate width parameter"),
IOP("wl1", HSMHV2_MOD_WL1, IF_REAL, "Gate width parameter"),
IOP("wl1p", HSMHV2_MOD_WL1P, IF_REAL, "Gate width parameter"),
IOP("wl2", HSMHV2_MOD_WL2, IF_REAL, "Gate width parameter"),
IOP("wl2p", HSMHV2_MOD_WL2P, IF_REAL, "Gate width parameter"),
IOP("wld", HSMHV2_MOD_WLD, IF_REAL, "Gate width parameter"),
IOP("wln", HSMHV2_MOD_WLN, IF_REAL, "Gate width parameter"),
IOP("xqy", HSMHV2_MOD_XQY, IF_REAL, "[m]"),
IOP("xqy1", HSMHV2_MOD_XQY1, IF_REAL, "[F m^{XQY2}]"),
IOP("xqy2", HSMHV2_MOD_XQY2, IF_REAL, "[-]"),
IOP("rs", HSMHV2_MOD_RS, IF_REAL, "Source contact resistance [ohm m]"),
IOP("rd", HSMHV2_MOD_RD, IF_REAL, "Drain contact resistance [ohm m]"),
IOP("rsh", HSMHV2_MOD_RSH, IF_REAL, "Source/drain diffusion sheet resistance [ohm]"),
IOP("rshg", HSMHV2_MOD_RSHG, IF_REAL, "Gate-elecrode sheet resistance"),
IOP("vfbc", HSMHV2_MOD_VFBC, IF_REAL, "Constant part of Vfb [V]"),
IOP("vbi", HSMHV2_MOD_VBI, IF_REAL, "Built-in potential [V]"),
IOP("nsubc", HSMHV2_MOD_NSUBC, IF_REAL, "Constant part of Nsub [1/cm^3]"),
IOP("parl2", HSMHV2_MOD_PARL2, IF_REAL, "Under diffusion [m]"),
IOP("lp", HSMHV2_MOD_LP, IF_REAL, "Length of pocket potential [m]"),
IOP("nsubp", HSMHV2_MOD_NSUBP, IF_REAL, "[1/cm^3]"),
IOP("nsubp0", HSMHV2_MOD_NSUBP0, IF_REAL, "Pocket implant parameter"),
IOP("nsubwp", HSMHV2_MOD_NSUBWP, IF_REAL, "Pocket implant parameter"),
IOP("scp1", HSMHV2_MOD_SCP1, IF_REAL, "Parameter for pocket [-]"),
IOP("scp2", HSMHV2_MOD_SCP2, IF_REAL, "Parameter for pocket [1/V]"),
IOP("scp3", HSMHV2_MOD_SCP3, IF_REAL, "Parameter for pocket [m/V]"),
IOP("sc1", HSMHV2_MOD_SC1, IF_REAL, "Parameter for SCE [-]"),
IOP("sc2", HSMHV2_MOD_SC2, IF_REAL, "Parameter for SCE [1/V]"),
IOP("sc3", HSMHV2_MOD_SC3, IF_REAL, "Parameter for SCE [m/V]"),
IOP("sc4", HSMHV2_MOD_SC4, IF_REAL, "Parameter for SCE [1/V]"),
IOP("pgd1", HSMHV2_MOD_PGD1, IF_REAL, "Parameter for gate-poly depletion [V]"),
IOP("pgd2", HSMHV2_MOD_PGD2, IF_REAL, "Parameter for gate-poly depletion [V]"),
//IOP("pgd3", HSMHV2_MOD_PGD3, IF_REAL, "Parameter for gate-poly depletion [-]"),
IOP("pgd4", HSMHV2_MOD_PGD4, IF_REAL, "Parameter for gate-poly depletion [-]"),
IOP("ndep", HSMHV2_MOD_NDEP, IF_REAL, "Coeff. of Qbm for Eeff [-]"),
IOP("ndepl", HSMHV2_MOD_NDEPL, IF_REAL, "Coeff. of Qbm for Eeff [-]"),
IOP("ndeplp", HSMHV2_MOD_NDEPLP, IF_REAL, "Coeff. of Qbm for Eeff [-]"),
IOP("ninv", HSMHV2_MOD_NINV, IF_REAL, "Coeff. of Qnm for Eeff [-]"),
IOP("ninvd", HSMHV2_MOD_NINVD, IF_REAL, "Modification of Vdse dependence on Eeff [1/V]"),
IOP("ninvdw", HSMHV2_MOD_NINVDW, IF_REAL, "Coeff of modification of Vdse dependence on Eeff [-]"),
IOP("ninvdwp", HSMHV2_MOD_NINVDWP, IF_REAL, "Coeff of modification of Vdse dependence on Eeff [-]"),
IOP("ninvdt1", HSMHV2_MOD_NINVDT1, IF_REAL, "Coeff of modification of Vdse dependence on Eeff [-]"),
IOP("ninvdt2", HSMHV2_MOD_NINVDT2, IF_REAL, "Coeff of modification of Vdse dependence on Eeff [-]"),
IOP("muecb0", HSMHV2_MOD_MUECB0, IF_REAL, "Const. part of coulomb scattering [cm^2/Vs]"),
IOP("muecb1", HSMHV2_MOD_MUECB1, IF_REAL, "Coeff. for coulomb scattering [cm^2/Vs]"),
IOP("mueph0", HSMHV2_MOD_MUEPH0, IF_REAL, "Power of Eeff for phonon scattering [-]"),
IOP("mueph1", HSMHV2_MOD_MUEPH1, IF_REAL, ""),
IOP("muephw", HSMHV2_MOD_MUEPHW, IF_REAL, ""),
IOP("muepwp", HSMHV2_MOD_MUEPWP, IF_REAL, "Phonon scattering parameter"),
IOP("muephl", HSMHV2_MOD_MUEPHL, IF_REAL, "Phonon scattering parameter"),
IOP("mueplp", HSMHV2_MOD_MUEPLP, IF_REAL, "Phonon scattering parameter"),
IOP("muephs", HSMHV2_MOD_MUEPHS, IF_REAL, ""),
IOP("muepsp", HSMHV2_MOD_MUEPSP, IF_REAL, ""),
IOP("vtmp", HSMHV2_MOD_VTMP, IF_REAL, ""),
IOP("wvth0", HSMHV2_MOD_WVTH0, IF_REAL, ""),
IOP("muesr0", HSMHV2_MOD_MUESR0, IF_REAL, "Power of Eeff for S.R. scattering [-]"),
IOP("muesr1", HSMHV2_MOD_MUESR1, IF_REAL, "Coeff. for S.R. scattering [-]"),
IOP("muesrl", HSMHV2_MOD_MUESRL, IF_REAL, "Surface roughness parameter"),
IOP("muesrw", HSMHV2_MOD_MUESRW, IF_REAL, "Change of surface roughness related mobility"),
IOP("mueswp", HSMHV2_MOD_MUESWP, IF_REAL, "Change of surface roughness related mobility"),
IOP("mueslp", HSMHV2_MOD_MUESLP, IF_REAL, "Surface roughness parameter"),
IOP("muetmp", HSMHV2_MOD_MUETMP, IF_REAL, "Parameter for mobility [-]"),
IOP("bb", HSMHV2_MOD_BB, IF_REAL, "Empirical mobility model coefficient [-]"),
IOP("sub1", HSMHV2_MOD_SUB1, IF_REAL, "Parameter for Isub [1/V]"),
IOP("sub2", HSMHV2_MOD_SUB2, IF_REAL, "Parameter for Isub [V]"),
IOP("svgs", HSMHV2_MOD_SVGS, IF_REAL, "Coefficient for Vg of Psislsat"),
IOP("svbs", HSMHV2_MOD_SVBS, IF_REAL, "Coefficient for Vbs of Psislsat"),
IOP("svbsl", HSMHV2_MOD_SVBSL, IF_REAL, " "),
IOP("svds", HSMHV2_MOD_SVDS, IF_REAL, " "),
IOP("slg", HSMHV2_MOD_SLG, IF_REAL, " "),
IOP("sub1l", HSMHV2_MOD_SUB1L, IF_REAL, " "),
IOP("sub2l", HSMHV2_MOD_SUB2L, IF_REAL, " "),
IOP("fn1", HSMHV2_MOD_FN1, IF_REAL, " "),
IOP("fn2", HSMHV2_MOD_FN2, IF_REAL, " "),
IOP("fn3", HSMHV2_MOD_FN3, IF_REAL, " "),
IOP("fvbs", HSMHV2_MOD_FVBS, IF_REAL, " "),
IOP("svgsl", HSMHV2_MOD_SVGSL, IF_REAL, " "),
IOP("svgslp", HSMHV2_MOD_SVGSLP, IF_REAL, " "),
IOP("svgswp", HSMHV2_MOD_SVGSWP, IF_REAL, " "),
IOP("svgsw", HSMHV2_MOD_SVGSW, IF_REAL, " "),
IOP("svbslp", HSMHV2_MOD_SVBSLP, IF_REAL, " "),
IOP("slgl", HSMHV2_MOD_SLGL, IF_REAL, " "),
IOP("slglp", HSMHV2_MOD_SLGLP, IF_REAL, " "),
IOP("sub1lp", HSMHV2_MOD_SUB1LP, IF_REAL, " "),
IOP("nsti", HSMHV2_MOD_NSTI, IF_REAL, "Parameter for STI [1/cm^3]"),
IOP("wsti", HSMHV2_MOD_WSTI, IF_REAL, "Parameter for STI [m]"),
IOP("wstil", HSMHV2_MOD_WSTIL, IF_REAL, "Parameter for STI [?]"),
IOP("wstilp", HSMHV2_MOD_WSTILP, IF_REAL, "Parameter for STI [?]"),
IOP("wstiw", HSMHV2_MOD_WSTIW, IF_REAL, "Parameter for STI [?]"),
IOP("wstiwp", HSMHV2_MOD_WSTIWP, IF_REAL, "Parameter for STI [?]"),
IOP("scsti1", HSMHV2_MOD_SCSTI1, IF_REAL, "Parameter for STI [-]"),
IOP("scsti2", HSMHV2_MOD_SCSTI2, IF_REAL, "Parameter for STI [1/V]"),
IOP("vthsti", HSMHV2_MOD_VTHSTI, IF_REAL, "Parameter for STI"),
IOP("vdsti", HSMHV2_MOD_VDSTI, IF_REAL, "Parameter for STI [-]"),
IOP("muesti1", HSMHV2_MOD_MUESTI1, IF_REAL, "STI Stress mobility parameter"),
IOP("muesti2", HSMHV2_MOD_MUESTI2, IF_REAL, "STI Stress mobility parameter"),
IOP("muesti3", HSMHV2_MOD_MUESTI3, IF_REAL, "STI Stress mobility parameter"),
IOP("nsubpsti1", HSMHV2_MOD_NSUBPSTI1, IF_REAL, "STI Stress pocket implant parameter"),
IOP("nsubpsti2", HSMHV2_MOD_NSUBPSTI2, IF_REAL, "STI Stress pocket implant parameter"),
IOP("nsubpsti3", HSMHV2_MOD_NSUBPSTI3, IF_REAL, "STI Stress pocket implant parameter"),
IOP("lpext", HSMHV2_MOD_LPEXT, IF_REAL, "Pocket extension"),
IOP("npext", HSMHV2_MOD_NPEXT, IF_REAL, "Pocket extension"),
IOP("scp22", HSMHV2_MOD_SCP22, IF_REAL, ""),
IOP("scp21", HSMHV2_MOD_SCP21, IF_REAL, ""),
IOP("bs1", HSMHV2_MOD_BS1, IF_REAL, ""),
IOP("bs2", HSMHV2_MOD_BS2, IF_REAL, ""),
IOP("cgso", HSMHV2_MOD_CGSO, IF_REAL, "G-S overlap capacitance per unit W [F/m]"),
IOP("cgdo", HSMHV2_MOD_CGDO, IF_REAL, "G-D overlap capacitance per unit W [F/m]"),
IOP("cgbo", HSMHV2_MOD_CGBO, IF_REAL, "G-B overlap capacitance per unit L [F/m]"),
IOP("tpoly", HSMHV2_MOD_TPOLY, IF_REAL, "Height of poly gate on the source side[m]"),
IOP("js0", HSMHV2_MOD_JS0, IF_REAL, "Saturation current density [A/m^2]"),
IOP("js0sw", HSMHV2_MOD_JS0SW, IF_REAL, "Side wall saturation current density [A/m]"),
IOP("nj", HSMHV2_MOD_NJ, IF_REAL, "Emission coefficient [-]"),
IOP("njsw", HSMHV2_MOD_NJSW, IF_REAL, "Sidewall emission coefficient"),
IOP("xti", HSMHV2_MOD_XTI, IF_REAL, "Junction current temparature exponent coefficient [-]"),
IOP("cj", HSMHV2_MOD_CJ, IF_REAL, "Bottom junction capacitance per unit area at zero bias [F/m^2]"),
IOP("cjsw", HSMHV2_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient per unit length at zero bias [F/m]"),
IOP("cjswg", HSMHV2_MOD_CJSWG, IF_REAL, "Source/drain gate sidewall junction capacitance per unit length at zero bias [F/m]"),
IOP("mj", HSMHV2_MOD_MJ, IF_REAL, "Bottom junction capacitance grading coefficient"),
IOP("mjsw", HSMHV2_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"),
IOP("mjswg", HSMHV2_MOD_MJSWG, IF_REAL, "Source/drain gate sidewall junction capacitance grading coefficient"),
IOP("pb", HSMHV2_MOD_PB, IF_REAL, "Bottom junction build-in potential [V]"),
IOP("pbsw", HSMHV2_MOD_PBSW, IF_REAL, "Source/drain sidewall junction build-in potential [V]"),
IOP("pbswg", HSMHV2_MOD_PBSWG, IF_REAL, "Source/drain gate sidewall junction build-in potential [V]"),
IOP("xti2", HSMHV2_MOD_XTI2, IF_REAL, "Temperature coefficient [-]"),
IOP("cisb", HSMHV2_MOD_CISB, IF_REAL, "Reverse bias saturation current [-]"),
IOP("cvb", HSMHV2_MOD_CVB, IF_REAL, "Bias dependence coefficient of cisb [-]"),
IOP("ctemp", HSMHV2_MOD_CTEMP, IF_REAL, "Temperature coefficient [-]"),
IOP("cisbk", HSMHV2_MOD_CISBK, IF_REAL, "Reverse bias saturation current [A]"),
IOP("cvbk", HSMHV2_MOD_CVBK, IF_REAL, "Inactived by CVB "),
IOP("divx", HSMHV2_MOD_DIVX, IF_REAL, " [1/V]"),
IOP("clm1", HSMHV2_MOD_CLM1, IF_REAL, "Parameter for CLM [-]"),
IOP("clm2", HSMHV2_MOD_CLM2, IF_REAL, "Parameter for CLM [1/m]"),
IOP("clm3", HSMHV2_MOD_CLM3, IF_REAL, "Parameter for CLM [-]"),
IOP("clm5", HSMHV2_MOD_CLM5, IF_REAL, "Parameter for CLM [-]"),
IOP("clm6", HSMHV2_MOD_CLM6, IF_REAL, "Parameter for CLM [um^{-clm5}]"),
IOP("vover", HSMHV2_MOD_VOVER, IF_REAL, "Parameter for overshoot [m^{voverp}]"),
IOP("voverp", HSMHV2_MOD_VOVERP, IF_REAL, "Parameter for overshoot [-]"),
IOP("vovers", HSMHV2_MOD_VOVERS, IF_REAL, "Parameter for overshoot [-]"),
IOP("voversp", HSMHV2_MOD_VOVERSP, IF_REAL, "Parameter for overshoot [-]"),
IOP("wfc", HSMHV2_MOD_WFC, IF_REAL, "Parameter for narrow channel effect [m*F/(cm^2)]"),
IOP("nsubcw", HSMHV2_MOD_NSUBCW, IF_REAL, "Parameter for narrow channel effect "),
IOP("nsubcwp", HSMHV2_MOD_NSUBCWP, IF_REAL, "Parameter for narrow channel effect "),
IOP("qme1", HSMHV2_MOD_QME1, IF_REAL, "Parameter for quantum effect [mV]"),
IOP("qme2", HSMHV2_MOD_QME2, IF_REAL, "Parameter for quantum effect [V]"),
IOP("qme3", HSMHV2_MOD_QME3, IF_REAL, "Parameter for quantum effect [m]"),
IOP("gidl1", HSMHV2_MOD_GIDL1, IF_REAL, "Parameter for GIDL [?]"),
IOP("gidl2", HSMHV2_MOD_GIDL2, IF_REAL, "Parameter for GIDL [?]"),
IOP("gidl3", HSMHV2_MOD_GIDL3, IF_REAL, "Parameter for GIDL [?]"),
IOP("gidl4", HSMHV2_MOD_GIDL4, IF_REAL, "Parameter for GIDL [?]"),
IOP("gidl5", HSMHV2_MOD_GIDL5, IF_REAL, "Parameter for GIDL [?]"),
IOP("glpart1", HSMHV2_MOD_GLPART1, IF_REAL, "Parameter for gate current [-]"),
IOP("gleak1", HSMHV2_MOD_GLEAK1, IF_REAL, "Parameter for gate current [A*V^(-3/2)/C]"),
IOP("gleak2", HSMHV2_MOD_GLEAK2, IF_REAL, "Parameter for gate current [V^(-1/2)/m ]"),
IOP("gleak3", HSMHV2_MOD_GLEAK3, IF_REAL, "Parameter for gate current [-]"),
IOP("gleak4", HSMHV2_MOD_GLEAK4, IF_REAL, "Parameter for gate current [1/m]"),
IOP("gleak5", HSMHV2_MOD_GLEAK5, IF_REAL, "Parameter for gate current [V/m]"),
IOP("gleak6", HSMHV2_MOD_GLEAK6, IF_REAL, "Parameter for gate current [V]"),
IOP("gleak7", HSMHV2_MOD_GLEAK7, IF_REAL, "Parameter for gate current [m^2]"),
IOP("glksd1", HSMHV2_MOD_GLKSD1, IF_REAL, "Parameter for gate current [A*m/V^2]"),
IOP("glksd2", HSMHV2_MOD_GLKSD2, IF_REAL, "Parameter for gate current [1/(V*m)]"),
IOP("glksd3", HSMHV2_MOD_GLKSD3, IF_REAL, "Parameter for gate current [1/m]"),
IOP("glkb1", HSMHV2_MOD_GLKB1, IF_REAL, "Parameter for gate current [A/V^2]"),
IOP("glkb2", HSMHV2_MOD_GLKB2, IF_REAL, "Parameter for gate current [m/V]"),
IOP("glkb3", HSMHV2_MOD_GLKB3, IF_REAL, "Parameter for gate current [V]"),
IOP("egig", HSMHV2_MOD_EGIG, IF_REAL, "Parameter for gate current [V]"),
IOP("igtemp2", HSMHV2_MOD_IGTEMP2, IF_REAL, "Parameter for gate current [V*k]"),
IOP("igtemp3", HSMHV2_MOD_IGTEMP3, IF_REAL, "Parameter for gate current [V*k^2]"),
IOP("vzadd0", HSMHV2_MOD_VZADD0, IF_REAL, "Vzadd at Vds=0 [V]"),
IOP("pzadd0", HSMHV2_MOD_PZADD0, IF_REAL, "Pzadd at Vds=0 [V]"),
IOP("nftrp", HSMHV2_MOD_NFTRP, IF_REAL, ""),
IOP("nfalp", HSMHV2_MOD_NFALP, IF_REAL, ""),
IOP("cit", HSMHV2_MOD_CIT, IF_REAL, ""),
IOP("falph", HSMHV2_MOD_FALPH, IF_REAL, "Parameter for 1/f noise"),
IOP("kappa", HSMHV2_MOD_KAPPA, IF_REAL, "Dielectric constant for high-k stacked gate"),
//IOP("pthrou", HSMHV2_MOD_PTHROU, IF_REAL, "Modify subthreshold slope [-]"),
IOP("vdiffj", HSMHV2_MOD_VDIFFJ, IF_REAL, "Threshold voltage for S/D junction diode [V]"),
IOP("dly1", HSMHV2_MOD_DLY1, IF_REAL, "Parameter for transit time [-]"),
IOP("dly2", HSMHV2_MOD_DLY2, IF_REAL, "Parameter for transit time [-]"),
IOP("dly3", HSMHV2_MOD_DLY3, IF_REAL, "Parameter for transforming bulk charge [s/F]"),
IOP("dlyov", HSMHV2_MOD_DLYOV, IF_REAL, "Parameter for transforming overlap charge [s/F]"), /* not used */
IOP("tnom", HSMHV2_MOD_TNOM, IF_REAL, "Nominal temperature [K]"),
IOP("ovslp", HSMHV2_MOD_OVSLP, IF_REAL, ""),
IOP("ovmag", HSMHV2_MOD_OVMAG, IF_REAL, ""),
IOP("gbmin", HSMHV2_MOD_GBMIN, IF_REAL, ""),
IOP("rbpb", HSMHV2_MOD_RBPB, IF_REAL, ""),
IOP("rbpd", HSMHV2_MOD_RBPD, IF_REAL, ""), /* not used */
IOP("rbps", HSMHV2_MOD_RBPS, IF_REAL, ""), /* not used */
IOP("rbdb", HSMHV2_MOD_RBDB, IF_REAL, ""),
IOP("rbsb", HSMHV2_MOD_RBSB, IF_REAL, ""),
IOP("ibpc1", HSMHV2_MOD_IBPC1, IF_REAL, "Parameter for impact-ionization induced bulk potential change"),
IOP("ibpc1l", HSMHV2_MOD_IBPC1L, IF_REAL, "Parameter for impact-ionization induced bulk potential change"),
IOP("ibpc1lp", HSMHV2_MOD_IBPC1LP, IF_REAL, "Parameter for impact-ionization induced bulk potential change"),
IOP("ibpc2", HSMHV2_MOD_IBPC2, IF_REAL, "Parameter for impact-ionization induced bulk potential change"),
IOP("mphdfm", HSMHV2_MOD_MPHDFM, IF_REAL, "NSUBCDFM dependence of phonon scattering for DFM"),
IOP("ptl", HSMHV2_MOD_PTL, IF_REAL, ""),
IOP("ptp", HSMHV2_MOD_PTP, IF_REAL, ""),
IOP("pt2", HSMHV2_MOD_PT2, IF_REAL, ""),
IOP("ptlp", HSMHV2_MOD_PTLP, IF_REAL, ""),
IOP("gdl", HSMHV2_MOD_GDL, IF_REAL, ""),
IOP("gdlp", HSMHV2_MOD_GDLP, IF_REAL, ""),
IOP("gdld", HSMHV2_MOD_GDLD, IF_REAL, ""),
IOP("pt4", HSMHV2_MOD_PT4, IF_REAL, ""),
IOP("pt4p", HSMHV2_MOD_PT4P, IF_REAL, ""),
IOP("rdvg11", HSMHV2_MOD_RDVG11, IF_REAL, ""),
IOP("rdvg12", HSMHV2_MOD_RDVG12, IF_REAL, ""),
IOP("rth0", HSMHV2_MOD_RTH0, IF_REAL, "Thermal resistance"), /* Self-heating model --SHE---*/
IOP("cth0", HSMHV2_MOD_CTH0, IF_REAL, "Thermal capacitance"), /* Self-heating model --SHE--- */
IOP("powrat", HSMHV2_MOD_POWRAT, IF_REAL, ""), /* Self-heating model --SHE--- */
IOP("rthtemp1", HSMHV2_MOD_RTHTEMP1, IF_REAL, "Thermal resistance"), /* Self-heating model --SHE---*/
IOP("rthtemp2", HSMHV2_MOD_RTHTEMP2, IF_REAL, "Thermal resistance"), /* Self-heating model --SHE---*/
IOP("prattemp1", HSMHV2_MOD_PRATTEMP1, IF_REAL, ""), /* Self-heating model --SHE--- */
IOP("prattemp2", HSMHV2_MOD_PRATTEMP2, IF_REAL, ""), /* Self-heating model --SHE--- */
IOP("tcjbd", HSMHV2_MOD_TCJBD, IF_REAL, "Temperature dependence of cjbd"), /* Self-heating model --SHE--- */
IOP("tcjbs", HSMHV2_MOD_TCJBS, IF_REAL, "Temperature dependence of cjbs"), /* Self-heating model --SHE--- */
IOP("tcjbdsw", HSMHV2_MOD_TCJBDSW, IF_REAL, "Temperature dependence of cjbdsw"), /* Self-heating model --SHE--- */
IOP("tcjbssw", HSMHV2_MOD_TCJBSSW, IF_REAL, "Temperature dependence of cjbssw"), /* Self-heating model --SHE--- */
IOP("tcjbdswg", HSMHV2_MOD_TCJBDSWG, IF_REAL, "Temperature dependence of cjbdswg"), /* Self-heating model --SHE--- */
IOP("tcjbsswg", HSMHV2_MOD_TCJBSSWG, IF_REAL, "Temperature dependence of cjbsswg"), /* Self-heating model --SHE--- */
IOP("qdftvd", HSMHV2_MOD_QDFTVD, IF_REAL, "Qdrift Vd dependence "),
IOP("rdvd", HSMHV2_MOD_RDVD, IF_REAL, ""),
IOP("rdvb", HSMHV2_MOD_RDVB, IF_REAL, ""),
IOP("rd20", HSMHV2_MOD_RD20, IF_REAL, ""),
IOP("rd21", HSMHV2_MOD_RD21, IF_REAL, ""),
IOP("rd22", HSMHV2_MOD_RD22, IF_REAL, ""),
IOP("rd22d", HSMHV2_MOD_RD22D, IF_REAL, ""),
IOP("rd23", HSMHV2_MOD_RD23, IF_REAL, ""),
IOP("rd24", HSMHV2_MOD_RD24, IF_REAL, ""),
IOP("rd25", HSMHV2_MOD_RD25, IF_REAL, ""),
IOP("rdvdl", HSMHV2_MOD_RDVDL, IF_REAL, ""),
IOP("rdvdlp", HSMHV2_MOD_RDVDLP, IF_REAL, ""),
IOP("rdvds", HSMHV2_MOD_RDVDS, IF_REAL, ""),
IOP("rdvdsp", HSMHV2_MOD_RDVDSP, IF_REAL, ""),
IOP("rd23l", HSMHV2_MOD_RD23L, IF_REAL, ""),
IOP("rd23lp", HSMHV2_MOD_RD23LP, IF_REAL, ""),
IOP("rd23s", HSMHV2_MOD_RD23S, IF_REAL, ""),
IOP("rd23sp", HSMHV2_MOD_RD23SP, IF_REAL, ""),
IOP("rds", HSMHV2_MOD_RDS, IF_REAL, ""),
IOP("rdsp", HSMHV2_MOD_RDSP, IF_REAL, ""),
//IOP("qovsm", HSMHV2_MOD_QOVSM, IF_REAL, "Smoothing Qover at depletion/inversion transition"),
// IOP("ldrift", HSMHV2_MOD_LDRIFT, IF_REAL, "alias for ldrift2"),
IOP("rdtemp1", HSMHV2_MOD_RDTEMP1, IF_REAL, "Temperature-dependence of Rd"),
IOP("rdtemp2", HSMHV2_MOD_RDTEMP2, IF_REAL, "Temperature-dependence of Rd"),
IOP("rth0r", HSMHV2_MOD_RTH0R, IF_REAL, "Heat radiation for SHE"), /* not used */
IOP("rdvdtemp1", HSMHV2_MOD_RDVDTEMP1, IF_REAL, "Temperature-dependence of RDVD"),
IOP("rdvdtemp2", HSMHV2_MOD_RDVDTEMP2, IF_REAL, "Temperature-dependence of RDVD"),
IOP("rth0w", HSMHV2_MOD_RTH0W, IF_REAL, "Width-dependence of RTH0"),
IOP("rth0wp", HSMHV2_MOD_RTH0WP, IF_REAL, "Width-dependence of RTH0"),
IOP("rth0nf", HSMHV2_MOD_RTH0NF, IF_REAL, "nf-dependence of RTH0"),
IOP("cvdsover", HSMHV2_MOD_CVDSOVER, IF_REAL, "vds drop along the overlap"),
IOP("rdvsub", HSMHV2_MOD_RDVSUB, IF_REAL, "model parameter for the substrate effect"),
IOP("rdvdsub", HSMHV2_MOD_RDVDSUB, IF_REAL, "model parameter for the substrate effect"),
IOP("ddrift", HSMHV2_MOD_DDRIFT, IF_REAL, "model parameter for the substrate effect"),
IOP("vbisub", HSMHV2_MOD_VBISUB, IF_REAL, "model parameter for the substrate effect"),
IOP("nsubsub", HSMHV2_MOD_NSUBSUB, IF_REAL, "model parameter for the substrate effect"),
IOP("rdrmue", HSMHV2_MOD_RDRMUE, IF_REAL, ""),
IOP("rdrvmax", HSMHV2_MOD_RDRVMAX, IF_REAL, ""),
IOP("rdrmuetmp", HSMHV2_MOD_RDRMUETMP, IF_REAL, ""),
IOP("ndepm", HSMHV2_MOD_NDEPM, IF_REAL, "N- layer concentlation of the depletion MOS model"),
IOP("tndep", HSMHV2_MOD_TNDEP, IF_REAL, "N- layer depth of the depletion MOS model"),
IOP("depmue0", HSMHV2_MOD_DEPMUE0, IF_REAL, "coulomb scattering of resistor region "),
IOP("depmue1", HSMHV2_MOD_DEPMUE1, IF_REAL, "coulomb scattering of resistor region"),
IOP("depmueback0", HSMHV2_MOD_DEPMUEBACK0, IF_REAL, "coulomb scattering of back region"),
IOP("depmueback1", HSMHV2_MOD_DEPMUEBACK1, IF_REAL, "coulomb scattering of back region"),
IOP("depleak", HSMHV2_MOD_DEPLEAK, IF_REAL, "leakage current coefficient"),
IOP("depeta", HSMHV2_MOD_DEPETA, IF_REAL, "Vds dependence"),
IOP("depvmax", HSMHV2_MOD_DEPVMAX, IF_REAL, "velocity saturation"),
IOP("depvdsef1", HSMHV2_MOD_DEPVDSEF1, IF_REAL, "Vds dependece of leakage current"),
IOP("depvdsef2", HSMHV2_MOD_DEPVDSEF2, IF_REAL, "Vds dependece of leakage current"),
IOP("depmueph0", HSMHV2_MOD_DEPMUEPH0, IF_REAL, "phonon scattering"),
IOP("depmueph1", HSMHV2_MOD_DEPMUEPH1, IF_REAL, "phonon scattering"),
IOP("depbb", HSMHV2_MOD_DEPBB, IF_REAL, "high field effect coeeficient"),
IOP("depvtmp", HSMHV2_MOD_DEPVTMP, IF_REAL, "temperature dependence of velocity saturation"),
IOP("depmuetmp", HSMHV2_MOD_DEPMUETMP, IF_REAL, "temperature dependence of mobility"),
IOP("isbreak", HSMHV2_MOD_ISBREAK, IF_REAL, "reverse saturation current for breakdown"),
IOP("rwell", HSMHV2_MOD_RWELL, IF_REAL, "well resistance for breakdown"),
IOP("rdrvtmp", HSMHV2_MOD_RDRVTMP, IF_REAL, ""),
/* IOP("rdrvmaxt1", HSMHV2_MOD_RDRVMAXT1, IF_REAL, ""), */
/* IOP("rdrvmaxt2", HSMHV2_MOD_RDRVMAXT2, IF_REAL, ""), */
IOP("rdrdjunc", HSMHV2_MOD_RDRDJUNC, IF_REAL, ""),
IOP("rdrcx", HSMHV2_MOD_RDRCX, IF_REAL, ""),
IOP("rdrcar", HSMHV2_MOD_RDRCAR, IF_REAL, ""),
IOP("rdrdl1", HSMHV2_MOD_RDRDL1, IF_REAL, ""),
IOP("rdrdl2", HSMHV2_MOD_RDRDL2, IF_REAL, ""),
IOP("rdrvmaxw", HSMHV2_MOD_RDRVMAXW, IF_REAL, ""),
IOP("rdrvmaxwp", HSMHV2_MOD_RDRVMAXWP, IF_REAL, ""),
IOP("rdrvmaxl", HSMHV2_MOD_RDRVMAXL, IF_REAL, ""),
IOP("rdrvmaxlp", HSMHV2_MOD_RDRVMAXLP, IF_REAL, ""),
IOP("rdrmuel", HSMHV2_MOD_RDRMUEL, IF_REAL, ""),
IOP("rdrmuelp", HSMHV2_MOD_RDRMUELP, IF_REAL, ""),
IOP("rdrqover", HSMHV2_MOD_RDRQOVER, IF_REAL, ""),
IOP("qovadd", HSMHV2_MOD_QOVADD, IF_REAL, "parameter for additional Qover Charge [-]"),
IOP("js0d", HSMHV2_MOD_JS0D, IF_REAL, "Saturation current density for drain junction [A/m^2]"),
IOP("js0swd", HSMHV2_MOD_JS0SWD, IF_REAL, "Side wall saturation current density for drain junction [A/m ]"),
IOP("njd", HSMHV2_MOD_NJD, IF_REAL, "Emission coefficient for drain junction [- ]"),
IOP("njswd", HSMHV2_MOD_NJSWD, IF_REAL, "Sidewall emission coefficient for drain junction [ ]"),
IOP("xtid", HSMHV2_MOD_XTID, IF_REAL, "Junction current temparature exponent coefficient for drain junction [- ]"),
IOP("cjd", HSMHV2_MOD_CJD, IF_REAL, "Bottom junction capacitance per unit area at zero bias for drain junction [F/m^2]"),
IOP("cjswd", HSMHV2_MOD_CJSWD, IF_REAL, "Sidewall junction capacitance grading coefficient per unit length at zero bias for drain junction [F/m ]"),
IOP("cjswgd", HSMHV2_MOD_CJSWGD, IF_REAL, "Gate sidewall junction capacitance per unit length at zero bias for drain junction [F/m ]"),
IOP("mjd", HSMHV2_MOD_MJD, IF_REAL, "Bottom junction capacitance grading coefficient for drain junction [ ]"),
IOP("mjswd", HSMHV2_MOD_MJSWD, IF_REAL, "Sidewall junction capacitance grading coefficient for drain junction [ ]"),
IOP("mjswgd", HSMHV2_MOD_MJSWGD, IF_REAL, "Gate sidewall junction capacitance grading coefficient for drain junction [ ]"),
IOP("pbd", HSMHV2_MOD_PBD, IF_REAL, "Bottom junction build-in potential for drain junction [V ]"),
IOP("pbswd", HSMHV2_MOD_PBSWD, IF_REAL, "Sidewall junction build-in potential for drain junction [V ]"),
IOP("pbswgd", HSMHV2_MOD_PBSWDG, IF_REAL, "Gate sidewall junction build-in potential for drain junction [V ]"),
IOP("xti2d", HSMHV2_MOD_XTI2D, IF_REAL, "Temperature coefficient for drain junction [- ]"),
IOP("cisbd", HSMHV2_MOD_CISBD, IF_REAL, "Reverse bias saturation current for drain junction [- ]"),
IOP("cvbd", HSMHV2_MOD_CVBD, IF_REAL, "Bias dependence coefficient of cisb for drain junction [- ]"),
IOP("ctempd", HSMHV2_MOD_CTEMPD, IF_REAL, "Temperature coefficient for drain junction [- ]"),
IOP("cisbkd", HSMHV2_MOD_CISBKD, IF_REAL, "Reverse bias saturation current for drain junction [A ]"),
IOP("divxd", HSMHV2_MOD_DIVXD, IF_REAL, "Reverse coefficient coefficient for drain junction [1/V ]"),
IOP("vdiffjd", HSMHV2_MOD_VDIFFJD, IF_REAL, "Threshold voltage for junction diode for drain junction [V ]"),
IOP("js0s", HSMHV2_MOD_JS0S, IF_REAL, "Saturation current density for source junction [A/m^2]"),
IOP("js0sws", HSMHV2_MOD_JS0SWS, IF_REAL, "Side wall saturation current density for source junction [A/m ]"),
IOP("njs", HSMHV2_MOD_NJS, IF_REAL, "Emission coefficient for source junction [- ]"),
IOP("njsws", HSMHV2_MOD_NJSWS, IF_REAL, "Sidewall emission coefficient for source junction [ ]"),
IOP("xtis", HSMHV2_MOD_XTIS, IF_REAL, "Junction current temparature exponent coefficient for source junction [- ]"),
IOP("cjs", HSMHV2_MOD_CJS, IF_REAL, "Bottom junction capacitance per unit area at zero bias for source junction [F/m^2]"),
IOP("cjsws", HSMHV2_MOD_CJSSW, IF_REAL, "Sidewall junction capacitance grading coefficient per unit length at zero bias for source junction [F/m ]"),
IOP("cjswgs", HSMHV2_MOD_CJSWGS, IF_REAL, "Gate sidewall junction capacitance per unit length at zero bias for source junction [F/m ]"),
IOP("mjs", HSMHV2_MOD_MJS, IF_REAL, "Bottom junction capacitance grading coefficient for source junction [ ]"),
IOP("mjsws", HSMHV2_MOD_MJSWS, IF_REAL, "Sidewall junction capacitance grading coefficient for source junction [ ]"),
IOP("mjswgs", HSMHV2_MOD_MJSWGS, IF_REAL, "Gate sidewall junction capacitance grading coefficient for source junction [ ]"),
IOP("pbs", HSMHV2_MOD_PBS, IF_REAL, "Bottom junction build-in potential for source junction [V ]"),
IOP("pbsws", HSMHV2_MOD_PBSWS, IF_REAL, "Sidewall junction build-in potential for source junction [V ]"),
IOP("pbswgs", HSMHV2_MOD_PBSWSG, IF_REAL, "Gate sidewall junction build-in potential for source junction [V ]"),
IOP("xti2s", HSMHV2_MOD_XTI2S, IF_REAL, "Temperature coefficient for source junction [- ]"),
IOP("cisbs", HSMHV2_MOD_CISBS, IF_REAL, "Reverse bias saturation current for source junction [- ]"),
IOP("cvbs", HSMHV2_MOD_CVBS, IF_REAL, "Bias dependence coefficient of cisb for source junction [- ]"),
IOP("ctemps", HSMHV2_MOD_CTEMPS, IF_REAL, "Temperature coefficient for source junction [- ]"),
IOP("cisbks", HSMHV2_MOD_CISBKS, IF_REAL, "Reverse bias saturation current for source junction [A ]"),
IOP("divxs", HSMHV2_MOD_DIVXS, IF_REAL, "Reverse coefficient coefficient for source junction [1/V ]"),
IOP("vdiffjs", HSMHV2_MOD_VDIFFJS, IF_REAL, "Threshold voltage for junction diode for source junction [V ]"),
IOP("shemax", HSMHV2_MOD_SHEMAX, IF_REAL, "Maximum rise temperatue for SHE [C]"),
IOP("vgsmin", HSMHV2_MOD_VGSMIN, IF_REAL, "minimal/maximal expected Vgs (NMOS/PMOS) [V]"),
IOP("gdsleak", HSMHV2_MOD_GDSLEAK, IF_REAL, "Channel leakage conductance [A/V]"),
IOP("rdrbb", HSMHV2_MOD_RDRBB, IF_REAL, "degradation of the mobility in drift region"),
IOP("rdrbbtmp", HSMHV2_MOD_RDRBBTMP, IF_REAL, "temperature coeeficient of RDRBB"),
/* binning parameters */
IOP("lmin", HSMHV2_MOD_LMIN, IF_REAL, "Minimum length for the model"),
IOP("lmax", HSMHV2_MOD_LMAX, IF_REAL, "Maximum length for the model"),
IOP("wmin", HSMHV2_MOD_WMIN, IF_REAL, "Minimum width for the model"),
IOP("wmax", HSMHV2_MOD_WMAX, IF_REAL, "Maximum width for the model"),
IOP("lbinn", HSMHV2_MOD_LBINN, IF_REAL, "L modulation coefficient for binning"),
IOP("wbinn", HSMHV2_MOD_WBINN, IF_REAL, "W modulation coefficient for binning"),
/* Length dependence */
IOP("lvmax", HSMHV2_MOD_LVMAX, IF_REAL, "Length dependence of vmax"),
IOP("lbgtmp1", HSMHV2_MOD_LBGTMP1, IF_REAL, "Length dependence of bgtmp1"),
IOP("lbgtmp2", HSMHV2_MOD_LBGTMP2, IF_REAL, "Length dependence of bgtmp2"),
IOP("leg0", HSMHV2_MOD_LEG0, IF_REAL, "Length dependence of eg0"),
IOP("lvfbover", HSMHV2_MOD_LVFBOVER, IF_REAL, "Length dependence of vfbover"),
IOP("lnover", HSMHV2_MOD_LNOVER, IF_REAL, "Length dependence of nover"),
IOP("lnovers", HSMHV2_MOD_LNOVERS, IF_REAL, "Length dependence of nover on source side"),
IOP("lwl2", HSMHV2_MOD_LWL2, IF_REAL, "Length dependence of wl2"),
IOP("lvfbc", HSMHV2_MOD_LVFBC, IF_REAL, "Length dependence of vfbc"),
IOP("lnsubc", HSMHV2_MOD_LNSUBC, IF_REAL, "Length dependence of nsubc"),
IOP("lnsubp", HSMHV2_MOD_LNSUBP, IF_REAL, "Length dependence of nsubp"),
IOP("lscp1", HSMHV2_MOD_LSCP1, IF_REAL, "Length dependence of scp1"),
IOP("lscp2", HSMHV2_MOD_LSCP2, IF_REAL, "Length dependence of scp2"),
IOP("lscp3", HSMHV2_MOD_LSCP3, IF_REAL, "Length dependence of scp3"),
IOP("lsc1", HSMHV2_MOD_LSC1, IF_REAL, "Length dependence of sc1"),
IOP("lsc2", HSMHV2_MOD_LSC2, IF_REAL, "Length dependence of sc2"),
IOP("lsc3", HSMHV2_MOD_LSC3, IF_REAL, "Length dependence of sc3"),
IOP("lpgd1", HSMHV2_MOD_LPGD1, IF_REAL, "Length dependence of pgd1"),
//IOP("lpgd3", HSMHV2_MOD_LPGD3, IF_REAL, "Length dependence of pgd3"),
IOP("lndep", HSMHV2_MOD_LNDEP, IF_REAL, "Length dependence of ndep"),
IOP("lninv", HSMHV2_MOD_LNINV, IF_REAL, "Length dependence of ninv"),
IOP("lmuecb0", HSMHV2_MOD_LMUECB0, IF_REAL, "Length dependence of muecb0"),
IOP("lmuecb1", HSMHV2_MOD_LMUECB1, IF_REAL, "Length dependence of muecb1"),
IOP("lmueph1", HSMHV2_MOD_LMUEPH1, IF_REAL, "Length dependence of mueph1"),
IOP("lvtmp", HSMHV2_MOD_LVTMP, IF_REAL, "Length dependence of vtmp"),
IOP("lwvth0", HSMHV2_MOD_LWVTH0, IF_REAL, "Length dependence of wvth0"),
IOP("lmuesr1", HSMHV2_MOD_LMUESR1, IF_REAL, "Length dependence of muesr1"),
IOP("lmuetmp", HSMHV2_MOD_LMUETMP, IF_REAL, "Length dependence of muetmp"),
IOP("lsub1", HSMHV2_MOD_LSUB1, IF_REAL, "Length dependence of sub1"),
IOP("lsub2", HSMHV2_MOD_LSUB2, IF_REAL, "Length dependence of sub2"),
IOP("lsvds", HSMHV2_MOD_LSVDS, IF_REAL, "Length dependence of svds"),
IOP("lsvbs", HSMHV2_MOD_LSVBS, IF_REAL, "Length dependence of svbs"),
IOP("lsvgs", HSMHV2_MOD_LSVGS, IF_REAL, "Length dependence of svgs"),
IOP("lfn1", HSMHV2_MOD_LFN1, IF_REAL, "Length dependence of fn1"),
IOP("lfn2", HSMHV2_MOD_LFN2, IF_REAL, "Length dependence of fn2"),
IOP("lfn3", HSMHV2_MOD_LFN3, IF_REAL, "Length dependence of fn3"),
IOP("lfvbs", HSMHV2_MOD_LFVBS, IF_REAL, "Length dependence of fvbs"),
IOP("lnsti", HSMHV2_MOD_LNSTI, IF_REAL, "Length dependence of nsti"),
IOP("lwsti", HSMHV2_MOD_LWSTI, IF_REAL, "Length dependence of wsti"),
IOP("lscsti1", HSMHV2_MOD_LSCSTI1, IF_REAL, "Length dependence of scsti1"),
IOP("lscsti2", HSMHV2_MOD_LSCSTI2, IF_REAL, "Length dependence of scsti2"),
IOP("lvthsti", HSMHV2_MOD_LVTHSTI, IF_REAL, "Length dependence of vthsti"),
IOP("lmuesti1", HSMHV2_MOD_LMUESTI1, IF_REAL, "Length dependence of muesti1"),
IOP("lmuesti2", HSMHV2_MOD_LMUESTI2, IF_REAL, "Length dependence of muesti2"),
IOP("lmuesti3", HSMHV2_MOD_LMUESTI3, IF_REAL, "Length dependence of muesti3"),
IOP("lnsubpsti1", HSMHV2_MOD_LNSUBPSTI1, IF_REAL, "Length dependence of nsubpsti1"),
IOP("lnsubpsti2", HSMHV2_MOD_LNSUBPSTI2, IF_REAL, "Length dependence of nsubpsti2"),
IOP("lnsubpsti3", HSMHV2_MOD_LNSUBPSTI3, IF_REAL, "Length dependence of nsubpsti3"),
IOP("lcgso", HSMHV2_MOD_LCGSO, IF_REAL, "Length dependence of cgso"),
IOP("lcgdo", HSMHV2_MOD_LCGDO, IF_REAL, "Length dependence of cgdo"),
IOP("ljs0", HSMHV2_MOD_LJS0, IF_REAL, "Length dependence of js0"),
IOP("ljs0sw", HSMHV2_MOD_LJS0SW, IF_REAL, "Length dependence of js0sw"),
IOP("lnj", HSMHV2_MOD_LNJ, IF_REAL, "Length dependence of nj"),
IOP("lcisbk", HSMHV2_MOD_LCISBK, IF_REAL, "Length dependence of cisbk"),
IOP("lclm1", HSMHV2_MOD_LCLM1, IF_REAL, "Length dependence of clm1"),
IOP("lclm2", HSMHV2_MOD_LCLM2, IF_REAL, "Length dependence of clm2"),
IOP("lclm3", HSMHV2_MOD_LCLM3, IF_REAL, "Length dependence of clm3"),
IOP("lwfc", HSMHV2_MOD_LWFC, IF_REAL, "Length dependence of wfc"),
IOP("lgidl1", HSMHV2_MOD_LGIDL1, IF_REAL, "Length dependence of gidl1"),
IOP("lgidl2", HSMHV2_MOD_LGIDL2, IF_REAL, "Length dependence of gidl2"),
IOP("lgleak1", HSMHV2_MOD_LGLEAK1, IF_REAL, "Length dependence of gleak1"),
IOP("lgleak2", HSMHV2_MOD_LGLEAK2, IF_REAL, "Length dependence of gleak2"),
IOP("lgleak3", HSMHV2_MOD_LGLEAK3, IF_REAL, "Length dependence of gleak3"),
IOP("lgleak6", HSMHV2_MOD_LGLEAK6, IF_REAL, "Length dependence of gleak6"),
IOP("lglksd1", HSMHV2_MOD_LGLKSD1, IF_REAL, "Length dependence of glksd1"),
IOP("lglksd2", HSMHV2_MOD_LGLKSD2, IF_REAL, "Length dependence of glksd2"),
IOP("lglkb1", HSMHV2_MOD_LGLKB1, IF_REAL, "Length dependence of glkb1"),
IOP("lglkb2", HSMHV2_MOD_LGLKB2, IF_REAL, "Length dependence of glkb2"),
IOP("lnftrp", HSMHV2_MOD_LNFTRP, IF_REAL, "Length dependence of nftrp"),
IOP("lnfalp", HSMHV2_MOD_LNFALP, IF_REAL, "Length dependence of nfalp"),
//IOP("lpthrou", HSMHV2_MOD_LPTHROU, IF_REAL, "Length dependence of pthrou"),
IOP("lvdiffj", HSMHV2_MOD_LVDIFFJ, IF_REAL, "Length dependence of vdiffj"),
IOP("libpc1", HSMHV2_MOD_LIBPC1, IF_REAL, "Length dependence of ibpc1"),
IOP("libpc2", HSMHV2_MOD_LIBPC2, IF_REAL, "Length dependence of ibpc2"),
IOP("lcgbo", HSMHV2_MOD_LCGBO, IF_REAL, "Length dependence of cgbo"),
IOP("lcvdsover", HSMHV2_MOD_LCVDSOVER, IF_REAL, "Length dependence of cvdsover"),
IOP("lfalph", HSMHV2_MOD_LFALPH, IF_REAL, "Length dependence of falph"),
IOP("lnpext", HSMHV2_MOD_LNPEXT, IF_REAL, "Length dependence of npext"),
IOP("lpowrat", HSMHV2_MOD_LPOWRAT, IF_REAL, "Length dependence of powrat"),
IOP("lrd", HSMHV2_MOD_LRD, IF_REAL, "Length dependence of rd"),
IOP("lrd22", HSMHV2_MOD_LRD22, IF_REAL, "Length dependence of rd22"),
IOP("lrd23", HSMHV2_MOD_LRD23, IF_REAL, "Length dependence of rd23"),
IOP("lrd24", HSMHV2_MOD_LRD24, IF_REAL, "Length dependence of rd24"),
IOP("lrdict1", HSMHV2_MOD_LRDICT1, IF_REAL, "Length dependence of rdict1"),
IOP("lrdov13", HSMHV2_MOD_LRDOV13, IF_REAL, "Length dependence of rdov13"),
IOP("lrdslp1", HSMHV2_MOD_LRDSLP1, IF_REAL, "Length dependence of rdslp1"),
IOP("lrdvb", HSMHV2_MOD_LRDVB, IF_REAL, "Length dependence of rdvb"),
IOP("lrdvd", HSMHV2_MOD_LRDVD, IF_REAL, "Length dependence of rdvd"),
IOP("lrdvg11", HSMHV2_MOD_LRDVG11, IF_REAL, "Length dependence of rdvg11"),
IOP("lrs", HSMHV2_MOD_LRS, IF_REAL, "Length dependence of rs"),
IOP("lrth0", HSMHV2_MOD_LRTH0, IF_REAL, "Length dependence of rth0"),
IOP("lvover", HSMHV2_MOD_LVOVER, IF_REAL, "Length dependence of vover"),
IOP("ljs0d", HSMHV2_MOD_LJS0D, IF_REAL, "Length dependence of js0d"),
IOP("ljs0swd", HSMHV2_MOD_LJS0SWD, IF_REAL, "Length dependence of js0swd"),
IOP("lnjd", HSMHV2_MOD_LNJD, IF_REAL, "Length dependence of njd"),
IOP("lcisbkd", HSMHV2_MOD_LCISBKD, IF_REAL, "Length dependence of cisbkd"),
IOP("lvdiffjd", HSMHV2_MOD_LVDIFFJD, IF_REAL, "Length dependence of vdiffjd"),
IOP("ljs0s", HSMHV2_MOD_LJS0S, IF_REAL, "Length dependence of js0s"),
IOP("ljs0sws", HSMHV2_MOD_LJS0SWS, IF_REAL, "Length dependence of js0sws"),
IOP("lnjs", HSMHV2_MOD_LNJS, IF_REAL, "Length dependence of njs"),
IOP("lcisbks", HSMHV2_MOD_LCISBKS, IF_REAL, "Length dependence of cisbks"),
IOP("lvdiffjs", HSMHV2_MOD_LVDIFFJS, IF_REAL, "Length dependence of vdiffjs"),
/* Width dependence */
IOP("wvmax", HSMHV2_MOD_WVMAX, IF_REAL, "Width dependence of vmax"),
IOP("wbgtmp1", HSMHV2_MOD_WBGTMP1, IF_REAL, "Width dependence of bgtmp1"),
IOP("wbgtmp2", HSMHV2_MOD_WBGTMP2, IF_REAL, "Width dependence of bgtmp2"),
IOP("weg0", HSMHV2_MOD_WEG0, IF_REAL, "Width dependence of eg0"),
IOP("wvfbover", HSMHV2_MOD_WVFBOVER, IF_REAL, "Width dependence of vfbover"),
IOP("wnover", HSMHV2_MOD_WNOVER, IF_REAL, "Width dependence of nover"),
IOP("wnovers", HSMHV2_MOD_WNOVERS, IF_REAL, "Width dependence of novers on source side"),
IOP("wwl2", HSMHV2_MOD_WWL2, IF_REAL, "Width dependence of wl2"),
IOP("wvfbc", HSMHV2_MOD_WVFBC, IF_REAL, "Width dependence of vfbc"),
IOP("wnsubc", HSMHV2_MOD_WNSUBC, IF_REAL, "Width dependence of nsubc"),
IOP("wnsubp", HSMHV2_MOD_WNSUBP, IF_REAL, "Width dependence of nsubp"),
IOP("wscp1", HSMHV2_MOD_WSCP1, IF_REAL, "Width dependence of scp1"),
IOP("wscp2", HSMHV2_MOD_WSCP2, IF_REAL, "Width dependence of scp2"),
IOP("wscp3", HSMHV2_MOD_WSCP3, IF_REAL, "Width dependence of scp3"),
IOP("wsc1", HSMHV2_MOD_WSC1, IF_REAL, "Width dependence of sc1"),
IOP("wsc2", HSMHV2_MOD_WSC2, IF_REAL, "Width dependence of sc2"),
IOP("wsc3", HSMHV2_MOD_WSC3, IF_REAL, "Width dependence of sc3"),
IOP("wpgd1", HSMHV2_MOD_WPGD1, IF_REAL, "Width dependence of pgd1"),
//IOP("wpgd3", HSMHV2_MOD_WPGD3, IF_REAL, "Width dependence of pgd3"),
IOP("wndep", HSMHV2_MOD_WNDEP, IF_REAL, "Width dependence of ndep"),
IOP("wninv", HSMHV2_MOD_WNINV, IF_REAL, "Width dependence of ninv"),
IOP("wmuecb0", HSMHV2_MOD_WMUECB0, IF_REAL, "Width dependence of muecb0"),
IOP("wmuecb1", HSMHV2_MOD_WMUECB1, IF_REAL, "Width dependence of muecb1"),
IOP("wmueph1", HSMHV2_MOD_WMUEPH1, IF_REAL, "Width dependence of mueph1"),
IOP("wvtmp", HSMHV2_MOD_WVTMP, IF_REAL, "Width dependence of vtmp"),
IOP("wwvth0", HSMHV2_MOD_WWVTH0, IF_REAL, "Width dependence of wvth0"),
IOP("wmuesr1", HSMHV2_MOD_WMUESR1, IF_REAL, "Width dependence of muesr1"),
IOP("wmuetmp", HSMHV2_MOD_WMUETMP, IF_REAL, "Width dependence of muetmp"),
IOP("wsub1", HSMHV2_MOD_WSUB1, IF_REAL, "Width dependence of sub1"),
IOP("wsub2", HSMHV2_MOD_WSUB2, IF_REAL, "Width dependence of sub2"),
IOP("wsvds", HSMHV2_MOD_WSVDS, IF_REAL, "Width dependence of svds"),
IOP("wsvbs", HSMHV2_MOD_WSVBS, IF_REAL, "Width dependence of svbs"),
IOP("wsvgs", HSMHV2_MOD_WSVGS, IF_REAL, "Width dependence of svgs"),
IOP("wfn1", HSMHV2_MOD_WFN1, IF_REAL, "Width dependence of fn1"),
IOP("wfn2", HSMHV2_MOD_WFN2, IF_REAL, "Width dependence of fn2"),
IOP("wfn3", HSMHV2_MOD_WFN3, IF_REAL, "Width dependence of fn3"),
IOP("wfvbs", HSMHV2_MOD_WFVBS, IF_REAL, "Width dependence of fvbs"),
IOP("wnsti", HSMHV2_MOD_WNSTI, IF_REAL, "Width dependence of nsti"),
IOP("wwsti", HSMHV2_MOD_WWSTI, IF_REAL, "Width dependence of wsti"),
IOP("wscsti1", HSMHV2_MOD_WSCSTI1, IF_REAL, "Width dependence of scsti1"),
IOP("wscsti2", HSMHV2_MOD_WSCSTI2, IF_REAL, "Width dependence of scsti2"),
IOP("wvthsti", HSMHV2_MOD_WVTHSTI, IF_REAL, "Width dependence of vthsti"),
IOP("wmuesti1", HSMHV2_MOD_WMUESTI1, IF_REAL, "Width dependence of muesti1"),
IOP("wmuesti2", HSMHV2_MOD_WMUESTI2, IF_REAL, "Width dependence of muesti2"),
IOP("wmuesti3", HSMHV2_MOD_WMUESTI3, IF_REAL, "Width dependence of muesti3"),
IOP("wnsubpsti1", HSMHV2_MOD_WNSUBPSTI1, IF_REAL, "Width dependence of nsubpsti1"),
IOP("wnsubpsti2", HSMHV2_MOD_WNSUBPSTI2, IF_REAL, "Width dependence of nsubpsti2"),
IOP("wnsubpsti3", HSMHV2_MOD_WNSUBPSTI3, IF_REAL, "Width dependence of nsubpsti3"),
IOP("wcgso", HSMHV2_MOD_WCGSO, IF_REAL, "Width dependence of cgso"),
IOP("wcgdo", HSMHV2_MOD_WCGDO, IF_REAL, "Width dependence of cgdo"),
IOP("wjs0", HSMHV2_MOD_WJS0, IF_REAL, "Width dependence of js0"),
IOP("wjs0sw", HSMHV2_MOD_WJS0SW, IF_REAL, "Width dependence of js0sw"),
IOP("wnj", HSMHV2_MOD_WNJ, IF_REAL, "Width dependence of nj"),
IOP("wcisbk", HSMHV2_MOD_WCISBK, IF_REAL, "Width dependence of cisbk"),
IOP("wclm1", HSMHV2_MOD_WCLM1, IF_REAL, "Width dependence of clm1"),
IOP("wclm2", HSMHV2_MOD_WCLM2, IF_REAL, "Width dependence of clm2"),
IOP("wclm3", HSMHV2_MOD_WCLM3, IF_REAL, "Width dependence of clm3"),
IOP("wwfc", HSMHV2_MOD_WWFC, IF_REAL, "Width dependence of wfc"),
IOP("wgidl1", HSMHV2_MOD_WGIDL1, IF_REAL, "Width dependence of gidl1"),
IOP("wgidl2", HSMHV2_MOD_WGIDL2, IF_REAL, "Width dependence of gidl2"),
IOP("wgleak1", HSMHV2_MOD_WGLEAK1, IF_REAL, "Width dependence of gleak1"),
IOP("wgleak2", HSMHV2_MOD_WGLEAK2, IF_REAL, "Width dependence of gleak2"),
IOP("wgleak3", HSMHV2_MOD_WGLEAK3, IF_REAL, "Width dependence of gleak3"),
IOP("wgleak6", HSMHV2_MOD_WGLEAK6, IF_REAL, "Width dependence of gleak6"),
IOP("wglksd1", HSMHV2_MOD_WGLKSD1, IF_REAL, "Width dependence of glksd1"),
IOP("wglksd2", HSMHV2_MOD_WGLKSD2, IF_REAL, "Width dependence of glksd2"),
IOP("wglkb1", HSMHV2_MOD_WGLKB1, IF_REAL, "Width dependence of glkb1"),
IOP("wglkb2", HSMHV2_MOD_WGLKB2, IF_REAL, "Width dependence of glkb2"),
IOP("wnftrp", HSMHV2_MOD_WNFTRP, IF_REAL, "Width dependence of nftrp"),
IOP("wnfalp", HSMHV2_MOD_WNFALP, IF_REAL, "Width dependence of nfalp"),
//IOP("wpthrou", HSMHV2_MOD_WPTHROU, IF_REAL, "Width dependence of pthrou"),
IOP("wvdiffj", HSMHV2_MOD_WVDIFFJ, IF_REAL, "Width dependence of vdiffj"),
IOP("wibpc1", HSMHV2_MOD_WIBPC1, IF_REAL, "Width dependence of ibpc1"),
IOP("wibpc2", HSMHV2_MOD_WIBPC2, IF_REAL, "Width dependence of ibpc2"),
IOP("wcgbo", HSMHV2_MOD_WCGBO, IF_REAL, "Width dependence of cgbo"),
IOP("wcvdsover", HSMHV2_MOD_WCVDSOVER, IF_REAL, "Width dependence of cvdsover"),
IOP("wfalph", HSMHV2_MOD_WFALPH, IF_REAL, "Width dependence of falph"),
IOP("wnpext", HSMHV2_MOD_WNPEXT, IF_REAL, "Width dependence of npext"),
IOP("wpowrat", HSMHV2_MOD_WPOWRAT, IF_REAL, "Width dependence of powrat"),
IOP("wrd", HSMHV2_MOD_WRD, IF_REAL, "Width dependence of rd"),
IOP("wrd22", HSMHV2_MOD_WRD22, IF_REAL, "Width dependence of rd22"),
IOP("wrd23", HSMHV2_MOD_WRD23, IF_REAL, "Width dependence of rd23"),
IOP("wrd24", HSMHV2_MOD_WRD24, IF_REAL, "Width dependence of rd24"),
IOP("wrdict1", HSMHV2_MOD_WRDICT1, IF_REAL, "Width dependence of rdict1"),
IOP("wrdov13", HSMHV2_MOD_WRDOV13, IF_REAL, "Width dependence of rdov13"),
IOP("wrdslp1", HSMHV2_MOD_WRDSLP1, IF_REAL, "Width dependence of rdslp1"),
IOP("wrdvb", HSMHV2_MOD_WRDVB, IF_REAL, "Width dependence of rdvb"),
IOP("wrdvd", HSMHV2_MOD_WRDVD, IF_REAL, "Width dependence of rdvd"),
IOP("wrdvg11", HSMHV2_MOD_WRDVG11, IF_REAL, "Width dependence of rdvg11"),
IOP("wrs", HSMHV2_MOD_WRS, IF_REAL, "Width dependence of rs"),
IOP("wrth0", HSMHV2_MOD_WRTH0, IF_REAL, "Width dependence of rth0"),
IOP("wvover", HSMHV2_MOD_WVOVER, IF_REAL, "Width dependence of vover"),
IOP("wjs0d", HSMHV2_MOD_WJS0D, IF_REAL, "Wength dependence of js0d"),
IOP("wjs0swd", HSMHV2_MOD_WJS0SWD, IF_REAL, "Wength dependence of js0swd"),
IOP("wnjd", HSMHV2_MOD_WNJD, IF_REAL, "Wength dependence of njd"),
IOP("wcisbkd", HSMHV2_MOD_WCISBKD, IF_REAL, "Wength dependence of cisbkd"),
IOP("wvdiffjd", HSMHV2_MOD_WVDIFFJD, IF_REAL, "Wength dependence of vdiffjd"),
IOP("wjs0s", HSMHV2_MOD_WJS0S, IF_REAL, "Wength dependence of js0s"),
IOP("wjs0sws", HSMHV2_MOD_WJS0SWS, IF_REAL, "Wength dependence of js0sws"),
IOP("wnjs", HSMHV2_MOD_WNJS, IF_REAL, "Wength dependence of njs"),
IOP("wcisbks", HSMHV2_MOD_WCISBKS, IF_REAL, "Wength dependence of cisbks"),
IOP("wvdiffjs", HSMHV2_MOD_WVDIFFJS, IF_REAL, "Wength dependence of vdiffjs"),
/* Cross-term dependence */
IOP("pvmax", HSMHV2_MOD_PVMAX, IF_REAL, "Cross-term dependence of vmax"),
IOP("pbgtmp1", HSMHV2_MOD_PBGTMP1, IF_REAL, "Cross-term dependence of bgtmp1"),
IOP("pbgtmp2", HSMHV2_MOD_PBGTMP2, IF_REAL, "Cross-term dependence of bgtmp2"),
IOP("peg0", HSMHV2_MOD_PEG0, IF_REAL, "Cross-term dependence of eg0"),
IOP("pvfbover", HSMHV2_MOD_PVFBOVER, IF_REAL, "Cross-term dependence of vfbover"),
IOP("pnover", HSMHV2_MOD_PNOVER, IF_REAL, "Cross-term dependence of nover"),
IOP("pnovers", HSMHV2_MOD_PNOVERS, IF_REAL, "Cross-term dependence of nover on source side"),
IOP("pwl2", HSMHV2_MOD_PWL2, IF_REAL, "Cross-term dependence of wl2"),
IOP("pvfbc", HSMHV2_MOD_PVFBC, IF_REAL, "Cross-term dependence of vfbc"),
IOP("pnsubc", HSMHV2_MOD_PNSUBC, IF_REAL, "Cross-term dependence of nsubc"),
IOP("pnsubp", HSMHV2_MOD_PNSUBP, IF_REAL, "Cross-term dependence of nsubp"),
IOP("pscp1", HSMHV2_MOD_PSCP1, IF_REAL, "Cross-term dependence of scp1"),
IOP("pscp2", HSMHV2_MOD_PSCP2, IF_REAL, "Cross-term dependence of scp2"),
IOP("pscp3", HSMHV2_MOD_PSCP3, IF_REAL, "Cross-term dependence of scp3"),
IOP("psc1", HSMHV2_MOD_PSC1, IF_REAL, "Cross-term dependence of sc1"),
IOP("psc2", HSMHV2_MOD_PSC2, IF_REAL, "Cross-term dependence of sc2"),
IOP("psc3", HSMHV2_MOD_PSC3, IF_REAL, "Cross-term dependence of sc3"),
IOP("ppgd1", HSMHV2_MOD_PPGD1, IF_REAL, "Cross-term dependence of pgd1"),
//IOP("ppgd3", HSMHV2_MOD_PPGD3, IF_REAL, "Cross-term dependence of pgd3"),
IOP("pndep", HSMHV2_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"),
IOP("pninv", HSMHV2_MOD_PNINV, IF_REAL, "Cross-term dependence of ninv"),
IOP("pmuecb0", HSMHV2_MOD_PMUECB0, IF_REAL, "Cross-term dependence of muecb0"),
IOP("pmuecb1", HSMHV2_MOD_PMUECB1, IF_REAL, "Cross-term dependence of muecb1"),
IOP("pmueph1", HSMHV2_MOD_PMUEPH1, IF_REAL, "Cross-term dependence of mueph1"),
IOP("pvtmp", HSMHV2_MOD_PVTMP, IF_REAL, "Cross-term dependence of vtmp"),
IOP("pwvth0", HSMHV2_MOD_PWVTH0, IF_REAL, "Cross-term dependence of wvth0"),
IOP("pmuesr1", HSMHV2_MOD_PMUESR1, IF_REAL, "Cross-term dependence of muesr1"),
IOP("pmuetmp", HSMHV2_MOD_PMUETMP, IF_REAL, "Cross-term dependence of muetmp"),
IOP("psub1", HSMHV2_MOD_PSUB1, IF_REAL, "Cross-term dependence of sub1"),
IOP("psub2", HSMHV2_MOD_PSUB2, IF_REAL, "Cross-term dependence of sub2"),
IOP("psvds", HSMHV2_MOD_PSVDS, IF_REAL, "Cross-term dependence of svds"),
IOP("psvbs", HSMHV2_MOD_PSVBS, IF_REAL, "Cross-term dependence of svbs"),
IOP("psvgs", HSMHV2_MOD_PSVGS, IF_REAL, "Cross-term dependence of svgs"),
IOP("pfn1", HSMHV2_MOD_PFN1, IF_REAL, "Cross-term dependence of fn1"),
IOP("pfn2", HSMHV2_MOD_PFN2, IF_REAL, "Cross-term dependence of fn2"),
IOP("pfn3", HSMHV2_MOD_PFN3, IF_REAL, "Cross-term dependence of fn3"),
IOP("pfvbs", HSMHV2_MOD_PFVBS, IF_REAL, "Cross-term dependence of fvbs"),
IOP("pnsti", HSMHV2_MOD_PNSTI, IF_REAL, "Cross-term dependence of nsti"),
IOP("pwsti", HSMHV2_MOD_PWSTI, IF_REAL, "Cross-term dependence of wsti"),
IOP("pscsti1", HSMHV2_MOD_PSCSTI1, IF_REAL, "Cross-term dependence of scsti1"),
IOP("pscsti2", HSMHV2_MOD_PSCSTI2, IF_REAL, "Cross-term dependence of scsti2"),
IOP("pvthsti", HSMHV2_MOD_PVTHSTI, IF_REAL, "Cross-term dependence of vthsti"),
IOP("pmuesti1", HSMHV2_MOD_PMUESTI1, IF_REAL, "Cross-term dependence of muesti1"),
IOP("pmuesti2", HSMHV2_MOD_PMUESTI2, IF_REAL, "Cross-term dependence of muesti2"),
IOP("pmuesti3", HSMHV2_MOD_PMUESTI3, IF_REAL, "Cross-term dependence of muesti3"),
IOP("pnsubpsti1", HSMHV2_MOD_PNSUBPSTI1, IF_REAL, "Cross-term dependence of nsubpsti1"),
IOP("pnsubpsti2", HSMHV2_MOD_PNSUBPSTI2, IF_REAL, "Cross-term dependence of nsubpsti2"),
IOP("pnsubpsti3", HSMHV2_MOD_PNSUBPSTI3, IF_REAL, "Cross-term dependence of nsubpsti3"),
IOP("pcgso", HSMHV2_MOD_PCGSO, IF_REAL, "Cross-term dependence of cgso"),
IOP("pcgdo", HSMHV2_MOD_PCGDO, IF_REAL, "Cross-term dependence of cgdo"),
IOP("pjs0", HSMHV2_MOD_PJS0, IF_REAL, "Cross-term dependence of js0"),
IOP("pjs0sw", HSMHV2_MOD_PJS0SW, IF_REAL, "Cross-term dependence of js0sw"),
IOP("pnj", HSMHV2_MOD_PNJ, IF_REAL, "Cross-term dependence of nj"),
IOP("pcisbk", HSMHV2_MOD_PCISBK, IF_REAL, "Cross-term dependence of cisbk"),
IOP("pclm1", HSMHV2_MOD_PCLM1, IF_REAL, "Cross-term dependence of clm1"),
IOP("pclm2", HSMHV2_MOD_PCLM2, IF_REAL, "Cross-term dependence of clm2"),
IOP("pclm3", HSMHV2_MOD_PCLM3, IF_REAL, "Cross-term dependence of clm3"),
IOP("pwfc", HSMHV2_MOD_PWFC, IF_REAL, "Cross-term dependence of wfc"),
IOP("pgidl1", HSMHV2_MOD_PGIDL1, IF_REAL, "Cross-term dependence of gidl1"),
IOP("pgidl2", HSMHV2_MOD_PGIDL2, IF_REAL, "Cross-term dependence of gidl2"),
IOP("pgleak1", HSMHV2_MOD_PGLEAK1, IF_REAL, "Cross-term dependence of gleak1"),
IOP("pgleak2", HSMHV2_MOD_PGLEAK2, IF_REAL, "Cross-term dependence of gleak2"),
IOP("pgleak3", HSMHV2_MOD_PGLEAK3, IF_REAL, "Cross-term dependence of gleak3"),
IOP("pgleak6", HSMHV2_MOD_PGLEAK6, IF_REAL, "Cross-term dependence of gleak6"),
IOP("pglksd1", HSMHV2_MOD_PGLKSD1, IF_REAL, "Cross-term dependence of glksd1"),
IOP("pglksd2", HSMHV2_MOD_PGLKSD2, IF_REAL, "Cross-term dependence of glksd2"),
IOP("pglkb1", HSMHV2_MOD_PGLKB1, IF_REAL, "Cross-term dependence of glkb1"),
IOP("pglkb2", HSMHV2_MOD_PGLKB2, IF_REAL, "Cross-term dependence of glkb2"),
IOP("pnftrp", HSMHV2_MOD_PNFTRP, IF_REAL, "Cross-term dependence of nftrp"),
IOP("pnfalp", HSMHV2_MOD_PNFALP, IF_REAL, "Cross-term dependence of nfalp"),
//IOP("ppthrou", HSMHV2_MOD_PPTHROU, IF_REAL, "Cross-term dependence of pthrou"),
IOP("pvdiffj", HSMHV2_MOD_PVDIFFJ, IF_REAL, "Cross-term dependence of vdiffj"),
IOP("pibpc1", HSMHV2_MOD_PIBPC1, IF_REAL, "Cross-term dependence of ibpc1"),
IOP("pibpc2", HSMHV2_MOD_PIBPC2, IF_REAL, "Cross-term dependence of ibpc2"),
IOP("pcgbo", HSMHV2_MOD_PCGBO, IF_REAL, "Cross-term dependence of cgbo"),
IOP("pcvdsover", HSMHV2_MOD_PCVDSOVER, IF_REAL, "Cross-term dependence of cvdsover"),
IOP("pfalph", HSMHV2_MOD_PFALPH, IF_REAL, "Cross-term dependence of falph"),
IOP("pnpext", HSMHV2_MOD_PNPEXT, IF_REAL, "Cross-term dependence of npext"),
IOP("ppowrat", HSMHV2_MOD_PPOWRAT, IF_REAL, "Cross-term dependence of powrat"),
IOP("prd", HSMHV2_MOD_PRD, IF_REAL, "Cross-term dependence of rd"),
IOP("prd22", HSMHV2_MOD_PRD22, IF_REAL, "Cross-term dependence of rd22"),
IOP("prd23", HSMHV2_MOD_PRD23, IF_REAL, "Cross-term dependence of rd23"),
IOP("prd24", HSMHV2_MOD_PRD24, IF_REAL, "Cross-term dependence of rd24"),
IOP("prdict1", HSMHV2_MOD_PRDICT1, IF_REAL, "Cross-term dependence of rdict1"),
IOP("prdov13", HSMHV2_MOD_PRDOV13, IF_REAL, "Cross-term dependence of rdov13"),
IOP("prdslp1", HSMHV2_MOD_PRDSLP1, IF_REAL, "Cross-term dependence of rdslp1"),
IOP("prdvb", HSMHV2_MOD_PRDVB, IF_REAL, "Cross-term dependence of rdvb"),
IOP("prdvd", HSMHV2_MOD_PRDVD, IF_REAL, "Cross-term dependence of rdvd"),
IOP("prdvg11", HSMHV2_MOD_PRDVG11, IF_REAL, "Cross-term dependence of rdvg11"),
IOP("prs", HSMHV2_MOD_PRS, IF_REAL, "Cross-term dependence of rs"),
IOP("prth0", HSMHV2_MOD_PRTH0, IF_REAL, "Cross-term dependence of rth0"),
IOP("pvover", HSMHV2_MOD_PVOVER, IF_REAL, "Cross-term dependence of vover"),
IOP("pjs0d", HSMHV2_MOD_PJS0D, IF_REAL, "Cross-term dependence of js0d"),
IOP("pjs0swd", HSMHV2_MOD_PJS0SWD, IF_REAL, "Cross-term dependence of js0swd"),
IOP("pnjd", HSMHV2_MOD_PNJD, IF_REAL, "Cross-term dependence of njd"),
IOP("pcisbkd", HSMHV2_MOD_PCISBKD, IF_REAL, "Cross-term dependence of cisbkd"),
IOP("pvdiffjd", HSMHV2_MOD_PVDIFFJD, IF_REAL, "Cross-term dependence of vdiffjd"),
IOP("pjs0s", HSMHV2_MOD_PJS0S, IF_REAL, "Cross-term dependence of js0s"),
IOP("pjs0sws", HSMHV2_MOD_PJS0SWS, IF_REAL, "Cross-term dependence of js0sws"),
IOP("pnjs", HSMHV2_MOD_PNJS, IF_REAL, "Cross-term dependence of njs"),
IOP("pcisbks", HSMHV2_MOD_PCISBKS, IF_REAL, "Cross-term dependence of cisbks"),
IOP("pvdiffjs", HSMHV2_MOD_PVDIFFJS, IF_REAL, "Cross-term dependence of vdiffjs"),
IOP("vgs_max", HSMHV2_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"),
IOP("vgd_max", HSMHV2_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"),
IOP("vgb_max", HSMHV2_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"),
IOP("vds_max", HSMHV2_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"),
IOP("vbs_max", HSMHV2_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"),
IOP("vbd_max", HSMHV2_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch")
};
char *HSMHV2names[] = {
"Drain",
"Gate",
"Source",
"Bulk",
"Substrate",
"Temp"
};
int HSMHV2nSize = NUMELEMS(HSMHV2names);
int HSMHV2pTSize = NUMELEMS(HSMHV2pTable);
int HSMHV2mPTSize = NUMELEMS(HSMHV2mPTable);
int HSMHV2iSize = sizeof(HSMHV2instance);
int HSMHV2mSize = sizeof(HSMHV2model);

View File

@ -0,0 +1,340 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvacld.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
#include "hsmhvdef.h"
int HSMHV2acLoad(
GENmodel *inModel,
CKTcircuit *ckt)
{
HSMHV2model *model = (HSMHV2model*)inModel;
HSMHV2instance *here;
double omega=0.0 ;
int flg_nqs =0 ;
int flg_subNode = 0 ;
#define dNode 0
#define dNodePrime 1
#define gNode 2
#define gNodePrime 3
#define sNode 4
#define sNodePrime 5
#define bNodePrime 6
#define bNode 7
#define dbNode 8
#define sbNode 9
#define subNode 10
#define tempNode 11
#define qiNode 12
#define qbNode 13
omega = ckt->CKTomega;
for ( ; model != NULL; model = model->HSMHV2nextModel ) {
for ( here = model->HSMHV2instances; here!= NULL; here = here->HSMHV2nextInstance ) {
flg_nqs = model->HSMHV2_conqs ;
flg_subNode = here->HSMHV2subNode ; /* if flg_subNode > 0, external(/internal) substrate node exists */
/* stamp matrix */
/*drain*/
*(here->HSMHV2DdPtr) += here->HSMHV2_ydc_d[dNode] ;
*(here->HSMHV2DdPtr +1) += omega*here->HSMHV2_ydyn_d[dNode] ;
*(here->HSMHV2DdpPtr) += here->HSMHV2_ydc_d[dNodePrime] ;
*(here->HSMHV2DdpPtr +1) += omega*here->HSMHV2_ydyn_d[dNodePrime];
*(here->HSMHV2DgpPtr) += here->HSMHV2_ydc_d[gNodePrime];
*(here->HSMHV2DgpPtr +1) += omega*here->HSMHV2_ydyn_d[gNodePrime];
*(here->HSMHV2DsPtr) += here->HSMHV2_ydc_d[sNode];
*(here->HSMHV2DsPtr +1) += omega*here->HSMHV2_ydyn_d[sNode];
*(here->HSMHV2DbpPtr) += here->HSMHV2_ydc_d[bNodePrime];
*(here->HSMHV2DbpPtr +1) += omega*here->HSMHV2_ydyn_d[bNodePrime];
*(here->HSMHV2DdbPtr) += here->HSMHV2_ydc_d[dbNode];
*(here->HSMHV2DdbPtr +1) += omega*here->HSMHV2_ydyn_d[dbNode];
if (flg_subNode > 0) {
*(here->HSMHV2DsubPtr) += here->HSMHV2_ydc_d[subNode];
}
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2DtempPtr) += model->HSMHV2_type*here->HSMHV2_ydc_d[tempNode];
*(here->HSMHV2DtempPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_d[tempNode];
}
/*drain prime*/
*(here->HSMHV2DPdPtr) += here->HSMHV2_ydc_dP[dNode] ;
*(here->HSMHV2DPdPtr +1) += omega*here->HSMHV2_ydyn_dP[dNode];
*(here->HSMHV2DPdpPtr) += here->HSMHV2_ydc_dP[dNodePrime];
*(here->HSMHV2DPdpPtr +1) += omega*here->HSMHV2_ydyn_dP[dNodePrime];
*(here->HSMHV2DPgpPtr) += here->HSMHV2_ydc_dP[gNodePrime];
*(here->HSMHV2DPgpPtr +1) += omega*here->HSMHV2_ydyn_dP[gNodePrime];
*(here->HSMHV2DPsPtr) += here->HSMHV2_ydc_dP[sNode] ;
*(here->HSMHV2DPsPtr +1) += omega*here->HSMHV2_ydyn_dP[sNode];
*(here->HSMHV2DPspPtr) += here->HSMHV2_ydc_dP[sNodePrime] ;
*(here->HSMHV2DPspPtr +1) += omega*here->HSMHV2_ydyn_dP[sNodePrime];
*(here->HSMHV2DPbpPtr) += here->HSMHV2_ydc_dP[bNodePrime] ;
*(here->HSMHV2DPbpPtr +1) += omega*here->HSMHV2_ydyn_dP[bNodePrime];
if (flg_subNode > 0) {
*(here->HSMHV2DPsubPtr) += here->HSMHV2_ydc_dP[subNode];
}
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2DPtempPtr) += model->HSMHV2_type*here->HSMHV2_ydc_dP[tempNode];
*(here->HSMHV2DPtempPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_dP[tempNode];
}
if (flg_nqs) {
*(here->HSMHV2DPqiPtr) += model->HSMHV2_type*here->HSMHV2_ydc_dP[qiNode];
*(here->HSMHV2DPqiPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_dP[qiNode];
}
/*gate*/
*(here->HSMHV2GgPtr) += here->HSMHV2_ydc_g[gNode] ;
*(here->HSMHV2GgPtr +1) += omega*here->HSMHV2_ydyn_g[gNode];
*(here->HSMHV2GgpPtr) += here->HSMHV2_ydc_g[gNodePrime] ;
*(here->HSMHV2GgpPtr +1) += omega*here->HSMHV2_ydyn_g[gNodePrime];
/*gate prime*/
*(here->HSMHV2GPdPtr) += here->HSMHV2_ydc_gP[dNode] ;
*(here->HSMHV2GPdPtr +1) += omega*here->HSMHV2_ydyn_gP[dNode];
*(here->HSMHV2GPdpPtr) += here->HSMHV2_ydc_gP[dNodePrime] ;
*(here->HSMHV2GPdpPtr +1) += omega*here->HSMHV2_ydyn_gP[dNodePrime];
*(here->HSMHV2GPgPtr) += here->HSMHV2_ydc_gP[gNode];
*(here->HSMHV2GPgPtr +1) += omega*here->HSMHV2_ydyn_gP[gNode];
*(here->HSMHV2GPgpPtr) += here->HSMHV2_ydc_gP[gNodePrime] ;
*(here->HSMHV2GPgpPtr +1) += omega*here->HSMHV2_ydyn_gP[gNodePrime];
*(here->HSMHV2GPsPtr) += here->HSMHV2_ydc_gP[sNode];
*(here->HSMHV2GPsPtr +1) += omega*here->HSMHV2_ydyn_gP[sNode];
*(here->HSMHV2GPspPtr) += here->HSMHV2_ydc_gP[sNodePrime] ;
*(here->HSMHV2GPspPtr +1) += omega*here->HSMHV2_ydyn_gP[sNodePrime];
*(here->HSMHV2GPbpPtr) += here->HSMHV2_ydc_gP[bNodePrime] ;
*(here->HSMHV2GPbpPtr +1) += omega*here->HSMHV2_ydyn_gP[bNodePrime];
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2GPtempPtr) += model->HSMHV2_type*here->HSMHV2_ydc_gP[tempNode] ;
*(here->HSMHV2GPtempPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_gP[tempNode];
}
if (flg_nqs) {
*(here->HSMHV2GPqiPtr) += model->HSMHV2_type*here->HSMHV2_ydc_gP[qiNode];
*(here->HSMHV2GPqiPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_gP[qiNode];
*(here->HSMHV2GPqbPtr) += model->HSMHV2_type*here->HSMHV2_ydc_gP[qbNode];
*(here->HSMHV2GPqbPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_gP[qbNode];
}
/*source*/
*(here->HSMHV2SdPtr) += here->HSMHV2_ydc_s[dNode];
*(here->HSMHV2SdPtr +1) += omega*here->HSMHV2_ydyn_s[dNode];
*(here->HSMHV2SgpPtr) += here->HSMHV2_ydc_s[gNodePrime];
*(here->HSMHV2SgpPtr +1) += omega*here->HSMHV2_ydyn_s[gNodePrime];
*(here->HSMHV2SsPtr) += here->HSMHV2_ydc_s[sNode] ;
*(here->HSMHV2SsPtr +1) += omega*here->HSMHV2_ydyn_s[sNode];
*(here->HSMHV2SspPtr) += here->HSMHV2_ydc_s[sNodePrime] ;
*(here->HSMHV2SspPtr +1) += omega*here->HSMHV2_ydyn_s[sNodePrime];
*(here->HSMHV2SbpPtr) += here->HSMHV2_ydc_s[bNodePrime];
*(here->HSMHV2SbpPtr +1) += omega*here->HSMHV2_ydyn_s[bNodePrime];
*(here->HSMHV2SsbPtr) += here->HSMHV2_ydc_s[sbNode] ;
*(here->HSMHV2SsbPtr +1) += omega*here->HSMHV2_ydyn_s[sbNode];
if (flg_subNode > 0) {
*(here->HSMHV2SsubPtr) += here->HSMHV2_ydc_s[subNode];
}
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2StempPtr) += model->HSMHV2_type*here->HSMHV2_ydc_s[tempNode];
*(here->HSMHV2StempPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_s[tempNode];
}
/*source prime*/
*(here->HSMHV2SPdPtr) += here->HSMHV2_ydc_sP[dNode] ;
*(here->HSMHV2SPdPtr +1) += omega*here->HSMHV2_ydyn_sP[dNode];
*(here->HSMHV2SPdpPtr) += here->HSMHV2_ydc_sP[dNodePrime] ;
*(here->HSMHV2SPdpPtr +1) += omega*here->HSMHV2_ydyn_sP[dNodePrime];
*(here->HSMHV2SPgpPtr) += here->HSMHV2_ydc_sP[gNodePrime] ;
*(here->HSMHV2SPgpPtr +1) += omega*here->HSMHV2_ydyn_sP[gNodePrime];
*(here->HSMHV2SPsPtr) += here->HSMHV2_ydc_sP[sNode] ;
*(here->HSMHV2SPsPtr +1) += omega*here->HSMHV2_ydyn_sP[sNode];
*(here->HSMHV2SPspPtr) += here->HSMHV2_ydc_sP[sNodePrime] ;
*(here->HSMHV2SPspPtr +1) += omega*here->HSMHV2_ydyn_sP[sNodePrime];
*(here->HSMHV2SPbpPtr) += here->HSMHV2_ydc_sP[bNodePrime];
*(here->HSMHV2SPbpPtr +1) += omega*here->HSMHV2_ydyn_sP[bNodePrime];
if (flg_subNode > 0) {
*(here->HSMHV2SPsubPtr) += here->HSMHV2_ydc_sP[subNode];
}
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2SPtempPtr) += model->HSMHV2_type*here->HSMHV2_ydc_sP[tempNode] ;
*(here->HSMHV2SPtempPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_sP[tempNode];
}
if (flg_nqs) {
*(here->HSMHV2SPqiPtr) += model->HSMHV2_type*here->HSMHV2_ydc_sP[qiNode];
*(here->HSMHV2SPqiPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_sP[qiNode];
}
/*bulk prime*/
*(here->HSMHV2BPdPtr) += here->HSMHV2_ydc_bP[dNode];
*(here->HSMHV2BPdPtr +1) += omega*here->HSMHV2_ydyn_bP[dNode];
*(here->HSMHV2BPsPtr) += here->HSMHV2_ydc_bP[sNode];
*(here->HSMHV2BPsPtr +1) += omega*here->HSMHV2_ydyn_bP[sNode];
*(here->HSMHV2BPdpPtr) += here->HSMHV2_ydc_bP[dNodePrime];
*(here->HSMHV2BPdpPtr +1) += omega*here->HSMHV2_ydyn_bP[dNodePrime];
*(here->HSMHV2BPgpPtr) += here->HSMHV2_ydc_bP[gNodePrime] ;
*(here->HSMHV2BPgpPtr +1) += omega*here->HSMHV2_ydyn_bP[gNodePrime];
*(here->HSMHV2BPspPtr) += here->HSMHV2_ydc_bP[sNodePrime];
*(here->HSMHV2BPspPtr +1) += omega*here->HSMHV2_ydyn_bP[sNodePrime];
*(here->HSMHV2BPbpPtr) += here->HSMHV2_ydc_bP[bNodePrime];
*(here->HSMHV2BPbpPtr +1) += omega*here->HSMHV2_ydyn_bP[bNodePrime];
*(here->HSMHV2BPbPtr) += here->HSMHV2_ydc_bP[bNode];
*(here->HSMHV2BPbPtr +1) += omega*here->HSMHV2_ydyn_bP[bNode];
*(here->HSMHV2BPdbPtr) += here->HSMHV2_ydc_bP[dbNode] ;
*(here->HSMHV2BPdbPtr +1) += omega*here->HSMHV2_ydyn_bP[dbNode];
*(here->HSMHV2BPsbPtr) += here->HSMHV2_ydc_bP[sbNode] ;
*(here->HSMHV2BPsbPtr +1) += omega*here->HSMHV2_ydyn_bP[sbNode];
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2BPtempPtr) += model->HSMHV2_type*here->HSMHV2_ydc_bP[tempNode] ;
*(here->HSMHV2BPtempPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_bP[tempNode];
}
if (flg_nqs) {
*(here->HSMHV2BPqbPtr) += model->HSMHV2_type*here->HSMHV2_ydc_bP[qbNode];
*(here->HSMHV2BPqbPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_bP[qbNode];
}
/*bulk*/
*(here->HSMHV2BbpPtr) += here->HSMHV2_ydc_b[bNodePrime] ;
*(here->HSMHV2BbpPtr +1) += omega*here->HSMHV2_ydyn_b[bNodePrime];
*(here->HSMHV2BbPtr) += here->HSMHV2_ydc_b[bNode] ;
*(here->HSMHV2BbPtr +1) += omega*here->HSMHV2_ydyn_b[bNode];
/*drain bulk*/
*(here->HSMHV2DBdPtr) += here->HSMHV2_ydc_db[dNode] ;
*(here->HSMHV2DBdPtr +1) += omega*here->HSMHV2_ydyn_db[dNode];
*(here->HSMHV2DBbpPtr) += here->HSMHV2_ydc_db[bNodePrime] ;
*(here->HSMHV2DBbpPtr +1) += omega*here->HSMHV2_ydyn_db[bNodePrime];
*(here->HSMHV2DBdbPtr) += here->HSMHV2_ydc_db[dbNode] ;
*(here->HSMHV2DBdbPtr +1) += omega*here->HSMHV2_ydyn_db[dbNode];
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2DBtempPtr) += model->HSMHV2_type*here->HSMHV2_ydc_db[tempNode] ;
*(here->HSMHV2DBtempPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_db[tempNode];
}
/*source bulk*/
*(here->HSMHV2SBsPtr) += here->HSMHV2_ydc_sb[sNode] ;
*(here->HSMHV2SBsPtr +1) += omega*here->HSMHV2_ydyn_sb[sNode];
*(here->HSMHV2SBbpPtr) += here->HSMHV2_ydc_sb[bNodePrime];
*(here->HSMHV2SBbpPtr +1) += omega*here->HSMHV2_ydyn_sb[bNodePrime];
*(here->HSMHV2SBsbPtr) += here->HSMHV2_ydc_sb[sbNode] ;
*(here->HSMHV2SBsbPtr +1) += omega*here->HSMHV2_ydyn_sb[sbNode];
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2SBtempPtr) += model->HSMHV2_type*here->HSMHV2_ydc_sb[tempNode];
*(here->HSMHV2SBtempPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_sb[tempNode];
}
/*temp*/
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2TempdPtr) += model->HSMHV2_type*here->HSMHV2_ydc_t[dNode] ;
*(here->HSMHV2TempdPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_t[dNode];
*(here->HSMHV2TempdpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_t[dNodePrime] ;
*(here->HSMHV2TempdpPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_t[dNodePrime];
*(here->HSMHV2TempgpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_t[gNodePrime];
*(here->HSMHV2TempgpPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_t[gNodePrime];
*(here->HSMHV2TempsPtr) += model->HSMHV2_type*here->HSMHV2_ydc_t[sNode] ;
*(here->HSMHV2TempsPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_t[sNode];
*(here->HSMHV2TempspPtr) += model->HSMHV2_type*here->HSMHV2_ydc_t[sNodePrime] ;
*(here->HSMHV2TempspPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_t[sNodePrime];
*(here->HSMHV2TempbpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_t[bNodePrime] ;
*(here->HSMHV2TempbpPtr +1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_t[bNodePrime];
*(here->HSMHV2TemptempPtr) += here->HSMHV2_ydc_t[tempNode] ;
*(here->HSMHV2TemptempPtr +1) += omega*here->HSMHV2_ydyn_t[tempNode];
}
/* additional entries for flat nqs handling */
if ( flg_nqs ) {
/*qi*/
*(here->HSMHV2QIdpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_qi[dNodePrime];
*(here->HSMHV2QIdpPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_qi[dNodePrime];
*(here->HSMHV2QIgpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_qi[gNodePrime];
*(here->HSMHV2QIgpPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_qi[gNodePrime];
*(here->HSMHV2QIspPtr) += model->HSMHV2_type*here->HSMHV2_ydc_qi[sNodePrime];
*(here->HSMHV2QIspPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_qi[sNodePrime];
*(here->HSMHV2QIbpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_qi[bNodePrime];
*(here->HSMHV2QIbpPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_qi[bNodePrime];
*(here->HSMHV2QIqiPtr) += here->HSMHV2_ydc_qi[qiNode];
*(here->HSMHV2QIqiPtr+1) += omega*here->HSMHV2_ydyn_qi[qiNode];
if ( here->HSMHV2tempNode > 0 ) {
*(here->HSMHV2QItempPtr) += here->HSMHV2_ydc_qi[tempNode];
*(here->HSMHV2QItempPtr+1) += omega*here->HSMHV2_ydyn_qi[tempNode];
}
/*qb*/
*(here->HSMHV2QBdpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_qb[dNodePrime];
*(here->HSMHV2QBdpPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_qb[dNodePrime];
*(here->HSMHV2QBgpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_qb[gNodePrime];
*(here->HSMHV2QBgpPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_qb[gNodePrime];
*(here->HSMHV2QBspPtr) += model->HSMHV2_type*here->HSMHV2_ydc_qb[sNodePrime];
*(here->HSMHV2QBspPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_qb[sNodePrime];
*(here->HSMHV2QBbpPtr) += model->HSMHV2_type*here->HSMHV2_ydc_qb[bNodePrime];
*(here->HSMHV2QBbpPtr+1) += model->HSMHV2_type*omega*here->HSMHV2_ydyn_qb[bNodePrime];
*(here->HSMHV2QBqbPtr) += here->HSMHV2_ydc_qb[qbNode];
*(here->HSMHV2QBqbPtr+1) += omega*here->HSMHV2_ydyn_qb[qbNode];
if ( here->HSMHV2tempNode > 0 ) {
*(here->HSMHV2QBtempPtr) += here->HSMHV2_ydc_qb[tempNode];
*(here->HSMHV2QBtempPtr+1) += omega*here->HSMHV2_ydyn_qb[tempNode];
}
}
}
}
return(OK);
}

View File

@ -0,0 +1,469 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvask.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/ifsim.h"
#include "ngspice/cktdefs.h"
#include "ngspice/devdefs.h"
#include "hsmhvdef.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
int HSMHV2ask(
CKTcircuit *ckt,
GENinstance *inst,
int which,
IFvalue *value,
IFvalue *select)
{
HSMHV2instance *here = (HSMHV2instance*)inst;
int flg_nqs ;
double cggb_nqs, cgdb_nqs, cgsb_nqs, cdgb_nqs, cddb_nqs, cdsb_nqs, cbgb_nqs, cbdb_nqs, cbsb_nqs ;
double Qi_nqs, dQi_nqs_dVds, dQi_nqs_dVgs, dQi_nqs_dVbs,
dQb_nqs_dVds, dQb_nqs_dVgs, dQb_nqs_dVbs ;
double Qdrat, dQdrat_dVds, dQdrat_dVgs, dQdrat_dVbs,
dQi_dVds, dQi_dVgs, dQi_dVbs,
dQbulk_dVds, dQbulk_dVgs, dQbulk_dVbs ;
double dQd_nqs_dVds, dQd_nqs_dVgs, dQd_nqs_dVbs, dQd_nqs_dQi_nqs ;
double dQg_nqs_dQi_nqs, dQg_nqs_dQb_nqs ;
NG_IGNORE(select);
here->HSMHV2_csdo = - (here->HSMHV2_cddo + here->HSMHV2_cgdo + here->HSMHV2_cbdo) ;
here->HSMHV2_csgo = - (here->HSMHV2_cdgo + here->HSMHV2_cggo + here->HSMHV2_cbgo) ;
here->HSMHV2_csbo = - (here->HSMHV2_cdbo + here->HSMHV2_cgbo + here->HSMHV2_cbbo) ;
here->HSMHV2_cdso = - (here->HSMHV2_cddo + here->HSMHV2_cdgo + here->HSMHV2_cdbo) ;
here->HSMHV2_cgso = - (here->HSMHV2_cgdo + here->HSMHV2_cggo + here->HSMHV2_cgbo) ;
here->HSMHV2_csso = - (here->HSMHV2_csdo + here->HSMHV2_csgo + here->HSMHV2_csbo) ;
/* NQS? */
if (here->HSMHV2QIqiPtr == (double *)NULL) {
flg_nqs = 0 ;
} else {
flg_nqs = 1 ;
}
/* printf("HSMHV2ask: flg_nqs = %d\n", flg_nqs) ; */
if (flg_nqs) { /* collect data for NQS case (DC operating point only!) */
Qi_nqs = *(ckt->CKTstate0 + here->HSMHV2qi_nqs) ;
if ( here->HSMHV2_mode > 0 ) { /* forward mode */
Qdrat = here->HSMHV2_Xd ;
dQdrat_dVds = here->HSMHV2_Xd_dVdsi ;
dQdrat_dVgs = here->HSMHV2_Xd_dVgsi ;
dQdrat_dVbs = here->HSMHV2_Xd_dVbsi ;
dQi_dVds = here->HSMHV2_Qi_dVdsi ;
dQi_dVgs = here->HSMHV2_Qi_dVgsi ;
dQi_dVbs = here->HSMHV2_Qi_dVbsi ;
dQbulk_dVds = here->HSMHV2_Qbulk_dVdsi ;
dQbulk_dVgs = here->HSMHV2_Qbulk_dVgsi ;
dQbulk_dVbs = here->HSMHV2_Qbulk_dVbsi ;
} else { /* reverse mode */
Qdrat = 1.0 - here->HSMHV2_Xd ;
dQdrat_dVds = +(here->HSMHV2_Xd_dVdsi + here->HSMHV2_Xd_dVgsi + here->HSMHV2_Xd_dVbsi) ;
dQdrat_dVgs = - here->HSMHV2_Xd_dVgsi ;
dQdrat_dVbs = - here->HSMHV2_Xd_dVbsi ;
dQi_dVds = -(here->HSMHV2_Qi_dVdsi + here->HSMHV2_Qi_dVgsi + here->HSMHV2_Qi_dVbsi) ;
dQi_dVgs = here->HSMHV2_Qi_dVgsi ;
dQi_dVbs = here->HSMHV2_Qi_dVbsi ;
dQbulk_dVds = -(here->HSMHV2_Qbulk_dVdsi + here->HSMHV2_Qbulk_dVgsi + here->HSMHV2_Qbulk_dVbsi) ;
dQbulk_dVgs = here->HSMHV2_Qbulk_dVgsi ;
dQbulk_dVbs = here->HSMHV2_Qbulk_dVbsi ;
}
/* from Qg_nqs = - Qi_nqs - Qb_nqs: */
dQg_nqs_dQi_nqs = - 1.0 ;
dQg_nqs_dQb_nqs = - 1.0 ;
/* from Qd_nqs = Qi_nqs * Qdrat: */
dQd_nqs_dVds = Qi_nqs * dQdrat_dVds ;
dQd_nqs_dVgs = Qi_nqs * dQdrat_dVgs ;
dQd_nqs_dVbs = Qi_nqs * dQdrat_dVbs ;
dQd_nqs_dQi_nqs = Qdrat ;
/* by implicit differentiation of the NQS equations (DC operating point only!): */
dQi_nqs_dVds = dQi_dVds ;
dQi_nqs_dVgs = dQi_dVgs ;
dQi_nqs_dVbs = dQi_dVbs ;
dQb_nqs_dVds = dQbulk_dVds ;
dQb_nqs_dVgs = dQbulk_dVgs ;
dQb_nqs_dVbs = dQbulk_dVbs ;
cggb_nqs = dQg_nqs_dQi_nqs * dQi_nqs_dVgs + dQg_nqs_dQb_nqs * dQb_nqs_dVgs ;
cgdb_nqs = dQg_nqs_dQi_nqs * dQi_nqs_dVds + dQg_nqs_dQb_nqs * dQb_nqs_dVds ;
cgsb_nqs = - dQg_nqs_dQi_nqs * (dQi_nqs_dVds + dQi_nqs_dVgs + dQi_nqs_dVbs)
- dQg_nqs_dQb_nqs * (dQb_nqs_dVds + dQb_nqs_dVgs + dQb_nqs_dVbs) ;
cdgb_nqs = dQd_nqs_dVgs + dQd_nqs_dQi_nqs * dQi_nqs_dVgs ;
cddb_nqs = dQd_nqs_dVds + dQd_nqs_dQi_nqs * dQi_nqs_dVds ;
cdsb_nqs = -(dQd_nqs_dVds + dQd_nqs_dVgs + dQd_nqs_dVbs) - dQd_nqs_dQi_nqs * (dQi_nqs_dVds + dQi_nqs_dVgs + dQi_nqs_dVbs) ;
cbgb_nqs = dQb_nqs_dVgs ;
cbdb_nqs = dQb_nqs_dVds ;
cbsb_nqs = -(dQb_nqs_dVds + dQb_nqs_dVgs + dQb_nqs_dVbs) ;
} else { /* QS case */
cggb_nqs = cgdb_nqs = cgsb_nqs = cdgb_nqs = cddb_nqs = cdsb_nqs = cbgb_nqs = cbdb_nqs = cbsb_nqs = 0.0 ;
}
switch (which) {
case HSMHV2_COSELFHEAT:
value->iValue = here->HSMHV2_coselfheat;
return(OK);
case HSMHV2_COSUBNODE:
value->iValue = here->HSMHV2_cosubnode;
return(OK);
case HSMHV2_L:
value->rValue = here->HSMHV2_l;
return(OK);
case HSMHV2_W:
value->rValue = here->HSMHV2_w;
return(OK);
case HSMHV2_AS:
value->rValue = here->HSMHV2_as;
return(OK);
case HSMHV2_AD:
value->rValue = here->HSMHV2_ad;
return(OK);
case HSMHV2_PS:
value->rValue = here->HSMHV2_ps;
return(OK);
case HSMHV2_PD:
value->rValue = here->HSMHV2_pd;
return(OK);
case HSMHV2_NRS:
value->rValue = here->HSMHV2_nrs;
return(OK);
case HSMHV2_NRD:
value->rValue = here->HSMHV2_nrd;
return(OK);
case HSMHV2_DTEMP:
value->rValue = here->HSMHV2_dtemp;
return(OK);
case HSMHV2_OFF:
value->iValue = here->HSMHV2_off;
return(OK);
case HSMHV2_IC_VBS:
value->rValue = here->HSMHV2_icVBS;
return(OK);
case HSMHV2_IC_VDS:
value->rValue = here->HSMHV2_icVDS;
return(OK);
case HSMHV2_IC_VGS:
value->rValue = here->HSMHV2_icVGS;
return(OK);
case HSMHV2_DNODE:
value->iValue = here->HSMHV2dNode;
return(OK);
case HSMHV2_GNODE:
value->iValue = here->HSMHV2gNode;
return(OK);
case HSMHV2_SNODE:
value->iValue = here->HSMHV2sNode;
return(OK);
case HSMHV2_BNODE:
value->iValue = here->HSMHV2bNode;
return(OK);
case HSMHV2_DNODEPRIME:
value->iValue = here->HSMHV2dNodePrime;
return(OK);
case HSMHV2_SNODEPRIME:
value->iValue = here->HSMHV2sNodePrime;
return(OK);
case HSMHV2_SOURCECONDUCT:
value->rValue = here->HSMHV2sourceConductance;
return(OK);
case HSMHV2_DRAINCONDUCT:
value->rValue = here->HSMHV2drainConductance;
return(OK);
case HSMHV2_VBD:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2vbd);
return(OK);
case HSMHV2_VBS:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2vbs);
return(OK);
case HSMHV2_VGS:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2vgs);
return(OK);
case HSMHV2_VDS:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2vds);
return(OK);
case HSMHV2_CD:
value->rValue = here->HSMHV2_ids;
return(OK);
case HSMHV2_ISUB:
value->rValue = here->HSMHV2_isub;
return(OK);
case HSMHV2_ISUBLD:
value->rValue = here->HSMHV2_isubld;
return(OK);
case HSMHV2_IDSIBPC:
value->rValue = here->HSMHV2_idsibpc;
return(OK);
case HSMHV2_IGIDL:
value->rValue = here->HSMHV2_igidl;
return(OK);
case HSMHV2_IGISL:
value->rValue = here->HSMHV2_igisl;
return(OK);
case HSMHV2_IGD:
value->rValue = here->HSMHV2_igd;
return(OK);
case HSMHV2_IGS:
value->rValue = here->HSMHV2_igs;
return(OK);
case HSMHV2_IGB:
value->rValue = here->HSMHV2_igb;
return(OK);
case HSMHV2_CBS:
value->rValue = here->HSMHV2_ibs;
return(OK);
case HSMHV2_CBD:
value->rValue = here->HSMHV2_ibd;
return(OK);
case HSMHV2_GM:
value->rValue = here->HSMHV2_dIds_dVgsi;
return(OK);
case HSMHV2_GMT:
value->rValue = here->HSMHV2_dIds_dTi;
return(OK);
case HSMHV2_GDS:
value->rValue = here->HSMHV2_dIds_dVdsi;
return(OK);
case HSMHV2_GMBS:
value->rValue = here->HSMHV2_dIds_dVbsi;
return(OK);
case HSMHV2_GBD:
value->rValue = here->HSMHV2_gbd;
return(OK);
case HSMHV2_GBS:
value->rValue = here->HSMHV2_gbs;
return(OK);
case HSMHV2_QB:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2qb);
return(OK);
case HSMHV2_CQB:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2cqb);
return(OK);
case HSMHV2_QG:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2qg);
return(OK);
case HSMHV2_CQG:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2cqg);
return(OK);
case HSMHV2_QD:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2qd);
return(OK);
case HSMHV2_CQD:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2cqd);
return(OK);
case HSMHV2_CGG:
value->rValue = here->HSMHV2_dQg_dVgsi - here->HSMHV2_cggo;
if (flg_nqs) value->rValue += cggb_nqs;
return(OK);
case HSMHV2_CGD:
value->rValue = (here->HSMHV2_mode > 0) ? here->HSMHV2_dQg_dVdsi - here->HSMHV2_cgdo
: - (here->HSMHV2_dQg_dVdsi + here->HSMHV2_dQg_dVgsi + here->HSMHV2_dQg_dVbsi)
- here->HSMHV2_cgso;
if (flg_nqs) value->rValue += cgdb_nqs;
return(OK);
case HSMHV2_CGS:
value->rValue = (here->HSMHV2_mode > 0) ? - (here->HSMHV2_dQg_dVdsi + here->HSMHV2_dQg_dVgsi + here->HSMHV2_dQg_dVbsi)
- here->HSMHV2_cgso
: here->HSMHV2_dQg_dVdsi - here->HSMHV2_cgdo;
if (flg_nqs) value->rValue += cgsb_nqs;
return(OK);
case HSMHV2_CDG:
value->rValue = (here->HSMHV2_mode > 0) ? here->HSMHV2_dQdi_dVgsi - here->HSMHV2_cdgo
: here->HSMHV2_dQsi_dVgsi - here->HSMHV2_csgo;
if (flg_nqs) value->rValue += cdgb_nqs;
return(OK);
case HSMHV2_CDD:
value->rValue = (here->HSMHV2_mode > 0) ? here->HSMHV2_dQdi_dVdsi - here->HSMHV2_cddo
: - (here->HSMHV2_dQsi_dVdsi + here->HSMHV2_dQsi_dVgsi + here->HSMHV2_dQsi_dVbsi)
- here->HSMHV2_csso;
if (flg_nqs) value->rValue += cddb_nqs;
return(OK);
case HSMHV2_CDS:
value->rValue = (here->HSMHV2_mode > 0) ? - (here->HSMHV2_dQdi_dVdsi + here->HSMHV2_dQdi_dVgsi + here->HSMHV2_dQdi_dVbsi)
- here->HSMHV2_cdso
: here->HSMHV2_dQsi_dVdsi - here->HSMHV2_csdo;
if (flg_nqs) value->rValue += cdsb_nqs;
return(OK);
case HSMHV2_CBG:
value->rValue = here->HSMHV2_dQb_dVgsi - here->HSMHV2_cbgo;
if (flg_nqs) value->rValue += cbgb_nqs;
return(OK);
case HSMHV2_CBDB:
value->rValue = (here->HSMHV2_mode > 0) ? here->HSMHV2_dQb_dVdsi - here->HSMHV2_cbdo
: - (here->HSMHV2_dQb_dVdsi + here->HSMHV2_dQb_dVgsi + here->HSMHV2_dQb_dVbsi)
+ (here->HSMHV2_cbdo+here->HSMHV2_cbgo+here->HSMHV2_cbbo);
if (flg_nqs) value->rValue += cbdb_nqs;
return(OK);
case HSMHV2_CBSB:
value->rValue = (here->HSMHV2_mode > 0) ? - (here->HSMHV2_dQb_dVdsi + here->HSMHV2_dQb_dVgsi + here->HSMHV2_dQb_dVbsi)
+ (here->HSMHV2_cbdo + here->HSMHV2_cbgo + here->HSMHV2_cbbo)
: here->HSMHV2_dQb_dVdsi - here->HSMHV2_cbdo;
if (flg_nqs) value->rValue += cbsb_nqs;
return(OK);
case HSMHV2_CGDO:
value->rValue = (here->HSMHV2_mode > 0) ? here->HSMHV2_cgdo : here->HSMHV2_cgso;
return(OK);
case HSMHV2_CGSO:
value->rValue = (here->HSMHV2_mode > 0) ? here->HSMHV2_cgso : here->HSMHV2_cgdo;
return(OK);
case HSMHV2_CGBO:
value->rValue = here->HSMHV2_cgbo;
return(OK);
case HSMHV2_CAPBD:
value->rValue = here->HSMHV2_capbd;
return(OK);
case HSMHV2_CAPBS:
value->rValue = here->HSMHV2_capbs;
return(OK);
case HSMHV2_VON:
value->rValue = here->HSMHV2_von;
return(OK);
case HSMHV2_VDSAT:
value->rValue = here->HSMHV2_vdsat;
return(OK);
case HSMHV2_QBS:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2qbs);
return(OK);
case HSMHV2_QBD:
value->rValue = *(ckt->CKTstate0 + here->HSMHV2qbd);
return(OK);
case HSMHV2_CORBNET:
value->iValue = here->HSMHV2_corbnet;
return(OK);
case HSMHV2_RBPB:
value->rValue = here->HSMHV2_rbpb;
return (OK);
case HSMHV2_RBPD:
value->rValue = here->HSMHV2_rbpd;
return(OK);
case HSMHV2_RBPS:
value->rValue = here->HSMHV2_rbps;
return(OK);
case HSMHV2_RBDB:
value->rValue = here->HSMHV2_rbdb;
return(OK);
case HSMHV2_RBSB:
value->rValue = here->HSMHV2_rbsb;
return(OK);
case HSMHV2_CORG:
value->iValue = here->HSMHV2_corg;
return(OK);
case HSMHV2_NGCON:
value->rValue = here->HSMHV2_ngcon;
return(OK);
case HSMHV2_XGW:
value->rValue = here->HSMHV2_xgw;
return(OK);
case HSMHV2_XGL:
value->rValue = here->HSMHV2_xgl;
return(OK);
case HSMHV2_NF:
value->rValue = here->HSMHV2_nf;
return(OK);
case HSMHV2_SA:
value->rValue = here->HSMHV2_sa;
return(OK);
case HSMHV2_SB:
value->rValue = here->HSMHV2_sb;
return(OK);
case HSMHV2_SD:
value->rValue = here->HSMHV2_sd;
return(OK);
case HSMHV2_NSUBCDFM:
value->rValue = here->HSMHV2_nsubcdfm;
return(OK);
case HSMHV2_M:
value->rValue = here->HSMHV2_m;
return(OK);
case HSMHV2_SUBLD1:
value->rValue = here->HSMHV2_subld1;
return(OK);
case HSMHV2_SUBLD2:
value->rValue = here->HSMHV2_subld2;
return(OK);
case HSMHV2_LOVER:
value->rValue = here->HSMHV2_lover;
return(OK);
case HSMHV2_LOVERS:
value->rValue = here->HSMHV2_lovers;
return(OK);
case HSMHV2_LOVERLD:
value->rValue = here->HSMHV2_loverld;
return(OK);
case HSMHV2_LDRIFT1:
value->rValue = here->HSMHV2_ldrift1;
return(OK);
case HSMHV2_LDRIFT2:
value->rValue = here->HSMHV2_ldrift2;
return(OK);
case HSMHV2_LDRIFT1S:
value->rValue = here->HSMHV2_ldrift1s;
return(OK);
case HSMHV2_LDRIFT2S:
value->rValue = here->HSMHV2_ldrift2s;
return(OK);
default:
return(E_BADPARM);
}
/* NOTREACHED */
}

View File

@ -0,0 +1,295 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvcvtest.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsmhvdef.h"
#include "ngspice/trandefs.h"
#include "ngspice/const.h"
#include "ngspice/devdefs.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
int HSMHV2convTest(
GENmodel *inModel,
CKTcircuit *ckt)
{
HSMHV2model *model = (HSMHV2model*)inModel;
HSMHV2instance *here;
double vds=0.0, vgs=0.0, vbs=0.0, vdse=0.0, vgse=0.0, vbse=0.0, vdbd=0.0, vsbs=0.0, deltemp =0.0 ;
double delvds=0.0, delvgs=0.0, delvbs=0.0, delvdse=0.0, delvgse=0.0, delvbse=0.0, delvdbd=0.0, delvsbs=0.0, deldeltemp =0.0 ;
double Ids=0.0, gds=0.0, gm=0.0, gmbs=0.0, gmT=0.0, gmbs_ext=0.0, gds_ext=0.0, gm_ext=0.0,
Isub=0.0, dIsub_dVds=0.0, dIsub_dVgs=0.0, dIsub_dVbs=0.0, dIsub_dT=0.0,
Isubs=0.0, dIsubs_dVds=0.0, dIsubs_dVgs=0.0, dIsubs_dVbs=0.0, dIsubs_dT=0.0,
Igidl=0.0, dIgidl_dVds=0.0, dIgidl_dVgs=0.0, dIgidl_dVbs=0.0, dIgidl_dT=0.0,
Igisl=0.0, dIgisl_dVds=0.0, dIgisl_dVgs=0.0, dIgisl_dVbs=0.0, dIgisl_dT=0.0,
Igd=0.0, dIgd_dVd=0.0, dIgd_dVg=0.0, dIgd_dVb=0.0, dIgd_dT=0.0,
Igs=0.0, dIgs_dVd=0.0, dIgs_dVg=0.0, dIgs_dVb=0.0, dIgs_dT=0.0,
Igb=0.0, dIgb_dVd=0.0, dIgb_dVg=0.0, dIgb_dVb=0.0, dIgb_dT=0.0,
Ibd=0.0, Gbd=0.0, Gbdt=0.0,
Ibs=0.0, Gbs=0.0, Gbst =0.0 ;
double i_dP=0.0, i_gP=0.0, i_sP=0.0, i_db=0.0, i_sb=0.0,
i_dP_hat=0.0, i_gP_hat=0.0, i_sP_hat=0.0, i_db_hat=0.0, i_sb_hat =0.0 ;
double tol0=0.0, tol1=0.0, tol2=0.0, tol3=0.0, tol4 =0.0 ;
/* loop through all the HSMHV2 device models */
for ( ; model != NULL; model = model->HSMHV2nextModel ) {
/* loop through all the instances of the model */
for ( here = model->HSMHV2instances; here != NULL ;
here = here->HSMHV2nextInstance ) {
vds = model->HSMHV2_type *
(*(ckt->CKTrhsOld+here->HSMHV2dNodePrime) -
*(ckt->CKTrhsOld+here->HSMHV2sNodePrime));
vgs = model->HSMHV2_type *
(*(ckt->CKTrhsOld+here->HSMHV2gNodePrime) -
*(ckt->CKTrhsOld+here->HSMHV2sNodePrime));
vbs = model->HSMHV2_type *
(*(ckt->CKTrhsOld+here->HSMHV2bNodePrime) -
*(ckt->CKTrhsOld+here->HSMHV2sNodePrime));
vdse = model->HSMHV2_type *
(*(ckt->CKTrhsOld+here->HSMHV2dNode) -
*(ckt->CKTrhsOld+here->HSMHV2sNode));
vgse = model->HSMHV2_type *
(*(ckt->CKTrhsOld+here->HSMHV2gNodePrime) -
*(ckt->CKTrhsOld+here->HSMHV2sNode));
vbse = model->HSMHV2_type *
(*(ckt->CKTrhsOld+here->HSMHV2bNodePrime) -
*(ckt->CKTrhsOld+here->HSMHV2sNode));
vdbd = model->HSMHV2_type
* (*(ckt->CKTrhsOld + here->HSMHV2dbNode)
- *(ckt->CKTrhsOld + here->HSMHV2dNode));
vsbs = model->HSMHV2_type
* (*(ckt->CKTrhsOld + here->HSMHV2sbNode)
- *(ckt->CKTrhsOld + here->HSMHV2sNode));
if( here->HSMHV2tempNode > 0 ){
deltemp = *(ckt->CKTrhsOld + here->HSMHV2tempNode);
} else {
deltemp = 0.0 ;
}
delvds = vds - *(ckt->CKTstate0 + here->HSMHV2vds) ;
delvgs = vgs - *(ckt->CKTstate0 + here->HSMHV2vgs) ;
delvbs = vbs - *(ckt->CKTstate0 + here->HSMHV2vbs) ;
delvdse = vdse - *(ckt->CKTstate0 + here->HSMHV2vdse) ;
delvgse = vgse - *(ckt->CKTstate0 + here->HSMHV2vgse) ;
delvbse = vbse - *(ckt->CKTstate0 + here->HSMHV2vbse) ;
delvdbd = vdbd - *(ckt->CKTstate0 + here->HSMHV2vdbd) ;
delvsbs = vsbs - *(ckt->CKTstate0 + here->HSMHV2vsbs) ;
if( here->HSMHV2tempNode > 0 ){
deldeltemp = deltemp - *(ckt->CKTstate0 + here->HSMHV2deltemp) ;
} else {
deldeltemp = 0.0 ;
}
if ( here->HSMHV2_mode > 0 ) { /* forward mode */
Ids = here->HSMHV2_ids ;
gds = here->HSMHV2_dIds_dVdsi ;
gm = here->HSMHV2_dIds_dVgsi ;
gmbs = here->HSMHV2_dIds_dVbsi ;
gmT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIds_dTi : 0.0 ;
gmbs_ext = here->HSMHV2_dIds_dVbse;
gds_ext = here->HSMHV2_dIds_dVdse ;
gm_ext = here->HSMHV2_dIds_dVgse;
Isub = here->HSMHV2_isub ;
dIsub_dVds = here->HSMHV2_dIsub_dVdsi ;
dIsub_dVgs = here->HSMHV2_dIsub_dVgsi ;
dIsub_dVbs = here->HSMHV2_dIsub_dVbsi ;
dIsub_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIsub_dTi : 0.0 ;
Isubs = 0.0 ;
dIsubs_dVds = 0.0 ;
dIsubs_dVgs = 0.0 ;
dIsubs_dVbs = 0.0 ;
dIsubs_dT = 0.0 ;
Igidl = here->HSMHV2_igidl ;
dIgidl_dVds = here->HSMHV2_dIgidl_dVdsi ;
dIgidl_dVgs = here->HSMHV2_dIgidl_dVgsi ;
dIgidl_dVbs = here->HSMHV2_dIgidl_dVbsi ;
dIgidl_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgidl_dTi : 0.0 ;
Igisl = here->HSMHV2_igisl ;
dIgisl_dVds = here->HSMHV2_dIgisl_dVdsi ;
dIgisl_dVgs = here->HSMHV2_dIgisl_dVgsi ;
dIgisl_dVbs = here->HSMHV2_dIgisl_dVbsi ;
dIgisl_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgisl_dTi : 0.0 ;
Igd = here->HSMHV2_igd ;
dIgd_dVd = here->HSMHV2_dIgd_dVdsi ;
dIgd_dVg = here->HSMHV2_dIgd_dVgsi ;
dIgd_dVb = here->HSMHV2_dIgd_dVbsi ;
dIgd_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgd_dTi : 0.0 ;
Igs = here->HSMHV2_igs ;
dIgs_dVd = here->HSMHV2_dIgs_dVdsi ;
dIgs_dVg = here->HSMHV2_dIgs_dVgsi ;
dIgs_dVb = here->HSMHV2_dIgs_dVbsi ;
dIgs_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgs_dTi : 0.0 ;
Igb = here->HSMHV2_igb ;
dIgb_dVd = here->HSMHV2_dIgb_dVdsi ;
dIgb_dVg = here->HSMHV2_dIgb_dVgsi ;
dIgb_dVb = here->HSMHV2_dIgb_dVbsi ;
dIgb_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgb_dTi : 0.0 ;
Ibd = here->HSMHV2_ibd ;
Gbd = here->HSMHV2_gbd ;
Gbdt = (here->HSMHV2tempNode > 0) ? here->HSMHV2_gbdT : 0.0 ;
Ibs = here->HSMHV2_ibs ;
Gbs = here->HSMHV2_gbs ;
Gbst = (here->HSMHV2tempNode > 0) ? here->HSMHV2_gbsT : 0.0 ;
} else { /* reverse mode */
Ids = - here->HSMHV2_ids ;
gds = + (here->HSMHV2_dIds_dVdsi + here->HSMHV2_dIds_dVgsi + here->HSMHV2_dIds_dVbsi) ;
gm = - here->HSMHV2_dIds_dVgsi ;
gmbs = - here->HSMHV2_dIds_dVbsi ;
gmT = (here->HSMHV2tempNode > 0) ? - here->HSMHV2_dIds_dTi : 0.0 ;
gds_ext = + (here->HSMHV2_dIds_dVdse + here->HSMHV2_dIds_dVgse + here->HSMHV2_dIds_dVbse) ;
gm_ext = - here->HSMHV2_dIds_dVgse;
gmbs_ext = - here->HSMHV2_dIds_dVbse;
Isub = 0.0 ;
dIsub_dVds = 0.0 ;
dIsub_dVgs = 0.0 ;
dIsub_dVbs = 0.0 ;
dIsub_dT = 0.0 ;
Isubs = here->HSMHV2_isub ;
dIsubs_dVds = - (here->HSMHV2_dIsub_dVdsi + here->HSMHV2_dIsub_dVgsi + here->HSMHV2_dIsub_dVbsi) ;
dIsubs_dVgs = here->HSMHV2_dIsub_dVgsi ;
dIsubs_dVbs = here->HSMHV2_dIsub_dVbsi ;
dIsubs_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIsub_dTi : 0.0 ;
Igidl = here->HSMHV2_igisl ;
dIgidl_dVds = - (here->HSMHV2_dIgisl_dVdsi + here->HSMHV2_dIgisl_dVgsi + here->HSMHV2_dIgisl_dVbsi) ;
dIgidl_dVgs = here->HSMHV2_dIgisl_dVgsi ;
dIgidl_dVbs = here->HSMHV2_dIgisl_dVbsi ;
dIgidl_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgisl_dTi : 0.0 ;
Igisl = here->HSMHV2_igidl ;
dIgisl_dVds = - (here->HSMHV2_dIgidl_dVdsi + here->HSMHV2_dIgidl_dVgsi + here->HSMHV2_dIgidl_dVbsi) ;
dIgisl_dVgs = here->HSMHV2_dIgidl_dVgsi ;
dIgisl_dVbs = here->HSMHV2_dIgidl_dVbsi ;
dIgisl_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgidl_dTi : 0.0 ;
Igd = here->HSMHV2_igd ;
dIgd_dVd = - (here->HSMHV2_dIgs_dVdsi + here->HSMHV2_dIgs_dVgsi + here->HSMHV2_dIgs_dVbsi) ;
dIgd_dVg = here->HSMHV2_dIgs_dVgsi ;
dIgd_dVb = here->HSMHV2_dIgs_dVbsi ;
dIgd_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgs_dTi : 0.0 ;
Igs = here->HSMHV2_igs ;
dIgs_dVd = - (here->HSMHV2_dIgd_dVdsi + here->HSMHV2_dIgd_dVgsi + here->HSMHV2_dIgd_dVbsi) ;
dIgs_dVg = here->HSMHV2_dIgd_dVgsi ;
dIgs_dVb = here->HSMHV2_dIgd_dVbsi ;
dIgs_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgd_dTi : 0.0 ;
Igb = here->HSMHV2_igb ;
dIgb_dVd = - (here->HSMHV2_dIgb_dVdsi + here->HSMHV2_dIgb_dVgsi + here->HSMHV2_dIgb_dVbsi) ;
dIgb_dVg = here->HSMHV2_dIgb_dVgsi ;
dIgb_dVb = here->HSMHV2_dIgb_dVbsi ;
dIgb_dT = (here->HSMHV2tempNode > 0) ? here->HSMHV2_dIgb_dTi : 0.0 ;
Ibd = here->HSMHV2_ibd ;
Gbd = here->HSMHV2_gbd ;
Gbdt = (here->HSMHV2tempNode > 0) ? here->HSMHV2_gbdT : 0.0 ;
Ibs = here->HSMHV2_ibs ;
Gbs = here->HSMHV2_gbs ;
Gbst = (here->HSMHV2tempNode > 0) ? here->HSMHV2_gbsT : 0.0 ;
} /* end of reverse mode */
/* for convergence control, only nonlinear static currents are considered: */
i_dP = Ids + Isub + Igidl - Igd ;
i_dP_hat = i_dP + gm *delvgs + gds *delvds + gmbs *delvbs + gmT *deldeltemp
+ dIsub_dVgs *delvgs + dIsub_dVds *delvds + dIsub_dVbs *delvbs + dIsub_dT *deldeltemp
+ dIgidl_dVgs*delvgs + dIgidl_dVds*delvds + dIgidl_dVbs*delvbs + dIgidl_dT*deldeltemp
-(dIgd_dVg *delvgs + dIgd_dVd *delvds + dIgd_dVb *delvbs + dIgd_dT *deldeltemp)
+ gm_ext *delvgse + gds_ext *delvdse + gmbs_ext *delvbse ;
i_gP = Igd + Igs + Igb ;
i_gP_hat = i_gP + dIgd_dVg *delvgs + dIgd_dVd *delvds + dIgd_dVb *delvbs + dIgd_dT *deldeltemp
+ dIgs_dVg *delvgs + dIgs_dVd *delvds + dIgs_dVb *delvbs + dIgs_dT *deldeltemp
+ dIgb_dVg *delvgs + dIgb_dVd *delvds + dIgb_dVb *delvbs + dIgb_dT *deldeltemp ;
i_sP =-Ids + Isubs + Igisl - Igs ;
i_sP_hat = i_sP -(gm *delvgs + gds *delvds + gmbs *delvbs + gmT *deldeltemp)
+ dIsubs_dVgs*delvgs + dIsubs_dVds*delvds + dIsubs_dVbs*delvbs + dIsubs_dT*deldeltemp
+ dIgisl_dVgs*delvgs + dIgisl_dVds*delvds + dIgisl_dVbs*delvbs + dIgisl_dT*deldeltemp
-(dIgs_dVg *delvgs + dIgs_dVd *delvds + dIgs_dVb *delvbs + dIgs_dT *deldeltemp)
-(gm_ext *delvgse + gds_ext *delvdse + gmbs_ext *delvbse) ;
i_db = Ibd ;
i_db_hat = i_db + Gbd*delvdbd + Gbdt*deldeltemp ;
i_sb = Ibs ;
i_sb_hat = i_sb + Gbs*delvsbs + Gbst*deldeltemp ;
/* to be added: power source for thermal network */
/*
* check convergence
*/
if ( here->HSMHV2_off == 0 || !(ckt->CKTmode & MODEINITFIX) ) {
tol0 = ckt->CKTreltol * MAX(fabs(i_dP_hat), fabs(i_dP)) + ckt->CKTabstol;
tol1 = ckt->CKTreltol * MAX(fabs(i_gP_hat), fabs(i_gP)) + ckt->CKTabstol;
tol2 = ckt->CKTreltol * MAX(fabs(i_sP_hat), fabs(i_sP)) + ckt->CKTabstol;
tol3 = ckt->CKTreltol * MAX(fabs(i_db_hat), fabs(i_db)) + ckt->CKTabstol;
tol4 = ckt->CKTreltol * MAX(fabs(i_sb_hat), fabs(i_sb)) + ckt->CKTabstol;
if ( (fabs(i_dP_hat - i_dP) >= tol0)
|| (fabs(i_gP_hat - i_gP) >= tol1)
|| (fabs(i_sP_hat - i_sP) >= tol2)
|| (fabs(i_db_hat - i_db) >= tol3)
|| (fabs(i_sb_hat - i_sb) >= tol4) ) {
ckt->CKTnoncon++;
return(OK);
}
}
}
}
return(OK);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,88 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvdel.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsmhvdef.h"
#include "ngspice/sperror.h"
#include "ngspice/gendefs.h"
#include "ngspice/suffix.h"
int HSMHV2delete(
GENmodel *inModel,
IFuid name,
GENinstance **inInst)
{
HSMHV2instance **fast = (HSMHV2instance**)inInst;
HSMHV2model *model = (HSMHV2model*)inModel;
HSMHV2instance **prev = NULL;
HSMHV2instance *here;
for( ;model ;model = model->HSMHV2nextModel ) {
prev = &(model->HSMHV2instances);
for ( here = *prev ;here ;here = *prev ) {
if ( here->HSMHV2name == name || (fast && here==*fast) ) {
*prev= here->HSMHV2nextInstance;
FREE(here);
return(OK);
}
prev = &(here->HSMHV2nextInstance);
}
}
return(E_NODEV);
}

View File

@ -0,0 +1,86 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvdest.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsmhvdef.h"
#include "ngspice/suffix.h"
void HSMHV2destroy(
GENmodel **inModel)
{
HSMHV2model **model = (HSMHV2model**)inModel;
HSMHV2instance *here;
HSMHV2instance *prev = NULL;
HSMHV2model *mod = *model;
HSMHV2model *oldmod = NULL;
for ( ;mod ;mod = mod->HSMHV2nextModel ) {
if (oldmod) FREE(oldmod);
oldmod = mod;
prev = (HSMHV2instance *)NULL;
for ( here = mod->HSMHV2instances ;here ;here = here->HSMHV2nextInstance ) {
if (prev) FREE(prev);
prev = here;
}
if (prev) FREE(prev);
}
if (oldmod) FREE(oldmod);
*model = NULL;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,600 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhveval_dio.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Substrate-source/drain junction diode
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*===========================================================*
* Preamble
*=================*/
/*---------------------------------------------------*
* Header files
*-----------------*/
#include "ngspice/ngspice.h"
/*-----------------------------------*
* HiSIM macros
*-----------------*/
#include "hisimhv.h"
#include "hsmhvevalenv.h"
/*===========================================================*
* Function HSMHV2dio
*=================*/
int HSMHV2dio
(
double vbs_jct,
double vbd_jct,
double deltemp,
HSMHV2instance *here,
HSMHV2model *model,
CKTcircuit *ckt
)
{
HSMHV2binningParam *pParam = &here->pParam ;
/* junction currents */
double Ibs =0.0, Gbs =0.0, Ibs_dT =0.0 ;
double Ibd =0.0, Gbd =0.0, Ibd_dT =0.0 ;
/* junction capacitances */
double Qbs =0.0, Capbs =0.0, Qbs_dT =0.0 ;
double Qbd =0.0, Capbd =0.0, Qbd_dT =0.0 ;
double czbd =0.0, czbd_dT=0.0 ;
double czbdsw =0.0, czbdsw_dT=0.0 ;
double czbdswg =0.0, czbdswg_dT=0.0 ;
double czbs =0.0, czbs_dT=0.0 ;
double czbssw =0.0, czbssw_dT=0.0 ;
double czbsswg =0.0, czbsswg_dT=0.0 ;
double arg =0.0, sarg =0.0 ;
/* temperature-dependent variables for SHE model */
double log_Tratio =0.0 ;
double TTEMP =0.0, TTEMP0 =0.0 ;
double beta =0.0, beta_dT =0.0 ;
double beta_inv =0.0, beta_inv_dT =0.0 ;
double Eg =0.0, Eg_dT =0.0 ;
double js =0.0, js_dT =0.0 ;
double jssw =0.0, jssw_dT =0.0 ;
double js2 =0.0, js2_dT =0.0 ;
double jssw2 =0.0, jssw2_dT =0.0 ;
double isbd_dT =0.0, isbs_dT =0.0 ;
double isbd2_dT =0.0, isbs2_dT =0.0 ;
double vbdt_dT =0.0, vbst_dT = 0.0 ;
double jd_expcd_dT =0.0 , jd_expcs_dT =0.0 ;
double jd_nvtm_invd_dT =0.0 , jd_nvtm_invs_dT =0.0 ;
double exptempd_dT = 0.0 , exptemps_dT = 0.0 ;
double tcjbd =0.0, tcjbs =0.0,
tcjbdsw =0.0, tcjbssw =0.0,
tcjbdswg =0.0, tcjbsswg =0.0 ;
/* options */
double Mfactor = here->HSMHV2_m;
/* Internal flags --------------------*/
int flg_err = 0; /* error level */
int flg_info = model->HSMHV2_info;
/* temporary vars. & derivatives */
double TX =0.0 ;
double T0 =0.0, T0_dT =0.0 ;
double T1 =0.0, T1_dVb =0.0, T1_dT =0.0 ;
double T2 =0.0, T2_dVb =0.0, T2_dT =0.0 ;
double T3 =0.0, T3_dVb =0.0, T3_dT =0.0 ;
double T4 =0.0, T4_dT =0.0 ;
double T9 =0.0, T9_dT =0.0 ;
double T10 =0.0, T10_dT =0.0 ;
double T12 =0.0, T12_dT =0.0 ;
/*================ Start of executable code.=================*/
/*-----------------------------------------------------------*
* Temperature dependent constants.
*-----------------*/
if ( here->HSMHV2tempNode > 0 && pParam->HSMHV2_rth0 != 0.0 ) {
#define HSMHV2EVAL
#include "hsmhvtemp_eval_dio.h"
} else {
TTEMP = ckt->CKTtemp;
if ( here->HSMHV2_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV2_dtemp ; }
}
/*-----------------------------------------------------------*
* Cbsj, Cbdj: node-base S/D biases.
*-----------------*/
/* ibd */
T10 = model->HSMHV2_cvbd * here->HSMHV2_jd_nvtm_invd ;
T10_dT = model->HSMHV2_cvbd * beta_dT / pParam->HSMHV2_njd ;
T9 = model->HSMHV2_cisbd * here->HSMHV2_exptempd ;
T9_dT = model->HSMHV2_cisbd * exptempd_dT ;
T0 = here->HSMHV2_isbd2 * T9 ;
T0_dT = here->HSMHV2_isbd2 * T9_dT + isbd2_dT * T9 ;
TX = - vbd_jct * T10 ;
T2 = exp ( TX );
T2_dVb = - T2 * T10 ;
T2_dT = T2 * TX * beta_dT * beta_inv ;
T3 = T2 ;
T3_dVb = T2_dVb ;
T3_dT = T2_dT ;
if ( vbd_jct < here->HSMHV2_vbdt ) {
TX = vbd_jct * here->HSMHV2_jd_nvtm_invd ;
if ( TX < - 3*EXP_THR ) {
T1 = 0.0 ;
T1_dVb = 0.0 ;
T1_dT = 0.0 ;
} else {
T1 = exp ( TX ) ;
T1_dVb = T1 * here->HSMHV2_jd_nvtm_invd ;
T1_dT = T1 * TX * beta_dT * beta_inv ;
}
Ibd = here->HSMHV2_isbd * (T1 - 1.0)
+ T0 * (T2 - 1.0)
+ pParam->HSMHV2_cisbkd * (T3 - 1.0);
Gbd = here->HSMHV2_isbd * T1_dVb
+ T0 * T2_dVb
+ pParam->HSMHV2_cisbkd * T3_dVb ;
Ibd_dT = here->HSMHV2_isbd * T1_dT + isbd_dT * ( T1 - 1.0 )
+ T0 * T2_dT + T0_dT * ( T2 - 1.0 )
+ pParam->HSMHV2_cisbkd * T3_dT ;
} else {
T1 = here->HSMHV2_jd_expcd ;
T4 = here->HSMHV2_isbd * here->HSMHV2_jd_nvtm_invd * T1 ;
Ibd = here->HSMHV2_isbd * (T1 - 1.0)
+ T4 * (vbd_jct - here->HSMHV2_vbdt)
+ T0 * (T2 - 1.0)
+ pParam->HSMHV2_cisbkd * (T3 - 1.0) ;
Gbd = T4
+ T0 * T2_dVb
+ pParam->HSMHV2_cisbkd * T3_dVb ;
T1_dT = jd_expcd_dT ;
T4_dT = isbd_dT * here->HSMHV2_jd_nvtm_invd * T1
+ here->HSMHV2_isbd * jd_nvtm_invd_dT * T1
+ here->HSMHV2_isbd * here->HSMHV2_jd_nvtm_invd * T1_dT ;
Ibd_dT = isbd_dT * ( T1 - 1.0 ) + here->HSMHV2_isbd * T1_dT
+ T4_dT * ( vbd_jct - here->HSMHV2_vbdt ) - T4 * vbdt_dT
+ T0_dT * ( T2 - 1.0 ) + T0 * T2_dT
+ pParam->HSMHV2_cisbkd * T3_dT ;
}
T12 = model->HSMHV2_divxd * here->HSMHV2_isbd2 ;
Ibd += T12 * vbd_jct ;
Gbd += T12 ;
T12_dT = model->HSMHV2_divxd * isbd2_dT ;
Ibd_dT += T12_dT * vbd_jct ;
/* ibs */
T10 = model->HSMHV2_cvbs * here->HSMHV2_jd_nvtm_invs ;
T10_dT = model->HSMHV2_cvbs * beta_dT / pParam->HSMHV2_njs ;
T9 = model->HSMHV2_cisbs * here->HSMHV2_exptemps ;
T9_dT = model->HSMHV2_cisbs * exptemps_dT ;
T0 = here->HSMHV2_isbs2 * T9 ;
T0_dT = here->HSMHV2_isbs2 * T9_dT + isbs2_dT * T9 ;
TX = - vbs_jct * T10 ;
T2 = exp ( TX );
T2_dVb = - T2 * T10 ;
T2_dT = T2 * TX * beta_dT * beta_inv ;
T3 = T2 ;
T3_dVb = T2_dVb ;
T3_dT = T2_dT ;
if ( vbs_jct < here->HSMHV2_vbst ) {
TX = vbs_jct * here->HSMHV2_jd_nvtm_invs ;
if ( TX < - 3*EXP_THR ) {
T1 = 0.0 ;
T1_dVb = 0.0 ;
T1_dT = 0.0 ;
} else {
T1 = exp ( TX ) ;
T1_dVb = T1 * here->HSMHV2_jd_nvtm_invs ;
T1_dT = T1 * TX * beta_dT * beta_inv ;
}
Ibs = here->HSMHV2_isbs * (T1 - 1.0)
+ T0 * (T2 - 1.0)
+ pParam->HSMHV2_cisbks * (T3 - 1.0);
Gbs = here->HSMHV2_isbs * T1_dVb
+ T0 * T2_dVb
+ pParam->HSMHV2_cisbks * T3_dVb ;
Ibs_dT = here->HSMHV2_isbs * T1_dT + isbs_dT * ( T1 - 1.0 )
+ T0 * T2_dT + T0_dT * ( T2 - 1.0 )
+ pParam->HSMHV2_cisbks * T3_dT ;
} else {
T1 = here->HSMHV2_jd_expcs ;
T4 = here->HSMHV2_isbs * here->HSMHV2_jd_nvtm_invs * T1 ;
Ibs = here->HSMHV2_isbs * (T1 - 1.0)
+ T4 * (vbs_jct - here->HSMHV2_vbst)
+ T0 * (T2 - 1.0)
+ pParam->HSMHV2_cisbks * (T3 - 1.0) ;
Gbs = T4
+ T0 * T2_dVb
+ pParam->HSMHV2_cisbks * T3_dVb ;
T1_dT = jd_expcs_dT ;
T4_dT = isbs_dT * here->HSMHV2_jd_nvtm_invs * T1
+ here->HSMHV2_isbs * jd_nvtm_invs_dT * T1
+ here->HSMHV2_isbs * here->HSMHV2_jd_nvtm_invs * T1_dT ;
Ibs_dT = isbs_dT * ( T1 - 1.0 ) + here->HSMHV2_isbs * T1_dT
+ T4_dT * ( vbs_jct - here->HSMHV2_vbst) - T4 * vbst_dT
+ T0_dT * ( T2 - 1.0 ) + T0 * T2_dT
+ pParam->HSMHV2_cisbks * T3_dT ;
}
T12 = model->HSMHV2_divxs * here->HSMHV2_isbs2 ;
Ibs += T12 * vbs_jct ;
Gbs += T12 ;
T12_dT = model->HSMHV2_divxs * isbs2_dT ;
Ibs_dT += T12_dT * vbs_jct ;
/*-----------------------------------------------------------*
* Charges and Capacitances.
*-----------------*/
/* charge storage elements
* bulk-drain and bulk-source depletion capacitances
* czbd : zero bias drain junction capacitance
* czbs : zero bias source junction capacitance
* czbdsw:zero bias drain junction sidewall capacitance
* czbssw:zero bias source junction sidewall capacitance
*/
/* Source Bulk Junction */
tcjbs = model->HSMHV2_tcjbs ;
tcjbssw = model->HSMHV2_tcjbssw ;
tcjbsswg = model->HSMHV2_tcjbsswg ;
czbs = model->HSMHV2_cjs * here->HSMHV2_as ;
czbs = czbs * ( 1.0 + tcjbs * ( TTEMP - model->HSMHV2_ktnom )) ;
czbs_dT = ( model->HSMHV2_cjs * here->HSMHV2_as ) * tcjbs ;
if (here->HSMHV2_ps > here->HSMHV2_weff_nf) {
czbssw = model->HSMHV2_cjsws * ( here->HSMHV2_ps - here->HSMHV2_weff_nf ) ;
czbssw = czbssw * ( 1.0 + tcjbssw * ( TTEMP - model->HSMHV2_ktnom )) ;
czbssw_dT = ( model->HSMHV2_cjsws * ( here->HSMHV2_ps - here->HSMHV2_weff_nf )) * tcjbssw ;
czbsswg = model->HSMHV2_cjswgs * here->HSMHV2_weff_nf ;
czbsswg = czbsswg * ( 1.0 + tcjbsswg * ( TTEMP - model->HSMHV2_ktnom )) ;
czbsswg_dT = ( model->HSMHV2_cjswgs * here->HSMHV2_weff_nf ) * tcjbsswg ;
// if (vbs_jct == 0.0) {
if (0) {
Qbs = 0.0 ;
Qbs_dT = 0.0 ;
Capbs = czbs + czbssw + czbsswg ;
} else if (vbs_jct < 0.0) {
if (czbs > 0.0) {
arg = 1.0 - vbs_jct / model->HSMHV2_pbs ;
if (model->HSMHV2_mjs == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjs ) ;
Qbs = model->HSMHV2_pbs * czbs * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjs) ;
Qbs_dT = model->HSMHV2_pbs * czbs_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjs) ;
Capbs = czbs * sarg ;
} else {
Qbs = 0.0 ;
Qbs_dT = 0.0 ;
Capbs = 0.0 ;
}
if (czbssw > 0.0) {
arg = 1.0 - vbs_jct / model->HSMHV2_pbsws ;
if (model->HSMHV2_mjsws == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjsws ) ;
Qbs += model->HSMHV2_pbsws * czbssw * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjsws) ;
Qbs_dT += model->HSMHV2_pbsws * czbssw_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjsws) ;
Capbs += czbssw * sarg ;
}
if (czbsswg > 0.0) {
arg = 1.0 - vbs_jct / model->HSMHV2_pbswgs ;
if (model->HSMHV2_mjswgs == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjswgs ) ;
Qbs += model->HSMHV2_pbswgs * czbsswg * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswgs) ;
Qbs_dT += model->HSMHV2_pbswgs * czbsswg_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswgs) ;
Capbs += czbsswg * sarg ;
}
} else {
T1 = czbs + czbssw + czbsswg ;
T1_dT = czbs_dT + czbssw_dT + czbsswg_dT ;
T2 = czbs * model->HSMHV2_mjs / model->HSMHV2_pbs
+ czbssw * model->HSMHV2_mjsws / model->HSMHV2_pbsws
+ czbsswg * model->HSMHV2_mjswgs / model->HSMHV2_pbswgs ;
T2_dT = czbs_dT * model->HSMHV2_mjs / model->HSMHV2_pbs
+ czbssw_dT * model->HSMHV2_mjsws / model->HSMHV2_pbsws
+ czbsswg_dT * model->HSMHV2_mjswgs / model->HSMHV2_pbswgs ;
Qbs = vbs_jct * (T1 + vbs_jct * 0.5 * T2) ;
Qbs_dT = vbs_jct * (T1_dT + vbs_jct * 0.5 * T2_dT) ;
Capbs = T1 + vbs_jct * T2 ;
}
} else {
czbsswg = model->HSMHV2_cjswgs * here->HSMHV2_ps ;
czbsswg = czbsswg * ( 1.0 + tcjbsswg * ( TTEMP - model->HSMHV2_ktnom )) ;
czbsswg_dT = ( model->HSMHV2_cjswgs * here->HSMHV2_ps ) * tcjbsswg ;
// if (vbs_jct == 0.0) {
if (0) {
Qbs = 0.0 ;
Qbs_dT = 0.0 ;
Capbs = czbs + czbsswg ;
} else if (vbs_jct < 0.0) {
if (czbs > 0.0) {
arg = 1.0 - vbs_jct / model->HSMHV2_pbs ;
if (model->HSMHV2_mjs == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjs ) ;
Qbs = model->HSMHV2_pbs * czbs * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjs) ;
Qbs_dT = model->HSMHV2_pbs * czbs_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjs) ;
Capbs = czbs * sarg ;
} else {
Qbs = 0.0 ;
Qbs_dT = 0.0 ;
Capbs = 0.0 ;
}
if (czbsswg > 0.0) {
arg = 1.0 - vbs_jct / model->HSMHV2_pbswgs ;
if (model->HSMHV2_mjswgs == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjswgs ) ;
Qbs += model->HSMHV2_pbswgs * czbsswg * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswgs) ;
Qbs_dT += model->HSMHV2_pbswgs * czbsswg_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswgs) ;
Capbs += czbsswg * sarg ;
}
} else {
T1 = czbs + czbsswg ;
T1_dT = czbs_dT + czbsswg_dT ;
T2 = czbs * model->HSMHV2_mjs / model->HSMHV2_pbs
+ czbsswg * model->HSMHV2_mjswgs / model->HSMHV2_pbswgs ;
T2_dT = czbs_dT * model->HSMHV2_mjs / model->HSMHV2_pbs
+ czbsswg_dT * model->HSMHV2_mjswgs / model->HSMHV2_pbswgs ;
Qbs = vbs_jct * (T1 + vbs_jct * 0.5 * T2) ;
Qbs_dT = vbs_jct * (T1_dT + vbs_jct * 0.5 * T2_dT) ;
Capbs = T1 + vbs_jct * T2 ;
}
}
/* Drain Bulk Junction */
tcjbd = model->HSMHV2_tcjbd ;
tcjbdsw = model->HSMHV2_tcjbdsw ;
tcjbdswg = model->HSMHV2_tcjbdswg ;
czbd = model->HSMHV2_cjd * here->HSMHV2_ad ;
czbd = czbd * ( 1.0 + tcjbd * ( TTEMP - model->HSMHV2_ktnom )) ;
czbd_dT = ( model->HSMHV2_cjd * here->HSMHV2_ad ) * tcjbd ;
if (here->HSMHV2_pd > here->HSMHV2_weff_nf) {
czbdsw = model->HSMHV2_cjswd * ( here->HSMHV2_pd - here->HSMHV2_weff_nf ) ;
czbdsw = czbdsw * ( 1.0 + tcjbdsw * ( TTEMP - model->HSMHV2_ktnom )) ;
czbdsw_dT = ( model->HSMHV2_cjswd * ( here->HSMHV2_pd - here->HSMHV2_weff_nf )) * tcjbdsw ;
czbdswg = model->HSMHV2_cjswgd * here->HSMHV2_weff_nf ;
czbdswg = czbdswg * ( 1.0 + tcjbdswg * ( TTEMP - model->HSMHV2_ktnom )) ;
czbdswg_dT = ( model->HSMHV2_cjswgd * here->HSMHV2_weff_nf ) * tcjbdswg ;
// if (vbd_jct == 0.0) {
if (0) {
Qbd = 0.0 ;
Qbd_dT = 0.0 ;
Capbd = czbd + czbdsw + czbdswg ;
} else if (vbd_jct < 0.0) {
if (czbd > 0.0) {
arg = 1.0 - vbd_jct / model->HSMHV2_pbd ;
if (model->HSMHV2_mjd == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjd ) ;
Qbd = model->HSMHV2_pbd * czbd * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjd) ;
Qbd_dT = model->HSMHV2_pbd * czbd_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjd) ;
Capbd = czbd * sarg ;
} else {
Qbd = 0.0 ;
Qbd_dT = 0.0 ;
Capbd = 0.0 ;
}
if (czbdsw > 0.0) {
arg = 1.0 - vbd_jct / model->HSMHV2_pbswd ;
if (model->HSMHV2_mjswd == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjswd ) ;
Qbd += model->HSMHV2_pbswd * czbdsw * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswd) ;
Qbd_dT += model->HSMHV2_pbswd * czbdsw_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswd) ;
Capbd += czbdsw * sarg ;
}
if (czbdswg > 0.0) {
arg = 1.0 - vbd_jct / model->HSMHV2_pbswgd ;
if (model->HSMHV2_mjswgd == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjswgd ) ;
Qbd += model->HSMHV2_pbswgd * czbdswg * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswgd) ;
Qbd_dT += model->HSMHV2_pbswgd * czbdswg_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswgd) ;
Capbd += czbdswg * sarg ;
}
} else {
T1 = czbd + czbdsw + czbdswg ;
T1_dT = czbd_dT + czbdsw_dT + czbdswg_dT ;
T2 = czbd * model->HSMHV2_mjd / model->HSMHV2_pbd
+ czbdsw * model->HSMHV2_mjswd / model->HSMHV2_pbswd
+ czbdswg * model->HSMHV2_mjswgd / model->HSMHV2_pbswgd ;
T2_dT = czbd_dT * model->HSMHV2_mjd / model->HSMHV2_pbd
+ czbdsw_dT * model->HSMHV2_mjswd / model->HSMHV2_pbswd
+ czbdswg_dT * model->HSMHV2_mjswgd / model->HSMHV2_pbswgd ;
Qbd = vbd_jct * (T1 + vbd_jct * 0.5 * T2) ;
Qbd_dT = vbd_jct * (T1_dT + vbd_jct * 0.5 * T2_dT) ;
Capbd = T1 + vbd_jct * T2 ;
}
} else {
czbdswg = model->HSMHV2_cjswgd * here->HSMHV2_pd ;
czbdswg = czbdswg * ( 1.0 + tcjbdswg * ( TTEMP - model->HSMHV2_ktnom )) ;
czbdswg_dT = ( model->HSMHV2_cjswgd * here->HSMHV2_pd ) * tcjbdswg ;
// if (vbd_jct == 0.0) {
if (0) {
Qbd = 0.0 ;
Qbd_dT = 0.0 ;
Capbd = czbd + czbdswg ;
} else if (vbd_jct < 0.0) {
if (czbd > 0.0) {
arg = 1.0 - vbd_jct / model->HSMHV2_pbd ;
if (model->HSMHV2_mjd == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjd ) ;
Qbd = model->HSMHV2_pbd * czbd * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjd) ;
Qbd_dT = model->HSMHV2_pbd * czbd_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjd) ;
Capbd = czbd * sarg ;
} else {
Qbd = 0.0 ;
Qbd_dT = 0.0 ;
Capbd = 0.0 ;
}
if (czbdswg > 0.0) {
arg = 1.0 - vbd_jct / model->HSMHV2_pbswgd ;
if (model->HSMHV2_mjswgd == 0.5)
sarg = 1.0 / sqrt(arg) ;
else
sarg = Fn_Pow( arg , -model->HSMHV2_mjswgd ) ;
Qbd += model->HSMHV2_pbswgd * czbdswg * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswgd) ;
Qbd_dT += model->HSMHV2_pbswgd * czbdswg_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV2_mjswgd) ;
Capbd += czbdswg * sarg ;
}
} else {
T1 = czbd + czbdswg ;
T1_dT = czbd_dT + czbdswg_dT ;
T2 = czbd * model->HSMHV2_mjd / model->HSMHV2_pbd
+ czbdswg * model->HSMHV2_mjswgd / model->HSMHV2_pbswgd ;
T2_dT = czbd_dT * model->HSMHV2_mjd / model->HSMHV2_pbd
+ czbdswg_dT * model->HSMHV2_mjswgd / model->HSMHV2_pbswgd ;
Qbd = vbd_jct * (T1 + vbd_jct * 0.5 * T2) ;
Qbd_dT = vbd_jct * (T1_dT + vbd_jct * 0.5 * T2_dT) ;
Capbd = T1 + vbd_jct * T2 ;
}
}
/*---------------------------------------------------*
* Junction diode.
*-----------------*/
here->HSMHV2_ibs = Mfactor * Ibs ;
here->HSMHV2_ibd = Mfactor * Ibd ;
here->HSMHV2_gbs = Mfactor * Gbs ;
here->HSMHV2_gbd = Mfactor * Gbd ;
*(ckt->CKTstate0 + here->HSMHV2qbs) = Mfactor * Qbs ;
*(ckt->CKTstate0 + here->HSMHV2qbd) = Mfactor * Qbd ;
here->HSMHV2_capbs = Mfactor * Capbs ;
here->HSMHV2_capbd = Mfactor * Capbd ;
here->HSMHV2_gbdT = Mfactor * Ibd_dT ;
here->HSMHV2_gbsT = Mfactor * Ibs_dT ;
here->HSMHV2_gcbdT = Mfactor * Qbd_dT ;
here->HSMHV2_gcbsT = Mfactor * Qbs_dT ;
/*-----------------------------------------------------------*
* Warn floating-point exceptions.
* - Function finite() in libm is called.
*-----------------*/
T1 = here->HSMHV2_ibs + here->HSMHV2_ibd + here->HSMHV2_gbs + here->HSMHV2_gbd;
T1 = T1 + *(ckt->CKTstate0 + here->HSMHV2qbs)
+ *(ckt->CKTstate0 + here->HSMHV2qbd)
+ here->HSMHV2_capbs
+ here->HSMHV2_capbd;
if ( ! finite (T1) ) {
flg_err = 1 ;
fprintf(stderr ,
"*** warning(HiSIM_HV(%s)): FP-exception (junction diode)\n",model->HSMHV2modName) ;
if ( flg_info >= 1 ) {
printf ("*** warning(HiSIM_HV(%s)): FP-exception\n",model->HSMHV2modName) ;
}
}
/*-----------------------------------------------------------*
* End of HSMHV2eval_dio
*-----------------*/
return ( HiSIM_OK ) ;
}

View File

@ -0,0 +1,687 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhveval_qover.h
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
/* Begin HSMHV2evalQover */
/*---------------------------------------------------*
* Clamp -Vxbgmt.
*-----------------*/
T0 = - Vxbgmt;
if ( T0 > Vbs_bnd ) {
T1 = T0 - Vbs_bnd;
T1_dT = - Vbs_bnd_dT;
T2 = Vbs_max - Vbs_bnd;
T2_dT = Vbs_max_dT - Vbs_bnd_dT;
Fn_SUPoly4m( TY, T1, T2, T11, T0 );
TY_dT = T1_dT * T11 + T2_dT * T0;
T10 = Vbs_bnd + TY ;
T10_dT = Vbs_bnd_dT + TY_dT ;
} else {
T10 = T0 ;
T11 = 1.0 ;
T10_dT = 0.0;
}
Vxbgmtcl = - T10 - small2 ;
Vxbgmtcl_dVxbgmt = T11;
Vxbgmtcl_dT = - T10_dT;
fac1 = cnst0over_func * Cox0_inv ;
fac1_dVbs = 0.0; fac1_dVds = 0.0; fac1_dVgs = 0.0;
fac1_dT = cnst0over_func_dT * Cox0_inv ;
fac1p2 = fac1 * fac1 ;
fac1p2_dT = 2.0 * fac1 * fac1_dT ;
VgpLD = - Vgbgmt + pParam->HSMHV2_vfbover;
VgpLD_dVgb = - 1.0e0 ;
T0 = Nover_func / here->HSMHV2_nin ;
Pb2over = 2.0 / beta * log( T0 ) ;
T0_dT = - T0 / here->HSMHV2_nin * Nin_dT ;
Pb2over_dT = - Pb2over / beta * beta_dT + 2.0 / beta / T0 * T0_dT ;
Vgb_fb_LD = - Vxbgmtcl ;
/*-----------------------------------*
* QsuLD: total charge = Accumulation | Depletion+inversion
*-----------------*/
if ( VgpLD < Vgb_fb_LD ){
/*---------------------------*
* Accumulation
*-----------------*/
flg_ovzone = -1 ;
T1 = 1.0 / ( beta * cnst0over_func ) ;
T1_dT = - T1 * T1 * ( beta_dT * cnst0over_func + beta * cnst0over_func_dT ) ;
TY = T1 * Cox0 ;
Ac41 = 2.0 + 3.0 * C_SQRT_2 * TY ;
Ac4 = 8.0 * Ac41 * Ac41 * Ac41 ;
TY_dT = T1_dT * Cox0 ;
Ac41_dT = 3.0 * C_SQRT_2 * TY_dT ;
Ac4_dT = 8.0 * 3.0 * Ac41 * Ac41 * Ac41_dT ;
Ps0_min = here->HSMHV2_eg - Pb2over ;
Ps0_min_dT = Eg_dT - Pb2over_dT ;
TX = beta * ( VgpLD + Vxbgmtcl ) ;
TX_dVxb = beta * Vxbgmtcl_dVxbgmt ;
TX_dVgb = beta * VgpLD_dVgb ;
TX_dT = beta_dT * ( VgpLD + Vxbgmtcl ) + beta * Vxbgmtcl_dT;
Ac31 = 7.0 * C_SQRT_2 - 9.0 * TY * ( TX - 2.0 ) ;
Ac31_dVxb = - 9.0 * TY * TX_dVxb ;
Ac31_dVgb = - 9.0 * TY * TX_dVgb ;
Ac31_dT = - 9.0 * ( TY_dT * ( TX - 2.0 ) + TY * TX_dT );
Ac3 = Ac31 * Ac31 ;
T1 = 2.0 * Ac31 ;
Ac3_dVxb = T1 * Ac31_dVxb ;
Ac3_dVgb = T1 * Ac31_dVgb ;
Ac3_dT = T1 * Ac31_dT ;
if ( Ac4 < Ac3*1.0e-8 ) {
Ac1 = 0.5*Ac4/Ac31 ;
Ac1_dVxb = - 0.5*Ac4/Ac3*Ac31_dVxb ;
Ac1_dVgb = - 0.5*Ac4/Ac3*Ac31_dVxb ;
Ac1_dT = 0.5*Ac4_dT/Ac31 - 0.5*Ac4/Ac3*Ac31_dT ;
} else {
Ac2 = sqrt( Ac4 + Ac3 ) ;
T1 = 0.5 / Ac2 ;
Ac2_dVxb = T1 * Ac3_dVxb ;
Ac2_dVgb = T1 * Ac3_dVgb ;
Ac2_dT = T1 * ( Ac4_dT + Ac3_dT );
Ac1 = -Ac31 + Ac2 ;
Ac1_dVxb = Ac2_dVxb -Ac31_dVxb ;
Ac1_dVgb = Ac2_dVgb -Ac31_dVgb ;
Ac1_dT = Ac2_dT -Ac31_dT ;
}
Acd = pow( Ac1 , C_1o3 ) ;
T1 = C_1o3 / ( Acd * Acd ) ;
Acd_dVxb = Ac1_dVxb * T1 ;
Acd_dVgb = Ac1_dVgb * T1 ;
Acd_dT = Ac1_dT * T1 ;
Acn = -4.0 * C_SQRT_2 - 12.0 * TY + 2.0 * Acd + C_SQRT_2 * Acd * Acd ;
T1 = 2.0 + 2.0 * C_SQRT_2 * Acd ;
Acn_dVxb = T1 * Acd_dVxb ;
Acn_dVgb = T1 * Acd_dVgb ;
Acn_dT = - 12.0 * TY_dT + T1 * Acd_dT ;
Chi = Acn / Acd ;
T1 = 1.0 / ( Acd * Acd ) ;
Chi_dVxb = ( Acn_dVxb * Acd - Acn * Acd_dVxb ) * T1 ;
Chi_dVgb = ( Acn_dVgb * Acd - Acn * Acd_dVgb ) * T1 ;
Chi_dT = ( Acn_dT * Acd - Acn * Acd_dT ) * T1 ;
Psa = Chi * beta_inv - Vxbgmtcl ;
Psa_dVxb = Chi_dVxb * beta_inv - Vxbgmtcl_dVxbgmt ;
Psa_dVgb = Chi_dVgb * beta_inv ;
Psa_dT = Chi_dT * beta_inv + Chi * beta_inv_dT - Vxbgmtcl_dT ;
T1 = Psa + Vxbgmtcl ;
T1_dT = Psa_dT + Vxbgmtcl_dT ;
T2 = T1 / Ps0_min ;
T2_dT = ( T1_dT * Ps0_min - T1 * Ps0_min_dT ) / ( Ps0_min * Ps0_min ) ;
T3 = sqrt( 1.0 + ( T2 * T2 ) ) ;
T9 = T2 / T3 / Ps0_min ;
T3_dVd = T9 * ( Psa_dVxb + Vxbgmtcl_dVxbgmt ) ;
T3_dVg = T9 * Psa_dVgb ;
T3_dT = T2_dT * T2 / T3;
Ps0LD = T1 / T3 - Vxbgmtcl ;
T9 = 1.0 / ( T3 * T3 ) ;
Ps0LD_dVxb = T9 * ( ( Psa_dVxb + Vxbgmtcl_dVxbgmt ) * T3 - T1 * T3_dVd ) - Vxbgmtcl_dVxbgmt ;
Ps0LD_dVgb = T9 * ( Psa_dVgb * T3 - T1 * T3_dVg );
Ps0LD_dT = T9 * ( T1_dT * T3 - T1 * T3_dT ) - Vxbgmtcl_dT;
T2 = ( VgpLD - Ps0LD ) ;
QsuLD = Cox0 * T2 ;
QsuLD_dVxb = - Cox0 * Ps0LD_dVxb ;
QsuLD_dVgb = Cox0 * ( VgpLD_dVgb - Ps0LD_dVgb ) ;
QsuLD_dT = Cox0 * ( - Ps0LD_dT ) ;
QbuLD = QsuLD ;
QbuLD_dVxb = QsuLD_dVxb ;
QbuLD_dVgb = QsuLD_dVgb ;
QbuLD_dT = QsuLD_dT ;
} else {
/*---------------------------*
* Depletion and inversion
*-----------------*/
/* initial value for a few fixpoint iterations
to get Ps0_iniA from simplified Poisson equation: */
flg_ovzone = 2 ;
Chi = znbd3 ;
Chi_dVxb = 0.0 ; Chi_dVgb = 0.0 ; Chi_dT = 0.0 ;
Ps0_iniA= Chi/beta - Vxbgmtcl ;
Ps0_iniA_dVxb = Chi_dVxb/beta - Vxbgmtcl_dVxbgmt ;
Ps0_iniA_dVgb = Chi_dVgb/beta ;
Ps0_iniA_dT = Chi_dT/beta - Chi*beta_dT/(beta*beta) - Vxbgmtcl_dT;
/* 1 .. 2 relaxation steps should be sufficient */
for ( lp_ld = 1; lp_ld <= 2; lp_ld ++ ) {
TY = exp(-Chi);
TY_dVxb = -Chi_dVxb * TY;
TY_dVgb = -Chi_dVgb * TY;
TY_dT = - Chi_dT * TY;
TX = 1.0e0 + 4.0e0
* ( beta * ( VgpLD + Vxbgmtcl ) - 1.0e0 + TY ) / ( fac1p2 * beta2 ) ;
TX_dVxb = 4.0e0 * ( beta * ( Vxbgmtcl_dVxbgmt ) + TY_dVxb ) / ( fac1p2 * beta2 );
TX_dVgb = 4.0e0 * ( beta * ( VgpLD_dVgb ) + TY_dVgb ) / ( fac1p2 * beta2 );
T1 = ( beta * ( VgpLD + Vxbgmtcl ) - 1.0e0 + TY );
T1_dT = beta_dT * ( VgpLD + Vxbgmtcl ) + beta * Vxbgmtcl_dT + TY_dT;
T3 = fac1p2 * beta2 ;
T3_dT = fac1p2_dT * beta2 + fac1p2 * ( 2 * beta * beta_dT ) ;
TX_dT = 4 * ( T1_dT * T3 - T1 * T3_dT ) / ( T3 * T3 );
if ( TX < epsm10) {
TX = epsm10;
TX_dVxb = TX_dVgb = TX_dT = 0.0;
}
Ps0_iniA = VgpLD + fac1p2 * beta / 2.0e0 * ( 1.0e0 - sqrt( TX ) ) ;
Ps0_iniA_dVxb = - fac1p2 * beta / 2.0e0 * TX_dVxb * 0.5 / sqrt( TX );
Ps0_iniA_dVgb = VgpLD_dVgb - fac1p2 * beta / 2.0e0 * TX_dVgb * 0.5 / sqrt( TX );
T1 = fac1p2 * beta ;
T1_dT = fac1p2_dT * beta + fac1p2 * beta_dT ;
T2 = 1.0 - sqrt( TX );
T2_dT = - 1.0e0 / ( 2.0e0 * sqrt( TX ) ) * TX_dT ;
Ps0_iniA_dT = ( T1_dT * T2 + T1 * T2_dT ) / 2.0e0 ;
Chi = beta * ( Ps0_iniA + Vxbgmtcl ) ;
Chi_dVxb = beta * ( Ps0_iniA_dVxb + Vxbgmtcl_dVxbgmt ) ;
Chi_dVgb = beta * ( Ps0_iniA_dVgb ) ;
Chi_dT = beta_dT * ( Ps0_iniA + Vxbgmtcl ) + beta * ( Ps0_iniA_dT + Vxbgmtcl_dT );
} /* End of iteration */
if ( Chi < znbd3 ) {
flg_ovzone = 1 ;
/*-----------------------------------*
* zone-D1
* - Ps0_iniA is the analytical solution of QovLD=Qb0 with
* Qb0 being approximated by 3-degree polynomial.
*
* new: Inclusion of exp(-Chi) term at right border
*-----------------*/
Ta = 1.0/(9.0*sqrt(2.0)) - (5.0+7.0*exp(-3.0)) / (54.0*sqrt(2.0+exp(-3.0)));
Tb = (1.0+exp(-3.0)) / (2.0*sqrt(2.0+exp(-3.0))) - sqrt(2.0) / 3.0;
Tc = 1.0/sqrt(2.0) + 1.0/(beta*fac1);
Tc_dT = - (beta_dT*fac1 + beta*fac1_dT)/(beta2*fac1p2);
Td = - (VgpLD + Vxbgmtcl) / fac1;
Td_dVxb = - Vxbgmtcl_dVxbgmt / fac1;
Td_dVgb = - VgpLD_dVgb / fac1;
Td_dT = - (Vxbgmtcl_dT*fac1 - (VgpLD+Vxbgmtcl)*fac1_dT)/fac1p2;
Tq = Tb*Tb*Tb / (27.0*Ta*Ta*Ta) - Tb*Tc/(6.0*Ta*Ta) + Td/(2.0*Ta);
Tq_dVxb = Td_dVxb/(2.0*Ta);
Tq_dVgb = Td_dVgb / (2.0*Ta);
Tq_dT = - Tb/(6.0*Ta*Ta)*Tc_dT + Td_dT/(2.0*Ta);
Tp = (3.0*Ta*Tc-Tb*Tb)/(9.0*Ta*Ta);
Tp_dT = Tc_dT/(3.0*Ta);
T5 = sqrt(Tq*Tq + Tp*Tp*Tp);
T5_dVxb = 2.0*Tq*Tq_dVxb / (2.0*T5);
T5_dVgb = 2.0*Tq*Tq_dVgb / (2.0*T5);
T5_dT = (2.0*Tq*Tq_dT + 3.0*Tp*Tp*Tp_dT) / (2.0*T5);
Tu = pow(-Tq + T5,C_1o3);
Tu_dVxb = Tu / (3.0 * (-Tq + T5)) * (-Tq_dVxb + T5_dVxb);
Tu_dVgb = Tu / (3.0 * (-Tq + T5)) * (-Tq_dVgb + T5_dVgb);
Tu_dT = Tu / (3.0 * (-Tq + T5)) * (-Tq_dT + T5_dT);
Tv = -pow(Tq + T5,C_1o3);
Tv_dVxb = Tv / (3.0 * (-Tq - T5)) * (-Tq_dVxb - T5_dVxb);
Tv_dVgb = Tv / (3.0 * (-Tq - T5)) * (-Tq_dVgb - T5_dVgb);
Tv_dT = Tv / (3.0 * (-Tq - T5)) * (-Tq_dT - T5_dT );
TX = Tu + Tv - Tb/(3.0*Ta);
TX_dVxb = Tu_dVxb + Tv_dVxb;
TX_dVgb = Tu_dVgb + Tv_dVgb;
TX_dT = Tu_dT + Tv_dT ;
Ps0_iniA = TX * beta_inv - Vxbgmtcl ;
Ps0_iniA_dVxb = TX_dVxb * beta_inv - Vxbgmtcl_dVxbgmt;
Ps0_iniA_dVgb = TX_dVgb * beta_inv;
Ps0_iniA_dT = TX_dT * beta_inv + TX * beta_inv_dT - Vxbgmtcl_dT;
Chi = beta * ( Ps0_iniA + Vxbgmtcl ) ;
Chi_dVxb = beta * ( Ps0_iniA_dVxb + Vxbgmtcl_dVxbgmt ) ;
Chi_dVgb = beta * ( Ps0_iniA_dVgb ) ;
Chi_dT = beta_dT * ( Ps0_iniA + Vxbgmtcl ) + beta * ( Ps0_iniA_dT + Vxbgmtcl_dT );
}
if ( model->HSMHV2_coqovsm > 0 ) {
/*-----------------------------------*
* - Ps0_iniB : upper bound.
*-----------------*/
flg_ovzone += 2;
VgpLD_shift = VgpLD + Vxbgmtcl + 0.1;
VgpLD_shift_dVgb = VgpLD_dVgb;
VgpLD_shift_dVxb = Vxbgmtcl_dVxbgmt;
VgpLD_shift_dT = Vxbgmtcl_dT;
exp_bVbs = exp( beta * - Vxbgmtcl ) + small;
exp_bVbs_dVxb = - exp_bVbs * beta * Vxbgmtcl_dVxbgmt;
exp_bVbs_dT = - exp_bVbs * (beta_dT*Vxbgmtcl + beta*Vxbgmtcl_dT);
T0 = here->HSMHV2_nin / Nover_func;
T0_dT = Nin_dT / Nover_func;
cnst1over = T0 * T0;
cnst1over_dT = 2.0 * T0 * T0_dT;
gamma = cnst1over * exp_bVbs;
gamma_dVxb = cnst1over * exp_bVbs_dVxb;
gamma_dT = cnst1over_dT * exp_bVbs + cnst1over * exp_bVbs_dT;
T0 = beta2 * fac1p2;
T0_dT = 2.0 * beta * fac1 * (beta_dT*fac1+beta*fac1_dT);
psi = beta*VgpLD_shift;
psi_dVgb = beta*VgpLD_shift_dVgb;
psi_dVxb = beta*VgpLD_shift_dVxb;
psi_dT = beta_dT*VgpLD_shift + beta*VgpLD_shift_dT;
Chi_1 = log(gamma*T0 + psi*psi) - log(cnst1over*T0) + beta*Vxbgmtcl;
Chi_1_dVgb = 2.0*psi*psi_dVgb/ (gamma*T0 + psi*psi);
Chi_1_dVxb = (gamma_dVxb*T0+2.0*psi*psi_dVxb)/(gamma*T0+psi*psi)
+ beta*Vxbgmtcl_dVxbgmt;
Chi_1_dT = (gamma_dT*T0+gamma*T0_dT+2.0*psi*psi_dT)/(gamma*T0+psi*psi)
- (cnst1over_dT*T0 + cnst1over*T0_dT)/(cnst1over*T0)
+ beta_dT*Vxbgmtcl + beta*Vxbgmtcl_dT;
Fn_SU2( Chi_1, Chi_1, psi, 1.0, T1, T2 );
Chi_1_dVgb = Chi_1_dVgb*T1 + psi_dVgb*T2;
Chi_1_dVxb = Chi_1_dVxb*T1 + psi_dVxb*T2;
Chi_1_dT = Chi_1_dT *T1 + psi_dT *T2;
/* 1 fixpoint step for getting more accurate Chi_B */
psi -= Chi_1 ;
psi_dVgb -= Chi_1_dVgb ;
psi_dVxb -= Chi_1_dVxb ;
psi_dT -= Chi_1_dT ;
psi += beta*0.1 ;
psi_dT += beta_dT*0.1 ;
psi_B = psi;
arg_B = psi*psi/(gamma*T0);
Chi_B = log(gamma*T0 + psi*psi) - log(cnst1over*T0) + beta*Vxbgmtcl;
Chi_B_dVgb = 2.0*psi*psi_dVgb/ (gamma*T0 + psi*psi);
Chi_B_dVxb = (gamma_dVxb*T0+2.0*psi*psi_dVxb)/(gamma*T0+psi*psi)
+ beta*Vxbgmtcl_dVxbgmt;
Chi_B_dT = (gamma_dT*T0+gamma*T0_dT+2.0*psi*psi_dT)/(gamma*T0+psi*psi)
- (cnst1over_dT*T0 + cnst1over*T0_dT)/(cnst1over*T0)
+ beta_dT*Vxbgmtcl + beta*Vxbgmtcl_dT;
Ps0_iniB = Chi_B/beta - Vxbgmtcl ;
Ps0_iniB_dVgb = Chi_B_dVgb/beta;
Ps0_iniB_dVxb = Chi_B_dVxb/beta- Vxbgmtcl_dVxbgmt;
Ps0_iniB_dT = Chi_B_dT/beta - Chi_B/(beta*beta)*beta_dT - Vxbgmtcl_dT;
/* construction of Ps0LD by taking Ps0_iniB as an upper limit of Ps0_iniA
*
* Limiting is done for Chi rather than for Ps0LD, to avoid shifting
* for Fn_SU2 */
Chi_A = Chi;
Chi_A_dVxb = Chi_dVxb;
Chi_A_dVgb = Chi_dVgb;
Chi_A_dT = Chi_dT;
Fn_SU2( Chi, Chi_A, Chi_B, c_ps0ini_2*75.00, T1, T2 ); /* org: 50 */
Chi_dVgb = Chi_A_dVgb * T1 + Chi_B_dVgb * T2;
Chi_dVxb = Chi_A_dVxb * T1 + Chi_B_dVxb * T2;
Chi_dT = Chi_A_dT * T1 + Chi_B_dT * T2;
}
/* updating Ps0LD */
Ps0LD= Chi/beta - Vxbgmtcl ;
Ps0LD_dVgb = Chi_dVgb/beta;
Ps0LD_dVxb = Chi_dVxb/beta- Vxbgmtcl_dVxbgmt;
Ps0LD_dT = Chi_dT/beta - Chi/(beta*beta)*beta_dT - Vxbgmtcl_dT;
T1 = Chi - 1.0 + exp(-Chi);
T1_dVxb = (1.0 - exp(-Chi)) * Chi_dVxb ;
T1_dVgb = (1.0 - exp(-Chi)) * Chi_dVgb ;
T1_dT = (1.0 - exp(-Chi)) * Chi_dT ;
if (T1 < epsm10) {
T1 = epsm10 ;
T1_dVxb = 0.0 ;
T1_dVgb = 0.0 ;
T1_dT = 0.0 ;
}
T2 = sqrt(T1);
QbuLD = cnst0over_func * T2 ;
T3 = cnst0over_func * 0.5 / T2 ;
QbuLD_dVxb = T3 * T1_dVxb ;
QbuLD_dVgb = T3 * T1_dVgb ;
QbuLD_dT = T3 * T1_dT + cnst0over_func_dT * T2 ;
/*-----------------------------------------------------------*
* QsuLD : Qovs or Qovd in unit area.
* note: QsuLD = Qdep+Qinv.
*-----------------*/
QsuLD = Cox0 * ( VgpLD - Ps0LD ) ;
QsuLD_dVxb = Cox0 * ( - Ps0LD_dVxb ) ;
QsuLD_dVgb = Cox0 * ( VgpLD_dVgb - Ps0LD_dVgb ) ;
QsuLD_dT = Cox0 * ( - Ps0LD_dT ) ;
if ( model->HSMHV2_coqovsm == 1 ) { /* take initial values from analytical model */
/*---------------------------------------------------*
* Calculation of Ps0LD. (beginning of Newton loop)
* - Fs0 : Fs0 = 0 is the equation to be solved.
* - dPs0 : correction value.
*-----------------*/
/* initial value too close to flat band should not be used */
// if (Ps0LD+Vxbgmtcl < 1.0e-2) Ps0LD = 1.0e-2 - Vxbgmtcl;
exp_bVbs = exp( beta * - Vxbgmtcl ) ;
T0 = here->HSMHV2_nin / Nover_func;
cnst1over = T0 * T0;
cnst1over_dT = 2.0 * T0 * ( Nin_dT / Nover_func );
cfs1 = cnst1over * exp_bVbs ;
flg_conv = 0 ;
for ( lp_s0 = 1 ; lp_s0 <= 2*lp_s0_max + 1 ; lp_s0 ++ ) {
Chi = beta * ( Ps0LD + Vxbgmtcl ) ;
if ( Chi < znbd5 ) {
/*-------------------------------------------*
* zone-D1/D2. (Ps0LD)
*-----------------*/
fi = Chi * Chi * Chi
* ( cn_im53 + Chi * ( cn_im54 + Chi * cn_im55 ) ) ;
fi_dChi = Chi * Chi
* ( 3 * cn_im53 + Chi * ( 4 * cn_im54 + Chi * 5 * cn_im55 ) ) ;
fs01 = cfs1 * fi * fi ;
fs01_dPs0 = cfs1 * beta * 2 * fi * fi_dChi ;
fb = Chi * ( cn_nc51
+ Chi * ( cn_nc52
+ Chi * ( cn_nc53
+ Chi * ( cn_nc54 + Chi * cn_nc55 ) ) ) ) ;
fb_dChi = cn_nc51
+ Chi * ( 2 * cn_nc52
+ Chi * ( 3 * cn_nc53
+ Chi * ( 4 * cn_nc54 + Chi * 5 * cn_nc55 ) ) ) ;
fs02 = sqrt( fb * fb + fs01 + small ) ;
fs02_dPs0 = ( beta * fb_dChi * 2 * fb + fs01_dPs0 ) / ( fs02 + fs02 ) ;
} else {
/*-------------------------------------------*
* zone-D3. (Ps0LD)
*-----------------*/
if ( Chi < large_arg ) { /* avoid exp_Chi to become extremely large */
exp_Chi = exp( Chi ) ;
fs01 = cfs1 * ( exp_Chi - 1.0e0 ) ;
fs01_dPs0 = cfs1 * beta * ( exp_Chi ) ;
} else {
exp_bPs0 = exp( beta*Ps0LD ) ;
fs01 = cnst1over * ( exp_bPs0 - exp_bVbs ) ;
fs01_dPs0 = cnst1over * beta * exp_bPs0 ;
}
fs02 = sqrt( Chi - 1.0 + fs01 ) ;
fs02_dPs0 = ( beta + fs01_dPs0 ) / fs02 * 0.5 ;
} /* end of if ( Chi ... ) block */
/*-----------------------------------------------------------*
* Fs0
*-----------------*/
Fs0 = VgpLD - Ps0LD - fac1 * fs02 ;
Fs0_dPs0 = - 1.0e0 - fac1 * fs02_dPs0 ;
if ( flg_conv == 1 ) break ;
dPs0 = - Fs0 / Fs0_dPs0 ;
/*-------------------------------------------*
* Update Ps0LD .
*-----------------*/
dPlim = 0.5*dP_max*(1.0 + Fn_Max(1.e0,fabs(Ps0LD))) ;
if ( fabs( dPs0 ) > dPlim ) dPs0 = dPlim * Fn_Sgn( dPs0 ) ;
Ps0LD = Ps0LD + dPs0 ;
TX = -Vxbgmtcl + ps_conv / 2 ;
if ( Ps0LD < TX ) Ps0LD = TX ;
/*-------------------------------------------*
* Check convergence.
*-----------------*/
if ( fabs( dPs0 ) <= ps_conv && fabs( Fs0 ) <= gs_conv ) {
flg_conv = 1 ;
}
} /* end of Ps0LD Newton loop */
/*-------------------------------------------*
* Procedure for diverged case.
*-----------------*/
if ( flg_conv == 0 ) {
fprintf( stderr ,
"*** warning(HiSIM_HV(%s)): Went Over Iteration Maximum (Ps0LD)\n",model->HSMHV2modName ) ;
fprintf( stderr , " -Vxbgmtcl = %e Vgbgmt = %e\n" , -Vxbgmtcl , Vgbgmt ) ;
}
/*---------------------------------------------------*
* Evaluate derivatives of Ps0LD.
*-----------------*/
Chi_dT = beta_dT * ( Ps0LD + Vxbgmtcl ) + beta * Vxbgmtcl_dT;
exp_bVbs_dT = - ( beta_dT * Vxbgmtcl + beta * Vxbgmtcl_dT ) * exp_bVbs;
cfs1_dT = exp_bVbs * cnst1over_dT + exp_bVbs_dT * cnst1over;
if ( Chi < znbd5 ) {
fs01_dVbs = cfs1 * beta * fi * ( - fi + 2 * fi_dChi ) ; /* fs01_dVxbgmtcl */
fs01_dT = cfs1 * 2 * fi * fi_dChi * Chi_dT + fi * fi * cfs1_dT ;
T2 = 1.0e0 / ( fs02 + fs02 ) ;
fs02_dVbs = ( + beta * fb_dChi * 2 * fb + fs01_dVbs ) * T2 ; /* fs02_dVxbgmtcl */
fs02_dT = ( 2 * fb * fb_dChi * Chi_dT + fs01_dT ) * T2 ;
} else {
if ( Chi < large_arg ) {
fs01_dVbs = + cfs1 * beta ; /* fs01_dVxbgmtcl */
exp_Chi_dT = exp_Chi * Chi_dT ;
fs01_dT = ( exp_Chi - 1.0e0 ) * cfs1_dT + cfs1 * exp_Chi_dT ;
} else {
fs01_dVbs = + cfs1 * beta ;
exp_bPs0_dT = exp_bPs0 * Ps0LD * beta_dT ;
fs01_dT = cnst1over_dT*(exp_bPs0-exp_bVbs) + cnst1over*(exp_bPs0_dT-exp_bVbs_dT) ;
}
T2 = 0.5e0 / fs02 ;
fs02_dVbs = ( + beta + fs01_dVbs ) * T2 ; /* fs02_dVxbgmtcl */
fs02_dT = T2 * ( Chi_dT + fs01_dT ) ;
}
T1 = 1.0 / Fs0_dPs0 ;
Ps0LD_dVxb = - ( - fac1 * fs02_dVbs ) * T1 ;
Ps0LD_dVds = 0.0 ;
Ps0LD_dVgb = - ( VgpLD_dVgb - fac1_dVgs * fs02 ) * T1 ;
Ps0LD_dT = - ( - ( fac1 * fs02_dT + fac1_dT * fs02 ) ) * T1;
Chi_dT = beta_dT * ( Ps0LD + Vxbgmtcl ) + beta * ( Ps0LD_dT + Vxbgmtcl_dT );
if ( Chi < znbd5 ) {
/*-------------------------------------------*
* zone-D1/D2. (Ps0LD)
*-----------------*/
if ( Chi < znbd3 ) { flg_ovzone = 1; }
else { flg_ovzone = 2; }
Xi0 = fb * fb + epsm10 ;
T1 = 2 * fb * fb_dChi * beta ;
Xi0_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0_dVxbgmtcl */
Xi0_dVds = T1 * Ps0LD_dVds ;
Xi0_dVgs = T1 * Ps0LD_dVgb ;
Xi0_dT = 2 * fb * fb_dChi * Chi_dT ;
Xi0p12 = fb + epsm10 ;
T1 = fb_dChi * beta ;
Xi0p12_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0p12_dVxbgmtcl */
Xi0p12_dVds = T1 * Ps0LD_dVds ;
Xi0p12_dVgs = T1 * Ps0LD_dVgb ;
Xi0p12_dT = fb_dChi * Chi_dT ;
Xi0p32 = fb * fb * fb + epsm10 ;
T1 = 3 * fb * fb * fb_dChi * beta ;
Xi0p32_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0p32_dVxbgmtcl */
Xi0p32_dVds = T1 * Ps0LD_dVds ;
Xi0p32_dVgs = T1 * Ps0LD_dVgb ;
Xi0p32_dT = 3 * fb * fb * fb_dChi * Chi_dT ;
} else {
/*-------------------------------------------*
* zone-D3. (Ps0LD)
*-----------------*/
flg_ovzone = 3 ;
Xi0 = Chi - 1.0e0 ;
Xi0_dVbs = beta * ( Ps0LD_dVxb + 1.0e0 ) ; /* Xi0_dVxbgmtcl */
Xi0_dVds = beta * Ps0LD_dVds ;
Xi0_dVgs = beta * Ps0LD_dVgb ;
Xi0_dT = Chi_dT ;
Xi0p12 = sqrt( Xi0 ) ;
T1 = 0.5e0 / Xi0p12 ;
Xi0p12_dVbs = T1 * Xi0_dVbs ;
Xi0p12_dVds = T1 * Xi0_dVds ;
Xi0p12_dVgs = T1 * Xi0_dVgs ;
Xi0p12_dT = T1 * Xi0_dT ;
Xi0p32 = Xi0 * Xi0p12 ;
T1 = 1.5e0 * Xi0p12 ;
Xi0p32_dVbs = T1 * Xi0_dVbs ;
Xi0p32_dVds = T1 * Xi0_dVds ;
Xi0p32_dVgs = T1 * Xi0_dVgs ;
Xi0p32_dT = T1 * Xi0_dT ;
} /* end of if ( Chi ... ) block */
/*-----------------------------------------------------------*
* - Recalculate the derivatives of fs01 and fs02.
*-----------------*/
fs01_dVbs = Ps0LD_dVxb * fs01_dPs0 + fs01_dVbs ;
fs01_dVds = Ps0LD_dVds * fs01_dPs0 ;
fs01_dVgs = Ps0LD_dVgb * fs01_dPs0 ;
fs01_dT = Ps0LD_dT * fs01_dPs0 + fs01_dT;
fs02_dVbs = Ps0LD_dVxb * fs02_dPs0 + fs02_dVbs ;
fs02_dVxb = Ps0LD_dVds * fs02_dPs0 ;
fs02_dVgb = Ps0LD_dVgb * fs02_dPs0 ;
fs02_dT = Ps0LD_dT * fs02_dPs0 + fs02_dT;
/*-----------------------------------------------------------*
* QbuLD and QiuLD
*-----------------*/
QbuLD = cnst0over_func * Xi0p12 ;
QbuLD_dVxb = cnst0over_func * Xi0p12_dVbs ;
QbuLD_dVgb = cnst0over_func * Xi0p12_dVgs ;
QbuLD_dT = cnst0over_func * Xi0p12_dT + cnst0over_func_dT * Xi0p12;
T1 = 1.0 / ( fs02 + Xi0p12 ) ;
QiuLD = cnst0over_func * fs01 * T1 ;
T2 = 1.0 / ( fs01 + epsm10 ) ;
QiuLD_dVbs = QiuLD * ( fs01_dVbs * T2 - ( fs02_dVbs + Xi0p12_dVbs ) * T1 ) ;
QiuLD_dVgs = QiuLD * ( fs01_dVgs * T2 - ( fs02_dVgb + Xi0p12_dVgs ) * T1 ) ;
T1_dT = - T1 * T1 * ( fs02_dT + Xi0p12_dT );
QiuLD_dT = cnst0over_func * ( fs01 * T1_dT + T1 * fs01_dT ) + fs01 * T1 * cnst0over_func_dT;
/*-----------------------------------------------------------*
* Extrapolation: X_dVxbgmt = X_dVxbgmtcl * Vxbgmtcl_dVxbgmt
*-----------------*/
QbuLD_dVxb *= Vxbgmtcl_dVxbgmt ;
QiuLD_dVbs *= Vxbgmtcl_dVxbgmt ;
/*-----------------------------------------------------------*
* Total overlap charge
*-----------------*/
QsuLD = QbuLD + QiuLD;
QsuLD_dVxb = QbuLD_dVxb + QiuLD_dVbs;
QsuLD_dVgb = QbuLD_dVgb + QiuLD_dVgs;
QsuLD_dT = QbuLD_dT + QiuLD_dT;
} /* end of COQOVSM branches */
} /* end of Vgbgmt region blocks */
/* convert to source ref. */
Ps0LD_dVbs = Ps0LD_dVxb * Vxbgmt_dVbs + Ps0LD_dVgb * Vgbgmt_dVbs ;
Ps0LD_dVds = Ps0LD_dVxb * Vxbgmt_dVds + Ps0LD_dVgb * Vgbgmt_dVds ;
Ps0LD_dVgs = Ps0LD_dVxb * Vxbgmt_dVgs + Ps0LD_dVgb * Vgbgmt_dVgs ;
QsuLD_dVbs = QsuLD_dVxb * Vxbgmt_dVbs + QsuLD_dVgb * Vgbgmt_dVbs ;
QsuLD_dVds = QsuLD_dVxb * Vxbgmt_dVds + QsuLD_dVgb * Vgbgmt_dVds ;
QsuLD_dVgs = QsuLD_dVxb * Vxbgmt_dVgs + QsuLD_dVgb * Vgbgmt_dVgs ;
QbuLD_dVbs = QbuLD_dVxb * Vxbgmt_dVbs + QbuLD_dVgb * Vgbgmt_dVbs ;
QbuLD_dVds = QbuLD_dVxb * Vxbgmt_dVds + QbuLD_dVgb * Vgbgmt_dVds ;
QbuLD_dVgs = QbuLD_dVxb * Vxbgmt_dVgs + QbuLD_dVgb * Vgbgmt_dVgs ;
/* inversion charge = total - depletion */
QiuLD = QsuLD - QbuLD ;
QiuLD_dVbs = QsuLD_dVbs - QbuLD_dVbs ;
QiuLD_dVds = QsuLD_dVds - QbuLD_dVds ;
QiuLD_dVgs = QsuLD_dVgs - QbuLD_dVgs ;
QiuLD_dT = QsuLD_dT - QbuLD_dT ;
/* End HSMHV2evalQover */

View File

@ -0,0 +1,656 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhveval_rdrift.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
/*===========================================================*
* Preamble.
*=================*/
/*---------------------------------------------------*
* Header files.
*-----------------*/
#include "ngspice/ngspice.h"
#ifdef __STDC__
/* #include <ieeefp.h> */
#endif
/*-----------------------------------*
* HiSIM macros
*-----------------*/
#include "hisimhv.h"
#include "hsmhvevalenv.h"
/* local variables used in macro functions */
double TMF0 , TMF1 , TMF2 , TMF3 , TMF4 , TMF5 , TMF6 ;
/*===========================================================*
* pow
*=================*/
#ifdef POW_TO_EXP_AND_LOG
#define Fn_Pow( x , y ) exp( y * log( x ) )
#else
#define Fn_Pow( x , y ) pow( x , y )
#endif
/*===========================================================*
* Macro Functions for ceiling/flooring/symmetrization.
*=================*/
/*---------------------------------------------------*
* smoothUpper: ceiling.
* y = xmax - 0.5 ( arg + sqrt( arg^2 + 4 xmax delta ) )
* arg = xmax - x - delta
*-----------------*/
#define Fn_SU( y , x , xmax , delta , dx ) { \
TMF1 = ( xmax ) - ( x ) - ( delta ) ; \
TMF2 = 4.0 * ( xmax ) * ( delta) ; \
TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \
TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \
dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \
y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \
}
#define Fn_SU2( y , x , xmax , delta , dy_dx , dy_dxmax ) { \
TMF1 = ( xmax ) - ( x ) - ( delta ) ; \
TMF2 = 4.0 * ( xmax ) * ( delta) ; \
TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \
TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \
dy_dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \
dy_dxmax = 0.5 * ( 1.0 - ( TMF1 + 2.0 * delta ) / TMF2 ) ; \
y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \
}
/*---------------------------------------------------*
* smoothLower: flooring.
* y = xmin + 0.5 ( arg + sqrt( arg^2 + 4 xmin delta ) )
* arg = x - xmin - delta
*-----------------*/
#define Fn_SL( y , x , xmin , delta , dx ) { \
TMF1 = ( x ) - ( xmin ) - ( delta ) ; \
TMF2 = 4.0 * ( xmin ) * ( delta ) ; \
TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \
TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \
dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \
y = ( xmin ) + 0.5 * ( TMF1 + TMF2 ) ; \
}
#define Fn_SL2( y , x , xmin , delta , dy_dx, dy_dxmin ) { \
TMF1 = ( x ) - ( xmin ) - ( delta ) ; \
TMF2 = 4.0 * ( xmin ) * ( delta ) ; \
TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \
TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \
dy_dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \
dy_dxmin = 0.5 * ( 1.0 - ( TMF1 - 2.0 * delta ) / TMF2 ) ; \
y = ( xmin ) + 0.5 * ( TMF1 + TMF2 ) ; \
}
/*---------------------------------------------------*
* smoothZero: flooring to zero.
* y = 0.5 ( x + sqrt( x^2 + 4 delta^2 ) )
*-----------------*/
#define Fn_SZ( y , x , delta , dx ) { \
TMF2 = sqrt ( ( x ) * ( x ) + 4.0 * ( delta ) * ( delta ) ) ; \
dx = 0.5 * ( 1.0 + ( x ) / TMF2 ) ; \
y = 0.5 * ( ( x ) + TMF2 ) ; \
if( y < 0.0 ) { y=0.0; dx=0.0; } \
}
/*---------------------------------------------------*
* SymAdd: evaluate additional term for symmetry.
*-----------------*/
#define Fn_SymAdd( y , x , add0 , dx ) \
{ \
if( ( x ) < 1e6 ) { \
TMF1 = 2.0 * ( x ) / ( add0 ) ; \
TMF2 = 1.0 + TMF1 * ( (1.0/2) + TMF1 * ( (1.0/6) \
+ TMF1 * ( (1.0/24) + TMF1 * ( (1.0/120) \
+ TMF1 * ( (1.0/720) + TMF1 * (1.0/5040) ) ) ) ) ) ; \
TMF3 = (1.0/2) + TMF1 * ( (1.0/3) \
+ TMF1 * ( (1.0/8) + TMF1 * ( (1.0/30) \
+ TMF1 * ( (1.0/144) + TMF1 * (1.0/840) ) ) ) ) ; \
y = add0 / TMF2 ; \
dx = - 2.0 * TMF3 / ( TMF2 * TMF2 ) ; \
} else { y=0.0; dx=0.9; } \
}
#define Fn_CP( y , x , xmax , pw , dx ) { \
double x2 = (x) * (x) ; \
double xmax2 = (xmax) * (xmax) ; \
double xp = 1.0 , xmp = 1.0 ; \
int m =0, mm =0; \
double arg =0.0, dnm =0.0; \
for ( m = 0 ; m < pw ; m ++ ) { xp *= x2 ; xmp *= xmax2 ; } \
arg = xp + xmp ; \
dnm = arg ; \
if ( pw == 1 || pw == 2 || pw == 4 || pw == 8 ) { \
if ( pw == 1 ) { mm = 1 ; \
} else if ( pw == 2 ) { mm = 2 ; \
} else if ( pw == 4 ) { mm = 3 ; \
} else if ( pw == 8 ) { mm = 4 ; } \
for ( m = 0 ; m < mm ; m ++ ) { dnm = sqrt( dnm ) ; } \
} else { dnm = Fn_Pow( dnm , 1.0 / ( 2.0 * pw ) ) ; } \
dnm = 1.0 / dnm ; \
y = (x) * (xmax) * dnm ; \
dx = (xmax) * xmp * dnm / arg ; \
}
#define Fn_SU_CP( y , x , xmax , delta , pw , dx ) { \
if(x > xmax - delta && delta >= 0.0) { \
TMF1 = x - xmax + delta ; \
Fn_CP( TMF0 , TMF1 , delta , pw , dx ) \
y = xmax - delta + TMF0 ; \
dx = dx ; \
} else { \
y = x ; \
dx = 1.0 ; \
} \
}
/*===========================================================*
* Function hsmhvrdrift.
*=================*/
int HSMHV2rdrift
(
double Vddp,
double Vds,
double Vbs,
double Vsubs, /* substrate-source voltage */
double deltemp,
HSMHV2instance *here,
HSMHV2model *model,
CKTcircuit *ckt
)
{
HSMHV2binningParam *pParam = &here->pParam ;
HSMHV2modelMKSParam *modelMKS = &model->modelMKS ;
const double small = 1.0e-50 ;
double Mfactor =0.0, WeffLD_nf =0.0 ;
double Ldrift =0.0, Xldld =0.0 ;
double Nover =0.0 ;
/* temporary vars. & derivatives*/
double T0 =0.0, T0_dVb =0.0, T0_dVd =0.0, T0_dVg =0.0, T0_dT =0.0 ;
double T1 =0.0, T1_dVd =0.0, T1_dT =0.0, T1_dVddp =0.0 ;
double T2 =0.0, T2_dVb =0.0, T2_dVd =0.0, T2_dT =0.0, T2_dVddp =0.0 ;
double T3 =0.0, T3_dT =0.0, T3_dVddp =0.0 ;
double T4 =0.0, T4_dT =0.0, T4_dVddp =0.0 ;
double T5 =0.0, T5_dT =0.0, T5_dVddp =0.0 ;
double T6 =0.0, T6_dT =0.0, T6_dVddp =0.0 ;
double T9 =0.0 ;
/* bias-dependent Rd, Rs */
double Edri =0.0, Edri_dVddp =0.0 ;
double Vdri =0.0, Vdri_dVddp =0.0, Vdri_dT =0.0 ;
double Vmax =0.0, Vmax_dT =0.0 ;
double Mu0 =0.0, Mu0_dT =0.0 ;
double Cx =0.0, Cx_dT =0.0 ;
double Car =0.0, Car_dT =0.0 ;
double Mu =0.0, Mu_dVddp = 0.0, Mu_dT =0.0 ;
double Xov =0.0, Xov_dVds =0.0, Xov_dVgs =0.0, Xov_dVbs =0.0, Xov_dT =0.0 ;
double Carr =0.0, Carr_dVds=0.0, Carr_dVgs=0.0, Carr_dVbs=0.0, Carr_dVddp =0.0, Carr_dT =0.0 ;
double GD =0.0, GD_dVddp =0.0, GD_dVgse =0.0, GD_dT =0.0, GD_dVds =0.0, GD_dVgs =0.0, GD_dVbs =0.0 ;
double Rd =0.0, Rd_dVddp =0.0, Rd_dVdse =0.0, Rd_dVgse =0.0, Rd_dVbse =0.0, Rd_dT =0.0, Rd_dVds =0.0, Rd_dVgs =0.0, Rd_dVbs =0.0 ;
double Vddpz=0.0, Vddpz_dVddp=0.0, Vzadd =0.0, Vzadd_dVddp=0.0 ;
/* temperature-dependent variables for SHE model */
double TTEMP =0.0, TTEMP0 =0.0 ;
/* Wdepl and Wjunc */
double Wdepl, Wdepl_dVd, Wdepl_dVg, Wdepl_dVb, Wdepl_dT;
double Wjunc0, Wjunc0_dVd, Wjunc0_dVb;
double Wrdrdjunc, Wjunc, Wjunc_dVd, Wjunc_dVb;
const double Res_min = 1.0e-4 ;
const double epsm10 = 10.0e0 * C_EPS_M ;
const double ps_conv = 1.0e-12 ;
double Rdrbb_dT =0.0 ;
double Wdep = 0.0, Wdep_dVdserev = 0.0, Wdep_dVsubsrev = 0.0 ;
double T1_dVdserev = 0.0, T1_dVsubsrev = 0.0, T6_dVdserev = 0.0, T6_dVsubsrev = 0.0 ;
double Rd_dVsubs=0.0 ;
#define C_sub_delta 0.1 /* CHECK! */
#define C_sub_delta2 1.0e-9 /* CHECK! */
NG_IGNORE(Vsubs);
/*================ Start of executable code.=================*/
/*-----------------------------------------------------------*
* Temperature dependent constants.
*-----------------*/
if ( here->HSMHV2tempNode > 0 && pParam->HSMHV2_rth0 != 0.0 ) {
#define HSMHV2EVAL
#include "hsmhvtemp_eval_rdri.h"
} else {
if ( here->HSMHV2_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV2_dtemp ; }
Mu0_dT = 0.0 ;
Vmax_dT = 0.0 ;
Cx_dT = 0.0 ;
Car_dT = 0.0 ;
Rdrbb_dT = 0.0 ;
}
Mfactor = here->HSMHV2_m ;
WeffLD_nf = here->HSMHV2_weff_ld * here->HSMHV2_nf ;
Ldrift = here->HSMHV2_ldrift1 + here->HSMHV2_ldrift2 ;
Xldld = model->HSMHV2_xldld + small ;
Nover = pParam->HSMHV2_nover ;
Mu0 = here->HSMHV2_rdrmue * here->HSMHV2_rdrmuel ;
Mu0_dT = Mu0_dT * here->HSMHV2_rdrmuel ;
Vmax = here->HSMHV2_rdrvmax * here->HSMHV2_rdrvmaxw * here->HSMHV2_rdrvmaxl + small ;
Vmax_dT = Vmax_dT * here->HSMHV2_rdrvmaxw * here->HSMHV2_rdrvmaxl ;
Cx = here->HSMHV2_rdrcx * here->HSMHV2_rdrcxw ;
Cx_dT = Cx_dT * here->HSMHV2_rdrcxw ;
Car = here->HSMHV2_rdrcar ;
//-----------------------------------------------------------*
// Modified bias introduced to realize symmetry at Vddp=0.
//-----------------//
if(Vddp < 0) {
Fn_SymAdd( Vzadd , -Vddp / 2 , model->HSMHV2_vzadd0 , T2 ) ;
Vzadd_dVddp = - T2 / 2.0 ;
if( Vzadd < ps_conv ) {
Vzadd = ps_conv ;
Vzadd_dVddp = 0.0 ;
}
Vddpz = Vddp - 2 * Vzadd ;
Vddpz_dVddp = 1.0 - 2 * Vzadd_dVddp ;
} else {
Fn_SymAdd( Vzadd , Vddp / 2 , model->HSMHV2_vzadd0 , T2 ) ;
Vzadd_dVddp = T2 / 2.0 ;
if( Vzadd < ps_conv ) {
Vzadd = ps_conv ;
Vzadd_dVddp = 0.0 ;
}
Vddpz = Vddp + 2 * Vzadd ;
Vddpz_dVddp = 1.0 + 2 * Vzadd_dVddp ;
}
Edri = Vddpz / Ldrift ;
Edri_dVddp = Vddpz_dVddp / Ldrift ;
Vdri = Mu0 * Edri ;
Vdri_dVddp = Mu0 * Edri_dVddp ;
Vdri_dT = Mu0_dT * Edri ;
/*-----------------------------------------------------------*
* Mu : mobility
*-----------------*/
if ( Vddp >= 0 ) {
T1 = Vdri / Vmax ;
T1_dVddp = Vdri_dVddp / Vmax ;
T1_dT = ( Vdri_dT * Vmax - Vdri * Vmax_dT ) / ( Vmax * Vmax );
} else {
T1 = - Vdri / Vmax ;
T1_dVddp = - Vdri_dVddp / Vmax ;
T1_dT = - ( Vdri_dT * Vmax - Vdri * Vmax_dT ) / ( Vmax * Vmax );
}
if( model->HSMHV2_rdrbbtmp == 0.0 ) {
if( T1 == 0.0 ) {
T2 = 0.0 ; T2_dT = 0.0 ; T2_dVddp = 0.0 ;
T4 = 1.0 ; T4_dT = 0.0 ; T4_dVddp = 0.0 ;
}else {
if ( 1.0e0 - epsm10 <= here->HSMHV2_rdrbb && here->HSMHV2_rdrbb <= 1.0e0 + epsm10 ) {
T3 = 1.0e0 ;
T3_dT = 0.0e0 ;
T3_dVddp = 0.0e0 ;
} else if ( 2.0e0 - epsm10 <= here->HSMHV2_rdrbb && here->HSMHV2_rdrbb <= 2.0e0 + epsm10 ) {
T3 = T1 ;
T3_dT = T1_dT ;
T3_dVddp = T1_dVddp ;
} else {
T3 = Fn_Pow( T1 , here->HSMHV2_rdrbb - 1.0e0 ) ;
T3_dT = ( here->HSMHV2_rdrbb - 1.0e0 )* Fn_Pow( T1 , here->HSMHV2_rdrbb - 2.0e0 ) * T1_dT ;
T3_dVddp = ( here->HSMHV2_rdrbb - 1.0e0 )* Fn_Pow( T1 , here->HSMHV2_rdrbb - 2.0e0 ) * T1_dVddp ;
}
T2 = T1 * T3 ;
T2_dT = T1 * T3_dT + T3 * T1_dT ;
T2_dVddp = T1 * T3_dVddp + T3 * T1_dVddp ;
T4 = 1.0e0 + T2 ;
T4_dT = T2_dT ;
T4_dVddp = T2_dVddp ;
}
if ( 1.0e0 - epsm10 <= here->HSMHV2_rdrbb && here->HSMHV2_rdrbb <= 1.0e0 + epsm10 ) {
T5 = 1.0 / T4 ;
T5_dT = - T5 * T5 * T4_dT ;
T5_dVddp = - T5 * T5 * T4_dVddp ;
} else if ( 2.0e0 - epsm10 <= here->HSMHV2_rdrbb && here->HSMHV2_rdrbb <= 2.0e0 + epsm10 ) {
T5 = 1.0 / sqrt( T4 ) ;
T5_dT = - 0.5e0 / ( T4 * sqrt(T4) ) * T4_dT ;
T5_dVddp = - 0.5e0 / ( T4 * sqrt(T4) ) * T4_dVddp;
} else {
T6 = Fn_Pow( T4 , ( - 1.0e0 / here->HSMHV2_rdrbb - 1.0e0 ) ) ;
T5 = T4 * T6 ;
T6_dT = ( - 1.0e0 / here->HSMHV2_rdrbb - 1.0e0 ) * Fn_Pow( T4 , ( - 1.0e0 / here->HSMHV2_rdrbb - 2.0e0 ) ) * T4_dT ;
T6_dVddp = ( - 1.0e0 / here->HSMHV2_rdrbb - 1.0e0 ) * Fn_Pow( T4 , ( - 1.0e0 / here->HSMHV2_rdrbb - 2.0e0 ) ) * T4_dVddp ;
T5_dT = T4_dT * T6 + T4 * T6_dT ;
T5_dVddp = T4_dVddp * T6 + T4 * T6_dVddp ;
}
} else {
if( T1 == 0.0 ) {
T2 = 0.0 ; T2_dT = 0.0 ; T2_dVddp = 0.0 ;
T4 = 1.0 ; T4_dT = 0.0 ; T4_dVddp = 0.0 ;
}else {
T3 = Fn_Pow( T1 , here->HSMHV2_rdrbb - 1.0e0 ) ;
T3_dT = ( here->HSMHV2_rdrbb - 1.0e0 )* Fn_Pow( T1 , here->HSMHV2_rdrbb - 2.0e0 ) * T1_dT + T3*log(T1)*Rdrbb_dT ;
T3_dVddp = ( here->HSMHV2_rdrbb - 1.0e0 )* Fn_Pow( T1 , here->HSMHV2_rdrbb - 2.0e0 ) * T1_dVddp ;
T2 = T1 * T3 ;
T2_dT = T1 * T3_dT + T3 * T1_dT ;
T2_dVddp = T1 * T3_dVddp + T3 * T1_dVddp ;
T4 = 1.0e0 + T2 ;
T4_dT = T2_dT ;
T4_dVddp = T2_dVddp ;
}
T6 = Fn_Pow( T4 , ( - 1.0e0 / here->HSMHV2_rdrbb - 1.0e0 ) ) ;
T5 = T4 * T6 ;
T6_dT = ( - 1.0e0 / here->HSMHV2_rdrbb - 1.0e0 ) * Fn_Pow( T4 , ( - 1.0e0 / here->HSMHV2_rdrbb - 2.0e0 ) ) * T4_dT +T6*log(T4)/here->HSMHV2_rdrbb/here->HSMHV2_rdrbb*Rdrbb_dT ;
T6_dVddp = ( - 1.0e0 / here->HSMHV2_rdrbb - 1.0e0 ) * Fn_Pow( T4 , ( - 1.0e0 / here->HSMHV2_rdrbb - 2.0e0 ) ) * T4_dVddp ;
T5_dT = T4_dT * T6 + T4 * T6_dT ;
T5_dVddp = T4_dVddp * T6 + T4 * T6_dVddp ;
}
Mu = Mu0 * T5 ;
Mu_dVddp = Mu0 * T5_dVddp ;
Mu_dT = Mu0_dT * T5 + Mu0 * T5_dT ;
/*-----------------------------------------------------------*
* Carr : carrier density
*-----------------*/
T4 = 1.0e0 + T1 ;
T4_dVddp = T1_dVddp ;
T4_dT = T1_dT ;
T5 = 1.0 / T4 ;
T5_dVddp = - T5 * T5 * T4_dVddp ;
T5_dT = - T5 * T5 * T4_dT ;
Carr = Nover * ( 1.0 + Car * ( 1.0 - T5 ) * Vddpz / ( Ldrift - model->HSMHV2_rdrdl2 ) ) ;
Carr_dVddp = Nover * Car * ( - T5_dVddp * Vddpz + ( 1.0 - T5 ) * Vddpz_dVddp ) / ( Ldrift - model->HSMHV2_rdrdl2 ) ;
Carr_dT = Nover * ( Car_dT * ( 1.0 - T5 ) + Car * ( - T5_dT ) ) * Vddpz / ( Ldrift - model->HSMHV2_rdrdl2 ) ;
Carr += - here->HSMHV2_QbuLD / C_QE * model->HSMHV2_rdrqover;
Carr_dVds = - here->HSMHV2_QbuLD_dVds / C_QE * model->HSMHV2_rdrqover;
Carr_dVgs = - here->HSMHV2_QbuLD_dVgs / C_QE * model->HSMHV2_rdrqover;
Carr_dVbs = - here->HSMHV2_QbuLD_dVbs / C_QE * model->HSMHV2_rdrqover;
Carr_dT += - here->HSMHV2_QbuLD_dTi / C_QE * model->HSMHV2_rdrqover;
/*-----------------------------------------------------------*
* Xov : depth of the current flow
*-----------------*/
T0 = -here->HSMHV2_Ps0LD ;
T0_dVd = -here->HSMHV2_Ps0LD_dVds ;
T0_dVg = -here->HSMHV2_Ps0LD_dVgs ;
T0_dVb = -here->HSMHV2_Ps0LD_dVbs ;
T0_dT = -here->HSMHV2_Ps0LD_dTi ;
Fn_SZ( T0 , T0 , 1.0e-2 , T9 ) ;
T0 += epsm10 ;
T0_dVd *= T9 ;
T0_dVg *= T9 ;
T0_dVb *= T9 ;
T0_dT *= T9 ;
Wdepl = sqrt ( here->HSMHV2_kdep * T0 ) ;
Wdepl_dVd = here->HSMHV2_kdep / ( 2.0 * Wdepl ) * T0_dVd ;
Wdepl_dVg = here->HSMHV2_kdep / ( 2.0 * Wdepl ) * T0_dVg ;
Wdepl_dVb = here->HSMHV2_kdep / ( 2.0 * Wdepl ) * T0_dVb ;
Wdepl_dT = here->HSMHV2_kdep / ( 2.0 * Wdepl ) * T0_dT ;
T2 = Vds - Vbs + model->HSMHV2_vbi ;
T2_dVd = 1.0 ;
T2_dVb = -1.0 ;
Fn_SZ( T2 , T2 , 1.0e-2 , T9 ) ;
T2 += epsm10 ;
T2_dVd *= T9 ;
T2_dVb *= T9 ;
Wjunc0 = sqrt ( here->HSMHV2_kjunc * T2 ) ;
Wjunc0_dVd = here->HSMHV2_kjunc / ( 2.0 * Wjunc0 ) * T2_dVd ;
Wjunc0_dVb = here->HSMHV2_kjunc / ( 2.0 * Wjunc0 ) * T2_dVb ;
Fn_SU( Wjunc, Wjunc0, Xldld, 10e-3*Xldld, T0 );
Wjunc_dVd = Wjunc0_dVd * T0;
Wjunc_dVb = Wjunc0_dVb * T0;
// Wrdrdjunc = model->HSMHV2_rdrdjunc + small ;
Wrdrdjunc = model->HSMHV2_rdrdjunc + epsm10 ;
Xov = here->HSMHV2_Xmax - Cx * ( here->HSMHV2_Xmax
/ Wrdrdjunc * Wdepl + here->HSMHV2_Xmax / Xldld * Wjunc ) ;
Xov_dVds = - Cx * here->HSMHV2_Xmax / Wrdrdjunc * Wdepl_dVd
- Cx * here->HSMHV2_Xmax / Xldld * Wjunc_dVd ;
Xov_dVgs = - Cx * here->HSMHV2_Xmax / Wrdrdjunc * Wdepl_dVg ;
Xov_dVbs = - Cx * here->HSMHV2_Xmax / Wrdrdjunc * Wdepl_dVb
- Cx * here->HSMHV2_Xmax / Xldld * Wjunc_dVb ;
Xov_dT = - Cx_dT * ( here->HSMHV2_Xmax
/ Wrdrdjunc * Wdepl + here->HSMHV2_Xmax / Xldld * Wjunc )
- Cx * here->HSMHV2_Xmax / Wrdrdjunc * Wdepl_dT ;
Fn_SZ( Xov , Xov , (1.0 - here->HSMHV2_rdrcx) * here->HSMHV2_Xmax / 100 , T9 ) ;
Xov_dVds *= T9 ;
Xov_dVgs *= T9 ;
Xov_dVbs *= T9 ;
Xov_dT *= T9 ;
/*-----------------------------------------------------------*
* Rd : drift resistance
*-----------------*/
T0 = C_QE / ( Ldrift + model->HSMHV2_rdrdl1 );
T1 = T0;
T1_dVd = 0.0 ;
GD = T1 * Xov * Mu * Carr ;
GD_dVddp = T1 * Xov * Mu_dVddp * Carr
+ T1 * Xov * Mu * Carr_dVddp ;
GD_dVgse = 0.0 ;
GD_dT = T1 * Xov * Mu_dT * Carr
+ T1 * Xov_dT * Mu * Carr
+ T1 * Xov * Mu * Carr_dT ;
GD_dVds = T1 * Mu * (Xov_dVds * Carr + Xov * Carr_dVds)
+ T1_dVd * Mu * Xov * Carr;
GD_dVgs = T1 * Mu * (Xov_dVgs * Carr + Xov * Carr_dVgs);
GD_dVbs = T1 * Mu * (Xov_dVbs * Carr + Xov * Carr_dVbs);
if ( GD <= 0 ) {
// GD = small ;
GD = epsm10 ;
GD_dVddp = 0.0 ;
GD_dVgse = 0.0 ;
GD_dT = 0.0 ;
GD_dVds = 0.0 ;
GD_dVgs = 0.0 ;
GD_dVbs = 0.0 ;
}
Rd = 1 / GD ;
Rd_dVddp = - GD_dVddp * Rd * Rd ;
Rd_dVgse = - GD_dVgse * Rd * Rd ;
Rd_dT = - GD_dT * Rd * Rd ;
Rd_dVds = - GD_dVds * Rd * Rd ;
Rd_dVgs = - GD_dVgs * Rd * Rd ;
Rd_dVbs = - GD_dVbs * Rd * Rd ;
/* Weff dependence of the resistances */
Rd = Rd / WeffLD_nf ;
Fn_SU_CP( Rd, Rd, 1e6, 1e3, 2, T0 ) ;
Rd_dVddp = Rd_dVddp*T0/WeffLD_nf ;
Rd_dVgse = Rd_dVgse*T0/WeffLD_nf ;
Rd_dT = Rd_dT*T0/WeffLD_nf ;
Rd_dVds = Rd_dVds*T0/WeffLD_nf ;
Rd_dVgs = Rd_dVgs*T0/WeffLD_nf ;
Rd_dVbs = Rd_dVbs*T0/WeffLD_nf ;
if ( here->HSMHV2subNode >= 0 &&
( pParam->HSMHV2_nover * ( modelMKS->HSMHV2_nsubsub + pParam->HSMHV2_nover ) ) > 0 ) {
/* external substrate node exists && LDMOS case: */
/* Substrate Effect */
T0 = model->HSMHV2_vbisub - model->HSMHV2_rdvdsub * here->HSMHV2_Vdserevz - model->HSMHV2_rdvsub * here->HSMHV2_Vsubsrev ;
Fn_SZ( T1, T0, 10.0, T2 ) ;
T1 += epsm10 ;
T1_dVdserev = - model->HSMHV2_rdvdsub * here->HSMHV2_Vdserevz_dVd * T2 ;
T1_dVsubsrev = - model->HSMHV2_rdvsub * T2 ;
T0 = modelMKS->HSMHV2_nsubsub / ( pParam->HSMHV2_nover * ( modelMKS->HSMHV2_nsubsub + pParam->HSMHV2_nover ) ) ;
T4 = 2 * C_ESI / C_QE * T0 ;
Wdep = sqrt ( T4 * T1 ) + small ;
Wdep_dVdserev = 0.5 * T4 * T1_dVdserev / Wdep ;
Wdep_dVsubsrev = 0.5 * T4 * T1_dVsubsrev / Wdep ;
Fn_SU( Wdep, Wdep, model->HSMHV2_ddrift, C_sub_delta * model->HSMHV2_ddrift, T0 ) ;
Wdep_dVdserev *= T0 ;
Wdep_dVsubsrev *= T0 ;
T0 = model->HSMHV2_ddrift - Wdep ;
Fn_SZ( T0, T0, C_sub_delta2, T2 ) ;
T0 += epsm10;
T6 = (here->HSMHV2_ldrift1 + here->HSMHV2_ldrift2 ) / T0 ;
T6_dVdserev = T2 * Wdep_dVdserev * T6 / T0 ;
T6_dVsubsrev = T2 * Wdep_dVsubsrev * T6 / T0 ;
T0 = Rd ;
Rd = T0 * T6 ;
Rd_dVddp = Rd_dVddp * T6 ;
Rd_dVgse = Rd_dVgse * T6 ;
Rd_dVdse = T0 * T6_dVdserev ;
Rd_dVbse = Rd_dVgse * T6 ;
Rd_dVds = Rd_dVds * T6 ;
Rd_dVgs = Rd_dVgs * T6 ;
Rd_dVbs = Rd_dVbs * T6 ;
Rd_dVsubs = T0 * T6_dVsubsrev ;
Rd_dT = Rd_dT * T6 ;
}
/* Sheet resistances are added. */
Rd += here->HSMHV2_rd0 ;
/* Re-stamps for hsmhvnoi.c */
/* Please see hsmhvnoi.c */
if ( Rd > Res_min && model->HSMHV2_cothrml )
here->HSMHV2drainConductance = Mfactor / Rd ;
else here->HSMHV2drainConductance = 0.0 ;
if ( here->HSMHV2_Rs > Res_min && model->HSMHV2_cothrml )
here->HSMHV2sourceConductance = Mfactor / here->HSMHV2_rs0 ;
else here->HSMHV2sourceConductance = 0.0 ;
/* Clamping to Res_min */
here->HSMHV2_Rs = here->HSMHV2_rs0 / Mfactor ;
if(here->HSMHV2_Rs < Res_min) { here->HSMHV2_Rs = Res_min ; }
here->HSMHV2_dRs_dVdse = 0.0 ;
here->HSMHV2_dRs_dVgse = 0.0 ;
here->HSMHV2_dRs_dVbse = 0.0 ;
here->HSMHV2_dRs_dVsubs = 0.0 ;
here->HSMHV2_dRs_dTi = 0.0 ;
/* Clamping to Res_min */
here->HSMHV2_Rd = Rd / Mfactor ;
if(here->HSMHV2_Rd < Res_min) {
here->HSMHV2_Rd = Res_min ;
here->HSMHV2_dRd_dVddp = 0.0 ;
here->HSMHV2_dRd_dVdse = 0.0 ;
here->HSMHV2_dRd_dVgse = 0.0 ;
here->HSMHV2_dRd_dVbse = 0.0 ;
here->HSMHV2_dRd_dVsubs = 0.0 ;
here->HSMHV2_dRd_dTi = 0.0 ;
here->HSMHV2_dRd_dVds = 0.0 ;
here->HSMHV2_dRd_dVgs = 0.0 ;
here->HSMHV2_dRd_dVbs = 0.0 ;
} else {
here->HSMHV2_dRd_dVddp = Rd_dVddp / Mfactor ;
here->HSMHV2_dRd_dVdse = Rd_dVdse / Mfactor ;
here->HSMHV2_dRd_dVgse = Rd_dVgse / Mfactor ;
here->HSMHV2_dRd_dVbse = Rd_dVbse / Mfactor ;
here->HSMHV2_dRd_dVsubs= Rd_dVsubs / Mfactor ;
here->HSMHV2_dRd_dTi = Rd_dT / Mfactor ;
here->HSMHV2_dRd_dVds = Rd_dVds / Mfactor ;
here->HSMHV2_dRd_dVgs = Rd_dVgs / Mfactor ;
here->HSMHV2_dRd_dVbs = Rd_dVbs / Mfactor ;
}
return ( HiSIM_OK ) ;
}

View File

@ -0,0 +1,142 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvevalenv.h
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#ifndef HSMHV2_EVAL_ENV_H
#define HSMHV2_EVAL_ENV_H
/* macros and constants used in hsmhveval2yz.c */
/*---------------------------------------------------*
* Numerical constants. (macro)
*-----------------*/
/* machine epsilon */
#if defined(_FLOAT_H) && defined(DBL_EPSILON)
#define C_EPS_M (DBL_EPSILON)
#else
#define C_EPS_M (2.2204460492503131e-16)
#endif
#define MAX_EXP 5.834617425e14
#define MIN_EXP 1.713908431e-15
#define EXP_THR 34.0
/* sqrt(2) */
#define C_SQRT_2 (1.414213562373095e+00)
/* 1/3 */
#define C_1o3 (3.333333333333333e-01)
/* 2/3 */
#define C_2o3 (6.666666666666667e-01)
/* 2^(1/3) */
#define C_2p_1o3 (1.259921049894873e+00)
/* Pi */
#define C_Pi (3.141592653589793)
#define C_Pio2 (1.570796326794897)
/* Unit change */
#define C_m2cm_p2 (1.0e4)
#define C_m2um (1.0e6)
/*---------------------------------------------------*
* Physical constants/properties. (macro)
*-----------------*/
/* Elemental charge */
#define C_QE (1.6021918e-19)
/* Boltzmann constant */
#define C_KB (1.3806226e-23)
/* Permitivity of Si, SiO2 and vacuum */
#define C_ESI (1.034943e-10)
#define C_EOX (3.453133e-11)
#define C_VAC (8.8541878e-12)
/* Room temperature constants */
#define C_T300 (300e+00)
#define C_b300 (3.868283e+01)
/* #define C_Eg0 (1.1785e0) */ /*changed to parameter sIN.eg0*/
/* Build-in potential */
/*#define C_Vbi (1.0e0)*/ /* changed to parameter sIN.vbi */
/* Intrinsic carrier density at 300K */
#define C_Nin0 (1.04e+16)
/*---------------------------------------------------*
* Functions. (macro) Take care of the arguments.
*-----------------*/
#define Fn_Sqr(x) ( (x)*(x) ) /* x^2 */
#define Fn_Max(x,y) ( (x) >= (y) ? (x) : (y) ) /* max[x,y] */
#define Fn_Min(x,y) ( (x) <= (y) ? (x) : (y) ) /* min[x,y] */
#define Fn_Sgn(x) ( (x) >= 0 ? (1) : (-1) ) /* sign[x] */
/*===========================================================*
* pow
*=================*/
#ifdef POW_TO_EXP_AND_LOG
#define Fn_Pow( x , y ) exp( (y) * log( x ) )
#else
#define Fn_Pow( x , y ) pow( x , y )
#endif
#endif /* HSMHV2_EVAL_ENV_H */

View File

@ -0,0 +1,40 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvext.h
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
extern int HSMHV2acLoad(GENmodel *,CKTcircuit*);
extern int HSMHV2ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*);
extern int HSMHV2convTest(GENmodel *,CKTcircuit*);
extern int HSMHV2delete(GENmodel*,IFuid,GENinstance**);
extern void HSMHV2destroy(GENmodel**);
extern int HSMHV2getic(GENmodel*,CKTcircuit*);
extern int HSMHV2load(GENmodel*,CKTcircuit*);
extern int HSMHV2mAsk(CKTcircuit*,GENmodel *,int, IFvalue*);
extern int HSMHV2mDelete(GENmodel**,IFuid,GENmodel*);
extern int HSMHV2mParam(int,IFvalue*,GENmodel*);
extern void HSMHV2mosCap(CKTcircuit*, double, double, double, double*,
double, double, double, double, double, double,
double*, double*, double*, double*, double*, double*, double*, double*,
double*, double*, double*, double*, double*, double*, double*,
double*);
extern int HSMHV2param(int,IFvalue*,GENinstance*,IFvalue*);
extern int HSMHV2pzLoad(GENmodel*,CKTcircuit*,SPcomplex*);
extern int HSMHV2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int HSMHV2unsetup(GENmodel*,CKTcircuit*);
extern int HSMHV2temp(GENmodel*,CKTcircuit*);
extern int HSMHV2trunc(GENmodel*,CKTcircuit*,double*);
extern int HSMHV2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int HSMHV2soaCheck(CKTcircuit *, GENmodel *);

View File

@ -0,0 +1,98 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvgetic.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsmhvdef.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
int HSMHV2getic(
GENmodel *inModel,
CKTcircuit *ckt)
{
HSMHV2model *model = (HSMHV2model*)inModel;
HSMHV2instance *here;
/*
* grab initial conditions out of rhs array. User specified, so use
* external nodes to get values
*/
for ( ;model ;model = model->HSMHV2nextModel ) {
for ( here = model->HSMHV2instances; here ;here = here->HSMHV2nextInstance ) {
if (!here->HSMHV2_icVBS_Given) {
here->HSMHV2_icVBS =
*(ckt->CKTrhs + here->HSMHV2bNode) -
*(ckt->CKTrhs + here->HSMHV2sNode);
}
if (!here->HSMHV2_icVDS_Given) {
here->HSMHV2_icVDS =
*(ckt->CKTrhs + here->HSMHV2dNode) -
*(ckt->CKTrhs + here->HSMHV2sNode);
}
if (!here->HSMHV2_icVGS_Given) {
here->HSMHV2_icVGS =
*(ckt->CKTrhs + here->HSMHV2gNode) -
*(ckt->CKTrhs + here->HSMHV2sNode);
}
}
}
return(OK);
}

View File

@ -0,0 +1,83 @@
#include "ngspice/config.h"
#include "ngspice/devdefs.h"
#include "hsmhvdef.h"
#include "hsmhvitf.h"
#include "hsmhvinit.h"
SPICEdev HSMHV2info = {
{ "HiSIMHV2",
"Hiroshima University STARC IGFET Model - HiSIM_HV v.2",
&HSMHV2nSize,
&HSMHV2nSize,
HSMHV2names,
&HSMHV2pTSize,
HSMHV2pTable,
&HSMHV2mPTSize,
HSMHV2mPTable,
#ifdef XSPICE
/*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
0, /* This is a SPICE device, it has no MIF info data */
NULL, /* This is a SPICE device, it has no MIF info data */
/*--------------------------- End of SDB fix -------------------------*/
#endif
DEV_DEFAULT
},
/* DEVparam */ HSMHV2param,
/* DEVmodParam */ HSMHV2mParam,
/* DEVload */ HSMHV2load,
/* DEVsetup */ HSMHV2setup,
/* DEVunsetup */ HSMHV2unsetup,
/* DEVpzSetup */ HSMHV2setup,
/* DEVtemperature*/ HSMHV2temp,
/* DEVtrunc */ HSMHV2trunc,
/* DEVfindBranch */ NULL,
/* DEVacLoad */ HSMHV2acLoad,
/* DEVaccept */ NULL,
/* DEVdestroy */ HSMHV2destroy,
/* DEVmodDelete */ HSMHV2mDelete,
/* DEVdelete */ HSMHV2delete,
/* DEVsetic */ HSMHV2getic,
/* DEVask */ HSMHV2ask,
/* DEVmodAsk */ HSMHV2mAsk,
/* DEVpzLoad */ HSMHV2pzLoad,
/* DEVconvTest */ HSMHV2convTest,
/* DEVsenSetup */ NULL,
/* DEVsenLoad */ NULL,
/* DEVsenUpdate */ NULL,
/* DEVsenAcLoad */ NULL,
/* DEVsenPrint */ NULL,
/* DEVsenTrunc */ NULL,
/* DEVdisto */ NULL,
/* DEVnoise */ HSMHV2noise,
/* DEVsoaCheck */ HSMHV2soaCheck,
#ifdef CIDER
/* DEVdump */ NULL,
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &HSMHV2iSize,
/* DEVmodSize */ &HSMHV2mSize
};
SPICEdev *
get_hsmhv2_info(void)
{
return &HSMHV2info;
}

View File

@ -0,0 +1,13 @@
#ifndef _HISIMINIT_H
#define _HISIMINIT_H
extern IFparm HSMHV2pTable[ ];
extern IFparm HSMHV2mPTable[ ];
extern char *HSMHV2names[ ];
extern int HSMHV2pTSize;
extern int HSMHV2mPTSize;
extern int HSMHV2nSize;
extern int HSMHV2iSize;
extern int HSMHV2mSize;
#endif

View File

@ -0,0 +1,65 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvitf
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#ifndef DEV_HISIMHV2
#define DEV_HISIMHV2
SPICEdev *get_hsmhv2_info(void);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,165 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.10
FILE : hsmhvld_info_eval.h
DATE : 2014.6.11
recent changes: - 2009.01.09 some bugfixes
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
/* print all outputs ------------VV */
if ( model->HSMHV2_info >= 4 ) {
here->HSMHV2_csdo = - (here->HSMHV2_cddo + here->HSMHV2_cgdo + here->HSMHV2_cbdo) ;
here->HSMHV2_csgo = - (here->HSMHV2_cdgo + here->HSMHV2_cggo + here->HSMHV2_cbgo) ;
here->HSMHV2_csbo = - (here->HSMHV2_cdbo + here->HSMHV2_cgbo + here->HSMHV2_cbbo) ;
here->HSMHV2_cdso = - (here->HSMHV2_cddo + here->HSMHV2_cdgo + here->HSMHV2_cdbo) ;
here->HSMHV2_cgso = - (here->HSMHV2_cgdo + here->HSMHV2_cggo + here->HSMHV2_cgbo) ;
here->HSMHV2_csso = - (here->HSMHV2_csdo + here->HSMHV2_csgo + here->HSMHV2_csbo) ;
cgdb = dQg_dVds - ((here->HSMHV2_mode > 0) ? here->HSMHV2_cgdo : here->HSMHV2_cgso) ;
cggb = dQg_dVgs - here->HSMHV2_cggo ;
cgsb = - (dQg_dVds + dQg_dVgs + dQg_dVbs) - ((here->HSMHV2_mode > 0) ? here->HSMHV2_cgso : here->HSMHV2_cgdo) ;
cbdb = dQb_dVds - ((here->HSMHV2_mode > 0) ? here->HSMHV2_cbdo :
-(here->HSMHV2_cbdo+here->HSMHV2_cbgo+here->HSMHV2_cbbo)) ;
cbgb = dQb_dVgs - here->HSMHV2_cbgo ;
cbsb = - (dQb_dVds + dQb_dVgs + dQb_dVbs) - ((here->HSMHV2_mode > 0) ? -(here->HSMHV2_cbdo+here->HSMHV2_cbgo+here->HSMHV2_cbbo)
: here->HSMHV2_cbdo) ;
cddb = dQd_dVds - ((here->HSMHV2_mode > 0) ? here->HSMHV2_cddo : here->HSMHV2_csso) ;
cdgb = dQd_dVgs - ((here->HSMHV2_mode > 0) ? here->HSMHV2_cdgo : here->HSMHV2_csgo) ;
cdsb = - (dQd_dVds + dQd_dVgs + dQd_dVbs) - ((here->HSMHV2_mode > 0) ? here->HSMHV2_cdso : here->HSMHV2_csdo) ;
if (flg_nqs) {
/* by implicit differentiation of the nqs equations: */
dQi_nqs_dVds = (dQi_dVds + Iqi_nqs * dtau_dVds )/(1.0 + ag0 * tau ) ;
dQi_nqs_dVgs = (dQi_dVgs + Iqi_nqs * dtau_dVgs )/(1.0 + ag0 * tau ) ;
dQi_nqs_dVbs = (dQi_dVbs + Iqi_nqs * dtau_dVbs )/(1.0 + ag0 * tau ) ;
dQb_nqs_dVds = (dQbulk_dVds + Iqb_nqs * dtaub_dVds)/(1.0 + ag0 * taub) ;
dQb_nqs_dVgs = (dQbulk_dVgs + Iqb_nqs * dtaub_dVgs)/(1.0 + ag0 * taub) ;
dQb_nqs_dVbs = (dQbulk_dVbs + Iqb_nqs * dtaub_dVbs)/(1.0 + ag0 * taub) ;
cgdb_nqs = dQg_nqs_dQi_nqs * dQi_nqs_dVds + dQg_nqs_dQb_nqs * dQb_nqs_dVds ;
cggb_nqs = dQg_nqs_dQi_nqs * dQi_nqs_dVgs + dQg_nqs_dQb_nqs * dQb_nqs_dVgs ;
cgsb_nqs = - dQg_nqs_dQi_nqs * (dQi_nqs_dVds + dQi_nqs_dVgs + dQi_nqs_dVbs)
- dQg_nqs_dQb_nqs * (dQb_nqs_dVds + dQb_nqs_dVgs + dQb_nqs_dVbs) ;
cbdb_nqs = dQb_nqs_dVds ;
cbgb_nqs = dQb_nqs_dVgs ;
cbsb_nqs = -(dQb_nqs_dVds + dQb_nqs_dVgs + dQb_nqs_dVbs) ;
cddb_nqs = dQd_nqs_dVds + dQd_nqs_dQi_nqs * dQi_nqs_dVds ;
cdgb_nqs= dQd_nqs_dVgs + dQd_nqs_dQi_nqs * dQi_nqs_dVgs ;
cdsb_nqs= -(dQd_nqs_dVds + dQd_nqs_dVgs + dQd_nqs_dVbs) - dQd_nqs_dQi_nqs * (dQi_nqs_dVds + dQi_nqs_dVgs + dQi_nqs_dVbs) ;
} else {
cgdb_nqs = cggb_nqs = cgsb_nqs = cbdb_nqs = cbgb_nqs = cbsb_nqs = cddb_nqs = cdgb_nqs = cdsb_nqs = 0.0 ;
}
printf( "--- variables returned from HSMHV2evaluate() ----\n" ) ;
printf( "von = %12.5e\n" , here->HSMHV2_von ) ;
printf( "vdsat = %12.5e\n" , here->HSMHV2_vdsat ) ;
printf( "ids = %12.5e\n" , here->HSMHV2_ids ) ;
printf( "gds = %12.5e\n" , here->HSMHV2_dIds_dVdsi ) ;
printf( "gm = %12.5e\n" , here->HSMHV2_dIds_dVgsi ) ;
printf( "gmbs = %12.5e\n" , here->HSMHV2_dIds_dVbsi ) ;
printf( "cggo = %12.5e\n" , here->HSMHV2_cggo ) ;
printf( "cgdo = %12.5e\n" , (here->HSMHV2_mode > 0) ? here->HSMHV2_cgdo : here->HSMHV2_cgso ) ;
printf( "cgso = %12.5e\n" , (here->HSMHV2_mode > 0) ? here->HSMHV2_cgso : here->HSMHV2_cgdo ) ;
printf( "cdgo = %12.5e\n" , (here->HSMHV2_mode > 0) ? here->HSMHV2_cdgo : here->HSMHV2_csgo ) ;
printf( "cddo = %12.5e\n" , (here->HSMHV2_mode > 0) ? here->HSMHV2_cddo : here->HSMHV2_csso ) ;
printf( "cdso = %12.5e\n" , (here->HSMHV2_mode > 0) ? here->HSMHV2_cdso : here->HSMHV2_csdo ) ;
printf( "csgo = %12.5e\n" , (here->HSMHV2_mode > 0) ? here->HSMHV2_csgo : here->HSMHV2_cdgo ) ;
printf( "csdo = %12.5e\n" , (here->HSMHV2_mode > 0) ? here->HSMHV2_csdo : here->HSMHV2_cdso ) ;
printf( "csso = %12.5e\n" , (here->HSMHV2_mode > 0) ? here->HSMHV2_csso : here->HSMHV2_cddo ) ;
printf( "qg = %12.5e\n" , Qg + Qg_nqs) ;
printf( "qd = %12.5e\n" , Qd + Qd_nqs) ;
printf( "qs = %12.5e\n" , Qs + Qs_nqs) ;
printf( "cggb = %12.5e\n" , cggb + cggb_nqs ) ;
printf( "cgsb = %12.5e\n" , cgsb + cgsb_nqs ) ;
printf( "cgdb = %12.5e\n" , cgdb + cgdb_nqs ) ;
printf( "cbgb = %12.5e\n" , cbgb + cbgb_nqs ) ;
printf( "cbsb = %12.5e\n" , cbsb + cbsb_nqs ) ;
printf( "cbdb = %12.5e\n" , cbdb + cbdb_nqs ) ;
printf( "cdgb = %12.5e\n" , cdgb + cdgb_nqs ) ;
printf( "cdsb = %12.5e\n" , cdsb + cdsb_nqs ) ;
printf( "cddb = %12.5e\n" , cddb + cddb_nqs ) ;
printf( "ibd = %12.5e\n" , Ibd ) ;
printf( "ibs = %12.5e\n" , Ibs ) ;
printf( "gbd = %12.5e\n" , Gbd ) ;
printf( "gbs = %12.5e\n" , Gbs ) ;
printf( "capbd = %12.5e\n" , Cbd ) ;
printf( "capbs = %12.5e\n" , Cbs ) ;
printf( "qbd = %12.5e\n" , Qbd ) ;
printf( "qbs = %12.5e\n" , Qbs ) ;
printf( "isub = %12.5e\n" , here->HSMHV2_isub ) ;
printf( "gbgs = %12.5e\n" , dIsub_dVgs + dIsubs_dVgs ) ;
printf( "gbds = %12.5e\n" , dIsub_dVds + dIsubs_dVds ) ;
printf( "gbbs = %12.5e\n" , dIsub_dVbs + dIsubs_dVbs ) ;
printf( "S_flicker_noise * ( freq / gain ) = %.16e\n" , here->HSMHV2_noiflick ) ;
printf( "S_thermal_noise / ( gain * 4kT ) = %.16e\n" , here->HSMHV2_noithrml ) ;
printf( "S_induced_gate_noise / ( gain * freq^2 ) = %.16e\n" , here->HSMHV2_noiigate ) ;
printf( "cross-correlation coefficient (= Sigid/sqrt(Sig*Sid) ) = %.16e\n" , here->HSMHV2_noicross ) ;
/* print Surface Potentials */
/* printf( "ivds %e ivgs %e ivbs %e Ps0 %.16e Pds %.16e\n" , */
/* ivds, ivgs, ivbs, here->HSMHV2_ps0_prv, here->HSMHV2_pds_prv ) ; */
}
/* print all outputs ------------AA */
/* End of HSMHV2ld_info_eval.h */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,95 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvmdel.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsmhvdef.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
int HSMHV2mDelete(
GENmodel **inModel,
IFuid modname,
GENmodel *kill)
{
HSMHV2model **model = (HSMHV2model**)inModel;
HSMHV2model *modfast = (HSMHV2model*)kill;
HSMHV2instance *here;
HSMHV2instance *prev = NULL;
HSMHV2model **oldmod;
oldmod = model;
for ( ;*model ;model = &((*model)->HSMHV2nextModel) ) {
if ( (*model)->HSMHV2modName == modname ||
(modfast && *model == modfast) ) goto delgot;
oldmod = model;
}
return(E_NOMOD);
delgot:
*oldmod = (*model)->HSMHV2nextModel; /* cut deleted device out of list */
for ( here = (*model)->HSMHV2instances ;
here ;here = here->HSMHV2nextInstance ) {
if (prev) FREE(prev);
prev = here;
}
if (prev) FREE(prev);
FREE(*model);
return(OK);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,315 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvnoi.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsmhvdef.h"
#include "ngspice/cktdefs.h"
#include "ngspice/iferrmsg.h"
#include "ngspice/noisedef.h"
#include "ngspice/suffix.h"
#include "ngspice/const.h" /* jwan */
#include "hsmhvevalenv.h"
/* #include "hsmhvmacro.h" */
/*
* HSMHV2noise (mode, operation, firstModel, ckt, data, OnDens)
* This routine names and evaluates all of the noise sources
* associated with MOSFET's. It starts with the model *firstModel and
* traverses all of its insts. It then proceeds to any other models
* on the linked list. The total output noise density generated by
* all of the MOSFET's is summed with the variable "OnDens".
*/
int HSMHV2noise (
int mode, int operation,
GENmodel *inModel,
CKTcircuit *ckt,
Ndata *data,
double *OnDens)
{
HSMHV2model *model = (HSMHV2model *)inModel;
HSMHV2instance *here;
char name[N_MXVLNTH];
double tempOnoise=0.0 ;
double tempInoise=0.0 ;
double noizDens[HSMHV2NSRCS] ;
double lnNdens[HSMHV2NSRCS] ;
int i;
double G =0.0 ;
double TTEMP = 0.0 ;
/* define the names of the noise sources */
static char * HSMHV2nNames[HSMHV2NSRCS] = {
/* Note that we have to keep the order
consistent with the index definitions
in hsmhvdefs.h */
".rd", /* noise due to rd */
".rs", /* noise due to rs */
".id", /* noise due to id */
".1ovf", /* flicker (1/f) noise */
".ign", /* induced gate noise component at the drain node */
"" /* total transistor noise */
};
for ( ;model != NULL; model = model->HSMHV2nextModel ) {
for ( here = model->HSMHV2instances; here != NULL;
here = here->HSMHV2nextInstance ) {
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 < HSMHV2NSRCS; i++ ) {
(void) sprintf(name, "onoise.%s%s",
(char *)here->HSMHV2name, HSMHV2nNames[i]);
data->namelist =
(IFuid *) trealloc((char *) data->namelist,
((long unsigned int)data->numPlots + 1) * sizeof(IFuid));
if (!data->namelist)
return(E_NOMEM);
(*(SPfrontEnd->IFnewUid))
(ckt, &(data->namelist[data->numPlots++]),
(IFuid) NULL, name, UID_OTHER, NULL);
}
break;
case INT_NOIZ:
for ( i = 0; i < HSMHV2NSRCS; i++ ) {
(void) sprintf(name, "onoise_total.%s%s",
(char *)here->HSMHV2name, HSMHV2nNames[i]);
data->namelist =
(IFuid *) trealloc((char *) data->namelist,
((long unsigned int)data->numPlots + 1) * sizeof(IFuid));
if (!data->namelist)
return(E_NOMEM);
(*(SPfrontEnd->IFnewUid))
(ckt, &(data->namelist[data->numPlots++]),
(IFuid) NULL, name, UID_OTHER, NULL);
(void) sprintf(name, "inoise_total.%s%s",
(char *)here->HSMHV2name, HSMHV2nNames[i]);
data->namelist =
(IFuid *) trealloc((char *) data->namelist,
((long unsigned int)data->numPlots + 1) * sizeof(IFuid));
if (!data->namelist)
return(E_NOMEM);
(*(SPfrontEnd->IFnewUid))
(ckt, &(data->namelist[data->numPlots++]),
(IFuid) NULL, name, UID_OTHER, NULL);
}
break;
}
}
break;
case N_CALC:
switch (mode) {
case N_DENS:
/* temperature */
TTEMP = ckt->CKTtemp;
if ( here->HSMHV2_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV2_dtemp ; }
TTEMP = TTEMP + *(ckt->CKTstate0 + here->HSMHV2deltemp) ;
/* rs/rd thermal noise */
if ( model->HSMHV2_corsrd == 1 || model->HSMHV2_corsrd == 3 || model->HSMHV2_cordrift == 1 ) {
NevalSrc(&noizDens[HSMHV2RDNOIZ], (double*) NULL,
ckt, N_GAIN,
here->HSMHV2dNodePrime, here->HSMHV2dNode,
(double) 0.0);
noizDens[HSMHV2RDNOIZ] *= 4 * C_KB * TTEMP * here->HSMHV2drainConductance ;
lnNdens[HSMHV2RDNOIZ] = log( MAX(noizDens[HSMHV2RDNOIZ],N_MINLOG) );
NevalSrc(&noizDens[HSMHV2RSNOIZ], (double*) NULL,
ckt, N_GAIN,
here->HSMHV2sNodePrime, here->HSMHV2sNode,
(double) 0.0);
noizDens[HSMHV2RSNOIZ] *= 4 * C_KB * TTEMP * here->HSMHV2sourceConductance ;
lnNdens[HSMHV2RSNOIZ] = log( MAX(noizDens[HSMHV2RSNOIZ],N_MINLOG) );
} else {
noizDens[HSMHV2RDNOIZ] = 0e0 ;
lnNdens[HSMHV2RDNOIZ] = N_MINLOG ;
noizDens[HSMHV2RSNOIZ] = 0e0 ;
lnNdens[HSMHV2RSNOIZ] = N_MINLOG ;
}
/* channel thermal noise */
NevalSrc(&noizDens[HSMHV2IDNOIZ], (double*) NULL,
ckt, N_GAIN,
here->HSMHV2dNodePrime, here->HSMHV2sNodePrime,
(double) 0.0);
switch( model->HSMHV2_noise ) {
case 1:
/* HiSIMHV model */
G = here->HSMHV2_noithrml ;
noizDens[HSMHV2IDNOIZ] *= 4 * C_KB * TTEMP * G ;
lnNdens[HSMHV2IDNOIZ] = log( MAX(noizDens[HSMHV2IDNOIZ],N_MINLOG) );
break;
}
/* flicker noise */
NevalSrc(&noizDens[HSMHV2FLNOIZ], (double*) NULL,
ckt, N_GAIN,
here->HSMHV2dNodePrime, here->HSMHV2sNodePrime,
(double) 0.0);
switch ( model->HSMHV2_noise ) {
case 1:
/* HiSIM model */
noizDens[HSMHV2FLNOIZ] *= here->HSMHV2_noiflick / pow(data->freq, model->HSMHV2_falph) ;
lnNdens[HSMHV2FLNOIZ] = log(MAX(noizDens[HSMHV2FLNOIZ], N_MINLOG));
break;
}
/* induced gate noise */
NevalSrc(&noizDens[HSMHV2IGNOIZ], (double*) NULL,
ckt, N_GAIN,
here->HSMHV2dNodePrime, here->HSMHV2sNodePrime,
(double) 0.0);
switch ( model->HSMHV2_noise ) {
case 1:
/* HiSIM model */
noizDens[HSMHV2IGNOIZ] *= here->HSMHV2_noiigate * here->HSMHV2_noicross * here->HSMHV2_noicross * data->freq * data->freq;
lnNdens[HSMHV2IGNOIZ] = log(MAX(noizDens[HSMHV2IGNOIZ], N_MINLOG));
break;
}
/* total */
noizDens[HSMHV2TOTNOIZ] = noizDens[HSMHV2RDNOIZ] + noizDens[HSMHV2RSNOIZ]
+ noizDens[HSMHV2IDNOIZ] + noizDens[HSMHV2FLNOIZ] + noizDens[HSMHV2IGNOIZ];
lnNdens[HSMHV2TOTNOIZ] = log(MAX(noizDens[HSMHV2TOTNOIZ], N_MINLOG));
*OnDens += noizDens[HSMHV2TOTNOIZ];
if ( data->delFreq == 0.0 ) {
/* if we haven't done any previous
integration, we need to initialize our
"history" variables.
*/
for ( i = 0; i < HSMHV2NSRCS; i++ )
here->HSMHV2nVar[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 < HSMHV2NSRCS; i++) {
here->HSMHV2nVar[OUTNOIZ][i] = 0.0;
here->HSMHV2nVar[INNOIZ][i] = 0.0;
}
}
}
else {
/* data->delFreq != 0.0,
we have to integrate.
*/
for ( i = 0; i < HSMHV2NSRCS; i++ ) {
if ( i != HSMHV2TOTNOIZ ) {
tempOnoise =
Nintegrate(noizDens[i], lnNdens[i],
here->HSMHV2nVar[LNLSTDENS][i], data);
tempInoise =
Nintegrate(noizDens[i] * data->GainSqInv,
lnNdens[i] + data->lnGainInv,
here->HSMHV2nVar[LNLSTDENS][i] + data->lnGainInv,
data);
here->HSMHV2nVar[LNLSTDENS][i] = lnNdens[i];
data->outNoiz += tempOnoise;
data->inNoise += tempInoise;
if ( ((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0 ) {
here->HSMHV2nVar[OUTNOIZ][i] += tempOnoise;
here->HSMHV2nVar[OUTNOIZ][HSMHV2TOTNOIZ] += tempOnoise;
here->HSMHV2nVar[INNOIZ][i] += tempInoise;
here->HSMHV2nVar[INNOIZ][HSMHV2TOTNOIZ] += tempInoise;
}
}
}
}
if ( data->prtSummary ) {
for (i = 0; i < HSMHV2NSRCS; 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 < HSMHV2NSRCS; i++ ) {
data->outpVector[data->outNumber++] = here->HSMHV2nVar[OUTNOIZ][i];
data->outpVector[data->outNumber++] = here->HSMHV2nVar[INNOIZ][i];
}
}
break;
}
break;
case N_CLOSE:
/* do nothing, the main calling routine will close */
return (OK);
break; /* the plots */
} /* switch (operation) */
} /* for here */
} /* for model */
return(OK);
}

View File

@ -0,0 +1,262 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvpar.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/ifsim.h"
#include "hsmhvdef.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int HSMHV2param(
int param,
IFvalue *value,
GENinstance *inst,
IFvalue *select)
{
double scale;
HSMHV2instance *here = (HSMHV2instance*)inst;
NG_IGNORE(select);
if (!cp_getvar("scale", CP_REAL, &scale))
scale = 1;
switch (param) {
case HSMHV2_COSELFHEAT:
here->HSMHV2_coselfheat = value->iValue;
here->HSMHV2_coselfheat_Given = TRUE;
break;
case HSMHV2_COSUBNODE:
here->HSMHV2_cosubnode = value->iValue;
here->HSMHV2_cosubnode_Given = TRUE;
break;
case HSMHV2_W:
here->HSMHV2_w = value->rValue * scale;
here->HSMHV2_w_Given = TRUE;
break;
case HSMHV2_L:
here->HSMHV2_l = value->rValue * scale;
here->HSMHV2_l_Given = TRUE;
break;
case HSMHV2_AS:
here->HSMHV2_as = value->rValue * scale * scale;
here->HSMHV2_as_Given = TRUE;
break;
case HSMHV2_AD:
here->HSMHV2_ad = value->rValue * scale * scale;
here->HSMHV2_ad_Given = TRUE;
break;
case HSMHV2_PS:
here->HSMHV2_ps = value->rValue * scale;
here->HSMHV2_ps_Given = TRUE;
break;
case HSMHV2_PD:
here->HSMHV2_pd = value->rValue * scale;
here->HSMHV2_pd_Given = TRUE;
break;
case HSMHV2_NRS:
here->HSMHV2_nrs = value->rValue;
here->HSMHV2_nrs_Given = TRUE;
break;
case HSMHV2_NRD:
here->HSMHV2_nrd = value->rValue;
here->HSMHV2_nrd_Given = TRUE;
break;
case HSMHV2_DTEMP:
here->HSMHV2_dtemp = value->rValue;
here->HSMHV2_dtemp_Given = TRUE;
break;
case HSMHV2_OFF:
here->HSMHV2_off = value->iValue;
break;
case HSMHV2_IC_VBS:
here->HSMHV2_icVBS = value->rValue;
here->HSMHV2_icVBS_Given = TRUE;
break;
case HSMHV2_IC_VDS:
here->HSMHV2_icVDS = value->rValue;
here->HSMHV2_icVDS_Given = TRUE;
break;
case HSMHV2_IC_VGS:
here->HSMHV2_icVGS = value->rValue;
here->HSMHV2_icVGS_Given = TRUE;
break;
case HSMHV2_IC:
switch (value->v.numValue) {
case 3:
here->HSMHV2_icVBS = *(value->v.vec.rVec + 2);
here->HSMHV2_icVBS_Given = TRUE;
case 2:
here->HSMHV2_icVGS = *(value->v.vec.rVec + 1);
here->HSMHV2_icVGS_Given = TRUE;
case 1:
here->HSMHV2_icVDS = *(value->v.vec.rVec);
here->HSMHV2_icVDS_Given = TRUE;
break;
default:
return(E_BADPARM);
}
break;
case HSMHV2_CORBNET:
here->HSMHV2_corbnet = value->iValue;
here->HSMHV2_corbnet_Given = TRUE;
break;
case HSMHV2_RBPB:
here->HSMHV2_rbpb = value->rValue;
here->HSMHV2_rbpb_Given = TRUE;
break;
case HSMHV2_RBPD:
here->HSMHV2_rbpd = value->rValue;
here->HSMHV2_rbpd_Given = TRUE;
break;
case HSMHV2_RBPS:
here->HSMHV2_rbps = value->rValue;
here->HSMHV2_rbps_Given = TRUE;
break;
case HSMHV2_RBDB:
here->HSMHV2_rbdb = value->rValue;
here->HSMHV2_rbdb_Given = TRUE;
break;
case HSMHV2_RBSB:
here->HSMHV2_rbsb = value->rValue;
here->HSMHV2_rbsb_Given = TRUE;
break;
case HSMHV2_CORG:
here->HSMHV2_corg = value->iValue;
here->HSMHV2_corg_Given = TRUE;
break;
case HSMHV2_NGCON:
here->HSMHV2_ngcon = value->rValue;
here->HSMHV2_ngcon_Given = TRUE;
break;
case HSMHV2_XGW:
here->HSMHV2_xgw = value->rValue;
here->HSMHV2_xgw_Given = TRUE;
break;
case HSMHV2_XGL:
here->HSMHV2_xgl = value->rValue;
here->HSMHV2_xgl_Given = TRUE;
break;
case HSMHV2_NF:
here->HSMHV2_nf = value->rValue;
here->HSMHV2_nf_Given = TRUE;
break;
case HSMHV2_SA:
here->HSMHV2_sa = value->rValue;
here->HSMHV2_sa_Given = TRUE;
break;
case HSMHV2_SB:
here->HSMHV2_sb = value->rValue;
here->HSMHV2_sb_Given = TRUE;
break;
case HSMHV2_SD:
here->HSMHV2_sd = value->rValue;
here->HSMHV2_sd_Given = TRUE;
break;
case HSMHV2_NSUBCDFM:
here->HSMHV2_nsubcdfm = value->rValue;
here->HSMHV2_nsubcdfm_Given = TRUE;
break;
case HSMHV2_M:
here->HSMHV2_m = value->rValue;
here->HSMHV2_m_Given = TRUE;
break;
case HSMHV2_SUBLD1:
here->HSMHV2_subld1 = value->rValue;
here->HSMHV2_subld1_Given = TRUE;
break;
case HSMHV2_SUBLD2:
here->HSMHV2_subld2 = value->rValue;
here->HSMHV2_subld2_Given = TRUE;
break;
case HSMHV2_LOVER:
here->HSMHV2_lover = value->rValue;
here->HSMHV2_lover_Given = TRUE;
break;
case HSMHV2_LOVERS:
here->HSMHV2_lovers = value->rValue;
here->HSMHV2_lovers_Given = TRUE;
break;
case HSMHV2_LOVERLD:
here->HSMHV2_loverld = value->rValue;
here->HSMHV2_loverld_Given = TRUE;
break;
case HSMHV2_LDRIFT1:
here->HSMHV2_ldrift1 = value->rValue;
here->HSMHV2_ldrift1_Given = TRUE;
break;
case HSMHV2_LDRIFT2:
here->HSMHV2_ldrift2 = value->rValue;
here->HSMHV2_ldrift2_Given = TRUE;
break;
case HSMHV2_LDRIFT1S:
here->HSMHV2_ldrift1s = value->rValue;
here->HSMHV2_ldrift1s_Given = TRUE;
break;
case HSMHV2_LDRIFT2S:
here->HSMHV2_ldrift2s = value->rValue;
here->HSMHV2_ldrift2s_Given = TRUE;
break;
default:
return(E_BADPARM);
}
return(OK);
}

View File

@ -0,0 +1,323 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvpzld.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "ngspice/complex.h"
#include "ngspice/sperror.h"
#include "hsmhvdef.h"
#include "ngspice/suffix.h"
int HSMHV2pzLoad(
GENmodel *inModel,
CKTcircuit *ckt,
SPcomplex *s)
{
HSMHV2model *model = (HSMHV2model*)inModel;
HSMHV2instance *here;
int flg_nqs =0 ;
NG_IGNORE(ckt);
#define dNode 0
#define dNodePrime 1
#define gNode 2
#define gNodePrime 3
#define sNode 4
#define sNodePrime 5
#define bNodePrime 6
#define bNode 7
#define dbNode 8
#define sbNode 9
#define tempNode 10
#define qiNode 11
#define qbNode 12
for ( ;model != NULL ;model = model->HSMHV2nextModel ) {
for ( here = model->HSMHV2instances ;here!= NULL ;
here = here->HSMHV2nextInstance ) {
flg_nqs = model->HSMHV2_conqs ;
/* stamp matrix */
/*drain*/
*(here->HSMHV2DdPtr) += here->HSMHV2_ydc_d[dNode] + here->HSMHV2_ydyn_d[dNode] * s->real;
*(here->HSMHV2DdPtr +1) += here->HSMHV2_ydyn_d[dNode] * s->imag;
*(here->HSMHV2DdpPtr) += here->HSMHV2_ydc_d[dNodePrime] + here->HSMHV2_ydyn_d[dNodePrime] * s->real;
*(here->HSMHV2DdpPtr +1) += here->HSMHV2_ydyn_d[dNodePrime] * s->imag;
*(here->HSMHV2DgpPtr) += here->HSMHV2_ydc_d[gNodePrime] + here->HSMHV2_ydyn_d[gNodePrime] * s->real;
*(here->HSMHV2DgpPtr +1) += here->HSMHV2_ydyn_d[gNodePrime] * s->imag;
*(here->HSMHV2DsPtr) += here->HSMHV2_ydc_d[sNode] + here->HSMHV2_ydyn_d[sNode] * s->real;
*(here->HSMHV2DsPtr +1) += here->HSMHV2_ydyn_d[sNode] * s->imag;
*(here->HSMHV2DbpPtr) += here->HSMHV2_ydc_d[bNodePrime] + here->HSMHV2_ydyn_d[bNodePrime] * s->real;
*(here->HSMHV2DbpPtr +1) += here->HSMHV2_ydyn_d[bNodePrime] * s->imag;
*(here->HSMHV2DdbPtr) += here->HSMHV2_ydc_d[dbNode] + here->HSMHV2_ydyn_d[dbNode] * s->real;
*(here->HSMHV2DdbPtr +1) += here->HSMHV2_ydyn_d[dbNode] * s->imag;
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2DtempPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_d[tempNode] + here->HSMHV2_ydyn_d[tempNode] * s->real);
*(here->HSMHV2DtempPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_d[tempNode] * s->imag;
}
/*drain prime*/
*(here->HSMHV2DPdPtr) += here->HSMHV2_ydc_dP[dNode] + here->HSMHV2_ydyn_dP[dNode] * s->real;
*(here->HSMHV2DPdPtr +1) += here->HSMHV2_ydyn_dP[dNode] * s->imag;
*(here->HSMHV2DPdpPtr) += here->HSMHV2_ydc_dP[dNodePrime] + here->HSMHV2_ydyn_dP[dNodePrime] * s->real;
*(here->HSMHV2DPdpPtr +1) += here->HSMHV2_ydyn_dP[dNodePrime] * s->imag;
*(here->HSMHV2DPgpPtr) += here->HSMHV2_ydc_dP[gNodePrime] + here->HSMHV2_ydyn_dP[gNodePrime] * s->real;
*(here->HSMHV2DPgpPtr +1) += here->HSMHV2_ydyn_dP[gNodePrime] * s->imag;
*(here->HSMHV2DPsPtr) += here->HSMHV2_ydc_dP[sNode] + here->HSMHV2_ydyn_dP[sNode] * s->real;
*(here->HSMHV2DPsPtr +1) += here->HSMHV2_ydyn_dP[sNode] * s->imag;
*(here->HSMHV2DPspPtr) += here->HSMHV2_ydc_dP[sNodePrime] + here->HSMHV2_ydyn_dP[sNodePrime] * s->real;
*(here->HSMHV2DPspPtr +1) += here->HSMHV2_ydyn_dP[sNodePrime] * s->imag;
*(here->HSMHV2DPbpPtr) += here->HSMHV2_ydc_dP[bNodePrime] + here->HSMHV2_ydyn_dP[bNodePrime] * s->real;
*(here->HSMHV2DPbpPtr +1) += here->HSMHV2_ydyn_dP[bNodePrime] * s->imag;
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2DPtempPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_dP[tempNode] + here->HSMHV2_ydyn_dP[tempNode] * s->real);
*(here->HSMHV2DPtempPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_dP[tempNode] * s->imag;
}
if (flg_nqs) {
*(here->HSMHV2DPqiPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_dP[qiNode] + here->HSMHV2_ydyn_dP[qiNode] * s->real);
*(here->HSMHV2DPqiPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_dP[qiNode] * s->imag;
}
/*gate*/
*(here->HSMHV2GgPtr) += here->HSMHV2_ydc_g[gNode] + here->HSMHV2_ydyn_g[gNode] * s->real;
*(here->HSMHV2GgPtr +1) += here->HSMHV2_ydyn_g[gNode] * s->imag;
*(here->HSMHV2GgpPtr) += here->HSMHV2_ydc_g[gNodePrime] + here->HSMHV2_ydyn_g[gNodePrime] * s->real;
*(here->HSMHV2GgpPtr +1) += here->HSMHV2_ydyn_g[gNodePrime] * s->imag;
/*gate prime*/
*(here->HSMHV2GPdPtr) += here->HSMHV2_ydc_gP[dNode] + here->HSMHV2_ydyn_gP[dNode] * s->real;
*(here->HSMHV2GPdPtr +1) += here->HSMHV2_ydyn_gP[dNode] * s->imag;
*(here->HSMHV2GPdpPtr) += here->HSMHV2_ydc_gP[dNodePrime] + here->HSMHV2_ydyn_gP[dNodePrime] * s->real;
*(here->HSMHV2GPdpPtr +1) += here->HSMHV2_ydyn_gP[dNodePrime] * s->imag;
*(here->HSMHV2GPgPtr) += here->HSMHV2_ydc_gP[gNode] + here->HSMHV2_ydyn_gP[gNode] * s->real;
*(here->HSMHV2GPgPtr +1) += here->HSMHV2_ydyn_gP[gNode] * s->imag;
*(here->HSMHV2GPgpPtr) += here->HSMHV2_ydc_gP[gNodePrime] + here->HSMHV2_ydyn_gP[gNodePrime] * s->real;
*(here->HSMHV2GPgpPtr +1) += here->HSMHV2_ydyn_gP[gNodePrime] * s->imag;
*(here->HSMHV2GPsPtr) += here->HSMHV2_ydc_gP[sNode] + here->HSMHV2_ydyn_gP[sNode] * s->real;
*(here->HSMHV2GPsPtr +1) += here->HSMHV2_ydyn_gP[sNode] * s->imag;
*(here->HSMHV2GPspPtr) += here->HSMHV2_ydc_gP[sNodePrime] + here->HSMHV2_ydyn_gP[sNodePrime] * s->real;
*(here->HSMHV2GPspPtr +1) += here->HSMHV2_ydyn_gP[sNodePrime] * s->imag;
*(here->HSMHV2GPbpPtr) += here->HSMHV2_ydc_gP[bNodePrime] + here->HSMHV2_ydyn_gP[bNodePrime] * s->real;
*(here->HSMHV2GPbpPtr +1) += here->HSMHV2_ydyn_gP[bNodePrime] * s->imag;
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2GPtempPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_gP[tempNode] + here->HSMHV2_ydyn_gP[tempNode] * s->real);
*(here->HSMHV2GPtempPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_gP[tempNode] * s->imag;
}
if (flg_nqs) {
*(here->HSMHV2GPqiPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_gP[qiNode] + here->HSMHV2_ydyn_gP[qiNode] * s->real);
*(here->HSMHV2GPqiPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_gP[qiNode] * s->imag;
*(here->HSMHV2GPqbPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_gP[qbNode] + here->HSMHV2_ydyn_gP[qbNode] * s->real);
*(here->HSMHV2GPqbPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_gP[qbNode] * s->imag;
}
/*source*/
*(here->HSMHV2SdPtr) += here->HSMHV2_ydc_s[dNode] + here->HSMHV2_ydyn_s[dNode] * s->real;
*(here->HSMHV2SdPtr +1) += here->HSMHV2_ydyn_s[dNode] * s->imag;
*(here->HSMHV2SgpPtr) += here->HSMHV2_ydc_s[gNodePrime] + here->HSMHV2_ydyn_s[gNodePrime] * s->real;
*(here->HSMHV2SgpPtr +1) += here->HSMHV2_ydyn_s[gNodePrime] * s->imag;
*(here->HSMHV2SsPtr) += here->HSMHV2_ydc_s[sNode] + here->HSMHV2_ydyn_s[sNode] * s->real;
*(here->HSMHV2SsPtr +1) += here->HSMHV2_ydyn_s[sNode] * s->imag;
*(here->HSMHV2SspPtr) += here->HSMHV2_ydc_s[sNodePrime] + here->HSMHV2_ydyn_s[sNodePrime] * s->real;
*(here->HSMHV2SspPtr +1) += here->HSMHV2_ydyn_s[sNodePrime] * s->imag;
*(here->HSMHV2SbpPtr) += here->HSMHV2_ydc_s[bNodePrime] + here->HSMHV2_ydyn_s[bNodePrime] * s->real;
*(here->HSMHV2SbpPtr +1) += here->HSMHV2_ydyn_s[bNodePrime] * s->imag;
*(here->HSMHV2SsbPtr) += here->HSMHV2_ydc_s[sbNode] + here->HSMHV2_ydyn_s[sbNode] * s->real;
*(here->HSMHV2SsbPtr +1) += here->HSMHV2_ydyn_s[sbNode] * s->imag;
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2StempPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_s[tempNode] + here->HSMHV2_ydyn_s[tempNode] * s->real);
*(here->HSMHV2StempPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_s[tempNode] * s->imag;
}
/*source prime*/
*(here->HSMHV2SPdPtr) += here->HSMHV2_ydc_sP[dNode] + here->HSMHV2_ydyn_sP[dNode] * s->real;
*(here->HSMHV2SPdPtr +1) += here->HSMHV2_ydyn_sP[dNode] * s->imag;
*(here->HSMHV2SPdpPtr) += here->HSMHV2_ydc_sP[dNodePrime] + here->HSMHV2_ydyn_sP[dNodePrime] * s->real;
*(here->HSMHV2SPdpPtr +1) += here->HSMHV2_ydyn_sP[dNodePrime] * s->imag;
*(here->HSMHV2SPgpPtr) += here->HSMHV2_ydc_sP[gNodePrime] + here->HSMHV2_ydyn_sP[gNodePrime] * s->real;
*(here->HSMHV2SPgpPtr +1) += here->HSMHV2_ydyn_sP[gNodePrime] * s->imag;
*(here->HSMHV2SPsPtr) += here->HSMHV2_ydc_sP[sNode] + here->HSMHV2_ydyn_sP[sNode] * s->real;
*(here->HSMHV2SPsPtr +1) += here->HSMHV2_ydyn_sP[sNode] * s->imag;
*(here->HSMHV2SPspPtr) += here->HSMHV2_ydc_sP[sNodePrime] + here->HSMHV2_ydyn_sP[sNodePrime] * s->real;
*(here->HSMHV2SPspPtr +1) += here->HSMHV2_ydyn_sP[sNodePrime] * s->imag;
*(here->HSMHV2SPbpPtr) += here->HSMHV2_ydc_sP[bNodePrime] + here->HSMHV2_ydyn_sP[bNodePrime] * s->real;
*(here->HSMHV2SPbpPtr +1) += here->HSMHV2_ydyn_sP[bNodePrime] * s->imag;
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2SPtempPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_sP[tempNode] + here->HSMHV2_ydyn_sP[tempNode] * s->real);
*(here->HSMHV2SPtempPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_sP[tempNode] * s->imag;
}
if (flg_nqs) {
*(here->HSMHV2SPqiPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_sP[qiNode] + here->HSMHV2_ydyn_sP[qiNode] * s->real);
*(here->HSMHV2SPqiPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_sP[qiNode] * s->imag;
}
/*bulk prime*/
*(here->HSMHV2BPdpPtr) += here->HSMHV2_ydc_bP[dNodePrime] + here->HSMHV2_ydyn_bP[dNodePrime] * s->real;
*(here->HSMHV2BPdpPtr +1) += here->HSMHV2_ydyn_bP[dNodePrime] * s->imag;
*(here->HSMHV2BPgpPtr) += here->HSMHV2_ydc_bP[gNodePrime] + here->HSMHV2_ydyn_bP[gNodePrime] * s->real;
*(here->HSMHV2BPgpPtr +1) += here->HSMHV2_ydyn_bP[gNodePrime] * s->imag;
*(here->HSMHV2BPspPtr) += here->HSMHV2_ydc_bP[sNodePrime] + here->HSMHV2_ydyn_bP[sNodePrime] * s->real;
*(here->HSMHV2BPspPtr +1) += here->HSMHV2_ydyn_bP[sNodePrime] * s->imag;
*(here->HSMHV2BPbpPtr) += here->HSMHV2_ydc_bP[bNodePrime] + here->HSMHV2_ydyn_bP[bNodePrime] * s->real;
*(here->HSMHV2BPbpPtr +1) += here->HSMHV2_ydyn_bP[bNodePrime] * s->imag;
*(here->HSMHV2BPbPtr) += here->HSMHV2_ydc_bP[bNode] + here->HSMHV2_ydyn_bP[bNode] * s->real;
*(here->HSMHV2BPbPtr +1) += here->HSMHV2_ydyn_bP[bNode] * s->imag;
*(here->HSMHV2BPdbPtr) += here->HSMHV2_ydc_bP[dbNode] + here->HSMHV2_ydyn_bP[dbNode] * s->real;
*(here->HSMHV2BPdbPtr +1) += here->HSMHV2_ydyn_bP[dbNode] * s->imag;
*(here->HSMHV2BPsbPtr) += here->HSMHV2_ydc_bP[sbNode] + here->HSMHV2_ydyn_bP[sbNode] * s->real;
*(here->HSMHV2BPsbPtr +1) += here->HSMHV2_ydyn_bP[sbNode] * s->imag;
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2BPtempPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_bP[tempNode] + here->HSMHV2_ydyn_bP[tempNode] * s->real);
*(here->HSMHV2BPtempPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_bP[tempNode] * s->imag;
}
if (flg_nqs) {
*(here->HSMHV2BPqbPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_bP[qbNode] + here->HSMHV2_ydyn_bP[qbNode] * s->real);
*(here->HSMHV2BPqbPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_bP[qbNode] * s->imag;
}
/*bulk*/
*(here->HSMHV2BbpPtr) += here->HSMHV2_ydc_b[bNodePrime] + here->HSMHV2_ydyn_b[bNodePrime] * s->real;
*(here->HSMHV2BbpPtr +1) += here->HSMHV2_ydyn_b[bNodePrime] * s->imag;
*(here->HSMHV2BbPtr) += here->HSMHV2_ydc_b[bNode] + here->HSMHV2_ydyn_b[bNode] * s->real;
*(here->HSMHV2BbPtr +1) += here->HSMHV2_ydyn_b[bNode] * s->imag;
/*drain bulk*/
*(here->HSMHV2DBdPtr) += here->HSMHV2_ydc_db[dNode] + here->HSMHV2_ydyn_db[dNode] * s->real;
*(here->HSMHV2DBdPtr +1) += here->HSMHV2_ydyn_db[dNode] * s->imag;
*(here->HSMHV2DBbpPtr) += here->HSMHV2_ydc_db[bNodePrime] + here->HSMHV2_ydyn_db[bNodePrime] * s->real;
*(here->HSMHV2DBbpPtr +1) += here->HSMHV2_ydyn_db[bNodePrime] * s->imag;
*(here->HSMHV2DBdbPtr) += here->HSMHV2_ydc_db[dbNode] + here->HSMHV2_ydyn_db[dbNode] * s->real;
*(here->HSMHV2DBdbPtr +1) += here->HSMHV2_ydyn_db[dbNode] * s->imag;
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2DBtempPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_db[tempNode] + here->HSMHV2_ydyn_db[tempNode] * s->real);
*(here->HSMHV2DBtempPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_db[tempNode] * s->imag;
}
/*source bulk*/
*(here->HSMHV2SBsPtr) += here->HSMHV2_ydc_sb[sNode] + here->HSMHV2_ydyn_sb[sNode] * s->real;
*(here->HSMHV2SBsPtr +1) += here->HSMHV2_ydyn_sb[sNode] * s->imag;
*(here->HSMHV2SBbpPtr) += here->HSMHV2_ydc_sb[bNodePrime] + here->HSMHV2_ydyn_sb[bNodePrime] * s->real;
*(here->HSMHV2SBbpPtr +1) += here->HSMHV2_ydyn_sb[bNodePrime] * s->imag;
*(here->HSMHV2SBsbPtr) += here->HSMHV2_ydc_sb[sbNode] + here->HSMHV2_ydyn_sb[sbNode] * s->real;
*(here->HSMHV2SBsbPtr +1) += here->HSMHV2_ydyn_sb[sbNode] * s->imag;
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2SBtempPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_sb[tempNode] + here->HSMHV2_ydyn_sb[tempNode] * s->real);
*(here->HSMHV2SBtempPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_sb[tempNode] * s->imag;
}
/*temp*/
if( here->HSMHV2tempNode > 0) {
*(here->HSMHV2TempdPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_t[dNode] + here->HSMHV2_ydyn_t[dNode] * s->real);
*(here->HSMHV2TempdPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_t[dNode] * s->imag;
*(here->HSMHV2TempdpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_t[dNodePrime] + here->HSMHV2_ydyn_t[dNodePrime] * s->real);
*(here->HSMHV2TempdpPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_t[dNodePrime] * s->imag;
*(here->HSMHV2TempgpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_t[gNodePrime] + here->HSMHV2_ydyn_t[gNodePrime] * s->real);
*(here->HSMHV2TempgpPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_t[gNodePrime] * s->imag;
*(here->HSMHV2TempsPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_t[sNode] + here->HSMHV2_ydyn_t[sNode] * s->real);
*(here->HSMHV2TempsPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_t[sNode] * s->imag;
*(here->HSMHV2TempspPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_t[sNodePrime] + here->HSMHV2_ydyn_t[sNodePrime] * s->real);
*(here->HSMHV2TempspPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_t[sNodePrime] * s->imag;
*(here->HSMHV2TempbpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_t[bNodePrime] + here->HSMHV2_ydyn_t[bNodePrime] * s->real);
*(here->HSMHV2TempbpPtr +1) += model->HSMHV2_type * here->HSMHV2_ydyn_t[bNodePrime] * s->imag;
*(here->HSMHV2TemptempPtr) += here->HSMHV2_ydc_t[tempNode] + here->HSMHV2_ydyn_t[tempNode] * s->real;
*(here->HSMHV2TemptempPtr +1) += here->HSMHV2_ydyn_t[tempNode] * s->imag;
}
/* additional entries for flat nqs handling */
if ( flg_nqs ) {
/*qi*/
*(here->HSMHV2QIdpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_qi[dNodePrime] + here->HSMHV2_ydyn_qi[dNodePrime] * s->real);
*(here->HSMHV2QIdpPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_qi[dNodePrime] * s->imag;
*(here->HSMHV2QIgpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_qi[gNodePrime] + here->HSMHV2_ydyn_qi[gNodePrime] * s->real);
*(here->HSMHV2QIgpPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_qi[gNodePrime] * s->imag;
*(here->HSMHV2QIspPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_qi[sNodePrime] + here->HSMHV2_ydyn_qi[sNodePrime] * s->real);
*(here->HSMHV2QIspPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_qi[sNodePrime] * s->imag;
*(here->HSMHV2QIbpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_qi[bNodePrime] + here->HSMHV2_ydyn_qi[bNodePrime] * s->real);
*(here->HSMHV2QIbpPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_qi[bNodePrime] * s->imag;
*(here->HSMHV2QIqiPtr) += here->HSMHV2_ydc_qi[qiNode] + here->HSMHV2_ydyn_qi[qiNode] * s->real;
*(here->HSMHV2QIqiPtr+1) += here->HSMHV2_ydyn_qi[qiNode] * s->imag;
if ( here->HSMHV2tempNode > 0 ) {
*(here->HSMHV2QItempPtr) += here->HSMHV2_ydc_qi[tempNode] + here->HSMHV2_ydyn_qi[tempNode] * s->real;
*(here->HSMHV2QItempPtr+1) += here->HSMHV2_ydyn_qi[tempNode] * s->imag;
}
/*qb*/
*(here->HSMHV2QBdpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_qb[dNodePrime] + here->HSMHV2_ydyn_qb[dNodePrime] * s->real);
*(here->HSMHV2QBdpPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_qb[dNodePrime] * s->imag;
*(here->HSMHV2QBgpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_qb[gNodePrime] + here->HSMHV2_ydyn_qb[gNodePrime] * s->real);
*(here->HSMHV2QBgpPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_qb[gNodePrime] * s->imag;
*(here->HSMHV2QBspPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_qb[sNodePrime] + here->HSMHV2_ydyn_qb[sNodePrime] * s->real);
*(here->HSMHV2QBspPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_qb[sNodePrime] * s->imag;
*(here->HSMHV2QBbpPtr) += model->HSMHV2_type * (here->HSMHV2_ydc_qb[bNodePrime] + here->HSMHV2_ydyn_qb[bNodePrime] * s->real);
*(here->HSMHV2QBbpPtr+1) += model->HSMHV2_type * here->HSMHV2_ydyn_qb[bNodePrime] * s->imag;
*(here->HSMHV2QBqbPtr) += here->HSMHV2_ydc_qb[qbNode] + here->HSMHV2_ydyn_qb[qbNode] * s->real;
*(here->HSMHV2QBqbPtr+1) += here->HSMHV2_ydyn_qb[qbNode] * s->imag;
if ( here->HSMHV2tempNode > 0 ) {
*(here->HSMHV2QBtempPtr) += here->HSMHV2_ydc_qb[tempNode] + here->HSMHV2_ydyn_qb[tempNode] * s->real;
*(here->HSMHV2QBtempPtr+1) += here->HSMHV2_ydyn_qb[tempNode] * s->imag;
}
}
}
}
return(OK);
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,110 @@
/**********
Copyright 2013 Dietmar Warning. All rights reserved.
Author: 2013 Dietmar Warning
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsmhvdef.h"
#include "ngspice/trandefs.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
#include "ngspice/cpdefs.h"
int
HSMHV2soaCheck(CKTcircuit *ckt, GENmodel *inModel)
{
HSMHV2model *model = (HSMHV2model *) inModel;
HSMHV2instance *here;
double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */
int maxwarns;
static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0;
if (!ckt) {
warns_vgs = 0;
warns_vgd = 0;
warns_vgb = 0;
warns_vds = 0;
warns_vbs = 0;
warns_vbd = 0;
return OK;
}
maxwarns = ckt->CKTsoaMaxWarns;
for (; model; model = model->HSMHV2nextModel) {
for (here = model->HSMHV2instances; here; here = here->HSMHV2nextInstance) {
vgs = fabs(ckt->CKTrhsOld [here->HSMHV2gNode] -
ckt->CKTrhsOld [here->HSMHV2sNodePrime]);
vgd = fabs(ckt->CKTrhsOld [here->HSMHV2gNode] -
ckt->CKTrhsOld [here->HSMHV2dNodePrime]);
vgb = fabs(ckt->CKTrhsOld [here->HSMHV2gNode] -
ckt->CKTrhsOld [here->HSMHV2bNode]);
vds = fabs(ckt->CKTrhsOld [here->HSMHV2dNodePrime] -
ckt->CKTrhsOld [here->HSMHV2sNodePrime]);
vbs = fabs(ckt->CKTrhsOld [here->HSMHV2bNode] -
ckt->CKTrhsOld [here->HSMHV2sNodePrime]);
vbd = fabs(ckt->CKTrhsOld [here->HSMHV2bNode] -
ckt->CKTrhsOld [here->HSMHV2dNodePrime]);
if (vgs > model->HSMHV2vgsMax)
if (warns_vgs < maxwarns) {
soa_printf(ckt, (GENinstance*) here,
"|Vgs|=%g has exceeded Vgs_max=%g\n",
vgs, model->HSMHV2vgsMax);
warns_vgs++;
}
if (vgd > model->HSMHV2vgdMax)
if (warns_vgd < maxwarns) {
soa_printf(ckt, (GENinstance*) here,
"|Vgd|=%g has exceeded Vgd_max=%g\n",
vgd, model->HSMHV2vgdMax);
warns_vgd++;
}
if (vgb > model->HSMHV2vgbMax)
if (warns_vgb < maxwarns) {
soa_printf(ckt, (GENinstance*) here,
"|Vgb|=%g has exceeded Vgb_max=%g\n",
vgb, model->HSMHV2vgbMax);
warns_vgb++;
}
if (vds > model->HSMHV2vdsMax)
if (warns_vds < maxwarns) {
soa_printf(ckt, (GENinstance*) here,
"|Vds|=%g has exceeded Vds_max=%g\n",
vds, model->HSMHV2vdsMax);
warns_vds++;
}
if (vbs > model->HSMHV2vbsMax)
if (warns_vbs < maxwarns) {
soa_printf(ckt, (GENinstance*) here,
"|Vbs|=%g has exceeded Vbs_max=%g\n",
vbs, model->HSMHV2vbsMax);
warns_vbs++;
}
if (vbd > model->HSMHV2vbdMax)
if (warns_vbd < maxwarns) {
soa_printf(ckt, (GENinstance*) here,
"|Vbd|=%g has exceeded Vbd_max=%g\n",
vbd, model->HSMHV2vbdMax);
warns_vbd++;
}
}
}
return OK;
}

View File

@ -0,0 +1,500 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvtemp.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/smpdefs.h"
#include "ngspice/cktdefs.h"
#include "hsmhvdef.h"
#include "hsmhvevalenv.h"
#include "ngspice/const.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
#define RANGECHECK(param, min, max, pname) \
if ( (param) < (min) || (param) > (max) ) { \
printf("warning(HiSIM_HV(%s)): The model/instance parameter %s (= %e) must be in the range [%e , %e].\n", model->HSMHV2modName,\
(pname), (param), (min), (max) ); \
}
#define Fn_SU( y , x , xmax , delta , dx ) { \
TMF1 = ( xmax ) - ( x ) - ( delta ) ; \
TMF2 = 4.0 * ( xmax ) * ( delta ) ; \
TMF2 = TMF2 > 0.0 ? TMF2 : -( TMF2) ; \
TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \
dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \
y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \
}
#define Fn_SL( y , x , xmin , delta , dx ) { \
TMF1 = ( x ) - ( xmin ) - ( delta ) ; \
TMF2 = 4.0 * ( xmin ) * ( delta ) ; \
TMF2 = TMF2 > 0.0 ? TMF2 : -( TMF2 ); \
TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \
dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \
y = ( xmin ) + 0.5 * ( TMF1 + TMF2 ) ; \
}
#define C_m2cm (1.0e2)
int HSMHV2temp(
GENmodel *inModel,
CKTcircuit *ckt)
{
HSMHV2model *model = (HSMHV2model *)inModel ;
HSMHV2instance *here ;
HSMHV2binningParam *pParam ;
HSMHV2modelMKSParam *modelMKS ;
HSMHV2hereMKSParam *hereMKS ;
double mueph =0.0 ;
double Leff=0.0, dL =0.0, dLLD=0.0, LG=0.0, Weff=0.0, dW =0.0, dWLD=0.0, dWCV=0.0, WG =0.0, WL =0.0, Lgate =0.0, Wgate =0.0 ;
double Nsubpp=0.0, Nsubps=0.0, Nsub=0.0, q_Nsub=0.0, Nsubb=0.0, Npext =0.0 ;
double Lod_half=0.0, Lod_half_ref =0.0 ;
double T0, T1, T2, T3, T4, T5, T6, T7 ;
/* temperature-dependent variables */
double Eg =0.0, TTEMP0=0.0, TTEMP=0.0, beta=0.0, Nin=0.0 ;
double Tdiff0 = 0.0, Tdiff0_2 = 0.0, Tdiff = 0.0, Tdiff_2 = 0.0;
double js=0.0, jssw=0.0, js2=0.0, jssw2 =0.0 ;
int i=0 ;
double TMF1 , TMF2 ;
double GDLD =0.0 ;
double log_Tratio =0.0 ;
const double small = 1.0e-50 ;
const double dlt_rd23 = 1.0e-6 / C_m2cm ;
const double large_arg = 80 ;
for ( ;model ;model = model->HSMHV2nextModel ) {
modelMKS = &model->modelMKS ;
model->HSMHV2_vcrit = CONSTvt0 * log( CONSTvt0 / (CONSTroot2 * 1.0e-14) ) ;
/* Quantum Mechanical Effect */
if ( ( model->HSMHV2_qme1 == 0.0 && model->HSMHV2_qme3 == 0.0 ) || model->HSMHV2_qme2 == 0.0 ) {
model->HSMHV2_flg_qme = 0 ;
} else {
model->HSMHV2_flg_qme = 1 ;
model->HSMHV2_qme12 = model->HSMHV2_qme1 / ( model->HSMHV2_qme2 * model->HSMHV2_qme2 ) ;
}
for ( here = model->HSMHV2instances; here; here = here->HSMHV2nextInstance ) {
pParam = &here->pParam ;
hereMKS = &here->hereMKS ;
here->HSMHV2_lgate = Lgate = here->HSMHV2_l + model->HSMHV2_xl ;
Wgate = here->HSMHV2_w / here->HSMHV2_nf + model->HSMHV2_xw ;
LG = Lgate * C_m2um ;
here->HSMHV2_wg = WG = Wgate * C_m2um ;
WL = WG * LG ;
GDLD = model->HSMHV2_gdld * C_m2um ;
/* Band gap */
here->HSMHV2_egtnom = pParam->HSMHV2_eg0 - model->HSMHV2_ktnom
* ( 90.25e-6 + model->HSMHV2_ktnom * 1.0e-7 ) ;
/* C_EOX */
here->HSMHV2_cecox = C_VAC * model->HSMHV2_kappa ;
/* Vth reduction for small Vds */
here->HSMHV2_msc = model->HSMHV2_scp22 ;
/* Poly-Si Gate Depletion */
if ( pParam->HSMHV2_pgd1 == 0.0 ) {
here->HSMHV2_flg_pgd = 0 ;
} else {
here->HSMHV2_flg_pgd = 1 ;
}
/* CLM5 & CLM6 */
here->HSMHV2_clmmod = 1e0 + pow( LG , model->HSMHV2_clm5 ) * model->HSMHV2_clm6 ;
/* Half length of diffusion */
T1 = 1.0 / (model->HSMHV2_saref + 0.5 * here->HSMHV2_l)
+ 1.0 / (model->HSMHV2_sbref + 0.5 * here->HSMHV2_l);
Lod_half_ref = 2.0 / T1 ;
if (here->HSMHV2_sa > 0.0 && here->HSMHV2_sb > 0.0 &&
(here->HSMHV2_nf == 1.0 ||
(here->HSMHV2_nf > 1.0 && here->HSMHV2_sd > 0.0))) {
T1 = 0.0;
for (i = 0; i < here->HSMHV2_nf; i++) {
T1 += 1.0 / (here->HSMHV2_sa + 0.5 * here->HSMHV2_l
+ i * (here->HSMHV2_sd + here->HSMHV2_l))
+ 1.0 / (here->HSMHV2_sb + 0.5 * here->HSMHV2_l
+ i * (here->HSMHV2_sd + here->HSMHV2_l));
}
Lod_half = 2.0 * here->HSMHV2_nf / T1;
} else {
Lod_half = 0.0;
}
Npext = pParam->HSMHV2_npext ;
here->HSMHV2_mueph1 = pParam->HSMHV2_mueph1 ;
here->HSMHV2_nsubp = pParam->HSMHV2_nsubp ;
here->HSMHV2_nsubc = pParam->HSMHV2_nsubc ;
/* DFM */
if ( model->HSMHV2_codfm == 1 && here->HSMHV2_nsubcdfm_Given ) {
RANGECHECK(here->HSMHV2_nsubcdfm, 1.0e16, 1.0e19, "NSUBCDFM") ;
here->HSMHV2_mueph1 *= model->HSMHV2_mphdfm
* ( log(hereMKS->HSMHV2_nsubcdfm) - log(here->HSMHV2_nsubc) ) + 1.0 ;
here->HSMHV2_nsubp += hereMKS->HSMHV2_nsubcdfm - here->HSMHV2_nsubc ;
Npext += hereMKS->HSMHV2_nsubcdfm - here->HSMHV2_nsubc ;
here->HSMHV2_nsubc = hereMKS->HSMHV2_nsubcdfm ;
}
/* Phonon Scattering (temperature-independent part) */
mueph = here->HSMHV2_mueph1
* (1.0e0 + (model->HSMHV2_muephw / pow( WG, model->HSMHV2_muepwp)))
* (1.0e0 + (model->HSMHV2_muephl / pow( LG, model->HSMHV2_mueplp)))
* (1.0e0 + (model->HSMHV2_muephs / pow( WL, model->HSMHV2_muepsp)));
if (Lod_half > 0.0) {
T1 = 1.0e0 / (1.0e0 + pParam->HSMHV2_muesti2) ;
T2 = pow (pParam->HSMHV2_muesti1 / Lod_half, pParam->HSMHV2_muesti3) ;
T3 = pow (pParam->HSMHV2_muesti1 / Lod_half_ref, pParam->HSMHV2_muesti3) ;
here->HSMHV2_mueph = mueph * (1.0e0 + T1 * T2) / (1.0e0 + T1 * T3);
} else {
here->HSMHV2_mueph = mueph;
}
/* Surface Roughness Scattering */
here->HSMHV2_muesr = model->HSMHV2_muesr0
* (1.0e0 + (model->HSMHV2_muesrl / pow (LG, model->HSMHV2_mueslp)))
* (1.0e0 + (model->HSMHV2_muesrw / pow (WG, model->HSMHV2_mueswp))) ;
/* Coefficients of Qbm for Eeff */
T1 = pow( LG, model->HSMHV2_ndeplp ) ;
here->HSMHV2_ndep_o_esi = ( pParam->HSMHV2_ndep * T1 ) / ( T1 + model->HSMHV2_ndepl )
/ C_ESI ;
here->HSMHV2_ninv_o_esi = pParam->HSMHV2_ninv / C_ESI ;
here->HSMHV2_ninvd0 = model->HSMHV2_ninvd * ( 1.0 + (model->HSMHV2_ninvdw / pow( WG, model->HSMHV2_ninvdwp)));
/* Metallurgical channel geometry */
dL = model->HSMHV2_xld
+ (modelMKS->HSMHV2_ll / pow (Lgate + model->HSMHV2_lld, model->HSMHV2_lln)) ;
dLLD = model->HSMHV2_xldld
+ (modelMKS->HSMHV2_ll / pow (Lgate + model->HSMHV2_lld, model->HSMHV2_lln)) ;
dW = model->HSMHV2_xwd
+ (modelMKS->HSMHV2_wl / pow (Wgate + model->HSMHV2_wld, model->HSMHV2_wln)) ;
dWLD = model->HSMHV2_xwdld
+ (modelMKS->HSMHV2_wl / pow (Wgate + model->HSMHV2_wld, model->HSMHV2_wln)) ;
dWCV = model->HSMHV2_xwdc
+ (modelMKS->HSMHV2_wl / pow (Wgate + model->HSMHV2_wld, model->HSMHV2_wln)) ;
Leff = Lgate - ( dL + dLLD ) ;
if ( Leff <= 0.0 ) {
IFuid namarr[2];
namarr[0] = here->HSMHV2name;
namarr[1] = model->HSMHV2modName;
(*(SPfrontEnd->IFerror))
(
ERR_FATAL,
"HiSIM_HV: MOSFET(%s) MODEL(%s): effective channel length is negative or 0",
namarr
);
return (E_BADPARM);
}
here->HSMHV2_leff = Leff ;
/* Wg dependence for short channel devices */
here->HSMHV2_lgatesm = Lgate + model->HSMHV2_wl1 / pow( WL , model->HSMHV2_wl1p ) ;
here->HSMHV2_dVthsm = pParam->HSMHV2_wl2 / pow( WL , model->HSMHV2_wl2p ) ;
/* Lg dependence of wsti */
T1 = 1.0e0 + model->HSMHV2_wstil / pow( here->HSMHV2_lgatesm * C_m2um , model->HSMHV2_wstilp ) ;
T2 = 1.0e0 + model->HSMHV2_wstiw / pow( WG , model->HSMHV2_wstiwp ) ;
here->HSMHV2_wsti = pParam->HSMHV2_wsti * T1 * T2 ;
here->HSMHV2_weff = Weff = Wgate - 2.0e0 * dW ;
here->HSMHV2_weff_ld = Wgate - 2.0e0 * dWLD ;
here->HSMHV2_weff_cv = Wgate - 2.0e0 * dWCV ;
if ( Weff <= 0.0 ) {
IFuid namarr[2];
namarr[0] = here->HSMHV2name;
namarr[1] = model->HSMHV2modName;
(*(SPfrontEnd->IFerror))
(
ERR_FATAL,
"HiSIM_HV: MOSFET(%s) MODEL(%s): effective channel width is negative or 0",
namarr
);
return (E_BADPARM);
}
here->HSMHV2_weff_nf = Weff * here->HSMHV2_nf ;
here->HSMHV2_weffcv_nf = here->HSMHV2_weff_cv * here->HSMHV2_nf ;
/* Surface impurity profile */
/* Note: Sign Changed --> */
Nsubpp = here->HSMHV2_nsubp
* (1.0e0 + (model->HSMHV2_nsubp0 / pow (WG, model->HSMHV2_nsubwp))) ;
/* <-- Note: Sign Changed */
if (Lod_half > 0.0) {
T1 = 1.0e0 / (1.0e0 + pParam->HSMHV2_nsubpsti2) ;
T2 = pow (pParam->HSMHV2_nsubpsti1 / Lod_half, pParam->HSMHV2_nsubpsti3) ;
T3 = pow (pParam->HSMHV2_nsubpsti1 / Lod_half_ref, pParam->HSMHV2_nsubpsti3) ;
Nsubps = Nsubpp * (1.0e0 + T1 * T2) / (1.0e0 + T1 * T3) ;
} else {
Nsubps = Nsubpp ;
}
here->HSMHV2_nsubc *= 1.0e0 + ( model->HSMHV2_nsubcw / pow ( WG, model->HSMHV2_nsubcwp )) ;
if( Lgate > model->HSMHV2_lp ){
Nsub = (here->HSMHV2_nsubc * (Lgate - model->HSMHV2_lp)
+ Nsubps * model->HSMHV2_lp) / Lgate ;
} else {
Nsub = Nsubps
+ (Nsubps - here->HSMHV2_nsubc) * (model->HSMHV2_lp - Lgate)
/ model->HSMHV2_lp ;
}
T3 = 0.5e0 * Lgate - model->HSMHV2_lp ;
T1 = 1.0e0 / ( 1.0e0 / T3 + 1.0e0 / model->HSMHV2_lpext ) ;
T2 = Fn_Max (0.0e0, T1) ;
here->HSMHV2_nsub =
Nsub = Nsub + T2 * (Npext - here->HSMHV2_nsubc) / Lgate ;
here->HSMHV2_qnsub = q_Nsub = C_QE * Nsub ;
here->HSMHV2_qnsub_esi = q_Nsub * C_ESI ;
here->HSMHV2_2qnsub_esi = 2.0 * here->HSMHV2_qnsub_esi ;
/* Pocket Overlap (temperature-independent part) */
if ( Lgate <= 2.0e0 * model->HSMHV2_lp ) {
Nsubb = 2.0e0 * Nsubps
- (Nsubps - here->HSMHV2_nsubc) * Lgate
/ model->HSMHV2_lp - here->HSMHV2_nsubc ;
here->HSMHV2_ptovr0 = log (Nsubb / here->HSMHV2_nsubc) ;
/* here->HSMHV2_ptovr0 will be divided by beta later. */
} else {
here->HSMHV2_ptovr0 = 0.0e0 ;
}
/* depletion MOS (temperature-independent part) */
here->HSMHV2_ndepm = modelMKS->HSMHV2_ndepm ;
/* costi0 and costi1 for STI transistor model (temperature-independent part) */
here->HSMHV2_costi00 = sqrt (2.0 * C_QE * pParam->HSMHV2_nsti * C_ESI ) ;
here->HSMHV2_nsti_p2 = 1.0 / ( pParam->HSMHV2_nsti * pParam->HSMHV2_nsti ) ;
/* Velocity Temperature Dependence (Temperature-dependent part will be multiplied later.) */
here->HSMHV2_vmax0 = (1.0e0 + (pParam->HSMHV2_vover / pow (LG, model->HSMHV2_voverp)))
* (1.0e0 + (model->HSMHV2_vovers / pow (WL, model->HSMHV2_voversp))) ;
/* 2 phi_B (temperature-independent) */
/* @300K, with pocket */
here->HSMHV2_pb20 = 2.0e0 / C_b300 * log (Nsub / C_Nin0) ;
/* @300K, w/o pocket */
here->HSMHV2_pb2c = 2.0e0 / C_b300 * log (here->HSMHV2_nsubc / C_Nin0) ;
/* constant for Poly depletion */
here->HSMHV2_cnstpgd = pow ( 1e0 + 1e0 / LG , model->HSMHV2_pgd4 )
* pParam->HSMHV2_pgd1 ;
/* Gate resistance */
if ( here->HSMHV2_corg == 1 ) {
T1 = here->HSMHV2_xgw + Weff / (3.0e0 * here->HSMHV2_ngcon);
T2 = Lgate - here->HSMHV2_xgl;
here->HSMHV2_grg = model->HSMHV2_rshg * T1 / (here->HSMHV2_ngcon * T2 * here->HSMHV2_nf);
if (here->HSMHV2_grg > 1.0e-3) here->HSMHV2_grg = here->HSMHV2_m / here->HSMHV2_grg;
else {
here->HSMHV2_grg = here->HSMHV2_m * 1.0e3;
printf("warning(HiSIM_HV(%s)): The gate conductance reset to 1.0e3 mho.\n",model->HSMHV2modName);
}
}
/* Process source/drain series resistamce */
if ( model->HSMHV2_rsh > 0.0 ) {
here->HSMHV2_rd0 = model->HSMHV2_rsh * here->HSMHV2_nrd ;
} else {
here->HSMHV2_rd0 = 0.0 ;
}
if ( pParam->HSMHV2_rd > 0.0 || pParam->HSMHV2_rs > 0.0 ) {
here->HSMHV2_rdtemp0 = 1.0 + model->HSMHV2_rds / pow( WL , model->HSMHV2_rdsp ) ;
if( pParam->HSMHV2_rdvd != 0.0 ){
T7 = ( 1.0 + model->HSMHV2_rdvds / pow( WL , model->HSMHV2_rdvdsp ) );
T6 = ( - model->HSMHV2_rdvdl * pow( LG , model->HSMHV2_rdvdlp ) ) ;
if(T6 > large_arg) T6 = large_arg ;
T6 = exp( T6 ) ;
here->HSMHV2_rdvdtemp0 = T6 * T7 ;
}
}
if( pParam->HSMHV2_rd23 != 0.0 ){
T2 = ( 1.0 + model->HSMHV2_rd23s / pow( WL , model->HSMHV2_rd23sp ) );
T1 = ( - model->HSMHV2_rd23l * pow( LG , model->HSMHV2_rd23lp ) ) ;
if(T1 > large_arg) T1 = large_arg ;
T1 = exp( T1 ) ;
T3 = pParam->HSMHV2_rd23 * T2 * T1 ;
here->HSMHV2_rd23 = 0.5 * ( T3 + sqrt ( T3 * T3 + 4.0 * dlt_rd23 * dlt_rd23 ) ) ;
} else {
here->HSMHV2_rd23 = 0.0 ;
}
if ( model->HSMHV2_rsh > 0.0 ) {
here->HSMHV2_rs0 = model->HSMHV2_rsh * here->HSMHV2_nrs ;
} else {
here->HSMHV2_rs0 = 0.0 ;
}
here->HSMHV2_Xmax = sqrt ( model->HSMHV2_rdrdjunc * model->HSMHV2_rdrdjunc + model->HSMHV2_xldld * model->HSMHV2_xldld ) ;
if(pParam->HSMHV2_nover != 0.0) {
here->HSMHV2_kdep = 2.0 * C_ESI / ( C_QE * pParam->HSMHV2_nover ) ;
here->HSMHV2_kjunc = 2.0 * C_ESI / C_QE * here->HSMHV2_nsubc / ( pParam->HSMHV2_nover + here->HSMHV2_nsubc ) / pParam->HSMHV2_nover ;
}
here->HSMHV2_rdrcxw = 1.0e0 ;
here->HSMHV2_rdrvmaxw = 1.0e0 + (model->HSMHV2_rdrvmaxw / pow( WG, model->HSMHV2_rdrvmaxwp)) ;
here->HSMHV2_rdrvmaxl = 1.0e0 + (model->HSMHV2_rdrvmaxl / pow( LG, model->HSMHV2_rdrvmaxlp)) ;
here->HSMHV2_rdrmuel = 1.0e0 + (model->HSMHV2_rdrmuel / pow( LG, model->HSMHV2_rdrmuelp )) ;
/* Body resistance */
if ( here->HSMHV2_corbnet == 1 ) {
if (here->HSMHV2_rbpb < 1.0e-3) here->HSMHV2_grbpb = here->HSMHV2_m * 1.0e3 ;
else here->HSMHV2_grbpb = here->HSMHV2_m * ( model->HSMHV2_gbmin + 1.0 / here->HSMHV2_rbpb ) ;
if (here->HSMHV2_rbps < 1.0e-3) here->HSMHV2_grbps = here->HSMHV2_m * 1.0e3 ;
else here->HSMHV2_grbps = here->HSMHV2_m * ( model->HSMHV2_gbmin + 1.0 / here->HSMHV2_rbps ) ;
if (here->HSMHV2_rbpd < 1.0e-3) here->HSMHV2_grbpd = here->HSMHV2_m * 1.0e3 ;
else here->HSMHV2_grbpd = here->HSMHV2_m * ( model->HSMHV2_gbmin + 1.0 / here->HSMHV2_rbpd ) ;
}
/* Vdseff */
if( model->HSMHV2_coddlt == 0) {
T1 = model->HSMHV2_ddltslp * LG + model->HSMHV2_ddltict ;
if ( T1 < 0.0 ) { T1 = 0.0 ; }
here->HSMHV2_ddlt = T1 * model->HSMHV2_ddltmax / ( T1 + model->HSMHV2_ddltmax ) + 1.0 ;
} else {
T1 = model->HSMHV2_ddltslp * LG ;
if ( T1 < 0.0 ) { T1 = 0.0 ; }
here->HSMHV2_ddlt = T1 * model->HSMHV2_ddltmax / ( T1 + model->HSMHV2_ddltmax ) + model->HSMHV2_ddltict + small ;
}
/* Isub */
T2 = pow( Weff , model->HSMHV2_svgswp ) ;
here->HSMHV2_vg2const = pParam->HSMHV2_svgs
* ( 1.0e0
+ modelMKS->HSMHV2_svgsl / pow( here->HSMHV2_lgate , model->HSMHV2_svgslp ) )
* ( T2 / ( T2 + modelMKS->HSMHV2_svgsw ) ) ;
here->HSMHV2_xvbs = pParam->HSMHV2_svbs
* ( 1.0e0
+ modelMKS->HSMHV2_svbsl / pow( here->HSMHV2_lgate , model->HSMHV2_svbslp ) ) ;
here->HSMHV2_xgate = modelMKS->HSMHV2_slg
* ( 1.0
+ modelMKS->HSMHV2_slgl / pow( here->HSMHV2_lgate , model->HSMHV2_slglp ) ) ;
here->HSMHV2_xsub1 = pParam->HSMHV2_sub1
* ( 1.0
+ modelMKS->HSMHV2_sub1l / pow( here->HSMHV2_lgate , model->HSMHV2_sub1lp ) ) ;
here->HSMHV2_xsub2 = pParam->HSMHV2_sub2
* ( 1.0 + modelMKS->HSMHV2_sub2l / here->HSMHV2_lgate ) ;
here->HSMHV2_subld1 = model->HSMHV2_subld1
* ( 1.0 + model->HSMHV2_subld1l / pow( LG , model->HSMHV2_subld1lp ) ) ;
/* IBPC */
here->HSMHV2_ibpc1 = pParam->HSMHV2_ibpc1
* ( 1.0 + model->HSMHV2_ibpc1l / pow( LG , model->HSMHV2_ibpc1lp ) ) ;
/* Fringing capacitance */
here->HSMHV2_cfrng = C_EOX / ( C_Pi / 2.0e0 ) * here->HSMHV2_weff_nf
* log( 1.0e0 + model->HSMHV2_tpoly / model->HSMHV2_tox ) ;
/* Additional term of lateral-field-induced capacitance */
here->HSMHV2_cqyb0 = C_m2um * here->HSMHV2_weff_nf
* model->HSMHV2_xqy1 / pow( LG , model->HSMHV2_xqy2 ) ;
/* Parasitic component of the channel current */
here->HSMHV2_ptl0 = model->HSMHV2_ptl * pow( LG , - model->HSMHV2_ptlp ) ;
here->HSMHV2_pt40 = model->HSMHV2_pt4 * pow( LG , - model->HSMHV2_pt4p ) ;
here->HSMHV2_gdl0 = model->HSMHV2_gdl * pow( LG + GDLD , - model->HSMHV2_gdlp ) ;
/* Self heating */
pParam->HSMHV2_rth = pParam->HSMHV2_rth0 / ( here->HSMHV2_m * here->HSMHV2_weff_nf )
* ( 1.0 + model->HSMHV2_rth0w / pow( WG , model->HSMHV2_rth0wp ) );
pParam->HSMHV2_cth = modelMKS->HSMHV2_cth0 * ( here->HSMHV2_m * here->HSMHV2_weff_nf ) ;
pParam->HSMHV2_rth *= ( 1.0 / pow( here->HSMHV2_nf , model->HSMHV2_rth0nf ) ) ;
here->HSMHV2_rthtemp0 = 1.0 / pow( here->HSMHV2_nf , model->HSMHV2_rth0nf ) / ( here->HSMHV2_m * here->HSMHV2_weff_nf )
* ( 1.0 + model->HSMHV2_rth0w / pow( WG , model->HSMHV2_rth0wp ) );
/*-----------------------------------------------------------*
* Temperature dependent constants.
*-----------------*/
if ( here->HSMHV2tempNode < 0 || pParam->HSMHV2_rth0 == 0.0 ) {
#include "hsmhvtemp_eval.h"
#include "hsmhvtemp_eval_rdri.h"
#include "hsmhvtemp_eval_dio.h"
} /* end of if ( here->HSMHV2tempNode < 0 || pParam->HSMHV2_rth0 == 0.0 ) */
}
}
return(OK);
}

View File

@ -0,0 +1,370 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvtemp_eval.h
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#define C_rdtemp_min 5.0e-3
#define C_rdtemp_dlt 1.0e-2
TTEMP = ckt->CKTtemp;
if ( here->HSMHV2_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV2_dtemp ; }
TTEMP0 = TTEMP ;
#ifdef HSMHV2EVAL
/* Self heating */
TTEMP = TTEMP + deltemp ;
#endif
Tdiff0 = TTEMP0 - model->HSMHV2_ktnom ;
Tdiff0_2 = TTEMP0 * TTEMP0 - model->HSMHV2_ktnom * model->HSMHV2_ktnom ;
Tdiff = TTEMP - model->HSMHV2_ktnom ;
Tdiff_2 = TTEMP * TTEMP - model->HSMHV2_ktnom * model->HSMHV2_ktnom ;
here->HSMHV2_Tratio = TTEMP / model->HSMHV2_ktnom ;
/* Band gap */
here->HSMHV2_eg = Eg = here->HSMHV2_egtnom - pParam->HSMHV2_bgtmp1 * Tdiff
- pParam->HSMHV2_bgtmp2 * Tdiff_2 ;
here->HSMHV2_sqrt_eg = sqrt( Eg ) ;
#ifdef HSMHV2EVAL
Eg_dT = -pParam->HSMHV2_bgtmp1 - 2.0e0 * TTEMP * pParam->HSMHV2_bgtmp2 ;
#endif
T1 = 1.0 / TTEMP ;
T2 = 1.0 / model->HSMHV2_ktnom ;
T3 = here->HSMHV2_egtnom + model->HSMHV2_egig
+ model->HSMHV2_igtemp2 * ( T1 - T2 )
+ model->HSMHV2_igtemp3 * ( T1 * T1 - T2 * T2 ) ;
here->HSMHV2_egp12 = sqrt ( T3 ) ;
here->HSMHV2_egp32 = T3 * here->HSMHV2_egp12 ;
/* Inverse of the thermal voltage */
here->HSMHV2_beta = beta = C_QE / (C_KB * TTEMP) ;
here->HSMHV2_beta_inv = 1.0 / beta ;
here->HSMHV2_beta2 = beta * beta ;
here->HSMHV2_betatnom = C_QE / (C_KB * model->HSMHV2_ktnom) ;
#ifdef HSMHV2EVAL
beta_dT=-C_QE/(C_KB*TTEMP*TTEMP);
beta_inv_dT = C_KB / C_QE ;
#endif
/* Intrinsic carrier concentration */
here->HSMHV2_nin = Nin = C_Nin0 * Fn_Pow (here->HSMHV2_Tratio, 1.5e0)
* exp (- Eg / 2.0e0 * beta + here->HSMHV2_egtnom / 2.0e0 * here->HSMHV2_betatnom) ;
#ifdef HSMHV2EVAL
Nin_dT = C_Nin0 * exp (- Eg / 2.0e0 * beta + here->HSMHV2_egtnom / 2.0e0 * here->HSMHV2_betatnom)
* 1.5e0 * Fn_Pow ( here->HSMHV2_Tratio , 0.5e0 ) / model->HSMHV2_ktnom
+ C_Nin0 * Fn_Pow (here->HSMHV2_Tratio, 1.5e0)
* exp (- Eg / 2.0e0 * beta + here->HSMHV2_egtnom / 2.0e0 * here->HSMHV2_betatnom)
* ( - Eg / 2.0e0 * beta_dT - beta / 2.0e0 * Eg_dT );
#endif
/* Phonon Scattering (temperature-dependent part) */
T1 = Fn_Pow (here->HSMHV2_Tratio, pParam->HSMHV2_muetmp) ;
here->HSMHV2_mphn0 = T1 / here->HSMHV2_mueph ;
here->HSMHV2_mphn1 = here->HSMHV2_mphn0 * model->HSMHV2_mueph0 ;
#ifdef HSMHV2EVAL
T1_dT = pParam->HSMHV2_muetmp * Fn_Pow(here->HSMHV2_Tratio, pParam->HSMHV2_muetmp - 1.0 )
/ model->HSMHV2_ktnom ;
mphn0_dT = T1_dT / here->HSMHV2_mueph ;
#endif
if( model->HSMHV2_codep == 1 ) {
/* depletion MOS parameter (temperature-dependent part) */
here->HSMHV2_Pb2n = 2.0/beta*log(here->HSMHV2_ndepm/Nin) ;
here->HSMHV2_Vbipn = 1.0/beta*log(here->HSMHV2_ndepm*here->HSMHV2_nsub/Nin/Nin) ;
here->HSMHV2_cnst0 = sqrt ( 2.0 * C_ESI * C_QE * here->HSMHV2_ndepm / beta ) ;
here->HSMHV2_cnst1 = Nin*Nin/here->HSMHV2_ndepm/here->HSMHV2_ndepm ;
T1 = Fn_Pow (here->HSMHV2_Tratio, model->HSMHV2_depmuetmp) ;
here->HSMHV2_depmphn0 = T1 / model->HSMHV2_depmueph1 ;
here->HSMHV2_depmphn1 = here->HSMHV2_depmphn0 * model->HSMHV2_depmueph0 ;
T0 = 1.8 + 0.4 * here->HSMHV2_Tratio + 0.1 * here->HSMHV2_Tratio * here->HSMHV2_Tratio - model->HSMHV2_depvtmp * ( 1.0 - here->HSMHV2_Tratio ) ;
here->HSMHV2_depvmax = modelMKS->HSMHV2_depvmax / T0 ;
#ifdef HSMHV2EVAL
Pb2n_dT = -here->HSMHV2_Pb2n/beta*beta_dT-2.0/beta/Nin*Nin_dT ;
Vbipn_dT = -here->HSMHV2_Vbipn/beta*beta_dT-2/beta/Nin*Nin_dT ;
cnst0_dT = 0.5e0 / here->HSMHV2_cnst0 * 2.0 * C_ESI * C_QE * here->HSMHV2_ndepm * beta_inv_dT ;
cnst1_dT = 2.0e0 * Nin * Nin_dT / here->HSMHV2_ndepm / here->HSMHV2_ndepm ;
T1_dT = model->HSMHV2_depmuetmp * Fn_Pow(here->HSMHV2_Tratio, model->HSMHV2_depmuetmp - 1.0 )
/ model->HSMHV2_ktnom ;
depmphn0_dT = T1_dT / model->HSMHV2_depmueph1 ;
T0_dT = 1 / model->HSMHV2_ktnom * ( 0.4 + 0.2 * here->HSMHV2_Tratio + model->HSMHV2_depvtmp ) ;
depVmax_dT = - modelMKS->HSMHV2_depvmax / ( T0 * T0 ) * T0_dT ;
#endif
}
/* Pocket Overlap (temperature-dependent part) */
here->HSMHV2_ptovr = here->HSMHV2_ptovr0 / beta ;
#ifdef HSMHV2EVAL
ptovr_dT = here->HSMHV2_ptovr0 * beta_inv_dT ;
#endif
/* Velocity Temperature Dependence */
T1 = TTEMP / model->HSMHV2_ktnom ;
T0 = 1.8 + 0.4 * T1 + 0.1 * T1 * T1 - pParam->HSMHV2_vtmp * (1.0 - T1) ;
if ( model->HSMHV2_cotemp != 2 ) { /* without deltemp (COTEMP=0,1,3) */
here->HSMHV2_vmax = here->HSMHV2_vmax0 * pParam->HSMHV2_vmax
/ T0
* ( 1.0 + model->HSMHV2_vmaxt1 * Tdiff0 + model->HSMHV2_vmaxt2 * Tdiff0_2 ) ;
#ifdef HSMHV2EVAL
Vmax_dT=-here->HSMHV2_vmax0 * pParam->HSMHV2_vmax
/ ( T0 * T0 ) * ( 1.0 + model->HSMHV2_vmaxt1 * Tdiff0 + model->HSMHV2_vmaxt2 * Tdiff0_2 )
* 1/model->HSMHV2_ktnom * (0.4 + 0.2 * T1 + pParam->HSMHV2_vtmp) ;
#endif
} else { /* with deltemp (COTEMP=2) */
here->HSMHV2_vmax = here->HSMHV2_vmax0 * pParam->HSMHV2_vmax
/ T0
* ( 1.0 + model->HSMHV2_vmaxt1 * Tdiff + model->HSMHV2_vmaxt2 * Tdiff_2 ) ;
#ifdef HSMHV2EVAL
/* under development */
Vmax_dT = here->HSMHV2_vmax0 * pParam->HSMHV2_vmax
/ ( T0 * T0 )
* ( ( model->HSMHV2_vmaxt1 + 2.0 * TTEMP * model->HSMHV2_vmaxt2 ) * T0
- ( 1.0 + model->HSMHV2_vmaxt1 * Tdiff + model->HSMHV2_vmaxt2 * Tdiff_2 )
* 1/model->HSMHV2_ktnom * (0.4 + 0.2 * T1 + pParam->HSMHV2_vtmp) ) ;
#endif
}
if ( model->HSMHV2_cotemp != 2 ) { /* without deltemp (COTEMP=0,1,3) */
here->HSMHV2_ninvd = here->HSMHV2_ninvd0 * ( 1.0 + model->HSMHV2_ninvdt1 * Tdiff0 + model->HSMHV2_ninvdt2 * Tdiff0_2 ) ;
#ifdef HSMHV2EVAL
ninvd_dT = 0.0 ;
#endif
} else { /* with deltemp (COTEMP=2) */
/* under development */
here->HSMHV2_ninvd = here->HSMHV2_ninvd0 * ( 1.0 + model->HSMHV2_ninvdt1 * Tdiff + model->HSMHV2_ninvdt2 * Tdiff_2 ) ;
#ifdef HSMHV2EVAL
ninvd_dT = here->HSMHV2_ninvd0 * ( model->HSMHV2_ninvdt1 + 2.0 * TTEMP * model->HSMHV2_ninvdt2 ) ;
#endif
}
/* Temperature Dependence of RTH0 */
pParam->HSMHV2_rth = ( pParam->HSMHV2_rth0 + model->HSMHV2_rthtemp1 * Tdiff0 + model->HSMHV2_rthtemp2 * Tdiff0_2 ) * here->HSMHV2_rthtemp0 ;
/* Temperature Dependence of POWRAT */
T2 = pParam->HSMHV2_powrat + model->HSMHV2_prattemp1 * Tdiff0 + model->HSMHV2_prattemp2 * Tdiff0_2 ;
Fn_SL( T2 , T2 , 0 , 0.05 , T0 );
Fn_SU( here->HSMHV2_powratio , T2 , 1 , 0.05 , T0 );
/* 2 phi_B (temperature-dependent) */
/* @temp, with pocket */
here->HSMHV2_pb2 = 2.0e0 / beta * log (here->HSMHV2_nsub / Nin) ;
#ifdef HSMHV2EVAL
Pb2_dT = - (here->HSMHV2_pb2 * beta_dT + 2.0e0 / Nin * Nin_dT ) / beta ;
#endif
/* Depletion Width */
T1 = 2.0e0 * C_ESI / C_QE ;
here->HSMHV2_wdpl = sqrt ( T1 / here->HSMHV2_nsub ) ;
here->HSMHV2_wdplp = sqrt( T1 / ( here->HSMHV2_nsubp ) ) ;
if( model->HSMHV2_codep == 0 ) {
/* Coefficient of the F function for bulk charge */
here->HSMHV2_cnst0 = sqrt ( 2.0 * C_ESI * C_QE * here->HSMHV2_nsub / beta ) ;
/* cnst1: n_{p0} / p_{p0} */
T1 = Nin / here->HSMHV2_nsub ;
here->HSMHV2_cnst1 = T1 * T1 ;
#ifdef HSMHV2EVAL
cnst0_dT = 0.5e0 / here->HSMHV2_cnst0 * 2.0 * C_ESI * C_QE * here->HSMHV2_nsub * beta_inv_dT ;
cnst1_dT = 2.0e0 * Nin * Nin_dT / here->HSMHV2_nsub / here->HSMHV2_nsub ;
#endif
}
if( model->HSMHV2_codep == 0 ) {
if ( pParam->HSMHV2_nover != 0.0 ) {
here->HSMHV2_cnst0over = here->HSMHV2_cnst0 * sqrt( pParam->HSMHV2_nover / here->HSMHV2_nsub ) ;
#ifdef HSMHV2EVAL
cnst0over_dT = cnst0_dT * sqrt( pParam->HSMHV2_nover / here->HSMHV2_nsub ) ;
#endif
}
if ( pParam->HSMHV2_novers != 0.0 ) {
here->HSMHV2_cnst0overs = here->HSMHV2_cnst0 * sqrt( pParam->HSMHV2_novers / here->HSMHV2_nsub ) ;
#ifdef HSMHV2EVAL
cnst0overs_dT = cnst0_dT * sqrt( pParam->HSMHV2_novers / here->HSMHV2_nsub ) ;
#endif
}
} else {
if ( pParam->HSMHV2_nover != 0.0 ) {
here->HSMHV2_cnst0over = here->HSMHV2_cnst0 * sqrt( pParam->HSMHV2_nover / here->HSMHV2_ndepm ) ;
#ifdef HSMHV2EVAL
cnst0over_dT = cnst0_dT * sqrt( pParam->HSMHV2_nover / here->HSMHV2_ndepm ) ;
#endif
}
if ( pParam->HSMHV2_novers != 0.0 ) {
here->HSMHV2_cnst0overs = here->HSMHV2_cnst0 * sqrt( pParam->HSMHV2_novers / here->HSMHV2_ndepm ) ;
#ifdef HSMHV2EVAL
cnst0overs_dT = cnst0_dT * sqrt( pParam->HSMHV2_novers / here->HSMHV2_ndepm ) ;
#endif
}
}
/* temperature-dependent resistance model */
/* drain side */
if ( pParam->HSMHV2_rd > 0.0 ) {
T2 = here->HSMHV2_rdtemp0
* ( here->HSMHV2_ldrift1 * pParam->HSMHV2_rdslp1 * C_m2um + pParam->HSMHV2_rdict1 )
* ( here->HSMHV2_ldrift2 * model->HSMHV2_rdslp2 * C_m2um + model->HSMHV2_rdict2 ) ;
if ( model->HSMHV2_cotemp == 1 ) { /* without deltemp (COTEMP=1) */
here->HSMHV2_rd = ( pParam->HSMHV2_rd + modelMKS->HSMHV2_rdtemp1 * Tdiff0 + modelMKS->HSMHV2_rdtemp2 * Tdiff0_2 ) * T2 ;
Fn_SL( here->HSMHV2_rd, here->HSMHV2_rd, C_rdtemp_min * pParam->HSMHV2_rd, C_rdtemp_dlt * pParam->HSMHV2_rd, T0 );
#ifdef HSMHV2EVAL
Rd0_dT = 0.0 ;
#endif
} else { /* with deltemp (COTEMP=0,2,3) */
here->HSMHV2_rd = ( pParam->HSMHV2_rd + modelMKS->HSMHV2_rdtemp1 * Tdiff + modelMKS->HSMHV2_rdtemp2 * Tdiff_2 ) * T2 ;
Fn_SL( here->HSMHV2_rd, here->HSMHV2_rd, C_rdtemp_min * pParam->HSMHV2_rd, C_rdtemp_dlt * pParam->HSMHV2_rd, T0 );
#ifdef HSMHV2EVAL
Rd0_dT = ( modelMKS->HSMHV2_rdtemp1 + 2.0 * TTEMP * modelMKS->HSMHV2_rdtemp2 ) * T2 * T0 ;
#endif
}
} else {
here->HSMHV2_rd = 0.0 ;
}
/* source side (asymmetric case) */
if ( pParam->HSMHV2_rs > 0.0 ) {
T2 = here->HSMHV2_rdtemp0
* ( here->HSMHV2_ldrift1s * pParam->HSMHV2_rdslp1 * C_m2um + pParam->HSMHV2_rdict1 )
* ( here->HSMHV2_ldrift2s * model->HSMHV2_rdslp2 * C_m2um + model->HSMHV2_rdict2 ) ;
if ( model->HSMHV2_cotemp == 1 ) { /* without deltemp (COTEMP=1) */
here->HSMHV2_rs = ( pParam->HSMHV2_rs + modelMKS->HSMHV2_rdtemp1 * Tdiff0 + modelMKS->HSMHV2_rdtemp2 * Tdiff0_2 ) * T2 ;
Fn_SL( here->HSMHV2_rs, here->HSMHV2_rs, C_rdtemp_min * pParam->HSMHV2_rs, C_rdtemp_dlt * pParam->HSMHV2_rs, T0 );
#ifdef HSMHV2EVAL
Rs0_dT = 0.0 ;
#endif
} else { /* with deltemp (COTEMP=0,2,3) */
here->HSMHV2_rs = ( pParam->HSMHV2_rs + modelMKS->HSMHV2_rdtemp1 * Tdiff + modelMKS->HSMHV2_rdtemp2 * Tdiff_2 ) * T2 ;
Fn_SL( here->HSMHV2_rs, here->HSMHV2_rs, C_rdtemp_min * pParam->HSMHV2_rs, C_rdtemp_dlt * pParam->HSMHV2_rs, T0 );
#ifdef HSMHV2EVAL
Rs0_dT = ( modelMKS->HSMHV2_rdtemp1 + 2.0 * TTEMP * modelMKS->HSMHV2_rdtemp2 ) * T2 * T0 ;
#endif
}
} else {
here->HSMHV2_rs = 0.0 ;
}
if ( pParam->HSMHV2_rdvd > 0.0 ) {
T4 = here->HSMHV2_rdvdtemp0 * ( here->HSMHV2_ldrift1 * pParam->HSMHV2_rdslp1 * C_m2um + pParam->HSMHV2_rdict1 )
* ( here->HSMHV2_ldrift2 * model->HSMHV2_rdslp2 * C_m2um + model->HSMHV2_rdict2 ) ;
T1 = ( 1 - pParam->HSMHV2_rdov13 ) * here->HSMHV2_loverld * C_m2um ;
T0 = - model->HSMHV2_rdov11 / ( model->HSMHV2_rdov12 + small ) ;
T3 = ( T0 * here->HSMHV2_loverld * C_m2um + 1.0 + model->HSMHV2_rdov11 ) ;
Fn_SL( T5 , T3 * T4 , T4 , 10.0e-3 , T6 ) ;
Fn_SU( T7 , T5 , T4 * ( model->HSMHV2_rdov11 + 1.0) , 50.0e-6 , T6 ) ;
Fn_SL( T2 , T7 + T1 * T4 , 0, 50.0e-6 , T6 ) ;
if ( model->HSMHV2_cotemp == 0 || model->HSMHV2_cotemp == 1 ) { /* without deltemp (COTEMP=0,1) */
here->HSMHV2_rdvd = ( pParam->HSMHV2_rdvd + modelMKS->HSMHV2_rdvdtemp1 * Tdiff0 + modelMKS->HSMHV2_rdvdtemp2 * Tdiff0_2 ) * T2 ;
Fn_SL( here->HSMHV2_rdvd, here->HSMHV2_rdvd, C_rdtemp_min * pParam->HSMHV2_rdvd, C_rdtemp_dlt * pParam->HSMHV2_rdvd, T0 );
#ifdef HSMHV2EVAL
Rdvd_dT = 0.0 ;
#endif
} else { /* with deltemp (COTEMP=2,3) */
here->HSMHV2_rdvd = ( pParam->HSMHV2_rdvd + modelMKS->HSMHV2_rdvdtemp1 * Tdiff + modelMKS->HSMHV2_rdvdtemp2 * Tdiff_2 ) * T2 ;
Fn_SL( here->HSMHV2_rdvd, here->HSMHV2_rdvd, C_rdtemp_min * pParam->HSMHV2_rdvd, C_rdtemp_dlt * pParam->HSMHV2_rdvd, T0 );
#ifdef HSMHV2EVAL
Rdvd_dT = ( modelMKS->HSMHV2_rdvdtemp1 + 2.0 * TTEMP * modelMKS->HSMHV2_rdvdtemp2 ) * T2 * T0 ;
#endif
}
T4 = here->HSMHV2_rdvdtemp0 * ( here->HSMHV2_ldrift1s * pParam->HSMHV2_rdslp1 * C_m2um + pParam->HSMHV2_rdict1 )
* ( here->HSMHV2_ldrift2s * model->HSMHV2_rdslp2 * C_m2um + model->HSMHV2_rdict2 ) ;
T1 = ( 1 - pParam->HSMHV2_rdov13 ) * here->HSMHV2_lovers * C_m2um ;
T0 = - model->HSMHV2_rdov11 / ( model->HSMHV2_rdov12 + small ) ;
T3 = ( T0 * here->HSMHV2_lovers * C_m2um + 1.0 + model->HSMHV2_rdov11 ) ;
Fn_SL( T5 , T3 * T4 , T4 , 10.0e-3 , T6 ) ;
Fn_SU( T7 , T5 , T4 * ( model->HSMHV2_rdov11 + 1.0) , 50.0e-6 , T6 ) ;
Fn_SL( T2 , T7 + T1 * T4 , 0, 50.0e-6 , T6 ) ;
if ( model->HSMHV2_cotemp == 0 || model->HSMHV2_cotemp == 1 ) { /* without deltemp (COTEMP=0,1) */
here->HSMHV2_rsvd = ( pParam->HSMHV2_rdvd + modelMKS->HSMHV2_rdvdtemp1 * Tdiff0 + modelMKS->HSMHV2_rdvdtemp2 * Tdiff0_2 ) * T2 ;
Fn_SL( here->HSMHV2_rsvd, here->HSMHV2_rsvd, C_rdtemp_min * pParam->HSMHV2_rdvd, C_rdtemp_dlt * pParam->HSMHV2_rdvd, T0 );
#ifdef HSMHV2EVAL
Rsvd_dT = 0.0 ;
#endif
} else { /* with deltemp (COTEMP=2,3) */
here->HSMHV2_rsvd = ( pParam->HSMHV2_rdvd + modelMKS->HSMHV2_rdvdtemp1 * Tdiff + modelMKS->HSMHV2_rdvdtemp2 * Tdiff_2 ) * T2 ;
Fn_SL( here->HSMHV2_rsvd, here->HSMHV2_rsvd, C_rdtemp_min * pParam->HSMHV2_rdvd, C_rdtemp_dlt * pParam->HSMHV2_rdvd, T0 );
#ifdef HSMHV2EVAL
Rsvd_dT = ( modelMKS->HSMHV2_rdvdtemp1 + 2.0 * TTEMP * modelMKS->HSMHV2_rdvdtemp2 ) * T2 * T0 ;
#endif
}
} else {
here->HSMHV2_rdvd = 0.0 ;
here->HSMHV2_rsvd = 0.0 ;
}
/* costi0 and costi1 for STI transistor model (temperature-dependent part) */
here->HSMHV2_costi0 = here->HSMHV2_costi00 * sqrt(here->HSMHV2_beta_inv) ;
here->HSMHV2_costi0_p2 = here->HSMHV2_costi0 * here->HSMHV2_costi0 ;
here->HSMHV2_costi1 = here->HSMHV2_nin * here->HSMHV2_nin * here->HSMHV2_nsti_p2 ;
/* end of HSMHV2temp_eval.h */

View File

@ -0,0 +1,223 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvtemp_eval_dio.h
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#define small 1.0e-50
TTEMP = ckt->CKTtemp;
if ( here->HSMHV2_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV2_dtemp ; }
TTEMP0 = TTEMP ;
#ifdef HSMHV2EVAL
/* Self heating */
TTEMP = TTEMP + deltemp ;
#endif
/* Band gap */
T1 = TTEMP - model->HSMHV2_ktnom ;
T2 = TTEMP * TTEMP - model->HSMHV2_ktnom * model->HSMHV2_ktnom ;
Eg = here->HSMHV2_egtnom - pParam->HSMHV2_bgtmp1 * T1
- pParam->HSMHV2_bgtmp2 * T2 ;
#ifdef HSMHV2EVAL
Eg_dT = -pParam->HSMHV2_bgtmp1 - 2.0e0 * TTEMP * pParam->HSMHV2_bgtmp2 ;
#endif
/* Inverse of the thermal voltage */
here->HSMHV2_beta = beta = C_QE / (C_KB * TTEMP) ;
here->HSMHV2_beta_inv = 1.0 / beta ;
here->HSMHV2_beta2 = beta * beta ;
here->HSMHV2_betatnom = C_QE / (C_KB * model->HSMHV2_ktnom) ;
#ifdef HSMHV2EVAL
beta_dT=-C_QE/(C_KB*TTEMP*TTEMP);
beta_inv_dT = C_KB / C_QE ;
#endif
log_Tratio = log (here->HSMHV2_Tratio) ;
/* for substrate-drain junction diode. */
js = pParam->HSMHV2_js0d
* exp ((here->HSMHV2_egtnom * here->HSMHV2_betatnom - Eg * beta
+ model->HSMHV2_xtid * log_Tratio) / pParam->HSMHV2_njd) ;
jssw = pParam->HSMHV2_js0swd
* exp ((here->HSMHV2_egtnom * here->HSMHV2_betatnom - Eg * beta
+ model->HSMHV2_xtid * log_Tratio) / model->HSMHV2_njswd) ;
js2 = pParam->HSMHV2_js0d
* exp ((here->HSMHV2_egtnom * here->HSMHV2_betatnom - Eg * beta
+ model->HSMHV2_xti2d * log_Tratio) / pParam->HSMHV2_njd) ;
jssw2 = pParam->HSMHV2_js0swd
* exp ((here->HSMHV2_egtnom * here->HSMHV2_betatnom - Eg * beta
+ model->HSMHV2_xti2d * log_Tratio) / model->HSMHV2_njswd) ;
#ifdef HSMHV2EVAL
T0 = - Eg * beta_dT - Eg_dT * beta ; /* Self heating */
T1 = T0 + model->HSMHV2_xtid / TTEMP ; /* Self heating */
T2 = T0 + model->HSMHV2_xti2d / TTEMP ; /* Self heating */
js_dT = js * T1 / pParam->HSMHV2_njd; /* Self heating */
jssw_dT = jssw * T1/ model->HSMHV2_njswd ; /* Self heating */
js2_dT = js2 * T2 / pParam->HSMHV2_njd; /* Self heating */
jssw2_dT = jssw2 * T2 / model->HSMHV2_njswd; /* Self heating */
#endif
here->HSMHV2_isbd = here->HSMHV2_ad * js + here->HSMHV2_pd * jssw ;
here->HSMHV2_isbd2 = here->HSMHV2_ad * js2 + here->HSMHV2_pd * jssw2 ;
#ifdef HSMHV2EVAL
isbd_dT = here->HSMHV2_ad * js_dT + here->HSMHV2_pd * jssw_dT ; /* Self heating */
isbd2_dT = here->HSMHV2_ad * js2_dT + here->HSMHV2_pd * jssw2_dT ; /* Self heating */
#endif
T0 = here->HSMHV2_Tratio * here->HSMHV2_Tratio ;
T2 = here->HSMHV2_isbd + small ;
#ifdef HSMHV2EVAL
T1_dT = 1.0 / model->HSMHV2_ktnom ; /* Self heating */
T0_dT = 2.0 * here->HSMHV2_Tratio * T1_dT ; /* Self heating */
T2_dT = isbd_dT ; /* Self heating */
#endif
here->HSMHV2_vbdt = pParam->HSMHV2_njd / beta
* log ( pParam->HSMHV2_vdiffjd * T0 / T2 + 1.0 ) ;
here->HSMHV2_exptempd = exp (( here->HSMHV2_Tratio - 1.0 ) * model->HSMHV2_ctempd ) ;
#ifdef HSMHV2EVAL
vbdt_dT = - beta_dT / beta * here->HSMHV2_vbdt
+ pParam->HSMHV2_njd / beta * pParam->HSMHV2_vdiffjd / ( pParam->HSMHV2_vdiffjd * T0 / T2 + 1.0 )
* ( T0_dT / T2 - T0 / T2 / T2 * T2_dT ) ; /* Self heating */
#endif
here->HSMHV2_jd_nvtm_invd = 1.0 / ( pParam->HSMHV2_njd / beta ) ;
here->HSMHV2_jd_expcd = exp (here->HSMHV2_vbdt * here->HSMHV2_jd_nvtm_invd ) ;
#ifdef HSMHV2EVAL
exptempd_dT = model->HSMHV2_ctempd / model->HSMHV2_ktnom * here->HSMHV2_exptempd ; /* Self heating */
jd_nvtm_invd_dT = beta_dT / pParam->HSMHV2_njd ; /* Self heating */
jd_expcd_dT = here->HSMHV2_jd_expcd
* ( vbdt_dT * here->HSMHV2_jd_nvtm_invd + here->HSMHV2_vbdt * jd_nvtm_invd_dT ) ; /* Self heating */
#endif
/* for substrate-source junction diode. */
js = pParam->HSMHV2_js0s
* exp ((here->HSMHV2_egtnom * here->HSMHV2_betatnom - Eg * beta
+ model->HSMHV2_xtis * log_Tratio) / pParam->HSMHV2_njs) ;
jssw = pParam->HSMHV2_js0sws
* exp ((here->HSMHV2_egtnom * here->HSMHV2_betatnom - Eg * beta
+ model->HSMHV2_xtis * log_Tratio) / model->HSMHV2_njsws) ;
js2 = pParam->HSMHV2_js0s
* exp ((here->HSMHV2_egtnom * here->HSMHV2_betatnom - Eg * beta
+ model->HSMHV2_xti2s * log_Tratio) / pParam->HSMHV2_njs) ;
jssw2 = pParam->HSMHV2_js0sws
* exp ((here->HSMHV2_egtnom * here->HSMHV2_betatnom - Eg * beta
+ model->HSMHV2_xti2s * log_Tratio) / model->HSMHV2_njsws) ;
#ifdef HSMHV2EVAL
T0 = - Eg * beta_dT - Eg_dT * beta ; /* Self heating */
T1 = T0 + model->HSMHV2_xtis / TTEMP ; /* Self heating */
T2 = T0 + model->HSMHV2_xti2s / TTEMP ; /* Self heating */
js_dT = js * T1 / pParam->HSMHV2_njs; /* Self heating */
jssw_dT = jssw * T1/ model->HSMHV2_njsws ; /* Self heating */
js2_dT = js2 * T2 / pParam->HSMHV2_njs; /* Self heating */
jssw2_dT = jssw2 * T2 / model->HSMHV2_njsws; /* Self heating */
#endif
here->HSMHV2_isbs = here->HSMHV2_as * js + here->HSMHV2_ps * jssw ;
here->HSMHV2_isbs2 = here->HSMHV2_as * js2 + here->HSMHV2_ps * jssw2 ;
#ifdef HSMHV2EVAL
isbs_dT = here->HSMHV2_as * js_dT + here->HSMHV2_ps * jssw_dT ; /* Self heating */
isbs2_dT = here->HSMHV2_as * js2_dT + here->HSMHV2_ps * jssw2_dT ; /* Self heating */
#endif
T0 = here->HSMHV2_Tratio * here->HSMHV2_Tratio ;
T3 = here->HSMHV2_isbs + small ;
#ifdef HSMHV2EVAL
T1_dT = 1.0 / model->HSMHV2_ktnom ; /* Self heating */
T0_dT = 2.0 * here->HSMHV2_Tratio * T1_dT ; /* Self heating */
T3_dT = isbs_dT ; /* Self heating */
#endif
here->HSMHV2_vbst = pParam->HSMHV2_njs / beta
* log ( pParam->HSMHV2_vdiffjs * T0 / T3 + 1.0 ) ;
here->HSMHV2_exptemps = exp (( here->HSMHV2_Tratio - 1.0 ) * model->HSMHV2_ctemps ) ;
#ifdef HSMHV2EVAL
vbst_dT = - beta_dT / beta * here->HSMHV2_vbst
+ pParam->HSMHV2_njs / beta * pParam->HSMHV2_vdiffjs / ( pParam->HSMHV2_vdiffjs * T0 / T3 + 1.0 )
* ( T0_dT / T3 - T0 / T3 / T3 * T3_dT ) ; /* Self heating */
#endif
here->HSMHV2_jd_nvtm_invs = 1.0 / ( pParam->HSMHV2_njs / beta ) ;
here->HSMHV2_jd_expcs = exp (here->HSMHV2_vbst * here->HSMHV2_jd_nvtm_invs ) ;
#ifdef HSMHV2EVAL
exptemps_dT = model->HSMHV2_ctemps / model->HSMHV2_ktnom * here->HSMHV2_exptemps ; /* Self heating */
jd_nvtm_invs_dT = beta_dT / pParam->HSMHV2_njs ; /* Self heating */
jd_expcs_dT = here->HSMHV2_jd_expcs
* ( vbst_dT * here->HSMHV2_jd_nvtm_invs + here->HSMHV2_vbst * jd_nvtm_invs_dT ) ; /* Self heating */
#endif
/* end of HSMHV2temp_eval_dio.h */

View File

@ -0,0 +1,103 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvtemp_eval_rdri.h
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
TTEMP = ckt->CKTtemp;
if ( here->HSMHV2_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV2_dtemp ; }
TTEMP0 = TTEMP ;
#ifdef HSMHV2EVAL
/* Self heating */
TTEMP = TTEMP + deltemp ;
#endif
/* Phonon Scattering (temperature-dependent part) */
T1 = Fn_Pow ( here->HSMHV2_Tratio, model->HSMHV2_rdrmuetmp ) ;
here->HSMHV2_rdrmue = modelMKS->HSMHV2_rdrmue / T1 ;
#ifdef HSMHV2EVAL
T1_dT = model->HSMHV2_rdrmuetmp * Fn_Pow( here->HSMHV2_Tratio, model->HSMHV2_rdrmuetmp - 1.0 )
/ model->HSMHV2_ktnom ;
Mu0_dT = - modelMKS->HSMHV2_rdrmue / ( T1 * T1 ) * T1_dT ;
#endif
/* Velocity Temperature Dependence */
T0 = 1.8 + 0.4 * here->HSMHV2_Tratio + 0.1 * here->HSMHV2_Tratio * here->HSMHV2_Tratio - model->HSMHV2_rdrvtmp * ( 1.0 - here->HSMHV2_Tratio ) ;
#ifdef HSMHV2EVAL
T0_dT = 1 / model->HSMHV2_ktnom * ( 0.4 + 0.2 * here->HSMHV2_Tratio + model->HSMHV2_rdrvtmp ) ;
#endif
here->HSMHV2_rdrvmax = modelMKS->HSMHV2_rdrvmax / T0 ;
#ifdef HSMHV2EVAL
Vmax_dT = - modelMKS->HSMHV2_rdrvmax / ( T0 * T0 ) * T0_dT ;
#endif
here->HSMHV2_rdrcx = model->HSMHV2_rdrcx ;
here->HSMHV2_rdrcar = model->HSMHV2_rdrcar ;
#ifdef HSMHV2EVAL
Cx_dT = 0.0 ;
Car_dT = 0.0 ;
#endif
//Toshiba model //
here->HSMHV2_rdrbb = model->HSMHV2_rdrbb+model->HSMHV2_rdrbbtmp*(TTEMP-model->HSMHV2_ktnom) ;
#ifdef HSMHV2EVAL
Rdrbb_dT = model->HSMHV2_rdrbbtmp ;
#endif
/* end of HSMHV2temp_eval_rdri.h */

View File

@ -0,0 +1,101 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM_HV
( VERSION : 2 SUBVERSION : 2 REVISION : 0 )
Model Parameter 'VERSION' : 2.20
FILE : hsmhvtrunc.c
DATE : 2014.6.11
released by
Hiroshima University &
Semiconductor Technology Academic Research Center (STARC)
***********************************************************************/
/**********************************************************************
The following source code, and all copyrights, trade secrets or other
intellectual property rights in and to the source code in its entirety,
is owned by the Hiroshima University and the STARC organization.
All users need to follow the "HISIM_HV Distribution Statement and
Copyright Notice" attached to HiSIM_HV model.
-----HISIM_HV Distribution Statement and Copyright Notice--------------
Software is distributed as is, completely without warranty or service
support. Hiroshima University or STARC and its employees are not liable
for the condition or performance of the software.
Hiroshima University and STARC own the copyright and grant users a perpetual,
irrevocable, worldwide, non-exclusive, royalty-free license with respect
to the software as set forth below.
Hiroshima University and STARC hereby disclaims all implied warranties.
Hiroshima University and STARC grant the users the right to modify, copy,
and redistribute the software and documentation, both within the user's
organization and externally, subject to the following restrictions
1. The users agree not to charge for Hiroshima University and STARC code
itself but may charge for additions, extensions, or support.
2. In any product based on the software, the users agree to acknowledge
Hiroshima University and STARC that developed the software. This
acknowledgment shall appear in the product documentation.
3. The users agree to reproduce any copyright notice which appears on
the software on any copy or modification of such made available
to others."
Toshimasa Asahara, President, Hiroshima University
Mitiko Miura-Mattausch, Professor, Hiroshima University
Katsuhiro Shimohigashi, President&CEO, STARC
June 2008 (revised October 2011)
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsmhvdef.h"
#include "ngspice/sperror.h"
#include "ngspice/suffix.h"
int HSMHV2trunc(
GENmodel *inModel,
CKTcircuit *ckt,
double *timeStep)
{
HSMHV2model *model = (HSMHV2model*)inModel;
HSMHV2instance *here;
#ifdef STEPDEBUG
double debugtemp=0.0 ;
#endif /* STEPDEBUG */
for ( ;model != NULL ;model = model->HSMHV2nextModel ) {
for ( here=model->HSMHV2instances ;here!=NULL ;
here = here->HSMHV2nextInstance ) {
#ifdef STEPDEBUG
debugtemp = *timeStep;
#endif /* STEPDEBUG */
CKTterr(here->HSMHV2qb,ckt,timeStep);
CKTterr(here->HSMHV2qg,ckt,timeStep);
CKTterr(here->HSMHV2qd,ckt,timeStep);
CKTterr(here->HSMHV2qbs,ckt,timeStep);
CKTterr(here->HSMHV2qbd,ckt,timeStep);
CKTterr(here->HSMHV2qfd,ckt,timeStep);
CKTterr(here->HSMHV2qfs,ckt,timeStep);
#ifdef STEPDEBUG
if ( debugtemp != *timeStep )
printf("device %s reduces step from %g to %g\n",
here->HSMHV2name, debugtemp, *timeStep);
#endif /* STEPDEBUG */
}
}
return(OK);
}

View File

@ -150,7 +150,8 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current)
(thismodel->INPmodType != INPtypelook ("B3SOIPD")) &&
(thismodel->INPmodType != INPtypelook ("B3SOIFD")) &&
(thismodel->INPmodType != INPtypelook ("B3SOIDD")) &&
(thismodel->INPmodType != INPtypelook ("HiSIMHV")) &&
(thismodel->INPmodType != INPtypelook ("HiSIMHV1")) &&
(thismodel->INPmodType != INPtypelook ("HiSIMHV2")) &&
(thismodel->INPmodType != INPtypelook ("SOI3"))
) {
/* if model is not variable node B3SOIPD/FD/DD or STAG model, error! */
@ -169,7 +170,8 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current)
(thismodel->INPmodType != INPtypelook ("B3SOIPD")) &&
(thismodel->INPmodType != INPtypelook ("B3SOIFD")) &&
(thismodel->INPmodType != INPtypelook ("B3SOIDD")) &&
(thismodel->INPmodType != INPtypelook ("HiSIMHV")) &&
(thismodel->INPmodType != INPtypelook ("HiSIMHV1")) &&
(thismodel->INPmodType != INPtypelook ("HiSIMHV2")) &&
(thismodel->INPmodType != INPtypelook ("SOI3"))
) {
/* if model is not variable node B3SOIPD/FD/DD model, error! */
@ -237,7 +239,8 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current)
&& thismodel->INPmodType != INPtypelook ("psp102")
#endif
&& thismodel->INPmodType != INPtypelook ("HiSIM2")
&& thismodel->INPmodType != INPtypelook ("HiSIMHV")
&& thismodel->INPmodType != INPtypelook ("HiSIMHV1")
&& thismodel->INPmodType != INPtypelook ("HiSIMHV2")
) {
LITERR ("incorrect model type");
return;

View File

@ -402,11 +402,15 @@ char *INPdomodel(CKTcircuit *ckt, card * image, INPtables * tab)
}
break;
case 73:
type = INPtypelook("HiSIMHV");
err = INPfindVer(line, ver); /* mapping of minor versions >= 1.1 are included */
if ((prefix("1.1", ver)) || (prefix("1.2", ver))) {
type = INPtypelook("HiSIMHV1");
}
if ( (strstr(ver, "default")) || (prefix("2.0", ver)) || (prefix("2.1", ver)) || (prefix("2.2", ver)) ) {
type = INPtypelook("HiSIMHV2");
}
if (type < 0) {
err =
INPmkTemp
("Placeholder: Device type HiSIMHV not available in this binary\n");
err = tprintf("Device type HiSIMHV version %s not available in this binary\n", ver);
}
break;
default: /* placeholder; use level xxx for the next model */

View File

@ -226,7 +226,8 @@ INPgetModBin( CKTcircuit* ckt, char* name, INPmodel** model, INPtables* tab, cha
&& modtmp->INPmodType != INPtypelook ("BSIM4v6")
&& modtmp->INPmodType != INPtypelook ("BSIM4v7")
&& modtmp->INPmodType != INPtypelook ("HiSIM2")
&& modtmp->INPmodType != INPtypelook ("HiSIMHV")
&& modtmp->INPmodType != INPtypelook ("HiSIMHV1")
&& modtmp->INPmodType != INPtypelook ("HiSIMHV2")
) continue; /* We left the loop if the model is not in the list */
if (modtmp->INPmodType < 0) { /* First check for illegal model type */