Sim: Add VBIC model support

Update generate_sim_model_ngspice_data.bash a little, but it's still
outdated.
This commit is contained in:
Mikolaj Wielgus 2022-11-28 04:45:00 +01:00
parent b2b3f5752f
commit d836fbaaaa
6 changed files with 226 additions and 172 deletions

View File

@ -139,6 +139,8 @@ SIM_MODEL::INFO SIM_MODEL::TypeInfo( TYPE aType )
case TYPE::NMES_HFET2: return { DEVICE_TYPE_::NMES, "HFET2", "HFET2" };
case TYPE::PMES_HFET2: return { DEVICE_TYPE_::PMES, "HFET2", "HFET2" };
case TYPE::NMOS_VDMOS: return { DEVICE_TYPE_::NMOS, "VDMOS", "VDMOS" };
case TYPE::PMOS_VDMOS: return { DEVICE_TYPE_::PMOS, "VDMOS", "VDMOS" };
case TYPE::NMOS_MOS1: return { DEVICE_TYPE_::NMOS, "MOS1", "Classical quadratic (MOS1)" };
case TYPE::PMOS_MOS1: return { DEVICE_TYPE_::PMOS, "MOS1", "Classical quadratic (MOS1)" };
case TYPE::NMOS_MOS2: return { DEVICE_TYPE_::NMOS, "MOS2", "Grove-Frohman (MOS2)" };
@ -275,6 +277,8 @@ SIM_MODEL::SPICE_INFO SIM_MODEL::SpiceInfo( TYPE aType )
case TYPE::NMES_HFET2: return { "Z", "NMF", "", "6" };
case TYPE::PMES_HFET2: return { "Z", "PMF", "", "6" };
case TYPE::NMOS_VDMOS: return { "M", "VDMOS NCHAN", };
case TYPE::PMOS_VDMOS: return { "M", "VDMOS PCHAN", };
case TYPE::NMOS_MOS1: return { "M", "NMOS", "", "1" };
case TYPE::PMOS_MOS1: return { "M", "PMOS", "", "1" };
case TYPE::NMOS_MOS2: return { "M", "NMOS", "", "2" };

View File

@ -156,6 +156,9 @@ public:
PMES_HFET2,
NMOS_VDMOS,
PMOS_VDMOS,
NMOS_MOS1,
PMOS_MOS1,

View File

@ -72,6 +72,7 @@ protected:
MESA,
HFET1,
HFET2,
VDMOS,
MOS1,
MOS2,
MOS3,

View File

@ -26,8 +26,8 @@
// This script was originally autogenerated using the a bash script called
// generate_ngspice_models.bash, later heavily modified manually. The script can be found in the
// Git history if needed for reference purposes.
// generate_sim_Model_ngspice_data.bash, later heavily modified manually. The script can be found
// in the Git history if needed for reference purposes.
// We don't use the param flags anymore, so replace them with dummies to save compilation time.
#define U() SIM_MODEL::PARAM::FLAGS()
@ -1283,6 +1283,116 @@ struct MODEL_INFO_MAP
modelInfos[MODEL_TYPE::HFET2].instanceParams.emplace_back( "p", 8, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Power dissipated by the mesfet", true );
modelInfos[MODEL_TYPE::VDMOS] = { "VDMOS", "NCHAN", "PCHAN", { "D", "G", "S" }, "DMOS model based on Level 1 MOSFET model", {}, {} };
// Model parameters
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "type", 116, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_STRING, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::DC, "vdmosn", "vdmosp", "N-channel or P-channel MOS" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vto", 101, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Threshold voltage" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vth0", 101, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, R(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "0", "0", "n.a." );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "kp", 102, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A/V^2", SIM_MODEL::PARAM::CATEGORY::DC, "1", "1", "Transconductance parameter" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "phi", 103, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::DC, "0.6", "0.6", "Surface potential" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "lambda", 104, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "1/V", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Channel length modulation" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "theta", 105, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "1/V", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Vgs dependence on mobility" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rd", 106, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Drain ohmic resistance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rs", 107, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Source ohmic resistance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rg", 108, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Gate ohmic resistance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "tnom", 113, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "deg C", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "27", "27", "Parameter measurement temperature" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "kf", 114, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::NOISE, "1", "1", "Flicker noise coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "af", 115, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::NOISE, "0", "0", "Flicker noise exponent" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vdmosn", 111, SIM_MODEL::PARAM::DIR_IN, SIM_VALUE::TYPE_BOOL, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::FLAGS, "", "", "N type DMOSfet model" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vdmosp", 112, SIM_MODEL::PARAM::DIR_IN, SIM_VALUE::TYPE_BOOL, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::FLAGS, "", "", "P type DMOSfet model" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vdmos", 117, SIM_MODEL::PARAM::DIR_IN, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::DC, "", "", "DMOS transistor" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rq", 109, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Quasi saturation resistance fitting parameter" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vq", 110, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Quasi saturation voltage fitting parameter" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "mtriode", 122, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::DC, "1", "1", "Conductance multiplier in triode region" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "tcvth", 141, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "deg C", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Linear Vth0 temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vtotc", 141, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, R(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "0", "0", "n.a." );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "mu", 145, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "-1.5", "-1.5", "Exponent of gain temperature dependency" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "bex", 145, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, R(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "-1.5", "-1.5", "n.a." );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "texp0", 146, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "1.5", "1.5", "Drain resistance rd0 temperature exponent" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "texp1", 147, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0.3", "0.3", "Drain resistance rd1 temperature exponent" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "trd1", 148, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Drain resistance linear temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "trd2", 149, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Drain resistance quadratic temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "trg1", 150, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Gate resistance linear temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "trg2", 151, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Gate resistance quadratic temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "trs1", 152, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Source resistance linear temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "trs2", 153, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Source resistance quadratic temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "trb1", 139, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Body resistance linear temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "trb2", 140, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Body resistance quadratic temperature coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "subshift", 123, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Shift of weak inversion plot on the vgs axis" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "ksubthres", 124, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::DC, "0.1", "0.1", "Slope of weak inversion log current versus vgs" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "tksubthres1", 154, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "deg C", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Linear temperature coefficient of ksubthres" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "tksubthres2", 155, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "deg C", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "0", "0", "Quadratic temperature coefficient of ksubthres" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "bv", 132, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::DC, "1e+99", "1e+99", "Vds breakdown voltage" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "ibv", 133, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::DC, "1e-10", "1e-10", "Current at Vds=bv" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "nbv", 134, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::DC, "1", "1", "Vds breakdown emission coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rds", 125, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::DC, "1e+15", "1e+15", "Drain-source shunt resistance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rb", 131, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Body diode ohmic resistance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "n", 135, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::DC, "1", "1", "Body diode emission coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "tt", 136, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "s", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Body diode transit time" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "eg", 137, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "deg C", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "1.11", "1.11", "Body diode activation energy for temperature effect on Is" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "xti", 138, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "3", "3", "Body diode saturation current temperature exponent" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "is", 126, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::DC, "1e-14", "1e-14", "Body diode saturation current" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vj", 127, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::DC, "0.8", "0.8", "Body diode junction potential" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "cjo", 128, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, A(), "F", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Zero-bias body diode junction capacitance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "m", 129, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::DC, "0.5", "0.5", "Body diode grading coefficient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "fc", 130, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "F", SIM_MODEL::PARAM::CATEGORY::DC, "0.5", "0.5", "Body diode coefficient for forward-bias depletion capacitance formula" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "cgdmin", 118, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, A(), "F", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Minimum non-linear G-D capacitance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "cgdmax", 119, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, A(), "F", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Maximum non-linear G-D capacitance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "a", 120, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, A(), "F", SIM_MODEL::PARAM::CATEGORY::DC, "1", "1", "Non-linear Cgd capacitance parameter" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "cgs", 121, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, A(), "F", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "Gate-source capacitance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rthjc", 142, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "1", "1", "Self-heating thermal resistance, junction-to-case" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rthca", 143, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "1000", "1000", "Self-heating thermal resistance, case-to-ambient" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "cthj", 144, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "F", SIM_MODEL::PARAM::CATEGORY::DC, "1e-05", "1e-05", "Self-heating thermal capacitance" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vgs_max", 156, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "1e+99", "1e+99", "maximum voltage G-S branch" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vgd_max", 157, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "1e+99", "1e+99", "maximum voltage G-D branch" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vds_max", 158, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "1e+99", "1e+99", "maximum voltage D-S branch" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vgsr_max", 159, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "1e+99", "1e+99", "maximum voltage G-S branch" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "vgdr_max", 160, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "1e+99", "1e+99", "maximum voltage G-D branch" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "pd_max", 161, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "1e+99", "1e+99", "maximum device power dissipation" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "id_max", 162, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "0", "0", "maximum drain/source current" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "idr_max", 163, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "1e+99", "1e+99", "maximum drain/source reverse current" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "te_max", 164, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "deg C", SIM_MODEL::PARAM::CATEGORY::LIMITING_VALUES, "1e+99", "1e+99", "maximum temperature" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "rth_ext", 165, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::TEMPERATURE, "1000", "1000", "thermal resistance case to ambient, incl. heat sink" );
modelInfos[MODEL_TYPE::VDMOS].modelParams.emplace_back( "derating", 166, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::DC, "0", "0", "thermal derating for power" );
// Instance parameters
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "m", 9, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, U(), "", SIM_MODEL::PARAM::CATEGORY::GEOMETRY, "0.5", "0.5", "Multiplier" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "off", 1, SIM_MODEL::PARAM::DIR_IN, SIM_VALUE::TYPE_BOOL, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::FLAGS, "", "", "Device initially off" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "icvds", 3, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, U(), "V", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Initial D-S voltage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "icvgs", 4, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, U(), "V", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Initial G-S voltage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "temp", 8, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, U(), "deg C", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Instance temperature" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "dtemp", 10, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_FLOAT, U(), "deg C", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Instance temperature difference" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "ic", 2, SIM_MODEL::PARAM::DIR_IN, SIM_VALUE::TYPE_FLOAT_VECTOR, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Vector of D-S, G-S voltages" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "thermal", 11, SIM_MODEL::PARAM::DIR_INOUT, SIM_VALUE::TYPE_BOOL, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::FLAGS, "", "", "Thermal model switch on/off" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "id", 214, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Drain current" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "is", 6, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "1e-14", "1e-14", "Source current" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "ig", 5, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Gate current" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "vgs", 217, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Gate-Source voltage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "vds", 218, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Drain-Source voltage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "cgs", 201, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "F", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "0", "0", "Gate-Source capacitance" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "cgd", 202, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "F", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Gate-Drain capacitance" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "cds", 203, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "F", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Drain-Source capacitance" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "idio", 223, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "A", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Body diode current" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "dnode", 204, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_INT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Number of the drain node" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "gnode", 205, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_INT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Number of the gate node" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "snode", 206, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_INT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Number of the source node" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "tempnode", 207, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_INT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Number of temperature node" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "tcasenode", 208, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_INT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Number of 2nd temperature node" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "dnodeprime", 209, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_INT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Number of int. drain node" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "snodeprime", 210, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_INT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Number of int. source node" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "von", 213, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "V", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Device on state voltage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "rs", 224, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "ohm", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "0", "0", "Source resistance" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "sourceconductance", 211, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Conductance of source" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "rd", 225, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "0", "0", "Drain conductance" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "drainconductance", 212, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Conductance of drain" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "gm", 215, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Transconductance" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "gds", 216, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Drain-Source conductance" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "cqgs", 220, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, U(), "F", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Capacitance due to gate-source charge storage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "cqgd", 222, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, U(), "F", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Capacitance due to gate-drain charge storage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "qgs", 219, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Gate-Source charge storage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "qgd", 221, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Gate-Drain charge storage" );
modelInfos[MODEL_TYPE::VDMOS].instanceParams.emplace_back( "p", 7, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_FLOAT, U(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "", "", "Instantaneous power" );
modelInfos[MODEL_TYPE::MOS1] = { "Mos1", "NMOS", "PMOS", { "D", "G", "S", "B" }, "Level 1 MOSfet model with Meyer capacitance model", {}, {} };
// Model parameters
modelInfos[MODEL_TYPE::MOS1].modelParams.emplace_back( "type", 133, SIM_MODEL::PARAM::DIR_OUT, SIM_VALUE::TYPE_STRING, SIM_MODEL::PARAM::FLAGS(), "", SIM_MODEL::PARAM::CATEGORY::SUPERFLUOUS, "nmos", "pmos", "N-channel or P-channel MOS" );

View File

@ -145,6 +145,11 @@ BOOST_AUTO_TEST_CASE( Models )
BOOST_CHECK_EQUAL( instanceParamCount, 28 );
break;
case MODEL_TYPE::VDMOS:
BOOST_CHECK_EQUAL( modelParamCount, 69 );
BOOST_CHECK_EQUAL( instanceParamCount, 36 );
break;
case MODEL_TYPE::MOS1:
BOOST_CHECK_EQUAL( modelParamCount, 35 );
BOOST_CHECK_EQUAL( instanceParamCount, 76 );

View File

@ -17,7 +17,7 @@
#)
MODELS=$(cat << END
Write your model here.
vdmos NCHAN PCHAN M 3 0 0
END
)
@ -280,71 +280,7 @@ END
}
echo_head()
{
echo "// Generated by the $(basename $0) script."
echo ""
echo "#include <sim/ngspice.h>"
echo ""
}
{
echo_head
echo "enum class NGSPICE::MODEL_TYPE"
echo "{"
echo " NONE,"
echo "$MODELS" | while read -r model_name model_primitive model_level model_version; do
if [ -n "$model_name" ]; then
echo " ${model_name^^},"
fi
done
echo "};"
} > $(dirname "$0")/ngspice_models.h
{
echo_head
echo "// We cannot use designated initializers until we upgrade to C++20 (we're C++17 now),"
echo "// so we do this instead."
echo "static auto U() { NGSPICE::PARAM_FLAGS p; p.uninteresting=true; return p; }"
echo "static auto UR() { NGSPICE::PARAM_FLAGS p; p.uninteresting=true; p.redundant=true; return p; }"
echo "static auto P() { NGSPICE::PARAM_FLAGS p; p.principal=true; return p; }"
echo "static auto PR() { NGSPICE::PARAM_FLAGS p; p.principal=true; p.redundant=true; return p; }"
echo "static auto A() { NGSPICE::PARAM_FLAGS p; p.ac=true; return p; }"
echo "static auto AR() { NGSPICE::PARAM_FLAGS p; p.ac=true; p.redundant=true; return p; }"
echo "static auto AU() { NGSPICE::PARAM_FLAGS p; p.ac=true; p.uninteresting=true; return p; }"
echo "static auto AP() { NGSPICE::PARAM_FLAGS p; p.ac=true; p.principal=true; return p; }"
echo "static auto APR() { NGSPICE::PARAM_FLAGS p; p.ac=true; p.principal=true; p.redundant=true; return p; }"
echo "static auto AA() { NGSPICE::PARAM_FLAGS p; p.acOnly=true; return p; }"
echo "static auto AAU() { NGSPICE::PARAM_FLAGS p; p.acOnly=true; p.uninteresting=true; return p; }"
echo "static auto PAA() { NGSPICE::PARAM_FLAGS p; p.acOnly=true; p.principal=true; return p; }"
echo "static auto N() { NGSPICE::PARAM_FLAGS p; p.noise=true; return p; }"
echo "static auto R() { NGSPICE::PARAM_FLAGS p; p.redundant=true; return p; }"
echo "static auto X() { NGSPICE::PARAM_FLAGS p; p.nonsense=true; return p; }"
echo "static auto XR() { NGSPICE::PARAM_FLAGS p; p.nonsense=true; p.redundant=true; return p; }"
echo "static auto XU() { NGSPICE::PARAM_FLAGS p; p.nonsense=true; p.uninteresting=true; return p; }"
echo "static auto Q() { NGSPICE::PARAM_FLAGS p; p.setQuery=true; return p; }"
echo "static auto QR() { NGSPICE::PARAM_FLAGS p; p.setQuery=true; p.redundant=true; return p; }"
echo "static auto QU() { NGSPICE::PARAM_FLAGS p; p.setQuery=true; p.uninteresting=true; return p; }"
echo "static auto Z() { NGSPICE::PARAM_FLAGS p; p.chkQuery=true; return p; }"
echo "static auto ZR() { NGSPICE::PARAM_FLAGS p; p.chkQuery=true; p.redundant=true; return p; }"
echo "static auto ZU() { NGSPICE::PARAM_FLAGS p; p.chkQuery=true; p.uninteresting=true; return p; }"
echo "static auto QO() { NGSPICE::PARAM_FLAGS p; p.orQuery=true; return p; }"
echo "static auto QOR() { NGSPICE::PARAM_FLAGS p; p.orQuery=true; p.redundant=true; return p; }"
echo ""
echo "NGSPICE::MODEL_INFO NGSPICE::GetModelInfo( NGSPICE::MODEL_TYPE aType )"
echo "{"
echo " switch( aType )"
echo " {"
echo " case NGSPICE::MODEL_TYPE::NONE:"
echo " return {};"
echo "$MODELS" | while read -r model_name \
model_type1 \
model_type2 \
@ -360,8 +296,8 @@ echo_head()
description
do
if [ "$sep" = "-" ]; then
echo -n " case NGSPICE::MODEL_TYPE::${model_name^^}:"
echo -n " return { \"$name\","
echo -n "modelInfos[MODEL_TYPE::${model_name^^}] = "
echo -n "{ \"$name\","
for model_type in "$model_type1" "$model_type2"; do
if [ "$model_type" != "-" ]; then
@ -371,10 +307,12 @@ echo_head()
fi
done
echo " \"$description\","
echo -n " \"$description\","
fi
done
echo " {}, {} };"
is_instance_param=0
# Print model parameter ID, name, direction, type, unit, and description.
@ -388,17 +326,20 @@ echo_head()
#&& [ -n "$param_description" ]
if [ "$param_id" = "Model" ] && [ "$param_name" = "Parameters" ]; then
echo "// Model parameters"
echo " {"
elif [ "$param_id" = "Instance" ] && [ "$param_name" = "Parameters" ]; then
echo " },"
echo "// Instance parameters"
echo " {"
is_instance_param=1
elif [ "$param_id" -eq "$param_id" ] 2>/dev/null \
&& [ -n "$param_name" ] \
&& [ -n "$param_dir" ]
then
echo -n " { \"${param_name,,}\","
if [ "$is_instance_param" = 1 ]; then
params="instanceParams"
else
params="modelParams"
fi
echo -n "modelInfos[MODEL_TYPE::${model_name^^}].${params}.emplace_back( \"${param_name,,}\","
echo -n " $param_id,"
echo -n " NGSPICE::PARAM_DIR::${param_dir^^},"
echo -n " NGSPICE::PARAM_TYPE::${param_type^^},"
@ -513,19 +454,9 @@ END
#fi
done
echo " \"$param_description\" },"
echo " \"$param_description\" );"
fi
done
echo " } };"
fi
done
echo " }"
echo ""
echo " wxFAIL;"
echo " return {};"
echo "}"
} > $(dirname "$0")/new_ngspice_models.cpp