50std::vector<std::pair<int, double>>
53 std::vector<std::pair<int, double>> result;
56 for(
const std::pair<int, double>& bit : bits )
58 if( prevbit != bit.first )
59 result.push_back( bit );
76 m_topLevel( aTopLevel ),
118 pin.m_parent = &kComponent;
166 m_Rpin( aTopLevel.m_Reporter ),
167 m_Lpin( aTopLevel.m_Reporter ),
168 m_Cpin( aTopLevel.m_Reporter )
184 if( !std::isnan( aPin.
m_Rpin ) )
191 if( !std::isnan( aPin.
m_Lpin ) )
198 if( !std::isnan( aPin.
m_Cpin ) )
205 bool modelSelected =
false;
206 std::vector<std::string> listOfModels;
215 modelSelected =
true;
223 for(
const std::string& modelName : listOfModels )
227 if( !strcmp( model.m_name.c_str(), modelName.c_str() ) )
238 m_C_comp( aTopLevel.m_Reporter ),
239 m_voltageRange( aTopLevel.m_Reporter ),
240 m_temperatureRange( aTopLevel.m_Reporter ),
241 m_pullupReference( aTopLevel.m_Reporter ),
242 m_pulldownReference( aTopLevel.m_Reporter ),
243 m_GNDClampReference( aTopLevel.m_Reporter ),
244 m_POWERClampReference( aTopLevel.m_Reporter ),
245 m_Rgnd( aTopLevel.m_Reporter ),
246 m_Rpower( aTopLevel.m_Reporter ),
247 m_Rac( aTopLevel.m_Reporter ),
248 m_Cac( aTopLevel.m_Reporter ),
249 m_GNDClamp( aTopLevel.m_Reporter ),
250 m_POWERClamp( aTopLevel.m_Reporter ),
251 m_pullup( aTopLevel.m_Reporter ),
252 m_pulldown( aTopLevel.m_Reporter ),
253 m_ramp( aTopLevel.m_Reporter )
334 if(
pin.m_pinNumber == aPinNumber )
343 std::vector<std::pair<IbisWaveform*, IbisWaveform*>> pairs;
359 pairs.emplace_back( wf1, wf2 );
372 std::string GC_GND =
"GC_GND";
373 std::string PC_PWR =
"PC_PWR";
374 std::string PU_PWR =
"PU_PWR";
375 std::string PD_GND =
"PD_GND";
376 std::string DIE =
"DIE";
377 std::string DIEBUFF =
"DIEBUFF";
382 GC_GND += std::to_string( aIndex );
383 PC_PWR += std::to_string( aIndex );
384 PU_PWR += std::to_string( aIndex );
385 PD_GND += std::to_string( aIndex );
386 DIE += std::to_string( aIndex );
387 DIEBUFF += std::to_string( aIndex );
390 std::string GC =
"GC";
391 std::string PC =
"PC";
392 std::string PU =
"PU";
393 std::string PD =
"PD";
395 GC += std::to_string( aIndex );
396 PC += std::to_string( aIndex );
397 PU += std::to_string( aIndex );
398 PD += std::to_string( aIndex );
401 result +=
"VPWR POWER GND ";
404 result +=
"CCPOMP " + DIE +
" GND ";
411 result +=
"VmeasGC GND " + GC_GND +
" 0\n";
417 result +=
"VmeasPC POWER " + PC_PWR +
" 0\n";
422 result +=
m_pulldown.
Spice( aIndex * 4 + 3, DIEBUFF, PD_GND, PD, supply );
423 result +=
"VmeasPD GND " + PD_GND +
" 0\n";
424 result +=
"BKD GND " + DIE +
" i=( i(VmeasPD) * v(KD) )\n";
429 result +=
m_pullup.
Spice( aIndex * 4 + 4, PU_PWR, DIEBUFF, PU, supply );
430 result +=
"VmeasPU POWER " + PU_PWR +
" 0\n";
431 result +=
"BKU POWER " + DIE +
" i=( -i(VmeasPU) * v(KU) )\n";
435 result +=
"BDIEBUFF " + DIEBUFF +
" GND v=v(" + DIE +
")\n";
462 for(
int i = 0; i < nbPoints; i++ )
467 outEntry.
t = inEntry.
t;
468 outEntry.
V.
value[IBIS_CORNER::TYP] = inEntry.
V.
value[IBIS_CORNER::TYP] - DCtyp;
469 outEntry.
V.
value[IBIS_CORNER::MIN] = inEntry.
V.
value[IBIS_CORNER::MIN] - DCmin;
470 outEntry.
V.
value[IBIS_CORNER::MAX] = inEntry.
V.
value[IBIS_CORNER::MAX] - DCmax;
502 const std::vector<std::pair<int, double>>& aBits,
503 const std::pair<IbisWaveform*, IbisWaveform*>& aPair,
508 std::vector<int> stimuliIndex;
520 double delta = deltaR + deltaF;
526 for(
const std::pair<int, double>& bit : aBits )
529 double timing = bit.second;
532 if ( bit.first != prevBit )
539 stimuliIndex.push_back( i );
542 simul += std::to_string( i );
544 simul += std::to_string( i );
547 simul +=
" pwl ( \n+";
554 double deltaT = entry1.
t - entry0.
t;
583 for(
int ii: stimuliIndex )
585 simul +=
" v( stimuli";
586 simul += std::to_string( ii );
592 if( ( aBits.size() > 0 ) && ( aBits[0].first == 0 ) )
593 simul +=
doubleToString( aPair.second->m_table.m_entries.at( 0 ).V.value[supply] );
595 simul +=
doubleToString( aPair.first->m_table.m_entries.at( 0 ).V.value[supply] );
607 std::string GC_GND =
"GC_GND";
608 std::string PC_PWR =
"PC_PWR";
609 std::string PU_PWR =
"PU_PWR";
610 std::string PD_GND =
"PD_GND";
611 std::string DIE =
"DIE";
613 GC_GND += std::to_string( aIndex );
614 PC_PWR += std::to_string( aIndex );
615 PU_PWR += std::to_string( aIndex );
616 PD_GND += std::to_string( aIndex );
617 DIE += std::to_string( aIndex );
620 std::string GC =
"GC";
621 std::string PC =
"PC";
622 std::string PU =
"PU";
623 std::string PD =
"PD";
625 GC += std::to_string( aIndex );
626 PC += std::to_string( aIndex );
627 PU += std::to_string( aIndex );
628 PD += std::to_string( aIndex );
631 simul += aModel.
m_GNDClamp.
Spice( aIndex * 4 + 1, DIE, GC_GND, GC, supply );
637 simul += aModel.
m_pulldown.
Spice( aIndex * 4 + 3, DIE, PD_GND, PD, supply );
640 simul += aModel.
m_pullup.
Spice( aIndex * 4 + 4, PU_PWR, DIE, PU, supply );
650 if( std::remove( outputFileName.c_str() ) )
656 throw std::runtime_error(
"Could not create simulator instance" );
659 ng->LoadNetlist( aSimul );
661 std::ifstream KuKdfile;
662 KuKdfile.open( outputFileName );
664 std::vector<double>
ku, kd, t;
669 bool valuesTagFound =
false;
671 while( std::getline( KuKdfile, line ) )
673 if( line.find(
"Values:" ) != std::string::npos )
675 valuesTagFound =
true;
680 if( !valuesTagFound )
686 double t_v, ku_v, kd_v;
692 std::getline( KuKdfile, line );
700 line = line.substr( line.find_first_of(
"\t" ) + 1 );
701 t_v = std::stod( line );
703 case 1: ku_v = std::stod( line );
break;
705 kd_v = std::stod( line );
706 ku.push_back( ku_v );
707 kd.push_back( kd_v );
716 catch(
const std::exception& )
721 std::getline( KuKdfile, line );
728 if( std::remove( outputFileName.c_str() ) )
734 m_Kd = std::move( kd );
735 m_t = std::move( t );
740 const std::pair<IbisWaveform*, IbisWaveform*>& aPair,
747 std::string simul =
"";
749 simul +=
"*THIS IS NOT A VALID SPICE MODEL.\n";
750 simul +=
"*This part is intended to be executed by Kibis internally.\n";
751 simul +=
"*You should not be able to read this.\n\n";
753 simul +=
".SUBCKT DRIVER";
754 simul += std::to_string( aIndex );
755 simul +=
" POWER GND PIN \n";
757 simul +=
"Vdummy 2 PIN 0\n";
759 if( ( aPair.first->m_R_dut != 0 ) || ( aPair.first->m_L_dut != 0 )
760 || ( aPair.first->m_C_dut != 0 ) )
762 Report(
_(
"Kibis does not support DUT values yet. "
763 "https://ibis.org/summits/nov16a/chen.pdf" ),
768 simul +=
"CCPOMP 2 GND ";
777 case KIBIS_WAVEFORM_TYPE::RECTANGULAR:
778 case KIBIS_WAVEFORM_TYPE::PRBS:
780 wave->
Check( risingWF, fallingWF );
786 case KIBIS_WAVEFORM_TYPE::STUCK_HIGH:
789 simul +=
"Vsig DIE0 GND ";
794 case KIBIS_WAVEFORM_TYPE::STUCK_LOW:
797 simul +=
"Vsig DIE0 GND ";
802 case KIBIS_WAVEFORM_TYPE::NONE:
803 case KIBIS_WAVEFORM_TYPE::HIGH_Z:
808 simul +=
addDie( aModel, aParam, 0 );
810 simul +=
"\n.ENDS DRIVER\n\n";
816 const std::pair<IbisWaveform*, IbisWaveform*>& aPair,
822 std::string simul =
"";
827 if( wave->
GetType() == KIBIS_WAVEFORM_TYPE::NONE )
830 std::vector<double>
ku, kd, t;
835 m_Kd = std::move( kd );
836 m_t = std::move( t );
840 simul +=
KuKdDriver( aModel, aPair, aParam, 0 );
841 simul +=
"\n x1 3 0 1 DRIVER0 \n";
847 simul +=
"Lfixture 1 4 ";
850 simul +=
"Rfixture 4 5 ";
853 simul +=
"Cfixture 4 0 ";
856 simul +=
"Vfixture 5 0 ";
859 simul +=
"VmeasIout x1.DIE0 x1.2 0\n";
860 simul +=
"VmeasPD 0 x1.PD_GND0 0\n";
861 simul +=
"VmeasPU x1.PU_PWR0 3 0\n";
862 simul +=
"VmeasPC x1.PC_PWR0 3 0\n";
863 simul +=
"VmeasGC 0 x1.GC_GND0 0\n";
867 Report(
_(
"Model has only one waveform pair, reduced accuracy" ),
869 simul +=
"Bku KU 0 v=( (i(VmeasIout)-i(VmeasPC)-i(VmeasGC)-i(VmeasPD) "
870 ")/(i(VmeasPU)-i(VmeasPD)))\n";
871 simul +=
"Bkd KD 0 v=(1-v(KU))\n";
876 simul +=
"Bku KD 0 v=( ( i(VmeasIout)+i(VmeasPC)+i(VmeasGC) )/(i(VmeasPD)))\n";
877 simul +=
"Bkd KU 0 v=0\n";
882 simul +=
"Bku KU 0 v=( ( i(VmeasIout)+i(VmeasPC)+i(VmeasGC) )/(i(VmeasPU)))\n";
883 simul +=
"Bkd KD 0 v=0\n";
892 case KIBIS_WAVEFORM_TYPE::PRBS:
893 case KIBIS_WAVEFORM_TYPE::RECTANGULAR:
896 simul +=
".tran 0.1n ";
901 case KIBIS_WAVEFORM_TYPE::HIGH_Z:
902 case KIBIS_WAVEFORM_TYPE::STUCK_LOW:
903 case KIBIS_WAVEFORM_TYPE::STUCK_HIGH:
905 simul +=
".tran 0.5 1 \n";
909 simul +=
".control run \n";
910 simul +=
"set filetype=ascii\n";
916 simul +=
"write '" + outputFileName +
"' v(KU) v(KD)\n";
928 std::vector<double>
ku, kd, t;
937 case KIBIS_WAVEFORM_TYPE::RECTANGULAR:
938 case KIBIS_WAVEFORM_TYPE::PRBS:
944 for(
const std::pair<int, double>& bit : bits )
946 ku.push_back( bit.first ? 0 : 1 );
947 kd.push_back( bit.first ? 1 : 0 );
948 t.push_back( bit.second );
949 ku.push_back( bit.first ? 1 : 0 );
950 kd.push_back( bit.first ? 0 : 1 );
951 t.push_back( bit.second
959 case KIBIS_WAVEFORM_TYPE::STUCK_HIGH:
962 kd.push_back( wave->
inverted ? 1 : 0 );
966 case KIBIS_WAVEFORM_TYPE::STUCK_LOW:
969 kd.push_back( wave->
inverted ? 0 : 1 );
973 case KIBIS_WAVEFORM_TYPE::HIGH_Z:
974 case KIBIS_WAVEFORM_TYPE::NONE:
982 m_Kd = std::move( kd );
983 m_t = std::move( t );
988 const std::pair<IbisWaveform*, IbisWaveform*>& aPair1,
989 const std::pair<IbisWaveform*, IbisWaveform*>& aPair2,
992 std::string simul =
"";
999 if( wave->
GetType() == KIBIS_WAVEFORM_TYPE::NONE )
1002 std::vector<double>
ku, kd, t;
1007 m_Kd = std::move( kd );
1008 m_t = std::move( t );
1012 simul +=
KuKdDriver( aModel, aPair1, aParam, 0 );
1013 simul +=
KuKdDriver( aModel, aPair2, aParam, 1 );
1014 simul +=
"\n x1 3 0 1 DRIVER0 \n";
1016 simul +=
"VCC 3 0 ";
1020 simul +=
"Lfixture0 1 4 ";
1023 simul +=
"Rfixture0 4 5 ";
1026 simul +=
"Cfixture0 4 0 ";
1029 simul +=
"Vfixture0 5 0 ";
1032 simul +=
"VmeasIout0 x1.2 x1.DIE0 0\n";
1033 simul +=
"VmeasPD0 0 x1.PD_GND0 0\n";
1034 simul +=
"VmeasPU0 x1.PU_PWR0 3 0\n";
1035 simul +=
"VmeasPC0 x1.PC_PWR0 3 0\n";
1036 simul +=
"VmeasGC0 0 x1.GC_GND0 0\n";
1039 simul +=
"\n x2 3 0 7 DRIVER1 \n";
1041 simul +=
"Lfixture1 7 8 ";
1044 simul +=
"Rfixture1 8 9 ";
1047 simul +=
"Cfixture1 8 0 ";
1050 simul +=
"Vfixture1 9 0 ";
1053 simul +=
"VmeasIout1 x2.2 x2.DIE0 0\n";
1054 simul +=
"VmeasPD1 0 x2.PD_GND0 0\n";
1055 simul +=
"VmeasPU1 x2.PU_PWR0 3 0\n";
1056 simul +=
"VmeasPC1 x2.PC_PWR0 3 0\n";
1057 simul +=
"VmeasGC1 0 x2.GC_GND0 0\n";
1062 "Bku KU 0 v=( ( i(VmeasPD1) * ( i(VmeasIout0) + i(VmeasPC0) + i(VmeasGC0) ) - "
1063 "i(VmeasPD0) * ( i(VmeasIout1) + i(VmeasPC1) + i(VmeasGC1) ) )/ ( i(VmeasPU1) "
1065 "i(VmeasPD0) - i(VmeasPU0) * i(VmeasPD1) ) )\n";
1067 "Bkd KD 0 v=( ( i(VmeasPU1) * ( i(VmeasIout0) + i(VmeasPC0) + i(VmeasGC0) ) - "
1068 "i(VmeasPU0) * ( i(VmeasIout1) + i(VmeasPC1) + i(VmeasGC1) ) )/ ( i(VmeasPD1) "
1070 "i(VmeasPU0) - i(VmeasPD0) * i(VmeasPU1) ) )\n";
1076 Report(
_(
"There are two waveform pairs, but only one transistor. More equations than "
1079 simul +=
"Bku KD 0 v=( ( i(VmeasIout0)+i(VmeasPC0)+i(VmeasGC0) )/(i(VmeasPD0)))\n";
1080 simul +=
"Bkd KU 0 v=0\n";
1085 Report(
_(
"There are two waveform pairs, but only one transistor. More equations than "
1088 simul +=
"Bku KU 0 v=( ( i(VmeasIout)+i(VmeasPC)+i(VmeasGC) )/(i(VmeasPU)))\n";
1089 simul +=
"Bkd KD 0 v=0\n";
1098 case KIBIS_WAVEFORM_TYPE::RECTANGULAR:
1099 case KIBIS_WAVEFORM_TYPE::PRBS:
1102 simul +=
".tran 0.1n ";
1107 case KIBIS_WAVEFORM_TYPE::HIGH_Z:
1108 case KIBIS_WAVEFORM_TYPE::STUCK_LOW:
1109 case KIBIS_WAVEFORM_TYPE::STUCK_HIGH:
1111 simul +=
".tran 0.5 1 \n";
1115 simul +=
".control run \n";
1116 simul +=
"set filetype=ascii\n";
1118 simul +=
"plot v(KU) v(KD)\n";
1121 simul +=
"write '" + outputFileName +
"' v(KU) v(KD)\n";
1123 simul +=
".endc \n";
1138 case IBIS_MODEL_TYPE::OUTPUT:
1139 case IBIS_MODEL_TYPE::IO:
1140 case IBIS_MODEL_TYPE::THREE_STATE:
1141 case IBIS_MODEL_TYPE::OPEN_DRAIN:
1142 case IBIS_MODEL_TYPE::IO_OPEN_DRAIN:
1143 case IBIS_MODEL_TYPE::OPEN_SINK:
1144 case IBIS_MODEL_TYPE::IO_OPEN_SINK:
1145 case IBIS_MODEL_TYPE::OPEN_SOURCE:
1146 case IBIS_MODEL_TYPE::IO_OPEN_SOURCE:
1147 case IBIS_MODEL_TYPE::OUTPUT_ECL:
1148 case IBIS_MODEL_TYPE::IO_ECL:
1149 case IBIS_MODEL_TYPE::THREE_STATE_ECL:
1154 result =
"\n*Driver model generated by Kicad using Ibis data. ";
1156 result +=
"\n*Pin number: ";
1158 result +=
"\n*Signal name: ";
1160 result +=
"\n*Model: ";
1162 result +=
"\n.SUBCKT ";
1164 result +=
" GND PIN \n";
1167 result +=
"RPIN 1 PIN ";
1170 result +=
"LPIN DIE0 1 ";
1173 result +=
"CPIN PIN GND ";
1177 std::vector<std::pair<IbisWaveform*, IbisWaveform*>> wfPairs = aModel.
waveformPairs();
1180 if( wfPairs.size() < 1 ||
accuracy <= KIBIS_ACCURACY::LEVEL_0 )
1182 if(
accuracy > KIBIS_ACCURACY::LEVEL_0 )
1184 Report(
_(
"Model has no waveform pair, using [Ramp] instead, poor accuracy" ),
1190 else if( wfPairs.size() == 1 ||
accuracy <= KIBIS_ACCURACY::LEVEL_1 )
1196 if( wfPairs.size() > 2 ||
accuracy <= KIBIS_ACCURACY::LEVEL_2 )
1198 Report(
_(
"Model has more than 2 waveform pairs, using the first two." ),
1205 result +=
"Vku KU GND pwl ( ";
1207 for(
size_t i = 0; i <
m_t.size(); i++ )
1218 result +=
"Vkd KD GND pwl ( ";
1220 for(
size_t i = 0; i <
m_t.size(); i++ )
1230 result += aModel.
SpiceDie( aParam, 0 );
1232 result +=
"\n.ENDS DRIVER\n\n";
1253 case IBIS_MODEL_TYPE::INPUT_STD:
1254 case IBIS_MODEL_TYPE::IO:
1255 case IBIS_MODEL_TYPE::IO_OPEN_DRAIN:
1256 case IBIS_MODEL_TYPE::IO_OPEN_SINK:
1257 case IBIS_MODEL_TYPE::IO_OPEN_SOURCE:
1258 case IBIS_MODEL_TYPE::IO_ECL:
1263 result =
"*Device model generated by Kicad using Ibis data.";
1264 result +=
"\n.SUBCKT ";
1266 result +=
" GND PIN\n";
1269 result +=
"RPIN 1 PIN ";
1272 result +=
"LPIN DIE0 1 ";
1275 result +=
"CPIN PIN GND ";
1280 result +=
"Vku KU GND pwl ( 0 0 )\n";
1281 result +=
"Vkd KD GND pwl ( 0 0 )\n";
1283 result += aModel.
SpiceDie( aParam, 0 );
1285 result +=
"\n.ENDS DRIVER\n\n";
1287 aDest = std::move( result );
1309 result =
"\n*Differential driver model generated by Kicad using Ibis data. ";
1311 result +=
"\n.SUBCKT ";
1313 result +=
" GND PIN_P PIN_N\n";
1323 result +=
"x1 GND PIN_P " + aName +
"_P \n";
1324 result +=
"x2 GND PIN_N " + aName +
"_N \n";
1327 result +=
"\n.ENDS " + aName +
"\n\n";
1342 result =
"\n*Differential device model generated by Kicad using Ibis data. ";
1344 result +=
"\n.SUBCKT ";
1346 result +=
" GND PIN_P PIN_N\n";
1353 result +=
"x1 GND PIN_P " + aName +
"_P \n";
1354 result +=
"x2 GND PIN_N " + aName +
"_N \n";
1357 result +=
"\n.ENDS " + aName +
"\n\n";
1370 if( model.m_name == aName )
1382 if( cmp.m_name == aName )
1392 if( aString ==
"MIN" )
1393 aCorner = IBIS_CORNER::MIN;
1394 else if( aString ==
"MAX" )
1395 aCorner = IBIS_CORNER::MAX;
1397 aCorner = IBIS_CORNER::TYP;
1403 std::vector<std::pair<int, double>> bits;
1404 std::pair<int, double> bit;
1413 std::vector<std::pair<int, double>> bits;
1414 std::pair<int, double> bit;
1422 std::vector<std::pair<int, double>> bits;
1428 std::vector<std::pair<int, double>> bits;
1430 for(
int i = 0; i <
m_cycles; i++ )
1432 std::pair<int, double> bit;
1435 bits.push_back( bit );
1439 bits.push_back( bit );
1448 std::vector<std::pair<int, double>> bitSequence;
1449 uint8_t polynomial = 0b1100000;
1453 uint8_t seed = 0x12;
1454 uint8_t lfsr = seed;
1468 uint8_t lsb = lfsr & 0x01;
1469 bitSequence.emplace_back( (
static_cast<uint8_t
>(
inverted ) ^ lsb ? 1 : 0 ), t );
1477 }
while ( ++bits <
m_bits );
1507 if( m_ton < aRisingWf->m_table.m_entries.back().t )
1516 if( m_toff < aFallingWf->m_table.m_entries.back().t )
1523 status &= aRisingWf && aFallingWf;
1591 + aFallingRp.
value[IBIS_CORNER::TYP].
m_dt / 0.6 ) )
1593 + aFallingRp.
value[IBIS_CORNER::TYP].
m_dt / 0.6 ) )
1595 + aFallingRp.
value[IBIS_CORNER::TYP].
m_dt / 0.6 ) ) )
1621 if(
m_bitrate && aRisingWf && aFallingWf
void Report(const std::string &aMsg, SEVERITY aSeverity=RPT_SEVERITY_INFO) const
Print a message.
static std::string doubleToString(double aNumber)
Convert a double to string using scientific notation.
std::vector< IVtableEntry > m_entries
std::string Spice(int aN, const std::string &aPort1, const std::string &aPort2, const std::string &aModelName, IBIS_CORNER aCorner) const
Interpolate the IV table.
std::string m_manufacturer
IbisComponentPackage m_package
std::vector< IbisComponentPin > m_pins
std::vector< IbisDiffPinEntry > m_entries
std::vector< IbisComponent > m_components
std::vector< IbisModel > m_models
std::vector< IbisModelSelector > m_modelSelectors
std::string m_modelDescription
std::vector< IbisModelSelectorEntry > m_models
TypMinMaxValue m_pullupReference
std::vector< IbisWaveform * > m_risingWaveforms
TypMinMaxValue m_POWERClampReference
IBIS_MODEL_POLARITY m_polarity
IBIS_MODEL_ENABLE m_enable
TypMinMaxValue m_temperatureRange
std::vector< IbisWaveform * > m_fallingWaveforms
TypMinMaxValue m_pulldownReference
TypMinMaxValue m_GNDClampReference
TypMinMaxValue m_voltageRange
bool ParseFile(const std::string &aFileName)
Parse a file.
KIBIS_BASE(KIBIS *aTopLevel)
KIBIS_COMPONENT(KIBIS &aToplevel, const IbisComponent &aSource, IbisParser &aParser)
std::vector< KIBIS_PIN > m_pins
std::string m_manufacturer
Name of the manufacturer.
std::string m_name
Name of the component.
KIBIS_PIN * GetPin(const std::string &aPinNumber)
Get a pin by its number ( 1, 2, A1, A2, ... )
KIBIS_FILE(KIBIS &aTopLevel)
bool Init(const IbisParser &aParser)
std::vector< IbisWaveform * > m_fallingWaveforms
IbisWaveform TrimWaveform(const IbisWaveform &aIn) const
Copy a waveform, and substract the first value to all samples.
IBIS_MODEL_ENABLE m_enable
bool HasPOWERClamp() const
Return true if the model has a clamp diode to the power net.
std::vector< IbisWaveform * > m_risingWaveforms
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.
TypMinMaxValue m_pulldownReference
TypMinMaxValue m_GNDClampReference
bool HasPulldown() const
Return true if the model has a pulldown transistor.
IBIS_MODEL_POLARITY m_polarity
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.
TypMinMaxValue m_temperatureRange
TypMinMaxValue m_voltageRange
std::string m_description
KIBIS_MODEL(KIBIS &aTopLevel, const IbisModel &aSource, IbisParser &aParser)
TypMinMaxValue m_pullupReference
std::vector< std::pair< IbisWaveform *, IbisWaveform * > > waveformPairs()
Create waveform pairs.
TypMinMaxValue m_POWERClampReference
std::string SpiceDie(const KIBIS_PARAMETER &aParam, int aIndex) const
Generate the spice directive to simulate the die.
KIBIS_ACCURACY m_accuracy
void SetCornerFromString(IBIS_CORNER &aCorner, const std::string &aString)
KIBIS_WAVEFORM * m_waveform
TypMinMaxValue m_Rpin
Resistance from die to pin.
bool writeSpiceDiffDriver(std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
TypMinMaxValue m_Lpin
Inductance from die to pin.
void getKuKdFromFile(const std::string &aSimul)
Update m_Ku, m_Kd using with two waveform inputs.
KIBIS_COMPONENT * m_parent
std::vector< double > m_Ku
std::string m_pinNumber
Pin Number Examples : 1, 2, 3 ( or for BGA ), A1, A2, A3, etc...
std::string addDie(KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam, int aIndex)
Generate the spice directive to simulate the die for Ku/Kd estimation.
bool writeSpiceDevice(std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
std::vector< KIBIS_MODEL * > m_models
std::vector< double > m_t
TypMinMaxValue m_Cpin
Capacitance from pin to GND.
std::string m_signalName
Name of the pin Examples : "VCC", "GPIOA", "CLK", etc...
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.
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.
bool writeSpiceDiffDevice(std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
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.
KIBIS_PIN(KIBIS &aTopLevel, const IbisComponentPin &aPin, const IbisComponentPackage &aPackage, IbisParser &aParser, KIBIS_COMPONENT *aParent, std::vector< KIBIS_MODEL > &aModels)
std::vector< double > m_Kd
bool writeSpiceDriver(std::string &aDest, const std::string &aName, KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
KIBIS_PIN * m_complementaryPin
void getKuKdNoWaveform(KIBIS_MODEL &aModel, const KIBIS_PARAMETER &aParam)
Update m_Ku, m_Kd using no falling / rising waveform inputs ( low accuracy )
std::vector< KIBIS_MODEL > m_models
KIBIS()
Constructor for unitialized KIBIS members.
std::vector< KIBIS_COMPONENT > m_components
KIBIS_MODEL * GetModel(const std::string &aName)
Return the model with name aName .
KIBIS_COMPONENT * GetComponent(const std::string &aName)
Return the component with name aName .
std::string m_cacheDir
Absolute path of the directory that will be used for caching.
A pure virtual class used to derive REPORTER objects from.
static std::shared_ptr< SPICE_SIMULATOR > CreateInstance(const std::string &aName)
std::vector< VTtableEntry > m_entries
std::vector< std::pair< int, double > > SimplifyBitSequence(const std::vector< std::pair< int, double > > &bits)
IBIS_CORNER ReverseLogic(IBIS_CORNER aIn)
KIBIS_ACCURACY
Accuracy level.