Sim QA: Test for duplicates and wrongly deduplicated parameters

(adapt tests to the names of the newly deduplicated parameters)
This commit is contained in:
Mikolaj Wielgus 2022-11-29 15:04:38 +01:00
parent ab6caca384
commit 9055043409
3 changed files with 180 additions and 115 deletions

View File

@ -489,7 +489,7 @@ BOOST_AUTO_TEST_CASE( Bjts )
"re", "re",
"rs", "rs",
"rbp", "rbp",
"is", "is_",
"nf", "nf",
"nr", "nr",
"fc", "fc",
@ -585,7 +585,7 @@ BOOST_AUTO_TEST_CASE( Bjts )
"tvbbe2", "tvbbe2",
"tnbbe", "tnbbe",
"ebbe", "ebbe",
"dtemp", "dtemp_",
"vers", "vers",
"vref", "vref",
"vbe_max", "vbe_max",
@ -607,7 +607,7 @@ BOOST_AUTO_TEST_CASE( Bjts )
"re", "re",
"rs", "rs",
"rbp", "rbp",
"is", "is_",
"nf", "nf",
"nr", "nr",
"fc", "fc",
@ -703,7 +703,7 @@ BOOST_AUTO_TEST_CASE( Bjts )
"tvbbe2", "tvbbe2",
"tnbbe", "tnbbe",
"ebbe", "ebbe",
"dtemp", "dtemp_",
"vers", "vers",
"vref", "vref",
"vbe_max", "vbe_max",
@ -715,7 +715,7 @@ BOOST_AUTO_TEST_CASE( Bjts )
case 2: case 2:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON,
{ {
"is", "is_",
"nf", "nf",
"ise", "ise",
"ne", "ne",
@ -759,7 +759,7 @@ BOOST_AUTO_TEST_CASE( Bjts )
case 3: case 3:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_GUMMELPOON, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_GUMMELPOON,
{ {
"is", "is_",
"nf", "nf",
"ise", "ise",
"ne", "ne",
@ -1102,7 +1102,7 @@ BOOST_AUTO_TEST_CASE( Bjts )
case 6: case 6:
case 7: case 7:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON,
{ "is", "nf", "ise", "ne", "bf", "ikf", "vaf", "nr", "isc", "nc" } ); { "is_", "nf", "ise", "ne", "bf", "ikf", "vaf", "nr", "isc", "nc" } );
break; break;
} }
} }
@ -1129,13 +1129,13 @@ BOOST_AUTO_TEST_CASE( Fets )
{ {
case 0: case 0:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NJFET_SHICHMANHODGES, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NJFET_SHICHMANHODGES,
{ "vt0", "beta", "lambda", "rd", "rs", "cgs", "cgd", "pb", "is", { "vt0", "beta", "lambda", "rd", "rs", "cgs", "cgd", "pb", "is_",
"fc" } ); "fc" } );
break; break;
case 1: case 1:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PJFET_SHICHMANHODGES, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PJFET_SHICHMANHODGES,
{ "vt0", "beta", "lambda", "rd", "rs", "cgs", "cgd", "pb", "is", { "vt0", "beta", "lambda", "rd", "rs", "cgs", "cgd", "pb", "is_",
"fc" } ); "fc" } );
break; break;
@ -1153,13 +1153,13 @@ BOOST_AUTO_TEST_CASE( Fets )
case 4: case 4:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_STATZ, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_STATZ,
{ "vt0", "alpha", "beta", "lambda", "b", "rd", "rs", "cgs", "cgd", { "vt0", "alpha", "beta", "lambda", "b", "rd", "rs", "cgs", "cgd_",
"pb" } ); "pb" } );
break; break;
case 5: case 5:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_STATZ, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_STATZ,
{ "vt0", "alpha", "beta", "lambda", "b", "rd", "rs", "cgs", "cgd", { "vt0", "alpha", "beta", "lambda", "b", "rd", "rs", "cgs", "cgd_",
"pb" } ); "pb" } );
break; break;
@ -1209,8 +1209,8 @@ BOOST_AUTO_TEST_CASE( Fets )
"phi", "phi",
"lambda", "lambda",
"theta", "theta",
"rd", "rd_",
"rs", "rs_",
"rg", "rg",
"tnom", "tnom",
"kf", "kf",
@ -1248,7 +1248,7 @@ BOOST_AUTO_TEST_CASE( Fets )
"tt", "tt",
"eg", "eg",
"xti", "xti",
"is", "is_",
"vj", "vj",
"cjo", "cjo",
"m", "m",
@ -1256,7 +1256,7 @@ BOOST_AUTO_TEST_CASE( Fets )
"cgdmin", "cgdmin",
"cgdmax", "cgdmax",
"a", "a",
"cgs", "cgs_",
"rthjc", "rthjc",
"rthca", "rthca",
"cthj", "cthj",
@ -1284,8 +1284,8 @@ BOOST_AUTO_TEST_CASE( Fets )
"phi", "phi",
"lambda", "lambda",
"theta", "theta",
"rd", "rd_",
"rs", "rs_",
"rg", "rg",
"tnom", "tnom",
"kf", "kf",
@ -1323,7 +1323,7 @@ BOOST_AUTO_TEST_CASE( Fets )
"tt", "tt",
"eg", "eg",
"xti", "xti",
"is", "is_",
"vj", "vj",
"cjo", "cjo",
"m", "m",
@ -1331,7 +1331,7 @@ BOOST_AUTO_TEST_CASE( Fets )
"cgdmin", "cgdmin",
"cgdmax", "cgdmax",
"a", "a",
"cgs", "cgs_",
"rthjc", "rthjc",
"rthca", "rthca",
"cthj", "cthj",
@ -1351,38 +1351,38 @@ BOOST_AUTO_TEST_CASE( Fets )
case 14: case 14:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS1, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS1,
{ "vto", "kp", "gamma", "phi", "lambda", "rd", "rs", "cbd", "cbs", { "vto", "kp", "gamma", "phi", "lambda", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 15: case 15:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS1, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS1,
{ "vto", "kp", "gamma", "phi", "lambda", "rd", "rs", "cbd", "cbs", { "vto", "kp", "gamma", "phi", "lambda", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 16: case 16:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS2, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS2,
{ "vto", "kp", "gamma", "phi", "lambda", "rd", "rs", "cbd", "cbs", { "vto", "kp", "gamma", "phi", "lambda", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 17: case 17:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS2, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS2,
{ "vto", "kp", "gamma", "phi", "lambda", "rd", "rs", "cbd", "cbs", { "vto", "kp", "gamma", "phi", "lambda", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 18: case 18:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS3, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS3,
{ "vto", "theta", "gamma", "phi", "eta", "rd", "rs", "cbd", "cbs", { "vto", "theta", "gamma", "phi", "eta", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 19: case 19:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS3, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS3,
{ "vto", "theta", "gamma", "phi", "eta", "rd", "rs", "cbd", "cbs", { "vto", "theta", "gamma", "phi", "eta", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 20: case 20:
@ -1411,14 +1411,14 @@ BOOST_AUTO_TEST_CASE( Fets )
case 24: case 24:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS6, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS6,
{ "vto", "nvth", "gamma", "phi", "lambda", "rd", "rs", "cbd", "cbs", { "vto", "nvth", "gamma", "phi", "lambda", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 25: case 25:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS6, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS6,
{ "vto", "nvth", "gamma", "phi", "lambda", "rd", "rs", "cbd", "cbs", { "vto", "nvth", "gamma", "phi", "lambda", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 26: case 26:
@ -1435,14 +1435,14 @@ BOOST_AUTO_TEST_CASE( Fets )
case 28: case 28:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS9, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS9,
{ "vto", "theta", "gamma", "phi", "eta", "rd", "rs", "cbd", "cbs", { "vto", "theta", "gamma", "phi", "eta", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 29: case 29:
TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS9, TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS9,
{ "vto", "theta", "gamma", "phi", "eta", "rd", "rs", "cbd", "cbs", { "vto", "theta", "gamma", "phi", "eta", "rd_", "rs_", "cbd_", "cbs_",
"is" } ); "is_" } );
break; break;
case 30: case 30:

View File

@ -23,6 +23,7 @@
#include <qa_utils/wx_utils/unit_test_utils.h> #include <qa_utils/wx_utils/unit_test_utils.h>
#include <sim/sim_model_ngspice.h> #include <sim/sim_model_ngspice.h>
#include <boost/algorithm/string/predicate.hpp>
class TEST_SIM_MODEL_NGSPICE_FIXTURE : public SIM_MODEL_NGSPICE class TEST_SIM_MODEL_NGSPICE_FIXTURE : public SIM_MODEL_NGSPICE
{ {
@ -34,15 +35,79 @@ public:
BOOST_FIXTURE_TEST_SUITE( SimModelNgspice, TEST_SIM_MODEL_NGSPICE_FIXTURE ) BOOST_FIXTURE_TEST_SUITE( SimModelNgspice, TEST_SIM_MODEL_NGSPICE_FIXTURE )
BOOST_AUTO_TEST_CASE( Models ) BOOST_AUTO_TEST_CASE( ParamDuplicates )
{
for( MODEL_TYPE type : MODEL_TYPE_ITERATOR() )
{
BOOST_TEST_CONTEXT( "Model name: " << ModelInfo( type ).name )
{
const std::vector<SIM_MODEL::PARAM::INFO> modelParams = ModelInfo( type ).modelParams;
const std::vector<SIM_MODEL::PARAM::INFO> instanceParams = ModelInfo( type ).instanceParams;
for( const SIM_MODEL::PARAM::INFO& modelParam : modelParams )
{
BOOST_TEST_CONTEXT( "Model param name: " << modelParam.name )
{
// Ensure there's no model parameters that have the same name.
BOOST_CHECK( std::none_of( modelParams.begin(), modelParams.end(),
[modelParam]( const auto& aOtherModelParam )
{
return modelParam.id != aOtherModelParam.id
&& modelParam.name == aOtherModelParam.name;
} ) );
// Ensure there's no model parameters that have the same name as an instance parameter.
BOOST_CHECK( std::none_of( instanceParams.begin(), instanceParams.end(),
[modelParam]( const auto& aInstanceParam )
{
return modelParam.name == aInstanceParam.name;
} ) );
if( boost::ends_with( modelParam.name, "_" ) )
{
// Ensure that for each model parameter ending with a "_" there exists an
// instance parameter with the same name but without this final character.
// We append an "_" to model parameters to disambiguate from these
// corresponding instance parameters.
BOOST_CHECK( std::any_of( instanceParams.begin(), instanceParams.end(),
[modelParam]( const auto& aInstanceParam )
{
return modelParam.name.substr( 0, modelParam.name.length() - 1 )
== aInstanceParam.name;
} ) );
}
}
}
// Ensure there's no instance parameters that have the same name.
for( const SIM_MODEL::PARAM::INFO& instanceParam : instanceParams )
{
BOOST_TEST_CONTEXT( "Instance param name: " << instanceParam.name )
{
BOOST_CHECK( std::none_of( instanceParams.begin(), instanceParams.end(),
[instanceParam]( const auto& aOtherInstanceParam )
{
return instanceParam.id != aOtherInstanceParam.id
&& instanceParam.dir != SIM_MODEL::PARAM::DIR_OUT
&& aOtherInstanceParam.dir != SIM_MODEL::PARAM::DIR_OUT
&& instanceParam.name == aOtherInstanceParam.name;
} ) );
}
}
}
}
}
BOOST_AUTO_TEST_CASE( ParamCount )
{ {
// Count the total number of model and instance parameters for each model so that there will be // Count the total number of model and instance parameters for each model so that there will be
// an error if someone accidentally removes a parameter. // an error if someone accidentally removes a parameter.
for( MODEL_TYPE type : MODEL_TYPE_ITERATOR() ) for( MODEL_TYPE type : MODEL_TYPE_ITERATOR() )
{ {
unsigned modelParamCount = ModelInfo( type ).modelParams.size(); const std::vector<SIM_MODEL::PARAM::INFO> modelParams = ModelInfo( type ).modelParams;
unsigned instanceParamCount = ModelInfo( type ).instanceParams.size(); const std::vector<SIM_MODEL::PARAM::INFO> instanceParams = ModelInfo( type ).instanceParams;
switch( type ) switch( type )
{ {
@ -51,183 +116,183 @@ BOOST_AUTO_TEST_CASE( Models )
break; break;
/*case MODEL_TYPE::RESISTOR: /*case MODEL_TYPE::RESISTOR:
BOOST_CHECK_EQUAL( modelParamCount, 22 ); BOOST_CHECK_EQUAL( modelParams.size(), 22 );
BOOST_CHECK_EQUAL( instanceParamCount, 25 ); BOOST_CHECK_EQUAL( instanceParams.size(), 25 );
break; break;
case MODEL_TYPE::CAPACITOR: case MODEL_TYPE::CAPACITOR:
BOOST_CHECK_EQUAL( modelParamCount, 19 ); BOOST_CHECK_EQUAL( modelParams.size(), 19 );
BOOST_CHECK_EQUAL( instanceParamCount, 22 ); BOOST_CHECK_EQUAL( instanceParams.size(), 22 );
break; break;
case MODEL_TYPE::INDUCTOR: case MODEL_TYPE::INDUCTOR:
BOOST_CHECK_EQUAL( modelParamCount, 9 ); BOOST_CHECK_EQUAL( modelParams.size(), 9 );
BOOST_CHECK_EQUAL( instanceParamCount, 20 ); BOOST_CHECK_EQUAL( instanceParams.size(), 20 );
break;*/ break;*/
/*case MODEL_TYPE::LTRA: /*case MODEL_TYPE::LTRA:
BOOST_CHECK_EQUAL( modelParamCount, 18 ); BOOST_CHECK_EQUAL( modelParams.size(), 18 );
BOOST_CHECK_EQUAL( instanceParamCount, 9 ); BOOST_CHECK_EQUAL( instanceParams.size(), 9 );
break; break;
case MODEL_TYPE::TRANLINE: case MODEL_TYPE::TRANLINE:
BOOST_CHECK_EQUAL( modelParamCount, 0 ); BOOST_CHECK_EQUAL( modelParams.size(), 0 );
BOOST_CHECK_EQUAL( instanceParamCount, 17 ); BOOST_CHECK_EQUAL( instanceParams.size(), 17 );
break; break;
case MODEL_TYPE::URC: case MODEL_TYPE::URC:
BOOST_CHECK_EQUAL( modelParamCount, 7 ); BOOST_CHECK_EQUAL( modelParams.size(), 7 );
BOOST_CHECK_EQUAL( instanceParamCount, 5 ); BOOST_CHECK_EQUAL( instanceParams.size(), 5 );
break;*/ break;*/
/*case MODEL_TYPE::TRANSLINE: /*case MODEL_TYPE::TRANSLINE:
BOOST_CHECK_EQUAL( modelParamCount, 6 ); BOOST_CHECK_EQUAL( modelParams.size(), 6 );
BOOST_CHECK_EQUAL( instanceParamCount, 3 ); BOOST_CHECK_EQUAL( instanceParams.size(), 3 );
break;*/ break;*/
/*case MODEL_TYPE::SWITCH: /*case MODEL_TYPE::SWITCH:
BOOST_CHECK_EQUAL( modelParamCount, 7 ); BOOST_CHECK_EQUAL( modelParams.size(), 7 );
BOOST_CHECK_EQUAL( instanceParamCount, 8 ); BOOST_CHECK_EQUAL( instanceParams.size(), 8 );
break; break;
case MODEL_TYPE::CSWITCH: case MODEL_TYPE::CSWITCH:
BOOST_CHECK_EQUAL( modelParamCount, 7 ); BOOST_CHECK_EQUAL( modelParams.size(), 7 );
BOOST_CHECK_EQUAL( instanceParamCount, 7 ); BOOST_CHECK_EQUAL( instanceParams.size(), 7 );
break;*/ break;*/
case MODEL_TYPE::DIODE: case MODEL_TYPE::DIODE:
BOOST_CHECK_EQUAL( modelParamCount, 76 ); BOOST_CHECK_EQUAL( modelParams.size(), 76 );
BOOST_CHECK_EQUAL( instanceParamCount, 30 ); BOOST_CHECK_EQUAL( instanceParams.size(), 30 );
break; break;
case MODEL_TYPE::BJT: case MODEL_TYPE::BJT:
BOOST_CHECK_EQUAL( modelParamCount, 152 ); BOOST_CHECK_EQUAL( modelParams.size(), 152 );
BOOST_CHECK_EQUAL( instanceParamCount, 53 ); BOOST_CHECK_EQUAL( instanceParams.size(), 53 );
break; break;
case MODEL_TYPE::VBIC: case MODEL_TYPE::VBIC:
BOOST_CHECK_EQUAL( modelParamCount, 117 ); BOOST_CHECK_EQUAL( modelParams.size(), 117 );
BOOST_CHECK_EQUAL( instanceParamCount, 45 ); BOOST_CHECK_EQUAL( instanceParams.size(), 45 );
break; break;
case MODEL_TYPE::HICUM2: case MODEL_TYPE::HICUM2:
BOOST_CHECK_EQUAL( modelParamCount, 149 ); BOOST_CHECK_EQUAL( modelParams.size(), 149 );
BOOST_CHECK_EQUAL( instanceParamCount, 61 ); BOOST_CHECK_EQUAL( instanceParams.size(), 61 );
break; break;
case MODEL_TYPE::JFET: case MODEL_TYPE::JFET:
BOOST_CHECK_EQUAL( modelParamCount, 28 ); BOOST_CHECK_EQUAL( modelParams.size(), 28 );
BOOST_CHECK_EQUAL( instanceParamCount, 28 ); BOOST_CHECK_EQUAL( instanceParams.size(), 28 );
break; break;
case MODEL_TYPE::JFET2: case MODEL_TYPE::JFET2:
BOOST_CHECK_EQUAL( modelParamCount, 46 ); BOOST_CHECK_EQUAL( modelParams.size(), 46 );
BOOST_CHECK_EQUAL( instanceParamCount, 30 ); BOOST_CHECK_EQUAL( instanceParams.size(), 30 );
break; break;
case MODEL_TYPE::MES: case MODEL_TYPE::MES:
BOOST_CHECK_EQUAL( modelParamCount, 22 ); BOOST_CHECK_EQUAL( modelParams.size(), 22 );
BOOST_CHECK_EQUAL( instanceParamCount, 25 ); BOOST_CHECK_EQUAL( instanceParams.size(), 25 );
break; break;
case MODEL_TYPE::MESA: case MODEL_TYPE::MESA:
BOOST_CHECK_EQUAL( modelParamCount, 71 ); BOOST_CHECK_EQUAL( modelParams.size(), 71 );
BOOST_CHECK_EQUAL( instanceParamCount, 30 ); BOOST_CHECK_EQUAL( instanceParams.size(), 30 );
break; break;
case MODEL_TYPE::HFET1: case MODEL_TYPE::HFET1:
BOOST_CHECK_EQUAL( modelParamCount, 68 ); BOOST_CHECK_EQUAL( modelParams.size(), 68 );
BOOST_CHECK_EQUAL( instanceParamCount, 28 ); BOOST_CHECK_EQUAL( instanceParams.size(), 28 );
break; break;
case MODEL_TYPE::HFET2: case MODEL_TYPE::HFET2:
BOOST_CHECK_EQUAL( modelParamCount, 40 ); BOOST_CHECK_EQUAL( modelParams.size(), 40 );
BOOST_CHECK_EQUAL( instanceParamCount, 28 ); BOOST_CHECK_EQUAL( instanceParams.size(), 28 );
break; break;
case MODEL_TYPE::VDMOS: case MODEL_TYPE::VDMOS:
BOOST_CHECK_EQUAL( modelParamCount, 69 ); BOOST_CHECK_EQUAL( modelParams.size(), 69 );
BOOST_CHECK_EQUAL( instanceParamCount, 36 ); BOOST_CHECK_EQUAL( instanceParams.size(), 36 );
break; break;
case MODEL_TYPE::MOS1: case MODEL_TYPE::MOS1:
BOOST_CHECK_EQUAL( modelParamCount, 35 ); BOOST_CHECK_EQUAL( modelParams.size(), 35 );
BOOST_CHECK_EQUAL( instanceParamCount, 76 ); BOOST_CHECK_EQUAL( instanceParams.size(), 76 );
break; break;
case MODEL_TYPE::MOS2: case MODEL_TYPE::MOS2:
BOOST_CHECK_EQUAL( modelParamCount, 42 ); BOOST_CHECK_EQUAL( modelParams.size(), 42 );
BOOST_CHECK_EQUAL( instanceParamCount, 76 ); BOOST_CHECK_EQUAL( instanceParams.size(), 76 );
break; break;
case MODEL_TYPE::MOS3: case MODEL_TYPE::MOS3:
BOOST_CHECK_EQUAL( modelParamCount, 48 ); BOOST_CHECK_EQUAL( modelParams.size(), 48 );
BOOST_CHECK_EQUAL( instanceParamCount, 81 ); BOOST_CHECK_EQUAL( instanceParams.size(), 81 );
break; break;
case MODEL_TYPE::BSIM1: case MODEL_TYPE::BSIM1:
BOOST_CHECK_EQUAL( modelParamCount, 81 ); BOOST_CHECK_EQUAL( modelParams.size(), 81 );
BOOST_CHECK_EQUAL( instanceParamCount, 14 ); BOOST_CHECK_EQUAL( instanceParams.size(), 14 );
break; break;
case MODEL_TYPE::BSIM2: case MODEL_TYPE::BSIM2:
BOOST_CHECK_EQUAL( modelParamCount, 137 ); BOOST_CHECK_EQUAL( modelParams.size(), 137 );
BOOST_CHECK_EQUAL( instanceParamCount, 14 ); BOOST_CHECK_EQUAL( instanceParams.size(), 14 );
break; break;
case MODEL_TYPE::MOS6: case MODEL_TYPE::MOS6:
BOOST_CHECK_EQUAL( modelParamCount, 42 ); BOOST_CHECK_EQUAL( modelParams.size(), 42 );
BOOST_CHECK_EQUAL( instanceParamCount, 78 ); BOOST_CHECK_EQUAL( instanceParams.size(), 78 );
break; break;
case MODEL_TYPE::BSIM3: case MODEL_TYPE::BSIM3:
BOOST_CHECK_EQUAL( modelParamCount, 429 ); BOOST_CHECK_EQUAL( modelParams.size(), 429 );
BOOST_CHECK_EQUAL( instanceParamCount, 46 ); BOOST_CHECK_EQUAL( instanceParams.size(), 46 );
break; break;
case MODEL_TYPE::MOS9: case MODEL_TYPE::MOS9:
BOOST_CHECK_EQUAL( modelParamCount, 48 ); BOOST_CHECK_EQUAL( modelParams.size(), 48 );
BOOST_CHECK_EQUAL( instanceParamCount, 81 ); BOOST_CHECK_EQUAL( instanceParams.size(), 81 );
break; break;
case MODEL_TYPE::B4SOI: case MODEL_TYPE::B4SOI:
BOOST_CHECK_EQUAL( modelParamCount, 915 ); BOOST_CHECK_EQUAL( modelParams.size(), 915 );
BOOST_CHECK_EQUAL( instanceParamCount, 74 ); BOOST_CHECK_EQUAL( instanceParams.size(), 74 );
break; break;
case MODEL_TYPE::BSIM4: case MODEL_TYPE::BSIM4:
BOOST_CHECK_EQUAL( modelParamCount, 892 ); BOOST_CHECK_EQUAL( modelParams.size(), 892 );
BOOST_CHECK_EQUAL( instanceParamCount, 84 ); BOOST_CHECK_EQUAL( instanceParams.size(), 84 );
break; break;
case MODEL_TYPE::B3SOIFD: case MODEL_TYPE::B3SOIFD:
BOOST_CHECK_EQUAL( modelParamCount, 393 ); BOOST_CHECK_EQUAL( modelParams.size(), 393 );
BOOST_CHECK_EQUAL( instanceParamCount, 27 ); BOOST_CHECK_EQUAL( instanceParams.size(), 27 );
break; break;
case MODEL_TYPE::B3SOIDD: case MODEL_TYPE::B3SOIDD:
BOOST_CHECK_EQUAL( modelParamCount, 393 ); BOOST_CHECK_EQUAL( modelParams.size(), 393 );
BOOST_CHECK_EQUAL( instanceParamCount, 27 ); BOOST_CHECK_EQUAL( instanceParams.size(), 27 );
break; break;
case MODEL_TYPE::B3SOIPD: case MODEL_TYPE::B3SOIPD:
BOOST_CHECK_EQUAL( modelParamCount, 470 ); BOOST_CHECK_EQUAL( modelParams.size(), 470 );
BOOST_CHECK_EQUAL( instanceParamCount, 36 ); BOOST_CHECK_EQUAL( instanceParams.size(), 36 );
break; break;
case MODEL_TYPE::HISIM2: case MODEL_TYPE::HISIM2:
BOOST_CHECK_EQUAL( modelParamCount, 486 ); BOOST_CHECK_EQUAL( modelParams.size(), 486 );
BOOST_CHECK_EQUAL( instanceParamCount, 59 ); BOOST_CHECK_EQUAL( instanceParams.size(), 59 );
break; break;
case MODEL_TYPE::HISIMHV1: case MODEL_TYPE::HISIMHV1:
BOOST_CHECK_EQUAL( modelParamCount, 610 ); BOOST_CHECK_EQUAL( modelParams.size(), 610 );
BOOST_CHECK_EQUAL( instanceParamCount, 72 ); BOOST_CHECK_EQUAL( instanceParams.size(), 72 );
break; break;
case MODEL_TYPE::HISIMHV2: case MODEL_TYPE::HISIMHV2:
BOOST_CHECK_EQUAL( modelParamCount, 730 ); BOOST_CHECK_EQUAL( modelParams.size(), 730 );
BOOST_CHECK_EQUAL( instanceParamCount, 74 ); BOOST_CHECK_EQUAL( instanceParams.size(), 74 );
break; break;
default: default:

View File

@ -196,7 +196,7 @@ public:
{ {
// The default aMaxRelError is fairly large because we have some problems with determinism // The default aMaxRelError is fairly large because we have some problems with determinism
// in QA pipeline. We don't need to fix this for now because, if this has to be fixed in // in QA pipeline. We don't need to fix this for now because, if this has to be fixed in
// the first place, this would have to be done from Ngspice's side. // the first place, this has to be done from Ngspice's side.
BOOST_TEST_CONTEXT( "X vector name: " << aXVectorName << ", X value: " << aXValue ) BOOST_TEST_CONTEXT( "X vector name: " << aXVectorName << ", X value: " << aXValue )
{ {