enable OP information for hicum0 and mextram

This commit is contained in:
Holger Vogt 2021-01-05 11:07:05 +01:00
parent 176023f470
commit 8a21f6f2c0
4 changed files with 235 additions and 221 deletions

View File

@ -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);

View File

@ -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

View File

@ -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;
end else begin
end else begin
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)
// 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
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

View File

@ -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,13 +25,15 @@ 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_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
@ -110,7 +114,7 @@ begin
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_gmuz = ddx( Iavl, V(c1)); // Conductance of avalanche current
// Conductance extrinsic b-c current :
OP_gmuex = ddx(Iex+Ib3, V(e))
@ -124,7 +128,7 @@ begin
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
@ -145,6 +149,7 @@ begin
`endif
// Small signal equivalent circuit capacitances
OP_scbe = - ddx(Qte_s, V(e)) - ddx(Qte_s, V(e1)); // Capacitance sidewall b-e junction
@ -241,4 +246,4 @@ begin
OP_tk = Tk; // Actual temperature
`endif
end
end