28#include <boost/algorithm/string/case_conv.hpp>
39 fn.AppendDir(
"spice_netlists" );
40 fn.AppendDir(
"libraries" );
41 fn.SetName( aBaseName );
42 fn.SetExt(
"lib.spice" );
44 return std::string( fn.GetFullPath().ToUTF8() );
52 m_library = std::make_unique<SIM_LIBRARY_SPICE>(
true );
58 BOOST_CHECK( aModel.
GetType() == SIM_MODEL::TYPE::D );
59 BOOST_CHECK_EQUAL( aModelName,
60 fmt::format(
"{}{}_Usual",
73 BOOST_TEST_CONTEXT(
"Model index: " << aModelIndex )
75 BOOST_CHECK_EQUAL( aModelName,
76 fmt::format(
"{}{}_Empty",
91 SIM_MODEL::TYPE aType,
const std::vector<std::string>& aParamNames )
93 BOOST_TEST_CONTEXT(
"Model index: " << aModelIndex
94 <<
", Model name: " << aModelName
95 <<
", Model device type: " << aModel.
GetDeviceInfo().fieldValue
96 <<
", Model type: " << aModel.
GetTypeInfo().fieldValue )
103 BOOST_CHECK( aModel.
GetType() == aType );
106 std::string fieldValue = aModel.
GetTypeInfo().fieldValue;
109 if( modelType ==
"VDMOS NCHAN" )
116 if( modelType ==
"VDMOS PCHAN" )
122 BOOST_CHECK_EQUAL( aModelName, fmt::format(
"_{}_{}_{}",
127 for(
int i = 0; i < aParamNames.size(); ++i )
129 std::string paramName = aParamNames.at( i );
132 BOOST_TEST_CONTEXT(
"Param name: " << paramName )
136 BOOST_CHECK( param->
value ==
"0M" || param->
value ==
"0" );
140 BOOST_CHECK_EQUAL( param->
value, fmt::format(
"{:d}", i % 10 ) );
144 BOOST_CHECK_EQUAL( param->
value,
"" );
148 BOOST_CHECK_EQUAL( param->
value, fmt::format(
"{}000.0{}M", i % 10, i % 10 ) );
166 LoadLibrary(
"subckts" );
168 const std::vector<SIM_LIBRARY::MODEL> models = m_library->GetModels();
170 BOOST_CHECK_EQUAL( models.size(), 7 );
172 for(
int i = 0; i < models.size(); ++i )
174 const auto& [modelName, model] = models.at( i );
176 BOOST_TEST_CONTEXT(
"SUBCKT index: " << i )
181 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
182 BOOST_CHECK_EQUAL( modelName,
"NO_PARAMS_0" );
186 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
187 BOOST_CHECK_EQUAL( modelName,
"ONE_PARAM_1" );
188 BOOST_REQUIRE_EQUAL( model.GetParamCount(), 1 );
189 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name,
"PARAM1" );
190 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue,
"1" );
191 BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 );
192 BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName,
"1" );
193 BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName,
"2" );
197 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
198 BOOST_CHECK_EQUAL( modelName,
"ONE_PARAM_SHORT_FORM_2" );
199 BOOST_REQUIRE_EQUAL( model.GetParamCount(), 1 );
200 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name,
"PARAM1" );
201 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue,
"1.0" );
202 BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName,
"1" );
203 BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName,
"2" );
207 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
208 BOOST_CHECK_EQUAL( modelName,
"two_params_3" );
209 BOOST_REQUIRE_EQUAL( model.GetParamCount(), 2 );
210 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name,
"param1" );
211 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue,
"1.1e+1" );
212 BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.name,
"param2" );
213 BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.defaultValue,
"2.2e+2" );
214 BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 );
215 BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName,
"1" );
216 BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName,
"2" );
220 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
221 BOOST_CHECK_EQUAL( modelName,
"two_params_short_form_4" );
222 BOOST_REQUIRE_EQUAL( model.GetParamCount(), 2 );
223 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name,
"param1" );
224 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue,
"1.1E+1" );
225 BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.name,
"param2" );
226 BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.defaultValue,
"2.2E+2" );
227 BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 );
228 BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName,
"1" );
229 BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName,
"2" );
233 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
234 BOOST_CHECK_EQUAL( modelName,
"NOTHING_5" );
235 BOOST_CHECK_EQUAL( model.GetParamCount(), 0 );
236 BOOST_CHECK_EQUAL( model.GetPinCount(), 0 );
240 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
241 BOOST_CHECK_EQUAL( modelName,
"Numparam_inside_6" );
242 BOOST_CHECK_EQUAL( model.GetParamCount(), 0 );
243 BOOST_CHECK_EQUAL( model.GetPinCount(), 2 );
254 LoadLibrary(
"diodes" );
256 const std::vector<SIM_LIBRARY::MODEL> models = m_library->GetModels();
258 BOOST_CHECK_EQUAL( models.size(), 26 );
260 for(
int i = 0; i < models.size(); ++i )
262 const auto& [modelName, model] = models.at( i );
264 BOOST_TEST_CONTEXT(
"Diode index: " << i )
269 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
270 BOOST_CHECK_EQUAL( modelName,
"1N4148" );
271 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"100" );
272 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"4p" );
273 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"100u" );
274 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"4n" );
275 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
"0.33" );
276 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"2" );
277 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"0.5" );
278 BOOST_CHECK_EQUAL( model.FindParam(
"tt" )->value,
"10n" );
279 BOOST_CHECK_EQUAL( model.FindParam(
"vj" )->value,
"0.8" );
283 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
284 BOOST_CHECK_EQUAL( modelName,
"D1" );
285 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"1.23n" );
286 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"1.23" );
287 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
".7890" );
288 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"12.34m" );
289 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"3" );
290 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"1.23" );
291 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"0.9p" );
292 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
".56" );
293 BOOST_CHECK_EQUAL( model.FindParam(
"vj" )->value,
".78" );
294 BOOST_CHECK_EQUAL( model.FindParam(
"fc" )->value,
".9" );
295 BOOST_CHECK_EQUAL( model.FindParam(
"isr" )->value,
"12.34n" );
296 BOOST_CHECK_EQUAL( model.FindParam(
"nr" )->value,
"2.345" );
297 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"100" );
298 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"100u" );
299 BOOST_CHECK_EQUAL( model.FindParam(
"tt" )->value,
"12.34n" );
304 CompareToUsualDiodeModel( model, modelName, i );
308 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
309 BOOST_CHECK_EQUAL( modelName,
"D4" );
310 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"0.1p" );
311 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"2" );
312 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"3p" );
313 BOOST_CHECK_EQUAL( model.FindParam(
"tt" )->value,
"45n" );
314 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"678" );
315 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"0.1p" );
323 CompareToEmptyModel( model, modelName, i );
334 CompareToUsualDiodeModel( model, modelName, i );
338 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
339 BOOST_CHECK_EQUAL( modelName,
"D<>/?:\\|[]!@#$%^&-_18" );
340 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"-1.1" );
341 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
"2.2" );
342 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"-3.3m" );
343 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"44k" );
344 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"55u" );
345 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"6.6M" );
351 CompareToUsualDiodeModel( model, modelName, i );
355 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
356 BOOST_CHECK_EQUAL( modelName,
"D22" );
357 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"11.1n" );
358 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"2.2" );
359 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"33.3m" );
360 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"99.9" );
361 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"3" );
362 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"1.1" );
366 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
367 BOOST_CHECK_EQUAL( modelName,
"D23" );
368 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"11.1n" );
369 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"2.2" );
370 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"33.3m" );
371 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"111.1" );
372 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"3" );
373 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"2.2" );
374 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
".3" );
378 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
379 BOOST_CHECK_EQUAL( modelName,
"D24" );
380 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"11.1n" );
381 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"1.1" );
382 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"33.3m" );
383 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"99.9" );
384 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"3" );
385 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"1.1" );
389 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
390 BOOST_CHECK_EQUAL( modelName,
"D25" );
392 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"0M" );
394 BOOST_CHECK_EQUAL( model.FindParam(
"jsw" )->value,
"1000.01M" );
395 BOOST_CHECK_EQUAL( model.FindParam(
"tnom" )->value,
"2000.02M" );
397 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"3000.03M" );
398 BOOST_CHECK_EQUAL( model.FindParam(
"trs" )->value,
"4000.04M" );
400 BOOST_CHECK_EQUAL( model.FindParam(
"trs2" )->value,
"5000.05M" );
401 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"6000.06M" );
402 BOOST_CHECK_EQUAL( model.FindParam(
"ns" )->value,
"7000.07M" );
403 BOOST_CHECK_EQUAL( model.FindParam(
"tt" )->value,
"8000.08M" );
404 BOOST_CHECK_EQUAL( model.FindParam(
"ttt1" )->value,
"9000.09M" );
405 BOOST_CHECK_EQUAL( model.FindParam(
"ttt2" )->value,
"0M" );
406 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"1000.01M" );
409 BOOST_CHECK_EQUAL( model.FindParam(
"vj" )->value,
"2000.02M" );
411 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
"3000.03M" );
413 BOOST_CHECK_EQUAL( model.FindParam(
"tm1" )->value,
"4000.04M" );
414 BOOST_CHECK_EQUAL( model.FindParam(
"tm2" )->value,
"5000.05M" );
415 BOOST_CHECK_EQUAL( model.FindParam(
"cjp" )->value,
"6000.06M" );
417 BOOST_CHECK_EQUAL( model.FindParam(
"php" )->value,
"7000.07M" );
418 BOOST_CHECK_EQUAL( model.FindParam(
"mjsw" )->value,
"8000.08M" );
419 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"9000.09M" );
421 BOOST_CHECK_EQUAL( model.FindParam(
"ikr" )->value,
"0M" );
422 BOOST_CHECK_EQUAL( model.FindParam(
"nbv" )->value,
"1000.01M" );
423 BOOST_CHECK_EQUAL( model.FindParam(
"area_" )->value,
"2000.02M" );
424 BOOST_CHECK_EQUAL( model.FindParam(
"pj_" )->value,
"3000.03M" );
425 BOOST_CHECK_EQUAL( model.FindParam(
"tlev" )->value,
"4" );
426 BOOST_CHECK_EQUAL( model.FindParam(
"tlevc" )->value,
"5" );
427 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"6000.06M" );
428 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"7000.07M" );
429 BOOST_CHECK_EQUAL( model.FindParam(
"cta" )->value,
"8000.08M" );
431 BOOST_CHECK_EQUAL( model.FindParam(
"ctp" )->value,
"9000.09M" );
432 BOOST_CHECK_EQUAL( model.FindParam(
"tpb" )->value,
"0M" );
434 BOOST_CHECK_EQUAL( model.FindParam(
"tphp" )->value,
"1000.01M" );
435 BOOST_CHECK_EQUAL( model.FindParam(
"jtun" )->value,
"2000.02M" );
436 BOOST_CHECK_EQUAL( model.FindParam(
"jtunsw" )->value,
"3000.03M" );
437 BOOST_CHECK_EQUAL( model.FindParam(
"ntun" )->value,
"4000.04M" );
438 BOOST_CHECK_EQUAL( model.FindParam(
"xtitun" )->value,
"5000.05M" );
439 BOOST_CHECK_EQUAL( model.FindParam(
"keg" )->value,
"6000.06M" );
440 BOOST_CHECK_EQUAL( model.FindParam(
"kf" )->value,
"7000.07M" );
441 BOOST_CHECK_EQUAL( model.FindParam(
"af" )->value,
"8000.08M" );
442 BOOST_CHECK_EQUAL( model.FindParam(
"fc" )->value,
"9000.09M" );
443 BOOST_CHECK_EQUAL( model.FindParam(
"fcs" )->value,
"0M" );
444 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"1000.01M" );
445 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"2000.02M" );
447 BOOST_CHECK_EQUAL( model.FindParam(
"tcv" )->value,
"3000.03M" );
448 BOOST_CHECK_EQUAL( model.FindParam(
"cond" )->value,
"4000.04M" );
449 BOOST_CHECK_EQUAL( model.FindParam(
"isr" )->value,
"5000.05M" );
450 BOOST_CHECK_EQUAL( model.FindParam(
"nr" )->value,
"6000.06M" );
451 BOOST_CHECK_EQUAL( model.FindParam(
"fv_max" )->value,
"7000.07M" );
452 BOOST_CHECK_EQUAL( model.FindParam(
"bv_max" )->value,
"8000.08M" );
453 BOOST_CHECK_EQUAL( model.FindParam(
"id_max" )->value,
"9000.09M" );
454 BOOST_CHECK_EQUAL( model.FindParam(
"te_max" )->value,
"0M" );
455 BOOST_CHECK_EQUAL( model.FindParam(
"pd_max" )->value,
"1000.01M" );
456 BOOST_CHECK_EQUAL( model.FindParam(
"rth0" )->value,
"2000.02M" );
457 BOOST_CHECK_EQUAL( model.FindParam(
"cth0" )->value,
"3000.03M" );
458 BOOST_CHECK_EQUAL( model.FindParam(
"lm_" )->value,
"4000.04M" );
459 BOOST_CHECK_EQUAL( model.FindParam(
"lp_" )->value,
"5000.05M" );
460 BOOST_CHECK_EQUAL( model.FindParam(
"wm_" )->value,
"6000.06M" );
461 BOOST_CHECK_EQUAL( model.FindParam(
"wp_" )->value,
"7000.07M" );
462 BOOST_CHECK_EQUAL( model.FindParam(
"xom" )->value,
"8000.08M" );
463 BOOST_CHECK_EQUAL( model.FindParam(
"xoi" )->value,
"9000.09M" );
464 BOOST_CHECK_EQUAL( model.FindParam(
"xm" )->value,
"0M" );
465 BOOST_CHECK_EQUAL( model.FindParam(
"xp" )->value,
"1000.01M" );
470 BOOST_FAIL(
"Unknown parameter index" );
481 LoadLibrary(
"bjts" );
483 const std::vector<SIM_LIBRARY::MODEL> models = m_library->GetModels();
485 BOOST_CHECK_EQUAL( models.size(), 8 );
487 for(
int i = 0; i < models.size(); ++i )
489 const auto& [modelName, model] = models.at( i );
491 BOOST_TEST_CONTEXT(
"BJT index: " << i )
497 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_VBIC,
615 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_VBIC,
733 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON,
777 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_GUMMELPOON,
821 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_HICUM2,
970 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_HICUM2,
1121 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON,
1122 {
"is_",
"nf",
"ise",
"ne",
"bf",
"ikf",
"vaf",
"nr",
"isc",
"nc" } );
1133 LoadLibrary(
"fets" );
1135 const std::vector<SIM_LIBRARY::MODEL> models = m_library->GetModels();
1137 BOOST_CHECK_EQUAL( models.size(), 46 );
1139 for(
int i = 0; i < models.size(); ++i )
1141 const auto& [modelName, model] = models.at( i );
1143 BOOST_TEST_CONTEXT(
"FET index: " << i )
1150 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NJFET_SHICHMANHODGES,
1151 {
"vt0",
"beta",
"lambda",
"rd",
"rs",
"cgs",
"cgd",
"pb",
"is_",
1156 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PJFET_SHICHMANHODGES,
1157 {
"vt0",
"beta",
"lambda",
"rd",
"rs",
"cgs",
"cgd",
"pb",
"is_",
1162 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NJFET_PARKERSKELLERN,
1163 {
"vbi",
"af",
"beta",
"cds",
"cgd",
"cgs",
"delta",
"hfeta",
"mvst",
1168 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PJFET_PARKERSKELLERN,
1169 {
"vbi",
"af",
"beta",
"cds",
"cgd",
"cgs",
"delta",
"hfeta",
"mvst",
1174 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_STATZ,
1175 {
"vt0",
"alpha",
"beta",
"lambda",
"b",
"rd",
"rs",
"cgs",
"cgd_",
1180 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_STATZ,
1181 {
"vt0",
"alpha",
"beta",
"lambda",
"b",
"rd",
"rs",
"cgs",
"cgd_",
1186 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_YTTERDAL,
1187 {
"vto",
"lambda",
"lambdahf",
"beta",
"vs",
"rd",
"rs",
"rg",
"ri",
1192 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_YTTERDAL,
1193 {
"vto",
"lambda",
"lambdahf",
"beta",
"vs",
"rd",
"rs",
"rg",
"ri",
1198 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_HFET1,
1199 {
"vt0",
"lambda",
"rd",
"rs",
"rg",
"rdi",
"rsi",
"rgs",
"rgd",
1204 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_HFET1,
1205 {
"vt0",
"lambda",
"rd",
"rs",
"rg",
"rdi",
"rsi",
"rgs",
"rgd",
1210 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_HFET2,
1211 {
"vs",
"ggr",
"js",
"del",
"delta",
"deltad",
"di",
"epsi",
"eta",
1216 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_HFET2,
1217 {
"vs",
"ggr",
"js",
"del",
"delta",
"deltad",
"di",
"epsi",
"eta",
1222 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_VDMOS,
1297 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_VDMOS,
1372 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS1,
1373 {
"vto",
"kp",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1378 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS1,
1379 {
"vto",
"kp",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1384 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS2,
1385 {
"vto",
"kp",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1390 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS2,
1391 {
"vto",
"kp",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1396 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS3,
1397 {
"vto",
"theta",
"gamma",
"phi",
"eta",
"rd_",
"rs_",
"cbd_",
"cbs_",
1402 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS3,
1403 {
"vto",
"theta",
"gamma",
"phi",
"eta",
"rd_",
"rs_",
"cbd_",
"cbs_",
1408 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_BSIM1,
1409 {
"vfb",
"lvfb",
"wvfb",
"phi",
"lphi",
"wphi",
"k1",
"lk1",
"wk1",
1414 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_BSIM1,
1415 {
"vfb",
"lvfb",
"wvfb",
"phi",
"lphi",
"wphi",
"k1",
"lk1",
"wk1",
1420 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_BSIM2,
1421 {
"bib",
"lbib",
"wbib",
"vghigh",
"lvghigh",
"wvghigh",
1422 "waib",
"bi0",
"lbi0",
"wbi0" } );
1426 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_BSIM2,
1427 {
"bib",
"lbib",
"wbib",
"vghigh",
"lvghigh",
"wvghigh",
1428 "waib",
"bi0",
"lbi0",
"wbi0" } );
1432 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS6,
1433 {
"vto",
"nvth",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1438 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS6,
1439 {
"vto",
"nvth",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1444 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_BSIM3,
1445 {
"tox",
"toxm",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"xj",
1450 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_BSIM3,
1451 {
"tox",
"toxm",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"xj",
1456 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS9,
1457 {
"vto",
"theta",
"gamma",
"phi",
"eta",
"rd_",
"rs_",
"cbd_",
"cbs_",
1462 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS9,
1463 {
"vto",
"theta",
"gamma",
"phi",
"eta",
"rd_",
"rs_",
"cbd_",
"cbs_",
1468 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_B4SOI,
1469 {
"tox",
"toxp",
"toxm",
"dtoxcv",
"cdsc",
"cdscb",
"cdscd",
"cit",
1470 "nfactor",
"vsat" } );
1474 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_B4SOI,
1475 {
"tox",
"toxp",
"toxm",
"dtoxcv",
"cdsc",
"cdscb",
"cdscd",
"cit",
1476 "nfactor",
"vsat" } );
1480 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_BSIM4,
1481 {
"rbps0",
"rbpsl",
"rbpsw",
"rbpsnf",
"rbpd0",
"rbpdl",
"rbpdw",
"rbpdnf",
1482 "rbpbx0",
"rbpbxl" } );
1486 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_BSIM4,
1487 {
"rbps0",
"rbpsl",
"rbpsw",
"rbpsnf",
"rbpd0",
"rbpdl",
"rbpdw",
"rbpdnf",
1488 "rbpbx0",
"rbpbxl" } );
1492 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_B3SOIFD,
1493 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1498 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_B3SOIFD,
1499 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1504 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_B3SOIDD,
1505 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1510 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_B3SOIDD,
1511 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1516 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_B3SOIPD,
1517 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1522 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_B3SOIPD,
1523 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1528 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_HISIM2,
1529 {
"depmue0",
"depmue0l",
"depmue0lp",
"depmue1",
"depmue1l",
1530 "depmue1lp",
"depmueback0",
"depmueback0l",
"depmueback0lp",
1535 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_HISIM2,
1536 {
"depmue0",
"depmue0l",
"depmue0lp",
"depmue1",
"depmue1l",
"depmue1lp",
1537 "depmueback0",
"depmueback0l",
"depmueback0lp",
"depmueback1" } );
1541 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_HISIMHV1,
1542 {
"prd",
"prd22",
"prd23",
"prd24",
"prdict1",
"prdov13",
"prdslp1",
1543 "prdvb",
"prdvd",
"prdvg11" } );
1547 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_HISIMHV1,
1548 {
"prd",
"prd22",
"prd23",
"prd24",
"prdict1",
"prdov13",
"prdslp1",
1549 "prdvb",
"prdvd",
"prdvg11" } );
1553 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_HISIMHV2,
1554 {
"pjs0d",
"pjs0swd",
"pnjd",
"pcisbkd",
"pvdiffjd",
"pjs0s",
"pjs0sws",
1555 "prs",
"prth0",
"pvover" } );
1559 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_HISIMHV2,
1560 {
"pjs0d",
"pjs0swd",
"pnjd",
"pcisbkd",
"pvdiffjd",
"pjs0s",
"pjs0sws",
1561 "prs",
"prth0",
"pvover" } );
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
A singleton reporter that reports to nowhere.
virtual const PARAM & GetParam(unsigned aParamIndex) const
int GetParamCount() const
DEVICE_INFO GetDeviceInfo() const
const PARAM * FindParam(const std::string &aParamName) const
const PARAM & GetParamOverride(unsigned aParamIndex) const
SPICE_INFO GetSpiceInfo() const
void LoadLibrary(const std::string &aBaseName)
void TestTransistor(const SIM_MODEL &aModel, const std::string &aModelName, int aModelIndex, SIM_MODEL::TYPE aType, const std::vector< std::string > &aParamNames)
std::string GetLibraryPath(const std::string &aBaseName)
void CompareToUsualDiodeModel(const SIM_MODEL &aModel, const std::string &aModelName, int aModelIndex)
std::unique_ptr< SIM_LIBRARY_SPICE > m_library
void CompareToEmptyModel(const SIM_MODEL &aModel, const std::string &aModelName, int aModelIndex)
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(Subckts)