From 8ca33bc8f548c7601367a9abce8244e2431af6e1 Mon Sep 17 00:00:00 2001 From: dwarning Date: Wed, 1 Apr 2020 16:43:59 +0200 Subject: [PATCH] VDMOS correct thermal diode contribution in reverse operation --- src/spicelib/devices/vdmos/vdmosload.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/spicelib/devices/vdmos/vdmosload.c b/src/spicelib/devices/vdmos/vdmosload.c index baeec97ef..71bcf3216 100644 --- a/src/spicelib/devices/vdmos/vdmosload.c +++ b/src/spicelib/devices/vdmos/vdmosload.c @@ -334,7 +334,6 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt) */ vgd = vgs - vds; - /* now to determine whether the user was able to correctly * identify the source and drain of his device */ @@ -856,7 +855,7 @@ bypass: if (ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->VDIOcapCurrent) = capd; - continue; + goto load; } /* @@ -914,7 +913,7 @@ load: if (selfheat) { *(ckt->CKTrhs + here->VDMOSdNode) += dIdio_dT*delTemp; *(ckt->CKTrhs + here->VDIOposPrimeNode) -= dIdio_dT*delTemp; - *(ckt->CKTrhs + here->VDMOStempNode) += Ith - dIth_dVdio*vd - dIth_dT*delTemp; /* Diode dissipated power */ + *(ckt->CKTrhs + here->VDMOStempNode) += Ith - model->VDMOStype*dIth_dVdio*vd + dIth_dT*delTemp; /* Diode dissipated power */ } /* * load matrix