From b13675ea44f9c0798258a9aa5ad415232d7ae303 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 11 Apr 2018 10:46:59 +0200 Subject: [PATCH] remove unused code to calculate bulk-source and bulk-drain capacitors has been replaced already by capacitor from parallel bulk diode --- src/spicelib/devices/vdmos/vdmosload.c | 28 +++++++------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/src/spicelib/devices/vdmos/vdmosload.c b/src/spicelib/devices/vdmos/vdmosload.c index 1b1fd3e9e..d61df0254 100644 --- a/src/spicelib/devices/vdmos/vdmosload.c +++ b/src/spicelib/devices/vdmos/vdmosload.c @@ -41,8 +41,6 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt) double delvds; double delvgd; double delvgs; - double evbd; - double evbs; double gcgb; double gcgd; double gcgs; @@ -337,26 +335,14 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt) /* - * bulk-source and bulk-drain diodes - * here we just evaluate the ideal diode current and the - * corresponding derivative (conductance). + * bulk-source and bulk-drain diodes are not available in vdmos */ - if (vbs <= -3 * vt) { - here->VDMOSgbs = ckt->CKTgmin; - here->VDMOScbs = here->VDMOSgbs*vbs - SourceSatCur; - } else { - evbs = exp(MIN(MAX_EXP_ARG, vbs / vt)); - here->VDMOSgbs = SourceSatCur*evbs / vt + ckt->CKTgmin; - here->VDMOScbs = SourceSatCur*(evbs - 1) + ckt->CKTgmin*vbs; - } - if (vbd <= -3 * vt) { - here->VDMOSgbd = ckt->CKTgmin; - here->VDMOScbd = here->VDMOSgbd*vbd - DrainSatCur; - } else { - evbd = exp(MIN(MAX_EXP_ARG, vbd / vt)); - here->VDMOSgbd = DrainSatCur*evbd / vt + ckt->CKTgmin; - here->VDMOScbd = DrainSatCur*(evbd - 1) + ckt->CKTgmin*vbd; - } + + here->VDMOSgbs = 0; + here->VDMOScbs = 0; + here->VDMOSgbd = 0; + here->VDMOScbd = 0; + /* now to determine whether the user was able to correctly * identify the source and drain of his device */