KiCad PCB EDA Suite
|
#include <kibis.h>
Public Member Functions | |
KIBIS_MODEL (KIBIS *aTopLevel, IbisModel &aSource, IbisParser &aParser) | |
bool | HasPulldown () |
Return true if the model has a pulldown transistor. More... | |
bool | HasPullup () |
Return true if the model has a pullup transistor. More... | |
bool | HasGNDClamp () |
Return true if the model has a clamp diode to the gnd net. More... | |
bool | HasPOWERClamp () |
Return true if the model has a clamp diode to the power net. More... | |
std::string | SpiceDie (KIBIS_PARAMETER &aParam, int aIndex) |
Generate the spice directive to simulate the die. More... | |
std::vector< std::pair< IbisWaveform *, IbisWaveform * > > | waveformPairs () |
Create waveform pairs. More... | |
std::string | generateSquareWave (std::string aNode1, std::string aNode2, std::vector< std::pair< int, double > > aBits, std::pair< IbisWaveform *, IbisWaveform * > aPair, KIBIS_PARAMETER &aParam) |
Generate a square waveform. More... | |
IbisWaveform | TrimWaveform (IbisWaveform &aIn) |
Copy a waveform, and substract the first value to all samples. More... | |
void | Report (std::string aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO) |
Print a message. More... | |
Public Attributes | |
std::string | m_name |
std::string | m_description |
IBIS_MODEL_TYPE | m_type = IBIS_MODEL_TYPE::UNDEFINED |
double | m_vinl = 0.8 |
double | m_vinh = 2 |
double | m_vref = 0 |
double | m_rref = 0 |
double | m_cref = 0 |
double | m_vmeas = 0 |
IBIS_MODEL_ENABLE | m_enable = IBIS_MODEL_ENABLE::UNDEFINED |
IBIS_MODEL_POLARITY | m_polarity = IBIS_MODEL_POLARITY::UNDEFINED |
TypMinMaxValue | m_C_comp |
TypMinMaxValue | m_voltageRange |
TypMinMaxValue | m_temperatureRange |
TypMinMaxValue | m_pullupReference |
TypMinMaxValue | m_pulldownReference |
TypMinMaxValue | m_GNDClampReference |
TypMinMaxValue | m_POWERClampReference |
TypMinMaxValue | m_Rgnd |
TypMinMaxValue | m_Rpower |
TypMinMaxValue | m_Rac |
TypMinMaxValue | m_Cac |
IVtable | m_GNDClamp |
IVtable | m_POWERClamp |
IVtable | m_pullup |
IVtable | m_pulldown |
std::vector< IbisWaveform * > | m_risingWaveforms |
std::vector< IbisWaveform * > | m_fallingWaveforms |
IbisRamp | m_ramp |
KIBIS * | m_topLevel |
bool | m_valid |
REPORTER * | m_reporter |
Protected Member Functions | |
std::string | doubleToString (double aNumber) |
Convert a double to string using scientific notation. More... | |
KIBIS_MODEL::KIBIS_MODEL | ( | KIBIS * | aTopLevel, |
IbisModel & | aSource, | ||
IbisParser & | aParser | ||
) |
Definition at line 241 of file kibis.cpp.
References IbisModel::m_C_comp, m_C_comp, IbisModel::m_Cac, m_Cac, IbisModel::m_cref, m_cref, m_description, IbisModel::m_enable, m_enable, IbisModel::m_fallingWaveforms, m_fallingWaveforms, IbisModel::m_GNDClamp, m_GNDClamp, IbisModel::m_GNDClampReference, m_GNDClampReference, IbisParser::m_ibisFile, IbisModelSelectorEntry::m_modelDescription, IbisModelSelectorEntry::m_modelName, IbisModelSelector::m_models, IbisFile::m_modelSelectors, IbisModel::m_name, m_name, IbisModel::m_polarity, m_polarity, IbisModel::m_POWERClamp, m_POWERClamp, IbisModel::m_POWERClampReference, m_POWERClampReference, IbisModel::m_pulldown, m_pulldown, IbisModel::m_pulldownReference, m_pulldownReference, IbisModel::m_pullup, m_pullup, IbisModel::m_pullupReference, m_pullupReference, IbisModel::m_Rac, m_Rac, IbisModel::m_ramp, m_ramp, IbisModel::m_Rgnd, m_Rgnd, IbisModel::m_risingWaveforms, m_risingWaveforms, IbisModel::m_Rpower, m_Rpower, IbisModel::m_rref, m_rref, IbisModel::m_temperatureRange, m_temperatureRange, IbisModel::m_type, m_type, KIBIS_ANY::m_valid, IbisModel::m_vinh, m_vinh, IbisModel::m_vinl, m_vinl, IbisModel::m_vmeas, m_vmeas, IbisModel::m_voltageRange, m_voltageRange, IbisModel::m_vref, and m_vref.
|
protectedinherited |
Convert a double to string using scientific notation.
aNumber | Number |
Definition at line 300 of file ibis_parser.cpp.
Referenced by generateSquareWave(), KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), KIBIS_PIN::KuKdDriver(), IVtable::Spice(), SpiceDie(), KIBIS_PIN::writeSpiceDevice(), and KIBIS_PIN::writeSpiceDriver().
std::string KIBIS_MODEL::generateSquareWave | ( | std::string | aNode1, |
std::string | aNode2, | ||
std::vector< std::pair< int, double > > | aBits, | ||
std::pair< IbisWaveform *, IbisWaveform * > | aPair, | ||
KIBIS_PARAMETER & | aParam | ||
) |
Generate a square waveform.
For maximum accuracy, we need a waveform pair. This function creates the pairs based on the fixture.
aNode1 | node where the voltage is applied |
aNode2 | Reference node |
aBits | The first member is the bit value ( 1 or 0 ). The second member is the time of the transition edge. |
aPair |
aParam | Parameters |
Definition at line 512 of file kibis.cpp.
References delta, IBIS_ANY::doubleToString(), VTtable::m_entries, KIBIS_PARAMETER::m_supply, IbisWaveform::m_table, VTtableEntry::t, TrimWaveform(), VTtableEntry::V, and TypMinMaxValue::value.
Referenced by KIBIS_PIN::KuKdDriver().
bool KIBIS_MODEL::HasGNDClamp | ( | ) |
Return true if the model has a clamp diode to the gnd net.
Definition at line 500 of file kibis.cpp.
References IVtable::m_entries, and m_GNDClamp.
Referenced by KIBIS_PIN::addDie(), and SpiceDie().
bool KIBIS_MODEL::HasPOWERClamp | ( | ) |
Return true if the model has a clamp diode to the power net.
Definition at line 506 of file kibis.cpp.
References IVtable::m_entries, and m_POWERClamp.
Referenced by KIBIS_PIN::addDie(), and SpiceDie().
bool KIBIS_MODEL::HasPulldown | ( | ) |
Return true if the model has a pulldown transistor.
Definition at line 488 of file kibis.cpp.
References IVtable::m_entries, and m_pulldown.
Referenced by KIBIS_PIN::addDie(), KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), and SpiceDie().
bool KIBIS_MODEL::HasPullup | ( | ) |
Return true if the model has a pullup transistor.
Definition at line 494 of file kibis.cpp.
References IVtable::m_entries, and m_pullup.
Referenced by KIBIS_PIN::addDie(), KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), and SpiceDie().
|
inlineinherited |
Print a message.
Call m_reporter->Report if m_reporter exists.
aMsg | Message |
aSeverity | Message sevirity |
Definition at line 65 of file ibis_parser.h.
References IBIS_ANY::m_reporter, and REPORTER::Report().
Referenced by IbisParser::changeCommentChar(), IbisParser::changeContext(), IBIS_MATRIX_BANDED::Check(), IBIS_MATRIX_SPARSE::Check(), IBIS_MATRIX_FULL::Check(), IbisHeader::Check(), IbisComponentPackage::Check(), IbisComponentPin::Check(), IbisComponent::Check(), IVtable::Check(), IbisRamp::Check(), IbisModel::Check(), IbisPackageModel::Check(), KIBIS_WAVEFORM_PRBS::Check(), KIBIS_WAVEFORM_RECTANGULAR::Check(), IbisParser::checkEndofLine(), KIBIS_PIN::getKuKdFromFile(), KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), IbisParser::getNextLine(), IVtable::InterpolatedI(), KIBIS_PIN::KuKdDriver(), IbisParser::onNewLine(), IbisParser::ParseFile(), IbisParser::readDiffPin(), IbisParser::readDouble(), IbisParser::readInt(), IbisParser::readMatrix(), IbisParser::readMatrixBanded(), IbisParser::readMatrixFull(), IbisParser::readMatrixSparse(), IbisParser::readModel(), IbisParser::readPackage(), IbisParser::readPin(), IbisParser::readPinMapping(), IbisParser::readRamp(), IbisParser::readString(), IbisParser::readTypMinMaxValue(), IbisParser::readWaveform(), TrimWaveform(), KIBIS_PIN::writeSpiceDevice(), and KIBIS_PIN::writeSpiceDriver().
std::string KIBIS_MODEL::SpiceDie | ( | KIBIS_PARAMETER & | aParam, |
int | aIndex | ||
) |
Generate the spice directive to simulate the die.
aParam | Parameters |
aIndex | Index used to offset spice nodes / directives |
Definition at line 374 of file kibis.cpp.
References IBIS_ANY::doubleToString(), HasGNDClamp(), HasPOWERClamp(), HasPulldown(), HasPullup(), m_C_comp, KIBIS_PARAMETER::m_Ccomp, m_GNDClamp, m_POWERClamp, m_pulldown, m_pullup, KIBIS_PARAMETER::m_supply, m_voltageRange, IVtable::Spice(), and TypMinMaxValue::value.
Referenced by KIBIS_PIN::writeSpiceDevice(), and KIBIS_PIN::writeSpiceDriver().
IbisWaveform KIBIS_MODEL::TrimWaveform | ( | IbisWaveform & | aIn | ) |
Copy a waveform, and substract the first value to all samples.
aIn | Input waveform |
Definition at line 447 of file kibis.cpp.
References _, VTtable::m_entries, IBIS_ANY::m_reporter, IbisWaveform::m_table, IBIS_ANY::Report(), RPT_SEVERITY_ERROR, VTtableEntry::t, VTtableEntry::V, and TypMinMaxValue::value.
Referenced by generateSquareWave().
std::vector< std::pair< IbisWaveform *, IbisWaveform * > > KIBIS_MODEL::waveformPairs | ( | ) |
Create waveform pairs.
For maximum accuracy, we need a waveform pair. This function creates the pairs based on the fixture. The first element is the rising edge, the second is the falling edge.
Definition at line 344 of file kibis.cpp.
References IbisWaveform::m_C_fixture, m_fallingWaveforms, IbisWaveform::m_L_fixture, IbisWaveform::m_R_fixture, m_risingWaveforms, IbisWaveform::m_V_fixture, IbisWaveform::m_V_fixture_max, and IbisWaveform::m_V_fixture_min.
Referenced by KIBIS_PIN::writeSpiceDriver().
TypMinMaxValue KIBIS_MODEL::m_C_comp |
Definition at line 259 of file kibis.h.
Referenced by KIBIS_MODEL(), KIBIS_PIN::KuKdDriver(), and SpiceDie().
TypMinMaxValue KIBIS_MODEL::m_Cac |
Definition at line 269 of file kibis.h.
Referenced by KIBIS_MODEL().
double KIBIS_MODEL::m_cref = 0 |
Definition at line 253 of file kibis.h.
Referenced by KIBIS_MODEL().
std::string KIBIS_MODEL::m_description |
Definition at line 245 of file kibis.h.
Referenced by KIBIS_MODEL().
IBIS_MODEL_ENABLE KIBIS_MODEL::m_enable = IBIS_MODEL_ENABLE::UNDEFINED |
Definition at line 255 of file kibis.h.
Referenced by KIBIS_MODEL().
std::vector<IbisWaveform*> KIBIS_MODEL::m_fallingWaveforms |
Definition at line 275 of file kibis.h.
Referenced by KIBIS_MODEL(), and waveformPairs().
IVtable KIBIS_MODEL::m_GNDClamp |
Definition at line 270 of file kibis.h.
Referenced by KIBIS_PIN::addDie(), HasGNDClamp(), KIBIS_MODEL(), and SpiceDie().
TypMinMaxValue KIBIS_MODEL::m_GNDClampReference |
Definition at line 264 of file kibis.h.
Referenced by KIBIS_MODEL().
std::string KIBIS_MODEL::m_name |
Definition at line 244 of file kibis.h.
Referenced by SIM_MODEL_KIBIS::ChangePin(), KIBIS_MODEL(), main(), and KIBIS_PIN::writeSpiceDriver().
IBIS_MODEL_POLARITY KIBIS_MODEL::m_polarity = IBIS_MODEL_POLARITY::UNDEFINED |
Definition at line 256 of file kibis.h.
Referenced by KIBIS_MODEL().
IVtable KIBIS_MODEL::m_POWERClamp |
Definition at line 271 of file kibis.h.
Referenced by KIBIS_PIN::addDie(), HasPOWERClamp(), KIBIS_MODEL(), and SpiceDie().
TypMinMaxValue KIBIS_MODEL::m_POWERClampReference |
Definition at line 265 of file kibis.h.
Referenced by KIBIS_MODEL().
IVtable KIBIS_MODEL::m_pulldown |
Definition at line 273 of file kibis.h.
Referenced by KIBIS_PIN::addDie(), HasPulldown(), KIBIS_MODEL(), and SpiceDie().
TypMinMaxValue KIBIS_MODEL::m_pulldownReference |
Definition at line 263 of file kibis.h.
Referenced by KIBIS_MODEL().
IVtable KIBIS_MODEL::m_pullup |
Definition at line 272 of file kibis.h.
Referenced by KIBIS_PIN::addDie(), HasPullup(), KIBIS_MODEL(), and SpiceDie().
TypMinMaxValue KIBIS_MODEL::m_pullupReference |
Definition at line 262 of file kibis.h.
Referenced by KIBIS_MODEL().
TypMinMaxValue KIBIS_MODEL::m_Rac |
Definition at line 268 of file kibis.h.
Referenced by KIBIS_MODEL().
IbisRamp KIBIS_MODEL::m_ramp |
Definition at line 276 of file kibis.h.
Referenced by KIBIS_PIN::getKuKdNoWaveform(), and KIBIS_MODEL().
|
inherited |
Definition at line 56 of file ibis_parser.h.
Referenced by IbisParser::changeContext(), IBIS_ANY::IBIS_ANY(), IbisParser::parsePackageModelModelData(), IbisParser::readDiffPin(), IbisParser::readIVtableEntry(), IbisParser::readMatrix(), IbisParser::readPin(), IbisParser::readPinMapping(), IbisParser::readVTtableEntry(), IbisParser::readWaveform(), IBIS_ANY::Report(), and TrimWaveform().
TypMinMaxValue KIBIS_MODEL::m_Rgnd |
Definition at line 266 of file kibis.h.
Referenced by KIBIS_MODEL().
std::vector<IbisWaveform*> KIBIS_MODEL::m_risingWaveforms |
Definition at line 274 of file kibis.h.
Referenced by KIBIS_MODEL(), and waveformPairs().
TypMinMaxValue KIBIS_MODEL::m_Rpower |
Definition at line 267 of file kibis.h.
Referenced by KIBIS_MODEL().
double KIBIS_MODEL::m_rref = 0 |
Definition at line 252 of file kibis.h.
Referenced by KIBIS_MODEL().
TypMinMaxValue KIBIS_MODEL::m_temperatureRange |
Definition at line 261 of file kibis.h.
Referenced by KIBIS_MODEL().
|
inherited |
Definition at line 48 of file kibis.h.
Referenced by KIBIS_PIN::getKuKdFromFile(), KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), KIBIS_ANY::KIBIS_ANY(), and KIBIS_COMPONENT::KIBIS_COMPONENT().
IBIS_MODEL_TYPE KIBIS_MODEL::m_type = IBIS_MODEL_TYPE::UNDEFINED |
Definition at line 246 of file kibis.h.
Referenced by KIBIS_MODEL(), KIBIS_PIN::writeSpiceDevice(), and KIBIS_PIN::writeSpiceDriver().
|
inherited |
Definition at line 49 of file kibis.h.
Referenced by SPICE_GENERATOR_KIBIS::IbisDevice(), KIBIS_FILE::Init(), KIBIS::KIBIS(), KIBIS_ANY::KIBIS_ANY(), KIBIS_COMPONENT::KIBIS_COMPONENT(), KIBIS_MODEL(), KIBIS_PIN::KIBIS_PIN(), KIBIS_WAVEFORM::KIBIS_WAVEFORM(), and SIM_LIBRARY_KIBIS::ReadFile().
double KIBIS_MODEL::m_vinh = 2 |
Definition at line 250 of file kibis.h.
Referenced by KIBIS_MODEL().
double KIBIS_MODEL::m_vinl = 0.8 |
Definition at line 249 of file kibis.h.
Referenced by KIBIS_MODEL().
double KIBIS_MODEL::m_vmeas = 0 |
Definition at line 254 of file kibis.h.
Referenced by KIBIS_MODEL().
TypMinMaxValue KIBIS_MODEL::m_voltageRange |
Definition at line 260 of file kibis.h.
Referenced by KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), KIBIS_MODEL(), and SpiceDie().
double KIBIS_MODEL::m_vref = 0 |
Definition at line 251 of file kibis.h.
Referenced by KIBIS_MODEL().