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 <reporter.h>
34#include <sch_field.h>
35#include <lib_pin.h>
36
37// Must be included after sch_field.h (exactly eda_shape.h) to avoid a colliding
38// declaration with a window header (under msys2)
39#include <sim/sim_value.h>
40#include <enum_vector.h>
41
42class SIM_LIBRARY;
43struct SPICE_ITEM;
44class SPICE_GENERATOR;
46class PROJECT;
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{
70public:
71 friend class SPICE_GENERATOR;
73
74 struct PIN;
75 struct PARAM;
76
77 // There's a trailing '_' because `DEVICE_TYPE` collides with something in Windows headers.
79 NONE,
80
81 R,
82 C,
83 L,
84 K,
85 TLINE,
86 SW,
87
88 D,
89 NPN,
90 PNP,
91
92 NJFET,
93 PJFET,
94
95 NMES,
96 PMES,
97
98 NMOS,
99 PMOS,
100
101 V,
102 I,
103 E,
104 F,
105 G,
106 H,
107
108 SUBCKT,
109 XSPICE,
110
111 KIBIS,
112
113 SPICE
114 )
115
116 struct DEVICE_INFO
117 {
118 std::string fieldValue;
119 std::string description;
120 bool showInMenu;
121 };
122
123
125 NONE,
126
127 R,
128 R_POT,
129 R_BEHAVIORAL,
130
131 C,
132 C_BEHAVIORAL,
133
134 L,
135 L_BEHAVIORAL,
136
137 K,
138
139 TLINE_Z0,
140 TLINE_RLGC,
141
142 SW_V,
143 SW_I,
144
145 D,
146
147 NPN_VBIC,
148 PNP_VBIC,
149 NPN_GUMMELPOON,
150 PNP_GUMMELPOON,
151 //NPN_MEXTRAM,
152 //PNP_MEXTRAM,
153 NPN_HICUM2,
154 PNP_HICUM2,
155 //NPN_HICUM_L0,
156 //PNP_HICUM_L0,
157
158 NJFET_SHICHMANHODGES,
159 PJFET_SHICHMANHODGES,
160
161 NJFET_PARKERSKELLERN,
162 PJFET_PARKERSKELLERN,
163
164
165 NMES_STATZ,
166 PMES_STATZ,
167
168 NMES_YTTERDAL,
169 PMES_YTTERDAL,
170
171 NMES_HFET1,
172 PMES_HFET1,
173
174 NMES_HFET2,
175 PMES_HFET2,
176
177
178 NMOS_VDMOS,
179 PMOS_VDMOS,
180
181 NMOS_MOS1,
182 PMOS_MOS1,
183
184 NMOS_MOS2,
185 PMOS_MOS2,
186
187 NMOS_MOS3,
188 PMOS_MOS3,
189
190 NMOS_BSIM1,
191 PMOS_BSIM1,
192
193 NMOS_BSIM2,
194 PMOS_BSIM2,
195
196 NMOS_MOS6,
197 PMOS_MOS6,
198
199 NMOS_MOS9,
200 PMOS_MOS9,
201
202 NMOS_BSIM3,
203 PMOS_BSIM3,
204
205 NMOS_B4SOI,
206 PMOS_B4SOI,
207
208 NMOS_BSIM4,
209 PMOS_BSIM4,
210
211 //NMOS_EKV2_6,
212 //PMOS_EKV2_6,
213
214 //NMOS_PSP,
215 //PMOS_PSP,
216
217 NMOS_B3SOIFD,
218 PMOS_B3SOIFD,
219
220 NMOS_B3SOIDD,
221 PMOS_B3SOIDD,
222
223 NMOS_B3SOIPD,
224 PMOS_B3SOIPD,
225
226 //NMOS_STAG,
227 //PMOS_STAG,
228
229 NMOS_HISIM2,
230 PMOS_HISIM2,
231
232 NMOS_HISIMHV1,
233 PMOS_HISIMHV1,
234
235 NMOS_HISIMHV2,
236 PMOS_HISIMHV2,
237
238
239 V,
240 V_SIN,
241 V_PULSE,
242 V_EXP,
243 V_AM,
244 V_SFFM,
245 V_VCL,
246 V_CCL,
247 V_PWL,
248 V_WHITENOISE,
249 V_PINKNOISE,
250 V_BURSTNOISE,
251 V_RANDUNIFORM,
252 V_RANDGAUSSIAN,
253 V_RANDEXP,
254 V_RANDPOISSON,
255 V_BEHAVIORAL,
256
257 I,
258 I_SIN,
259 I_PULSE,
260 I_EXP,
261 I_AM,
262 I_SFFM,
263 I_VCL,
264 I_CCL,
265 I_PWL,
266 I_WHITENOISE,
267 I_PINKNOISE,
268 I_BURSTNOISE,
269 I_RANDUNIFORM,
270 I_RANDGAUSSIAN,
271 I_RANDEXP,
272 I_RANDPOISSON,
273 I_BEHAVIORAL,
274
275 SUBCKT,
276 XSPICE,
277
278 KIBIS_DEVICE,
279 KIBIS_DRIVER_DC,
280 KIBIS_DRIVER_RECT,
281 KIBIS_DRIVER_PRBS,
282
283 RAWSPICE
284 )
285
286 struct INFO
287 {
288 DEVICE_T deviceType;
289 std::string fieldValue;
290 std::string description;
291 };
292
293
295 {
296 std::string itemType;
297 std::string modelType = "";
298 std::string functionName = "";
299 std::string level = "";
300 bool isDefaultLevel = false;
301 bool hasExpression = false;
302 std::string version = "";
303 };
304
305
306 struct PIN
307 {
308 const std::string name;
309 std::string symbolPinNumber;
310
311 static constexpr auto NOT_CONNECTED = -1;
312 };
313
314
315 struct PARAM
316 {
317 // MS Windows compilers complain about the names IN and OUT, so we prefix them.
318 enum DIR
319 {
323 };
324
325 enum class CATEGORY
326 {
327 PRINCIPAL,
328 GEOMETRY,
329 AC,
330 DC,
333 NOISE,
336 S_PARAM,
337 ADVANCED,
338 FLAGS,
339 WAVEFORM,
342 };
343
344 struct INFO
345 {
346 INFO( const std::string& aName = "",
347 unsigned aId = 0,
348 DIR aDir = DIR_INOUT,
350 const std::string& aUnit = "",
351 CATEGORY aCategory = CATEGORY::PRINCIPAL,
352 const std::string& aDefaultValue = "",
353 const std::string& legacy_unused_value = "",
354 const std::string& aDescription = "",
355 bool aIsSpiceInstanceParam = false,
356 bool aIsInstanceParam = false,
357 const std::string& aSpiceModelName = "",
358 const std::string& aSpiceInstanceName = "",
359 std::vector<std::string> aEnumValues = {} ) :
360 name( aName ),
361 id( aId ),
362 dir( aDir ),
363 type( aType ),
364 unit( aUnit ),
365 category( aCategory ),
366 defaultValue( aDefaultValue ),
367 description( aDescription ),
368 isSpiceInstanceParam( aIsSpiceInstanceParam ),
369 isInstanceParam( aIsInstanceParam ),
370 spiceModelName( aSpiceModelName ),
371 spiceInstanceName( aSpiceInstanceName ),
372 enumValues( std::move( aEnumValues ) )
373 {}
374
375 bool Matches( const std::string& aName ) const;
376
377 std::string name;
378 unsigned id;
381 std::string unit;
383 std::string defaultValue;
384 std::string description;
387 std::string spiceModelName;
388 std::string spiceInstanceName;
389 std::vector<std::string> enumValues;
390 };
391
392 PARAM( const INFO& aInfo ) :
393 info( aInfo )
394 {}
395
396 bool Matches( const std::string& aName ) const
397 {
398 return info.Matches( aName );
399 }
400
401 std::string value;
402 const INFO& info;
403 };
404
405
406 static DEVICE_INFO DeviceInfo( DEVICE_T aDeviceType );
407 static INFO TypeInfo( TYPE aType );
408 static SPICE_INFO SpiceInfo( TYPE aType );
409
410
411 static TYPE ReadTypeFromFields( const std::vector<SCH_FIELD>& aFields, REPORTER& aReporter );
412
413 static std::unique_ptr<SIM_MODEL> Create( TYPE aType, const std::vector<LIB_PIN*>& aPins,
414 REPORTER& aReporter );
415
416 static std::unique_ptr<SIM_MODEL> Create( const SIM_MODEL* aBaseModel,
417 const std::vector<LIB_PIN*>& aPins,
418 REPORTER& aReporter );
419
420 static std::unique_ptr<SIM_MODEL> Create( const SIM_MODEL* aBaseModel,
421 const std::vector<LIB_PIN*>& aPins,
422 const std::vector<SCH_FIELD>& aFields,
423 REPORTER& aReporter );
424
425 static std::unique_ptr<SIM_MODEL> Create( const std::vector<SCH_FIELD>& aFields,
426 const std::vector<LIB_PIN*>& aPins,
427 bool aResolved, REPORTER& aReporter );
428
429 static std::string GetFieldValue( const std::vector<SCH_FIELD>* aFields,
430 const wxString& aFieldName,
431 bool aResolve = true );
432
433 static void SetFieldValue( std::vector<SCH_FIELD>& aFields, const wxString& aFieldName,
434 const std::string& aValue );
435
437 const SIM_MODEL_SERIALIZER& Serializer() const { return *m_serializer; }
438
439
440 // Move semantics.
441 // Rule of five.
442 virtual ~SIM_MODEL(); // = default in implementation file.
443 SIM_MODEL() = delete;
444 SIM_MODEL( const SIM_MODEL& aOther ) = delete;
445 SIM_MODEL( SIM_MODEL&& aOther ) = default;
446 SIM_MODEL& operator=(SIM_MODEL&& aOther ) = delete;
447
448 void ReadDataFields( const std::vector<SCH_FIELD>* aFields,
449 const std::vector<LIB_PIN*>& aPins );
450
451 void WriteFields( std::vector<SCH_FIELD>& aFields ) const;
452
453 SPICE_INFO GetSpiceInfo() const { return SpiceInfo( GetType() ); }
454
455 void AddPin( const PIN& aPin );
456 void ClearPins();
457
458 int FindModelPinIndex( const std::string& aSymbolPinNumber );
459 void AddParam( const PARAM::INFO& aInfo );
460
461 DEVICE_INFO GetDeviceInfo() const { return DeviceInfo( GetDeviceType() ); }
462 INFO GetTypeInfo() const { return TypeInfo( GetType() ); }
463
464 DEVICE_T GetDeviceType() const { return GetTypeInfo().deviceType; }
465 TYPE GetType() const { return m_type; }
466
467 const SIM_MODEL* GetBaseModel() const { return m_baseModel; }
468 virtual void SetBaseModel( const SIM_MODEL& aBaseModel );
469
470 virtual std::vector<std::string> GetPinNames() const { return {}; }
471
472 int GetPinCount() const { return static_cast<int>( m_pins.size() ); }
473 const PIN& GetPin( unsigned aIndex ) const { return m_pins.at( aIndex ); }
474
475 std::vector<std::reference_wrapper<const PIN>> GetPins() const;
476
477 void SetPinSymbolPinNumber( int aPinIndex, const std::string& aSymbolPinNumber );
478 virtual void SetPinSymbolPinNumber( const std::string& aPinName,
479 const std::string& aSymbolPinNumber );
480
481
482 int GetParamCount() const { return static_cast<int>( m_params.size() ); }
483 virtual const PARAM& GetParam( unsigned aParamIndex ) const; // Return base parameter unless it's overridden.
484
485 virtual const PARAM* GetTunerParam() const { return nullptr; }
486
487 const PARAM* FindParam( const std::string& aParamName ) const;
488
489 std::vector<std::reference_wrapper<const PARAM>> GetParams() const;
490
491 const PARAM& GetParamOverride( unsigned aParamIndex ) const; // Return the actual parameter.
492 const PARAM& GetBaseParam( unsigned aParamIndex ) const; // Always return base parameter if it exists.
493
494
495 void SetParamValue( int aParamIndex, const std::string& aValue,
496 SIM_VALUE::NOTATION aNotation = SIM_VALUE::NOTATION::SI );
497 void SetParamValue( const std::string& aParamName, const std::string& aValue,
498 SIM_VALUE::NOTATION aNotation = SIM_VALUE::NOTATION::SI );
499
500 // Can modifying a model parameter also modify other parameters?
501 virtual bool HasAutofill() const { return false; }
502 virtual bool HasPrimaryValue() const { return false; }
503
504 void SetIsEnabled( bool aIsEnabled ) { m_isEnabled = aIsEnabled; }
505 bool IsEnabled() const { return m_isEnabled; }
506
507 void SetIsStoredInValue( bool aIsStoredInValue )
508 {
509 if( HasPrimaryValue() )
510 m_isStoredInValue = aIsStoredInValue;
511 }
512 bool IsStoredInValue() const { return m_isStoredInValue; }
513
514 virtual void SwitchSingleEndedDiff( bool aDiff ) { };
515
516 template <class T>
517 static bool InferSimModel( T& aSymbol, std::vector<SCH_FIELD>* aFields, bool aResolve,
518 SIM_VALUE_GRAMMAR::NOTATION aNotation, wxString* aDeviceType,
519 wxString* aModelType, wxString* aModelParams, wxString* aPinMap );
520
521 template <class T>
522 static void MigrateSimModel( T& aSymbol, const PROJECT* aProject );
523
524protected:
525 static std::unique_ptr<SIM_MODEL> Create( TYPE aType );
526
527 SIM_MODEL( TYPE aType );
528 SIM_MODEL( TYPE aType, std::unique_ptr<SPICE_GENERATOR> aSpiceGenerator );
529 SIM_MODEL( TYPE aType, std::unique_ptr<SPICE_GENERATOR> aSpiceGenerator,
530 std::unique_ptr<SIM_MODEL_SERIALIZER> aSerializer );
531
532 void createPins( const std::vector<LIB_PIN*>& aSymbolPins );
533
534 virtual int doFindParam( const std::string& aParamName ) const;
535 virtual void doSetParamValue( int aParamIndex, const std::string& aValue );
536
537private:
538 virtual bool requiresSpiceModelLine( const SPICE_ITEM& aItem ) const;
539
540protected:
541 std::vector<PARAM> m_params;
542 std::vector<PIN> m_pins;
544 std::unique_ptr<SIM_MODEL_SERIALIZER> m_serializer;
545
546private:
547 std::unique_ptr<SPICE_GENERATOR> m_spiceGenerator;
548
552};
553
554#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:467
static void MigrateSimModel(T &aSymbol, const PROJECT *aProject)
Definition: sim_model.cpp:1393
const PARAM & GetBaseParam(unsigned aParamIndex) const
Definition: sim_model.cpp:833
void ReadDataFields(const std::vector< SCH_FIELD > *aFields, const std::vector< LIB_PIN * > &aPins)
Definition: sim_model.cpp:423
void AddParam(const PARAM::INFO &aInfo)
Definition: sim_model.cpp:720
bool IsStoredInValue() const
Definition: sim_model.h:512
virtual std::vector< std::string > GetPinNames() const
Definition: sim_model.h:470
std::unique_ptr< SPICE_GENERATOR > m_spiceGenerator
Definition: sim_model.h:547
virtual bool requiresSpiceModelLine(const SPICE_ITEM &aItem) const
Definition: sim_model.cpp:1018
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:124
bool IsEnabled() const
Definition: sim_model.h:505
std::vector< PIN > m_pins
Definition: sim_model.h:542
static TYPE ReadTypeFromFields(const std::vector< SCH_FIELD > &aFields, REPORTER &aReporter)
Definition: sim_model.cpp:386
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:472
virtual const PARAM * GetTunerParam() const
Definition: sim_model.h:485
std::vector< std::reference_wrapper< const PIN > > GetPins() const
Definition: sim_model.cpp:739
static SPICE_INFO SpiceInfo(TYPE aType)
Definition: sim_model.cpp:245
const SIM_MODEL_SERIALIZER & Serializer() const
Definition: sim_model.h:437
bool m_isEnabled
Definition: sim_model.h:550
const SPICE_GENERATOR & SpiceGenerator() const
Definition: sim_model.h:436
virtual const PARAM & GetParam(unsigned aParamIndex) const
Definition: sim_model.cpp:779
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:1063
void createPins(const std::vector< LIB_PIN * > &aSymbolPins)
Definition: sim_model.cpp:983
bool m_isStoredInValue
Definition: sim_model.h:551
static std::unique_ptr< SIM_MODEL > Create(TYPE aType, const std::vector< LIB_PIN * > &aPins, REPORTER &aReporter)
Definition: sim_model.cpp:492
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:482
void SetPinSymbolPinNumber(int aPinIndex, const std::string &aSymbolPinNumber)
Definition: sim_model.cpp:749
DEVICE_INFO GetDeviceInfo() const
Definition: sim_model.h:461
DEVICE_T GetDeviceType() const
Definition: sim_model.h:464
void AddPin(const PIN &aPin)
Definition: sim_model.cpp:696
static DEVICE_INFO DeviceInfo(DEVICE_T aDeviceType)
Definition: sim_model.cpp:56
INFO GetTypeInfo() const
Definition: sim_model.h:462
const PIN & GetPin(unsigned aIndex) const
Definition: sim_model.h:473
const PARAM * FindParam(const std::string &aParamName) const
Definition: sim_model.cpp:808
virtual void doSetParamValue(int aParamIndex, const std::string &aValue)
Definition: sim_model.cpp:842
std::vector< PARAM > m_params
Definition: sim_model.h:541
const PARAM & GetParamOverride(unsigned aParamIndex) const
Definition: sim_model.cpp:827
SIM_MODEL(SIM_MODEL &&aOther)=default
virtual bool HasAutofill() const
Definition: sim_model.h:501
virtual ~SIM_MODEL()
void SetIsEnabled(bool aIsEnabled)
Definition: sim_model.h:504
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:848
SPICE_INFO GetSpiceInfo() const
Definition: sim_model.h:453
virtual void SwitchSingleEndedDiff(bool aDiff)
Definition: sim_model.h:514
std::vector< std::reference_wrapper< const PARAM > > GetParams() const
Definition: sim_model.cpp:816
void SetIsStoredInValue(bool aIsStoredInValue)
Definition: sim_model.h:507
std::unique_ptr< SIM_MODEL_SERIALIZER > m_serializer
Definition: sim_model.h:544
virtual bool HasPrimaryValue() const
Definition: sim_model.h:502
virtual int doFindParam(const std::string &aParamName) const
Definition: sim_model.cpp:794
TYPE GetType() const
Definition: sim_model.h:465
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:78
const TYPE m_type
Definition: sim_model.h:549
const SIM_MODEL * m_baseModel
Definition: sim_model.h:543
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:387
std::vector< std::string > enumValues
Definition: sim_model.h:389
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:346
SIM_VALUE::TYPE type
Definition: sim_model.h:380
bool Matches(const std::string &aName) const
Definition: sim_model.cpp:788
std::string defaultValue
Definition: sim_model.h:383
std::string spiceInstanceName
Definition: sim_model.h:388
std::string description
Definition: sim_model.h:384
PARAM(const INFO &aInfo)
Definition: sim_model.h:392
bool Matches(const std::string &aName) const
Definition: sim_model.h:396
std::string value
Definition: sim_model.h:401
const INFO & info
Definition: sim_model.h:402
std::string symbolPinNumber
Definition: sim_model.h:309
const std::string name
Definition: sim_model.h:308
static constexpr auto NOT_CONNECTED
Definition: sim_model.h:311
std::string functionName
Definition: sim_model.h:298
std::string itemType
Definition: sim_model.h:296
std::string modelType
Definition: sim_model.h:297
std::string level
Definition: sim_model.h:299
std::string version
Definition: sim_model.h:302