45 #include <Xyce_config.h>
48 #include <N_UTL_Math.h>
58 #include <N_ERH_ErrorMgr.h>
60 #include <N_LAS_Matrix.h>
61 #include <N_LAS_Vector.h>
62 #include <N_UTL_FeatureTest.h>
63 #include <N_UTL_ExtendedString.h>
74 .setDescription(
"Area scaling value (scales IS, ISR, IKF, RS, CJ0, and IBV)");
82 .setDescription(
"Device temperature");
87 .setDescription(
"Initial voltage drop across device set to zero");
91 .setDescription(
"Option to solve diode equations with the Lambert-W function");
99 .setDescription(
"Saturation current")
100 .setAnalyticSensitivityAvailable(
true)
107 .setDescription(
"Saturation current")
108 .setAnalyticSensitivityAvailable(
true)
115 .setDescription(
"Parasitic resistance")
116 .setAnalyticSensitivityAvailable(
true)
121 .setOriginalValueStored(
true)
122 .setDescription(
"Emission coefficient")
123 .setAnalyticSensitivityAvailable(
true)
129 .setDescription(
"Recombination current parameter (level 2)")
130 .setAnalyticSensitivityAvailable(
true)
135 .setDescription(
"Emission coefficient for ISR (level 2)")
136 .setAnalyticSensitivityAvailable(
true)
142 .setDescription(
"High-injection \"knee\" current (level 2)")
143 .setAnalyticSensitivityAvailable(
true)
149 .setDescription(
"Transit time")
150 .setAnalyticSensitivityAvailable(
true)
157 .setDescription(
"Zero-bias p-n depletion capacitance")
158 .setAnalyticSensitivityAvailable(
true)
166 .setDescription(
"Zero-bias p-n depletion capacitance")
167 .setAnalyticSensitivityAvailable(
true)
174 .setDescription(
"Zero-bias p-n depletion capacitance")
175 .setAnalyticSensitivityAvailable(
true)
181 .setDescription(
"Potential for p-n junction")
182 .setAnalyticSensitivityAvailable(
true)
187 .setDescription(
"Grading parameter for p-n junction")
188 .setAnalyticSensitivityAvailable(
true)
194 .setDescription(
"Bandgap voltage (barrier height)")
195 .setAnalyticSensitivityAvailable(
true)
200 .setDescription(
"IS temperature exponent")
201 .setAnalyticSensitivityAvailable(
true)
207 .setDescription(
"IKF temperature coefficient (linear) (level 2)")
208 .setAnalyticSensitivityAvailable(
true)
214 .setDescription(
"BV temperature coefficient (linear) (level 2)");
219 .setDescription(
"BV temperature coefficient (quadratic) (level 2)");
224 .setDescription(
"RS temperature coefficient (linear) (level 2)");
229 .setDescription(
"RS temperature coefficient (quadratic) (level 2)");
233 .setDescription(
"Forward-bias depletion capacitance coefficient")
234 .setAnalyticSensitivityAvailable(
true)
241 .setDescription(
"Reverse breakdown \"knee\" voltage")
242 .setAnalyticSensitivityAvailable(
true)
250 .setDescription(
"Reverse breakdown \"knee\" voltage")
251 .setAnalyticSensitivityAvailable(
true)
257 .setDescription(
"Reverse breakdown \"knee\" current")
258 .setAnalyticSensitivityAvailable(
true)
263 .setDescription(
"Reverse current fitting factor")
264 .setAnalyticSensitivityAvailable(
true)
269 .setDescription(
"Reverse breakdown ideality factor (level 2)")
270 .setAnalyticSensitivityAvailable(
true)
276 .setDescription(
"Low-level reverse breakdown \"knee\" current (level 2)")
277 .setAnalyticSensitivityAvailable(
true)
282 .setDescription(
"Low-level reverse breakdown ideality factor (level 2)")
283 .setAnalyticSensitivityAvailable(
true)
289 .setAnalyticSensitivityAvailable(
true)
294 .setDescription(
"Flicker noise coefficient")
295 .setAnalyticSensitivityAvailable(
true)
300 .setDescription(
"Flicker noise exponent")
301 .setAnalyticSensitivityAvailable(
true)
327 if (!
given(
"LAMBERTW"))
351 :
DeviceInstance(instance_block, configuration.getInstanceParameters(), factory_block),
356 Temp(getDeviceOptions().temp.getImmutableValue<double>()),
358 InitCondGiven(false),
387 APosEquPosNodeOffset(-1),
388 APosEquPriNodeOffset(-1),
389 ANegEquNegNodeOffset(-1),
390 ANegEquPriNodeOffset(-1),
391 APriEquPosNodeOffset(-1),
392 APriEquNegNodeOffset(-1),
393 APriEquPriNodeOffset(-1),
395 fPosEquPosNodePtr(0),
396 fPosEquPriNodePtr(0),
397 fNegEquNegNodePtr(0),
398 fNegEquPriNodePtr(0),
399 fPriEquPosNodePtr(0),
400 fPriEquNegNodePtr(0),
401 fPriEquPriNodePtr(0),
402 qPosEquPosNodePtr(0),
403 qPosEquPriNodePtr(0),
404 qNegEquNegNodePtr(0),
405 qNegEquPriNodePtr(0),
406 qPriEquPosNodePtr(0),
407 qPriEquNegNodePtr(0),
408 qPriEquPriNodePtr(0),
482 const std::vector<int> & extLIDVecRef)
487 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
489 Xyce::dout() << std::endl << section_divider << std::endl;
490 Xyce::dout() <<
"In Instance::register LIDs\n\n";
491 Xyce::dout() <<
"name = " <<
getName() << std::endl;
492 Xyce::dout() <<
"number of internal variables: " <<
numIntVars << std::endl;
493 Xyce::dout() <<
"number of external variables: " <<
numExtVars << std::endl;
514 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
516 Xyce::dout() <<
"\nSolution and RHS variables:\n";
517 Xyce::dout() <<
"\nli_Pos = ";
518 Xyce::dout().width(4);
519 Xyce::dout() <<
li_Pos << std::endl;
521 Xyce::dout() <<
"\nli_Neg = ";
522 Xyce::dout().width(4);
523 Xyce::dout() <<
li_Neg << std::endl;
525 Xyce::dout() <<
"\nli_Pri = ";
526 Xyce::dout().width(4);
527 Xyce::dout() <<
li_Pri << std::endl;
533 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
535 Xyce::dout() <<
"\nEnd of Instance::register LIDs\n";
536 Xyce::dout() << section_divider << std::endl;
587 const std::vector<int> & stoLIDVecRef )
599 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
601 Xyce::dout() <<
"li_storevd = " <<
li_storevd;
660 std::vector<int> map;
661 std::vector< std::vector<int> > map2;
696 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
751 double Cd_Jdxp = 0.0;
752 Cd_Jdxp = -(
Cd ) * Vd_diff;
804 double Gd_Jdxp = 0.0;
805 Gd_Jdxp = -(
Gd ) * Vd_diff;
932 noiseData.
resize(numSources);
941 std::string(
"_1overf");
988 bool bsuccess =
true;
1036 double Vte = N *
Vt;
1037 double VteR = NR *
Vt;
1066 if ((*flagSolVectorPtr)[
li_Pos] == 0 ||
1067 (*flagSolVectorPtr)[
li_Neg] == 0 ||
1068 (*flagSolVectorPtr)[
li_Pri] == 0)
1107 double Vdtmp = -( BV +
Vd );
1118 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1120 Xyce::dout() << Xyce::section_divider << std::endl;
1121 Xyce::dout() <<
"Instance::updateIntermediateVars " <<
getName()<<std::endl;
1134 if (
Vd >= -3.0 * Vte)
1150 Vrs = (
Id +
Icd)*RS;
1155 if (
Vd >= -3.0 * Vte)
1178 if(
Vd >= -3.0 * Vte) IRfactor = 1.0;
1179 else IRfactor =
tIRF;
1182 if (
Vd >= -3.0 * Vte)
1184 double arg1 =
Vd / Vte;
1186 double evd = exp(arg1);
1190 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1192 Xyce::dout() <<
"Normal exponential regime." << std::endl;
1193 Xyce::dout() <<
" Vd = " <<
Vd << std::endl;
1194 Xyce::dout() <<
" Vte = " << Vte << std::endl;
1195 Xyce::dout() <<
" Id = " <<
Id << std::endl;
1196 Xyce::dout() <<
" Gd = " <<
Gd << std::endl;
1204 double arg = 3.0 * Vte / (
Vd *
CONSTe);
1205 arg = arg * arg * arg;
1208 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1210 Xyce::dout() <<
"Linear reverse bias regime." << std::endl;
1211 Xyce::dout() <<
" Vd = " <<
Vd << std::endl;
1212 Xyce::dout() <<
" tBrkdwnV = " <<
tBrkdwnV << std::endl;
1213 Xyce::dout() <<
" Id = " <<
Id << std::endl;
1214 Xyce::dout() <<
" Gd = " <<
Gd << std::endl;
1223 double evrev = exp(arg1);
1225 #ifdef Xyce_BREAKDOWN_ORIGINAL
1232 arg2=arg2*arg2*arg2;
1233 double Isat_tBrkdwnV=Isat*(1-arg2);
1238 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1240 Xyce::dout() <<
"Reverse breakdown regime." << std::endl;
1241 Xyce::dout() <<
" Vd = " <<
Vd << std::endl;
1242 Xyce::dout() <<
" tBrkdwnV = " <<
tBrkdwnV << std::endl;
1243 Xyce::dout() <<
" Id = " << Id << std::endl;
1244 Xyce::dout() <<
" Gd = " <<
Gd << std::endl;
1253 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1255 Xyce::dout() <<
" Level 2 diode code " << std::endl;
1260 if(
Vd >= -3.0*Vte) IRfactor=1.0;
1261 else IRfactor =
tIRF;
1264 if (
Vd >= -3.0 * Vte)
1266 double arg1 =
Vd / Vte;
1268 double evd = exp(arg1);
1275 Irec = IsatR * (evd - 1.0);
1276 Gd2 = IsatR*evd/VteR;
1283 DKhi = 0.5*Khi*Gd1/(
tIKF+Inorm);
1293 Id = Inorm*Khi + Irec*Kgen;
1294 Gd = Gd1*Khi + Inorm*DKhi + Gd2*Kgen + Irec*DKgen;
1295 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1297 Xyce::dout() <<
"L2 Normal exponential regime." << std::endl;
1298 Xyce::dout() <<
" Vd = " <<
Vd << std::endl;
1299 Xyce::dout() <<
" Vte = " << Vte << std::endl;
1300 Xyce::dout() <<
" Id = " <<
Id << std::endl;
1301 Xyce::dout() <<
" Irec= " << Irec << std::endl;
1302 Xyce::dout() <<
" Gd = " <<
Gd << std::endl;
1303 Xyce::dout() <<
" Gd1 = " << Gd1 << std::endl;
1304 Xyce::dout() <<
" Gd2 = " << Gd2 << std::endl;
1305 Xyce::dout() <<
" Khi = " << Khi << std::endl;
1306 Xyce::dout() <<
" Kgen=" << Kgen << std::endl;
1307 Xyce::dout() <<
"DKgen=" <<DKgen << std::endl;
1314 double arg = 3.0 * Vte / (
Vd *
CONSTe);
1315 arg = arg * arg * arg;
1318 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1320 Xyce::dout() <<
"L2 Linear reverse bias regime." << std::endl;
1321 Xyce::dout() <<
" Vd = " <<
Vd << std::endl;
1322 Xyce::dout() <<
" tBrkdwnV = " <<
tBrkdwnV << std::endl;
1323 Xyce::dout() <<
" Id = " <<
Id << std::endl;
1324 Xyce::dout() <<
" Gd = " <<
Gd << std::endl;
1333 double evrev = exp(arg1);
1335 #ifdef Xyce_BREAKDOWN_ORIGINAL
1342 arg2=arg2*arg2*arg2;
1343 double Isat_tBrkdwnV=Isat*(1-arg2);
1347 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1349 Xyce::dout() <<
"L2 Reverse breakdown regime." << std::endl;
1350 Xyce::dout() <<
" Vd = " <<
Vd << std::endl;
1351 Xyce::dout() <<
" tBrkdwnV = " <<
tBrkdwnV << std::endl;
1352 Xyce::dout() <<
" Id = " << Id << std::endl;
1353 Xyce::dout() <<
" Gd = " <<
Gd << std::endl;
1370 double arg1 = -M * log(arg);
1372 double sarg = exp(arg1);
1375 Qd = TT *
Id +
tJctPot * Czero * (1.0 - arg * sarg) / (1.0 - M);
1376 Cd = TT *
Gd + Czero * sarg;
1380 double Czof2 = Czero / F2;
1381 double MotJctPot = M /
tJctPot;
1385 Czof2 * (F3 * (
Vc -
tDepCap) + (0.5 * MotJctPot) *
1388 Cd = TT *
Gd + Czof2 * (F3 + MotJctPot *
Vc);
1392 Xyce::dout() <<
"Qd = " <<
Qd << std::endl;
1393 Xyce::dout() <<
"Cd = " <<
Qd << std::endl;
1402 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1404 Xyce::dout() << Xyce::section_divider << std::endl;
1423 double xfc = log( 1.0 -
model_.
FC );
1425 if( temp != -999.0 )
Temp = temp;
1433 double pbfact = -2.0*vt*(1.5*log(fact2)+
CONSTQ*arg);
1439 double pbfact1 = -2.0*vtnom*(1.5*log(fact1)+
CONSTQ*arg1);
1441 double pbo = (
model_.
VJ-pbfact1)/fact1;
1442 double gmaold = (
model_.
VJ-pbo)/pbo;
1449 double gmanew = (
tJctPot-pbo)/pbo;
1478 tempBV =
model_.
BV*(1 + (Temp-TNOM)*
1497 #ifdef Xyce_BREAKDOWN_ORIGINAL
1515 double reltol = 1.0e-3;
1518 double IRfactor =
tIRF;
1521 if( cbv < IRfactor*tSatCur*tempBV/vt )
1523 cbv = IRfactor*tSatCur*tempBV/vt;
1528 double tol = reltol*cbv;
1529 xbv = tempBV-vt*log(1.0+cbv/(IRfactor*tSatCur));
1530 for(
int i = 0; i < 25; ++i )
1532 xbv = tempBV-vt*log(cbv/(IRfactor*tSatCur)+1.0-xbv/vt);
1533 xcbv = IRfactor*tSatCur*(exp((tempBV-xbv)/vt)-1.0+xbv/vt);
1534 if(fabs(xcbv-cbv)<=tol)
break;
1542 double IRFactor=
tIRF;
1548 const int ITER_COUNT_MAX=8;
1551 double arg1=3.0*vte/(
CONSTe*tempBV);
1552 arg1=arg1*arg1*arg1;
1553 cthreshlow=tSatCur*IRFactor*(1-arg1);
1555 exp(-1.0*(3.0*vte-tempBV)/vte);
1557 if(cbv >= cthreshhigh)
1563 else if(cbv <= cthreshlow)
1576 for(iter_count=0; iter_count < ITER_COUNT_MAX; iter_count++)
1578 arg2=3.0*vte/(
CONSTe*xbv);
1579 arg2=arg2*arg2*arg2;
1580 xbv=tempBV-vte*log(cbv/(tSatCur*IRFactor))+vte *
1598 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1600 Xyce::dout() << Xyce::section_divider << std::endl;
1601 Xyce::dout() <<
"Instance::UpdateTemperature" <<
getName() <<std::endl;
1602 Xyce::dout() <<
" IS = " <<
model_.
IS << std::endl;
1603 Xyce::dout() <<
" vtnom = " << vtnom << std::endl;
1604 Xyce::dout() <<
" xfc = " << xfc << std::endl;
1605 Xyce::dout() <<
" TNOM = " << TNOM << std::endl;
1606 Xyce::dout() <<
" vt = " << vt << std::endl;
1607 Xyce::dout() <<
" fact2 = " << fact2 << std::endl;
1608 Xyce::dout() <<
" egfet = " << egfet << std::endl;
1609 Xyce::dout() <<
" arg = " << arg << std::endl;
1610 Xyce::dout() <<
" pbfact = " << pbfact << std::endl;
1611 Xyce::dout() <<
" egfet1 = " << egfet1 << std::endl;
1612 Xyce::dout() <<
" arg1 = " << arg1 << std::endl;
1613 Xyce::dout() <<
" fact1 = " << fact1 << std::endl;
1614 Xyce::dout() <<
" pbfact1 = " << pbfact1 << std::endl;
1615 Xyce::dout() <<
" pbo = " << pbo << std::endl;
1616 Xyce::dout() <<
" gmaold = " << gmaold << std::endl;
1617 Xyce::dout() <<
" gmanew = " << gmanew << std::endl;
1618 Xyce::dout() <<
" tJctCap = " <<
tJctCap << std::endl;
1619 Xyce::dout() <<
" tJctPot = " <<
tJctPot << std::endl;
1620 Xyce::dout() <<
" tSatCur = " << tSatCur << std::endl;
1621 Xyce::dout() <<
" tF1 = " <<
tF1 << std::endl;
1622 Xyce::dout() <<
" tDepCap = " <<
tDepCap << std::endl;
1623 Xyce::dout() <<
" vte = " << vte << std::endl;
1624 Xyce::dout() <<
" tempBV = " << tempBV << std::endl;
1625 Xyce::dout() <<
" tVcrit = " <<
tVcrit << std::endl;
1626 Xyce::dout() <<
" tRS = " <<
tRS << std::endl;
1627 Xyce::dout() <<
" tCOND = " <<
tCOND << std::endl;
1628 Xyce::dout() <<
" tIRF = " <<
tIRF << std::endl;
1629 Xyce::dout() <<
" tBrkdwnV= " <<
tBrkdwnV << std::endl;
1694 double arg1 = (
Vd + Isat*
RS)/Vte;
1696 double evd = exp(arg1);
1697 double lambWArg = Isat*RS*evd/Vte;
1703 Id = -Isat+Vte*(lambWReturn)/RS;
1704 Gd = lambWReturn / ((1 + lambWReturn)*RS);
1723 double FF2 = (1/2 - FF1)*(-2);
1724 double arg = Vte/
RS;
1725 double arg1 = (Isat/arg - 3);
1726 double arg2 = FF1*arg1;
1728 double evd = exp(arg2);
1729 double lambWArg = Isat*evd/arg;
1735 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1738 Xyce::dout() <<
"Safe LambertW return" << std::endl;
1740 Xyce::dout() <<
"LambertW argument not in domain" << std::endl;
1742 Xyce::dout() <<
"Arithmetic problems with LambertW" << std::endl;
1745 Id = -Isat*FF1 + FF2*lambWReturn*arg;
1747 double GdFF1 = 1/(-3.0*Vte +
tBrkdwnV);
1748 double GdFF2 = 2 * GdFF1;
1749 double GdW = arg*lambWReturn*GdFF1*arg1/(1 + lambWReturn);
1750 Gd = -Isat*GdFF1 + GdFF2*arg*lambWReturn + FF2*GdW;
1754 Xyce::dout() <<
"lambWArg = " << lambWArg << std::endl;
1755 Xyce::dout() <<
"lambWError = " << lambWError << std::endl;
1756 Xyce::dout() <<
"lambWReturn= " << lambWReturn << std::endl;
1757 Xyce::dout() <<
"Id = " <<
Id << std::endl;
1758 Xyce::dout() <<
"Gd = " <<
Gd << std::endl;
1759 Xyce::dout() <<
"Using lambertwReverseBias" << std::endl;
1824 double evd = exp(arg1);
1825 double lambWArg = Isat*RS*evd/Vte;
1831 Id = -Vte*lambWReturn/
RS;
1832 Gd = lambWReturn / ((1 + lambWReturn)*RS);
1850 if(
M > 0.9 )
M = 0.9;
1853 if(
EG < 0.1 )
EG = 0.1;
1856 if(
FC > 0.95 )
FC = 0.95;
1863 double xfc = log(1.0-
FC);
1864 F2 = exp((1.0+
M)*xfc);
1865 F3 = 1.0-
FC*(1.0+
M);
1881 std::vector<Instance*>::iterator iter;
1885 for (iter=first; iter!=last; ++iter)
1887 (*iter)->processParams();
1905 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
1957 std::string bad_parameters;
1960 bad_parameters +=
" ISR";
1962 bad_parameters +=
" NR";
1964 bad_parameters +=
" IKF";
1966 bad_parameters +=
" NBV";
1968 bad_parameters +=
" IBVL";
1970 bad_parameters +=
" NBVL";
1972 bad_parameters +=
" TIKF";
1974 bad_parameters +=
" TBV1";
1976 bad_parameters +=
" TBV2";
1978 bad_parameters +=
" TRS1";
1980 bad_parameters +=
" TRS2";
1981 if (!bad_parameters.empty())
1983 UserError0(*
this) <<
"Illegal parameter(s) given for level 1 diode:" << bad_parameters;
2001 std::vector<Instance*>::iterator iterI;
2006 for (iterI = firstI; iterI != lastI; ++iterI)
2023 std::vector<Instance*>::const_iterator iter;
2029 os <<
" name model name Parameters" << std::endl;
2030 for (i=0, iter=first; iter!=last; ++iter, ++i)
2032 os <<
" " << i <<
": " << (*iter)->getName() <<
" ";
2036 os <<
"AREA = " << (*iter)->Area << std::endl;
2037 os <<
" IC = " << (*iter)->InitCond << std::endl;
2038 os <<
"TEMP = " << (*iter)->Temp << std::endl;
2039 os <<
" off = " << (*iter)->off << std::endl;
2065 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
2084 bool bsuccess =
true;
2091 bsuccess = bsuccess && btmp;
2105 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV)
2125 double Cd_Jdxp = -( di.
Cd ) * Vd_diff;
2126 double Gd_Jdxp = -( di.
Gd ) * Vd_diff;
2130 dFdxdVp[di.
li_Neg] += Gd_Jdxp;
2131 dFdxdVp[di.
li_Pri] -= Gd_Jdxp;
2135 dQdxdVp[di.
li_Neg] += Cd_Jdxp;
2136 dQdxdVp[di.
li_Pri] -= Cd_Jdxp;
2169 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
2213 .registerDevice(
"d", 1)
2214 .registerDevice(
"d", 2)
2215 .registerModelType(
"d", 1)
2216 .registerModelType(
"d", 2);
2234 template <
typename ScalarT>
2246 if( M > 0.9 ) M = 0.9;
2249 if( EG < 0.1 ) EG = 0.1;
2252 if( FC > 0.95 ) FC = 0.95;
2259 ScalarT xfc = log(1.0-FC);
2260 F2 = exp((1.0+M)*xfc);
2261 F3 = 1.0-FC*(1.0+
M);
2274 template <
typename ScalarT>
2277 const double & temp,
2295 const ScalarT & TNOM,
2297 const ScalarT & CJO,
2302 const ScalarT & XTI,
2304 const ScalarT & COND,
2305 const ScalarT & IRF,
2307 const ScalarT & IKF,
2308 const ScalarT & TIKF,
2309 const ScalarT & ISR,
2310 const ScalarT & IBV,
2313 const bool & BVGiven,
2315 const ScalarT & TBV1,
2316 const ScalarT & TBV2,
2317 const ScalarT & TRS1,
2318 const ScalarT & TRS2,
2325 ScalarT KoverQ =
static_cast<ScalarT
>(
CONSTKoverQ);
2327 ScalarT Eg0 =
static_cast<ScalarT
>(
CONSTEg0);
2329 ScalarT betaEg =
static_cast<ScalarT
>(
CONSTbetaEg);
2330 ScalarT boltz =
static_cast<ScalarT
>(
CONSTboltz);
2331 ScalarT Q =
static_cast<ScalarT
>(
CONSTQ);
2332 ScalarT Eg300 =
static_cast<ScalarT
>(
CONSTEg300);
2333 ScalarT root2 =
static_cast<ScalarT
>(
CONSTroot2);
2334 ScalarT e =
static_cast<ScalarT
>(
CONSTe);
2336 ScalarT vtnom = KoverQ * TNOM;
2338 ScalarT xfc = log( 1.0 - FC );
2340 if( temp != -999.0 ) Temp = temp;
2343 ScalarT vt = KoverQ * Temp;
2344 ScalarT fact2 = Temp / REFTEMP;
2345 ScalarT egfet = Eg0 - (alphaEg*Temp*Temp)/(Temp+betaEg);
2346 ScalarT arg = -egfet/(2.0*boltz*Temp) +
2347 Eg300/(boltz*(REFTEMP+REFTEMP));
2348 ScalarT pbfact = -2.0*vt*(1.5*log(fact2)+Q*arg);
2349 ScalarT egfet1 = Eg0 - (alphaEg*TNOM*TNOM)/
2351 ScalarT arg1 = -egfet1/(2.0*boltz*TNOM) +
2352 Eg300/(2.0*boltz*REFTEMP);
2353 ScalarT fact1 = TNOM/REFTEMP;
2354 ScalarT pbfact1 = -2.0*vtnom*(1.5*log(fact1)+Q*arg1);
2356 ScalarT pbo = (VJ-pbfact1)/fact1;
2357 ScalarT gmaold = (VJ-pbo)/pbo;
2360 (1.0+M*(4.0e-4*(TNOM-REFTEMP) -gmaold));
2362 tJctPot = pbfact+fact2*pbo;
2364 ScalarT gmanew = (tJctPot-pbo)/pbo;
2366 tJctCap *= 1.0 + M*(4.0e-4*(Temp-REFTEMP)-gmanew);
2368 tSatCur = IS*exp(((Temp/TNOM)-1.0)*
2370 XTI/N*log(Temp/TNOM));
2372 tF1 = tJctPot*(1.0-exp((1.0-M)*xfc))/(1.0-M);
2374 tDepCap = FC*tJctPot;
2379 tVcrit = vte*log(vte/(root2*tSatCur));
2382 tIRF = IRF*pow(fact2,1.6);
2387 tSatCurR = ISR*exp((Temp/TNOM - 1.0)*
2389 XTI/NR*log(Temp/TNOM));
2391 tIKF = IKF*(1 + TIKF*(Temp-TNOM));
2393 tempBV = BV*(1 + (Temp-TNOM)*
2394 ( TBV1 + TBV2*(Temp-TNOM) ));
2396 tRS = RS*(1 + (Temp-TNOM)*
2397 ( TRS1 + TRS2*(Temp-TNOM) ));
2400 if(tRS != 0.0) tCOND = 1.0/tRS;
2402 tJctPot = (VJ - egfet1)*fact2 - 3*vt*log(fact2) + egfet;
2404 tJctCap = CJO/(1.0 +
2405 M*(4.0e-4*(Temp-TNOM) + (1-tJctPot/VJ)));
2412 #ifdef Xyce_BREAKDOWN_ORIGINAL
2430 double reltol = 1.0e-3;
2433 double IRfactor = tIRF;
2436 if( cbv < IRfactor*tSatCur*tempBV/vt )
2438 cbv = IRfactor*tSatCur*tempBV/vt;
2443 double tol = reltol*cbv;
2444 xbv = tempBV-vt*log(1.0+cbv/(IRfactor*tSatCur));
2445 for(
int i = 0; i < 25; ++i )
2447 xbv = tempBV-vt*log(cbv/(IRfactor*tSatCur)+1.0-xbv/vt);
2448 xcbv = IRfactor*tSatCur*(exp((tempBV-xbv)/vt)-1.0+xbv/vt);
2449 if(fabs(xcbv-cbv)<=tol)
break;
2457 ScalarT IRFactor=tIRF;
2461 ScalarT cthreshhigh;
2463 const int ITER_COUNT_MAX=8;
2466 ScalarT arg1=3.0*vte/(e*tempBV);
2467 arg1=arg1*arg1*arg1;
2468 cthreshlow=tSatCur*IRFactor*(1-arg1);
2469 cthreshhigh=tSatCur*IRFactor*(1-1.0/(e*e*e)) *
2470 exp(-1.0*(3.0*vte-tempBV)/vte);
2472 if(cbv >= cthreshhigh)
2478 else if(cbv <= cthreshlow)
2491 for(iter_count=0; iter_count < ITER_COUNT_MAX; iter_count++)
2493 arg2=3.0*vte/(e*xbv);
2494 arg2=arg2*arg2*arg2;
2495 xbv=tempBV-vte*log(cbv/(tSatCur*IRFactor))+vte *
2524 template <
typename ScalarT>
2529 const ScalarT & Vpp,
2534 const ScalarT & Temp,
2535 const ScalarT & tJctCap,
2536 const ScalarT & tJctPot,
2537 const ScalarT & tDepCap,
2538 const ScalarT & tF1,
2539 const ScalarT & tSatCur,
2540 const ScalarT & tSatCurR,
2541 const ScalarT & tVcrit,
2542 const ScalarT & tRS,
2543 const ScalarT & tCOND,
2544 const ScalarT & tIRF,
2545 const ScalarT & tIKF,
2546 const ScalarT & tBrkdwnV,
2549 const ScalarT & Area,
2550 const int & lambertWFlag,
2551 const double & gmin,
2577 bool bsuccess =
true;
2592 ScalarT Isat = tSatCur * Area;
2593 ScalarT IsatR = tSatCurR * Area;
2594 ScalarT KoverQ =
static_cast<ScalarT
>(
CONSTKoverQ);
2595 ScalarT
Vt = KoverQ * Temp;
2596 ScalarT Vte = N *
Vt;
2597 ScalarT VteR = NR *
Vt;
2599 Gspr = tCOND * Area;
2609 if(Vd >= -3.0 * Vte) IRfactor = 1.0;
2610 else IRfactor = tIRF;
2613 if (Vd >= -3.0 * Vte)
2615 ScalarT arg1 = Vd / Vte;
2617 ScalarT evd = exp(arg1);
2619 Id = Isat * (evd - 1.0) + gmin * Vd;
2620 Gd = Isat * evd / Vte + gmin;
2623 else if(!tBrkdwnV || (Vd >= -tBrkdwnV))
2625 ScalarT arg = 3.0 * Vte / (Vd *
CONSTe);
2626 arg = arg * arg * arg;
2627 Id = -Isat * (1.0 + arg) + gmin * Vd;
2628 Gd = Isat * 3.0 * arg / Vd + gmin;
2633 ScalarT arg1 = -(tBrkdwnV + Vd) / Vte;
2635 ScalarT evrev = exp(arg1);
2637 #ifdef Xyce_BREAKDOWN_ORIGINAL
2638 Id = -Isat * evrev + gmin * Vd;
2639 Gd = Isat * evrev / Vte + gmin;
2643 ScalarT arg2=3.0*Vte/(
CONSTe*tBrkdwnV);
2644 arg2=arg2*arg2*arg2;
2645 ScalarT Isat_tBrkdwnV=Isat*(1-arg2);
2646 Id = -Isat_tBrkdwnV * evrev + gmin * Vd;
2647 Gd = Isat_tBrkdwnV * evrev / Vte + gmin;
2657 if(Vd >= -3.0*Vte) IRfactor=1.0;
2658 else IRfactor = tIRF;
2661 if (Vd >= -3.0 * Vte)
2663 ScalarT arg1 = Vd / Vte;
2665 ScalarT evd = exp(arg1);
2666 Inorm = Isat * (evd - 1.0) + gmin * Vd;
2667 Gd1 = Isat*evd/Vte + gmin;
2672 Irec = IsatR * (evd - 1.0);
2673 Gd2 = IsatR*evd/VteR;
2679 Khi = sqrt(tIKF/(tIKF+Inorm));
2680 DKhi = 0.5*Khi*Gd1/(tIKF+Inorm);
2686 Kgen = sqrt( pow(((1-Vd/tJctPot)*(1-Vd/tJctPot) + 0.005),M) );
2687 DKgen = -M*(1-Vd/tJctPot)/(tJctPot*Kgen);
2690 Id = Inorm*Khi + Irec*Kgen;
2691 Gd = Gd1*Khi + Inorm*DKhi + Gd2*Kgen + Irec*DKgen;
2694 else if(!tBrkdwnV || (Vd >= -tBrkdwnV))
2696 ScalarT arg = 3.0 * Vte / (Vd *
CONSTe);
2697 arg = arg * arg * arg;
2698 Id = -Isat * (1.0 + arg) + gmin * Vd;
2699 Gd = Isat * 3.0 * arg / Vd + gmin;
2704 ScalarT arg1 = -(tBrkdwnV + Vd) / Vte;
2706 ScalarT evrev = exp(arg1);
2708 #ifdef Xyce_BREAKDOWN_ORIGINAL
2709 Id = -Isat * evrev + gmin * Vd;
2710 Gd = Isat * evrev / Vte + gmin;
2714 ScalarT arg2=3.0*Vte/(
CONSTe*tBrkdwnV);
2715 arg2=arg2*arg2*arg2;
2716 ScalarT Isat_tBrkdwnV=Isat*(1-arg2);
2717 Id = -Isat_tBrkdwnV * evrev + gmin * Vd;
2718 Gd = Isat_tBrkdwnV * evrev / Vte + gmin;
2729 ScalarT Czero = tJctCap * Area;
2733 ScalarT arg = 1.0 - Vc / tJctPot;
2734 ScalarT arg1 = -M * log(arg);
2736 ScalarT sarg = exp(arg1);
2739 Qd = TT * Id + tJctPot * Czero * (1.0 - arg * sarg) / (1.0 - M);
2740 Cd = TT * Gd + Czero * sarg;
2744 ScalarT Czof2 = Czero / F2;
2745 ScalarT MotJctPot = M / tJctPot;
2748 Qd = TT * Id + Czero * tF1 +
2749 Czof2 * (F3 * (Vc - tDepCap) + (0.5 * MotJctPot) *
2750 (Vc * Vc - tDepCap * tDepCap));
2752 Cd = TT * Gd + Czof2 * (F3 + MotJctPot * Vc);
2772 template <
typename ScalarT>
2779 const ScalarT & Vpp,
2783 const ScalarT & tVcrit,
2784 const ScalarT & Vte,
2792 const ScalarT & currVd_old,
2793 const ScalarT & nextVd_old,
2795 const double InitCond,
2796 const bool InitCondGiven,
2800 const bool dotICapplies,
2803 const int & newtonIter,
2804 const bool initJctFlag,
2805 const bool voltageLimiterFlag,
2806 const bool dcopFlag,
2807 const bool locaEnabledFlag
2817 if (newtonIter == 0)
2819 if (initJctFlag && voltageLimiterFlag && !dotICapplies)
2842 if (!(dcopFlag)|| (locaEnabledFlag && dcopFlag))
2844 Vd_old = currVd_old;
2849 Vd_old = nextVd_old;
2854 if (voltageLimiterFlag)
2858 if (newtonIter >= 0)
2861 if (BVGiven && (Vd <
Xycemin(0.0, -BV + 10.0 * Vte)))
2863 double Vdtmp = -( BV + Vd );
2864 Vdtmp = devSupport.
pnjlim(Vdtmp, -(Vd_old+BV), Vte, tVcrit, &ichk);
2868 Vd = devSupport.
pnjlim(Vd, Vd_old, Vte, tVcrit, &ichk);
2870 if (ichk) origFlag =
false;
2887 const std::string &name,
2888 std::vector<double> & dfdp,
2889 std::vector<double> & dqdp,
2890 std::vector<double> & dbdp,
2891 std::vector<int> & Findices,
2892 std::vector<int> & Qindices,
2893 std::vector<int> & Bindices
2897 const Model & mod = *(
dynamic_cast<const Model *
> (e1));
2901 dfdp.resize(3*sizeInstance);
2902 dqdp.resize(3*sizeInstance);
2903 Findices.resize(3*sizeInstance);
2904 Qindices.resize(3*sizeInstance);
2939 std::string paramName = ExtendedString( name ).toUpper();
2941 if (paramName==
"VJ") { VJ.diff(0,1); }
2942 else if (paramName==
"CJO") { CJO.diff(0,1); }
2943 else if (paramName==
"CJ") { CJO.diff(0,1); }
2944 else if (paramName==
"CJ0") { CJO.diff(0,1); }
2945 else if (paramName==
"M") { M.diff(0,1); }
2946 else if (paramName==
"N") { N.diff(0,1); }
2947 else if (paramName==
"IS") { IS.diff(0,1); }
2948 else if (paramName==
"JS") { IS.diff(0,1); }
2949 else if (paramName==
"EG") { EG.diff(0,1); }
2950 else if (paramName==
"XTI") { XTI.diff(0,1); }
2951 else if (paramName==
"RS") { RS.diff(0,1); }
2952 else if (paramName==
"COND") { COND.diff(0,1); }
2953 else if (paramName==
"IRF") { IRF.diff(0,1); }
2954 else if (paramName==
"NR") { NR.diff(0,1); }
2955 else if (paramName==
"IKF") { IKF.diff(0,1); }
2956 else if (paramName==
"TIKF") { TIKF.diff(0,1); }
2957 else if (paramName==
"ISR") { ISR.diff(0,1); }
2958 else if (paramName==
"IBV") { IBV.diff(0,1); }
2959 else if (paramName==
"IBVL") { IBVL.diff(0,1); }
2960 else if (paramName==
"NBV") { NBV.diff(0,1); }
2961 else if (paramName==
"NBVL") { NBVL.diff(0,1); }
2962 else if (paramName==
"BV") { BV.diff(0,1); }
2963 else if (paramName==
"VB") { BV.diff(0,1); }
2964 else if (paramName==
"TT") { TT.diff(0,1); }
2965 else if (paramName==
"FC") { FC.diff(0,1); }
2966 else if (paramName==
"KF") { KF.diff(0,1); }
2967 else if (paramName==
"AF") { AF.diff(0,1); }
2968 else if (paramName==
"TNOM") { TNOM.diff(0,1); }
2970 else if (paramName==
"TBV1") { TBV1.diff(0,1); }
2971 else if (paramName==
"TBV2") { TBV2.diff(0,1); }
2972 else if (paramName==
"TRS1") { TRS1.diff(0,1); }
2973 else if (paramName==
"TRS2") { TRS2.diff(0,1); }
2979 for (std::vector<Instance *>::const_iterator in = mod.
instanceContainer.begin();
2982 double * solVec = (*in)->extData.nextSolVectorRawPtr;
2984 fadType Vpp = solVec[(*in)->li_Pri];
2985 fadType Vn = solVec[(*in)->li_Neg];
2986 fadType Vp = solVec[(*in)->li_Pos];
3009 Temp, tJctCap, tJctPot, tDepCap, tF1, tSatCur, tSatCurR,
3010 tVcrit, tRS, tCOND, tIRF, tIKF, tBrkdwnV,
3011 TNOM, VJ, CJO, M, N, IS, EG, XTI, RS, COND, IRF,
3012 NR, IKF, TIKF, ISR, IBV, BV,
3014 TBV1, TBV2, TRS1, TRS2, FC,
3028 Temp, tJctCap, tJctPot, tDepCap, tF1,
3029 tSatCur, tSatCurR, tVcrit, tRS, tCOND,
3030 tIRF, tIKF, tBrkdwnV,
3032 Area, (*in)->lambertWFlag, (*in)->getDeviceOptions().gmin,
3034 M, BV, IBV, NBV, IBVL, NBVL, N, NR, TT, F2, F3,
3037 Id, Gd, Qd, Cd, Gspr
3044 fadType Ir = Gspr * (Vp - Vpp);
3045 dfdp[iPos] -= -Ir.dx(0);
3046 dfdp[iNeg] -= Id.dx(0);
3047 dfdp[iPri] -= (-Id.dx(0) + Ir.dx(0));
3050 dqdp[iNeg] -= Qd.dx(0);
3051 dqdp[iPri] -= -Qd.dx(0);
3053 Findices[iPos] = (*in)->li_Pos;
3054 Findices[iNeg] = (*in)->li_Neg;
3055 Findices[iPri] = (*in)->li_Pri;
3057 Qindices[iPos] = (*in)->li_Pos;
3058 Qindices[iNeg] = (*in)->li_Neg;
3059 Qindices[iPri] = (*in)->li_Pri;
const InstanceName & getName() const
static std::vector< int > jacMap
bool updateIntermediateVars()
double * qPriEquPosNodePtr
double * nextLeadCurrQCompRawPtr
double * currStoVectorRawPtr
bool updateDependentParameters()
static std::vector< int > jacMap_RS
const DeviceOptions & deviceOptions_
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
double * daeQVectorRawPtr
bool lambertWBreakdownCurrent(double Isat, double Vte, double RS)
double * qPriEquNegNodePtr
double * fPriEquPriNodePtr
double * fPosEquPriNodePtr
double * dFdxdVpVectorRawPtr
static std::vector< std::vector< int > > jacStamp_RS
double * fPriEquNegNodePtr
double pnjlim(double vnew, double vold, double vt, double vcrit, int *icheck)
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.
void addInternalNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
double * qNegEquNegNodePtr
const std::string & getEncodedName() const
Return the instance name encoded as: [s:]*xname [s:]*Ytype!name [s:]*Utype!name!count.
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
Sacado::Fad::SFad< double, 1 > fadType
void setNumStoreVars(int num_store_vars)
void addBranchDataNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
double * qPriEquPriNodePtr
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.
std::vector< int > li_Pos
Parameter is subject to being set to minimum junction capacitance.
RetScalarT Vt(Arg1ScalarT U, Arg2ScalarT Ud)
virtual void registerJacLIDs(const JacobianStamp &jacLIDVec)
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
Parameter is subject to being set to minimum lead resistance.
bool processParams(ScalarT &M, ScalarT &EG, ScalarT &FC, const ScalarT &RS, ScalarT &COND, ScalarT &F2, ScalarT &F3)
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
double * nextJunctionVCompRawPtr
double tnom
nominal temperature for device params.
double * fNegEquNegNodePtr
double * storeLeadCurrQCompRawPtr
int getNumStoreVars() const
InstanceVector::const_iterator getInstanceBegin() const
Returns an iterator to the beginning of the vector of all instances created for this device...
static void loadModelParameters(ParametricData< Model > &model_parameters)
std::vector< Param > params
Parameters from the line.
std::vector< double > noiseDens
double * qNegEquPriNodePtr
void registerBranchDataLIDs(const std::vector< int > &branchLIDVecRef)
In addition to state vector, Xyce maintains a separate datastructure called a "branch data" vector...
std::vector< std::string > noiseNames
std::vector< Instance * > instanceContainer
void setParams(const std::vector< Param > ¶ms)
const std::string & getName() const
double * daeFVectorRawPtr
static diodeSensitivity diodeSens
double * fPriEquPosNodePtr
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
bool updateTemperature(const double &temp=-999.0)
void getNoiseSources(Xyce::Analysis::NoiseData &noiseData)
const DeviceOptions & getDeviceOptions() const
double * nextStoVectorRawPtr
bool processInstanceParams()
processInstanceParams
int numBranchDataVarsIfAllocated
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
static std::vector< std::vector< int > > jacStamp
Linear::Matrix * dFdxMatrixPtr
const DeviceOptions & getDeviceOptions() const
Returns the device options given during device construction.
The Device class is an interface for device implementations.
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
bool updatePrimaryState()
bool processParams()
processParams
void addStoreNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
const std::vector< std::vector< int > > & jacobianStamp() const
bool lambertWLinearReverseBias(double Isat, double Vte, double RS)
virtual std::ostream & printOutInstances(std::ostream &os) const
const SolverState & solverState_
void setupNoiseSources(Xyce::Analysis::NoiseData &noiseData)
double * dQdxdVpVectorRawPtr
Class Configuration contains device configuration data.
static std::vector< std::vector< int > > jacMap2_RS
std::vector< double > lnNoiseDens
bool updateIntermediateVars(const ScalarT &Vp, const ScalarT &Vpp, const ScalarT &Vn, const ScalarT &Vd, const ScalarT &Temp, const ScalarT &tJctCap, const ScalarT &tJctPot, const ScalarT &tDepCap, const ScalarT &tF1, const ScalarT &tSatCur, const ScalarT &tSatCurR, const ScalarT &tVcrit, const ScalarT &tRS, const ScalarT &tCOND, const ScalarT &tIRF, const ScalarT &tIKF, const ScalarT &tBrkdwnV, const ScalarT &Area, const int &lambertWFlag, const double &gmin, const ScalarT M, const ScalarT BV, const ScalarT IBV, const ScalarT NBV, const ScalarT IBVL, const ScalarT NBVL, const ScalarT N, const ScalarT NR, const ScalarT TT, const ScalarT F2, const ScalarT F3, const int level, ScalarT &Id, ScalarT &Gd, ScalarT &Qd, ScalarT &Cd, ScalarT &Gspr)
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
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)
double * qPosEquPriNodePtr
const SolverState & getSolverState() const
double * nextLeadCurrFCompRawPtr
void lambertw(double x, double &w, int &ierr, double &xi)
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Populates the device's Jacobian object with these pointers.
void setNumBranchDataVars(int num_branch_data_vars)
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
#define Xyce_NONPOINTER_MATRIX_LOAD
void noiseSupport(double &noise, double &lnNoise, const int type, const double param, const double temp)
double gmin
minimum allowed conductance.
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
static std::vector< std::vector< int > > jacMap2
double * qPosEquPosNodePtr
const ExternData & extData
ModelBlock represents a .MODEL line from the netlist.
bool lambertWCurrent(double Isat, double Vte, double RS)
Manages parameter binding for class C.
double * fNegEquPriNodePtr
InstanceBlock represent a device instance line from the netlist.
Util::Param temp
operating temperature of ckt.
std::vector< Param > params
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
Linear::Matrix * dQdxMatrixPtr
bool applyLimiters(DeviceSupport &devSupport, const ScalarT &Vp, const ScalarT &Vpp, const ScalarT &Vn, const ScalarT &tVcrit, ScalarT &Vd, ScalarT &Vd_orig, ScalarT &Vd_old, const ScalarT &currVd_old, const ScalarT &nextVd_old, const double InitCond, const bool InitCondGiven, const bool BVGiven, const int off, bool &origFlag, const bool dotICapplies, const int &newtonIter, const bool initJctFlag, const bool voltageLimiterFlag, const bool dcopFlag, const bool locaEnabledFlag)
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
int li_branch_data
Index for Lead Current and junction voltage (for power calculations)
ScalarT Xycemin(ScalarT f1, ScalarT f2)
Linear::Vector * flagSolVectorPtr
int getNumNoiseSources() const
double * fPosEquPosNodePtr
int getNumBranchDataVars() const
void setModParams(const std::vector< Param > ¶ms)
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.
bool updateTemperature( ScalarT &Temp, ScalarT &tJctCap, ScalarT &tJctPot, ScalarT &tDepCap, ScalarT &tF1, ScalarT &tSatCur, ScalarT &tSatCurR, ScalarT &tVcrit, ScalarT &tRS, ScalarT &tCOND, ScalarT &tIRF, ScalarT &tIKF, ScalarT &tBrkdwnV, const ScalarT &TNOM, const ScalarT &VJ, const ScalarT &CJO, const ScalarT &M, const ScalarT &N, const ScalarT &IS, const ScalarT &EG, const ScalarT &XTI, const ScalarT &RS, const ScalarT &COND, const ScalarT &IRF, const ScalarT &NR, const ScalarT &IKF, const ScalarT &TIKF, const ScalarT &ISR, const ScalarT &IBV, const ScalarT &BV, const bool &BVGiven, const ScalarT &TBV1, const ScalarT &TBV2, const ScalarT &TRS1, const ScalarT &TRS2, const ScalarT &FC, const int level)
double * nextSolVectorRawPtr
int numLeadCurrentStoreVars
void registerStoreLIDs(const std::vector< int > &stoLIDVecRef)