white spaces, formatting and verilog-a conformity

This commit is contained in:
dwarning 2020-12-18 18:33:20 +01:00 committed by Holger Vogt
parent 8e4db91099
commit 7cef1871bb
20 changed files with 6476 additions and 6475 deletions

View File

@ -189,7 +189,7 @@
`define BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, SRCFLAG, Rend) \
if (SRCFLAG == 1) begin \
case(rgeo) \
case (rgeo) \
1, 2, 5: begin \
if (nuEnd == 0.0) begin \
Rend = 0.0; \
@ -213,7 +213,7 @@
end \
endcase \
end else begin \
case(rgeo) \
case (rgeo) \
1, 3, 7: begin \
if (nuEnd == 0.0) begin \
Rend = 0.0; \
@ -242,7 +242,7 @@
`define BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, SRCFLAG, Rend) \
begin \
if (SRCFLAG == 1) begin \
case(rgeo) \
case (rgeo) \
1, 2, 5: begin \
if (nuEnd == 0.0) begin \
Rend = 0.0; \
@ -267,7 +267,7 @@
end \
endcase \
end else begin \
case(rgeo) \
case (rgeo) \
1, 3, 7: begin \
if (nuEnd == 0.0) begin \
Rend = 0.0; \
@ -314,7 +314,7 @@
end \
end \
end \
case(geo) \
case (geo) \
0: begin \
if (SRCFLAG == 1) begin \
`BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
@ -457,7 +457,7 @@
ADsha = DMCG * Weffcj;\
ASmer = DMDG * Weffcj; \
ADmer = DMDG * Weffcj; \
case(geo) \
case (geo) \
0: begin \
Ps = nuEndS * PSiso + nuIntS * PSsha;\
Pd = nuEndD * PDiso + nuIntD * PDsha;\
@ -2770,7 +2770,7 @@ analog begin
end
if (ASYMMOD != 0) begin
VSATR_t = VSATR_i * pow(TRatio, -AT_i);
if(VSATR_t < 100.0) begin
if (VSATR_t < 100.0) begin
$strobe("Warning: VSATR(%f) = %e is less than 100, setting it to 100.", DevTemp, VSATR_t);
VSATR_t = 100.0;
end
@ -3335,7 +3335,7 @@ analog begin
// Channel length modulation, Ref: BSIM4 Model
Vasat = Vdssat + EsatL;
if(PCLM_a != 0.0) begin
if (PCLM_a != 0.0) begin
if (PCLMG < 0.0) begin
T1 = PCLM_a / (1.0 - PCLMG * qia / EsatL) / Fp;
end else begin
@ -3792,7 +3792,7 @@ analog begin
T0d = (Nl + Nstar) * (Nl + Nstar);
T0e = NOIA * `q * Vt;
if (FNOIMOD == 1) begin
if(LINTNOI >= (Leff - LH) / 2.0) begin
if (LINTNOI >= (Leff - LH) / 2.0) begin
$strobe("Warning: LINTNOI = %e is too large - Leff for noise is negative. Re-setting LINTNOI = 0.", LINTNOI);
LINTNOI_i = 0.0;
end else begin

View File

@ -4,7 +4,7 @@
// ********************************************************
//
// ********************************************************
// * Copyright 2016 Regents of the University of California.
// * Copyright 2016 Regents of the University of California.
// * All rights reserved.
// *
// * Project Director: Prof. Chenming Hu.
@ -18,7 +18,7 @@
// support. The University of California and its employees are not liable
// for the condition or performance of the software.
// The University of California owns the copyright and grants users a perpetual,
// irrevocable, worldwide, non-exclusive, royalty-free license with
// irrevocable, worldwide, non-exclusive, royalty-free license with
// respect to the software as set forth below.
// The University of California hereby disclaims all implied warranties.
// The University of California grants the users the right to modify, copy,
@ -35,8 +35,8 @@
// the software on any copy or modification of such made available
// to others
// Agreed to on __Jan 01, 2016__________________
// By: ___University of California, Berkeley____
// ___Chenming Hu_____________________
// By: ___University of California, Berkeley____
// ___Chenming Hu_____________________
// ___Professor in Graduate School _______
// ********************************************************
@ -65,7 +65,7 @@
//
// In Verilog-A the number of internal nodes cannot be controlled by
// a model parameter. Therefore we use `define statements
// to control it. Comment the following lines whenever
// to control it. Comment the following lines whenever
// possible for best computational efficiency.
`define __OPINFO__
`define __DEBUG__
@ -81,35 +81,35 @@
module bsimcmg(d, g, s, e, t);
inout g, d, s, e, t;
electrical g, d, s, e;
electrical si, di;
inout g, d, s, e, t;
electrical g, d, s, e;
electrical si, di;
`ifdef __NQSMOD1__
electrical gi;
electrical gi;
`endif
`ifdef __NQSMOD2__
electrical q;
electrical q;
`endif
`ifdef __RGATEMOD__
electrical ge;
electrical ge;
`endif
`ifdef __SHMOD__
thermal t;
branch (t) rth_branch;
branch (t) ith_branch;
thermal t;
branch (t) rth_branch;
branch (t) ith_branch;
`else
thermal t;
`endif
thermal t;
`endif
// Internal node controlled by Correlated Thermal Noise Switch
// Internal node controlled by Correlated Thermal Noise Switch
`ifdef __TNOIMOD1__
electrical N;
`endif
`include "bsimcmg_body.include"

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
// ********************************************************
//
// ********************************************************
// * Copyright 2016 Regents of the University of California.
// * Copyright 2016 Regents of the University of California.
// * All rights reserved.
// *
// * Project Director: Prof. Chenming Hu.
@ -18,7 +18,7 @@
// support. The University of California and its employees are not liable
// for the condition or performance of the software.
// The University of California owns the copyright and grants users a perpetual,
// irrevocable, worldwide, non-exclusive, royalty-free license with
// irrevocable, worldwide, non-exclusive, royalty-free license with
// respect to the software as set forth below.
// The University of California hereby disclaims all implied warranties.
// The University of California grants the users the right to modify, copy,
@ -35,8 +35,8 @@
// the software on any copy or modification of such made available
// to others
// Agreed to on __Jan 01, 2016__________________
// By: ___University of California, Berkeley____
// ___Chenming Hu_____________________
// By: ___University of California, Berkeley____
// ___Chenming Hu_____________________
// ___Professor in Graduate School _______
// ********************************************************
@ -64,53 +64,53 @@
real x42_TT2, x42_Cfgsat, x42_delta, Cfg;
`define Cfringe_2d(block_name, Hg, Hc, Lext, Wfin, Lc, Lg, Tox, Cf1, Cgg) \
begin : block_name \
x42_Hr = 2.3 + 0.2 * ((Hg) + (Tox)) / (Hc); \
x42_Lr = 1.05; \
x42_Hgdelta = abs((Hg) + (Tox) - (Hc)); \
x42_Lmax = (Lext) * x42_Lr; \
\
x42_y = min((Hc), (Hg) + (Tox)); \
x42_x = (Lext) / (x42_Hr + 1.0); \
x42_Cnon = 1.7e12; \
x42_CcgSat = epssp * (x42_y - x42_x) / (Lext); \
x42_TT1 = x42_Cnon * x42_CcgSat; \
if(x42_TT1 > `EXPL_THRESHOLD) \
x42_Ccg1 = x42_CcgSat; \
else \
x42_Ccg1 = 1.0 / x42_Cnon * ln(1.0 + lexp(x42_TT1)); \
\
x42_r1cf = 0.5 * \
min((Hc) / ((Hg) + (Tox)), ((Hg) + (Tox)) / (Hc)); \
x42_Rcf = x42_Hgdelta * x42_r1cf; \
x42_Ccg2 = epssp * 2 / `M_PI * \
ln(((Lext) + 0.5 * `M_PI * x42_Rcf) / (Lext)); \
\
x42_Ccg = (Wfin) * (x42_Ccg1 + x42_Ccg2); \
\
x42_x = x42_Lmax / (Hg); \
x42_C1 = 4.0 / (sqrt(2.0 * (x42_x + 1)) * `M_PI); \
x42_C2 = sqrt((Tox) * (Tox) + 2.0 * (Hg) * (Tox) + \
(Hg) * (Hg) * (x42_x + 1)) * sqrt(x42_x + 1) + (Tox) + \
(Hg) * x42_x + (Hg); \
x42_C3 = (Tox) * sqrt((x42_x + 1) * (x42_x + 4)) + Tox * (x42_x + 2); \
x42_Cfglog = epssp * (x42_C1 * ln(x42_C2 / x42_C3) + 12.27); \
\
x42_dcf = x42_Hr * x42_Lr; \
x42_TT0 = sqrt(x42_dcf * x42_dcf + 1.0); \
x42_TT1 = sqrt((x42_dcf * x42_dcf + 1) * ((x42_dcf * (Tox)) * (x42_dcf * (Tox)) + \
2 * x42_dcf * x42_Lmax * (Tox) + (x42_dcf * x42_dcf + 1) * x42_Lmax * x42_Lmax)) \
+ x42_dcf * (Tox) + x42_dcf * x42_dcf * x42_Lmax + x42_Lmax; \
x42_TT2 = (x42_TT0 + 1.0) * (x42_dcf * (Tox)); \
x42_Cfgsat = 2.0 * epssp * sqrt(2) / `M_PI * (Cf1) * x42_dcf \
/ x42_TT0 * ln(x42_TT1 / x42_TT2); \
\
x42_delta = 1.2e-12; \
x42_TT1 = x42_Cfgsat - x42_Cfglog - x42_delta; \
Cfg = (Wfin) * (x42_Cfgsat - 0.5 * (x42_TT1 + \
sqrt(x42_TT1 * x42_TT1 + 4 * x42_delta * x42_Cfgsat))); \
Cgg = x42_Ccg + Cfg; \
end
begin : block_name \
x42_Hr = 2.3 + 0.2 * ((Hg) + (Tox)) / (Hc); \
x42_Lr = 1.05; \
x42_Hgdelta = abs((Hg) + (Tox) - (Hc)); \
x42_Lmax = (Lext) * x42_Lr; \
\
x42_y = min((Hc), (Hg) + (Tox)); \
x42_x = (Lext) / (x42_Hr + 1.0); \
x42_Cnon = 1.7e12; \
x42_CcgSat = epssp * (x42_y - x42_x) / (Lext); \
x42_TT1 = x42_Cnon * x42_CcgSat; \
if (x42_TT1 > `EXPL_THRESHOLD) \
x42_Ccg1 = x42_CcgSat; \
else \
x42_Ccg1 = 1.0 / x42_Cnon * ln(1.0 + lexp(x42_TT1)); \
\
x42_r1cf = 0.5 * \
min((Hc) / ((Hg) + (Tox)), ((Hg) + (Tox)) / (Hc)); \
x42_Rcf = x42_Hgdelta * x42_r1cf; \
x42_Ccg2 = epssp * 2 / `M_PI * \
ln(((Lext) + 0.5 * `M_PI * x42_Rcf) / (Lext)); \
\
x42_Ccg = (Wfin) * (x42_Ccg1 + x42_Ccg2); \
\
x42_x = x42_Lmax / (Hg); \
x42_C1 = 4.0 / (sqrt(2.0 * (x42_x + 1)) * `M_PI); \
x42_C2 = sqrt((Tox) * (Tox) + 2.0 * (Hg) * (Tox) + \
(Hg) * (Hg) * (x42_x + 1)) * sqrt(x42_x + 1) + (Tox) + \
(Hg) * x42_x + (Hg); \
x42_C3 = (Tox) * sqrt((x42_x + 1) * (x42_x + 4)) + Tox * (x42_x + 2); \
x42_Cfglog = epssp * (x42_C1 * ln(x42_C2 / x42_C3) + 12.27); \
\
x42_dcf = x42_Hr * x42_Lr; \
x42_TT0 = sqrt(x42_dcf * x42_dcf + 1.0); \
x42_TT1 = sqrt((x42_dcf * x42_dcf + 1) * ((x42_dcf * (Tox)) * (x42_dcf * (Tox)) + \
2 * x42_dcf * x42_Lmax * (Tox) + (x42_dcf * x42_dcf + 1) * x42_Lmax * x42_Lmax)) \
+ x42_dcf * (Tox) + x42_dcf * x42_dcf * x42_Lmax + x42_Lmax; \
x42_TT2 = (x42_TT0 + 1.0) * (x42_dcf * (Tox)); \
x42_Cfgsat = 2.0 * epssp * sqrt(2) / `M_PI * (Cf1) * x42_dcf \
/ x42_TT0 * ln(x42_TT1 / x42_TT2); \
\
x42_delta = 1.2e-12; \
x42_TT1 = x42_Cfgsat - x42_Cfglog - x42_delta; \
Cfg = (Wfin) * (x42_Cfgsat - 0.5 * (x42_TT1 + \
sqrt(x42_TT1 * x42_TT1 + 4 * x42_delta * x42_Cfgsat))); \
Cgg = x42_Ccg + Cfg; \
end

View File

@ -4,7 +4,7 @@
// ********************************************************
//
// ********************************************************
// * Copyright 2016 Regents of the University of California.
// * Copyright 2016 Regents of the University of California.
// * All rights reserved.
// *
// * Project Director: Prof. Chenming Hu.
@ -18,7 +18,7 @@
// support. The University of California and its employees are not liable
// for the condition or performance of the software.
// The University of California owns the copyright and grants users a perpetual,
// irrevocable, worldwide, non-exclusive, royalty-free license with
// irrevocable, worldwide, non-exclusive, royalty-free license with
// respect to the software as set forth below.
// The University of California hereby disclaims all implied warranties.
// The University of California grants the users the right to modify, copy,
@ -35,8 +35,8 @@
// the software on any copy or modification of such made available
// to others
// Agreed to on __Jan 01, 2016__________________
// By: ___University of California, Berkeley____
// ___Chenming Hu_____________________
// By: ___University of California, Berkeley____
// ___Chenming Hu_____________________
// ___Professor in Graduate School _______
// ********************************************************
@ -119,7 +119,7 @@
// MPIxx model parameter integer
// IPRxx instance parameter real
// IPIxx instance parameter integer
// ||
// ||
// cc closed lower bound, closed upper bound
// oo open lower bound, open upper bound
// co closed lower bound, open upper bound
@ -137,49 +137,49 @@
`define ALIAS(alias,paramName) aliasparam alias = paramName ;
`define OPP(nam,uni,des) (*units=uni, desc=des*) real nam ;
`define MPRnb(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def ;
`define MPRnb(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def ;
`define MPRex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter real nam=def exclude exc ;
`define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr] ;
`define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr) ;
`define MPRco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr) ;
`define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr] ;
`define MPRcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr] ;
`define MPRoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr) ;
`define MPRco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from[lwr:upr) ;
`define MPRoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter real nam=def from(lwr:upr] ;
`define MPRcz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from[ 0:inf);
`define MPRoz(nam,def,uni, des) (*units=uni, desc=des*) parameter real nam=def from( 0:inf);
`define MPInb(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def ;
`define MPIex(nam,def,uni,exc, des) (*units=uni, desc=des*) parameter integer nam=def exclude exc ;
`define MPIcc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr] ;
`define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr) ;
`define MPIco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr) ;
`define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr] ;
`define MPIoo(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr) ;
`define MPIco(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from[lwr:upr) ;
`define MPIoc(nam,def,uni,lwr,upr,des) (*units=uni, desc=des*) parameter integer nam=def from(lwr:upr] ;
`define MPIcz(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ 0:inf);
`define MPIoz(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from( 0:inf);
`define MPIsw(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ 0: 1] ;
`define MPIty(nam,def,uni, des) (*units=uni, desc=des*) parameter integer nam=def from[ -1: 1] exclude 0 ;
`define IPRnb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def ;
`define IPRnb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def ;
`define IPRex(nam,def,uni,exc, des) (*units=uni, type="instance", desc=des*) parameter real nam=def exclude exc ;
`define IPRcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr] ;
`define IPRoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr) ;
`define IPRco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr) ;
`define IPRoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr] ;
`define IPRcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr] ;
`define IPRoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr) ;
`define IPRco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[lwr:upr) ;
`define IPRoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter real nam=def from(lwr:upr] ;
`define IPRcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from[ 0:inf);
`define IPRoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter real nam=def from( 0:inf);
`define IPInb(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def ;
`define IPIex(nam,def,uni,exc, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def exclude exc ;
`define IPIcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr] ;
`define IPIoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr) ;
`define IPIco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr) ;
`define IPIoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr] ;
`define IPIcc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr] ;
`define IPIoo(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr) ;
`define IPIco(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[lwr:upr) ;
`define IPIoc(nam,def,uni,lwr,upr,des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from(lwr:upr] ;
`define IPIcz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from[ 0:inf);
`define IPIoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from( 0:inf);
`ifdef EXPLICIT_MFACTOR
`define IPM (*units="" , type="instance", desc="multiplicity factor"*) parameter real m=1.0 from(0.0:inf) ;
`define MFACTOR_USE m
`else //
`define IPM
`define MFACTOR_USE 1.0
`define IPM (*units="" , type="instance", desc="multiplicity factor"*) parameter real m=1.0 from(0.0:inf) ;
`define MFACTOR_USE m
`else //
`define IPM
`define MFACTOR_USE 1.0
`endif

View File

@ -81,98 +81,98 @@ module ekv (d,g,s,b);
// Instance parameters
// - intrinsic model
parameter real l=10e-6 from [0:inf) `P(type="instance" info="Drawn length [m]" units="m");
parameter real w=10e-6 from [0:inf) `P(type="instance" info="Drawn width [m]" units="m");
parameter real m=1.0 from [1:inf) `P(type="instance" info="Parallel multiplier" units="m");
parameter real ns=1.0 from [1:inf) `P(type="instance" info="Series multiplier" units="m");
parameter real dtemp = 0.0 from (-inf:inf) `P(type="instance" info="Difference sim. temp and device temp" units="C");
parameter real l=10e-6 from [0:inf) `P(type="instance" desc="Drawn length [m]" units="m");
parameter real w=10e-6 from [0:inf) `P(type="instance" desc="Drawn width [m]" units="m");
parameter real m=1.0 from [1:inf) `P(type="instance" desc="Parallel multiplier" units="m");
parameter real ns=1.0 from [1:inf) `P(type="instance" desc="Series multiplier" units="m");
parameter real dtemp = 0.0 from (-inf:inf) `P(type="instance" desc="Difference sim. temp and device temp" units="C");
// - external parasitics
parameter real ad=0.0 from [0:inf) `P(type="instance" info="Drain area" units="m^2");
parameter real as=0.0 from [0:inf) `P(type="instance" info="Source area" units="m^2");
parameter real pd=0.0 from [0:inf) `P(type="instance" info="Drain perimeter" units="m");
parameter real ps=0.0 from [0:inf) `P(type="instance" info="Source perimeter" units="m");
parameter real nrd=0.0 from [0:inf) `P(type="instance" info="Drain no. squares");
parameter real nrs=0.0 from [0:inf) `P(type="instance" info="Source no. squares");
parameter real ad=0.0 from [0:inf) `P(type="instance" desc="Drain area" units="m^2");
parameter real as=0.0 from [0:inf) `P(type="instance" desc="Source area" units="m^2");
parameter real pd=0.0 from [0:inf) `P(type="instance" desc="Drain perimeter" units="m");
parameter real ps=0.0 from [0:inf) `P(type="instance" desc="Source perimeter" units="m");
parameter real nrd=0.0 from [0:inf) `P(type="instance" desc="Drain no. squares");
parameter real nrs=0.0 from [0:inf) `P(type="instance" desc="Source no. squares");
// Model parameters
parameter integer nmos=1 from [0:1] `P(info="MOS channel type");
parameter integer pmos=1 from [0:1] `P(info="MOS channel type");
parameter integer nmos=1 from [0:1] `P(desc="MOS channel type");
parameter integer pmos=1 from [0:1] `P(desc="MOS channel type");
parameter integer type=1 from [-1:1] exclude 0;
parameter real tnom=27.0 from [-273.15:inf) `P(info="Nominal temperature" units="C");
parameter real imax=1.0 from [0:inf) `P(info="Maximum forward junction current before linearization" units="A");
parameter real tnom=27.0 from [-273.15:inf) `P(desc="Nominal temperature" units="C");
parameter real imax=1.0 from [0:inf) `P(desc="Maximum forward junction current before linearization" units="A");
// - intrinsic model (optional, section 4.2.1)
parameter real tox=0.0 from [0:inf) `P(info="Oxide thickness" units="m");
parameter real nsub=0.0 from [0:inf) `P(info="Channel doping" units="cm^-3");
parameter real vfb=-1.0 from (-inf:inf) `P(info="Flat-band voltage" units="V");
parameter real tox=0.0 from [0:inf) `P(desc="Oxide thickness" units="m");
parameter real nsub=0.0 from [0:inf) `P(desc="Channel doping" units="cm^-3");
parameter real vfb=-1.0 from (-inf:inf) `P(desc="Flat-band voltage" units="V");
parameter real uo=0.0 from [0:inf) `P(info="Low-field mobility" units="cm^2/Vs");
parameter real vmax=0.0 from [0:inf) `P(info="Saturation velocity" units="m/s");
parameter real theta=0.0 from [0:inf) `P(info="Mobility reduction coefficient" units="V^-1");
parameter real uo=0.0 from [0:inf) `P(desc="Low-field mobility" units="cm^2/Vs");
parameter real vmax=0.0 from [0:inf) `P(desc="Saturation velocity" units="m/s");
parameter real theta=0.0 from [0:inf) `P(desc="Mobility reduction coefficient" units="V^-1");
// - intrinsic model (process related, section 4.1)
parameter real cox=0.7e-3 from [1e-6:inf) `P(info="Oxide capacitance" units="F/m^2");
parameter real xj=0.1e-6 from [1n:inf) `P(info="Junction depth" units="m");
parameter real dl=0.0 from (-inf:inf) `P(info="Length correction" units="m");
parameter real dw=0.0 from (-inf:inf) `P(info="Width correction" units="m");
parameter real cox=0.7e-3 from [1e-6:inf) `P(desc="Oxide capacitance" units="F/m^2");
parameter real xj=0.1e-6 from [1n:inf) `P(desc="Junction depth" units="m");
parameter real dl=0.0 from (-inf:inf) `P(desc="Length correction" units="m");
parameter real dw=0.0 from (-inf:inf) `P(desc="Width correction" units="m");
// - intrinsic model (basic, section 4.2)
parameter real gamma=0.7 from [0:inf) `P(info="Body effect parameter" units="V^0.5");
parameter real phi=0.5 from [0.1:inf) `P(info="Bulk Fermi potential (*2)" units="V");
parameter real vto=0.5 from (-inf:inf) `P(info="Long-channel threshold voltage" units="V");
parameter real kp=20e-6 from [0.0:inf) `P(info="Transconductance parameter" units="A/V^2");
parameter real ucrit=1.0e+6 from [100e+3:inf) `P(info="Longitudinal critical field" units="V/m");
parameter real e0=1.0e-9 from [1e-12:inf) `P(info="Mobility reduction coefficient" units="V/m");
parameter real gamma=0.7 from [0:inf) `P(desc="Body effect parameter" units="V^0.5");
parameter real phi=0.5 from [0.1:inf) `P(desc="Bulk Fermi potential (*2)" units="V");
parameter real vto=0.5 from (-inf:inf) `P(desc="Long-channel threshold voltage" units="V");
parameter real kp=20e-6 from [0.0:inf) `P(desc="Transconductance parameter" units="A/V^2");
parameter real ucrit=1.0e+6 from [100e+3:inf) `P(desc="Longitudinal critical field" units="V/m");
parameter real e0=1.0e-9 from [1e-12:inf) `P(desc="Mobility reduction coefficient" units="V/m");
// - intrinsic model (channel length modulation and charge sharing, section 4.3)
parameter real lambda=0.5 from [0:inf) `P(info="Depletion length coefficient (CLM)");
parameter real weta=0.25 from (-inf:inf) `P(info="Narrow-channel effect coefficient");
parameter real leta=0.1 from (-inf:inf) `P(info="Short-channel effect coefficient");
parameter real lambda=0.5 from [0:inf) `P(desc="Depletion length coefficient (CLM)");
parameter real weta=0.25 from (-inf:inf) `P(desc="Narrow-channel effect coefficient");
parameter real leta=0.1 from (-inf:inf) `P(desc="Short-channel effect coefficient");
// - intrinsic model (reverse short channel effect, section 4.4)
parameter real q0=0.0 from (-inf:inf) `P(info="RSCE peak charge density" units="C/m^2");
parameter real lk=0.29e-6 from [10n:inf) `P(info="RSCE characteristic length" units="m");
parameter real q0=0.0 from (-inf:inf) `P(desc="RSCE peak charge density" units="C/m^2");
parameter real lk=0.29e-6 from [10n:inf) `P(desc="RSCE characteristic length" units="m");
// - intrinsic model (impact ionization, section 4.5)
parameter real iba=0.0 from (-inf:inf) `P(info="First impact ionization coefficient" units="m^-1");
parameter real ibb=3e8 from [1e8:inf) `P(info="Second impact ionization coefficient" units="V/m");
parameter real ibn=1.0 from [0.1:inf) `P(info="Saturation voltage factor for impact ionization");
parameter real iba=0.0 from (-inf:inf) `P(desc="First impact ionization coefficient" units="m^-1");
parameter real ibb=3e8 from [1e8:inf) `P(desc="Second impact ionization coefficient" units="V/m");
parameter real ibn=1.0 from [0.1:inf) `P(desc="Saturation voltage factor for impact ionization");
// - intrinsic model (temperature, section 4.6)
parameter real tcv=1e-3 from (-inf:inf) `P(info="Threshold voltage TC" units="V/deg");
parameter real bex=-1.5 from (-inf:inf) `P(info="Mobility temperature exponent");
parameter real ucex=0.8 from (-inf:inf) `P(info="Longitudinal critical field temperature exponent");
parameter real ibbt=9e-4 from (-inf:inf) `P(info="Temperature coefficient for ibb" units="K^-1");
parameter real tcv=1e-3 from (-inf:inf) `P(desc="Threshold voltage TC" units="V/deg");
parameter real bex=-1.5 from (-inf:inf) `P(desc="Mobility temperature exponent");
parameter real ucex=0.8 from (-inf:inf) `P(desc="Longitudinal critical field temperature exponent");
parameter real ibbt=9e-4 from (-inf:inf) `P(desc="Temperature coefficient for ibb" units="K^-1");
// - intrinsic model (matching, section 4.7)
parameter real avto=0.0 from (-inf:inf) `P(info="Area related vto mismatch parameter" units="Vm");
parameter real akp=0.0 from (-inf:inf) `P(info="Area related kp mismatch parameter" units="m");
parameter real agamma=0.0 from (-inf:inf) `P(info="Area related gamma mismatch parameter" units="V^0.5*m");
parameter real avto=0.0 from (-inf:inf) `P(desc="Area related vto mismatch parameter" units="Vm");
parameter real akp=0.0 from (-inf:inf) `P(desc="Area related kp mismatch parameter" units="m");
parameter real agamma=0.0 from (-inf:inf) `P(desc="Area related gamma mismatch parameter" units="V^0.5*m");
// - intrinsic model (flicker noise, section 4.8)
parameter real kf=0.0 from [0:inf) `P(info="Flicker noise coefficient");
parameter real af=1.0 from (-inf:inf) `P(info="Flicker noise exponent");
parameter real kf=0.0 from [0:inf) `P(desc="Flicker noise coefficient");
parameter real af=1.0 from (-inf:inf) `P(desc="Flicker noise exponent");
// - external parasitic parameters
parameter real hdif=0.0 from [0:inf) `P(info="S/D diffusion length (/2)" units="m");
parameter real rsh=0.0 from [0:inf) `P(info="S/D sheet resistance" units="Ohm");
parameter real js=0.0 from [0:inf) `P(info="S/D junction saturation current density" units="A/m^2");
parameter real jsw=0.0 from [0:inf) `P(info="S/D junction sidewall saturation current density" units="A/m");
parameter real xti=0.0 from [0:inf) `P(info="S/D diode saturation current temperature exponent");
parameter real n=1 from [0.5:10] `P(info="S/D diode emission coefficient");
parameter real cj=0.0 from [0:inf) `P(info="S/D zero-bias junction capacitance per area" units="F/m^2");
parameter real cjsw=0.0 from [0:inf) `P(info="S/D zero-bias junction capacitance per perimeter" units="F/m");
parameter real pb=0.8 from (0:inf) `P(info="S/D bottom junction builtin potential" units="V");
parameter real pbsw=pb from (0:inf) `P(info="S/D sidewall junction builtin potential" units="V");
parameter real mj=0.5 from (0:inf) `P(info="S/D bottom junction grading coefficient");
parameter real mjsw=0.333 from (0:inf) `P(info="S/D sidewall junction grading coefficient");
parameter real fc=0.5 from (0:inf) `P(info="S/D bottom junction forward-bias threshold");
parameter real fcsw=fc from (0:inf) `P(info="S/D sidewall junction forward-bias threshold");
parameter real cgso=1.5e-10 from [0:inf) `P(info="Gate-source overlap capacitance per width" units="F/m");
parameter real cgdo=1.5e-10 from [0:inf) `P(info="Gate-drain overlap capacitance per width" units="F/m");
parameter real cgbo=4.0e-10 from [0:inf) `P(info="Gate-bulk overlap capacitance per length" units="F/m");
parameter real hdif=0.0 from [0:inf) `P(desc="S/D diffusion length (/2)" units="m");
parameter real rsh=0.0 from [0:inf) `P(desc="S/D sheet resistance" units="Ohm");
parameter real js=0.0 from [0:inf) `P(desc="S/D junction saturation current density" units="A/m^2");
parameter real jsw=0.0 from [0:inf) `P(desc="S/D junction sidewall saturation current density" units="A/m");
parameter real xti=0.0 from [0:inf) `P(desc="S/D diode saturation current temperature exponent");
parameter real n=1 from [0.5:10] `P(desc="S/D diode emission coefficient");
parameter real cj=0.0 from [0:inf) `P(desc="S/D zero-bias junction capacitance per area" units="F/m^2");
parameter real cjsw=0.0 from [0:inf) `P(desc="S/D zero-bias junction capacitance per perimeter" units="F/m");
parameter real pb=0.8 from (0:inf) `P(desc="S/D bottom junction builtin potential" units="V");
parameter real pbsw=pb from (0:inf) `P(desc="S/D sidewall junction builtin potential" units="V");
parameter real mj=0.5 from (0:inf) `P(desc="S/D bottom junction grading coefficient");
parameter real mjsw=0.333 from (0:inf) `P(desc="S/D sidewall junction grading coefficient");
parameter real fc=0.5 from (0:inf) `P(desc="S/D bottom junction forward-bias threshold");
parameter real fcsw=fc from (0:inf) `P(desc="S/D sidewall junction forward-bias threshold");
parameter real cgso=1.5e-10 from [0:inf) `P(desc="Gate-source overlap capacitance per width" units="F/m");
parameter real cgdo=1.5e-10 from [0:inf) `P(desc="Gate-drain overlap capacitance per width" units="F/m");
parameter real cgbo=4.0e-10 from [0:inf) `P(desc="Gate-bulk overlap capacitance per length" units="F/m");
// Declaration of variables
integer mode, MOStype;
@ -193,6 +193,8 @@ module ekv (d,g,s,b);
analog begin
MOStype = 1;
gmin = $simparam("gmin");
`INITIAL_MODEL // Model Initialization
@ -204,8 +206,7 @@ module ekv (d,g,s,b);
end else begin
MOStype = (`PGIVEN(type)) ? type : `NMOS;
end
//$strobe("MOStype %d", MOStype);
//$strobe("MOStype %d", MOStype);
if (`PGIVEN(cox)) begin
cox_p = cox;

View File

@ -9,25 +9,25 @@
module bjt504tva (c, b, e, s, dt);
// External ports
// External ports
inout c, b, e, s, dt;
electrical c `P(info="external collector node");
electrical b `P(info="external base node");
electrical e `P(info="external emitter node");
electrical s `P(info="external substrate node");
electrical dt `P(info="external thermal node");
electrical c `P(desc="external collector node");
electrical b `P(desc="external base node");
electrical e `P(desc="external emitter node");
electrical s `P(desc="external substrate node");
electrical dt `P(desc="external thermal node");
// Internal nodes
electrical c1 `P(info="internal collector node 1");
electrical e1 `P(info="internal emitter node");
electrical b1 `P(info="internal base node 1");
electrical b2 `P(info="internal base node 2");
electrical c2 `P(info="internal collector node 2");
electrical c3 `P(info="internal collector node 3");
electrical c4 `P(info="internal collector node 4");
electrical c1 `P(desc="internal collector node 1");
electrical e1 `P(desc="internal emitter node");
electrical b1 `P(desc="internal base node 1");
electrical b2 `P(desc="internal base node 2");
electrical c2 `P(desc="internal collector node 2");
electrical c3 `P(desc="internal collector node 3");
electrical c4 `P(desc="internal collector node 4");
// For correlated noise implementation
electrical noi `P(info="internal noise node");
electrical noi `P(desc="internal noise node");
`include "parameters.inc"
`include "variables.inc"

View File

@ -6,7 +6,7 @@
// Evaluate model equations
begin // Currents and charges
// Nodal biases
// Nodal biases
Vb2c1 = TYPE * V(b2, c1);
Vb2c2 = TYPE * V(b2, c2);
@ -22,7 +22,7 @@ begin // Currents and charges
Vbe = TYPE * V(b, e);
Vbc = TYPE * V(b, c);
/* RvdT, 03-12-2007, voltage differences
/* RvdT, 03-12-2007, voltage differences
associated with distributed parasitic collector.
Evaluated taking values of resistances into account:
in case of vanishing resistance corresponding node
@ -65,7 +65,7 @@ begin // Currents and charges
`endif
// Exponential bias terms
// Exponential bias terms
`expLin(eVb2c2,Vb2c2 * VtINV)
`expLin(eVb2e1,Vb2e1 * VtINV)
@ -75,7 +75,7 @@ begin // Currents and charges
`expLin(eVbc3,Vbc3 * VtINV)
`ifdef SUBSTRATE
`expLin(eVsc1,Vsc1 * VtINV)
// RvdT MXT504.10, new: eVsc3, eVsc4
// RvdT MXT504.10, new: eVsc3, eVsc4
`expLin(eVsc3,Vsc3 * VtINV)
`expLin(eVsc4,Vsc4 * VtINV)
`endif
@ -85,9 +85,9 @@ begin // Currents and charges
`expLin(eVb2c2VDC,(Vb2c2 - VDC_T) * VtINV)
`expLin(eVb2c1VDC,(Vb2c1 - VDC_T) * VtINV)
// Governing equations
// Governing equations
// Epilayer model
// Epilayer model
K0 = sqrt(1.0 + 4.0 * eVb2c2VDC);
Kw = sqrt(1.0 + 4.0 * eVb2c1VDC);
@ -124,7 +124,7 @@ begin // Currents and charges
p0star = gp02 + sqrt(sqr_arg);
else
p0star = gp0_help / (sqrt(sqr_arg) - gp02);
// if (p0star < `TEN_M40) p0star = 0.0;
// if (p0star < `TEN_M40) p0star = 0.0;
eVb2c2star = p0star * (p0star + 1.0) * exp(VDC_T * VtINV);
@ -169,7 +169,7 @@ begin // Currents and charges
Vte = VDE_T / (1.0 - PE) * (1.0 - E0BE) +
`AJE * (Vb2e1 - Vje);
// Effective collector junction capacitance bias
// Effective collector junction capacitance bias
Vjunc = Vb2c1 + Vxi0;
bjc = (`AJC - XP_T) / (1.0 - XP_T);
@ -180,7 +180,7 @@ begin // Currents and charges
fI * bjc * (Vjunc - Vjc);
Vtc = (1.0 - XP_T) * Vcv + XP_T * Vb2c1;
// Transfer current
// Transfer current
If0 = 4.0 * IS_TM / IK_TM;
f1 = If0 * eVb2e1;
@ -222,16 +222,16 @@ begin // Currents and charges
(tmpExp + exp(0.5 * VLR * VtINV)) +
my_gmin * Vb1c4;
// begin RvdT, November 2008, MXT504.8_alpha
// begin RvdT, November 2008, MXT504.8_alpha
// Base-emitter tunneling current
// max E-field E0BE calculated in BE depletion charge model:
// Base-emitter tunneling current
// max E-field E0BE calculated in BE depletion charge model:
if (IZEB > 0.0 && NZEB > 0.0 && Vb2e1 < 0)
begin
`expLin(eZEB, nZEB_T * (1 - (pow2_2mPE/(2.0*E0BE))))
// Force all derivatives at Vb2e1=0 to zero by using in DZEB a
// modified dE0BE expression for E0BE:
// Force all derivatives at Vb2e1=0 to zero by using in DZEB a
// modified dE0BE expression for E0BE:
x = Vb2e1 * inv_VDE_T ;
dE0BE = pow(- x, -2.0-PE)*(PE*(1-PE*PE-3*x*(PE-1))-6*x*x*(PE-1+x)) * `one_sixth ;
`expLin(edZEB, Vb2e1 * pow2_2mPE * nZEB_T / (VGZEB_T * dE0BE ))
@ -244,25 +244,25 @@ begin // Currents and charges
Izteb = 0 ;
end
// end RvdT, November 2008, MXT504.8_alpha
// end RvdT, November 2008, MXT504.8_alpha
// Iex, Isub (XIex, XIsub)
g1 = If0 * eVb1c4;
g2 = 4.0 * eVb1c4VDC;
// nBex until and including MXT 504.9:
// nBex = g1 / (1.0 + sqrt(1.0 + g1));
// nBex since MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram
// nBex until and including MXT 504.9:
// nBex = g1 / (1.0 + sqrt(1.0 + g1));
// nBex since MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram
nBex = (g1 - If0) / (1.0 + sqrt(1.0 + g1));
pWex = g2 / (1.0 + sqrt(1.0 + g2));
/* Iex until and including MXT 504.9:
/* Iex until and including MXT 504.9:
Iex = (1.0 / BRI_T) * (0.5 * IK_TM * nBex - IS_TM);
*/
// Iex since MXT 504.10: RvdT@TUDelft Q1, 2011:
// Iex since MXT 504.10: RvdT@TUDelft Q1, 2011:
Iex = IK_TM * nBex / (2.0 * BRI_T) ;
`ifdef SUBSTRATE
// RvdT MXT504.10, new term: eVsc4
// RvdT MXT504.10, new term: eVsc4
if (EXSUB == 1.0)
Isub = 2.0 * ISS_TM * (eVb1c4 - eVsc4) /
(1.0 + sqrt(1.0 + 4.0 * (IS_TM / IKS_TM) * eVb1c4));
@ -270,11 +270,11 @@ begin // Currents and charges
Isub = 2.0 * ISS_TM * (eVb1c4 - 1.0) /
(1.0 + sqrt(1.0 + 4.0 * (IS_TM / IKS_TM) * eVb1c4));
// until504.8: Isf = ISS_TM * (eVsc1 - 1.0);
// New 504.9:
// until504.8: Isf = ISS_TM * (eVsc1 - 1.0);
// New 504.9:
if (ICSS < 0.0)
// this clause is to implement backwards compatibility
// this clause is to implement backwards compatibility
begin
Isf = ISS_TM * (eVsc1 - 1.0);
end
@ -283,7 +283,7 @@ begin // Currents and charges
Isf = ICSS_TM * (eVsc1 - 1.0);
end
// End: New 504.9.
// End: New 504.9.
`endif
@ -293,7 +293,7 @@ begin // Currents and charges
XIsub = 0.0;
`endif
/* begin: RvdT, Q4 2012, Mextram 504.11: added EXMOD=2 option: */
/* begin: RvdT, Q4 2012, Mextram 504.11: added EXMOD=2 option: */
if (EXMOD == 1 || EXMOD == 2)
begin
@ -304,18 +304,18 @@ begin // Currents and charges
`endif
Xg1 = If0 * eVbc3;
// XnBex until and including MXT 504.9:
// XnBex = Xg1 / (1.0 + sqrt(1.0 + Xg1));
// XnBex in MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram:
// XnBex until and including MXT 504.9:
// XnBex = Xg1 / (1.0 + sqrt(1.0 + Xg1));
// XnBex in MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram:
XnBex = (Xg1 - If0) / (1.0 + sqrt(1.0 + Xg1));
/* XIMex until and including MXT 504.9:
/* XIMex until and including MXT 504.9:
XIMex = XEXT * (0.5 * IK_TM * XnBex - IS_TM) / BRI_T;
*/
// XIMex in MXT 504.10: RvdT@TUDelft Q1, 2011:
// XIMex in MXT 504.10: RvdT@TUDelft Q1, 2011:
XIMex = XEXT * 0.5 * IK_TM * XnBex / BRI_T;
`ifdef SUBSTRATE
// RvdT MXT504.10, new term: eVsc3
// RvdT MXT504.10, new term: eVsc3
if (EXSUB == 1.0)
XIMsub = XEXT * 2.0 * ISS_TM * (eVbc3 - eVsc3) /
(1.0 + sqrt(1.0 + 4.0 * IS_T / IKS_T * eVbc3));
@ -346,7 +346,7 @@ begin // Currents and charges
Fex = 1.0 ;
end
/* end: RvdT, Q4, 2012, Mextram 504.11: added EXMOD=2 option: */
/* end: RvdT, Q4, 2012, Mextram 504.11: added EXMOD=2 option: */
XIex = Fex * XIMex;
@ -360,7 +360,7 @@ begin // Currents and charges
XnBex = 0 ;
end
// Variable base resistance
// Variable base resistance
q0Q = 1.0 + Vte / VER_T + Vtc / VEF_T;
`max_hyp0(q1Q, q0Q, 0.1);
@ -369,7 +369,7 @@ begin // Currents and charges
Rb2 = 3.0 * RBV_TM / qBQ;
Ib1b2 = (2.0 * Vt * (eVb1b2 - 1.0) + Vb1b2) / Rb2;
// Weak-avalanche current
// Weak-avalanche current
Iavl = 0.0;
Gem = 0.0;
@ -421,9 +421,9 @@ begin // Currents and charges
Vb2c2star = Vb2c2;
`ifdef SELFHEATING
// Power dissipation
// Power dissipation
// RvdT 03-12-2007, modified power equation due to distribution collector resistance
// RvdT 03-12-2007, modified power equation due to distribution collector resistance
power_dis = In * (Vb2e1 - Vb2c2star) +
Ic1c2 * (Vb2c2star - Vb2c1) -
@ -434,8 +434,8 @@ begin // Currents and charges
Vc4c1 * Vc4c1 * GCCin_TM +
Vbb1 * Vbb1 / RBC_TM +
Ib1b2 * Vb1b2 +
// 504.8: Nov. 2008, RvdT, TU_Delft: Zener current contribution added:
// Izteb > 0 for Vb2e1 < 0, hence the minus sign:
// 504.8: Nov. 2008, RvdT, TU_Delft: Zener current contribution added:
// Izteb > 0 for Vb2e1 < 0, hence the minus sign:
(Ib1 + Ib2 - Izteb) * Vb2e1 +
Ib1_s * Vb1e1 +
`ifdef SUBSTRATE
@ -444,193 +444,193 @@ begin // Currents and charges
XIsub * (Vbc3 - Vsc3) +
Isf * Vsc1;
`else
(Iex + Ib3) * Vb1c4 + XIex * Vbc3;
(Iex + Ib3) * Vb1c4 + XIex * Vbc3;
`endif
`endif
// Charges
// Charges
Qte = (1.0 - XCJE) * CJE_TM * Vte;
`min_logexp(Vje_s, Vb1e1, Vfe, a_VDE);
Qte_s = XCJE * CJE_TM * (VDE_T / (1.0 - PE) *
Qte = (1.0 - XCJE) * CJE_TM * Vte;
`min_logexp(Vje_s, Vb1e1, Vfe, a_VDE);
Qte_s = XCJE * CJE_TM * (VDE_T / (1.0 - PE) *
(1.0 - pow(1.0 - Vje_s * inv_VDE_T, 1.0 - PE)) +
`AJE * (Vb1e1 - Vje_s));
Qtc = XCJC * CJC_TM * Vtc;
Qb0 = TAUB_T * IK_TM;
Qbe_qs = 0.5 * Qb0 * n0 * q1Q;
Qbc_qs = 0.5 * Qb0 * nB * q1Q;
Qtc = XCJC * CJC_TM * Vtc;
Qb0 = TAUB_T * IK_TM;
Qbe_qs = 0.5 * Qb0 * n0 * q1Q;
Qbc_qs = 0.5 * Qb0 * nB * q1Q;
a_VDC = 0.1 * VDC_T;
`min_logexp(Vjcex, Vb1c4, Vfc, a_VDC);
Vtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - Vjcex / VDC_T, 1.0 - PC)) +
a_VDC = 0.1 * VDC_T;
`min_logexp(Vjcex, Vb1c4, Vfc, a_VDC);
Vtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - Vjcex / VDC_T, 1.0 - PC)) +
bjc * (Vb1c4 - Vjcex);
Qtex = CJC_TM * ((1.0 - XP_T) * Vtexv + XP_T * Vb1c4) *
Qtex = CJC_TM * ((1.0 - XP_T) * Vtexv + XP_T * Vb1c4) *
(1.0 - XCJC) * (1.0 - XEXT);
`min_logexp(XVjcex, Vbc3, Vfc, a_VDC);
XVtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - XVjcex / VDC_T, 1.0 - PC)) +
`min_logexp(XVjcex, Vbc3, Vfc, a_VDC);
XVtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - XVjcex / VDC_T, 1.0 - PC)) +
bjc * (Vbc3 - XVjcex);
XQtex = CJC_TM * ((1.0 - XP_T) * XVtexv + XP_T * Vbc3) *
XQtex = CJC_TM * ((1.0 - XP_T) * XVtexv + XP_T * Vbc3) *
(1.0 - XCJC) * XEXT;
`ifdef SUBSTRATE
a_VDS = 0.1 * VDS_T;
Vfs = VDS_T * (1.0 - pow(`AJS , -1.0 / PS));
`min_logexp(Vjs, Vsc1, Vfs, a_VDS);
Qts = CJS_TM * (VDS_T / (1.0 - PS) *
a_VDS = 0.1 * VDS_T;
Vfs = VDS_T * (1.0 - pow(`AJS , -1.0 / PS));
`min_logexp(Vjs, Vsc1, Vfs, a_VDS);
Qts = CJS_TM * (VDS_T / (1.0 - PS) *
(1.0 - pow(1.0 - Vjs / VDS_T, 1.0 - PS)) + `AJS * (Vsc1 - Vjs));
`endif
Qe0 = TAUE_T * IK_TM * pow(IS_TM / IK_TM, 1.0 / MTAU);
`expLin(tmpExp,Vb2e1 / (MTAU * Vt))
Qe0 = TAUE_T * IK_TM * pow(IS_TM / IK_TM, 1.0 / MTAU);
`expLin(tmpExp,Vb2e1 / (MTAU * Vt))
// Niu Q2, 2016, for fixing reverse VBE noise when KE=1, KC=1,
// Previous Qe_qs causes unphysically large noise correlation time constant tau_n
Qe_qs = Qe0 * tmpExp;
// Niu Q2, 2016, for fixing reverse VBE noise when KE=1, KC=1,
// Previous Qe_qs causes unphysically large noise correlation time constant tau_n
Qe_qs = Qe0 * tmpExp;
Qepi0 = 4.0 * TEPI_T * Vt / RCV_TM;
Qepi = 0.5 * Qepi0 * xi_w * (p0star + pW + 2.0);
Qepi0 = 4.0 * TEPI_T * Vt / RCV_TM;
Qepi = 0.5 * Qepi0 * xi_w * (p0star + pW + 2.0);
Qex = TAUR_T * 0.5 * (Qb0 * nBex + Qepi0 * pWex) / (TAUB_T + TEPI_T);
XQex = 0.0;
Qex = TAUR_T * 0.5 * (Qb0 * nBex + Qepi0 * pWex) / (TAUB_T + TEPI_T);
XQex = 0.0;
if (EXMOD == 1) begin
if (EXMOD == 1) begin
Qex = Qex * (1.0 - XEXT);
Xg2 = 4.0 * eVbc3VDC;
XpWex = Xg2 / (1.0 + sqrt(1.0 + Xg2));
XQex = 0.5 * Fex * XEXT * TAUR_T *
Qex = Qex * (1.0 - XEXT);
Xg2 = 4.0 * eVbc3VDC;
XpWex = Xg2 / (1.0 + sqrt(1.0 + Xg2));
XQex = 0.5 * Fex * XEXT * TAUR_T *
(Qb0 * XnBex + Qepi0 * XpWex) / (TAUB_T + TEPI_T);
end
end
Qb1b2 = 0.0;
if (EXPHI == 1)
begin
dVteVje = pow(1.0 - Vje * inv_VDE_T, -PE) - `AJE;
Vb2e1Vfe = (Vb2e1 - Vfe) / a_VDE;
if (Vb2e1Vfe < 0.0)
dVjeVb2e1 = 1.0 / (1.0 + exp(Vb2e1Vfe));
Qb1b2 = 0.0;
if (EXPHI == 1)
begin
dVteVje = pow(1.0 - Vje * inv_VDE_T, -PE) - `AJE;
Vb2e1Vfe = (Vb2e1 - Vfe) / a_VDE;
if (Vb2e1Vfe < 0.0)
dVjeVb2e1 = 1.0 / (1.0 + exp(Vb2e1Vfe));
else
dVjeVb2e1 = exp(- Vb2e1Vfe) / (1.0 + exp(- Vb2e1Vfe));
dVteVb2e1 = dVteVje * dVjeVb2e1 + `AJE;
dQteVb2e1 = (1.0 - XCJE) * CJE_TM * dVteVb2e1;
dn0Vb2e1 = If0 * eVb2e1 * VtINV * (0.5 / sqrt(1.0 + f1));
dQbeVb2e1 = 0.5 * Qb0 * q1Q * dn0Vb2e1;
// Niu, Q2 2016. Modified to fix reverse VBE noise problem.
dQeVb2e1 = Qe_qs / (MTAU * Vt);
Qb1b2 = 0.2 * Vb1b2 * (dQteVb2e1 + dQbeVb2e1 + dQeVb2e1);
Qe = (1 - KE) * Qe_qs;
Qbe_qs_eff = Qbe_qs + KE * Qe_qs;
Qbc = XQB * Qbe_qs_eff + Qbc_qs;
Qbe = (1 - XQB) * Qbe_qs_eff;
end
else
dVjeVb2e1 = exp(- Vb2e1Vfe) / (1.0 + exp(- Vb2e1Vfe));
dVteVb2e1 = dVteVje * dVjeVb2e1 + `AJE;
dQteVb2e1 = (1.0 - XCJE) * CJE_TM * dVteVb2e1;
dn0Vb2e1 = If0 * eVb2e1 * VtINV * (0.5 / sqrt(1.0 + f1));
dQbeVb2e1 = 0.5 * Qb0 * q1Q * dn0Vb2e1;
// Niu, Q2 2016. Modified to fix reverse VBE noise problem.
dQeVb2e1 = Qe_qs / (MTAU * Vt);
Qb1b2 = 0.2 * Vb1b2 * (dQteVb2e1 + dQbeVb2e1 + dQeVb2e1);
Qe = (1 - KE) * Qe_qs;
Qbe_qs_eff = Qbe_qs + KE * Qe_qs;
Qbc = XQB * Qbe_qs_eff + Qbc_qs;
Qbe = (1 - XQB) * Qbe_qs_eff;
end
else
begin
Qbe = Qbe_qs;
Qbc = Qbc_qs;
Qe = Qe_qs;
end
begin
Qbe = Qbe_qs;
Qbc = Qbc_qs;
Qe = Qe_qs;
end
// Add branch current contributions
// Add branch current contributions
// Static currents
I(c1, c2) <+ TYPE * Ic1c2;
I(c2, e1) <+ TYPE * In;
I(b1, e1) <+ TYPE * Ib1_s;
// begin RvdT, 28-10-2008, MXT504.8_alpha
// contribution tunnel current added
I(b2, e1) <+ TYPE * (Ib1 + Ib2 - Izteb);
// Static currents
I(c1, c2) <+ TYPE * Ic1c2;
I(c2, e1) <+ TYPE * In;
I(b1, e1) <+ TYPE * Ib1_s;
// begin RvdT, 28-10-2008, MXT504.8_alpha
// contribution tunnel current added
I(b2, e1) <+ TYPE * (Ib1 + Ib2 - Izteb);
`ifdef SUBSTRATE
I(b1, s) <+ TYPE * Isub;
I(b, s) <+ TYPE * XIsub;
I(s, c1) <+ TYPE * Isf;
I(b1, s) <+ TYPE * Isub;
I(b, s) <+ TYPE * XIsub;
I(s, c1) <+ TYPE * Isf;
`endif
I(b1, b2) <+ TYPE * Ib1b2;
I(b2, c2) <+ TYPE * (-1.0 * Iavl);
I(e, e1) <+ TYPE * Vee1 / RE_TM;
I(b, b1) <+ TYPE * Vbb1 / RBC_TM;
I(b1, b2) <+ TYPE * Ib1b2;
I(b2, c2) <+ TYPE * (-1.0 * Iavl);
I(e, e1) <+ TYPE * Vee1 / RE_TM;
I(b, b1) <+ TYPE * Vbb1 / RBC_TM;
`ifdef SELFHEATING
// Electrical equivalent for the thermal network
I(dt) <+ V(dt) / RTH_Tamb_M;
I(dt) <+ ddt(CTH_M * V(dt));
I(dt) <+ -1.0 * power_dis;
// Electrical equivalent for the thermal network
I(dt) <+ V(dt) / RTH_Tamb_M;
I(dt) <+ ddt(CTH_M * V(dt));
I(dt) <+ -1.0 * power_dis;
`endif
// Dynamic currents
I(b2, e1) <+ ddt(TYPE * (Qte + Qbe + Qe));
I(b1, e1) <+ ddt(TYPE * (Qte_s));
I(b2, c2) <+ ddt(TYPE * (Qtc + Qbc + Qepi));
// Dynamic currents
I(b2, e1) <+ ddt(TYPE * (Qte + Qbe + Qe));
I(b1, e1) <+ ddt(TYPE * (Qte_s));
I(b2, c2) <+ ddt(TYPE * (Qtc + Qbc + Qepi));
`ifdef SUBSTRATE
I(s, c1) <+ ddt(TYPE * Qts);
I(s, c1) <+ ddt(TYPE * Qts);
`endif
I(b1, b2) <+ ddt(TYPE * Qb1b2);
I(b, e) <+ ddt(TYPE * CBEO_M * Vbe);
I(b, c) <+ ddt(TYPE * CBCO_M * Vbc);
I(b1, b2) <+ ddt(TYPE * Qb1b2);
I(b, e) <+ ddt(TYPE * CBEO_M * Vbe);
I(b, c) <+ ddt(TYPE * CBCO_M * Vbc);
end // Currents and charges
end // Currents and charges
/* RvdT, Delft Univ. Tech. 03-12-2007.
/* RvdT, Delft Univ. Tech. 03-12-2007.
Distribution of parasitic collector resistance.
This construct supports the case
RCBLI = 0.0 and or RCBLX = 0.0 .
It is up to the compiler to adjust the circuit topology
and perform a node-collapse in such cases. */
if (RCBLX > 0.0)
begin
I(b, c3) <+ TYPE * XIex;
I(c, c3) <+ TYPE * Vcc3 * GCCxx_TM ;
I(b, c3) <+ ddt(TYPE * (XQtex + XQex));
if (RCBLI > 0.0)
if (RCBLX > 0.0)
begin
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
I(b1, c4) <+ TYPE * (Ib3 + Iex);
I(c3, c4) <+ TYPE * Vc3c4 * GCCex_TM ;
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
I(b, c3) <+ TYPE * XIex;
I(c, c3) <+ TYPE * Vcc3 * GCCxx_TM ;
I(b, c3) <+ ddt(TYPE * (XQtex + XQex));
if (RCBLI > 0.0)
begin
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
I(b1, c4) <+ TYPE * (Ib3 + Iex);
I(c3, c4) <+ TYPE * Vc3c4 * GCCex_TM ;
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
end
else
begin
V(c4, c1) <+ 0.0 ;
I(b1, c1) <+ TYPE * (Ib3 + Iex);
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
end
end
else
begin
V(c4, c1) <+ 0.0 ;
I(b1, c1) <+ TYPE * (Ib3 + Iex);
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
V(c3, c4) <+ 0 ;
if (RCBLI > 0.0)
begin
I(b, c4) <+ TYPE * XIex;
I(c, c4) <+ TYPE * Vcc3 * GCCxx_TM ;
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
I(b1, c4) <+ TYPE * (Ib3 + Iex);
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
I(b, c4) <+ ddt(TYPE * (XQtex + XQex));
end
else
begin
I(b, c1) <+ TYPE * XIex;
I(c, c1) <+ TYPE * Vcc3 * GCCxx_TM ;
V(c4, c1) <+ 0.0 ;
I(b1, c1) <+ TYPE * (Ib3 + Iex);
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
I(b, c1) <+ ddt(TYPE * (XQtex + XQex));
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
end
end
end
else
begin
V(c3, c4) <+ 0 ;
if (RCBLI > 0.0)
begin
I(b, c4) <+ TYPE * XIex;
I(c, c4) <+ TYPE * Vcc3 * GCCxx_TM ;
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
I(b1, c4) <+ TYPE * (Ib3 + Iex);
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
I(b, c4) <+ ddt(TYPE * (XQtex + XQex));
end
else
begin
I(b, c1) <+ TYPE * XIex;
I(c, c1) <+ TYPE * Vcc3 * GCCxx_TM ;
V(c4, c1) <+ 0.0 ;
I(b1, c1) <+ TYPE * (Ib3 + Iex);
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
I(b, c1) <+ ddt(TYPE * (XQtex + XQex));
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
end
end

View File

@ -10,7 +10,7 @@ else
// Initialize model constants
// Impact ionization constants (NPN - PNP)
// Impact ionization constants (NPN - PNP)
if (TYPE == 1) begin
@ -26,7 +26,7 @@ end
Xext1 = 1.0 - XEXT;
// Temperature independent MULT scaling
// Temperature independent MULT scaling
`ifdef SELFHEATING
CTH_M = CTH * MULT;

View File

@ -7,139 +7,139 @@
`NOISE begin
// Thermal noise
common = 4.0 * `KB * Tk;
powerREC = common / RE_TM; // Emitter resistance
powerRBC = common / RBC_TM; // Base resistance
powerRCCxx = common * GCCxx_TM; // Collector resistance
powerRCCex = common * GCCex_TM; // Collector resistance
powerRCCin = common * GCCin_TM; // Collector resistance
powerRBV = common / Rb2 * (4.0 * eVb1b2 + 5.0) * `one_third ; // Variable base resistance
// Thermal noise
common = 4.0 * `KB * Tk;
powerREC = common / RE_TM; // Emitter resistance
powerRBC = common / RBC_TM; // Base resistance
powerRCCxx = common * GCCxx_TM; // Collector resistance
powerRCCex = common * GCCex_TM; // Collector resistance
powerRCCin = common * GCCin_TM; // Collector resistance
powerRBV = common / Rb2 * (4.0 * eVb1b2 + 5.0) * `one_third ; // Variable base resistance
// Main current shot noise
In_N = (If + Ir) / qBI;
powerCCS = 2.0 * `QQ * abs(In_N);
// Main current shot noise
In_N = (If + Ir) / qBI;
powerCCS = 2.0 * `QQ * abs(In_N);
// Weak-avalanche current shot noise
if (KAVL > 0) begin
Gem_N = abs(Iavl / In_N);
end else begin
Gem_N = 0.0;
end
// Weak-avalanche current shot noise
if (KAVL > 0) begin
Gem_N = abs(Iavl / In_N);
end else begin
Gem_N = 0.0;
end
powerIIS = 2.0 * `QQ * Iavl * (Gem_N + 1);
powerIIS = 2.0 * `QQ * Iavl * (Gem_N + 1);
// Transit time for noise
if (In_N > 0.0) begin
Taub_N = (Qbe + Qbc) / In_N;
end else begin
Taub_N = TAUB_T * q1Q * qBI;
end
// Transit time for noise
if (In_N > 0.0) begin
Taub_N = (Qbe + Qbc) / In_N;
end else begin
Taub_N = TAUB_T * q1Q * qBI;
end
// RF correlation noise model switch
if (KC == 1) begin
// use charge partition for noise transit time
taun = XQB * Taub_N;
end else if (KC == 2) begin
// use fraction of transit time for noise transit time
taun = FTAUN * Taub_N;
end else begin // KC == 0
// no correlation noise
taun = 0;
end
// RF correlation noise model switch
if (KC == 1) begin
// use charge partition for noise transit time
taun = XQB * Taub_N;
end else if (KC == 2) begin
// use fraction of transit time for noise transit time
taun = FTAUN * Taub_N;
end else begin // KC == 0
// no correlation noise
taun = 0;
end
// Forward base current shot noise and 1/f noise
powerFBCS = 2.0 * `QQ * (abs(Ib1) + abs(Ib2) + abs(Izteb));
powerFBC1fB1 = (1.0 - XIBI) * pow((abs(Ib1) / (1 - XIBI)), AF) * KF_M;
exponentFBC1fB2 = (2.0 * (MLF - 1.0)) + (AF * (2.0 - MLF));
powerFBC1fB2 = KFN_M * pow(abs(Ib2), exponentFBC1fB2);
// Forward base current shot noise and 1/f noise
powerFBCS = 2.0 * `QQ * (abs(Ib1) + abs(Ib2) + abs(Izteb));
powerFBC1fB1 = (1.0 - XIBI) * pow((abs(Ib1) / (1 - XIBI)), AF) * KF_M;
exponentFBC1fB2 = (2.0 * (MLF - 1.0)) + (AF * (2.0 - MLF));
powerFBC1fB2 = KFN_M * pow(abs(Ib2), exponentFBC1fB2);
// Emitter-base sidewall current shot and 1/f noise
powerEBSCS = 2.0 * `QQ * abs(Ib1_s);
if (XIBI == 0)
powerEBSC1f = 0.0;
else
powerEBSC1f = KF_M * XIBI * pow((abs(Ib1_s / XIBI)), AF);
// Emitter-base sidewall current shot and 1/f noise
powerEBSCS = 2.0 * `QQ * abs(Ib1_s);
if (XIBI == 0)
powerEBSC1f = 0.0;
else
powerEBSC1f = KF_M * XIBI * pow((abs(Ib1_s / XIBI)), AF);
// Reverse base current shot noise and 1/f noise
powerRBCS = 2.0 * `QQ * abs(Ib3);
powerRBC1f = KF_M * pow(abs(Ib3), AF);
// Reverse base current shot noise and 1/f noise
powerRBCS = 2.0 * `QQ * abs(Ib3);
powerRBC1f = KF_M * pow(abs(Ib3), AF);
// Extrinsic current shot noise and 1/f noise
powerExCS = 2.0 * `QQ * abs(Iex);
powerExC1f = KF_M * (1 - (EXMOD * XEXT)) *
// Extrinsic current shot noise and 1/f noise
powerExCS = 2.0 * `QQ * abs(Iex);
powerExC1f = KF_M * (1 - (EXMOD * XEXT)) *
pow((abs(Iex) / (1 - (EXMOD * XEXT))), AF);
powerExCSMOD = 2.0 * `QQ * abs(XIex) * EXMOD;
if (XEXT == 0.0)
powerExC1fMOD = 0.0;
else
powerExC1fMOD = KF_M * EXMOD * XEXT * pow((abs(XIex) / XEXT), AF);
powerExCSMOD = 2.0 * `QQ * abs(XIex) * EXMOD;
if (XEXT == 0.0)
powerExC1fMOD = 0.0;
else
powerExC1fMOD = KF_M * EXMOD * XEXT * pow((abs(XIex) / XEXT), AF);
`ifdef SUBSTRATE
// Substrate current shot noise (between nodes B1 and S, resp. B and S)
powerSubsCS_B1S = 2.0 * `QQ * abs(Isub);
powerSubsCS_BS = 2.0 * `QQ * abs(XIsub);
// Substrate current shot noise (between nodes B1 and S, resp. B and S)
powerSubsCS_B1S = 2.0 * `QQ * abs(Isub);
powerSubsCS_BS = 2.0 * `QQ * abs(XIsub);
`endif
// Reference un-correlated current shot noise sources
I(noi) <+ white_noise(powerCCS, "un-correlated current shot noise");
I(noi) <+ V(noi);
// Reference un-correlated current shot noise sources
I(noi) <+ white_noise(powerCCS, "un-correlated current shot noise");
I(noi) <+ V(noi);
// Implementing correlated noise sources
I(b2, e1) <+ taun * ddt(V(noi));
I(c2, b2) <+ Gem_N * V(noi);
I(c2, e1) <+ V(noi);
// Implementing correlated noise sources
I(b2, e1) <+ taun * ddt(V(noi));
I(c2, b2) <+ Gem_N * V(noi);
I(c2, e1) <+ V(noi);
// Implementing un-correlated noise sources
I(c2, b2) <+ white_noise(powerIIS, "un-correlated noise");
I(b2, e1) <+ white_noise(powerFBCS, "un-correlated noise");
// Implementing un-correlated noise sources
I(c2, b2) <+ white_noise(powerIIS, "un-correlated noise");
I(b2, e1) <+ white_noise(powerFBCS, "un-correlated noise");
// Add noise sources
I(e, e1) <+ white_noise(powerREC, "emitter resistance");
I(b, b1) <+ white_noise(powerRBC, "base resistance");
I(b1, b2) <+ white_noise(powerRBV, "variable base resistance");
I(b2, e1) <+ flicker_noise(powerFBC1fB1, 1, "bas_emi_forw");
I(b2, e1) <+ flicker_noise(powerFBC1fB2, 1, "bas_emi_forw");
I(e1, b1) <+ white_noise(powerEBSCS, "emi_bas_side");
I(e1, b1) <+ flicker_noise(powerEBSC1f, 1, "emi_bas_side");
I(b1, c4) <+ white_noise(powerRBCS, "bas_col_reve");
I(b1, c4) <+ flicker_noise(powerRBC1f, 1, "bas_col_reve");
I(b1, c4) <+ white_noise(powerExCS, "Ext_bas_col");
I(b1, c4) <+ flicker_noise(powerExC1f, 1, "Ext_bas_col");
I(b, c3) <+ white_noise(powerExCSMOD, "Ext_bas_col");
I(b, c3) <+ flicker_noise(powerExC1fMOD, 1, "Ext_bas_col");
// Add noise sources
I(e, e1) <+ white_noise(powerREC, "emitter resistance");
I(b, b1) <+ white_noise(powerRBC, "base resistance");
I(b1, b2) <+ white_noise(powerRBV, "variable base resistance");
I(b2, e1) <+ flicker_noise(powerFBC1fB1, 1, "bas_emi_forw");
I(b2, e1) <+ flicker_noise(powerFBC1fB2, 1, "bas_emi_forw");
I(e1, b1) <+ white_noise(powerEBSCS, "emi_bas_side");
I(e1, b1) <+ flicker_noise(powerEBSC1f, 1, "emi_bas_side");
I(b1, c4) <+ white_noise(powerRBCS, "bas_col_reve");
I(b1, c4) <+ flicker_noise(powerRBC1f, 1, "bas_col_reve");
I(b1, c4) <+ white_noise(powerExCS, "Ext_bas_col");
I(b1, c4) <+ flicker_noise(powerExC1f, 1, "Ext_bas_col");
I(b, c3) <+ white_noise(powerExCSMOD, "Ext_bas_col");
I(b, c3) <+ flicker_noise(powerExC1fMOD, 1, "Ext_bas_col");
`ifdef SUBSTRATE
I(b1, s) <+ white_noise(powerSubsCS_B1S, "bas_sub_current");
I(b, s) <+ white_noise(powerSubsCS_BS, "bas_sub_current");
I(b1, s) <+ white_noise(powerSubsCS_B1S, "bas_sub_current");
I(b, s) <+ white_noise(powerSubsCS_BS, "bas_sub_current");
`endif
if (RCBLX > 0.0)
begin
if (RCBLI > 0.0)
begin /* all branches exist */
I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
I(c3, c4) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
I(c4, c1) <+ white_noise(powerRCCin, "intrinsic collector BL resistance");
end
else
begin /* only Rcblx exists */
I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
I(c3, c1) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
end
if (RCBLX > 0.0)
begin
if (RCBLI > 0.0)
begin /* all branches exist */
I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
I(c3, c4) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
I(c4, c1) <+ white_noise(powerRCCin, "intrinsic collector BL resistance");
end
else
begin
if (RCBLI > 0.0)
begin /* only Rcbli exists */
I(c, c4) <+ white_noise(powerRCCxx, "collector plug resistance");
I(c4, c1) <+ white_noise(powerRCCin, "intrinsic collector BL resistance");
end
else
begin /* neither Rcblx nor Rcbli exists */
I(c, c1) <+ white_noise(powerRCCxx, "collector plug resistance");
end
else
begin /* only Rcblx exists */
I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
I(c3, c1) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
end
end
else
begin
if (RCBLI > 0.0)
begin /* only Rcbli exists */
I(c, c4) <+ white_noise(powerRCCxx, "collector plug resistance");
I(c4, c1) <+ white_noise(powerRCCin, "intrinsic collector BL resistance");
end
else
begin /* neither Rcblx nor Rcbli exists */
I(c, c1) <+ white_noise(powerRCCxx, "collector plug resistance");
end
end
end // Noise

View File

@ -9,24 +9,24 @@ begin
`ifdef __VAMS_COMPACT_MODELING__
// The external currents and the current gain
OP_ic = I(<c>); // External DC collector current
OP_ib = I(<b>); // External DC base Current
// The external currents and the current gain
OP_ic = I(<c>); // External DC collector current
OP_ib = I(<b>); // External DC base Current
if (OP_ib == 0)
if (OP_ib == 0)
begin
OP_betadc = 0.0 ;
end
else
else
begin
OP_betadc = OP_ic / OP_ib; // External DC Current gain
end
// begin added in MXT 504.9:
OP_ie = I(<e>); // External DC emitter current
OP_vbe = V(b, e); // External base-emitter bias
OP_vce = V(c, e); // External collector-emitter bias
OP_vbc = V(b, c); // External base-collector bias
// begin added in MXT 504.9:
OP_ie = I(<e>); // External DC emitter current
OP_vbe = V(b, e); // External base-emitter bias
OP_vce = V(c, e); // External collector-emitter bias
OP_vbc = V(b, c); // External base-collector bias
`ifdef SUBSTRATE
OP_is = I(<s>); // External DC emitter current
@ -35,107 +35,107 @@ OP_vbc = V(b, c); // External base-collector bias
OP_vsc = V(s, c); // External substrate-collector bias
`endif
// end added in MXT 504.9:
// end added in MXT 504.9:
// The internal voltage differences
OP_vb2e1 = Vb2e1; // Internal base-emiter bias
OP_vb2c2 = Vb2c2; // Internal base-emiter bias
OP_vb2c1 = Vb2c1; // Internal base-collector bias including epilayer
// The internal voltage differences
OP_vb2e1 = Vb2e1; // Internal base-emiter bias
OP_vb2c2 = Vb2c2; // Internal base-emiter bias
OP_vb2c1 = Vb2c1; // Internal base-collector bias including epilayer
OP_vb1c1 = Vb1b2 + Vb2c1; // External base-collector bias without contact resistances
OP_vb1c1 = Vb1b2 + Vb2c1; // External base-collector bias without contact resistances
OP_vc4c1 = Vc4c1; // Bias over intrinsic buried layer
OP_vc3c4 = Vc3c4; // Bias over extrinsic buried layer
OP_vc4c1 = Vc4c1; // Bias over intrinsic buried layer
OP_vc3c4 = Vc3c4; // Bias over extrinsic buried layer
OP_ve1e = - Vee1; // Bias over emiter resistance
OP_ve1e = - Vee1; // Bias over emiter resistance
// The branch currents
OP_in = In; // Main current
OP_ic1c2 = Ic1c2; // Epilayer current
OP_ib1b2 = Ib1b2; // Pinched-base current
OP_ib1 = Ib1; // Ideal forward base current
OP_sib1 = Ib1_s; // Ideal side-wall base current
//
// 504.8, RvdT, TU-Delft April. 2009:
//
OP_izteb = Izteb ; // Zener tunneling current
//
OP_ib2 = Ib2; // Non-ideal forward base current
OP_ib3 = Ib3; // Non-ideal reverse base current
OP_iavl = Iavl; // Avalanche current
OP_iex = Iex; // Extrinsic reverse base current
OP_xiex = XIex; // Extrinsic reverse base current
// The branch currents
OP_in = In; // Main current
OP_ic1c2 = Ic1c2; // Epilayer current
OP_ib1b2 = Ib1b2; // Pinched-base current
OP_ib1 = Ib1; // Ideal forward base current
OP_sib1 = Ib1_s; // Ideal side-wall base current
//
// 504.8, RvdT, TU-Delft April. 2009:
//
OP_izteb = Izteb ; // Zener tunneling current
//
OP_ib2 = Ib2; // Non-ideal forward base current
OP_ib3 = Ib3; // Non-ideal reverse base current
OP_iavl = Iavl; // Avalanche current
OP_iex = Iex; // Extrinsic reverse base current
OP_xiex = XIex; // Extrinsic reverse base current
`ifdef SUBSTRATE
OP_isub = Isub; // Substrate current
OP_xisub = XIsub; // Substrate current
OP_isf = Isf; // Substrate-collector current
`endif
OP_ire = - Vee1 / RE_TM; // Current through emiter resistance
OP_irbc = Vbb1 / RBC_TM; // Current through constant base resistance
OP_ire = - Vee1 / RE_TM; // Current through emiter resistance
OP_irbc = Vbb1 / RBC_TM; // Current through constant base resistance
OP_ircc = Vcc3 * GCCxx_TM; // Current through collector contact resistance
OP_ircblx = Vc3c4 * GCCex_TM; // Current through extrinsic buried layer resistance
OP_ircbli = Vc4c1 * GCCin_TM; // Current through extrinsic buried layer resistance
OP_ircc = Vcc3 * GCCxx_TM; // Current through collector contact resistance
OP_ircblx = Vc3c4 * GCCex_TM; // Current through extrinsic buried layer resistance
OP_ircbli = Vc4c1 * GCCin_TM; // Current through extrinsic buried layer resistance
// The branch charges
OP_qe = Qe; // Emitter charge or emitter neutral charge
OP_qte = Qte; // Base-emiter depletion charge
OP_sqte = Qte_s; // Sidewall base-emiter depletion charge
OP_qbe = Qbe; // Base-emiter diffusion charge
OP_qbc = Qbc; // Base-collector diffusion charge
OP_qtc = Qtc; // Base-colector depletion charge
OP_qepi = Qepi; // Epilayer diffusion charge
OP_qb1b2 = Qb1b2; // AC current crowding charge
OP_qtex = Qtex; // Extrinsic base-collector depletion charge
OP_xqtex = XQtex; // Extrinsic base-collector depletion charge
OP_qex = Qex; // Extrinsic base-collector diffusion charge
OP_xqex = XQex; // Extrinsic base-collector diffusion charge
// The branch charges
OP_qe = Qe; // Emitter charge or emitter neutral charge
OP_qte = Qte; // Base-emiter depletion charge
OP_sqte = Qte_s; // Sidewall base-emiter depletion charge
OP_qbe = Qbe; // Base-emiter diffusion charge
OP_qbc = Qbc; // Base-collector diffusion charge
OP_qtc = Qtc; // Base-colector depletion charge
OP_qepi = Qepi; // Epilayer diffusion charge
OP_qb1b2 = Qb1b2; // AC current crowding charge
OP_qtex = Qtex; // Extrinsic base-collector depletion charge
OP_xqtex = XQtex; // Extrinsic base-collector depletion charge
OP_qex = Qex; // Extrinsic base-collector diffusion charge
OP_xqex = XQex; // Extrinsic base-collector diffusion charge
`ifdef SUBSTRATE
OP_qts = Qts; // Collector substrate depletion charge
`endif
// Small signal equivalent circuit conductances and resistances
// Small signal equivalent circuit conductances and resistances
OP_gx = - ddx(In, V(e1)); // Forward transconductance
OP_gy = - ddx(In, V(c2)); // Reverse transconductance
OP_gx = - ddx(In, V(e1)); // Forward transconductance
OP_gy = - ddx(In, V(c2)); // Reverse transconductance
OP_gz = - ddx(In, V(c1)); // Reverse transconductance
OP_gz = - ddx(In, V(c1)); // Reverse transconductance
OP_sgpi = - ddx(Ib1_s, V(e))
OP_sgpi = - ddx(Ib1_s, V(e))
- ddx(Ib1_s, V(e1)); // Conductance sidewal b-e junction
OP_gpix = - ddx(Ib1+Ib2, V(e1)); // Conductance floor b-e junction
OP_gpix = - ddx(Ib1+Ib2, V(e1)); // Conductance floor b-e junction
OP_gpiy = - ddx(Ib1, V(c2)); // Early effect on recombination base current
OP_gpiz = - ddx(Ib1, V(c1)); // Early effect on recombination base current
OP_gpiy = - ddx(Ib1, V(c2)); // Early effect on recombination base current
OP_gpiz = - ddx(Ib1, V(c1)); // Early effect on recombination base current
OP_gmux = ddx( Iavl, V(e1)); // Early effect on avalanche current limitting
OP_gmuy = ddx( Iavl, V(c2)); // Conductance of avalanche current
OP_gmuz = - ddx(- Iavl, V(c1)); // Conductance of avalanche current
OP_gmux = ddx( Iavl, V(e1)); // Early effect on avalanche current limitting
OP_gmuy = ddx( Iavl, V(c2)); // Conductance of avalanche current
OP_gmuz = - ddx(- Iavl, V(c1)); // Conductance of avalanche current
// Conductance extrinsic b-c current :
OP_gmuex = ddx(Iex+Ib3, V(e))
// Conductance extrinsic b-c current :
OP_gmuex = ddx(Iex+Ib3, V(e))
+ ddx(Iex+Ib3, V(b1))
+ ddx(Iex+Ib3, V(b2))
+ ddx(Iex+Ib3, V(e1))
+ ddx(Iex+Ib3, V(c2));
OP_xgmuex = ddx(XIex, V(b)) ; // Conductance extrinsic b-c current
OP_xgmuex = ddx(XIex, V(b)) ; // Conductance extrinsic b-c current
OP_grcvy = - ddx(Ic1c2, V(c2)); // Conductance of epilayer current
OP_grcvz = - ddx(Ic1c2, V(c1)); // Conductance of epilayer current
OP_grcvy = - ddx(Ic1c2, V(c2)); // Conductance of epilayer current
OP_grcvz = - ddx(Ic1c2, V(c1)); // Conductance of epilayer current
OP_rbv = 1.0 / (- ddx(Ib1b2, V(b2)) - ddx(Ib1b2, V(c2))); // Base resistance
OP_rbv = 1.0 / (- ddx(Ib1b2, V(b2)) - ddx(Ib1b2, V(c2))); // Base resistance
OP_grbvx = - ddx(Ib1b2, V(e)) - ddx(Ib1b2, V(e1)); // Early effect on base resistance
OP_grbvy = - ddx(Ib1b2, V(c2)); // Early effect on base resistance
OP_grbvx = - ddx(Ib1b2, V(e)) - ddx(Ib1b2, V(e1)); // Early effect on base resistance
OP_grbvy = - ddx(Ib1b2, V(c2)); // Early effect on base resistance
OP_grbvz = - ddx(Ib1b2, V(c1)); // Early effect on base resistance
OP_grbvz = - ddx(Ib1b2, V(c1)); // Early effect on base resistance
OP_re = RE_TM; // Emiter resistance
OP_rbc = RBC_TM; // Constant base resistance
OP_rcc = RCCxx_TM; // Collector Contact resistance
OP_rcblx = RCCex_TM; // Extrinsic buried layer resistance
OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
OP_re = RE_TM; // Emiter resistance
OP_rbc = RBC_TM; // Constant base resistance
OP_rcc = RCCxx_TM; // Collector Contact resistance
OP_rcblx = RCCex_TM; // Extrinsic buried layer resistance
OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
`ifdef SUBSTRATE
@ -145,100 +145,100 @@ OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
`endif
// Small signal equivalent circuit capacitances
OP_scbe = - ddx(Qte_s, V(e)) - ddx(Qte_s, V(e1)); // Capacitance sidewall b-e junction
// Small signal equivalent circuit capacitances
OP_scbe = - ddx(Qte_s, V(e)) - ddx(Qte_s, V(e1)); // Capacitance sidewall b-e junction
OP_cbex = - ddx(Qte + Qbe + Qe, V(e1)) ; // Capacitance floor b-e junction
OP_cbex = - ddx(Qte + Qbe + Qe, V(e1)) ; // Capacitance floor b-e junction
OP_cbey = - ddx(Qbe, V(c2)); // Early effect on b-e diffusion junction
OP_cbey = - ddx(Qbe, V(c2)); // Early effect on b-e diffusion junction
OP_cbez = - ddx(Qbe, V(c1)); // Early effect on b-e diffusion junction
OP_cbez = - ddx(Qbe, V(c1)); // Early effect on b-e diffusion junction
OP_cbcx = - ddx(Qbc, V(e)) - ddx(Qbc, V(e1)); // Early effect on b-c diffusion junction
OP_cbcx = - ddx(Qbc, V(e)) - ddx(Qbc, V(e1)); // Early effect on b-c diffusion junction
OP_cbcy = - ddx(Qtc + Qbc + Qepi, V(c2)); // Capacitance floor b-c junction
OP_cbcz = - ddx(Qtc + Qbc + Qepi, V(c1)); // Capacitance floor b-c junction
OP_cbcy = - ddx(Qtc + Qbc + Qepi, V(c2)); // Capacitance floor b-c junction
OP_cbcz = - ddx(Qtc + Qbc + Qepi, V(c1)); // Capacitance floor b-c junction
// Capacitance extrinsic b-c junction :
OP_cbcex = ddx(Qtex + Qex,V(e))
// Capacitance extrinsic b-c junction :
OP_cbcex = ddx(Qtex + Qex,V(e))
+ ddx(Qtex + Qex,V(b1 ))
+ ddx(Qtex + Qex,V(b2))
+ ddx(Qtex + Qex,V(e1))
+ ddx(Qtex + Qex,V(c2)) ;
// Capacitance extrinsic b-c junction :
OP_xcbcex = ddx(XQtex + XQex, V(b)) ;
// Capacitance extrinsic b-c junction :
OP_xcbcex = ddx(XQtex + XQex, V(b)) ;
OP_cb1b2 = - ddx(Qb1b2, V(b2)) - ddx(Qb1b2, V(c2)); // Capacitance AC current crowding
OP_cb1b2 = - ddx(Qb1b2, V(b2)) - ddx(Qb1b2, V(c2)); // Capacitance AC current crowding
OP_cb1b2x = - ddx(Qb1b2, V(e)) - ddx(Qb1b2, V(e1)); // Cross-capacitance AC current crowding
OP_cb1b2y = - ddx(Qb1b2, V(c2)); // Cross-capacitance AC current crowding
OP_cb1b2z = - ddx(Qb1b2, V(c1)) ; // Cross-capacitance AC current crowding
OP_cb1b2x = - ddx(Qb1b2, V(e)) - ddx(Qb1b2, V(e1)); // Cross-capacitance AC current crowding
OP_cb1b2y = - ddx(Qb1b2, V(c2)); // Cross-capacitance AC current crowding
OP_cb1b2z = - ddx(Qb1b2, V(c1)) ; // Cross-capacitance AC current crowding
`ifdef SUBSTRATE
OP_cts = ddx(Qts, V(s)) ; // Capacitance s-c junction
`endif
// Approximate small signal equivalent circuit
dydx = (OP_gx - OP_gmux) / (OP_grcvy + OP_gmuy - OP_gy);
dydz = (OP_gz - OP_grcvz - OP_gmuz) / (OP_grcvy + OP_gmuy - OP_gy);
gpi = OP_sgpi + OP_gpix + OP_gmux + OP_gpiz + OP_gmuz +
// Approximate small signal equivalent circuit
dydx = (OP_gx - OP_gmux) / (OP_grcvy + OP_gmuy - OP_gy);
dydz = (OP_gz - OP_grcvz - OP_gmuz) / (OP_grcvy + OP_gmuy - OP_gy);
gpi = OP_sgpi + OP_gpix + OP_gmux + OP_gpiz + OP_gmuz +
(OP_gpiy + OP_gmuy) * (dydx + dydz);
OP_gm = (OP_grcvy * (OP_gx - OP_gmux + // Transconductance
OP_gm = (OP_grcvy * (OP_gx - OP_gmux + // Transconductance
OP_gz - OP_gmuz) - OP_grcvz *
(OP_gy - OP_gmuy)) / (OP_grcvy + OP_gmuy - OP_gy);
OP_beta = OP_gm / gpi; // Current amplification
OP_gout = ((OP_gy - OP_gmuy) * OP_grcvz - // Output conductance
OP_beta = OP_gm / gpi; // Current amplification
OP_gout = ((OP_gy - OP_gmuy) * OP_grcvz - // Output conductance
(OP_gz - OP_gmuz) * OP_grcvy) /
(OP_grcvy + OP_gmuy - OP_gy);
OP_gmu = OP_gpiz + OP_gmuz + (OP_gpiy + OP_gmuy) * dydz + // Feedback transconductance
OP_gmu = OP_gpiz + OP_gmuz + (OP_gpiy + OP_gmuy) * dydz + // Feedback transconductance
OP_gmuex + OP_xgmuex;
OP_rb = RBC_TM + OP_rbv; // Base resistance
OP_rc = OP_rcc + OP_rcblx + OP_rcbli; // Collector resistance
OP_cbe = OP_cbex + OP_scbe + OP_cbcx + // Base-emitter capacitance
OP_rb = RBC_TM + OP_rbv; // Base resistance
OP_rc = OP_rcc + OP_rcblx + OP_rcbli; // Collector resistance
OP_cbe = OP_cbex + OP_scbe + OP_cbcx + // Base-emitter capacitance
(OP_cbey + OP_cbcy) * dydx + CBEO_M;
OP_cbc = (OP_cbey + OP_cbcy) * dydz + OP_cbcz + // Base-collector capacitance
OP_cbc = (OP_cbey + OP_cbcy) * dydz + OP_cbcz + // Base-collector capacitance
OP_cbcex + OP_xcbcex + CBCO_M;
// Quantities to describe internal state of the model
gammax = (OP_gpix + OP_gmux - OP_grbvx) * OP_rbv;
gammay = (OP_gpiy + OP_gmuy - OP_grbvy) * OP_rbv;
gammaz = (OP_gpiz + OP_gmuz - OP_grbvz) * OP_rbv;
gbfx = OP_gpix + OP_sgpi * (1.0 + gammax);
gbfy = OP_gpiy + OP_sgpi * gammay;
gbfz = OP_gpiz + OP_sgpi * gammaz;
// Quantities to describe internal state of the model
gammax = (OP_gpix + OP_gmux - OP_grbvx) * OP_rbv;
gammay = (OP_gpiy + OP_gmuy - OP_grbvy) * OP_rbv;
gammaz = (OP_gpiz + OP_gmuz - OP_grbvz) * OP_rbv;
gbfx = OP_gpix + OP_sgpi * (1.0 + gammax);
gbfy = OP_gpiy + OP_sgpi * gammay;
gbfz = OP_gpiz + OP_sgpi * gammaz;
// RvdT March 2008:
alpha_ft = (1.0 + (OP_grcvy * dydx * OP_rc) +
// RvdT March 2008:
alpha_ft = (1.0 + (OP_grcvy * dydx * OP_rc) +
(OP_gx + gbfx + (OP_gy + gbfy) * dydx) * RE_TM)/
(1.0 - (OP_grcvz + OP_grcvy * dydz) * OP_rc -
(OP_gz + gbfz + (OP_gy + gbfy) * dydz) * RE_TM);
rx = pow((OP_grcvy * dydx + alpha_ft * (OP_grcvz + OP_grcvy * dydz)), -1);
rz = alpha_ft * rx;
ry = (1.0 - OP_grcvz * rz) / OP_grcvy;
rb1b2 = gammax * rx + gammay * ry + gammaz * rz;
rex = rz + rb1b2 - OP_rcbli;
xrex = rz + rb1b2 + RBC_TM * ((gbfx + OP_gmux) * rx + (gbfy + OP_gmuy) * ry +
rx = pow((OP_grcvy * dydx + alpha_ft * (OP_grcvz + OP_grcvy * dydz)), -1);
rz = alpha_ft * rx;
ry = (1.0 - OP_grcvz * rz) / OP_grcvy;
rb1b2 = gammax * rx + gammay * ry + gammaz * rz;
rex = rz + rb1b2 - OP_rcbli;
xrex = rz + rb1b2 + RBC_TM * ((gbfx + OP_gmux) * rx + (gbfy + OP_gmuy) * ry +
(gbfz + OP_gmuz) * rz) - OP_rcbli - OP_rcblx;
taut = OP_scbe * (rx + rb1b2) + (OP_cbex + OP_cbcx) * rx + (OP_cbey + OP_cbcy) *
taut = OP_scbe * (rx + rb1b2) + (OP_cbex + OP_cbcx) * rx + (OP_cbey + OP_cbcy) *
ry + (OP_cbez + OP_cbcz) * rz + OP_cbcex * rex + OP_xcbcex * xrex +
(CBEO_M + CBCO_M) * (xrex - RCCxx_TM);
OP_ft = 1.0 / (2.0 * `PI * taut); // Good approximation for cut-off frequency
OP_iqs = Iqs; // Current at onset of quasi-saturation
OP_xiwepi = xi_w; // Thickness of injection layer
OP_vb2c2star = Vb2c2star; // Physical value of internal base-collector bias
OP_ft = 1.0 / (2.0 * `PI * taut); // Good approximation for cut-off frequency
OP_iqs = Iqs; // Current at onset of quasi-saturation
OP_xiwepi = xi_w; // Thickness of injection layer
OP_vb2c2star = Vb2c2star; // Physical value of internal base-collector bias
//self-heating
//self-heating
`ifdef SELFHEATING
OP_pdiss = power_dis; // Dissipation
`endif
OP_tk = Tk; // Actual temperature
OP_tk = Tk; // Actual temperature
`endif
end

View File

@ -5,7 +5,7 @@
// Temperature scaling of parameters
// The excess transistor temperature due to the self-heating
// The excess transistor temperature due to the self-heating
`ifdef SELFHEATING
Tki = V(dt);
// *** Convergence related smoothing ***
@ -13,12 +13,12 @@
Tki = - ln(1.0 - Tki);
end
`linLog(Vdt, Tki, 200.0);
// `min_logexp(Vdt, Tki, 200.0, 10.0);
// `min_logexp(Vdt, Tki, 200.0, 10.0);
`else
Vdt = 0.0;
`endif
// Temperature variables
// Temperature variables
Tk = Tamb + Vdt;
tN = Tk / Trk;
@ -30,13 +30,13 @@ VdtINV = VtINV - VtrINV;
lntN = ln(tN) ;
// begin: RvdT, November 2008, "Zener tunneling model"
// begin: RvdT, November 2008, "Zener tunneling model"
// VGZEB_T = VGZEBOK - AVGEB*Tk*Tk / (Tk + TVGEB) ;
`max_logexp(VGZEB_T, VGZEBOK - AVGEB*Tk*Tk / (Tk + TVGEB), 0.05, 0.1) ;
// end: RvdT, November 2008, "Zener tunneling model"
// end: RvdT, November 2008, "Zener tunneling model"
// Depletion capacitances
// Depletion capacitances
UdeT = -3.0 * Vt * ln(tN) + VDE * tN + (1.0 - tN) * VGB;
`max_logexp(VDE_T, `VDLOW, UdeT, Vt);
@ -62,7 +62,7 @@ CJCscaleINV = 1.0 / CJCscale;
CJC_T = CJC * CJCscale;
XP_T = XP * CJCscaleINV;
// Resistances
// Resistances
// RvdT, November 2008:
// Instead of the following definition
@ -122,9 +122,9 @@ VER_T = VER * x * y;
`ifdef SUBSTRATE
ISS_T = ISS * exp(lntN * (4.0 - AS)) * exp(-VGS * VdtINV);
// New 504.9:
// New 504.9:
ICSS_T = ICSS * exp(lntN * (3.5 - 0.5 * ASUB)) * exp(-VGS * VdtINV);
// End New 504.9.
// End New 504.9.
if ((ISS_T > 0.0))
IKS_T = IKS * exp(lntN * (1.0 - AS)) * (IS_T / IS) * (ISS / ISS_T);
@ -132,14 +132,14 @@ VER_T = VER * x * y;
IKS_T = IKS * exp(lntN * (1.0 - AS));
`endif
// Transit times
// Transit times
TAUE_T = TAUE * exp(lntN * (AB - 2.0)) * exp(-DVGTE * VdtINV);
TAUB_T = TAUB * exp(lntN * (AQBO + AB - 1.0));
TEPI_T = TEPI * exp(lntN * (AEPI - 1.0));
TAUR_T = TAUR * (TAUB_T + TEPI_T) / (TAUB + TEPI);
// Avalanche constant
// Avalanche constant
Tk300 = Tk - 300.0;
// RvdT, 15-02-2008: prevent division by zero and overflow at high temperatures:
@ -152,12 +152,12 @@ begin
BnT = Bn * 1.081 ;
end
// Heterojunction features
// Heterojunction features
DEG_T = DEG * exp(lntN * AQBO);
`ifdef SELFHEATING
// Temperature scaling of the thermal resistance
// Temperature scaling of the thermal resistance
RTH_Tamb = RTH * pow(Tamb / Trk, ATH);
`endif
@ -177,7 +177,7 @@ IZEB_TM = IZEB_T * MULT ;
IHC_M = IHC * MULT;
`ifdef SUBSTRATE
ISS_TM = ISS_T * MULT;
// New: 504.9
// New: 504.9
ICSS_TM = ICSS_T * MULT;
IKS_TM = IKS_T * MULT;
`endif

View File

@ -15,170 +15,170 @@
// Further information can be found in the file readme.txt
//
//////////////////////////////////////////////////////////////
//
// Calculation of internal paramters which are independent
// on instance parameters
//
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
//
// Calculation of internal paramters which are independent
// on instance parameters
//
//////////////////////////////////////////////////////////////
TRJ_i = `CLIP_LOW( TRJ , `TRJ_cliplow);
IMAX_i = `CLIP_LOW( IMAX , `IMAX_cliplow);
CJORBOT_i = `CLIP_LOW( CJORBOT , `CJORBOT_cliplow);
CJORSTI_i = `CLIP_LOW( CJORSTI , `CJORSTI_cliplow);
CJORGAT_i = `CLIP_LOW( CJORGAT , `CJORGAT_cliplow);
VBIRBOT_i = `CLIP_LOW( VBIRBOT , `VBIR_cliplow);
VBIRSTI_i = `CLIP_LOW( VBIRSTI , `VBIR_cliplow);
VBIRGAT_i = `CLIP_LOW( VBIRGAT , `VBIR_cliplow);
PBOT_i = `CLIP_BOTH(PBOT , `P_cliplow,`P_cliphigh);
PSTI_i = `CLIP_BOTH(PSTI , `P_cliplow,`P_cliphigh);
PGAT_i = `CLIP_BOTH(PGAT , `P_cliplow,`P_cliphigh);
IDSATRBOT_i = `CLIP_LOW( IDSATRBOT , `IDSATR_cliplow);
IDSATRSTI_i = `CLIP_LOW( IDSATRSTI , `IDSATR_cliplow);
IDSATRGAT_i = `CLIP_LOW( IDSATRGAT , `IDSATR_cliplow);
CSRHBOT_i = `CLIP_LOW( CSRHBOT , `CSRH_cliplow);
CSRHSTI_i = `CLIP_LOW( CSRHSTI , `CSRH_cliplow);
CSRHGAT_i = `CLIP_LOW( CSRHGAT , `CSRH_cliplow);
XJUNSTI_i = `CLIP_LOW( XJUNSTI , `XJUN_cliplow);
XJUNGAT_i = `CLIP_LOW( XJUNGAT , `XJUN_cliplow);
CTATBOT_i = `CLIP_LOW( CTATBOT , `CTAT_cliplow);
CTATSTI_i = `CLIP_LOW( CTATSTI , `CTAT_cliplow);
CTATGAT_i = `CLIP_LOW( CTATGAT , `CTAT_cliplow);
MEFFTATBOT_i = `CLIP_LOW( MEFFTATBOT, `MEFFTAT_cliplow);
MEFFTATSTI_i = `CLIP_LOW( MEFFTATSTI, `MEFFTAT_cliplow);
MEFFTATGAT_i = `CLIP_LOW( MEFFTATGAT, `MEFFTAT_cliplow);
CBBTBOT_i = `CLIP_LOW( CBBTBOT , `CBBT_cliplow);
CBBTSTI_i = `CLIP_LOW( CBBTSTI , `CBBT_cliplow);
CBBTGAT_i = `CLIP_LOW( CBBTGAT , `CBBT_cliplow);
VBRBOT_i = `CLIP_LOW( VBRBOT , `VBR_cliplow);
VBRSTI_i = `CLIP_LOW( VBRSTI , `VBR_cliplow);
VBRGAT_i = `CLIP_LOW( VBRGAT , `VBR_cliplow);
PBRBOT_i = `CLIP_LOW( PBRBOT , `PBR_cliplow);
PBRSTI_i = `CLIP_LOW( PBRSTI , `PBR_cliplow);
PBRGAT_i = `CLIP_LOW( PBRGAT , `PBR_cliplow);
TRJ_i = `CLIP_LOW( TRJ , `TRJ_cliplow);
IMAX_i = `CLIP_LOW( IMAX , `IMAX_cliplow);
CJORBOT_i = `CLIP_LOW( CJORBOT , `CJORBOT_cliplow);
CJORSTI_i = `CLIP_LOW( CJORSTI , `CJORSTI_cliplow);
CJORGAT_i = `CLIP_LOW( CJORGAT , `CJORGAT_cliplow);
VBIRBOT_i = `CLIP_LOW( VBIRBOT , `VBIR_cliplow);
VBIRSTI_i = `CLIP_LOW( VBIRSTI , `VBIR_cliplow);
VBIRGAT_i = `CLIP_LOW( VBIRGAT , `VBIR_cliplow);
PBOT_i = `CLIP_BOTH(PBOT , `P_cliplow,`P_cliphigh);
PSTI_i = `CLIP_BOTH(PSTI , `P_cliplow,`P_cliphigh);
PGAT_i = `CLIP_BOTH(PGAT , `P_cliplow,`P_cliphigh);
IDSATRBOT_i = `CLIP_LOW( IDSATRBOT , `IDSATR_cliplow);
IDSATRSTI_i = `CLIP_LOW( IDSATRSTI , `IDSATR_cliplow);
IDSATRGAT_i = `CLIP_LOW( IDSATRGAT , `IDSATR_cliplow);
CSRHBOT_i = `CLIP_LOW( CSRHBOT , `CSRH_cliplow);
CSRHSTI_i = `CLIP_LOW( CSRHSTI , `CSRH_cliplow);
CSRHGAT_i = `CLIP_LOW( CSRHGAT , `CSRH_cliplow);
XJUNSTI_i = `CLIP_LOW( XJUNSTI , `XJUN_cliplow);
XJUNGAT_i = `CLIP_LOW( XJUNGAT , `XJUN_cliplow);
CTATBOT_i = `CLIP_LOW( CTATBOT , `CTAT_cliplow);
CTATSTI_i = `CLIP_LOW( CTATSTI , `CTAT_cliplow);
CTATGAT_i = `CLIP_LOW( CTATGAT , `CTAT_cliplow);
MEFFTATBOT_i = `CLIP_LOW( MEFFTATBOT, `MEFFTAT_cliplow);
MEFFTATSTI_i = `CLIP_LOW( MEFFTATSTI, `MEFFTAT_cliplow);
MEFFTATGAT_i = `CLIP_LOW( MEFFTATGAT, `MEFFTAT_cliplow);
CBBTBOT_i = `CLIP_LOW( CBBTBOT , `CBBT_cliplow);
CBBTSTI_i = `CLIP_LOW( CBBTSTI , `CBBT_cliplow);
CBBTGAT_i = `CLIP_LOW( CBBTGAT , `CBBT_cliplow);
VBRBOT_i = `CLIP_LOW( VBRBOT , `VBR_cliplow);
VBRSTI_i = `CLIP_LOW( VBRSTI , `VBR_cliplow);
VBRGAT_i = `CLIP_LOW( VBRGAT , `VBR_cliplow);
PBRBOT_i = `CLIP_LOW( PBRBOT , `PBR_cliplow);
PBRSTI_i = `CLIP_LOW( PBRSTI , `PBR_cliplow);
PBRGAT_i = `CLIP_LOW( PBRGAT , `PBR_cliplow);
tkr = `KELVINCONVERSION + TRJ_i;
tkd = max($temperature + DTA, `KELVINCONVERSION + `MINTEMP);
auxt = tkd / tkr;
KBOL_over_QELE = `KBOL / `QELE;
phitr = KBOL_over_QELE * tkr;
phitrinv = 1.0 / phitr;
phitd = KBOL_over_QELE * tkd;
phitdinv = 1.0 / phitd;
tkr = `KELVINCONVERSION + TRJ_i;
tkd = max($temperature + DTA, `KELVINCONVERSION + `MINTEMP);
auxt = tkd / tkr;
KBOL_over_QELE = `KBOL / `QELE;
phitr = KBOL_over_QELE * tkr;
phitrinv = 1.0 / phitr;
phitd = KBOL_over_QELE * tkd;
phitdinv = 1.0 / phitd;
// bandgap voltages at reference temperature
deltaphigr = -(7.02e-4 * tkr * tkr) / (1108.0 + tkr);
phigrbot = PHIGBOT + deltaphigr;
phigrsti = PHIGSTI + deltaphigr;
phigrgat = PHIGGAT + deltaphigr;
// bandgap voltages at reference temperature
deltaphigr = -(7.02e-4 * tkr * tkr) / (1108.0 + tkr);
phigrbot = PHIGBOT + deltaphigr;
phigrsti = PHIGSTI + deltaphigr;
phigrgat = PHIGGAT + deltaphigr;
// bandgap voltages at device temperature
deltaphigd = -(7.02e-4 * tkd * tkd) / (1108.0 + tkd);
phigdbot = PHIGBOT + deltaphigd;
phigdsti = PHIGSTI + deltaphigd;
phigdgat = PHIGGAT + deltaphigd;
// bandgap voltages at device temperature
deltaphigd = -(7.02e-4 * tkd * tkd) / (1108.0 + tkd);
phigdbot = PHIGBOT + deltaphigd;
phigdsti = PHIGSTI + deltaphigd;
phigdgat = PHIGGAT + deltaphigd;
// factors ftd for ideal-current model
ftdbot = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot * phitrinv) - (phigdbot * phitdinv)));
ftdsti = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti * phitrinv) - (phigdsti * phitdinv)));
ftdgat = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat * phitrinv) - (phigdgat * phitdinv)));
// factors ftd for ideal-current model
ftdbot = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot * phitrinv) - (phigdbot * phitdinv)));
ftdsti = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti * phitrinv) - (phigdsti * phitdinv)));
ftdgat = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat * phitrinv) - (phigdgat * phitdinv)));
// temperature-scaled saturation current for ideal-current model
idsatbot = IDSATRBOT_i * ftdbot * ftdbot;
idsatsti = IDSATRSTI_i * ftdsti * ftdsti;
idsatgat = IDSATRGAT_i * ftdgat * ftdgat;
// temperature-scaled saturation current for ideal-current model
idsatbot = IDSATRBOT_i * ftdbot * ftdbot;
idsatsti = IDSATRSTI_i * ftdsti * ftdsti;
idsatgat = IDSATRGAT_i * ftdgat * ftdgat;
// built-in voltages before limiting
ubibot = VBIRBOT_i * auxt - 2 * phitd * ln(ftdbot);
ubisti = VBIRSTI_i * auxt - 2 * phitd * ln(ftdsti);
ubigat = VBIRGAT_i * auxt - 2 * phitd * ln(ftdgat);
// built-in voltages before limiting
ubibot = VBIRBOT_i * auxt - 2 * phitd * ln(ftdbot);
ubisti = VBIRSTI_i * auxt - 2 * phitd * ln(ftdsti);
ubigat = VBIRGAT_i * auxt - 2 * phitd * ln(ftdgat);
// built-in voltages limited to phitd
vbibot = ubibot + phitd * ln(1 + exp((`vbilow - ubibot) * phitdinv));
vbisti = ubisti + phitd * ln(1 + exp((`vbilow - ubisti) * phitdinv));
vbigat = ubigat + phitd * ln(1 + exp((`vbilow - ubigat) * phitdinv));
// built-in voltages limited to phitd
vbibot = ubibot + phitd * ln(1 + exp((`vbilow - ubibot) * phitdinv));
vbisti = ubisti + phitd * ln(1 + exp((`vbilow - ubisti) * phitdinv));
vbigat = ubigat + phitd * ln(1 + exp((`vbilow - ubigat) * phitdinv));
// inverse values of built-in voltages
vbiinvbot = 1.0 / vbibot;
vbiinvsti = 1.0 / vbisti;
vbiinvgat = 1.0 / vbigat;
// inverse values of built-in voltages
vbiinvbot = 1.0 / vbibot;
vbiinvsti = 1.0 / vbisti;
vbiinvgat = 1.0 / vbigat;
// one minus the grading coefficient
one_minus_PBOT = 1 - PBOT_i;
one_minus_PSTI = 1 - PSTI_i;
one_minus_PGAT = 1 - PGAT_i;
// one minus the grading coefficient
one_minus_PBOT = 1 - PBOT_i;
one_minus_PSTI = 1 - PSTI_i;
one_minus_PGAT = 1 - PGAT_i;
// one over "one minus the grading coefficient"
one_over_one_minus_PBOT = 1 / one_minus_PBOT;
one_over_one_minus_PSTI = 1 / one_minus_PSTI;
one_over_one_minus_PGAT = 1 / one_minus_PGAT;
// one over "one minus the grading coefficient"
one_over_one_minus_PBOT = 1 / one_minus_PBOT;
one_over_one_minus_PSTI = 1 / one_minus_PSTI;
one_over_one_minus_PGAT = 1 / one_minus_PGAT;
// temperature-scaled zero-bias capacitance
cjobot = CJORBOT_i * pow((VBIRBOT_i * vbiinvbot), PBOT_i);
cjosti = CJORSTI_i * pow((VBIRSTI_i * vbiinvsti), PSTI_i);
cjogat = CJORGAT_i * pow((VBIRGAT_i * vbiinvgat), PGAT_i);
// temperature-scaled zero-bias capacitance
cjobot = CJORBOT_i * pow((VBIRBOT_i * vbiinvbot), PBOT_i);
cjosti = CJORSTI_i * pow((VBIRSTI_i * vbiinvsti), PSTI_i);
cjogat = CJORGAT_i * pow((VBIRGAT_i * vbiinvgat), PGAT_i);
// prefactor in physical part of charge model
qprefbot = cjobot * vbibot * one_over_one_minus_PBOT;
qprefsti = cjosti * vbisti * one_over_one_minus_PSTI;
qprefgat = cjogat * vbigat * one_over_one_minus_PGAT;
// prefactor in physical part of charge model
qprefbot = cjobot * vbibot * one_over_one_minus_PBOT;
qprefsti = cjosti * vbisti * one_over_one_minus_PSTI;
qprefgat = cjogat * vbigat * one_over_one_minus_PGAT;
// prefactor in mathematical extension of charge model
qpref2bot = `a * cjobot;
qpref2sti = `a * cjosti;
qpref2gat = `a * cjogat;
// prefactor in mathematical extension of charge model
qpref2bot = `a * cjobot;
qpref2sti = `a * cjosti;
qpref2gat = `a * cjogat;
// zero-bias depletion widths at reference temperature, needed in SRH and TAT model
wdepnulrbot = `EPSSI / CJORBOT_i;
wdepnulrsti = XJUNSTI_i * `EPSSI / CJORSTI_i;
wdepnulrgat = XJUNGAT_i * `EPSSI / CJORGAT_i;
// zero-bias depletion widths at reference temperature, needed in SRH and TAT model
wdepnulrbot = `EPSSI / CJORBOT_i;
wdepnulrsti = XJUNSTI_i * `EPSSI / CJORSTI_i;
wdepnulrgat = XJUNGAT_i * `EPSSI / CJORGAT_i;
// inverse values of "wdepnulr", used in BBT model
wdepnulrinvbot = 1 / wdepnulrbot;
wdepnulrinvsti = 1 / wdepnulrsti;
wdepnulrinvgat = 1 / wdepnulrgat;
// inverse values of "wdepnulr", used in BBT model
wdepnulrinvbot = 1 / wdepnulrbot;
wdepnulrinvsti = 1 / wdepnulrsti;
wdepnulrinvgat = 1 / wdepnulrgat;
// inverse values of built-in voltages at reference temperature, needed in SRH and BBT model
VBIRBOTinv = 1 / VBIRBOT_i;
VBIRSTIinv = 1 / VBIRSTI_i;
VBIRGATinv = 1 / VBIRGAT_i;
// inverse values of built-in voltages at reference temperature, needed in SRH and BBT model
VBIRBOTinv = 1 / VBIRBOT_i;
VBIRSTIinv = 1 / VBIRSTI_i;
VBIRGATinv = 1 / VBIRGAT_i;
// some constants needed in erfc-approximation, needed in TAT model
perfc = (`SQRTPI * `aerfc);
berfc = ((-5 * (`aerfc) + 6 - pow((perfc), -2)) / 3);
cerfc = (1.0 - (`aerfc) - (berfc));
// some constants needed in erfc-approximation, needed in TAT model
perfc = (`SQRTPI * `aerfc);
berfc = ((-5 * (`aerfc) + 6 - pow((perfc), -2)) / 3);
cerfc = (1.0 - (`aerfc) - (berfc));
// half the bandgap energy, limited to values > phitd, needed in TAT model
deltaEbot = max(0.5 * phigdbot, phitd);
deltaEsti = max(0.5 * phigdsti, phitd);
deltaEgat = max(0.5 * phigdgat, phitd);
// half the bandgap energy, limited to values > phitd, needed in TAT model
deltaEbot = max(0.5 * phigdbot, phitd);
deltaEsti = max(0.5 * phigdsti, phitd);
deltaEgat = max(0.5 * phigdgat, phitd);
// values of atat, needed in TAT model
atatbot = deltaEbot * phitdinv;
atatsti = deltaEsti * phitdinv;
atatgat = deltaEgat * phitdinv;
// values of atat, needed in TAT model
atatbot = deltaEbot * phitdinv;
atatsti = deltaEsti * phitdinv;
atatgat = deltaEgat * phitdinv;
// values of btatpart, needed in TAT model
btatpartbot = sqrt(32 * MEFFTATBOT_i * `MELE * `QELE * (deltaEbot * deltaEbot * deltaEbot)) / (3 * `HBAR);
btatpartsti = sqrt(32 * MEFFTATSTI_i * `MELE * `QELE * (deltaEsti * deltaEsti * deltaEsti)) / (3 * `HBAR);
btatpartgat = sqrt(32 * MEFFTATGAT_i * `MELE * `QELE * (deltaEgat * deltaEgat * deltaEgat)) / (3 * `HBAR);
// values of btatpart, needed in TAT model
btatpartbot = sqrt(32 * MEFFTATBOT_i * `MELE * `QELE * (deltaEbot * deltaEbot * deltaEbot)) / (3 * `HBAR);
btatpartsti = sqrt(32 * MEFFTATSTI_i * `MELE * `QELE * (deltaEsti * deltaEsti * deltaEsti)) / (3 * `HBAR);
btatpartgat = sqrt(32 * MEFFTATGAT_i * `MELE * `QELE * (deltaEgat * deltaEgat * deltaEgat)) / (3 * `HBAR);
// temperature-scaled values of FBBT, needed in BBT model
fbbtbot = FBBTRBOT * (1 + STFBBTBOT * (tkd - tkr));
fbbtsti = FBBTRSTI * (1 + STFBBTSTI * (tkd - tkr));
fbbtgat = FBBTRGAT * (1 + STFBBTGAT * (tkd - tkr));
// temperature-scaled values of FBBT, needed in BBT model
fbbtbot = FBBTRBOT * (1 + STFBBTBOT * (tkd - tkr));
fbbtsti = FBBTRSTI * (1 + STFBBTSTI * (tkd - tkr));
fbbtgat = FBBTRGAT * (1 + STFBBTGAT * (tkd - tkr));
// values of fstop, needed in avalanche/breakdown model
fstopbot = 1 / (1 - pow(`alphaav, PBRBOT_i));
fstopsti = 1 / (1 - pow(`alphaav, PBRSTI_i));
fstopgat = 1 / (1 - pow(`alphaav, PBRGAT_i));
// values of fstop, needed in avalanche/breakdown model
fstopbot = 1 / (1 - pow(`alphaav, PBRBOT_i));
fstopsti = 1 / (1 - pow(`alphaav, PBRSTI_i));
fstopgat = 1 / (1 - pow(`alphaav, PBRGAT_i));
// inverse values of breakdown voltages, needed in avalanche/breakdown model
VBRinvbot = 1 / VBRBOT_i;
VBRinvsti = 1 / VBRSTI_i;
VBRinvgat = 1 / VBRGAT_i;
// inverse values of breakdown voltages, needed in avalanche/breakdown model
VBRinvbot = 1 / VBRBOT_i;
VBRinvsti = 1 / VBRSTI_i;
VBRinvgat = 1 / VBRGAT_i;
// slopes for linear extraploation close to and beyond breakdown, needed in avalanche/breakdown model
slopebot = -(fstopbot * fstopbot * pow(`alphaav, (PBRBOT_i - 1))) * PBRBOT_i * VBRinvbot;
slopesti = -(fstopsti * fstopsti * pow(`alphaav, (PBRSTI_i - 1))) * PBRSTI_i * VBRinvsti;
slopegat = -(fstopgat * fstopgat * pow(`alphaav, (PBRGAT_i - 1))) * PBRGAT_i * VBRinvgat;
// slopes for linear extraploation close to and beyond breakdown, needed in avalanche/breakdown model
slopebot = -(fstopbot * fstopbot * pow(`alphaav, (PBRBOT_i - 1))) * PBRBOT_i * VBRinvbot;
slopesti = -(fstopsti * fstopsti * pow(`alphaav, (PBRSTI_i - 1))) * PBRSTI_i * VBRinvsti;
slopegat = -(fstopgat * fstopgat * pow(`alphaav, (PBRGAT_i - 1))) * PBRGAT_i * VBRinvgat;

View File

@ -73,166 +73,166 @@
// Instance parameter dependent initialization
`define JuncapInitInstance(AB_i, LS_i, LG_i, VMAX, vbimin, vch, vfmin, vbbtlim) \
if (idsatbot * AB_i > 0) begin \
vmaxbot = phitd * ln(IMAX_i / (idsatbot * AB_i) + 1); \
end else begin \
vmaxbot = `vmaxlarge; \
end \
if (idsatsti * LS_i > 0) begin \
vmaxsti = phitd * ln(IMAX_i / (idsatsti * LS_i) + 1); \
end else begin \
vmaxsti = `vmaxlarge; \
end \
if (idsatgat * LG_i > 0) begin \
vmaxgat = phitd * ln(IMAX_i / (idsatgat * LG_i) + 1); \
end else begin \
vmaxgat = `vmaxlarge; \
end \
VMAX = min(min(vmaxbot, vmaxsti), vmaxgat); \
\
/* determination of minimum value of the relevant built-in voltages */ \
vbibot2 = vbibot; \
vbisti2 = vbisti; \
vbigat2 = vbigat; \
if (AB_i == 0) begin vbibot2 = vbisti + vbigat; end \
if (LS_i == 0) begin vbisti2 = vbibot + vbigat; end \
if (LG_i == 0) begin vbigat2 = vbibot + vbisti; end \
vbimin = min(min(vbibot2, vbisti2), vbigat2); \
vch = vbimin * `epsch; \
if (vbimin == vbibot) begin vfmin = vbibot * (1 - (pow(`a, (-1.0 / PBOT_i)))); end \
if (vbimin == vbisti) begin vfmin = vbisti * (1 - (pow(`a, (-1.0 / PSTI_i)))); end \
if (vbimin == vbigat) begin vfmin = vbigat * (1 - (pow(`a, (-1.0 / PGAT_i)))); end \
\
/* determination of limiting value of conditioned voltage for BBT calculation */ \
vbibot2r = VBIRBOT_i; \
vbisti2r = VBIRSTI_i; \
vbigat2r = VBIRGAT_i; \
if (AB_i == 0) begin vbibot2r = VBIRSTI_i + VBIRGAT_i; end \
if (LS_i == 0) begin vbisti2r = VBIRBOT_i + VBIRGAT_i; end \
if (LG_i == 0) begin vbigat2r = VBIRBOT_i + VBIRSTI_i; end \
vbbtlim = min(min(vbibot2r, vbisti2r), vbigat2r) - `dvbi; \
if (idsatbot * AB_i > 0) begin \
vmaxbot = phitd * ln(IMAX_i / (idsatbot * AB_i) + 1); \
end else begin \
vmaxbot = `vmaxlarge; \
end \
if (idsatsti * LS_i > 0) begin \
vmaxsti = phitd * ln(IMAX_i / (idsatsti * LS_i) + 1); \
end else begin \
vmaxsti = `vmaxlarge; \
end \
if (idsatgat * LG_i > 0) begin \
vmaxgat = phitd * ln(IMAX_i / (idsatgat * LG_i) + 1); \
end else begin \
vmaxgat = `vmaxlarge; \
end \
VMAX = min(min(vmaxbot, vmaxsti), vmaxgat); \
\
/* determination of minimum value of the relevant built-in voltages */ \
vbibot2 = vbibot; \
vbisti2 = vbisti; \
vbigat2 = vbigat; \
if (AB_i == 0) begin vbibot2 = vbisti + vbigat; end \
if (LS_i == 0) begin vbisti2 = vbibot + vbigat; end \
if (LG_i == 0) begin vbigat2 = vbibot + vbisti; end \
vbimin = min(min(vbibot2, vbisti2), vbigat2); \
vch = vbimin * `epsch; \
if (vbimin == vbibot) begin vfmin = vbibot * (1 - (pow(`a, (-1.0 / PBOT_i)))); end \
if (vbimin == vbisti) begin vfmin = vbisti * (1 - (pow(`a, (-1.0 / PSTI_i)))); end \
if (vbimin == vbigat) begin vfmin = vbigat * (1 - (pow(`a, (-1.0 / PGAT_i)))); end \
\
/* determination of limiting value of conditioned voltage for BBT calculation */ \
vbibot2r = VBIRBOT_i; \
vbisti2r = VBIRSTI_i; \
vbigat2r = VBIRGAT_i; \
if (AB_i == 0) begin vbibot2r = VBIRSTI_i + VBIRGAT_i; end \
if (LS_i == 0) begin vbisti2r = VBIRBOT_i + VBIRGAT_i; end \
if (LG_i == 0) begin vbigat2r = VBIRBOT_i + VBIRSTI_i; end \
vbbtlim = min(min(vbibot2r, vbisti2r), vbigat2r) - `dvbi; \
// Special power-functions
`define mypower(x,power,result) \
if (power == 0.5) begin \
result = sqrt(x); \
end else begin \
result = pow(x, power); \
end
if (power == 0.5) begin \
result = sqrt(x); \
end else begin \
result = pow(x, power); \
end
`define mypower2(x,power,result) \
if (power == -1) begin \
result = 1 / (x); \
end else begin \
result = pow(x, power); \
end
if (power == -1) begin \
result = 1 / (x); \
end else begin \
result = pow(x, power); \
end
`define mypower3(x,power,result) \
if (power == 4) begin \
result = (x) * (x) * (x) * (x); \
end else begin \
result = pow(x, power); \
end
if (power == 4) begin \
result = (x) * (x) * (x) * (x); \
end else begin \
result = pow(x, power); \
end
// Smoothing functions
`define hypfunction2(x,x0,eps,hyp2) \
hyp2 = 0.5 * ((x) + (x0) - sqrt(((x) - (x0)) * ((x) - (x0)) + 4 * (eps) * (eps)));
hyp2 = 0.5 * ((x) + (x0) - sqrt(((x) - (x0)) * ((x) - (x0)) + 4 * (eps) * (eps)));
`define hypfunction5(x,x0,eps,hyp5) \
h1 = 4.0 * (eps) * (eps); \
h2 = (eps) / (x0); \
h2d = (x) + (eps) * h2; \
h3 = (x0) + h2d; \
h4 = (x0) - h2d; \
h5 = sqrt(h4 * h4 + h1); \
hyp5 = 2.0 * ((x) * (x0) / (h3 + h5));
h1 = 4.0 * (eps) * (eps); \
h2 = (eps) / (x0); \
h2d = (x) + (eps) * h2; \
h3 = (x0) + h2d; \
h4 = (x0) - h2d; \
h5 = sqrt(h4 * h4 + h1); \
hyp5 = 2.0 * ((x) * (x0) / (h3 + h5));
// A special function used to calculate TAT-currents,
// including an approximation of the erfc-function
`define calcerfcexpmtat(y,m,result) \
ysq = y * y; \
if (y > 0) begin \
terfc = 1 / (1 + perfc * y); \
end else begin \
terfc = 1 / (1 - perfc * y); \
end \
`expl_low(-ysq + m, tmp) \
erfcpos = (`aerfc * terfc + berfc * (terfc * terfc) + cerfc * (terfc * terfc * terfc)) * tmp; \
if (y > 0) begin \
result = erfcpos; \
end else begin\
`expl_low(m, tmp) \
result = 2 * tmp - erfcpos; \
end
ysq = y * y; \
if (y > 0) begin \
terfc = 1 / (1 + perfc * y); \
end else begin \
terfc = 1 / (1 - perfc * y); \
end \
`expl_low(-ysq + m, tmp) \
erfcpos = (`aerfc * terfc + berfc * (terfc * terfc) + cerfc * (terfc * terfc * terfc)) * tmp; \
if (y > 0) begin \
result = erfcpos; \
end else begin\
`expl_low(m, tmp) \
result = 2 * tmp - erfcpos; \
end
// This is the main function of the JUNCAP2-model. It returns the current and charge
// for a single diode
`define juncapfunction(qpref,qpref2,vbiinv,one_minus_P,idsat,CSRH,CTAT,vbi,wdepnulr,VBIRinv,P,ftd,btatpart,atat,one_over_one_minus_P,CBBT,VBIR,wdepnulrinv,fbbt,VBR,VBRinv,PBR,fstop,slope,Ijprime,Qjprime) \
`mypower((1 - vj * vbiinv), one_minus_P, tmp) \
Qjprime = qpref * (1 - tmp) + qpref2 * (VAK - vj); \
id = idsat * idmult; \
if ((CSRH == 0) && (CTAT == 0)) begin \
isrh = 0; \
end else begin \
vbi_minus_vjsrh = vbi-vjsrh; \
wsrhstep = 1 - sqrt(1 - two_psistar / vbi_minus_vjsrh); \
if (P == 0.5) begin \
dwsrh = 0; \
`mypower((1 - vj * vbiinv), one_minus_P, tmp) \
Qjprime = qpref * (1 - tmp) + qpref2 * (VAK - vj); \
id = idsat * idmult; \
if ((CSRH == 0) && (CTAT == 0)) begin \
isrh = 0; \
end else begin \
dwsrh = ((wsrhstep * wsrhstep * ln(wsrhstep) / (1 - wsrhstep)) + wsrhstep) * (1 - 2 * P); \
vbi_minus_vjsrh = vbi-vjsrh; \
wsrhstep = 1 - sqrt(1 - two_psistar / vbi_minus_vjsrh); \
if (P == 0.5) begin \
dwsrh = 0; \
end else begin \
dwsrh = ((wsrhstep * wsrhstep * ln(wsrhstep) / (1 - wsrhstep)) + wsrhstep) * (1 - 2 * P); \
end \
wsrh = wsrhstep + dwsrh; \
`mypower(vbi_minus_vjsrh * VBIRinv, P, tmp) \
wdep = wdepnulr * tmp; \
asrh = ftd * ((zinv - 1) * wdep); \
isrh = CSRH * (asrh * wsrh); \
end \
wsrh = wsrhstep + dwsrh; \
`mypower(vbi_minus_vjsrh * VBIRinv, P, tmp) \
wdep = wdepnulr * tmp; \
asrh = ftd * ((zinv - 1) * wdep); \
isrh = CSRH * (asrh * wsrh); \
end \
if (CTAT == 0) begin \
itat = 0; \
end else begin \
btat = btatpart * ((wdep * one_minus_P) / vbi_minus_vjsrh); \
twoatatoverthreebtat = (`twothirds * atat) / btat; \
umaxbeforelimiting = twoatatoverthreebtat * twoatatoverthreebtat; \
umax = sqrt(umaxbeforelimiting * umaxbeforelimiting / (umaxbeforelimiting * umaxbeforelimiting + 1)); \
sqrtumax = sqrt(abs(umax)); \
umaxpoweronepointfive = umax * sqrtumax; \
`mypower2((1 + btat * umaxpoweronepointfive), (-P * one_over_one_minus_P), wgamma) \
wtat = wsrh * wgamma / (wsrh + wgamma); \
ktat = sqrt(0.375 * (btat / sqrtumax)); \
ltat = 2 * (twoatatoverthreebtat * sqrtumax) - umax; \
mtat = atat * twoatatoverthreebtat * sqrtumax - atat * umax + 0.5 * (btat * umaxpoweronepointfive); \
xerfc = (ltat - 1) * ktat; \
`calcerfcexpmtat(xerfc, mtat, erfctimesexpmtat) \
gammamax = `SQRTPI * 0.5 * (atat * erfctimesexpmtat / ktat); \
itat = CTAT * (asrh * gammamax * wtat); \
end \
if (CBBT == 0) begin \
ibbt = 0; \
end else begin \
`mypower(((VBIR - vbbt) * VBIRinv), P, tmp) \
Fmaxr = one_over_one_minus_P * ((VBIR - vbbt) * wdepnulrinv / tmp); \
`expl(-fbbt / Fmaxr, tmp) \
ibbt = CBBT * (VAK * Fmaxr * Fmaxr * tmp); \
end \
if (VBR > `vbrmax) begin \
fbreakdown = 1; \
end else begin \
if (vav > -`alphaav * VBR) begin \
`mypower3(abs(vav * VBRinv), PBR, tmp) \
fbreakdown = 1 / (1 - tmp); \
end else begin \
fbreakdown = fstop + (vav + `alphaav * VBR) * slope; \
end \
end \
Ijprime = (id + isrh + itat + ibbt) * fbreakdown;
if (CTAT == 0) begin \
itat = 0; \
end else begin \
btat = btatpart * ((wdep * one_minus_P) / vbi_minus_vjsrh); \
twoatatoverthreebtat = (`twothirds * atat) / btat; \
umaxbeforelimiting = twoatatoverthreebtat * twoatatoverthreebtat; \
umax = sqrt(umaxbeforelimiting * umaxbeforelimiting / (umaxbeforelimiting * umaxbeforelimiting + 1)); \
sqrtumax = sqrt(abs(umax)); \
umaxpoweronepointfive = umax * sqrtumax; \
`mypower2((1 + btat * umaxpoweronepointfive), (-P * one_over_one_minus_P), wgamma) \
wtat = wsrh * wgamma / (wsrh + wgamma); \
ktat = sqrt(0.375 * (btat / sqrtumax)); \
ltat = 2 * (twoatatoverthreebtat * sqrtumax) - umax; \
mtat = atat * twoatatoverthreebtat * sqrtumax - atat * umax + 0.5 * (btat * umaxpoweronepointfive); \
xerfc = (ltat - 1) * ktat; \
`calcerfcexpmtat(xerfc, mtat, erfctimesexpmtat) \
gammamax = `SQRTPI * 0.5 * (atat * erfctimesexpmtat / ktat); \
itat = CTAT * (asrh * gammamax * wtat); \
end \
if (CBBT == 0) begin \
ibbt = 0; \
end else begin \
`mypower(((VBIR - vbbt) * VBIRinv), P, tmp) \
Fmaxr = one_over_one_minus_P * ((VBIR - vbbt) * wdepnulrinv / tmp); \
`expl(-fbbt / Fmaxr, tmp) \
ibbt = CBBT * (VAK * Fmaxr * Fmaxr * tmp); \
end \
if (VBR > `vbrmax) begin \
fbreakdown = 1; \
end else begin \
if (vav > -`alphaav * VBR) begin \
`mypower3(abs(vav * VBRinv), PBR, tmp) \
fbreakdown = 1 / (1 - tmp); \
end else begin \
fbreakdown = fstop + (vav + `alphaav * VBR) * slope; \
end \
end \
Ijprime = (id + isrh + itat + ibbt) * fbreakdown;
// The following code is written as a macro because the naming of the instance parameters is
@ -241,45 +241,45 @@ Ijprime = (id + isrh + itat + ibbt) * fbreakdown;
// drain junction in PSP
`define juncapcommon(AB_i,LS_i,LG_i,ijunbot,qjunbot,ijunsti,qjunsti,ijungat,qjungat) \
vbbt = 0.0; \
two_psistar = 0.0; \
if ( !( ((AB_i) == 0) && ((LS_i) == 0) && ((LG_i) == 0) ) ) begin \
`hypfunction5(VAK, vfmin, vch, vj) \
if (VAK < VMAX) begin \
`expl(0.5 * (VAK * phitdinv), zinv) \
idmult = zinv * zinv; \
end else begin \
`expl(VMAX * phitdinv, exp_VMAX_over_phitd) \
idmult = (1 + (VAK - VMAX) * phitdinv) * exp_VMAX_over_phitd; \
zinv = sqrt(idmult); \
vbbt = 0.0; \
two_psistar = 0.0; \
if ( !( ((AB_i) == 0) && ((LS_i) == 0) && ((LG_i) == 0) ) ) begin \
`hypfunction5(VAK, vfmin, vch, vj) \
if (VAK < VMAX) begin \
`expl(0.5 * (VAK * phitdinv), zinv) \
idmult = zinv * zinv; \
end else begin \
`expl(VMAX * phitdinv, exp_VMAX_over_phitd) \
idmult = (1 + (VAK - VMAX) * phitdinv) * exp_VMAX_over_phitd; \
zinv = sqrt(idmult); \
end \
idmult = idmult - 1.0; \
z = 1 / zinv; \
if (VAK > 0) begin \
two_psistar = 2.0 * (phitd * ln(2.0 + z + sqrt((z + 1.0) * (z + 3.0)))); \
end else begin \
two_psistar = -VAK + 2.0 * (phitd * ln(2 * zinv + 1 + sqrt((1 + zinv) * (1 + 3 * zinv)))); \
end \
vjlim = vbimin - two_psistar; \
`hypfunction2(VAK, vjlim, phitd, vjsrh) \
`hypfunction2(VAK, vbbtlim, phitr, vbbt) \
`hypfunction2(VAK, 0, `epsav, vav) \
end \
idmult = idmult - 1.0; \
z = 1 / zinv; \
if (VAK > 0) begin \
two_psistar = 2.0 * (phitd * ln(2.0 + z + sqrt((z + 1.0) * (z + 3.0)))); \
if ((AB_i) == 0) begin \
ijunbot = 0; \
qjunbot = 0; \
end else begin \
two_psistar = -VAK + 2.0 * (phitd * ln(2 * zinv + 1 + sqrt((1 + zinv) * (1 + 3 * zinv)))); \
`juncapfunction(qprefbot,qpref2bot,vbiinvbot,one_minus_PBOT,idsatbot,CSRHBOT_i,CTATBOT_i,vbibot,wdepnulrbot,VBIRBOTinv,PBOT_i,ftdbot,btatpartbot,atatbot,one_over_one_minus_PBOT,CBBTBOT_i,VBIRBOT_i,wdepnulrinvbot,fbbtbot,VBRBOT_i,VBRinvbot,PBRBOT_i,fstopbot,slopebot,ijunbot, qjunbot) \
end \
vjlim = vbimin - two_psistar; \
`hypfunction2(VAK, vjlim, phitd, vjsrh) \
`hypfunction2(VAK, vbbtlim, phitr, vbbt) \
`hypfunction2(VAK, 0, `epsav, vav) \
end \
if ((AB_i) == 0) begin \
ijunbot = 0; \
qjunbot = 0; \
end else begin \
`juncapfunction(qprefbot,qpref2bot,vbiinvbot,one_minus_PBOT,idsatbot,CSRHBOT_i,CTATBOT_i,vbibot,wdepnulrbot,VBIRBOTinv,PBOT_i,ftdbot,btatpartbot,atatbot,one_over_one_minus_PBOT,CBBTBOT_i,VBIRBOT_i,wdepnulrinvbot,fbbtbot,VBRBOT_i,VBRinvbot,PBRBOT_i,fstopbot,slopebot,ijunbot, qjunbot) \
end \
if ((LS_i) == 0) begin \
ijunsti = 0; \
qjunsti = 0; \
end else begin \
`juncapfunction(qprefsti,qpref2sti,vbiinvsti,one_minus_PSTI,idsatsti,CSRHSTI_i,CTATSTI_i,vbisti,wdepnulrsti,VBIRSTIinv,PSTI_i,ftdsti,btatpartsti,atatsti,one_over_one_minus_PSTI,CBBTSTI_i,VBIRSTI_i,wdepnulrinvsti,fbbtsti,VBRSTI_i,VBRinvsti,PBRSTI_i,fstopsti,slopesti,ijunsti, qjunsti) \
end \
if ((LG_i) == 0) begin \
ijungat = 0; \
qjungat = 0; \
end else begin \
`juncapfunction(qprefgat,qpref2gat,vbiinvgat,one_minus_PGAT,idsatgat,CSRHGAT_i,CTATGAT_i,vbigat,wdepnulrgat,VBIRGATinv,PGAT_i,ftdgat,btatpartgat,atatgat,one_over_one_minus_PGAT,CBBTGAT_i,VBIRGAT_i,wdepnulrinvgat,fbbtgat,VBRGAT_i,VBRinvgat,PBRGAT_i,fstopgat,slopegat,ijungat, qjungat) \
end
if ((LS_i) == 0) begin \
ijunsti = 0; \
qjunsti = 0; \
end else begin \
`juncapfunction(qprefsti,qpref2sti,vbiinvsti,one_minus_PSTI,idsatsti,CSRHSTI_i,CTATSTI_i,vbisti,wdepnulrsti,VBIRSTIinv,PSTI_i,ftdsti,btatpartsti,atatsti,one_over_one_minus_PSTI,CBBTSTI_i,VBIRSTI_i,wdepnulrinvsti,fbbtsti,VBRSTI_i,VBRinvsti,PBRSTI_i,fstopsti,slopesti,ijunsti, qjunsti) \
end \
if ((LG_i) == 0) begin \
ijungat = 0; \
qjungat = 0; \
end else begin \
`juncapfunction(qprefgat,qpref2gat,vbiinvgat,one_minus_PGAT,idsatgat,CSRHGAT_i,CTATGAT_i,vbigat,wdepnulrgat,VBIRGATinv,PGAT_i,ftdgat,btatpartgat,atatgat,one_over_one_minus_PGAT,CBBTGAT_i,VBIRGAT_i,wdepnulrinvgat,fbbtgat,VBRGAT_i,VBRinvgat,PBRGAT_i,fstopgat,slopegat,ijungat, qjungat) \
end

View File

@ -15,51 +15,51 @@
// Further information can be found in the file readme.txt
//
//////////////////////////////////////////
//
// JUNCAP2 - Reduced parameterlist
//
//////////////////////////////////////////
//////////////////////////////////////////
//
// JUNCAP2 - Reduced parameterlist
//
//////////////////////////////////////////
parameter real IMAX = 1000 `from(`IMAX_cliplow ,inf ) `P(info="Maximum current up to which forward current behaves exponentially" unit="A" );
parameter real CJORBOT = 1E-3 `from(`CJORBOT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-area of bottom component" unit="Fm^-2" );
parameter real CJORSTI = 1E-9 `from(`CJORSTI_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of STI-edge component" unit="Fm^-1" );
parameter real CJORGAT = 1E-9 `from(`CJORGAT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of gate-edge component" unit="Fm^-1" );
parameter real VBIRBOT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of bottom component" unit="V" );
parameter real VBIRSTI = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of STI-edge component" unit="V" );
parameter real VBIRGAT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of gate-edge component" unit="V" );
parameter real PBOT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of bottom component" unit="" );
parameter real PSTI = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of STI-edge component" unit="" );
parameter real PGAT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of gate-edge component" unit="" );
parameter real PHIGBOT = 1.16 `P(info="Zero-temperature bandgap voltage of bottom component" unit="V" );
parameter real PHIGSTI = 1.16 `P(info="Zero-temperature bandgap voltage of STI-edge component" unit="V" );
parameter real PHIGGAT = 1.16 `P(info="Zero-temperature bandgap voltage of gate-edge component" unit="V" );
parameter real IDSATRBOT = 1E-12 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of bottom component" unit="Am^-2" );
parameter real IDSATRSTI = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of STI-edge component" unit="Am^-1" );
parameter real IDSATRGAT = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of gate-edge component" unit="Am^-1" );
parameter real CSRHBOT = 1E2 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of bottom component" unit="Am^-3" );
parameter real CSRHSTI = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of STI-edge component" unit="Am^-2" );
parameter real CSRHGAT = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of gate-edge component" unit="Am^-2" );
parameter real XJUNSTI = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of STI-edge component" unit="m" );
parameter real XJUNGAT = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of gate-edge component" unit="m" );
parameter real CTATBOT = 1E2 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of bottom component" unit="Am^-3" );
parameter real CTATSTI = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of STI-edge component" unit="Am^-2" );
parameter real CTATGAT = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of gate-edge component" unit="Am^-2" );
parameter real MEFFTATBOT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of bottom component" unit="" );
parameter real MEFFTATSTI = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component" unit="" );
parameter real MEFFTATGAT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component" unit="" );
parameter real CBBTBOT = 1E-12 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of bottom component" unit="AV^-3" );
parameter real CBBTSTI = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of STI-edge component" unit="AV^-3m" );
parameter real CBBTGAT = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of gate-edge component" unit="AV^-3m" );
parameter real FBBTRBOT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of bottom component" unit="Vm^-1" );
parameter real FBBTRSTI = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of STI-edge component" unit="Vm^-1" );
parameter real FBBTRGAT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of gate-edge component" unit="Vm^-1" );
parameter real STFBBTBOT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of bottom component" unit="K^-1" );
parameter real STFBBTSTI = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of STI-edge component" unit="K^-1" );
parameter real STFBBTGAT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of gate-edge component" unit="K^-1" );
parameter real VBRBOT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of bottom component" unit="V" );
parameter real VBRSTI = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of STI-edge component" unit="V" );
parameter real VBRGAT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of gate-edge component" unit="V" );
parameter real PBRBOT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of bottom component" unit="V" );
parameter real PBRSTI = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of STI-edge component" unit="V" );
parameter real PBRGAT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of gate-edge component" unit="V" );
parameter real IMAX = 1000 `from(`IMAX_cliplow ,inf ) `P(info="Maximum current up to which forward current behaves exponentially" unit="A" );
parameter real CJORBOT = 1E-3 `from(`CJORBOT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-area of bottom component" unit="Fm^-2" );
parameter real CJORSTI = 1E-9 `from(`CJORSTI_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of STI-edge component" unit="Fm^-1" );
parameter real CJORGAT = 1E-9 `from(`CJORGAT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of gate-edge component" unit="Fm^-1" );
parameter real VBIRBOT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of bottom component" unit="V" );
parameter real VBIRSTI = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of STI-edge component" unit="V" );
parameter real VBIRGAT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of gate-edge component" unit="V" );
parameter real PBOT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of bottom component" unit="" );
parameter real PSTI = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of STI-edge component" unit="" );
parameter real PGAT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of gate-edge component" unit="" );
parameter real PHIGBOT = 1.16 `P(info="Zero-temperature bandgap voltage of bottom component" unit="V" );
parameter real PHIGSTI = 1.16 `P(info="Zero-temperature bandgap voltage of STI-edge component" unit="V" );
parameter real PHIGGAT = 1.16 `P(info="Zero-temperature bandgap voltage of gate-edge component" unit="V" );
parameter real IDSATRBOT = 1E-12 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of bottom component" unit="Am^-2" );
parameter real IDSATRSTI = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of STI-edge component" unit="Am^-1" );
parameter real IDSATRGAT = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of gate-edge component" unit="Am^-1" );
parameter real CSRHBOT = 1E2 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of bottom component" unit="Am^-3" );
parameter real CSRHSTI = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of STI-edge component" unit="Am^-2" );
parameter real CSRHGAT = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of gate-edge component" unit="Am^-2" );
parameter real XJUNSTI = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of STI-edge component" unit="m" );
parameter real XJUNGAT = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of gate-edge component" unit="m" );
parameter real CTATBOT = 1E2 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of bottom component" unit="Am^-3" );
parameter real CTATSTI = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of STI-edge component" unit="Am^-2" );
parameter real CTATGAT = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of gate-edge component" unit="Am^-2" );
parameter real MEFFTATBOT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of bottom component" unit="" );
parameter real MEFFTATSTI = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component" unit="" );
parameter real MEFFTATGAT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component" unit="" );
parameter real CBBTBOT = 1E-12 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of bottom component" unit="AV^-3" );
parameter real CBBTSTI = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of STI-edge component" unit="AV^-3m" );
parameter real CBBTGAT = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of gate-edge component" unit="AV^-3m" );
parameter real FBBTRBOT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of bottom component" unit="Vm^-1" );
parameter real FBBTRSTI = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of STI-edge component" unit="Vm^-1" );
parameter real FBBTRGAT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of gate-edge component" unit="Vm^-1" );
parameter real STFBBTBOT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of bottom component" unit="K^-1" );
parameter real STFBBTSTI = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of STI-edge component" unit="K^-1" );
parameter real STFBBTGAT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of gate-edge component" unit="K^-1" );
parameter real VBRBOT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of bottom component" unit="V" );
parameter real VBRSTI = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of STI-edge component" unit="V" );
parameter real VBRGAT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of gate-edge component" unit="V" );
parameter real PBRBOT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of bottom component" unit="V" );
parameter real PBRSTI = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of STI-edge component" unit="V" );
parameter real PBRGAT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of gate-edge component" unit="V" );

View File

@ -16,52 +16,52 @@
//
// declaration of variables needed in macro "calcerfcexpmtat"
real ysq, terfc, erfcpos;
// declaration of variables needed in macro "calcerfcexpmtat"
real ysq, terfc, erfcpos;
// declaration of variables needed in hypfunction 5
real h1, h2, h2d, h3, h4, h5;
// declaration of variables needed in hypfunction 5
real h1, h2, h2d, h3, h4, h5;
// declaration of variables used within macro "juncapfunction"
real tmp, id;
real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh;
real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive;
real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax;
real ibbt, Fmaxr;
real fbreakdown;
// declaration of variables used within macro "juncapfunction"
real tmp, id;
real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh;
real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive;
real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax;
real ibbt, Fmaxr;
real fbreakdown;
// declaration of clipped parameters
real TRJ_i, IMAX_i;
real CJORBOT_i, CJORSTI_i, CJORGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i;
real PBOT_i, PSTI_i, PGAT_i;
real IDSATRBOT_i, IDSATRSTI_i, IDSATRGAT_i, XJUNSTI_i, XJUNGAT_i;
real CSRHBOT_i, CSRHSTI_i, CSRHGAT_i, CTATBOT_i, CTATSTI_i, CTATGAT_i;
real MEFFTATBOT_i, MEFFTATSTI_i, MEFFTATGAT_i;
real CBBTBOT_i, CBBTSTI_i, CBBTGAT_i;
real VBRBOT_i, VBRSTI_i, VBRGAT_i, PBRBOT_i, PBRSTI_i, PBRGAT_i;
// declaration of clipped parameters
real TRJ_i, IMAX_i;
real CJORBOT_i, CJORSTI_i, CJORGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i;
real PBOT_i, PSTI_i, PGAT_i;
real IDSATRBOT_i, IDSATRSTI_i, IDSATRGAT_i, XJUNSTI_i, XJUNGAT_i;
real CSRHBOT_i, CSRHSTI_i, CSRHGAT_i, CTATBOT_i, CTATSTI_i, CTATGAT_i;
real MEFFTATBOT_i, MEFFTATSTI_i, MEFFTATGAT_i;
real CBBTBOT_i, CBBTSTI_i, CBBTGAT_i;
real VBRBOT_i, VBRSTI_i, VBRGAT_i, PBRBOT_i, PBRSTI_i, PBRGAT_i;
// declaration of variables calculated outside macro "juncapfunction", voltage-independent part
real tkr, tkd, auxt, KBOL_over_QELE, phitr, phitrinv, phitd, phitdinv;
real deltaphigr, phigrbot, phigrsti, phigrgat, deltaphigd, phigdbot, phigdsti, phigdgat;
real ftdbot, ftdsti, ftdgat, idsatbot, idsatsti, idsatgat, exp_VMAX_over_phitd;
real ubibot, ubisti, ubigat, vbibot, vbisti, vbigat;
real vbibot2, vbisti2, vbigat2, vbibot2r, vbisti2r, vbigat2r;
real vbiinvbot, vbiinvsti, vbiinvgat;
real one_minus_PBOT, one_minus_PSTI, one_minus_PGAT;
real one_over_one_minus_PBOT, one_over_one_minus_PSTI, one_over_one_minus_PGAT;
real cjobot, cjosti, cjogat, qprefbot, qprefsti, qprefgat;
real vbimin, vch, vfmin, vbbtlim;
real qpref2bot, qpref2sti, qpref2gat;
real wdepnulrbot, wdepnulrsti, wdepnulrgat, wdepnulrinvbot, wdepnulrinvsti, wdepnulrinvgat;
real VBIRBOTinv, VBIRSTIinv, VBIRGATinv;
real perfc, berfc, cerfc;
real deltaEbot, deltaEsti, deltaEgat, atatbot, atatsti, atatgat;
real btatpartbot, btatpartsti, btatpartgat;
real fbbtbot, fbbtsti, fbbtgat;
real fstopbot, fstopsti, fstopgat, VBRinvbot, VBRinvsti, VBRinvgat;
real slopebot, slopesti, slopegat;
real vmaxbot, vmaxsti, vmaxgat, VMAX;
// declaration of variables calculated outside macro "juncapfunction", voltage-independent part
real tkr, tkd, auxt, KBOL_over_QELE, phitr, phitrinv, phitd, phitdinv;
real deltaphigr, phigrbot, phigrsti, phigrgat, deltaphigd, phigdbot, phigdsti, phigdgat;
real ftdbot, ftdsti, ftdgat, idsatbot, idsatsti, idsatgat, exp_VMAX_over_phitd;
real ubibot, ubisti, ubigat, vbibot, vbisti, vbigat;
real vbibot2, vbisti2, vbigat2, vbibot2r, vbisti2r, vbigat2r;
real vbiinvbot, vbiinvsti, vbiinvgat;
real one_minus_PBOT, one_minus_PSTI, one_minus_PGAT;
real one_over_one_minus_PBOT, one_over_one_minus_PSTI, one_over_one_minus_PGAT;
real cjobot, cjosti, cjogat, qprefbot, qprefsti, qprefgat;
real vbimin, vch, vfmin, vbbtlim;
real qpref2bot, qpref2sti, qpref2gat;
real wdepnulrbot, wdepnulrsti, wdepnulrgat, wdepnulrinvbot, wdepnulrinvsti, wdepnulrinvgat;
real VBIRBOTinv, VBIRSTIinv, VBIRGATinv;
real perfc, berfc, cerfc;
real deltaEbot, deltaEsti, deltaEgat, atatbot, atatsti, atatgat;
real btatpartbot, btatpartsti, btatpartgat;
real fbbtbot, fbbtsti, fbbtgat;
real fstopbot, fstopsti, fstopgat, VBRinvbot, VBRinvsti, VBRinvgat;
real slopebot, slopesti, slopegat;
real vmaxbot, vmaxsti, vmaxgat, VMAX;
// declaration of variables calculated outside macro "juncapfunction", voltage-dependent part
real VAK, idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav;
// declaration of variables calculated outside macro "juncapfunction", voltage-dependent part
real VAK, idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav;

View File

@ -72,59 +72,106 @@
// (one call uses expressions for arguments so parentheses
// around the arguments in the expressions are necessary)
`define sigma(a,c,tau,eta,y) \
nu = (a) + (c); \
mu = nu * nu / (tau) + 0.5 * ((c) * (c)) - (a); \
y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a)));
nu = (a) + (c); \
mu = nu * nu / (tau) + 0.5 * ((c) * (c)) - (a); \
y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a)));
// modified version of sigma, which takes 4 arguments
`define sigma2(a,b,c,tau,eta,y) \
nu = (a) + (c); \
if (abs(tau) < 1e-120) begin /*sometimes tau is extremely small...*/\
y = (eta); \
end else begin \
mu = (nu) * (nu) / (tau) + 0.5 * ((c) * (c)) - (a) * (b); \
y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a) * (b))); \
end
nu = (a) + (c); \
if (abs(tau) < 1e-120) begin /*sometimes tau is extremely small...*/\
y = (eta); \
end else begin \
mu = (nu) * (nu) / (tau) + 0.5 * ((c) * (c)) - (a) * (b); \
y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a) * (b))); \
end
//
// sp_s surface potential calculation
//
`define sp_s(sp,xg,xn,delta) \
if (abs(xg) <= margin) begin \
SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
end else begin \
if (xg < -margin) begin \
SP_S_yg = -xg; \
SP_S_ysub = 1.25 * (SP_S_yg * inv_xi); \
SP_S_eta = 0.5 * (SP_S_ysub + 10 - sqrt((SP_S_ysub - 6.0) * (SP_S_ysub - 6.0) + 64.0)); \
SP_S_temp = SP_S_yg - SP_S_eta; \
SP_S_a = SP_S_temp * SP_S_temp + Gf2*(SP_S_eta + 1.0);\
SP_S_c = 2.0 * SP_S_temp - Gf2; \
SP_S_tau = -SP_S_eta + ln(SP_S_a * inv_Gf2); \
`sigma(SP_S_a, SP_S_c, SP_S_tau, SP_S_eta, SP_S_y0) \
`expl_high(SP_S_y0, SP_S_delta0) \
SP_S_delta1 = 1.0 / SP_S_delta0; \
SP_S_temp = 1.0 / (2.0 + SP_S_y0 * SP_S_y0); \
SP_S_xi0 = SP_S_y0 * SP_S_y0 * SP_S_temp; \
SP_S_xi1 = 4.0 * (SP_S_y0 * SP_S_temp * SP_S_temp); \
SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
SP_S_temp = SP_S_yg - SP_S_y0; \
SP_S_temp1 = (delta) * SP_S_delta1; \
SP_S_pC = 2.0 * SP_S_temp + Gf2 * (SP_S_delta0 - 1.0 - SP_S_temp1 + (delta) * (1.0 - SP_S_xi1)); \
SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta0 - SP_S_y0 - 1.0 + SP_S_temp1 + (delta) * (SP_S_y0 - 1.0 - SP_S_xi0)); \
SP_S_temp = 2.0 - Gf2 * (SP_S_delta0 + SP_S_temp1 - (delta) * SP_S_xi2); \
SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
sp = -SP_S_y0 - 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \
if (abs(xg) <= margin) begin \
SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
end else begin \
SP_xg1 = 1.0 / (x1 + Gf * 7.324648775608221e-001); \
SP_S_A_fac= (xi * x1 * SP_xg1 - 1.0) * SP_xg1; \
SP_S_xbar = xg * inv_xi * (1.0 + SP_S_A_fac * xg); \
`expl_low(-SP_S_xbar, SP_S_temp) \
SP_S_w = 1.0 - SP_S_temp; \
SP_S_x1 = xg + Gf2 * 0.5 - Gf * sqrt(xg + Gf2 * 0.25 - SP_S_w); \
SP_S_bx = (xn) + 3.0; \
if (xg < -margin) begin \
SP_S_yg = -xg; \
SP_S_ysub = 1.25 * (SP_S_yg * inv_xi); \
SP_S_eta = 0.5 * (SP_S_ysub + 10 - sqrt((SP_S_ysub - 6.0) * (SP_S_ysub - 6.0) + 64.0)); \
SP_S_temp = SP_S_yg - SP_S_eta; \
SP_S_a = SP_S_temp * SP_S_temp + Gf2*(SP_S_eta + 1.0);\
SP_S_c = 2.0 * SP_S_temp - Gf2; \
SP_S_tau = -SP_S_eta + ln(SP_S_a * inv_Gf2); \
`sigma(SP_S_a, SP_S_c, SP_S_tau, SP_S_eta, SP_S_y0) \
`expl_high(SP_S_y0, SP_S_delta0) \
SP_S_delta1 = 1.0 / SP_S_delta0; \
SP_S_temp = 1.0 / (2.0 + SP_S_y0 * SP_S_y0); \
SP_S_xi0 = SP_S_y0 * SP_S_y0 * SP_S_temp; \
SP_S_xi1 = 4.0 * (SP_S_y0 * SP_S_temp * SP_S_temp); \
SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
SP_S_temp = SP_S_yg - SP_S_y0; \
SP_S_temp1 = (delta) * SP_S_delta1; \
SP_S_pC = 2.0 * SP_S_temp + Gf2 * (SP_S_delta0 - 1.0 - SP_S_temp1 + (delta) * (1.0 - SP_S_xi1)); \
SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta0 - SP_S_y0 - 1.0 + SP_S_temp1 + (delta) * (SP_S_y0 - 1.0 - SP_S_xi0)); \
SP_S_temp = 2.0 - Gf2 * (SP_S_delta0 + SP_S_temp1 - (delta) * SP_S_xi2); \
SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
sp = -SP_S_y0 - 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \
end else begin \
SP_xg1 = 1.0 / (x1 + Gf * 7.324648775608221e-001); \
SP_S_A_fac= (xi * x1 * SP_xg1 - 1.0) * SP_xg1; \
SP_S_xbar = xg * inv_xi * (1.0 + SP_S_A_fac * xg); \
`expl_low(-SP_S_xbar, SP_S_temp) \
SP_S_w = 1.0 - SP_S_temp; \
SP_S_x1 = xg + Gf2 * 0.5 - Gf * sqrt(xg + Gf2 * 0.25 - SP_S_w); \
SP_S_bx = (xn) + 3.0; \
SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \
SP_S_temp = xg - SP_S_eta; \
SP_S_temp1= exp(-SP_S_eta); \
SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \
SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \
SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \
SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \
SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \
SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \
SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \
SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \
`sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \
if (SP_S_x0 < `se05) begin \
SP_S_delta0 = exp(SP_S_x0); \
SP_S_delta1 = 1.0 / SP_S_delta0; \
SP_S_delta0 = (delta) * SP_S_delta0; \
end else begin \
if (SP_S_x0 > (xn) - `se05) begin \
SP_S_delta0 = exp(SP_S_x0 - (xn)); \
SP_S_delta1 = (delta) / SP_S_delta0; \
end else begin \
SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \
SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \
end \
end \
SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \
SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \
SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \
SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
SP_S_temp = xg - SP_S_x0; \
SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \
SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \
SP_S_temp = 2.0 - Gf2 * (SP_S_delta1 + SP_S_delta0 - (delta) * SP_S_xi2); \
SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \
end \
end
//
// sp_s_d surface potential calculation at drain (subset of function sp_s)
//
`define sp_s_d(sp,xg,xn,delta) \
if (abs(xg) <= margin) begin \
SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
end else begin \
SP_S_bx = (xn) + 3; \
SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \
SP_S_temp = xg - SP_S_eta; \
SP_S_temp1= exp(-SP_S_eta); \
@ -153,98 +200,51 @@ end else begin \
SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \
SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \
SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \
SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
SP_S_xi2 = (8.0 * SP_S_temp-12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
SP_S_temp = xg - SP_S_x0; \
SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \
SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \
SP_S_temp = 2.0 - Gf2 * (SP_S_delta1 + SP_S_delta0 - (delta) * SP_S_xi2); \
SP_S_temp = 2.0 - Gf2*(SP_S_delta1+SP_S_delta0-(delta)*SP_S_xi2); \
SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \
end \
end
//
// sp_s_d surface potential calculation at drain (subset of function sp_s)
//
`define sp_s_d(sp,xg,xn,delta) \
if (abs(xg) <= margin) begin \
SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
end else begin \
SP_S_bx = (xn) + 3; \
SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \
SP_S_temp = xg - SP_S_eta; \
SP_S_temp1= exp(-SP_S_eta); \
SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \
SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \
SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \
SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \
SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \
SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \
SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \
SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \
`sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \
if (SP_S_x0 < `se05) begin \
SP_S_delta0 = exp(SP_S_x0); \
SP_S_delta1 = 1.0 / SP_S_delta0; \
SP_S_delta0 = (delta) * SP_S_delta0; \
end else begin \
if (SP_S_x0 > (xn) - `se05) begin \
SP_S_delta0 = exp(SP_S_x0 - (xn)); \
SP_S_delta1 = (delta) / SP_S_delta0; \
end else begin \
SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \
SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \
end \
end \
SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \
SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \
SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \
SP_S_xi2 = (8.0 * SP_S_temp-12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \
SP_S_temp = xg - SP_S_x0; \
SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \
SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \
SP_S_temp = 2.0 - Gf2*(SP_S_delta1+SP_S_delta0-(delta)*SP_S_xi2); \
SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \
sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp)));\
end
sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp)));\
end
//
// sp_ov surface potential calculation for the overlap regions
//
`define sp_ov(sp,xg) \
if (abs(xg) <= x_mrg_ov) begin \
sp = (-(xg) * inv_xi_ov); \
end else begin \
if (xg < -x_mrg_ov) begin \
SP_OV_yg = -xg; \
SP_OV_z = x1 * SP_OV_yg * inv_xi_ov; \
SP_OV_eta = 0.5 * (SP_OV_z + 10.0 - sqrt((SP_OV_z - 6.0) * (SP_OV_z - 6.0) + 64.0)); \
SP_OV_a = (SP_OV_yg - SP_OV_eta) * (SP_OV_yg - SP_OV_eta) + GOV2 * (SP_OV_eta + 1.0); \
SP_OV_c = 2.0 * (SP_OV_yg - SP_OV_eta) - GOV2; \
SP_OV_tau = ln(SP_OV_a / GOV2) - SP_OV_eta; \
`sigma(SP_OV_a, SP_OV_c, SP_OV_tau, SP_OV_eta, SP_OV_y0) \
SP_OV_D0 = exp(SP_OV_y0); \
SP_OV_temp = SP_OV_yg - SP_OV_y0; \
SP_OV_p = 2.0 * SP_OV_temp + GOV2 * (SP_OV_D0 - 1.0); \
SP_OV_q = SP_OV_temp * SP_OV_temp + GOV2 * (SP_OV_y0 + 1.0 - SP_OV_D0); \
SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \
SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \
SP_OV_w = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \
sp = -(SP_OV_y0 + SP_OV_w); \
if (abs(xg) <= x_mrg_ov) begin \
sp = (-(xg) * inv_xi_ov); \
end else begin \
SP_OV_Afac = (xi_ov * x1 * inv_xg1 - 1.0) * inv_xg1; \
SP_OV_xbar = xg * inv_xi_ov * (1.0 + SP_OV_Afac * xg); \
`expl_low(-SP_OV_xbar, SP_OV_temp) \
SP_OV_w = 1.0 - SP_OV_temp; \
SP_OV_x0 = xg + GOV2 * 0.5 - GOV * sqrt(xg + GOV2 * 0.25 - SP_OV_w); \
`expl_low(-SP_OV_x0, SP_OV_D0) \
SP_OV_p = 2.0 * (xg - SP_OV_x0) + GOV2 * (1 - SP_OV_D0); \
SP_OV_q = (xg - SP_OV_x0) * (xg - SP_OV_x0) - GOV2 * (SP_OV_x0 - 1.0 + SP_OV_D0); \
SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \
SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \
SP_OV_u = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \
sp = SP_OV_x0 + SP_OV_u; \
end \
sp = -sp; \
end
if (xg < -x_mrg_ov) begin \
SP_OV_yg = -xg; \
SP_OV_z = x1 * SP_OV_yg * inv_xi_ov; \
SP_OV_eta = 0.5 * (SP_OV_z + 10.0 - sqrt((SP_OV_z - 6.0) * (SP_OV_z - 6.0) + 64.0)); \
SP_OV_a = (SP_OV_yg - SP_OV_eta) * (SP_OV_yg - SP_OV_eta) + GOV2 * (SP_OV_eta + 1.0); \
SP_OV_c = 2.0 * (SP_OV_yg - SP_OV_eta) - GOV2; \
SP_OV_tau = ln(SP_OV_a / GOV2) - SP_OV_eta; \
`sigma(SP_OV_a, SP_OV_c, SP_OV_tau, SP_OV_eta, SP_OV_y0) \
SP_OV_D0 = exp(SP_OV_y0); \
SP_OV_temp = SP_OV_yg - SP_OV_y0; \
SP_OV_p = 2.0 * SP_OV_temp + GOV2 * (SP_OV_D0 - 1.0); \
SP_OV_q = SP_OV_temp * SP_OV_temp + GOV2 * (SP_OV_y0 + 1.0 - SP_OV_D0); \
SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \
SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \
SP_OV_w = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \
sp = -(SP_OV_y0 + SP_OV_w); \
end else begin \
SP_OV_Afac = (xi_ov * x1 * inv_xg1 - 1.0) * inv_xg1; \
SP_OV_xbar = xg * inv_xi_ov * (1.0 + SP_OV_Afac * xg); \
`expl_low(-SP_OV_xbar, SP_OV_temp) \
SP_OV_w = 1.0 - SP_OV_temp; \
SP_OV_x0 = xg + GOV2 * 0.5 - GOV * sqrt(xg + GOV2 * 0.25 - SP_OV_w); \
`expl_low(-SP_OV_x0, SP_OV_D0) \
SP_OV_p = 2.0 * (xg - SP_OV_x0) + GOV2 * (1 - SP_OV_D0); \
SP_OV_q = (xg - SP_OV_x0) * (xg - SP_OV_x0) - GOV2 * (SP_OV_x0 - 1.0 + SP_OV_D0); \
SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \
SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \
SP_OV_u = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \
sp = SP_OV_x0 + SP_OV_u; \
end \
sp = -sp; \
end

File diff suppressed because it is too large Load Diff

View File

@ -95,31 +95,31 @@
// values (exp_high), or both (expl), to avoid overflows
// and underflows and retain C-3 continuity
`define expl(x, res) \
if (abs(x) < `se05) begin\
res = exp(x); \
end else begin \
if ((x) < -`se05) begin\
res = `ke05 / `P3(-`se05 - (x)); \
end else begin\
res = `ke05inv * `P3((x) - `se05); \
end \
end
if (abs(x) < `se05) begin\
res = exp(x); \
end else begin \
if ((x) < -`se05) begin\
res = `ke05 / `P3(-`se05 - (x)); \
end else begin\
res = `ke05inv * `P3((x) - `se05); \
end \
end
`define expl_low(x, res) \
if ((x) > -`se05) begin\
res = exp(x); \
end else begin\
res = `ke05 / `P3(-`se05 - (x)); \
end
if ((x) > -`se05) begin\
res = exp(x); \
end else begin\
res = `ke05 / `P3(-`se05 - (x)); \
end
`define expl_high(x, res) \
if ((x) < `se05) begin\
res = exp(x); \
end else begin \
res = `ke05inv * `P3((x) - `se05); \
end
if ((x) < `se05) begin\
res = exp(x); \
end else begin \
res = `ke05inv * `P3((x) - `se05); \
end
`define swap(a, b) \
temp = a; \
a = b; \
b = temp;
temp = a; \
a = b; \
b = temp;