From 3d02373664a1b2fb53f1353dadbb3a0ef0eb9d0a Mon Sep 17 00:00:00 2001 From: dwarning Date: Tue, 9 Jun 2026 08:08:41 +0200 Subject: [PATCH] DEVpred() of charge node needs state vector update before --- src/spicelib/devices/dio/dioload.c | 2 ++ src/spicelib/devices/vdmos/vdmosload.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/spicelib/devices/dio/dioload.c b/src/spicelib/devices/dio/dioload.c index b4a9d49bd..b2314f1cd 100644 --- a/src/spicelib/devices/dio/dioload.c +++ b/src/spicelib/devices/dio/dioload.c @@ -190,6 +190,8 @@ DIOload(GENmodel *inModel, CKTcircuit *ckt) *(ckt->CKTstate0 + here->DIOdIdioSW_dT) = *(ckt->CKTstate1 + here->DIOdIdioSW_dT); } + *(ckt->CKTstate0 + here->DIOqp) = + *(ckt->CKTstate1 + here->DIOqp); vqp = DEVpred(ckt,here->DIOqp); *(ckt->CKTstate0 + here->DIOresCurrent) = *(ckt->CKTstate1 + here->DIOresCurrent); diff --git a/src/spicelib/devices/vdmos/vdmosload.c b/src/spicelib/devices/vdmos/vdmosload.c index addbe4921..7bef8b2c6 100644 --- a/src/spicelib/devices/vdmos/vdmosload.c +++ b/src/spicelib/devices/vdmos/vdmosload.c @@ -760,6 +760,8 @@ bypass: *(ckt->CKTstate1 + here->VDIOconduct); *(ckt->CKTstate0 + here->VDIOdIdio_dT) = *(ckt->CKTstate1 + here->VDIOdIdio_dT); + *(ckt->CKTstate0 + here->VDIOqp) = + *(ckt->CKTstate1 + here->VDIOqp); vqp = DEVpred(ckt,here->VDIOqp); *(ckt->CKTstate0 + here->VDIOresCurrent) = *(ckt->CKTstate1 + here->VDIOresCurrent);