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

#include <kibis.h>

Inheritance diagram for KIBIS_MODEL:
KIBIS_ANY IBIS_ANY

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) 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 (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
 
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 230 of file kibis.h.

Constructor & Destructor Documentation

◆ KIBIS_MODEL()

Member Function Documentation

◆ doubleToString()

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

Convert a double to string using scientific notation.

Parameters
aNumberNumber
Returns
Output string

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().

◆ 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 502 of file kibis.cpp.

References delta, IBIS_ANY::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 490 of file kibis.cpp.

References IVtable::m_entries, and m_GNDClamp.

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

◆ HasPOWERClamp()

bool KIBIS_MODEL::HasPOWERClamp ( ) const

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

Definition at line 496 of file kibis.cpp.

References IVtable::m_entries, and 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 478 of file kibis.cpp.

References IVtable::m_entries, and 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 484 of file kibis.cpp.

References IVtable::m_entries, and m_pullup.

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

◆ Report()

◆ SpiceDie()

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

Generate the spice directive to simulate the die.

Parameters
aParamParameters
aIndexIndex used to offset spice nodes / directives
Returns
A multiline string with spice directives

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

◆ 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 440 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().

◆ 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 340 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 250 of file kibis.h.

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

◆ m_Cac

TypMinMaxValue KIBIS_MODEL::m_Cac

Definition at line 260 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_cref

double KIBIS_MODEL::m_cref = 0

Definition at line 244 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_description

std::string KIBIS_MODEL::m_description

Definition at line 236 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_enable

IBIS_MODEL_ENABLE KIBIS_MODEL::m_enable = IBIS_MODEL_ENABLE::UNDEFINED

Definition at line 246 of file kibis.h.

Referenced by BOOST_AUTO_TEST_CASE(), and KIBIS_MODEL().

◆ m_fallingWaveforms

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

Definition at line 266 of file kibis.h.

Referenced by KIBIS_MODEL(), and waveformPairs().

◆ m_GNDClamp

IVtable KIBIS_MODEL::m_GNDClamp

Definition at line 261 of file kibis.h.

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

◆ m_GNDClampReference

TypMinMaxValue KIBIS_MODEL::m_GNDClampReference

Definition at line 255 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_name

std::string KIBIS_MODEL::m_name

◆ m_polarity

IBIS_MODEL_POLARITY KIBIS_MODEL::m_polarity = IBIS_MODEL_POLARITY::UNDEFINED

Definition at line 247 of file kibis.h.

Referenced by BOOST_AUTO_TEST_CASE(), and KIBIS_MODEL().

◆ m_POWERClamp

IVtable KIBIS_MODEL::m_POWERClamp

Definition at line 262 of file kibis.h.

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

◆ m_POWERClampReference

TypMinMaxValue KIBIS_MODEL::m_POWERClampReference

Definition at line 256 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_pulldown

IVtable KIBIS_MODEL::m_pulldown

Definition at line 264 of file kibis.h.

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

◆ m_pulldownReference

TypMinMaxValue KIBIS_MODEL::m_pulldownReference

Definition at line 254 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_pullup

IVtable KIBIS_MODEL::m_pullup

Definition at line 263 of file kibis.h.

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

◆ m_pullupReference

TypMinMaxValue KIBIS_MODEL::m_pullupReference

Definition at line 253 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_Rac

TypMinMaxValue KIBIS_MODEL::m_Rac

Definition at line 259 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_ramp

IbisRamp KIBIS_MODEL::m_ramp

Definition at line 267 of file kibis.h.

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

◆ m_reporter

◆ m_Rgnd

TypMinMaxValue KIBIS_MODEL::m_Rgnd

Definition at line 257 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_risingWaveforms

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

Definition at line 265 of file kibis.h.

Referenced by KIBIS_MODEL(), and waveformPairs().

◆ m_Rpower

TypMinMaxValue KIBIS_MODEL::m_Rpower

Definition at line 258 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_rref

double KIBIS_MODEL::m_rref = 0

Definition at line 243 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_temperatureRange

TypMinMaxValue KIBIS_MODEL::m_temperatureRange

Definition at line 252 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_topLevel

◆ m_type

IBIS_MODEL_TYPE KIBIS_MODEL::m_type = IBIS_MODEL_TYPE::UNDEFINED

◆ m_valid

◆ m_vinh

double KIBIS_MODEL::m_vinh = 2

Definition at line 241 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_vinl

double KIBIS_MODEL::m_vinl = 0.8

Definition at line 240 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_vmeas

double KIBIS_MODEL::m_vmeas = 0

Definition at line 245 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 242 of file kibis.h.

Referenced by KIBIS_MODEL().


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