From 7534ac394c38e08ced84e7d6a42a9f010f9bbb17 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 14 May 2017 11:50:30 +0200 Subject: [PATCH] work around, 'define __TERMAL_NODE__ in bsim6.va, first successfull plot to work around dangling "temper" node in bsim6 fixme, adms populates the termal node slot in the matrix even though __TERMAL_NODE__ was not defined, leading to a singular matrix. fixme, adms $port_connected is not supported, thus just claim it to be connected. inp2m.c, upgrade to allow bsim6 with 5 nodes --- bsim6-2.cir | 3 ++- src/spicelib/devices/adms/bsim6/admsva/bsim6.va | 4 ++-- src/spicelib/parser/inp2m.c | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bsim6-2.cir b/bsim6-2.cir index 0c016a3ac..2be8ae109 100644 --- a/bsim6-2.cir +++ b/bsim6-2.cir @@ -12,9 +12,10 @@ vd d 0 dc=1.3 vg g 0 dc=0 vs s 0 dc=0 vb b 0 dc=0 +vt t 0 dc=0 * --- Transistor --- -m1 d g s b n1 W=10e-6 L=10e-6 +m1 d g s b t n1 W=10e-6 L=10e-6 * --- DC Analysis --- .control diff --git a/src/spicelib/devices/adms/bsim6/admsva/bsim6.va b/src/spicelib/devices/adms/bsim6/admsva/bsim6.va index 5e17ac52e..4f57b3dc3 100755 --- a/src/spicelib/devices/adms/bsim6/admsva/bsim6.va +++ b/src/spicelib/devices/adms/bsim6/admsva/bsim6.va @@ -568,7 +568,7 @@ `define IPIoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from( 0:inf); -//`define __THERMAL_NODE__ +`define __THERMAL_NODE__ `ifdef __THERMAL_NODE__ module bsim6(d, g, s, b, t); @@ -2382,7 +2382,7 @@ analog begin AT_i = AT_i * (1.0 + Inv_L * ATL); PTWGT_i = PTWGT_i * (1.0 + Inv_L * PTWGTL); `ifdef __THERMAL_NODE__ - if ($port_connected(t) == 0) begin + if (1 == 0) begin `ifdef __SHMOD__ $strobe("5 terminal Module, while 't' node is not connected, SH is activated."); `else diff --git a/src/spicelib/parser/inp2m.c b/src/spicelib/parser/inp2m.c index d8bf75c06..6ee0f6b4a 100644 --- a/src/spicelib/parser/inp2m.c +++ b/src/spicelib/parser/inp2m.c @@ -31,6 +31,11 @@ model_numnodes(int type) return 6; } + if (type == INPtypelook("BSIM6")) /* bsim6.va with __THERMAL_NODE__ */ + { + return 5; + } + if (type == INPtypelook("VDMOS")) /* 3 ; VDMOSnames */ { return 3;