Sim Model Editor: Make the VBIC model the first BJT model to select

This commit is contained in:
Mikolaj Wielgus 2022-11-29 10:10:33 +01:00
parent 484620eeb5
commit b025b103de
5 changed files with 189 additions and 188 deletions

View File

@ -116,10 +116,10 @@ SIM_MODEL::INFO SIM_MODEL::TypeInfo( TYPE aType )
case TYPE::D: return { DEVICE_TYPE_::D, "", "" };
case TYPE::NPN_GUMMELPOON: return { DEVICE_TYPE_::NPN, "GUMMELPOON", "Gummel-Poon" };
case TYPE::PNP_GUMMELPOON: return { DEVICE_TYPE_::PNP, "GUMMELPOON", "Gummel-Poon" };
case TYPE::NPN_VBIC: return { DEVICE_TYPE_::NPN, "VBIC", "VBIC" };
case TYPE::PNP_VBIC: return { DEVICE_TYPE_::PNP, "VBIC", "VBIC" };
case TYPE::NPN_GUMMELPOON: return { DEVICE_TYPE_::NPN, "GUMMELPOON", "Gummel-Poon" };
case TYPE::PNP_GUMMELPOON: return { DEVICE_TYPE_::PNP, "GUMMELPOON", "Gummel-Poon" };
//case TYPE::BJT_MEXTRAM: return {};
case TYPE::NPN_HICUM2: return { DEVICE_TYPE_::NPN, "HICUML2", "HICUM level 2" };
case TYPE::PNP_HICUM2: return { DEVICE_TYPE_::PNP, "HICUML2", "HICUM level 2" };
@ -254,12 +254,10 @@ SIM_MODEL::SPICE_INFO SIM_MODEL::SpiceInfo( TYPE aType )
case TYPE::D: return { "D", "D" };
case TYPE::NPN_GUMMELPOON: return { "Q", "NPN", "", "1", true };
case TYPE::PNP_GUMMELPOON: return { "Q", "PNP", "", "1", true };
case TYPE::NPN_VBIC: return { "Q", "NPN", "", "4" };
case TYPE::PNP_VBIC: return { "Q", "PNP", "", "4" };
case TYPE::NPN_GUMMELPOON: return { "Q", "NPN", "", "1", true };
case TYPE::PNP_GUMMELPOON: return { "Q", "PNP", "", "1", true };
case TYPE::NPN_HICUM2: return { "Q", "NPN", "", "8" };
case TYPE::PNP_HICUM2: return { "Q", "PNP", "", "8" };

View File

@ -125,10 +125,10 @@ public:
D,
NPN_GUMMELPOON,
PNP_GUMMELPOON,
NPN_VBIC,
PNP_VBIC,
NPN_GUMMELPOON,
PNP_GUMMELPOON,
//NPN_MEXTRAM,
//PNP_MEXTRAM,
NPN_HICUM2,

View File

@ -221,10 +221,10 @@ SIM_MODEL_NGSPICE::MODEL_TYPE SIM_MODEL_NGSPICE::getModelType() const
case TYPE::NONE: return MODEL_TYPE::NONE;
case TYPE::D: return MODEL_TYPE::DIODE;
case TYPE::NPN_GUMMELPOON:
case TYPE::PNP_GUMMELPOON: return MODEL_TYPE::BJT;
case TYPE::NPN_VBIC:
case TYPE::PNP_VBIC: return MODEL_TYPE::VBIC;
case TYPE::NPN_GUMMELPOON:
case TYPE::PNP_GUMMELPOON: return MODEL_TYPE::BJT;
case TYPE::NPN_HICUM2:
case TYPE::PNP_HICUM2: return MODEL_TYPE::HICUM2;

View File

@ -5,96 +5,10 @@
* All parameter values are made up and physically nonsensical.
* Commented out some parameters to avoid making test code overly long.
* First, Gummel-Poon.
*
.MODEL _0_NPN_GUMMELPOON NPN(
+ IS = 000.000E+07
+ NF = 100.001E+07
+ ISE = 200.002E+07
+ NE = 300.003E+07
+ BF = 400.004E+07
+ IKF = 500.005E+07
+ VAF = 600.006E+07
+ NR = 700.007E+07
+ ISC = 800.008E+07
+ NC = 900.009E+07
+ BR = 000.000E+07
+ IKR = 100.001E+07
+ VAR = 200.002E+07
+ RB = 300.003E+07
+ IRB = 400.004E+07
+ RBM = 500.005E+07
+ RE = 600.006E+07
+ RC = 700.007E+07
+ XTB = 800.008E+07
+ EG = 900.009E+07
+ XTI = 000.000E+07
+ CJE = 100.001E+07
+ VJE = 200.002E+07
+ MJE = 300.003E+07
+ TF = 400.004E+07
+ XTF = 500.005E+07
+ VTF = 600.006E+07
+ ITF = 700.007E+07
+ PTF = 800.008E+07
+ CJC = 900.009E+07
+ VJC = 000.000E+07
+ MJC = 100.001E+07
+ XCJC = 200.002E+07
+ TR = 300.003E+07
+ CJS = 400.004E+07
+ VJS = 500.005E+07
+ MJS = 600.006E+07
+ FC = 700.007E+07
+)
*
.MODEL _1_PNP_GUMMELPOON PNP( level = 1. ; Decimal separator must be accepted too.
+ IS = 000.000E+07
+ NF = 100.001E+07
+ ISE = 200.002E+07
+ NE = 300.003E+07
+ BF = 400.004E+07
+ IKF = 500.005E+07
+ VAF = 600.006E+07
+ NR = 700.007E+07
+ ISC = 800.008E+07
+ NC = 900.009E+07
+ BR = 000.000E+07
+ IKR = 100.001E+07
+ VAR = 200.002E+07
+ RB = 300.003E+07
+ IRB = 400.004E+07
+ RBM = 500.005E+07
+ RE = 600.006E+07
+ RC = 700.007E+07
+ XTB = 800.008E+07
+ EG = 900.009E+07
+ XTI = 000.000E+07
+ CJE = 100.001E+07
+ VJE = 200.002E+07
+ MJE = 300.003E+07
+ TF = 400.004E+07
+ XTF = 500.005E+07
+ VTF = 600.006E+07
+ ITF = 700.007E+07
+ PTF = 800.008E+07
+ CJC = 900.009E+07
+ VJC = 000.000E+07
+ MJC = 100.001E+07
+ XCJC = 200.002E+07
+ TR = 300.003E+07
+ CJS = 400.004E+07
+ VJS = 500.005E+07
+ MJS = 600.006E+07
+ FC = 700.007E+07
+)
* VBIC.
.model _2_NPN_VBIC NPN( level=4
.model _0_NPN_VBIC NPN( level=4
+ rcx = 000.000E+07
+ rci = 100.001E+07
+ vo = 200.002E+07
@ -209,7 +123,7 @@
+ vce_max = 100.001E+07
+)
.model _3_PNP_VBIC PNP( level=4.0
.model _1_PNP_VBIC PNP( level=4.0
+ rcx = 000.000E+07
+ rci = 100.001E+07
+ vo = 200.002E+07
@ -325,7 +239,95 @@
+)
* HICUM/L2
* SPICE Gummel-Poon.
*
.MODEL _2_NPN_GUMMELPOON NPN(
+ IS = 000.000E+07
+ NF = 100.001E+07
+ ISE = 200.002E+07
+ NE = 300.003E+07
+ BF = 400.004E+07
+ IKF = 500.005E+07
+ VAF = 600.006E+07
+ NR = 700.007E+07
+ ISC = 800.008E+07
+ NC = 900.009E+07
+ BR = 000.000E+07
+ IKR = 100.001E+07
+ VAR = 200.002E+07
+ RB = 300.003E+07
+ IRB = 400.004E+07
+ RBM = 500.005E+07
+ RE = 600.006E+07
+ RC = 700.007E+07
+ XTB = 800.008E+07
+ EG = 900.009E+07
+ XTI = 000.000E+07
+ CJE = 100.001E+07
+ VJE = 200.002E+07
+ MJE = 300.003E+07
+ TF = 400.004E+07
+ XTF = 500.005E+07
+ VTF = 600.006E+07
+ ITF = 700.007E+07
+ PTF = 800.008E+07
+ CJC = 900.009E+07
+ VJC = 000.000E+07
+ MJC = 100.001E+07
+ XCJC = 200.002E+07
+ TR = 300.003E+07
+ CJS = 400.004E+07
+ VJS = 500.005E+07
+ MJS = 600.006E+07
+ FC = 700.007E+07
+)
*
.MODEL _3_PNP_GUMMELPOON PNP( level = 1. ; Decimal separator must be accepted too.
+ IS = 000.000E+07
+ NF = 100.001E+07
+ ISE = 200.002E+07
+ NE = 300.003E+07
+ BF = 400.004E+07
+ IKF = 500.005E+07
+ VAF = 600.006E+07
+ NR = 700.007E+07
+ ISC = 800.008E+07
+ NC = 900.009E+07
+ BR = 000.000E+07
+ IKR = 100.001E+07
+ VAR = 200.002E+07
+ RB = 300.003E+07
+ IRB = 400.004E+07
+ RBM = 500.005E+07
+ RE = 600.006E+07
+ RC = 700.007E+07
+ XTB = 800.008E+07
+ EG = 900.009E+07
+ XTI = 000.000E+07
+ CJE = 100.001E+07
+ VJE = 200.002E+07
+ MJE = 300.003E+07
+ TF = 400.004E+07
+ XTF = 500.005E+07
+ VTF = 600.006E+07
+ ITF = 700.007E+07
+ PTF = 800.008E+07
+ CJC = 900.009E+07
+ VJC = 000.000E+07
+ MJC = 100.001E+07
+ XCJC = 200.002E+07
+ TR = 300.003E+07
+ CJS = 400.004E+07
+ VJS = 500.005E+07
+ MJS = 600.006E+07
+ FC = 700.007E+07
+)
* HICUM/L2.
.model _4_NPN_HICUML2 NPN( level=8.00
+ c10 = 000.000E+07

View File

@ -475,95 +475,8 @@ BOOST_AUTO_TEST_CASE( Bjts )
switch( i )
{
case 0:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON,
{
"is",
"nf",
"ise",
"ne",
"bf",
"ikf",
"vaf",
"nr",
"isc",
"nc",
"br",
"ikr",
"var",
"rb",
"irb",
"rbm",
"re",
"rc",
"xtb",
"eg",
"xti",
"cje",
"vje",
"mje",
"tf",
"xtf",
"vtf",
"itf",
"ptf",
"cjc",
"vjc",
"mjc",
"xcjc",
"tr",
"cjs",
"vjs",
"mjs",
"fc"
} );
break;
case 1:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_GUMMELPOON,
{
"is",
"nf",
"ise",
"ne",
"bf",
"ikf",
"vaf",
"nr",
"isc",
"nc",
"br",
"ikr",
"var",
"rb",
"irb",
"rbm",
"re",
"rc",
"xtb",
"eg",
"xti",
"cje",
"vje",
"mje",
"tf",
"xtf",
"vtf",
"itf",
"ptf",
"cjc",
"vjc",
"mjc",
"xcjc",
"tr",
"cjs",
"vjs",
"mjs",
"fc"
} );
break;
case 2:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_VBIC,
{
"rcx",
@ -681,7 +594,7 @@ BOOST_AUTO_TEST_CASE( Bjts )
} );
break;
case 3:
case 1:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_VBIC,
{
"rcx",
@ -799,6 +712,94 @@ BOOST_AUTO_TEST_CASE( Bjts )
} );
break;
case 2:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON,
{
"is",
"nf",
"ise",
"ne",
"bf",
"ikf",
"vaf",
"nr",
"isc",
"nc",
"br",
"ikr",
"var",
"rb",
"irb",
"rbm",
"re",
"rc",
"xtb",
"eg",
"xti",
"cje",
"vje",
"mje",
"tf",
"xtf",
"vtf",
"itf",
"ptf",
"cjc",
"vjc",
"mjc",
"xcjc",
"tr",
"cjs",
"vjs",
"mjs",
"fc"
} );
break;
case 3:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_GUMMELPOON,
{
"is",
"nf",
"ise",
"ne",
"bf",
"ikf",
"vaf",
"nr",
"isc",
"nc",
"br",
"ikr",
"var",
"rb",
"irb",
"rbm",
"re",
"rc",
"xtb",
"eg",
"xti",
"cje",
"vje",
"mje",
"tf",
"xtf",
"vtf",
"itf",
"ptf",
"cjc",
"vjc",
"mjc",
"xcjc",
"tr",
"cjs",
"vjs",
"mjs",
"fc"
} );
break;
case 4:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_HICUM2,
{