From 2e7a6771775103d31dffe3514267ae66494820c1 Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 5 Jan 2017 11:21:13 +0100 Subject: [PATCH] b4v6set.c, BSIM4v6unsetup(), bug fix, the other bsim too ! Some local nodes have not been deleted, breaking allocation of nodes during a following CKTsetup() --- src/spicelib/devices/bsim4v6/b4v6set.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/spicelib/devices/bsim4v6/b4v6set.c b/src/spicelib/devices/bsim4v6/b4v6set.c index f009e7c91..e0354caf4 100644 --- a/src/spicelib/devices/bsim4v6/b4v6set.c +++ b/src/spicelib/devices/bsim4v6/b4v6set.c @@ -2478,6 +2478,27 @@ BSIM4v6unsetup(GENmodel *inModel, CKTcircuit *ckt) CKTdltNNum(ckt, here->BSIM4v6sNodePrime); here->BSIM4v6sNodePrime = 0; } + + if (here->BSIM4v6sbNode + && here->BSIM4v6sbNode != here->BSIM4v6bNode) + { + CKTdltNNum(ckt, here->BSIM4v6sbNode); + here->BSIM4v6sbNode = 0; + } + + if (here->BSIM4v6bNodePrime + && here->BSIM4v6bNodePrime != here->BSIM4v6bNode) + { + CKTdltNNum(ckt, here->BSIM4v6bNodePrime); + here->BSIM4v6bNodePrime = 0; + } + + if (here->BSIM4v6dbNode + && here->BSIM4v6dbNode != here->BSIM4v6bNode) + { + CKTdltNNum(ckt, here->BSIM4v6dbNode); + here->BSIM4v6dbNode = 0; + } } } #endif