From 5f690006fc5275deeb3c27ae823457d25fc6ecd9 Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 5 Jan 2017 18:20:04 +0100 Subject: [PATCH] BSIM4unsetup(), "gate" and "midgate" --- src/spicelib/devices/bsim4/b4set.c | 12 ++++++++++++ src/spicelib/devices/bsim4v5/b4v5set.c | 12 ++++++++++++ src/spicelib/devices/bsim4v6/b4v6set.c | 14 ++++++++++++++ src/spicelib/devices/bsim4v7/b4v7set.c | 12 ++++++++++++ 4 files changed, 50 insertions(+) diff --git a/src/spicelib/devices/bsim4/b4set.c b/src/spicelib/devices/bsim4/b4set.c index 2217ef59c..c27cbca31 100644 --- a/src/spicelib/devices/bsim4/b4set.c +++ b/src/spicelib/devices/bsim4/b4set.c @@ -2737,6 +2737,18 @@ CKTcircuit *ckt) CKTdltNNum(ckt, here->BSIM4dbNode); here->BSIM4dbNode = 0; } + if (here->BSIM4gNodePrime + && here->BSIM4gNodePrime != here->BSIM4gNodeExt) + { + CKTdltNNum(ckt, here->BSIM4gNodePrime); + here->BSIM4gNodePrime = 0; + } + if (here->BSIM4gNodeMid + && here->BSIM4gNodeMid != here->BSIM4gNodeExt) + { + CKTdltNNum(ckt, here->BSIM4gNodeMid); + here->BSIM4gNodeMid = 0; + } if (here->BSIM4qNode) { CKTdltNNum(ckt, here->BSIM4qNode); diff --git a/src/spicelib/devices/bsim4v5/b4v5set.c b/src/spicelib/devices/bsim4v5/b4v5set.c index 872fb2424..00e06cfe3 100644 --- a/src/spicelib/devices/bsim4v5/b4v5set.c +++ b/src/spicelib/devices/bsim4v5/b4v5set.c @@ -2163,6 +2163,18 @@ BSIM4v5unsetup( CKTdltNNum(ckt, here->BSIM4v5dbNode); here->BSIM4v5dbNode = 0; } + if (here->BSIM4v5gNodePrime + && here->BSIM4v5gNodePrime != here->BSIM4v5gNodeExt) + { + CKTdltNNum(ckt, here->BSIM4v5gNodePrime); + here->BSIM4v5gNodePrime = 0; + } + if (here->BSIM4v5gNodeMid + && here->BSIM4v5gNodeMid != here->BSIM4v5gNodeExt) + { + CKTdltNNum(ckt, here->BSIM4v5gNodeMid); + here->BSIM4v5gNodeMid = 0; + } if (here->BSIM4v5qNode) { CKTdltNNum(ckt, here->BSIM4v5qNode); diff --git a/src/spicelib/devices/bsim4v6/b4v6set.c b/src/spicelib/devices/bsim4v6/b4v6set.c index cd5d6f4e4..311f7b431 100644 --- a/src/spicelib/devices/bsim4v6/b4v6set.c +++ b/src/spicelib/devices/bsim4v6/b4v6set.c @@ -2500,6 +2500,20 @@ BSIM4v6unsetup(GENmodel *inModel, CKTcircuit *ckt) here->BSIM4v6dbNode = 0; } + if (here->BSIM4v6gNodePrime + && here->BSIM4v6gNodePrime != here->BSIM4v6gNodeExt) + { + CKTdltNNum(ckt, here->BSIM4v6gNodePrime); + here->BSIM4v6gNodePrime = 0; + } + + if (here->BSIM4v6gNodeMid + && here->BSIM4v6gNodeMid != here->BSIM4v6gNodeExt) + { + CKTdltNNum(ckt, here->BSIM4v6gNodeMid); + here->BSIM4v6gNodeMid = 0; + } + if (here->BSIM4v6qNode) { CKTdltNNum(ckt, here->BSIM4v6qNode); diff --git a/src/spicelib/devices/bsim4v7/b4v7set.c b/src/spicelib/devices/bsim4v7/b4v7set.c index 0921e1955..01382963b 100644 --- a/src/spicelib/devices/bsim4v7/b4v7set.c +++ b/src/spicelib/devices/bsim4v7/b4v7set.c @@ -2653,6 +2653,18 @@ CKTcircuit *ckt) CKTdltNNum(ckt, here->BSIM4v7dbNode); here->BSIM4v7dbNode = 0; } + if (here->BSIM4v7gNodePrime + && here->BSIM4v7gNodePrime != here->BSIM4v7gNodeExt) + { + CKTdltNNum(ckt, here->BSIM4v7gNodePrime); + here->BSIM4v7gNodePrime = 0; + } + if (here->BSIM4v7gNodeMid + && here->BSIM4v7gNodeMid != here->BSIM4v7gNodeExt) + { + CKTdltNNum(ckt, here->BSIM4v7gNodeMid); + here->BSIM4v7gNodeMid = 0; + } if (here->BSIM4v7qNode) { CKTdltNNum(ckt, here->BSIM4v7qNode);