From 7c94cc2e42b1bd0f8d8d9404d2bdaf87fc1a13ef Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 11 Nov 2018 17:10:53 +0100 Subject: [PATCH] setting gmbs direct to 0 --- src/spicelib/devices/vdmos/vdmosload.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/spicelib/devices/vdmos/vdmosload.c b/src/spicelib/devices/vdmos/vdmosload.c index 32e037a4e..cf279a90e 100644 --- a/src/spicelib/devices/vdmos/vdmosload.c +++ b/src/spicelib/devices/vdmos/vdmosload.c @@ -356,17 +356,15 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt) * */ - /* the following 4 variables are local to this code block until + /* the following 2 variables are local to this code block until * it is obvious that they can be made global */ - double arg; double betap; double vgst; von = (model->VDMOSvt0*model->VDMOStype); vgst = (here->VDMOSmode == 1 ? vgs : vgd) - von; vdsat = MAX(vgst, 0); - arg = 0; /* drain current including subthreshold current * numerical differentiation for gd and gm with a delta of 2 mV */ if (model->VDMOSksubthresGiven && (here->VDMOSmode == 1)) { @@ -432,7 +430,7 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt) cdrain = betap*vgst*vgst*.5; here->VDMOSgm = betap*vgst; here->VDMOSgds = model->VDMOSlambda*Beta*vgst*vgst*.5; - here->VDMOSgmbs = here->VDMOSgm*arg; + here->VDMOSgmbs = 0.; } else { /* * linear region @@ -444,7 +442,7 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt) model->VDMOSlambda * Beta * (vds * here->VDMOSmode) * mtr * (vgst - .5 * (vds * here->VDMOSmode) * mtr); - here->VDMOSgmbs = here->VDMOSgm * arg; + here->VDMOSgmbs = 0.; } } }