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 );
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 )
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 )
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 );
179 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
180 BOOST_CHECK_EQUAL( modelName,
"NO_PARAMS_0" );
184 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
185 BOOST_CHECK_EQUAL( modelName,
"ONE_PARAM_1" );
186 BOOST_REQUIRE_EQUAL( model.GetParamCount(), 1 );
187 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name,
"PARAM1" );
188 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue,
"1" );
189 BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 );
190 BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName,
"1" );
191 BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName,
"2" );
195 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
196 BOOST_CHECK_EQUAL( modelName,
"ONE_PARAM_SHORT_FORM_2" );
197 BOOST_REQUIRE_EQUAL( model.GetParamCount(), 1 );
198 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name,
"PARAM1" );
199 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue,
"1.0" );
200 BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName,
"1" );
201 BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName,
"2" );
205 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
206 BOOST_CHECK_EQUAL( modelName,
"two_params_3" );
207 BOOST_REQUIRE_EQUAL( model.GetParamCount(), 2 );
208 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name,
"param1" );
209 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue,
"1.1e+1" );
210 BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.name,
"param2" );
211 BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.defaultValue,
"2.2e+2" );
212 BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 );
213 BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName,
"1" );
214 BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName,
"2" );
218 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
219 BOOST_CHECK_EQUAL( modelName,
"two_params_short_form_4" );
220 BOOST_REQUIRE_EQUAL( model.GetParamCount(), 2 );
221 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.name,
"param1" );
222 BOOST_CHECK_EQUAL( model.GetParam( 0 ).info.defaultValue,
"1.1E+1" );
223 BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.name,
"param2" );
224 BOOST_CHECK_EQUAL( model.GetParam( 1 ).info.defaultValue,
"2.2E+2" );
225 BOOST_REQUIRE_EQUAL( model.GetPinCount(), 2 );
226 BOOST_CHECK_EQUAL( model.GetPin( 0 ).modelPinName,
"1" );
227 BOOST_CHECK_EQUAL( model.GetPin( 1 ).modelPinName,
"2" );
231 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
232 BOOST_CHECK_EQUAL( modelName,
"NOTHING_5" );
233 BOOST_CHECK_EQUAL( model.GetParamCount(), 0 );
234 BOOST_CHECK_EQUAL( model.GetPinCount(), 0 );
238 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::SUBCKT );
239 BOOST_CHECK_EQUAL( modelName,
"Numparam_inside_6" );
240 BOOST_CHECK_EQUAL( model.GetParamCount(), 0 );
241 BOOST_CHECK_EQUAL( model.GetPinCount(), 2 );
252 LoadLibrary(
"diodes" );
254 const std::vector<SIM_LIBRARY::MODEL> models = m_library->GetModels();
256 BOOST_CHECK_EQUAL( models.size(), 26 );
258 for(
int i = 0; i < models.size(); ++i )
260 const auto& [modelName, model] = models.at( i );
265 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
266 BOOST_CHECK_EQUAL( modelName,
"1N4148" );
267 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"100" );
268 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"4p" );
269 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"100u" );
270 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"4n" );
271 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
"0.33" );
272 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"2" );
273 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"0.5" );
274 BOOST_CHECK_EQUAL( model.FindParam(
"tt" )->value,
"10n" );
275 BOOST_CHECK_EQUAL( model.FindParam(
"vj" )->value,
"0.8" );
279 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
280 BOOST_CHECK_EQUAL( modelName,
"D1" );
281 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"1.23n" );
282 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"1.23" );
283 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
".7890" );
284 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"12.34m" );
285 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"3" );
286 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"1.23" );
287 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"0.9p" );
288 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
".56" );
289 BOOST_CHECK_EQUAL( model.FindParam(
"vj" )->value,
".78" );
290 BOOST_CHECK_EQUAL( model.FindParam(
"fc" )->value,
".9" );
291 BOOST_CHECK_EQUAL( model.FindParam(
"isr" )->value,
"12.34n" );
292 BOOST_CHECK_EQUAL( model.FindParam(
"nr" )->value,
"2.345" );
293 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"100" );
294 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"100u" );
295 BOOST_CHECK_EQUAL( model.FindParam(
"tt" )->value,
"12.34n" );
300 CompareToUsualDiodeModel( model, modelName, i );
304 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
305 BOOST_CHECK_EQUAL( modelName,
"D4" );
306 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"0.1p" );
307 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"2" );
308 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"3p" );
309 BOOST_CHECK_EQUAL( model.FindParam(
"tt" )->value,
"45n" );
310 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"678" );
311 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"0.1p" );
319 CompareToEmptyModel( model, modelName, i );
330 CompareToUsualDiodeModel( model, modelName, i );
334 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
335 BOOST_CHECK_EQUAL( modelName,
"D<>/?:\\|[]!@#$%^&-_18" );
336 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"-1.1" );
337 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
"2.2" );
338 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"-3.3m" );
339 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"44k" );
340 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"55u" );
341 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"6.6M" );
347 CompareToUsualDiodeModel( model, modelName, i );
351 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
352 BOOST_CHECK_EQUAL( modelName,
"D22" );
353 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"11.1n" );
354 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"2.2" );
355 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"33.3m" );
356 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"99.9" );
357 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"3" );
358 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"1.1" );
362 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
363 BOOST_CHECK_EQUAL( modelName,
"D23" );
364 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"11.1n" );
365 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"2.2" );
366 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"33.3m" );
367 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"111.1" );
368 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"3" );
369 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"2.2" );
370 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
".3" );
374 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
375 BOOST_CHECK_EQUAL( modelName,
"D24" );
376 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"11.1n" );
377 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"1.1" );
378 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"33.3m" );
379 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"99.9" );
380 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"3" );
381 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"1.1" );
385 BOOST_CHECK( model.GetType() == SIM_MODEL::TYPE::D );
386 BOOST_CHECK_EQUAL( modelName,
"D25" );
388 BOOST_CHECK_EQUAL( model.FindParam(
"is" )->value,
"0M" );
390 BOOST_CHECK_EQUAL( model.FindParam(
"jsw" )->value,
"1000.01M" );
391 BOOST_CHECK_EQUAL( model.FindParam(
"tnom" )->value,
"2000.02M" );
393 BOOST_CHECK_EQUAL( model.FindParam(
"rs" )->value,
"3000.03M" );
394 BOOST_CHECK_EQUAL( model.FindParam(
"trs" )->value,
"4000.04M" );
396 BOOST_CHECK_EQUAL( model.FindParam(
"trs2" )->value,
"5000.05M" );
397 BOOST_CHECK_EQUAL( model.FindParam(
"n" )->value,
"6000.06M" );
398 BOOST_CHECK_EQUAL( model.FindParam(
"ns" )->value,
"7000.07M" );
399 BOOST_CHECK_EQUAL( model.FindParam(
"tt" )->value,
"8000.08M" );
400 BOOST_CHECK_EQUAL( model.FindParam(
"ttt1" )->value,
"9000.09M" );
401 BOOST_CHECK_EQUAL( model.FindParam(
"ttt2" )->value,
"0M" );
402 BOOST_CHECK_EQUAL( model.FindParam(
"cjo" )->value,
"1000.01M" );
405 BOOST_CHECK_EQUAL( model.FindParam(
"vj" )->value,
"2000.02M" );
407 BOOST_CHECK_EQUAL( model.FindParam(
"m_" )->value,
"3000.03M" );
409 BOOST_CHECK_EQUAL( model.FindParam(
"tm1" )->value,
"4000.04M" );
410 BOOST_CHECK_EQUAL( model.FindParam(
"tm2" )->value,
"5000.05M" );
411 BOOST_CHECK_EQUAL( model.FindParam(
"cjp" )->value,
"6000.06M" );
413 BOOST_CHECK_EQUAL( model.FindParam(
"php" )->value,
"7000.07M" );
414 BOOST_CHECK_EQUAL( model.FindParam(
"mjsw" )->value,
"8000.08M" );
415 BOOST_CHECK_EQUAL( model.FindParam(
"ikf" )->value,
"9000.09M" );
417 BOOST_CHECK_EQUAL( model.FindParam(
"ikr" )->value,
"0M" );
418 BOOST_CHECK_EQUAL( model.FindParam(
"nbv" )->value,
"1000.01M" );
419 BOOST_CHECK_EQUAL( model.FindParam(
"area_" )->value,
"2000.02M" );
420 BOOST_CHECK_EQUAL( model.FindParam(
"pj_" )->value,
"3000.03M" );
421 BOOST_CHECK_EQUAL( model.FindParam(
"tlev" )->value,
"4" );
422 BOOST_CHECK_EQUAL( model.FindParam(
"tlevc" )->value,
"5" );
423 BOOST_CHECK_EQUAL( model.FindParam(
"eg" )->value,
"6000.06M" );
424 BOOST_CHECK_EQUAL( model.FindParam(
"xti" )->value,
"7000.07M" );
425 BOOST_CHECK_EQUAL( model.FindParam(
"cta" )->value,
"8000.08M" );
427 BOOST_CHECK_EQUAL( model.FindParam(
"ctp" )->value,
"9000.09M" );
428 BOOST_CHECK_EQUAL( model.FindParam(
"tpb" )->value,
"0M" );
430 BOOST_CHECK_EQUAL( model.FindParam(
"tphp" )->value,
"1000.01M" );
431 BOOST_CHECK_EQUAL( model.FindParam(
"jtun" )->value,
"2000.02M" );
432 BOOST_CHECK_EQUAL( model.FindParam(
"jtunsw" )->value,
"3000.03M" );
433 BOOST_CHECK_EQUAL( model.FindParam(
"ntun" )->value,
"4000.04M" );
434 BOOST_CHECK_EQUAL( model.FindParam(
"xtitun" )->value,
"5000.05M" );
435 BOOST_CHECK_EQUAL( model.FindParam(
"keg" )->value,
"6000.06M" );
436 BOOST_CHECK_EQUAL( model.FindParam(
"kf" )->value,
"7000.07M" );
437 BOOST_CHECK_EQUAL( model.FindParam(
"af" )->value,
"8000.08M" );
438 BOOST_CHECK_EQUAL( model.FindParam(
"fc" )->value,
"9000.09M" );
439 BOOST_CHECK_EQUAL( model.FindParam(
"fcs" )->value,
"0M" );
440 BOOST_CHECK_EQUAL( model.FindParam(
"bv" )->value,
"1000.01M" );
441 BOOST_CHECK_EQUAL( model.FindParam(
"ibv" )->value,
"2000.02M" );
443 BOOST_CHECK_EQUAL( model.FindParam(
"tcv" )->value,
"3000.03M" );
444 BOOST_CHECK_EQUAL( model.FindParam(
"cond" )->value,
"4000.04M" );
445 BOOST_CHECK_EQUAL( model.FindParam(
"isr" )->value,
"5000.05M" );
446 BOOST_CHECK_EQUAL( model.FindParam(
"nr" )->value,
"6000.06M" );
447 BOOST_CHECK_EQUAL( model.FindParam(
"fv_max" )->value,
"7000.07M" );
448 BOOST_CHECK_EQUAL( model.FindParam(
"bv_max" )->value,
"8000.08M" );
449 BOOST_CHECK_EQUAL( model.FindParam(
"id_max" )->value,
"9000.09M" );
450 BOOST_CHECK_EQUAL( model.FindParam(
"te_max" )->value,
"0M" );
451 BOOST_CHECK_EQUAL( model.FindParam(
"pd_max" )->value,
"1000.01M" );
452 BOOST_CHECK_EQUAL( model.FindParam(
"rth0" )->value,
"2000.02M" );
453 BOOST_CHECK_EQUAL( model.FindParam(
"cth0" )->value,
"3000.03M" );
454 BOOST_CHECK_EQUAL( model.FindParam(
"lm_" )->value,
"4000.04M" );
455 BOOST_CHECK_EQUAL( model.FindParam(
"lp_" )->value,
"5000.05M" );
456 BOOST_CHECK_EQUAL( model.FindParam(
"wm_" )->value,
"6000.06M" );
457 BOOST_CHECK_EQUAL( model.FindParam(
"wp_" )->value,
"7000.07M" );
458 BOOST_CHECK_EQUAL( model.FindParam(
"xom" )->value,
"8000.08M" );
459 BOOST_CHECK_EQUAL( model.FindParam(
"xoi" )->value,
"9000.09M" );
460 BOOST_CHECK_EQUAL( model.FindParam(
"xm" )->value,
"0M" );
461 BOOST_CHECK_EQUAL( model.FindParam(
"xp" )->value,
"1000.01M" );
466 BOOST_FAIL(
"Unknown parameter index" );
477 LoadLibrary(
"bjts" );
479 const std::vector<SIM_LIBRARY::MODEL> models = m_library->GetModels();
481 BOOST_CHECK_EQUAL( models.size(), 8 );
483 for(
int i = 0; i < models.size(); ++i )
485 const auto& [modelName, model] = models.at( i );
491 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_VBIC,
609 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_VBIC,
727 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON,
771 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_GUMMELPOON,
815 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_HICUM2,
964 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PNP_HICUM2,
1115 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NPN_GUMMELPOON,
1116 {
"is_",
"nf",
"ise",
"ne",
"bf",
"ikf",
"vaf",
"nr",
"isc",
"nc" } );
1127 LoadLibrary(
"fets" );
1129 const std::vector<SIM_LIBRARY::MODEL> models = m_library->GetModels();
1131 BOOST_CHECK_EQUAL( models.size(), 46 );
1133 for(
int i = 0; i < models.size(); ++i )
1135 const auto& [modelName, model] = models.at( i );
1142 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NJFET_SHICHMANHODGES,
1143 {
"vt0",
"beta",
"lambda",
"rd",
"rs",
"cgs",
"cgd",
"pb",
"is_",
1148 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PJFET_SHICHMANHODGES,
1149 {
"vt0",
"beta",
"lambda",
"rd",
"rs",
"cgs",
"cgd",
"pb",
"is_",
1154 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NJFET_PARKERSKELLERN,
1155 {
"vbi",
"af",
"beta",
"cds",
"cgd",
"cgs",
"delta",
"hfeta",
"mvst",
1160 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PJFET_PARKERSKELLERN,
1161 {
"vbi",
"af",
"beta",
"cds",
"cgd",
"cgs",
"delta",
"hfeta",
"mvst",
1166 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_STATZ,
1167 {
"vt0",
"alpha",
"beta",
"lambda",
"b",
"rd",
"rs",
"cgs",
"cgd_",
1172 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_STATZ,
1173 {
"vt0",
"alpha",
"beta",
"lambda",
"b",
"rd",
"rs",
"cgs",
"cgd_",
1178 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_YTTERDAL,
1179 {
"vto",
"lambda",
"lambdahf",
"beta",
"vs",
"rd",
"rs",
"rg",
"ri",
1184 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_YTTERDAL,
1185 {
"vto",
"lambda",
"lambdahf",
"beta",
"vs",
"rd",
"rs",
"rg",
"ri",
1190 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_HFET1,
1191 {
"vt0",
"lambda",
"rd",
"rs",
"rg",
"rdi",
"rsi",
"rgs",
"rgd",
1196 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_HFET1,
1197 {
"vt0",
"lambda",
"rd",
"rs",
"rg",
"rdi",
"rsi",
"rgs",
"rgd",
1202 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMES_HFET2,
1203 {
"vs",
"ggr",
"js",
"del",
"delta",
"deltad",
"di",
"epsi",
"eta",
1208 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMES_HFET2,
1209 {
"vs",
"ggr",
"js",
"del",
"delta",
"deltad",
"di",
"epsi",
"eta",
1214 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_VDMOS,
1289 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_VDMOS,
1364 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS1,
1365 {
"vto",
"kp",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1370 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS1,
1371 {
"vto",
"kp",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1376 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS2,
1377 {
"vto",
"kp",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1382 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS2,
1383 {
"vto",
"kp",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1388 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS3,
1389 {
"vto",
"theta",
"gamma",
"phi",
"eta",
"rd_",
"rs_",
"cbd_",
"cbs_",
1394 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS3,
1395 {
"vto",
"theta",
"gamma",
"phi",
"eta",
"rd_",
"rs_",
"cbd_",
"cbs_",
1400 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_BSIM1,
1401 {
"vfb",
"lvfb",
"wvfb",
"phi",
"lphi",
"wphi",
"k1",
"lk1",
"wk1",
1406 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_BSIM1,
1407 {
"vfb",
"lvfb",
"wvfb",
"phi",
"lphi",
"wphi",
"k1",
"lk1",
"wk1",
1412 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_BSIM2,
1413 {
"bib",
"lbib",
"wbib",
"vghigh",
"lvghigh",
"wvghigh",
1414 "waib",
"bi0",
"lbi0",
"wbi0" } );
1418 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_BSIM2,
1419 {
"bib",
"lbib",
"wbib",
"vghigh",
"lvghigh",
"wvghigh",
1420 "waib",
"bi0",
"lbi0",
"wbi0" } );
1424 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS6,
1425 {
"vto",
"nvth",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1430 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS6,
1431 {
"vto",
"nvth",
"gamma",
"phi",
"lambda",
"rd_",
"rs_",
"cbd_",
"cbs_",
1436 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_BSIM3,
1437 {
"tox",
"toxm",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"xj",
1442 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_BSIM3,
1443 {
"tox",
"toxm",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"xj",
1448 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_MOS9,
1449 {
"vto",
"theta",
"gamma",
"phi",
"eta",
"rd_",
"rs_",
"cbd_",
"cbs_",
1454 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_MOS9,
1455 {
"vto",
"theta",
"gamma",
"phi",
"eta",
"rd_",
"rs_",
"cbd_",
"cbs_",
1460 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_B4SOI,
1461 {
"tox",
"toxp",
"toxm",
"dtoxcv",
"cdsc",
"cdscb",
"cdscd",
"cit",
1462 "nfactor",
"vsat" } );
1466 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_B4SOI,
1467 {
"tox",
"toxp",
"toxm",
"dtoxcv",
"cdsc",
"cdscb",
"cdscd",
"cit",
1468 "nfactor",
"vsat" } );
1472 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_BSIM4,
1473 {
"rbps0",
"rbpsl",
"rbpsw",
"rbpsnf",
"rbpd0",
"rbpdl",
"rbpdw",
"rbpdnf",
1474 "rbpbx0",
"rbpbxl" } );
1478 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_BSIM4,
1479 {
"rbps0",
"rbpsl",
"rbpsw",
"rbpsnf",
"rbpd0",
"rbpdl",
"rbpdw",
"rbpdnf",
1480 "rbpbx0",
"rbpbxl" } );
1484 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_B3SOIFD,
1485 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1490 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_B3SOIFD,
1491 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1496 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_B3SOIDD,
1497 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1502 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_B3SOIDD,
1503 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1508 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_B3SOIPD,
1509 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1514 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_B3SOIPD,
1515 {
"tox",
"cdsc",
"cdscb",
"cdscd",
"cit",
"nfactor",
"vsat",
"at",
"a0",
1520 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_HISIM2,
1521 {
"depmue0",
"depmue0l",
"depmue0lp",
"depmue1",
"depmue1l",
1522 "depmue1lp",
"depmueback0",
"depmueback0l",
"depmueback0lp",
1527 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_HISIM2,
1528 {
"depmue0",
"depmue0l",
"depmue0lp",
"depmue1",
"depmue1l",
"depmue1lp",
1529 "depmueback0",
"depmueback0l",
"depmueback0lp",
"depmueback1" } );
1533 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_HISIMHV1,
1534 {
"prd",
"prd22",
"prd23",
"prd24",
"prdict1",
"prdov13",
"prdslp1",
1535 "prdvb",
"prdvd",
"prdvg11" } );
1539 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_HISIMHV1,
1540 {
"prd",
"prd22",
"prd23",
"prd24",
"prdict1",
"prdov13",
"prdslp1",
1541 "prdvb",
"prdvd",
"prdvg11" } );
1545 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::NMOS_HISIMHV2,
1546 {
"pjs0d",
"pjs0swd",
"pnjd",
"pcisbkd",
"pvdiffjd",
"pjs0s",
"pjs0sws",
1547 "prs",
"prth0",
"pvover" } );
1551 TestTransistor( model, modelName, i, SIM_MODEL::TYPE::PMOS_HISIMHV2,
1552 {
"pjs0d",
"pjs0swd",
"pnjd",
"pcisbkd",
"pvdiffjd",
"pjs0s",
"pjs0sws",
1553 "prs",
"prth0",
"pvover" } );
1560BOOST_AUTO_TEST_SUITE_END()
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_CHECK(box.ClosestPointTo(VECTOR2D(0, 0))==VECTOR2D(1, 2))
Test suite for KiCad math code.
BOOST_AUTO_TEST_CASE(Subckts)