KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sim_model_source.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2022 Mikolaj Wielgus
5 * Copyright (C) 2022-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 3
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * https://www.gnu.org/licenses/gpl-3.0.html
20 * or you may search the http://www.gnu.org website for the version 3 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
26
27#include <fmt/core.h>
28#include <pegtl.hpp>
29#include <pegtl/contrib/parse_tree.hpp>
30
31
33{
34 using namespace SIM_MODEL_SOURCE_GRAMMAR;
35
36 template <typename Rule> struct pwlValuesSelector : std::false_type {};
37 template <> struct pwlValuesSelector<number<SIM_VALUE::TYPE_FLOAT, NOTATION::SI>>
38 : std::true_type {};
39}
40
41
42std::string SPICE_GENERATOR_SOURCE::ModelLine( const SPICE_ITEM& aItem ) const
43{
44 return "";
45}
46
47
48std::string SPICE_GENERATOR_SOURCE::ItemLine( const SPICE_ITEM& aItem ) const
49{
50 SPICE_ITEM item = aItem;
51
52 std::string ac = "";
53 std::string dc = "";
54
55 if( const SIM_MODEL::PARAM* ac_param = m_model.FindParam( "ac" ) )
56 ac = SIM_VALUE::ToSpice( ac_param->value );
57 if( const SIM_MODEL::PARAM* dc_param = m_model.FindParam( "dc" ) )
58 dc = SIM_VALUE::ToSpice( dc_param->value );
59
60 bool emptyLine = true;
61 item.modelName = "";
62
63 // @FIXME
64 // the keyword "DC" refers to both offset of a sine source, and value for DC analysis
65 // Because of this, both values are always equal in a sine source.
66 //
67 // suggestion: rename the sine parameter from "DC" to "offset"
68
69 if( dc != "" )
70 {
71 emptyLine = false;
72 item.modelName += fmt::format( "DC {} ", dc );
73 }
74
76 && m_model.GetType() != SIM_MODEL::TYPE::V ) // DC-only sources are already processed
77 {
78 std::string args = "";
79
80 switch( m_model.GetType() )
81 {
82 case SIM_MODEL::TYPE::V_PWL:
83 case SIM_MODEL::TYPE::I_PWL:
84 {
85 tao::pegtl::string_input<> in( m_model.GetParam( 0 ).value, "from_content" );
86 std::unique_ptr<tao::pegtl::parse_tree::node> root;
87
88 try
89 {
90 root = tao::pegtl::parse_tree::parse<SIM_MODEL_SOURCE_PARSER::pwlValuesGrammar,
92 ( in );
93 }
94 catch( const tao::pegtl::parse_error& )
95 {
96 break;
97 }
98
99 if( root )
100 {
101 for( const auto& node : root->children )
102 {
104 SIM_VALUE::NOTATION::SI>>() )
105 {
106 args.append( SIM_VALUE::ToSpice( node->string() ) + " " );
107 }
108 }
109 }
110
111 break;
112 }
113
114 // TODO: dt should be tstep by default.
115
116 case SIM_MODEL::TYPE::V_WHITENOISE:
117 case SIM_MODEL::TYPE::I_WHITENOISE:
118 args.append( getParamValueString( "rms", "0" ) + " " );
119 args.append( getParamValueString( "dt", "0" ) + " " );
120 args.append( "0 0 0 0 0 " );
121 break;
122
123 case SIM_MODEL::TYPE::V_PINKNOISE:
124 case SIM_MODEL::TYPE::I_PINKNOISE:
125 args.append( "0 " );
126 args.append( getParamValueString( "dt", "0" ) + " " );
127 args.append( getParamValueString( "slope", "0" ) + " " );
128 args.append( getParamValueString( "rms", "0" ) + " " );
129 args.append( "0 0 0 " );
130 break;
131
132 case SIM_MODEL::TYPE::V_BURSTNOISE:
133 case SIM_MODEL::TYPE::I_BURSTNOISE:
134 args.append( "0 0 0 0 " );
135 args.append( getParamValueString( "ampl", "0" ) + " " );
136 args.append( getParamValueString( "tcapt", "0" ) + " " );
137 args.append( getParamValueString( "temit", "0" ) + " " );
138 break;
139
140 case SIM_MODEL::TYPE::V_RANDUNIFORM:
141 case SIM_MODEL::TYPE::I_RANDUNIFORM:
142 {
143 /* TODO
144 args.append( "1 " );
145 args.append( getParamValueString( "dt", "0" ) + " " );
146 args.append( getParamValueString( "td", "0" ) + " " );
147
148 SIM_VALUE_FLOAT min = dynamic_cast<SIM_VALUE_FLOAT&>( m_model.FindParam( "max" )->value );
149
150 if( !min.ToString().empty() )
151 min.FromString( "0" );
152
153 SIM_VALUE_FLOAT max = dynamic_cast<SIM_VALUE_FLOAT&>( m_model.FindParam( "min" )->value );
154
155 if( !max.ToString().empty() )
156 max.FromString( "0" );
157
158 SIM_VALUE_FLOAT range = max - min;
159 SIM_VALUE_FLOAT offset = ( max + min ) / SIM_VALUE_FLOAT( 2 );
160
161 args.append( range.ToSpiceString() + " " );
162 args.append( offset.ToSpiceString() + " " );
163 */
164 break;
165 }
166
167 case SIM_MODEL::TYPE::V_RANDNORMAL:
168 case SIM_MODEL::TYPE::I_RANDNORMAL:
169 args.append( "2 " );
170 args.append( getParamValueString( "dt", "0" ) + " " );
171 args.append( getParamValueString( "td", "0" ) + " " );
172 args.append( getParamValueString( "stddev", "0" ) + " " );
173 args.append( getParamValueString( "mean", "0" ) + " " );
174 break;
175
176 case SIM_MODEL::TYPE::V_RANDEXP:
177 case SIM_MODEL::TYPE::I_RANDEXP:
178 args.append( "3 " );
179 args.append( getParamValueString( "dt", "0" ) + " " );
180 args.append( getParamValueString( "td", "0" ) + " " );
181 args.append( getParamValueString( "mean", "0" ) + " " );
182 args.append( getParamValueString( "offset", "0" ) + " " );
183 break;
184
185 /*
186 case SIM_MODEL::TYPE::V_RANDPOISSON:
187 case SIM_MODEL::TYPE::I_RANDPOISSON:
188 args.append( "4 " );
189 args.append( getParamValueString( "dt", "0" ) + " " );
190 args.append( getParamValueString( "td", "0" ) + " " );
191 args.append( getParamValueString( "lambda", "0" ) + " " );
192 args.append( getParamValueString( "offset", "0" ) + " " );
193 break;
194 */
195
196 default:
197 for( const SIM_MODEL::PARAM& param : m_model.GetParams() )
198 {
199 std::string argStr = SIM_VALUE::ToSpice( param.value );
200
201 if( argStr != "" )
202 args.append( argStr + " " );
203 }
204
205 break;
206 }
207
208 emptyLine = false;
209 item.modelName += fmt::format( "{}( {}) ", m_model.GetSpiceInfo().inlineTypeString, args );
210 }
211 else
212 {
213 switch( m_model.GetType() )
214 case SIM_MODEL::TYPE::V_VCL:
215 case SIM_MODEL::TYPE::I_VCL:
216 {
217 item.modelName += fmt::format( "{} ", getParamValueString( "gain", "1.0" ) );
218 emptyLine = false;
219
220 if( const SIM_MODEL::PARAM* ic = m_model.FindParam( "ic" ) )
221 item.modelName += fmt::format( "ic={}", SIM_VALUE::ToSpice( ic->value ) );
222
223 break;
224
225 case SIM_MODEL::TYPE::V_CCL:
226 case SIM_MODEL::TYPE::I_CCL:
227 item.modelName += fmt::format( "{} {} ",
228 getParamValueString( "control", "V?" ),
229 getParamValueString( "gain", "1.0" ) );
230 emptyLine = false;
231 break;
232
233 default:
234 break;
235 }
236 }
237
238 if( ac != "" )
239 {
240 std::string ph = "";
241
242 if( const SIM_MODEL::PARAM* ph_param = m_model.FindParam( "ph" ) )
243 ph = SIM_VALUE::ToSpice( ph_param->value );
244
245 emptyLine = false;
246 item.modelName += fmt::format( "AC {} {}", ac, ph );
247 }
248
249 if( emptyLine )
250 {
252 }
253
254 return SPICE_GENERATOR::ItemLine( item );
255}
256
257
258std::string SPICE_GENERATOR_SOURCE::getParamValueString( const std::string& aParamName,
259 const std::string& aDefaultValue ) const
260{
261 std::string result = "";
262
263 if ( m_model.FindParam( aParamName ) )
264 result = SIM_VALUE::ToSpice( m_model.FindParam( aParamName )->value );
265
266 if( result == "" )
267 result = aDefaultValue;
268
269 return result;
270}
271
272
274 SIM_MODEL( aType, std::make_unique<SPICE_GENERATOR_SOURCE>( *this ),
275 std::make_unique<SIM_MODEL_SOURCE_SERIALIZER>( *this ) )
276{
277 for( const SIM_MODEL::PARAM::INFO& paramInfo : makeParamInfos( aType ) )
278 AddParam( paramInfo );
279}
280
281
282void SIM_MODEL_SOURCE::doSetParamValue( int aParamIndex, const std::string& aValue )
283{
284 // Sources are special. All preceding parameter values must be filled. If they are not, fill
285 // them out automatically. If a value is nulled, delete everything after it.
286 if( aValue.empty() )
287 {
288 for( int paramIndex = static_cast<int>( aParamIndex );
289 paramIndex < GetParamCount();
290 ++paramIndex )
291 {
292 m_params.at( aParamIndex ).value = "";
293 }
294 }
295 else
296 {
297 for( int paramIndex = 0; paramIndex < aParamIndex; ++paramIndex )
298 {
299 if( GetParam( paramIndex ).value == "" )
300 {
301 m_params.at( aParamIndex ).value = "0";
302 SIM_MODEL::SetParamValue( paramIndex, "0" );
303 }
304 }
305 }
306
307 return SIM_MODEL::doSetParamValue( aParamIndex, aValue );
308}
309
310
311const std::vector<SIM_MODEL::PARAM::INFO>& SIM_MODEL_SOURCE::makeParamInfos( TYPE aType )
312{
313 static std::vector<PARAM::INFO> vdc = makeDcParamInfos( "y", "V" );
314 static std::vector<PARAM::INFO> idc = makeDcParamInfos( "y", "A" );
315
316 static std::vector<PARAM::INFO> vsin = makeSinParamInfos( "y", "V" );
317 static std::vector<PARAM::INFO> isin = makeSinParamInfos( "y", "A" );
318
319 static std::vector<PARAM::INFO> vpulse = makePulseParamInfos( "y", "V" );
320 static std::vector<PARAM::INFO> ipulse = makePulseParamInfos( "y", "A" );
321
322 static std::vector<PARAM::INFO> vexp = makeExpParamInfos( "y", "V" );
323 static std::vector<PARAM::INFO> iexp = makeExpParamInfos( "y", "A" );
324
325 /*static std::vector<PARAM::INFO> vsfam = makeSfamParamInfos( "y", "V" );
326 static std::vector<PARAM::INFO> isfam = makeSfamParamInfos( "y", "A" );
327
328 static std::vector<PARAM::INFO> vsffm = makeSffmParamInfos( "y", "V" );
329 static std::vector<PARAM::INFO> isffm = makeSffmParamInfos( "y", "A" );*/
330
331 static std::vector<PARAM::INFO> vcvs = makeVcParamInfos( "" );
332 static std::vector<PARAM::INFO> ccvs = makeCcParamInfos( "ohm" );
333 static std::vector<PARAM::INFO> vpwl = makePwlParamInfos( "y", "Voltage", "V" );
334
335 static std::vector<PARAM::INFO> vccs = makeVcParamInfos( "S" );
336 static std::vector<PARAM::INFO> cccs = makeCcParamInfos( "" );
337 static std::vector<PARAM::INFO> ipwl = makePwlParamInfos( "y", "Current", "A" );
338
339 static std::vector<PARAM::INFO> vwhitenoise = makeWhiteNoiseParamInfos( "y", "V" );
340 static std::vector<PARAM::INFO> iwhitenoise = makeWhiteNoiseParamInfos( "y", "A" );
341
342 static std::vector<PARAM::INFO> vpinknoise = makePinkNoiseParamInfos( "y", "V" );
343 static std::vector<PARAM::INFO> ipinknoise = makePinkNoiseParamInfos( "y", "A" );
344
345 static std::vector<PARAM::INFO> vburstnoise = makeBurstNoiseParamInfos( "y", "V" );
346 static std::vector<PARAM::INFO> iburstnoise = makeBurstNoiseParamInfos( "y", "A" );
347
348 static std::vector<PARAM::INFO> vrandomuniform = makeRandomUniformParamInfos( "y", "V" );
349 static std::vector<PARAM::INFO> irandomuniform = makeRandomUniformParamInfos( "y", "A" );
350
351 static std::vector<PARAM::INFO> vrandomnormal = makeRandomNormalParamInfos( "y", "V" );
352 static std::vector<PARAM::INFO> irandomnormal = makeRandomNormalParamInfos( "y", "A" );
353
354 static std::vector<PARAM::INFO> vrandomexp = makeRandomExpParamInfos( "y", "V" );
355 static std::vector<PARAM::INFO> irandomexp = makeRandomExpParamInfos( "y", "A" );
356
357 static std::vector<PARAM::INFO> vrandompoisson = makeRandomPoissonParamInfos( "y", "V" );
358 static std::vector<PARAM::INFO> irandompoisson = makeRandomPoissonParamInfos( "y", "A" );
359
360 switch( aType )
361 {
362 case TYPE::V: return vdc;
363 case TYPE::I: return idc;
364 case TYPE::V_SIN: return vsin;
365 case TYPE::I_SIN: return isin;
366 case TYPE::V_PULSE: return vpulse;
367 case TYPE::I_PULSE: return ipulse;
368 case TYPE::V_EXP: return vexp;
369 case TYPE::I_EXP: return iexp;
370 //case TYPE::V_SFAM: return vsfam;
371 //case TYPE::I_SFAM: return isfam;
372 //case TYPE::V_SFFM: return vsffm;
373 //case TYPE::I_SFFM: return isffm;
374 case TYPE::V_VCL: return vcvs;
375 case TYPE::V_CCL: return ccvs;
376 case TYPE::V_PWL: return vpwl;
377 case TYPE::I_VCL: return vccs;
378 case TYPE::I_CCL: return cccs;
379 case TYPE::I_PWL: return ipwl;
380 case TYPE::V_WHITENOISE: return vwhitenoise;
381 case TYPE::I_WHITENOISE: return iwhitenoise;
382 case TYPE::V_PINKNOISE: return vpinknoise;
383 case TYPE::I_PINKNOISE: return ipinknoise;
384 case TYPE::V_BURSTNOISE: return vburstnoise;
385 case TYPE::I_BURSTNOISE: return iburstnoise;
386 case TYPE::V_RANDUNIFORM: return vrandomuniform;
387 case TYPE::I_RANDUNIFORM: return irandomuniform;
388 case TYPE::V_RANDNORMAL: return vrandomnormal;
389 case TYPE::I_RANDNORMAL: return irandomnormal;
390 case TYPE::V_RANDEXP: return vrandomexp;
391 case TYPE::I_RANDEXP: return irandomexp;
392 //case TYPE::V_RANDPOISSON: return vrandompoisson;
393 //case TYPE::I_RANDPOISSON: return irandompoisson;
394 default:
395 wxFAIL_MSG( "Unhandled SIM_MODEL type in SIM_MODEL_SOURCE" );
396 static std::vector<SIM_MODEL::PARAM::INFO> empty;
397 return empty;
398 }
399}
400
401
402std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeDcParamInfos( const std::string& aPrefix,
403 const std::string& aUnit )
404{
405 std::vector<PARAM::INFO> paramInfos;
406 PARAM::INFO paramInfo;
407
408 paramInfo.name = "dc";
409 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
410 paramInfo.unit = aUnit;
412 paramInfo.defaultValue = "0";
413 paramInfo.description = "DC value";
414 paramInfos.push_back( paramInfo );
415
416 appendAcParamInfos( paramInfos, aUnit );
417 return paramInfos;
418}
419
420
421std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeSinParamInfos( const std::string& aPrefix,
422 const std::string& aUnit )
423{
424 std::vector<PARAM::INFO> paramInfos;
425 PARAM::INFO paramInfo;
426
427 paramInfo.name = "dc";
428 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
429 paramInfo.unit = aUnit;
431 paramInfo.defaultValue = "";
432 paramInfo.description = "DC offset";
433 paramInfos.push_back( paramInfo );
434
435 paramInfo.name = "ampl";
436 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
437 paramInfo.unit = aUnit;
439 paramInfo.defaultValue = "";
440 paramInfo.description = "Amplitude";
441 paramInfos.push_back( paramInfo );
442
443 paramInfo.name = "f";
444 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
445 paramInfo.unit = "Hz";
447 paramInfo.defaultValue = "1/tstop";
448 paramInfo.description = "Frequency";
449 paramInfos.push_back( paramInfo );
450
451 paramInfo.name = "td";
452 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
453 paramInfo.unit = "s";
455 paramInfo.defaultValue = "0";
456 paramInfo.description = "Delay";
457 paramInfos.push_back( paramInfo );
458
459 paramInfo.name = "theta";
460 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
461 paramInfo.unit = "1/s";
463 paramInfo.defaultValue = "0";
464 paramInfo.description = "Damping factor";
465 paramInfos.push_back( paramInfo );
466
467 paramInfo.name = "phase";
468 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
469 paramInfo.unit = "°";
471 paramInfo.defaultValue = "0";
472 paramInfo.description = "Phase";
473 paramInfos.push_back( paramInfo );
474
475 appendAcParamInfos( paramInfos, aUnit );
476 return paramInfos;
477}
478
479
480std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makePulseParamInfos( const std::string& aPrefix,
481 const std::string& aUnit )
482{
483 std::vector<PARAM::INFO> paramInfos;
484 PARAM::INFO paramInfo;
485
486 paramInfo.name = aPrefix + "1";
487 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
488 paramInfo.unit = aUnit;
490 paramInfo.defaultValue = "";
491 paramInfo.description = "Initial value";
492 paramInfos.push_back( paramInfo );
493
494 paramInfo.name = aPrefix + "2";
495 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
496 paramInfo.unit = aUnit;
498 paramInfo.defaultValue = "";
499 paramInfo.description = "Pulsed value";
500 paramInfos.push_back( paramInfo );
501
502 paramInfo.name = "td";
503 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
504 paramInfo.unit = "s";
506 paramInfo.defaultValue = "0";
507 paramInfo.description = "Delay";
508 paramInfos.push_back( paramInfo );
509
510 paramInfo.name = "tr";
511 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
512 paramInfo.unit = "s";
514 paramInfo.defaultValue = "tstep";
515 paramInfo.description = "Rise time";
516 paramInfos.push_back( paramInfo );
517
518 paramInfo.name = "tf";
519 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
520 paramInfo.unit = "s";
522 paramInfo.defaultValue = "tstep";
523 paramInfo.description = "Fall time";
524 paramInfos.push_back( paramInfo );
525
526 paramInfo.name = "tw"; // Ngspice calls it "pw".
527 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
528 paramInfo.unit = "s";
530 paramInfo.defaultValue = "tstop";
531 paramInfo.description = "Pulse width";
532 paramInfos.push_back( paramInfo );
533
534 paramInfo.name = "per";
535 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
536 paramInfo.unit = "s";
538 paramInfo.defaultValue = "tstop";
539 paramInfo.description = "Period";
540 paramInfos.push_back( paramInfo );
541
542 paramInfo.name = "np";
543 paramInfo.type = SIM_VALUE::TYPE_INT;
544 paramInfo.unit = "";
546 paramInfo.defaultValue = "";
547 paramInfo.description = "Number of pulses";
548 paramInfos.push_back( paramInfo );
549
550 appendAcParamInfos( paramInfos, aUnit );
551 return paramInfos;
552}
553
554
555std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeExpParamInfos( const std::string& aPrefix,
556 const std::string& aUnit )
557{
558 std::vector<PARAM::INFO> paramInfos;
559 PARAM::INFO paramInfo;
560
561 paramInfo.name = aPrefix + "1";
562 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
563 paramInfo.unit = aUnit;
565 paramInfo.defaultValue = "";
566 paramInfo.description = "Initial value";
567 paramInfos.push_back( paramInfo );
568
569 paramInfo.name = aPrefix + "2";
570 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
571 paramInfo.unit = aUnit;
573 paramInfo.defaultValue = "";
574 paramInfo.description = "Pulsed value";
575 paramInfos.push_back( paramInfo );
576
577 paramInfo.name = "td1";
578 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
579 paramInfo.unit = "s";
581 paramInfo.defaultValue = "0";
582 paramInfo.description = "Rise delay time";
583 paramInfos.push_back( paramInfo );
584
585 paramInfo.name = "tau1";
586 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
587 paramInfo.unit = "s";
589 paramInfo.defaultValue = "tstep";
590 paramInfo.description = "Rise time constant";
591 paramInfos.push_back( paramInfo );
592
593 paramInfo.name = "td2";
594 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
595 paramInfo.unit = "s";
597 paramInfo.defaultValue = "td1+tstep";
598 paramInfo.description = "Fall delay time";
599 paramInfos.push_back( paramInfo );
600
601 paramInfo.name = "tau2";
602 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
603 paramInfo.unit = "s";
605 paramInfo.defaultValue = "tstep";
606 paramInfo.description = "Fall time constant";
607 paramInfos.push_back( paramInfo );
608
609 appendAcParamInfos( paramInfos, aUnit );
610 return paramInfos;
611}
612
613
614/*std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeSfamParamInfos( const std::string& aPrefix, const std::string& aUnit )
615{
616 std::vector<PARAM::INFO> paramInfos;
617 PARAM::INFO paramInfo;
618
619 paramInfo.name = "dc";
620 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
621 paramInfo.unit = aUnit;
622 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
623 paramInfo.defaultValue = "";
624 paramInfo.description = "DC offset";
625
626 paramInfo.name = "ampl";
627 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
628 paramInfo.unit = aUnit;
629 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
630 paramInfo.defaultValue = "";
631 paramInfo.description = "Amplitude";
632
633 paramInfos.push_back( paramInfo );
634 paramInfo.name = "mo";
635 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
636 paramInfo.unit = "";
637 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
638 paramInfo.defaultValue = "";
639 paramInfo.description = "Modulating signal offset";
640 paramInfos.push_back( paramInfo );
641
642 paramInfo.name = "fc";
643 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
644 paramInfo.unit = "Hz";
645 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
646 paramInfo.defaultValue = "";
647 paramInfo.description = "Carrier frequency";
648 paramInfos.push_back( paramInfo );
649
650 paramInfo.name = "mf";
651 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
652 paramInfo.unit = "Hz";
653 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
654 paramInfo.defaultValue = "";
655 paramInfo.description = "Modulating frequency";
656 paramInfos.push_back( paramInfo );
657
658 appendAcParamInfos( paramInfos, aUnit );
659 return paramInfos;
660}
661
662
663std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeSffmParamInfos( const std::string& aPrefix, const std::string& aUnit )
664{
665 std::vector<PARAM::INFO> paramInfos;
666 PARAM::INFO paramInfo;
667
668 paramInfo.name = "dc";
669 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
670 paramInfo.unit = aUnit;
671 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
672 paramInfo.defaultValue = "";
673 paramInfo.description = "DC offset";
674 paramInfos.push_back( paramInfo );
675
676 paramInfo.name = "ampl";
677 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
678 paramInfo.unit = aUnit;
679 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
680 paramInfo.defaultValue = "";
681 paramInfo.description = "Amplitude";
682 paramInfos.push_back( paramInfo );
683
684 paramInfo.name = "fc";
685 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
686 paramInfo.unit = "Hz";
687 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
688 paramInfo.defaultValue = "1/tstop";
689 paramInfo.description = "Carrier frequency";
690 paramInfos.push_back( paramInfo );
691
692 paramInfo.name = "mdi";
693 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
694 paramInfo.unit = "";
695 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
696 paramInfo.defaultValue = "";
697 paramInfo.description = "Modulation index";
698 paramInfos.push_back( paramInfo );
699
700 paramInfo.name = "fs";
701 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
702 paramInfo.unit = "Hz";
703 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
704 paramInfo.defaultValue = "1/tstop";
705 paramInfo.description = "Signal frequency";
706 paramInfos.push_back( paramInfo );
707
708 paramInfo.name = "phasec";
709 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
710 paramInfo.unit = "°";
711 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
712 paramInfo.defaultValue = "0";
713 paramInfo.description = "Carrier phase";
714 paramInfos.push_back( paramInfo );
715
716 paramInfo.name = "phases";
717 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
718 paramInfo.unit = "°";
719 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
720 paramInfo.defaultValue = "0";
721 paramInfo.description = "Signal phase";
722 paramInfos.push_back( paramInfo );
723
724 appendAcParamInfos( paramInfos, aUnit );
725 return paramInfos;
726}*/
727
728
729std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeCcParamInfos( const std::string& aGainUnit )
730{
731 std::vector<PARAM::INFO> paramInfos;
732 PARAM::INFO paramInfo;
733
734 paramInfo.name = "gain";
735 paramInfo.id = 1;
736 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
737 paramInfo.unit = aGainUnit;
738 paramInfo.description = "Gain";
739 paramInfos.push_back( paramInfo );
740
741 paramInfo.name = "control";
742 paramInfo.id = 2;
743 paramInfo.type = SIM_VALUE::TYPE_STRING;
744 paramInfo.description = "Controlling voltage source";
745 paramInfos.push_back( paramInfo );
746
747 return paramInfos;
748}
749
750
751std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeVcParamInfos( const std::string& aGainUnit )
752{
753 std::vector<PARAM::INFO> paramInfos;
754 PARAM::INFO paramInfo;
755
756 paramInfo.name = "gain";
757 paramInfo.id = 1;
758 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
759 paramInfo.unit = aGainUnit;
760 paramInfo.description = "Gain";
761 paramInfos.push_back( paramInfo );
762
763 paramInfo.name = "ic";
764 paramInfo.id = 7;
765 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
766 paramInfo.unit = "V";
767 paramInfo.description = "Initial condition of controlling source (ic)";
768 paramInfos.push_back( paramInfo );
769
770 return paramInfos;
771}
772
773
774std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makePwlParamInfos( const std::string& aPrefix,
775 const std::string& aQuantity,
776 const std::string& aUnit )
777{
778 std::vector<PARAM::INFO> paramInfos;
779 PARAM::INFO paramInfo;
780
781 paramInfo.name = "pwl";
782 paramInfo.type = SIM_VALUE::TYPE_STRING;
783 paramInfo.unit = "s," + aUnit;
785 paramInfo.defaultValue = "";
786 paramInfo.description = aUnit == "V" ? "Time-voltage points" : "Time-current points";
787 paramInfos.push_back( paramInfo );
788
789 // TODO: Ngspice doesn't support "td" and "r" for current sources, so let's disable that for
790 // now.
791
792 /*paramInfo.name = "td";
793 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
794 paramInfo.unit = "s";
795 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
796 paramInfo.defaultValue = "0";
797 paramInfo.description = aUnit == "V" ? "Time-voltage points" : "Time-current points";
798 paramInfo.isSpiceInstanceParam = true;
799 paramInfos.push_back( paramInfo );
800
801 paramInfo.name = "repeat";
802 paramInfo.type = SIM_VALUE::TYPE_BOOL;
803 paramInfo.unit = "";
804 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
805 paramInfo.defaultValue = "0";
806 paramInfo.description = "Repeat forever";
807 paramInfo.isSpiceInstanceParam = true;
808 paramInfo.spiceInstanceName = "r";
809 paramInfos.push_back( paramInfo );*/
810
811 /*paramInfo.name = "t";
812 paramInfo.type = SIM_VALUE::TYPE_FLOAT_VECTOR;
813 paramInfo.unit = "s";
814 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
815 paramInfo.defaultValue = "";
816 paramInfo.description = "Time vector";
817 paramInfos.push_back( paramInfo );
818
819 paramInfo.name = aPrefix;
820 paramInfo.type = SIM_VALUE::TYPE_FLOAT_VECTOR;
821 paramInfo.unit = aUnit;
822 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
823 paramInfo.defaultValue = "";
824 paramInfo.description = aQuantity + " vector";
825 paramInfos.push_back( paramInfo );
826
827 paramInfo.name = "repeat";
828 paramInfo.type = SIM_VALUE::TYPE_BOOL;
829 paramInfo.unit = "";
830 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
831 paramInfo.defaultValue = "";
832 paramInfo.description = "Repeat forever";
833 paramInfos.push_back( paramInfo );
834
835 paramInfo.name = "td";
836 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
837 paramInfo.unit = "s";
838 paramInfo.category = SIM_MODEL::PARAM::CATEGORY::PRINCIPAL;
839 paramInfo.defaultValue = "0";
840 paramInfo.description = "Delay";
841 paramInfos.push_back( paramInfo );*/
842
843 appendAcParamInfos( paramInfos, aUnit );
844 return paramInfos;
845}
846
847
848std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeWhiteNoiseParamInfos( const std::string& aPrefix,
849 const std::string& aUnit )
850{
851 std::vector<PARAM::INFO> paramInfos;
852 PARAM::INFO paramInfo;
853
854 paramInfo.name = "rms";
855 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
856 paramInfo.unit = aUnit;
858 paramInfo.defaultValue = "0";
859 paramInfo.description = "White noise RMS amplitude";
860 paramInfos.push_back( paramInfo );
861
862 paramInfo.name = "dt";
863 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
864 paramInfo.unit = "s";
866 paramInfo.defaultValue = "0";
867 paramInfo.description = "Time step";
868 paramInfos.push_back( paramInfo );
869
870 appendAcParamInfos( paramInfos, aUnit );
871 return paramInfos;
872}
873
874
875std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makePinkNoiseParamInfos( const std::string& aPrefix,
876 const std::string& aUnit )
877{
878 std::vector<PARAM::INFO> paramInfos;
879 PARAM::INFO paramInfo;
880
881 paramInfo.name = "rms";
882 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
883 paramInfo.unit = "";
885 paramInfo.defaultValue = "0";
886 paramInfo.description = "1/f noise RMS amplitude";
887 paramInfos.push_back( paramInfo );
888
889 paramInfo.name = "slope";
890 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
891 paramInfo.unit = "";
893 paramInfo.defaultValue = "1";
894 paramInfo.description = "1/f noise exponent";
895 paramInfos.push_back( paramInfo );
896
897 paramInfo.name = "dt";
898 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
899 paramInfo.unit = "s";
901 paramInfo.defaultValue = "0";
902 paramInfo.description = "Time step";
903 paramInfos.push_back( paramInfo );
904
905 appendAcParamInfos( paramInfos, aUnit );
906 return paramInfos;
907}
908
909
910std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeBurstNoiseParamInfos( const std::string& aPrefix,
911 const std::string& aUnit )
912{
913 std::vector<PARAM::INFO> paramInfos;
914 PARAM::INFO paramInfo;
915
916 paramInfo.name = "ampl";
917 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
918 paramInfo.unit = aUnit;
920 paramInfo.defaultValue = "0";
921 paramInfo.description = "Burst noise amplitude";
922 paramInfos.push_back( paramInfo );
923
924 paramInfo.name = "tcapt";
925 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
926 paramInfo.unit = "s";
928 paramInfo.defaultValue = "0";
929 paramInfo.description = "Burst noise trap capture time";
930 paramInfos.push_back( paramInfo );
931
932 paramInfo.name = "temit";
933 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
934 paramInfo.unit = "s";
936 paramInfo.defaultValue = "0";
937 paramInfo.description = "Burst noise trap emission time";
938 paramInfos.push_back( paramInfo );
939
940 appendAcParamInfos( paramInfos, aUnit );
941 return paramInfos;
942}
943
944
945std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomUniformParamInfos( const std::string& aPrefix,
946 const std::string& aUnit )
947{
948 std::vector<PARAM::INFO> paramInfos;
949 PARAM::INFO paramInfo;
950
951 paramInfo.name = "min";
952 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
953 paramInfo.unit = aUnit;
955 paramInfo.defaultValue = "-0.5";
956 paramInfo.description = "Min. value";
957 paramInfos.push_back( paramInfo );
958
959 paramInfo.name = "max";
960 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
961 paramInfo.unit = aUnit;
963 paramInfo.defaultValue = "0.5";
964 paramInfo.description = "Max. value";
965 paramInfos.push_back( paramInfo );
966
967 paramInfo.name = "dt";
968 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
969 paramInfo.unit = "s";
971 paramInfo.defaultValue = "0";
972 paramInfo.description = "Time step";
973 paramInfos.push_back( paramInfo );
974
975 paramInfo.name = "td";
976 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
977 paramInfo.unit = "s";
979 paramInfo.defaultValue = "0";
980 paramInfo.description = "Delay";
981 paramInfos.push_back( paramInfo );
982
983 appendAcParamInfos( paramInfos, aUnit );
984 return paramInfos;
985}
986
987
988std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomNormalParamInfos( const std::string& aPrefix,
989 const std::string& aUnit )
990{
991 std::vector<PARAM::INFO> paramInfos;
992 PARAM::INFO paramInfo;
993
994 paramInfo.name = "mean";
995 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
996 paramInfo.unit = aUnit;
998 paramInfo.defaultValue = "0";
999 paramInfo.description = "Mean";
1000 paramInfos.push_back( paramInfo );
1001
1002 paramInfo.name = "stddev";
1003 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1004 paramInfo.unit = aUnit;
1006 paramInfo.defaultValue = "1";
1007 paramInfo.description = "Standard deviation";
1008 paramInfos.push_back( paramInfo );
1009
1010 paramInfo.name = "dt";
1011 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1012 paramInfo.unit = "s";
1014 paramInfo.defaultValue = "0";
1015 paramInfo.description = "Time step";
1016 paramInfos.push_back( paramInfo );
1017
1018 paramInfo.name = "td";
1019 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1020 paramInfo.unit = "s";
1022 paramInfo.defaultValue = "0";
1023 paramInfo.description = "Delay";
1024 paramInfos.push_back( paramInfo );
1025
1026 appendAcParamInfos( paramInfos, aUnit );
1027 return paramInfos;
1028}
1029
1030
1031std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomExpParamInfos( const std::string& aPrefix,
1032 const std::string& aUnit )
1033{
1034 std::vector<PARAM::INFO> paramInfos;
1035 PARAM::INFO paramInfo;
1036
1037 paramInfo.name = "offset";
1038 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1039 paramInfo.unit = aUnit;
1041 paramInfo.defaultValue = "0";
1042 paramInfo.description = "Offset";
1043 paramInfos.push_back( paramInfo );
1044
1045 paramInfo.name = "mean";
1046 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1047 paramInfo.unit = aUnit;
1049 paramInfo.defaultValue = "1";
1050 paramInfo.description = "Mean";
1051 paramInfos.push_back( paramInfo );
1052
1053 paramInfo.name = "dt";
1054 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1055 paramInfo.unit = "s";
1057 paramInfo.defaultValue = "0";
1058 paramInfo.description = "Time step";
1059 paramInfos.push_back( paramInfo );
1060
1061 paramInfo.name = "td";
1062 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1063 paramInfo.unit = "s";
1065 paramInfo.defaultValue = "0";
1066 paramInfo.description = "Delay";
1067 paramInfos.push_back( paramInfo );
1068
1069 appendAcParamInfos( paramInfos, aUnit );
1070 return paramInfos;
1071}
1072
1073
1074std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_SOURCE::makeRandomPoissonParamInfos( const std::string& aPrefix,
1075 const std::string& aUnit )
1076{
1077 std::vector<PARAM::INFO> paramInfos;
1078 PARAM::INFO paramInfo;
1079
1080 paramInfo.name = "offset";
1081 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1082 paramInfo.unit = aUnit;
1084 paramInfo.defaultValue = "0";
1085 paramInfo.description = "Offset";
1086 paramInfos.push_back( paramInfo );
1087
1088 paramInfo.name = "lambda";
1089 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1090 paramInfo.unit = aUnit;
1092 paramInfo.defaultValue = "1";
1093 paramInfo.description = "Mean";
1094 paramInfos.push_back( paramInfo );
1095
1096 paramInfo.name = "dt";
1097 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1098 paramInfo.unit = "s";
1100 paramInfo.defaultValue = "0";
1101 paramInfo.description = "Time step";
1102 paramInfos.push_back( paramInfo );
1103
1104 paramInfo.name = "td";
1105 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1106 paramInfo.unit = "s";
1108 paramInfo.defaultValue = "0";
1109 paramInfo.description = "Delay";
1110 paramInfos.push_back( paramInfo );
1111
1112 appendAcParamInfos( paramInfos, aUnit );
1113 return paramInfos;
1114}
1115
1116void SIM_MODEL_SOURCE::appendAcParamInfos( std::vector<PARAM::INFO>& aParamInfos, const std::string& aUnit )
1117{
1118 PARAM::INFO paramInfo;
1119
1120 paramInfo.name = "ac";
1121 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1122 paramInfo.unit = aUnit;
1124 paramInfo.defaultValue = "0";
1125 paramInfo.description = "AC magnitude";
1126 aParamInfos.push_back( paramInfo );
1127
1128 paramInfo.name = "ph";
1129 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
1130 paramInfo.unit = "°";
1132 paramInfo.defaultValue = "0";
1133 paramInfo.description = "AC phase";
1134 aParamInfos.push_back( paramInfo );
1135}
1136
1137
1138std::vector<std::string> SIM_MODEL_SOURCE::GetPinNames() const
1139{
1140 if( GetDeviceType() == SIM_MODEL::DEVICE_T::E || GetDeviceType() == SIM_MODEL::DEVICE_T::G )
1141 return { "+", "-", "C+", "C-" };
1142 else
1143 return { "+", "-" };
1144}
static void appendAcParamInfos(std::vector< PARAM::INFO > &aParamInfos, const std::string &aUnit)
static std::vector< PARAM::INFO > makeBurstNoiseParamInfos(const std::string &aPrefix, const std::string &aUnit)
std::vector< std::string > GetPinNames() const override
static const std::vector< PARAM::INFO > & makeParamInfos(TYPE aType)
static std::vector< PARAM::INFO > makeExpParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< PARAM::INFO > makeRandomNormalParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< SIM_MODEL::PARAM::INFO > makeVcParamInfos(const std::string &aGainUnit)
SIM_MODEL_SOURCE(TYPE aType)
static std::vector< PARAM::INFO > makeRandomExpParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< PARAM::INFO > makeRandomUniformParamInfos(const std::string &aPrefix, const std::string &aUnit)
void doSetParamValue(int aParamIndex, const std::string &aValue) override
static std::vector< PARAM::INFO > makeRandomPoissonParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< PARAM::INFO > makeDcParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< PARAM::INFO > makePulseParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< PARAM::INFO > makePinkNoiseParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< PARAM::INFO > makeSinParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< PARAM::INFO > makePwlParamInfos(const std::string &aPrefix, const std::string &aQuantity, const std::string &aUnit)
static std::vector< PARAM::INFO > makeWhiteNoiseParamInfos(const std::string &aPrefix, const std::string &aUnit)
static std::vector< SIM_MODEL::PARAM::INFO > makeCcParamInfos(const std::string &aGainUnit)
void AddParam(const PARAM::INFO &aInfo)
Definition: sim_model.cpp:734
virtual const PARAM & GetParam(unsigned aParamIndex) const
Definition: sim_model.cpp:793
int GetParamCount() const
Definition: sim_model.h:477
DEVICE_T GetDeviceType() const
Definition: sim_model.h:459
const PARAM * FindParam(const std::string &aParamName) const
Definition: sim_model.cpp:822
virtual void doSetParamValue(int aParamIndex, const std::string &aValue)
Definition: sim_model.cpp:856
std::vector< PARAM > m_params
Definition: sim_model.h:542
void SetParamValue(int aParamIndex, const std::string &aValue, SIM_VALUE::NOTATION aNotation=SIM_VALUE::NOTATION::SI)
Definition: sim_model.cpp:862
SPICE_INFO GetSpiceInfo() const
Definition: sim_model.h:448
std::vector< std::reference_wrapper< const PARAM > > GetParams() const
Definition: sim_model.cpp:830
TYPE GetType() const
Definition: sim_model.h:460
static std::string ToSpice(const std::string &aString)
Definition: sim_value.h:84
@ TYPE_INT
Definition: sim_value.h:68
@ TYPE_FLOAT
Definition: sim_value.h:69
@ TYPE_STRING
Definition: sim_value.h:71
std::string ModelLine(const SPICE_ITEM &aItem) const override
std::string ItemLine(const SPICE_ITEM &aItem) const override
std::string getParamValueString(const std::string &aParamName, const std::string &aDefaultValue) const
virtual std::string ItemLine(const SPICE_ITEM &aItem) const
const SIM_MODEL & m_model
static bool empty(const wxTextEntryBase *aCtrl)
STL namespace.
SIM_MODEL::TYPE TYPE
Definition: sim_model.cpp:53
SIM_VALUE::TYPE type
Definition: sim_model.h:370
std::string defaultValue
Definition: sim_model.h:373
std::string description
Definition: sim_model.h:374
std::string value
Definition: sim_model.h:391
std::string inlineTypeString
Definition: sim_model.h:289
std::string modelName