diode needs both current components (bottom and sidewall) for Vcrit and breakdown voltage calculation

This commit is contained in:
dwarning 2025-07-28 00:07:07 +02:00
parent 8c90b12b50
commit 10f4eeed4a
1 changed files with 7 additions and 6 deletions

View File

@ -196,7 +196,8 @@ void DIOtempUpdate(DIOmodel *inModel, DIOinstance *here, double Temp, CKTcircuit
here->DIOtDepSWCap=model->DIOdepletionSWcapCoeff*
here->DIOtJctSWPot;
/* and Vcrit */
here->DIOtVcrit = vte * log(vte/(CONSTroot2*here->DIOtSatCur));
double totalSatCur = here->DIOtSatCur + here->DIOtSatSWCur;
here->DIOtVcrit = vte * log(vte/(CONSTroot2*totalSatCur));
/* and now to compute the breakdown voltage, again, using
* temperature adjusted basic parameters */
@ -211,9 +212,9 @@ void DIOtempUpdate(DIOmodel *inModel, DIOinstance *here, double Temp, CKTcircuit
} else { /* level=3 */
cbv = model->DIObreakdownCurrent * here->DIOarea * here->DIOm;
}
if (cbv < here->DIOtSatCur * tBreakdownVoltage/vt) {
if (cbv < totalSatCur * tBreakdownVoltage/vt) {
#ifdef TRACE
cbv=here->DIOtSatCur * tBreakdownVoltage/vt;
cbv=totalSatCur * tBreakdownVoltage/vt;
SPfrontEnd->IFerrorf (ERR_WARNING, "%s: breakdown current increased to %g to resolve", here->DIOname, cbv);
SPfrontEnd->IFerrorf (ERR_WARNING,
"incompatibility with specified saturation current");
@ -222,11 +223,11 @@ void DIOtempUpdate(DIOmodel *inModel, DIOinstance *here, double Temp, CKTcircuit
} else {
tol=ckt->CKTreltol*cbv;
xbv=tBreakdownVoltage-model->DIObrkdEmissionCoeff*vt*log(1+cbv/
(here->DIOtSatCur));
totalSatCur);
for(iter=0 ; iter < 25 ; iter++) {
xbv=tBreakdownVoltage-model->DIObrkdEmissionCoeff*vt*log(cbv/
(here->DIOtSatCur)+1-xbv/vt);
xcbv=here->DIOtSatCur *
totalSatCur+1-xbv/vt);
xcbv=totalSatCur *
(exp((tBreakdownVoltage-xbv)/(model->DIObrkdEmissionCoeff*vt))-1+xbv/vt);
if (fabs(xcbv-cbv) <= tol) goto matched;
}