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, IbisModel &aSource, IbisParser &aParser)
 
bool HasPulldown ()
 Return true if the model has a pulldown transistor.
 
bool HasPullup ()
 Return true if the model has a pullup transistor.
 
bool HasGNDClamp ()
 Return true if the model has a clamp diode to the gnd net.
 
bool HasPOWERClamp ()
 Return true if the model has a clamp diode to the power net.
 
std::string SpiceDie (KIBIS_PARAMETER &aParam, int aIndex)
 Generate the spice directive to simulate the die.
 
std::vector< std::pair< IbisWaveform *, IbisWaveform * > > waveformPairs ()
 Create waveform pairs.
 
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.
 
IbisWaveform TrimWaveform (IbisWaveform &aIn)
 Copy a waveform, and substract the first value to all samples.
 
void Report (std::string aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO)
 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
 

Protected Member Functions

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

Detailed Description

Definition at line 214 of file kibis.h.

Constructor & Destructor Documentation

◆ KIBIS_MODEL()

Member Function Documentation

◆ doubleToString()

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

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

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 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, TypMinMaxValue::value, and WF.

Referenced by KIBIS_PIN::KuKdDriver().

◆ HasGNDClamp()

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

◆ HasPOWERClamp()

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

◆ HasPulldown()

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

◆ HasPullup()

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

◆ Report()

◆ SpiceDie()

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

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

◆ TrimWaveform()

IbisWaveform KIBIS_MODEL::TrimWaveform ( IbisWaveform aIn)

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

Parameters
aInInput waveform
Returns
Output 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().

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

Member Data Documentation

◆ m_C_comp

TypMinMaxValue KIBIS_MODEL::m_C_comp

Definition at line 234 of file kibis.h.

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

◆ m_Cac

TypMinMaxValue KIBIS_MODEL::m_Cac

Definition at line 244 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_cref

double KIBIS_MODEL::m_cref = 0

Definition at line 228 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_description

std::string KIBIS_MODEL::m_description

Definition at line 220 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_enable

IBIS_MODEL_ENABLE KIBIS_MODEL::m_enable = IBIS_MODEL_ENABLE::UNDEFINED

Definition at line 230 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_fallingWaveforms

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

Definition at line 250 of file kibis.h.

Referenced by KIBIS_MODEL(), and waveformPairs().

◆ m_GNDClamp

IVtable KIBIS_MODEL::m_GNDClamp

Definition at line 245 of file kibis.h.

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

◆ m_GNDClampReference

TypMinMaxValue KIBIS_MODEL::m_GNDClampReference

Definition at line 239 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_name

std::string KIBIS_MODEL::m_name

Definition at line 219 of file kibis.h.

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

◆ m_polarity

IBIS_MODEL_POLARITY KIBIS_MODEL::m_polarity = IBIS_MODEL_POLARITY::UNDEFINED

Definition at line 231 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_POWERClamp

IVtable KIBIS_MODEL::m_POWERClamp

Definition at line 246 of file kibis.h.

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

◆ m_POWERClampReference

TypMinMaxValue KIBIS_MODEL::m_POWERClampReference

Definition at line 240 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_pulldown

IVtable KIBIS_MODEL::m_pulldown

Definition at line 248 of file kibis.h.

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

◆ m_pulldownReference

TypMinMaxValue KIBIS_MODEL::m_pulldownReference

Definition at line 238 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_pullup

IVtable KIBIS_MODEL::m_pullup

Definition at line 247 of file kibis.h.

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

◆ m_pullupReference

TypMinMaxValue KIBIS_MODEL::m_pullupReference

Definition at line 237 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_Rac

TypMinMaxValue KIBIS_MODEL::m_Rac

Definition at line 243 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_ramp

IbisRamp KIBIS_MODEL::m_ramp

Definition at line 251 of file kibis.h.

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

◆ m_reporter

◆ m_Rgnd

TypMinMaxValue KIBIS_MODEL::m_Rgnd

Definition at line 241 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_risingWaveforms

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

Definition at line 249 of file kibis.h.

Referenced by KIBIS_MODEL(), and waveformPairs().

◆ m_Rpower

TypMinMaxValue KIBIS_MODEL::m_Rpower

Definition at line 242 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_rref

double KIBIS_MODEL::m_rref = 0

Definition at line 227 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_temperatureRange

TypMinMaxValue KIBIS_MODEL::m_temperatureRange

Definition at line 236 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_topLevel

◆ m_type

IBIS_MODEL_TYPE KIBIS_MODEL::m_type = IBIS_MODEL_TYPE::UNDEFINED

Definition at line 221 of file kibis.h.

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

◆ m_valid

◆ m_vinh

double KIBIS_MODEL::m_vinh = 2

Definition at line 225 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_vinl

double KIBIS_MODEL::m_vinl = 0.8

Definition at line 224 of file kibis.h.

Referenced by KIBIS_MODEL().

◆ m_vmeas

double KIBIS_MODEL::m_vmeas = 0

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

Referenced by KIBIS_MODEL().


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