45 #include <Xyce_config.h>
58 #include <N_ERH_ErrorMgr.h>
60 #include <N_LAS_Matrix.h>
61 #include <N_LAS_MultiVector.h>
62 #include <N_LAS_Vector.h>
63 #include <N_UTL_FeatureTest.h>
64 #include <N_UTL_Math.h>
65 #include <N_UTL_ExtendedString.h>
78 .setDescription(
"Relative device area")
79 .setAnalyticSensitivityAvailable(
true)
86 .setDescription(
"Vector of initial values: Vbe,Vce. Vbe=IC1");
92 .setDescription(
"Vector of initial values: Vbe,Vce. Vce=IC2");
98 .setDescription(
"Device temperature")
99 .setAnalyticSensitivityAvailable(
true)
106 .setDescription(
"Initial condition of no voltage drops accross device");
111 .setDescription(
"Flag for toggling the use of the lambert-W function instead of exponentials.");
122 .setDescription(
"Parameter measurement temperature")
123 .setAnalyticSensitivityAvailable(
true)
130 .setDescription(
"Transport saturation current")
131 .setAnalyticSensitivityAvailable(
true)
135 .setOriginalValueStored(
true)
139 .setDescription(
"Ideal maximum foward beta")
140 .setAnalyticSensitivityAvailable(
true)
145 .setOriginalValueStored(
true)
149 .setDescription(
"Ideal maximum foward beta")
150 .setAnalyticSensitivityAvailable(
true)
154 .setOriginalValueStored(
true)
157 .setDescription(
"Foward current emission coefficient")
158 .setAnalyticSensitivityAvailable(
true)
167 .setDescription(
"Foward early voltage")
168 .setAnalyticSensitivityAvailable(
true)
176 .setDescription(
"Foward early voltage")
177 .setAnalyticSensitivityAvailable(
true)
185 .setDescription(
"Foward early voltage")
186 .setAnalyticSensitivityAvailable(
true)
193 .setDescription(
"Corner for foward-beta high-current roll-off")
194 .setAnalyticSensitivityAvailable(
true)
201 .setDescription(
"Corner for foward-beta high-current roll-off")
202 .setAnalyticSensitivityAvailable(
true)
209 .setDescription(
"Corner for foward-beta high-current roll-off")
210 .setAnalyticSensitivityAvailable(
true)
219 .setDescription(
"Base-emitter leakage saturation current")
220 .setAnalyticSensitivityAvailable(
true)
229 .setDescription(
"Base-emitter leakage saturation current")
230 .setAnalyticSensitivityAvailable(
true)
237 .setDescription(
"Base-emitter leakage emission coefficient")
238 .setAnalyticSensitivityAvailable(
true)
245 .setDescription(
"Base-emitter leakage emission coefficient")
246 .setAnalyticSensitivityAvailable(
true)
254 .setDescription(
"Ideal maximum reverse beta")
255 .setAnalyticSensitivityAvailable(
true)
262 .setDescription(
"Ideal maximum reverse beta")
263 .setAnalyticSensitivityAvailable(
true)
269 .setDescription(
"Reverse current emission coefficient")
270 .setAnalyticSensitivityAvailable(
true)
279 .setDescription(
"Reverse early voltage")
280 .setAnalyticSensitivityAvailable(
true)
288 .setDescription(
"Reverse early voltage")
289 .setAnalyticSensitivityAvailable(
true)
297 .setDescription(
"Reverse early voltage")
298 .setAnalyticSensitivityAvailable(
true)
306 .setDescription(
"Reverse early voltage")
307 .setAnalyticSensitivityAvailable(
true)
315 .setDescription(
"Corner for reverse-beta high-current roll-off")
316 .setAnalyticSensitivityAvailable(
true)
324 .setDescription(
"Corner for reverse-beta high-current roll-off")
325 .setAnalyticSensitivityAvailable(
true)
334 .setDescription(
"Base-collector leakage saturation current")
335 .setAnalyticSensitivityAvailable(
true)
343 .setDescription(
"Base-collector leakage saturation current")
344 .setAnalyticSensitivityAvailable(
true)
350 .setDescription(
"Base-collector leakage emission coefficient")
351 .setAnalyticSensitivityAvailable(
true)
357 .setDescription(
"Zero-bias (maximum) base resistance")
358 .setAnalyticSensitivityAvailable(
true)
367 .setDescription(
"Current at which RB falls off by half")
368 .setAnalyticSensitivityAvailable(
true)
376 .setDescription(
"Current at which RB falls off by half")
377 .setAnalyticSensitivityAvailable(
true)
385 .setDescription(
"Current at which RB falls off by half")
386 .setAnalyticSensitivityAvailable(
true)
393 .setDescription(
"Maximum base resistance")
394 .setAnalyticSensitivityAvailable(
true)
401 .setDescription(
"Emitter ohmic resistance")
402 .setAnalyticSensitivityAvailable(
true)
409 .setDescription(
"Collector ohmic resistance")
410 .setAnalyticSensitivityAvailable(
true)
417 .setDescription(
"Base-emitter zero-bias p-n capacitance")
418 .setAnalyticSensitivityAvailable(
true)
427 .setDescription(
"Base-emitter built-in potential")
428 .setAnalyticSensitivityAvailable(
true)
436 .setDescription(
"Base-emitter built-in potential")
437 .setAnalyticSensitivityAvailable(
true)
446 .setDescription(
"Base-emitter p-n grading factor")
447 .setAnalyticSensitivityAvailable(
true)
455 .setDescription(
"Base-emitter p-n grading factor")
456 .setAnalyticSensitivityAvailable(
true)
462 .setDescription(
"Ideal foward transit time")
463 .setAnalyticSensitivityAvailable(
true)
469 .setDescription(
"Transit time bias dependence coefficient")
470 .setAnalyticSensitivityAvailable(
true)
477 .setDescription(
"Transit time dependancy on Vbc")
478 .setAnalyticSensitivityAvailable(
true)
487 .setDescription(
"Transit time dependancy on IC")
488 .setAnalyticSensitivityAvailable(
true)
496 .setDescription(
"Transit time dependancy on IC")
497 .setAnalyticSensitivityAvailable(
true)
503 .setDescription(
"Excess Phase at 1/(2pi*TF) Hz")
504 .setAnalyticSensitivityAvailable(
true)
511 .setDescription(
"Base-collector zero-bias p-n capacitance")
512 .setAnalyticSensitivityAvailable(
true)
521 .setDescription(
"Base-collector built-in potential")
522 .setAnalyticSensitivityAvailable(
true)
530 .setDescription(
"Base-collector built-in potential")
531 .setAnalyticSensitivityAvailable(
true)
540 .setDescription(
"Base-collector p-n grading factor")
541 .setAnalyticSensitivityAvailable(
true)
549 .setDescription(
"Base-collector p-n grading factor")
550 .setAnalyticSensitivityAvailable(
true)
558 .setDescription(
"Fraction of CJC connected internally to RB")
559 .setAnalyticSensitivityAvailable(
true)
565 .setDescription(
"Fraction of CJC connected internally to RB")
566 .setAnalyticSensitivityAvailable(
true)
572 .setDescription(
"Ideal reverse transit time")
573 .setAnalyticSensitivityAvailable(
true)
582 .setDescription(
"Substrate zero-bias p-n capacitance")
583 .setAnalyticSensitivityAvailable(
true)
591 .setDescription(
"Substrate zero-bias p-n capacitance")
592 .setAnalyticSensitivityAvailable(
true)
600 .setDescription(
"Substrate zero-bias p-n capacitance")
601 .setAnalyticSensitivityAvailable(
true)
610 .setDescription(
"Substrate built-in potential")
611 .setAnalyticSensitivityAvailable(
true)
619 .setDescription(
"Substrate built-in potential")
620 .setAnalyticSensitivityAvailable(
true)
628 .setDescription(
"Substrate built-in potential")
629 .setAnalyticSensitivityAvailable(
true)
637 .setDescription(
"Substrate p-n grading factor")
638 .setAnalyticSensitivityAvailable(
true)
645 .setDescription(
"Substrate p-n grading factor")
646 .setAnalyticSensitivityAvailable(
true)
653 .setDescription(
"Substrate p-n grading factor")
654 .setAnalyticSensitivityAvailable(
true)
663 .setDescription(
"Foward and reverse beta temperature coefficient")
664 .setAnalyticSensitivityAvailable(
true)
672 .setDescription(
"Foward and reverse beta temperature coefficient")
673 .setAnalyticSensitivityAvailable(
true)
681 .setDescription(
"Foward and reverse beta temperature coefficient")
682 .setAnalyticSensitivityAvailable(
true)
688 .setDescription(
"Bandgap voltage (barrier highth)")
689 .setAnalyticSensitivityAvailable(
true)
698 .setDescription(
"Temperature exponent for IS. (synonymous with PT)")
699 .setAnalyticSensitivityAvailable(
true)
707 .setDescription(
"Temperature exponent for IS. (synonymous with XTI)")
708 .setAnalyticSensitivityAvailable(
true)
714 .setDescription(
"Flicker noise coefficient");
719 .setDescription(
"Flicker noise exponent");
725 .setDescription(
"Foward-bias depletion capacitor coefficient")
726 .setAnalyticSensitivityAvailable(
true)
733 .setDescription(
"Coefficient for base-emitter leak current.")
734 .setAnalyticSensitivityAvailable(
true)
741 .setDescription(
"Coefficient for base-collector leak current.")
742 .setAnalyticSensitivityAvailable(
true)
750 .setDescription(
"High current rolloff coefficient")
751 .setAnalyticSensitivityAvailable(
true)
758 .setDescription(
"High current rolloff coefficient")
759 .setAnalyticSensitivityAvailable(
true)
827 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
836 externalNodeMode(false),
853 tleakBEEmissionCoeff(1.5),
854 tleakBCEmissionCoeff(2.0),
948 li_store_capeqCB(-1),
954 li_branch_dev_ib(-1),
955 li_branch_dev_ie(-1),
956 li_branch_dev_ic(-1),
957 li_branch_dev_is(-1),
975 AEmitEquEmitPNodeOffset(-1),
976 AEmitPEquEmitNodeOffset(-1),
977 ABaseEquBasePNodeOffset(-1),
978 ABasePEquBaseNodeOffset(-1),
979 ACollEquCollPNodeOffset(-1),
980 ACollPEquCollNodeOffset(-1),
981 AEmitEquEmitNodeOffset(-1),
982 AEmitPEquEmitPNodeOffset(-1),
983 ABaseEquBaseNodeOffset(-1),
984 ABasePEquBasePNodeOffset(-1),
985 ACollEquCollNodeOffset(-1),
986 ACollPEquCollPNodeOffset(-1),
987 AEmitPEquBasePNodeOffset(-1),
988 ABasePEquEmitPNodeOffset(-1),
989 AEmitPEquCollPNodeOffset(-1),
990 ACollPEquEmitPNodeOffset(-1),
991 ABasePEquCollPNodeOffset(-1),
992 ACollPEquBasePNodeOffset(-1),
993 ABaseEquCollPNodeOffset(-1),
994 ACollPEquBaseNodeOffset(-1),
995 ASubstEquSubstNodeOffset(-1),
996 ASubstEquCollPNodeOffset(-1),
997 ACollPEquSubstNodeOffset(-1),
998 ABaseEquEmitPNodeOffset(-1) ,
999 ACollPEquIfxNodeOffset(-1),
1000 AEmitPEquIfxNodeOffset(-1),
1001 AIfxEquCollPNodeOffset(-1),
1002 AIfxEquBasePNodeOffset(-1),
1003 AIfxEquEmitPNodeOffset(-1),
1004 AIfxEquIfxNodeOffset(-1),
1005 AIfxEqudIfxNodeOffset(-1),
1006 AdIfxEquCollPNodeOffset(-1),
1007 AdIfxEquBasePNodeOffset(-1),
1008 AdIfxEquEmitPNodeOffset(-1),
1009 AdIfxEquIfxNodeOffset(-1),
1010 AdIfxEqudIfxNodeOffset(-1),
1014 f_EmitEquEmitPNodePtr(0),
1015 f_EmitPEquEmitNodePtr(0),
1016 f_BaseEquBasePNodePtr(0),
1017 f_BasePEquBaseNodePtr(0),
1018 f_CollEquCollPNodePtr(0),
1019 f_CollPEquCollNodePtr(0),
1020 f_EmitEquEmitNodePtr(0),
1021 f_EmitPEquEmitPNodePtr(0),
1022 f_BaseEquBaseNodePtr(0),
1023 f_BasePEquBasePNodePtr(0),
1024 f_CollEquCollNodePtr(0),
1025 f_CollPEquCollPNodePtr(0),
1026 f_EmitPEquBasePNodePtr(0),
1027 f_BasePEquEmitPNodePtr(0),
1028 f_EmitPEquCollPNodePtr(0),
1029 f_CollPEquEmitPNodePtr(0),
1030 f_BasePEquCollPNodePtr(0),
1031 f_CollPEquBasePNodePtr(0),
1032 f_BaseEquCollPNodePtr(0),
1033 f_CollPEquBaseNodePtr(0),
1034 f_SubstEquSubstNodePtr(0),
1035 f_SubstEquCollPNodePtr(0),
1036 f_CollPEquSubstNodePtr(0),
1037 f_BaseEquEmitPNodePtr(0),
1040 f_CollPEquIfxNodePtr(0),
1041 f_EmitPEquIfxNodePtr(0),
1044 f_IfxEquCollPNodePtr(0),
1045 f_IfxEquBasePNodePtr(0),
1046 f_IfxEquEmitPNodePtr(0),
1048 f_IfxEquIfxNodePtr(0),
1049 f_IfxEqudIfxNodePtr(0),
1051 f_dIfxEquCollPNodePtr(0),
1052 f_dIfxEquBasePNodePtr(0),
1053 f_dIfxEquEmitPNodePtr(0),
1054 f_dIfxEquIfxNodePtr(0),
1055 f_dIfxEqudIfxNodePtr(0),
1059 q_EmitEquEmitPNodePtr(0),
1060 q_EmitPEquEmitNodePtr(0),
1061 q_BaseEquBasePNodePtr(0),
1062 q_BasePEquBaseNodePtr(0),
1063 q_CollEquCollPNodePtr(0),
1064 q_CollPEquCollNodePtr(0),
1065 q_EmitEquEmitNodePtr(0),
1066 q_EmitPEquEmitPNodePtr(0),
1067 q_BaseEquBaseNodePtr(0),
1068 q_BasePEquBasePNodePtr(0),
1069 q_CollEquCollNodePtr(0),
1070 q_CollPEquCollPNodePtr(0),
1071 q_EmitPEquBasePNodePtr(0),
1072 q_BasePEquEmitPNodePtr(0),
1073 q_EmitPEquCollPNodePtr(0),
1074 q_CollPEquEmitPNodePtr(0),
1075 q_BasePEquCollPNodePtr(0),
1076 q_CollPEquBasePNodePtr(0),
1077 q_BaseEquCollPNodePtr(0),
1078 q_CollPEquBaseNodePtr(0),
1079 q_SubstEquSubstNodePtr(0),
1080 q_SubstEquCollPNodePtr(0),
1081 q_CollPEquSubstNodePtr(0),
1082 q_BaseEquEmitPNodePtr(0),
1085 q_CollPEquIfxNodePtr(0),
1086 q_EmitPEquIfxNodePtr(0),
1089 q_IfxEquCollPNodePtr(0),
1090 q_IfxEquBasePNodePtr(0),
1091 q_IfxEquEmitPNodePtr(0),
1093 q_IfxEquIfxNodePtr(0),
1094 q_IfxEqudIfxNodePtr(0),
1096 q_dIfxEquCollPNodePtr(0),
1097 q_dIfxEquBasePNodePtr(0),
1098 q_dIfxEquEmitPNodePtr(0),
1099 q_dIfxEquIfxNodePtr(0),
1100 q_dIfxEqudIfxNodePtr(0),
1276 int numExist = cNode + eNode + bNode;
1278 if (numExtVars <= 4)
1286 if (numExtVars != 4 + numExist)
1288 UserError(*
this) <<
"Wrong number of external nodes are set!" << std::endl
1289 <<
"Either set none of them, or set them all.";
1327 const std::vector<int> & extLIDVecRef )
1332 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
1334 Xyce::dout() << section_divider << std::endl;
1335 Xyce::dout() <<
" BJTInstance::registerLIDs" <<std::endl;
1336 Xyce::dout() <<
" name = " <<
getName() << std::endl;
1337 Xyce::dout() <<
" number of internal variables: " <<
numIntVars << std::endl;
1338 Xyce::dout() <<
" number of external variables: " <<
numExtVars << std::endl;
1339 Xyce::dout() <<
" numIntVars = " <<
numIntVars << std::endl;
1340 Xyce::dout() <<
" numExtVars = " <<
numExtVars << std::endl;
1347 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
1349 Xyce::dout() <<
" Internal LID List" << std::endl;
1350 for(
int i = 0; i <
intLIDVec.size(); ++i )
1351 Xyce::dout() <<
" " <<
intLIDVec[i] << std::endl;
1352 Xyce::dout() <<
" External LID List" << std::endl;
1353 for(
int i = 0; i <
extLIDVec.size(); ++i )
1354 Xyce::dout() <<
" " <<
extLIDVec[i] << std::endl;
1416 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
1418 Xyce::dout() <<
" li_Coll = " <<
li_Coll << std::endl;
1419 Xyce::dout() <<
" li_CollP = " <<
li_CollP << std::endl;
1420 Xyce::dout() <<
" li_Base = " <<
li_Base << std::endl;
1421 Xyce::dout() <<
" li_BaseP = " <<
li_BaseP << std::endl;
1422 Xyce::dout() <<
" li_Emit = " <<
li_Emit << std::endl;
1423 Xyce::dout() <<
" li_EmitP = " <<
li_EmitP << std::endl;
1424 Xyce::dout() <<
" li_Subst = " <<
li_Subst << std::endl;
1428 Xyce::dout() <<
" li_Ifx = " <<
li_Ifx << std::endl;
1429 Xyce::dout() <<
" li_dIfx = " <<
li_dIfx << std::endl;
1432 Xyce::dout() << section_divider << std::endl;
1620 std::vector<int> map;
1621 std::vector< std::vector<int> > map2;
1745 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
1866 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1868 Xyce::dout() <<
"Start BJTInst::updateTemperature" << std::endl;
1869 Xyce::dout() <<
"temp = "<<temp << std::endl;
1871 if( temp != -999.0 )
TEMP = temp;
1891 double pbfact = -2.0 *
vt * ( 1.5 * log( fact2 ) +
CONSTQ * arg );
1896 double factor = exp( factlog );
1900 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1902 Xyce::dout() <<
" Factor is " << factor << std::endl;
1903 Xyce::dout() <<
" Bfactor is " << bfactor << std::endl;
1904 Xyce::dout() <<
" factlog is " << factlog << std::endl;
1905 Xyce::dout() <<
" ratio1 is " << ratio1 << std::endl;
1906 Xyce::dout() <<
" TEMP is " <<
TEMP << std::endl;
1907 Xyce::dout() <<
" TNOM is " <<
model_.
TNOM << std::endl;
1919 tBEPot = fact2 * pbo + pbfact;
1921 double gmanew = (
tBEPot - pbo ) / pbo;
1931 tBCPot = fact2 * pbo + pbfact;
1933 gmanew = (
tBCPot - pbo ) / pbo;
1990 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1993 Xyce::dout() << section_divider << std::endl;
1994 Xyce::dout() <<
"In BJTInst::updateTemperature" << std::endl;
1995 Xyce::dout() << section_divider << std::endl;
1996 Xyce::dout() <<
"TEMP = " <<
TEMP << std::endl;
1997 Xyce::dout() <<
"TNOM = " << TNOM << std::endl;
1998 Xyce::dout() <<
"vt = " <<
vt << std::endl;
1999 Xyce::dout() <<
"tSatCur = " <<
tSatCur << std::endl;
2000 Xyce::dout() <<
"tBetaF = " <<
tBetaF << std::endl;
2001 Xyce::dout() <<
"tBetaR = " <<
tBetaR << std::endl;
2002 Xyce::dout() <<
"tBELeakCur = " <<
tBELeakCur << std::endl;
2003 Xyce::dout() <<
"tBCLeakCur = " <<
tBELeakCur << std::endl;
2004 Xyce::dout() <<
"tBEPot = " <<
tBEPot << std::endl;
2005 Xyce::dout() <<
"tBECap = " <<
tBECap << std::endl;
2006 Xyce::dout() <<
"tBCPot = " <<
tBCPot << std::endl;
2007 Xyce::dout() <<
"tBCCap = " <<
tBCCap << std::endl;
2008 Xyce::dout() <<
"tDepCap = " <<
tDepCap << std::endl;
2009 Xyce::dout() <<
"tF1 = " <<
tF1 << std::endl;
2010 Xyce::dout() <<
"tF4 = " <<
tF4 << std::endl;
2011 Xyce::dout() <<
"tF5 = " <<
tF5 << std::endl;
2014 Xyce::dout() <<
"tRollOffExp = " <<
tRollOffExp << std::endl;
2015 Xyce::dout() <<
"tInvRollOffF = " <<
tInvRollOffF << std::endl;
2016 Xyce::dout() <<
"tInvRollOffR = " <<
tInvRollOffR << std::endl;
2017 Xyce::dout() <<
"tInvEarlyVoltF = " <<
tInvEarlyVoltF << std::endl;
2018 Xyce::dout() <<
"tInvEarlyVoltR = " <<
tInvEarlyVoltR << std::endl;
2019 Xyce::dout() <<
"tBaseResist = " <<
tBaseResist << std::endl;
2021 Xyce::dout() <<
"tEmitterResist = " <<
tEmitterResist << std::endl;
2022 Xyce::dout() << section_divider << std::endl;
2023 Xyce::dout() << std::endl;
2040 double RS = 1.0e-12;
2041 double arg1 = (Vd + Isat*
RS)/Vte;
2043 double evd = exp(arg1);
2044 double lambWArg = Isat*RS*evd/Vte;
2050 Id = -Isat+Vte*(lambWReturn)/RS;
2051 Gd = lambWReturn / ((1 + lambWReturn)*RS);
2075 (*maskVectorPtr)[
li_Ifx] = 0.0;
2076 (*maskVectorPtr)[
li_dIfx] = 0.0;
2128 double Cp_Jdxp_q = 0.0;
2129 double Ep_Jdxp_q = 0.0;
2130 double Bp_Jdxp_q = 0.0;
2249 double coefC, coefB, coefE, coefCp, coefBp, coefEp;
2257 double vce_diff = vbe_diff - vbc_diff;
2297 double Cp_Jdxp_f=0.0;
2298 double Bp_Jdxp_f=0.0;
2299 double Ep_Jdxp_f=0.0;
2300 double dIfx_Jdxp_f=0.0 ;
2301 double Ifx_Jdxp_f=0.0 ;
2346 dFdxdVp[
li_dIfx] += dIfx_Jdxp_f;
2350 dFdxdVp[
li_Ifx] += Ifx_Jdxp_f;
2649 noiseData.
resize(numSources);
2664 std::string(
"_1overf");
2789 (
double & iEX,
double & gEX,
double & iC_local)
2792 double td = model_.excessPhaseFac;
2794 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2796 Xyce::dout() << std::endl;
2797 Xyce::dout() <<
" Excess Phase stuff:" <<std::endl;
2798 Xyce::dout() <<
" name = " <<
getName() <<std::endl;
2799 Xyce::dout() <<
" td = " << td <<std::endl;
2814 dt0 = getSolverState().currTimeStep_;
2815 dt1 = getSolverState().lastTimeStep_;
2820 if (!(getSolverState().dcopFlag) && td != 0)
2822 double arg1, arg2, denom;
2827 denom = 1.0 + arg1 + arg2;
2828 phaseScalar = arg1 / denom;
2831 if (!getSolverState().beginIntegrationFlag_)
2833 currCexbc = (*extData.currStaVectorPtr)[li_istateCEXBC];
2834 lastCexbc = (*extData.lastStaVectorPtr)[li_istateCEXBC];
2837 iC_local = ((currCexbc) * (1 + dt0 / dt1 + arg2) - (lastCexbc) * dt0 / dt1) / denom;
2838 iEX = iBE * phaseScalar;
2839 gEX = gBE * phaseScalar;
2841 nextCexbc = iC_local + iEX / qB;
2842 (*extData.nextStaVectorPtr)[li_istateCEXBC] = nextCexbc;
2858 bool bsuccess =
true;
2860 double v_emit, v_emitP;
2861 double v_base, v_baseP;
2862 double v_coll, v_collP;
2868 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2870 Xyce::dout() << Xyce::section_divider << std::endl;
2871 Xyce::dout() <<
"Instance::updateIntermediateVars " <<
getName() <<std::endl;
2883 vEEp = (v_emit - v_emitP);
2884 vBBp = (v_base - v_baseP);
2885 vCCp = (v_coll - v_collP);
2915 if ((*flagSolVectorPtr)[
li_Emit] == 0 || (*flagSolVectorPtr)[
li_EmitP] == 0 ||
2916 (*flagSolVectorPtr)[
li_Base] == 0 || (*flagSolVectorPtr)[
li_BaseP] == 0 ||
2917 (*flagSolVectorPtr)[
li_Coll] == 0 || (*flagSolVectorPtr)[
li_CollP] == 0 ||
2918 (*flagSolVectorPtr)[
li_Subst] == 0 )
2933 Xyce::dout() <<
" Setting device initial condition to Base-Emitter drop=tVCrit (" <<
tVCrit <<
")"<<std::endl;
2939 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2941 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
2942 Xyce::dout() <<
" " <<std::endl;
2943 Xyce::dout() <<
" using UIC.\n";
2944 Xyce::dout() <<
" vBE = " <<
vBE << std::endl;
2945 Xyce::dout() <<
" vBC = " <<
vBC << std::endl;
2946 Xyce::dout() <<
" vBX = " <<
vBX << std::endl;
2947 Xyce::dout() <<
" vCS = " <<
vCS << std::endl;
2961 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2963 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
2964 Xyce::dout() <<
" " <<std::endl;
2965 Xyce::dout() <<
" BJT explicitly set OFF, zeroing all junction drops.\n";
2994 Xyce::dout() <<
" tVCrit = " <<
tVCrit << std::endl;
2995 Xyce::dout().width(3);
2997 Xyce::dout().width(5); Xyce::dout() <<
getName();
2998 Xyce::dout() <<
" Blim: ";
2999 Xyce::dout() <<
" vBE=";
3000 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
3001 Xyce::dout() <<
vBE;
3002 Xyce::dout() <<
" vBC=";
3003 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
3004 Xyce::dout() <<
vBC << std::endl;
3024 if (ichk1 == 1) icheck=1;
3030 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3032 Xyce::dout().width(3);
3034 Xyce::dout().width(5); Xyce::dout() <<
getName() ;
3035 Xyce::dout() <<
" Alim: ";
3036 Xyce::dout() <<
" vBE=";
3037 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
3038 Xyce::dout() <<
vBE;
3039 Xyce::dout() <<
" vBC=";
3040 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
3041 Xyce::dout() <<
vBC;
3047 if (
origFlag) Xyce::dout() <<
" SAME";
3048 else Xyce::dout() <<
" DIFF";
3049 Xyce::dout() << std::endl;
3066 if(
vBE > -5.0 * vtF )
3070 if( iLeakBE == 0.0 )
3085 if(
vBC > -5.0 * vtR )
3089 if( iLeakBC == 0.0 )
3108 if (
vBE > -5.0 * vtF)
3110 double arg1 =
vBE / vtF ;
3130 double arg1 =
vBE / vtE ;
3140 evBEleak = exp(arg1);
3143 iBEleak = iLeakBE * (evBEleak - 1.0);
3144 gBEleak = iLeakBE * devBEleak / vtE;
3155 if(
vBC > -5.0 * vtR )
3157 double arg1 =
vBC / vtR ;
3177 double arg1 =
vBC / vtC ;
3187 evBCleak = exp(arg1);
3190 iBCleak = iLeakBC * (evBCleak - 1.0);
3191 gBCleak = iLeakBC * devBCleak / vtC;
3209 if (rofF == 0.0 && rofR == 0.0)
3212 double q1_qB = q1 *
qB;
3222 q2 = rofF *
iBE + rofR *
iBC;
3235 double arg = 1.0 + 4.0 * q2;
3243 if (fabs(arg) > 0.0) sqarg = pow(arg,
tRollOffExp);
3244 double rofF_gBE_invSqarg = 0.0;
3245 double rofR_gBC_invSqarg = 0.0;
3246 if(arg != 0) rofF_gBE_invSqarg = rofF*
gBE*2*
tRollOffExp*sqarg/arg;
3247 if(arg != 0) rofR_gBC_invSqarg = rofR*
gBC*2*
tRollOffExp*sqarg/arg;
3249 qB = 0.5 * q1 * (1.0 + sqarg);
3304 bool geqCB_recalc(
false);
3327 arg2 = argtf * (3.0 - 2.0 * tmp);
3337 geqCB_recalc =
true;
3432 qBX =
tBCPot * czBX * ( 1.0 - arg * sarg ) /
3434 capBX = czBX * sarg;
3463 capCS = czCS * sarg;
3479 double iEX_tmp = 0.0;
double gEX_tmp = 0.0;
double iC_tmp = 0.0;
3521 gX = rBpr + rBpi /
qB;
3523 if (fabs(xjrB) > 0.0)
3525 double arg1 = std::max(
iB / xjrB, 1.0e-09);
3526 double arg2 = (-1.0 + sqrt( 1.0 + 14.59025 * arg1)) / 2.4317 / sqrt(arg1);
3528 gX = rBpr + 3.0 * rBpi * (arg1 - arg2) / arg2 / arg1 / arg1;
3531 if (fabs(
gX) > 0.0)
gX = 1.0 /
gX;
3554 bool bsuccess =
true;
3557 std::ostringstream oss;
3558 oss <<
"Q_" <<
getName() <<
".dat";
3559 std::string filename = oss.str();
3566 fp1 = fopen(filename.c_str(),
"w");
3570 fp1 = fopen(filename.c_str(),
"a");
3576 " TITLE = \"Debug Excess Phase data: %s \"\n",
getName().getEncodedName().c_str());
3581 fprintf(fp1,
"%s",
"\tVARIABLES = \"TIME (S)\",\n");
3583 fprintf(fp1,
"%s",
"\t \"iBE/qB \",\n");
3584 fprintf(fp1,
"%s",
"\t \"currCexbc \",\n");
3585 fprintf(fp1,
"%s",
"\t \"lastCexbc \",\n");
3588 fprintf(fp1,
"%s",
"\t \"i_fx \",\n");
3589 fprintf(fp1,
"%s",
"\t \"di_fx \",\n");
3592 fprintf(fp1,
"%s",
"\tZONE F=POINT T=\"Excess Phase Data\"\n");
3595 fprintf(fp1,
" %12.4e",time);
3596 fprintf(fp1,
" %12.4e",(
iBE/
qB));
3603 double i_fx = solVec[
li_Ifx];
3604 double di_fx = solVec[
li_dIfx];
3605 fprintf(fp1,
" %12.4e",i_fx);
3606 fprintf(fp1,
" %12.4e",di_fx);
3609 fprintf(fp1,
"%s",
"\n");
3680 Xyce::dout() <<
"Bad Depletion Capacitance Coefficient" << std::endl;
3709 std::vector<Instance*>::iterator iter;
3713 for (iter=first; iter!=last; ++iter)
3715 (*iter)->processParams();
3733 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
3740 emissionCoeffF(1.0),
3750 leakBEEmissionCoeff(1.5),
3756 emissionCoeffR(1.0),
3767 leakBCEmissionCoeff(2.0),
3769 baseCurrHalfResist(0.0),
3773 minBaseResist(baseResist),
3775 collectorResist(0.0),
3786 transTimeBiasCoeffF(0.0),
3787 transTimeFVBC(1.e99),
3788 transTimeHighCurrF(0.0),
3841 leakBCCurrentGiven(false),
3843 leakBECurrentGiven(false),
3845 minBaseResistGiven(false),
3860 UserError0(*
this) <<
"Both BF and BFM are set, which is redundant.";
3870 UserError0(*
this) <<
"Both BR and BRM are set, which is redundant.";
3878 int VAFgivenCount = 0;
3882 if (VAFgivenCount > 1)
3884 UserError0(*
this) <<
"The forward early voltage is set more than once. VA, VAF and VBF are aliases.";
3886 if (VAFgivenCount > 0)
3892 int VARgivenCount = 0;
3897 if (VARgivenCount > 1)
3899 UserError0(*
this) <<
"The reverse early voltage is set more than once. VAR,VB,VRB and BV are aliases.";
3901 if (VARgivenCount > 0)
3907 int IKFgivenCount = 0;
3911 if (IKFgivenCount > 1)
3913 UserError0(*
this) <<
"High current roll-off is set more than once (IKF, JBF or IK).";
3915 if (IKFgivenCount > 0)
3923 UserError0(*
this) <<
"Both IKR and JBRgiven are set, which is redundant.";
3934 UserError0(*
this) <<
"Both JLE and ISE are set, which is redundant.";
3945 UserError0(*
this) <<
"Both JLC and ISC are set, which is redundant.";
3955 UserError0(*
this) <<
"Both NLE and NE are set, which is redundant.";
3965 UserError0(*
this) <<
" Both MJE and ME are set, which is redundant.";
3975 UserError0(*
this) <<
"Both MJC and MC are set, which is redundant.";
3983 int CJSgivenCount = 0;
3987 if (CJSgivenCount > 1)
3989 UserError0(*
this) <<
"The zero-bias collector-substrate capacitance (CJS, CCS or CSUB) is set more than once.";
3991 if (CJSgivenCount > 0)
3997 int IRBgivenCount = 0;
4001 if (IRBgivenCount > 1)
4003 UserError0(*
this) <<
"The current for 1/2 base resistance (IRB, JRB or IOB) is set more than once.";
4005 if (IRBgivenCount > 0)
4013 UserError0(*
this) <<
"The BE built-in potential (VJE or PE) is set more than once.";
4023 UserError0(*
this) <<
"The BC built-in potential (VJC or PC) is set more than once.";
4033 UserError0(*
this) <<
"XCJC and CDIS are both set (they are aliases).";
4041 int VJSgivenCount = 0;
4045 if (VJSgivenCount > 1)
4047 UserError0(*
this) <<
"The Substrate built-in potential is set more than once. PS, VJS and PSUB are aliases.";
4049 if (VJSgivenCount > 0)
4055 int MJSgivenCount = 0;
4059 if (MJSgivenCount > 1)
4061 UserError0(*
this) <<
"The Substrate p-n grading factor is set more than once. MS, MJS and ESUB are aliases.";
4063 if (MJSgivenCount > 0)
4071 UserError0(*
this) <<
"ITF and JTF are both set (they are aliases).";
4081 UserError0(*
this) <<
"NK and NKF are both set (they are aliases).";
4089 int XTBgivenCount = 0;
4093 if (XTBgivenCount > 1)
4095 UserError0(*
this) <<
"The beta temperature coefficient is set more than once. TB, XTB and TCB are aliases.";
4097 if (XTBgivenCount > 0)
4106 UserError0(*
this) <<
"PT and XTI are both set (they are aliases).";
4147 std::vector<Instance*>::iterator iterI;
4152 for (iterI = firstI; iterI != lastI; ++iterI)
4169 std::vector<Instance*>::const_iterator iter;
4174 os <<
" name modelName Parameters" << std::endl;
4175 for (i = 0, iter = first; iter != last; ++iter, ++i)
4177 os <<
" " << i <<
": " << (*iter)->getName() <<
" ";
4181 os <<
" AREA = " << (*iter)->AREA << std::endl;
4182 os <<
" icVBE = " << (*iter)->icVBE << std::endl;
4183 os <<
" icVCE = " << (*iter)->icVCE << std::endl;
4184 os <<
" TEMP = " << (*iter)->TEMP << std::endl;
4185 os <<
" OFF = " << (*iter)->OFF << std::endl;
4211 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
4230 bool bsuccess =
true;
4240 bsuccess = bsuccess && btmp;
4286 bool bsuccess =
true;
4315 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV)
4324 double vce_diff = vbe_diff - vbc_diff;
4341 i_fx = solVec[bi.
li_Ifx];
4349 fVec[bi.
li_Ifx] += - di_fx;
4350 fVec[bi.
li_dIfx] += 3 * di_fx*td + 3*i_fx -3 * bi.
iBE / bi.
qB;
4390 double Cp_Jdxp_f(0.0), Bp_Jdxp_f(0.0), Ep_Jdxp_f(0.0),
4391 dIfx_Jdxp_f(0.0 ), Ifx_Jdxp_f(0.0 ),
4392 Cp_Jdxp_q ( 0.0), Ep_Jdxp_q ( 0.0), Bp_Jdxp_q ( 0.0);
4397 Cp_Jdxp_f = + bi.
diCEdvBp * vbe_diff
4403 Bp_Jdxp_f = bi.
gBEtot * vbe_diff + bi.
gBCtot * vbc_diff;
4435 dFdxdVp[bi.
li_dIfx] += dIfx_Jdxp_f;
4439 dFdxdVp[bi.
li_Ifx] += Ifx_Jdxp_f;
4514 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
4731 .registerDevice(
"q", 1)
4732 .registerModelType(
"pnp", 1)
4733 .registerModelType(
"npn", 1);
4743 template <
typename ScalarT>
4747 const ScalarT & TEMP,
4750 const ScalarT & TNOM,
4751 const ScalarT & energyGap,
4752 const ScalarT & tempExpIS,
4753 const ScalarT & betaExp,
4754 const ScalarT & potBE,
4755 const ScalarT & depCapBE,
4756 const ScalarT & juncExpBE,
4757 const ScalarT & depCapBC,
4758 const ScalarT & juncExpBC,
4759 const ScalarT & depCapCoeff,
4760 const ScalarT & satCur,
4761 const ScalarT & betaF,
4762 const ScalarT & betaR,
4769 bool leakBECurrentGiven,
4770 bool leakBCCurrentGiven,
4772 const ScalarT & leakBEEmissionCoeff,
4773 const ScalarT & leakBCEmissionCoeff,
4775 const ScalarT & rollOffExp,
4776 const ScalarT & baseResist,
4777 const ScalarT & collectorResist,
4778 const ScalarT & emitterResist,
4779 const ScalarT & potBC,
4780 const ScalarT & rollOffF,
4781 const ScalarT & rollOffR,
4782 const ScalarT & earlyVoltF,
4783 const ScalarT & earlyVoltR,
4787 ScalarT & leakBECurrent,
4788 ScalarT & leakBCCurrent,
4789 ScalarT & tBELeakCur,
4790 ScalarT & tBCLeakCur,
4791 ScalarT & tleakBEEmissionCoeff,
4792 ScalarT & tleakBCEmissionCoeff,
4794 ScalarT & tRollOffExp,
4795 ScalarT & tInvRollOffF,
4796 ScalarT & tInvRollOffR,
4797 ScalarT & tBaseResist,
4798 ScalarT & tCollectorResist,
4799 ScalarT & tEmitterResist,
4813 ScalarT & tInvEarlyVoltF,
4814 ScalarT & tInvEarlyVoltR
4823 ScalarT arg = -egfet / ( 2.0 *
CONSTboltz * TEMP ) +
4825 ScalarT pbfact = -2.0 * vt * ( 1.5 * log( fact2 ) +
CONSTQ * arg );
4826 ScalarT ratlog = log( TEMP / TNOM );
4827 ScalarT ratio1 = TEMP / TNOM - 1.0;
4828 ScalarT factlog = ratio1 * energyGap / vt
4829 + tempExpIS * ratlog;
4830 ScalarT factor = exp( factlog );
4831 ScalarT bfactor = exp( ratlog * betaExp );
4835 ScalarT pbo = ( potBE - pbfact ) / fact1;
4836 ScalarT gmaold = ( potBE - pbo ) / pbo;
4838 tBECap = depCapBE / ( 1.0 + juncExpBE *
4840 tBEPot = fact2 * pbo + pbfact;
4842 ScalarT gmanew = ( tBEPot - pbo ) / pbo;
4844 tBECap *= 1.0 + juncExpBE *
4847 pbo = ( potBC - pbfact ) / fact1;
4848 gmaold = ( potBC - pbo ) / pbo;
4850 tBCCap = depCapBC / ( 1.0 + juncExpBC *
4852 tBCPot = fact2 * pbo + pbfact;
4854 gmanew = ( tBCPot - pbo ) / pbo;
4856 tBCCap *= 1.0 + juncExpBC *
4860 tDepCap = depCapCoeff * tBEPot;
4863 ScalarT xfc = log( 1.0 - depCapCoeff );
4864 tF1 = tBEPot * ( 1.0 - exp( ( 1.0 - juncExpBE ) * xfc ) ) /
4865 ( 1.0 - juncExpBE );
4867 tF4 = depCapCoeff * tBCPot;
4868 tF5 = tBCPot * ( 1.0 - exp( ( 1.0 - juncExpBC ) * xfc ) ) /
4869 ( 1.0 - juncExpBC );
4872 tVCrit = vt * log( vt / (
CONSTroot2 * satCur ) );
4874 tSatCur = satCur * factor;
4876 tBetaF = betaF * bfactor;
4877 tBetaR = betaR * bfactor;
4880 if (!leakBECurrentGiven && c2Given)
4882 leakBECurrent = c2 * satCur;
4885 if (!leakBCCurrentGiven && c4Given)
4887 leakBCCurrent = c4 * satCur;
4890 tBELeakCur = leakBECurrent * exp( factlog / leakBEEmissionCoeff ) / bfactor;
4892 tBCLeakCur = leakBCCurrent * exp( factlog / leakBCEmissionCoeff ) / bfactor;
4894 tleakBEEmissionCoeff = leakBEEmissionCoeff;
4895 tleakBCEmissionCoeff = leakBCEmissionCoeff;
4897 tRollOffExp = rollOffExp;
4898 tBaseResist = baseResist;
4899 tCollectorResist = collectorResist;
4900 tEmitterResist = emitterResist;
4903 tInvRollOffF = 1/rollOffF;
4907 tInvRollOffR = 1/rollOffR;
4910 if (earlyVoltF != 0)
4911 tInvEarlyVoltF = 1/earlyVoltF;
4914 if (earlyVoltR != 0)
4915 tInvEarlyVoltR = 1/earlyVoltR;
4924 template <
typename ScalarT>
4927 bool leakBECurrentGiven,
4928 bool leakBCCurrentGiven,
4931 bool minBaseResistGiven,
4941 const ScalarT & satCur,
4942 const ScalarT & baseResist,
4943 const ScalarT & earlyVoltF,
4944 const ScalarT & rollOffF,
4945 const ScalarT & earlyVoltR,
4946 const ScalarT & rollOffR,
4948 const ScalarT & collectorResist,
4949 const ScalarT & emitterResist,
4950 const ScalarT & transTimeFVBC,
4951 const ScalarT & excessPhase,
4952 const ScalarT & transTimeF,
4953 const ScalarT & juncExpBE,
4954 const ScalarT & juncExpBC,
4957 ScalarT & leakBECurrent,
4958 ScalarT & leakBCCurrent,
4959 ScalarT & minBaseResist,
4960 ScalarT & invEarlyVoltF,
4961 ScalarT & invRollOffF,
4962 ScalarT & invEarlyVoltR,
4963 ScalarT & invRollOffR,
4965 ScalarT & collectorConduct,
4966 ScalarT & emitterConduct,
4967 ScalarT & transTimeVBCFac,
4968 ScalarT & excessPhaseFac,
4969 ScalarT & depCapCoeff,
4978 if (!leakBECurrentGiven && c2Given)
4979 leakBECurrent = c2 * satCur;
4981 if (!leakBCCurrentGiven && c4Given)
4982 leakBCCurrent = c4 * satCur;
4984 if (!minBaseResistGiven)
4985 minBaseResist = baseResist;
4987 if (VAFgiven && ( earlyVoltF != 0.0 ) )
4988 invEarlyVoltF = 1.0 / earlyVoltF;
4990 invEarlyVoltF = 0.0;
4992 if( IKFgiven && ( rollOffF != 0.0 ) )
4993 invRollOffF = 1.0 / rollOffF;
4997 if( VARgiven && ( earlyVoltR != 0.0 ) )
4998 invEarlyVoltR = 1.0 / earlyVoltR;
5000 invEarlyVoltR = 0.0;
5002 if( IKRgiven && ( rollOffR != 0.0 ) )
5003 invRollOffR = 1.0 / rollOffR;
5007 if( collectorResist != 0.0 )
5008 collectorConduct = 1.0 / collectorResist;
5010 collectorConduct = 0;
5012 if( emitterResist != 0.0 )
5013 emitterConduct = 1.0 / emitterResist;
5017 if( VTFgiven && ( transTimeFVBC != 0.0 ) )
5018 transTimeVBCFac = 1.0 / ( transTimeFVBC * 1.44 );
5020 transTimeVBCFac = 0.0;
5023 excessPhaseFac = ( excessPhase / ( 180.0 / mpi ) ) * transTimeF;
5027 if( depCapCoeff > 0.9999 )
5029 depCapCoeff = 0.9999;
5030 Xyce::dout() <<
"Bad Depletion Capacitance Coefficient" << std::endl;
5038 ScalarT xfc = log( 1.0 - depCapCoeff );
5040 f2 = exp( ( 1.0 + juncExpBE ) * xfc );
5041 f3 = 1.0 - depCapCoeff * ( 1.0 + juncExpBE );
5042 f6 = exp( ( 1.0 + juncExpBC ) * xfc );
5043 f7 = 1.0 - depCapCoeff * ( 1.0 + juncExpBC );
5059 bool beginIntegrationFlag,
5061 double * currStaVec,
5062 double * lastStaVec,
5064 const int li_istateCEXBC
5070 if (!dcopFlag && td != 0)
5073 if (beginIntegrationFlag)
5076 currStaVec[li_istateCEXBC] = tmp.val();
5077 lastStaVec[li_istateCEXBC] = tmp.val();
5091 bool beginIntegrationFlag,
5093 double * currStaVec,
5094 double * lastStaVec,
5096 const int li_istateCEXBC
5102 if (!dcopFlag && td != 0)
5105 if (beginIntegrationFlag)
5107 double tmp = iBE/qB;
5108 currStaVec[li_istateCEXBC] = tmp;
5109 lastStaVec[li_istateCEXBC] = tmp;
5130 bool beginIntegrationFlag,
5132 double * nextStaVec,
5133 const double * currStaVec,
5134 const double * lastStaVec,
5136 const int li_istateCEXBC,
5161 if (!dcopFlag && td != 0)
5163 fadType arg1, arg2, denom, phaseScalar;
5168 denom = 1.0 + arg1 + arg2;
5169 phaseScalar = arg1 / denom;
5175 if (!beginIntegrationFlag)
5177 currCexbc = (currStaVec)[li_istateCEXBC];
5178 lastCexbc = (lastStaVec)[li_istateCEXBC];
5186 iC_local = ((currCexbc) * (1 + dt0 / dt1 + arg2) - (lastCexbc) * dt0 / dt1) / denom;
5187 iEX = iBE * phaseScalar;
5188 gEX = gBE * phaseScalar;
5190 fadType nextCexbc = iC_local + iEX / qB;
5191 nextStaVec[li_istateCEXBC] = nextCexbc.val();
5211 bool beginIntegrationFlag,
5213 double * nextStaVec,
5214 const double * currStaVec,
5215 const double * lastStaVec,
5217 const int li_istateCEXBC,
5242 if (!dcopFlag && td != 0)
5244 double arg1, arg2, denom, phaseScalar;
5249 denom = 1.0 + arg1 + arg2;
5250 phaseScalar = arg1 / denom;
5256 if (!beginIntegrationFlag)
5258 currCexbc = (currStaVec)[li_istateCEXBC];
5259 lastCexbc = (lastStaVec)[li_istateCEXBC];
5267 iC_local = ((currCexbc) * (1 + dt0 / dt1 + arg2) - (lastCexbc) * dt0 / dt1) / denom;
5268 iEX = iBE * phaseScalar;
5269 gEX = gBE * phaseScalar;
5271 double nextCexbc = iC_local + iEX / qB;
5272 nextStaVec[li_istateCEXBC] = nextCexbc;
5278 template <
typename ScalarT>
5280 const ScalarT & i_fx,
5282 const ScalarT & iBE,
5283 const ScalarT & iBEleak,
5284 const ScalarT & iBC,
5285 const ScalarT & iBCleak,
5287 const ScalarT & invqB,
5288 const ScalarT & tBetaF,
5289 const ScalarT & tBetaR,
5291 const ScalarT & gBC,
5292 const ScalarT & gBE,
5294 const ScalarT & dqBdvBp,
5295 const ScalarT & dqBdvCp,
5296 const ScalarT & dqBdvEp,
5318 if ( td != 0 && !dcopFlag )
5321 iCE = i_fx - iBC / qB;
5325 iCE = (iBE - iBC)/ qB;
5328 iC = iCE - iBC / tBetaR - iBCleak;
5329 iB = iBE / tBetaF + iBEleak + iBC / tBetaR + iBCleak;
5333 std::cout <<
"auxDAECalculations: tBetaR = " << tBetaR << std::endl;
5334 std::cout <<
"auxDAECalculations: tBetaF = " << tBetaF << std::endl;
5335 std::cout <<
"auxDAECalculations: iCE = " << iCE << std::endl;
5336 std::cout <<
"auxDAECalculations: iBC = " << iBC << std::endl;
5337 std::cout <<
"auxDAECalculations: iBE = " << iBE << std::endl;
5338 std::cout <<
"auxDAECalculations: iBEleak = " << iBEleak << std::endl;
5339 std::cout <<
"auxDAECalculations: iC = " << iC << std::endl;
5340 std::cout <<
"auxDAECalculations: iC = " << iC << std::endl;
5341 std::cout <<
"auxDAECalculations: iB = " << iB << std::endl;
5342 std::cout <<
"auxDAECalculations: iE = " << iE << std::endl;
5349 diCEdvBp = invqB * (-invqB * iBC * dqBdvBp - gBC);
5350 diCEdvCp = invqB * (-invqB * iBC * dqBdvCp + gBC);
5351 diCEdvEp = -invqB * invqB * iBC * dqBdvEp;
5355 diCEdvBp = invqB * (iCE * dqBdvBp + gBE - gBC);
5356 diCEdvCp = invqB * (iCE * dqBdvCp + gBC);
5357 diCEdvEp = invqB * (iCE * dqBdvEp - gBE);
5360 diBEdvBp = invqB *(invqB* iBE * dqBdvBp + gBE);
5361 diBEdvCp = invqB * invqB * iBE * dqBdvCp;
5362 diBEdvEp = invqB * (invqB * iBE * dqBdvEp - gBE);
5366 diCEdvBp = invqB * (iCE * dqBdvBp + gBE - gBC);
5367 diCEdvCp = invqB * (iCE * dqBdvCp + gBC);
5368 diCEdvEp = invqB * (iCE * dqBdvEp - gBE);
5382 template <
typename ScalarT>
5386 const ScalarT & vBE,
5387 const ScalarT & vBC,
5388 const ScalarT & vBX,
5389 const ScalarT & vCS,
5391 const ScalarT & i_fx,
5394 const ScalarT & AREA,
5397 const ScalarT & tSatCur,
5399 const ScalarT & tleakBEEmissionCoeff,
5400 const ScalarT & tleakBCEmissionCoeff,
5401 const ScalarT & tBELeakCur,
5402 const ScalarT & tBCLeakCur,
5403 const ScalarT & tInvRollOffF,
5404 const ScalarT & tInvRollOffR,
5405 const ScalarT & tRollOffExp,
5406 const ScalarT & tInvEarlyVoltF,
5407 const ScalarT & tInvEarlyVoltR,
5408 const ScalarT & tBECap,
5409 const ScalarT & tBCCap,
5410 const ScalarT & tDepCap,
5411 const ScalarT & tBEPot,
5412 const ScalarT & tBCPot,
5413 const ScalarT & tF1,
5414 const ScalarT & tF4,
5415 const ScalarT & tF5,
5418 const double & gmin,
5419 const bool newExcessPhase,
5422 const bool dcopFlag,
5423 const bool tranopFlag,
5424 const bool acopFlag,
5425 const bool initTranFlag,
5426 const bool beginIntegrationFlag,
5427 const int newtonIter,
5431 const ScalarT & emissionCoeffF,
5432 const ScalarT & emissionCoeffR,
5433 const ScalarT & baseFracBCCap,
5434 const ScalarT & CJS,
5435 const ScalarT & depCapCoeff,
5436 const ScalarT & potBC,
5437 const ScalarT & transTimeF,
5438 const ScalarT & transTimeR,
5439 const ScalarT & transTimeBiasCoeffF,
5440 const ScalarT & transTimeVBCFac,
5441 const ScalarT & transTimeHighCurrF,
5442 const ScalarT & juncExpBE,
5443 const ScalarT & juncExpBC,
5444 const ScalarT & potSubst,
5445 const ScalarT & expSubst,
5447 const ScalarT & emitterConduct,
5448 const ScalarT & collectorConduct,
5449 const ScalarT & minBaseResist,
5450 const ScalarT & baseResist,
5451 const ScalarT & baseCurrHalfResist,
5452 const ScalarT & excessPhaseFac,
5462 double * nextStaVec,
5463 double * currStaVec,
5464 double * lastStaVec,
5465 const int li_istateCEXBC,
5486 ScalarT & iBEhighCurr,
5487 ScalarT & gBEhighCurr,
5495 ScalarT & capBEdiff,
5500 ScalarT & capBCdiff,
5530 bool bsuccess =
true;
5532 ScalarT dqBdvEp, dqBdvCp, dqBdvBp;
5536 ScalarT csat = tSatCur * AREA;
5537 ScalarT vtF = vt * emissionCoeffF;
5538 ScalarT vtR = vt * emissionCoeffR;
5539 ScalarT vtE = vt * tleakBEEmissionCoeff;
5540 ScalarT vtC = vt * tleakBCEmissionCoeff;
5541 ScalarT iLeakBE = tBELeakCur * AREA;
5542 ScalarT iLeakBC = tBCLeakCur * AREA;
5544 if (vBE > -5.0 * vtF)
5546 ScalarT arg1 = vBE / vtF ;
5554 iBE = csat * ( evBE - 1.0 ) + gmin * vBE;
5555 gBE = csat * devBE / vtF + gmin;
5558 iBEleak = gBEleak = 0.0;
5561 ScalarT arg1 = vBE / vtE ;
5565 evBEleak = exp(arg1);
5567 iBEleak = iLeakBE * (evBEleak - 1.0);
5568 gBEleak = iLeakBE * devBEleak / vtE;
5573 gBE = -csat / vBE + gmin;
5575 gBEleak = -iLeakBE / vBE;
5576 iBEleak = gBEleak * vBE;
5579 if( vBC > -5.0 * vtR )
5581 ScalarT arg1 = vBC / vtR ;
5588 iBC = csat * ( evBC - 1.0 ) + gmin * vBC;
5589 gBC = csat * devBC / vtR + gmin;
5592 iBCleak = gBCleak = 0.0;
5595 ScalarT arg1 = vBC / vtC ;
5599 evBCleak = exp(arg1);
5602 iBCleak = iLeakBC * (evBCleak - 1.0);
5603 gBCleak = iLeakBC * devBCleak / vtC;
5608 gBC = -csat / vBC + gmin;
5610 gBCleak = -iLeakBC / vBC;
5611 iBCleak = gBCleak * vBC;
5615 ScalarT rofF = tInvRollOffF / AREA;
5616 ScalarT rofR = tInvRollOffR / AREA;
5618 q1 = 1.0 / ( 1.0 - tInvEarlyVoltF * vBC - tInvEarlyVoltR * vBE );
5620 if (rofF == 0.0 && rofR == 0.0)
5623 ScalarT q1_qB = q1 * qB;
5625 dqBdvEp = q1_qB * tInvEarlyVoltR;
5626 dqBdvCp = q1_qB * tInvEarlyVoltF;
5633 q2 = rofF * iBE + rofR * iBC;
5646 ScalarT arg = 1.0 + 4.0 * q2;
5647 ScalarT sqarg = 1.0;
5654 if (fabs(arg) > 0.0) sqarg = pow(arg,tRollOffExp);
5655 ScalarT rofF_gBE_invSqarg = 0.0;
5656 ScalarT rofR_gBC_invSqarg = 0.0;
5657 if(arg != 0) rofF_gBE_invSqarg = rofF*gBE*2*tRollOffExp*sqarg/arg;
5658 if(arg != 0) rofR_gBC_invSqarg = rofR*gBC*2*tRollOffExp*sqarg/arg;
5660 qB = 0.5 * q1 * (1.0 + sqarg);
5662 dqBdvEp = q1 * (qB * tInvEarlyVoltR + rofF_gBE_invSqarg);
5663 dqBdvCp = q1 * (qB * tInvEarlyVoltF + rofR_gBC_invSqarg);
5673 dqBdvEp = q1*qB*tInvEarlyVoltR;
5674 dqBdvCp = q1*qB*tInvEarlyVoltF;
5677 dqBdvBp = - (dqBdvEp + dqBdvCp);
5697 ctot = tBCCap * AREA;
5698 czBC = ctot * baseFracBCCap;
5700 czBE = tBECap * AREA;
5702 fcpc = depCapCoeff * potBC;
5715 bool geqCB_recalc(
false);
5716 if (transTimeF != 0.0 && vBE > 0.0 &&
5717 ((!dcopFlag)|| tranopFlag|| acopFlag))
5719 ScalarT argtf = 0.0;
5723 if ( transTimeBiasCoeffF != 0.0)
5725 argtf = transTimeBiasCoeffF;
5727 if (transTimeVBCFac != 0.0)
5728 argtf *= exp(vBC * transTimeVBCFac);
5732 if (transTimeHighCurrF != 0.0)
5734 ScalarT tmp = iBEhighCurr /
5735 (iBEhighCurr + transTimeHighCurrF * AREA);
5738 arg2 = argtf * (3.0 - 2.0 * tmp);
5740 arg3 = iBEhighCurr * argtf * transTimeVBCFac;
5743 iBEhighCurr *= (1.0 + argtf) / qB;
5744 gBEhighCurr = (gBEhighCurr * (1.0 + arg2) - iBEhighCurr * dqBdvEp) / qB;
5746 capeqCB = transTimeF * (arg3 - iBEhighCurr * dqBdvCp) / qB;
5747 geqCB = capeqCB*pdt;
5748 geqCB_recalc =
true;
5761 arg = 1.0 - vBE / tBEPot;
5762 sarg = exp( -juncExpBE * log( arg ) );
5764 qBEdep = tBEPot * czBE * ( 1.0 - arg * sarg ) /
5765 ( 1.0 - juncExpBE );
5766 capBEdep = czBE * sarg;
5770 ScalarT czBEf2 = czBE / f2;
5772 qBEdep = czBE * tF1 + czBEf2 * ( f3 * ( vBE -
5773 fcpe ) + ( juncExpBE / ( 2.0 *
5774 tBEPot ) ) * ( vBE * vBE - fcpe * fcpe ) );
5775 capBEdep = czBEf2 * ( f3 + juncExpBE * vBE /
5781 if (transTimeF == 0.0)
5783 qBEdiff = capBEdiff = 0.0;
5787 qBEdiff = transTimeF * iBEhighCurr;
5788 capBEdiff = transTimeF * gBEhighCurr;
5801 arg = 1.0 - vBC / tBCPot;
5802 sarg = exp( -juncExpBC * log( arg ) );
5804 qBCdep = tBCPot * czBC * ( 1.0 - arg * sarg ) /
5805 ( 1.0 - juncExpBC );
5806 capBCdep = czBC * sarg;
5810 ScalarT czBCf2 = czBC / f6;
5812 qBCdep = czBC * tF5 + czBCf2 * ( f7 * ( vBC -
5813 fcpc ) + ( juncExpBC / ( 2.0 *
5814 tBCPot ) ) * ( vBC * vBC - fcpc * fcpc ) );
5815 capBCdep = czBCf2 * ( f7 + juncExpBC * vBC / tBCPot );
5820 if (transTimeR == 0.0)
5822 qBCdiff = capBCdiff = 0.0;
5826 qBCdiff = transTimeR * iBC;
5827 capBCdiff = transTimeR * gBC;
5840 arg = 1.0 - vBX / tBCPot;
5841 sarg = exp( -juncExpBC * log( arg ) );
5843 qBX = tBCPot * czBX * ( 1.0 - arg * sarg ) /
5844 ( 1.0 - juncExpBC );
5845 capBX = czBX * sarg;
5849 ScalarT czBXf2 = czBX / f6;
5851 qBX = czBX * tF5 + czBXf2 * ( f7 * ( vBX -
5852 fcpc ) + ( juncExpBC / ( 2.0 *
5853 tBCPot ) ) * ( vBX * vBX - fcpc * fcpc ) );
5854 capBX = czBXf2 * ( f7 + juncExpBC * vBX /
5869 arg = 1.0 - vCS / potSubst;
5870 sarg = exp( -expSubst * log( arg ) );
5872 qCS = potSubst * czCS * ( 1.0 - arg * sarg ) /
5874 capCS = czCS * sarg;
5878 qCS = vCS * czCS * ( 1.0 + expSubst * vCS / ( 2.0 *
5880 capCS = czCS * ( 1.0 + expSubst * vCS / potSubst );
5890 ScalarT iEX_tmp = 0.0; ScalarT gEX_tmp = 0.0; ScalarT iC_tmp = 0.0;
5895 dcopFlag, beginIntegrationFlag,
5908 beginIntegrationFlag,
5913 iEX_tmp,gEX_tmp,iC_tmp);
5921 iBE, iBEleak, iBC, iBCleak,
5925 dqBdvBp, dqBdvCp, dqBdvEp,
5928 diCEdvBp, diCEdvCp, diCEdvEp,
5929 diBEdvBp, diBEdvCp, diBEdvEp
5942 iCE = ( iEX - iBC ) / qB;
5943 iC += iCE - iBC / tBetaR - iBCleak;
5945 iB = iBE / tBetaF + iBEleak + iBC / tBetaR + iBCleak;
5950 diCEdvEp = invqB * (iCE * dqBdvEp - gEX);
5951 diCEdvCp = invqB * (iCE * dqBdvCp + gBC);
5952 diCEdvBp = invqB * (iCE * dqBdvBp + gEX - gBC);
5957 gEpr = emitterConduct * AREA;
5958 gCpr = collectorConduct * AREA;
5961 ScalarT rBpr = minBaseResist / AREA;
5962 ScalarT rBpi = baseResist / AREA - rBpr;
5963 ScalarT xjrB = baseCurrHalfResist * AREA;
5965 gX = rBpr + rBpi / qB;
5967 if (fabs(xjrB) > 0.0)
5969 ScalarT arg1 = std::max(iB / xjrB, 1.0e-09);
5970 ScalarT arg2 = (-1.0 + sqrt( 1.0 + 14.59025 * arg1)) / 2.4317 / sqrt(arg1);
5972 gX = rBpr + 3.0 * rBpi * (arg1 - arg2) / arg2 / arg1 / arg1;
5975 if (fabs(gX) > 0.0) gX = 1.0 / gX;
5982 gBEtot = gBE / tBetaF + gBEleak;
5983 gBCtot = gBC / tBetaR + gBCleak;
5998 const std::string &name,
5999 std::vector<double> & dfdp,
6000 std::vector<double> & dqdp,
6001 std::vector<double> & dbdp,
6002 std::vector<int> & Findices,
6003 std::vector<int> & Qindices,
6004 std::vector<int> & Bindices
6029 std::string paramName = ExtendedString( name ).toUpper();
6030 if (paramName==
"AREA") { AREA.diff(0,1); }
6031 else if (paramName==
"TEMP") { TEMP.diff(0,1); }
6108 c2, c4, satCur, baseResist,
6109 earlyVoltF, rollOffF,
6110 earlyVoltR, rollOffR,
6111 collectorResist, emitterResist,
6113 excessPhase, transTimeF,
6114 juncExpBE, juncExpBC,
6117 leakBECurrent, leakBCCurrent,
6119 invEarlyVoltF, invRollOffF,
6120 invEarlyVoltR, invRollOffR,
6122 collectorConduct, emitterConduct,
6185 leakBEEmissionCoeff,
6186 leakBCEmissionCoeff,
6204 tleakBEEmissionCoeff,
6205 tleakBCEmissionCoeff,
6277 fadType diBEdvBp, diBEdvCp, diBEdvEp;
6296 i_fx = solVec[inst.
li_Ifx];
6299 fadType vEEp = (v_emit - v_emitP);
6300 fadType vBBp = (v_base - v_baseP);
6301 fadType vCCp = (v_coll - v_collP);
6315 vBE, vBC, vBX, vCS, i_fx,
6320 tleakBEEmissionCoeff, tleakBCEmissionCoeff,
6321 tBELeakCur, tBCLeakCur,
6322 tInvRollOffF, tInvRollOffR,
6324 tInvEarlyVoltF, tInvEarlyVoltR,
6341 emissionCoeffF, emissionCoeffR,
6344 transTimeF, transTimeR,
6345 transTimeBiasCoeffF, transTimeVBCFac,
6347 juncExpBE, juncExpBC,
6349 emitterConduct, collectorConduct, minBaseResist,
6350 baseResist, baseCurrHalfResist,
6363 iB, iC, iE, iBE, gBE, iBC, gBC, iCE,
6364 iBEleak, gBEleak, iBCleak, gBCleak,
6365 qB, invqB, iBEhighCurr, gBEhighCurr,
6371 qBX, capBX, qCS, capCS,
6373 diBrdvB, diBrdvCp, diBrdvEp, diBrdvBp,
6374 diCEdvEp, diCEdvCp, diCEdvBp,
6375 diBEdvBp, diBEdvCp, diBEdvEp,
6403 dfdp[iColl] -= fColl.dx(0);
6404 dfdp[iBase] -= fBase.dx(0);
6405 dfdp[iEmit] -= fEmit.dx(0);
6406 dfdp[iCollP] -= fCollP.dx(0);
6407 dfdp[iBaseP] -= fBaseP.dx(0);
6408 dfdp[iEmitP] -= fEmitP.dx(0);
6417 di_fx = solVec[i_dIfx];
6424 fadType term = 3 * di_fx*td + 3*i_fx -3 * iBE / qB;
6425 dfdp[i_Ifx] += - di_fx.dx(0);
6426 dfdp[i_dIfx] += term.dx(0);
6431 dfdp[i_Ifx] += term.dx(0);
6437 dfdp[i_Ifx] += i_fx.dx(0);
6438 dfdp[i_dIfx] += di_fx.dx(0);
6442 dqdp[iBase] -= qBase.dx(0);
6443 dqdp[iSubst] -= qSubst.dx(0);
6444 dqdp[iCollP] -= qCollP.dx(0);
6445 dqdp[iBaseP] -= qBaseP.dx(0);
6446 dqdp[iEmitP] -= qEmitP.dx(0);
6451 dqdp[i_Ifx] += solVec[i_Ifx];
6455 fadType term = solVec[i_dIfx]*td*td;
6456 dqdp[i_dIfx] += term.dx(0);
6464 Findices[iColl] = inst.
li_Coll;
6465 Findices[iBase] = inst.
li_Base;
6466 Findices[iEmit] = inst.
li_Emit;
6473 Findices[i_Ifx] = inst.
li_Ifx;
6474 Findices[i_dIfx] = inst.
li_dIfx;
6477 Qindices[iColl] = inst.
li_Coll;
6478 Qindices[iBase] = inst.
li_Base;
6479 Qindices[iEmit] = inst.
li_Emit;
6486 Qindices[i_Ifx] = inst.
li_Ifx;
6487 Qindices[i_dIfx] = inst.
li_dIfx;
6501 const std::string &name,
6502 std::vector<double> & dfdp,
6503 std::vector<double> & dqdp,
6504 std::vector<double> & dbdp,
6505 std::vector<int> & Findices,
6506 std::vector<int> & Qindices,
6507 std::vector<int> & Bindices
6511 const Model & mod = *(
dynamic_cast<const Model *
> (e1));
6516 const Instance & instTmp = *((*inTmp));
6520 dfdp.resize(9*sizeInstance);
6521 dqdp.resize(9*sizeInstance);
6522 Findices.resize(9*sizeInstance);
6523 Qindices.resize(9*sizeInstance);
6527 dfdp.resize(7*sizeInstance);
6528 dqdp.resize(7*sizeInstance);
6529 Findices.resize(7*sizeInstance);
6530 Qindices.resize(7*sizeInstance);
6605 std::string paramName = ExtendedString( name ).toUpper();
6608 if (paramName==
"TNOM") { TNOM.diff(0,1); }
6609 else if (paramName==
"IS") { satCur.diff(0,1); }
6610 else if (paramName==
"BF") { betaF.diff(0,1); }
6611 else if (paramName==
"BFM") { betaF.diff(0,1); }
6612 else if (paramName==
"NF") { emissionCoeffF.diff(0,1); }
6613 else if (paramName==
"VA") { earlyVoltF.diff(0,1); }
6614 else if (paramName==
"VBF") { earlyVoltF.diff(0,1); }
6615 else if (paramName==
"VAF") { earlyVoltF.diff(0,1); }
6616 else if (paramName==
"IKF") { rollOffF.diff(0,1); }
6617 else if (paramName==
"IK") { rollOffF.diff(0,1); }
6618 else if (paramName==
"JBF") { rollOffF.diff(0,1); }
6619 else if (paramName==
"ISE") { leakBECurrent.diff(0,1); }
6620 else if (paramName==
"JLE") { leakBECurrent.diff(0,1); }
6621 else if (paramName==
"NE") { leakBEEmissionCoeff.diff(0,1); }
6622 else if (paramName==
"NLE") { leakBEEmissionCoeff.diff(0,1); }
6623 else if (paramName==
"BR") { betaR.diff(0,1); }
6624 else if (paramName==
"BRM") { betaR.diff(0,1); }
6625 else if (paramName==
"NR") { emissionCoeffR.diff(0,1); }
6626 else if (paramName==
"VAR") { earlyVoltR.diff(0,1); }
6627 else if (paramName==
"VB") { earlyVoltR.diff(0,1); }
6628 else if (paramName==
"VRB") { earlyVoltR.diff(0,1); }
6629 else if (paramName==
"BV") { earlyVoltR.diff(0,1); }
6631 else if (paramName==
"IKR") { rollOffR.diff(0,1); }
6632 else if (paramName==
"JBR") { rollOffR.diff(0,1); }
6633 else if (paramName==
"ISC") { leakBCCurrent.diff(0,1); }
6634 else if (paramName==
"JLC") { leakBCCurrent.diff(0,1); }
6635 else if (paramName==
"NC") { leakBCEmissionCoeff.diff(0,1); }
6636 else if (paramName==
"RB") { baseResist.diff(0,1); }
6637 else if (paramName==
"IRB") { baseCurrHalfResist.diff(0,1); }
6638 else if (paramName==
"JRB") { baseCurrHalfResist.diff(0,1); }
6639 else if (paramName==
"IOB") { baseCurrHalfResist.diff(0,1); }
6642 else if (paramName==
"RBM") { minBaseResist.diff(0,1); }
6643 else if (paramName==
"RE") { emitterResist.diff(0,1); }
6644 else if (paramName==
"RC") { collectorResist.diff(0,1); }
6645 else if (paramName==
"CJE") { depCapBE.diff(0,1); }
6646 else if (paramName==
"VJE") { potBE.diff(0,1); }
6647 else if (paramName==
"PE") { potBE.diff(0,1); }
6648 else if (paramName==
"MJE") { juncExpBE.diff(0,1); }
6649 else if (paramName==
"ME") { juncExpBE.diff(0,1); }
6650 else if (paramName==
"TF") { transTimeF.diff(0,1); }
6651 else if (paramName==
"XTF") { transTimeBiasCoeffF.diff(0,1); }
6652 else if (paramName==
"VTF") { transTimeFVBC.diff(0,1); }
6653 else if (paramName==
"ITF") { transTimeHighCurrF.diff(0,1); }
6654 else if (paramName==
"JTF") { transTimeHighCurrF.diff(0,1); }
6655 else if (paramName==
"PTF") { excessPhase.diff(0,1); }
6656 else if (paramName==
"CJC") { depCapBC.diff(0,1); }
6657 else if (paramName==
"VJC") { potBC.diff(0,1); }
6658 else if (paramName==
"PC") { potBC.diff(0,1); }
6659 else if (paramName==
"MJC") { juncExpBC.diff(0,1); }
6660 else if (paramName==
"MC") { juncExpBC.diff(0,1); }
6661 else if (paramName==
"XCJC") { baseFracBCCap.diff(0,1); }
6662 else if (paramName==
"CDIS") { baseFracBCCap.diff(0,1); }
6663 else if (paramName==
"TR") { transTimeR.diff(0,1); }
6664 else if (paramName==
"CJS") { CJS.diff(0,1); }
6665 else if (paramName==
"CCS") { CJS.diff(0,1); }
6666 else if (paramName==
"CSUB") { CJS.diff(0,1); }
6667 else if (paramName==
"VJS") { potSubst.diff(0,1); }
6668 else if (paramName==
"PS") { potSubst.diff(0,1); }
6669 else if (paramName==
"PSUB") { potSubst.diff(0,1); }
6670 else if (paramName==
"MJS") { expSubst.diff(0,1); }
6671 else if (paramName==
"MS") { expSubst.diff(0,1); }
6672 else if (paramName==
"ESUB") { expSubst.diff(0,1); }
6673 else if (paramName==
"XTB") { betaExp.diff(0,1); }
6674 else if (paramName==
"TB") { betaExp.diff(0,1); }
6675 else if (paramName==
"TCB") { betaExp.diff(0,1); }
6676 else if (paramName==
"EG") { energyGap.diff(0,1); }
6677 else if (paramName==
"XTI") { tempExpIS.diff(0,1); }
6678 else if (paramName==
"PT") { tempExpIS.diff(0,1); }
6680 else if (paramName==
"KF") { fNCoeff.diff(0,1); }
6681 else if (paramName==
"AF") { fNExp.diff(0,1); }
6683 else if (paramName==
"FC") { depCapCoeff.diff(0,1); }
6684 else if (paramName==
"C2") { c2.diff(0,1); }
6685 else if (paramName==
"C4") { c4.diff(0,1); }
6686 else if (paramName==
"NK") { rollOffExp.diff(0,1); }
6687 else if (paramName==
"NKF") { rollOffExp.diff(0,1); }
6699 c2, c4, satCur, baseResist,
6700 earlyVoltF, rollOffF,
6701 earlyVoltR, rollOffR,
6702 collectorResist, emitterResist,
6704 excessPhase, transTimeF,
6705 juncExpBE, juncExpBC,
6708 leakBECurrent, leakBCCurrent,
6710 invEarlyVoltF, invRollOffF,
6711 invEarlyVoltR, invRollOffR,
6713 collectorConduct, emitterConduct,
6723 for (std::vector<Instance *>::const_iterator in = mod.
instanceContainer.begin();
6765 energyGap, tempExpIS,
6767 depCapBE, juncExpBE,
6768 depCapBC, juncExpBC,
6770 satCur, betaF, betaR,
6778 leakBEEmissionCoeff,
6779 leakBCEmissionCoeff,
6787 earlyVoltF, earlyVoltR,
6791 leakBECurrent, leakBCCurrent,
6792 tBELeakCur, tBCLeakCur,
6793 tleakBEEmissionCoeff,
6794 tleakBCEmissionCoeff,
6810 tInvEarlyVoltF, tInvEarlyVoltR
6860 fadType diBEdvBp, diBEdvCp, diBEdvEp;
6879 i_fx = solVec[inst.
li_Ifx];
6882 fadType vEEp = (v_emit - v_emitP);
6883 fadType vBBp = (v_base - v_baseP);
6884 fadType vCCp = (v_coll - v_collP);
6898 vBE, vBC, vBX, vCS, i_fx,
6903 tleakBEEmissionCoeff, tleakBCEmissionCoeff,
6904 tBELeakCur, tBCLeakCur,
6905 tInvRollOffF, tInvRollOffR,
6907 tInvEarlyVoltF, tInvEarlyVoltR,
6924 emissionCoeffF, emissionCoeffR,
6927 transTimeF, transTimeR,
6928 transTimeBiasCoeffF, transTimeVBCFac,
6930 juncExpBE, juncExpBC,
6932 emitterConduct, collectorConduct, minBaseResist,
6933 baseResist, baseCurrHalfResist,
6947 iB, iC, iE, iBE, gBE, iBC, gBC, iCE,
6948 iBEleak, gBEleak, iBCleak, gBCleak,
6949 qB, invqB, iBEhighCurr, gBEhighCurr,
6955 qBX, capBX, qCS, capCS,
6957 diBrdvB, diBrdvCp, diBrdvEp, diBrdvBp,
6958 diCEdvEp, diCEdvCp, diCEdvBp,
6959 diBEdvBp, diBEdvCp, diBEdvEp,
6964 int iColl=0+instIndex*7;
6965 int iBase=1+instIndex*7;
6966 int iEmit=2+instIndex*7;
6967 int iCollP=3+instIndex*7;
6968 int iBaseP=4+instIndex*7;
6969 int iEmitP=5+instIndex*7;
6970 int iSubst=6+instIndex*7;
6972 int i_Ifx=7+instIndex*7;
6973 int i_dIfx=8+instIndex*7;
6988 dfdp[iColl] -= fColl.dx(0);
6989 dfdp[iBase] -= fBase.dx(0);
6990 dfdp[iEmit] -= fEmit.dx(0);
6991 dfdp[iCollP] -= fCollP.dx(0);
6992 dfdp[iBaseP] -= fBaseP.dx(0);
6993 dfdp[iEmitP] -= fEmitP.dx(0);
7002 di_fx = solVec[i_dIfx];
7009 fadType term = 3 * di_fx*td + 3*i_fx -3 * iBE / qB;
7010 dfdp[i_Ifx] += - di_fx.dx(0);
7011 dfdp[i_dIfx] += term.dx(0);
7016 dfdp[i_Ifx] += term.dx(0);
7022 dfdp[i_Ifx] += i_fx.dx(0);
7023 dfdp[i_dIfx] += di_fx.dx(0);
7027 dqdp[iBase] -= qBase.dx(0);
7028 dqdp[iSubst] -= qSubst.dx(0);
7029 dqdp[iCollP] -= qCollP.dx(0);
7030 dqdp[iBaseP] -= qBaseP.dx(0);
7031 dqdp[iEmitP] -= qEmitP.dx(0);
7036 dqdp[i_Ifx] += solVec[i_Ifx];
7040 fadType term = solVec[i_dIfx]*td*td;
7041 dqdp[i_dIfx] += term.dx(0);
7049 Findices[iColl] = inst.
li_Coll;
7050 Findices[iBase] = inst.
li_Base;
7051 Findices[iEmit] = inst.
li_Emit;
7058 Findices[i_Ifx] = inst.
li_Ifx;
7059 Findices[i_dIfx] = inst.
li_dIfx;
7062 Qindices[iColl] = inst.
li_Coll;
7063 Qindices[iBase] = inst.
li_Base;
7064 Qindices[iEmit] = inst.
li_Emit;
7071 Qindices[i_Ifx] = inst.
li_Ifx;
7072 Qindices[i_dIfx] = inst.
li_dIfx;
const InstanceName & getName() const
double * nextStaDerivVectorRawPtr
double * q_SubstEquCollPNodePtr
Linear::Vector * lastStaVectorPtr
double * q_dIfxEquIfxNodePtr
double * nextLeadCurrQCompRawPtr
static void initThermalModel(ParametricData< T > ¶metric_data)
Add the parameter "TEMPMODEL" to the parametric_data.
double * f_IfxEquEmitPNodePtr
bool updateDependentParameters()
int ABaseEquEmitPNodeOffset
static std::vector< std::vector< int > > jacMap2_RB_RC_RE_
int AIfxEquCollPNodeOffset
double * q_EmitPEquIfxNodePtr
const DeviceOptions & deviceOptions_
double * q_BaseEquBasePNodePtr
const std::vector< std::vector< int > > & jacobianStamp() const
int AEmitPEquIfxNodeOffset
int AdIfxEquEmitPNodeOffset
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
double * daeQVectorRawPtr
double * q_BasePEquBaseNodePtr
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &it_MB, const FactoryBlock &factory_block)
double * f_BasePEquEmitPNodePtr
static std::vector< int > jacMap_RB_RE_
double pdt_
Previous delta time alpha/dt (Many devices)
double currTimeStep_
Region, BJT, Digital, ThermalResistor, ROM, Charon, Others.
double * dFdxdVpVectorRawPtr
double * q_IfxEquBasePNodePtr
double pnjlim(double vnew, double vold, double vt, double vcrit, int *icheck)
std::vector< int > devConMap
bool initTranFlag_
RxnSet, TRA, LTRA, ACC, MOSFET, BJT, true only on very first(t=0) time step.
double leakBEEmissionCoeff
bool given(const std::string ¶meter_name) const
Pure virtual class to augment a linear system.
Parameter may be specified as time dependent expression from netlist.
double * f_CollEquCollNodePtr
double * q_CollPEquEmitPNodePtr
int AEmitPEquEmitNodeOffset
virtual bool updateSecondaryState(double *staDeriv, double *stoVec)
Updates the devices secondary state information.
void addInternalNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
double * f_IfxEquCollPNodePtr
const std::string & getEncodedName() const
Return the instance name encoded as: [s:]*xname [s:]*Ytype!name [s:]*Utype!name!count.
double baseCurrHalfResist
double * currStaVectorRawPtr
bool updateIntermediateVars(const ScalarT &vBE, const ScalarT &vBC, const ScalarT &vBX, const ScalarT &vCS, const ScalarT &i_fx, const ScalarT &AREA, const ScalarT &tSatCur, const ScalarT &vt, const ScalarT &tleakBEEmissionCoeff, const ScalarT &tleakBCEmissionCoeff, const ScalarT &tBELeakCur, const ScalarT &tBCLeakCur, const ScalarT &tInvRollOffF, const ScalarT &tInvRollOffR, const ScalarT &tRollOffExp, const ScalarT &tInvEarlyVoltF, const ScalarT &tInvEarlyVoltR, const ScalarT &tBECap, const ScalarT &tBCCap, const ScalarT &tDepCap, const ScalarT &tBEPot, const ScalarT &tBCPot, const ScalarT &tF1, const ScalarT &tF4, const ScalarT &tF5, const double &gmin, const bool newExcessPhase, const bool dcopFlag, const bool tranopFlag, const bool acopFlag, const bool initTranFlag, const bool beginIntegrationFlag, const int newtonIter, const double pdt, const ScalarT &emissionCoeffF, const ScalarT &emissionCoeffR, const ScalarT &baseFracBCCap, const ScalarT &CJS, const ScalarT &depCapCoeff, const ScalarT &potBC, const ScalarT &transTimeF, const ScalarT &transTimeR, const ScalarT &transTimeBiasCoeffF, const ScalarT &transTimeVBCFac, const ScalarT &transTimeHighCurrF, const ScalarT &juncExpBE, const ScalarT &juncExpBC, const ScalarT &potSubst, const ScalarT &expSubst, const ScalarT &emitterConduct, const ScalarT &collectorConduct, const ScalarT &minBaseResist, const ScalarT &baseResist, const ScalarT &baseCurrHalfResist, const ScalarT &excessPhaseFac, const ScalarT &f2, const ScalarT &f3, const ScalarT &f6, const ScalarT &f7, const int level, double *nextStaVec, double *currStaVec, double *lastStaVec, const int li_istateCEXBC, const double dt0, const double dt1, ScalarT &iB, ScalarT &iC, ScalarT &iE, ScalarT &iBE, ScalarT &gBE, ScalarT &iBC, ScalarT &gBC, ScalarT &iCE, ScalarT &iBEleak, ScalarT &gBEleak, ScalarT &iBCleak, ScalarT &gBCleak, ScalarT &qB, ScalarT &invqB, ScalarT &iBEhighCurr, ScalarT &gBEhighCurr, ScalarT &capeqCB, ScalarT &geqCB, ScalarT &qBEdep, ScalarT &capBEdep, ScalarT &qBEdiff, ScalarT &capBEdiff, ScalarT &qBCdep, ScalarT &capBCdep, ScalarT &qBCdiff, ScalarT &capBCdiff, ScalarT &qBX, ScalarT &capBX, ScalarT &qCS, ScalarT &capCS, ScalarT &gEpr, ScalarT &gCpr, ScalarT &gX, ScalarT &diBrdvB, ScalarT &diBrdvCp, ScalarT &diBrdvEp, ScalarT &diBrdvBp, ScalarT &diCEdvEp, ScalarT &diCEdvCp, ScalarT &diCEdvBp, ScalarT &diBEdvBp, ScalarT &diBEdvCp, ScalarT &diBEdvEp, ScalarT &gBEtot, ScalarT &gBCtot, ScalarT &tBetaF, ScalarT &tBetaR)
double * f_CollPEquCollPNodePtr
static std::vector< std::vector< int > > jacStamp_RB_RC_
double * f_IfxEquBasePNodePtr
double lastTimeStep_
BJT, Others.
int ACollEquCollPNodeOffset
double * f_SubstEquSubstNodePtr
void setNumStoreVars(int num_store_vars)
void addBranchDataNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
double * q_EmitPEquEmitPNodePtr
void makeVector(const std::string &cname, int len)
Allows the parameter to be specified as a vector.
std::vector< int > li_Neg
InstanceVector::const_iterator getInstanceEnd() const
Returns an iterator to the ending of the vector of all instances created for this device...
Base class for all parameters.
int ABaseEquCollPNodeOffset
double * f_CollEquCollPNodePtr
static std::vector< std::vector< int > > jacStamp_RB_RC_RE_
int ASubstEquSubstNodeOffset
int AEmitPEquBasePNodeOffset
std::vector< int > li_Pos
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
bool updateIntermediateVars()
int ABaseEquBasePNodeOffset
Parameter is subject to being set to minimum junction capacitance.
double * f_EmitPEquEmitNodePtr
static std::vector< int > jacMap_RE_
virtual void registerJacLIDs(const JacobianStamp &jacLIDVec)
static std::vector< int > jacMap_RB_RC_
Parameter is subject to being set to minimum lead resistance.
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
double * f_BaseEquBasePNodePtr
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
double * q_EmitPEquEmitNodePtr
double * nextJunctionVCompRawPtr
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
double * q_CollPEquCollPNodePtr
double tnom
nominal temperature for device params.
static std::vector< std::vector< int > > jacStamp_RB_RE_
double * storeLeadCurrQCompRawPtr
double * q_SubstEquSubstNodePtr
int getNumStoreVars() const
static std::vector< std::vector< int > > jacStamp_RE_
InstanceVector::const_iterator getInstanceBegin() const
Returns an iterator to the beginning of the vector of all instances created for this device...
double * q_BaseEquEmitPNodePtr
double * f_IfxEquIfxNodePtr
std::vector< Param > params
Parameters from the line.
const std::string & getName(const C *c)
Returns the name of the specified object.
std::vector< double > noiseDens
int ACollPEquCollPNodeOffset
int ABasePEquCollPNodeOffset
int AdIfxEqudIfxNodeOffset
double * f_dIfxEquEmitPNodePtr
std::vector< std::string > noiseNames
void auxDAECalculations(const ScalarT &i_fx, const ScalarT &td, const ScalarT &iBE, const ScalarT &iBEleak, const ScalarT &iBC, const ScalarT &iBCleak, const ScalarT &qB, const ScalarT &invqB, const ScalarT &tBetaF, const ScalarT &tBetaR, const ScalarT &gBC, const ScalarT &gBE, const ScalarT &dqBdvBp, const ScalarT &dqBdvCp, const ScalarT &dqBdvEp, bool dcopFlag, ScalarT &iCE, ScalarT &iC, ScalarT &iB, ScalarT &iE, ScalarT &diCEdvBp, ScalarT &diCEdvCp, ScalarT &diCEdvEp, ScalarT &diBEdvBp, ScalarT &diBEdvCp, ScalarT &diBEdvEp)
void setParams(const std::vector< Param > ¶ms)
void registerStoreLIDs(const std::vector< int > &stoLIDVecRef)
int ABaseEquBaseNodeOffset
double * f_EmitPEquBasePNodePtr
const std::string & getName() const
double * daeFVectorRawPtr
double * f_BaseEquEmitPNodePtr
double * q_CollPEquBaseNodePtr
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
static std::vector< int > jacMap_RC_
double * q_EmitPEquBasePNodePtr
bool beginIntegrationFlag_
BJT, true if 1st time step out of breakpoint (incl. t=0)
static std::vector< std::vector< int > > jacMap2_RE_
int ACollPEquBasePNodeOffset
const DeviceOptions & getDeviceOptions() const
double * q_BaseEquBaseNodePtr
double * f_BasePEquBaseNodePtr
void setupNoiseSources(Xyce::Analysis::NoiseData &noiseData)
int AEmitPEquCollPNodeOffset
virtual void operator()(const ParameterBase &entity, const std::string ¶m, std::vector< double > &dfdp, std::vector< double > &dqdp, std::vector< double > &dbdp, std::vector< int > &Findices, std::vector< int > &Qindices, std::vector< int > &Bindices) const
static std::vector< int > jacMap_
static std::vector< std::vector< int > > jacStamp_RB_
double * nextStoVectorRawPtr
double * f_BaseEquCollPNodePtr
double Xexp(double, double &, double)
static std::vector< std::vector< int > > jacStamp_RC_RE_
virtual void registerBranchDataLIDs(const std::vector< int > &branchLIDVecRef)
double * f_EmitEquEmitPNodePtr
int numBranchDataVarsIfAllocated
double * f_CollPEquBasePNodePtr
double * f_dIfxEquBasePNodePtr
int AEmitPEquEmitPNodeOffset
Linear::Vector * deviceErrorWeightMask_
double * q_BasePEquCollPNodePtr
bool processParams(bool leakBECurrentGiven, bool leakBCCurrentGiven, bool c2Given, bool c4Given, bool minBaseResistGiven, bool VAFgiven, bool IKFgiven, bool VARgiven, bool IKRgiven, bool VTFgiven, bool FCgiven, const ScalarT &c2, const ScalarT &c4, const ScalarT &satCur, const ScalarT &baseResist, const ScalarT &earlyVoltF, const ScalarT &rollOffF, const ScalarT &earlyVoltR, const ScalarT &rollOffR, const ScalarT &collectorResist, const ScalarT &emitterResist, const ScalarT &transTimeFVBC, const ScalarT &excessPhase, const ScalarT &transTimeF, const ScalarT &juncExpBE, const ScalarT &juncExpBC, ScalarT &leakBECurrent, ScalarT &leakBCCurrent, ScalarT &minBaseResist, ScalarT &invEarlyVoltF, ScalarT &invRollOffF, ScalarT &invEarlyVoltR, ScalarT &invRollOffR, ScalarT &collectorConduct, ScalarT &emitterConduct, ScalarT &transTimeVBCFac, ScalarT &excessPhaseFac, ScalarT &depCapCoeff, ScalarT &f2, ScalarT &f3, ScalarT &f6, ScalarT &f7)
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
static std::vector< std::vector< int > > jacMap2_RB_RE_
Sacado::Fad::SFad< double, 1 > fadType
int AdIfxEquBasePNodeOffset
static std::vector< std::vector< int > > jacMap2_RB_
double * q_BaseEquCollPNodePtr
Parameter uses temperature interpolation based on log of value.
Linear::Matrix * dFdxMatrixPtr
void oldDAEExcessPhaseCalculation1(const ScalarT &td, const ScalarT &qB, const ScalarT &iBE, bool dcopFlag, bool beginIntegrationFlag, double *currStaVec, double *lastStaVec, const int li_istateCEXBC)
const DeviceOptions & getDeviceOptions() const
Returns the device options given during device construction.
void auxDAECalculations()
int ACollPEquSubstNodeOffset
static std::vector< int > jacMap_RB_
double * f_CollPEquEmitPNodePtr
double * f_dIfxEquCollPNodePtr
The Device class is an interface for device implementations.
bool processInstanceParams()
processInstanceParams
void loadErrorWeightMask()
double leakBCEmissionCoeff
double * q_EmitEquEmitPNodePtr
void addStoreNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
virtual std::ostream & printOutInstances(std::ostream &os) const
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
double * q_CollPEquCollNodePtr
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Populates the device's Jacobian object with these pointers.
static bjtModelSensitivity bjtModelSens
double tleakBEEmissionCoeff
double transTimeBiasCoeffF
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
double * f_dIfxEquIfxNodePtr
void oldDAEExcessPhaseCalculation1()
int AEmitEquEmitNodeOffset
double * q_dIfxEquBasePNodePtr
const SolverState & solverState_
double * f_IfxEqudIfxNodePtr
bool updateTemperature(const double &temp=-999.0)
double * dQdxdVpVectorRawPtr
Class Configuration contains device configuration data.
double * q_CollEquCollPNodePtr
int ACollPEquCollNodeOffset
std::vector< double > lnNoiseDens
double * lastStaVectorRawPtr
double * f_CollPEquCollNodePtr
virtual bool loadDAEVectors(double *solVec, double *fVec, double *qVec, double *bVec, double *storeLeadF, double *storeLeadQ, double *leadF, double *leadQ, double *junctionV)
Populates the device's ExternData object with these pointers.
double * q_IfxEquCollPNodePtr
static std::vector< std::vector< int > > jacStamp_RC_
bool interpolateTNOM(double)
virtual void operator()(const ParameterBase &entity, const std::string ¶m, std::vector< double > &dfdp, std::vector< double > &dqdp, std::vector< double > &dbdp, std::vector< int > &Findices, std::vector< int > &Qindices, std::vector< int > &Bindices) const
void getNoiseSources(Xyce::Analysis::NoiseData &noiseData)
double * f_EmitEquEmitNodePtr
void jacStampMap(const JacobianStamp &stamp_parent, IdVector &map_parent, JacobianStamp &map2_parent, JacobianStamp &stamp, IdVector &map, JacobianStamp &map2, int from, int to, int original_size)
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
int ACollPEquEmitPNodeOffset
double * q_EmitPEquCollPNodePtr
double * f_CollPEquSubstNodePtr
bool updateTemperature( const ScalarT &TEMP, const ScalarT &TNOM, const ScalarT &energyGap, const ScalarT &tempExpIS, const ScalarT &betaExp, const ScalarT &potBE, const ScalarT &depCapBE, const ScalarT &juncExpBE, const ScalarT &depCapBC, const ScalarT &juncExpBC, const ScalarT &depCapCoeff, const ScalarT &satCur, const ScalarT &betaF, const ScalarT &betaR, const ScalarT &c2, const ScalarT &c4, bool c2Given, bool c4Given, bool leakBECurrentGiven, bool leakBCCurrentGiven, const ScalarT &leakBEEmissionCoeff, const ScalarT &leakBCEmissionCoeff, const ScalarT &rollOffExp, const ScalarT &baseResist, const ScalarT &collectorResist, const ScalarT &emitterResist, const ScalarT &potBC, const ScalarT &rollOffF, const ScalarT &rollOffR, const ScalarT &earlyVoltF, const ScalarT &earlyVoltR, ScalarT &vt, ScalarT &leakBECurrent, ScalarT &leakBCCurrent, ScalarT &tBELeakCur, ScalarT &tBCLeakCur, ScalarT &tleakBEEmissionCoeff, ScalarT &tleakBCEmissionCoeff, ScalarT &tRollOffExp, ScalarT &tInvRollOffF, ScalarT &tInvRollOffR, ScalarT &tBaseResist, ScalarT &tCollectorResist, ScalarT &tEmitterResist, ScalarT &tBECap, ScalarT &tBEPot, ScalarT &tBCCap, ScalarT &tBCPot, ScalarT &tDepCap, ScalarT &tF1, ScalarT &tF4, ScalarT &tF5, ScalarT &tVCrit, ScalarT &tSatCur, ScalarT &tBetaF, ScalarT &tBetaR, ScalarT &tInvEarlyVoltF, ScalarT &tInvEarlyVoltR)
std::vector< Instance * > instanceContainer
static std::vector< std::vector< int > > jacMap2_
const SolverState & getSolverState() const
double * nextLeadCurrFCompRawPtr
void lambertw(double x, double &w, int &ierr, double &xi)
static std::vector< int > jacMap_RB_RC_RE_
double * q_BasePEquEmitPNodePtr
double * f_EmitPEquIfxNodePtr
Linear::Vector * nextStoVectorPtr
bool lambertWCurrent(double &Id, double &Gd, double Vd, double Vte, double Isat)
void setNumBranchDataVars(int num_branch_data_vars)
Linear::Vector * currStaVectorPtr
void registerStateLIDs(const std::vector< int > &stateLIDVecRef)
int ACollEquCollNodeOffset
double * f_EmitPEquCollPNodePtr
double * nextStaVectorRawPtr
#define Xyce_NONPOINTER_MATRIX_LOAD
int AIfxEqudIfxNodeOffset
double * f_EmitPEquEmitPNodePtr
double tleakBCEmissionCoeff
void oldDAEExcessPhaseCalculation2(double &iEX, double &gEX, double &iC_local)
double * q_IfxEquIfxNodePtr
int AdIfxEquIfxNodeOffset
void noiseSupport(double &noise, double &lnNoise, const int type, const double param, const double temp)
double * q_dIfxEquCollPNodePtr
double * q_CollPEquBasePNodePtr
int AIfxEquEmitPNodeOffset
bool updatePrimaryState()
const std::string & getType() const
void oldDAEExcessPhaseCalculation2(const ScalarT &td, const ScalarT &qB, const ScalarT &iBE, const ScalarT &gBE, const double dt0, const double dt1, bool dcopFlag, bool beginIntegrationFlag, double *nextStaVec, const double *currStaVec, const double *lastStaVec, const int li_istateCEXBC, ScalarT &iEX, ScalarT &gEX, ScalarT &iC_local)
double gmin
minimum allowed conductance.
double * q_dIfxEqudIfxNodePtr
double * q_dIfxEquEmitPNodePtr
int ABasePEquBaseNodeOffset
static std::vector< int > jacMap_RC_RE_
Linear::Vector * currStoVectorPtr
int ACollPEquBaseNodeOffset
int AIfxEquBasePNodeOffset
double * q_EmitEquEmitNodePtr
double * f_BasePEquCollPNodePtr
int ACollPEquIfxNodeOffset
const ExternData & extData
bool processParams()
processParams
ModelBlock represents a .MODEL line from the netlist.
bool outputPlotFiles(bool force_final_output)
bool updateSecondaryState()
Manages parameter binding for class C.
int ASubstEquCollPNodeOffset
InstanceBlock represent a device instance line from the netlist.
double currTime_
DeviceEntity for expression time, breakpoints DeviceMgr for dependent parameters, breakpoints...
static std::vector< std::vector< int > > jacStamp_
double transTimeHighCurrF
bool initJctFlag_
true if on the first newton step of the first dcop solve of the first .STEP iteration. BJT, JFET, Diode, MOSFET, SW, Extern
int getNumNoiseSources() const
Util::Param temp
operating temperature of ckt.
std::vector< Param > params
double * q_CollPEquIfxNodePtr
int ABasePEquBasePNodeOffset
Linear::Matrix * dQdxMatrixPtr
int AEmitEquEmitPNodeOffset
double * q_IfxEquEmitPNodePtr
static std::vector< std::vector< int > > jacMap2_RB_RC_
double * f_CollPEquIfxNodePtr
double * f_BasePEquBasePNodePtr
double * f_CollPEquBaseNodePtr
double * q_CollPEquSubstNodePtr
double * q_CollEquCollNodePtr
double * f_dIfxEqudIfxNodePtr
static std::vector< std::vector< int > > jacMap2_RC_
Linear::Vector * flagSolVectorPtr
int getNumBranchDataVars() const
static std::vector< std::vector< int > > jacMap2_RC_RE_
double * q_BasePEquBasePNodePtr
int ABasePEquEmitPNodeOffset
const SolverState & getSolverState() const
Returns the solver state given during device construction.
void setModParams(const std::vector< Param > ¶ms)
static bjtInstanceSensitivity bjtInstanceSens
static void loadModelParameters(ParametricData< Model > &model_parameters)
double * nextSolVectorRawPtr
int numLeadCurrentStoreVars
int AdIfxEquCollPNodeOffset
double * f_SubstEquCollPNodePtr
double * f_BaseEquBaseNodePtr
double * q_IfxEqudIfxNodePtr