diff --git a/examples/ngspice/MESFETs/NE3509.cir b/examples/ngspice/MESFETs/NE3509.cir new file mode 100644 index 000000000..3de05bf80 --- /dev/null +++ b/examples/ngspice/MESFETs/NE3509.cir @@ -0,0 +1,23 @@ +* NE3509 packaged FET model +* Model parameters found on-line are garbage +* Modified to get DC to semi work +* +.SUBCKT NE3509 Drain Gate Source +* +L1 D D1 0.5204e-9 +L2 G G1 0.6696e-9 +L3 Source S 0.2064e-9 +L4 D1 Drain 0.2058e-9 +L5 G1 G2 0.0029e-9 +C1 G1 D1 1.0e-15 +C2 G1 Source 65.4e-15 +C3 D1 Source 19.9e-15 +C4 Gate Source 10.8e-15 +C5 Drain Source 144.9e-15 +R1 G2 Gate 1.321 +* +ZDIE D G S qNE3509M04 +* +.MODEL qNE3509M04 NMF(VTO=-0.9754 LAMBDA=0.03 ALPHA=5 BETA=0.22 RS=0.794 RD=1.455 CGD=102.8e-15 IS=0.8956e-12) +* +.ENDS NE3509 \ No newline at end of file diff --git a/examples/ngspice/MESFETs/NE3509_sub.sch b/examples/ngspice/MESFETs/NE3509_sub.sch new file mode 100644 index 000000000..047ca1436 --- /dev/null +++ b/examples/ngspice/MESFETs/NE3509_sub.sch @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + <.PortSym -30 0 2 0> + <.ID 20 -16 Z> + <.PortSym 0 -30 1 0> + <.PortSym 0 30 3 0> + + + + + + + + + + + + + + + + + + + + + <100 140 120 140 "" 0 0 0 ""> + <100 200 120 200 "" 0 0 0 ""> + <180 140 200 140 "" 0 0 0 ""> + + + + + diff --git a/examples/ngspice/MESFETs/NE3509_sub_Id_Vg.sch b/examples/ngspice/MESFETs/NE3509_sub_Id_Vg.sch new file mode 100644 index 000000000..6747a1f6a --- /dev/null +++ b/examples/ngspice/MESFETs/NE3509_sub_Id_Vg.sch @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + <.ID -20 -16 SUB> + + + + + + + + + + + + + <.DC DC1 1 20 260 0 46 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0> + <.SW SW1 1 180 260 0 77 0 0 "DC1" 1 "lin" 1 "Vds" 1 "0" 1 "10" 1 "41" 1 "false" 0> + <.SW SW2 1 320 270 0 77 0 0 "SW1" 1 "lin" 1 "Vgs" 1 "-2" 1 "0" 1 "6" 1 "false" 0> + + + + <270 40 330 40 "" 0 0 0 ""> + <330 120 330 140 "" 0 0 0 ""> + <330 40 330 60 "" 0 0 0 ""> + <150 40 210 40 "" 0 0 0 ""> + <150 40 150 70 "" 0 0 0 ""> + <150 130 150 150 "" 0 0 0 ""> + <60 180 60 200 "" 0 0 0 ""> + <60 100 120 100 "" 0 0 0 ""> + <60 100 60 120 "" 0 0 0 ""> + <330 40 330 40 "Vds" 350 10 0 ""> + <60 100 60 100 "Vgs" 20 70 0 ""> + + + + <"ngspice/i(vids)" #0000ff 0 3 0 0 0> + + + + diff --git a/examples/ngspice/MESFETs/Statz_dc_mod.cir b/examples/ngspice/MESFETs/Statz_dc_mod.cir new file mode 100644 index 000000000..a6e75a6bf --- /dev/null +++ b/examples/ngspice/MESFETs/Statz_dc_mod.cir @@ -0,0 +1,14 @@ +* Statz MESFET DC model example ngspice manual +* +.SUBCKT STATZ d g s +* +z1 d g s mesfetmod area=1.4 +* +.MODEL mesfetmod NMF level=1 vt0=-1.3 lambda=0.03 alpha=3 beta=1.4e-3 rd=1.5 rs=1 +* +.ENDS STATZ +* +*MESFET model level 1 is derived from the GaAs FET model of Statz et al. +*DC characteristics defined by VTO, B and BETA which determine the variation of drain current with gate voltage +*ALPHA, which determines saturation voltage +*LAMBDA, which determines the output conductance \ No newline at end of file diff --git a/examples/ngspice/MESFETs/Statz_sub.sch b/examples/ngspice/MESFETs/Statz_sub.sch new file mode 100644 index 000000000..abb47d683 --- /dev/null +++ b/examples/ngspice/MESFETs/Statz_sub.sch @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + <.PortSym -30 0 2 0> + <.ID 20 -16 Z> + <.PortSym 0 -30 1 0> + <.PortSym 0 30 3 0> + + + + + + + + + + + + + + + + + + + + + <100 140 120 140 "" 0 0 0 ""> + <100 200 120 200 "" 0 0 0 ""> + <180 140 200 140 "" 0 0 0 ""> + + + + + + diff --git a/examples/ngspice/MESFETs/Statz_sub_Id_Vg.sch b/examples/ngspice/MESFETs/Statz_sub_Id_Vg.sch new file mode 100644 index 000000000..758064b0a --- /dev/null +++ b/examples/ngspice/MESFETs/Statz_sub_Id_Vg.sch @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + <.ID -20 -16 SUB> + + + + + + + + + + + + + <.DC DC1 1 60 290 0 46 0 0 "26.85" 0 "0.001" 0 "1 pA" 0 "1 uV" 0 "no" 0 "150" 0 "no" 0 "none" 0 "CroutLU" 0> + <.SW SW1 1 230 290 0 77 0 0 "DC1" 1 "lin" 1 "Vds" 1 "0" 1 "10" 1 "41" 1 "false" 0> + <.SW SW2 1 370 290 0 77 0 0 "SW1" 1 "lin" 1 "Vgs" 1 "-2" 1 "0" 1 "6" 1 "false" 0> + + + + <400 120 400 140 "" 0 0 0 ""> + <140 180 140 200 "" 0 0 0 ""> + <140 100 140 120 "" 0 0 0 ""> + <140 100 190 100 "" 0 0 0 ""> + <220 130 220 150 "" 0 0 0 ""> + <220 40 220 70 "" 0 0 0 ""> + <220 40 280 40 "" 0 0 0 ""> + <400 40 400 60 "" 0 0 0 ""> + <340 40 400 40 "" 0 0 0 ""> + <140 100 140 100 "Vgs" 100 70 0 ""> + <400 40 400 40 "Vds" 420 10 0 ""> + + + + <"ngspice/i(vids)" #0000ff 0 3 0 0 0> + + + + diff --git a/qucs/extsimkernels/qucs2spice.cpp b/qucs/extsimkernels/qucs2spice.cpp index a24b51db6..7b9e66097 100644 --- a/qucs/extsimkernels/qucs2spice.cpp +++ b/qucs/extsimkernels/qucs2spice.cpp @@ -132,7 +132,7 @@ QString qucs2spice::convert_rcl(const QString& line) s += " " + lst.takeFirst() + " "; s1 = lst.takeFirst().remove("\""); auto idx = s1.indexOf('='); - s += s1.right(s1.size()-idx-1); + s += spicecompat::normalize_value(s1.right(s1.size()-idx-1)); s += "\n"; return s; }