From e376c0e5c6ba81799897c21c64264707a3e7d3a4 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 18 Nov 2023 17:16:19 +0100 Subject: [PATCH] Eanble op or ac op (operating point), when selfheat is on. op for tran has been o.k. Fixme: preliminary fix or hack. --- src/spicelib/devices/vdmos/vdmosload.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/spicelib/devices/vdmos/vdmosload.c b/src/spicelib/devices/vdmos/vdmosload.c index 69fac79fd..3d27fcb30 100644 --- a/src/spicelib/devices/vdmos/vdmosload.c +++ b/src/spicelib/devices/vdmos/vdmosload.c @@ -84,6 +84,16 @@ 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 evalution of + first interation in CKTop(). Calling CKTop() from acan uses flag MODEDCOP, + changing this to MODETRANOP, as used by CKTop() called from dctran, 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