From 8c3d4d7990f7015a248ba0bcb075aad308bb6bf0 Mon Sep 17 00:00:00 2001 From: dwarning Date: Mon, 10 Nov 2025 15:17:56 +0100 Subject: [PATCH] vdmos convtest needs type for vd - load hack not needed anymore --- src/spicelib/devices/vdmos/vdmosconv.c | 5 +++-- src/spicelib/devices/vdmos/vdmosload.c | 10 ---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/spicelib/devices/vdmos/vdmosconv.c b/src/spicelib/devices/vdmos/vdmosconv.c index c51a94a0a..6b6dfca42 100644 --- a/src/spicelib/devices/vdmos/vdmosconv.c +++ b/src/spicelib/devices/vdmos/vdmosconv.c @@ -82,8 +82,9 @@ VDMOSconvTest(GENmodel *inModel, CKTcircuit *ckt) * initialization */ - vd = *(ckt->CKTrhsOld+here->VDIOposPrimeNode)- - *(ckt->CKTrhsOld + here->VDMOSdNode); + vd = model->VDMOStype * ( + *(ckt->CKTrhsOld+here->VDIOposPrimeNode)- + *(ckt->CKTrhsOld + here->VDMOSdNode)); delvd=vd- *(ckt->CKTstate0 + here->VDIOvoltage); diff --git a/src/spicelib/devices/vdmos/vdmosload.c b/src/spicelib/devices/vdmos/vdmosload.c index 5e29a989a..4cc60314f 100644 --- a/src/spicelib/devices/vdmos/vdmosload.c +++ b/src/spicelib/devices/vdmos/vdmosload.c @@ -84,16 +84,6 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt) else Check_th = 0; - /* FIXME: - this is not a fix, but a hack: - with selfheat, op and op for ac don't work, NaN in self heating evaluation of - first iteration in CKTop(). Calling CKTop() from acan uses flag MODEDCOP, - changing this to MODETRANOP, as used by CKTop() called from dctran, then op is o.k. - */ - if (selfheat) - if(ckt->CKTmode == 528) /* includes MODEDCOP */ - ckt->CKTmode = 544; /* includes MODETRANOP */ - /* first, we compute a few useful values - these could be * pre-computed, but for historical reasons are still done * here. They may be moved at the expense of instance size