KiCad PCB EDA Suite
|
#include <kibis.h>
Public Member Functions | |
KIBIS_PIN (KIBIS &aTopLevel, const IbisComponentPin &aPin, const IbisComponentPackage &aPackage, IbisParser &aParser, KIBIS_COMPONENT *aParent, std::vector< KIBIS_MODEL > &aModels) | |
bool | writeSpiceDriver (std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam) |
bool | writeSpiceDiffDriver (std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam) |
bool | writeSpiceDevice (std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam) |
bool | writeSpiceDiffDevice (std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam) |
void | getKuKdNoWaveform (KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam) |
Update m_Ku, m_Kd using no falling / rising waveform inputs ( low accuracy ) | |
void | getKuKdOneWaveform (KIBIS_MODEL &aModel, const std::pair< IbisWaveform *, IbisWaveform * > &aPair, const KIBIS_PARAMETER &aParam) |
Update m_Ku, m_Kd using with a single waveform input. | |
void | getKuKdTwoWaveforms (KIBIS_MODEL &aModel, const std::pair< IbisWaveform *, IbisWaveform * > &aPair1, const std::pair< IbisWaveform *, IbisWaveform * > &aPair2, const KIBIS_PARAMETER &aParam) |
Update m_Ku, m_Kd using with two waveform inputs. | |
std::string | KuKdDriver (KIBIS_MODEL &aModel, const std::pair< IbisWaveform *, IbisWaveform * > &aPair, const KIBIS_PARAMETER &aParam, int aIndex) |
Update m_Ku, m_Kd using with two waveform inputs. | |
std::string | addDie (KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam, int aIndex) |
Generate the spice directive to simulate the die for Ku/Kd estimation. | |
void | getKuKdFromFile (const std::string &aSimul) |
Update m_Ku, m_Kd using with two waveform inputs. | |
bool | isDiffPin () const |
void | Report (std::string aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO) const |
Print a message. | |
Public Attributes | |
std::string | m_signalName |
Name of the pin Examples : "VCC", "GPIOA", "CLK", etc... | |
std::string | m_pinNumber |
Pin Number Examples : 1, 2, 3 ( or for BGA ), A1, A2, A3, etc... | |
TypMinMaxValue | m_Rpin |
Resistance from die to pin. | |
TypMinMaxValue | m_Lpin |
Inductance from die to pin. | |
TypMinMaxValue | m_Cpin |
Capacitance from pin to GND. | |
KIBIS_COMPONENT * | m_parent |
std::vector< double > | m_t |
std::vector< double > | m_Ku |
std::vector< double > | m_Kd |
std::vector< KIBIS_MODEL * > | m_models |
KIBIS_PIN * | m_complementaryPin = nullptr |
KIBIS * | m_topLevel |
bool | m_valid |
REPORTER * | m_reporter |
Static Protected Member Functions | |
static std::string | doubleToString (double aNumber) |
Convert a double to string using scientific notation. | |
KIBIS_PIN::KIBIS_PIN | ( | KIBIS & | aTopLevel, |
const IbisComponentPin & | aPin, | ||
const IbisComponentPackage & | aPackage, | ||
IbisParser & | aParser, | ||
KIBIS_COMPONENT * | aParent, | ||
std::vector< KIBIS_MODEL > & | aModels | ||
) |
Definition at line 161 of file kibis.cpp.
References IbisComponentPin::m_Cpin, m_Cpin, IbisComponentPackage::m_Cpkg, IbisParser::m_ibisFile, IbisComponentPin::m_Lpin, m_Lpin, IbisComponentPackage::m_Lpkg, IbisComponentPin::m_modelName, IbisModelSelectorEntry::m_modelName, IbisModelSelector::m_models, m_models, IbisFile::m_modelSelectors, IbisModelSelector::m_name, m_parent, IbisComponentPin::m_pinName, m_pinNumber, IbisComponentPin::m_Rpin, m_Rpin, IbisComponentPackage::m_Rpkg, IbisComponentPin::m_signalName, m_signalName, KIBIS_ANY::m_valid, and TypMinMaxValue::value.
std::string KIBIS_PIN::addDie | ( | KIBIS_MODEL & | aModel, |
const KIBIS_PARAMETER & | aParam, | ||
int | aIndex | ||
) |
Generate the spice directive to simulate the die for Ku/Kd estimation.
DO NOT use it in order to generate a model. It sole purpose is to run the internal simulation to get Ku/Kd
aModel | Model to be used |
aParam | Parameters |
aIndex | Index for numbering ports |
Definition at line 606 of file kibis.cpp.
References KIBIS_MODEL::HasGNDClamp(), KIBIS_MODEL::HasPOWERClamp(), KIBIS_MODEL::HasPulldown(), KIBIS_MODEL::HasPullup(), KIBIS_MODEL::m_GNDClamp, KIBIS_MODEL::m_POWERClamp, KIBIS_MODEL::m_pulldown, KIBIS_MODEL::m_pullup, KIBIS_PARAMETER::m_supply, and IVtable::Spice().
Referenced by KuKdDriver().
|
staticprotectedinherited |
Convert a double to string using scientific notation.
aNumber | Number |
Definition at line 300 of file ibis_parser.cpp.
Referenced by KIBIS_MODEL::generateSquareWave(), getKuKdOneWaveform(), getKuKdTwoWaveforms(), KuKdDriver(), IVtable::Spice(), KIBIS_MODEL::SpiceDie(), writeSpiceDevice(), and writeSpiceDriver().
void KIBIS_PIN::getKuKdFromFile | ( | const std::string & | aSimul | ) |
Update m_Ku, m_Kd using with two waveform inputs.
Runs a simulation. The simulation creates a specific file with Ku/Kd values This function then reads the output file and updates m_Ku / m_Kd. This function probably needs a rewrite.
aSimul | The simulation to run, multiline spice directives |
Definition at line 658 of file kibis.cpp.
References _, SIMULATOR::CreateInstance(), ku, KIBIS::m_cacheDir, m_Kd, m_Ku, m_t, KIBIS_ANY::m_topLevel, IBIS_ANY::Report(), RPT_SEVERITY_ERROR, and RPT_SEVERITY_WARNING.
Referenced by getKuKdOneWaveform(), and getKuKdTwoWaveforms().
void KIBIS_PIN::getKuKdNoWaveform | ( | KIBIS_MODEL & | aModel, |
const KIBIS_PARAMETER & | aParam | ||
) |
Update m_Ku, m_Kd using no falling / rising waveform inputs ( low accuracy )
aModel | Model to be used |
aParam | Parameters |
Definition at line 921 of file kibis.cpp.
References KIBIS_WAVEFORM::Check(), KIBIS_WAVEFORM::GenerateBitSequence(), KIBIS_WAVEFORM::GetType(), KIBIS_WAVEFORM::inverted, ku, dvdt::m_dt, IbisRamp::m_falling, m_Kd, m_Ku, KIBIS_MODEL::m_ramp, IbisRamp::m_rising, KIBIS_PARAMETER::m_supply, m_t, KIBIS_PARAMETER::m_waveform, SimplifyBitSequence(), and dvdtTypMinMax::value.
Referenced by writeSpiceDriver().
void KIBIS_PIN::getKuKdOneWaveform | ( | KIBIS_MODEL & | aModel, |
const std::pair< IbisWaveform *, IbisWaveform * > & | aPair, | ||
const KIBIS_PARAMETER & | aParam | ||
) |
Update m_Ku, m_Kd using with a single waveform input.
aModel | Model to be used |
aPair |
aParam | Parameters |
Definition at line 812 of file kibis.cpp.
References _, IBIS_ANY::doubleToString(), KIBIS_WAVEFORM::GetDuration(), getKuKdFromFile(), KIBIS_WAVEFORM::GetType(), KIBIS_MODEL::HasPulldown(), KIBIS_MODEL::HasPullup(), ku, KuKdDriver(), KIBIS::m_cacheDir, m_Kd, m_Ku, KIBIS_PARAMETER::m_supply, m_t, KIBIS_ANY::m_topLevel, KIBIS_MODEL::m_voltageRange, KIBIS_PARAMETER::m_waveform, IBIS_ANY::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_WARNING, and TypMinMaxValue::value.
Referenced by writeSpiceDriver().
void KIBIS_PIN::getKuKdTwoWaveforms | ( | KIBIS_MODEL & | aModel, |
const std::pair< IbisWaveform *, IbisWaveform * > & | aPair1, | ||
const std::pair< IbisWaveform *, IbisWaveform * > & | aPair2, | ||
const KIBIS_PARAMETER & | aParam | ||
) |
Update m_Ku, m_Kd using with two waveform inputs.
The order of aPair1 and aPair2 is not important.
aModel | Model to be used |
aPair1 |
aPair2 |
aParam | Parameters |
aIndex | Index for numbering spice .SUBCKT |
Definition at line 983 of file kibis.cpp.
References _, IBIS_ANY::doubleToString(), KIBIS_WAVEFORM::GetDuration(), getKuKdFromFile(), KIBIS_WAVEFORM::GetType(), KIBIS_MODEL::HasPulldown(), KIBIS_MODEL::HasPullup(), ku, KuKdDriver(), KIBIS::m_cacheDir, m_Kd, m_Ku, KIBIS_PARAMETER::m_supply, m_t, KIBIS_ANY::m_topLevel, KIBIS_MODEL::m_voltageRange, KIBIS_PARAMETER::m_waveform, IBIS_ANY::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_WARNING, and TypMinMaxValue::value.
Referenced by writeSpiceDriver().
|
inline |
Definition at line 429 of file kibis.h.
References m_complementaryPin.
Referenced by SIM_LIBRARY_IBIS::InitModel().
std::string KIBIS_PIN::KuKdDriver | ( | KIBIS_MODEL & | aModel, |
const std::pair< IbisWaveform *, IbisWaveform * > & | aPair, | ||
const KIBIS_PARAMETER & | aParam, | ||
int | aIndex | ||
) |
Update m_Ku, m_Kd using with two waveform inputs.
The order of aPair1 and aPair2 is not important.
aModel | Model to be used |
aPair |
aParam | Parameters |
aIndex | Index for numbering spice .SUBCKT |
Definition at line 738 of file kibis.cpp.
References _, addDie(), KIBIS_WAVEFORM::Check(), IBIS_ANY::doubleToString(), KIBIS_WAVEFORM::GenerateBitSequence(), KIBIS_MODEL::generateSquareWave(), KIBIS_WAVEFORM::GetType(), KIBIS_WAVEFORM::inverted, KIBIS_MODEL::m_C_comp, KIBIS_PARAMETER::m_Ccomp, VTtable::m_entries, KIBIS_PARAMETER::m_supply, IbisWaveform::m_table, KIBIS_PARAMETER::m_waveform, IBIS_ANY::Report(), RPT_SEVERITY_WARNING, SimplifyBitSequence(), and TypMinMaxValue::value.
Referenced by getKuKdOneWaveform(), and getKuKdTwoWaveforms().
|
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 BOOST_AUTO_TEST_CASE(), 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(), getKuKdFromFile(), getKuKdOneWaveform(), getKuKdTwoWaveforms(), IbisParser::getNextLine(), IVtable::InterpolatedI(), 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::readTypMinMaxValue(), IbisParser::readWaveform(), KIBIS_MODEL::TrimWaveform(), writeSpiceDevice(), and writeSpiceDriver().
bool KIBIS_PIN::writeSpiceDevice | ( | std::string & | aDest, |
const std::string & | aName, | ||
KIBIS_MODEL & | aModel, | ||
const KIBIS_PARAMETER & | aParam | ||
) |
Definition at line 1247 of file kibis.cpp.
References _, IBIS_ANY::doubleToString(), KIBIS_PARAMETER::m_Cpin, m_Cpin, KIBIS_PARAMETER::m_Lpin, m_Lpin, KIBIS_PARAMETER::m_Rpin, m_Rpin, KIBIS_MODEL::m_type, IBIS_ANY::Report(), RPT_SEVERITY_ERROR, KIBIS_MODEL::SpiceDie(), and TypMinMaxValue::value.
Referenced by SPICE_GENERATOR_IBIS::IbisDevice(), main(), and writeSpiceDiffDevice().
bool KIBIS_PIN::writeSpiceDiffDevice | ( | std::string & | aDest, |
const std::string & | aName, | ||
KIBIS_MODEL & | aModel, | ||
const KIBIS_PARAMETER & | aParam | ||
) |
Definition at line 1349 of file kibis.cpp.
References m_parent, and writeSpiceDevice().
Referenced by SPICE_GENERATOR_IBIS::IbisDevice().
bool KIBIS_PIN::writeSpiceDiffDriver | ( | std::string & | aDest, |
const std::string & | aName, | ||
KIBIS_MODEL & | aModel, | ||
const KIBIS_PARAMETER & | aParam | ||
) |
Definition at line 1298 of file kibis.cpp.
References KIBIS_WAVEFORM::inverted, m_parent, KIBIS_PARAMETER::m_waveform, and writeSpiceDriver().
Referenced by SPICE_GENERATOR_IBIS::IbisDevice(), and main().
bool KIBIS_PIN::writeSpiceDriver | ( | std::string & | aDest, |
const std::string & | aName, | ||
KIBIS_MODEL & | aModel, | ||
const KIBIS_PARAMETER & | aParam | ||
) |
Definition at line 1125 of file kibis.cpp.
References _, IBIS_ANY::doubleToString(), getKuKdNoWaveform(), getKuKdOneWaveform(), getKuKdTwoWaveforms(), KIBIS_PARAMETER::m_accuracy, KIBIS_PARAMETER::m_Cpin, m_Cpin, m_Kd, m_Ku, KIBIS_PARAMETER::m_Lpin, m_Lpin, KIBIS_MODEL::m_name, m_parent, m_pinNumber, KIBIS_PARAMETER::m_Rpin, m_Rpin, m_signalName, m_t, KIBIS_MODEL::m_type, IBIS_ANY::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, RPT_SEVERITY_WARNING, KIBIS_MODEL::SpiceDie(), TypMinMaxValue::value, and KIBIS_MODEL::waveformPairs().
Referenced by SPICE_GENERATOR_IBIS::IbisDevice(), and writeSpiceDiffDriver().
KIBIS_PIN* KIBIS_PIN::m_complementaryPin = nullptr |
Definition at line 427 of file kibis.h.
Referenced by isDiffPin(), and KIBIS::KIBIS().
TypMinMaxValue KIBIS_PIN::m_Cpin |
Capacitance from pin to GND.
Definition at line 344 of file kibis.h.
Referenced by KIBIS_PIN(), writeSpiceDevice(), and writeSpiceDriver().
std::vector<double> KIBIS_PIN::m_Kd |
Definition at line 348 of file kibis.h.
Referenced by getKuKdFromFile(), getKuKdNoWaveform(), getKuKdOneWaveform(), getKuKdTwoWaveforms(), and writeSpiceDriver().
std::vector<double> KIBIS_PIN::m_Ku |
Definition at line 348 of file kibis.h.
Referenced by getKuKdFromFile(), getKuKdNoWaveform(), getKuKdOneWaveform(), getKuKdTwoWaveforms(), and writeSpiceDriver().
TypMinMaxValue KIBIS_PIN::m_Lpin |
Inductance from die to pin.
Definition at line 342 of file kibis.h.
Referenced by KIBIS_PIN(), writeSpiceDevice(), and writeSpiceDriver().
std::vector<KIBIS_MODEL*> KIBIS_PIN::m_models |
Definition at line 350 of file kibis.h.
Referenced by SIM_MODEL_IBIS::ChangePin(), KIBIS_PIN(), and main().
KIBIS_COMPONENT* KIBIS_PIN::m_parent |
Definition at line 346 of file kibis.h.
Referenced by KIBIS_PIN(), writeSpiceDiffDevice(), writeSpiceDiffDriver(), and writeSpiceDriver().
std::string KIBIS_PIN::m_pinNumber |
Pin Number Examples : 1, 2, 3 ( or for BGA ), A1, A2, A3, etc...
Definition at line 337 of file kibis.h.
Referenced by SIM_LIBRARY_IBIS::InitModel(), KIBIS_PIN(), and writeSpiceDriver().
|
inherited |
Definition at line 56 of file ibis_parser.h.
Referenced by BOOST_AUTO_TEST_CASE(), IbisParser::changeContext(), IBIS_ANY::IBIS_ANY(), SPICE_GENERATOR_IBIS::IbisDevice(), KIBIS::KIBIS(), IbisParser::parsePackageModelModelData(), IbisParser::readDiffPin(), IbisParser::readIVtableEntry(), IbisParser::readMatrix(), IbisParser::readPin(), IbisParser::readPinMapping(), IbisParser::readVTtableEntry(), IbisParser::readWaveform(), IBIS_ANY::Report(), and KIBIS_MODEL::TrimWaveform().
TypMinMaxValue KIBIS_PIN::m_Rpin |
Resistance from die to pin.
Definition at line 340 of file kibis.h.
Referenced by KIBIS_PIN(), writeSpiceDevice(), and writeSpiceDriver().
std::string KIBIS_PIN::m_signalName |
Name of the pin Examples : "VCC", "GPIOA", "CLK", etc...
Definition at line 333 of file kibis.h.
Referenced by SIM_LIBRARY_IBIS::InitModel(), KIBIS_PIN(), main(), and writeSpiceDriver().
std::vector<double> KIBIS_PIN::m_t |
Definition at line 348 of file kibis.h.
Referenced by getKuKdFromFile(), getKuKdNoWaveform(), getKuKdOneWaveform(), getKuKdTwoWaveforms(), and writeSpiceDriver().
|
inherited |
Definition at line 56 of file kibis.h.
Referenced by getKuKdFromFile(), getKuKdOneWaveform(), getKuKdTwoWaveforms(), and KIBIS_COMPONENT::KIBIS_COMPONENT().
|
inherited |
Definition at line 57 of file kibis.h.
Referenced by BOOST_AUTO_TEST_CASE(), SPICE_GENERATOR_IBIS::IbisDevice(), KIBIS_FILE::Init(), KIBIS::KIBIS(), KIBIS_COMPONENT::KIBIS_COMPONENT(), KIBIS_MODEL::KIBIS_MODEL(), KIBIS_PIN(), KIBIS_WAVEFORM::KIBIS_WAVEFORM(), and SIM_LIBRARY_IBIS::ReadFile().