KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIBIS_MODEL Class Reference

#include <kibis.h>

Inheritance diagram for KIBIS_MODEL:
KIBIS_BASE IBIS_BASE

Public Member Functions

 KIBIS_MODEL (KIBIS &aTopLevel, const IbisModel &aSource, IbisParser &aParser)
 
bool HasPulldown () const
 Return true if the model has a pulldown transistor.
 
bool HasPullup () const
 Return true if the model has a pullup transistor.
 
bool HasGNDClamp () const
 Return true if the model has a clamp diode to the gnd net.
 
bool HasPOWERClamp () const
 Return true if the model has a clamp diode to the power net.
 
std::string SpiceDie (const KIBIS_PARAMETER &aParam, int aIndex, bool aDriver) const
 Generate the spice directive to simulate the die.
 
std::vector< std::pair< IbisWaveform *, IbisWaveform * > > waveformPairs ()
 Create waveform pairs.
 
std::string generateSquareWave (const std::string &aNode1, const std::string &aNode2, const std::vector< std::pair< int, double > > &aBits, const std::pair< IbisWaveform *, IbisWaveform * > &aPair, const KIBIS_PARAMETER &aParam)
 Generate a square waveform.
 
IbisWaveform TrimWaveform (const IbisWaveform &aIn) const
 Copy a waveform, and substract the first value to all samples.
 
void Report (const std::string &aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO) const
 Print a message.
 

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
 
std::vector< KIBIS_SUBMODELm_submodels
 
KIBISm_topLevel
 
bool m_valid
 
REPORTERm_Reporter
 

Static Protected Member Functions

static std::string doubleToString (double aNumber)
 Convert a double to string using scientific notation.
 

Detailed Description

Definition at line 264 of file kibis.h.

Constructor & Destructor Documentation

◆ KIBIS_MODEL()

KIBIS_MODEL::KIBIS_MODEL ( KIBIS & aTopLevel,
const IbisModel & aSource,
IbisParser & aParser )

Definition at line 263 of file kibis.cpp.

References DYNAMIC_CLAMP, TypMinMaxValue::isNA(), KIBIS_BASE::KIBIS_BASE(), IbisModel::m_C_comp, m_C_comp, IbisModel::m_C_comp_gnd_clamp, IbisModel::m_C_comp_power_clamp, IbisModel::m_C_comp_pulldown, IbisModel::m_C_comp_pullup, 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, IbisSubmodelMode::m_mode, IbisModelSelectorEntry::m_modelDescription, IbisModelSelectorEntry::m_modelName, IbisModelSelector::m_models, IbisFile::m_modelSelectors, IbisModel::m_name, IbisSubmodelMode::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, IBIS_BASE::m_Reporter, IbisModel::m_Rgnd, m_Rgnd, IbisModel::m_risingWaveforms, m_risingWaveforms, IbisModel::m_Rpower, m_Rpower, IbisModel::m_rref, m_rref, IbisFile::m_submodels, IbisModel::m_submodels, m_submodels, IbisModel::m_temperatureRange, m_temperatureRange, IbisModel::m_type, IbisSubmodel::m_type, m_type, KIBIS_BASE::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, m_vref, IbisSubmodel::m_VtriggerF, IbisSubmodel::m_VtriggerR, MAX, MIN, and TYP.

Member Function Documentation

◆ doubleToString()

std::string IBIS_BASE::doubleToString ( double aNumber)
staticprotectedinherited

Convert a double to string using scientific notation.

Parameters
aNumberNumber
Returns
Output string

Definition at line 281 of file ibis_parser.cpp.

Referenced by KIBIS_MODEL::generateSquareWave(), KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), KIBIS_PIN::KuKdDriver(), IVtable::Spice(), KIBIS_MODEL::SpiceDie(), KIBIS_PIN::writeSpiceDevice(), and KIBIS_PIN::writeSpiceDriver().

◆ generateSquareWave()

std::string KIBIS_MODEL::generateSquareWave ( const std::string & aNode1,
const std::string & aNode2,
const std::vector< std::pair< int, double > > & aBits,
const std::pair< IbisWaveform *, IbisWaveform * > & aPair,
const KIBIS_PARAMETER & aParam )

Generate a square waveform.

For maximum accuracy, we need a waveform pair. This function creates the pairs based on the fixture.

Parameters
aNode1node where the voltage is applied
aNode2Reference node
aBitsThe first member is the bit value ( 1 or 0 ). The second member is the time of the transition edge.
aPair
See also
waveformPairs()
Parameters
aParamParameters
Returns
A multiline string with spice directives

Definition at line 590 of file kibis.cpp.

References delta, IBIS_BASE::doubleToString(), VTtable::m_entries, KIBIS_PARAMETER::m_supply, IbisWaveform::m_table, VTtableEntry::t, TrimWaveform(), VTtableEntry::V, TypMinMaxValue::value, and WF.

Referenced by KIBIS_PIN::KuKdDriver().

◆ HasGNDClamp()

bool KIBIS_MODEL::HasGNDClamp ( ) const

Return true if the model has a clamp diode to the gnd net.

Definition at line 578 of file kibis.cpp.

References m_GNDClamp.

Referenced by KIBIS_PIN::addDie(), and SpiceDie().

◆ HasPOWERClamp()

bool KIBIS_MODEL::HasPOWERClamp ( ) const

Return true if the model has a clamp diode to the power net.

Definition at line 584 of file kibis.cpp.

References m_POWERClamp.

Referenced by KIBIS_PIN::addDie(), and SpiceDie().

◆ HasPulldown()

bool KIBIS_MODEL::HasPulldown ( ) const

Return true if the model has a pulldown transistor.

Definition at line 566 of file kibis.cpp.

References m_pulldown.

Referenced by KIBIS_PIN::addDie(), KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), and SpiceDie().

◆ HasPullup()

bool KIBIS_MODEL::HasPullup ( ) const

Return true if the model has a pullup transistor.

Definition at line 572 of file kibis.cpp.

References m_pullup.

Referenced by KIBIS_PIN::addDie(), KIBIS_PIN::getKuKdOneWaveform(), KIBIS_PIN::getKuKdTwoWaveforms(), and SpiceDie().

◆ Report()

void IBIS_BASE::Report ( const std::string & aMsg,
SEVERITY aSeverity = RPT_SEVERITY_INFO ) const
inlineinherited

Print a message.

Call m_Reporter->Report if m_Reporter exists.

Parameters
aMsgMessage
aSeverityMessage sevirity

Definition at line 68 of file ibis_parser.h.

References m_Reporter, and RPT_SEVERITY_INFO.

Referenced by BOOST_AUTO_TEST_CASE(), IbisParser::changeCommentChar(), IbisParser::changeContext(), IBIS_MATRIX::Check(), IbisComponent::Check(), IbisComponentPackage::Check(), IbisComponentPin::Check(), IbisHeader::Check(), IbisModel::Check(), IbisPackageModel::Check(), IbisRamp::Check(), IbisSubmodel::Check(), IVtable::Check(), KIBIS_WAVEFORM_PRBS::Check(), KIBIS_WAVEFORM_PRBS::Check(), KIBIS_WAVEFORM_RECTANGULAR::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::readAddSubmodel(), IbisParser::readDiffPin(), IbisParser::readDouble(), IbisParser::readDvdt(), IbisParser::readInt(), IbisParser::readMatrixBandedOrFull(), IbisParser::readMatrixBandwidth(), IbisParser::readMatrixPinIndex(), IbisParser::readMatrixRow(), IbisParser::readMatrixSparse(), IbisParser::readMatrixType(), IbisParser::readModel(), IbisParser::readPackage(), IbisParser::readPin(), IbisParser::readPinMapping(), IbisParser::readRamp(), IbisParser::readSubmodel(), IbisParser::readSubmodelSpec(), IbisParser::readTypMinMaxValue(), IbisParser::readWaveform(), KIBIS_MODEL::TrimWaveform(), KIBIS_PIN::writeSpiceDevice(), and KIBIS_PIN::writeSpiceDriver().

◆ SpiceDie()

std::string KIBIS_MODEL::SpiceDie ( const KIBIS_PARAMETER & aParam,
int aIndex,
bool aDriver ) const

Generate the spice directive to simulate the die.

Parameters
aParamParameters
aIndexIndex used to offset spice nodes / directives
aDriverGenerate a driver model when true, a device model when false
Returns
A multiline string with spice directives

Definition at line 428 of file kibis.cpp.

References IBIS_BASE::doubleToString(), DRIVING, HasGNDClamp(), HasPOWERClamp(), HasPulldown(), HasPullup(), m_C_comp, KIBIS_PARAMETER::m_Ccomp, m_GNDClamp, m_POWERClamp, m_pulldown, m_pullup, m_submodels, KIBIS_PARAMETER::m_supply, m_voltageRange, NON_DRIVING, and result.

Referenced by KIBIS_PIN::writeSpiceDevice(), and KIBIS_PIN::writeSpiceDriver().

◆ TrimWaveform()

IbisWaveform KIBIS_MODEL::TrimWaveform ( const IbisWaveform & aIn) const

Copy a waveform, and substract the first value to all samples.

Parameters
aInInput waveform
Returns
Output waveform

Definition at line 530 of file kibis.cpp.

References _, VTtable::m_entries, IBIS_BASE::m_Reporter, IbisWaveform::m_table, MAX, MIN, IBIS_BASE::Report(), RPT_SEVERITY_ERROR, VTtableEntry::t, TYP, VTtableEntry::V, and TypMinMaxValue::value.

Referenced by generateSquareWave().

◆ waveformPairs()

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.

Returns
a vector of waveform pairs

Definition at line 401 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().

Member Data Documentation

◆ m_C_comp

TypMinMaxValue KIBIS_MODEL::m_C_comp

Definition at line 284 of file kibis.h.

Referenced by KIBIS_MODEL(), KIBIS_PIN::KuKdDriver(), and SpiceDie().

◆ m_Cac

TypMinMaxValue KIBIS_MODEL::m_Cac

Definition at line 294 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_cref

double KIBIS_MODEL::m_cref = 0

Definition at line 278 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_description

std::string KIBIS_MODEL::m_description

Definition at line 270 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_enable

Definition at line 280 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_fallingWaveforms

std::vector<IbisWaveform*> KIBIS_MODEL::m_fallingWaveforms

Definition at line 300 of file kibis.h.

Referenced by KIBIS_MODEL(), and waveformPairs().

◆ m_GNDClamp

IVtable KIBIS_MODEL::m_GNDClamp

Definition at line 295 of file kibis.h.

Referenced by KIBIS_PIN::addDie(), HasGNDClamp(), KIBIS_MODEL(), and SpiceDie().

◆ m_GNDClampReference

TypMinMaxValue KIBIS_MODEL::m_GNDClampReference

Definition at line 289 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_name

std::string KIBIS_MODEL::m_name

Definition at line 269 of file kibis.h.

Referenced by SIM_MODEL_IBIS::ChangePin(), KIBIS_MODEL(), main(), and KIBIS_PIN::writeSpiceDriver().

◆ m_polarity

Definition at line 281 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_POWERClamp

IVtable KIBIS_MODEL::m_POWERClamp

Definition at line 296 of file kibis.h.

Referenced by KIBIS_PIN::addDie(), HasPOWERClamp(), KIBIS_MODEL(), and SpiceDie().

◆ m_POWERClampReference

TypMinMaxValue KIBIS_MODEL::m_POWERClampReference

Definition at line 290 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_pulldown

IVtable KIBIS_MODEL::m_pulldown

Definition at line 298 of file kibis.h.

Referenced by KIBIS_PIN::addDie(), HasPulldown(), KIBIS_MODEL(), and SpiceDie().

◆ m_pulldownReference

TypMinMaxValue KIBIS_MODEL::m_pulldownReference

Definition at line 288 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_pullup

IVtable KIBIS_MODEL::m_pullup

Definition at line 297 of file kibis.h.

Referenced by KIBIS_PIN::addDie(), HasPullup(), KIBIS_MODEL(), and SpiceDie().

◆ m_pullupReference

TypMinMaxValue KIBIS_MODEL::m_pullupReference

Definition at line 287 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_Rac

TypMinMaxValue KIBIS_MODEL::m_Rac

Definition at line 293 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_ramp

IbisRamp KIBIS_MODEL::m_ramp

Definition at line 301 of file kibis.h.

Referenced by KIBIS_PIN::getKuKdNoWaveform(), and KIBIS_MODEL().

◆ m_Reporter

◆ m_Rgnd

TypMinMaxValue KIBIS_MODEL::m_Rgnd

Definition at line 291 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_risingWaveforms

std::vector<IbisWaveform*> KIBIS_MODEL::m_risingWaveforms

Definition at line 299 of file kibis.h.

Referenced by KIBIS_MODEL(), and waveformPairs().

◆ m_Rpower

TypMinMaxValue KIBIS_MODEL::m_Rpower

Definition at line 292 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_rref

double KIBIS_MODEL::m_rref = 0

Definition at line 277 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_submodels

std::vector<KIBIS_SUBMODEL> KIBIS_MODEL::m_submodels

Definition at line 302 of file kibis.h.

Referenced by KIBIS_MODEL(), and SpiceDie().

◆ m_temperatureRange

TypMinMaxValue KIBIS_MODEL::m_temperatureRange

Definition at line 286 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_topLevel

KIBIS* KIBIS_BASE::m_topLevel
inherited

◆ m_type

◆ m_valid

◆ m_vinh

double KIBIS_MODEL::m_vinh = 2

Definition at line 275 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_vinl

double KIBIS_MODEL::m_vinl = 0.8

Definition at line 274 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_vmeas

double KIBIS_MODEL::m_vmeas = 0

Definition at line 279 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_voltageRange

TypMinMaxValue KIBIS_MODEL::m_voltageRange

◆ m_vref

double KIBIS_MODEL::m_vref = 0

Definition at line 276 of file kibis.h.

Referenced by KIBIS_MODEL().


The documentation for this class was generated from the following files: