white spaces, formatting and verilog-a conformity
This commit is contained in:
parent
660a1f2cbc
commit
9b94674b28
|
|
@ -189,7 +189,7 @@
|
||||||
|
|
||||||
`define BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, SRCFLAG, Rend) \
|
`define BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, SRCFLAG, Rend) \
|
||||||
if (SRCFLAG == 1) begin \
|
if (SRCFLAG == 1) begin \
|
||||||
case(rgeo) \
|
case (rgeo) \
|
||||||
1, 2, 5: begin \
|
1, 2, 5: begin \
|
||||||
if (nuEnd == 0.0) begin \
|
if (nuEnd == 0.0) begin \
|
||||||
Rend = 0.0; \
|
Rend = 0.0; \
|
||||||
|
|
@ -213,7 +213,7 @@
|
||||||
end \
|
end \
|
||||||
endcase \
|
endcase \
|
||||||
end else begin \
|
end else begin \
|
||||||
case(rgeo) \
|
case (rgeo) \
|
||||||
1, 3, 7: begin \
|
1, 3, 7: begin \
|
||||||
if (nuEnd == 0.0) begin \
|
if (nuEnd == 0.0) begin \
|
||||||
Rend = 0.0; \
|
Rend = 0.0; \
|
||||||
|
|
@ -242,7 +242,7 @@
|
||||||
`define BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, SRCFLAG, Rend) \
|
`define BSIMBULKRdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEnd, rgeo, SRCFLAG, Rend) \
|
||||||
begin \
|
begin \
|
||||||
if (SRCFLAG == 1) begin \
|
if (SRCFLAG == 1) begin \
|
||||||
case(rgeo) \
|
case (rgeo) \
|
||||||
1, 2, 5: begin \
|
1, 2, 5: begin \
|
||||||
if (nuEnd == 0.0) begin \
|
if (nuEnd == 0.0) begin \
|
||||||
Rend = 0.0; \
|
Rend = 0.0; \
|
||||||
|
|
@ -267,7 +267,7 @@
|
||||||
end \
|
end \
|
||||||
endcase \
|
endcase \
|
||||||
end else begin \
|
end else begin \
|
||||||
case(rgeo) \
|
case (rgeo) \
|
||||||
1, 3, 7: begin \
|
1, 3, 7: begin \
|
||||||
if (nuEnd == 0.0) begin \
|
if (nuEnd == 0.0) begin \
|
||||||
Rend = 0.0; \
|
Rend = 0.0; \
|
||||||
|
|
@ -314,7 +314,7 @@
|
||||||
end \
|
end \
|
||||||
end \
|
end \
|
||||||
end \
|
end \
|
||||||
case(geo) \
|
case (geo) \
|
||||||
0: begin \
|
0: begin \
|
||||||
if (SRCFLAG == 1) begin \
|
if (SRCFLAG == 1) begin \
|
||||||
`BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
|
`BSIMBULKRdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, \
|
||||||
|
|
@ -457,7 +457,7 @@
|
||||||
ADsha = DMCG * Weffcj;\
|
ADsha = DMCG * Weffcj;\
|
||||||
ASmer = DMDG * Weffcj; \
|
ASmer = DMDG * Weffcj; \
|
||||||
ADmer = DMDG * Weffcj; \
|
ADmer = DMDG * Weffcj; \
|
||||||
case(geo) \
|
case (geo) \
|
||||||
0: begin \
|
0: begin \
|
||||||
Ps = nuEndS * PSiso + nuIntS * PSsha;\
|
Ps = nuEndS * PSiso + nuIntS * PSsha;\
|
||||||
Pd = nuEndD * PDiso + nuIntD * PDsha;\
|
Pd = nuEndD * PDiso + nuIntD * PDsha;\
|
||||||
|
|
@ -2770,7 +2770,7 @@ analog begin
|
||||||
end
|
end
|
||||||
if (ASYMMOD != 0) begin
|
if (ASYMMOD != 0) begin
|
||||||
VSATR_t = VSATR_i * pow(TRatio, -AT_i);
|
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);
|
$strobe("Warning: VSATR(%f) = %e is less than 100, setting it to 100.", DevTemp, VSATR_t);
|
||||||
VSATR_t = 100.0;
|
VSATR_t = 100.0;
|
||||||
end
|
end
|
||||||
|
|
@ -3335,7 +3335,7 @@ analog begin
|
||||||
|
|
||||||
// Channel length modulation, Ref: BSIM4 Model
|
// Channel length modulation, Ref: BSIM4 Model
|
||||||
Vasat = Vdssat + EsatL;
|
Vasat = Vdssat + EsatL;
|
||||||
if(PCLM_a != 0.0) begin
|
if (PCLM_a != 0.0) begin
|
||||||
if (PCLMG < 0.0) begin
|
if (PCLMG < 0.0) begin
|
||||||
T1 = PCLM_a / (1.0 - PCLMG * qia / EsatL) / Fp;
|
T1 = PCLM_a / (1.0 - PCLMG * qia / EsatL) / Fp;
|
||||||
end else begin
|
end else begin
|
||||||
|
|
@ -3792,7 +3792,7 @@ analog begin
|
||||||
T0d = (Nl + Nstar) * (Nl + Nstar);
|
T0d = (Nl + Nstar) * (Nl + Nstar);
|
||||||
T0e = NOIA * `q * Vt;
|
T0e = NOIA * `q * Vt;
|
||||||
if (FNOIMOD == 1) begin
|
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);
|
$strobe("Warning: LINTNOI = %e is too large - Leff for noise is negative. Re-setting LINTNOI = 0.", LINTNOI);
|
||||||
LINTNOI_i = 0.0;
|
LINTNOI_i = 0.0;
|
||||||
end else begin
|
end else begin
|
||||||
|
|
|
||||||
|
|
@ -81,31 +81,31 @@
|
||||||
|
|
||||||
|
|
||||||
module bsimcmg(d, g, s, e, t);
|
module bsimcmg(d, g, s, e, t);
|
||||||
inout g, d, s, e, t;
|
inout g, d, s, e, t;
|
||||||
electrical g, d, s, e;
|
electrical g, d, s, e;
|
||||||
electrical si, di;
|
electrical si, di;
|
||||||
|
|
||||||
`ifdef __NQSMOD1__
|
`ifdef __NQSMOD1__
|
||||||
electrical gi;
|
electrical gi;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
`ifdef __NQSMOD2__
|
`ifdef __NQSMOD2__
|
||||||
electrical q;
|
electrical q;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
`ifdef __RGATEMOD__
|
`ifdef __RGATEMOD__
|
||||||
electrical ge;
|
electrical ge;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
`ifdef __SHMOD__
|
`ifdef __SHMOD__
|
||||||
thermal t;
|
thermal t;
|
||||||
branch (t) rth_branch;
|
branch (t) rth_branch;
|
||||||
branch (t) ith_branch;
|
branch (t) ith_branch;
|
||||||
`else
|
`else
|
||||||
thermal t;
|
thermal t;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
// Internal node controlled by Correlated Thermal Noise Switch
|
// Internal node controlled by Correlated Thermal Noise Switch
|
||||||
`ifdef __TNOIMOD1__
|
`ifdef __TNOIMOD1__
|
||||||
electrical N;
|
electrical N;
|
||||||
`endif
|
`endif
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -64,53 +64,53 @@
|
||||||
real x42_TT2, x42_Cfgsat, x42_delta, Cfg;
|
real x42_TT2, x42_Cfgsat, x42_delta, Cfg;
|
||||||
|
|
||||||
`define Cfringe_2d(block_name, Hg, Hc, Lext, Wfin, Lc, Lg, Tox, Cf1, Cgg) \
|
`define Cfringe_2d(block_name, Hg, Hc, Lext, Wfin, Lc, Lg, Tox, Cf1, Cgg) \
|
||||||
begin : block_name \
|
begin : block_name \
|
||||||
x42_Hr = 2.3 + 0.2 * ((Hg) + (Tox)) / (Hc); \
|
x42_Hr = 2.3 + 0.2 * ((Hg) + (Tox)) / (Hc); \
|
||||||
x42_Lr = 1.05; \
|
x42_Lr = 1.05; \
|
||||||
x42_Hgdelta = abs((Hg) + (Tox) - (Hc)); \
|
x42_Hgdelta = abs((Hg) + (Tox) - (Hc)); \
|
||||||
x42_Lmax = (Lext) * x42_Lr; \
|
x42_Lmax = (Lext) * x42_Lr; \
|
||||||
\
|
\
|
||||||
x42_y = min((Hc), (Hg) + (Tox)); \
|
x42_y = min((Hc), (Hg) + (Tox)); \
|
||||||
x42_x = (Lext) / (x42_Hr + 1.0); \
|
x42_x = (Lext) / (x42_Hr + 1.0); \
|
||||||
x42_Cnon = 1.7e12; \
|
x42_Cnon = 1.7e12; \
|
||||||
x42_CcgSat = epssp * (x42_y - x42_x) / (Lext); \
|
x42_CcgSat = epssp * (x42_y - x42_x) / (Lext); \
|
||||||
x42_TT1 = x42_Cnon * x42_CcgSat; \
|
x42_TT1 = x42_Cnon * x42_CcgSat; \
|
||||||
if(x42_TT1 > `EXPL_THRESHOLD) \
|
if (x42_TT1 > `EXPL_THRESHOLD) \
|
||||||
x42_Ccg1 = x42_CcgSat; \
|
x42_Ccg1 = x42_CcgSat; \
|
||||||
else \
|
else \
|
||||||
x42_Ccg1 = 1.0 / x42_Cnon * ln(1.0 + lexp(x42_TT1)); \
|
x42_Ccg1 = 1.0 / x42_Cnon * ln(1.0 + lexp(x42_TT1)); \
|
||||||
\
|
\
|
||||||
x42_r1cf = 0.5 * \
|
x42_r1cf = 0.5 * \
|
||||||
min((Hc) / ((Hg) + (Tox)), ((Hg) + (Tox)) / (Hc)); \
|
min((Hc) / ((Hg) + (Tox)), ((Hg) + (Tox)) / (Hc)); \
|
||||||
x42_Rcf = x42_Hgdelta * x42_r1cf; \
|
x42_Rcf = x42_Hgdelta * x42_r1cf; \
|
||||||
x42_Ccg2 = epssp * 2 / `M_PI * \
|
x42_Ccg2 = epssp * 2 / `M_PI * \
|
||||||
ln(((Lext) + 0.5 * `M_PI * x42_Rcf) / (Lext)); \
|
ln(((Lext) + 0.5 * `M_PI * x42_Rcf) / (Lext)); \
|
||||||
\
|
\
|
||||||
x42_Ccg = (Wfin) * (x42_Ccg1 + x42_Ccg2); \
|
x42_Ccg = (Wfin) * (x42_Ccg1 + x42_Ccg2); \
|
||||||
\
|
\
|
||||||
x42_x = x42_Lmax / (Hg); \
|
x42_x = x42_Lmax / (Hg); \
|
||||||
x42_C1 = 4.0 / (sqrt(2.0 * (x42_x + 1)) * `M_PI); \
|
x42_C1 = 4.0 / (sqrt(2.0 * (x42_x + 1)) * `M_PI); \
|
||||||
x42_C2 = sqrt((Tox) * (Tox) + 2.0 * (Hg) * (Tox) + \
|
x42_C2 = sqrt((Tox) * (Tox) + 2.0 * (Hg) * (Tox) + \
|
||||||
(Hg) * (Hg) * (x42_x + 1)) * sqrt(x42_x + 1) + (Tox) + \
|
(Hg) * (Hg) * (x42_x + 1)) * sqrt(x42_x + 1) + (Tox) + \
|
||||||
(Hg) * x42_x + (Hg); \
|
(Hg) * x42_x + (Hg); \
|
||||||
x42_C3 = (Tox) * sqrt((x42_x + 1) * (x42_x + 4)) + Tox * (x42_x + 2); \
|
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_Cfglog = epssp * (x42_C1 * ln(x42_C2 / x42_C3) + 12.27); \
|
||||||
\
|
\
|
||||||
x42_dcf = x42_Hr * x42_Lr; \
|
x42_dcf = x42_Hr * x42_Lr; \
|
||||||
x42_TT0 = sqrt(x42_dcf * x42_dcf + 1.0); \
|
x42_TT0 = sqrt(x42_dcf * x42_dcf + 1.0); \
|
||||||
x42_TT1 = sqrt((x42_dcf * x42_dcf + 1) * ((x42_dcf * (Tox)) * (x42_dcf * (Tox)) + \
|
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)) \
|
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_dcf * (Tox) + x42_dcf * x42_dcf * x42_Lmax + x42_Lmax; \
|
||||||
x42_TT2 = (x42_TT0 + 1.0) * (x42_dcf * (Tox)); \
|
x42_TT2 = (x42_TT0 + 1.0) * (x42_dcf * (Tox)); \
|
||||||
x42_Cfgsat = 2.0 * epssp * sqrt(2) / `M_PI * (Cf1) * x42_dcf \
|
x42_Cfgsat = 2.0 * epssp * sqrt(2) / `M_PI * (Cf1) * x42_dcf \
|
||||||
/ x42_TT0 * ln(x42_TT1 / x42_TT2); \
|
/ x42_TT0 * ln(x42_TT1 / x42_TT2); \
|
||||||
\
|
\
|
||||||
x42_delta = 1.2e-12; \
|
x42_delta = 1.2e-12; \
|
||||||
x42_TT1 = x42_Cfgsat - x42_Cfglog - x42_delta; \
|
x42_TT1 = x42_Cfgsat - x42_Cfglog - x42_delta; \
|
||||||
Cfg = (Wfin) * (x42_Cfgsat - 0.5 * (x42_TT1 + \
|
Cfg = (Wfin) * (x42_Cfgsat - 0.5 * (x42_TT1 + \
|
||||||
sqrt(x42_TT1 * x42_TT1 + 4 * x42_delta * x42_Cfgsat))); \
|
sqrt(x42_TT1 * x42_TT1 + 4 * x42_delta * x42_Cfgsat))); \
|
||||||
Cgg = x42_Ccg + Cfg; \
|
Cgg = x42_Ccg + Cfg; \
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -177,9 +177,9 @@
|
||||||
`define IPIoz(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
|
`ifdef EXPLICIT_MFACTOR
|
||||||
`define IPM (*units="" , type="instance", desc="multiplicity factor"*) parameter real m=1.0 from(0.0:inf) ;
|
`define IPM (*units="" , type="instance", desc="multiplicity factor"*) parameter real m=1.0 from(0.0:inf) ;
|
||||||
`define MFACTOR_USE m
|
`define MFACTOR_USE m
|
||||||
`else //
|
`else //
|
||||||
`define IPM
|
`define IPM
|
||||||
`define MFACTOR_USE 1.0
|
`define MFACTOR_USE 1.0
|
||||||
`endif
|
`endif
|
||||||
|
|
|
||||||
|
|
@ -81,98 +81,98 @@ module ekv (d,g,s,b);
|
||||||
// Instance parameters
|
// Instance parameters
|
||||||
|
|
||||||
// - intrinsic model
|
// - intrinsic model
|
||||||
parameter real l=10e-6 from [0:inf) `P(type="instance" info="Drawn length [m]" units="m");
|
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" info="Drawn width [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" info="Parallel multiplier" 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" info="Series 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" info="Difference sim. temp and device temp" units="C");
|
parameter real dtemp = 0.0 from (-inf:inf) `P(type="instance" desc="Difference sim. temp and device temp" units="C");
|
||||||
|
|
||||||
// - external parasitics
|
// - external parasitics
|
||||||
parameter real ad=0.0 from [0:inf) `P(type="instance" info="Drain area" units="m^2");
|
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" info="Source 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" info="Drain perimeter" units="m");
|
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" info="Source 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" info="Drain no. squares");
|
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" info="Source no. squares");
|
parameter real nrs=0.0 from [0:inf) `P(type="instance" desc="Source no. squares");
|
||||||
|
|
||||||
// Model parameters
|
// Model parameters
|
||||||
|
|
||||||
parameter integer nmos=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(info="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 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 tnom=27.0 from [-273.15:inf) `P(desc="Nominal temperature" units="C");
|
||||||
parameter real imax=1.0 from [0:inf) `P(info="Maximum forward junction current before linearization" units="A");
|
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)
|
// - intrinsic model (optional, section 4.2.1)
|
||||||
parameter real tox=0.0 from [0:inf) `P(info="Oxide thickness" units="m");
|
parameter real tox=0.0 from [0:inf) `P(desc="Oxide thickness" units="m");
|
||||||
parameter real nsub=0.0 from [0:inf) `P(info="Channel doping" units="cm^-3");
|
parameter real nsub=0.0 from [0:inf) `P(desc="Channel doping" units="cm^-3");
|
||||||
parameter real vfb=-1.0 from (-inf:inf) `P(info="Flat-band voltage" units="V");
|
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 uo=0.0 from [0:inf) `P(desc="Low-field mobility" units="cm^2/Vs");
|
||||||
parameter real vmax=0.0 from [0:inf) `P(info="Saturation velocity" units="m/s");
|
parameter real vmax=0.0 from [0:inf) `P(desc="Saturation velocity" units="m/s");
|
||||||
parameter real theta=0.0 from [0:inf) `P(info="Mobility reduction coefficient" units="V^-1");
|
parameter real theta=0.0 from [0:inf) `P(desc="Mobility reduction coefficient" units="V^-1");
|
||||||
|
|
||||||
// - intrinsic model (process related, section 4.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 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(info="Junction depth" units="m");
|
parameter real xj=0.1e-6 from [1n:inf) `P(desc="Junction depth" units="m");
|
||||||
parameter real dl=0.0 from (-inf:inf) `P(info="Length correction" 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(info="Width correction" units="m");
|
parameter real dw=0.0 from (-inf:inf) `P(desc="Width correction" units="m");
|
||||||
|
|
||||||
// - intrinsic model (basic, section 4.2)
|
// - 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 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(info="Bulk Fermi potential (*2)" units="V");
|
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(info="Long-channel threshold voltage" 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(info="Transconductance parameter" units="A/V^2");
|
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(info="Longitudinal critical field" units="V/m");
|
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(info="Mobility reduction coefficient" 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)
|
// - 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 lambda=0.5 from [0:inf) `P(desc="Depletion length coefficient (CLM)");
|
||||||
parameter real weta=0.25 from (-inf:inf) `P(info="Narrow-channel effect coefficient");
|
parameter real weta=0.25 from (-inf:inf) `P(desc="Narrow-channel effect coefficient");
|
||||||
parameter real leta=0.1 from (-inf:inf) `P(info="Short-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)
|
// - 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 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(info="RSCE characteristic length" units="m");
|
parameter real lk=0.29e-6 from [10n:inf) `P(desc="RSCE characteristic length" units="m");
|
||||||
|
|
||||||
// - intrinsic model (impact ionization, section 4.5)
|
// - 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 iba=0.0 from (-inf:inf) `P(desc="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 ibb=3e8 from [1e8:inf) `P(desc="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 ibn=1.0 from [0.1:inf) `P(desc="Saturation voltage factor for impact ionization");
|
||||||
|
|
||||||
// - intrinsic model (temperature, section 4.6)
|
// - intrinsic model (temperature, section 4.6)
|
||||||
parameter real tcv=1e-3 from (-inf:inf) `P(info="Threshold voltage TC" units="V/deg");
|
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(info="Mobility temperature exponent");
|
parameter real bex=-1.5 from (-inf:inf) `P(desc="Mobility temperature exponent");
|
||||||
parameter real ucex=0.8 from (-inf:inf) `P(info="Longitudinal critical field 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(info="Temperature coefficient for ibb" units="K^-1");
|
parameter real ibbt=9e-4 from (-inf:inf) `P(desc="Temperature coefficient for ibb" units="K^-1");
|
||||||
|
|
||||||
// - intrinsic model (matching, section 4.7)
|
// - 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 avto=0.0 from (-inf:inf) `P(desc="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 akp=0.0 from (-inf:inf) `P(desc="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 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)
|
// - intrinsic model (flicker noise, section 4.8)
|
||||||
parameter real kf=0.0 from [0:inf) `P(info="Flicker noise coefficient");
|
parameter real kf=0.0 from [0:inf) `P(desc="Flicker noise coefficient");
|
||||||
parameter real af=1.0 from (-inf:inf) `P(info="Flicker noise exponent");
|
parameter real af=1.0 from (-inf:inf) `P(desc="Flicker noise exponent");
|
||||||
|
|
||||||
// - external parasitic parameters
|
// - external parasitic parameters
|
||||||
parameter real hdif=0.0 from [0:inf) `P(info="S/D diffusion length (/2)" units="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(info="S/D sheet resistance" units="Ohm");
|
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(info="S/D junction saturation current density" units="A/m^2");
|
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(info="S/D junction sidewall saturation current density" units="A/m");
|
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(info="S/D diode saturation current temperature exponent");
|
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(info="S/D diode emission coefficient");
|
parameter real n=1 from [0.5:10] `P(desc="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 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(info="S/D zero-bias junction capacitance per perimeter" units="F/m");
|
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(info="S/D bottom junction builtin potential" units="V");
|
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(info="S/D sidewall 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(info="S/D bottom junction grading coefficient");
|
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(info="S/D sidewall 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(info="S/D bottom junction forward-bias threshold");
|
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(info="S/D sidewall 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(info="Gate-source overlap capacitance per width" units="F/m");
|
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(info="Gate-drain 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(info="Gate-bulk overlap capacitance per length" 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
|
// Declaration of variables
|
||||||
integer mode, MOStype;
|
integer mode, MOStype;
|
||||||
|
|
@ -193,6 +193,8 @@ module ekv (d,g,s,b);
|
||||||
|
|
||||||
analog begin
|
analog begin
|
||||||
|
|
||||||
|
MOStype = 1;
|
||||||
|
|
||||||
gmin = $simparam("gmin");
|
gmin = $simparam("gmin");
|
||||||
|
|
||||||
`INITIAL_MODEL // Model Initialization
|
`INITIAL_MODEL // Model Initialization
|
||||||
|
|
@ -204,8 +206,7 @@ module ekv (d,g,s,b);
|
||||||
end else begin
|
end else begin
|
||||||
MOStype = (`PGIVEN(type)) ? type : `NMOS;
|
MOStype = (`PGIVEN(type)) ? type : `NMOS;
|
||||||
end
|
end
|
||||||
|
//$strobe("MOStype %d", MOStype);
|
||||||
//$strobe("MOStype %d", MOStype);
|
|
||||||
|
|
||||||
if (`PGIVEN(cox)) begin
|
if (`PGIVEN(cox)) begin
|
||||||
cox_p = cox;
|
cox_p = cox;
|
||||||
|
|
|
||||||
|
|
@ -9,25 +9,25 @@
|
||||||
|
|
||||||
module bjt504tva (c, b, e, s, dt);
|
module bjt504tva (c, b, e, s, dt);
|
||||||
|
|
||||||
// External ports
|
// External ports
|
||||||
inout c, b, e, s, dt;
|
inout c, b, e, s, dt;
|
||||||
|
|
||||||
electrical c `P(info="external collector node");
|
electrical c `P(desc="external collector node");
|
||||||
electrical b `P(info="external base node");
|
electrical b `P(desc="external base node");
|
||||||
electrical e `P(info="external emitter node");
|
electrical e `P(desc="external emitter node");
|
||||||
electrical s `P(info="external substrate node");
|
electrical s `P(desc="external substrate node");
|
||||||
electrical dt `P(info="external thermal node");
|
electrical dt `P(desc="external thermal node");
|
||||||
|
|
||||||
// Internal nodes
|
// Internal nodes
|
||||||
electrical c1 `P(info="internal collector node 1");
|
electrical c1 `P(desc="internal collector node 1");
|
||||||
electrical e1 `P(info="internal emitter node");
|
electrical e1 `P(desc="internal emitter node");
|
||||||
electrical b1 `P(info="internal base node 1");
|
electrical b1 `P(desc="internal base node 1");
|
||||||
electrical b2 `P(info="internal base node 2");
|
electrical b2 `P(desc="internal base node 2");
|
||||||
electrical c2 `P(info="internal collector node 2");
|
electrical c2 `P(desc="internal collector node 2");
|
||||||
electrical c3 `P(info="internal collector node 3");
|
electrical c3 `P(desc="internal collector node 3");
|
||||||
electrical c4 `P(info="internal collector node 4");
|
electrical c4 `P(desc="internal collector node 4");
|
||||||
// For correlated noise implementation
|
// For correlated noise implementation
|
||||||
electrical noi `P(info="internal noise node");
|
electrical noi `P(desc="internal noise node");
|
||||||
|
|
||||||
`include "parameters.inc"
|
`include "parameters.inc"
|
||||||
`include "variables.inc"
|
`include "variables.inc"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
// Evaluate model equations
|
// Evaluate model equations
|
||||||
|
|
||||||
begin // Currents and charges
|
begin // Currents and charges
|
||||||
// Nodal biases
|
// Nodal biases
|
||||||
|
|
||||||
Vb2c1 = TYPE * V(b2, c1);
|
Vb2c1 = TYPE * V(b2, c1);
|
||||||
Vb2c2 = TYPE * V(b2, c2);
|
Vb2c2 = TYPE * V(b2, c2);
|
||||||
|
|
@ -22,7 +22,7 @@ begin // Currents and charges
|
||||||
Vbe = TYPE * V(b, e);
|
Vbe = TYPE * V(b, e);
|
||||||
Vbc = TYPE * V(b, c);
|
Vbc = TYPE * V(b, c);
|
||||||
|
|
||||||
/* RvdT, 03-12-2007, voltage differences
|
/* RvdT, 03-12-2007, voltage differences
|
||||||
associated with distributed parasitic collector.
|
associated with distributed parasitic collector.
|
||||||
Evaluated taking values of resistances into account:
|
Evaluated taking values of resistances into account:
|
||||||
in case of vanishing resistance corresponding node
|
in case of vanishing resistance corresponding node
|
||||||
|
|
@ -65,7 +65,7 @@ begin // Currents and charges
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
|
|
||||||
// Exponential bias terms
|
// Exponential bias terms
|
||||||
|
|
||||||
`expLin(eVb2c2,Vb2c2 * VtINV)
|
`expLin(eVb2c2,Vb2c2 * VtINV)
|
||||||
`expLin(eVb2e1,Vb2e1 * VtINV)
|
`expLin(eVb2e1,Vb2e1 * VtINV)
|
||||||
|
|
@ -75,7 +75,7 @@ begin // Currents and charges
|
||||||
`expLin(eVbc3,Vbc3 * VtINV)
|
`expLin(eVbc3,Vbc3 * VtINV)
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
`expLin(eVsc1,Vsc1 * VtINV)
|
`expLin(eVsc1,Vsc1 * VtINV)
|
||||||
// RvdT MXT504.10, new: eVsc3, eVsc4
|
// RvdT MXT504.10, new: eVsc3, eVsc4
|
||||||
`expLin(eVsc3,Vsc3 * VtINV)
|
`expLin(eVsc3,Vsc3 * VtINV)
|
||||||
`expLin(eVsc4,Vsc4 * VtINV)
|
`expLin(eVsc4,Vsc4 * VtINV)
|
||||||
`endif
|
`endif
|
||||||
|
|
@ -85,9 +85,9 @@ begin // Currents and charges
|
||||||
`expLin(eVb2c2VDC,(Vb2c2 - VDC_T) * VtINV)
|
`expLin(eVb2c2VDC,(Vb2c2 - VDC_T) * VtINV)
|
||||||
`expLin(eVb2c1VDC,(Vb2c1 - VDC_T) * VtINV)
|
`expLin(eVb2c1VDC,(Vb2c1 - VDC_T) * VtINV)
|
||||||
|
|
||||||
// Governing equations
|
// Governing equations
|
||||||
|
|
||||||
// Epilayer model
|
// Epilayer model
|
||||||
|
|
||||||
K0 = sqrt(1.0 + 4.0 * eVb2c2VDC);
|
K0 = sqrt(1.0 + 4.0 * eVb2c2VDC);
|
||||||
Kw = sqrt(1.0 + 4.0 * eVb2c1VDC);
|
Kw = sqrt(1.0 + 4.0 * eVb2c1VDC);
|
||||||
|
|
@ -124,7 +124,7 @@ begin // Currents and charges
|
||||||
p0star = gp02 + sqrt(sqr_arg);
|
p0star = gp02 + sqrt(sqr_arg);
|
||||||
else
|
else
|
||||||
p0star = gp0_help / (sqrt(sqr_arg) - gp02);
|
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);
|
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) +
|
Vte = VDE_T / (1.0 - PE) * (1.0 - E0BE) +
|
||||||
`AJE * (Vb2e1 - Vje);
|
`AJE * (Vb2e1 - Vje);
|
||||||
|
|
||||||
// Effective collector junction capacitance bias
|
// Effective collector junction capacitance bias
|
||||||
|
|
||||||
Vjunc = Vb2c1 + Vxi0;
|
Vjunc = Vb2c1 + Vxi0;
|
||||||
bjc = (`AJC - XP_T) / (1.0 - XP_T);
|
bjc = (`AJC - XP_T) / (1.0 - XP_T);
|
||||||
|
|
@ -180,7 +180,7 @@ begin // Currents and charges
|
||||||
fI * bjc * (Vjunc - Vjc);
|
fI * bjc * (Vjunc - Vjc);
|
||||||
Vtc = (1.0 - XP_T) * Vcv + XP_T * Vb2c1;
|
Vtc = (1.0 - XP_T) * Vcv + XP_T * Vb2c1;
|
||||||
|
|
||||||
// Transfer current
|
// Transfer current
|
||||||
|
|
||||||
If0 = 4.0 * IS_TM / IK_TM;
|
If0 = 4.0 * IS_TM / IK_TM;
|
||||||
f1 = If0 * eVb2e1;
|
f1 = If0 * eVb2e1;
|
||||||
|
|
@ -222,16 +222,16 @@ begin // Currents and charges
|
||||||
(tmpExp + exp(0.5 * VLR * VtINV)) +
|
(tmpExp + exp(0.5 * VLR * VtINV)) +
|
||||||
my_gmin * Vb1c4;
|
my_gmin * Vb1c4;
|
||||||
|
|
||||||
// begin RvdT, November 2008, MXT504.8_alpha
|
// begin RvdT, November 2008, MXT504.8_alpha
|
||||||
|
|
||||||
// Base-emitter tunneling current
|
// Base-emitter tunneling current
|
||||||
// max E-field E0BE calculated in BE depletion charge model:
|
// max E-field E0BE calculated in BE depletion charge model:
|
||||||
|
|
||||||
if (IZEB > 0.0 && NZEB > 0.0 && Vb2e1 < 0)
|
if (IZEB > 0.0 && NZEB > 0.0 && Vb2e1 < 0)
|
||||||
begin
|
begin
|
||||||
`expLin(eZEB, nZEB_T * (1 - (pow2_2mPE/(2.0*E0BE))))
|
`expLin(eZEB, nZEB_T * (1 - (pow2_2mPE/(2.0*E0BE))))
|
||||||
// Force all derivatives at Vb2e1=0 to zero by using in DZEB a
|
// Force all derivatives at Vb2e1=0 to zero by using in DZEB a
|
||||||
// modified dE0BE expression for E0BE:
|
// modified dE0BE expression for E0BE:
|
||||||
x = Vb2e1 * inv_VDE_T ;
|
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 ;
|
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 ))
|
`expLin(edZEB, Vb2e1 * pow2_2mPE * nZEB_T / (VGZEB_T * dE0BE ))
|
||||||
|
|
@ -244,25 +244,25 @@ begin // Currents and charges
|
||||||
Izteb = 0 ;
|
Izteb = 0 ;
|
||||||
end
|
end
|
||||||
|
|
||||||
// end RvdT, November 2008, MXT504.8_alpha
|
// end RvdT, November 2008, MXT504.8_alpha
|
||||||
|
|
||||||
// Iex, Isub (XIex, XIsub)
|
// Iex, Isub (XIex, XIsub)
|
||||||
g1 = If0 * eVb1c4;
|
g1 = If0 * eVb1c4;
|
||||||
g2 = 4.0 * eVb1c4VDC;
|
g2 = 4.0 * eVb1c4VDC;
|
||||||
|
|
||||||
// nBex until and including MXT 504.9:
|
// nBex until and including MXT 504.9:
|
||||||
// nBex = g1 / (1.0 + sqrt(1.0 + g1));
|
// nBex = g1 / (1.0 + sqrt(1.0 + g1));
|
||||||
// nBex since MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram
|
// nBex since MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram
|
||||||
nBex = (g1 - If0) / (1.0 + sqrt(1.0 + g1));
|
nBex = (g1 - If0) / (1.0 + sqrt(1.0 + g1));
|
||||||
pWex = g2 / (1.0 + sqrt(1.0 + g2));
|
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 = (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) ;
|
Iex = IK_TM * nBex / (2.0 * BRI_T) ;
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
// RvdT MXT504.10, new term: eVsc4
|
// RvdT MXT504.10, new term: eVsc4
|
||||||
if (EXSUB == 1.0)
|
if (EXSUB == 1.0)
|
||||||
Isub = 2.0 * ISS_TM * (eVb1c4 - eVsc4) /
|
Isub = 2.0 * ISS_TM * (eVb1c4 - eVsc4) /
|
||||||
(1.0 + sqrt(1.0 + 4.0 * (IS_TM / IKS_TM) * eVb1c4));
|
(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) /
|
Isub = 2.0 * ISS_TM * (eVb1c4 - 1.0) /
|
||||||
(1.0 + sqrt(1.0 + 4.0 * (IS_TM / IKS_TM) * eVb1c4));
|
(1.0 + sqrt(1.0 + 4.0 * (IS_TM / IKS_TM) * eVb1c4));
|
||||||
|
|
||||||
// until504.8: Isf = ISS_TM * (eVsc1 - 1.0);
|
// until504.8: Isf = ISS_TM * (eVsc1 - 1.0);
|
||||||
// New 504.9:
|
// New 504.9:
|
||||||
|
|
||||||
if (ICSS < 0.0)
|
if (ICSS < 0.0)
|
||||||
// this clause is to implement backwards compatibility
|
// this clause is to implement backwards compatibility
|
||||||
begin
|
begin
|
||||||
Isf = ISS_TM * (eVsc1 - 1.0);
|
Isf = ISS_TM * (eVsc1 - 1.0);
|
||||||
end
|
end
|
||||||
|
|
@ -283,7 +283,7 @@ begin // Currents and charges
|
||||||
Isf = ICSS_TM * (eVsc1 - 1.0);
|
Isf = ICSS_TM * (eVsc1 - 1.0);
|
||||||
end
|
end
|
||||||
|
|
||||||
// End: New 504.9.
|
// End: New 504.9.
|
||||||
|
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
|
|
@ -293,7 +293,7 @@ begin // Currents and charges
|
||||||
XIsub = 0.0;
|
XIsub = 0.0;
|
||||||
`endif
|
`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)
|
if (EXMOD == 1 || EXMOD == 2)
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
|
@ -304,18 +304,18 @@ begin // Currents and charges
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
Xg1 = If0 * eVbc3;
|
Xg1 = If0 * eVbc3;
|
||||||
// XnBex until and including MXT 504.9:
|
// XnBex until and including MXT 504.9:
|
||||||
// XnBex = Xg1 / (1.0 + sqrt(1.0 + Xg1));
|
// XnBex = Xg1 / (1.0 + sqrt(1.0 + Xg1));
|
||||||
// XnBex in MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram:
|
// XnBex in MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram:
|
||||||
XnBex = (Xg1 - If0) / (1.0 + sqrt(1.0 + Xg1));
|
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 = 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;
|
XIMex = XEXT * 0.5 * IK_TM * XnBex / BRI_T;
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
// RvdT MXT504.10, new term: eVsc3
|
// RvdT MXT504.10, new term: eVsc3
|
||||||
if (EXSUB == 1.0)
|
if (EXSUB == 1.0)
|
||||||
XIMsub = XEXT * 2.0 * ISS_TM * (eVbc3 - eVsc3) /
|
XIMsub = XEXT * 2.0 * ISS_TM * (eVbc3 - eVsc3) /
|
||||||
(1.0 + sqrt(1.0 + 4.0 * IS_T / IKS_T * eVbc3));
|
(1.0 + sqrt(1.0 + 4.0 * IS_T / IKS_T * eVbc3));
|
||||||
|
|
@ -346,7 +346,7 @@ begin // Currents and charges
|
||||||
Fex = 1.0 ;
|
Fex = 1.0 ;
|
||||||
end
|
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;
|
XIex = Fex * XIMex;
|
||||||
|
|
||||||
|
|
@ -360,7 +360,7 @@ begin // Currents and charges
|
||||||
XnBex = 0 ;
|
XnBex = 0 ;
|
||||||
end
|
end
|
||||||
|
|
||||||
// Variable base resistance
|
// Variable base resistance
|
||||||
|
|
||||||
q0Q = 1.0 + Vte / VER_T + Vtc / VEF_T;
|
q0Q = 1.0 + Vte / VER_T + Vtc / VEF_T;
|
||||||
`max_hyp0(q1Q, q0Q, 0.1);
|
`max_hyp0(q1Q, q0Q, 0.1);
|
||||||
|
|
@ -369,7 +369,7 @@ begin // Currents and charges
|
||||||
Rb2 = 3.0 * RBV_TM / qBQ;
|
Rb2 = 3.0 * RBV_TM / qBQ;
|
||||||
Ib1b2 = (2.0 * Vt * (eVb1b2 - 1.0) + Vb1b2) / Rb2;
|
Ib1b2 = (2.0 * Vt * (eVb1b2 - 1.0) + Vb1b2) / Rb2;
|
||||||
|
|
||||||
// Weak-avalanche current
|
// Weak-avalanche current
|
||||||
|
|
||||||
Iavl = 0.0;
|
Iavl = 0.0;
|
||||||
Gem = 0.0;
|
Gem = 0.0;
|
||||||
|
|
@ -421,9 +421,9 @@ begin // Currents and charges
|
||||||
Vb2c2star = Vb2c2;
|
Vb2c2star = Vb2c2;
|
||||||
|
|
||||||
`ifdef SELFHEATING
|
`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) +
|
power_dis = In * (Vb2e1 - Vb2c2star) +
|
||||||
Ic1c2 * (Vb2c2star - Vb2c1) -
|
Ic1c2 * (Vb2c2star - Vb2c1) -
|
||||||
|
|
@ -434,8 +434,8 @@ begin // Currents and charges
|
||||||
Vc4c1 * Vc4c1 * GCCin_TM +
|
Vc4c1 * Vc4c1 * GCCin_TM +
|
||||||
Vbb1 * Vbb1 / RBC_TM +
|
Vbb1 * Vbb1 / RBC_TM +
|
||||||
Ib1b2 * Vb1b2 +
|
Ib1b2 * Vb1b2 +
|
||||||
// 504.8: Nov. 2008, RvdT, TU_Delft: Zener current contribution added:
|
// 504.8: Nov. 2008, RvdT, TU_Delft: Zener current contribution added:
|
||||||
// Izteb > 0 for Vb2e1 < 0, hence the minus sign:
|
// Izteb > 0 for Vb2e1 < 0, hence the minus sign:
|
||||||
(Ib1 + Ib2 - Izteb) * Vb2e1 +
|
(Ib1 + Ib2 - Izteb) * Vb2e1 +
|
||||||
Ib1_s * Vb1e1 +
|
Ib1_s * Vb1e1 +
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
|
|
@ -444,193 +444,193 @@ begin // Currents and charges
|
||||||
XIsub * (Vbc3 - Vsc3) +
|
XIsub * (Vbc3 - Vsc3) +
|
||||||
Isf * Vsc1;
|
Isf * Vsc1;
|
||||||
`else
|
`else
|
||||||
(Iex + Ib3) * Vb1c4 + XIex * Vbc3;
|
(Iex + Ib3) * Vb1c4 + XIex * Vbc3;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
|
|
||||||
// Charges
|
// Charges
|
||||||
|
|
||||||
Qte = (1.0 - XCJE) * CJE_TM * Vte;
|
Qte = (1.0 - XCJE) * CJE_TM * Vte;
|
||||||
`min_logexp(Vje_s, Vb1e1, Vfe, a_VDE);
|
`min_logexp(Vje_s, Vb1e1, Vfe, a_VDE);
|
||||||
Qte_s = XCJE * CJE_TM * (VDE_T / (1.0 - PE) *
|
Qte_s = XCJE * CJE_TM * (VDE_T / (1.0 - PE) *
|
||||||
(1.0 - pow(1.0 - Vje_s * inv_VDE_T, 1.0 - PE)) +
|
(1.0 - pow(1.0 - Vje_s * inv_VDE_T, 1.0 - PE)) +
|
||||||
`AJE * (Vb1e1 - Vje_s));
|
`AJE * (Vb1e1 - Vje_s));
|
||||||
|
|
||||||
Qtc = XCJC * CJC_TM * Vtc;
|
Qtc = XCJC * CJC_TM * Vtc;
|
||||||
Qb0 = TAUB_T * IK_TM;
|
Qb0 = TAUB_T * IK_TM;
|
||||||
Qbe_qs = 0.5 * Qb0 * n0 * q1Q;
|
Qbe_qs = 0.5 * Qb0 * n0 * q1Q;
|
||||||
Qbc_qs = 0.5 * Qb0 * nB * q1Q;
|
Qbc_qs = 0.5 * Qb0 * nB * q1Q;
|
||||||
|
|
||||||
a_VDC = 0.1 * VDC_T;
|
a_VDC = 0.1 * VDC_T;
|
||||||
`min_logexp(Vjcex, Vb1c4, Vfc, a_VDC);
|
`min_logexp(Vjcex, Vb1c4, Vfc, a_VDC);
|
||||||
Vtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - Vjcex / VDC_T, 1.0 - PC)) +
|
Vtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - Vjcex / VDC_T, 1.0 - PC)) +
|
||||||
bjc * (Vb1c4 - Vjcex);
|
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);
|
(1.0 - XCJC) * (1.0 - XEXT);
|
||||||
|
|
||||||
`min_logexp(XVjcex, Vbc3, Vfc, a_VDC);
|
`min_logexp(XVjcex, Vbc3, Vfc, a_VDC);
|
||||||
XVtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - XVjcex / VDC_T, 1.0 - PC)) +
|
XVtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - XVjcex / VDC_T, 1.0 - PC)) +
|
||||||
bjc * (Vbc3 - XVjcex);
|
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;
|
(1.0 - XCJC) * XEXT;
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
a_VDS = 0.1 * VDS_T;
|
a_VDS = 0.1 * VDS_T;
|
||||||
Vfs = VDS_T * (1.0 - pow(`AJS , -1.0 / PS));
|
Vfs = VDS_T * (1.0 - pow(`AJS , -1.0 / PS));
|
||||||
`min_logexp(Vjs, Vsc1, Vfs, a_VDS);
|
`min_logexp(Vjs, Vsc1, Vfs, a_VDS);
|
||||||
Qts = CJS_TM * (VDS_T / (1.0 - PS) *
|
Qts = CJS_TM * (VDS_T / (1.0 - PS) *
|
||||||
(1.0 - pow(1.0 - Vjs / VDS_T, 1.0 - PS)) + `AJS * (Vsc1 - Vjs));
|
(1.0 - pow(1.0 - Vjs / VDS_T, 1.0 - PS)) + `AJS * (Vsc1 - Vjs));
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
Qe0 = TAUE_T * IK_TM * pow(IS_TM / IK_TM, 1.0 / MTAU);
|
Qe0 = TAUE_T * IK_TM * pow(IS_TM / IK_TM, 1.0 / MTAU);
|
||||||
`expLin(tmpExp,Vb2e1 / (MTAU * Vt))
|
`expLin(tmpExp,Vb2e1 / (MTAU * Vt))
|
||||||
|
|
||||||
// Niu Q2, 2016, for fixing reverse VBE noise when KE=1, KC=1,
|
// 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
|
// Previous Qe_qs causes unphysically large noise correlation time constant tau_n
|
||||||
Qe_qs = Qe0 * tmpExp;
|
Qe_qs = Qe0 * tmpExp;
|
||||||
|
|
||||||
Qepi0 = 4.0 * TEPI_T * Vt / RCV_TM;
|
Qepi0 = 4.0 * TEPI_T * Vt / RCV_TM;
|
||||||
Qepi = 0.5 * Qepi0 * xi_w * (p0star + pW + 2.0);
|
Qepi = 0.5 * Qepi0 * xi_w * (p0star + pW + 2.0);
|
||||||
|
|
||||||
Qex = TAUR_T * 0.5 * (Qb0 * nBex + Qepi0 * pWex) / (TAUB_T + TEPI_T);
|
Qex = TAUR_T * 0.5 * (Qb0 * nBex + Qepi0 * pWex) / (TAUB_T + TEPI_T);
|
||||||
XQex = 0.0;
|
XQex = 0.0;
|
||||||
|
|
||||||
if (EXMOD == 1) begin
|
if (EXMOD == 1) begin
|
||||||
|
|
||||||
Qex = Qex * (1.0 - XEXT);
|
Qex = Qex * (1.0 - XEXT);
|
||||||
Xg2 = 4.0 * eVbc3VDC;
|
Xg2 = 4.0 * eVbc3VDC;
|
||||||
XpWex = Xg2 / (1.0 + sqrt(1.0 + Xg2));
|
XpWex = Xg2 / (1.0 + sqrt(1.0 + Xg2));
|
||||||
XQex = 0.5 * Fex * XEXT * TAUR_T *
|
XQex = 0.5 * Fex * XEXT * TAUR_T *
|
||||||
(Qb0 * XnBex + Qepi0 * XpWex) / (TAUB_T + TEPI_T);
|
(Qb0 * XnBex + Qepi0 * XpWex) / (TAUB_T + TEPI_T);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Qb1b2 = 0.0;
|
Qb1b2 = 0.0;
|
||||||
if (EXPHI == 1)
|
if (EXPHI == 1)
|
||||||
begin
|
begin
|
||||||
dVteVje = pow(1.0 - Vje * inv_VDE_T, -PE) - `AJE;
|
dVteVje = pow(1.0 - Vje * inv_VDE_T, -PE) - `AJE;
|
||||||
Vb2e1Vfe = (Vb2e1 - Vfe) / a_VDE;
|
Vb2e1Vfe = (Vb2e1 - Vfe) / a_VDE;
|
||||||
if (Vb2e1Vfe < 0.0)
|
if (Vb2e1Vfe < 0.0)
|
||||||
dVjeVb2e1 = 1.0 / (1.0 + exp(Vb2e1Vfe));
|
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
|
else
|
||||||
dVjeVb2e1 = exp(- Vb2e1Vfe) / (1.0 + exp(- Vb2e1Vfe));
|
begin
|
||||||
|
Qbe = Qbe_qs;
|
||||||
dVteVb2e1 = dVteVje * dVjeVb2e1 + `AJE;
|
Qbc = Qbc_qs;
|
||||||
dQteVb2e1 = (1.0 - XCJE) * CJE_TM * dVteVb2e1;
|
Qe = Qe_qs;
|
||||||
|
end
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
// Add branch current contributions
|
// Add branch current contributions
|
||||||
|
|
||||||
// Static currents
|
// Static currents
|
||||||
I(c1, c2) <+ TYPE * Ic1c2;
|
I(c1, c2) <+ TYPE * Ic1c2;
|
||||||
I(c2, e1) <+ TYPE * In;
|
I(c2, e1) <+ TYPE * In;
|
||||||
I(b1, e1) <+ TYPE * Ib1_s;
|
I(b1, e1) <+ TYPE * Ib1_s;
|
||||||
// begin RvdT, 28-10-2008, MXT504.8_alpha
|
// begin RvdT, 28-10-2008, MXT504.8_alpha
|
||||||
// contribution tunnel current added
|
// contribution tunnel current added
|
||||||
I(b2, e1) <+ TYPE * (Ib1 + Ib2 - Izteb);
|
I(b2, e1) <+ TYPE * (Ib1 + Ib2 - Izteb);
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
I(b1, s) <+ TYPE * Isub;
|
I(b1, s) <+ TYPE * Isub;
|
||||||
I(b, s) <+ TYPE * XIsub;
|
I(b, s) <+ TYPE * XIsub;
|
||||||
I(s, c1) <+ TYPE * Isf;
|
I(s, c1) <+ TYPE * Isf;
|
||||||
`endif
|
`endif
|
||||||
I(b1, b2) <+ TYPE * Ib1b2;
|
I(b1, b2) <+ TYPE * Ib1b2;
|
||||||
I(b2, c2) <+ TYPE * (-1.0 * Iavl);
|
I(b2, c2) <+ TYPE * (-1.0 * Iavl);
|
||||||
I(e, e1) <+ TYPE * Vee1 / RE_TM;
|
I(e, e1) <+ TYPE * Vee1 / RE_TM;
|
||||||
I(b, b1) <+ TYPE * Vbb1 / RBC_TM;
|
I(b, b1) <+ TYPE * Vbb1 / RBC_TM;
|
||||||
|
|
||||||
`ifdef SELFHEATING
|
`ifdef SELFHEATING
|
||||||
// Electrical equivalent for the thermal network
|
// Electrical equivalent for the thermal network
|
||||||
I(dt) <+ V(dt) / RTH_Tamb_M;
|
I(dt) <+ V(dt) / RTH_Tamb_M;
|
||||||
I(dt) <+ ddt(CTH_M * V(dt));
|
I(dt) <+ ddt(CTH_M * V(dt));
|
||||||
I(dt) <+ -1.0 * power_dis;
|
I(dt) <+ -1.0 * power_dis;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
|
|
||||||
// Dynamic currents
|
// Dynamic currents
|
||||||
I(b2, e1) <+ ddt(TYPE * (Qte + Qbe + Qe));
|
I(b2, e1) <+ ddt(TYPE * (Qte + Qbe + Qe));
|
||||||
I(b1, e1) <+ ddt(TYPE * (Qte_s));
|
I(b1, e1) <+ ddt(TYPE * (Qte_s));
|
||||||
I(b2, c2) <+ ddt(TYPE * (Qtc + Qbc + Qepi));
|
I(b2, c2) <+ ddt(TYPE * (Qtc + Qbc + Qepi));
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
I(s, c1) <+ ddt(TYPE * Qts);
|
I(s, c1) <+ ddt(TYPE * Qts);
|
||||||
`endif
|
`endif
|
||||||
I(b1, b2) <+ ddt(TYPE * Qb1b2);
|
I(b1, b2) <+ ddt(TYPE * Qb1b2);
|
||||||
I(b, e) <+ ddt(TYPE * CBEO_M * Vbe);
|
I(b, e) <+ ddt(TYPE * CBEO_M * Vbe);
|
||||||
I(b, c) <+ ddt(TYPE * CBCO_M * Vbc);
|
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.
|
Distribution of parasitic collector resistance.
|
||||||
This construct supports the case
|
This construct supports the case
|
||||||
RCBLI = 0.0 and or RCBLX = 0.0 .
|
RCBLI = 0.0 and or RCBLX = 0.0 .
|
||||||
It is up to the compiler to adjust the circuit topology
|
It is up to the compiler to adjust the circuit topology
|
||||||
and perform a node-collapse in such cases. */
|
and perform a node-collapse in such cases. */
|
||||||
if (RCBLX > 0.0)
|
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)
|
|
||||||
begin
|
begin
|
||||||
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
|
I(b, c3) <+ TYPE * XIex;
|
||||||
I(b1, c4) <+ TYPE * (Ib3 + Iex);
|
I(c, c3) <+ TYPE * Vcc3 * GCCxx_TM ;
|
||||||
I(c3, c4) <+ TYPE * Vc3c4 * GCCex_TM ;
|
I(b, c3) <+ ddt(TYPE * (XQtex + XQex));
|
||||||
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
|
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
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
V(c4, c1) <+ 0.0 ;
|
V(c3, c4) <+ 0 ;
|
||||||
I(b1, c1) <+ TYPE * (Ib3 + Iex);
|
if (RCBLI > 0.0)
|
||||||
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
|
begin
|
||||||
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
|
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
|
||||||
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
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ else
|
||||||
|
|
||||||
// Initialize model constants
|
// Initialize model constants
|
||||||
|
|
||||||
// Impact ionization constants (NPN - PNP)
|
// Impact ionization constants (NPN - PNP)
|
||||||
|
|
||||||
if (TYPE == 1) begin
|
if (TYPE == 1) begin
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ end
|
||||||
|
|
||||||
Xext1 = 1.0 - XEXT;
|
Xext1 = 1.0 - XEXT;
|
||||||
|
|
||||||
// Temperature independent MULT scaling
|
// Temperature independent MULT scaling
|
||||||
|
|
||||||
`ifdef SELFHEATING
|
`ifdef SELFHEATING
|
||||||
CTH_M = CTH * MULT;
|
CTH_M = CTH * MULT;
|
||||||
|
|
|
||||||
|
|
@ -7,139 +7,139 @@
|
||||||
|
|
||||||
`NOISE begin
|
`NOISE begin
|
||||||
|
|
||||||
// Thermal noise
|
// Thermal noise
|
||||||
common = 4.0 * `KB * Tk;
|
common = 4.0 * `KB * Tk;
|
||||||
powerREC = common / RE_TM; // Emitter resistance
|
powerREC = common / RE_TM; // Emitter resistance
|
||||||
powerRBC = common / RBC_TM; // Base resistance
|
powerRBC = common / RBC_TM; // Base resistance
|
||||||
powerRCCxx = common * GCCxx_TM; // Collector resistance
|
powerRCCxx = common * GCCxx_TM; // Collector resistance
|
||||||
powerRCCex = common * GCCex_TM; // Collector resistance
|
powerRCCex = common * GCCex_TM; // Collector resistance
|
||||||
powerRCCin = common * GCCin_TM; // Collector resistance
|
powerRCCin = common * GCCin_TM; // Collector resistance
|
||||||
powerRBV = common / Rb2 * (4.0 * eVb1b2 + 5.0) * `one_third ; // Variable base resistance
|
powerRBV = common / Rb2 * (4.0 * eVb1b2 + 5.0) * `one_third ; // Variable base resistance
|
||||||
|
|
||||||
// Main current shot noise
|
// Main current shot noise
|
||||||
In_N = (If + Ir) / qBI;
|
In_N = (If + Ir) / qBI;
|
||||||
powerCCS = 2.0 * `QQ * abs(In_N);
|
powerCCS = 2.0 * `QQ * abs(In_N);
|
||||||
|
|
||||||
// Weak-avalanche current shot noise
|
// Weak-avalanche current shot noise
|
||||||
if (KAVL > 0) begin
|
if (KAVL > 0) begin
|
||||||
Gem_N = abs(Iavl / In_N);
|
Gem_N = abs(Iavl / In_N);
|
||||||
end else begin
|
end else begin
|
||||||
Gem_N = 0.0;
|
Gem_N = 0.0;
|
||||||
end
|
end
|
||||||
|
|
||||||
powerIIS = 2.0 * `QQ * Iavl * (Gem_N + 1);
|
powerIIS = 2.0 * `QQ * Iavl * (Gem_N + 1);
|
||||||
|
|
||||||
// Transit time for noise
|
// Transit time for noise
|
||||||
if (In_N > 0.0) begin
|
if (In_N > 0.0) begin
|
||||||
Taub_N = (Qbe + Qbc) / In_N;
|
Taub_N = (Qbe + Qbc) / In_N;
|
||||||
end else begin
|
end else begin
|
||||||
Taub_N = TAUB_T * q1Q * qBI;
|
Taub_N = TAUB_T * q1Q * qBI;
|
||||||
end
|
end
|
||||||
|
|
||||||
// RF correlation noise model switch
|
// RF correlation noise model switch
|
||||||
if (KC == 1) begin
|
if (KC == 1) begin
|
||||||
// use charge partition for noise transit time
|
// use charge partition for noise transit time
|
||||||
taun = XQB * Taub_N;
|
taun = XQB * Taub_N;
|
||||||
end else if (KC == 2) begin
|
end else if (KC == 2) begin
|
||||||
// use fraction of transit time for noise transit time
|
// use fraction of transit time for noise transit time
|
||||||
taun = FTAUN * Taub_N;
|
taun = FTAUN * Taub_N;
|
||||||
end else begin // KC == 0
|
end else begin // KC == 0
|
||||||
// no correlation noise
|
// no correlation noise
|
||||||
taun = 0;
|
taun = 0;
|
||||||
end
|
end
|
||||||
|
|
||||||
// Forward base current shot noise and 1/f noise
|
// Forward base current shot noise and 1/f noise
|
||||||
powerFBCS = 2.0 * `QQ * (abs(Ib1) + abs(Ib2) + abs(Izteb));
|
powerFBCS = 2.0 * `QQ * (abs(Ib1) + abs(Ib2) + abs(Izteb));
|
||||||
powerFBC1fB1 = (1.0 - XIBI) * pow((abs(Ib1) / (1 - XIBI)), AF) * KF_M;
|
powerFBC1fB1 = (1.0 - XIBI) * pow((abs(Ib1) / (1 - XIBI)), AF) * KF_M;
|
||||||
exponentFBC1fB2 = (2.0 * (MLF - 1.0)) + (AF * (2.0 - MLF));
|
exponentFBC1fB2 = (2.0 * (MLF - 1.0)) + (AF * (2.0 - MLF));
|
||||||
powerFBC1fB2 = KFN_M * pow(abs(Ib2), exponentFBC1fB2);
|
powerFBC1fB2 = KFN_M * pow(abs(Ib2), exponentFBC1fB2);
|
||||||
|
|
||||||
// Emitter-base sidewall current shot and 1/f noise
|
// Emitter-base sidewall current shot and 1/f noise
|
||||||
powerEBSCS = 2.0 * `QQ * abs(Ib1_s);
|
powerEBSCS = 2.0 * `QQ * abs(Ib1_s);
|
||||||
if (XIBI == 0)
|
if (XIBI == 0)
|
||||||
powerEBSC1f = 0.0;
|
powerEBSC1f = 0.0;
|
||||||
else
|
else
|
||||||
powerEBSC1f = KF_M * XIBI * pow((abs(Ib1_s / XIBI)), AF);
|
powerEBSC1f = KF_M * XIBI * pow((abs(Ib1_s / XIBI)), AF);
|
||||||
|
|
||||||
// Reverse base current shot noise and 1/f noise
|
// Reverse base current shot noise and 1/f noise
|
||||||
powerRBCS = 2.0 * `QQ * abs(Ib3);
|
powerRBCS = 2.0 * `QQ * abs(Ib3);
|
||||||
powerRBC1f = KF_M * pow(abs(Ib3), AF);
|
powerRBC1f = KF_M * pow(abs(Ib3), AF);
|
||||||
|
|
||||||
// Extrinsic current shot noise and 1/f noise
|
// Extrinsic current shot noise and 1/f noise
|
||||||
powerExCS = 2.0 * `QQ * abs(Iex);
|
powerExCS = 2.0 * `QQ * abs(Iex);
|
||||||
powerExC1f = KF_M * (1 - (EXMOD * XEXT)) *
|
powerExC1f = KF_M * (1 - (EXMOD * XEXT)) *
|
||||||
pow((abs(Iex) / (1 - (EXMOD * XEXT))), AF);
|
pow((abs(Iex) / (1 - (EXMOD * XEXT))), AF);
|
||||||
powerExCSMOD = 2.0 * `QQ * abs(XIex) * EXMOD;
|
powerExCSMOD = 2.0 * `QQ * abs(XIex) * EXMOD;
|
||||||
if (XEXT == 0.0)
|
if (XEXT == 0.0)
|
||||||
powerExC1fMOD = 0.0;
|
powerExC1fMOD = 0.0;
|
||||||
else
|
else
|
||||||
powerExC1fMOD = KF_M * EXMOD * XEXT * pow((abs(XIex) / XEXT), AF);
|
powerExC1fMOD = KF_M * EXMOD * XEXT * pow((abs(XIex) / XEXT), AF);
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
// Substrate current shot noise (between nodes B1 and S, resp. B and S)
|
// Substrate current shot noise (between nodes B1 and S, resp. B and S)
|
||||||
powerSubsCS_B1S = 2.0 * `QQ * abs(Isub);
|
powerSubsCS_B1S = 2.0 * `QQ * abs(Isub);
|
||||||
powerSubsCS_BS = 2.0 * `QQ * abs(XIsub);
|
powerSubsCS_BS = 2.0 * `QQ * abs(XIsub);
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
// Reference un-correlated current shot noise sources
|
// Reference un-correlated current shot noise sources
|
||||||
I(noi) <+ white_noise(powerCCS, "un-correlated current shot noise");
|
I(noi) <+ white_noise(powerCCS, "un-correlated current shot noise");
|
||||||
I(noi) <+ V(noi);
|
I(noi) <+ V(noi);
|
||||||
|
|
||||||
// Implementing correlated noise sources
|
// Implementing correlated noise sources
|
||||||
I(b2, e1) <+ taun * ddt(V(noi));
|
I(b2, e1) <+ taun * ddt(V(noi));
|
||||||
I(c2, b2) <+ Gem_N * V(noi);
|
I(c2, b2) <+ Gem_N * V(noi);
|
||||||
I(c2, e1) <+ V(noi);
|
I(c2, e1) <+ V(noi);
|
||||||
|
|
||||||
// Implementing un-correlated noise sources
|
// Implementing un-correlated noise sources
|
||||||
I(c2, b2) <+ white_noise(powerIIS, "un-correlated noise");
|
I(c2, b2) <+ white_noise(powerIIS, "un-correlated noise");
|
||||||
I(b2, e1) <+ white_noise(powerFBCS, "un-correlated noise");
|
I(b2, e1) <+ white_noise(powerFBCS, "un-correlated noise");
|
||||||
|
|
||||||
// Add noise sources
|
// Add noise sources
|
||||||
I(e, e1) <+ white_noise(powerREC, "emitter resistance");
|
I(e, e1) <+ white_noise(powerREC, "emitter resistance");
|
||||||
I(b, b1) <+ white_noise(powerRBC, "base resistance");
|
I(b, b1) <+ white_noise(powerRBC, "base resistance");
|
||||||
I(b1, b2) <+ white_noise(powerRBV, "variable 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(powerFBC1fB1, 1, "bas_emi_forw");
|
||||||
I(b2, e1) <+ flicker_noise(powerFBC1fB2, 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) <+ white_noise(powerEBSCS, "emi_bas_side");
|
||||||
I(e1, b1) <+ flicker_noise(powerEBSC1f, 1, "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) <+ white_noise(powerRBCS, "bas_col_reve");
|
||||||
I(b1, c4) <+ flicker_noise(powerRBC1f, 1, "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) <+ white_noise(powerExCS, "Ext_bas_col");
|
||||||
I(b1, c4) <+ flicker_noise(powerExC1f, 1, "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) <+ white_noise(powerExCSMOD, "Ext_bas_col");
|
||||||
I(b, c3) <+ flicker_noise(powerExC1fMOD, 1, "Ext_bas_col");
|
I(b, c3) <+ flicker_noise(powerExC1fMOD, 1, "Ext_bas_col");
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
I(b1, s) <+ white_noise(powerSubsCS_B1S, "bas_sub_current");
|
I(b1, s) <+ white_noise(powerSubsCS_B1S, "bas_sub_current");
|
||||||
I(b, s) <+ white_noise(powerSubsCS_BS, "bas_sub_current");
|
I(b, s) <+ white_noise(powerSubsCS_BS, "bas_sub_current");
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
if (RCBLX > 0.0)
|
if (RCBLX > 0.0)
|
||||||
begin
|
begin
|
||||||
if (RCBLI > 0.0)
|
if (RCBLI > 0.0)
|
||||||
begin /* all branches exist */
|
begin /* all branches exist */
|
||||||
I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
|
I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
|
||||||
I(c3, c4) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
|
I(c3, c4) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
|
||||||
I(c4, c1) <+ white_noise(powerRCCin, "intrinsic 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
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin /* only Rcblx exists */
|
||||||
if (RCBLI > 0.0)
|
I(c, c3) <+ white_noise(powerRCCxx, "collector plug resistance");
|
||||||
begin /* only Rcbli exists */
|
I(c3, c1) <+ white_noise(powerRCCex, "extrinsic collector BL resistance");
|
||||||
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
|
||||||
|
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
|
end // Noise
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,24 +9,24 @@ begin
|
||||||
`ifdef __VAMS_COMPACT_MODELING__
|
`ifdef __VAMS_COMPACT_MODELING__
|
||||||
|
|
||||||
|
|
||||||
// The external currents and the current gain
|
// The external currents and the current gain
|
||||||
OP_ic = I(<c>); // External DC collector current
|
OP_ic = I(<c>); // External DC collector current
|
||||||
OP_ib = I(<b>); // External DC base Current
|
OP_ib = I(<b>); // External DC base Current
|
||||||
|
|
||||||
if (OP_ib == 0)
|
if (OP_ib == 0)
|
||||||
begin
|
begin
|
||||||
OP_betadc = 0.0 ;
|
OP_betadc = 0.0 ;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
OP_betadc = OP_ic / OP_ib; // External DC Current gain
|
OP_betadc = OP_ic / OP_ib; // External DC Current gain
|
||||||
end
|
end
|
||||||
|
|
||||||
// begin added in MXT 504.9:
|
// begin added in MXT 504.9:
|
||||||
OP_ie = I(<e>); // External DC emitter current
|
OP_ie = I(<e>); // External DC emitter current
|
||||||
OP_vbe = V(b, e); // External base-emitter bias
|
OP_vbe = V(b, e); // External base-emitter bias
|
||||||
OP_vce = V(c, e); // External collector-emitter bias
|
OP_vce = V(c, e); // External collector-emitter bias
|
||||||
OP_vbc = V(b, c); // External base-collector bias
|
OP_vbc = V(b, c); // External base-collector bias
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
OP_is = I(<s>); // External DC emitter current
|
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
|
OP_vsc = V(s, c); // External substrate-collector bias
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
// end added in MXT 504.9:
|
// end added in MXT 504.9:
|
||||||
|
|
||||||
// The internal voltage differences
|
// The internal voltage differences
|
||||||
OP_vb2e1 = Vb2e1; // Internal base-emiter bias
|
OP_vb2e1 = Vb2e1; // Internal base-emiter bias
|
||||||
OP_vb2c2 = Vb2c2; // Internal base-emiter bias
|
OP_vb2c2 = Vb2c2; // Internal base-emiter bias
|
||||||
OP_vb2c1 = Vb2c1; // Internal base-collector bias including epilayer
|
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_vc4c1 = Vc4c1; // Bias over intrinsic buried layer
|
||||||
OP_vc3c4 = Vc3c4; // Bias over extrinsic 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
|
// The branch currents
|
||||||
OP_in = In; // Main current
|
OP_in = In; // Main current
|
||||||
OP_ic1c2 = Ic1c2; // Epilayer current
|
OP_ic1c2 = Ic1c2; // Epilayer current
|
||||||
OP_ib1b2 = Ib1b2; // Pinched-base current
|
OP_ib1b2 = Ib1b2; // Pinched-base current
|
||||||
OP_ib1 = Ib1; // Ideal forward base current
|
OP_ib1 = Ib1; // Ideal forward base current
|
||||||
OP_sib1 = Ib1_s; // Ideal side-wall base current
|
OP_sib1 = Ib1_s; // Ideal side-wall base current
|
||||||
//
|
//
|
||||||
// 504.8, RvdT, TU-Delft April. 2009:
|
// 504.8, RvdT, TU-Delft April. 2009:
|
||||||
//
|
//
|
||||||
OP_izteb = Izteb ; // Zener tunneling current
|
OP_izteb = Izteb ; // Zener tunneling current
|
||||||
//
|
//
|
||||||
OP_ib2 = Ib2; // Non-ideal forward base current
|
OP_ib2 = Ib2; // Non-ideal forward base current
|
||||||
OP_ib3 = Ib3; // Non-ideal reverse base current
|
OP_ib3 = Ib3; // Non-ideal reverse base current
|
||||||
OP_iavl = Iavl; // Avalanche current
|
OP_iavl = Iavl; // Avalanche current
|
||||||
OP_iex = Iex; // Extrinsic reverse base current
|
OP_iex = Iex; // Extrinsic reverse base current
|
||||||
OP_xiex = XIex; // Extrinsic reverse base current
|
OP_xiex = XIex; // Extrinsic reverse base current
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
OP_isub = Isub; // Substrate current
|
OP_isub = Isub; // Substrate current
|
||||||
OP_xisub = XIsub; // Substrate current
|
OP_xisub = XIsub; // Substrate current
|
||||||
OP_isf = Isf; // Substrate-collector current
|
OP_isf = Isf; // Substrate-collector current
|
||||||
`endif
|
`endif
|
||||||
OP_ire = - Vee1 / RE_TM; // Current through emiter resistance
|
OP_ire = - Vee1 / RE_TM; // Current through emiter resistance
|
||||||
OP_irbc = Vbb1 / RBC_TM; // Current through constant base resistance
|
OP_irbc = Vbb1 / RBC_TM; // Current through constant base resistance
|
||||||
|
|
||||||
OP_ircc = Vcc3 * GCCxx_TM; // Current through collector contact resistance
|
OP_ircc = Vcc3 * GCCxx_TM; // Current through collector contact resistance
|
||||||
OP_ircblx = Vc3c4 * GCCex_TM; // Current through extrinsic buried layer resistance
|
OP_ircblx = Vc3c4 * GCCex_TM; // Current through extrinsic buried layer resistance
|
||||||
OP_ircbli = Vc4c1 * GCCin_TM; // Current through extrinsic buried layer resistance
|
OP_ircbli = Vc4c1 * GCCin_TM; // Current through extrinsic buried layer resistance
|
||||||
|
|
||||||
// The branch charges
|
// The branch charges
|
||||||
OP_qe = Qe; // Emitter charge or emitter neutral charge
|
OP_qe = Qe; // Emitter charge or emitter neutral charge
|
||||||
OP_qte = Qte; // Base-emiter depletion charge
|
OP_qte = Qte; // Base-emiter depletion charge
|
||||||
OP_sqte = Qte_s; // Sidewall base-emiter depletion charge
|
OP_sqte = Qte_s; // Sidewall base-emiter depletion charge
|
||||||
OP_qbe = Qbe; // Base-emiter diffusion charge
|
OP_qbe = Qbe; // Base-emiter diffusion charge
|
||||||
OP_qbc = Qbc; // Base-collector diffusion charge
|
OP_qbc = Qbc; // Base-collector diffusion charge
|
||||||
OP_qtc = Qtc; // Base-colector depletion charge
|
OP_qtc = Qtc; // Base-colector depletion charge
|
||||||
OP_qepi = Qepi; // Epilayer diffusion charge
|
OP_qepi = Qepi; // Epilayer diffusion charge
|
||||||
OP_qb1b2 = Qb1b2; // AC current crowding charge
|
OP_qb1b2 = Qb1b2; // AC current crowding charge
|
||||||
OP_qtex = Qtex; // Extrinsic base-collector depletion charge
|
OP_qtex = Qtex; // Extrinsic base-collector depletion charge
|
||||||
OP_xqtex = XQtex; // Extrinsic base-collector depletion charge
|
OP_xqtex = XQtex; // Extrinsic base-collector depletion charge
|
||||||
OP_qex = Qex; // Extrinsic base-collector diffusion charge
|
OP_qex = Qex; // Extrinsic base-collector diffusion charge
|
||||||
OP_xqex = XQex; // Extrinsic base-collector diffusion charge
|
OP_xqex = XQex; // Extrinsic base-collector diffusion charge
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
OP_qts = Qts; // Collector substrate depletion charge
|
OP_qts = Qts; // Collector substrate depletion charge
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
// Small signal equivalent circuit conductances and resistances
|
// Small signal equivalent circuit conductances and resistances
|
||||||
|
|
||||||
OP_gx = - ddx(In, V(e1)); // Forward transconductance
|
OP_gx = - ddx(In, V(e1)); // Forward transconductance
|
||||||
OP_gy = - ddx(In, V(c2)); // Reverse 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
|
- 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_gpiy = - ddx(Ib1, V(c2)); // Early effect on recombination base current
|
||||||
OP_gpiz = - ddx(Ib1, V(c1)); // 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_gmux = ddx( Iavl, V(e1)); // Early effect on avalanche current limitting
|
||||||
OP_gmuy = ddx( Iavl, V(c2)); // Conductance of avalanche current
|
OP_gmuy = ddx( Iavl, V(c2)); // Conductance of avalanche current
|
||||||
OP_gmuz = - ddx(- Iavl, V(c1)); // Conductance of avalanche current
|
OP_gmuz = - ddx(- Iavl, V(c1)); // Conductance of avalanche current
|
||||||
|
|
||||||
// Conductance extrinsic b-c current :
|
// Conductance extrinsic b-c current :
|
||||||
OP_gmuex = ddx(Iex+Ib3, V(e))
|
OP_gmuex = ddx(Iex+Ib3, V(e))
|
||||||
+ ddx(Iex+Ib3, V(b1))
|
+ ddx(Iex+Ib3, V(b1))
|
||||||
+ ddx(Iex+Ib3, V(b2))
|
+ ddx(Iex+Ib3, V(b2))
|
||||||
+ ddx(Iex+Ib3, V(e1))
|
+ ddx(Iex+Ib3, V(e1))
|
||||||
+ ddx(Iex+Ib3, V(c2));
|
+ 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_grcvy = - ddx(Ic1c2, V(c2)); // Conductance of epilayer current
|
||||||
OP_grcvz = - ddx(Ic1c2, V(c1)); // 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_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_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_re = RE_TM; // Emiter resistance
|
||||||
OP_rbc = RBC_TM; // Constant base resistance
|
OP_rbc = RBC_TM; // Constant base resistance
|
||||||
OP_rcc = RCCxx_TM; // Collector Contact resistance
|
OP_rcc = RCCxx_TM; // Collector Contact resistance
|
||||||
OP_rcblx = RCCex_TM; // Extrinsic buried layer resistance
|
OP_rcblx = RCCex_TM; // Extrinsic buried layer resistance
|
||||||
OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
|
OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
|
||||||
|
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
|
|
@ -145,100 +145,100 @@ OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
|
|
||||||
// Small signal equivalent circuit capacitances
|
// Small signal equivalent circuit capacitances
|
||||||
OP_scbe = - ddx(Qte_s, V(e)) - ddx(Qte_s, V(e1)); // Capacitance sidewall b-e junction
|
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_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_cbcz = - ddx(Qtc + Qbc + Qepi, V(c1)); // Capacitance floor b-c junction
|
||||||
|
|
||||||
// Capacitance extrinsic b-c junction :
|
// Capacitance extrinsic b-c junction :
|
||||||
OP_cbcex = ddx(Qtex + Qex,V(e))
|
OP_cbcex = ddx(Qtex + Qex,V(e))
|
||||||
+ ddx(Qtex + Qex,V(b1 ))
|
+ ddx(Qtex + Qex,V(b1 ))
|
||||||
+ ddx(Qtex + Qex,V(b2))
|
+ ddx(Qtex + Qex,V(b2))
|
||||||
+ ddx(Qtex + Qex,V(e1))
|
+ ddx(Qtex + Qex,V(e1))
|
||||||
+ ddx(Qtex + Qex,V(c2)) ;
|
+ ddx(Qtex + Qex,V(c2)) ;
|
||||||
|
|
||||||
// Capacitance extrinsic b-c junction :
|
// Capacitance extrinsic b-c junction :
|
||||||
OP_xcbcex = ddx(XQtex + XQex, V(b)) ;
|
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_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_cb1b2y = - ddx(Qb1b2, V(c2)); // Cross-capacitance AC current crowding
|
||||||
OP_cb1b2z = - ddx(Qb1b2, V(c1)) ; // Cross-capacitance AC current crowding
|
OP_cb1b2z = - ddx(Qb1b2, V(c1)) ; // Cross-capacitance AC current crowding
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
OP_cts = ddx(Qts, V(s)) ; // Capacitance s-c junction
|
OP_cts = ddx(Qts, V(s)) ; // Capacitance s-c junction
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
// Approximate small signal equivalent circuit
|
// Approximate small signal equivalent circuit
|
||||||
dydx = (OP_gx - OP_gmux) / (OP_grcvy + OP_gmuy - OP_gy);
|
dydx = (OP_gx - OP_gmux) / (OP_grcvy + OP_gmuy - OP_gy);
|
||||||
dydz = (OP_gz - OP_grcvz - OP_gmuz) / (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 +
|
gpi = OP_sgpi + OP_gpix + OP_gmux + OP_gpiz + OP_gmuz +
|
||||||
(OP_gpiy + OP_gmuy) * (dydx + dydz);
|
(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_gz - OP_gmuz) - OP_grcvz *
|
||||||
(OP_gy - OP_gmuy)) / (OP_grcvy + OP_gmuy - OP_gy);
|
(OP_gy - OP_gmuy)) / (OP_grcvy + OP_gmuy - OP_gy);
|
||||||
OP_beta = OP_gm / gpi; // Current amplification
|
OP_beta = OP_gm / gpi; // Current amplification
|
||||||
OP_gout = ((OP_gy - OP_gmuy) * OP_grcvz - // Output conductance
|
OP_gout = ((OP_gy - OP_gmuy) * OP_grcvz - // Output conductance
|
||||||
(OP_gz - OP_gmuz) * OP_grcvy) /
|
(OP_gz - OP_gmuz) * OP_grcvy) /
|
||||||
(OP_grcvy + OP_gmuy - OP_gy);
|
(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_gmuex + OP_xgmuex;
|
||||||
OP_rb = RBC_TM + OP_rbv; // Base resistance
|
OP_rb = RBC_TM + OP_rbv; // Base resistance
|
||||||
OP_rc = OP_rcc + OP_rcblx + OP_rcbli; // Collector resistance
|
OP_rc = OP_rcc + OP_rcblx + OP_rcbli; // Collector resistance
|
||||||
OP_cbe = OP_cbex + OP_scbe + OP_cbcx + // Base-emitter capacitance
|
OP_cbe = OP_cbex + OP_scbe + OP_cbcx + // Base-emitter capacitance
|
||||||
(OP_cbey + OP_cbcy) * dydx + CBEO_M;
|
(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;
|
OP_cbcex + OP_xcbcex + CBCO_M;
|
||||||
|
|
||||||
|
|
||||||
// Quantities to describe internal state of the model
|
// Quantities to describe internal state of the model
|
||||||
gammax = (OP_gpix + OP_gmux - OP_grbvx) * OP_rbv;
|
gammax = (OP_gpix + OP_gmux - OP_grbvx) * OP_rbv;
|
||||||
gammay = (OP_gpiy + OP_gmuy - OP_grbvy) * OP_rbv;
|
gammay = (OP_gpiy + OP_gmuy - OP_grbvy) * OP_rbv;
|
||||||
gammaz = (OP_gpiz + OP_gmuz - OP_grbvz) * OP_rbv;
|
gammaz = (OP_gpiz + OP_gmuz - OP_grbvz) * OP_rbv;
|
||||||
gbfx = OP_gpix + OP_sgpi * (1.0 + gammax);
|
gbfx = OP_gpix + OP_sgpi * (1.0 + gammax);
|
||||||
gbfy = OP_gpiy + OP_sgpi * gammay;
|
gbfy = OP_gpiy + OP_sgpi * gammay;
|
||||||
gbfz = OP_gpiz + OP_sgpi * gammaz;
|
gbfz = OP_gpiz + OP_sgpi * gammaz;
|
||||||
|
|
||||||
// RvdT March 2008:
|
// RvdT March 2008:
|
||||||
alpha_ft = (1.0 + (OP_grcvy * dydx * OP_rc) +
|
alpha_ft = (1.0 + (OP_grcvy * dydx * OP_rc) +
|
||||||
(OP_gx + gbfx + (OP_gy + gbfy) * dydx) * RE_TM)/
|
(OP_gx + gbfx + (OP_gy + gbfy) * dydx) * RE_TM)/
|
||||||
(1.0 - (OP_grcvz + OP_grcvy * dydz) * OP_rc -
|
(1.0 - (OP_grcvz + OP_grcvy * dydz) * OP_rc -
|
||||||
(OP_gz + gbfz + (OP_gy + gbfy) * dydz) * RE_TM);
|
(OP_gz + gbfz + (OP_gy + gbfy) * dydz) * RE_TM);
|
||||||
|
|
||||||
rx = pow((OP_grcvy * dydx + alpha_ft * (OP_grcvz + OP_grcvy * dydz)), -1);
|
rx = pow((OP_grcvy * dydx + alpha_ft * (OP_grcvz + OP_grcvy * dydz)), -1);
|
||||||
rz = alpha_ft * rx;
|
rz = alpha_ft * rx;
|
||||||
ry = (1.0 - OP_grcvz * rz) / OP_grcvy;
|
ry = (1.0 - OP_grcvz * rz) / OP_grcvy;
|
||||||
rb1b2 = gammax * rx + gammay * ry + gammaz * rz;
|
rb1b2 = gammax * rx + gammay * ry + gammaz * rz;
|
||||||
rex = rz + rb1b2 - OP_rcbli;
|
rex = rz + rb1b2 - OP_rcbli;
|
||||||
xrex = rz + rb1b2 + RBC_TM * ((gbfx + OP_gmux) * rx + (gbfy + OP_gmuy) * ry +
|
xrex = rz + rb1b2 + RBC_TM * ((gbfx + OP_gmux) * rx + (gbfy + OP_gmuy) * ry +
|
||||||
(gbfz + OP_gmuz) * rz) - OP_rcbli - OP_rcblx;
|
(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 +
|
ry + (OP_cbez + OP_cbcz) * rz + OP_cbcex * rex + OP_xcbcex * xrex +
|
||||||
(CBEO_M + CBCO_M) * (xrex - RCCxx_TM);
|
(CBEO_M + CBCO_M) * (xrex - RCCxx_TM);
|
||||||
|
|
||||||
OP_ft = 1.0 / (2.0 * `PI * taut); // Good approximation for cut-off frequency
|
OP_ft = 1.0 / (2.0 * `PI * taut); // Good approximation for cut-off frequency
|
||||||
OP_iqs = Iqs; // Current at onset of quasi-saturation
|
OP_iqs = Iqs; // Current at onset of quasi-saturation
|
||||||
OP_xiwepi = xi_w; // Thickness of injection layer
|
OP_xiwepi = xi_w; // Thickness of injection layer
|
||||||
OP_vb2c2star = Vb2c2star; // Physical value of internal base-collector bias
|
OP_vb2c2star = Vb2c2star; // Physical value of internal base-collector bias
|
||||||
|
|
||||||
//self-heating
|
//self-heating
|
||||||
`ifdef SELFHEATING
|
`ifdef SELFHEATING
|
||||||
OP_pdiss = power_dis; // Dissipation
|
OP_pdiss = power_dis; // Dissipation
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
OP_tk = Tk; // Actual temperature
|
OP_tk = Tk; // Actual temperature
|
||||||
|
|
||||||
`endif
|
`endif
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
// Temperature scaling of parameters
|
// Temperature scaling of parameters
|
||||||
|
|
||||||
// The excess transistor temperature due to the self-heating
|
// The excess transistor temperature due to the self-heating
|
||||||
`ifdef SELFHEATING
|
`ifdef SELFHEATING
|
||||||
Tki = V(dt);
|
Tki = V(dt);
|
||||||
// *** Convergence related smoothing ***
|
// *** Convergence related smoothing ***
|
||||||
|
|
@ -13,12 +13,12 @@
|
||||||
Tki = - ln(1.0 - Tki);
|
Tki = - ln(1.0 - Tki);
|
||||||
end
|
end
|
||||||
`linLog(Vdt, Tki, 200.0);
|
`linLog(Vdt, Tki, 200.0);
|
||||||
// `min_logexp(Vdt, Tki, 200.0, 10.0);
|
// `min_logexp(Vdt, Tki, 200.0, 10.0);
|
||||||
`else
|
`else
|
||||||
Vdt = 0.0;
|
Vdt = 0.0;
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
// Temperature variables
|
// Temperature variables
|
||||||
Tk = Tamb + Vdt;
|
Tk = Tamb + Vdt;
|
||||||
|
|
||||||
tN = Tk / Trk;
|
tN = Tk / Trk;
|
||||||
|
|
@ -30,13 +30,13 @@ VdtINV = VtINV - VtrINV;
|
||||||
|
|
||||||
lntN = ln(tN) ;
|
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) ;
|
// VGZEB_T = VGZEBOK - AVGEB*Tk*Tk / (Tk + TVGEB) ;
|
||||||
`max_logexp(VGZEB_T, VGZEBOK - AVGEB*Tk*Tk / (Tk + TVGEB), 0.05, 0.1) ;
|
`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;
|
UdeT = -3.0 * Vt * ln(tN) + VDE * tN + (1.0 - tN) * VGB;
|
||||||
`max_logexp(VDE_T, `VDLOW, UdeT, Vt);
|
`max_logexp(VDE_T, `VDLOW, UdeT, Vt);
|
||||||
|
|
@ -62,7 +62,7 @@ CJCscaleINV = 1.0 / CJCscale;
|
||||||
CJC_T = CJC * CJCscale;
|
CJC_T = CJC * CJCscale;
|
||||||
XP_T = XP * CJCscaleINV;
|
XP_T = XP * CJCscaleINV;
|
||||||
|
|
||||||
// Resistances
|
// Resistances
|
||||||
|
|
||||||
// RvdT, November 2008:
|
// RvdT, November 2008:
|
||||||
// Instead of the following definition
|
// Instead of the following definition
|
||||||
|
|
@ -122,9 +122,9 @@ VER_T = VER * x * y;
|
||||||
|
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
ISS_T = ISS * exp(lntN * (4.0 - AS)) * exp(-VGS * VdtINV);
|
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);
|
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))
|
if ((ISS_T > 0.0))
|
||||||
IKS_T = IKS * exp(lntN * (1.0 - AS)) * (IS_T / IS) * (ISS / ISS_T);
|
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));
|
IKS_T = IKS * exp(lntN * (1.0 - AS));
|
||||||
`endif
|
`endif
|
||||||
|
|
||||||
// Transit times
|
// Transit times
|
||||||
|
|
||||||
TAUE_T = TAUE * exp(lntN * (AB - 2.0)) * exp(-DVGTE * VdtINV);
|
TAUE_T = TAUE * exp(lntN * (AB - 2.0)) * exp(-DVGTE * VdtINV);
|
||||||
TAUB_T = TAUB * exp(lntN * (AQBO + AB - 1.0));
|
TAUB_T = TAUB * exp(lntN * (AQBO + AB - 1.0));
|
||||||
TEPI_T = TEPI * exp(lntN * (AEPI - 1.0));
|
TEPI_T = TEPI * exp(lntN * (AEPI - 1.0));
|
||||||
TAUR_T = TAUR * (TAUB_T + TEPI_T) / (TAUB + TEPI);
|
TAUR_T = TAUR * (TAUB_T + TEPI_T) / (TAUB + TEPI);
|
||||||
|
|
||||||
// Avalanche constant
|
// Avalanche constant
|
||||||
|
|
||||||
Tk300 = Tk - 300.0;
|
Tk300 = Tk - 300.0;
|
||||||
// RvdT, 15-02-2008: prevent division by zero and overflow at high temperatures:
|
// RvdT, 15-02-2008: prevent division by zero and overflow at high temperatures:
|
||||||
|
|
@ -152,12 +152,12 @@ begin
|
||||||
BnT = Bn * 1.081 ;
|
BnT = Bn * 1.081 ;
|
||||||
end
|
end
|
||||||
|
|
||||||
// Heterojunction features
|
// Heterojunction features
|
||||||
|
|
||||||
DEG_T = DEG * exp(lntN * AQBO);
|
DEG_T = DEG * exp(lntN * AQBO);
|
||||||
|
|
||||||
`ifdef SELFHEATING
|
`ifdef SELFHEATING
|
||||||
// Temperature scaling of the thermal resistance
|
// Temperature scaling of the thermal resistance
|
||||||
|
|
||||||
RTH_Tamb = RTH * pow(Tamb / Trk, ATH);
|
RTH_Tamb = RTH * pow(Tamb / Trk, ATH);
|
||||||
`endif
|
`endif
|
||||||
|
|
@ -177,7 +177,7 @@ IZEB_TM = IZEB_T * MULT ;
|
||||||
IHC_M = IHC * MULT;
|
IHC_M = IHC * MULT;
|
||||||
`ifdef SUBSTRATE
|
`ifdef SUBSTRATE
|
||||||
ISS_TM = ISS_T * MULT;
|
ISS_TM = ISS_T * MULT;
|
||||||
// New: 504.9
|
// New: 504.9
|
||||||
ICSS_TM = ICSS_T * MULT;
|
ICSS_TM = ICSS_T * MULT;
|
||||||
IKS_TM = IKS_T * MULT;
|
IKS_TM = IKS_T * MULT;
|
||||||
`endif
|
`endif
|
||||||
|
|
|
||||||
|
|
@ -15,170 +15,170 @@
|
||||||
// Further information can be found in the file readme.txt
|
// Further information can be found in the file readme.txt
|
||||||
//
|
//
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Calculation of internal paramters which are independent
|
// Calculation of internal paramters which are independent
|
||||||
// on instance parameters
|
// on instance parameters
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
TRJ_i = `CLIP_LOW( TRJ , `TRJ_cliplow);
|
TRJ_i = `CLIP_LOW( TRJ , `TRJ_cliplow);
|
||||||
IMAX_i = `CLIP_LOW( IMAX , `IMAX_cliplow);
|
IMAX_i = `CLIP_LOW( IMAX , `IMAX_cliplow);
|
||||||
CJORBOT_i = `CLIP_LOW( CJORBOT , `CJORBOT_cliplow);
|
CJORBOT_i = `CLIP_LOW( CJORBOT , `CJORBOT_cliplow);
|
||||||
CJORSTI_i = `CLIP_LOW( CJORSTI , `CJORSTI_cliplow);
|
CJORSTI_i = `CLIP_LOW( CJORSTI , `CJORSTI_cliplow);
|
||||||
CJORGAT_i = `CLIP_LOW( CJORGAT , `CJORGAT_cliplow);
|
CJORGAT_i = `CLIP_LOW( CJORGAT , `CJORGAT_cliplow);
|
||||||
VBIRBOT_i = `CLIP_LOW( VBIRBOT , `VBIR_cliplow);
|
VBIRBOT_i = `CLIP_LOW( VBIRBOT , `VBIR_cliplow);
|
||||||
VBIRSTI_i = `CLIP_LOW( VBIRSTI , `VBIR_cliplow);
|
VBIRSTI_i = `CLIP_LOW( VBIRSTI , `VBIR_cliplow);
|
||||||
VBIRGAT_i = `CLIP_LOW( VBIRGAT , `VBIR_cliplow);
|
VBIRGAT_i = `CLIP_LOW( VBIRGAT , `VBIR_cliplow);
|
||||||
PBOT_i = `CLIP_BOTH(PBOT , `P_cliplow,`P_cliphigh);
|
PBOT_i = `CLIP_BOTH(PBOT , `P_cliplow,`P_cliphigh);
|
||||||
PSTI_i = `CLIP_BOTH(PSTI , `P_cliplow,`P_cliphigh);
|
PSTI_i = `CLIP_BOTH(PSTI , `P_cliplow,`P_cliphigh);
|
||||||
PGAT_i = `CLIP_BOTH(PGAT , `P_cliplow,`P_cliphigh);
|
PGAT_i = `CLIP_BOTH(PGAT , `P_cliplow,`P_cliphigh);
|
||||||
IDSATRBOT_i = `CLIP_LOW( IDSATRBOT , `IDSATR_cliplow);
|
IDSATRBOT_i = `CLIP_LOW( IDSATRBOT , `IDSATR_cliplow);
|
||||||
IDSATRSTI_i = `CLIP_LOW( IDSATRSTI , `IDSATR_cliplow);
|
IDSATRSTI_i = `CLIP_LOW( IDSATRSTI , `IDSATR_cliplow);
|
||||||
IDSATRGAT_i = `CLIP_LOW( IDSATRGAT , `IDSATR_cliplow);
|
IDSATRGAT_i = `CLIP_LOW( IDSATRGAT , `IDSATR_cliplow);
|
||||||
CSRHBOT_i = `CLIP_LOW( CSRHBOT , `CSRH_cliplow);
|
CSRHBOT_i = `CLIP_LOW( CSRHBOT , `CSRH_cliplow);
|
||||||
CSRHSTI_i = `CLIP_LOW( CSRHSTI , `CSRH_cliplow);
|
CSRHSTI_i = `CLIP_LOW( CSRHSTI , `CSRH_cliplow);
|
||||||
CSRHGAT_i = `CLIP_LOW( CSRHGAT , `CSRH_cliplow);
|
CSRHGAT_i = `CLIP_LOW( CSRHGAT , `CSRH_cliplow);
|
||||||
XJUNSTI_i = `CLIP_LOW( XJUNSTI , `XJUN_cliplow);
|
XJUNSTI_i = `CLIP_LOW( XJUNSTI , `XJUN_cliplow);
|
||||||
XJUNGAT_i = `CLIP_LOW( XJUNGAT , `XJUN_cliplow);
|
XJUNGAT_i = `CLIP_LOW( XJUNGAT , `XJUN_cliplow);
|
||||||
CTATBOT_i = `CLIP_LOW( CTATBOT , `CTAT_cliplow);
|
CTATBOT_i = `CLIP_LOW( CTATBOT , `CTAT_cliplow);
|
||||||
CTATSTI_i = `CLIP_LOW( CTATSTI , `CTAT_cliplow);
|
CTATSTI_i = `CLIP_LOW( CTATSTI , `CTAT_cliplow);
|
||||||
CTATGAT_i = `CLIP_LOW( CTATGAT , `CTAT_cliplow);
|
CTATGAT_i = `CLIP_LOW( CTATGAT , `CTAT_cliplow);
|
||||||
MEFFTATBOT_i = `CLIP_LOW( MEFFTATBOT, `MEFFTAT_cliplow);
|
MEFFTATBOT_i = `CLIP_LOW( MEFFTATBOT, `MEFFTAT_cliplow);
|
||||||
MEFFTATSTI_i = `CLIP_LOW( MEFFTATSTI, `MEFFTAT_cliplow);
|
MEFFTATSTI_i = `CLIP_LOW( MEFFTATSTI, `MEFFTAT_cliplow);
|
||||||
MEFFTATGAT_i = `CLIP_LOW( MEFFTATGAT, `MEFFTAT_cliplow);
|
MEFFTATGAT_i = `CLIP_LOW( MEFFTATGAT, `MEFFTAT_cliplow);
|
||||||
CBBTBOT_i = `CLIP_LOW( CBBTBOT , `CBBT_cliplow);
|
CBBTBOT_i = `CLIP_LOW( CBBTBOT , `CBBT_cliplow);
|
||||||
CBBTSTI_i = `CLIP_LOW( CBBTSTI , `CBBT_cliplow);
|
CBBTSTI_i = `CLIP_LOW( CBBTSTI , `CBBT_cliplow);
|
||||||
CBBTGAT_i = `CLIP_LOW( CBBTGAT , `CBBT_cliplow);
|
CBBTGAT_i = `CLIP_LOW( CBBTGAT , `CBBT_cliplow);
|
||||||
VBRBOT_i = `CLIP_LOW( VBRBOT , `VBR_cliplow);
|
VBRBOT_i = `CLIP_LOW( VBRBOT , `VBR_cliplow);
|
||||||
VBRSTI_i = `CLIP_LOW( VBRSTI , `VBR_cliplow);
|
VBRSTI_i = `CLIP_LOW( VBRSTI , `VBR_cliplow);
|
||||||
VBRGAT_i = `CLIP_LOW( VBRGAT , `VBR_cliplow);
|
VBRGAT_i = `CLIP_LOW( VBRGAT , `VBR_cliplow);
|
||||||
PBRBOT_i = `CLIP_LOW( PBRBOT , `PBR_cliplow);
|
PBRBOT_i = `CLIP_LOW( PBRBOT , `PBR_cliplow);
|
||||||
PBRSTI_i = `CLIP_LOW( PBRSTI , `PBR_cliplow);
|
PBRSTI_i = `CLIP_LOW( PBRSTI , `PBR_cliplow);
|
||||||
PBRGAT_i = `CLIP_LOW( PBRGAT , `PBR_cliplow);
|
PBRGAT_i = `CLIP_LOW( PBRGAT , `PBR_cliplow);
|
||||||
|
|
||||||
tkr = `KELVINCONVERSION + TRJ_i;
|
tkr = `KELVINCONVERSION + TRJ_i;
|
||||||
tkd = max($temperature + DTA, `KELVINCONVERSION + `MINTEMP);
|
tkd = max($temperature + DTA, `KELVINCONVERSION + `MINTEMP);
|
||||||
auxt = tkd / tkr;
|
auxt = tkd / tkr;
|
||||||
KBOL_over_QELE = `KBOL / `QELE;
|
KBOL_over_QELE = `KBOL / `QELE;
|
||||||
phitr = KBOL_over_QELE * tkr;
|
phitr = KBOL_over_QELE * tkr;
|
||||||
phitrinv = 1.0 / phitr;
|
phitrinv = 1.0 / phitr;
|
||||||
phitd = KBOL_over_QELE * tkd;
|
phitd = KBOL_over_QELE * tkd;
|
||||||
phitdinv = 1.0 / phitd;
|
phitdinv = 1.0 / phitd;
|
||||||
|
|
||||||
// bandgap voltages at reference temperature
|
// bandgap voltages at reference temperature
|
||||||
deltaphigr = -(7.02e-4 * tkr * tkr) / (1108.0 + tkr);
|
deltaphigr = -(7.02e-4 * tkr * tkr) / (1108.0 + tkr);
|
||||||
phigrbot = PHIGBOT + deltaphigr;
|
phigrbot = PHIGBOT + deltaphigr;
|
||||||
phigrsti = PHIGSTI + deltaphigr;
|
phigrsti = PHIGSTI + deltaphigr;
|
||||||
phigrgat = PHIGGAT + deltaphigr;
|
phigrgat = PHIGGAT + deltaphigr;
|
||||||
|
|
||||||
// bandgap voltages at device temperature
|
// bandgap voltages at device temperature
|
||||||
deltaphigd = -(7.02e-4 * tkd * tkd) / (1108.0 + tkd);
|
deltaphigd = -(7.02e-4 * tkd * tkd) / (1108.0 + tkd);
|
||||||
phigdbot = PHIGBOT + deltaphigd;
|
phigdbot = PHIGBOT + deltaphigd;
|
||||||
phigdsti = PHIGSTI + deltaphigd;
|
phigdsti = PHIGSTI + deltaphigd;
|
||||||
phigdgat = PHIGGAT + deltaphigd;
|
phigdgat = PHIGGAT + deltaphigd;
|
||||||
|
|
||||||
// factors ftd for ideal-current model
|
// factors ftd for ideal-current model
|
||||||
ftdbot = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot * phitrinv) - (phigdbot * phitdinv)));
|
ftdbot = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot * phitrinv) - (phigdbot * phitdinv)));
|
||||||
ftdsti = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti * phitrinv) - (phigdsti * 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)));
|
ftdgat = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat * phitrinv) - (phigdgat * phitdinv)));
|
||||||
|
|
||||||
// temperature-scaled saturation current for ideal-current model
|
// temperature-scaled saturation current for ideal-current model
|
||||||
idsatbot = IDSATRBOT_i * ftdbot * ftdbot;
|
idsatbot = IDSATRBOT_i * ftdbot * ftdbot;
|
||||||
idsatsti = IDSATRSTI_i * ftdsti * ftdsti;
|
idsatsti = IDSATRSTI_i * ftdsti * ftdsti;
|
||||||
idsatgat = IDSATRGAT_i * ftdgat * ftdgat;
|
idsatgat = IDSATRGAT_i * ftdgat * ftdgat;
|
||||||
|
|
||||||
// built-in voltages before limiting
|
// built-in voltages before limiting
|
||||||
ubibot = VBIRBOT_i * auxt - 2 * phitd * ln(ftdbot);
|
ubibot = VBIRBOT_i * auxt - 2 * phitd * ln(ftdbot);
|
||||||
ubisti = VBIRSTI_i * auxt - 2 * phitd * ln(ftdsti);
|
ubisti = VBIRSTI_i * auxt - 2 * phitd * ln(ftdsti);
|
||||||
ubigat = VBIRGAT_i * auxt - 2 * phitd * ln(ftdgat);
|
ubigat = VBIRGAT_i * auxt - 2 * phitd * ln(ftdgat);
|
||||||
|
|
||||||
// built-in voltages limited to phitd
|
// built-in voltages limited to phitd
|
||||||
vbibot = ubibot + phitd * ln(1 + exp((`vbilow - ubibot) * phitdinv));
|
vbibot = ubibot + phitd * ln(1 + exp((`vbilow - ubibot) * phitdinv));
|
||||||
vbisti = ubisti + phitd * ln(1 + exp((`vbilow - ubisti) * phitdinv));
|
vbisti = ubisti + phitd * ln(1 + exp((`vbilow - ubisti) * phitdinv));
|
||||||
vbigat = ubigat + phitd * ln(1 + exp((`vbilow - ubigat) * phitdinv));
|
vbigat = ubigat + phitd * ln(1 + exp((`vbilow - ubigat) * phitdinv));
|
||||||
|
|
||||||
// inverse values of built-in voltages
|
// inverse values of built-in voltages
|
||||||
vbiinvbot = 1.0 / vbibot;
|
vbiinvbot = 1.0 / vbibot;
|
||||||
vbiinvsti = 1.0 / vbisti;
|
vbiinvsti = 1.0 / vbisti;
|
||||||
vbiinvgat = 1.0 / vbigat;
|
vbiinvgat = 1.0 / vbigat;
|
||||||
|
|
||||||
// one minus the grading coefficient
|
// one minus the grading coefficient
|
||||||
one_minus_PBOT = 1 - PBOT_i;
|
one_minus_PBOT = 1 - PBOT_i;
|
||||||
one_minus_PSTI = 1 - PSTI_i;
|
one_minus_PSTI = 1 - PSTI_i;
|
||||||
one_minus_PGAT = 1 - PGAT_i;
|
one_minus_PGAT = 1 - PGAT_i;
|
||||||
|
|
||||||
// one over "one minus the grading coefficient"
|
// one over "one minus the grading coefficient"
|
||||||
one_over_one_minus_PBOT = 1 / one_minus_PBOT;
|
one_over_one_minus_PBOT = 1 / one_minus_PBOT;
|
||||||
one_over_one_minus_PSTI = 1 / one_minus_PSTI;
|
one_over_one_minus_PSTI = 1 / one_minus_PSTI;
|
||||||
one_over_one_minus_PGAT = 1 / one_minus_PGAT;
|
one_over_one_minus_PGAT = 1 / one_minus_PGAT;
|
||||||
|
|
||||||
// temperature-scaled zero-bias capacitance
|
// temperature-scaled zero-bias capacitance
|
||||||
cjobot = CJORBOT_i * pow((VBIRBOT_i * vbiinvbot), PBOT_i);
|
cjobot = CJORBOT_i * pow((VBIRBOT_i * vbiinvbot), PBOT_i);
|
||||||
cjosti = CJORSTI_i * pow((VBIRSTI_i * vbiinvsti), PSTI_i);
|
cjosti = CJORSTI_i * pow((VBIRSTI_i * vbiinvsti), PSTI_i);
|
||||||
cjogat = CJORGAT_i * pow((VBIRGAT_i * vbiinvgat), PGAT_i);
|
cjogat = CJORGAT_i * pow((VBIRGAT_i * vbiinvgat), PGAT_i);
|
||||||
|
|
||||||
// prefactor in physical part of charge model
|
// prefactor in physical part of charge model
|
||||||
qprefbot = cjobot * vbibot * one_over_one_minus_PBOT;
|
qprefbot = cjobot * vbibot * one_over_one_minus_PBOT;
|
||||||
qprefsti = cjosti * vbisti * one_over_one_minus_PSTI;
|
qprefsti = cjosti * vbisti * one_over_one_minus_PSTI;
|
||||||
qprefgat = cjogat * vbigat * one_over_one_minus_PGAT;
|
qprefgat = cjogat * vbigat * one_over_one_minus_PGAT;
|
||||||
|
|
||||||
// prefactor in mathematical extension of charge model
|
// prefactor in mathematical extension of charge model
|
||||||
qpref2bot = `a * cjobot;
|
qpref2bot = `a * cjobot;
|
||||||
qpref2sti = `a * cjosti;
|
qpref2sti = `a * cjosti;
|
||||||
qpref2gat = `a * cjogat;
|
qpref2gat = `a * cjogat;
|
||||||
|
|
||||||
// zero-bias depletion widths at reference temperature, needed in SRH and TAT model
|
// zero-bias depletion widths at reference temperature, needed in SRH and TAT model
|
||||||
wdepnulrbot = `EPSSI / CJORBOT_i;
|
wdepnulrbot = `EPSSI / CJORBOT_i;
|
||||||
wdepnulrsti = XJUNSTI_i * `EPSSI / CJORSTI_i;
|
wdepnulrsti = XJUNSTI_i * `EPSSI / CJORSTI_i;
|
||||||
wdepnulrgat = XJUNGAT_i * `EPSSI / CJORGAT_i;
|
wdepnulrgat = XJUNGAT_i * `EPSSI / CJORGAT_i;
|
||||||
|
|
||||||
// inverse values of "wdepnulr", used in BBT model
|
// inverse values of "wdepnulr", used in BBT model
|
||||||
wdepnulrinvbot = 1 / wdepnulrbot;
|
wdepnulrinvbot = 1 / wdepnulrbot;
|
||||||
wdepnulrinvsti = 1 / wdepnulrsti;
|
wdepnulrinvsti = 1 / wdepnulrsti;
|
||||||
wdepnulrinvgat = 1 / wdepnulrgat;
|
wdepnulrinvgat = 1 / wdepnulrgat;
|
||||||
|
|
||||||
// inverse values of built-in voltages at reference temperature, needed in SRH and BBT model
|
// inverse values of built-in voltages at reference temperature, needed in SRH and BBT model
|
||||||
VBIRBOTinv = 1 / VBIRBOT_i;
|
VBIRBOTinv = 1 / VBIRBOT_i;
|
||||||
VBIRSTIinv = 1 / VBIRSTI_i;
|
VBIRSTIinv = 1 / VBIRSTI_i;
|
||||||
VBIRGATinv = 1 / VBIRGAT_i;
|
VBIRGATinv = 1 / VBIRGAT_i;
|
||||||
|
|
||||||
// some constants needed in erfc-approximation, needed in TAT model
|
// some constants needed in erfc-approximation, needed in TAT model
|
||||||
perfc = (`SQRTPI * `aerfc);
|
perfc = (`SQRTPI * `aerfc);
|
||||||
berfc = ((-5 * (`aerfc) + 6 - pow((perfc), -2)) / 3);
|
berfc = ((-5 * (`aerfc) + 6 - pow((perfc), -2)) / 3);
|
||||||
cerfc = (1.0 - (`aerfc) - (berfc));
|
cerfc = (1.0 - (`aerfc) - (berfc));
|
||||||
|
|
||||||
// half the bandgap energy, limited to values > phitd, needed in TAT model
|
// half the bandgap energy, limited to values > phitd, needed in TAT model
|
||||||
deltaEbot = max(0.5 * phigdbot, phitd);
|
deltaEbot = max(0.5 * phigdbot, phitd);
|
||||||
deltaEsti = max(0.5 * phigdsti, phitd);
|
deltaEsti = max(0.5 * phigdsti, phitd);
|
||||||
deltaEgat = max(0.5 * phigdgat, phitd);
|
deltaEgat = max(0.5 * phigdgat, phitd);
|
||||||
|
|
||||||
// values of atat, needed in TAT model
|
// values of atat, needed in TAT model
|
||||||
atatbot = deltaEbot * phitdinv;
|
atatbot = deltaEbot * phitdinv;
|
||||||
atatsti = deltaEsti * phitdinv;
|
atatsti = deltaEsti * phitdinv;
|
||||||
atatgat = deltaEgat * phitdinv;
|
atatgat = deltaEgat * phitdinv;
|
||||||
|
|
||||||
// values of btatpart, needed in TAT model
|
// values of btatpart, needed in TAT model
|
||||||
btatpartbot = sqrt(32 * MEFFTATBOT_i * `MELE * `QELE * (deltaEbot * deltaEbot * deltaEbot)) / (3 * `HBAR);
|
btatpartbot = sqrt(32 * MEFFTATBOT_i * `MELE * `QELE * (deltaEbot * deltaEbot * deltaEbot)) / (3 * `HBAR);
|
||||||
btatpartsti = sqrt(32 * MEFFTATSTI_i * `MELE * `QELE * (deltaEsti * deltaEsti * deltaEsti)) / (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);
|
btatpartgat = sqrt(32 * MEFFTATGAT_i * `MELE * `QELE * (deltaEgat * deltaEgat * deltaEgat)) / (3 * `HBAR);
|
||||||
|
|
||||||
// temperature-scaled values of FBBT, needed in BBT model
|
// temperature-scaled values of FBBT, needed in BBT model
|
||||||
fbbtbot = FBBTRBOT * (1 + STFBBTBOT * (tkd - tkr));
|
fbbtbot = FBBTRBOT * (1 + STFBBTBOT * (tkd - tkr));
|
||||||
fbbtsti = FBBTRSTI * (1 + STFBBTSTI * (tkd - tkr));
|
fbbtsti = FBBTRSTI * (1 + STFBBTSTI * (tkd - tkr));
|
||||||
fbbtgat = FBBTRGAT * (1 + STFBBTGAT * (tkd - tkr));
|
fbbtgat = FBBTRGAT * (1 + STFBBTGAT * (tkd - tkr));
|
||||||
|
|
||||||
// values of fstop, needed in avalanche/breakdown model
|
// values of fstop, needed in avalanche/breakdown model
|
||||||
fstopbot = 1 / (1 - pow(`alphaav, PBRBOT_i));
|
fstopbot = 1 / (1 - pow(`alphaav, PBRBOT_i));
|
||||||
fstopsti = 1 / (1 - pow(`alphaav, PBRSTI_i));
|
fstopsti = 1 / (1 - pow(`alphaav, PBRSTI_i));
|
||||||
fstopgat = 1 / (1 - pow(`alphaav, PBRGAT_i));
|
fstopgat = 1 / (1 - pow(`alphaav, PBRGAT_i));
|
||||||
|
|
||||||
// inverse values of breakdown voltages, needed in avalanche/breakdown model
|
// inverse values of breakdown voltages, needed in avalanche/breakdown model
|
||||||
VBRinvbot = 1 / VBRBOT_i;
|
VBRinvbot = 1 / VBRBOT_i;
|
||||||
VBRinvsti = 1 / VBRSTI_i;
|
VBRinvsti = 1 / VBRSTI_i;
|
||||||
VBRinvgat = 1 / VBRGAT_i;
|
VBRinvgat = 1 / VBRGAT_i;
|
||||||
|
|
||||||
// slopes for linear extraploation close to and beyond breakdown, needed in avalanche/breakdown model
|
// 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;
|
slopebot = -(fstopbot * fstopbot * pow(`alphaav, (PBRBOT_i - 1))) * PBRBOT_i * VBRinvbot;
|
||||||
slopesti = -(fstopsti * fstopsti * pow(`alphaav, (PBRSTI_i - 1))) * PBRSTI_i * VBRinvsti;
|
slopesti = -(fstopsti * fstopsti * pow(`alphaav, (PBRSTI_i - 1))) * PBRSTI_i * VBRinvsti;
|
||||||
slopegat = -(fstopgat * fstopgat * pow(`alphaav, (PBRGAT_i - 1))) * PBRGAT_i * VBRinvgat;
|
slopegat = -(fstopgat * fstopgat * pow(`alphaav, (PBRGAT_i - 1))) * PBRGAT_i * VBRinvgat;
|
||||||
|
|
|
||||||
|
|
@ -73,166 +73,166 @@
|
||||||
// Instance parameter dependent initialization
|
// Instance parameter dependent initialization
|
||||||
|
|
||||||
`define JuncapInitInstance(AB_i, LS_i, LG_i, VMAX, vbimin, vch, vfmin, vbbtlim) \
|
`define JuncapInitInstance(AB_i, LS_i, LG_i, VMAX, vbimin, vch, vfmin, vbbtlim) \
|
||||||
if (idsatbot * AB_i > 0) begin \
|
if (idsatbot * AB_i > 0) begin \
|
||||||
vmaxbot = phitd * ln(IMAX_i / (idsatbot * AB_i) + 1); \
|
vmaxbot = phitd * ln(IMAX_i / (idsatbot * AB_i) + 1); \
|
||||||
end else begin \
|
end else begin \
|
||||||
vmaxbot = `vmaxlarge; \
|
vmaxbot = `vmaxlarge; \
|
||||||
end \
|
end \
|
||||||
if (idsatsti * LS_i > 0) begin \
|
if (idsatsti * LS_i > 0) begin \
|
||||||
vmaxsti = phitd * ln(IMAX_i / (idsatsti * LS_i) + 1); \
|
vmaxsti = phitd * ln(IMAX_i / (idsatsti * LS_i) + 1); \
|
||||||
end else begin \
|
end else begin \
|
||||||
vmaxsti = `vmaxlarge; \
|
vmaxsti = `vmaxlarge; \
|
||||||
end \
|
end \
|
||||||
if (idsatgat * LG_i > 0) begin \
|
if (idsatgat * LG_i > 0) begin \
|
||||||
vmaxgat = phitd * ln(IMAX_i / (idsatgat * LG_i) + 1); \
|
vmaxgat = phitd * ln(IMAX_i / (idsatgat * LG_i) + 1); \
|
||||||
end else begin \
|
end else begin \
|
||||||
vmaxgat = `vmaxlarge; \
|
vmaxgat = `vmaxlarge; \
|
||||||
end \
|
end \
|
||||||
VMAX = min(min(vmaxbot, vmaxsti), vmaxgat); \
|
VMAX = min(min(vmaxbot, vmaxsti), vmaxgat); \
|
||||||
\
|
\
|
||||||
/* determination of minimum value of the relevant built-in voltages */ \
|
/* determination of minimum value of the relevant built-in voltages */ \
|
||||||
vbibot2 = vbibot; \
|
vbibot2 = vbibot; \
|
||||||
vbisti2 = vbisti; \
|
vbisti2 = vbisti; \
|
||||||
vbigat2 = vbigat; \
|
vbigat2 = vbigat; \
|
||||||
if (AB_i == 0) begin vbibot2 = vbisti + vbigat; end \
|
if (AB_i == 0) begin vbibot2 = vbisti + vbigat; end \
|
||||||
if (LS_i == 0) begin vbisti2 = vbibot + vbigat; end \
|
if (LS_i == 0) begin vbisti2 = vbibot + vbigat; end \
|
||||||
if (LG_i == 0) begin vbigat2 = vbibot + vbisti; end \
|
if (LG_i == 0) begin vbigat2 = vbibot + vbisti; end \
|
||||||
vbimin = min(min(vbibot2, vbisti2), vbigat2); \
|
vbimin = min(min(vbibot2, vbisti2), vbigat2); \
|
||||||
vch = vbimin * `epsch; \
|
vch = vbimin * `epsch; \
|
||||||
if (vbimin == vbibot) begin vfmin = vbibot * (1 - (pow(`a, (-1.0 / PBOT_i)))); end \
|
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 == 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 \
|
if (vbimin == vbigat) begin vfmin = vbigat * (1 - (pow(`a, (-1.0 / PGAT_i)))); end \
|
||||||
\
|
\
|
||||||
/* determination of limiting value of conditioned voltage for BBT calculation */ \
|
/* determination of limiting value of conditioned voltage for BBT calculation */ \
|
||||||
vbibot2r = VBIRBOT_i; \
|
vbibot2r = VBIRBOT_i; \
|
||||||
vbisti2r = VBIRSTI_i; \
|
vbisti2r = VBIRSTI_i; \
|
||||||
vbigat2r = VBIRGAT_i; \
|
vbigat2r = VBIRGAT_i; \
|
||||||
if (AB_i == 0) begin vbibot2r = VBIRSTI_i + VBIRGAT_i; end \
|
if (AB_i == 0) begin vbibot2r = VBIRSTI_i + VBIRGAT_i; end \
|
||||||
if (LS_i == 0) begin vbisti2r = VBIRBOT_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 \
|
if (LG_i == 0) begin vbigat2r = VBIRBOT_i + VBIRSTI_i; end \
|
||||||
vbbtlim = min(min(vbibot2r, vbisti2r), vbigat2r) - `dvbi; \
|
vbbtlim = min(min(vbibot2r, vbisti2r), vbigat2r) - `dvbi; \
|
||||||
|
|
||||||
|
|
||||||
// Special power-functions
|
// Special power-functions
|
||||||
|
|
||||||
`define mypower(x,power,result) \
|
`define mypower(x,power,result) \
|
||||||
if (power == 0.5) begin \
|
if (power == 0.5) begin \
|
||||||
result = sqrt(x); \
|
result = sqrt(x); \
|
||||||
end else begin \
|
end else begin \
|
||||||
result = pow(x, power); \
|
result = pow(x, power); \
|
||||||
end
|
end
|
||||||
|
|
||||||
`define mypower2(x,power,result) \
|
`define mypower2(x,power,result) \
|
||||||
if (power == -1) begin \
|
if (power == -1) begin \
|
||||||
result = 1 / (x); \
|
result = 1 / (x); \
|
||||||
end else begin \
|
end else begin \
|
||||||
result = pow(x, power); \
|
result = pow(x, power); \
|
||||||
end
|
end
|
||||||
|
|
||||||
`define mypower3(x,power,result) \
|
`define mypower3(x,power,result) \
|
||||||
if (power == 4) begin \
|
if (power == 4) begin \
|
||||||
result = (x) * (x) * (x) * (x); \
|
result = (x) * (x) * (x) * (x); \
|
||||||
end else begin \
|
end else begin \
|
||||||
result = pow(x, power); \
|
result = pow(x, power); \
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// Smoothing functions
|
// Smoothing functions
|
||||||
|
|
||||||
`define hypfunction2(x,x0,eps,hyp2) \
|
`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) \
|
`define hypfunction5(x,x0,eps,hyp5) \
|
||||||
h1 = 4.0 * (eps) * (eps); \
|
h1 = 4.0 * (eps) * (eps); \
|
||||||
h2 = (eps) / (x0); \
|
h2 = (eps) / (x0); \
|
||||||
h2d = (x) + (eps) * h2; \
|
h2d = (x) + (eps) * h2; \
|
||||||
h3 = (x0) + h2d; \
|
h3 = (x0) + h2d; \
|
||||||
h4 = (x0) - h2d; \
|
h4 = (x0) - h2d; \
|
||||||
h5 = sqrt(h4 * h4 + h1); \
|
h5 = sqrt(h4 * h4 + h1); \
|
||||||
hyp5 = 2.0 * ((x) * (x0) / (h3 + h5));
|
hyp5 = 2.0 * ((x) * (x0) / (h3 + h5));
|
||||||
|
|
||||||
|
|
||||||
// A special function used to calculate TAT-currents,
|
// A special function used to calculate TAT-currents,
|
||||||
// including an approximation of the erfc-function
|
// including an approximation of the erfc-function
|
||||||
|
|
||||||
`define calcerfcexpmtat(y,m,result) \
|
`define calcerfcexpmtat(y,m,result) \
|
||||||
ysq = y * y; \
|
ysq = y * y; \
|
||||||
if (y > 0) begin \
|
if (y > 0) begin \
|
||||||
terfc = 1 / (1 + perfc * y); \
|
terfc = 1 / (1 + perfc * y); \
|
||||||
end else begin \
|
end else begin \
|
||||||
terfc = 1 / (1 - perfc * y); \
|
terfc = 1 / (1 - perfc * y); \
|
||||||
end \
|
end \
|
||||||
`expl_low(-ysq + m, tmp) \
|
`expl_low(-ysq + m, tmp) \
|
||||||
erfcpos = (`aerfc * terfc + berfc * (terfc * terfc) + cerfc * (terfc * terfc * terfc)) * tmp; \
|
erfcpos = (`aerfc * terfc + berfc * (terfc * terfc) + cerfc * (terfc * terfc * terfc)) * tmp; \
|
||||||
if (y > 0) begin \
|
if (y > 0) begin \
|
||||||
result = erfcpos; \
|
result = erfcpos; \
|
||||||
end else begin\
|
end else begin\
|
||||||
`expl_low(m, tmp) \
|
`expl_low(m, tmp) \
|
||||||
result = 2 * tmp - erfcpos; \
|
result = 2 * tmp - erfcpos; \
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
// This is the main function of the JUNCAP2-model. It returns the current and charge
|
// This is the main function of the JUNCAP2-model. It returns the current and charge
|
||||||
// for a single diode
|
// 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) \
|
`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) \
|
`mypower((1 - vj * vbiinv), one_minus_P, tmp) \
|
||||||
Qjprime = qpref * (1 - tmp) + qpref2 * (VAK - vj); \
|
Qjprime = qpref * (1 - tmp) + qpref2 * (VAK - vj); \
|
||||||
id = idsat * idmult; \
|
id = idsat * idmult; \
|
||||||
if ((CSRH == 0) && (CTAT == 0)) begin \
|
if ((CSRH == 0) && (CTAT == 0)) begin \
|
||||||
isrh = 0; \
|
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; \
|
|
||||||
end else begin \
|
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 \
|
end \
|
||||||
wsrh = wsrhstep + dwsrh; \
|
if (CTAT == 0) begin \
|
||||||
`mypower(vbi_minus_vjsrh * VBIRinv, P, tmp) \
|
itat = 0; \
|
||||||
wdep = wdepnulr * tmp; \
|
end else begin \
|
||||||
asrh = ftd * ((zinv - 1) * wdep); \
|
btat = btatpart * ((wdep * one_minus_P) / vbi_minus_vjsrh); \
|
||||||
isrh = CSRH * (asrh * wsrh); \
|
twoatatoverthreebtat = (`twothirds * atat) / btat; \
|
||||||
end \
|
umaxbeforelimiting = twoatatoverthreebtat * twoatatoverthreebtat; \
|
||||||
if (CTAT == 0) begin \
|
umax = sqrt(umaxbeforelimiting * umaxbeforelimiting / (umaxbeforelimiting * umaxbeforelimiting + 1)); \
|
||||||
itat = 0; \
|
sqrtumax = sqrt(abs(umax)); \
|
||||||
end else begin \
|
umaxpoweronepointfive = umax * sqrtumax; \
|
||||||
btat = btatpart * ((wdep * one_minus_P) / vbi_minus_vjsrh); \
|
`mypower2((1 + btat * umaxpoweronepointfive), (-P * one_over_one_minus_P), wgamma) \
|
||||||
twoatatoverthreebtat = (`twothirds * atat) / btat; \
|
wtat = wsrh * wgamma / (wsrh + wgamma); \
|
||||||
umaxbeforelimiting = twoatatoverthreebtat * twoatatoverthreebtat; \
|
ktat = sqrt(0.375 * (btat / sqrtumax)); \
|
||||||
umax = sqrt(umaxbeforelimiting * umaxbeforelimiting / (umaxbeforelimiting * umaxbeforelimiting + 1)); \
|
ltat = 2 * (twoatatoverthreebtat * sqrtumax) - umax; \
|
||||||
sqrtumax = sqrt(abs(umax)); \
|
mtat = atat * twoatatoverthreebtat * sqrtumax - atat * umax + 0.5 * (btat * umaxpoweronepointfive); \
|
||||||
umaxpoweronepointfive = umax * sqrtumax; \
|
xerfc = (ltat - 1) * ktat; \
|
||||||
`mypower2((1 + btat * umaxpoweronepointfive), (-P * one_over_one_minus_P), wgamma) \
|
`calcerfcexpmtat(xerfc, mtat, erfctimesexpmtat) \
|
||||||
wtat = wsrh * wgamma / (wsrh + wgamma); \
|
gammamax = `SQRTPI * 0.5 * (atat * erfctimesexpmtat / ktat); \
|
||||||
ktat = sqrt(0.375 * (btat / sqrtumax)); \
|
itat = CTAT * (asrh * gammamax * wtat); \
|
||||||
ltat = 2 * (twoatatoverthreebtat * sqrtumax) - umax; \
|
end \
|
||||||
mtat = atat * twoatatoverthreebtat * sqrtumax - atat * umax + 0.5 * (btat * umaxpoweronepointfive); \
|
if (CBBT == 0) begin \
|
||||||
xerfc = (ltat - 1) * ktat; \
|
ibbt = 0; \
|
||||||
`calcerfcexpmtat(xerfc, mtat, erfctimesexpmtat) \
|
end else begin \
|
||||||
gammamax = `SQRTPI * 0.5 * (atat * erfctimesexpmtat / ktat); \
|
`mypower(((VBIR - vbbt) * VBIRinv), P, tmp) \
|
||||||
itat = CTAT * (asrh * gammamax * wtat); \
|
Fmaxr = one_over_one_minus_P * ((VBIR - vbbt) * wdepnulrinv / tmp); \
|
||||||
end \
|
`expl(-fbbt / Fmaxr, tmp) \
|
||||||
if (CBBT == 0) begin \
|
ibbt = CBBT * (VAK * Fmaxr * Fmaxr * tmp); \
|
||||||
ibbt = 0; \
|
end \
|
||||||
end else begin \
|
if (VBR > `vbrmax) begin \
|
||||||
`mypower(((VBIR - vbbt) * VBIRinv), P, tmp) \
|
fbreakdown = 1; \
|
||||||
Fmaxr = one_over_one_minus_P * ((VBIR - vbbt) * wdepnulrinv / tmp); \
|
end else begin \
|
||||||
`expl(-fbbt / Fmaxr, tmp) \
|
if (vav > -`alphaav * VBR) begin \
|
||||||
ibbt = CBBT * (VAK * Fmaxr * Fmaxr * tmp); \
|
`mypower3(abs(vav * VBRinv), PBR, tmp) \
|
||||||
end \
|
fbreakdown = 1 / (1 - tmp); \
|
||||||
if (VBR > `vbrmax) begin \
|
end else begin \
|
||||||
fbreakdown = 1; \
|
fbreakdown = fstop + (vav + `alphaav * VBR) * slope; \
|
||||||
end else begin \
|
end \
|
||||||
if (vav > -`alphaav * VBR) begin \
|
end \
|
||||||
`mypower3(abs(vav * VBRinv), PBR, tmp) \
|
Ijprime = (id + isrh + itat + ibbt) * fbreakdown;
|
||||||
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
|
// 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
|
// drain junction in PSP
|
||||||
|
|
||||||
`define juncapcommon(AB_i,LS_i,LG_i,ijunbot,qjunbot,ijunsti,qjunsti,ijungat,qjungat) \
|
`define juncapcommon(AB_i,LS_i,LG_i,ijunbot,qjunbot,ijunsti,qjunsti,ijungat,qjungat) \
|
||||||
vbbt = 0.0; \
|
vbbt = 0.0; \
|
||||||
two_psistar = 0.0; \
|
two_psistar = 0.0; \
|
||||||
if ( !( ((AB_i) == 0) && ((LS_i) == 0) && ((LG_i) == 0) ) ) begin \
|
if ( !( ((AB_i) == 0) && ((LS_i) == 0) && ((LG_i) == 0) ) ) begin \
|
||||||
`hypfunction5(VAK, vfmin, vch, vj) \
|
`hypfunction5(VAK, vfmin, vch, vj) \
|
||||||
if (VAK < VMAX) begin \
|
if (VAK < VMAX) begin \
|
||||||
`expl(0.5 * (VAK * phitdinv), zinv) \
|
`expl(0.5 * (VAK * phitdinv), zinv) \
|
||||||
idmult = zinv * zinv; \
|
idmult = zinv * zinv; \
|
||||||
end else begin \
|
end else begin \
|
||||||
`expl(VMAX * phitdinv, exp_VMAX_over_phitd) \
|
`expl(VMAX * phitdinv, exp_VMAX_over_phitd) \
|
||||||
idmult = (1 + (VAK - VMAX) * phitdinv) * exp_VMAX_over_phitd; \
|
idmult = (1 + (VAK - VMAX) * phitdinv) * exp_VMAX_over_phitd; \
|
||||||
zinv = sqrt(idmult); \
|
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 \
|
end \
|
||||||
idmult = idmult - 1.0; \
|
if ((AB_i) == 0) begin \
|
||||||
z = 1 / zinv; \
|
ijunbot = 0; \
|
||||||
if (VAK > 0) begin \
|
qjunbot = 0; \
|
||||||
two_psistar = 2.0 * (phitd * ln(2.0 + z + sqrt((z + 1.0) * (z + 3.0)))); \
|
|
||||||
end else begin \
|
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 \
|
end \
|
||||||
vjlim = vbimin - two_psistar; \
|
if ((LS_i) == 0) begin \
|
||||||
`hypfunction2(VAK, vjlim, phitd, vjsrh) \
|
ijunsti = 0; \
|
||||||
`hypfunction2(VAK, vbbtlim, phitr, vbbt) \
|
qjunsti = 0; \
|
||||||
`hypfunction2(VAK, 0, `epsav, vav) \
|
end else begin \
|
||||||
end \
|
`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) \
|
||||||
if ((AB_i) == 0) begin \
|
end \
|
||||||
ijunbot = 0; \
|
if ((LG_i) == 0) begin \
|
||||||
qjunbot = 0; \
|
ijungat = 0; \
|
||||||
end else begin \
|
qjungat = 0; \
|
||||||
`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 else begin \
|
||||||
end \
|
`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) \
|
||||||
if ((LS_i) == 0) begin \
|
end
|
||||||
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
|
|
||||||
|
|
|
||||||
|
|
@ -15,51 +15,51 @@
|
||||||
// Further information can be found in the file readme.txt
|
// 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 PBRGAT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of gate-edge component" unit="V" );
|
||||||
|
|
|
||||||
|
|
@ -16,52 +16,52 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
// declaration of variables needed in macro "calcerfcexpmtat"
|
// declaration of variables needed in macro "calcerfcexpmtat"
|
||||||
real ysq, terfc, erfcpos;
|
real ysq, terfc, erfcpos;
|
||||||
|
|
||||||
// declaration of variables needed in hypfunction 5
|
// declaration of variables needed in hypfunction 5
|
||||||
real h1, h2, h2d, h3, h4, h5;
|
real h1, h2, h2d, h3, h4, h5;
|
||||||
|
|
||||||
// declaration of variables used within macro "juncapfunction"
|
// declaration of variables used within macro "juncapfunction"
|
||||||
real tmp, id;
|
real tmp, id;
|
||||||
real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh;
|
real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh;
|
||||||
real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive;
|
real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive;
|
||||||
real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax;
|
real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax;
|
||||||
real ibbt, Fmaxr;
|
real ibbt, Fmaxr;
|
||||||
real fbreakdown;
|
real fbreakdown;
|
||||||
|
|
||||||
// declaration of clipped parameters
|
// declaration of clipped parameters
|
||||||
real TRJ_i, IMAX_i;
|
real TRJ_i, IMAX_i;
|
||||||
real CJORBOT_i, CJORSTI_i, CJORGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i;
|
real CJORBOT_i, CJORSTI_i, CJORGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i;
|
||||||
real PBOT_i, PSTI_i, PGAT_i;
|
real PBOT_i, PSTI_i, PGAT_i;
|
||||||
real IDSATRBOT_i, IDSATRSTI_i, IDSATRGAT_i, XJUNSTI_i, XJUNGAT_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 CSRHBOT_i, CSRHSTI_i, CSRHGAT_i, CTATBOT_i, CTATSTI_i, CTATGAT_i;
|
||||||
real MEFFTATBOT_i, MEFFTATSTI_i, MEFFTATGAT_i;
|
real MEFFTATBOT_i, MEFFTATSTI_i, MEFFTATGAT_i;
|
||||||
real CBBTBOT_i, CBBTSTI_i, CBBTGAT_i;
|
real CBBTBOT_i, CBBTSTI_i, CBBTGAT_i;
|
||||||
real VBRBOT_i, VBRSTI_i, VBRGAT_i, PBRBOT_i, PBRSTI_i, PBRGAT_i;
|
real VBRBOT_i, VBRSTI_i, VBRGAT_i, PBRBOT_i, PBRSTI_i, PBRGAT_i;
|
||||||
|
|
||||||
// declaration of variables calculated outside macro "juncapfunction", voltage-independent part
|
// declaration of variables calculated outside macro "juncapfunction", voltage-independent part
|
||||||
real tkr, tkd, auxt, KBOL_over_QELE, phitr, phitrinv, phitd, phitdinv;
|
real tkr, tkd, auxt, KBOL_over_QELE, phitr, phitrinv, phitd, phitdinv;
|
||||||
real deltaphigr, phigrbot, phigrsti, phigrgat, deltaphigd, phigdbot, phigdsti, phigdgat;
|
real deltaphigr, phigrbot, phigrsti, phigrgat, deltaphigd, phigdbot, phigdsti, phigdgat;
|
||||||
real ftdbot, ftdsti, ftdgat, idsatbot, idsatsti, idsatgat, exp_VMAX_over_phitd;
|
real ftdbot, ftdsti, ftdgat, idsatbot, idsatsti, idsatgat, exp_VMAX_over_phitd;
|
||||||
real ubibot, ubisti, ubigat, vbibot, vbisti, vbigat;
|
real ubibot, ubisti, ubigat, vbibot, vbisti, vbigat;
|
||||||
real vbibot2, vbisti2, vbigat2, vbibot2r, vbisti2r, vbigat2r;
|
real vbibot2, vbisti2, vbigat2, vbibot2r, vbisti2r, vbigat2r;
|
||||||
real vbiinvbot, vbiinvsti, vbiinvgat;
|
real vbiinvbot, vbiinvsti, vbiinvgat;
|
||||||
real one_minus_PBOT, one_minus_PSTI, one_minus_PGAT;
|
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 one_over_one_minus_PBOT, one_over_one_minus_PSTI, one_over_one_minus_PGAT;
|
||||||
real cjobot, cjosti, cjogat, qprefbot, qprefsti, qprefgat;
|
real cjobot, cjosti, cjogat, qprefbot, qprefsti, qprefgat;
|
||||||
real vbimin, vch, vfmin, vbbtlim;
|
real vbimin, vch, vfmin, vbbtlim;
|
||||||
real qpref2bot, qpref2sti, qpref2gat;
|
real qpref2bot, qpref2sti, qpref2gat;
|
||||||
real wdepnulrbot, wdepnulrsti, wdepnulrgat, wdepnulrinvbot, wdepnulrinvsti, wdepnulrinvgat;
|
real wdepnulrbot, wdepnulrsti, wdepnulrgat, wdepnulrinvbot, wdepnulrinvsti, wdepnulrinvgat;
|
||||||
real VBIRBOTinv, VBIRSTIinv, VBIRGATinv;
|
real VBIRBOTinv, VBIRSTIinv, VBIRGATinv;
|
||||||
real perfc, berfc, cerfc;
|
real perfc, berfc, cerfc;
|
||||||
real deltaEbot, deltaEsti, deltaEgat, atatbot, atatsti, atatgat;
|
real deltaEbot, deltaEsti, deltaEgat, atatbot, atatsti, atatgat;
|
||||||
real btatpartbot, btatpartsti, btatpartgat;
|
real btatpartbot, btatpartsti, btatpartgat;
|
||||||
real fbbtbot, fbbtsti, fbbtgat;
|
real fbbtbot, fbbtsti, fbbtgat;
|
||||||
real fstopbot, fstopsti, fstopgat, VBRinvbot, VBRinvsti, VBRinvgat;
|
real fstopbot, fstopsti, fstopgat, VBRinvbot, VBRinvsti, VBRinvgat;
|
||||||
real slopebot, slopesti, slopegat;
|
real slopebot, slopesti, slopegat;
|
||||||
real vmaxbot, vmaxsti, vmaxgat, VMAX;
|
real vmaxbot, vmaxsti, vmaxgat, VMAX;
|
||||||
|
|
||||||
// declaration of variables calculated outside macro "juncapfunction", voltage-dependent part
|
// declaration of variables calculated outside macro "juncapfunction", voltage-dependent part
|
||||||
real VAK, idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav;
|
real VAK, idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,59 +72,106 @@
|
||||||
// (one call uses expressions for arguments so parentheses
|
// (one call uses expressions for arguments so parentheses
|
||||||
// around the arguments in the expressions are necessary)
|
// around the arguments in the expressions are necessary)
|
||||||
`define sigma(a,c,tau,eta,y) \
|
`define sigma(a,c,tau,eta,y) \
|
||||||
nu = (a) + (c); \
|
nu = (a) + (c); \
|
||||||
mu = nu * nu / (tau) + 0.5 * ((c) * (c)) - (a); \
|
mu = nu * nu / (tau) + 0.5 * ((c) * (c)) - (a); \
|
||||||
y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a)));
|
y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a)));
|
||||||
|
|
||||||
|
|
||||||
// modified version of sigma, which takes 4 arguments
|
// modified version of sigma, which takes 4 arguments
|
||||||
`define sigma2(a,b,c,tau,eta,y) \
|
`define sigma2(a,b,c,tau,eta,y) \
|
||||||
nu = (a) + (c); \
|
nu = (a) + (c); \
|
||||||
if (abs(tau) < 1e-120) begin /*sometimes tau is extremely small...*/\
|
if (abs(tau) < 1e-120) begin /*sometimes tau is extremely small...*/\
|
||||||
y = (eta); \
|
y = (eta); \
|
||||||
end else begin \
|
end else begin \
|
||||||
mu = (nu) * (nu) / (tau) + 0.5 * ((c) * (c)) - (a) * (b); \
|
mu = (nu) * (nu) / (tau) + 0.5 * ((c) * (c)) - (a) * (b); \
|
||||||
y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a) * (b))); \
|
y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a) * (b))); \
|
||||||
end
|
end
|
||||||
|
|
||||||
//
|
//
|
||||||
// sp_s surface potential calculation
|
// sp_s surface potential calculation
|
||||||
//
|
//
|
||||||
`define sp_s(sp,xg,xn,delta) \
|
`define sp_s(sp,xg,xn,delta) \
|
||||||
if (abs(xg) <= margin) begin \
|
if (abs(xg) <= margin) begin \
|
||||||
SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
|
SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \
|
||||||
sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \
|
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))); \
|
|
||||||
end else begin \
|
end else begin \
|
||||||
SP_xg1 = 1.0 / (x1 + Gf * 7.324648775608221e-001); \
|
if (xg < -margin) begin \
|
||||||
SP_S_A_fac= (xi * x1 * SP_xg1 - 1.0) * SP_xg1; \
|
SP_S_yg = -xg; \
|
||||||
SP_S_xbar = xg * inv_xi * (1.0 + SP_S_A_fac * xg); \
|
SP_S_ysub = 1.25 * (SP_S_yg * inv_xi); \
|
||||||
`expl_low(-SP_S_xbar, SP_S_temp) \
|
SP_S_eta = 0.5 * (SP_S_ysub + 10 - sqrt((SP_S_ysub - 6.0) * (SP_S_ysub - 6.0) + 64.0)); \
|
||||||
SP_S_w = 1.0 - SP_S_temp; \
|
SP_S_temp = SP_S_yg - SP_S_eta; \
|
||||||
SP_S_x1 = xg + Gf2 * 0.5 - Gf * sqrt(xg + Gf2 * 0.25 - SP_S_w); \
|
SP_S_a = SP_S_temp * SP_S_temp + Gf2*(SP_S_eta + 1.0);\
|
||||||
SP_S_bx = (xn) + 3.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_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_temp = xg - SP_S_eta; \
|
||||||
SP_S_temp1= exp(-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_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_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_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_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_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_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_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))); \
|
sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp)));\
|
||||||
end \
|
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_ov surface potential calculation for the overlap regions
|
// sp_ov surface potential calculation for the overlap regions
|
||||||
//
|
//
|
||||||
`define sp_ov(sp,xg) \
|
`define sp_ov(sp,xg) \
|
||||||
if (abs(xg) <= x_mrg_ov) begin \
|
if (abs(xg) <= x_mrg_ov) begin \
|
||||||
sp = (-(xg) * inv_xi_ov); \
|
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); \
|
|
||||||
end else begin \
|
end else begin \
|
||||||
SP_OV_Afac = (xi_ov * x1 * inv_xg1 - 1.0) * inv_xg1; \
|
if (xg < -x_mrg_ov) begin \
|
||||||
SP_OV_xbar = xg * inv_xi_ov * (1.0 + SP_OV_Afac * xg); \
|
SP_OV_yg = -xg; \
|
||||||
`expl_low(-SP_OV_xbar, SP_OV_temp) \
|
SP_OV_z = x1 * SP_OV_yg * inv_xi_ov; \
|
||||||
SP_OV_w = 1.0 - SP_OV_temp; \
|
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_x0 = xg + GOV2 * 0.5 - GOV * sqrt(xg + GOV2 * 0.25 - SP_OV_w); \
|
SP_OV_a = (SP_OV_yg - SP_OV_eta) * (SP_OV_yg - SP_OV_eta) + GOV2 * (SP_OV_eta + 1.0); \
|
||||||
`expl_low(-SP_OV_x0, SP_OV_D0) \
|
SP_OV_c = 2.0 * (SP_OV_yg - SP_OV_eta) - GOV2; \
|
||||||
SP_OV_p = 2.0 * (xg - SP_OV_x0) + GOV2 * (1 - SP_OV_D0); \
|
SP_OV_tau = ln(SP_OV_a / GOV2) - SP_OV_eta; \
|
||||||
SP_OV_q = (xg - SP_OV_x0) * (xg - SP_OV_x0) - GOV2 * (SP_OV_x0 - 1.0 + SP_OV_D0); \
|
`sigma(SP_OV_a, SP_OV_c, SP_OV_tau, SP_OV_eta, SP_OV_y0) \
|
||||||
SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \
|
SP_OV_D0 = exp(SP_OV_y0); \
|
||||||
SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \
|
SP_OV_temp = SP_OV_yg - SP_OV_y0; \
|
||||||
SP_OV_u = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \
|
SP_OV_p = 2.0 * SP_OV_temp + GOV2 * (SP_OV_D0 - 1.0); \
|
||||||
sp = SP_OV_x0 + SP_OV_u; \
|
SP_OV_q = SP_OV_temp * SP_OV_temp + GOV2 * (SP_OV_y0 + 1.0 - SP_OV_D0); \
|
||||||
end \
|
SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \
|
||||||
sp = -sp; \
|
SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \
|
||||||
end
|
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
|
|
@ -95,31 +95,31 @@
|
||||||
// values (exp_high), or both (expl), to avoid overflows
|
// values (exp_high), or both (expl), to avoid overflows
|
||||||
// and underflows and retain C-3 continuity
|
// and underflows and retain C-3 continuity
|
||||||
`define expl(x, res) \
|
`define expl(x, res) \
|
||||||
if (abs(x) < `se05) begin\
|
if (abs(x) < `se05) begin\
|
||||||
res = exp(x); \
|
res = exp(x); \
|
||||||
end else begin \
|
end else begin \
|
||||||
if ((x) < -`se05) begin\
|
if ((x) < -`se05) begin\
|
||||||
res = `ke05 / `P3(-`se05 - (x)); \
|
res = `ke05 / `P3(-`se05 - (x)); \
|
||||||
end else begin\
|
end else begin\
|
||||||
res = `ke05inv * `P3((x) - `se05); \
|
res = `ke05inv * `P3((x) - `se05); \
|
||||||
end \
|
end \
|
||||||
end
|
end
|
||||||
|
|
||||||
`define expl_low(x, res) \
|
`define expl_low(x, res) \
|
||||||
if ((x) > -`se05) begin\
|
if ((x) > -`se05) begin\
|
||||||
res = exp(x); \
|
res = exp(x); \
|
||||||
end else begin\
|
end else begin\
|
||||||
res = `ke05 / `P3(-`se05 - (x)); \
|
res = `ke05 / `P3(-`se05 - (x)); \
|
||||||
end
|
end
|
||||||
|
|
||||||
`define expl_high(x, res) \
|
`define expl_high(x, res) \
|
||||||
if ((x) < `se05) begin\
|
if ((x) < `se05) begin\
|
||||||
res = exp(x); \
|
res = exp(x); \
|
||||||
end else begin \
|
end else begin \
|
||||||
res = `ke05inv * `P3((x) - `se05); \
|
res = `ke05inv * `P3((x) - `se05); \
|
||||||
end
|
end
|
||||||
|
|
||||||
`define swap(a, b) \
|
`define swap(a, b) \
|
||||||
temp = a; \
|
temp = a; \
|
||||||
a = b; \
|
a = b; \
|
||||||
b = temp;
|
b = temp;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue