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
This commit is contained in:
rlar
2018-02-17 18:15:39 +01:00
parent 457bb1d8be
commit 2109b04aa9
3 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -12,9 +12,10 @@ vd d 0 dc=1.3
vg g 0 dc=0 vg g 0 dc=0
vs s 0 dc=0 vs s 0 dc=0
vb b 0 dc=0 vb b 0 dc=0
vt t 0 dc=0
* --- Transistor --- * --- 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 --- * --- DC Analysis ---
.control .control
@@ -568,7 +568,7 @@
`define IPIoz(nam,def,uni, des) (*units=uni, type="instance", desc=des*) parameter integer nam=def from( 0:inf); `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__ `ifdef __THERMAL_NODE__
module bsim6(d, g, s, b, t); module bsim6(d, g, s, b, t);
@@ -2382,7 +2382,7 @@ analog begin
AT_i = AT_i * (1.0 + Inv_L * ATL); AT_i = AT_i * (1.0 + Inv_L * ATL);
PTWGT_i = PTWGT_i * (1.0 + Inv_L * PTWGTL); PTWGT_i = PTWGT_i * (1.0 + Inv_L * PTWGTL);
`ifdef __THERMAL_NODE__ `ifdef __THERMAL_NODE__
if ($port_connected(t) == 0) begin if (1 == 0) begin
`ifdef __SHMOD__ `ifdef __SHMOD__
$strobe("5 terminal Module, while 't' node is not connected, SH is activated."); $strobe("5 terminal Module, while 't' node is not connected, SH is activated.");
`else `else
+5
View File
@@ -31,6 +31,11 @@ model_numnodes(int type)
return 6; return 6;
} }
if (type == INPtypelook("BSIM6")) /* bsim6.va with __THERMAL_NODE__ */
{
return 5;
}
return 4; return 4;
} }