Browse Source

update hisim model to version 2.8.0

pre-master-46
dwarning 11 years ago
parent
commit
339e7fe819
  1. 1
      src/spicelib/devices/hisim2/Makefile.am
  2. 6
      src/spicelib/devices/hisim2/hisim2.h
  3. 87
      src/spicelib/devices/hisim2/hsm2.c
  4. 45
      src/spicelib/devices/hisim2/hsm2acld.c
  5. 45
      src/spicelib/devices/hisim2/hsm2ask.c
  6. 45
      src/spicelib/devices/hisim2/hsm2cvtest.c
  7. 165
      src/spicelib/devices/hisim2/hsm2def.h
  8. 45
      src/spicelib/devices/hisim2/hsm2del.c
  9. 45
      src/spicelib/devices/hisim2/hsm2dest.c
  10. 908
      src/spicelib/devices/hisim2/hsm2eval.c
  11. 2112
      src/spicelib/devices/hisim2/hsm2eval_dep.h
  12. 6
      src/spicelib/devices/hisim2/hsm2evalenv.h
  13. 6
      src/spicelib/devices/hisim2/hsm2ext.h
  14. 45
      src/spicelib/devices/hisim2/hsm2getic.c
  15. 2
      src/spicelib/devices/hisim2/hsm2init.c
  16. 50
      src/spicelib/devices/hisim2/hsm2ld.c
  17. 163
      src/spicelib/devices/hisim2/hsm2mask.c
  18. 45
      src/spicelib/devices/hisim2/hsm2mdel.c
  19. 195
      src/spicelib/devices/hisim2/hsm2mpar.c
  20. 45
      src/spicelib/devices/hisim2/hsm2noi.c
  21. 45
      src/spicelib/devices/hisim2/hsm2par.c
  22. 10
      src/spicelib/devices/hisim2/hsm2pzld.c
  23. 251
      src/spicelib/devices/hisim2/hsm2set.c
  24. 221
      src/spicelib/devices/hisim2/hsm2temp.c
  25. 46
      src/spicelib/devices/hisim2/hsm2trunc.c

1
src/spicelib/devices/hisim2/Makefile.am

@ -14,6 +14,7 @@ libhisim2_la_SOURCES = hisim2.h \
hsm2dest.c \
hsm2eval.c \
hsm2evalenv.h \
hsm2eval_dep.h \
hsm2ext.h \
hsm2getic.c \
hsm2init.c \

6
src/spicelib/devices/hisim2/hisim2.h

@ -1,14 +1,14 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hisim2.h
Date : 2012.10.25
Date : 2014.6.5
released by
Hiroshima University &

87
src/spicelib/devices/hisim2/hsm2.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/devdefs.h"
#include "hsm2def.h"
@ -98,7 +137,7 @@ IFparm HSM2mPTable[] = { /* model parameters */
IOP("level", HSM2_MOD_LEVEL, IF_INTEGER, ""),
IOP("info", HSM2_MOD_INFO, IF_INTEGER, "information level (for debug, etc.)"),
IOP("noise", HSM2_MOD_NOISE, IF_INTEGER, "noise model selector"),
IOP("version", HSM2_MOD_VERSION, IF_INTEGER, "model version 220"),
IOP("version", HSM2_MOD_VERSION, IF_INTEGER, "model version 280"),
IOP("show", HSM2_MOD_SHOW, IF_INTEGER, "show physical value"),
IOP("corsrd", HSM2_MOD_CORSRD, IF_INTEGER, "solve equations accounting Rs and Rd."),
IOP("corg", HSM2_MOD_CORG, IF_INTEGER, "solve equations accounting Rg."),
@ -120,7 +159,9 @@ IFparm HSM2mPTable[] = { /* model parameters */
IOP("coqy", HSM2_MOD_COQY, IF_INTEGER, "calculate lateral-field-induced charge/capacitance"),
IOP("coqovsm", HSM2_MOD_COQOVSM, IF_INTEGER, "select smoothing method of Qover"),
IOP("coerrrep", HSM2_MOD_COERRREP, IF_INTEGER, "selector for error report"),
IOP("vmax", HSM2_MOD_VMAX, IF_REAL, "saturation velocity [cm/s"),
IOP("codep", HSM2_MOD_CODEP, IF_INTEGER, "selector for depletion device"),
IOP("coddlt", HSM2_MOD_CODDLT, IF_INTEGER, "selector for ddlt model "),
IOP("vmax", HSM2_MOD_VMAX, IF_REAL, "saturation velocity [cm/s]"),
IOP("bgtmp1", HSM2_MOD_BGTMP1, IF_REAL, "first order temp. coeff. for band gap [V/K]"),
IOP("bgtmp2", HSM2_MOD_BGTMP2, IF_REAL, "second order temp. coeff. for band gap [V/K^2]"),
IOP("eg0", HSM2_MOD_EG0, IF_REAL, ""),
@ -190,6 +231,8 @@ IFparm HSM2mPTable[] = { /* model parameters */
IOP("ndepwp", HSM2_MOD_NDEPWP, IF_REAL, "coeff. of Qbm for Eeff [-]"),
IOP("ninv", HSM2_MOD_NINV, IF_REAL, "coeff. of Qnm for Eeff [-]"),
IOP("ninvd", HSM2_MOD_NINVD, IF_REAL, "modification of Vdse dependence on Eeff [1/V]"),
IOP("ninvdl", HSM2_MOD_NINVDL, IF_REAL, " LG dependence of NINVD "),
IOP("ninvdlp", HSM2_MOD_NINVDLP, IF_REAL, " LG dependence of NINVD "),
IOP("muecb0", HSM2_MOD_MUECB0, IF_REAL, "const. part of coulomb scattering [cm^2/Vs]"),
IOP("muecb1", HSM2_MOD_MUECB1, IF_REAL, "coeff. for coulomb scattering [cm^2/Vs]"),
IOP("mueph0", HSM2_MOD_MUEPH0, IF_REAL, "power of Eeff for phonon scattering [-]"),
@ -387,6 +430,40 @@ IFparm HSM2mPTable[] = { /* model parameters */
IOP("muecb0lp", HSM2_MOD_MUECB0LP, IF_REAL, "L dependence of MUECB0"),
IOP("muecb1lp", HSM2_MOD_MUECB1LP, IF_REAL, "L dependence of MUECB1"),
/* Depletion Mode MOSFET */
IOP("ndepm", HSM2_MOD_NDEPM, IF_REAL, "N- layer concentlation of the depletion MOS model"),
IOP("ndepml", HSM2_MOD_NDEPML, IF_REAL, "L dependence of NDEPM "),
IOP("ndepmlp", HSM2_MOD_NDEPMLP, IF_REAL, "L dependence of NDEPM "),
IOP("tndep", HSM2_MOD_TNDEP, IF_REAL, "N- layer depth of the depletion MOS model"),
IOP("depleak", HSM2_MOD_DEPLEAK, IF_REAL, "leakage current modification parameter for the depletion MOS model"),
IOP("depleakl", HSM2_MOD_DEPLEAKL, IF_REAL, "L dependence of DEPLEAK"),
IOP("depleaklp", HSM2_MOD_DEPLEAKLP, IF_REAL, "L dependence of DEPLEAK"),
IOP("depeta", HSM2_MOD_DEPETA, IF_REAL, "Vds dependence of threshold voltage for the depletion MOS model"),
IOP("depmue0", HSM2_MOD_DEPMUE0, IF_REAL, " [-]"),
IOP("depmue0l", HSM2_MOD_DEPMUE0L, IF_REAL, " [-]"),
IOP("depmue0lp", HSM2_MOD_DEPMUE0LP, IF_REAL, " [-]"),
IOP("depmue1", HSM2_MOD_DEPMUE1, IF_REAL, " [-]"),
IOP("depmue1l", HSM2_MOD_DEPMUE1L, IF_REAL, " [-]"),
IOP("depmue1lp", HSM2_MOD_DEPMUE1LP, IF_REAL, " [-]"),
IOP("depmueback0", HSM2_MOD_DEPMUEBACK0, IF_REAL, " [-]"),
IOP("depmueback0l", HSM2_MOD_DEPMUEBACK0L, IF_REAL, " [-]"),
IOP("depmueback0lp", HSM2_MOD_DEPMUEBACK0LP, IF_REAL, " [-]"),
IOP("depmueback1", HSM2_MOD_DEPMUEBACK1, IF_REAL, " [-]"),
IOP("depmueback1l", HSM2_MOD_DEPMUEBACK1L, IF_REAL, " [-]"),
IOP("depmueback1lp", HSM2_MOD_DEPMUEBACK1LP, IF_REAL, " [-]"),
IOP("depmueph0", HSM2_MOD_DEPMUEPH0, IF_REAL, " [-]"),
IOP("depmueph1", HSM2_MOD_DEPMUEPH1, IF_REAL, " [-]"),
IOP("depvmax", HSM2_MOD_DEPVMAX, IF_REAL, " [-]"),
IOP("depvmaxl", HSM2_MOD_DEPVMAXL, IF_REAL, " [-]"),
IOP("depvmaxlp", HSM2_MOD_DEPVMAXLP, IF_REAL, " [-]"),
IOP("depvdsef1", HSM2_MOD_DEPVDSEF1, IF_REAL, " [-]"),
IOP("depvdsef1l", HSM2_MOD_DEPVDSEF1L, IF_REAL, " [-]"),
IOP("depvdsef1lp", HSM2_MOD_DEPVDSEF1LP, IF_REAL, " [-]"),
IOP("depvdsef2", HSM2_MOD_DEPVDSEF2, IF_REAL, " [-]"),
IOP("depvdsef2l", HSM2_MOD_DEPVDSEF2L, IF_REAL, " [-]"),
IOP("depvdsef2lp", HSM2_MOD_DEPVDSEF2LP, IF_REAL, " [-]"),
IOP("depbb", HSM2_MOD_DEPBB, IF_REAL, " [-]"),
IOP("depmuetmp", HSM2_MOD_DEPMUETMP, IF_REAL, " [-]"),
/* binning parameters */
IOP("lmin", HSM2_MOD_LMIN, IF_REAL, "Minimum length for the model"),

45
src/spicelib/devices/hisim2/hsm2acld.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2acld.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "ngspice/sperror.h"

45
src/spicelib/devices/hisim2/hsm2ask.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2ask.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/ifsim.h"
#include "ngspice/cktdefs.h"

45
src/spicelib/devices/hisim2/hsm2cvtest.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2cvtest.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsm2def.h"

165
src/spicelib/devices/hisim2/hsm2def.h

@ -1,14 +1,14 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2def.h
Date : 2012.10.25
Date : 2014.6.5
released by
Hiroshima University &
@ -50,6 +50,7 @@ typedef struct sHSM2modelMKSParam {
double HSM2_cit ;
double HSM2_ovslp ;
double HSM2_dly3 ;
double HSM2_ndepm ;
} HSM2modelMKSParam ;
/* binning parameters */
@ -331,9 +332,18 @@ typedef struct sHSM2instance {
double HSM2_Qb_dVgs ;
double HSM2_Qb_dVds ;
double HSM2_Qb_dVbs ;
double HSM2_alpha;
/* internal variables */
double HSM2_depleak ;
double HSM2_depvmax ;
double HSM2_depmphn0 ;
double HSM2_depmphn1 ;
double HSM2_depmue0 ;
double HSM2_depmue1 ;
double HSM2_depmueback0 ;
double HSM2_depmueback1 ;
double HSM2_depvdsef1 ;
double HSM2_depvdsef2 ;
double HSM2_eg ;
double HSM2_beta ;
double HSM2_beta_inv ;
@ -343,6 +353,8 @@ typedef struct sHSM2instance {
double HSM2_egp12 ;
double HSM2_egp32 ;
double HSM2_lgate ;
double HSM2_wgate ;
double HSM2_lg ;
double HSM2_wg ;
double HSM2_mueph ;
double HSM2_mphn0 ;
@ -404,6 +416,7 @@ typedef struct sHSM2instance {
int HSM2_flg_pgd ;
double HSM2_ndep_o_esi ;
double HSM2_ninv_o_esi ;
double HSM2_ninvd ;
double HSM2_cqyb0 ;
double HSM2_cnst0over ;
double HSM2_costi00 ;
@ -412,7 +425,7 @@ typedef struct sHSM2instance {
double HSM2_costi0_p2 ;
double HSM2_costi1 ;
double HSM2_pb2over ; /* for Qover model */
double HSM2_ps0ldinib ;
//double HSM2_ps0ldinib ;
double HSM2_ptl0;
double HSM2_pt40;
double HSM2_gdl0;
@ -422,6 +435,10 @@ typedef struct sHSM2instance {
double HSM2_mueph1 ;
double HSM2_nsubp ;
double HSM2_nsubc ;
/* Depletion Mode MOSFET */
double HSM2_ndepm ;
double HSM2_Pb2n ;
double HSM2_Vbipn ;
HSM2hereMKSParam hereMKS ; /* unit-converted parameters */
HSM2binningParam pParam ; /* binning parameters */
@ -670,14 +687,11 @@ typedef struct sHSM2model { /* model structure for a resistor */
HSM2instance * HSM2instances; /* pointer to list of instances
that have this model */
IFuid HSM2modName; /* pointer to the name of this model */
/* --- end of generic struct GENmodel --- */
int HSM2_type; /* device type: 1 = nmos, -1 = pmos */
int HSM2_level; /* level */
int HSM2_info; /* information */
int HSM2_noise; /* noise model selecter see hsm2noi.c */
int HSM2_version; /* model version 200 */
int HSM2_version; /* model version 2.80 */
int HSM2_show; /* show physical value 1, 2, ... , 11 */
/* flags for initial guess */
@ -701,6 +715,8 @@ typedef struct sHSM2model { /* model structure for a resistor */
int HSM2_coqy;
int HSM2_coqovsm ;
int HSM2_coerrrep;
int HSM2_codep;
int HSM2_coddlt; /* add in version 2.80 */
/* HiSIM original */
double HSM2_vmax ;
@ -773,6 +789,8 @@ typedef struct sHSM2model { /* model structure for a resistor */
double HSM2_ndepwp ;
double HSM2_ninv ;
double HSM2_ninvd ;
double HSM2_ninvdl ;
double HSM2_ninvdlp ;
double HSM2_muecb0 ;
double HSM2_muecb1 ;
double HSM2_mueph1 ;
@ -962,6 +980,40 @@ typedef struct sHSM2model { /* model structure for a resistor */
double HSM2_muecb0lp;
double HSM2_muecb1lp;
/* Depletion Mode MOSFET */
double HSM2_ndepm ;
double HSM2_ndepml ;
double HSM2_ndepmlp ;
double HSM2_tndep ;
double HSM2_depleak ;
double HSM2_depleakl ;
double HSM2_depleaklp ;
double HSM2_depmue0;
double HSM2_depmue0l;
double HSM2_depmue0lp;
double HSM2_depmue1;
double HSM2_depmue1l;
double HSM2_depmue1lp;
double HSM2_depmueback0;
double HSM2_depmueback0l;
double HSM2_depmueback0lp;
double HSM2_depmueback1;
double HSM2_depmueback1l;
double HSM2_depmueback1lp;
double HSM2_depmueph0;
double HSM2_depmueph1;
double HSM2_depvmax;
double HSM2_depvmaxl;
double HSM2_depvmaxlp;
double HSM2_depvdsef1;
double HSM2_depvdsef1l;
double HSM2_depvdsef1lp;
double HSM2_depvdsef2;
double HSM2_depvdsef2l;
double HSM2_depvdsef2lp;
double HSM2_depbb;
double HSM2_depmuetmp;
double HSM2_depeta ;
/* binning parameters */
double HSM2_lmin ;
@ -1202,6 +1254,8 @@ typedef struct sHSM2model { /* model structure for a resistor */
double HSM2_qme12 ;
double HSM2_ktnom ;
int HSM2_bypass_enable ;
//int HSM2_subversion ;
//int HSM2_revision ;
double HSM2vgsMax;
double HSM2vgdMax;
@ -1244,6 +1298,8 @@ typedef struct sHSM2model { /* model structure for a resistor */
unsigned HSM2_coqy_Given :1;
unsigned HSM2_coqovsm_Given :1;
unsigned HSM2_coerrrep_Given :1;
unsigned HSM2_codep_Given :1;
unsigned HSM2_coddlt_Given :1;
unsigned HSM2_kappa_Given :1;
unsigned HSM2_vdiffj_Given :1;
unsigned HSM2_vmax_Given :1;
@ -1316,6 +1372,8 @@ typedef struct sHSM2model { /* model structure for a resistor */
unsigned HSM2_ndepwp_Given :1;
unsigned HSM2_ninv_Given :1;
unsigned HSM2_ninvd_Given :1;
unsigned HSM2_ninvdl_Given :1;
unsigned HSM2_ninvdlp_Given :1;
unsigned HSM2_muecb0_Given :1;
unsigned HSM2_muecb1_Given :1;
unsigned HSM2_mueph1_Given :1;
@ -1504,6 +1562,41 @@ typedef struct sHSM2model { /* model structure for a resistor */
unsigned HSM2_muecb0lp_Given :1;
unsigned HSM2_muecb1lp_Given :1;
/* Depletion Mode MOSFET */
unsigned HSM2_ndepm_Given :1;
unsigned HSM2_ndepml_Given :1;
unsigned HSM2_ndepmlp_Given :1;
unsigned HSM2_tndep_Given :1;
unsigned HSM2_depleak_Given :1;
unsigned HSM2_depleakl_Given :1;
unsigned HSM2_depleaklp_Given :1;
unsigned HSM2_depmue0_Given :1;
unsigned HSM2_depmue0l_Given :1;
unsigned HSM2_depmue0lp_Given :1;
unsigned HSM2_depmue1_Given :1;
unsigned HSM2_depmue1l_Given :1;
unsigned HSM2_depmue1lp_Given :1;
unsigned HSM2_depmueback0_Given :1;
unsigned HSM2_depmueback0l_Given :1;
unsigned HSM2_depmueback0lp_Given :1;
unsigned HSM2_depmueback1_Given :1;
unsigned HSM2_depmueback1l_Given :1;
unsigned HSM2_depmueback1lp_Given :1;
unsigned HSM2_depmueph0_Given :1;
unsigned HSM2_depmueph1_Given :1;
unsigned HSM2_depvmax_Given :1;
unsigned HSM2_depvmaxl_Given :1;
unsigned HSM2_depvmaxlp_Given :1;
unsigned HSM2_depvdsef1_Given :1;
unsigned HSM2_depvdsef1l_Given :1;
unsigned HSM2_depvdsef1lp_Given :1;
unsigned HSM2_depvdsef2_Given :1;
unsigned HSM2_depvdsef2l_Given :1;
unsigned HSM2_depvdsef2lp_Given :1;
unsigned HSM2_depbb_Given :1;
unsigned HSM2_depmuetmp_Given :1;
unsigned HSM2_depeta_Given :1;
/* binning parameters */
unsigned HSM2_lmin_Given :1;
unsigned HSM2_lmax_Given :1;
@ -1781,6 +1874,9 @@ typedef struct sHSM2model { /* model structure for a resistor */
#define HSM2_MOD_COQY 38
#define HSM2_MOD_COQOVSM 39
#define HSM2_MOD_COERRREP 153
#define HSM2_MOD_CODEP 45
#define HSM2_MOD_CODDLT 40
/* device parameters */
#define HSM2_L 51
#define HSM2_W 52
@ -1882,6 +1978,8 @@ typedef struct sHSM2model { /* model structure for a resistor */
#define HSM2_MOD_NDEPWP 470
#define HSM2_MOD_NINV 130
#define HSM2_MOD_NINVD 300
#define HSM2_MOD_NINVDL 301
#define HSM2_MOD_NINVDLP 302
#define HSM2_MOD_MUECB0 131
#define HSM2_MOD_MUECB1 132
#define HSM2_MOD_MUEPH1 133
@ -2065,15 +2163,50 @@ typedef struct sHSM2model { /* model structure for a resistor */
/* val symbol for WPE */
#define HSM2_MOD_WEB 88
#define HSM2_MOD_WEC 89
#define HSM2_MOD_NSUBCWPE 91
#define HSM2_MOD_NPEXTWPE 41
#define HSM2_MOD_NSUBPWPE 43
#define HSM2_MOD_NSUBCWPE 91
#define HSM2_MOD_NPEXTWPE 41
#define HSM2_MOD_NSUBPWPE 43
#define HSM2_MOD_VGSMIN 466
#define HSM2_MOD_SC3VBS 467
#define HSM2_MOD_BYPTOL 468
#define HSM2_MOD_MUECB0LP 473
#define HSM2_MOD_MUECB1LP 474
#define HSM2_MOD_MUECB0LP 473
#define HSM2_MOD_MUECB1LP 474
#define HSM2_MOD_NDEPM 600
#define HSM2_MOD_NDEPML 610
#define HSM2_MOD_NDEPMLP 611
#define HSM2_MOD_TNDEP 601
#define HSM2_MOD_DEPLEAK 608
#define HSM2_MOD_DEPLEAKL 614
#define HSM2_MOD_DEPLEAKLP 615
#define HSM2_MOD_DEPETA 609
#define HSM2_MOD_DEPMUE0 275
#define HSM2_MOD_DEPMUE0L 276
#define HSM2_MOD_DEPMUE0LP 277
#define HSM2_MOD_DEPMUE1 278
#define HSM2_MOD_DEPMUE1L 279
#define HSM2_MOD_DEPMUE1LP 280
#define HSM2_MOD_DEPMUEBACK0 288
#define HSM2_MOD_DEPMUEBACK0L 289
#define HSM2_MOD_DEPMUEBACK0LP 291
#define HSM2_MOD_DEPMUEBACK1 293
#define HSM2_MOD_DEPMUEBACK1L 294
#define HSM2_MOD_DEPMUEBACK1LP 295
#define HSM2_MOD_DEPMUEPH0 296
#define HSM2_MOD_DEPMUEPH1 297
#define HSM2_MOD_DEPVMAX 298
#define HSM2_MOD_DEPVMAXL 299
#define HSM2_MOD_DEPVMAXLP 313
#define HSM2_MOD_DEPVDSEF1 314
#define HSM2_MOD_DEPVDSEF1L 315
#define HSM2_MOD_DEPVDSEF1LP 316
#define HSM2_MOD_DEPVDSEF2 317
#define HSM2_MOD_DEPVDSEF2L 318
#define HSM2_MOD_DEPVDSEF2LP 319
#define HSM2_MOD_DEPBB 320
#define HSM2_MOD_DEPMUETMP 321
/* binning parameters */
#define HSM2_MOD_LMIN 1000
@ -2389,10 +2522,14 @@ typedef struct sHSM2model { /* model structure for a resistor */
#include "hsm2ext.h"
/*
#ifdef __STDC__
extern void HSM2evaluate(double,double,double,HSM2instance*,HSM2model*,
double*,double*,double*, double*, double*, double*, double*,
double*, double*, double*, double*, double*, double*, double*,
double*, double*, double*, double*, CKTcircuit*);
#else
extern void HSM2evaluate();
#endif
*/
#endif /*HSM2*/

45
src/spicelib/devices/hisim2/hsm2del.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2del.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsm2def.h"
#include "ngspice/sperror.h"

45
src/spicelib/devices/hisim2/hsm2dest.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2dest.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsm2def.h"
#include "ngspice/suffix.h"

908
src/spicelib/devices/hisim2/hsm2eval.c
File diff suppressed because it is too large
View File

2112
src/spicelib/devices/hisim2/hsm2eval_dep.h
File diff suppressed because it is too large
View File

6
src/spicelib/devices/hisim2/hsm2evalenv.h

@ -1,14 +1,14 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2evalenv.h
Date : 2012.10.25
Date : 2014.6.5
released by
Hiroshima University &

6
src/spicelib/devices/hisim2/hsm2ext.h

@ -1,14 +1,14 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2ext.h
Date : 2012.10.25
Date : 2014.6.5
released by
Hiroshima University &

45
src/spicelib/devices/hisim2/hsm2getic.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2getic.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsm2def.h"

2
src/spicelib/devices/hisim2/hsm2init.c

@ -8,7 +8,7 @@
SPICEdev HSM2info = {
{ "HiSIM2",
"Hiroshima University STARC IGFET Model 2.7.0",
"Hiroshima University STARC IGFET Model 2.8.0",
&HSM2nSize,
&HSM2nSize,

50
src/spicelib/devices/hisim2/hsm2ld.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2ld.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsm2def.h"
@ -236,7 +275,7 @@ int HSM2LoadOMP(HSM2instance *here, CKTcircuit *ckt)
double ivds=0.0, ivgs=0.0, ivbs=0.0 ;
double gjbs=0.0, gjbd=0.0, gcdbdb=0.0, gcsbsb=0.0, gcbbb=0.0, gcdbb=0.0, gcsbb=0.0, grg=0.0 ;
double vdbs=0.0, vsbs=0.0, vdbd=0.0, delvdbs=0.0, delvsbs=0.0, delvdbd=0.0 ;
double vges=0.0, vged=0.0, delvges=0.0,/* delvged=0.0,*/ vgedo=0.0 ;
double vges=0.0, vged=0.0, delvges=0.0, delvged=0.0, vgedo=0.0 ;
double vsbdo=0.0, vsbd=0.0;
double vbs_jct=0.0, vbd_jct=0.0, delvbs_jct=0.0, delvbd_jct=0.0 ;
int ByPass=0, Check=0, Check1=0, Check2=0 ;
@ -260,7 +299,6 @@ int HSM2LoadOMP(HSM2instance *here, CKTcircuit *ckt)
tm0 = gtodsecld() ;
#endif
#ifdef USE_OMP
model = here->HSM2modPtr;
reltol = ckt->CKTreltol * BYP_TOL_FACTOR ;
@ -410,7 +448,7 @@ tm0 = gtodsecld() ;
delvsbs = vsbs - *(ckt->CKTstate0 + here->HSM2vsbs);
delvdbd = vdbd - *(ckt->CKTstate0 + here->HSM2vdbd);
delvgd = vgd - vgdo;
/* delvged = vged - vgedo;*/
delvged = vged - vgedo;
delvbd_jct = (!here->HSM2_corbnet) ? delvbd : delvdbd;
delvbs_jct = (!here->HSM2_corbnet) ? delvbs : delvsbs;

163
src/spicelib/devices/hisim2/hsm2mask.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2mask.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/ifsim.h"
#include "ngspice/cktdefs.h"
@ -115,6 +154,13 @@ int HSM2mAsk(
case HSM2_MOD_COERRREP:
value->iValue = model->HSM2_coerrrep;
return(OK);
case HSM2_MOD_CODEP:
value->iValue = model->HSM2_codep;
return(OK);
case HSM2_MOD_CODDLT:
value->iValue = model->HSM2_coddlt;
return(OK);
case HSM2_MOD_VMAX:
value->rValue = model->HSM2_vmax;
return(OK);
@ -298,9 +344,7 @@ int HSM2mAsk(
case HSM2_MOD_PGD2:
value->rValue = model->HSM2_pgd2;
return(OK);
//case HSM2_MOD_PGD3:
// value->rValue = model->HSM2_pgd3;
// return(OK);
case HSM2_MOD_PGD4:
value->rValue = model->HSM2_pgd4;
return(OK);
@ -325,6 +369,12 @@ int HSM2mAsk(
case HSM2_MOD_NINVD:
value->rValue = model->HSM2_ninvd;
return(OK);
case HSM2_MOD_NINVDL:
value->rValue = model->HSM2_ninvdl;
return(OK);
case HSM2_MOD_NINVDLP:
value->rValue = model->HSM2_ninvdlp;
return(OK);
case HSM2_MOD_MUECB0:
value->rValue = model->HSM2_muecb0;
return(OK);
@ -883,6 +933,107 @@ int HSM2mAsk(
value->rValue = model->HSM2_muecb1lp;
return(OK);
/* Depletion Mode MOSFET */
case HSM2_MOD_NDEPM:
value->rValue = model->HSM2_ndepm;
return(OK);
case HSM2_MOD_NDEPML:
value->rValue = model->HSM2_ndepml;
return(OK);
case HSM2_MOD_NDEPMLP:
value->rValue = model->HSM2_ndepmlp;
return(OK);
case HSM2_MOD_TNDEP:
value->rValue = model->HSM2_tndep;
return(OK);
case HSM2_MOD_DEPLEAK:
value->rValue = model->HSM2_depleak;
return(OK);
case HSM2_MOD_DEPLEAKL:
value->rValue = model->HSM2_depleakl;
return(OK);
case HSM2_MOD_DEPLEAKLP:
value->rValue = model->HSM2_depleaklp;
return(OK);
case HSM2_MOD_DEPETA:
value->rValue = model->HSM2_depeta;
return(OK);
case HSM2_MOD_DEPMUE0:
value->rValue = model->HSM2_depmue0;
return(OK);
case HSM2_MOD_DEPMUE0L:
value->rValue = model->HSM2_depmue0l;
return(OK);
case HSM2_MOD_DEPMUE0LP:
value->rValue = model->HSM2_depmue0lp;
return(OK);
case HSM2_MOD_DEPMUE1:
value->rValue = model->HSM2_depmue1;
return(OK);
case HSM2_MOD_DEPMUE1L:
value->rValue = model->HSM2_depmue1l;
return(OK);
case HSM2_MOD_DEPMUE1LP:
value->rValue = model->HSM2_depmue1lp;
return(OK);
case HSM2_MOD_DEPMUEBACK0:
value->rValue = model->HSM2_depmueback0;
return(OK);
case HSM2_MOD_DEPMUEBACK0L:
value->rValue = model->HSM2_depmueback0l;
return(OK);
case HSM2_MOD_DEPMUEBACK0LP:
value->rValue = model->HSM2_depmueback0lp;
return(OK);
case HSM2_MOD_DEPMUEBACK1:
value->rValue = model->HSM2_depmueback1;
return(OK);
case HSM2_MOD_DEPMUEBACK1L:
value->rValue = model->HSM2_depmueback1l;
return(OK);
case HSM2_MOD_DEPMUEBACK1LP:
value->rValue = model->HSM2_depmueback1lp;
return(OK);
case HSM2_MOD_DEPMUEPH0:
value->rValue = model->HSM2_depmueph0;
return(OK);
case HSM2_MOD_DEPMUEPH1:
value->rValue = model->HSM2_depmueph1;
return(OK);
case HSM2_MOD_DEPVMAX:
value->rValue = model->HSM2_depvmax;
return(OK);
case HSM2_MOD_DEPVMAXL:
value->rValue = model->HSM2_depvmaxl;
return(OK);
case HSM2_MOD_DEPVMAXLP:
value->rValue = model->HSM2_depvmaxlp;
return(OK);
case HSM2_MOD_DEPVDSEF1:
value->rValue = model->HSM2_depvdsef1;
return(OK);
case HSM2_MOD_DEPVDSEF1L:
value->rValue = model->HSM2_depvdsef1l;
return(OK);
case HSM2_MOD_DEPVDSEF1LP:
value->rValue = model->HSM2_depvdsef1lp;
return(OK);
case HSM2_MOD_DEPVDSEF2:
value->rValue = model->HSM2_depvdsef2;
return(OK);
case HSM2_MOD_DEPVDSEF2L:
value->rValue = model->HSM2_depvdsef2l;
return(OK);
case HSM2_MOD_DEPVDSEF2LP:
value->rValue = model->HSM2_depvdsef2lp;
return(OK);
case HSM2_MOD_DEPBB:
value->rValue = model->HSM2_depbb;
return(OK);
case HSM2_MOD_DEPMUETMP:
value->rValue = model->HSM2_depmuetmp;
return(OK);
/* binning parameters */
case HSM2_MOD_LMIN:

45
src/spicelib/devices/hisim2/hsm2mdel.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2mdel.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsm2def.h"
#include "ngspice/sperror.h"

195
src/spicelib/devices/hisim2/hsm2mpar.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2mpar.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsm2def.h"
#include "ngspice/ifsim.h"
@ -140,6 +179,15 @@ int HSM2mParam(
mod->HSM2_coerrrep = value->iValue;
mod->HSM2_coerrrep_Given = TRUE;
break;
case HSM2_MOD_CODEP:
mod->HSM2_codep = value->iValue;
mod->HSM2_codep_Given = TRUE;
break;
case HSM2_MOD_CODDLT:
mod->HSM2_coddlt = value->iValue;
mod->HSM2_coddlt_Given = TRUE;
break;
case HSM2_MOD_VMAX:
mod->HSM2_vmax = value->rValue;
mod->HSM2_vmax_Given = TRUE;
@ -420,6 +468,14 @@ int HSM2mParam(
mod->HSM2_ninvd = value->rValue;
mod->HSM2_ninvd_Given = TRUE;
break;
case HSM2_MOD_NINVDL:
mod->HSM2_ninvdl = value->rValue;
mod->HSM2_ninvdl_Given = TRUE;
break;
case HSM2_MOD_NINVDLP:
mod->HSM2_ninvdlp = value->rValue;
mod->HSM2_ninvdlp_Given = TRUE;
break;
case HSM2_MOD_MUECB0:
mod->HSM2_muecb0 = value->rValue;
mod->HSM2_muecb0_Given = TRUE;
@ -1162,6 +1218,139 @@ int HSM2mParam(
mod->HSM2_muecb1lp_Given = TRUE;
break;
/* Depletion Mode MODFET */
case HSM2_MOD_NDEPM:
mod->HSM2_ndepm = value->rValue;
mod->HSM2_ndepm_Given = TRUE;
break;
case HSM2_MOD_NDEPML:
mod->HSM2_ndepml = value->rValue;
mod->HSM2_ndepml_Given = TRUE;
break;
case HSM2_MOD_NDEPMLP:
mod->HSM2_ndepmlp = value->rValue;
mod->HSM2_ndepmlp_Given = TRUE;
break;
case HSM2_MOD_TNDEP:
mod->HSM2_tndep = value->rValue;
mod->HSM2_tndep_Given = TRUE;
break;
case HSM2_MOD_DEPLEAK:
mod->HSM2_depleak = value->rValue;
mod->HSM2_depleak_Given = TRUE;
break;
case HSM2_MOD_DEPLEAKL:
mod->HSM2_depleakl = value->rValue;
mod->HSM2_depleakl_Given = TRUE;
break;
case HSM2_MOD_DEPLEAKLP:
mod->HSM2_depleaklp = value->rValue;
mod->HSM2_depleaklp_Given = TRUE;
break;
case HSM2_MOD_DEPETA:
mod->HSM2_depeta = value->rValue;
mod->HSM2_depeta_Given = TRUE;
break;
case HSM2_MOD_DEPMUE0:
mod->HSM2_depmue0 = value->rValue;
mod->HSM2_depmue0_Given = TRUE;
break;
case HSM2_MOD_DEPMUE0L:
mod->HSM2_depmue0l = value->rValue;
mod->HSM2_depmue0l_Given = TRUE;
break;
case HSM2_MOD_DEPMUE0LP:
mod->HSM2_depmue0lp = value->rValue;
mod->HSM2_depmue0lp_Given = TRUE;
break;
case HSM2_MOD_DEPMUE1:
mod->HSM2_depmue1 = value->rValue;
mod->HSM2_depmue1_Given = TRUE;
break;
case HSM2_MOD_DEPMUE1L:
mod->HSM2_depmue1l = value->rValue;
mod->HSM2_depmue1l_Given = TRUE;
break;
case HSM2_MOD_DEPMUE1LP:
mod->HSM2_depmue1lp = value->rValue;
mod->HSM2_depmue1lp_Given = TRUE;
break;
case HSM2_MOD_DEPMUEBACK0:
mod->HSM2_depmueback0 = value->rValue;
mod->HSM2_depmueback0_Given = TRUE;
break;
case HSM2_MOD_DEPMUEBACK0L:
mod->HSM2_depmueback0l = value->rValue;
mod->HSM2_depmueback0l_Given = TRUE;
break;
case HSM2_MOD_DEPMUEBACK0LP:
mod->HSM2_depmueback0lp = value->rValue;
mod->HSM2_depmueback0lp_Given = TRUE;
break;
case HSM2_MOD_DEPMUEBACK1:
mod->HSM2_depmueback1 = value->rValue;
mod->HSM2_depmueback1_Given = TRUE;
break;
case HSM2_MOD_DEPMUEBACK1L:
mod->HSM2_depmueback1l = value->rValue;
mod->HSM2_depmueback1l_Given = TRUE;
break;
case HSM2_MOD_DEPMUEBACK1LP:
mod->HSM2_depmueback1lp = value->rValue;
mod->HSM2_depmueback1lp_Given = TRUE;
break;
case HSM2_MOD_DEPMUEPH0:
mod->HSM2_depmueph0 = value->rValue;
mod->HSM2_depmueph0_Given = TRUE;
break;
case HSM2_MOD_DEPMUEPH1:
mod->HSM2_depmueph1 = value->rValue;
mod->HSM2_depmueph1_Given = TRUE;
break;
case HSM2_MOD_DEPVMAX:
mod->HSM2_depvmax = value->rValue;
mod->HSM2_depvmax_Given = TRUE;
break;
case HSM2_MOD_DEPVMAXL:
mod->HSM2_depvmaxl = value->rValue;
mod->HSM2_depvmaxl_Given = TRUE;
break;
case HSM2_MOD_DEPVMAXLP:
mod->HSM2_depvmaxlp = value->rValue;
mod->HSM2_depvmaxlp_Given = TRUE;
break;
case HSM2_MOD_DEPVDSEF1:
mod->HSM2_depvdsef1 = value->rValue;
mod->HSM2_depvdsef1_Given = TRUE;
break;
case HSM2_MOD_DEPVDSEF1L:
mod->HSM2_depvdsef1l = value->rValue;
mod->HSM2_depvdsef1l_Given = TRUE;
break;
case HSM2_MOD_DEPVDSEF1LP:
mod->HSM2_depvdsef1lp = value->rValue;
mod->HSM2_depvdsef1lp_Given = TRUE;
break;
case HSM2_MOD_DEPVDSEF2:
mod->HSM2_depvdsef2 = value->rValue;
mod->HSM2_depvdsef2_Given = TRUE;
break;
case HSM2_MOD_DEPVDSEF2L:
mod->HSM2_depvdsef2l = value->rValue;
mod->HSM2_depvdsef2l_Given = TRUE;
break;
case HSM2_MOD_DEPVDSEF2LP:
mod->HSM2_depvdsef2lp = value->rValue;
mod->HSM2_depvdsef2lp_Given = TRUE;
break;
case HSM2_MOD_DEPBB:
mod->HSM2_depbb = value->rValue;
mod->HSM2_depbb_Given = TRUE;
break;
case HSM2_MOD_DEPMUETMP:
mod->HSM2_depmuetmp = value->rValue;
mod->HSM2_depmuetmp_Given = TRUE;
break;
/* binning parameters */
case HSM2_MOD_LMIN:

45
src/spicelib/devices/hisim2/hsm2noi.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2noi.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "hsm2def.h"
#include "ngspice/cktdefs.h"

45
src/spicelib/devices/hisim2/hsm2par.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2par.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/ifsim.h"
#include "hsm2def.h"

10
src/spicelib/devices/hisim2/hsm2pzld.c

@ -1,14 +1,14 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2pzld.c
Date : 2012.10.25
Date : 2014.6.5
released by
Hiroshima University &
@ -29,8 +29,8 @@ int HSM2pzLoad(
{
HSM2model *model = (HSM2model*)inModel;
HSM2instance *here;
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb = 0.0, xcbsb, xcbbb;
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb = 0.0, xcssb, xcsbb;
double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb;
double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb;
double xcdbdb = 0.0, xcsbsb = 0.0;
double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, gm, gmbs;
double gjbd, gjbs, grg;

251
src/spicelib/devices/hisim2/hsm2set.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2set.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/smpdefs.h"
#include "ngspice/cktdefs.h"
@ -91,17 +130,18 @@ int HSM2setup(
model->HSM2_noise = 1; /* allways noise is set to be 1 */
if ( !model->HSM2_version_Given) {
model->HSM2_version = 270; /* default 270 */
printf(" 270 is selected for VERSION. (default) \n");
model->HSM2_version = 280; /* default 2.80 */
printf(" 2.80 is selected for VERSION. (default) \n");
} else {
if (model->HSM2_version != 270) {
model->HSM2_version = 270; /* default 270 */
printf(" 270 is the only available VERSION. \n");
printf(" 270 is selected for VERSION. (default) \n");
} else {
printf(" %d is selected for VERSION \n", (int)model->HSM2_version);
}
if (model->HSM2_version < 280 || model->HSM2_version > 280 ) {
printf(" %d is not available for VERSION. \n", model->HSM2_version );
model->HSM2_version = 280; /* 2.80 */
}
printf(" 2.80 is selected for VERSION. \n");
}
/* set subversion & revision */
// model->HSM2_subversion = fmod(model->HSM2_version * 10 , 10 );
// model->HSM2_revision = fmod(model->HSM2_version * 100 , 10 );
if ( !model->HSM2_corsrd_Given ) model->HSM2_corsrd = 0 ;
if ( !model->HSM2_corg_Given ) model->HSM2_corg = 0 ;
@ -121,12 +161,27 @@ int HSM2setup(
if ( !model->HSM2_corbnet_Given ) model->HSM2_corbnet = 0 ;
else if ( model->HSM2_corbnet != 0 && model->HSM2_corbnet != 1 ) {
model->HSM2_corbnet = 0;
printf("warning(HiSIM2): CORBNET has been set to its default value: %d.\n", model->HSM2_corbnet);
printf("warning(HiSIM): CORBNET has been set to its default value: %d.\n", model->HSM2_corbnet);
}
if ( !model->HSM2_corecip_Given ) model->HSM2_corecip = 1 ;
if ( !model->HSM2_coqy_Given ) model->HSM2_coqy = 0 ;
if ( !model->HSM2_coqovsm_Given ) model->HSM2_coqovsm = 1 ;
if ( !model->HSM2_coerrrep_Given ) model->HSM2_coerrrep = 1 ;
if ( !model->HSM2_codep_Given ) model->HSM2_codep = 0 ;
if ( !model->HSM2_coddlt_Given ) model->HSM2_coddlt = 1 ;
if ( model->HSM2_codep_Given ) {
if( model->HSM2_codep != 0 && model->HSM2_codep != 1 ) {
printf("warning(HiSIM): Invalid CODEP (%d) was specified, resetted to 0.\n",model->HSM2_codep);
model->HSM2_codep = 0 ;
}
}
if ( model->HSM2_coddlt_Given ) {
if( model->HSM2_coddlt != 0 && model->HSM2_coddlt != 1 ) {
printf("warning(HiSIM): Invalid CODDLT (%d) was specified, resetted to 0.\n",model->HSM2_coddlt);
model->HSM2_coddlt = 0 ;
}
}
if ( !model->HSM2_vmax_Given ) model->HSM2_vmax = 1.0e7 ;
@ -137,8 +192,13 @@ int HSM2setup(
if ( !model->HSM2_xld_Given ) model->HSM2_xld = 0.0 ;
if ( !model->HSM2_lover_Given ) model->HSM2_lover = 30e-9 ;
if ( !model->HSM2_ddltmax_Given ) model->HSM2_ddltmax = 10.0 ; /* Vdseff */
if ( !model->HSM2_ddltslp_Given ) model->HSM2_ddltslp = 0.0 ; /* Vdseff */
if ( !model->HSM2_ddltict_Given ) model->HSM2_ddltict = 10.0 ; /* Vdseff */
if ( model->HSM2_coddlt == 0 ) {
if ( !model->HSM2_ddltslp_Given ) model->HSM2_ddltslp = 0.0 ; /* Vdseff */
if ( !model->HSM2_ddltict_Given ) model->HSM2_ddltict = 10.0 ; /* Vdseff */
} else {
if ( !model->HSM2_ddltslp_Given ) model->HSM2_ddltslp = 10.0 ; /* Vdseff */
if ( !model->HSM2_ddltict_Given ) model->HSM2_ddltict = 0.0 ; /* Vdseff */
}
if ( !model->HSM2_vfbover_Given ) model->HSM2_vfbover = 0.0 ;
if ( !model->HSM2_nover_Given ) model->HSM2_nover = 1E19 ;
if ( !model->HSM2_xwd_Given ) model->HSM2_xwd = 0.0 ;
@ -200,6 +260,8 @@ int HSM2setup(
if ( !model->HSM2_ndepwp_Given ) model->HSM2_ndepwp = 1.0 ;
if ( !model->HSM2_ninv_Given ) model->HSM2_ninv = 0.5 ;
if ( !model->HSM2_ninvd_Given ) model->HSM2_ninvd = 0.0 ;
if ( !model->HSM2_ninvdl_Given ) model->HSM2_ninvdl = 0.0 ;
if ( !model->HSM2_ninvdlp_Given ) model->HSM2_ninvdlp = 1.0 ;
if ( !model->HSM2_muecb0_Given ) model->HSM2_muecb0 = 1.0e3 ;
if ( !model->HSM2_muecb1_Given ) model->HSM2_muecb1 = 100.0 ;
if ( !model->HSM2_mueph0_Given ) model->HSM2_mueph0 = 300.0e-3 ;
@ -327,7 +389,7 @@ int HSM2setup(
if ( !model->HSM2_nsubcmax_Given ) model->HSM2_nsubcmax = 5e18 ;
if ( !model->HSM2_qme1_Given ) model->HSM2_qme1 = 0.0 ;
if ( !model->HSM2_qme2_Given ) model->HSM2_qme2 = 2.0 ;
if ( !model->HSM2_qme2_Given ) model->HSM2_qme2 = 2.0 ; /* fix in version 2.80 */
if ( !model->HSM2_qme3_Given ) model->HSM2_qme3 = 0.0 ;
if ( !model->HSM2_vovers_Given ) model->HSM2_vovers = 0.0 ;
@ -408,18 +470,65 @@ int HSM2setup(
if ( !model->HSM2_nsubcwp2_Given ) model->HSM2_nsubcwp2 = 1.0 ;
if ( !model->HSM2_muephw2_Given ) model->HSM2_muephw2 = 0.0 ;
if ( !model->HSM2_muepwp2_Given ) model->HSM2_muepwp2 = 1.0 ;
/* WPE set default Model parameter value */
if ( !model->HSM2_web_Given ) model->HSM2_web = 0.0 ;
if ( !model->HSM2_wec_Given ) model->HSM2_wec = 0.0 ;
if ( !model->HSM2_nsubcwpe_Given ) model->HSM2_nsubcwpe = 0.0 ;
if ( !model->HSM2_npextwpe_Given ) model->HSM2_npextwpe = 0.0 ;
if ( !model->HSM2_nsubpwpe_Given ) model->HSM2_nsubpwpe = 0.0 ;
if ( !model->HSM2_Vgsmin_Given ) model->HSM2_Vgsmin = -5.0 * model->HSM2_type ;
if ( !model->HSM2_sc3Vbs_Given ) model->HSM2_sc3Vbs = 0.0 ;
if ( !model->HSM2_byptol_Given ) model->HSM2_byptol = 0.0 ;
if ( !model->HSM2_muecb0lp_Given ) model->HSM2_muecb0lp = 0.0;
if ( !model->HSM2_muecb1lp_Given ) model->HSM2_muecb1lp = 0.0;
/* Depletion Mode MOSFET */
if ( !model->HSM2_ndepm_Given ) model->HSM2_ndepm = 1e17 ;
if ( !model->HSM2_ndepml_Given ) model->HSM2_ndepml = 0.0 ;
if ( !model->HSM2_ndepmlp_Given ) model->HSM2_ndepmlp = 1.0 ;
if ( !model->HSM2_tndep_Given ) model->HSM2_tndep = 0.2e-6 ;
if ( !model->HSM2_depleak_Given ) model->HSM2_depleak = 0.5 ;
if ( !model->HSM2_depleakl_Given ) model->HSM2_depleakl = 0.0 ;
if ( !model->HSM2_depleaklp_Given ) model->HSM2_depleaklp = 1.0 ;
if ( !model->HSM2_depeta_Given ) model->HSM2_depeta = 0.0 ;
if ( !model->HSM2_depmue0_Given ) model->HSM2_depmue0 = 1e3 ;
if ( !model->HSM2_depmue0l_Given ) model->HSM2_depmue0l = 0.0 ;
if ( !model->HSM2_depmue0lp_Given ) model->HSM2_depmue0lp = 1.0 ;
if ( !model->HSM2_depmue1_Given ) model->HSM2_depmue1 = 0.0 ;
if ( !model->HSM2_depmue1l_Given ) model->HSM2_depmue1l = 0.0 ;
if ( !model->HSM2_depmue1lp_Given ) model->HSM2_depmue1lp = 1.0 ;
if ( !model->HSM2_depmueback0_Given ) model->HSM2_depmueback0 = 1e2 ;
if ( !model->HSM2_depmueback0l_Given ) model->HSM2_depmueback0l = 0.0 ;
if ( !model->HSM2_depmueback0lp_Given ) model->HSM2_depmueback0lp = 1.0 ;
if ( !model->HSM2_depmueback1_Given ) model->HSM2_depmueback1 = 0.0 ;
if ( !model->HSM2_depmueback1l_Given ) model->HSM2_depmueback1l = 0.0 ;
if ( !model->HSM2_depmueback1lp_Given ) model->HSM2_depmueback1lp = 1.0 ;
if ( !model->HSM2_depmueph0_Given ) model->HSM2_depmueph0 = 0.3 ;
if ( !model->HSM2_depmueph1_Given ) model->HSM2_depmueph1 = 5e3 ;
if ( !model->HSM2_depvmax_Given ) model->HSM2_depvmax = 3e7 ;
if ( !model->HSM2_depvmaxl_Given ) model->HSM2_depvmaxl = 0.0 ;
if ( !model->HSM2_depvmaxlp_Given ) model->HSM2_depvmaxlp = 1.0 ;
if ( !model->HSM2_depvdsef1_Given ) model->HSM2_depvdsef1 = 2.0 ;
if ( !model->HSM2_depvdsef1l_Given ) model->HSM2_depvdsef1l = 0.0 ;
if ( !model->HSM2_depvdsef1lp_Given ) model->HSM2_depvdsef1lp = 1.0 ;
if ( !model->HSM2_depvdsef2_Given ) model->HSM2_depvdsef2 = 0.5 ;
if ( !model->HSM2_depvdsef2l_Given ) model->HSM2_depvdsef2l = 0.0 ;
if ( !model->HSM2_depvdsef2lp_Given ) model->HSM2_depvdsef2lp = 1.0 ;
if ( !model->HSM2_depbb_Given ) model->HSM2_depbb = 1.0 ;
if ( !model->HSM2_depmuetmp_Given ) model->HSM2_depmuetmp = 1.5 ;
if ( model->HSM2_codep ) { /* change default value for depletion mod MOSFET */
if ( !model->HSM2_corecip_Given ) model->HSM2_corecip = 0 ;
if ( !model->HSM2_copprv_Given ) model->HSM2_copprv = 0 ;
if ( !model->HSM2_vfbc_Given ) model->HSM2_vfbc = 0.2 ;
if ( !model->HSM2_nsubc_Given ) model->HSM2_nsubc = 5.0e16 ;
if ( !model->HSM2_lp_Given ) model->HSM2_lp = 0.0 ;
if ( !model->HSM2_nsubp_Given ) model->HSM2_nsubp = 1.0e17 ;
if ( !model->HSM2_muesr1_Given ) model->HSM2_muesr1 = 5.0e15 ;
}
/* binning parameters */
if ( !model->HSM2_lmin_Given ) model->HSM2_lmin = 0.0 ;
if ( !model->HSM2_lmax_Given ) model->HSM2_lmax = 1.0 ;
@ -657,7 +766,37 @@ int HSM2setup(
if (!model->HSM2vbsMaxGiven) model->HSM2vbsMax = 1e99;
if (!model->HSM2vbdMaxGiven) model->HSM2vbdMax = 1e99;
if ( model->HSM2_corecip == 1 ){
if ( model->HSM2_codep ) {
RANGERESET(model->HSM2_ndepm, 5e15, 2e17, "NDEPM" ) ;
RANGERESET(model->HSM2_tndep, 1e-7, 1e-6, "TNDEP" ) ;
RANGECHECK(model->HSM2_depleak, 0.0, 10.0, "DEPLEAK" ) ;
if( model->HSM2_corecip ) {
printf("warning(HiSIM): CORECIP is not supported yet in depletion mode MOSFET, resetted to 0.\n");
model->HSM2_corecip = 0;
}
if( model->HSM2_copprv ) {
printf("warning(HiSIM): COPPRV is not supported yet in depletion mode MOSFET, resetted to 0.\n");
model->HSM2_copprv = 0;
}
if( model->HSM2_corsrd == 1 ) {
printf("warning(HiSIM): CORSRD=1 is not supported yet in depletion mode MOSFET, resetted to -1.\n");
model->HSM2_corsrd = -1;
}
if( model->HSM2_coisti ) {
printf("warning(HiSIM): STI leak model is not supported yet in depletion mode MOSFET, skipped\n");
model->HSM2_coisti = 0 ;
}
if( model->HSM2_cothrml ) {
printf("warning(HiSIM): Thermal noise model is not supported yet in depletion mode MOSFET, skipped\n");
model->HSM2_cothrml = 0 ;
}
if( model->HSM2_coign ) {
printf("warning(HiSIM): Induced gate noise model is not supported yet in depletion mode MOSFET, skipped\n");
model->HSM2_coign = 0 ;
}
}
if ( model->HSM2_corecip ){
model->HSM2_sc2 = 0.0 ; model->HSM2_lsc2 = 0.0 ; model->HSM2_wsc2 = 0.0 ; model->HSM2_psc2 = 0.0 ;
model->HSM2_scp2 = 0.0 ; model->HSM2_lscp2 = 0.0 ; model->HSM2_wscp2 = 0.0 ; model->HSM2_pscp2 = 0.0 ;
model->HSM2_sc4 = 0.0 ; model->HSM2_lsc4 = 0.0 ; model->HSM2_wsc4 = 0.0 ; model->HSM2_psc4 = 0.0 ;
@ -705,7 +844,7 @@ int HSM2setup(
else if ( here->HSM2_corbnet != 0 && here->HSM2_corbnet != 1 ) {
here->HSM2_corbnet = model->HSM2_corbnet ;
if(model->HSM2_coerrrep)
printf("warning(HiSIM2): CORBNET has been set to its default value: %d.\n", here->HSM2_corbnet);
printf("warning(HiSIM): CORBNET has been set to its default value: %d.\n", here->HSM2_corbnet);
}
if ( !here->HSM2_rbdb_Given) here->HSM2_rbdb = model->HSM2_rbdb; /* in ohm */
if ( !here->HSM2_rbsb_Given) here->HSM2_rbsb = model->HSM2_rbsb;
@ -718,7 +857,7 @@ int HSM2setup(
else if ( here->HSM2_corg != 0 && here->HSM2_corg != 1 ) {
here->HSM2_corg = model->HSM2_corg ;
if(model->HSM2_coerrrep)
printf("warning(HiSIM2): CORG has been set to its default value: %d.\n", here->HSM2_corg);
printf("warning(HiSIM): CORG has been set to its default value: %d.\n", here->HSM2_corg);
}
if ( !here->HSM2_mphdfm_Given ) here->HSM2_mphdfm = model->HSM2_mphdfm ;
@ -789,33 +928,33 @@ int HSM2setup(
/* macro to make elements with built in test for out of memory */
#define TSTALLOC(ptr,first,second) \
do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\
return(E_NOMEM);\
} } while(0)
TSTALLOC(HSM2DPbpPtr, HSM2dNodePrime, HSM2bNodePrime);
TSTALLOC(HSM2SPbpPtr, HSM2sNodePrime, HSM2bNodePrime);
TSTALLOC(HSM2GPbpPtr, HSM2gNodePrime, HSM2bNodePrime);
TSTALLOC(HSM2BPdpPtr, HSM2bNodePrime, HSM2dNodePrime);
TSTALLOC(HSM2BPspPtr, HSM2bNodePrime, HSM2sNodePrime);
TSTALLOC(HSM2BPgpPtr, HSM2bNodePrime, HSM2gNodePrime);
TSTALLOC(HSM2BPbpPtr, HSM2bNodePrime, HSM2bNodePrime);
TSTALLOC(HSM2DdPtr, HSM2dNode, HSM2dNode);
TSTALLOC(HSM2GPgpPtr, HSM2gNodePrime, HSM2gNodePrime);
TSTALLOC(HSM2SsPtr, HSM2sNode, HSM2sNode);
TSTALLOC(HSM2DPdpPtr, HSM2dNodePrime, HSM2dNodePrime);
TSTALLOC(HSM2SPspPtr, HSM2sNodePrime, HSM2sNodePrime);
TSTALLOC(HSM2DdpPtr, HSM2dNode, HSM2dNodePrime);
TSTALLOC(HSM2GPdpPtr, HSM2gNodePrime, HSM2dNodePrime);
TSTALLOC(HSM2GPspPtr, HSM2gNodePrime, HSM2sNodePrime);
TSTALLOC(HSM2SspPtr, HSM2sNode, HSM2sNodePrime);
TSTALLOC(HSM2DPspPtr, HSM2dNodePrime, HSM2sNodePrime);
TSTALLOC(HSM2DPdPtr, HSM2dNodePrime, HSM2dNode);
TSTALLOC(HSM2DPgpPtr, HSM2dNodePrime, HSM2gNodePrime);
TSTALLOC(HSM2SPgpPtr, HSM2sNodePrime, HSM2gNodePrime);
TSTALLOC(HSM2SPsPtr, HSM2sNodePrime, HSM2sNode);
}
TSTALLOC(HSM2DPbpPtr, HSM2dNodePrime, HSM2bNodePrime)
TSTALLOC(HSM2SPbpPtr, HSM2sNodePrime, HSM2bNodePrime)
TSTALLOC(HSM2GPbpPtr, HSM2gNodePrime, HSM2bNodePrime)
TSTALLOC(HSM2BPdpPtr, HSM2bNodePrime, HSM2dNodePrime)
TSTALLOC(HSM2BPspPtr, HSM2bNodePrime, HSM2sNodePrime)
TSTALLOC(HSM2BPgpPtr, HSM2bNodePrime, HSM2gNodePrime)
TSTALLOC(HSM2BPbpPtr, HSM2bNodePrime, HSM2bNodePrime)
TSTALLOC(HSM2DdPtr, HSM2dNode, HSM2dNode)
TSTALLOC(HSM2GPgpPtr, HSM2gNodePrime, HSM2gNodePrime)
TSTALLOC(HSM2SsPtr, HSM2sNode, HSM2sNode)
TSTALLOC(HSM2DPdpPtr, HSM2dNodePrime, HSM2dNodePrime)
TSTALLOC(HSM2SPspPtr, HSM2sNodePrime, HSM2sNodePrime)
TSTALLOC(HSM2DdpPtr, HSM2dNode, HSM2dNodePrime)
TSTALLOC(HSM2GPdpPtr, HSM2gNodePrime, HSM2dNodePrime)
TSTALLOC(HSM2GPspPtr, HSM2gNodePrime, HSM2sNodePrime)
TSTALLOC(HSM2SspPtr, HSM2sNode, HSM2sNodePrime)
TSTALLOC(HSM2DPspPtr, HSM2dNodePrime, HSM2sNodePrime)
TSTALLOC(HSM2DPdPtr, HSM2dNodePrime, HSM2dNode)
TSTALLOC(HSM2DPgpPtr, HSM2dNodePrime, HSM2gNodePrime)
TSTALLOC(HSM2SPgpPtr, HSM2sNodePrime, HSM2gNodePrime)
TSTALLOC(HSM2SPsPtr, HSM2sNodePrime, HSM2sNode)
TSTALLOC(HSM2SPdpPtr, HSM2sNodePrime, HSM2dNodePrime);
if ( here->HSM2_corg == 1 ) {
@ -866,9 +1005,9 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
here->HSM2_ktemp = here->HSM2_temp + 273.15 ; /* [C] -> [K] */
here->HSM2_lgate = Lgate = here->HSM2_l + model->HSM2_xl ;
Wgate = here->HSM2_w / here->HSM2_nf + model->HSM2_xw ;
here->HSM2_wgate = Wgate = here->HSM2_w / here->HSM2_nf + model->HSM2_xw ;
LG = Lgate * C_m2um ;
here->HSM2_lg = LG = Lgate * C_m2um ;
here->HSM2_wg = WG = Wgate * C_m2um ;
/* binning calculation */
@ -957,7 +1096,9 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
RANGECHECK(pParam->HSM2_bgtmp1, 50.0e-6, 1.0e-3, "BGTMP1") ;
RANGECHECK(pParam->HSM2_bgtmp2, -1.0e-6, 1.0e-6, "BGTMP2") ;
RANGECHECK(pParam->HSM2_eg0, 1.0, 1.3, "EG0") ;
RANGECHECK(pParam->HSM2_vfbc, -1.2, 0.0, "VFBC") ;
if( model->HSM2_codep == 0 )
{ RANGECHECK(pParam->HSM2_vfbc, -1.2, 0.0, "VFBC") ; }
else { RANGECHECK(pParam->HSM2_vfbc, -1.2, 0.8, "VFBC") ; }
RANGECHECK(pParam->HSM2_vfbover, -0.2, 0.2, "VFBOVER") ;
RANGECHECK(pParam->HSM2_nsubc, 1.0e16, 1.0e19, "NSUBC") ;
RANGECHECK(pParam->HSM2_nsubp, 1.0e16, 1.0e19, "NSUBP") ;
@ -970,7 +1111,7 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
RANGECHECK(pParam->HSM2_pgd1, 0.0, 50.0e-3, "PGD1") ;
RANGECHECK(pParam->HSM2_ndep, 0.0, 1.0, "NDEP") ;
RANGECHECK(pParam->HSM2_ninv, 0.0, 1.0, "NINV") ;
RANGECHECK(pParam->HSM2_muecb0, 100.0, 100.0e3, "MUECB0") ;
RANGECHECK(pParam->HSM2_muecb0, 10.0, 100.0e3, "MUECB0") ;
RANGECHECK(pParam->HSM2_muecb1, 5.0, 1.0e4, "MUECB1") ;
RANGECHECK(pParam->HSM2_mueph1, 2.0e3, 35.0e3, "MUEPH1") ;
RANGECHECK(pParam->HSM2_vtmp, -5.0, 1.0, "VTMP") ;
@ -1006,8 +1147,8 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
pParam->HSM2_nsubpsti1 = pParam->HSM2_nsubpsti1 / C_m2cm ;
pParam->HSM2_nsubcsti1 = pParam->HSM2_nsubcsti1 / C_m2cm ;
pParam->HSM2_muesti1 = pParam->HSM2_muesti1 / C_m2cm ;
pParam->HSM2_ndep = pParam->HSM2_ndep / C_m2cm ;
pParam->HSM2_ninv = pParam->HSM2_ninv / C_m2cm ;
pParam->HSM2_ndep = pParam->HSM2_ndep ;
pParam->HSM2_ninv = pParam->HSM2_ninv ;
pParam->HSM2_vmax = pParam->HSM2_vmax / C_m2cm ;
pParam->HSM2_wfc = pParam->HSM2_wfc * C_m2cm_p2 ;
@ -1028,7 +1169,7 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
MINCHECK (model->HSM2_tox, 0.0, "TOX") ;
RANGECHECK(model->HSM2_xld, 0.0, 50.0e-9, "XLD") ;
RANGECHECK(model->HSM2_xwd, -10.0e-9, 100.0e-9, "XWD") ;
RANGECHECK(model->HSM2_rsh, 0.0, 200.0, "RSH") ;
RANGECHECK(model->HSM2_rsh, 0.0, 200.0, "RSH") ; /* fix in version 2.80 */
RANGECHECK(model->HSM2_rshg, 0.0, 100.0, "RSHG") ;
RANGECHECK(model->HSM2_xqy, 10.0e-9, 50.0e-9, "XQY") ;
RANGECHECK(model->HSM2_rs, 0.0, 10.0e-3, "RS") ;
@ -1046,7 +1187,7 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
RANGECHECK(model->HSM2_npext, 1.0e16, 1.0e18, "NPEXT") ;
RANGECHECK(model->HSM2_scp21, 0.0, 5.0, "SCP21") ;
RANGECHECK(model->HSM2_scp22, 0.0, 0.0, "SCP22") ;
RANGECHECK(model->HSM2_bs1, 0.0, 50.0e-3, "BS1") ;
RANGECHECK(model->HSM2_bs1, -1.0, 50.0e-3, "BS1") ;
RANGECHECK(model->HSM2_bs2, 0.5, 1.0, "BS2") ;
MINCHECK (model->HSM2_cgbo, 0.0, "CGBO") ;
RANGECHECK(model->HSM2_clm5, 0.0, 2.0, "CLM5") ;
@ -1055,7 +1196,7 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
RANGECHECK(model->HSM2_voverp, 0.0, 2.0, "VOVERP") ;
RANGECHECK(model->HSM2_qme1, 0.0, 300.0e-9, "QME1") ;
RANGECHECK(model->HSM2_qme2, 1.0, 3.0, "QME2") ;
RANGECHECK(model->HSM2_qme3, 0.0, 1.0e-09, "QME3") ;
RANGECHECK(model->HSM2_qme3, 0.0, 1.0e-9, "QME3") ;
RANGECHECK(model->HSM2_tnom, 22.0, 32.0, "TNOM") ;
RANGECHECK(model->HSM2_ddltmax, 1.0, 20.0, "DDLTMAX") ;
RANGECHECK(model->HSM2_ddltict, -3.0, 20.0, "DDLTICT") ;
@ -1094,6 +1235,8 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL
modelMKS->HSM2_ovslp = model->HSM2_ovslp / C_m2cm ;
modelMKS->HSM2_dly3 = model->HSM2_dly3 / C_m2cm_p2 ;
modelMKS->HSM2_ndepm = model->HSM2_ndepm / C_cm2m_p3 ;
/*-----------------------------------------------------------*
* Change unit into Kelvin.
*-----------------*/

221
src/spicelib/devices/hisim2/hsm2temp.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2temp.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/smpdefs.h"
#include "ngspice/cktdefs.h"
@ -60,6 +99,15 @@
y = ( xmin ) + 0.5 * ( T1 + T2 ) ; \
}
/*===========================================================*
* pow
*=================*/
#ifdef POW_TO_EXP_AND_LOG
#define Fn_Pow( x , y ) ( (x==0.0) ? 0.0 : exp( (y) * log( x ) ) )
#else
#define Fn_Pow( x , y ) ( (x==0.0) ? 0.0 : pow( x , y ) )
#endif
int HSM2temp(
GENmodel *inModel,
CKTcircuit *ckt)
@ -77,9 +125,11 @@ int HSM2temp(
double MUEPLD = 0.0 ;
double GDLD = 0.0 ;
double T1, T2, T3 ;
const double small = 1.0e-50 ;
/* temperature-dependent variables */
double Eg ,TTEMP, beta, Nin;
double js, jssw, js2, jssw2 ;
double Tratio ;
int i;
/* declarations for the sc3 clamping part */
@ -99,11 +149,11 @@ int HSM2temp(
pParam = &here->pParam ;
hereMKS = &here->hereMKS ;
here->HSM2_lgate = Lgate = here->HSM2_l + model->HSM2_xl ;
Wgate = here->HSM2_w / here->HSM2_nf + model->HSM2_xw ;
Lgate = here->HSM2_lgate ;
Wgate = here->HSM2_wgate ;
LG = Lgate * C_m2um ;
here->HSM2_wg = WG = Wgate * C_m2um ;
LG = here->HSM2_lg ;
WG = here->HSM2_wg ;
WL = WG * LG ;
MUEPWD = model->HSM2_muepwd * C_m2um ;
MUEPLD = model->HSM2_muepld * C_m2um ;
@ -139,7 +189,7 @@ int HSM2temp(
(here->HSM2_nf > 1.0 && here->HSM2_sd > 0.0))) {
T1 = 0.0;
for (i = 0; i < here->HSM2_nf; i++) {
T1 += 1.0 / (here->HSM2_sa + 0.5 * here->HSM2_l
T1 = T1 + 1.0 / (here->HSM2_sa + 0.5 * here->HSM2_l
+ i * (here->HSM2_sd + here->HSM2_l))
+ 1.0 / (here->HSM2_sb + 0.5 * here->HSM2_l
+ i * (here->HSM2_sd + here->HSM2_l));
@ -157,10 +207,10 @@ int HSM2temp(
/* DFM */
if ( model->HSM2_codfm == 1 && here->HSM2_nsubcdfm_Given ) {
RANGECHECK(here->HSM2_nsubcdfm, 1.0e16, 1.0e19, "NSUBCDFM") ;
here->HSM2_mueph1 *= here->HSM2_mphdfm
* ( log(hereMKS->HSM2_nsubcdfm) - log(here->HSM2_nsubc) ) + 1.0 ;
here->HSM2_nsubp += hereMKS->HSM2_nsubcdfm - here->HSM2_nsubc ;
Npext += hereMKS->HSM2_nsubcdfm - here->HSM2_nsubc ;
here->HSM2_mueph1 = here->HSM2_mueph1 * ( here->HSM2_mphdfm
* ( log(hereMKS->HSM2_nsubcdfm) - log(here->HSM2_nsubc) ) + 1.0 ) ;
here->HSM2_nsubp = here->HSM2_nsubp + hereMKS->HSM2_nsubcdfm - here->HSM2_nsubc ;
Npext = Npext + hereMKS->HSM2_nsubcdfm - here->HSM2_nsubc ;
here->HSM2_nsubc = hereMKS->HSM2_nsubcdfm ;
}
@ -169,19 +219,19 @@ int HSM2temp(
( here->HSM2_sca
+ model->HSM2_web * here->HSM2_scb
+ model->HSM2_wec * here->HSM2_scc ) ;
here->HSM2_nsubc += T0 ;
here->HSM2_nsubc = here->HSM2_nsubc + T0 ;
Fn_SLtemp( here->HSM2_nsubc , here->HSM2_nsubc , Nsubmin , Nsubmin_dlt ) ;
T0 = modelMKS->HSM2_nsubpwpe *
( here->HSM2_sca
+ model->HSM2_web * here->HSM2_scb
+ model->HSM2_wec * here->HSM2_scc ) ;
here->HSM2_nsubp += T0 ;
here->HSM2_nsubp = here->HSM2_nsubp + T0 ;
Fn_SLtemp( here->HSM2_nsubp , here->HSM2_nsubp , Nsubmin , Nsubmin_dlt ) ;
T0 = modelMKS->HSM2_npextwpe *
( here->HSM2_sca
+ model->HSM2_web * here->HSM2_scb
+ model->HSM2_wec * here->HSM2_scc ) ;
Npext += T0 ;
Npext = Npext + T0 ;
Fn_SLtemp( Npext , Npext , Nsubmin , Nsubmin_dlt ) ;
/* WPE end */
@ -221,6 +271,9 @@ int HSM2temp(
/ C_ESI ;
here->HSM2_ninv_o_esi = pParam->HSM2_ninv / C_ESI ;
/* LG dependence of NINVD */
here->HSM2_ninvd = model->HSM2_ninvd * ( 1.0 + (model->HSM2_ninvdl / pow( LG, model->HSM2_ninvdlp)));
/* Metallurgical channel geometry */
dL = model->HSM2_xld
+ (modelMKS->HSM2_ll / pow (Lgate + model->HSM2_lld, model->HSM2_lln)) ;
@ -229,11 +282,15 @@ int HSM2temp(
Leff = Lgate - 2.0e0 * dL ;
if ( Leff <= 1.0e-9 ) {
SPfrontEnd->IFerrorf
IFuid namarr[2];
namarr[0] = model->HSM2modName;
namarr[1] = here->HSM2name;
(*(SPfrontEnd->IFerror))
(
ERR_FATAL,
"HiSIM2: MOSFET(%s) MODEL(%s): effective channel length is smaller than 1nm",
model->HSM2modName, here->HSM2name);
namarr
);
return (E_BADPARM);
}
here->HSM2_leff = Leff ;
@ -249,11 +306,15 @@ int HSM2temp(
here->HSM2_weff = Weff = Wgate - 2.0e0 * dW ;
if ( Weff <= 0.0 ) {
SPfrontEnd->IFerrorf
IFuid namarr[2];
namarr[0] = model->HSM2modName;
namarr[1] = here->HSM2name;
(*(SPfrontEnd->IFerror))
(
ERR_FATAL,
"HiSIM2: MOSFET(%s) MODEL(%s): effective channel width is negative or 0",
model->HSM2modName, here->HSM2name);
namarr
);
return (E_BADPARM);
}
here->HSM2_weff_nf = Weff * here->HSM2_nf ;
@ -264,7 +325,7 @@ int HSM2temp(
T1 = 2.0 * ( 1.0 - model->HSM2_nsubpfac ) / model->HSM2_nsubpl * LG + 2.0 * model->HSM2_nsubpfac - 1.0 ;
Fn_SUtemp( T1 , T1 , 1 , model->HSM2_nsubpdlt ) ;
Fn_SLtemp( T1 , T1 , model->HSM2_nsubpfac , model->HSM2_nsubpdlt ) ;
here->HSM2_nsubp *= T1 ;
here->HSM2_nsubp = here->HSM2_nsubp * T1 ;
}
/* Note: Sign Changed --> */
@ -282,11 +343,11 @@ int HSM2temp(
}
T2 = 1.0e0 + ( model->HSM2_nsubcw / pow ( WG, model->HSM2_nsubcwp )) ;
T2 *= 1.0e0 + ( model->HSM2_nsubcw2 / pow ( WG, model->HSM2_nsubcwp2 )) ;
T2 = T2 * ( 1.0e0 + ( model->HSM2_nsubcw2 / pow ( WG, model->HSM2_nsubcwp2 )) ) ;
T3 = modelMKS->HSM2_nsubcmax / here->HSM2_nsubc ;
Fn_SUtemp( T1 , T2 , T3 , 0.01 ) ;
here->HSM2_nsubc *= T1 ;
here->HSM2_nsubc = here->HSM2_nsubc * T1 ;
if (Lod_half > 0.0) {
T1 = 1.0e0 / (1.0e0 + pParam->HSM2_nsubcsti2) ;
@ -300,7 +361,7 @@ int HSM2temp(
fprintf ( stderr , " The model parameter NSUBCW/NSUBCWP and/or NSUBCW2/NSUBCW2P might be wrong.\n" ) ;
here->HSM2_nsubc = 1e15 / C_cm2m_p3 ;
}
if(model->HSM2_coerrrep && (Npext < here->HSM2_nsubc || Npext > here->HSM2_nsubp)) {
if( (model->HSM2_codep==0) && model->HSM2_coerrrep && (Npext < here->HSM2_nsubc || Npext > here->HSM2_nsubp)) {
fprintf ( stderr , "*** warning(HiSIM): actual NPEXT value is smaller than NSUBC and/or greater than NSUBP.\n" ) ;
fprintf ( stderr , " ( Npext = %e , NSUBC = %e , NSUBP = %e ) \n",Npext,here->HSM2_nsubc,here->HSM2_nsubp);
fprintf ( stderr , " The model parameter NPEXTW and/or NPEXTWP might be wrong.\n" ) ;
@ -373,18 +434,18 @@ int HSM2temp(
/* Process source/drain series resistamce */
here->HSM2_rd = 0.0;
if ( model->HSM2_rsh > 0.0 ) {
here->HSM2_rd += model->HSM2_rsh * here->HSM2_nrd ;
here->HSM2_rd = here->HSM2_rd + model->HSM2_rsh * here->HSM2_nrd ;
}
if ( model->HSM2_rd > 0.0 ) {
here->HSM2_rd += model->HSM2_rd / here->HSM2_weff_nf ;
here->HSM2_rd = here->HSM2_rd + model->HSM2_rd / here->HSM2_weff_nf ;
}
here->HSM2_rs = 0.0;
if ( model->HSM2_rsh > 0.0 ) {
here->HSM2_rs += model->HSM2_rsh * here->HSM2_nrs ;
here->HSM2_rs = here->HSM2_rs + model->HSM2_rsh * here->HSM2_nrs ;
}
if ( model->HSM2_rs > 0.0 ) {
here->HSM2_rs += model->HSM2_rs / here->HSM2_weff_nf ;
here->HSM2_rs = here->HSM2_rs + model->HSM2_rs / here->HSM2_weff_nf ;
}
if (model->HSM2_corsrd < 0) {
@ -436,8 +497,13 @@ int HSM2temp(
}
/* Vdseff */
T1 = model->HSM2_ddltslp * LG + model->HSM2_ddltict ;
here->HSM2_ddlt = T1 * model->HSM2_ddltmax / ( T1 + model->HSM2_ddltmax ) + 1.0 ;
if ( model->HSM2_coddlt == 0 ) {
T1 = model->HSM2_ddltslp * LG + model->HSM2_ddltict ;
here->HSM2_ddlt = T1 * model->HSM2_ddltmax / ( T1 + model->HSM2_ddltmax ) + 1.0 ;
} else { /* fix in version 2.80 */
T1 = model->HSM2_ddltslp * LG ;
here->HSM2_ddlt = T1 * model->HSM2_ddltmax / ( T1 + model->HSM2_ddltmax ) + model->HSM2_ddltict + small ;
}
/* Isub */
T2 = pow( Weff , model->HSM2_svgswp ) ;
@ -508,13 +574,15 @@ int HSM2temp(
here->HSM2_beta2 = beta * beta ;
here->HSM2_betatnom = C_QE / (C_KB * model->HSM2_ktnom) ;
Tratio = TTEMP / model->HSM2_ktnom ;
/* Intrinsic carrier concentration */
here->HSM2_nin = Nin = C_Nin0 * pow (TTEMP / model->HSM2_ktnom, 1.5e0)
here->HSM2_nin = Nin = C_Nin0 * pow (Tratio, 1.5e0)
* exp (- Eg / 2.0e0 * beta + here->HSM2_egtnom / 2.0e0 * here->HSM2_betatnom) ;
/* Phonon Scattering (temperature-dependent part) */
T1 = pow (TTEMP / model->HSM2_ktnom, pParam->HSM2_muetmp) ;
T1 = pow (Tratio, pParam->HSM2_muetmp) ;
here->HSM2_mphn0 = T1 / here->HSM2_mueph ;
here->HSM2_mphn1 = here->HSM2_mphn0 * model->HSM2_mueph0 ;
@ -524,30 +592,79 @@ int HSM2temp(
/* Velocity Temperature Dependence */
T1 = TTEMP / model->HSM2_ktnom ;
here->HSM2_vmax = here->HSM2_vmax0 * pParam->HSM2_vmax
/ (1.8 + 0.4 * T1 + 0.1 * T1 * T1 - pParam->HSM2_vtmp * (1.0e0 - T1)) ;
/ (1.8 + 0.4 * Tratio + 0.1 * Tratio * Tratio - pParam->HSM2_vtmp * (1.0e0 - Tratio)) ;
/* Coefficient of the F function for bulk charge */
here->HSM2_cnst0 = sqrt ( 2.0 * C_ESI * C_QE * here->HSM2_nsub / beta ) ;
here->HSM2_cnst0over = here->HSM2_cnst0 * sqrt( pParam->HSM2_nover / here->HSM2_nsub ) ;
/* Depletion mode MOSFET */
if( model->HSM2_codep ) {
T3 = pow(here->HSM2_lg,model->HSM2_ndepmlp) ;
here->HSM2_ndepm = modelMKS->HSM2_ndepm * ( 1.0 + model->HSM2_ndepml / T3 );
if ( here->HSM2_ndepm < 1e+21 ) { here->HSM2_ndepm = 1e+21 ; }
here->HSM2_Pb2n = 2.0/beta*log(here->HSM2_ndepm/Nin) ;
here->HSM2_Vbipn = 1.0/beta*log(here->HSM2_ndepm*here->HSM2_nsub/Nin/Nin) ;
here->HSM2_cnst0 = sqrt ( 2.0 * C_ESI * C_QE * here->HSM2_ndepm / beta ) ;
here->HSM2_cnst1 = Nin*Nin/here->HSM2_ndepm/here->HSM2_ndepm ;
T1 = Fn_Pow(Tratio, model->HSM2_depmuetmp) ;
here->HSM2_depmphn0 = T1 / model->HSM2_depmueph1 ;
here->HSM2_depmphn1 = here->HSM2_depmphn0 * model->HSM2_depmueph0 ;
// T0 = 1.8 + 0.4 * Tratio + 0.1 * Tratio * Tratio - model->HSM2_depvtmp * ( 1.0 - Tratio ) ;
T0 = 1.0 ; // ignore DEPVTMP in HiSIM2
here->HSM2_depvmax = model->HSM2_depvmax / T0 / C_m2cm ;
// LG dependence DEPVMAX
T3 = pow( here->HSM2_lg, model->HSM2_depvmaxlp ) ;
here->HSM2_depvmax = here->HSM2_depvmax * ( 1.0 + model->HSM2_depvmaxl / T3 ) ;
if( here->HSM2_depvmax < 0.0 ) { here->HSM2_depvmax = 0.0; }
// LG dependence DEPLEAK
T3 = pow( here->HSM2_lg, model->HSM2_depleaklp ) ;
here->HSM2_depleak = model->HSM2_depleak * ( 1.0 + model->HSM2_depleakl / T3 ) ;
if( here->HSM2_depleak < 0.0 ) { here->HSM2_depleak = 0.0; }
// LG dependence DEPMUE0 & DEPMUE1
T3 = pow( here->HSM2_lg, model->HSM2_depmue0lp ) ;
here->HSM2_depmue0 = model->HSM2_depmue0 * ( 1.0 + model->HSM2_depmue0l / T3 ) ;
if( here->HSM2_depmue0 < 1.0 ) { here->HSM2_depmue0 = 1.0; }
T3 = pow( here->HSM2_lg, model->HSM2_depmue1lp ) ;
here->HSM2_depmue1 = model->HSM2_depmue1 * ( 1.0 + model->HSM2_depmue1l / T3 ) ;
if( here->HSM2_depmue1 < 0.0 ) { here->HSM2_depmue1 = 0.0; }
// LG dependence DEPMUEBACK0 & DEPMUEBACK1
T3 = pow( here->HSM2_lg, model->HSM2_depmueback0lp ) ;
here->HSM2_depmueback0 = model->HSM2_depmueback0 * ( 1.0 + model->HSM2_depmueback0l / T3 ) ;
if( here->HSM2_depmueback0 < 0.0 ) { here->HSM2_depmueback0 = 0.0; }
T3 = pow( here->HSM2_lg, model->HSM2_depmueback1lp ) ;
here->HSM2_depmueback1 = model->HSM2_depmueback1 * ( 1.0 + model->HSM2_depmueback1l / T3 ) ;
if( here->HSM2_depmueback1 < 0.0 ) { here->HSM2_depmueback1 = 0.0; }
// LG dependence DEPVDSEF1 & DEPVDSEF2
T3 = pow( here->HSM2_lg, model->HSM2_depvdsef1lp ) ;
here->HSM2_depvdsef1 = model->HSM2_depvdsef1 * ( 1.0 + model->HSM2_depvdsef1l / T3 ) ;
if( here->HSM2_depvdsef1 < 0.0 ) { here->HSM2_depvdsef1 = 0.0; }
T3 = pow( here->HSM2_lg, model->HSM2_depvdsef2lp ) ;
here->HSM2_depvdsef2 = model->HSM2_depvdsef2 * ( 1.0 + model->HSM2_depvdsef2l / T3 ) ;
if( here->HSM2_depvdsef2 < 0.1 ) { here->HSM2_depvdsef2 = 0.1; }
} else {
/* Normal mode MOSFET */
here->HSM2_cnst0 = sqrt ( 2.0 * C_ESI * C_QE * here->HSM2_nsub / beta ) ;
/* cnst1: n_{p0} / p_{p0} */
T1 = Nin / here->HSM2_nsub ;
here->HSM2_cnst1 = T1 * T1 ;
}
/* 2 phi_B (temperature-dependent) */
/* @temp, with pocket */
here->HSM2_pb2 = 2.0e0 / beta * log (here->HSM2_nsub / Nin) ;
if ( pParam->HSM2_nover != 0.0) {
here->HSM2_pb2over = 2.0 / beta * log( pParam->HSM2_nover / Nin ) ;
/* (1 / cnst1 / cnstCoxi) for Ps0LD_iniB */
T1 = here->HSM2_cnst0over * model->HSM2_tox / here->HSM2_cecox ;
T2 = pParam->HSM2_nover / Nin ;
T1 = T2 * T2 / ( T1 * T1 ) ;
here->HSM2_ps0ldinib = T1 ; /* (1 / cnst1 / cnstCoxi) */
here->HSM2_cnst0over = sqrt ( 2.0 * C_ESI * C_QE * pParam->HSM2_nover / beta ) ;
}else {
here->HSM2_pb2over = 0.0 ;
here->HSM2_ps0ldinib = 0.0 ;
here->HSM2_cnst0over = 0.0 ;
}
@ -556,25 +673,21 @@ int HSM2temp(
here->HSM2_wdpl = sqrt ( T1 / here->HSM2_nsub ) ;
here->HSM2_wdplp = sqrt( T1 / ( here->HSM2_nsubp ) ) ;
/* cnst1: n_{p0} / p_{p0} */
T1 = Nin / here->HSM2_nsub ;
here->HSM2_cnst1 = T1 * T1 ;
/* for substrate-source/drain junction diode. */
js = pParam->HSM2_js0
* exp ((here->HSM2_egtnom * here->HSM2_betatnom - Eg * beta
+ model->HSM2_xti * log (TTEMP / model->HSM2_ktnom)) / pParam->HSM2_nj) ;
+ model->HSM2_xti * log (Tratio)) / pParam->HSM2_nj) ;
jssw = pParam->HSM2_js0sw
* exp ((here->HSM2_egtnom * here->HSM2_betatnom - Eg * beta
+ model->HSM2_xti * log (TTEMP / model->HSM2_ktnom)) / model->HSM2_njsw) ;
+ model->HSM2_xti * log (Tratio)) / model->HSM2_njsw) ;
js2 = pParam->HSM2_js0
* exp ((here->HSM2_egtnom * here->HSM2_betatnom - Eg * beta
+ model->HSM2_xti2 * log (TTEMP / model->HSM2_ktnom)) / pParam->HSM2_nj) ;
+ model->HSM2_xti2 * log (Tratio)) / pParam->HSM2_nj) ;
jssw2 = pParam->HSM2_js0sw
* exp ((here->HSM2_egtnom * here->HSM2_betatnom - Eg * beta
+ model->HSM2_xti2 * log (TTEMP / model->HSM2_ktnom)) / model->HSM2_njsw) ;
+ model->HSM2_xti2 * log (Tratio)) / model->HSM2_njsw) ;
here->HSM2_isbd = here->HSM2_ad * js + here->HSM2_pd * jssw ;
here->HSM2_isbd2 = here->HSM2_ad * js2 + here->HSM2_pd * jssw2 ;
@ -582,13 +695,13 @@ int HSM2temp(
here->HSM2_isbs2 = here->HSM2_as * js2 + here->HSM2_ps * jssw2 ;
here->HSM2_vbdt = pParam->HSM2_nj / beta
* log (pParam->HSM2_vdiffj * (TTEMP / model->HSM2_ktnom) * (TTEMP / model->HSM2_ktnom)
* log (pParam->HSM2_vdiffj * (Tratio) * (Tratio)
/ (here->HSM2_isbd + 1.0e-50) + 1) ;
here->HSM2_vbst = pParam->HSM2_nj / beta
* log (pParam->HSM2_vdiffj * (TTEMP / model->HSM2_ktnom) * (TTEMP / model->HSM2_ktnom)
* log (pParam->HSM2_vdiffj * (Tratio) * (Tratio)
/ (here->HSM2_isbs + 1.0e-50) + 1) ;
here->HSM2_exptemp = exp (((TTEMP / model->HSM2_ktnom) - 1) * model->HSM2_ctemp) ;
here->HSM2_exptemp = exp (((Tratio) - 1) * model->HSM2_ctemp) ;
here->HSM2_jd_nvtm_inv = 1.0 / ( pParam->HSM2_nj / beta ) ;
here->HSM2_jd_expcd = exp (here->HSM2_vbdt * here->HSM2_jd_nvtm_inv ) ;
here->HSM2_jd_expcs = exp (here->HSM2_vbst * here->HSM2_jd_nvtm_inv ) ;

46
src/spicelib/devices/hisim2/hsm2trunc.c

@ -1,20 +1,59 @@
/***********************************************************************
HiSIM (Hiroshima University STARC IGFET Model)
Copyright (C) 2012 Hiroshima University & STARC
Copyright (C) 2014 Hiroshima University & STARC
MODEL NAME : HiSIM
( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta
( VERSION : 2 SUBVERSION : 8 REVISION : 0 )
FILE : hsm2trunc.c
Date : 2012.10.25
Date : 2014.6.5
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 "HiSIM2 Distribution Statement and
Copyright Notice" attached to HiSIM2 model.
-----HiSIM2 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 disclaim 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."
*************************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsm2def.h"
@ -25,7 +64,6 @@ int HSM2trunc(
GENmodel *inModel,
CKTcircuit *ckt,
double *timeStep)
{
HSM2model *model = (HSM2model*)inModel;
HSM2instance *here;

Loading…
Cancel
Save