KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sim_model.h
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 CERN
6 * Copyright (C) 2022-2023 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 3
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * https://www.gnu.org/licenses/gpl-3.0.html
21 * or you may search the http://www.gnu.org website for the version 3 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef SIM_MODEL_H
27#define SIM_MODEL_H
28
29#include <wx/string.h>
30#include <map>
31#include <utility>
32
33#include <sch_field.h>
34#include <sch_pin.h>
35
36// Must be included after sch_field.h (exactly eda_shape.h) to avoid a colliding
37// declaration with a window header (under msys2)
38#include <sim/sim_value.h>
39#include <enum_vector.h>
40
41class SIM_LIBRARY;
42struct SPICE_ITEM;
43class SPICE_GENERATOR;
45class PROJECT;
46class REPORTER;
47
48
49#define SIM_REFERENCE_FIELD wxT( "Reference" )
50#define SIM_VALUE_FIELD wxT( "Value" )
51
52#define SIM_DEVICE_FIELD wxT( "Sim.Device" )
53#define SIM_DEVICE_SUBTYPE_FIELD wxT( "Sim.Type" )
54#define SIM_PINS_FIELD wxT( "Sim.Pins" )
55#define SIM_PARAMS_FIELD wxT( "Sim.Params" )
56#define SIM_LIBRARY_FIELD wxT( "Sim.Library" )
57#define SIM_NAME_FIELD wxT( "Sim.Name" )
58#define SIM_NODES_FORMAT_FIELD wxT( "Sim.NodesFormat" )
59
60#define SIM_LEGACY_ENABLE_FIELD_V7 wxT( "Sim.Enable" )
61#define SIM_LEGACY_PRIMITIVE_FIELD wxS( "Spice_Primitive" )
62#define SIM_LEGACY_MODEL_FIELD wxS( "Spice_Model" )
63#define SIM_LEGACY_PINS_FIELD wxS( "Spice_Node_Sequence" )
64#define SIM_LEGACY_ENABLE_FIELD wxS( "Spice_Netlist_Enabled" )
65#define SIM_LEGACY_LIBRARY_FIELD wxS( "Spice_Lib_File" )
66
67
69{
70 const std::string modelPinName;
72
73 static constexpr auto NOT_CONNECTED = -1;
74};
75
76
78{
79public:
80 friend class SPICE_GENERATOR;
82
83 struct PARAM;
84
85 // There's a trailing '_' because `DEVICE_TYPE` collides with something in Windows headers.
87 NONE,
88
89 R,
90 C,
91 L,
92 K,
93 TLINE,
94 SW,
95
96 D,
97 NPN,
98 PNP,
99
100 NJFET,
101 PJFET,
102
103 NMES,
104 PMES,
105
106 NMOS,
107 PMOS,
108
109 V,
110 I,
111 E,
112 F,
113 G,
114 H,
115
116 SUBCKT,
117 XSPICE,
118
119 KIBIS,
120
121 SPICE
122 )
123
124 struct DEVICE_INFO
125 {
126 std::string fieldValue;
127 std::string description;
128 bool showInMenu;
129 };
130
131
133 NONE,
134
135 R,
136 R_POT,
137 R_BEHAVIORAL,
138
139 C,
140 C_BEHAVIORAL,
141
142 L,
143 L_BEHAVIORAL,
144
145 K,
146
147 TLINE_Z0,
148 TLINE_RLGC,
149
150 SW_V,
151 SW_I,
152
153 D,
154
155 NPN_VBIC,
156 PNP_VBIC,
157 NPN_GUMMELPOON,
158 PNP_GUMMELPOON,
159 //NPN_MEXTRAM,
160 //PNP_MEXTRAM,
161 NPN_HICUM2,
162 PNP_HICUM2,
163 //NPN_HICUM_L0,
164 //PNP_HICUM_L0,
165
166 NJFET_SHICHMANHODGES,
167 PJFET_SHICHMANHODGES,
168
169 NJFET_PARKERSKELLERN,
170 PJFET_PARKERSKELLERN,
171
172
173 NMES_STATZ,
174 PMES_STATZ,
175
176 NMES_YTTERDAL,
177 PMES_YTTERDAL,
178
179 NMES_HFET1,
180 PMES_HFET1,
181
182 NMES_HFET2,
183 PMES_HFET2,
184
185
186 NMOS_VDMOS,
187 PMOS_VDMOS,
188
189 NMOS_MOS1,
190 PMOS_MOS1,
191
192 NMOS_MOS2,
193 PMOS_MOS2,
194
195 NMOS_MOS3,
196 PMOS_MOS3,
197
198 NMOS_BSIM1,
199 PMOS_BSIM1,
200
201 NMOS_BSIM2,
202 PMOS_BSIM2,
203
204 NMOS_MOS6,
205 PMOS_MOS6,
206
207 NMOS_MOS9,
208 PMOS_MOS9,
209
210 NMOS_BSIM3,
211 PMOS_BSIM3,
212
213 NMOS_B4SOI,
214 PMOS_B4SOI,
215
216 NMOS_BSIM4,
217 PMOS_BSIM4,
218
219 //NMOS_EKV2_6,
220 //PMOS_EKV2_6,
221
222 //NMOS_PSP,
223 //PMOS_PSP,
224
225 NMOS_B3SOIFD,
226 PMOS_B3SOIFD,
227
228 NMOS_B3SOIDD,
229 PMOS_B3SOIDD,
230
231 NMOS_B3SOIPD,
232 PMOS_B3SOIPD,
233
234 //NMOS_STAG,
235 //PMOS_STAG,
236
237 NMOS_HISIM2,
238 PMOS_HISIM2,
239
240 NMOS_HISIMHV1,
241 PMOS_HISIMHV1,
242
243 NMOS_HISIMHV2,
244 PMOS_HISIMHV2,
245
246
247 V,
248 V_SIN,
249 V_PULSE,
250 V_EXP,
251 V_AM,
252 V_SFFM,
253 V_VCL,
254 V_CCL,
255 V_PWL,
256 V_WHITENOISE,
257 V_PINKNOISE,
258 V_BURSTNOISE,
259 V_RANDUNIFORM,
260 V_RANDGAUSSIAN,
261 V_RANDEXP,
262 V_RANDPOISSON,
263 V_BEHAVIORAL,
264
265 I,
266 I_SIN,
267 I_PULSE,
268 I_EXP,
269 I_AM,
270 I_SFFM,
271 I_VCL,
272 I_CCL,
273 I_PWL,
274 I_WHITENOISE,
275 I_PINKNOISE,
276 I_BURSTNOISE,
277 I_RANDUNIFORM,
278 I_RANDGAUSSIAN,
279 I_RANDEXP,
280 I_RANDPOISSON,
281 I_BEHAVIORAL,
282
283 SUBCKT,
284 XSPICE,
285
286 KIBIS_DEVICE,
287 KIBIS_DRIVER_DC,
288 KIBIS_DRIVER_RECT,
289 KIBIS_DRIVER_PRBS,
290
291 RAWSPICE
292 )
293
294 struct INFO
295 {
296 DEVICE_T deviceType;
297 std::string fieldValue;
298 std::string description;
299 };
300
301
303 {
304 std::string itemType;
305 std::string modelType = "";
306 std::string functionName = "";
307 std::string level = "";
308 bool isDefaultLevel = false;
309 bool hasExpression = false;
310 std::string version = "";
311 };
312
313
314 struct PARAM
315 {
316 // MS Windows compilers complain about the names IN and OUT, so we prefix them.
317 enum DIR
318 {
322 };
323
324 enum class CATEGORY
325 {
326 PRINCIPAL,
327 GEOMETRY,
328 AC,
329 DC,
332 NOISE,
335 S_PARAM,
336 ADVANCED,
337 FLAGS,
338 WAVEFORM,
341 };
342
343 struct INFO
344 {
345 INFO( const std::string& aName = "",
346 unsigned aId = 0,
347 DIR aDir = DIR_INOUT,
349 const std::string& aUnit = "",
350 CATEGORY aCategory = CATEGORY::PRINCIPAL,
351 const std::string& aDefaultValue = "",
352 const std::string& legacy_unused_value = "",
353 const std::string& aDescription = "",
354 bool aIsSpiceInstanceParam = false,
355 bool aIsInstanceParam = false,
356 const std::string& aSpiceModelName = "",
357 const std::string& aSpiceInstanceName = "",
358 std::vector<std::string> aEnumValues = {} ) :
359 name( aName ),
360 id( aId ),
361 dir( aDir ),
362 type( aType ),
363 unit( aUnit ),
364 category( aCategory ),
365 defaultValue( aDefaultValue ),
366 description( aDescription ),
367 isSpiceInstanceParam( aIsSpiceInstanceParam ),
368 isInstanceParam( aIsInstanceParam ),
369 spiceModelName( aSpiceModelName ),
370 spiceInstanceName( aSpiceInstanceName ),
371 enumValues( std::move( aEnumValues ) )
372 {}
373
374 bool Matches( const std::string& aName ) const;
375
376 std::string name;
377 unsigned id;
380 std::string unit;
382 std::string defaultValue;
383 std::string description;
386 std::string spiceModelName;
387 std::string spiceInstanceName;
388 std::vector<std::string> enumValues;
389 };
390
391 PARAM( const INFO& aInfo ) :
392 info( aInfo )
393 {}
394
395 bool Matches( const std::string& aName ) const
396 {
397 return info.Matches( aName );
398 }
399
400 std::string value;
401 const INFO& info;
402 };
403
404
405 static DEVICE_INFO DeviceInfo( DEVICE_T aDeviceType );
406 static INFO TypeInfo( TYPE aType );
407 static SPICE_INFO SpiceInfo( TYPE aType );
408
409
410 static TYPE ReadTypeFromFields( const std::vector<SCH_FIELD>& aFields, REPORTER& aReporter );
411
412 static std::unique_ptr<SIM_MODEL> Create( TYPE aType, const std::vector<SCH_PIN*>& aPins,
413 REPORTER& aReporter );
414
415 static std::unique_ptr<SIM_MODEL> Create( const SIM_MODEL* aBaseModel,
416 const std::vector<SCH_PIN*>& aPins,
417 REPORTER& aReporter );
418
419 static std::unique_ptr<SIM_MODEL> Create( const SIM_MODEL* aBaseModel,
420 const std::vector<SCH_PIN*>& aPins,
421 const std::vector<SCH_FIELD>& aFields,
422 REPORTER& aReporter );
423
424 static std::unique_ptr<SIM_MODEL> Create( const std::vector<SCH_FIELD>& aFields,
425 const std::vector<SCH_PIN*>& aPins,
426 bool aResolved, REPORTER& aReporter );
427
428 static std::string GetFieldValue( const std::vector<SCH_FIELD>* aFields,
429 const wxString& aFieldName,
430 bool aResolve = true );
431
432 static void SetFieldValue( std::vector<SCH_FIELD>& aFields, const wxString& aFieldName,
433 const std::string& aValue );
434
436 const SIM_MODEL_SERIALIZER& Serializer() const { return *m_serializer; }
437
438
439 // Move semantics.
440 // Rule of five.
441 virtual ~SIM_MODEL(); // = default in implementation file.
442 SIM_MODEL() = delete;
443 SIM_MODEL( const SIM_MODEL& aOther ) = delete;
444 SIM_MODEL( SIM_MODEL&& aOther ) = default;
445 SIM_MODEL& operator=(SIM_MODEL&& aOther ) = delete;
446
447 void ReadDataFields( const std::vector<SCH_FIELD>* aFields,
448 const std::vector<SCH_PIN*>& aPins );
449
450 void WriteFields( std::vector<SCH_FIELD>& aFields ) const;
451
452 SPICE_INFO GetSpiceInfo() const { return SpiceInfo( GetType() ); }
453
454 void AddPin( const SIM_MODEL_PIN& aPin );
455 void ClearPins();
456
457 int FindModelPinIndex( const std::string& aSymbolPinNumber );
458 void AddParam( const PARAM::INFO& aInfo );
459
460 DEVICE_INFO GetDeviceInfo() const { return DeviceInfo( GetDeviceType() ); }
461 INFO GetTypeInfo() const { return TypeInfo( GetType() ); }
462
463 DEVICE_T GetDeviceType() const { return GetTypeInfo().deviceType; }
464 TYPE GetType() const { return m_type; }
465
466 const SIM_MODEL* GetBaseModel() const { return m_baseModel; }
467 virtual void SetBaseModel( const SIM_MODEL& aBaseModel );
468
469 virtual std::vector<std::string> GetPinNames() const { return {}; }
470
471 int GetPinCount() const { return static_cast<int>( m_modelPins.size() ); }
472 const SIM_MODEL_PIN& GetPin( unsigned aIndex ) const { return m_modelPins.at( aIndex ); }
473
474 std::vector<std::reference_wrapper<const SIM_MODEL_PIN>> GetPins() const;
475
476 void AssignSymbolPinNumberToModelPin( int aPinIndex, const wxString& aSymbolPinNumber );
477 virtual void AssignSymbolPinNumberToModelPin( const std::string& aPinName,
478 const wxString& aSymbolPinNumber );
479
480
481 int GetParamCount() const { return static_cast<int>( m_params.size() ); }
482 virtual const PARAM& GetParam( unsigned aParamIndex ) const; // Return base parameter unless it's overridden.
483
484 virtual const PARAM* GetTunerParam() const { return nullptr; }
485
486 const PARAM* FindParam( const std::string& aParamName ) const;
487
488 std::vector<std::reference_wrapper<const PARAM>> GetParams() const;
489
490 const PARAM& GetParamOverride( unsigned aParamIndex ) const; // Return the actual parameter.
491 const PARAM& GetBaseParam( unsigned aParamIndex ) const; // Always return base parameter if it exists.
492
493
494 void SetParamValue( int aParamIndex, const std::string& aValue,
495 SIM_VALUE::NOTATION aNotation = SIM_VALUE::NOTATION::SI );
496 void SetParamValue( const std::string& aParamName, const std::string& aValue,
497 SIM_VALUE::NOTATION aNotation = SIM_VALUE::NOTATION::SI );
498
499 // Can modifying a model parameter also modify other parameters?
500 virtual bool HasAutofill() const { return false; }
501 virtual bool HasPrimaryValue() const { return false; }
502
503 void SetIsEnabled( bool aIsEnabled ) { m_isEnabled = aIsEnabled; }
504 bool IsEnabled() const { return m_isEnabled; }
505
506 void SetIsStoredInValue( bool aIsStoredInValue )
507 {
508 if( HasPrimaryValue() )
509 m_isStoredInValue = aIsStoredInValue;
510 }
511 bool IsStoredInValue() const { return m_isStoredInValue; }
512
513 virtual void SwitchSingleEndedDiff( bool aDiff ) { };
514
515 template <class T>
516 static bool InferSimModel( T& aSymbol, std::vector<SCH_FIELD>* aFields, bool aResolve,
517 SIM_VALUE_GRAMMAR::NOTATION aNotation, wxString* aDeviceType,
518 wxString* aModelType, wxString* aModelParams, wxString* aPinMap );
519
520 template <class T>
521 static void MigrateSimModel( T& aSymbol, const PROJECT* aProject );
522
523protected:
524 static std::unique_ptr<SIM_MODEL> Create( TYPE aType );
525
526 SIM_MODEL( TYPE aType );
527 SIM_MODEL( TYPE aType, std::unique_ptr<SPICE_GENERATOR> aSpiceGenerator );
528 SIM_MODEL( TYPE aType, std::unique_ptr<SPICE_GENERATOR> aSpiceGenerator,
529 std::unique_ptr<SIM_MODEL_SERIALIZER> aSerializer );
530
531 void createPins( const std::vector<SCH_PIN*>& aSymbolPins );
532
533 virtual int doFindParam( const std::string& aParamName ) const;
534 virtual void doSetParamValue( int aParamIndex, const std::string& aValue );
535
536private:
537 virtual bool requiresSpiceModelLine( const SPICE_ITEM& aItem ) const;
538
539protected:
540 std::vector<PARAM> m_params;
541 std::vector<SIM_MODEL_PIN> m_modelPins;
543 std::unique_ptr<SIM_MODEL_SERIALIZER> m_serializer;
544
545private:
546 std::unique_ptr<SPICE_GENERATOR> m_spiceGenerator;
547
551};
552
553#endif // SIM_MODEL_H
Definition: kibis.h:433
Container for project specific data.
Definition: project.h:62
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
Serializes/deserializes a SIM_MODEL for storage in LIB_FIELDs/SCH_FIELDs.
int FindModelPinIndex(const std::string &aSymbolPinNumber)
Definition: sim_model.cpp:708
const SIM_MODEL * GetBaseModel() const
Definition: sim_model.h:466
static void MigrateSimModel(T &aSymbol, const PROJECT *aProject)
Definition: sim_model.cpp:1394
const PARAM & GetBaseParam(unsigned aParamIndex) const
Definition: sim_model.cpp:834
void AddParam(const PARAM::INFO &aInfo)
Definition: sim_model.cpp:720
bool IsStoredInValue() const
Definition: sim_model.h:511
virtual std::vector< std::string > GetPinNames() const
Definition: sim_model.h:469
std::unique_ptr< SPICE_GENERATOR > m_spiceGenerator
Definition: sim_model.h:546
virtual bool requiresSpiceModelLine(const SPICE_ITEM &aItem) const
Definition: sim_model.cpp:1019
void ClearPins()
Definition: sim_model.cpp:702
DEFINE_ENUM_CLASS_WITH_ITERATOR(TYPE, NONE, R, R_POT, R_BEHAVIORAL, C, C_BEHAVIORAL, L, L_BEHAVIORAL, K, TLINE_Z0, TLINE_RLGC, SW_V, SW_I, D, NPN_VBIC, PNP_VBIC, NPN_GUMMELPOON, PNP_GUMMELPOON, NPN_HICUM2, PNP_HICUM2, NJFET_SHICHMANHODGES, PJFET_SHICHMANHODGES, NJFET_PARKERSKELLERN, PJFET_PARKERSKELLERN, NMES_STATZ, PMES_STATZ, NMES_YTTERDAL, PMES_YTTERDAL, NMES_HFET1, PMES_HFET1, NMES_HFET2, PMES_HFET2, NMOS_VDMOS, PMOS_VDMOS, NMOS_MOS1, PMOS_MOS1, NMOS_MOS2, PMOS_MOS2, NMOS_MOS3, PMOS_MOS3, NMOS_BSIM1, PMOS_BSIM1, NMOS_BSIM2, PMOS_BSIM2, NMOS_MOS6, PMOS_MOS6, NMOS_MOS9, PMOS_MOS9, NMOS_BSIM3, PMOS_BSIM3, NMOS_B4SOI, PMOS_B4SOI, NMOS_BSIM4, PMOS_BSIM4, NMOS_B3SOIFD, PMOS_B3SOIFD, NMOS_B3SOIDD, PMOS_B3SOIDD, NMOS_B3SOIPD, PMOS_B3SOIPD, NMOS_HISIM2, PMOS_HISIM2, NMOS_HISIMHV1, PMOS_HISIMHV1, NMOS_HISIMHV2, PMOS_HISIMHV2, V, V_SIN, V_PULSE, V_EXP, V_AM, V_SFFM, V_VCL, V_CCL, V_PWL, V_WHITENOISE, V_PINKNOISE, V_BURSTNOISE, V_RANDUNIFORM, V_RANDGAUSSIAN, V_RANDEXP, V_RANDPOISSON, V_BEHAVIORAL, I, I_SIN, I_PULSE, I_EXP, I_AM, I_SFFM, I_VCL, I_CCL, I_PWL, I_WHITENOISE, I_PINKNOISE, I_BURSTNOISE, I_RANDUNIFORM, I_RANDGAUSSIAN, I_RANDEXP, I_RANDPOISSON, I_BEHAVIORAL, SUBCKT, XSPICE, KIBIS_DEVICE, KIBIS_DRIVER_DC, KIBIS_DRIVER_RECT, KIBIS_DRIVER_PRBS, RAWSPICE) struct INFO
Definition: sim_model.h:132
bool IsEnabled() const
Definition: sim_model.h:504
static TYPE ReadTypeFromFields(const std::vector< SCH_FIELD > &aFields, REPORTER &aReporter)
Definition: sim_model.cpp:386
std::vector< SIM_MODEL_PIN > m_modelPins
Definition: sim_model.h:541
static INFO TypeInfo(TYPE aType)
Definition: sim_model.cpp:101
static void SetFieldValue(std::vector< SCH_FIELD > &aFields, const wxString &aFieldName, const std::string &aValue)
Definition: sim_model.cpp:664
int GetPinCount() const
Definition: sim_model.h:471
virtual const PARAM * GetTunerParam() const
Definition: sim_model.h:484
void AddPin(const SIM_MODEL_PIN &aPin)
Definition: sim_model.cpp:696
static SPICE_INFO SpiceInfo(TYPE aType)
Definition: sim_model.cpp:245
const SIM_MODEL_SERIALIZER & Serializer() const
Definition: sim_model.h:436
void ReadDataFields(const std::vector< SCH_FIELD > *aFields, const std::vector< SCH_PIN * > &aPins)
Definition: sim_model.cpp:423
bool m_isEnabled
Definition: sim_model.h:549
const SPICE_GENERATOR & SpiceGenerator() const
Definition: sim_model.h:435
virtual const PARAM & GetParam(unsigned aParamIndex) const
Definition: sim_model.cpp:780
static bool InferSimModel(T &aSymbol, std::vector< SCH_FIELD > *aFields, bool aResolve, SIM_VALUE_GRAMMAR::NOTATION aNotation, wxString *aDeviceType, wxString *aModelType, wxString *aModelParams, wxString *aPinMap)
Definition: sim_model.cpp:1064
bool m_isStoredInValue
Definition: sim_model.h:550
void createPins(const std::vector< SCH_PIN * > &aSymbolPins)
Definition: sim_model.cpp:984
void WriteFields(std::vector< SCH_FIELD > &aFields) const
Definition: sim_model.cpp:441
virtual void SetBaseModel(const SIM_MODEL &aBaseModel)
Definition: sim_model.cpp:730
SIM_MODEL()=delete
static std::string GetFieldValue(const std::vector< SCH_FIELD > *aFields, const wxString &aFieldName, bool aResolve=true)
Definition: sim_model.cpp:645
int GetParamCount() const
Definition: sim_model.h:481
void AssignSymbolPinNumberToModelPin(int aPinIndex, const wxString &aSymbolPinNumber)
Definition: sim_model.cpp:749
DEVICE_INFO GetDeviceInfo() const
Definition: sim_model.h:460
DEVICE_T GetDeviceType() const
Definition: sim_model.h:463
static DEVICE_INFO DeviceInfo(DEVICE_T aDeviceType)
Definition: sim_model.cpp:56
INFO GetTypeInfo() const
Definition: sim_model.h:461
const PARAM * FindParam(const std::string &aParamName) const
Definition: sim_model.cpp:809
virtual void doSetParamValue(int aParamIndex, const std::string &aValue)
Definition: sim_model.cpp:843
std::vector< PARAM > m_params
Definition: sim_model.h:540
const PARAM & GetParamOverride(unsigned aParamIndex) const
Definition: sim_model.cpp:828
SIM_MODEL(SIM_MODEL &&aOther)=default
virtual bool HasAutofill() const
Definition: sim_model.h:500
virtual ~SIM_MODEL()
void SetIsEnabled(bool aIsEnabled)
Definition: sim_model.h:503
static std::unique_ptr< SIM_MODEL > Create(TYPE aType, const std::vector< SCH_PIN * > &aPins, REPORTER &aReporter)
Definition: sim_model.cpp:492
SIM_MODEL & operator=(SIM_MODEL &&aOther)=delete
void SetParamValue(int aParamIndex, const std::string &aValue, SIM_VALUE::NOTATION aNotation=SIM_VALUE::NOTATION::SI)
Definition: sim_model.cpp:849
SPICE_INFO GetSpiceInfo() const
Definition: sim_model.h:452
virtual void SwitchSingleEndedDiff(bool aDiff)
Definition: sim_model.h:513
std::vector< std::reference_wrapper< const PARAM > > GetParams() const
Definition: sim_model.cpp:817
const SIM_MODEL_PIN & GetPin(unsigned aIndex) const
Definition: sim_model.h:472
void SetIsStoredInValue(bool aIsStoredInValue)
Definition: sim_model.h:506
std::unique_ptr< SIM_MODEL_SERIALIZER > m_serializer
Definition: sim_model.h:543
virtual bool HasPrimaryValue() const
Definition: sim_model.h:501
virtual int doFindParam(const std::string &aParamName) const
Definition: sim_model.cpp:795
TYPE GetType() const
Definition: sim_model.h:464
DEFINE_ENUM_CLASS_WITH_ITERATOR(DEVICE_T, NONE, R, C, L, K, TLINE, SW, D, NPN, PNP, NJFET, PJFET, NMES, PMES, NMOS, PMOS, V, I, E, F, G, H, SUBCKT, XSPICE, KIBIS, SPICE) struct DEVICE_INFO
Definition: sim_model.h:86
std::vector< std::reference_wrapper< const SIM_MODEL_PIN > > GetPins() const
Definition: sim_model.cpp:739
const TYPE m_type
Definition: sim_model.h:548
const SIM_MODEL * m_baseModel
Definition: sim_model.h:542
SIM_MODEL(const SIM_MODEL &aOther)=delete
@ TYPE_FLOAT
Definition: sim_value.h:69
@ NONE
Definition: kibis.h:54
#define F(x, y, z)
Definition: md5_hash.cpp:15
#define I(x, y, z)
Definition: md5_hash.cpp:18
#define G(x, y, z)
Definition: md5_hash.cpp:16
#define H(x, y, z)
Definition: md5_hash.cpp:17
SIM_MODEL::TYPE TYPE
Definition: sim_model.cpp:53
std::string spiceModelName
Definition: sim_model.h:386
std::vector< std::string > enumValues
Definition: sim_model.h:388
INFO(const std::string &aName="", unsigned aId=0, DIR aDir=DIR_INOUT, SIM_VALUE::TYPE aType=SIM_VALUE::TYPE_FLOAT, const std::string &aUnit="", CATEGORY aCategory=CATEGORY::PRINCIPAL, const std::string &aDefaultValue="", const std::string &legacy_unused_value="", const std::string &aDescription="", bool aIsSpiceInstanceParam=false, bool aIsInstanceParam=false, const std::string &aSpiceModelName="", const std::string &aSpiceInstanceName="", std::vector< std::string > aEnumValues={})
Definition: sim_model.h:345
SIM_VALUE::TYPE type
Definition: sim_model.h:379
bool Matches(const std::string &aName) const
Definition: sim_model.cpp:789
std::string defaultValue
Definition: sim_model.h:382
std::string spiceInstanceName
Definition: sim_model.h:387
std::string description
Definition: sim_model.h:383
PARAM(const INFO &aInfo)
Definition: sim_model.h:391
bool Matches(const std::string &aName) const
Definition: sim_model.h:395
std::string value
Definition: sim_model.h:400
const INFO & info
Definition: sim_model.h:401
std::string functionName
Definition: sim_model.h:306
std::string itemType
Definition: sim_model.h:304
std::string modelType
Definition: sim_model.h:305
std::string level
Definition: sim_model.h:307
std::string version
Definition: sim_model.h:310
static constexpr auto NOT_CONNECTED
Definition: sim_model.h:73
const std::string modelPinName
Definition: sim_model.h:70
wxString symbolPinNumber
Definition: sim_model.h:71