diff --git a/src/spicelib/devices/hicum2/hicumL2.cpp b/src/spicelib/devices/hicum2/hicumL2.cpp index e619a880e..076223b62 100644 --- a/src/spicelib/devices/hicum2/hicumL2.cpp +++ b/src/spicelib/devices/hicum2/hicumL2.cpp @@ -2410,17 +2410,20 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt) // end of Load_sources if (rbi >= MIN_R) { + Ibpbi = Vbpbi / rbi; Ibpbi_Vbpbi = 1 / rbi; - Ibpbi = Vbpbi / rbi; + Ibpbi_Vbiei = -Vbpbi * rbi_Vbiei / (rbi*rbi); + Ibpbi_Vbici = -Vbpbi * rbi_Vbici / (rbi*rbi); + Ibpbi_dT = -Vbpbi * rbi_dT / (rbi*rbi); } else { // fallback in case rbi is low + Ibpbi = Vbpbi / MIN_R; Ibpbi_Vbpbi = 1 / MIN_R; - Ibpbi = Vbpbi / MIN_R; + Ibpbi_Vbiei = 0; + Ibpbi_Vbici = 0; + Ibpbi_dT = 0; + } - Ibpbi_Vbiei = -Vbpbi * rbi_Vbiei / (rbi*rbi); - Ibpbi_Vbici = -Vbpbi * rbi_Vbici / (rbi*rbi); - Ibpbi_dT = -Vbpbi * rbi_dT / (rbi*rbi); - Qjcx_i_Vbci = Cjcx_i; Qjcx_ii_Vbpci = Cjcx_ii; Qjep_Vbpei = Cjep; @@ -2950,7 +2953,7 @@ c Branch: bpbi, Stamp element: Rbi, Crbi *(ckt->CKTrhs + here->HICUMbaseBPNode) += -rhs_current; *(ckt->CKTrhs + here->HICUMbaseBINode) += rhs_current; - *(here->HICUMbaseBPBaseBPPtr) += Ibpbi_Vbpbi; + *(here->HICUMbaseBPBaseBPPtr) += Ibpbi_Vbpbi; *(here->HICUMbaseBIBaseBIPtr) += Ibpbi_Vbpbi; *(here->HICUMbaseBPBaseBIPtr) += -Ibpbi_Vbpbi; *(here->HICUMbaseBIBaseBPPtr) += -Ibpbi_Vbpbi; @@ -2963,7 +2966,7 @@ c Branch: bpbi, Stamp element: Rbi, Crbi *(here->HICUMbaseBPBaseBIPtr) += Ibpbi_Vbici; *(here->HICUMbaseBPCollCIPtr) += -Ibpbi_Vbici; *(here->HICUMbaseBIBaseBIPtr) += -Ibpbi_Vbici; - *(here->HICUMbaseBIEmitEIPtr) += Ibpbi_Vbici; + *(here->HICUMbaseBICollCIPtr) += Ibpbi_Vbici; /* c Branch: sc, Stamp element: Cscp //@NOCHMAL CHECKEN */ diff --git a/src/spicelib/devices/hicum2/hicumL2temp.cpp b/src/spicelib/devices/hicum2/hicumL2temp.cpp index 593cf1ede..feac780d6 100644 --- a/src/spicelib/devices/hicum2/hicumL2temp.cpp +++ b/src/spicelib/devices/hicum2/hicumL2temp.cpp @@ -99,13 +99,13 @@ void hicum_TMPHICJ(duals::duald vt, double vt0, duals::duald qtt0, duals::duald *w_t_dT = w_t_result.dpart(); } -int iret; int HICUMtemp(GENmodel *inModel, CKTcircuit *ckt) /* Pre-compute many useful parameters */ { + int iret; HICUMmodel *model = (HICUMmodel *)inModel; HICUMinstance *here;