diff --git a/src/spicelib/devices/hicum2/hicum2acld.c b/src/spicelib/devices/hicum2/hicum2acld.c index e8aa361b6..f738f9755 100644 --- a/src/spicelib/devices/hicum2/hicum2acld.c +++ b/src/spicelib/devices/hicum2/hicum2acld.c @@ -121,7 +121,7 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt) for( ; model != NULL; model = HICUMnextModel(model)) { int selfheat = ( (model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); - int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp == 0.0 || model->HICUMflcomp == 2.1) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); + int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); /* loop through all the instances of the model */ for( here = HICUMinstances(model); here!= NULL; diff --git a/src/spicelib/devices/hicum2/hicum2pzld.c b/src/spicelib/devices/hicum2/hicum2pzld.c index f4073a0f7..7d395c584 100644 --- a/src/spicelib/devices/hicum2/hicum2pzld.c +++ b/src/spicelib/devices/hicum2/hicum2pzld.c @@ -123,7 +123,7 @@ HICUMpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) for( ; model != NULL; model = HICUMnextModel(model)) { int selfheat = ( (model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); - int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp == 0.0 || model->HICUMflcomp == 2.1) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); + int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); /* loop through all the instances of the model */ for( here = HICUMinstances(model); here!= NULL; diff --git a/src/spicelib/devices/hicum2/hicum2setup.c b/src/spicelib/devices/hicum2/hicum2setup.c index 58deb29cd..9f4d5f72f 100644 --- a/src/spicelib/devices/hicum2/hicum2setup.c +++ b/src/spicelib/devices/hicum2/hicum2setup.c @@ -38,7 +38,7 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) for( ; model != NULL; model = HICUMnextModel(model)) { int selfheat = (((model->HICUMflsh == 1) || (model->HICUMflsh == 2)) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); - int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp == 0.0 || model->HICUMflcomp == 2.1) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); + int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); //Circuit simulator specific parameters if(model->HICUMtype != NPN && model->HICUMtype != PNP) diff --git a/src/spicelib/devices/hicum2/hicumL2.cpp b/src/spicelib/devices/hicum2/hicumL2.cpp index aa5d29dbc..def2345bb 100644 --- a/src/spicelib/devices/hicum2/hicumL2.cpp +++ b/src/spicelib/devices/hicum2/hicumL2.cpp @@ -629,7 +629,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt) FCdfc_dw = FCf_CT*(FCa1*FCdf1_dw+FCda1_dw*FCf1-FCdf2_dw+FCdf3_dw); FCdw_ditf = FCdw_daick*FCdaick_ditf; FCdfc_ditf = FCdfc_dw*FCdw_ditf; - if(model->HICUMflcomp == 0.0 || model->HICUMflcomp == 2.1) { + if(model->HICUMflcomp < 2.3) { HICFCT(model->HICUMlatb,FCw,&FCf2,&FCdf2_dw); HICFCT(model->HICUMlatl,FCw,&FCf3,&FCdf3_dw); FCf_CT = FCf_CT*(FCf2-FCf3); @@ -656,7 +656,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt) FCdfc_dw = 2.0*FCw*(FCz_1+FCz*FCz/3.0)*FCd_f*FCd_f; FCdw_ditf = FCdw_daick*FCdaick_ditf; FCdfc_ditf = FCdfc_dw*FCdw_ditf; - if(model->HICUMflcomp == 0.0 || model->HICUMflcomp == 2.1){ + if(model->HICUMflcomp < 2.3){ if (FCz > 0.001){ FCf_CT = 2.0*(FCz_1*log(FCz_1)-FCz)/(model->HICUMlatb*model->HICUMlatb*FCz_1); FCdfCT_dw = 2.0*FCw*FCd_f*FCd_f; @@ -1197,7 +1197,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt) // Model_initialization int selfheat = ((model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); - int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp == 0.0 || model->HICUMflcomp == 2.1) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); + int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); // Avoid divide-by-zero and define infinity other way // High current correction for 2D and 3D effects diff --git a/src/spicelib/devices/hicum2/hicumL2temp.cpp b/src/spicelib/devices/hicum2/hicumL2temp.cpp index 85f1bb3a8..09d988640 100644 --- a/src/spicelib/devices/hicum2/hicumL2temp.cpp +++ b/src/spicelib/devices/hicum2/hicumL2temp.cpp @@ -197,7 +197,7 @@ int hicum_thermal_update(HICUMmodel *inModel, HICUMinstance *inInstance, double vdei_t.rpart(here->HICUMvdei_t.rpart); vdei_t.dpart(here->HICUMvdei_t.dpart); - if (model->HICUMflcomp == 0.0 || model->HICUMflcomp == 2.1) { + if (model->HICUMflcomp < 2.3) { duals::duald V_gT, r_VgVT, k; V_gT = 3.0*vt*ln_qtt0 + model->HICUMvgb*(qtt0-1.0); r_VgVT = V_gT/vt;