KiCad PCB EDA Suite
|
#include <sim_model.h>
Classes | |
struct | PARAM |
struct | PIN |
struct | SPICE_INFO |
Public Member Functions | |
DEFINE_ENUM_CLASS_WITH_ITERATOR (DEVICE_T, NONE, R, C, L, TLINE, SW, D, NPN, PNP, NJFET, PJFET, NMES, PMES, NMOS, PMOS, V, I, E, F, G, H, SUBCKT, XSPICE, KIBIS, SPICE) struct DEVICE_INFO | |
DEFINE_ENUM_CLASS_WITH_ITERATOR (TYPE, NONE, R, R_POT, R_BEHAVIORAL, C, C_BEHAVIORAL, L, L_MUTUAL, L_BEHAVIORAL, 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_VCL, V_CCL, V_PWL, V_WHITENOISE, V_PINKNOISE, V_BURSTNOISE, V_RANDUNIFORM, V_RANDNORMAL, V_RANDEXP, V_BEHAVIORAL, I, I_SIN, I_PULSE, I_EXP, I_VCL, I_CCL, I_PWL, I_WHITENOISE, I_PINKNOISE, I_BURSTNOISE, I_RANDUNIFORM, I_RANDNORMAL, I_RANDEXP, I_BEHAVIORAL, SUBCKT, XSPICE, KIBIS_DEVICE, KIBIS_DRIVER_DC, KIBIS_DRIVER_RECT, KIBIS_DRIVER_PRBS, RAWSPICE) struct INFO | |
const SPICE_GENERATOR & | SpiceGenerator () const |
const SIM_MODEL_SERIALIZER & | Serializer () const |
virtual | ~SIM_MODEL () |
SIM_MODEL ()=delete | |
SIM_MODEL (const SIM_MODEL &aOther)=delete | |
SIM_MODEL (SIM_MODEL &&aOther)=default | |
SIM_MODEL & | operator= (SIM_MODEL &&aOther)=delete |
template<typename T > | |
void | ReadDataFields (const std::vector< T > *aFields, const std::vector< LIB_PIN * > &aPins) |
template<typename T > | |
void | WriteFields (std::vector< T > &aFields) const |
SPICE_INFO | GetSpiceInfo () const |
void | AddPin (const PIN &aPin) |
void | ClearPins () |
int | FindModelPinIndex (const std::string &aSymbolPinNumber) |
void | AddParam (const PARAM::INFO &aInfo) |
DEVICE_INFO | GetDeviceInfo () const |
INFO | GetTypeInfo () const |
DEVICE_T | GetDeviceType () const |
TYPE | GetType () const |
const SIM_MODEL * | GetBaseModel () const |
virtual void | SetBaseModel (const SIM_MODEL &aBaseModel) |
virtual std::vector< std::string > | GetPinNames () const |
int | GetPinCount () const |
const PIN & | GetPin (unsigned aIndex) const |
std::vector< std::reference_wrapper< const PIN > > | GetPins () const |
void | SetPinSymbolPinNumber (int aPinIndex, const std::string &aSymbolPinNumber) |
virtual void | SetPinSymbolPinNumber (const std::string &aPinName, const std::string &aSymbolPinNumber) |
int | GetParamCount () const |
virtual const PARAM & | GetParam (unsigned aParamIndex) const |
virtual const PARAM * | GetTunerParam () const |
const PARAM * | FindParam (const std::string &aParamName) const |
std::vector< std::reference_wrapper< const PARAM > > | GetParams () const |
const PARAM & | GetParamOverride (unsigned aParamIndex) const |
const PARAM & | GetBaseParam (unsigned aParamIndex) const |
void | SetParamValue (int aParamIndex, const std::string &aValue, SIM_VALUE::NOTATION aNotation=SIM_VALUE::NOTATION::SI) |
void | SetParamValue (const std::string &aParamName, const std::string &aValue, SIM_VALUE::NOTATION aNotation=SIM_VALUE::NOTATION::SI) |
virtual bool | HasAutofill () const |
virtual bool | HasPrimaryValue () const |
void | SetIsEnabled (bool aIsEnabled) |
bool | IsEnabled () const |
void | SetIsStoredInValue (bool aIsStoredInValue) |
bool | IsStoredInValue () const |
virtual void | SwitchSingleEndedDiff (bool aDiff) |
template<> | |
void | ReadDataFields (const std::vector< SCH_FIELD > *aFields, const std::vector< LIB_PIN * > &aPins) |
template<> | |
void | ReadDataFields (const std::vector< LIB_FIELD > *aFields, const std::vector< LIB_PIN * > &aPins) |
template<> | |
void | WriteFields (std::vector< SCH_FIELD > &aFields) const |
template<> | |
void | WriteFields (std::vector< LIB_FIELD > &aFields) const |
template<> | |
std::string | GetFieldValue (const std::vector< void > *aFields, const wxString &aFieldName, bool aResolve) |
Static Public Member Functions | |
static DEVICE_INFO | DeviceInfo (DEVICE_T aDeviceType) |
static INFO | TypeInfo (TYPE aType) |
static SPICE_INFO | SpiceInfo (TYPE aType) |
template<typename T > | |
static TYPE | ReadTypeFromFields (const std::vector< T > &aFields, REPORTER &aReporter) |
static std::unique_ptr< SIM_MODEL > | Create (TYPE aType, const std::vector< LIB_PIN * > &aPins, REPORTER &aReporter) |
static std::unique_ptr< SIM_MODEL > | Create (const SIM_MODEL *aBaseModel, const std::vector< LIB_PIN * > &aPins, REPORTER &aReporter) |
template<typename T > | |
static std::unique_ptr< SIM_MODEL > | Create (const SIM_MODEL *aBaseModel, const std::vector< LIB_PIN * > &aPins, const std::vector< T > &aFields, REPORTER &aReporter) |
template<typename T > | |
static std::unique_ptr< SIM_MODEL > | Create (const std::vector< T > &aFields, const std::vector< LIB_PIN * > &aPins, bool aResolved, REPORTER &aReporter) |
template<typename T > | |
static std::string | GetFieldValue (const std::vector< T > *aFields, const wxString &aFieldName, bool aResolve=true) |
template<typename T > | |
static void | SetFieldValue (std::vector< T > &aFields, const wxString &aFieldName, const std::string &aValue) |
template<class T_symbol , class T_field > | |
static bool | InferSimModel (T_symbol &aSymbol, std::vector< T_field > *aFields, bool aResolve, SIM_VALUE_GRAMMAR::NOTATION aNotation, wxString *aDeviceType, wxString *aModelType, wxString *aModelParams, wxString *aPinMap) |
template<class T_symbol , class T_field > | |
static void | MigrateSimModel (T_symbol &aSymbol, const PROJECT *aProject) |
Protected Member Functions | |
SIM_MODEL (TYPE aType) | |
SIM_MODEL (TYPE aType, std::unique_ptr< SPICE_GENERATOR > aSpiceGenerator) | |
SIM_MODEL (TYPE aType, std::unique_ptr< SPICE_GENERATOR > aSpiceGenerator, std::unique_ptr< SIM_MODEL_SERIALIZER > aSerializer) | |
void | createPins (const std::vector< LIB_PIN * > &aSymbolPins) |
virtual int | doFindParam (const std::string &aParamName) const |
virtual void | doSetParamValue (int aParamIndex, const std::string &aValue) |
Static Protected Member Functions | |
static std::unique_ptr< SIM_MODEL > | Create (TYPE aType) |
Protected Attributes | |
std::vector< PARAM > | m_params |
std::vector< PIN > | m_pins |
const SIM_MODEL * | m_baseModel |
std::unique_ptr< SIM_MODEL_SERIALIZER > | m_serializer |
Private Member Functions | |
template<typename T > | |
void | doReadDataFields (const std::vector< T > *aFields, const std::vector< LIB_PIN * > &aPins) |
template<typename T > | |
void | doWriteFields (std::vector< T > &aFields) const |
virtual bool | requiresSpiceModelLine (const SPICE_ITEM &aItem) const |
Private Attributes | |
std::unique_ptr< SPICE_GENERATOR > | m_spiceGenerator |
const TYPE | m_type |
bool | m_isEnabled |
bool | m_isStoredInValue |
Friends | |
class | SPICE_GENERATOR |
class | NETLIST_EXPORTER_SPICE |
Definition at line 69 of file sim_model.h.
|
virtualdefault |
|
delete |
|
delete |
|
default |
|
protected |
Definition at line 963 of file sim_model.cpp.
|
protected |
Definition at line 970 of file sim_model.cpp.
|
protected |
Definition at line 977 of file sim_model.cpp.
void SIM_MODEL::AddParam | ( | const PARAM::INFO & | aInfo | ) |
Definition at line 726 of file sim_model.cpp.
References SIM_MODEL::PARAM::INFO::defaultValue, SIM_MODEL::PARAM::INFO::enumValues, and m_params.
Referenced by SPICE_MODEL_PARSER_SUBCKT::ReadModel(), SIM_MODEL_SUBCKT::SetBaseModel(), SIM_MODEL_BEHAVIORAL::SIM_MODEL_BEHAVIORAL(), SIM_MODEL_IDEAL::SIM_MODEL_IDEAL(), SIM_MODEL_KIBIS::SIM_MODEL_KIBIS(), SIM_MODEL_L_MUTUAL::SIM_MODEL_L_MUTUAL(), SIM_MODEL_NGSPICE::SIM_MODEL_NGSPICE(), SIM_MODEL_R_POT::SIM_MODEL_R_POT(), SIM_MODEL_SOURCE::SIM_MODEL_SOURCE(), SIM_MODEL_SPICE_FALLBACK::SIM_MODEL_SPICE_FALLBACK(), SIM_MODEL_SWITCH::SIM_MODEL_SWITCH(), and SIM_MODEL_TLINE::SIM_MODEL_TLINE().
void SIM_MODEL::AddPin | ( | const PIN & | aPin | ) |
Definition at line 702 of file sim_model.cpp.
References m_pins.
Referenced by createPins(), SPICE_MODEL_PARSER_SUBCKT::ReadModel(), SIM_MODEL_SUBCKT::SetBaseModel(), and SIM_MODEL_KIBIS::SwitchSingleEndedDiff().
void SIM_MODEL::ClearPins | ( | ) |
Definition at line 708 of file sim_model.cpp.
References m_pins.
Referenced by SIM_MODEL_KIBIS::SwitchSingleEndedDiff().
|
static |
Definition at line 505 of file sim_model.cpp.
References _, Create(), GetType(), IO_ERROR::Problem(), ReadTypeFromFields(), REFERENCE_FIELD, REPORTER::Report(), and RPT_SEVERITY_ERROR.
|
static |
Definition at line 467 of file sim_model.cpp.
|
static |
Definition at line 564 of file sim_model.cpp.
References _, Create(), GetFieldValue(), IO_ERROR::Problem(), ReadTypeFromFields(), REFERENCE_FIELD, REPORTER::Report(), RPT_SEVERITY_ERROR, SIM_PARAMS_FIELD, SIM_PINS_FIELD, SIM_VALUE_FIELD, and IO_ERROR::What().
Definition at line 878 of file sim_model.cpp.
|
static |
Definition at line 448 of file sim_model.cpp.
References Create().
Referenced by SIM_MODEL_SPICE::Create(), Create(), SIM_LIB_MGR::CreateModel(), SIM_MODEL_SPICE_FALLBACK::GetPinNames(), MigrateSimModel(), SIM_LIBRARY_KIBIS::ReadFile(), and SIM_MODEL_SPICE_FALLBACK::SIM_MODEL_SPICE_FALLBACK().
|
protected |
Definition at line 989 of file sim_model.cpp.
References AddPin(), and GetPinNames().
Referenced by doReadDataFields().
|
inline |
Definition at line 79 of file sim_model.h.
|
inline |
Definition at line 124 of file sim_model.h.
|
static |
Definition at line 56 of file sim_model.cpp.
Referenced by equivalent(), GetDeviceInfo(), MigrateSimModel(), DIALOG_SIM_MODEL< T_symbol, T_field >::onDeviceTypeChoice(), ReadTypeFromFields(), DIALOG_SIM_MODEL< T_symbol, T_field >::updateBuiltinModelWidgets(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateIbisWidgets().
|
protectedvirtual |
Reimplemented in SIM_MODEL_NGSPICE, and SIM_MODEL_SPICE_FALLBACK.
Definition at line 800 of file sim_model.cpp.
References GetParams().
Referenced by FindParam(), and SetParamValue().
|
private |
Definition at line 1025 of file sim_model.cpp.
References createPins(), SIM_LIBRARY_KIBIS::DIFF_FIELD, GetFieldValue(), m_serializer, SIM_ENABLE_FIELD, SIM_PARAMS_FIELD, SIM_PINS_FIELD, SIM_VALUE_FIELD, and SwitchSingleEndedDiff().
Referenced by ReadDataFields().
|
protectedvirtual |
Reimplemented in SIM_MODEL_SOURCE.
Definition at line 848 of file sim_model.cpp.
References m_params.
Referenced by SIM_MODEL_SOURCE::doSetParamValue(), and SetParamValue().
|
private |
Definition at line 1044 of file sim_model.cpp.
References IsStoredInValue(), m_serializer, MANDATORY_FIELDS, SetFieldValue(), SIM_DEVICE_TYPE_FIELD, SIM_ENABLE_FIELD, SIM_PARAMS_FIELD, SIM_PINS_FIELD, SIM_TYPE_FIELD, and SIM_VALUE_FIELD.
Referenced by WriteFields().
int SIM_MODEL::FindModelPinIndex | ( | const std::string & | aSymbolPinNumber | ) |
Definition at line 714 of file sim_model.cpp.
References GetPin(), GetPinCount(), SIM_MODEL::PIN::NOT_CONNECTED, and SIM_MODEL::PIN::symbolPinNumber.
Referenced by SCH_EDITOR_CONTROL::SimProbe().
const SIM_MODEL::PARAM * SIM_MODEL::FindParam | ( | const std::string & | aParamName | ) | const |
Definition at line 814 of file sim_model.cpp.
References doFindParam(), and GetParam().
Referenced by TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToUsualDiodeModel(), SPICE_GENERATOR_SOURCE::getParamValueString(), SIM_MODEL_R_POT::GetTunerParam(), SPICE_GENERATOR_KIBIS::IbisDevice(), SPICE_GENERATOR_SOURCE::ItemLine(), SPICE_GENERATOR_R_POT::ModelLine(), SPICE_GENERATOR_TLINE::ModelLine(), and TEST_SIM_LIBRARY_SPICE_FIXTURE::TestTransistor().
|
inline |
Definition at line 471 of file sim_model.h.
References m_baseModel.
Referenced by SIM_MODEL_SERIALIZER::GenerateParams(), SPICE_GENERATOR_SPICE::Preview(), and SIM_MODEL_SUBCKT::SetBaseModel().
const SIM_MODEL::PARAM & SIM_MODEL::GetBaseParam | ( | unsigned | aParamIndex | ) | const |
Definition at line 839 of file sim_model.cpp.
References GetParam(), m_baseModel, and m_params.
|
inline |
Definition at line 465 of file sim_model.h.
References DeviceInfo(), and GetDeviceType().
Referenced by SIM_MODEL_SERIALIZER::GenerateDevice(), SIM_MODEL_SERIALIZER::GenerateValue(), TEST_SIM_LIBRARY_SPICE_FIXTURE::TestTransistor(), TUNER_SLIDER::TUNER_SLIDER(), DIALOG_SIM_MODEL< T_symbol, T_field >::updateBuiltinModelWidgets(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateIbisWidgets().
|
inline |
Definition at line 468 of file sim_model.h.
References GetTypeInfo().
Referenced by SIM_MODEL_NGSPICE::canSilentlyIgnoreParam(), GetDeviceInfo(), SIM_MODEL_SOURCE::GetPinNames(), DIALOG_SIM_MODEL< T_symbol, T_field >::updateBuiltinModelWidgets(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateIbisWidgets().
|
static |
Definition at line 621 of file sim_model.cpp.
Referenced by Create(), SIM_LIB_MGR::CreateModel(), doReadDataFields(), SPICE_GENERATOR_KIBIS::IbisDevice(), InferSimModel(), DIALOG_SIM_MODEL< T_symbol, T_field >::loadLibrary(), ReadTypeFromFields(), DIALOG_SIM_MODEL< T_symbol, T_field >::TransferDataFromWindow(), DIALOG_SIM_MODEL< T_symbol, T_field >::TransferDataToWindow(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateWidgets().
std::string SIM_MODEL::GetFieldValue | ( | const std::vector< void > * | aFields, |
const wxString & | aFieldName, | ||
bool | aResolve | ||
) |
Definition at line 644 of file sim_model.cpp.
|
virtual |
Reimplemented in SIM_MODEL_KIBIS.
Definition at line 785 of file sim_model.cpp.
References GetParam(), m_baseModel, and m_params.
Referenced by DIALOG_SIM_MODEL< T_symbol, T_field >::addParamPropertyIfRelevant(), TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToEmptyModel(), SIM_MODEL_SOURCE::doSetParamValue(), FindParam(), SIM_MODEL_SERIALIZER::GenerateParams(), GetBaseParam(), SIM_PROPERTY::GetParam(), GetParam(), GetParams(), SIM_MODEL_IDEAL::GetTunerParam(), SPICE_GENERATOR_BEHAVIORAL::ItemLine(), SPICE_GENERATOR_IDEAL::ItemLine(), SPICE_GENERATOR_SOURCE::ItemLine(), SPICE_GENERATOR_RAW_SPICE::ItemName(), DIALOG_SIM_MODEL< T_symbol, T_field >::newParamProperty(), SIM_MODEL_SERIALIZER::ParseParams(), SPICE_MODEL_PARSER::ReadModel(), SIM_BOOL_PROPERTY::SIM_BOOL_PROPERTY(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateBuiltinModelWidgets().
|
inline |
Definition at line 486 of file sim_model.h.
References m_params.
Referenced by TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToEmptyModel(), SIM_MODEL_SOURCE::doSetParamValue(), SIM_MODEL_SERIALIZER::GenerateParams(), GetParams(), SPICE_MODEL_PARSER::ReadModel(), requiresSpiceModelLine(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateModelParamsTab().
const SIM_MODEL::PARAM & SIM_MODEL::GetParamOverride | ( | unsigned | aParamIndex | ) | const |
Definition at line 833 of file sim_model.cpp.
References m_params.
Referenced by TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToEmptyModel(), SIM_MODEL_SERIALIZER::GenerateParams(), and SIM_MODEL_SERIALIZER::GenerateValue().
std::vector< std::reference_wrapper< const SIM_MODEL::PARAM > > SIM_MODEL::GetParams | ( | ) | const |
Definition at line 822 of file sim_model.cpp.
References GetParam(), and GetParamCount().
Referenced by doFindParam(), SIM_MODEL_NGSPICE::doFindParam(), SIM_MODEL_SPICE_FALLBACK::doFindParam(), SPICE_GENERATOR::GetInstanceParams(), SPICE_GENERATOR_SOURCE::ItemLine(), SPICE_GENERATOR::ModelLine(), SIM_MODEL_SUBCKT::SetBaseModel(), SIM_MODEL_NGSPICE::SetParamFromSpiceCode(), and SIM_MODEL_KIBIS::SIM_MODEL_KIBIS().
|
inline |
Definition at line 477 of file sim_model.h.
References m_pins.
Referenced by FindModelPinIndex(), DIALOG_SIM_MODEL< T_symbol, T_field >::getModelPinString(), GetPins(), SPICE_GENERATOR_SWITCH::GetPins(), DIALOG_SIM_MODEL< T_symbol, T_field >::removeOrphanedPinAssignments(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updatePinAssignments().
|
inline |
Definition at line 476 of file sim_model.h.
References m_pins.
Referenced by FindModelPinIndex(), GetPins(), SPICE_GENERATOR::ItemLine(), SPICE_GENERATOR_RAW_SPICE::Preview(), SPICE_MODEL_PARSER_SUBCKT::ReadModel(), DIALOG_SIM_MODEL< T_symbol, T_field >::removeOrphanedPinAssignments(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updatePinAssignments().
|
inlinevirtual |
Reimplemented in SIM_MODEL_BEHAVIORAL, SIM_MODEL_IDEAL, SIM_MODEL_NGSPICE, SIM_MODEL_R_POT, SIM_MODEL_SOURCE, SIM_MODEL_SPICE_FALLBACK, SIM_MODEL_SWITCH, and SIM_MODEL_TLINE.
Definition at line 474 of file sim_model.h.
Referenced by createPins(), and SCH_FIELD::OnScintillaCharAdded().
std::vector< std::reference_wrapper< const SIM_MODEL::PIN > > SIM_MODEL::GetPins | ( | ) | const |
Definition at line 745 of file sim_model.cpp.
References GetPin(), and GetPinCount().
Referenced by SIM_MODEL_SERIALIZER::GeneratePins(), SPICE_GENERATOR::GetPins(), SCH_EDIT_FRAME::RefreshOperatingPointDisplay(), and SIM_MODEL_SUBCKT::SetBaseModel().
|
inline |
Definition at line 457 of file sim_model.h.
References GetType(), and SpiceInfo().
Referenced by TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToEmptyModel(), TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToUsualDiodeModel(), SPICE_GENERATOR_SOURCE::ItemLine(), SPICE_GENERATOR::ItemName(), SPICE_GENERATOR::ModelLine(), and TEST_SIM_LIBRARY_SPICE_FIXTURE::TestTransistor().
|
inlinevirtual |
Reimplemented in SIM_MODEL_IDEAL, and SIM_MODEL_R_POT.
Definition at line 489 of file sim_model.h.
Referenced by SIMULATOR_FRAME_UI::AddTuner(), SIMULATOR_FRAME_UI::applyTuners(), TUNER_SLIDER::TUNER_SLIDER(), and SIMULATOR_FRAME_UI::UpdateTunerValue().
|
inline |
Definition at line 469 of file sim_model.h.
References m_type.
Referenced by SIM_MODEL_NGSPICE::canSilentlyIgnoreParam(), TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToUsualDiodeModel(), Create(), SIM_MODEL_NGSPICE::getModelType(), SIM_MODEL_SPICE_FALLBACK::GetPinNames(), SPICE_GENERATOR_SWITCH::GetPins(), GetSpiceInfo(), GetTypeInfo(), SIM_MODEL_SOURCE::HasPrimaryValue(), SPICE_GENERATOR_KIBIS::IbisDevice(), SPICE_GENERATOR_BEHAVIORAL::ItemLine(), SPICE_GENERATOR_SOURCE::ItemLine(), SPICE_GENERATOR_SWITCH::ItemLine(), SPICE_GENERATOR_TLINE::ModelLine(), SPICE_MODEL_PARSER::ReadType(), SetBaseModel(), TEST_SIM_LIBRARY_SPICE_FIXTURE::TestTransistor(), TUNER_SLIDER::TUNER_SLIDER(), DIALOG_SIM_MODEL< T_symbol, T_field >::updateBuiltinModelWidgets(), DIALOG_SIM_MODEL< T_symbol, T_field >::updateIbisWidgets(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updatePinAssignments().
|
inline |
Definition at line 466 of file sim_model.h.
References GetType(), and TypeInfo().
Referenced by SPICE_GENERATOR_NGSPICE::CurrentNames(), SIM_MODEL_SERIALIZER::GenerateType(), GetDeviceType(), TEST_SIM_LIBRARY_SPICE_FIXTURE::TestTransistor(), and TUNER_SLIDER::TUNER_SLIDER().
|
inlinevirtual |
Reimplemented in SIM_MODEL_SOURCE.
Definition at line 505 of file sim_model.h.
Referenced by SIM_MODEL_SERIALIZER::ParseParams(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateModelParamsTab().
|
inlinevirtual |
Reimplemented in SIM_MODEL_IDEAL, SIM_MODEL_R_POT, and SIM_MODEL_SOURCE.
Definition at line 506 of file sim_model.h.
Referenced by SIM_MODEL_SERIALIZER::GenerateParams(), SIM_MODEL_SERIALIZER::ParseParams(), SetIsStoredInValue(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateBuiltinModelWidgets().
|
static |
KiCad Spice PEGTL only handles ASCII Although these two look the same, they are U+03BC and U+00B5
Definition at line 1140 of file sim_model.cpp.
References GetFieldValue(), library, SIM_VALUE_GRAMMAR::SI, SIM_DEVICE_TYPE_FIELD, SIM_LIBRARY_FIELD, SIM_NAME_FIELD, SIM_PARAMS_FIELD, SIM_PINS_FIELD, SIM_TYPE_FIELD, SIM_VALUE_FIELD, and SIM_VALUE_GRAMMAR::SPICE.
Referenced by BOOST_AUTO_TEST_CASE(), SIM_LIB_MGR::CreateModel(), and DIALOG_SIM_MODEL< T_symbol, T_field >::TransferDataToWindow().
|
inline |
Definition at line 509 of file sim_model.h.
References m_isEnabled.
Referenced by SIM_MODEL_SERIALIZER::GenerateEnable().
|
inline |
Definition at line 516 of file sim_model.h.
References m_isStoredInValue.
Referenced by doWriteFields(), and SIM_MODEL_SERIALIZER::GenerateParams().
|
static |
Definition at line 1473 of file sim_model.cpp.
References Create(), SIM_LIB_MGR::CreateModel(), DEFAULT_SIZE_TEXT, DeviceInfo(), SIM_MODEL_SERIALIZER::GeneratePins(), BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), GR_TEXT_H_ALIGN_RIGHT, WX_STRING_REPORTER::HasMessage(), SIM_MODEL::SPICE_INFO::inlineTypeString, EDA_IU_SCALE::IU_PER_MILS, KiROUND(), SIM_LIBRARY::MODEL::model, schIUScale, Serializer(), SIM_DEVICE_TYPE_FIELD, SIM_LEGACY_DEVICE_TYPE_FIELD, SIM_LEGACY_ENABLE_FIELD, SIM_LEGACY_LIBRARY_FIELD, SIM_LEGACY_PINS_FIELD, SIM_LEGACY_TYPE_FIELD, SIM_LIBRARY_FIELD, SIM_NAME_FIELD, SIM_PARAMS_FIELD, SIM_PINS_FIELD, SIM_TYPE_FIELD, SIM_VALUE_GRAMMAR::SPICE, SpiceInfo(), TypeInfo(), and wxStringSplit().
void SIM_MODEL::ReadDataFields | ( | const std::vector< LIB_FIELD > * | aFields, |
const std::vector< LIB_PIN * > & | aPins | ||
) |
Definition at line 427 of file sim_model.cpp.
References doReadDataFields().
void SIM_MODEL::ReadDataFields | ( | const std::vector< SCH_FIELD > * | aFields, |
const std::vector< LIB_PIN * > & | aPins | ||
) |
Definition at line 419 of file sim_model.cpp.
References doReadDataFields().
void SIM_MODEL::ReadDataFields | ( | const std::vector< T > * | aFields, |
const std::vector< LIB_PIN * > & | aPins | ||
) |
Referenced by DIALOG_SIM_MODEL< T_symbol, T_field >::onWaveformChoice().
|
static |
Definition at line 381 of file sim_model.cpp.
References _, DeviceInfo(), GetFieldValue(), REFERENCE_FIELD, REPORTER::Report(), RPT_SEVERITY_ERROR, SIM_DEVICE_TYPE_FIELD, SIM_TYPE_FIELD, and TypeInfo().
Referenced by Create(), and DIALOG_SIM_MODEL< T_symbol, T_field >::TransferDataToWindow().
|
privatevirtual |
Reimplemented in SIM_MODEL_KIBIS, SIM_MODEL_RAW_SPICE, and SIM_MODEL_SWITCH.
Definition at line 1095 of file sim_model.cpp.
References SPICE_ITEM::baseModelName, GetParamCount(), SIM_MODEL::PARAM::info, SIM_MODEL::PARAM::INFO::isSpiceInstanceParam, m_baseModel, m_params, m_type, SIM_VALUE::Normalize(), SIM_VALUE::ToDouble(), and SIM_MODEL::PARAM::value.
Referenced by SPICE_GENERATOR::ModelLine(), and SPICE_GENERATOR::ModelName().
|
inline |
Definition at line 440 of file sim_model.h.
References m_serializer.
Referenced by MigrateSimModel().
|
virtual |
Reimplemented in SIM_MODEL_KIBIS, and SIM_MODEL_SUBCKT.
Definition at line 736 of file sim_model.cpp.
References GetType(), and m_baseModel.
Referenced by SIM_MODEL_SUBCKT::SetBaseModel().
|
static |
Definition at line 652 of file sim_model.cpp.
Referenced by doWriteFields(), and DIALOG_SIM_MODEL< T_symbol, T_field >::TransferDataFromWindow().
|
inline |
Definition at line 508 of file sim_model.h.
References m_isEnabled.
Referenced by SIM_MODEL_SERIALIZER::ParseEnable().
|
inline |
Definition at line 511 of file sim_model.h.
References HasPrimaryValue(), and m_isStoredInValue.
Referenced by SIM_LIB_MGR::CreateModel(), and SIM_MODEL_SERIALIZER::ParseValue().
void SIM_MODEL::SetParamValue | ( | const std::string & | aParamName, |
const std::string & | aValue, | ||
SIM_VALUE::NOTATION | aNotation = SIM_VALUE::NOTATION::SI |
||
) |
Definition at line 866 of file sim_model.cpp.
References doFindParam(), SetParamValue(), and THROW_IO_ERROR.
void SIM_MODEL::SetParamValue | ( | int | aParamIndex, |
const std::string & | aValue, | ||
SIM_VALUE::NOTATION | aNotation = SIM_VALUE::NOTATION::SI |
||
) |
Definition at line 854 of file sim_model.cpp.
References SIM_VALUE::ConvertNotation(), doSetParamValue(), and SIM_MODEL::PARAM::value.
Referenced by SIM_MODEL_SOURCE::doSetParamValue(), SIM_ENUM_PROPERTY::IntToValue(), SIM_BOOL_PROPERTY::OnSetValue(), SIM_MODEL_SERIALIZER::ParseParams(), SIM_MODEL_SERIALIZER::ParseValue(), SIM_MODEL_BEHAVIORAL::parseValueField(), SPICE_MODEL_PARSER::ReadModel(), SIM_MODEL_SPICE::SetParamFromSpiceCode(), SIM_MODEL_NGSPICE::SetParamFromSpiceCode(), SetParamValue(), SIM_STRING_PROPERTY::StringToValue(), and SIMULATOR_FRAME_UI::UpdateTunerValue().
|
virtual |
Reimplemented in SIM_MODEL_RAW_SPICE, and SIM_MODEL_SPICE_FALLBACK.
Definition at line 762 of file sim_model.cpp.
References _, m_pins, pin, and THROW_IO_ERROR.
void SIM_MODEL::SetPinSymbolPinNumber | ( | int | aPinIndex, |
const std::string & | aSymbolPinNumber | ||
) |
Definition at line 755 of file sim_model.cpp.
References m_pins.
Referenced by SIM_MODEL_SERIALIZER::ParsePins(), DIALOG_SIM_MODEL< T_symbol, T_field >::removeOrphanedPinAssignments(), and SIM_MODEL_SPICE_FALLBACK::SetPinSymbolPinNumber().
|
inline |
Definition at line 439 of file sim_model.h.
References m_spiceGenerator.
Referenced by SIMULATOR_FRAME_UI::applyTuners(), NETLIST_EXPORTER_SPICE::GetItemName(), NETLIST_EXPORTER_SPICE::readModel(), SCH_EDIT_FRAME::RefreshOperatingPointDisplay(), SCH_EDITOR_CONTROL::SimProbe(), SPICE_GENERATOR_IDEAL::TunerCommand(), SPICE_GENERATOR_R_POT::TunerCommand(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateModelCodeTab().
|
static |
Definition at line 237 of file sim_model.cpp.
Referenced by getFallbackType(), GetSpiceInfo(), MigrateSimModel(), and SPICE_MODEL_PARSER::ReadTypeFromSpiceStrings().
|
inlinevirtual |
Reimplemented in SIM_MODEL_KIBIS.
Definition at line 518 of file sim_model.h.
Referenced by doReadDataFields().
|
static |
Definition at line 97 of file sim_model.cpp.
Referenced by GetTypeInfo(), MigrateSimModel(), DIALOG_SIM_MODEL< T_symbol, T_field >::onTypeChoice(), DIALOG_SIM_MODEL< T_symbol, T_field >::onWaveformChoice(), ReadTypeFromFields(), DIALOG_SIM_MODEL< T_symbol, T_field >::TransferDataToWindow(), DIALOG_SIM_MODEL< T_symbol, T_field >::updateBuiltinModelWidgets(), and DIALOG_SIM_MODEL< T_symbol, T_field >::updateIbisWidgets().
void SIM_MODEL::WriteFields | ( | std::vector< LIB_FIELD > & | aFields | ) | const |
Definition at line 442 of file sim_model.cpp.
References doWriteFields().
void SIM_MODEL::WriteFields | ( | std::vector< SCH_FIELD > & | aFields | ) | const |
Definition at line 435 of file sim_model.cpp.
References doWriteFields().
void SIM_MODEL::WriteFields | ( | std::vector< T > & | aFields | ) | const |
Referenced by SIMULATOR_FRAME_UI::UpdateTunerValue().
|
friend |
Definition at line 73 of file sim_model.h.
|
friend |
Definition at line 72 of file sim_model.h.
|
protected |
Definition at line 553 of file sim_model.h.
Referenced by GetBaseModel(), GetBaseParam(), GetParam(), SIM_MODEL_RAW_SPICE::GetSource(), SIM_MODEL_SUBCKT::GetSpiceCode(), requiresSpiceModelLine(), and SetBaseModel().
|
private |
Definition at line 560 of file sim_model.h.
Referenced by IsEnabled(), and SetIsEnabled().
|
private |
Definition at line 561 of file sim_model.h.
Referenced by IsStoredInValue(), and SetIsStoredInValue().
|
protected |
Definition at line 551 of file sim_model.h.
Referenced by AddParam(), doSetParamValue(), SIM_MODEL_SOURCE::doSetParamValue(), GetBaseParam(), GetParam(), SIM_MODEL_KIBIS::GetParam(), GetParamCount(), GetParamOverride(), requiresSpiceModelLine(), and SIM_MODEL_KIBIS::SIM_MODEL_KIBIS().
|
protected |
Definition at line 552 of file sim_model.h.
Referenced by AddPin(), ClearPins(), GetPin(), GetPinCount(), SIM_MODEL_RAW_SPICE::SetPinSymbolPinNumber(), SIM_MODEL_SPICE_FALLBACK::SetPinSymbolPinNumber(), and SetPinSymbolPinNumber().
|
protected |
Definition at line 554 of file sim_model.h.
Referenced by doReadDataFields(), doWriteFields(), and Serializer().
|
private |
Definition at line 557 of file sim_model.h.
Referenced by SpiceGenerator().
|
private |
Definition at line 559 of file sim_model.h.
Referenced by GetType(), and requiresSpiceModelLine().