enable OP information for hicum0 and mextram
This commit is contained in:
parent
176023f470
commit
8a21f6f2c0
|
|
@ -141,7 +141,7 @@ organization and externally, subject to the following restrictions.
|
|||
`include "discipline.h"
|
||||
|
||||
// Comment this line, if calculation of operating point values should be omitted
|
||||
//`define CALC_OP
|
||||
`define CALC_OP
|
||||
|
||||
// Comment this line, if calculation of noise analysis should be omitted
|
||||
//`define CALC_NOISE
|
||||
|
|
@ -1139,7 +1139,7 @@ module hic0_full (c,b,e,s,tnode);
|
|||
if (flsh == 0 || rth < `MIN_R) begin
|
||||
I(br_sht) <+ Vrth/`MIN_R;
|
||||
end else begin
|
||||
I(br_sht) <+ Vrth/rth-pterm; //`P(spectre:gmin="add");
|
||||
I(br_sht) <+ Vrth/rth_t-pterm; //`P(spectre:gmin="add");
|
||||
I(br_sht) <+ ddt(cth*Vrth);
|
||||
end
|
||||
// ******************************************
|
||||
|
|
@ -1192,14 +1192,18 @@ module hic0_full (c,b,e,s,tnode);
|
|||
|
||||
|
||||
`ifdef CALC_OP
|
||||
if (analysis("static")) begin : OP_calculation
|
||||
// if (analysis("static")) begin : OP_calculation
|
||||
begin : OP_calculation
|
||||
real oRPIi, oRMUi, oROi, gAVL;
|
||||
real Cdei, Cdci, Cjei, Cjci, Cjcx, CBC;
|
||||
real R_tot;
|
||||
|
||||
IB = I(<b>);
|
||||
IC = I(<c>);
|
||||
ISUB = I(<s>);
|
||||
// IB = I(<b>);
|
||||
// IC = I(<c>);
|
||||
// ISUB = I(<s>);
|
||||
IB = ibe;
|
||||
IC = it;
|
||||
ISUB = ijsc;
|
||||
IAVL = iavl;
|
||||
|
||||
VBE = V(b,e);
|
||||
|
|
@ -1207,7 +1211,8 @@ module hic0_full (c,b,e,s,tnode);
|
|||
VCE = V(c,e);
|
||||
VSC = V(s,c);
|
||||
|
||||
GMi = ddx(it_wop,V(bi));
|
||||
// GMi = ddx(it_wop,V(bi));
|
||||
GMi = ddx(it,V(bi));
|
||||
|
||||
oRPIi = ddx(ijbe,V(bi));
|
||||
RPIi = 1.0/(oRPIi+1e-12);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,11 @@
|
|||
`define VEXLIM 400.0
|
||||
`define PI 3.1415926
|
||||
|
||||
`define NGSPICE_ADMS
|
||||
|
||||
// Desriptions and units
|
||||
`ifdef __VAMS_COMPACT_MODELING__
|
||||
//`ifdef __VAMS_COMPACT_MODELING__
|
||||
`ifdef NGSPICE_ADMS
|
||||
`define OPP(nam,uni,des) (* desc="des", units="uni" *) real nam;
|
||||
`define PAR(des,uni) (* desc="des", units="uni" *) parameter real
|
||||
`define PAI(des,uni) (* desc="des", units="uni" *) parameter integer
|
||||
|
|
|
|||
|
|
@ -9,80 +9,81 @@ else
|
|||
my_gmin = $simparam("gmin");
|
||||
|
||||
// Initialize model constants
|
||||
`INITIAL_INSTANCE
|
||||
begin
|
||||
// Impact ionization constants (NPN - PNP)
|
||||
|
||||
// Impact ionization constants (NPN - PNP)
|
||||
if (TYPE == 1) begin
|
||||
|
||||
if (TYPE == 1) begin
|
||||
An = 7.03e7;
|
||||
Bn = 1.23e8;
|
||||
|
||||
An = 7.03e7;
|
||||
Bn = 1.23e8;
|
||||
end else begin
|
||||
|
||||
end else begin
|
||||
An = 1.58e8;
|
||||
Bn = 2.04e8;
|
||||
|
||||
An = 1.58e8;
|
||||
Bn = 2.04e8;
|
||||
end
|
||||
|
||||
end
|
||||
Xext1 = 1.0 - XEXT;
|
||||
|
||||
Xext1 = 1.0 - XEXT;
|
||||
|
||||
// Temperature independent MULT scaling
|
||||
// Temperature independent MULT scaling
|
||||
|
||||
`ifdef SELFHEATING
|
||||
CTH_M = CTH * MULT;
|
||||
`endif
|
||||
|
||||
CBEO_M = CBEO * MULT;
|
||||
CBCO_M = CBCO * MULT;
|
||||
CBEO_M = CBEO * MULT;
|
||||
CBCO_M = CBCO * MULT;
|
||||
|
||||
invMULT = 1.0 / MULT;
|
||||
SCRCV_M = SCRCV * invMULT;
|
||||
invMULT = 1.0 / MULT;
|
||||
SCRCV_M = SCRCV * invMULT;
|
||||
|
||||
KF_M = KF * pow(MULT, 1.0 - AF);
|
||||
KFN_M = KFN * pow(MULT, 1.0 - (2.0 * (MLF - 1.0) + AF * (2.0 - MLF)));
|
||||
KF_M = KF * pow(MULT, 1.0 - AF);
|
||||
KFN_M = KFN * pow(MULT, 1.0 - (2.0 * (MLF - 1.0) + AF * (2.0 - MLF)));
|
||||
|
||||
// begin: RvdT, November 2008; Zener tunneling current model
|
||||
// begin: RvdT, November 2008; Zener tunneling current model
|
||||
|
||||
pow2_2mPE = pow(2.0, 2.0 - PE);
|
||||
pow2_PEm2 = 1.0 / pow2_2mPE;
|
||||
pow2_2mPE = pow(2.0, 2.0 - PE);
|
||||
pow2_PEm2 = 1.0 / pow2_2mPE;
|
||||
|
||||
// Reference Temperature expressed in Kelvin:
|
||||
Trk = TREF + `C2K;
|
||||
// Ambient Temperature expressed in Kelvin:
|
||||
Tamb = $temperature + DTA;
|
||||
// Reference Temperature expressed in Kelvin:
|
||||
Trk = TREF + `C2K;
|
||||
// Ambient Temperature expressed in Kelvin:
|
||||
Tamb = $temperature + DTA;
|
||||
|
||||
|
||||
// begin: RvdT, November 2008; Zener tunneling current model
|
||||
//
|
||||
// Comment added March 2009: this assumes VGZEBOK as a model parameter.
|
||||
//
|
||||
// Bandgap for Zener tunnel current model at reference temperature in eV:
|
||||
// VGZEB_Tr = VGZEBOK - AVGEB*Trk*Trk / (Trk + TVGEB);
|
||||
// `max_logexp(VGZEB_Tr, VGZEBOK - AVGEB*Trk*Trk / (Trk + TVGEB), 0.05, 0.1);
|
||||
// end: RvdT, November 2008
|
||||
// begin: RvdT, November 2008; Zener tunneling current model
|
||||
//
|
||||
// Comment added March 2009: this assumes VGZEBOK as a model parameter.
|
||||
//
|
||||
// Bandgap for Zener tunnel current model at reference temperature in eV:
|
||||
// VGZEB_Tr = VGZEBOK - AVGEB*Trk*Trk / (Trk + TVGEB);
|
||||
// `max_logexp(VGZEB_Tr, VGZEBOK - AVGEB*Trk*Trk / (Trk + TVGEB), 0.05, 0.1);
|
||||
// end: RvdT, November 2008
|
||||
|
||||
// begin: RvdT March 2009:
|
||||
// to decrease parameter interdependency,
|
||||
// use VGZEB as a parameter, instead of VGZEBOK:
|
||||
// VGZEB : bandgap for Zener tunneling at T = Tref,
|
||||
// VGZEBOK : bandgap for Zener tunneling at T = 0 K.
|
||||
//`max_logexp(VGZEBOK, VGZEB + AVGEB*Trk*Trk / (Trk + TVGEB), 0.05, 0.1);
|
||||
//dw admsXml can't expand the macro `max_logexp here - using the code
|
||||
_x = VGZEB + AVGEB*Trk*Trk / (Trk + TVGEB);
|
||||
_x0 = 0.05;
|
||||
_a = 0.1;
|
||||
_dxa = (_x - _x0) / (_a);
|
||||
if (_x < _x0)
|
||||
VGZEBOK = _x0 + _a * ln(1.0 + exp(_dxa));
|
||||
else
|
||||
VGZEBOK = _x + _a * ln(1.0 + exp(-_dxa));
|
||||
// begin: RvdT March 2009:
|
||||
// to decrease parameter interdependency,
|
||||
// use VGZEB as a parameter, instead of VGZEBOK:
|
||||
// VGZEB : bandgap for Zener tunneling at T = Tref,
|
||||
// VGZEBOK : bandgap for Zener tunneling at T = 0 K.
|
||||
//`max_logexp(VGZEBOK, VGZEB + AVGEB*Trk*Trk / (Trk + TVGEB), 0.05, 0.1);
|
||||
//dw admsXml can't expand the macro `max_logexp here - using the code
|
||||
_x = VGZEB + AVGEB*Trk*Trk / (Trk + TVGEB);
|
||||
_x0 = 0.05;
|
||||
_a = 0.1;
|
||||
_dxa = (_x - _x0) / (_a);
|
||||
if (_x < _x0)
|
||||
VGZEBOK = _x0 + _a * ln(1.0 + exp(_dxa));
|
||||
else
|
||||
VGZEBOK = _x + _a * ln(1.0 + exp(-_dxa));
|
||||
|
||||
VGZEB_Tr = VGZEB;
|
||||
// end: RvdT March 2009: use VGZEB as a parameter, instead of VGZEBOK:
|
||||
VGZEB_Tr = VGZEB;
|
||||
// end: RvdT March 2009: use VGZEB as a parameter, instead of VGZEBOK:
|
||||
|
||||
inv_VGZEB_Tr = 1.0 / VGZEB_Tr;
|
||||
inv_VGZEB_Tr = 1.0 / VGZEB_Tr;
|
||||
|
||||
inv_VDE = 1.0 / VDE;
|
||||
|
||||
// end: RvdT, November 2008; Zener tunneling current model
|
||||
inv_VDE = 1.0 / VDE;
|
||||
|
||||
// end: RvdT, November 2008; Zener tunneling current model
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,12 +6,14 @@
|
|||
// Evaluate the operating point (output) variables
|
||||
begin
|
||||
|
||||
`ifdef __VAMS_COMPACT_MODELING__
|
||||
|
||||
//`ifdef __VAMS_COMPACT_MODELING__
|
||||
`ifdef NGSPICE_ADMS
|
||||
|
||||
// The external currents and the current gain
|
||||
OP_ic = I(<c>); // External DC collector current
|
||||
OP_ib = I(<b>); // External DC base Current
|
||||
//OP_ic = I(<c>); // External DC collector current
|
||||
OP_ic = TYPE*Ic1c2; // External DC collector current
|
||||
//OP_ib = I(<b>); // External DC base Current
|
||||
OP_ib = TYPE*Ib1b2; // External DC base Current
|
||||
|
||||
if (OP_ib == 0)
|
||||
begin
|
||||
|
|
@ -23,222 +25,225 @@ begin
|
|||
end
|
||||
|
||||
// begin added in MXT 504.9:
|
||||
OP_ie = I(<e>); // External DC emitter current
|
||||
//OP_ie = I(<e>); // External DC emitter current
|
||||
OP_ie = TYPE*(In+Ib1_s); // External DC emitter current
|
||||
OP_vbe = V(b, e); // External base-emitter bias
|
||||
OP_vce = V(c, e); // External collector-emitter bias
|
||||
OP_vbc = V(b, c); // External base-collector bias
|
||||
|
||||
`ifdef SUBSTRATE
|
||||
OP_is = I(<s>); // External DC emitter current
|
||||
OP_vse = V(s, e); // External substrate-emitter bias
|
||||
OP_vbs = V(b, s); // External base-substrate bias
|
||||
OP_vsc = V(s, c); // External substrate-collector bias
|
||||
//OP_is = I(<s>); // External DC emitter current
|
||||
OP_is = TYPE*Isub; // External DC emitter current
|
||||
OP_vse = V(s, e); // External substrate-emitter bias
|
||||
OP_vbs = V(b, s); // External base-substrate bias
|
||||
OP_vsc = V(s, c); // External substrate-collector bias
|
||||
`endif
|
||||
|
||||
// end added in MXT 504.9:
|
||||
// end added in MXT 504.9:
|
||||
|
||||
// The internal voltage differences
|
||||
OP_vb2e1 = Vb2e1; // Internal base-emiter bias
|
||||
OP_vb2c2 = Vb2c2; // Internal base-emiter bias
|
||||
OP_vb2c1 = Vb2c1; // Internal base-collector bias including epilayer
|
||||
// The internal voltage differences
|
||||
OP_vb2e1 = Vb2e1; // Internal base-emiter bias
|
||||
OP_vb2c2 = Vb2c2; // Internal base-emiter bias
|
||||
OP_vb2c1 = Vb2c1; // Internal base-collector bias including epilayer
|
||||
|
||||
OP_vb1c1 = Vb1b2 + Vb2c1; // External base-collector bias without contact resistances
|
||||
OP_vb1c1 = Vb1b2 + Vb2c1; // External base-collector bias without contact resistances
|
||||
|
||||
OP_vc4c1 = Vc4c1; // Bias over intrinsic buried layer
|
||||
OP_vc3c4 = Vc3c4; // Bias over extrinsic buried layer
|
||||
OP_vc4c1 = Vc4c1; // Bias over intrinsic buried layer
|
||||
OP_vc3c4 = Vc3c4; // Bias over extrinsic buried layer
|
||||
|
||||
OP_ve1e = - Vee1; // Bias over emiter resistance
|
||||
OP_ve1e = - Vee1; // Bias over emiter resistance
|
||||
|
||||
// The branch currents
|
||||
OP_in = In; // Main current
|
||||
OP_ic1c2 = Ic1c2; // Epilayer current
|
||||
OP_ib1b2 = Ib1b2; // Pinched-base current
|
||||
OP_ib1 = Ib1; // Ideal forward base current
|
||||
OP_sib1 = Ib1_s; // Ideal side-wall base current
|
||||
//
|
||||
// 504.8, RvdT, TU-Delft April. 2009:
|
||||
//
|
||||
OP_izteb = Izteb ; // Zener tunneling current
|
||||
//
|
||||
OP_ib2 = Ib2; // Non-ideal forward base current
|
||||
OP_ib3 = Ib3; // Non-ideal reverse base current
|
||||
OP_iavl = Iavl; // Avalanche current
|
||||
OP_iex = Iex; // Extrinsic reverse base current
|
||||
OP_xiex = XIex; // Extrinsic reverse base current
|
||||
// The branch currents
|
||||
OP_in = In; // Main current
|
||||
OP_ic1c2 = Ic1c2; // Epilayer current
|
||||
OP_ib1b2 = Ib1b2; // Pinched-base current
|
||||
OP_ib1 = Ib1; // Ideal forward base current
|
||||
OP_sib1 = Ib1_s; // Ideal side-wall base current
|
||||
//
|
||||
// 504.8, RvdT, TU-Delft April. 2009:
|
||||
//
|
||||
OP_izteb = Izteb ; // Zener tunneling current
|
||||
//
|
||||
OP_ib2 = Ib2; // Non-ideal forward base current
|
||||
OP_ib3 = Ib3; // Non-ideal reverse base current
|
||||
OP_iavl = Iavl; // Avalanche current
|
||||
OP_iex = Iex; // Extrinsic reverse base current
|
||||
OP_xiex = XIex; // Extrinsic reverse base current
|
||||
`ifdef SUBSTRATE
|
||||
OP_isub = Isub; // Substrate current
|
||||
OP_xisub = XIsub; // Substrate current
|
||||
OP_isf = Isf; // Substrate-collector current
|
||||
OP_isub = Isub; // Substrate current
|
||||
OP_xisub = XIsub; // Substrate current
|
||||
OP_isf = Isf; // Substrate-collector current
|
||||
`endif
|
||||
OP_ire = - Vee1 / RE_TM; // Current through emiter resistance
|
||||
OP_irbc = Vbb1 / RBC_TM; // Current through constant base resistance
|
||||
OP_ire = - Vee1 / RE_TM; // Current through emiter resistance
|
||||
OP_irbc = Vbb1 / RBC_TM; // Current through constant base resistance
|
||||
|
||||
OP_ircc = Vcc3 * GCCxx_TM; // Current through collector contact resistance
|
||||
OP_ircblx = Vc3c4 * GCCex_TM; // Current through extrinsic buried layer resistance
|
||||
OP_ircbli = Vc4c1 * GCCin_TM; // Current through extrinsic buried layer resistance
|
||||
OP_ircc = Vcc3 * GCCxx_TM; // Current through collector contact resistance
|
||||
OP_ircblx = Vc3c4 * GCCex_TM; // Current through extrinsic buried layer resistance
|
||||
OP_ircbli = Vc4c1 * GCCin_TM; // Current through extrinsic buried layer resistance
|
||||
|
||||
// The branch charges
|
||||
OP_qe = Qe; // Emitter charge or emitter neutral charge
|
||||
OP_qte = Qte; // Base-emiter depletion charge
|
||||
OP_sqte = Qte_s; // Sidewall base-emiter depletion charge
|
||||
OP_qbe = Qbe; // Base-emiter diffusion charge
|
||||
OP_qbc = Qbc; // Base-collector diffusion charge
|
||||
OP_qtc = Qtc; // Base-colector depletion charge
|
||||
OP_qepi = Qepi; // Epilayer diffusion charge
|
||||
OP_qb1b2 = Qb1b2; // AC current crowding charge
|
||||
OP_qtex = Qtex; // Extrinsic base-collector depletion charge
|
||||
OP_xqtex = XQtex; // Extrinsic base-collector depletion charge
|
||||
OP_qex = Qex; // Extrinsic base-collector diffusion charge
|
||||
OP_xqex = XQex; // Extrinsic base-collector diffusion charge
|
||||
// The branch charges
|
||||
OP_qe = Qe; // Emitter charge or emitter neutral charge
|
||||
OP_qte = Qte; // Base-emiter depletion charge
|
||||
OP_sqte = Qte_s; // Sidewall base-emiter depletion charge
|
||||
OP_qbe = Qbe; // Base-emiter diffusion charge
|
||||
OP_qbc = Qbc; // Base-collector diffusion charge
|
||||
OP_qtc = Qtc; // Base-colector depletion charge
|
||||
OP_qepi = Qepi; // Epilayer diffusion charge
|
||||
OP_qb1b2 = Qb1b2; // AC current crowding charge
|
||||
OP_qtex = Qtex; // Extrinsic base-collector depletion charge
|
||||
OP_xqtex = XQtex; // Extrinsic base-collector depletion charge
|
||||
OP_qex = Qex; // Extrinsic base-collector diffusion charge
|
||||
OP_xqex = XQex; // Extrinsic base-collector diffusion charge
|
||||
`ifdef SUBSTRATE
|
||||
OP_qts = Qts; // Collector substrate depletion charge
|
||||
OP_qts = Qts; // Collector substrate depletion charge
|
||||
`endif
|
||||
|
||||
// Small signal equivalent circuit conductances and resistances
|
||||
// Small signal equivalent circuit conductances and resistances
|
||||
|
||||
OP_gx = - ddx(In, V(e1)); // Forward transconductance
|
||||
OP_gy = - ddx(In, V(c2)); // Reverse transconductance
|
||||
OP_gx = - ddx(In, V(e1)); // Forward transconductance
|
||||
OP_gy = - ddx(In, V(c2)); // Reverse transconductance
|
||||
|
||||
OP_gz = - ddx(In, V(c1)); // Reverse transconductance
|
||||
OP_gz = - ddx(In, V(c1)); // Reverse transconductance
|
||||
|
||||
OP_sgpi = - ddx(Ib1_s, V(e))
|
||||
- ddx(Ib1_s, V(e1)); // Conductance sidewal b-e junction
|
||||
OP_gpix = - ddx(Ib1+Ib2, V(e1)); // Conductance floor b-e junction
|
||||
OP_sgpi = - ddx(Ib1_s, V(e))
|
||||
- ddx(Ib1_s, V(e1)); // Conductance sidewal b-e junction
|
||||
OP_gpix = - ddx(Ib1+Ib2, V(e1)); // Conductance floor b-e junction
|
||||
|
||||
OP_gpiy = - ddx(Ib1, V(c2)); // Early effect on recombination base current
|
||||
OP_gpiz = - ddx(Ib1, V(c1)); // Early effect on recombination base current
|
||||
OP_gpiy = - ddx(Ib1, V(c2)); // Early effect on recombination base current
|
||||
OP_gpiz = - ddx(Ib1, V(c1)); // Early effect on recombination base current
|
||||
|
||||
OP_gmux = ddx( Iavl, V(e1)); // Early effect on avalanche current limitting
|
||||
OP_gmuy = ddx( Iavl, V(c2)); // Conductance of avalanche current
|
||||
OP_gmuz = - ddx(- Iavl, V(c1)); // Conductance of avalanche current
|
||||
OP_gmux = ddx( Iavl, V(e1)); // Early effect on avalanche current limitting
|
||||
OP_gmuy = ddx( Iavl, V(c2)); // Conductance of avalanche current
|
||||
OP_gmuz = ddx( Iavl, V(c1)); // Conductance of avalanche current
|
||||
|
||||
// Conductance extrinsic b-c current :
|
||||
OP_gmuex = ddx(Iex+Ib3, V(e))
|
||||
+ ddx(Iex+Ib3, V(b1))
|
||||
+ ddx(Iex+Ib3, V(b2))
|
||||
+ ddx(Iex+Ib3, V(e1))
|
||||
+ ddx(Iex+Ib3, V(c2));
|
||||
// Conductance extrinsic b-c current :
|
||||
OP_gmuex = ddx(Iex+Ib3, V(e))
|
||||
+ ddx(Iex+Ib3, V(b1))
|
||||
+ ddx(Iex+Ib3, V(b2))
|
||||
+ ddx(Iex+Ib3, V(e1))
|
||||
+ ddx(Iex+Ib3, V(c2));
|
||||
|
||||
OP_xgmuex = ddx(XIex, V(b)) ; // Conductance extrinsic b-c current
|
||||
OP_xgmuex = ddx(XIex, V(b)) ; // Conductance extrinsic b-c current
|
||||
|
||||
OP_grcvy = - ddx(Ic1c2, V(c2)); // Conductance of epilayer current
|
||||
OP_grcvz = - ddx(Ic1c2, V(c1)); // Conductance of epilayer current
|
||||
OP_grcvy = - ddx(Ic1c2, V(c2)); // Conductance of epilayer current
|
||||
OP_grcvz = - ddx(Ic1c2, V(c1)); // Conductance of epilayer current
|
||||
|
||||
OP_rbv = 1.0 / (- ddx(Ib1b2, V(b2)) - ddx(Ib1b2, V(c2))); // Base resistance
|
||||
// OP_rbv = 1.0 / (- ddx(Ib1b2, V(b2)) - ddx(Ib1b2, V(c2))); // Base resistance
|
||||
|
||||
OP_grbvx = - ddx(Ib1b2, V(e)) - ddx(Ib1b2, V(e1)); // Early effect on base resistance
|
||||
OP_grbvy = - ddx(Ib1b2, V(c2)); // Early effect on base resistance
|
||||
OP_grbvx = - ddx(Ib1b2, V(e)) - ddx(Ib1b2, V(e1)); // Early effect on base resistance
|
||||
OP_grbvy = - ddx(Ib1b2, V(c2)); // Early effect on base resistance
|
||||
|
||||
OP_grbvz = - ddx(Ib1b2, V(c1)); // Early effect on base resistance
|
||||
OP_grbvz = - ddx(Ib1b2, V(c1)); // Early effect on base resistance
|
||||
|
||||
OP_re = RE_TM; // Emiter resistance
|
||||
OP_rbc = RBC_TM; // Constant base resistance
|
||||
OP_rcc = RCCxx_TM; // Collector Contact resistance
|
||||
OP_rcblx = RCCex_TM; // Extrinsic buried layer resistance
|
||||
OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
|
||||
OP_re = RE_TM; // Emiter resistance
|
||||
OP_rbc = RBC_TM; // Constant base resistance
|
||||
OP_rcc = RCCxx_TM; // Collector Contact resistance
|
||||
OP_rcblx = RCCex_TM; // Extrinsic buried layer resistance
|
||||
OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance
|
||||
|
||||
|
||||
`ifdef SUBSTRATE
|
||||
OP_gs = ddx(Isub, V(b)) + ddx(Isub, V(b1)); // Conductance parasitic PNP transitor
|
||||
OP_xgs = ddx(XIsub, V(b)) ; // Conductance parasitic PNP transistor
|
||||
OP_gsf = ddx(Isf, V(s)) ; // Conductance substrate-collector current
|
||||
OP_gs = ddx(Isub, V(b)) + ddx(Isub, V(b1)); // Conductance parasitic PNP transitor
|
||||
OP_xgs = ddx(XIsub, V(b)) ; // Conductance parasitic PNP transistor
|
||||
OP_gsf = ddx(Isf, V(s)) ; // Conductance substrate-collector current
|
||||
`endif
|
||||
|
||||
|
||||
// Small signal equivalent circuit capacitances
|
||||
OP_scbe = - ddx(Qte_s, V(e)) - ddx(Qte_s, V(e1)); // Capacitance sidewall b-e junction
|
||||
|
||||
OP_cbex = - ddx(Qte + Qbe + Qe, V(e1)) ; // Capacitance floor b-e junction
|
||||
// Small signal equivalent circuit capacitances
|
||||
OP_scbe = - ddx(Qte_s, V(e)) - ddx(Qte_s, V(e1)); // Capacitance sidewall b-e junction
|
||||
|
||||
OP_cbey = - ddx(Qbe, V(c2)); // Early effect on b-e diffusion junction
|
||||
OP_cbex = - ddx(Qte + Qbe + Qe, V(e1)) ; // Capacitance floor b-e junction
|
||||
|
||||
OP_cbez = - ddx(Qbe, V(c1)); // Early effect on b-e diffusion junction
|
||||
OP_cbey = - ddx(Qbe, V(c2)); // 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_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_cbcy = - ddx(Qtc + Qbc + Qepi, V(c2)); // Capacitance floor b-c junction
|
||||
OP_cbcz = - ddx(Qtc + Qbc + Qepi, V(c1)); // Capacitance floor b-c junction
|
||||
OP_cbcy = - ddx(Qtc + Qbc + Qepi, V(c2)); // Capacitance floor b-c junction
|
||||
OP_cbcz = - ddx(Qtc + Qbc + Qepi, V(c1)); // Capacitance floor b-c junction
|
||||
|
||||
// Capacitance extrinsic b-c junction :
|
||||
OP_cbcex = ddx(Qtex + Qex,V(e))
|
||||
+ ddx(Qtex + Qex,V(b1 ))
|
||||
+ ddx(Qtex + Qex,V(b2))
|
||||
+ ddx(Qtex + Qex,V(e1))
|
||||
+ ddx(Qtex + Qex,V(c2)) ;
|
||||
// Capacitance extrinsic b-c junction :
|
||||
OP_cbcex = ddx(Qtex + Qex,V(e))
|
||||
+ ddx(Qtex + Qex,V(b1 ))
|
||||
+ ddx(Qtex + Qex,V(b2))
|
||||
+ ddx(Qtex + Qex,V(e1))
|
||||
+ ddx(Qtex + Qex,V(c2)) ;
|
||||
|
||||
// Capacitance extrinsic b-c junction :
|
||||
OP_xcbcex = ddx(XQtex + XQex, V(b)) ;
|
||||
// Capacitance extrinsic b-c junction :
|
||||
OP_xcbcex = ddx(XQtex + XQex, V(b)) ;
|
||||
|
||||
OP_cb1b2 = - ddx(Qb1b2, V(b2)) - ddx(Qb1b2, V(c2)); // Capacitance AC current crowding
|
||||
OP_cb1b2 = - ddx(Qb1b2, V(b2)) - ddx(Qb1b2, V(c2)); // Capacitance AC current crowding
|
||||
|
||||
OP_cb1b2x = - ddx(Qb1b2, V(e)) - ddx(Qb1b2, V(e1)); // Cross-capacitance AC current crowding
|
||||
OP_cb1b2y = - ddx(Qb1b2, V(c2)); // Cross-capacitance AC current crowding
|
||||
OP_cb1b2z = - ddx(Qb1b2, V(c1)) ; // Cross-capacitance AC current crowding
|
||||
OP_cb1b2x = - ddx(Qb1b2, V(e)) - ddx(Qb1b2, V(e1)); // Cross-capacitance AC current crowding
|
||||
OP_cb1b2y = - ddx(Qb1b2, V(c2)); // Cross-capacitance AC current crowding
|
||||
OP_cb1b2z = - ddx(Qb1b2, V(c1)) ; // Cross-capacitance AC current crowding
|
||||
|
||||
`ifdef SUBSTRATE
|
||||
OP_cts = ddx(Qts, V(s)) ; // Capacitance s-c junction
|
||||
OP_cts = ddx(Qts, V(s)) ; // Capacitance s-c junction
|
||||
`endif
|
||||
|
||||
// Approximate small signal equivalent circuit
|
||||
dydx = (OP_gx - OP_gmux) / (OP_grcvy + OP_gmuy - OP_gy);
|
||||
dydz = (OP_gz - OP_grcvz - OP_gmuz) / (OP_grcvy + OP_gmuy - OP_gy);
|
||||
gpi = OP_sgpi + OP_gpix + OP_gmux + OP_gpiz + OP_gmuz +
|
||||
(OP_gpiy + OP_gmuy) * (dydx + dydz);
|
||||
OP_gm = (OP_grcvy * (OP_gx - OP_gmux + // Transconductance
|
||||
OP_gz - OP_gmuz) - OP_grcvz *
|
||||
(OP_gy - OP_gmuy)) / (OP_grcvy + OP_gmuy - OP_gy);
|
||||
OP_beta = OP_gm / gpi; // Current amplification
|
||||
OP_gout = ((OP_gy - OP_gmuy) * OP_grcvz - // Output conductance
|
||||
(OP_gz - OP_gmuz) * OP_grcvy) /
|
||||
(OP_grcvy + OP_gmuy - OP_gy);
|
||||
OP_gmu = OP_gpiz + OP_gmuz + (OP_gpiy + OP_gmuy) * dydz + // Feedback transconductance
|
||||
OP_gmuex + OP_xgmuex;
|
||||
OP_rb = RBC_TM + OP_rbv; // Base resistance
|
||||
OP_rc = OP_rcc + OP_rcblx + OP_rcbli; // Collector resistance
|
||||
OP_cbe = OP_cbex + OP_scbe + OP_cbcx + // Base-emitter capacitance
|
||||
(OP_cbey + OP_cbcy) * dydx + CBEO_M;
|
||||
OP_cbc = (OP_cbey + OP_cbcy) * dydz + OP_cbcz + // Base-collector capacitance
|
||||
OP_cbcex + OP_xcbcex + CBCO_M;
|
||||
// Approximate small signal equivalent circuit
|
||||
dydx = (OP_gx - OP_gmux) / (OP_grcvy + OP_gmuy - OP_gy);
|
||||
dydz = (OP_gz - OP_grcvz - OP_gmuz) / (OP_grcvy + OP_gmuy - OP_gy);
|
||||
gpi = OP_sgpi + OP_gpix + OP_gmux + OP_gpiz + OP_gmuz +
|
||||
(OP_gpiy + OP_gmuy) * (dydx + dydz);
|
||||
OP_gm = (OP_grcvy * (OP_gx - OP_gmux + // Transconductance
|
||||
OP_gz - OP_gmuz) - OP_grcvz *
|
||||
(OP_gy - OP_gmuy)) / (OP_grcvy + OP_gmuy - OP_gy);
|
||||
OP_beta = OP_gm / gpi; // Current amplification
|
||||
OP_gout = ((OP_gy - OP_gmuy) * OP_grcvz - // Output conductance
|
||||
(OP_gz - OP_gmuz) * OP_grcvy) /
|
||||
(OP_grcvy + OP_gmuy - OP_gy);
|
||||
OP_gmu = OP_gpiz + OP_gmuz + (OP_gpiy + OP_gmuy) * dydz + // Feedback transconductance
|
||||
OP_gmuex + OP_xgmuex;
|
||||
OP_rb = RBC_TM + OP_rbv; // Base resistance
|
||||
OP_rc = OP_rcc + OP_rcblx + OP_rcbli; // Collector resistance
|
||||
OP_cbe = OP_cbex + OP_scbe + OP_cbcx + // Base-emitter capacitance
|
||||
(OP_cbey + OP_cbcy) * dydx + CBEO_M;
|
||||
OP_cbc = (OP_cbey + OP_cbcy) * dydz + OP_cbcz + // Base-collector capacitance
|
||||
OP_cbcex + OP_xcbcex + CBCO_M;
|
||||
|
||||
|
||||
// Quantities to describe internal state of the model
|
||||
gammax = (OP_gpix + OP_gmux - OP_grbvx) * OP_rbv;
|
||||
gammay = (OP_gpiy + OP_gmuy - OP_grbvy) * OP_rbv;
|
||||
gammaz = (OP_gpiz + OP_gmuz - OP_grbvz) * OP_rbv;
|
||||
gbfx = OP_gpix + OP_sgpi * (1.0 + gammax);
|
||||
gbfy = OP_gpiy + OP_sgpi * gammay;
|
||||
gbfz = OP_gpiz + OP_sgpi * gammaz;
|
||||
// Quantities to describe internal state of the model
|
||||
gammax = (OP_gpix + OP_gmux - OP_grbvx) * OP_rbv;
|
||||
gammay = (OP_gpiy + OP_gmuy - OP_grbvy) * OP_rbv;
|
||||
gammaz = (OP_gpiz + OP_gmuz - OP_grbvz) * OP_rbv;
|
||||
gbfx = OP_gpix + OP_sgpi * (1.0 + gammax);
|
||||
gbfy = OP_gpiy + OP_sgpi * gammay;
|
||||
gbfz = OP_gpiz + OP_sgpi * gammaz;
|
||||
|
||||
// RvdT March 2008:
|
||||
alpha_ft = (1.0 + (OP_grcvy * dydx * OP_rc) +
|
||||
(OP_gx + gbfx + (OP_gy + gbfy) * dydx) * RE_TM)/
|
||||
(1.0 - (OP_grcvz + OP_grcvy * dydz) * OP_rc -
|
||||
(OP_gz + gbfz + (OP_gy + gbfy) * dydz) * RE_TM);
|
||||
// RvdT March 2008:
|
||||
alpha_ft = (1.0 + (OP_grcvy * dydx * OP_rc) +
|
||||
(OP_gx + gbfx + (OP_gy + gbfy) * dydx) * RE_TM)/
|
||||
(1.0 - (OP_grcvz + OP_grcvy * dydz) * OP_rc -
|
||||
(OP_gz + gbfz + (OP_gy + gbfy) * dydz) * RE_TM);
|
||||
|
||||
rx = pow((OP_grcvy * dydx + alpha_ft * (OP_grcvz + OP_grcvy * dydz)), -1);
|
||||
rz = alpha_ft * rx;
|
||||
ry = (1.0 - OP_grcvz * rz) / OP_grcvy;
|
||||
rb1b2 = gammax * rx + gammay * ry + gammaz * rz;
|
||||
rex = rz + rb1b2 - OP_rcbli;
|
||||
xrex = rz + rb1b2 + RBC_TM * ((gbfx + OP_gmux) * rx + (gbfy + OP_gmuy) * ry +
|
||||
(gbfz + OP_gmuz) * rz) - OP_rcbli - OP_rcblx;
|
||||
rx = pow((OP_grcvy * dydx + alpha_ft * (OP_grcvz + OP_grcvy * dydz)), -1);
|
||||
rz = alpha_ft * rx;
|
||||
ry = (1.0 - OP_grcvz * rz) / OP_grcvy;
|
||||
rb1b2 = gammax * rx + gammay * ry + gammaz * rz;
|
||||
rex = rz + rb1b2 - OP_rcbli;
|
||||
xrex = rz + rb1b2 + RBC_TM * ((gbfx + OP_gmux) * rx + (gbfy + OP_gmuy) * ry +
|
||||
(gbfz + OP_gmuz) * rz) - OP_rcbli - OP_rcblx;
|
||||
|
||||
taut = OP_scbe * (rx + rb1b2) + (OP_cbex + OP_cbcx) * rx + (OP_cbey + OP_cbcy) *
|
||||
ry + (OP_cbez + OP_cbcz) * rz + OP_cbcex * rex + OP_xcbcex * xrex +
|
||||
(CBEO_M + CBCO_M) * (xrex - RCCxx_TM);
|
||||
taut = OP_scbe * (rx + rb1b2) + (OP_cbex + OP_cbcx) * rx + (OP_cbey + OP_cbcy) *
|
||||
ry + (OP_cbez + OP_cbcz) * rz + OP_cbcex * rex + OP_xcbcex * xrex +
|
||||
(CBEO_M + CBCO_M) * (xrex - RCCxx_TM);
|
||||
|
||||
OP_ft = 1.0 / (2.0 * `PI * taut); // Good approximation for cut-off frequency
|
||||
OP_iqs = Iqs; // Current at onset of quasi-saturation
|
||||
OP_xiwepi = xi_w; // Thickness of injection layer
|
||||
OP_vb2c2star = Vb2c2star; // Physical value of internal base-collector bias
|
||||
OP_ft = 1.0 / (2.0 * `PI * taut); // Good approximation for cut-off frequency
|
||||
OP_iqs = Iqs; // Current at onset of quasi-saturation
|
||||
OP_xiwepi = xi_w; // Thickness of injection layer
|
||||
OP_vb2c2star = Vb2c2star; // Physical value of internal base-collector bias
|
||||
|
||||
//self-heating
|
||||
//self-heating
|
||||
`ifdef SELFHEATING
|
||||
OP_pdiss = power_dis; // Dissipation
|
||||
OP_pdiss = power_dis; // Dissipation
|
||||
`endif
|
||||
|
||||
OP_tk = Tk; // Actual temperature
|
||||
OP_tk = Tk; // Actual temperature
|
||||
|
||||
`endif
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue