45 #include <Xyce_config.h>
48 #include <N_UTL_Misc.h>
56 #ifdef Xyce_DEBUG_DEVICE
72 #include <N_ERH_ErrorMgr.h>
74 #include <N_LAS_Matrix.h>
75 #include <N_LAS_MultiVector.h>
76 #include <N_LAS_Vector.h>
110 U_LOGIC,
CAT_VOLT,
"Initial condition of no voltage drops accross device");
114 U_LOGIC,
CAT_NONE,
"Flag for toggling the use of the lambert-W function instead of exponentials.");
560 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
569 externalNodeMode(false),
586 tleakBEEmissionCoeff(1.5),
587 tleakBCEmissionCoeff(2.0),
687 li_store_capeqCB(-1),
709 AEmitEquEmitPNodeOffset(-1),
710 AEmitPEquEmitNodeOffset(-1),
711 ABaseEquBasePNodeOffset(-1),
712 ABasePEquBaseNodeOffset(-1),
713 ACollEquCollPNodeOffset(-1),
714 ACollPEquCollNodeOffset(-1),
715 AEmitEquEmitNodeOffset(-1),
716 AEmitPEquEmitPNodeOffset(-1),
717 ABaseEquBaseNodeOffset(-1),
718 ABasePEquBasePNodeOffset(-1),
719 ACollEquCollNodeOffset(-1),
720 ACollPEquCollPNodeOffset(-1),
721 AEmitPEquBasePNodeOffset(-1),
722 ABasePEquEmitPNodeOffset(-1),
723 AEmitPEquCollPNodeOffset(-1),
724 ACollPEquEmitPNodeOffset(-1),
725 ABasePEquCollPNodeOffset(-1),
726 ACollPEquBasePNodeOffset(-1),
727 ABaseEquCollPNodeOffset(-1),
728 ACollPEquBaseNodeOffset(-1),
729 ASubstEquSubstNodeOffset(-1),
730 ASubstEquCollPNodeOffset(-1),
731 ACollPEquSubstNodeOffset(-1),
732 ABaseEquEmitPNodeOffset(-1) ,
733 ACollPEquIfxNodeOffset(-1),
734 AEmitPEquIfxNodeOffset(-1),
735 AIfxEquCollPNodeOffset(-1),
736 AIfxEquBasePNodeOffset(-1),
737 AIfxEquEmitPNodeOffset(-1),
738 AIfxEquIfxNodeOffset(-1),
739 AIfxEqudIfxNodeOffset(-1),
740 AdIfxEquCollPNodeOffset(-1),
741 AdIfxEquBasePNodeOffset(-1),
742 AdIfxEquEmitPNodeOffset(-1),
743 AdIfxEquIfxNodeOffset(-1),
744 AdIfxEqudIfxNodeOffset(-1),
748 f_EmitEquEmitPNodePtr(0),
749 f_EmitPEquEmitNodePtr(0),
750 f_BaseEquBasePNodePtr(0),
751 f_BasePEquBaseNodePtr(0),
752 f_CollEquCollPNodePtr(0),
753 f_CollPEquCollNodePtr(0),
754 f_EmitEquEmitNodePtr(0),
755 f_EmitPEquEmitPNodePtr(0),
756 f_BaseEquBaseNodePtr(0),
757 f_BasePEquBasePNodePtr(0),
758 f_CollEquCollNodePtr(0),
759 f_CollPEquCollPNodePtr(0),
760 f_EmitPEquBasePNodePtr(0),
761 f_BasePEquEmitPNodePtr(0),
762 f_EmitPEquCollPNodePtr(0),
763 f_CollPEquEmitPNodePtr(0),
764 f_BasePEquCollPNodePtr(0),
765 f_CollPEquBasePNodePtr(0),
766 f_BaseEquCollPNodePtr(0),
767 f_CollPEquBaseNodePtr(0),
768 f_SubstEquSubstNodePtr(0),
769 f_SubstEquCollPNodePtr(0),
770 f_CollPEquSubstNodePtr(0),
771 f_BaseEquEmitPNodePtr(0),
774 f_CollPEquIfxNodePtr(0),
775 f_EmitPEquIfxNodePtr(0),
778 f_IfxEquCollPNodePtr(0),
779 f_IfxEquBasePNodePtr(0),
780 f_IfxEquEmitPNodePtr(0),
782 f_IfxEquIfxNodePtr(0),
783 f_IfxEqudIfxNodePtr(0),
785 f_dIfxEquCollPNodePtr(0),
786 f_dIfxEquBasePNodePtr(0),
787 f_dIfxEquEmitPNodePtr(0),
788 f_dIfxEquIfxNodePtr(0),
789 f_dIfxEqudIfxNodePtr(0),
793 q_EmitEquEmitPNodePtr(0),
794 q_EmitPEquEmitNodePtr(0),
795 q_BaseEquBasePNodePtr(0),
796 q_BasePEquBaseNodePtr(0),
797 q_CollEquCollPNodePtr(0),
798 q_CollPEquCollNodePtr(0),
799 q_EmitEquEmitNodePtr(0),
800 q_EmitPEquEmitPNodePtr(0),
801 q_BaseEquBaseNodePtr(0),
802 q_BasePEquBasePNodePtr(0),
803 q_CollEquCollNodePtr(0),
804 q_CollPEquCollPNodePtr(0),
805 q_EmitPEquBasePNodePtr(0),
806 q_BasePEquEmitPNodePtr(0),
807 q_EmitPEquCollPNodePtr(0),
808 q_CollPEquEmitPNodePtr(0),
809 q_BasePEquCollPNodePtr(0),
810 q_CollPEquBasePNodePtr(0),
811 q_BaseEquCollPNodePtr(0),
812 q_CollPEquBaseNodePtr(0),
813 q_SubstEquSubstNodePtr(0),
814 q_SubstEquCollPNodePtr(0),
815 q_CollPEquSubstNodePtr(0),
816 q_BaseEquEmitPNodePtr(0),
819 q_CollPEquIfxNodePtr(0),
820 q_EmitPEquIfxNodePtr(0),
823 q_IfxEquCollPNodePtr(0),
824 q_IfxEquBasePNodePtr(0),
825 q_IfxEquEmitPNodePtr(0),
827 q_IfxEquIfxNodePtr(0),
828 q_IfxEqudIfxNodePtr(0),
830 q_dIfxEquCollPNodePtr(0),
831 q_dIfxEquBasePNodePtr(0),
832 q_dIfxEquEmitPNodePtr(0),
833 q_dIfxEquIfxNodePtr(0),
834 q_dIfxEqudIfxNodePtr(0),
1011 int numExist = cNode + eNode + bNode;
1013 if (numExtVars <= 4)
1021 if (numExtVars != 4 + numExist)
1023 UserError(*
this) <<
"Wrong number of external nodes are set!" << std::endl
1024 <<
"Either set none of them, or set them all.";
1062 const std::vector<int> & extLIDVecRef )
1067 #ifdef Xyce_DEBUG_DEVICE
1070 Xyce::dout() << section_divider << std::endl;
1071 Xyce::dout() <<
" BJTInstance::registerLIDs" <<std::endl;
1072 Xyce::dout() <<
" name = " <<
getName() << std::endl;
1073 Xyce::dout() <<
" number of internal variables: " <<
numIntVars << std::endl;
1074 Xyce::dout() <<
" number of external variables: " <<
numExtVars << std::endl;
1075 Xyce::dout() <<
" numIntVars = " <<
numIntVars << std::endl;
1076 Xyce::dout() <<
" numExtVars = " <<
numExtVars << std::endl;
1084 #ifdef Xyce_DEBUG_DEVICE
1087 Xyce::dout() <<
" Internal LID List" << std::endl;
1088 for(
int i = 0; i <
intLIDVec.size(); ++i )
1089 Xyce::dout() <<
" " <<
intLIDVec[i] << std::endl;
1090 Xyce::dout() <<
" External LID List" << std::endl;
1091 for(
int i = 0; i <
extLIDVec.size(); ++i )
1092 Xyce::dout() <<
" " <<
extLIDVec[i] << std::endl;
1155 #ifdef Xyce_DEBUG_DEVICE
1158 Xyce::dout() <<
" li_Coll = " <<
li_Coll << std::endl;
1159 Xyce::dout() <<
" li_CollP = " <<
li_CollP << std::endl;
1160 Xyce::dout() <<
" li_Base = " <<
li_Base << std::endl;
1161 Xyce::dout() <<
" li_BaseP = " <<
li_BaseP << std::endl;
1162 Xyce::dout() <<
" li_Emit = " <<
li_Emit << std::endl;
1163 Xyce::dout() <<
" li_EmitP = " <<
li_EmitP << std::endl;
1164 Xyce::dout() <<
" li_Subst = " <<
li_Subst << std::endl;
1168 Xyce::dout() <<
" li_Ifx = " <<
li_Ifx << std::endl;
1169 Xyce::dout() <<
" li_dIfx = " <<
li_dIfx << std::endl;
1172 Xyce::dout() << section_divider << std::endl;
1360 std::vector<int> map;
1361 std::vector< std::vector<int> > map2;
1485 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
1606 #ifdef Xyce_DEBUG_DEVICE
1609 Xyce::dout() <<
"Start BJTInst::updateTemperature" << std::endl;
1610 Xyce::dout() <<
"temp = "<<temp << std::endl;
1613 if( temp != -999.0 )
TEMP = temp;
1633 double pbfact = -2.0 *
vt * ( 1.5 * log( fact2 ) +
CONSTQ * arg );
1638 double factor = exp( factlog );
1642 #ifdef Xyce_DEBUG_DEVICE
1645 Xyce::dout() <<
" Factor is " << factor << std::endl;
1646 Xyce::dout() <<
" Bfactor is " << bfactor << std::endl;
1647 Xyce::dout() <<
" factlog is " << factlog << std::endl;
1648 Xyce::dout() <<
" ratio1 is " << ratio1 << std::endl;
1649 Xyce::dout() <<
" TEMP is " <<
TEMP << std::endl;
1650 Xyce::dout() <<
" TNOM is " <<
model_.
TNOM << std::endl;
1663 tBEPot = fact2 * pbo + pbfact;
1665 double gmanew = (
tBEPot - pbo ) / pbo;
1675 tBCPot = fact2 * pbo + pbfact;
1677 gmanew = (
tBCPot - pbo ) / pbo;
1734 #ifdef Xyce_DEBUG_DEVICE
1738 Xyce::dout() << section_divider << std::endl;
1739 Xyce::dout() <<
"In BJTInst::updateTemperature" << std::endl;
1740 Xyce::dout() << section_divider << std::endl;
1741 Xyce::dout() <<
"TEMP = " <<
TEMP << std::endl;
1742 Xyce::dout() <<
"TNOM = " << TNOM << std::endl;
1743 Xyce::dout() <<
"vt = " <<
vt << std::endl;
1744 Xyce::dout() <<
"tSatCur = " <<
tSatCur << std::endl;
1745 Xyce::dout() <<
"tBetaF = " <<
tBetaF << std::endl;
1746 Xyce::dout() <<
"tBetaR = " <<
tBetaR << std::endl;
1747 Xyce::dout() <<
"tBELeakCur = " <<
tBELeakCur << std::endl;
1748 Xyce::dout() <<
"tBCLeakCur = " <<
tBELeakCur << std::endl;
1749 Xyce::dout() <<
"tBEPot = " <<
tBEPot << std::endl;
1750 Xyce::dout() <<
"tBECap = " <<
tBECap << std::endl;
1751 Xyce::dout() <<
"tBCPot = " <<
tBCPot << std::endl;
1752 Xyce::dout() <<
"tBCCap = " <<
tBCCap << std::endl;
1753 Xyce::dout() <<
"tDepCap = " <<
tDepCap << std::endl;
1754 Xyce::dout() <<
"tF1 = " <<
tF1 << std::endl;
1755 Xyce::dout() <<
"tF4 = " <<
tF4 << std::endl;
1756 Xyce::dout() <<
"tF5 = " <<
tF5 << std::endl;
1759 Xyce::dout() <<
"tRollOffExp = " <<
tRollOffExp << std::endl;
1760 Xyce::dout() <<
"tInvRollOffF = " <<
tInvRollOffF << std::endl;
1761 Xyce::dout() <<
"tInvRollOffR = " <<
tInvRollOffR << std::endl;
1762 Xyce::dout() <<
"tInvEarlyVoltF = " <<
tInvEarlyVoltF << std::endl;
1763 Xyce::dout() <<
"tInvEarlyVoltR = " <<
tInvEarlyVoltR << std::endl;
1764 Xyce::dout() <<
"tBaseResist = " <<
tBaseResist << std::endl;
1766 Xyce::dout() <<
"tEmitterResist = " <<
tEmitterResist << std::endl;
1767 Xyce::dout() << section_divider << std::endl;
1768 Xyce::dout() << std::endl;
1786 double RS = 1.0e-12;
1787 double arg1 = (Vd + Isat*RS)/Vte;
1789 double evd = exp(arg1);
1790 double lambWArg = Isat*RS*evd/Vte;
1796 Id = -Isat+Vte*(lambWReturn)/RS;
1797 Gd = lambWReturn / ((1 + lambWReturn)*RS);
1817 bool returnVal=
false;
1822 (*maskVectorPtr)[
li_Ifx] = 0.0;
1823 (*maskVectorPtr)[
li_dIfx] = 0.0;
1877 double Cp_Jdxp_q = 0.0;
1878 double Ep_Jdxp_q = 0.0;
1879 double Bp_Jdxp_q = 0.0;
1991 double coefC, coefB, coefE, coefCp, coefBp, coefEp;
1999 double vce_diff = vbe_diff - vbc_diff;
2038 double Cp_Jdxp_f=0.0;
2039 double Bp_Jdxp_f=0.0;
2040 double Ep_Jdxp_f=0.0;
2041 double dIfx_Jdxp_f=0.0 ;
2042 double Ifx_Jdxp_f=0.0 ;
2087 dFdxdVp[
li_dIfx] += dIfx_Jdxp_f;
2091 dFdxdVp[
li_Ifx] += Ifx_Jdxp_f;
2407 (
double & iEX,
double & gEX,
double & iC_local)
2410 double td = model_.excessPhaseFac;
2412 #ifdef Xyce_DEBUG_DEVICE
2413 if (getDeviceOptions().debugLevel > 0 && getSolverState().debugTimeFlag)
2415 Xyce::dout() << std::endl;
2416 Xyce::dout() <<
" Excess Phase stuff:" <<std::endl;
2417 Xyce::dout() <<
" name = " <<
getName() <<std::endl;
2418 Xyce::dout() <<
" td = " << td <<std::endl;
2434 dt0 = getSolverState().currTimeStep;
2435 dt1 = getSolverState().lastTimeStep;
2440 if (!(getSolverState().dcopFlag) && td != 0)
2442 double arg1, arg2, denom;
2447 denom = 1.0 + arg1 + arg2;
2448 phaseScalar = arg1 / denom;
2451 if (!getSolverState().beginIntegrationFlag)
2453 currCexbc = (*extData.currStaVectorPtr)[li_istateCEXBC];
2454 lastCexbc = (*extData.lastStaVectorPtr)[li_istateCEXBC];
2457 iC_local = ((currCexbc) * (1 + dt0 / dt1 + arg2) - (lastCexbc) * dt0 / dt1) / denom;
2458 iEX = iBE * phaseScalar;
2459 gEX = gBE * phaseScalar;
2461 nextCexbc = iC_local + iEX / qB;
2462 (*extData.nextStaVectorPtr)[li_istateCEXBC] = nextCexbc;
2479 bool bsuccess =
true;
2481 double v_emit, v_emitP;
2482 double v_base, v_baseP;
2483 double v_coll, v_collP;
2489 #ifdef Xyce_DEBUG_DEVICE
2492 Xyce::dout() << Xyce::section_divider << std::endl;
2493 Xyce::dout() <<
"Instance::updateIntermediateVars " <<
getName() <<std::endl;
2506 vEEp = (v_emit - v_emitP);
2507 vBBp = (v_base - v_baseP);
2508 vCCp = (v_coll - v_collP);
2538 if ((*flagSolVectorPtr)[
li_Emit] == 0 || (*flagSolVectorPtr)[
li_EmitP] == 0 ||
2539 (*flagSolVectorPtr)[
li_Base] == 0 || (*flagSolVectorPtr)[
li_BaseP] == 0 ||
2540 (*flagSolVectorPtr)[
li_Coll] == 0 || (*flagSolVectorPtr)[
li_CollP] == 0 ||
2541 (*flagSolVectorPtr)[
li_Subst] == 0 )
2554 #ifdef Xyce_DEBUG_DEVICE
2557 Xyce::dout() <<
" Setting device initial condition to Base-Emitter drop=tVCrit (" <<
tVCrit <<
")"<<std::endl;
2564 #ifdef Xyce_DEBUG_DEVICE
2567 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
2568 Xyce::dout() <<
" " <<std::endl;
2569 Xyce::dout() <<
" using UIC.\n";
2570 Xyce::dout() <<
" vBE = " <<
vBE << std::endl;
2571 Xyce::dout() <<
" vBC = " <<
vBC << std::endl;
2572 Xyce::dout() <<
" vBX = " <<
vBX << std::endl;
2573 Xyce::dout() <<
" vCS = " <<
vCS << std::endl;
2588 #ifdef Xyce_DEBUG_DEVICE
2591 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
2592 Xyce::dout() <<
" " <<std::endl;
2593 Xyce::dout() <<
" BJT explicitly set OFF, zeroing all junction drops.\n";
2621 #ifdef Xyce_DEBUG_DEVICE
2624 Xyce::dout() <<
" tVCrit = " <<
tVCrit << std::endl;
2625 Xyce::dout().width(3);
2627 Xyce::dout().width(5); Xyce::dout() <<
getName();
2628 Xyce::dout() <<
" Blim: ";
2629 Xyce::dout() <<
" vBE=";
2630 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
2631 Xyce::dout() <<
vBE;
2632 Xyce::dout() <<
" vBC=";
2633 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
2634 Xyce::dout() <<
vBC << std::endl;
2655 if (ichk1 == 1) icheck=1;
2661 #ifdef Xyce_DEBUG_DEVICE
2664 Xyce::dout().width(3);
2666 Xyce::dout().width(5); Xyce::dout() <<
getName() ;
2667 Xyce::dout() <<
" Alim: ";
2668 Xyce::dout() <<
" vBE=";
2669 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
2670 Xyce::dout() <<
vBE;
2671 Xyce::dout() <<
" vBC=";
2672 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
2673 Xyce::dout() <<
vBC;
2679 if (
origFlag) Xyce::dout() <<
" SAME";
2680 else Xyce::dout() <<
" DIFF";
2681 Xyce::dout() << std::endl;
2699 if(
vBE > -5.0 * vtF )
2703 if( iLeakBE == 0.0 )
2718 if(
vBC > -5.0 * vtR )
2722 if( iLeakBC == 0.0 )
2741 if (
vBE > -5.0 * vtF)
2743 double arg1 =
vBE / vtF ;
2763 double arg1 =
vBE / vtE ;
2773 evBEleak = exp(arg1);
2776 iBEleak = iLeakBE * (evBEleak - 1.0);
2777 gBEleak = iLeakBE * devBEleak / vtE;
2788 if(
vBC > -5.0 * vtR )
2790 double arg1 =
vBC / vtR ;
2810 double arg1 =
vBC / vtC ;
2820 evBCleak = exp(arg1);
2823 iBCleak = iLeakBC * (evBCleak - 1.0);
2824 gBCleak = iLeakBC * devBCleak / vtC;
2842 if (rofF == 0.0 && rofR == 0.0)
2845 double q1_qB = q1 *
qB;
2855 q2 = rofF *
iBE + rofR *
iBC;
2868 double arg = 1.0 + 4.0 * q2;
2876 if (fabs(arg) > 0.0) sqarg = pow(arg,
tRollOffExp);
2877 double rofF_gBE_invSqarg = 0.0;
2878 double rofR_gBC_invSqarg = 0.0;
2879 if(arg != 0) rofF_gBE_invSqarg = rofF*
gBE*2*
tRollOffExp*sqarg/arg;
2880 if(arg != 0) rofR_gBC_invSqarg = rofR*
gBC*2*
tRollOffExp*sqarg/arg;
2882 qB = 0.5 * q1 * (1.0 + sqarg);
2937 bool geqCB_recalc(
false);
2960 arg2 = argtf * (3.0 - 2.0 * tmp);
2970 geqCB_recalc =
true;
3065 qBX =
tBCPot * czBX * ( 1.0 - arg * sarg ) /
3067 capBX = czBX * sarg;
3096 capCS = czCS * sarg;
3112 double iEX_tmp = 0.0;
double gEX_tmp = 0.0;
double iC_tmp = 0.0;
3186 gX = rBpr + rBpi /
qB;
3188 if (fabs(xjrB) > 0.0)
3190 double arg1 =
Xycemax(
iB / xjrB, 1.0e-09);
3191 double arg2 = (-1.0 + sqrt( 1.0 + 14.59025 * arg1)) / 2.4317 / sqrt(arg1);
3193 gX = rBpr + 3.0 * rBpi * (arg1 - arg2) / arg2 / arg1 / arg1;
3196 if (fabs(
gX) > 0.0)
gX = 1.0 /
gX;
3219 bool bsuccess =
true;
3222 std::ostringstream oss;
3223 oss <<
"Q_" <<
getName() <<
".dat";
3224 std::string filename = oss.str();
3231 fp1 = fopen(filename.c_str(),
"w");
3235 fp1 = fopen(filename.c_str(),
"a");
3241 " TITLE = \"Debug Excess Phase data: %s \"\n",
getName().getEncodedName().c_str());
3246 fprintf(fp1,
"%s",
"\tVARIABLES = \"TIME (S)\",\n");
3248 fprintf(fp1,
"%s",
"\t \"iBE/qB \",\n");
3249 fprintf(fp1,
"%s",
"\t \"currCexbc \",\n");
3250 fprintf(fp1,
"%s",
"\t \"lastCexbc \",\n");
3253 fprintf(fp1,
"%s",
"\t \"i_fx \",\n");
3254 fprintf(fp1,
"%s",
"\t \"di_fx \",\n");
3257 fprintf(fp1,
"%s",
"\tZONE F=POINT T=\"Excess Phase Data\"\n");
3260 fprintf(fp1,
" %12.4e",time);
3261 fprintf(fp1,
" %12.4e",(
iBE/
qB));
3268 double i_fx = solVec[
li_Ifx];
3269 double di_fx = solVec[
li_dIfx];
3270 fprintf(fp1,
" %12.4e",i_fx);
3271 fprintf(fp1,
" %12.4e",di_fx);
3274 fprintf(fp1,
"%s",
"\n");
3345 Xyce::dout() <<
"Bad Depletion Capacitance Coefficient" << std::endl;
3374 std::vector<Instance*>::iterator iter;
3378 for (iter=first; iter!=last; ++iter)
3380 (*iter)->processParams();
3398 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
3405 emissionCoeffF(1.0),
3415 leakBEEmissionCoeff(1.5),
3421 emissionCoeffR(1.0),
3432 leakBCEmissionCoeff(2.0),
3434 baseCurrHalfResist(0.0),
3438 minBaseResist(baseResist),
3440 collectorResist(0.0),
3451 transTimeBiasCoeffF(0.0),
3452 transTimeFVBC(1.e99),
3453 transTimeHighCurrF(0.0),
3504 leakBCCurrentGiven(false),
3506 leakBECurrentGiven(false),
3508 minBaseResistGiven(false),
3523 UserError0(*
this) <<
"Both BF and BFM are set, which is redundant.";
3533 UserError0(*
this) <<
"Both BR and BRM are set, which is redundant.";
3541 int VAFgivenCount = 0;
3545 if (VAFgivenCount > 1)
3547 UserError0(*
this) <<
"The forward early voltage is set more than once. VA, VAF and VBF are aliases.";
3549 if (VAFgivenCount > 0)
3555 int VARgivenCount = 0;
3560 if (VARgivenCount > 1)
3562 UserError0(*
this) <<
"The reverse early voltage is set more than once. VAR,VB,VRB and BV are aliases.";
3564 if (VARgivenCount > 0)
3570 int IKFgivenCount = 0;
3574 if (IKFgivenCount > 1)
3576 UserError0(*
this) <<
"High current roll-off is set more than once (IKF, JBF or IK).";
3578 if (IKFgivenCount > 0)
3586 UserError0(*
this) <<
"Both IKR and JBRgiven are set, which is redundant.";
3597 UserError0(*
this) <<
"Both JLE and ISE are set, which is redundant.";
3608 UserError0(*
this) <<
"Both JLC and ISC are set, which is redundant.";
3618 UserError0(*
this) <<
"Both NLE and NE are set, which is redundant.";
3628 UserError0(*
this) <<
" Both MJE and ME are set, which is redundant.";
3638 UserError0(*
this) <<
"Both MJC and MC are set, which is redundant.";
3646 int CJSgivenCount = 0;
3650 if (CJSgivenCount > 1)
3652 UserError0(*
this) <<
"The zero-bias collector-substrate capacitance (CJS, CCS or CSUB) is set more than once.";
3654 if (CJSgivenCount > 0)
3660 int IRBgivenCount = 0;
3664 if (IRBgivenCount > 1)
3666 UserError0(*
this) <<
"The current for 1/2 base resistance (IRB, JRB or IOB) is set more than once.";
3668 if (IRBgivenCount > 0)
3676 UserError0(*
this) <<
"The BE built-in potential (VJE or PE) is set more than once.";
3686 UserError0(*
this) <<
"The BC built-in potential (VJC or PC) is set more than once.";
3696 UserError0(*
this) <<
"XCJC and CDIS are both set (they are aliases).";
3704 int VJSgivenCount = 0;
3708 if (VJSgivenCount > 1)
3710 UserError0(*
this) <<
"The forward early voltage is set more than once. PS, VJS and PSUB are aliases.";
3712 if (VJSgivenCount > 0)
3718 int MJSgivenCount = 0;
3722 if (MJSgivenCount > 1)
3724 UserError0(*
this) <<
"The forward early voltage is set more than once. MS, MJS and ESUB are aliases.";
3726 if (MJSgivenCount > 0)
3734 UserError0(*
this) <<
"ITF and JTF are both set (they are aliases).";
3744 UserError0(*
this) <<
"NK and NKF are both set (they are aliases).";
3752 int XTBgivenCount = 0;
3756 if (XTBgivenCount > 1)
3758 UserError0(*
this) <<
"The forward early voltage is set more than once. TB, XTB and TCB are aliases.";
3760 if (XTBgivenCount > 0)
3769 UserError0(*
this) <<
"PT and XTI are both set (they are aliases).";
3810 std::vector<Instance*>::iterator iterI;
3815 for (iterI = firstI; iterI != lastI; ++iterI)
3832 std::vector<Instance*>::const_iterator iter;
3837 os <<
" name modelName Parameters" << std::endl;
3838 for (i = 0, iter = first; iter != last; ++iter, ++i)
3840 os <<
" " << i <<
": " << (*iter)->getName() <<
" ";
3844 os <<
" AREA = " << (*iter)->AREA << std::endl;
3845 os <<
" icVBE = " << (*iter)->icVBE << std::endl;
3846 os <<
" icVCE = " << (*iter)->icVCE << std::endl;
3847 os <<
" TEMP = " << (*iter)->TEMP << std::endl;
3848 os <<
" OFF = " << (*iter)->OFF << std::endl;
3874 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
3893 bool bsuccess =
true;
3903 bsuccess = bsuccess && btmp;
3949 bool bsuccess =
true;
3978 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ)
3987 double vce_diff = vbe_diff - vbc_diff;
4003 i_fx = solVec[bi.
li_Ifx];
4011 fVec[bi.
li_Ifx] += - di_fx;
4012 fVec[bi.
li_dIfx] += 3 * di_fx*td + 3*i_fx -3 * bi.
iBE / bi.
qB;
4052 double Cp_Jdxp_f(0.0), Bp_Jdxp_f(0.0), Ep_Jdxp_f(0.0),
4053 dIfx_Jdxp_f(0.0 ), Ifx_Jdxp_f(0.0 ),
4054 Cp_Jdxp_q ( 0.0), Ep_Jdxp_q ( 0.0), Bp_Jdxp_q ( 0.0);
4059 Cp_Jdxp_f = + bi.
diCEdvBp * vbe_diff
4065 Bp_Jdxp_f = bi.
gBEtot * vbe_diff + bi.
gBCtot * vbc_diff;
4097 dFdxdVp[bi.
li_dIfx] += dIfx_Jdxp_f;
4101 dFdxdVp[bi.
li_Ifx] += Ifx_Jdxp_f;
4160 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
4377 .registerDevice(
"q", 1)
4378 .registerModelType(
"pnp", 1)
4379 .registerModelType(
"npn", 1);