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

#include <kibis.h>

Inheritance diagram for KIBIS_PIN:
KIBIS_ANY IBIS_ANY

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_COMPONENTm_parent
 
std::vector< double > m_t
 
std::vector< double > m_Ku
 
std::vector< double > m_Kd
 
std::vector< KIBIS_MODEL * > m_models
 
KIBIS_PINm_complementaryPin = nullptr
 
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 325 of file kibis.h.

Constructor & Destructor Documentation

◆ KIBIS_PIN()

Member Function Documentation

◆ addDie()

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

Parameters
aModelModel to be used
aParamParameters
aIndexIndex for numbering ports
Returns
A multiline string with spice directives

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

◆ 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 KIBIS_MODEL::generateSquareWave(), getKuKdOneWaveform(), getKuKdTwoWaveforms(), KuKdDriver(), IVtable::Spice(), KIBIS_MODEL::SpiceDie(), writeSpiceDevice(), and writeSpiceDriver().

◆ getKuKdFromFile()

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.

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

◆ getKuKdNoWaveform()

void KIBIS_PIN::getKuKdNoWaveform ( KIBIS_MODEL aModel,
const KIBIS_PARAMETER aParam 
)

Update m_Ku, m_Kd using no falling / rising waveform inputs ( low accuracy )

Parameters
aModelModel to be used
aParamParameters

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

◆ getKuKdOneWaveform()

void KIBIS_PIN::getKuKdOneWaveform ( KIBIS_MODEL aModel,
const std::pair< IbisWaveform *, IbisWaveform * > &  aPair,
const KIBIS_PARAMETER aParam 
)

◆ getKuKdTwoWaveforms()

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.

Parameters
aModelModel to be used
aPair1
See also
waveformPairs()
Parameters
aPair2
See also
waveformPairs()
Parameters
aParamParameters
aIndexIndex 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().

◆ isDiffPin()

bool KIBIS_PIN::isDiffPin ( ) const
inline

Definition at line 429 of file kibis.h.

References m_complementaryPin.

Referenced by SIM_LIBRARY_IBIS::InitModel().

◆ KuKdDriver()

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.

Parameters
aModelModel to be used
aPair
See also
waveformPairs()
Parameters
aParamParameters
aIndexIndex for numbering spice .SUBCKT
Returns
A multiline string with spice directives

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

◆ Report()

◆ writeSpiceDevice()

bool KIBIS_PIN::writeSpiceDevice ( std::string &  aDest,
const std::string &  aName,
KIBIS_MODEL aModel,
const KIBIS_PARAMETER aParam 
)

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

◆ writeSpiceDiffDriver()

bool KIBIS_PIN::writeSpiceDiffDriver ( std::string &  aDest,
const std::string &  aName,
KIBIS_MODEL aModel,
const KIBIS_PARAMETER aParam 
)

◆ writeSpiceDriver()

Member Data Documentation

◆ m_complementaryPin

KIBIS_PIN* KIBIS_PIN::m_complementaryPin = nullptr

Definition at line 427 of file kibis.h.

Referenced by isDiffPin(), and KIBIS::KIBIS().

◆ m_Cpin

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

◆ m_Kd

std::vector<double> KIBIS_PIN::m_Kd

◆ m_Ku

std::vector<double> KIBIS_PIN::m_Ku

◆ m_Lpin

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

◆ m_models

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

◆ m_parent

KIBIS_COMPONENT* KIBIS_PIN::m_parent

Definition at line 346 of file kibis.h.

Referenced by KIBIS_PIN(), writeSpiceDiffDevice(), writeSpiceDiffDriver(), and writeSpiceDriver().

◆ m_pinNumber

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

◆ m_reporter

◆ m_Rpin

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

◆ m_signalName

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

◆ m_t

std::vector<double> KIBIS_PIN::m_t

◆ m_topLevel

KIBIS* KIBIS_ANY::m_topLevel
inherited

◆ m_valid


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