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