KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sim_model_ibis.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 3
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, you may find one here:
18 * https://www.gnu.org/licenses/gpl-3.0.html
19 * or you may search the http://www.gnu.org website for the version 3 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#include <sim/kibis/kibis.h>
25#include <sim/sim_model_ibis.h>
27#include <fmt/core.h>
28#include <wx/filename.h>
29#include <kiway.h>
30#include <schematic.h>
31#include "sim_lib_mgr.h"
32
33std::string SPICE_GENERATOR_IBIS::ModelName( const SPICE_ITEM& aItem ) const
34{
35 return fmt::format( "{}.{}", aItem.refName, aItem.baseModelName );
36}
37
38
39std::string SPICE_GENERATOR_IBIS::ModelLine( const SPICE_ITEM& aItem ) const
40{
41 return "";
42}
43
44std::vector<std::string> SPICE_GENERATOR_IBIS::CurrentNames( const SPICE_ITEM& aItem ) const
45{
46 std::vector<std::string> currentNames;
47
48 for( const SIM_MODEL_PIN& pin : GetPins() )
49 currentNames.push_back( fmt::format( "I({}:{})", ItemName( aItem ), pin.modelPinName ) );
50
51 return currentNames;
52}
53
54
55std::string SPICE_GENERATOR_IBIS::IbisDevice( const SPICE_ITEM& aItem, SCHEMATIC* aSchematic,
56 const wxString& aCacheDir, REPORTER& aReporter ) const
57{
58 std::string ibisLibFilename = GetFieldValue( &aItem.fields, SIM_LIBRARY::LIBRARY_FIELD, true, 0 );
59 std::string ibisCompName = GetFieldValue( &aItem.fields, SIM_LIBRARY::NAME_FIELD, true, 0 );
60 std::string ibisPinName = GetFieldValue( &aItem.fields, SIM_LIBRARY_IBIS::PIN_FIELD, true, 0 );
61 std::string ibisModelName = GetFieldValue( &aItem.fields, SIM_LIBRARY_IBIS::MODEL_FIELD, true, 0 );
62 bool diffMode = GetFieldValue( &aItem.fields, SIM_LIBRARY_IBIS::DIFF_FIELD, true, 0 ) == "1";
63
64 WX_STRING_REPORTER reporter;
65 SIM_LIB_MGR mgr( &aSchematic->Prj() );
66
67 std::vector<EMBEDDED_FILES*> embeddedFilesStack;
68 embeddedFilesStack.push_back( aSchematic->GetEmbeddedFiles() );
69 mgr.SetFilesStack( std::move( embeddedFilesStack ) );
70
71 wxString path = mgr.ResolveLibraryPath( ibisLibFilename, reporter );
72
73 if( reporter.HasMessage() )
74 THROW_IO_ERROR( reporter.GetMessages() );
75
76 KIBIS kibis( std::string( path.c_str() ) );
77 kibis.m_cacheDir = std::string( aCacheDir.c_str() );
78 kibis.m_Reporter = &aReporter;
79
80 if( !kibis.m_valid )
81 THROW_IO_ERROR( wxString::Format( _( "Invalid IBIS file '%s'" ), ibisLibFilename ) );
82
83 KIBIS_COMPONENT* kcomp = kibis.GetComponent( std::string( ibisCompName ) );
84
85 if( !kcomp )
86 THROW_IO_ERROR( wxString::Format( _( "Could not find IBIS component '%s'" ), ibisCompName ) );
87
88 KIBIS_PIN* kpin = kcomp->GetPin( ibisPinName );
89
90
91 if( !kcomp->m_valid )
92 THROW_IO_ERROR( wxString::Format( _( "Invalid IBIS component '%s'" ), ibisCompName ) );
93
94 if( !kpin )
95 {
96 THROW_IO_ERROR( wxString::Format( _( "Could not find IBIS pin '%s' in component '%s'" ),
97 ibisPinName,
98 ibisCompName ) );
99 }
100
101 if( !kpin->m_valid )
102 {
103 THROW_IO_ERROR( wxString::Format( _( "Invalid IBIS pin '%s' in component '%s'" ),
104 ibisPinName,
105 ibisCompName ) );
106 }
107
108 KIBIS_MODEL* kmodel = kibis.GetModel( ibisModelName );
109
110 if( !kmodel )
111 THROW_IO_ERROR( wxString::Format( _( "Could not find IBIS model '%s'" ), ibisModelName ) );
112
113 if( !kmodel->m_valid )
114 THROW_IO_ERROR( wxString::Format( _( "Invalid IBIS model '%s'" ), ibisModelName ) );
115
116 KIBIS_PARAMETER kparams;
117
118 if( const SIM_MODEL::PARAM* vcc = m_model.FindParam( "vcc" ) )
119 kparams.SetCornerFromString( kparams.m_supply, vcc->value );
120
121 if( const SIM_MODEL::PARAM* rpin = m_model.FindParam( "rpin" ) )
122 kparams.SetCornerFromString( kparams.m_Rpin, rpin->value );
123
124 if( const SIM_MODEL::PARAM* lpin = m_model.FindParam( "lpin" ) )
125 kparams.SetCornerFromString( kparams.m_Lpin, lpin->value );
126
127 if( const SIM_MODEL::PARAM* cpin = m_model.FindParam( "cpin" ) )
128 kparams.SetCornerFromString( kparams.m_Cpin, cpin->value );
129
130 //kparams.SetCornerFromString( kparams.m_Ccomp, FindParam( "ccomp" )->value );
131
132 std::string result;
133
134 switch( m_model.GetType() )
135 {
136 case SIM_MODEL::TYPE::KIBIS_DEVICE:
137 if( diffMode )
138 kpin->writeSpiceDiffDevice( result, aItem.modelName, *kmodel, kparams );
139 else
140 kpin->writeSpiceDevice( result, aItem.modelName, *kmodel, kparams );
141 break;
142
143 case SIM_MODEL::TYPE::KIBIS_DRIVER_DC:
144 {
145 std::string paramValue = "";
146
147 if( const SIM_MODEL::PARAM* dc = m_model.FindParam( "dc" ) )
148 paramValue = dc->value;
149
150 if( paramValue == "hi-Z" )
151 {
152 kparams.m_waveform = new KIBIS_WAVEFORM_HIGH_Z( kibis );
153 }
154 else if( paramValue == "low" )
155 {
156 kparams.m_waveform = new KIBIS_WAVEFORM_STUCK_LOW( kibis );
157 }
158 else if( paramValue == "high" )
159 {
160 kparams.m_waveform = new KIBIS_WAVEFORM_STUCK_HIGH( kibis );
161 }
162
163 if( diffMode )
164 kpin->writeSpiceDiffDriver( result, aItem.modelName, *kmodel, kparams );
165 else
166 kpin->writeSpiceDriver( result, aItem.modelName, *kmodel, kparams );
167 break;
168 }
169
170 case SIM_MODEL::TYPE::KIBIS_DRIVER_RECT:
171 {
173
174 if( const SIM_MODEL::PARAM* ton = m_model.FindParam( "ton" ) )
175 waveform->m_ton = SIM_VALUE::ToDouble( ton->value, 0 );
176
177 if( const SIM_MODEL::PARAM* toff = m_model.FindParam( "toff" ) )
178 waveform->m_toff = SIM_VALUE::ToDouble( toff->value, 0 );
179
180 if( const SIM_MODEL::PARAM* td = m_model.FindParam( "td" ) )
181 waveform->m_delay = SIM_VALUE::ToDouble( td->value, 0 );
182
183 if( const SIM_MODEL::PARAM* n = m_model.FindParam( "n" ) )
184 waveform->m_cycles = SIM_VALUE::ToInt( n->value, 1 );
185
186 kparams.m_waveform = waveform;
187
188 if( diffMode )
189 kpin->writeSpiceDiffDriver( result, aItem.modelName, *kmodel, kparams );
190 else
191 kpin->writeSpiceDriver( result, aItem.modelName, *kmodel, kparams );
192 break;
193 }
194
195 case SIM_MODEL::TYPE::KIBIS_DRIVER_PRBS:
196 {
197 KIBIS_WAVEFORM_PRBS* waveform = new KIBIS_WAVEFORM_PRBS( kibis );
198
199 if( const SIM_MODEL::PARAM* f0 = m_model.FindParam( "f0" ) )
200 waveform->m_bitrate = SIM_VALUE::ToDouble( f0->value, 0 );
201
202 if( const SIM_MODEL::PARAM* td = m_model.FindParam( "td" ) )
203 waveform->m_delay = SIM_VALUE::ToDouble( td->value, 0 );
204
205 if( const SIM_MODEL::PARAM* n = m_model.FindParam( "n" ) )
206 waveform->SetBits( SIM_VALUE::ToInt( n->value, 0 ) );
207
208 kparams.m_waveform = waveform;
209
210 if( diffMode )
211 kpin->writeSpiceDiffDriver( result, aItem.modelName, *kmodel, kparams );
212 else
213 kpin->writeSpiceDriver( result, aItem.modelName, *kmodel, kparams );
214 break;
215 }
216
217 default:
218 wxFAIL_MSG( "Unknown IBIS model type" );
219 return "";
220 }
221
222 return result;
223}
224
225
227 SIM_MODEL( aType, std::make_unique<SPICE_GENERATOR_IBIS>( *this ) ),
228 m_enableDiff( false ),
229 m_sourceModel( nullptr )
230{
231 static std::vector<PARAM::INFO> device = makeParamInfos( TYPE::KIBIS_DEVICE );
232 static std::vector<PARAM::INFO> dcDriver = makeParamInfos( TYPE::KIBIS_DRIVER_DC );
233 static std::vector<PARAM::INFO> rectDriver = makeParamInfos( TYPE::KIBIS_DRIVER_RECT );
234 static std::vector<PARAM::INFO> prbsDriver = makeParamInfos( TYPE::KIBIS_DRIVER_PRBS );
235
236 std::vector<PARAM::INFO>* paramInfos = nullptr;
237
238 switch( aType )
239 {
240 case SIM_MODEL::TYPE::KIBIS_DEVICE: paramInfos = &device; break;
241 case SIM_MODEL::TYPE::KIBIS_DRIVER_DC: paramInfos = &dcDriver; break;
242 case SIM_MODEL::TYPE::KIBIS_DRIVER_RECT: paramInfos = &rectDriver; break;
243 case SIM_MODEL::TYPE::KIBIS_DRIVER_PRBS: paramInfos = &prbsDriver; break;
244
245 default:
246 wxFAIL;
247 return;
248 }
249
250 for( const PARAM::INFO& paramInfo : *paramInfos )
251 AddParam( paramInfo );
252
253 SwitchSingleEndedDiff( false );
254}
255
256
258{
259 ClearPins();
260
261 if( aDiff )
262 {
263 AddPin( { "GND", "1" } );
264 AddPin( { "+", "2" } );
265 AddPin( { "-", "3" } );
266 }
267 else
268 {
269 AddPin( { "GND", "1" } );
270 AddPin( { "IN/OUT", "2" } );
271 }
272}
273
275 SIM_MODEL_IBIS( aType )
276{
277 for( PARAM& param1 : m_params )
278 {
279 for( int ii = 0; ii < aSource.GetParamCount(); ++ii )
280 {
281 const PARAM& param2 = aSource.GetParam( ii );
282
283 if( param1.info.name == param2.info.name )
284 param1.value = param2.value;
285 }
286 }
287
289
290 m_ibisPins = aSource.GetIbisPins();
291 m_ibisModels = aSource.GetIbisModels();
292
293 m_enableDiff = aSource.CanDifferential();
294}
295
296
297bool SIM_MODEL_IBIS::ChangePin( const SIM_LIBRARY_IBIS& aLib, const std::string& aPinNumber )
298{
299 KIBIS_COMPONENT* kcomp = aLib.m_kibis.GetComponent( std::string( GetComponentName() ) );
300
301 if( !kcomp )
302 return false;
303
304 KIBIS_PIN* kpin = kcomp->GetPin( aPinNumber );
305
306 if( !kpin )
307 return false;
308
309 m_ibisModels.clear();
310
311 for( KIBIS_MODEL* kmodel : kpin->m_models )
312 m_ibisModels.push_back( kmodel->m_name );
313
314 return true;
315}
316
317
319{
320 // Actual base models can only be of the same type, which is not the case here, as in addition
321 // to IBIS device model type we have multiple types of drivers available for the same sourced
322 // model. And we don't want to inherit the default values anyway. So we just store these models
323 // and use the only for Spice code generation.
324 m_sourceModel = dynamic_cast<const SIM_MODEL_IBIS*>( &aBaseModel );
325}
326
327
328std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_IBIS::makeParamInfos( TYPE aType )
329{
330 std::vector<PARAM::INFO> paramInfos;
331 PARAM::INFO paramInfo;
332
333 paramInfo.name = "vcc";
334 paramInfo.type = SIM_VALUE::TYPE_STRING;
335 paramInfo.unit = "";
337 paramInfo.defaultValue = "typ";
338 paramInfo.description = _( "Power supply" );
339 paramInfo.spiceModelName = "";
340 paramInfo.enumValues = { "typ", "min", "max" };
341 paramInfos.push_back( paramInfo );
342
343 paramInfo.name = "rpin";
344 paramInfo.type = SIM_VALUE::TYPE_STRING;
345 paramInfo.unit = "";
347 paramInfo.defaultValue = "typ";
348 paramInfo.description = _( "Parasitic pin resistance" );
349 paramInfo.spiceModelName = "";
350 paramInfo.enumValues = { "typ", "min", "max" };
351 paramInfos.push_back( paramInfo );
352
353 paramInfo.name = "lpin";
354 paramInfo.type = SIM_VALUE::TYPE_STRING;
355 paramInfo.unit = "";
357 paramInfo.defaultValue = "typ";
358 paramInfo.description = _( "Parasitic pin inductance" );
359 paramInfo.spiceModelName = "";
360 paramInfo.enumValues = { "typ", "min", "max" };
361 paramInfos.push_back( paramInfo );
362
363 paramInfo.name = "cpin";
364 paramInfo.type = SIM_VALUE::TYPE_STRING;
365 paramInfo.unit = "";
367 paramInfo.defaultValue = "typ";
368 paramInfo.description = _( "Parasitic pin capacitance" );
369 paramInfo.spiceModelName = "";
370 paramInfo.enumValues = { "typ", "min", "max" };
371 paramInfos.push_back( paramInfo );
372
373 std::vector<PARAM::INFO> dc = makeDcWaveformParamInfos();
374 std::vector<PARAM::INFO> rect = makeRectWaveformParamInfos();
375 std::vector<PARAM::INFO> prbs = makePrbsWaveformParamInfos();
376
377 switch( aType )
378 {
379 case TYPE::KIBIS_DRIVER_DC:
380 for( const PARAM::INFO& param : makeDcWaveformParamInfos() )
381 paramInfos.push_back( param );
382 break;
383
384 case TYPE::KIBIS_DRIVER_RECT:
385 for( const PARAM::INFO& param : makeRectWaveformParamInfos() )
386 paramInfos.push_back( param );
387 break;
388
389 case TYPE::KIBIS_DRIVER_PRBS:
390 for( const PARAM::INFO& param : makePrbsWaveformParamInfos() )
391 paramInfos.push_back( param );
392 break;
393
394 default:
395 break;
396 }
397
398 return paramInfos;
399}
400
401
402std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_IBIS::makeDcWaveformParamInfos()
403{
404 std::vector<PARAM::INFO> paramInfos;
405 PARAM::INFO paramInfo;
406
407 paramInfo.name = "dc";
408 paramInfo.type = SIM_VALUE::TYPE_STRING;
409 paramInfo.unit = "";
411 paramInfo.defaultValue = "hi-Z";
412 paramInfo.description = _( "DC Value" );
413 paramInfo.enumValues = { "hi-Z", "low", "high" };
414 paramInfos.push_back( paramInfo );
415
416 return paramInfos;
417}
418
419
420std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_IBIS::makeRectWaveformParamInfos()
421{
422 std::vector<PARAM::INFO> paramInfos;
423 PARAM::INFO paramInfo;
424
425 paramInfo.name = "ton";
426 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
427 paramInfo.unit = "s";
429 paramInfo.defaultValue = "";
430 paramInfo.description = _( "ON time" );
431 paramInfos.push_back( paramInfo );
432
433 paramInfo.name = "toff";
434 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
435 paramInfo.unit = "s";
437 paramInfo.defaultValue = "";
438 paramInfo.description = _( "OFF time" );
439 paramInfos.push_back( paramInfo );
440
441 paramInfo.name = "td";
442 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
443 paramInfo.unit = "s";
445 paramInfo.defaultValue = "0";
446 paramInfo.description = _( "Delay" );
447 paramInfos.push_back( paramInfo );
448
449 paramInfo.name = "n";
450 paramInfo.type = SIM_VALUE::TYPE_INT;
451 paramInfo.unit = "";
453 paramInfo.defaultValue = "1";
454 paramInfo.description = _( "Number of cycles" );
455 paramInfos.push_back( paramInfo );
456
457 return paramInfos;
458}
459
460
461std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_IBIS::makePrbsWaveformParamInfos()
462{
463 std::vector<PARAM::INFO> paramInfos;
464 PARAM::INFO paramInfo;
465
466 paramInfo.name = "f0";
467 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
468 paramInfo.unit = "Hz";
470 paramInfo.defaultValue = "";
471 paramInfo.description = _( "Bitrate" );
472 paramInfos.push_back( paramInfo );
473
474 paramInfo.name = "td";
475 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
476 paramInfo.unit = "s";
478 paramInfo.defaultValue = "";
479 paramInfo.description = _( "Delay" );
480 paramInfos.push_back( paramInfo );
481
482 paramInfo.name = "n";
483 paramInfo.type = SIM_VALUE::TYPE_INT;
484 paramInfo.unit = "";
486 paramInfo.defaultValue = "";
487 paramInfo.description = _( "Number of bits" );
488 paramInfos.push_back( paramInfo );
489
490 return paramInfos;
491}
492
REPORTER * m_Reporter
Definition: ibis_parser.h:74
bool m_valid
Definition: kibis.h:57
KIBIS_PIN * GetPin(const std::string &aPinNumber)
Get a pin by its number ( 1, 2, A1, A2, ... )
Definition: kibis.cpp:330
std::string m_name
Definition: kibis.h:250
IBIS_CORNER m_supply
Definition: kibis.h:220
IBIS_CORNER m_Cpin
Definition: kibis.h:218
IBIS_CORNER m_Lpin
Definition: kibis.h:217
IBIS_CORNER m_Rpin
Definition: kibis.h:216
void SetCornerFromString(IBIS_CORNER &aCorner, const std::string &aString)
Definition: kibis.cpp:1390
KIBIS_WAVEFORM * m_waveform
Definition: kibis.h:221
bool writeSpiceDiffDriver(std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
Definition: kibis.cpp:1299
bool writeSpiceDevice(std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
Definition: kibis.cpp:1246
std::vector< KIBIS_MODEL * > m_models
Definition: kibis.h:365
bool writeSpiceDiffDevice(std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
Definition: kibis.cpp:1336
bool writeSpiceDriver(std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
Definition: kibis.cpp:1131
double m_delay
Definition: kibis.h:139
void SetBits(int aBits)
Definition: kibis.h:146
double m_bitrate
Definition: kibis.h:138
Definition: kibis.h:467
KIBIS_MODEL * GetModel(const std::string &aName)
Return the model with name aName .
Definition: kibis.cpp:1366
KIBIS_COMPONENT * GetComponent(const std::string &aName)
Return the component with name aName .
Definition: kibis.cpp:1378
std::string m_cacheDir
Absolute path of the directory that will be used for caching.
Definition: kibis.h:482
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:73
Holds all the data relating to one schematic.
Definition: schematic.h:87
PROJECT & Prj() const
Return a reference to the project this schematic is part of.
Definition: schematic.h:102
EMBEDDED_FILES * GetEmbeddedFiles() override
Definition: schematic.cpp:888
static constexpr auto MODEL_FIELD
static constexpr auto PIN_FIELD
static constexpr auto DIFF_FIELD
static constexpr auto LIBRARY_FIELD
Definition: sim_library.h:35
static constexpr auto NAME_FIELD
Definition: sim_library.h:36
wxString ResolveLibraryPath(const wxString &aLibraryPath, REPORTER &aReporter)
Definition: sim_lib_mgr.cpp:58
void SetFilesStack(std::vector< EMBEDDED_FILES * > aFilesStack)
Definition: sim_lib_mgr.h:49
SIM_MODEL_IBIS(TYPE aType)
static std::vector< PARAM::INFO > makeDcWaveformParamInfos()
std::vector< std::pair< std::string, std::string > > m_ibisPins
std::vector< std::string > m_ibisModels
static std::vector< PARAM::INFO > makeRectWaveformParamInfos()
const PARAM & GetParam(unsigned aParamIndex) const override
static std::vector< PARAM::INFO > makePrbsWaveformParamInfos()
std::vector< std::pair< std::string, std::string > > GetIbisPins() const
void SwitchSingleEndedDiff(bool aDiff) override
const SIM_MODEL_IBIS * m_sourceModel
bool CanDifferential() const
std::vector< std::string > GetIbisModels() const
std::string m_componentName
void SetBaseModel(const SIM_MODEL &aBaseModel) override
bool ChangePin(const SIM_LIBRARY_IBIS &aLib, const std::string &aPinNumber)
update the list of available models based on the pin number.
static std::vector< PARAM::INFO > makeParamInfos(TYPE aType)
std::string GetComponentName() const
void AddParam(const PARAM::INFO &aInfo)
Definition: sim_model.cpp:667
void ClearPins()
Definition: sim_model.cpp:649
void AddPin(const SIM_MODEL_PIN &aPin)
Definition: sim_model.cpp:643
int GetParamCount() const
Definition: sim_model.h:477
const PARAM * FindParam(const std::string &aParamName) const
Definition: sim_model.cpp:754
std::vector< PARAM > m_params
Definition: sim_model.h:534
TYPE GetType() const
Definition: sim_model.h:460
@ TYPE_INT
Definition: sim_value.h:68
@ TYPE_FLOAT
Definition: sim_value.h:69
@ TYPE_STRING
Definition: sim_value.h:71
static double ToDouble(const std::string &aString, double aDefault=NAN)
Definition: sim_value.cpp:442
static int ToInt(const std::string &aString, int aDefault=-1)
Definition: sim_value.cpp:467
std::string IbisDevice(const SPICE_ITEM &aItem, SCHEMATIC *aSchematic, const wxString &aCacheDir, REPORTER &aReporter) const
std::vector< std::string > CurrentNames(const SPICE_ITEM &aItem) const override
std::string ModelLine(const SPICE_ITEM &aItem) const override
std::string ModelName(const SPICE_ITEM &aItem) const override
virtual std::string ItemName(const SPICE_ITEM &aItem) const
virtual std::vector< std::reference_wrapper< const SIM_MODEL_PIN > > GetPins() const
const SIM_MODEL & m_model
A wrapper for reporting to a wxString object.
Definition: reporter.h:190
bool HasMessage() const override
Returns true if the reporter client is non-empty.
Definition: reporter.cpp:96
const wxString & GetMessages() const
Definition: reporter.cpp:83
#define _(s)
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:39
STL namespace.
wxString GetFieldValue(const std::vector< SCH_FIELD > *aFields, FIELD_T aFieldType)
Definition: sch_field.h:397
SIM_MODEL::TYPE TYPE
Definition: sim_model.cpp:57
std::string spiceModelName
Definition: sim_model.h:386
std::vector< std::string > enumValues
Definition: sim_model.h:388
SIM_VALUE::TYPE type
Definition: sim_model.h:379
std::string defaultValue
Definition: sim_model.h:382
std::string description
Definition: sim_model.h:383
std::string value
Definition: sim_model.h:400
const INFO & info
Definition: sim_model.h:401
std::string refName
std::vector< SCH_FIELD > fields
std::string modelName
std::string baseModelName