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 (C) 2022 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 "sim_lib_mgr.h"
31
32std::string SPICE_GENERATOR_IBIS::ModelName( const SPICE_ITEM& aItem ) const
33{
34 return fmt::format( "{}.{}", aItem.refName, aItem.baseModelName );
35}
36
37
38std::string SPICE_GENERATOR_IBIS::ModelLine( const SPICE_ITEM& aItem ) const
39{
40 return "";
41}
42
43std::vector<std::reference_wrapper<const SIM_MODEL::PARAM>> SPICE_GENERATOR_IBIS::GetInstanceParams() const
44{
45 std::vector<std::reference_wrapper<const SIM_MODEL::PARAM>> vec;
46 return vec;
47}
48
49
50std::vector<std::string> SPICE_GENERATOR_IBIS::CurrentNames( const SPICE_ITEM& aItem ) const
51{
52 std::vector<std::string> currentNames;
53
54 for( const SIM_MODEL_PIN& pin : GetPins() )
55 currentNames.push_back( fmt::format( "I({}:{})", ItemName( aItem ), pin.modelPinName ) );
56
57 return currentNames;
58}
59
60
61std::string SPICE_GENERATOR_IBIS::IbisDevice( const SPICE_ITEM& aItem, const PROJECT& aProject,
62 const wxString& aCacheDir,
63 REPORTER& aReporter ) const
64{
65 std::string ibisLibFilename = SIM_MODEL::GetFieldValue( &aItem.fields, SIM_LIBRARY::LIBRARY_FIELD );
66 std::string ibisCompName = SIM_MODEL::GetFieldValue( &aItem.fields, SIM_LIBRARY::NAME_FIELD );
67 std::string ibisPinName = SIM_MODEL::GetFieldValue( &aItem.fields, SIM_LIBRARY_IBIS::PIN_FIELD );
68 std::string ibisModelName = SIM_MODEL::GetFieldValue( &aItem.fields, SIM_LIBRARY_IBIS::MODEL_FIELD );
69 bool diffMode = SIM_MODEL::GetFieldValue( &aItem.fields, SIM_LIBRARY_IBIS::DIFF_FIELD ) == "1";
70
71 wxString msg;
72 WX_STRING_REPORTER reporter( &msg );
73 wxString path = SIM_LIB_MGR::ResolveLibraryPath( ibisLibFilename, &aProject, reporter );
74
75 if( reporter.HasMessage() )
76 THROW_IO_ERROR( msg );
77
78 KIBIS kibis( std::string( path.c_str() ) );
79 kibis.m_cacheDir = std::string( aCacheDir.c_str() );
80 kibis.m_reporter = &aReporter;
81
82 if( !kibis.m_valid )
83 THROW_IO_ERROR( wxString::Format( _( "Invalid IBIS file '%s'" ), ibisLibFilename ) );
84
85 KIBIS_COMPONENT* kcomp = kibis.GetComponent( std::string( ibisCompName ) );
86
87 if( !kcomp )
88 THROW_IO_ERROR( wxString::Format( _( "Could not find IBIS component '%s'" ), ibisCompName ) );
89
90 KIBIS_PIN* kpin = kcomp->GetPin( ibisPinName );
91
92
93 if( !kcomp->m_valid )
94 THROW_IO_ERROR( wxString::Format( _( "Invalid IBIS component '%s'" ), ibisCompName ) );
95
96 if( !kpin )
97 {
98 THROW_IO_ERROR( wxString::Format( _( "Could not find IBIS pin '%s' in component '%s'" ),
99 ibisPinName,
100 ibisCompName ) );
101 }
102
103 if( !kpin->m_valid )
104 {
105 THROW_IO_ERROR( wxString::Format( _( "Invalid IBIS pin '%s' in component '%s'" ),
106 ibisPinName,
107 ibisCompName ) );
108 }
109
110 KIBIS_MODEL* kmodel = kibis.GetModel( ibisModelName );
111
112 if( !kmodel )
113 THROW_IO_ERROR( wxString::Format( _( "Could not find IBIS model '%s'" ), ibisModelName ) );
114
115 if( !kmodel->m_valid )
116 THROW_IO_ERROR( wxString::Format( _( "Invalid IBIS model '%s'" ), ibisModelName ) );
117
118 KIBIS_PARAMETER kparams;
119
120 if( const SIM_MODEL::PARAM* vcc = m_model.FindParam( "vcc" ) )
121 kparams.SetCornerFromString( kparams.m_supply, vcc->value );
122
123 if( const SIM_MODEL::PARAM* rpin = m_model.FindParam( "rpin" ) )
124 kparams.SetCornerFromString( kparams.m_Rpin, rpin->value );
125
126 if( const SIM_MODEL::PARAM* lpin = m_model.FindParam( "lpin" ) )
127 kparams.SetCornerFromString( kparams.m_Lpin, lpin->value );
128
129 if( const SIM_MODEL::PARAM* cpin = m_model.FindParam( "cpin" ) )
130 kparams.SetCornerFromString( kparams.m_Cpin, cpin->value );
131
132 //kparams.SetCornerFromString( kparams.m_Ccomp, FindParam( "ccomp" )->value );
133
134 std::string result;
135
136 switch( m_model.GetType() )
137 {
138 case SIM_MODEL::TYPE::KIBIS_DEVICE:
139 if( diffMode )
140 kpin->writeSpiceDiffDevice( &result, aItem.modelName, *kmodel, kparams );
141 else
142 kpin->writeSpiceDevice( &result, aItem.modelName, *kmodel, kparams );
143 break;
144
145 case SIM_MODEL::TYPE::KIBIS_DRIVER_DC:
146 {
147 std::string paramValue = "";
148
149 if( const SIM_MODEL::PARAM* dc = m_model.FindParam( "dc" ) )
150 paramValue = dc->value;
151
152 if( paramValue == "hi-Z" )
153 {
154 kparams.m_waveform = static_cast<KIBIS_WAVEFORM*>( new KIBIS_WAVEFORM_HIGH_Z( &kibis ) );
155 }
156 else if( paramValue == "low" )
157 {
158 kparams.m_waveform = static_cast<KIBIS_WAVEFORM*>( new KIBIS_WAVEFORM_STUCK_LOW( &kibis ) );
159 }
160 else if( paramValue == "high" )
161 {
162 kparams.m_waveform = static_cast<KIBIS_WAVEFORM*>( new KIBIS_WAVEFORM_STUCK_HIGH( &kibis ) );
163 }
164
165 if( diffMode )
166 kpin->writeSpiceDiffDriver( &result, aItem.modelName, *kmodel, kparams );
167 else
168 kpin->writeSpiceDriver( &result, aItem.modelName, *kmodel, kparams );
169 break;
170 }
171
172 case SIM_MODEL::TYPE::KIBIS_DRIVER_RECT:
173 {
175
176 if( const SIM_MODEL::PARAM* ton = m_model.FindParam( "ton" ) )
177 waveform->m_ton = SIM_VALUE::ToDouble( ton->value, 0 );
178
179 if( const SIM_MODEL::PARAM* toff = m_model.FindParam( "toff" ) )
180 waveform->m_toff = SIM_VALUE::ToDouble( toff->value, 0 );
181
182 if( const SIM_MODEL::PARAM* td = m_model.FindParam( "td" ) )
183 waveform->m_delay = SIM_VALUE::ToDouble( td->value, 0 );
184
185 if( const SIM_MODEL::PARAM* n = m_model.FindParam( "n" ) )
186 waveform->m_cycles = SIM_VALUE::ToInt( n->value, 1 );
187
188 kparams.m_waveform = waveform;
189
190 if( diffMode )
191 kpin->writeSpiceDiffDriver( &result, aItem.modelName, *kmodel, kparams );
192 else
193 kpin->writeSpiceDriver( &result, aItem.modelName, *kmodel, kparams );
194 break;
195 }
196
197 case SIM_MODEL::TYPE::KIBIS_DRIVER_PRBS:
198 {
199 KIBIS_WAVEFORM_PRBS* waveform = new KIBIS_WAVEFORM_PRBS( &kibis );
200
201 if( const SIM_MODEL::PARAM* f0 = m_model.FindParam( "f0" ) )
202 waveform->m_bitrate = SIM_VALUE::ToDouble( f0->value, 0 );
203
204 if( const SIM_MODEL::PARAM* td = m_model.FindParam( "td" ) )
205 waveform->m_delay = SIM_VALUE::ToDouble( td->value, 0 );
206
207 if( const SIM_MODEL::PARAM* n = m_model.FindParam( "n" ) )
208 waveform->m_bits = SIM_VALUE::ToInt( n->value, 0 );
209
210 kparams.m_waveform = waveform;
211
212 if( diffMode )
213 kpin->writeSpiceDiffDriver( &result, aItem.modelName, *kmodel, kparams );
214 else
215 kpin->writeSpiceDriver( &result, aItem.modelName, *kmodel, kparams );
216 break;
217 }
218
219 default:
220 wxFAIL_MSG( "Unknown IBIS model type" );
221 return "";
222 }
223
224 return result;
225}
226
227
229 SIM_MODEL( aType, std::make_unique<SPICE_GENERATOR_IBIS>( *this ) ),
230 m_enableDiff( false ),
231 m_sourceModel( nullptr )
232{
233 static std::vector<PARAM::INFO> device = makeParamInfos( TYPE::KIBIS_DEVICE );
234 static std::vector<PARAM::INFO> dcDriver = makeParamInfos( TYPE::KIBIS_DRIVER_DC );
235 static std::vector<PARAM::INFO> rectDriver = makeParamInfos( TYPE::KIBIS_DRIVER_RECT );
236 static std::vector<PARAM::INFO> prbsDriver = makeParamInfos( TYPE::KIBIS_DRIVER_PRBS );
237
238 std::vector<PARAM::INFO>* paramInfos = nullptr;
239
240 switch( aType )
241 {
242 case SIM_MODEL::TYPE::KIBIS_DEVICE: paramInfos = &device; break;
243 case SIM_MODEL::TYPE::KIBIS_DRIVER_DC: paramInfos = &dcDriver; break;
244 case SIM_MODEL::TYPE::KIBIS_DRIVER_RECT: paramInfos = &rectDriver; break;
245 case SIM_MODEL::TYPE::KIBIS_DRIVER_PRBS: paramInfos = &prbsDriver; break;
246
247 default:
248 wxFAIL;
249 return;
250 }
251
252 for( const PARAM::INFO& paramInfo : *paramInfos )
253 AddParam( paramInfo );
254
255 SwitchSingleEndedDiff( false );
256}
257
258
260{
261 ClearPins();
262
263 if( aDiff )
264 {
265 AddPin( { "GND", "1" } );
266 AddPin( { "+", "2" } );
267 AddPin( { "-", "3" } );
268 }
269 else
270 {
271 AddPin( { "GND", "1" } );
272 AddPin( { "IN/OUT", "2" } );
273 }
274}
275
277 SIM_MODEL_IBIS( aType )
278{
279 for( PARAM& param1 : m_params )
280 {
281 for( auto& param2refwrap : aSource.GetParams() )
282 {
283 const PARAM& param2 = param2refwrap.get();
284
285 if( param1.info.name == param2.info.name )
286 param1.value = param2.value;
287 }
288 }
289
291
292 m_ibisPins = aSource.GetIbisPins();
293 m_ibisModels = aSource.GetIbisModels();
294
295 m_enableDiff = aSource.CanDifferential();
296}
297
298
299bool SIM_MODEL_IBIS::ChangePin( const SIM_LIBRARY_IBIS& aLib, std::string aPinNumber )
300{
301 KIBIS_COMPONENT* kcomp = aLib.m_kibis.GetComponent( std::string( GetComponentName() ) );
302
303 if( !kcomp )
304 return false;
305
306 KIBIS_PIN* kpin = kcomp->GetPin( std::string( aPinNumber.c_str() ) );
307
308 if( !kpin )
309 return false;
310
311 m_ibisModels.clear();
312
313 for( KIBIS_MODEL* kmodel : kpin->m_models )
314 m_ibisModels.push_back( kmodel->m_name );
315
316 return true;
317}
318
319
321{
322 // Actual base models can only be of the same type, which is not the case here, as in addition
323 // to IBIS device model type we have multiple types of drivers available for the same sourced
324 // model. And we don't want to inherit the default values anyway. So we just store these models
325 // and use the only for Spice code generation.
326 m_sourceModel = dynamic_cast<const SIM_MODEL_IBIS*>( &aBaseModel );
327}
328
329
330std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_IBIS::makeParamInfos( TYPE aType )
331{
332 std::vector<PARAM::INFO> paramInfos;
333 PARAM::INFO paramInfo;
334
335 paramInfo.name = "vcc";
336 paramInfo.type = SIM_VALUE::TYPE_STRING;
337 paramInfo.unit = "";
339 paramInfo.defaultValue = "typ";
340 paramInfo.description = _( "Power supply" );
341 paramInfo.spiceModelName = "";
342 paramInfo.enumValues = { "typ", "min", "max" };
343 paramInfos.push_back( paramInfo );
344
345 paramInfo.name = "rpin";
346 paramInfo.type = SIM_VALUE::TYPE_STRING;
347 paramInfo.unit = "";
349 paramInfo.defaultValue = "typ";
350 paramInfo.description = _( "Parasitic pin resistance" );
351 paramInfo.spiceModelName = "";
352 paramInfo.enumValues = { "typ", "min", "max" };
353 paramInfos.push_back( paramInfo );
354
355 paramInfo.name = "lpin";
356 paramInfo.type = SIM_VALUE::TYPE_STRING;
357 paramInfo.unit = "";
359 paramInfo.defaultValue = "typ";
360 paramInfo.description = _( "Parasitic pin inductance" );
361 paramInfo.spiceModelName = "";
362 paramInfo.enumValues = { "typ", "min", "max" };
363 paramInfos.push_back( paramInfo );
364
365 paramInfo.name = "cpin";
366 paramInfo.type = SIM_VALUE::TYPE_STRING;
367 paramInfo.unit = "";
369 paramInfo.defaultValue = "typ";
370 paramInfo.description = _( "Parasitic pin capacitance" );
371 paramInfo.spiceModelName = "";
372 paramInfo.enumValues = { "typ", "min", "max" };
373 paramInfos.push_back( paramInfo );
374
375 std::vector<PARAM::INFO> dc = makeDcWaveformParamInfos();
376 std::vector<PARAM::INFO> rect = makeRectWaveformParamInfos();
377 std::vector<PARAM::INFO> prbs = makePrbsWaveformParamInfos();
378
379 switch( aType )
380 {
381 case TYPE::KIBIS_DRIVER_DC:
382 for( const PARAM::INFO& param : makeDcWaveformParamInfos() )
383 paramInfos.push_back( param );
384 break;
385
386 case TYPE::KIBIS_DRIVER_RECT:
387 for( const PARAM::INFO& param : makeRectWaveformParamInfos() )
388 paramInfos.push_back( param );
389 break;
390
391 case TYPE::KIBIS_DRIVER_PRBS:
392 for( const PARAM::INFO& param : makePrbsWaveformParamInfos() )
393 paramInfos.push_back( param );
394 break;
395
396 default:
397 break;
398 }
399
400 return paramInfos;
401}
402
403
404std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_IBIS::makeDcWaveformParamInfos()
405{
406 std::vector<PARAM::INFO> paramInfos;
407 PARAM::INFO paramInfo;
408
409 paramInfo.name = "dc";
410 paramInfo.type = SIM_VALUE::TYPE_STRING;
411 paramInfo.unit = "";
413 paramInfo.defaultValue = "hi-Z";
414 paramInfo.description = _( "DC Value" );
415 paramInfo.enumValues = { "hi-Z", "low", "high" };
416 paramInfos.push_back( paramInfo );
417
418 return paramInfos;
419}
420
421
422std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_IBIS::makeRectWaveformParamInfos()
423{
424 std::vector<PARAM::INFO> paramInfos;
425 PARAM::INFO paramInfo;
426
427 paramInfo.name = "ton";
428 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
429 paramInfo.unit = "s";
431 paramInfo.defaultValue = "";
432 paramInfo.description = _( "ON time" );
433 paramInfos.push_back( paramInfo );
434
435 paramInfo.name = "toff";
436 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
437 paramInfo.unit = "s";
439 paramInfo.defaultValue = "";
440 paramInfo.description = _( "OFF time" );
441 paramInfos.push_back( paramInfo );
442
443 paramInfo.name = "td";
444 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
445 paramInfo.unit = "s";
447 paramInfo.defaultValue = "0";
448 paramInfo.description = _( "Delay" );
449 paramInfos.push_back( paramInfo );
450
451 paramInfo.name = "n";
452 paramInfo.type = SIM_VALUE::TYPE_INT;
453 paramInfo.unit = "";
455 paramInfo.defaultValue = "1";
456 paramInfo.description = _( "Number of cycles" );
457 paramInfos.push_back( paramInfo );
458
459 return paramInfos;
460}
461
462
463std::vector<SIM_MODEL::PARAM::INFO> SIM_MODEL_IBIS::makePrbsWaveformParamInfos()
464{
465 std::vector<PARAM::INFO> paramInfos;
466 PARAM::INFO paramInfo;
467
468 paramInfo.name = "f0";
469 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
470 paramInfo.unit = "Hz";
472 paramInfo.defaultValue = "";
473 paramInfo.description = _( "Bitrate" );
474 paramInfos.push_back( paramInfo );
475
476 paramInfo.name = "td";
477 paramInfo.type = SIM_VALUE::TYPE_FLOAT;
478 paramInfo.unit = "s";
480 paramInfo.defaultValue = "";
481 paramInfo.description = _( "Delay" );
482 paramInfos.push_back( paramInfo );
483
484 paramInfo.name = "n";
485 paramInfo.type = SIM_VALUE::TYPE_INT;
486 paramInfo.unit = "";
488 paramInfo.defaultValue = "";
489 paramInfo.description = _( "Number of bits" );
490 paramInfos.push_back( paramInfo );
491
492 return paramInfos;
493}
494
bool m_valid
Definition: kibis.h:49
KIBIS_PIN * GetPin(std::string aPinNumber)
Get a pin by its number ( 1, 2, A1, A2, ... )
Definition: kibis.cpp:331
std::string m_name
Definition: kibis.h:219
IBIS_CORNER m_supply
Definition: kibis.h:189
IBIS_CORNER m_Cpin
Definition: kibis.h:187
IBIS_CORNER m_Lpin
Definition: kibis.h:186
IBIS_CORNER m_Rpin
Definition: kibis.h:185
void SetCornerFromString(IBIS_CORNER &aCorner, std::string aString)
Definition: kibis.cpp:1426
KIBIS_WAVEFORM * m_waveform
Definition: kibis.h:190
bool writeSpiceDiffDriver(std::string *aDest, std::string aName, KIBIS_MODEL &aModel, KIBIS_PARAMETER &aParam)
Definition: kibis.cpp:1309
bool writeSpiceDiffDevice(std::string *aDest, std::string aName, KIBIS_MODEL &aModel, KIBIS_PARAMETER &aParam)
Definition: kibis.cpp:1360
std::vector< KIBIS_MODEL * > m_models
Definition: kibis.h:334
bool writeSpiceDriver(std::string *aDest, std::string aName, KIBIS_MODEL &aModel, KIBIS_PARAMETER &aParam)
Definition: kibis.cpp:1135
bool writeSpiceDevice(std::string *aDest, std::string aName, KIBIS_MODEL &aModel, KIBIS_PARAMETER &aParam)
Definition: kibis.cpp:1257
double m_delay
Definition: kibis.h:116
double m_bitrate
Definition: kibis.h:115
Definition: kibis.h:433
KIBIS_COMPONENT * GetComponent(std::string aName)
Return the component with name aName .
Definition: kibis.cpp:1415
KIBIS_MODEL * GetModel(std::string aName)
Return the model with name aName .
Definition: kibis.cpp:1404
REPORTER * m_reporter
Definition: kibis.h:442
std::string m_cacheDir
Absolute path of the directory that will be used for caching.
Definition: kibis.h:448
Container for project specific data.
Definition: project.h:62
A pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:71
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
static wxString ResolveLibraryPath(const wxString &aLibraryPath, const PROJECT *aProject, REPORTER &aReporter)
Definition: sim_lib_mgr.cpp:56
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()
static std::vector< PARAM::INFO > makePrbsWaveformParamInfos()
std::vector< std::pair< std::string, std::string > > GetIbisPins() const
void SwitchSingleEndedDiff(bool aDiff) override
bool ChangePin(const SIM_LIBRARY_IBIS &aLib, std::string aPinNumber)
update the list of available models based on the pin number.
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
static std::vector< PARAM::INFO > makeParamInfos(TYPE aType)
std::string GetComponentName() const
void AddParam(const PARAM::INFO &aInfo)
Definition: sim_model.cpp:720
void ClearPins()
Definition: sim_model.cpp:702
void AddPin(const SIM_MODEL_PIN &aPin)
Definition: sim_model.cpp:696
static std::string GetFieldValue(const std::vector< SCH_FIELD > *aFields, const wxString &aFieldName, bool aResolve=true)
Definition: sim_model.cpp:645
const PARAM * FindParam(const std::string &aParamName) const
Definition: sim_model.cpp:809
std::vector< PARAM > m_params
Definition: sim_model.h:540
std::vector< std::reference_wrapper< const PARAM > > GetParams() const
Definition: sim_model.cpp:817
TYPE GetType() const
Definition: sim_model.h:464
@ 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:418
static int ToInt(const std::string &aString, int aDefault=-1)
Definition: sim_value.cpp:443
std::vector< std::string > CurrentNames(const SPICE_ITEM &aItem) const override
std::string IbisDevice(const SPICE_ITEM &aItem, const PROJECT &aProject, const wxString &aCacheDir, REPORTER &aReporter) const
std::string ModelLine(const SPICE_ITEM &aItem) const override
std::vector< std::reference_wrapper< const SIM_MODEL::PARAM > > GetInstanceParams() 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:164
bool HasMessage() const override
Returns true if the reporter client is non-empty.
Definition: reporter.cpp:80
#define _(s)
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:39
STL namespace.
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
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