HICUM scaling with "area" and "m" parameters.

This commit is contained in:
Markus Mueller 2020-07-05 17:26:45 +02:00
parent dbd99a33a5
commit d78032109f
4 changed files with 176 additions and 80 deletions

View File

@ -140,6 +140,12 @@ typedef struct sHICUMinstance {
dual_double HICUMvds_t;
dual_double HICUMvpts_t;
//variables that depend on "area" and "m" but not on temperature
double HICUMicbar_scaled;
double HICUMcbepar_scaled;
double HICUMcbcpar_scaled;
double HICUMcth_scaled;
double HICUMrbi;
double HICUMiavl;
double HICUMpterm;

View File

@ -580,28 +580,29 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
}
}
if (nqs) {
if(here->HICUMxfNode == 0) {
error = CKTmkVolt(ckt, &tmp, here->HICUMname, "xf");
if(error) return(error);
here->HICUMxfNode = tmp->number;
if (nqs) {
if(here->HICUMxfNode == 0) {
error = CKTmkVolt(ckt, &tmp, here->HICUMname, "xf");
if(error) return(error);
here->HICUMxfNode = tmp->number;
}
if(here->HICUMxf1Node == 0) {
error = CKTmkVolt(ckt, &tmp, here->HICUMname, "xf1");
if(error) return(error);
here->HICUMxf1Node = tmp->number;
}
if(here->HICUMxf2Node == 0) {
error = CKTmkVolt(ckt, &tmp, here->HICUMname, "xf2");
if(error) return(error);
here->HICUMxf2Node = tmp->number;
}
} else {
here->HICUMxfNode = 0;
here->HICUMxf1Node = 0;
here->HICUMxf2Node = 0;
}
if(here->HICUMxf1Node == 0) {
error = CKTmkVolt(ckt, &tmp, here->HICUMname, "xf1");
if(error) return(error);
here->HICUMxf1Node = tmp->number;
}
if(here->HICUMxf2Node == 0) {
error = CKTmkVolt(ckt, &tmp, here->HICUMname, "xf2");
if(error) return(error);
here->HICUMxf2Node = tmp->number;
}
} else {
here->HICUMxfNode = 0;
here->HICUMxf1Node = 0;
here->HICUMxf2Node = 0;
}
/* macro to make elements with built in test for out of memory */
#define TSTALLOC(ptr,first,second) \
do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\

View File

@ -720,16 +720,16 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
FFitf_ick = itf/I_CK;
FFdTef = tef0_t*exp(model->HICUMgtfe*log(FFitf_ick));
FFdQef = FFdTef*itf/(1+model->HICUMgtfe);
if (model->HICUMicbar<0.05*(model->HICUMvlim/model->HICUMrci0)) {
if (here->HICUMicbar_scaled<0.05*(model->HICUMvlim/model->HICUMrci0)) {
FFdVc = 0;
FFdVc_ditf = 0;
} else {
FFib = (itf-I_CK)/model->HICUMicbar;
FFib = (itf-I_CK)/here->HICUMicbar_scaled;
if (FFib < -1.0e10) {
FFib = -1.0e10;
}
FFfcbar = (FFib+sqrt(FFib*FFib+model->HICUMacbar))/2.0;
FFdib_ditf = FFfcbar/sqrt(FFib*FFib+model->HICUMacbar)/model->HICUMicbar;
FFdib_ditf = FFfcbar/sqrt(FFib*FFib+model->HICUMacbar)/here->HICUMicbar_scaled;
FFdVc = model->HICUMvcbar*exp(-1.0/FFfcbar);
FFdVc_ditf = FFdVc/(FFfcbar*FFfcbar)*FFdib_ditf;
}
@ -1202,23 +1202,23 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
// Depletion capacitance splitting at b-c junction
// Capacitances at peripheral and external base node
C_1 = (1.0 - model->HICUMfbcpar) *
(model->HICUMcjcx0 + model->HICUMcbcpar);
if (C_1 >= model->HICUMcbcpar) {
cbcpar1 = model->HICUMcbcpar;
(model->HICUMcjcx0 + here->HICUMcbcpar_scaled);
if (C_1 >= here->HICUMcbcpar_scaled) {
cbcpar1 = here->HICUMcbcpar_scaled;
cbcpar2 = 0.0;
//cjcx01 = C_1 - model->HICUMcbcpar;
//cjcx01 = C_1 - here->HICUMcbcpar_scaled;
//cjcx02 = model->HICUMcjcx0 - cjcx01; //not needed herein
}
else {
cbcpar1 = C_1;
cbcpar2 = model->HICUMcbcpar - cbcpar1;
cbcpar2 = here->HICUMcbcpar_scaled - cbcpar1;
//cjcx01 = 0.0;
//cjcx02 = model->HICUMcjcx0; //not needed herein
}
// Parasitic b-e capacitance partitioning: No temperature dependence
cbepar2 = model->HICUMfbepar * model->HICUMcbepar;
cbepar1 = model->HICUMcbepar - cbepar2;
cbepar2 = model->HICUMfbepar * here->HICUMcbepar_scaled;
cbepar1 = here->HICUMcbepar_scaled - cbepar2;
// Avoid divide-by-zero and define infinity other way
@ -1259,8 +1259,8 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
Icth = 0.0, Icth_Vrth = 0.0;
// Markus: What is this ?
here->HICUMcbepar = model->HICUMcbepar;
here->HICUMcbcpar = model->HICUMcbcpar;
here->HICUMcbepar = here->HICUMcbepar_scaled;
here->HICUMcbcpar = here->HICUMcbcpar_scaled;
/*
* initialization
@ -2707,7 +2707,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
// I[br_sht] <+ Vrth/MIN_R;
//} else {
// I[br_sht] <+ Vrth/rth_t-pterm;
// I[br_sht] <+ ddt(model->HICUMcth*Vrth]);
// I[br_sht] <+ ddt(here->HICUMcth_scaled*Vrth]);
//}
// ******************************************
@ -2905,7 +2905,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
Qbcpar1_Vbci = cbcpar1;
Qbcpar2_Vbpci = cbcpar2;
Qsu_Vsis = model->HICUMcsu;
Qcth_Vrth = model->HICUMcth;
Qcth_Vrth = here->HICUMcth_scaled;
if( (ckt->CKTmode & (MODEDCTRANCURVE | MODETRAN | MODEAC)) ||
((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) ||
(ckt->CKTmode & MODEINITSMSIG)) {
@ -2917,7 +2917,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
Qbcpar2 = cbcpar2*Vbpci;
Qsu = model->HICUMcsu*Vsis;
if (selfheat) {
Qcth = model->HICUMcth*Vrth;
Qcth = here->HICUMcth_scaled*Vrth;
} else {
Qcth = 0;
}
@ -2998,7 +2998,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
here->HICUMcapjs = Cjs;
here->HICUMcapscp = Cscp;
here->HICUMcapsu = model->HICUMcsu;
here->HICUMcapcth = model->HICUMcth;
here->HICUMcapcth = here->HICUMcth_scaled;
here->HICUMcapscp = Cscp;
//derivatives of charges due to cross coupling
@ -3046,7 +3046,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
*(ckt->CKTstate0 + here->HICUMcqxf2) = Qxf2_Vxf2;
*(ckt->CKTstate0 + here->HICUMcqxf) = Qxf_Vxf;
if (selfheat)
*(ckt->CKTstate0 + here->HICUMcqcth) = model->HICUMcth;
*(ckt->CKTstate0 + here->HICUMcqcth) = here->HICUMcth_scaled;
continue; /* go to 1000 */
}
//transient analysis
@ -3177,7 +3177,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt)
if (selfheat)
{
//Qth
error = NIintegrate(ckt,&geq,&ceq,model->HICUMcth,here->HICUMqcth);
error = NIintegrate(ckt,&geq,&ceq,here->HICUMcth_scaled,here->HICUMqcth);
if(error) return(error);
Icth_Vrth = geq;
Icth = *(ckt->CKTstate0 + here->HICUMcqcth);

View File

@ -139,8 +139,97 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
double cratio_t_real, cratio_t_dual;
double Tnom, zetatef, cjcx01, cjcx02, C_1;
duals::duald cjei0_t, vdei_t, cjep0_t, vdep_t;
//variable for area and m scaling
double area_times_m;
double qp0_scaled ;
double c10_scaled ;
double icbar_scaled;
double cjei0_scaled;
double ibeis_scaled;
double ireis_scaled;
double ibeps_scaled;
double ibcxs_scaled;
double ireps_scaled;
double cjep0_scaled;
double cbepar_scaled;
double ibcis_scaled;
double cjci0_scaled;
double cjcx0_scaled;
double cbcpar_scaled;
double qavl_scaled ;
double re_scaled ;
double rci0_scaled ;
double rbx_scaled ;
double rcx_scaled ;
double rbi0_scaled ;
double rth_scaled ;
// double cjci0_t, vdci_t, vptci_t, cjep0_t, vdep_t, ajep_t, vdcx_t, vptcx_t, cscp0_t, vdsp_t, vptsp_t, cjs0_t, vds_t, vpts_t;
// Warning:
// The scaling with HICUMm and HICUMarea is done here from model to here variables in order to save memory.
// Classical spice scaling with "area" is implemented, but it is not recommended to be used. If you want
// scaling, more sophisticated expressions should be used. Those can be found in modern PDKs or should be
// provided by modeling engineers.
// For discrete devices, the multiplication facotor "m" should give reasonable results.
//
// The HICUMm device multiplicaton factor can be exected to give good results.
// The following variables need scaling in HICUM:
// IT : qp0 ~ (area m)**2 qp0 ~ area m icbar ~ area m
// BE junction: cjei0 ~ area m cjep0 ~ m
// ibeis ~ area m ibeps ~ m
// cbepar ~ m -> area scaling not reasonable
// BC junction: cjci0 ~ area m cjcx0 ~ m
// ibcis ~ area m ibcxs ~ m
// ireis ~ area m ireps ~ m
// cbcpar ~ m -> area scaling not reasonable
// qavl ~ area m
// re ~1/(area*m)
// rci0 ~1/(area*m)
// rbx ~1/(area*m) -> assume that scaling with "area" is due to lE0 increase
// rcx ~1/(area*m) -> assume that scaling with "area" is due to lE0 increase
// rbi0 ~1/(area*m) -> assume that scaling with "area" is due to lE0 increase
// rth ~1/(area*m) -> bad assumption, but more transistor geometry needs to be known for accurate scaling
// crth ~ area*m -> bad assumption, but more transistor geometry needs to be known for accurate scaling
// Substrate related parameters not scaled on purpose. This is very geometry dependent?
area_times_m = here->HICUMm*here->HICUMarea;
//IT
qp0_scaled = model->HICUMqp0 * area_times_m;
c10_scaled = model->HICUMc10 * area_times_m*area_times_m;
icbar_scaled = model->HICUMicbar * area_times_m;
rth_scaled = model->HICUMrth / area_times_m; //very poor assumption
cth_scaled = model->HICUMcth * area_times_m; //very poor assumption
//BE junction
cjei0_scaled = model->HICUMcjei0 * area_times_m;
ibeis_scaled = model->HICUMibeis * area_times_m;
ireis_scaled = model->HICUMireis * area_times_m;
ibeps_scaled = model->HICUMibeps * here->HICUMm;
ireps_scaled = model->HICUMireps * here->HICUMm;
cjep0_scaled = model->HICUMcjep0 * here->HICUMm;
cbepar_scaled = model->HICUMcbepar * here->HICUMm;
//BC junction
ibcis_scaled = model->HICUMibcis * area_times_m;
cjci0_scaled = model->HICUMcjci0 * area_times_m;
cjcx0_scaled = model->HICUMcjcx0 * here->HICUMm;
cbcpar_scaled = model->HICUMcbcpar * here->HICUMm;
ibcxs_scaled = model->HICUMibcxs * here->HICUMm;
qavl_scaled = model->HICUMqavl * area_times_m;
//resistances //crth todo
re_scaled = model->HICUMre / area_times_m;
rci0_scaled = model->HICUMrci0 / area_times_m;
rbx_scaled = model->HICUMrbx / area_times_m;
rcx_scaled = model->HICUMrcx / area_times_m;
rbi0_scaled = model->HICUMrbi0 / area_times_m;
//these variables depend only on scale, but not on temperature.
// They are put into the here struct for usage in load routine.
here->HICUMicbar_scaled = icbar_scaled;
here->HICUMcbepar_scaled = cbepar_scaled;
here->HICUMcbcpar_scaled = cbcpar_scaled;
here->HICUMcth_scaled = cth_scaled;
Tnom = model->HICUMtnom;
k10 = model->HICUMf1vg*Tnom*log(Tnom);
k20 = model->HICUMf2vg*Tnom;
@ -183,12 +272,12 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
vgbe_t = (vgb_t+vge_t)/2;
here->HICUMtVcrit = here->HICUMvt.rpart *
log(here->HICUMvt.rpart / (CONSTroot2*model->HICUMibeis*here->HICUMarea*here->HICUMm));
log(here->HICUMvt.rpart / (CONSTroot2*ibeis_scaled*here->HICUMarea*here->HICUMm));
//Internal b-e junction capacitance
// TMPHICJ(here->HICUMvt0,here->HICUMvt,here->HICUMqtt0,here->HICUMln_qtt0,here->HICUMmg,model->HICUMcjei0,model->HICUMvdei,model->HICUMzei,model->HICUMajei,1,vgbe0,&here->HICUMcjei0_t,&here->HICUMvdei_t,&here->HICUMajei_t);
// TMPHICJ(here->HICUMvt0,here->HICUMvt,here->HICUMqtt0,here->HICUMln_qtt0,here->HICUMmg,cjei0_scaled,model->HICUMvdei,model->HICUMzei,model->HICUMajei,1,vgbe0,&here->HICUMcjei0_t,&here->HICUMvdei_t,&here->HICUMajei_t);
hicum_TMPHICJ(vt, here->HICUMvt0, qtt0, ln_qtt0, mg,
model->HICUMcjei0, model->HICUMvdei, model->HICUMzei, model->HICUMajei, 1, vgbe0,
cjei0_scaled, model->HICUMvdei, model->HICUMzei, model->HICUMajei, 1, vgbe0,
&here->HICUMcjei0_t.rpart, &here->HICUMvdei_t.rpart, &here->HICUMajei_t.rpart,
&here->HICUMcjei0_t.dpart, &here->HICUMvdei_t.dpart, &here->HICUMajei_t.dpart);
cjei0_t.rpart(here->HICUMcjei0_t.rpart);
@ -202,33 +291,33 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
r_VgVT = V_gT/vt;
//Internal b-e diode saturation currents
a = model->HICUMmcf*r_VgVT/model->HICUMmbei - model->HICUMalb*dT;
a = model->HICUMibeis*exp(a);
a = ibeis_scaled*exp(a);
here->HICUMibeis_t.rpart = a.rpart();
here->HICUMibeis_t.dpart = a.dpart();
a = model->HICUMmcf*r_VgVT/model->HICUMmrei - model->HICUMalb*dT;
a = model->HICUMireis*exp(a);
a = ireis_scaled*exp(a);
here->HICUMireis_t.rpart = a.rpart();
here->HICUMireis_t.dpart = a.dpart();
//Peripheral b-e diode saturation currents
a = model->HICUMmcf*r_VgVT/model->HICUMmbep - model->HICUMalb*dT;
a = model->HICUMibeps*exp(a);
a = ibeps_scaled*exp(a);
here->HICUMibeps_t.rpart = a.rpart();
here->HICUMibeps_t.dpart = a.dpart();
a = model->HICUMmcf*r_VgVT/model->HICUMmrep - model->HICUMalb*dT;
a = model->HICUMireps*exp(a);
a = ireps_scaled*exp(a);
here->HICUMireps_t.rpart = a.rpart();
here->HICUMireps_t.dpart = a.dpart();
//Internal b-c diode saturation current
a = r_VgVT/model->HICUMmbci;
a = model->HICUMibcis*exp(a);
a = ibcis_scaled*exp(a);
here->HICUMibcis_t.rpart = a.rpart();
here->HICUMibcis_t.dpart = a.dpart();
//External b-c diode saturation currents
a = r_VgVT/model->HICUMmbcx;
a = model->HICUMibcxs*exp(a);
a = ibcxs_scaled*exp(a);
here->HICUMibcxs_t.rpart = a.rpart();
here->HICUMibcxs_t.dpart = a.dpart();
//Saturation transfer current for substrate transistor
@ -243,7 +332,7 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
here->HICUMiscs_t.dpart = a.dpart();
//Zero bias hole charge
a = vdei_t/model->HICUMvdei;
a = model->HICUMqp0*(1.0+0.5*model->HICUMzei*(1.0-a));
a = qp0_scaled*(1.0+0.5*model->HICUMzei*(1.0-a));
here->HICUMqp0_t.rpart = a.rpart();
here->HICUMqp0_t.dpart = a.dpart();
//Voltage separating ohmic and saturation velocity regime
@ -263,33 +352,33 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
here->HICUMtef0_t.dpart = a.dpart();
} else {
//Internal b-e diode saturation currents
a = model->HICUMibeis*exp(model->HICUMzetabet*ln_qtt0+model->HICUMvge/vt*(qtt0-1));
a = ibeis_scaled*exp(model->HICUMzetabet*ln_qtt0+model->HICUMvge/vt*(qtt0-1));
here->HICUMibeis_t.rpart = a.rpart();
here->HICUMibeis_t.dpart = a.dpart();
if (model->HICUMflcomp>=2.3) {
a = model->HICUMireis*exp(mg/model->HICUMmrei*ln_qtt0+vgbe0/(model->HICUMmrei*vt)*(qtt0-1));
a = ireis_scaled*exp(mg/model->HICUMmrei*ln_qtt0+vgbe0/(model->HICUMmrei*vt)*(qtt0-1));
} else {
a = model->HICUMireis*exp(0.5*mg*ln_qtt0+0.5*vgbe0/vt*(qtt0-1));
a = ireis_scaled*exp(0.5*mg*ln_qtt0+0.5*vgbe0/vt*(qtt0-1));
}
here->HICUMireis_t.rpart = a.rpart();
here->HICUMireis_t.dpart = a.dpart();
//Peripheral b-e diode saturation currents
a = model->HICUMibeps*exp(model->HICUMzetabet*ln_qtt0+model->HICUMvge/vt*(qtt0-1));
a = ibeps_scaled*exp(model->HICUMzetabet*ln_qtt0+model->HICUMvge/vt*(qtt0-1));
here->HICUMibeps_t.rpart = a.rpart();
here->HICUMibeps_t.dpart = a.dpart();
if (model->HICUMflcomp>=2.3) {
a = model->HICUMireps*exp(mg/model->HICUMmrep*ln_qtt0+vgbe0/(model->HICUMmrep*vt)*(qtt0-1));
a = ireps_scaled*exp(mg/model->HICUMmrep*ln_qtt0+vgbe0/(model->HICUMmrep*vt)*(qtt0-1));
} else {
a = model->HICUMireps*exp(0.5*mg*qtt0+0.5*vgbe0/vt*(qtt0-1));
a = ireps_scaled*exp(0.5*mg*qtt0+0.5*vgbe0/vt*(qtt0-1));
}
here->HICUMireps_t.rpart = a.rpart();
here->HICUMireps_t.dpart = a.dpart();
//Internal b-c diode saturation currents
a = model->HICUMibcis*exp(zetabci*ln_qtt0+model->HICUMvgc/vt*(qtt0-1));
a = ibcis_scaled*exp(zetabci*ln_qtt0+model->HICUMvgc/vt*(qtt0-1));
here->HICUMibcis_t.rpart = a.rpart();
here->HICUMibcis_t.dpart = a.dpart();
//External b-c diode saturation currents
a = model->HICUMibcxs*exp(zetabcxt*ln_qtt0+model->HICUMvgc/vt*(qtt0-1));
a = ibcxs_scaled*exp(zetabcxt*ln_qtt0+model->HICUMvgc/vt*(qtt0-1));
here->HICUMibcxs_t.rpart = a.rpart();
here->HICUMibcxs_t.dpart = a.dpart();
//Saturation transfer current for substrate transistor
@ -302,7 +391,7 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
here->HICUMiscs_t.dpart = a.dpart();
//Zero bias hole charge
a = exp(model->HICUMzei*log(vdei_t/model->HICUMvdei));
a = model->HICUMqp0*(2.0-a);
a = qp0_scaled*(2.0-a);
here->HICUMqp0_t.rpart = a.rpart();
here->HICUMqp0_t.dpart = a.dpart();
//Voltage separating ohmic and saturation velocity regime
@ -322,12 +411,12 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
}
//GICCR prefactor
a = model->HICUMc10*exp(model->HICUMzetact*ln_qtt0+model->HICUMvgb/vt*(qtt0-1));
a = c10_scaled*exp(model->HICUMzetact*ln_qtt0+model->HICUMvgb/vt*(qtt0-1));
here->HICUMc10_t.rpart = a.rpart();
here->HICUMc10_t.dpart = a.dpart();
// Low-field internal collector resistance
a = model->HICUMrci0*exp(model->HICUMzetaci*ln_qtt0);
a = rci0_scaled*exp(model->HICUMzetaci*ln_qtt0);
here->HICUMrci0_t.rpart = a.rpart();
here->HICUMrci0_t.dpart = a.dpart();
@ -337,9 +426,9 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
here->HICUMvces_t.dpart = a.dpart();
//Internal b-c junction capacitance
// TMPHICJ(here->HICUMvt0,here->HICUMvt,here->HICUMqtt0,here->HICUMln_qtt0,here->HICUMmg,model->HICUMcjci0,model->HICUMvdci,model->HICUMzci,model->HICUMvptci,0,vgbc0,&cjci0_t,&vdci_t,&vptci_t);
// TMPHICJ(here->HICUMvt0,here->HICUMvt,here->HICUMqtt0,here->HICUMln_qtt0,here->HICUMmg,cjci0_scaled,model->HICUMvdci,model->HICUMzci,model->HICUMvptci,0,vgbc0,&cjci0_t,&vdci_t,&vptci_t);
hicum_TMPHICJ(vt, here->HICUMvt0, qtt0, ln_qtt0, mg,
model->HICUMcjci0, model->HICUMvdci, model->HICUMzci, model->HICUMvptci, 0, vgbc0,
cjci0_scaled, model->HICUMvdci, model->HICUMzci, model->HICUMvptci, 0, vgbc0,
&here->HICUMcjci0_t.rpart, &here->HICUMvdci_t.rpart, &here->HICUMvptci_t.rpart,
&here->HICUMcjci0_t.dpart, &here->HICUMvdci_t.dpart, &here->HICUMvptci_t.dpart);
@ -357,7 +446,7 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
a = model->HICUMfavl*exp(model->HICUMalfav*dT);
here->HICUMfavl_t.rpart = a.rpart();
here->HICUMfavl_t.dpart = a.dpart();
a = model->HICUMqavl*exp(model->HICUMalqav*dT);
a = qavl_scaled*exp(model->HICUMalqav*dT);
here->HICUMqavl_t.rpart = a.rpart();
here->HICUMqavl_t.dpart = a.dpart();
a = model->HICUMkavl*exp(model->HICUMalkav*dT);
@ -365,14 +454,14 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
here->HICUMkavl_t.dpart = a.dpart();
//Zero bias internal base resistance
a = model->HICUMrbi0*exp(model->HICUMzetarbi*ln_qtt0);
a = rbi0_scaled*exp(model->HICUMzetarbi*ln_qtt0);
here->HICUMrbi0_t.rpart = a.rpart();
here->HICUMrbi0_t.dpart = a.dpart();
//Peripheral b-e junction capacitance
// TMPHICJ(here->HICUMvt0,here->HICUMvt,here->HICUMqtt0,here->HICUMln_qtt0,here->HICUMmg,model->HICUMcjep0,model->HICUMvdep,model->HICUMzep,model->HICUMajep,1,vgbe0,&cjep0_t,&vdep_t,&ajep_t);
// TMPHICJ(here->HICUMvt0,here->HICUMvt,here->HICUMqtt0,here->HICUMln_qtt0,here->HICUMmg,cjep0_scaled,model->HICUMvdep,model->HICUMzep,model->HICUMajep,1,vgbe0,&cjep0_t,&vdep_t,&ajep_t);
hicum_TMPHICJ(vt, here->HICUMvt0, qtt0, ln_qtt0, mg,
model->HICUMcjep0, model->HICUMvdep, model->HICUMzep, model->HICUMajep, 1, vgbe0,
cjep0_scaled, model->HICUMvdep, model->HICUMzep, model->HICUMajep, 1, vgbe0,
&here->HICUMcjep0_t.rpart, &here->HICUMvdep_t.rpart, &here->HICUMajep_t.rpart,
&here->HICUMcjep0_t.dpart, &here->HICUMvdep_t.dpart, &here->HICUMajep_t.dpart);
cjep0_t.rpart(here->HICUMcjep0_t.rpart);
@ -386,12 +475,12 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
ab = 1.0;
aa = 1.0;
a_eg = vgbe_t0/vgbe_t;
if(model->HICUMtunode==1 && model->HICUMcjep0 > 0.0 && model->HICUMvdep >0.0) {
ab = (cjep0_t/model->HICUMcjep0)*sqrt(a_eg)*vdep_t*vdep_t/(model->HICUMvdep*model->HICUMvdep);
aa = (model->HICUMvdep/vdep_t)*(model->HICUMcjep0/cjep0_t)*pow(a_eg,-1.5);
} else if (model->HICUMtunode==0 && model->HICUMcjei0 > 0.0 && model->HICUMvdei >0.0) {
ab = (cjei0_t/model->HICUMcjei0)*sqrt(a_eg)*vdei_t*vdei_t/(model->HICUMvdei*model->HICUMvdei);
aa = (model->HICUMvdei/vdei_t)*(model->HICUMcjei0/cjei0_t)*pow(a_eg,-1.5);
if(model->HICUMtunode==1 && cjep0_scaled > 0.0 && model->HICUMvdep >0.0) {
ab = (cjep0_t/cjep0_scaled)*sqrt(a_eg)*vdep_t*vdep_t/(model->HICUMvdep*model->HICUMvdep);
aa = (model->HICUMvdep/vdep_t)*(cjep0_scaled/cjep0_t)*pow(a_eg,-1.5);
} else if (model->HICUMtunode==0 && cjei0_scaled > 0.0 && model->HICUMvdei >0.0) {
ab = (cjei0_t/cjei0_scaled)*sqrt(a_eg)*vdei_t*vdei_t/(model->HICUMvdei*model->HICUMvdei);
aa = (model->HICUMvdei/vdei_t)*(cjei0_scaled/cjei0_t)*pow(a_eg,-1.5);
}
a = model->HICUMibets*ab;
here->HICUMibets_t.rpart = a.rpart();
@ -408,13 +497,13 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
//Depletion capacitance splitting at b-c junction
//Capacitances at peripheral and external base node
C_1 = (1.0-model->HICUMfbcpar)*(model->HICUMcjcx0+model->HICUMcbcpar);
if (C_1 >= model->HICUMcbcpar) {
cjcx01 = C_1-model->HICUMcbcpar;
cjcx02 = model->HICUMcjcx0-cjcx01;
C_1 = (1.0-model->HICUMfbcpar)*(cjcx0_scaled+cbcpar_scaled);
if (C_1 >= cbcpar_scaled) {
cjcx01 = C_1-cbcpar_scaled;
cjcx02 = cjcx0_scaled-cjcx01;
} else {
cjcx01 = 0.0;
cjcx02 = model->HICUMcjcx0;
cjcx02 = cjcx0_scaled;
}
//Temperature mapping for tunneling current is done inside HICTUN
@ -433,13 +522,13 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
here->HICUMcjcx02_t.dpart = a.dpart();
//Constant external series resistances
a = model->HICUMrcx*exp(model->HICUMzetarcx*ln_qtt0);
a = rcx_scaled*exp(model->HICUMzetarcx*ln_qtt0);
here->HICUMrcx_t.rpart = a.rpart();
here->HICUMrcx_t.dpart = a.dpart();
a = model->HICUMrbx*exp(model->HICUMzetarbx*ln_qtt0);
a = rbx_scaled*exp(model->HICUMzetarbx*ln_qtt0);
here->HICUMrbx_t.rpart = a.rpart();
here->HICUMrbx_t.dpart = a.dpart();
a = model->HICUMre*exp(model->HICUMzetare*ln_qtt0);
a = re_scaled*exp(model->HICUMzetare*ln_qtt0);
here->HICUMre_t.rpart = a.rpart();
here->HICUMre_t.dpart = a.dpart();
@ -497,7 +586,7 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double
here->HICUMhfc_t.dpart = 0;
}
a = model->HICUMrth*exp(model->HICUMzetarth*ln_qtt0)*(1+model->HICUMalrth*dT);
a = rth_scaled*exp(model->HICUMzetarth*ln_qtt0)*(1+model->HICUMalrth*dT);
here->HICUMrth_t.rpart = a.rpart();
here->HICUMrth_t.dpart = a.dpart();