48 #include <Xyce_config.h>
55 #ifndef Xyce_USE_BSIM3_CONST
65 #include <N_ERH_ErrorMgr.h>
69 #include <N_LAS_Matrix.h>
70 #include <N_LAS_Vector.h>
71 #include <N_UTL_FeatureTest.h>
72 #include <N_UTL_Math.h>
78 #ifdef Xyce_USE_BSIM3_CONST
80 #define CONSTMAX_EXP 5.834617425e+14
81 #define CONSTMIN_EXP 1.713908431e-15
83 #define CONSTEXP_THRESHOLD 34.0
84 #define CONSTEPSOX 3.453133e-11
85 #define CONSTEPSSI 1.03594e-10
87 #define CONSTQ 1.60219e-19
89 #define CONSTDELTA_1 0.02
90 #define CONSTDELTA_2 0.02
91 #define CONSTDELTA_3 0.02
92 #define CONSTDELTA_4 0.02
94 #define CONSTroot2 sqrt(2.0)
95 #define CONSTCtoK (273.15)
96 #define CONSTREFTEMP (300.15)
98 #define CONSTboltz 1.3806226e-23
99 #define CONSTKoverQ 8.617087e-5 // Kb / q where q = 1.60219e-19
101 #define CONSTvt0 (CONSTboltz * (27.0 +CONSTCtoK)/CONSTQ)
103 #define CONSTEg300 (1.1150877) // band gap for Si at T=300.15K (room temp)
104 #define CONSTEg0 (1.16) // band gap for Si at T=0K. (eV)
105 #define CONSTalphaEg (7.02e-4) // (eV/K)
106 #define CONSTbetaEg (1108.0) // (K)
108 #define CONSTNi0 (1.45e10) // carrier concentration at room temp.
118 namespace MOSFET_B3 {
126 .setDescription(
"Device temperature");
129 .setOriginalValueStored(
true)
132 .setDescription(
"Channel length");
135 .setOriginalValueStored(
true)
138 .setDescription(
"Channel width");
143 .setDescription(
"Drain diffusion area");
148 .setDescription(
"Source diffusion area");
153 .setDescription(
"Multiplier for RSH to yield parasitic resistance of drain");
158 .setDescription(
"Multiplier for RSH to yield parasitic resistance of source");
163 .setDescription(
"Drain diffusion perimeter");
168 .setDescription(
"Source diffusion perimeter");
173 .setDescription(
"Multiplier for M devices connected in parallel");
179 .setDescription(
"Initial condition on Vds");
185 .setDescription(
"Initial condition on Vgs");
191 .setDescription(
"Initial condition on Vbs");
197 .setDescription(
"Flag for NQS model");
202 .setDescription(
"Initial condition of no voltage drops accross device");
212 .setOriginalValueStored(
true)
215 .setDescription(
"Gate oxide thickness");
220 .setDescription(
"Gate oxide thickness used in extraction");
225 .setDescription(
"Drain/source to channel coupling capacitance");
230 .setDescription(
"Body-bias sensitivity of CDSC");
235 .setDescription(
"Drain-bias sensitivity of CDSC");
240 .setDescription(
"Interface trap capacitance");
245 .setDescription(
"Subthreshold swing factor");
250 .setDescription(
"Junction depth");
255 .setDescription(
"Saturation velocity at temp = TNOM");
260 .setDescription(
"Temperature coefficient for saturation velocity");
265 .setDescription(
"Bulk charge effect coefficient for channel length");
270 .setDescription(
"Gate-bias coefficient of abulk");
275 .setDescription(
"First non-saturation effect parameter");
280 .setDescription(
"Second non-saturation factor");
285 .setDescription(
"Body-bias coefficient of bulk charge effect");
292 .setDescription(
"Substrate doping density");
298 .setDescription(
"Channel doping concentration");
303 .setDescription(
"Poly gate doping concentration");
309 .setDescription(
"Body effect coefficient near the surface");
315 .setDescription(
"Body effect coefficient in the bulk");
321 .setDescription(
"Vbs at which the depetion region = XT");
327 .setDescription(
"Maximum applied body-bias in threshold voltage calculation");
333 .setDescription(
"Doping depth");
339 .setDescription(
"First-order body effect coefficient");
344 .setDescription(
"Themperature coefficient for threshold voltage");
349 .setDescription(
"Channel length dependence of the temerature coefficient for the threshold voltage");
354 .setDescription(
"Body-bias coefficient fo the threshold voltage temperature effect");
360 .setDescription(
"second-order body effect coefficient");
365 .setDescription(
"Narrow width coefficient");
370 .setDescription(
"Body effect coefficient of K3");
375 .setDescription(
"Narrow-width paameter");
380 .setDescription(
"Lateral non-uniform doping parameter");
385 .setDescription(
"First coefficient of short-channel effect effect on threshold voltage");
390 .setDescription(
"Second coefficient of short-channel effect effect on threshold voltage");
395 .setDescription(
"Body-bias coefficient of short-channel effect effect on threshold voltage");
400 .setDescription(
"First coefficient of narrow-width effect effect on threshold voltage for small channel length");
405 .setDescription(
"Second coefficient of narrow-width effect effect on threshold voltage for small channel length");
410 .setDescription(
"Body-bias coefficient of narrow-width effect effect on threshold voltage for small channel length");
415 .setDescription(
"L-depedance Coefficient of the DIBL correction parameter in Rout");
420 .setDescription(
"DIBL coefficient exponent in subthreshhold region");
426 .setDescription(
"Threshold voltage at Vbs = 0 for large L");
431 .setDescription(
"First-order mobility degradation coefficient");
436 .setDescription(
"Temperature coefficient for UA");
441 .setDescription(
"First-order mobility degradation coefficient");
446 .setDescription(
"Temperature coefficient for UB");
451 .setDescription(
"Body effect of mobility degridation coefficient");
456 .setDescription(
"Temperature coefficient for UC");
461 .setDescription(
"Surface mobility");
466 .setDescription(
"Mobility temerature exponent");
471 .setDescription(
"Offset voltage in the subthreshold region at large W and L");
476 .setDescription(
"Parasitic resistance per unit width");
481 .setDescription(
"Gate-bias effect coefficient of RDSW");
486 .setDescription(
"Body effect coefficient of RDSW");
491 .setDescription(
"Temerature coefficient for RDSW");
496 .setDescription(
"DIBL coefficient in subthreshold region");
501 .setDescription(
"Body-bias coefficient for the subthreshold DIBL effect");
506 .setDescription(
"Channel length modulation parameter");
511 .setDescription(
"First output resistance DIBL effect correction parameter");
516 .setDescription(
"Second output resistance DIBL effect correction parameter");
521 .setDescription(
"Body effect coefficient of DIBL correction parameter");
526 .setDescription(
"First substrate current body effect parameter");
531 .setDescription(
"second substrate current body effect parameter");
536 .setDescription(
"Gate dependence of early voltage");
541 .setDescription(
"Effective Vds parameter");
546 .setDescription(
"Width offset from Weff for Rds Calculation");
551 .setDescription(
"Coefficient of gate depedence of Weff");
556 .setDescription(
"Coefficient of substrate body bias dependence of Weff");
561 .setDescription(
"Bulk charge effect coefficient for channel width");
566 .setDescription(
"Bulk charge effect offset");
571 .setDescription(
"First parameter of impact-ionization current");
576 .setDescription(
"Isub parameter for length scaling");
581 .setDescription(
"Second parameter of impact-ionization current");
586 .setDescription(
"Diode limiting current");
592 .setDescription(
"Flat-band voltage");
597 .setDescription(
"Elmore constant of the channel");
602 .setDescription(
"Light-doped source-gate region overlap capacitance");
607 .setDescription(
"Light-doped drain-gate region overlap capacitance");
612 .setDescription(
"Coefficient for lightly doped region overlap capacitance fireing field capacitance");
617 .setDescription(
"Firing field capacitance");
622 .setDescription(
"Flat-band voltage parameter (for CAPMOD = 0 only)");
627 .setDescription(
"Constant term for short-channel model");
632 .setDescription(
"Exponetial term for the short-channel model");
637 .setDescription(
"Width offset fitting parameter from C-V");
642 .setDescription(
"Length offset fitting parameter from C-V");
647 .setDescription(
"CV parameter in Vgsteff,CV for weak to strong inversion");
652 .setDescription(
"CV parameter in Vgsteff,CV for weak to strong inversion");
657 .setDescription(
"Exponetial coefficient for charge thickness in capmod = 3 for accumulation and depletion regions");
662 .setDescription(
"Coefficient for the gate-bias dependent surface potential");
667 .setDescription(
"Temperature coefficient of Cj");
672 .setDescription(
"Temperature coefficient of Cswj");
677 .setDescription(
"Temperature coefficient of Cjswg");
682 .setDescription(
"Temperature coefficient of Pb");
687 .setDescription(
"Temperature coefficient of Pbsw");
692 .setDescription(
"Temperature coefficient of Pbswg");
697 .setDescription(
"Length dependence of cdsc");
702 .setDescription(
"Length dependence of cdscb");
707 .setDescription(
"Length dependence of cdscd");
712 .setDescription(
"Length dependence of cit");
717 .setDescription(
"Length dependence of nfactor");
722 .setDescription(
"Length dependence of xj");
727 .setDescription(
"Length dependence of vsat");
732 .setDescription(
"Length dependence of at");
737 .setDescription(
"Length dependence of a0");
742 .setDescription(
"Length dependence of ags");
747 .setDescription(
"Length dependence of a1");
752 .setDescription(
"Length dependence of a2");
757 .setDescription(
"Length dependence of keta");
762 .setDescription(
"Length dependence of nsub");
767 .setDescription(
"Length dependence of nch");
772 .setDescription(
"Length dependence of ngate");
777 .setDescription(
"Length dependence of gamma1");
782 .setDescription(
"Length dependence of gamma2");
787 .setDescription(
"Length dependence of VBX");
792 .setDescription(
"Length dependence of VBM");
797 .setDescription(
"Length dependence of XT");
802 .setDescription(
"Length dependence of K1");
807 .setDescription(
"Length dependence of KT1");
812 .setDescription(
"Length dependence of KT1L");
817 .setDescription(
"Length dependence of KT2");
822 .setDescription(
"Length dependence of K2");
827 .setDescription(
"Length dependence of K3");
832 .setDescription(
"Length dependence of K3B");
837 .setDescription(
"Length dependence of W0");
842 .setDescription(
"Length dependence of NLX");
847 .setDescription(
"Length dependence of DVT0");
852 .setDescription(
"Length dependence of DVT1");
857 .setDescription(
"Length dependence of DVT2");
862 .setDescription(
"Length dependence of DVT0W");
867 .setDescription(
"Length dependence of DVT1W");
872 .setDescription(
"Length dependence of DVT2W");
877 .setDescription(
"Length dependence of DROUT");
882 .setDescription(
"Length dependence of LDSUB");
887 .setDescription(
"Length dependence of VT0");
892 .setDescription(
"Length dependence of UA");
897 .setDescription(
"Length dependence of UA1");
902 .setDescription(
"Length dependence of UB");
907 .setDescription(
"Length dependence of UB1");
912 .setDescription(
"Length dependence of UC");
917 .setDescription(
"Length dependence of UC1");
922 .setDescription(
"Length dependence of U0");
927 .setDescription(
"Length dependence of UTE");
932 .setDescription(
"Length dependence of VOFF");
937 .setDescription(
"Length dependence of RDSW");
942 .setDescription(
"Length dependence of PRWG");
947 .setDescription(
"Length dependence of PRWB");
952 .setDescription(
"Length dependence of PRT");
957 .setDescription(
"Length dependence of ETA0");
962 .setDescription(
"Length dependence of ETAB");
967 .setDescription(
"Length dependence of PCLM");
972 .setDescription(
"Length dependence of PDIBLC1");
977 .setDescription(
"Length dependence of PDIBLC2");
982 .setDescription(
"Length dependence of PDIBLCB");
987 .setDescription(
"Length dependence of PSCBE1");
992 .setDescription(
"Length dependence of PSCBE2");
997 .setDescription(
"Length dependence of PVAG");
1002 .setDescription(
"Length dependence of DELTA");
1007 .setDescription(
"Length dependence of WR");
1012 .setDescription(
"Length dependence of DWG");
1017 .setDescription(
"Length dependence of DWB");
1022 .setDescription(
"Length dependence of B0");
1027 .setDescription(
"Length dependence of B1");
1032 .setDescription(
"Length dependence of ALPHA0");
1037 .setDescription(
"Length dependence of ALPHA1");
1042 .setDescription(
"Length dependence of BETA0");
1047 .setDescription(
"Length dependence of VFB");
1052 .setDescription(
"Length dependence of ELM");
1057 .setDescription(
"Length dependence of CGSL");
1062 .setDescription(
"Length dependence of CGDL");
1067 .setDescription(
"Length dependence of CKAPPA");
1072 .setDescription(
"Length dependence of CF");
1077 .setDescription(
"Length dependence of CLC");
1082 .setDescription(
"Length dependence of CLE");
1087 .setDescription(
"Length dependence of VFBCV");
1092 .setDescription(
"Length dependence of NOFF");
1097 .setDescription(
"Length dependence of VOFFCV");
1102 .setDescription(
"Length dependence of ACDE");
1107 .setDescription(
"Length dependence of MOIN");
1112 .setDescription(
"Width dependence of CDSC");
1117 .setDescription(
"Width dependence of CDSCB");
1122 .setDescription(
"Width dependence of CDSCD");
1127 .setDescription(
"Width dependence of CIT");
1132 .setDescription(
"Width dependence of NFACTOR");
1137 .setDescription(
"Width dependence of XJ");
1142 .setDescription(
"Width dependence of VSAT");
1147 .setDescription(
"Width dependence of AT");
1152 .setDescription(
"Width dependence of A0");
1157 .setDescription(
"Width dependence of AGS");
1162 .setDescription(
"Width dependence of A1");
1167 .setDescription(
"Width dependence of A2");
1172 .setDescription(
"Width dependence of KETA");
1177 .setDescription(
"Width dependence of NSUB");
1182 .setDescription(
"Width dependence of NCH");
1187 .setDescription(
"Width dependence of NGATE");
1192 .setDescription(
"Width dependence of GAMMA1");
1197 .setDescription(
"Width dependence of GAMMA2");
1202 .setDescription(
"Width dependence of VBX");
1207 .setDescription(
"Width dependence of VBM");
1212 .setDescription(
"Width dependence of XT");
1217 .setDescription(
"Width dependence of K1");
1222 .setDescription(
"Width dependence of KT1");
1227 .setDescription(
"Width dependence of KT1L");
1232 .setDescription(
"Width dependence of KT2");
1237 .setDescription(
"Width dependence of K2");
1242 .setDescription(
"Width dependence of K3");
1247 .setDescription(
"Width dependence of K3B");
1252 .setDescription(
"Width dependence of W0");
1257 .setDescription(
"Width dependence of NLX");
1262 .setDescription(
"Width dependence of DVT0");
1267 .setDescription(
"Width dependence of DVT1");
1272 .setDescription(
"Width dependence of DVT2");
1277 .setDescription(
"Width dependence of DVT0W");
1282 .setDescription(
"Width dependence of DVT1W");
1287 .setDescription(
"Width dependence of DVT2W");
1292 .setDescription(
"Width dependence of DROUT");
1297 .setDescription(
"Width dependence of DSUB");
1302 .setDescription(
"Width dependence of VTO");
1307 .setDescription(
"Width dependence of UA");
1312 .setDescription(
"Width dependence of UA1");
1317 .setDescription(
"Width dependence of UB");
1322 .setDescription(
"Width dependence of UB1");
1327 .setDescription(
"Width dependence of UC");
1332 .setDescription(
"Width dependence of UC1");
1337 .setDescription(
"Width dependence of U0");
1342 .setDescription(
"Width dependence of UTE");
1347 .setDescription(
"Width dependence of VOFF");
1352 .setDescription(
"Width dependence of RDSW");
1357 .setDescription(
"Width dependence of PRWG");
1362 .setDescription(
"Width dependence of PRWB");
1367 .setDescription(
"Width dependence of PRT");
1372 .setDescription(
"Width dependence of ETA0");
1377 .setDescription(
"Width dependence of ETAB");
1382 .setDescription(
"Width dependence of PCLM");
1387 .setDescription(
"Width dependence of PDIBLC1");
1392 .setDescription(
"Width dependence of PDIBLC2");
1397 .setDescription(
"Width dependence of PDIBLCB");
1402 .setDescription(
"Width dependence of PSCBE1");
1407 .setDescription(
"Width dependence of PSCBE2");
1412 .setDescription(
"Width dependence of PVAG");
1417 .setDescription(
"Width dependence of DELTA");
1422 .setDescription(
"Width dependence of WR");
1427 .setDescription(
"Width dependence of WG");
1432 .setDescription(
"Width dependence of DWB");
1437 .setDescription(
"Width dependence of B0");
1442 .setDescription(
"Width dependence of B1");
1447 .setDescription(
"Width dependence of ALPHA0");
1452 .setDescription(
"Width dependence of ALPHA1");
1457 .setDescription(
"Width dependence of BETA0");
1462 .setDescription(
"Width dependence of VFB");
1467 .setDescription(
"Width dependence of ELM");
1472 .setDescription(
"Width dependence of CGSL");
1477 .setDescription(
"Width dependence of CGDL");
1482 .setDescription(
"Width dependence of CKAPPA");
1487 .setDescription(
"Width dependence of CF");
1492 .setDescription(
"Width dependence of CLC");
1497 .setDescription(
"Width dependence of CLE");
1502 .setDescription(
"Width dependence of VFBCV");
1507 .setDescription(
"Width dependence of NOFF");
1512 .setDescription(
"Width dependence of VOFFCV");
1517 .setDescription(
"Width dependence of ACDE");
1522 .setDescription(
"Width dependence of MOIN");
1527 .setDescription(
"Cross-term dependence of CDSC");
1532 .setDescription(
"Cross-term dependence of CDSCB");
1537 .setDescription(
"Cross-term dependence of CDSCD");
1542 .setDescription(
"Cross-term dependence of CIT");
1547 .setDescription(
"Cross-term dependence of NFACTOR");
1552 .setDescription(
"Cross-term dependence of XJ");
1557 .setDescription(
"Cross-term dependence of VSAT");
1562 .setDescription(
"Cross-term dependence of AT");
1567 .setDescription(
"Cross-term dependence of A0");
1572 .setDescription(
"Cross-term dependence of AGS");
1577 .setDescription(
"Cross-term dependence of A1");
1582 .setDescription(
"Cross-term dependence of A2");
1587 .setDescription(
"Cross-term dependence of KETA");
1592 .setDescription(
"Cross-term dependence of NSUB");
1597 .setDescription(
"Cross-term dependence of NCH");
1602 .setDescription(
"Cross-term dependence of NGATE");
1607 .setDescription(
"Cross-term dependence of GAMMA1");
1612 .setDescription(
"Cross-term dependence of GAMMA2");
1617 .setDescription(
"Cross-term dependence of VBX");
1622 .setDescription(
"Cross-term dependence of VBM");
1627 .setDescription(
"Cross-term dependence of XT");
1632 .setDescription(
"Cross-term dependence of K1");
1637 .setDescription(
"Cross-term dependence of KT1");
1642 .setDescription(
"Cross-term dependence of KT1L");
1647 .setDescription(
"Cross-term dependence of KT2");
1652 .setDescription(
"Cross-term dependence of K2");
1657 .setDescription(
"Cross-term dependence of K3");
1662 .setDescription(
"Cross-term dependence of K3B");
1667 .setDescription(
"Cross-term dependence of W0");
1672 .setDescription(
"Cross-term dependence of NLX");
1677 .setDescription(
"Cross-term dependence of DVT0");
1682 .setDescription(
"Cross-term dependence of DVT1");
1687 .setDescription(
"Cross-term dependence of DVT2");
1692 .setDescription(
"Cross-term dependence of DVT0W");
1697 .setDescription(
"Cross-term dependence of DVT1W");
1702 .setDescription(
"Cross-term dependence of DVT2W");
1707 .setDescription(
"Cross-term dependence of DROUT");
1712 .setDescription(
"Cross-term dependence of DSUB");
1717 .setDescription(
"Cross-term dependence of VT0");
1722 .setDescription(
"Cross-term dependence of UA");
1727 .setDescription(
"Cross-term dependence of UA1");
1732 .setDescription(
"Cross-term dependence of UB");
1737 .setDescription(
"Cross-term dependence of UB1");
1742 .setDescription(
"Cross-term dependence of UC");
1747 .setDescription(
"Cross-term dependence of UC1");
1752 .setDescription(
"Cross-term dependence of U0");
1757 .setDescription(
"Cross-term dependence of UTE");
1762 .setDescription(
"Cross-term dependence of VOFF");
1767 .setDescription(
"Cross-term dependence of RDSW");
1772 .setDescription(
"Cross-term dependence of PRWG");
1777 .setDescription(
"Cross-term dependence of PRWB");
1782 .setDescription(
"Cross-term dependence of PRT");
1787 .setDescription(
"Cross-term dependence of ETA0");
1792 .setDescription(
"Cross-term dependence of ETAB");
1797 .setDescription(
"Cross-term dependence of PCLM");
1802 .setDescription(
"Cross-term dependence of PDIBLC1");
1807 .setDescription(
"Cross-term dependence of PDIBLC2");
1812 .setDescription(
"Cross-term dependence of PDIBLCB");
1817 .setDescription(
"Cross-term dependence of PSCBE1");
1822 .setDescription(
"Cross-term dependence of PSCBE2");
1827 .setDescription(
"Cross-term dependence of PVAG");
1832 .setDescription(
"Cross-term dependence of DELTA");
1837 .setDescription(
"Cross-term dependence of WR");
1842 .setDescription(
"Cross-term dependence of DWG");
1847 .setDescription(
"Cross-term dependence of DWB");
1852 .setDescription(
"Cross-term dependence of B0");
1857 .setDescription(
"Cross-term dependence of B1");
1862 .setDescription(
"Cross-term dependence of ALPHA0");
1867 .setDescription(
"Cross-term dependence of ALPHA1");
1872 .setDescription(
"Cross-term dependence of BETA0");
1877 .setDescription(
"Cross-term dependence of VFB");
1882 .setDescription(
"Cross-term dependence of ELM");
1887 .setDescription(
"Cross-term dependence of CGSL");
1892 .setDescription(
"Cross-term dependence of CGDL");
1897 .setDescription(
"Cross-term dependence of CKAPPA");
1902 .setDescription(
"Cross-term dependence of CF");
1907 .setDescription(
"Cross-term dependence of CLC");
1912 .setDescription(
"Cross-term dependence of CLE");
1917 .setDescription(
"Cross-term dependence of VFBCV");
1922 .setDescription(
"Cross-term dependence of NOFF");
1927 .setDescription(
"Cross-term dependence of VOFFCV");
1932 .setDescription(
"Cross-term dependence of ACDE");
1937 .setDescription(
"Cross-term dependence of MOIN");
1940 p.
addPar(
"USEFRINGE",0.0,&MOSFET_B3::Model::useFring)
1943 .setDescription(
"NOT in BSIM3");
1949 .setDescription(
"Parameter measurement temperature");
1954 .setDescription(
"Non-LLD region source-gate overlap capacitance per unit channel length");
1959 .setDescription(
"Non-LLD region drain-gate overlap capacitance per unit channel length");
1964 .setDescription(
"Gate-bulk overlap capacitance per unit channel length");
1969 .setDescription(
"Charge partitioning rate flag");
1975 .setDescription(
"Drain,source diffusion sheet resistance");
1980 .setDescription(
"Bulk p-n saturation current density");
1985 .setDescription(
"Sidewall saturation current per unit length");
1990 .setDescription(
"Bulk p-n bottom potential");
1995 .setDescription(
"Bulk p-n bottom grading coefficient");
2000 .setDescription(
"Source/drain side junction built-in potential");
2005 .setDescription(
"Source/drain gate sidewall junction built-in potential");
2010 .setDescription(
"Bulk p-n sidewall grading coefficient");
2015 .setDescription(
"Bulk p-n zero-bias bottom capacitance/area");
2020 .setDescription(
"Bulk p-n zero-bias sidewall capacitance/area");
2025 .setDescription(
"Source/grain gate sidewall junction capacitance grading coeficient");
2030 .setDescription(
"Source/grain gate sidewall junction capacitance per unit width");
2035 .setDescription(
"Emission coefficient of junction");
2040 .setDescription(
"Junction current temperature exponent coefficient");
2045 .setDescription(
"Noise parameter a");
2050 .setDescription(
"Noise parameter b");
2055 .setDescription(
"Noise parameter c");
2060 .setDescription(
"Saturation field");
2065 .setDescription(
"Flicker exponent");
2070 .setDescription(
"Flicker noise exponent");
2075 .setDescription(
"Flicker noise coefficient");
2080 .setDescription(
"lint offset for noise calculation");
2085 .setDescription(
"Length of offset fiting parameter from I-V without bias");
2090 .setDescription(
"Coefficient of length dependence for length offset");
2095 .setDescription(
"Coefficient of length dependence for CV channel length offset");
2100 .setDescription(
"Power of length dependence for length offset");
2105 .setDescription(
"Coefficient of width dependence for length offset");
2110 .setDescription(
"Coefficient of width dependence for channel length offset");
2115 .setDescription(
"Power of width dependence for length offset");
2120 .setDescription(
"Coefficient of length and width cross term for length offset");
2125 .setDescription(
"Coefficient of length and width dependence for CV channel length offset");
2130 .setDescription(
"Width-offset fitting parameter from I-V without bias");
2135 .setDescription(
"Coefficient of length dependence for width offset");
2140 .setDescription(
"Coefficient of length dependence for CV channel width offset");
2145 .setDescription(
"Power of length dependece of width offset");
2150 .setDescription(
"Coefficient of width dependence for width offset");
2155 .setDescription(
"Coefficient of width dependence for CV channel width offset");
2160 .setDescription(
"Power of width dependence of width offset");
2165 .setDescription(
"Coefficient of length and width cross term for width offset");
2170 .setDescription(
"Coefficient of length and width dependence for CV channel width offset");
2175 .setDescription(
"Channel length");
2180 .setDescription(
"Channel width");
2185 .setDescription(
"Maximum channel length");
2190 .setDescription(
"Minimum channel length");
2195 .setDescription(
"Maximum channel width");
2200 .setDescription(
"Minimum channel width");
2205 .setDescription(
"Mobility model selector");
2210 .setDescription(
"Binning unit selector");
2215 .setDescription(
"Flag for capacitance models");
2220 .setDescription(
"Parameter value check");
2225 .setDescription(
"Flag for noise models");
2230 .setDescription(
"Version number");
2287 if (
given(
"NQSMOD"))
2289 std::string msg =
"Instance::Instance";
2290 msg +=
" nsqMod = 1. Not allowed yet. Setting to 0.\n";
2291 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::USR_WARNING_0,msg);
2297 UserWarning(*
this) <<
"Channel length out of range";
2302 UserWarning(*
this) <<
"Channel width out of range";
2327 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
2346 l (getDeviceOptions().defl),
2347 w (getDeviceOptions().defw),
2348 drainArea (getDeviceOptions().defad),
2349 sourceArea (getDeviceOptions().defas),
2351 sourceSquares (1.0),
2352 drainPerimeter (0.0),
2353 sourcePerimeter (0.0),
2354 sourceConductance (0.0),
2355 drainConductance (0.0),
2362 numberParallel (1.0),
2405 limitedFlag (false),
2410 temp (getDeviceOptions().temp.getImmutableValue<double>()),
2411 ChargeComputationNeeded (true),
2494 dDeltaPhi_dVg (0.0),
2495 dDeltaPhi_dVd (0.0),
2496 dDeltaPhi_dVb (0.0),
2498 jctTempSatCurDensity (0.0),
2499 jctSidewallTempSatCurDensity (0.0),
2500 unitAreaJctCapTemp (0.0),
2501 unitLengthSidewallJctCapTemp (0.0),
2502 unitLengthGateSidewallJctCapTemp (0.0),
2560 ScalingFactor (0.0),
2578 li_store_dev_id (-1),
2579 li_store_dev_is (-1),
2580 li_store_dev_ig (-1),
2581 li_store_dev_ib (-1),
2587 li_state_qcheq (-1),
2588 li_state_qcdump (-1),
2596 li_SourcePrime (-1),
2604 ADrainEquDrainNodeOffset (-1),
2605 ADrainEquDrainPrimeNodeOffset (-1),
2606 ADrainEquIdsOffset (-1),
2608 AGateEquGateNodeOffset (-1),
2609 AGateEquBulkNodeOffset (-1),
2610 AGateEquDrainPrimeNodeOffset (-1),
2611 AGateEquSourcePrimeNodeOffset (-1),
2612 AGateEquChargeVarOffset (-1),
2613 AGateEquIgsOffset (-1),
2615 ASourceEquSourceNodeOffset (-1),
2616 ASourceEquSourcePrimeNodeOffset (-1),
2617 ASourceEquIbsOffset (-1),
2618 ASourceEquIdsOffset (-1),
2619 ASourceEquIgsOffset (-1),
2621 ABulkEquGateNodeOffset (-1),
2622 ABulkEquBulkNodeOffset (-1),
2623 ABulkEquDrainPrimeNodeOffset (-1),
2624 ABulkEquSourcePrimeNodeOffset (-1),
2625 ABulkEquChargeVarOffset (-1),
2626 ABulkEquIbsOffset (-1),
2628 ADrainPrimeEquDrainNodeOffset (-1),
2629 ADrainPrimeEquGateNodeOffset (-1),
2630 ADrainPrimeEquBulkNodeOffset (-1),
2631 ADrainPrimeEquDrainPrimeNodeOffset (-1),
2632 ADrainPrimeEquSourcePrimeNodeOffset (-1),
2633 ADrainPrimeEquChargeVarOffset (-1),
2635 ASourcePrimeEquGateNodeOffset (-1),
2636 ASourcePrimeEquSourceNodeOffset (-1),
2637 ASourcePrimeEquBulkNodeOffset (-1),
2638 ASourcePrimeEquDrainPrimeNodeOffset (-1),
2639 ASourcePrimeEquSourcePrimeNodeOffset (-1),
2640 ASourcePrimeEquChargeVarOffset (-1),
2642 AChargeEquChargeVarOffset (-1),
2643 AChargeEquDrainPrimeNodeOffset (-1),
2644 AChargeEquGateNodeOffset (-1),
2645 AChargeEquSourcePrimeNodeOffset (-1),
2646 AChargeEquBulkNodeOffset (-1),
2647 icVBSEquVsOffset (-1),
2648 icVBSEquVbOffset (-1),
2649 icVBSEquIbsOffset (-1),
2650 icVDSEquVdOffset (-1),
2651 icVDSEquVsOffset (-1),
2652 icVDSEquIdsOffset (-1),
2653 icVGSEquVgOffset (-1),
2654 icVGSEquVsOffset (-1),
2655 icVGSEquIgsOffset (-1),
2659 f_DrainEquDrainNodePtr(0),
2660 f_DrainEquDrainPrimeNodePtr(0),
2661 f_DrainEquIdsPtr(0),
2664 f_GateEquGateNodePtr(0),
2665 f_GateEquBulkNodePtr(0),
2666 f_GateEquDrainPrimeNodePtr(0),
2667 f_GateEquSourcePrimeNodePtr(0),
2668 f_GateEquChargeVarPtr(0),
2672 f_SourceEquSourceNodePtr(0),
2673 f_SourceEquSourcePrimeNodePtr(0),
2674 f_SourceEquIbsPtr(0),
2675 f_SourceEquIdsPtr(0),
2676 f_SourceEquIgsPtr(0),
2679 f_BulkEquGateNodePtr(0),
2680 f_BulkEquBulkNodePtr(0),
2681 f_BulkEquDrainPrimeNodePtr(0),
2682 f_BulkEquSourcePrimeNodePtr(0),
2683 f_BulkEquChargeVarPtr(0),
2687 f_DrainPrimeEquDrainNodePtr(0),
2688 f_DrainPrimeEquGateNodePtr(0),
2689 f_DrainPrimeEquBulkNodePtr(0),
2690 f_DrainPrimeEquDrainPrimeNodePtr(0),
2691 f_DrainPrimeEquSourcePrimeNodePtr(0),
2692 f_DrainPrimeEquChargeVarPtr(0),
2695 f_SourcePrimeEquGateNodePtr(0),
2696 f_SourcePrimeEquSourceNodePtr(0),
2697 f_SourcePrimeEquBulkNodePtr(0),
2698 f_SourcePrimeEquDrainPrimeNodePtr(0),
2699 f_SourcePrimeEquSourcePrimeNodePtr(0),
2700 f_SourcePrimeEquChargeVarPtr(0),
2703 f_ChargeEquChargeVarPtr(0),
2704 f_ChargeEquDrainPrimeNodePtr(0),
2705 f_ChargeEquGateNodePtr(0),
2706 f_ChargeEquSourcePrimeNodePtr(0),
2707 f_ChargeEquBulkNodePtr(0),
2712 f_icVBSEquIbsPtr(0),
2717 f_icVDSEquIdsPtr(0),
2722 f_icVGSEquIgsPtr(0),
2725 q_DrainEquDrainNodePtr(0),
2726 q_DrainEquDrainPrimeNodePtr(0),
2727 q_DrainEquIdsPtr(0),
2730 q_GateEquGateNodePtr(0),
2731 q_GateEquBulkNodePtr(0),
2732 q_GateEquDrainPrimeNodePtr(0),
2733 q_GateEquSourcePrimeNodePtr(0),
2734 q_GateEquChargeVarPtr(0),
2738 q_SourceEquSourceNodePtr(0),
2739 q_SourceEquSourcePrimeNodePtr(0),
2740 q_SourceEquIbsPtr(0),
2741 q_SourceEquIdsPtr(0),
2742 q_SourceEquIgsPtr(0),
2745 q_BulkEquGateNodePtr(0),
2746 q_BulkEquBulkNodePtr(0),
2747 q_BulkEquDrainPrimeNodePtr(0),
2748 q_BulkEquSourcePrimeNodePtr(0),
2749 q_BulkEquChargeVarPtr(0),
2753 q_DrainPrimeEquDrainNodePtr(0),
2754 q_DrainPrimeEquGateNodePtr(0),
2755 q_DrainPrimeEquBulkNodePtr(0),
2756 q_DrainPrimeEquDrainPrimeNodePtr(0),
2757 q_DrainPrimeEquSourcePrimeNodePtr(0),
2758 q_DrainPrimeEquChargeVarPtr(0),
2761 q_SourcePrimeEquGateNodePtr(0),
2762 q_SourcePrimeEquSourceNodePtr(0),
2763 q_SourcePrimeEquBulkNodePtr(0),
2764 q_SourcePrimeEquDrainPrimeNodePtr(0),
2765 q_SourcePrimeEquSourcePrimeNodePtr(0),
2766 q_SourcePrimeEquChargeVarPtr(0),
2769 q_ChargeEquChargeVarPtr(0),
2770 q_ChargeEquDrainPrimeNodePtr(0),
2771 q_ChargeEquGateNodePtr(0),
2772 q_ChargeEquSourcePrimeNodePtr(0),
2773 q_ChargeEquBulkNodePtr(0),
2778 q_icVBSEquIbsPtr(0),
2783 q_icVDSEquIdsPtr(0),
2788 q_icVGSEquIgsPtr(0),
2791 blockHomotopyID (0),
2792 randomPerturb (0.0),
2794 updateTemperatureCalled_ (false)
2856 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
2858 Xyce::dout() <<
"Instance::Instance jacStampMap_DS_SC" << std::endl;
2861 Xyce::dout() <<
"jacStamp_DC_SC[ " <<
jacMap_DC_SC[k] <<
" ] = { ";
2866 Xyce::dout() <<
"}" << std::endl;
2869 Xyce::dout() <<
"Instance::Instance jacStampMap_DS" << std::endl;
2870 for (
int k = 0; k<
jacMap_DC.size(); ++k )
2872 Xyce::dout() <<
"jacStamp_DC[ " <<
jacMap_DC[k] <<
" ] = { ";
2873 for (
int q = 0; q <
jacMap2_DC[k].size(); ++q )
2877 Xyce::dout() <<
"}" << std::endl;
2880 Xyce::dout() <<
"Instance::Instance jacStampMap_SC" << std::endl;
2881 for (
int k = 0; k<
jacMap_SC.size(); ++k )
2883 Xyce::dout() <<
"jacStamp_SC[ " <<
jacMap_SC[k] <<
" ] = { ";
2884 for (
int q = 0; q <
jacMap2_SC[k].size(); ++q )
2888 Xyce::dout() <<
"}" << std::endl;
2891 Xyce::dout() <<
"Instance::Instance jacStampMap" << std::endl;
2892 for (
int k = 0; k<
jacMap.size(); ++k )
2894 Xyce::dout() <<
"jacStamp[ " <<
jacMap[k] <<
" ] = { ";
2895 for (
int q = 0; q <
jacMap2[k].size(); ++q )
2899 Xyce::dout() <<
"}" << std::endl;
2941 int numExtraCol = 0;
2942 int qCol = -1, icVBSCol = -1, icVDSCol = -1, icVGSCol = -1;
2951 icVBSCol = currentCol;
2957 icVDSCol = currentCol;
2963 icVGSCol = currentCol;
3045 numNonZeros = 5 + (
nqsMod ? 1:0 );
3060 numNonZeros = 5 + (
nqsMod ? 1:0 );
3124 std::vector< std::vector<int> > jacStampSpecialMergedTemp;
3125 std::vector<int> jacSpecialMapTemp;
3126 std::vector< std::vector<int> > jacSpecialMapTemp2;
3129 jacStampSpecialMergedTemp, jacSpecialMapTemp, jacSpecialMapTemp2,
3132 jacStampMap( jacStampSpecialMergedTemp, jacSpecialMapTemp, jacSpecialMapTemp2,
3173 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3175 Xyce::dout() <<
"Instance::Instance jacStampSpecial" << std::endl;
3178 Xyce::dout() <<
"jacSpecialMap[" <<
jacSpecialMap[k] <<
" ] = { ";
3183 Xyce::dout() <<
"}" << std::endl;
3186 Xyce::dout() <<
"Instance::Instance jacStampSpecialMerged" << std::endl;
3194 Xyce::dout() <<
"}" << std::endl;
3220 const std::vector<int> & extLIDVecRef )
3233 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3235 Xyce::dout() << section_divider << std::endl;
3236 Xyce::dout() <<
" In Instance::register LIDs\n\n";
3237 Xyce::dout() <<
" name = " <<
getName() << std::endl;
3238 Xyce::dout() <<
" number of internal variables: " <<
numIntVars << std::endl;
3239 Xyce::dout() <<
" number of external variables: " <<
numExtVars << std::endl;
3274 DevelFatal(*this).in(
"Instance::registerLIDs")
3275 <<
"Tried to specify an initial condition on V_Bulk_Source when Bulk and Source nodes are the same node";
3284 DevelFatal(*this).in(
"Instance::registerLIDs")
3285 <<
"Tried to specify an initial condition on V_Drain_Source when Drain and Source nodes are the same node";
3294 DevelFatal(*this).in(
"Instance::registerLIDs")
3295 <<
"Tried to specify an initial condition on V_Gate_Source when Gate and Source nodes are the same node";
3300 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3302 Xyce::dout() <<
"\n local variable indices:\n";
3303 Xyce::dout() <<
" li_Drain = " <<
li_Drain << std::endl;
3304 Xyce::dout() <<
" li_Gate = " <<
li_Gate << std::endl;
3305 Xyce::dout() <<
" li_Source = " <<
li_Source << std::endl;
3306 Xyce::dout() <<
" li_Bulk = " <<
li_Bulk << std::endl;
3309 Xyce::dout() <<
" li_DrainPrime = " <<
li_DrainPrime << std::endl;
3311 Xyce::dout() <<
" li_SourcePrime = " <<
li_SourcePrime << std::endl;
3314 Xyce::dout() <<
" li_Charge = " <<
li_Charge << std::endl;
3317 Xyce::dout() <<
" li_Ibs = " <<
li_Ibs << std::endl;
3320 Xyce::dout() <<
" li_Ids = " <<
li_Ids << std::endl;
3323 Xyce::dout() <<
" li_Igs = " <<
li_Igs << std::endl;
3324 Xyce::dout() << section_divider << std::endl;
3375 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3377 Xyce::dout() << std::endl;
3378 Xyce::dout() << section_divider << std::endl;
3379 Xyce::dout() <<
" In Instance::registerStateLIDs\n\n";
3380 Xyce::dout() <<
" name = " <<
getName() << std::endl;
3381 Xyce::dout() <<
" Number of State LIDs: " <<
numStateVars << std::endl;
3407 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3409 Xyce::dout() <<
" Local State indices:" << std::endl;
3410 Xyce::dout() << std::endl;
3411 Xyce::dout() <<
" li_state_qb = " <<
li_state_qb << std::endl;
3412 Xyce::dout() <<
" li_state_qg = " <<
li_state_qg << std::endl;
3413 Xyce::dout() <<
" li_state_qd = " <<
li_state_qd << std::endl;
3414 Xyce::dout() <<
" li_state_qbs = " <<
li_state_qbs << std::endl;
3415 Xyce::dout() <<
" li_state_qbd = " <<
li_state_qbd << std::endl;
3416 Xyce::dout() <<
" li_state_qcheq = " <<
li_state_qcheq << std::endl;
3417 Xyce::dout() <<
" li_state_qcdump = " <<
li_state_qcdump << std::endl;
3418 Xyce::dout() <<
" li_state_qdef = " <<
li_state_qdef << std::endl;
3419 Xyce::dout() << section_divider << std::endl;
3488 N_ERH_ErrorMgr::report( N_ERH_ErrorMgr::DEV_FATAL,
3489 ": NQSMOD not supported for DIRECT MATRIX ACCESS\n" );
3492 N_ERH_ErrorMgr::report( N_ERH_ErrorMgr::DEV_FATAL,
3493 "Instance::jacobianStamp should not get here!\n" );
3509 std::vector<int> map;
3510 std::vector< std::vector<int> > map2;
3556 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3558 Xyce::dout() <<
"Instance::registerJacLIDs map selected" << std::endl;
3559 for (
int k = 0; k<map.size(); ++k )
3561 Xyce::dout() <<
"map[ " << k <<
"] = " << map[k] <<
" map2[] = { ";
3562 for (
int q = 0; q < map2[k].size(); ++q )
3564 Xyce::dout() << map2[k][q] <<
" ";
3566 Xyce::dout() <<
"}" << std::endl;
3569 for(
int k = 0; k<jacLIDVec.size(); ++k )
3571 Xyce::dout() <<
"jacLIDVec[ " << k <<
"] = { ";
3572 for (
int q = 0; q < jacLIDVec[k].size(); ++q )
3574 Xyce::dout() << jacLIDVec[k][q] <<
" ";
3576 Xyce::dout() <<
"}" << std::endl;
3705 N_ERH_ErrorMgr::report( N_ERH_ErrorMgr::DEV_FATAL,
3706 ": NQSMOD not supported.\n" );
3720 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
3969 double tmp, tmp1, tmp2, tmp3, Eg;
3970 double T0, T1, T2, T3, T4, T5, Ldrn, Wdrn;
3971 double delTemp, TRatio, Inv_L, Inv_W, Inv_LW;
3974 double Nvtm, SourceSatCurrent, DrainSatCurrent;
3981 bool bsuccess =
true;
3983 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3985 Xyce::dout() << std::endl << subsection_divider << std::endl;
3986 Xyce::dout() <<
"Instance::updateTemperature\n";
3987 Xyce::dout() <<
"name = " <<
getName() << std::endl;
3991 if (temp_tmp != -999.0)
temp = temp_tmp;
4017 delTemp = temp - Tnom;
4028 lout() <<
"Temperature effect has caused cj to be negative. Cj clamped to zero.\n" << std::endl;
4041 lout() <<
"Temperature effect has caused cjsw to be negative. Cjsw clamped to zero.\n" << std::endl;
4054 lout() <<
"Temperature effect has caused cjswg to be negative. Cjswg clamped to zero.\n" << std::endl;
4062 lout() <<
"Temperature effect has caused pb to be < 0.01. Pb clamped to 0.01.\n" << std::endl;
4070 lout() <<
"Temperature effect has caused pbsw to be < 0.01. Pbsw clamped to 0.01.\n" << std::endl;
4078 lout() <<
"Temperature effect has caused pbswg to be < 0.01. Pbswg clamped to 0.01.\n" << std::endl;
4088 std::list<SizeDependParam*>::iterator it_dpL =
4090 std::list<SizeDependParam*>::iterator end_dpL =
4095 for( ; it_dpL != end_dpL; ++it_dpL )
4096 if( (*it_dpL)->Length ==
l && (*it_dpL)->Width ==
w && (*it_dpL)->referenceTemperature == temp_tmp)
4142 UserWarning0(*
this) <<
"Effective channel length <= 0";
4154 UserWarning0(*
this) <<
"Effective channel length for C-V <= 0";
4160 UserWarning(*
this) <<
"Effective channel width for C-V <= 0";
4596 T0 = (TRatio - 1.0);
4611 #ifdef CHECK_MODEL_DONE
4612 if (checkModel((*M_iter), iterI, ckt))
4614 UserError0(*
this) <<
"Error(s) detected during V3.2 parameter checking for " << name.c_str() <<
" in model " <<
model_.name;
4657 UserWarning0(*
this) <<
"k1 should be specified with k2.";
4663 UserWarning0(*
this) <<
"k2 should be specified with k1.";
4669 UserWarning0(*
this) <<
"nsub is ignored because k1 or k2 is given.";
4674 UserWarning0(*
this) <<
"xt is ignored because k1 or k2 is given.";
4679 UserWarning0(*
this) <<
"vbx is ignored because k1 or k2 is given.";
4684 UserWarning0(*
this) <<
"gamma1 is ignored because k1 or k2 is given.";
4689 UserWarning0(*
this) <<
"gamma2 is ignored because k1 or k2 is given.";
4762 T2 = (T0 + 2.0 * T0 * T0);
4775 T2 = T1 * (1.0 + 2.0 * T1);
4780 T2 = T1 * (1.0 + 2.0 * T1);
4790 T3 = T1 * (1.0 + 2.0 * T1);
4795 T3 = T1 * (1.0 + 2.0 * T1);
4820 SourceSatCurrent = 1.0e-14;
4829 if ((SourceSatCurrent > 0.0) && (
model_.
ijth > 0.0))
4838 DrainSatCurrent = 1.0e-14;
4847 if ((DrainSatCurrent > 0.0) && (
model_.
ijth > 0.0))
4868 bool bsuccess =
true;
4871 double SourceSatCurrent(0.0), DrainSatCurrent(0.0);
4874 double VgstNVt(0.0), ExpVgst(0.0);
4876 double czbd(0.0), czbdsw(0.0), czbdswg(0.0), czbs(0.0), czbssw(0.0), czbsswg(0.0);
4877 double evbd(0.0), evbs(0.0), arg(0.0), sarg(0.0);
4879 double Vfbeff(0.0), dVfbeff_dVg(0.0), dVfbeff_dVb(0.0), V3(0.0), V4(0.0);
4881 double MJ(0.0), MJSW(0.0), MJSWG(0.0);
4884 double Vds(0.0), Vgs(0.0), Vbs(0.0);
4885 double Vgs_eff(0.0), Vfb(0.0);
4886 double Phis(0.0), dPhis_dVb(0.0), sqrtPhis(0.0), dsqrtPhis_dVb(0.0);
4887 double Vth(0.0), dVth_dVb(0.0), dVth_dVd(0.0);
4892 double n(0.0), dn_dVb(0.0), dn_dVd(0.0), voffcv(0.0), noff(0.0), dnoff_dVd(0.0), dnoff_dVb(0.0);
4893 double ExpArg(0.0), V0(0.0), CoxWLcen(0.0), QovCox(0.0), LINK(0.0);
4894 double DeltaPhi(0.0);
4896 double Cox(0.0), Tox(0.0), Tcen(0.0), dTcen_dVg(0.0), dTcen_dVd(0.0), dTcen_dVb(0.0);
4897 double Ccen(0.0), Coxeff(0.0), dCoxeff_dVg(0.0), dCoxeff_dVd(0.0), dCoxeff_dVb(0.0);
4898 double Denomi(0.0), dDenomi_dVg(0.0), dDenomi_dVd(0.0), dDenomi_dVb(0.0);
4900 double dueff_dVg(0.0), dueff_dVd(0.0), dueff_dVb(0.0);
4905 double EsatL(0.0), dEsatL_dVg(0.0), dEsatL_dVd(0.0), dEsatL_dVb(0.0);
4907 double dVdsat_dVg(0.0), dVdsat_dVb(0.0), dVdsat_dVd(0.0), Vasat(0.0), dAlphaz_dVg(0.0), dAlphaz_dVb(0.0);
4908 double dVasat_dVg(0.0), dVasat_dVb(0.0), dVasat_dVd(0.0), Va(0.0);
4910 double dVa_dVd(0.0), dVa_dVg(0.0), dVa_dVb(0.0);
4911 double Vbseff(0.0), dVbseff_dVb(0.0), VbseffCV(0.0), dVbseffCV_dVb(0.0);
4914 double One_Third_CoxWL(0.0), Two_Third_CoxWL(0.0), Alphaz(0.0);
4916 double T0(0.0), dT0_dVg(0.0), dT0_dVd(0.0), dT0_dVb(0.0);
4917 double T1(0.0), dT1_dVg(0.0), dT1_dVd(0.0), dT1_dVb(0.0);
4918 double T2(0.0), dT2_dVg(0.0), dT2_dVd(0.0), dT2_dVb(0.0);
4919 double T3(0.0), dT3_dVg(0.0), dT3_dVd(0.0), dT3_dVb(0.0);
4928 double T11(0.0), T12(0.0);
4934 double dAbulk_dVb(0.0), Abulk0(0.0), dAbulk0_dVb(0.0);
4936 double VACLM(0.0), dVACLM_dVg(0.0), dVACLM_dVd(0.0), dVACLM_dVb(0.0);
4937 double VADIBL(0.0), dVADIBL_dVg(0.0), dVADIBL_dVd(0.0), dVADIBL_dVb(0.0);
4939 double Xdep(0.0), dXdep_dVb(0.0), lt1(0.0), dlt1_dVb(0.0), ltw(0.0), dltw_dVb(0.0);
4940 double Delt_vth(0.0), dDelt_vth_dVb(0.0);
4942 double Theta0(0.0), dTheta0_dVb(0.0);
4944 double TempRatio(0.0), tmp1(0.0), tmp2(0.0), tmp3(0.0), tmp4(0.0);
4946 double DIBL_Sft(0.0), dDIBL_Sft_dVd(0.0);
4948 double Lambda(0.0), dLambda_dVg(0.0);
4954 double dVgsteff_dVg(0.0), dVgsteff_dVd(0.0), dVgsteff_dVb(0.0);
4956 double dVdseff_dVg(0.0), dVdseff_dVd(0.0), dVdseff_dVb(0.0);
4957 double VdseffCV(0.0), dVdseffCV_dVg(0.0), dVdseffCV_dVd(0.0), dVdseffCV_dVb(0.0);
4958 double diffVds(0.0);
4960 double dAbulk_dVg(0.0);
4961 double beta(0.0), dbeta_dVg(0.0), dbeta_dVd(0.0), dbeta_dVb(0.0);
4962 double gche(0.0), dgche_dVg(0.0), dgche_dVd(0.0), dgche_dVb(0.0);
4963 double fgche1(0.0), dfgche1_dVg(0.0), dfgche1_dVd(0.0), dfgche1_dVb(0.0);
4964 double fgche2(0.0), dfgche2_dVg(0.0), dfgche2_dVd(0.0), dfgche2_dVb(0.0);
4965 double Idl(0.0), dIdl_dVg(0.0), dIdl_dVd(0.0), dIdl_dVb(0.0);
4966 double Idsa(0.0), dIdsa_dVg(0.0), dIdsa_dVd(0.0), dIdsa_dVb(0.0);
4969 double Gds(0.0), Gmb(0.0);
4972 double Gbd(0.0), Gbg(0.0), Gbb(0.0);
4973 double VASCBE(0.0), dVASCBE_dVg(0.0), dVASCBE_dVd(0.0), dVASCBE_dVb(0.0);
4974 double CoxWovL(0.0);
4975 double Rds(0.0), dRds_dVg(0.0), dRds_dVb(0.0), WVCox(0.0), WVCoxRds(0.0);
4976 double Vgst2Vtm(0.0), VdsatCV(0.0);
4978 double dVdsatCV_dVg(0.0), dVdsatCV_dVb(0.0);
4979 double Leff(0.0), Weff(0.0), dWeff_dVg(0.0), dWeff_dVb(0.0);
4980 double AbulkCV(0.0), dAbulkCV_dVb(0.0);
4982 double gtau_diff(0.0), gtau_drift(0.0);
4987 double Cgg1(0.0), Cgb1(0.0), Cgd1(0.0), Cbg1(0.0), Cbb1(0.0), Cbd1(0.0);
4989 double Qac0(0.0), Qsub0(0.0);
4990 double dQac0_dVg(0.0), dQac0_dVb(0.0), dQsub0_dVg(0.0), dQsub0_dVd(0.0), dQsub0_dVb(0.0);
4991 double von_local(0.0);
5005 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
5007 Xyce::dout() << subsection_divider << std::endl;
5008 Xyce::dout() <<
" Instance::updateIntermediateVars\n";
5009 Xyce::dout() <<
" name = " <<
getName();
5011 Xyce::dout() <<
" dtype is " <<
model_.
dtype << std::endl;
5012 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
5013 Xyce::dout() <<
" " << std::endl;
5053 Xyce::dout() <<
" Vg = " <<
Vg << std::endl;
5054 Xyce::dout() <<
" Vb = " <<
Vb << std::endl;
5055 Xyce::dout() <<
" Vs = " <<
Vs << std::endl;
5056 Xyce::dout() <<
" Vd = " <<
Vd << std::endl;
5057 Xyce::dout() <<
" Vsp = " <<
Vsp << std::endl;
5058 Xyce::dout() <<
" Vdp = " <<
Vdp << std::endl;
5059 Xyce::dout() <<
" Qtotal = " <<
Qtotal << std::endl;
5115 if ((*flagSolVectorPtr)[
li_Drain] == 0 || (*flagSolVectorPtr)[
li_Gate] == 0 ||
5184 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
5185 Xyce::dout() <<
" von_local = " << von_local << std::endl;
5186 Xyce::dout() <<
" CONSTvt0 = " <<
CONSTvt0 << std::endl;
5187 Xyce::dout() <<
" vcrit = " <<
model_.
vcrit << std::endl;
5188 Xyce::dout().width(3);
5190 Xyce::dout().width(5);Xyce::dout() <<
getName();
5191 Xyce::dout() <<
" old :";
5192 Xyce::dout()<<
" vgs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5194 Xyce::dout()<<
" vds:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5196 Xyce::dout()<<
" vbs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5198 Xyce::dout()<<
" vbd:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5199 Xyce::dout() <<
vbd_old << std::endl;
5200 Xyce::dout().width(3);
5202 Xyce::dout().width(5);Xyce::dout() <<
getName();
5203 Xyce::dout() <<
" Blim:";
5204 Xyce::dout()<<
" vgs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5205 Xyce::dout() <<
vgs;
5206 Xyce::dout()<<
" vds:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5207 Xyce::dout() <<
vds;
5208 Xyce::dout()<<
" vbs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5209 Xyce::dout() <<
vbs;
5210 Xyce::dout()<<
" vbd:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5211 Xyce::dout() <<
vbd << std::endl;
5212 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
5251 #ifdef Xyce_NEW_ORIG_TEST
5253 double vds_diff = fabs(vds -
vds_orig);
5257 bool noOrigFlag_vgs = 0;
5258 bool noOrigFlag_vds = 0;
5259 bool noOrigFlag_vbs = 0;
5260 bool noOrigFlag_vgd = 0;
5262 if (vgs_diff != 0.0)
5266 if ( fabs(vgs_diff/
vgs_orig) > reltol) noOrigFlag_vgs = 1;
5270 if ( fabs(vgs_diff) > voltTol ) noOrigFlag_vgs = 1;
5274 if (vds_diff != 0.0)
5278 if ( fabs(vds_diff/
vds_orig) > reltol) noOrigFlag_vds = 1;
5282 if ( fabs(vds_diff) > voltTol ) noOrigFlag_vds = 1;
5286 if (vbs_diff != 0.0)
5290 if ( fabs(vbs_diff/
vbs_orig) > reltol) noOrigFlag_vbs = 1;
5294 if ( fabs(vbs_diff) > voltTol ) noOrigFlag_vbs = 1;
5298 if (vgd_diff != 0.0)
5302 if ( fabs(vgd_diff/
vgd_orig) > reltol) noOrigFlag_vgd = 1;
5306 if ( fabs(vgd_diff) > voltTol ) noOrigFlag_vgd = 1;
5310 origFlag = !( noOrigFlag_vgs || noOrigFlag_vds ||
5311 noOrigFlag_vbs || noOrigFlag_vgd);
5323 Xyce::dout().width(3);
5325 Xyce::dout().width(5);Xyce::dout() <<
getName();
5326 Xyce::dout() <<
" Alim:";
5327 Xyce::dout()<<
" vgs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5328 Xyce::dout() <<
vgs;
5329 Xyce::dout()<<
" vds:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5330 Xyce::dout() <<
vds;
5331 Xyce::dout()<<
" vbs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5332 Xyce::dout() <<
vbs;
5333 Xyce::dout()<<
" vbd:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5334 Xyce::dout() <<
vbd;
5335 if (
origFlag) Xyce::dout() <<
" SAME";
5336 else Xyce::dout() <<
" DIFF";
5337 Xyce::dout() << std::endl;
5338 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
5352 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
5354 Xyce::dout() <<
" mod type = " <<
model_.
modType << std::endl;
5355 Xyce::dout() <<
"dtype = " <<
model_.
dtype << std::endl;
5356 Xyce::dout() <<
" vbs = " << vbs << std::endl;
5357 Xyce::dout() <<
" vds = " << vds << std::endl;
5358 Xyce::dout() <<
" vgs = " <<
vgs << std::endl;
5360 Xyce::dout() <<
" vbd = " <<
vbd << std::endl;
5361 Xyce::dout() <<
" vgd = " <<
vgd << std::endl;
5362 Xyce::dout() <<
" vgb = " <<
vgs << std::endl;
5363 Xyce::dout() <<
" qdef = " <<
qdef << std::endl;
5371 SourceSatCurrent = 1.0e-14;
5381 if (SourceSatCurrent <= 0.0)
5390 evbs = exp(vbs / Nvtm);
5398 evbs = exp(vbs / Nvtm);
5415 DrainSatCurrent = 1.0e-14;
5425 if (DrainSatCurrent <= 0.0)
5434 evbd = exp(
vbd / Nvtm);
5442 evbd = exp(
vbd / Nvtm);
5480 <<
"HOMOTOPY INFO: before vds = " << Vds << std::endl
5481 <<
"HOMOTOPY INFO: before vgst = " << Vgs << std::endl;
5504 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
5506 Xyce::dout() <<
"HOMOTOPY INFO: after vds = " << Vds << std::endl;
5507 Xyce::dout() <<
"HOMOTOPY INFO: after vgst = " << Vgs << std::endl;
5514 dVbseff_dVb = 0.5 * (1.0 + T0 /
T1global);
5516 if (Vbseff < Vbs) Vbseff = Vbs;
5522 dPhis_dVb = -T0 * T0;
5524 dsqrtPhis_dVb = -0.5 * sqrtPhis * sqrtPhis /
paramPtr->
phis3;
5530 sqrtPhis = sqrt(Phis);
5531 dsqrtPhis_dVb = -0.5 / sqrtPhis;
5551 T4 = 1.0 / (3.0 + 8.0 * T0);
5552 T1 = (1.0 + 3.0 * T0) * T4;
5557 dlt1_dVb =
model_.
factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2);
5567 T4 = 1.0 / (3.0 + 8.0 * T0);
5568 T1 = (1.0 + 3.0 * T0) * T4;
5573 dltw_dVb =
model_.
factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2);
5579 Theta0 = T1 * (1.0 + 2.0 * T1);
5580 dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb;
5581 dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb;
5586 Theta0 = T1 * (1.0 + 2.0 * T1);
5598 T2 = T1 * (1.0 + 2.0 * T1);
5599 dT1_dVb = -T0 / ltw * T1 * dltw_dVb;
5600 dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb;
5605 T2 = T1 * (1.0 + 2.0 * T1);
5624 T9 = 1.0 / (3.0 - 2.0e4 * T3);
5625 T3 = (2.0e-4 - T3) * T9;
5634 DIBL_Sft = dDIBL_Sft_dVd * Vds;
5648 dVth_dVd = -dDIBL_Sft_dVd;
5659 dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb
5665 T0 = 1.0 / (3.0 + 8.0 * tmp4);
5666 n = (1.0 + 3.0 * tmp4) * T0;
5668 dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb
5681 T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1);
5683 T2 = T1 * (T4 - 1.0);
5684 T3 = 0.5 * T2 * T2 / T1;
5685 T7 = 1.12 - T3 - 0.05;
5686 T6 = sqrt(T7 * T7 + 0.224);
5687 T5 = 1.12 - 0.5 * (T7 + T6);
5689 dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6);
5696 Vgst = Vgs_eff - Vth;
5699 T10 = 2.0 * n * Vtm;
5700 VgstNVt = Vgst / T10;
5708 dVgsteff_dVd = -dVth_dVd;
5709 dVgsteff_dVb = -dVth_dVb;
5716 dVgsteff_dVg =
Vgsteff / (n * Vtm);
5717 dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + T0 * Vtm * dn_dVd);
5718 dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + T0 * Vtm * dn_dVb);
5723 ExpVgst = exp(VgstNVt);
5724 T1 = T10 * log(1.0 + ExpVgst);
5725 dT1_dVg = ExpVgst / (1.0 + ExpVgst);
5726 dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb;
5727 dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd;
5730 T2 = 1.0 - T10 * dT2_dVg;
5732 dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd)
5733 + (T2 - 1.0) / n * dn_dVd;
5735 dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb)
5736 + (T2 - 1.0) / n * dn_dVb;
5741 dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3 *
dVgs_eff_dVg;
5742 dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3;
5743 dVgsteff_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / T3;
5754 T0 = 1.0 / (6.0e-8 - 2.0 * Weff);
5755 Weff = 2.0e-8 * (4.0e-8 - Weff) * T0;
5770 T1 = 1.0 / (17.0 + 20.0 * T0);
5779 dT1_dVb = -T1 / sqrtPhis * dsqrtPhis_dVb;
5782 tmp1 = Leff + 2.0 * T9;
5788 dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb;
5792 Abulk0 = 1.0 + T1 * T2;
5793 dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb;
5796 dAbulk_dVg = -T1 * T8;
5798 dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb);
5802 T9 = 1.0 / (3.0 - 20.0 * Abulk0);
5803 Abulk0 = (0.2 - Abulk0) * T9;
5804 dAbulk0_dVb *= T9 * T9;
5809 T9 = 1.0 / (3.0 - 20.0 *
Abulk);
5819 T0 = 1.0 / (1.0 + T2);
5824 T1 = 1.0 / (0.8 + T2);
5825 T0 = (17.0 + 20.0 * T2) * T1;
5830 dAbulk_dVb = dAbulk_dVb * T0 +
Abulk * dT0_dVb;
5831 dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb;
5838 T0 = Vgsteff + Vth + Vth;
5843 dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd;
5844 dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb +
paramPtr->
uc * T3;
5859 T0 = Vgsteff + Vth + Vth;
5866 dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd;
5867 dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb +
paramPtr->
uc * T4;
5876 T9 = 1.0 / (7.0 + 10.0 * T5);
5877 Denomi = (0.6 + T5) * T9;
5885 T9 = -
ueff / Denomi;
5886 dueff_dVg = T9 * dDenomi_dVg;
5887 dueff_dVd = T9 * dDenomi_dVd;
5888 dueff_dVb = T9 * dDenomi_dVb;
5892 WVCoxRds = WVCox * Rds;
5895 EsatL = Esat * Leff;
5897 dEsatL_dVg = T0 * dueff_dVg;
5898 dEsatL_dVd = T0 * dueff_dVd;
5899 dEsatL_dVb = T0 * dueff_dVb;
5913 T2 = sqrt(T1 * T1 + 0.0004 * T0);
5914 Lambda =
paramPtr->
a2 + T0 - 0.5 * (T1 + T2);
5915 dLambda_dVg = 0.5 *
paramPtr->
a1 * (1.0 + T1 / T2);
5921 Lambda = 0.5 * (T1 + T2);
5922 dLambda_dVg = 0.5 *
paramPtr->
a1 * (1.0 + T1 / T2);
5925 Vgst2Vtm = Vgsteff + 2.0 * Vtm;
5928 tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff;
5929 tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff;
5933 tmp2 = dWeff_dVg / Weff;
5934 tmp3 = dWeff_dVb / Weff;
5937 if ((Rds == 0.0) && (Lambda == 1.0))
5939 T0 = 1.0 / (
Abulk * EsatL + Vgst2Vtm);
5943 T3 = EsatL * Vgst2Vtm;
5946 dT0_dVg = -(
Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1;
5947 dT0_dVd = -(
Abulk * dEsatL_dVd) * T1;
5948 dT0_dVb = -(
Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1;
5950 dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0;
5951 dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd;
5952 dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb;
5956 tmp1 = dLambda_dVg / (Lambda * Lambda);
5957 T9 =
Abulk * WVCoxRds;
5960 T6 = Vgst2Vtm * WVCoxRds;
5961 T0 = 2.0 *
Abulk * (T9 - 1.0 + 1.0 / Lambda);
5962 dT0_dVg = 2.0 * (T8 * tmp2 -
Abulk * tmp1
5963 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg);
5965 dT0_dVb = 2.0 * (T8 * (2.0 /
Abulk * dAbulk_dVb + tmp3)
5966 + (1.0 / Lambda - 1.0) * dAbulk_dVb);
5968 T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) +
Abulk * EsatL + 3.0 * T7;
5970 dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1
5971 +
Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9
5972 + T7 * tmp2 + T6 * dAbulk_dVg);
5974 dT1_dVb =
Abulk * dEsatL_dVb + EsatL * dAbulk_dVb
5975 + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3);
5977 dT1_dVd =
Abulk * dEsatL_dVd;
5979 T2 = Vgst2Vtm * (EsatL + 2.0 * T6);
5980 dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg
5981 + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2);
5983 dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3);
5984 dT2_dVd = Vgst2Vtm * dEsatL_dVd;
5986 T3 = sqrt(T1 * T1 - 2.0 * T0 * T2);
5987 Vdsat = (T1 - T3) / T0;
5989 dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3;
5990 dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3;
5991 dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3;
5993 dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2
5994 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0;
5996 dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2
5997 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0;
5999 dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0;
6005 dT1_dVg = dVdsat_dVg;
6006 dT1_dVd = dVdsat_dVd - 1.0;
6007 dT1_dVb = dVdsat_dVb;
6012 dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg;
6013 dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd;
6014 dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb;
6016 Vdseff = Vdsat - 0.5 * (T1 + T2);
6017 dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg);
6018 dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd);
6019 dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb);
6030 tmp4 = 1.0 - 0.5 *
Abulk * Vdsat / Vgst2Vtm;
6033 T0 = EsatL + Vdsat + 2.0 * T9 * tmp4;
6035 T7 = 2.0 * WVCoxRds * tmp4;
6036 dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 *
Vgsteff)
6037 - T8 * (
Abulk * dVdsat_dVg -
Abulk * Vdsat / Vgst2Vtm
6038 + Vdsat * dAbulk_dVg);
6040 dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff
6041 - T8 * (dAbulk_dVb * Vdsat +
Abulk * dVdsat_dVb);
6042 dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 *
Abulk * dVdsat_dVd;
6044 T9 = WVCoxRds *
Abulk;
6045 T1 = 2.0 / Lambda - 1.0 + T9;
6046 dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg);
6047 dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3;
6050 dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1;
6051 dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1;
6052 dVasat_dVd = dT0_dVd / T1;
6062 dT0_dVb = -T0 / Abulk * dAbulk_dVb;
6063 dT0_dVg = -T0 / Abulk * dAbulk_dVg;
6065 T2 = Vgsteff / EsatL;
6066 T1 = Leff * (Abulk + T2);
6067 dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL + dAbulk_dVg);
6068 dT1_dVb = Leff * (dAbulk_dVb - T2 * dEsatL_dVb / EsatL);
6069 dT1_dVd = -T2 * dEsatL_dVd / Esat;
6072 VACLM = T9 * diffVds;
6073 dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg
6074 + T1 * diffVds * dT0_dVg;
6076 dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds
6079 dVACLM_dVd = T0 * dT1_dVd * diffVds + T9 * (1.0 - dVdseff_dVd);
6084 dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0;
6092 dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8
6093 + Vgst2Vtm * Vdsat * dAbulk_dVg;
6095 dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb);
6096 dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd;
6099 dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg;
6100 dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat;
6101 dT1_dVd = Abulk * dVdsat_dVd;
6106 VADIBL = (Vgst2Vtm - T0 / T1) / T2;
6107 dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2;
6108 dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2;
6109 dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2;
6114 T3 = 1.0 / (1.0 + T7);
6122 T4 = 1.0 / (0.8 + T7);
6123 T3 = (17.0 + 20.0 * T7) * T4;
6125 dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL *
paramPtr->
pdiblb * T4 * T4;
6134 dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0;
6143 dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL);
6144 dT0_dVb = -T9 * dEsatL_dVb / EsatL;
6145 dT0_dVd = -T9 * dEsatL_dVd / EsatL;
6149 T1 = 1.0 / (17.0 + 20.0 * T9);
6150 T0 = (0.8 + T9) * T1;
6152 dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T1;
6155 dT0_dVb = -T9 * dEsatL_dVb;
6156 dT0_dVd = -T9 * dEsatL_dVd;
6159 tmp1 = VACLM * VACLM;
6160 tmp2 = VADIBL * VADIBL;
6161 tmp3 = VACLM + VADIBL;
6163 T1 = VACLM * VADIBL / tmp3;
6165 dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3;
6166 dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3;
6167 dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3;
6169 Va = Vasat + T0 * T1;
6170 dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg;
6171 dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd;
6172 dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb;
6181 T1 = T0 * VASCBE / diffVds;
6182 dVASCBE_dVg = T1 * dVdseff_dVg;
6183 dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd);
6184 dVASCBE_dVb = T1 * dVdseff_dVb;
6189 dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0;
6195 dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0;
6200 beta =
ueff * CoxWovL;
6201 dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff;
6202 dbeta_dVd = CoxWovL * dueff_dVd;
6203 dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff;
6205 T0 = 1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm;
6206 dT0_dVg = -0.5 * (Abulk * dVdseff_dVg
6207 - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm;
6208 dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm;
6209 dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb *
Vdseff) / Vgst2Vtm;
6211 fgche1 = Vgsteff * T0;
6212 dfgche1_dVg = Vgsteff * dT0_dVg + T0;
6213 dfgche1_dVd = Vgsteff * dT0_dVd;
6214 dfgche1_dVb = Vgsteff * dT0_dVb;
6216 T9 = Vdseff / EsatL;
6218 dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL;
6219 dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL;
6220 dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL;
6222 gche = beta * fgche1 / fgche2;
6223 dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg
6224 - gche * dfgche2_dVg) / fgche2;
6226 dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd
6227 - gche * dfgche2_dVd) / fgche2;
6229 dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb
6230 - gche * dfgche2_dVb) / fgche2;
6232 T0 = 1.0 + gche * Rds;
6236 dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0
6237 - Idl * gche / T0 * dRds_dVg ;
6239 dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd) / T0;
6240 dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb
6241 - Idl * dRds_dVb * gche) / T0;
6246 dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va;
6247 dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd
6248 - T9 * dVa_dVd) / Va;
6250 dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va;
6252 T9 = diffVds / VASCBE;
6256 Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE;
6257 Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd
6258 - T9 * dVASCBE_dVd) / VASCBE;
6259 Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb
6260 + T9 * dVASCBE_dVb) / VASCBE;
6262 Gds +=
Gm * dVgsteff_dVd;
6263 Gmb +=
Gm * dVgsteff_dVb;
6271 Isub = Gbd = Gbb = Gbg = 0.0;
6279 T1 = T2 * diffVds * exp(T0);
6280 T3 = T1 / diffVds * (T0 - 1.0);
6281 dT1_dVg = T3 * dVdseff_dVg;
6282 dT1_dVd = T3 * (dVdseff_dVd - 1.0);
6283 dT1_dVb = T3 * dVdseff_dVb;
6289 dT1_dVg = -T3 * dVdseff_dVg;
6290 dT1_dVd = T3 * (1.0 - dVdseff_dVd);
6291 dT1_dVb = -T3 * dVdseff_dVb;
6294 Gbg = T1 * dIdsa_dVg + Idsa * dT1_dVg;
6295 Gbd = T1 * dIdsa_dVd + Idsa * dT1_dVd;
6296 Gbb = T1 * dIdsa_dVb + Idsa * dT1_dVb;
6298 Gbd += Gbg * dVgsteff_dVd;
6299 Gbb += Gbg * dVgsteff_dVb;
6300 Gbg *= dVgsteff_dVg;
6340 dVbseff_dVb = -dPhis_dVb;
6345 Vgst = Vgs_eff - Vth;
6351 Arg1 = Vgs_eff - Vbseff - Vfb;
6372 else if (Vgst <= 0.0)
6375 T2 = sqrt(T1 * T1 + Arg1);
6380 T0 =
CoxWL * T1 / T2;
6396 One_Third_CoxWL =
CoxWL / 3.0;
6397 Two_Third_CoxWL = 2.0 * One_Third_CoxWL;
6402 Vdsat = Vgst / AbulkCV;
6404 dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)/ AbulkCV;
6413 T2 = -Two_Third_CoxWL * Vgst;
6418 T2 = -One_Third_CoxWL * dVdsat_dVb;
6428 T3 = -(T2 + Two_Third_CoxWL * dVth_dVb);
6436 Alphaz = Vgst / Vdsat;
6437 T1 = 2.0 * Vdsat - Vds;
6438 T2 = Vds / (3.0 * T1);
6442 T7 = 2.0 * Vds - T1 - 3.0 * T3;
6443 T8 = T3 - T1 - 2.0 * Vds;
6453 T11 = -
CoxWL * T5 * dVdsat_dVb;
6458 dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg);
6459 dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb);
6463 T9 = 2.0 * T4 * (1.0 - 3.0 * T5);
6466 T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb;
6467 cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5);
6470 T9 = 2.0 * T4 * (1.0 + T5);
6471 T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) *
dVgs_eff_dVg;
6472 T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb;
6473 T12 = T4 * (2.0 * T2 + T5 - 1.0);
6474 T0 = -(T10 + T11 + T12);
6479 cbsb = -(cgsb + cdsb + T0);
6490 T2 = -Two_Third_CoxWL * Vgst;
6496 T2 = -One_Third_CoxWL * dVdsat_dVb;
6500 T3 = 0.4 * Two_Third_CoxWL;
6508 T3 = -(T2 + Two_Third_CoxWL * dVth_dVb);
6515 Alphaz = Vgst / Vdsat;
6516 T1 = 2.0 * Vdsat - Vds;
6517 T2 = Vds / (3.0 * T1);
6525 tmp = -
CoxWL * T5 * dVdsat_dVb;
6530 dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg);
6531 dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb);
6533 T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds;
6535 T7 = Vds - T1 - T8 * T6;
6539 tmp1 = T4*(2.0 - 4.0 * tmp * T6 + T8 *(16.0 * Vdsat - 6.0 *Vds));
6543 T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb;
6544 cddb = T4 * (2.0 - (1.0 / (3.0 * T1
6545 * T1) + 2.0 * tmp) * T6 + T8
6546 * (6.0 * Vdsat - 2.4 * Vds));
6550 T7 = 2.0 * (T1 + T3);
6553 T0 = 4.0 * T4 * (1.0 - T5);
6554 T12 = (-T7 * dAlphaz_dVg -
cdgb
6556 T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb;
6557 T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5)
6560 tmp = -(T10 + T11 + T12);
6574 T2 = -Two_Third_CoxWL * Vgst;
6579 T2 = -One_Third_CoxWL * dVdsat_dVb;
6585 T4 = One_Third_CoxWL * dVth_dVb;
6589 T3 = -(T2 + Two_Third_CoxWL * dVth_dVb);
6596 Alphaz = Vgst / Vdsat;
6597 T1 = 2.0 * Vdsat - Vds;
6598 T2 = Vds / (3.0 * T1);
6608 tmp = -
CoxWL * T5 * dVdsat_dVb;
6613 dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg);
6614 dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb);
6620 T0 = T4 * (2.0 * T5 - 2.0);
6623 T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb;
6624 cddb = T4 * (1.0 - 2.0 * T2 - T5);
6640 dVbseffCV_dVb = 1.0;
6645 dVbseffCV_dVb = -dPhis_dVb;
6656 VgstNVt = (Vgst - voffcv) / T0;
6660 Vgsteff = Vgst - voffcv;
6662 dVgsteff_dVd = -dVth_dVd;
6663 dVgsteff_dVb = -dVth_dVb;
6669 dVgsteff_dVd = Vgsteff / noff;
6670 dVgsteff_dVb = dVgsteff_dVd * dnoff_dVb;
6671 dVgsteff_dVd *= dnoff_dVd;
6675 ExpVgst = exp(VgstNVt);
6676 Vgsteff = T0 * log(1.0 + ExpVgst);
6677 dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst);
6678 dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgst - voffcv)
6679 / noff * dnoff_dVd) + Vgsteff / noff * dnoff_dVd;
6680 dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgst - voffcv)
6681 / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb;
6688 Arg1 = Vgs_eff - VbseffCV - Vfb -
Vgsteff;
6695 Cgb = -
CoxWL * (dVbseffCV_dVb + dVgsteff_dVb);
6700 T1 = sqrt(T0 * T0 + Arg1);
6701 T2 =
CoxWL * T0 / T1;
6706 Cgd = -T2 * dVgsteff_dVd;
6707 Cgb = -T2 * (dVbseffCV_dVb + dVgsteff_dVb);
6714 One_Third_CoxWL =
CoxWL / 3.0;
6715 Two_Third_CoxWL = 2.0 * One_Third_CoxWL;
6718 VdsatCV = Vgsteff / AbulkCV;
6722 dVdsatCV_dVg = 1.0 / AbulkCV;
6723 dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV;
6724 T0 = Vgsteff - VdsatCV / 3.0;
6725 dT0_dVg = 1.0 - dVdsatCV_dVg / 3.0;
6726 dT0_dVb = -dVdsatCV_dVb / 3.0;
6728 Cgg1 =
CoxWL * dT0_dVg;
6729 Cgb1 =
CoxWL * dT0_dVb + Cgg1 * dVgsteff_dVb;
6730 Cgd1 = Cgg1 * dVgsteff_dVd;
6731 Cgg1 *= dVgsteff_dVg;
6737 dT0_dVg = dVdsatCV_dVg - 1.0;
6738 dT0_dVb = dVdsatCV_dVb;
6739 qbulk += One_Third_CoxWL * T0;
6740 Cbg1 = One_Third_CoxWL * dT0_dVg;
6741 Cbb1 = One_Third_CoxWL * dT0_dVb + Cbg1 * dVgsteff_dVb;
6742 Cbd1 = Cbg1 * dVgsteff_dVd;
6743 Cbg1 *= dVgsteff_dVg;
6750 else T0 = -One_Third_CoxWL;
6753 Csg = T0 * dVgsteff_dVg;
6754 Csb = T0 * dVgsteff_dVb;
6755 Csd = T0 * dVgsteff_dVd;
6763 T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.e-20);
6766 dT3_dVg = -12.0 * T2 * T2 * AbulkCV;
6767 dT3_dVd = 6.0 * T0 * (4.0 * Vgsteff - T0) / T1 / T1 - 0.5;
6768 dT3_dVb = 12.0 * T2 * T2 * dAbulkCV_dVb *
Vgsteff;
6771 Cgg1 =
CoxWL * (1.0 + dT3_dVg);
6772 Cgb1 =
CoxWL * dT3_dVb + Cgg1 * dVgsteff_dVb;
6773 Cgd1 =
CoxWL * dT3_dVd + Cgg1 * dVgsteff_dVd;
6774 Cgg1 *= dVgsteff_dVg;
6779 qbulk +=
CoxWL * (1.0 - AbulkCV) * (0.5 * Vds - T3);
6780 Cbg1 = -
CoxWL * ((1.0 - AbulkCV) * dT3_dVg);
6781 Cbb1 = -
CoxWL * ((1.0 - AbulkCV) * dT3_dVb
6782 + (0.5 * Vds - T3) * dAbulkCV_dVb)
6783 + Cbg1 * dVgsteff_dVb;
6784 Cbd1 = -
CoxWL * (1.0 - AbulkCV) * dT3_dVd
6785 + Cbg1 * dVgsteff_dVd;
6786 Cbg1 *= dVgsteff_dVg;
6794 qsrc = -
CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1);
6795 Csg = -
CoxWL * (0.5 + 24.0 * T0 * Vds / T1 / T1 * AbulkCV);
6796 Csb = -
CoxWL * (0.25 * Vds * dAbulkCV_dVb
6797 - 12.0 * T0 * Vds / T1 / T1 * (4.0 * Vgsteff - T0)
6798 * dAbulkCV_dVb) + Csg * dVgsteff_dVb;
6799 Csd = -
CoxWL * (0.25 * AbulkCV - 12.0 * AbulkCV * T0
6800 / T1 / T1 * (4.0 * Vgsteff - T0))
6801 + Csg * dVgsteff_dVd;
6802 Csg *= dVgsteff_dVg;
6807 T2 = 0.5 *
CoxWL / (T1 * T1);
6808 T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff
6809 * (Vgsteff - 4.0 * T0 / 3.0))
6810 - 2.0 * T0 * T0 * T0 / 15.0;
6812 T4 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0)
6814 Csg = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0
6815 * Vgsteff - 8.0 * T0 / 3.0)
6816 + 2.0 * T0 * T0 / 3.0);
6817 Csb = (qsrc / T1 * Vds + T2 * T4 * Vds) * dAbulkCV_dVb
6818 + Csg * dVgsteff_dVb;
6819 Csd = (qsrc / T1 + T2 * T4) * AbulkCV
6820 + Csg * dVgsteff_dVd;
6821 Csg *= dVgsteff_dVg;
6826 Csg = -0.5 * (Cgg1 + Cbg1);
6827 Csb = -0.5 * (Cgb1 + Cbb1);
6828 Csd = -0.5 * (Cgd1 + Cbd1);
6852 T0 = sqrt(V3 * V3 - 4.0 * CONSTDELTA_3 * Vfb);
6853 T2 = -CONSTDELTA_3 / T0;
6857 T0 = sqrt(V3 * V3 + 4.0 * CONSTDELTA_3 * Vfb);
6858 T2 = CONSTDELTA_3 / T0;
6861 T1 = 0.5 * (1.0 + V3 / T0);
6862 Vfbeff = Vfb - 0.5 * (V3 + T0);
6864 dVfbeff_dVb = -T1 * dVbseffCV_dVb;
6865 Qac0 =
CoxWL * (Vfbeff - Vfb);
6866 dQac0_dVg =
CoxWL * dVfbeff_dVg;
6867 dQac0_dVb =
CoxWL * dVfbeff_dVb;
6870 T3 = Vgs_eff - Vfbeff - VbseffCV -
Vgsteff;
6883 T1 = sqrt(T0 * T0 + T3);
6884 T2 =
CoxWL * T0 / T1;
6889 dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg);
6890 dQsub0_dVd = -T2 * dVgsteff_dVd;
6891 dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb);
6895 VdsatCV = Vgsteff / AbulkCV;
6898 T0 = sqrt(V4 * V4 + 4.0 * CONSTDELTA_4 * VdsatCV);
6899 VdseffCV = VdsatCV - 0.5 * (V4 + T0);
6900 T1 = 0.5 * (1.0 + V4 / T0);
6901 T2 = CONSTDELTA_4 / T0;
6902 T3 = (1.0 - T1 - T2) / AbulkCV;
6905 dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb;
6910 dVdseffCV_dVg = 0.0;
6911 dVdseffCV_dVb = 0.0;
6914 T0 = AbulkCV * VdseffCV;
6915 T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20);
6919 T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV);
6920 T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5);
6921 T6 = 12.0 * T2 * T2 *
Vgsteff;
6923 qinoi = -
CoxWL * (Vgsteff - 0.5 * T0 + AbulkCV * T3);
6924 qgate =
CoxWL * (Vgsteff - 0.5 * VdseffCV + T3);
6925 Cgg1 =
CoxWL * (T4 + T5 * dVdseffCV_dVg);
6926 Cgd1 =
CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd;
6927 Cgb1 =
CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
6928 + Cgg1 * dVgsteff_dVb;
6929 Cgg1 *= dVgsteff_dVg;
6933 T4 = -T7 * (T4 - 1.0);
6935 T6 = -(T7 * T6 + (0.5 * VdseffCV - T3));
6936 Cbg1 =
CoxWL * (T4 + T5 * dVdseffCV_dVg);
6937 Cbd1 =
CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd;
6938 Cbb1 =
CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
6939 + Cbg1 * dVgsteff_dVb;
6940 Cbg1 *= dVgsteff_dVg;
6945 qsrc = -
CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1);
6946 T7 = (4.0 * Vgsteff - T0) / (T1 * T1);
6947 T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1));
6948 T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7);
6949 T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7);
6950 Csg =
CoxWL * (T4 + T5 * dVdseffCV_dVg);
6951 Csd =
CoxWL * T5 * dVdseffCV_dVd +
Csg * dVgsteff_dVd;
6952 Csb =
CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
6953 +
Csg * dVgsteff_dVb;
6954 Csg *= dVgsteff_dVg;
6959 T2 = 0.5 *
CoxWL / (T1 * T1);
6960 T3 = Vgsteff *(2.0 * T0 *T0/3.0 +Vgsteff *(Vgsteff - 4.0 *T0/ 3.0))
6961 - 2.0 * T0 * T0 * T0 / 15.0;
6963 T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0)
6965 T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0
6966 * Vgsteff - 8.0 * T0 / 3.0)
6967 + 2.0 * T0 * T0 / 3.0);
6968 T5 = (qsrc / T1 + T2 * T7) * AbulkCV;
6969 T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV);
6970 Csg = (T4 + T5 * dVdseffCV_dVg);
6971 Csd = T5 * dVdseffCV_dVd +
Csg * dVgsteff_dVd;
6972 Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
6973 +
Csg * dVgsteff_dVb;
6974 Csg *= dVgsteff_dVg;
6979 Csg = -0.5 * (Cgg1 + Cbg1);
6980 Csb = -0.5 * (Cgb1 + Cbb1);
6981 Csd = -0.5 * (Cgd1 + Cbd1);
6984 qgate += Qac0 + Qsub0;
6985 qbulk -= (Qac0 + Qsub0);
6988 Cgg = dQac0_dVg + dQsub0_dVg + Cgg1;
6989 Cgd = dQsub0_dVd + Cgd1;
6990 Cgb = dQac0_dVb + dQsub0_dVb + Cgb1;
6992 Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg;
6993 Cbd = Cbd1 - dQsub0_dVd;
6994 Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb;
7019 T2 = -CONSTDELTA_3 / T0;
7024 T2 = CONSTDELTA_3 / T0;
7027 T1 = 0.5 * (1.0 + V3 / T0);
7030 dVfbeff_dVb = -T1 * dVbseffCV_dVb;
7035 dT0_dVg = dVgs_eff_dVg / Tox;
7036 dT0_dVb = -dVbseffCV_dVb / Tox;
7043 dTcen_dVb = dTcen_dVg * dT0_dVb;
7044 dTcen_dVg *= dT0_dVg;
7049 dTcen_dVg = dTcen_dVb = 0.0;
7054 dTcen_dVg = dTcen_dVb = 0.0;
7061 T1 = 0.5 * (1.0 + V3 / V4);
7066 T2 = Cox / (Cox + Ccen);
7069 dCoxeff_dVg = T2 * T2 * T3;
7070 dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb;
7071 dCoxeff_dVg *= dTcen_dVg;
7072 CoxWLcen =
CoxWL * Coxeff / Cox;
7075 QovCox = Qac0 / Coxeff;
7076 dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg;
7077 dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb;
7080 T3 = Vgs_eff - Vfbeff - VbseffCV -
Vgsteff;
7093 T1 = sqrt(T0 * T0 + T3);
7094 T2 = CoxWLcen * T0 / T1;
7098 QovCox = Qsub0 / Coxeff;
7099 dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg)
7100 + QovCox * dCoxeff_dVg;
7101 dQsub0_dVd = -T2 * dVgsteff_dVd;
7102 dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb)
7103 + QovCox * dCoxeff_dVb;
7118 DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi);
7119 dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff);
7127 { T0 = (Vgsteff + T3) / Tox;
7128 dT0_dVd = (dVgsteff_dVd + 4.0 * dVth_dVd) / Tox;
7129 dT0_dVb = (dVgsteff_dVb + 4.0 * dVth_dVb) / Tox;
7132 { T0 = (Vgsteff + 1.0e-20) / Tox;
7133 dT0_dVd = dVgsteff_dVd / Tox;
7134 dT0_dVb = dVgsteff_dVb / Tox;
7136 tmp = exp(0.7 * log(T0));
7138 T2 = 0.7 * tmp / (T0 * Tox);
7140 dTcen_dVg = -1.9e-9 * T2 / T1 /T1;
7141 dTcen_dVd = Tox * dTcen_dVg;
7142 dTcen_dVb = dTcen_dVd * dT0_dVb;
7143 dTcen_dVd *= dT0_dVd;
7144 dTcen_dVg *= dVgsteff_dVg;
7147 T0 = Cox / (Cox + Ccen);
7150 dCoxeff_dVg = T0 * T0 * T1;
7151 dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd;
7152 dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb;
7153 dCoxeff_dVg *= dTcen_dVg;
7154 CoxWLcen =
CoxWL * Coxeff / Cox;
7158 VdsatCV = (Vgsteff - DeltaPhi) / AbulkCV;
7160 T0 = sqrt(V4 * V4 + 4.0 * CONSTDELTA_4 * VdsatCV);
7161 VdseffCV = VdsatCV - 0.5 * (V4 + T0);
7162 T1 = 0.5 * (1.0 + V4 / T0);
7163 T2 = CONSTDELTA_4 / T0;
7164 T3 = (1.0 - T1 - T2) / AbulkCV;
7168 dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb;
7173 dVdseffCV_dVg = 0.0;
7174 dVdseffCV_dVb = 0.0;
7177 T0 = AbulkCV * VdseffCV;
7178 T1 = Vgsteff - DeltaPhi;
7179 T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20);
7181 T4 = 1.0 - 12.0 * T3 * T3;
7182 T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5);
7183 T6 = T5 * VdseffCV / AbulkCV;
7185 qgate = qinoi = CoxWLcen * (T1 - T0 * (0.5 - T3));
7186 QovCox =
qgate / Coxeff;
7187 Cgg1 = CoxWLcen * (T4 * (1.0 -
dDeltaPhi_dVg) + T5 * dVdseffCV_dVg);
7188 Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1
7189 * dVgsteff_dVd + QovCox * dCoxeff_dVd;
7190 Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
7191 + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb;
7192 Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg;
7197 T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV);
7199 T11 = -T7 * T5 / AbulkCV;
7200 T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2));
7202 qbulk = CoxWLcen * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2);
7203 QovCox =
qbulk / Coxeff;
7204 Cbg1 = CoxWLcen * (T10 + T11 * dVdseffCV_dVg);
7205 Cbd1 = CoxWLcen * T11 * dVdseffCV_dVd + Cbg1
7206 * dVgsteff_dVd + QovCox * dCoxeff_dVd;
7207 Cbb1 = CoxWLcen * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb)
7208 + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb;
7209 Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg;
7213 qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2);
7214 QovCox =
qsrc / Coxeff;
7217 T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3);
7222 Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg);
7223 Csd = CoxWLcen * T5 * dVdseffCV_dVd +
Csg * dVgsteff_dVd
7224 + QovCox * dCoxeff_dVd;
7225 Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
7226 +
Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb;
7227 Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg;
7232 T3 = 0.5 * CoxWLcen / (T2 * T2);
7233 T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0
7234 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0;
7236 QovCox = qsrc / Coxeff;
7237 T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0;
7238 T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0
7239 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0);
7240 T6 = AbulkCV * (qsrc / T2 + T3 * T8);
7241 T7 = T6 * VdseffCV / AbulkCV;
7244 Csd =
Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd
7245 + QovCox * dCoxeff_dVd;
7246 Csb =
Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb
7247 + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb;
7248 Csg =
Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg;
7259 qbulk -= (Qac0 + Qsub0);
7262 Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg;
7263 Cbd = Cbd1 - dQsub0_dVd;
7264 Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb;
7310 if (drainPerimeter < paramPtr->weff)
7322 if (sourcePerimeter < paramPtr->weff)
7343 capbs = czbs + czbssw + czbsswg;
7351 if (MJ == 0.5) sarg = 1.0 / sqrt(arg);
7352 else sarg = exp(-MJ * log(arg));
7355 qbs =
PhiBTemp * czbs * (1.0 - arg * sarg) / (1.0 - MJ);
7357 capbs = czbs * sarg;
7369 if (MJSW == 0.5) sarg = 1.0 / sqrt(arg);
7370 else sarg = exp(-MJSW * log(arg));
7373 qbs +=
PhiBSWTemp * czbssw * (1.0 - arg * sarg) / (1.0 - MJSW);
7375 capbs += czbssw * sarg;
7381 if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg);
7382 else sarg = exp(-MJSWG * log(arg));
7385 qbs +=
PhiBSWGTemp * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWG);
7387 capbs += czbsswg * sarg;
7393 T0 = czbs + czbssw + czbsswg;
7394 T1 = vbs * (czbs * MJ /
PhiBTemp + czbssw * MJSW
7398 qbs = vbs * (T0 + 0.5 * T1);
7407 capbd = czbd + czbdsw + czbdswg;
7414 if (MJ == 0.5) sarg = 1.0 / sqrt(arg);
7415 else sarg = exp(-MJ * log(arg));
7418 qbd =
PhiBTemp * czbd * (1.0 - arg * sarg) / (1.0 - MJ);
7419 capbd = czbd * sarg;
7431 if (MJSW == 0.5) sarg = 1.0 / sqrt(arg);
7432 else sarg = exp(-MJSW * log(arg));
7435 qbd +=
PhiBSWTemp * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSW);
7436 capbd += czbdsw * sarg;
7442 if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg);
7443 else sarg = exp(-MJSWG * log(arg));
7446 qbd +=
PhiBSWGTemp * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWG);
7447 capbd += czbdswg * sarg;
7452 T0 = czbd + czbdsw + czbdswg;
7457 qbd =
vbd * (T0 + 0.5 * T1);
7486 gtau = gtau_drift + gtau_diff;
7545 T1 = sqrt(T0 * T0 + 4.0 * CONSTDELTA_1);
7546 T2 = 0.5 * (T0 - T1);
7550 cgdo =
paramPtr->
cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1);
7556 T1 = sqrt(T0 * T0 + 4.0 * CONSTDELTA_1);
7557 T2 = 0.5 * (T0 - T1);
7560 cgso =
paramPtr->
cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1);
7616 bool bsuccess =
true;
7691 double cdAbs, esat, DelClm, EffFreq, N0, Nl, Vgst, Leff, Leffsq;
7692 double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
7696 Leffsq = Leff * Leff;
7707 if (DelClm < 0.0) DelClm = 0.0;
7720 T6 = 8.62e-5 * temp * cdAbs * cdAbs;
7725 T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
7727 Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
7756 noiseData.
resize(numSources);
7767 std::string(
"_1overf");
7820 std::cout <<
"---------------------------------" <<std::endl;
7821 std::cout <<
"BSIM3::getNoiseSources:"<<std::endl;
7824 std::cout <<
"gm = " <<
gm <<std::endl;
7825 std::cout <<
"gds = " <<
gds <<std::endl;
7826 std::cout <<
"gmbs = " <<
gmbs <<std::endl;
7827 std::cout <<
"vds = " <<
vds <<std::endl;
7828 std::cout <<
"vdsat = " <<
vdsat <<std::endl;
7829 std::cout <<
"cd = " <<
cd <<std::endl;
7830 std::cout <<
"---------------------------------" <<std::endl;
7852 2.0 * fabs(
gm +
gds +
gmbs) / 3.0, temp);
7858 double vdsLocal = std::min(
vds,
vdsat);
7886 double vdsLocal =
vds;
7889 vdsLocal = -vdsLocal;
7891 double Ssi,Swi,T10,T11,T1;
7895 Swi = T10 / T11 *
cd *
cd;
7899 noiseData.
noiseDens[3] = (Ssi * Swi) / T1;
7937 double Qqcheq = 0.0;
7962 qVec[
li_Bulk] += (Qeqqb)*numberParallel;
7984 qVec[
li_Charge] += -(Qqcheq - Qqdef)*numberParallel;
8088 msg =
"Instance::auxChargeCalculations ()";
8089 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
8090 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
8786 msg =
"Instance::loadDAEdQdx";
8787 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
8788 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
8880 += (-
gbgs)*numberParallel;
8941 msg =
"Instance::loadDAEdFdx";
8942 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
8943 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
9002 bool bsuccess =
true;
9041 cox = 3.453133e-11 / tox;
9042 if (!
given(
"TOXM")) toxm = tox;
9043 if (!
given(
"DSUB")) dsub = drout;
9044 if (!
given(
"LLC")) Llc = Ll;
9045 if (!
given(
"LWC")) Lwc = Lw;
9046 if (!
given(
"LWLC")) Lwlc = Lwl;
9047 if (!
given(
"WLC")) Wlc = Wl;
9048 if (!
given(
"WWL")) Wwlc = Wwl;
9049 if (!
given(
"WWLC")) Wwlc = Wwl;
9050 if (!
given(
"DWC")) dwc = Wint;
9051 if (!
given(
"DLC")) dlc = Lint;
9057 double C2 = 1.0 + (0.4e-6 / tox);
9058 double C3 = log(C2);
9064 if (
given(
"DLC") && (dlc > 0.0))
cgdo = dlc * cox - cgdl ;
9065 else cgdo = 0.6 * xj * cox;
9070 if (
given(
"DLC") && (dlc > 0.0))
cgso = dlc * cox - cgsl ;
9071 else cgso = 0.6 * xj * cox;
9074 if (!
given(
"CGBO")) cgbo = 2.0 * dwc * cox;
9076 if (!
given(
"CJSWG"))
9077 unitLengthGateSidewallJctCap = unitLengthSidewallJctCap ;
9079 if (!
given(
"PBSWG"))
9080 GatesidewallJctPotential = sidewallJctPotential;
9082 if (!
given(
"MJSWG"))
9083 bulkJctGateSideGradingCoeff = bulkJctSideGradingCoeff;
9087 if (bulkJctPotential < 0.1)
9089 bulkJctPotential = 0.1;
9090 msg =
"Given pb is less than 0.1. Pb is set to 0.1.\n";
9091 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::USR_WARNING_0,msg);
9094 if (sidewallJctPotential < 0.1)
9096 sidewallJctPotential = 0.1;
9097 msg =
"Given pbsw is less than 0.1. Pbsw is set to 0.1.\n";
9098 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::USR_WARNING_0,msg);
9101 if (GatesidewallJctPotential < 0.1)
9103 GatesidewallJctPotential = 0.1;
9104 msg =
"Given pbswg is less than 0.1. Pbswg is set to 0.1.\n";
9105 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::USR_WARNING_0,msg);
9114 * exp(21.5565981 - Eg0 / (2.0 * Vtm0));
9121 clearTemperatureData();
9136 std::vector<Instance*>::iterator iter;
9137 std::vector<Instance*>::iterator first = instanceContainer.begin();
9138 std::vector<Instance*>::iterator last = instanceContainer.end();
9140 for (iter=first; iter!=last; ++iter)
9142 (*iter)->processParams();
9160 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
9519 sheetResistance (0.0),
9520 jctSatCurDensity (0.0),
9521 jctSidewallSatCurDensity (0.0),
9522 bulkJctPotential (0.0),
9523 bulkJctBotGradingCoeff (0.0),
9524 bulkJctSideGradingCoeff (0.0),
9525 bulkJctGateSideGradingCoeff (0.0),
9526 sidewallJctPotential (0.0),
9527 GatesidewallJctPotential (0.0),
9528 unitAreaJctCap (0.0),
9529 unitLengthSidewallJctCap (0.0),
9530 unitLengthGateSidewallJctCap (0.0),
9531 jctEmissionCoeff (0.0),
9532 jctTempExponent (0.0),
9568 oxideTrapDensityA (0.0),
9569 oxideTrapDensityB (0.0),
9570 oxideTrapDensityC (0.0),
9596 else if (
getType() ==
"PMOS") {
9612 #ifdef Xyce_BSIM3_USE_DEFL
9622 Report::DevelFatal0() <<
"TNOM is zero";
9631 uc = (
mobMod == 3) ? -0.0465 : -0.0465e-9;
9633 uc1 = (
mobMod == 3) ? -0.056 : -0.056e-9;
9671 std::list<SizeDependParam*>::iterator it_dpL =
9673 std::list<SizeDependParam*>::iterator end_dpL =
9675 for( ; it_dpL != end_dpL; ++it_dpL )
9680 std::vector<Instance*>::iterator iter;
9684 for (iter=first; iter!=last; ++iter)
9701 std::vector<Instance*>::const_iterator iter;
9707 os <<
" name modelName Parameters" << std::endl;
9709 for (i=0, iter=first; iter!=last; ++iter,++i)
9711 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
9737 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
9758 std::list<SizeDependParam*>::iterator it_dpL =
9760 std::list<SizeDependParam*>::iterator end_dpL =
9762 for( ; it_dpL != end_dpL; ++it_dpL )
9784 bool bsuccess =
true;
9790 bsuccess = bsuccess && btmp;
9859 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV)
10109 double Qeqqg = 0.0;
10110 double Qeqqb = 0.0;
10111 double Qeqqd = 0.0;
10112 double Qqdef = 0.0;
10113 double Qqcheq = 0.0;
10134 Qqcheq = -mi.
qcheq;
10198 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
10354 msg =
"Instance::loadDAEMatrices";
10355 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
10356 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
10469 msg =
"Master::loadDAEMatrices";
10470 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
10471 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
10489 int sizeInstances = instanceContainer_.size();
10490 for (
int i=0; i<sizeInstances; ++i)
10492 Instance & mi = *(instanceContainer_.at(i));
10645 msg =
"Master::loadDAEMatrices";
10646 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
10647 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
10759 msg =
"Master::loadDAEMatrices";
10760 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
10761 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
10777 .registerDevice(
"m", 9)
10778 .registerDevice(
"m", 49)
10779 .registerModelType(
"pmos", 9)
10780 .registerModelType(
"nmos", 9)
10781 .registerModelType(
"pmos", 49)
10782 .registerModelType(
"nmos", 49);
const InstanceName & getName() const
double defad
MOS drain diffusion area.
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &Miter, const FactoryBlock &factory_block)
double * q_GateEquDrainPrimeNodePtr
double jctSidewallSatCurDensity
int ASourcePrimeEquChargeVarOffset
double unitAreaJctCapTemp
double defw
MOS channel width.
double * currStoVectorRawPtr
double * q_SourcePrimeEquSourcePrimeNodePtr
bool updateDependentParameters()
int ASourcePrimeEquBulkNodeOffset
double * q_GateEquChargeVarPtr
const DeviceOptions & deviceOptions_
std::vector< int > jacSpecialMap
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
double * daeQVectorRawPtr
double * f_BulkEquSourcePrimeNodePtr
double * f_SourceEquIgsPtr
static std::vector< std::vector< int > > jacMap2
double * q_DrainPrimeEquSourcePrimeNodePtr
double pdt_
Previous delta time alpha/dt (Many devices)
double unitLengthGateSidewallJctCapTemp
double * dFdxdVpVectorRawPtr
double * q_SourcePrimeEquGateNodePtr
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
int AChargeEquBulkNodeOffset
double * q_BulkEquBulkNodePtr
double pnjlim(double vnew, double vold, double vt, double vcrit, int *icheck)
void registerStoreLIDs(const std::vector< int > &stoLIDVecRef)
int AChargeEquChargeVarOffset
std::vector< int > devConMap
static std::vector< int > jacMap_DC
bool given(const std::string ¶meter_name) const
double * f_SourceEquSourcePrimeNodePtr
int ABulkEquChargeVarOffset
Pure virtual class to augment a linear system.
Parameter may be specified as time dependent expression from netlist.
double StrongInversionNoiseEval(double Vds, double freq, double temp)
double * q_BulkEquChargeVarPtr
bool setupCapacitors_oldDAE()
std::list< SizeDependParam * > sizeDependParamList
void addInternalNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
int ADrainPrimeEquBulkNodeOffset
std::vector< int > jacSpecialMergedMap
int ASourcePrimeEquDrainPrimeNodeOffset
double unitLengthSidewallJctCapTemp
const std::string & getEncodedName() const
Return the instance name encoded as: [s:]*xname [s:]*Ytype!name [s:]*Utype!name!count.
double * currStaVectorRawPtr
double * q_SourceEquSourcePrimeNodePtr
double * f_DrainPrimeEquSourcePrimeNodePtr
static std::vector< std::vector< int > > jacMap2_DC_SC
double * f_icVGSEquIgsPtr
double * q_SourceEquIdsPtr
static std::vector< int > jacMap_SC
double * f_SourcePrimeEquChargeVarPtr
SizeDependParam * paramPtr
void setNumStoreVars(int num_store_vars)
std::vector< double > gainScale_
MOSFET Devices, ArtificialParameters.
int ABulkEquSourcePrimeNodeOffset
double getRandomPerturbation()
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...
double * q_DrainPrimeEquDrainPrimeNodePtr
bool clearTemperatureData()
std::vector< int > li_Pos
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
int AChargeEquSourcePrimeNodeOffset
double * q_icVBSEquIbsPtr
virtual void registerJacLIDs(const JacobianStamp &jacLIDVec)
Parameter is subject to being set to minimum lead resistance.
bool updateTemperatureCalled_
std::vector< Instance * > instanceContainer
int ADrainEquDrainPrimeNodeOffset
double fetlim(double vnew, double vold, double vto)
double * q_icVDSEquIdsPtr
int AGateEquBulkNodeOffset
double * f_SourceEquIbsPtr
double defl
MOS channel length.
int ASourceEquSourceNodeOffset
double * f_DrainPrimeEquChargeVarPtr
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
double tnom
nominal temperature for device params.
Model & model_
Owning model.
static void loadModelParameters(ParametricData< Model > &model_parameters)
double * storeLeadCurrQCompRawPtr
double * f_ChargeEquBulkNodePtr
double * f_SourcePrimeEquGateNodePtr
void getNoiseSources(Xyce::Analysis::NoiseData &noiseData)
void setupNoiseSources(Xyce::Analysis::NoiseData &noiseData)
int getNumStoreVars() const
InstanceVector::const_iterator getInstanceBegin() const
Returns an iterator to the beginning of the vector of all instances created for this device...
double * q_DrainPrimeEquChargeVarPtr
double sidewallJctPotential
double contVgst(double vgst, double alpha, double vgstConst=3.0)
std::vector< Param > params
Parameters from the line.
std::vector< double > noiseDens
static std::vector< std::vector< int > > jacStamp_DC_SC
double * q_SourceEquIgsPtr
int ADrainPrimeEquSourcePrimeNodeOffset
std::vector< std::string > noiseNames
double * f_BulkEquChargeVarPtr
void setParams(const std::vector< Param > ¶ms)
const std::string & getName() const
double * daeFVectorRawPtr
double * f_GateEquChargeVarPtr
friend class SizeDependParam
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
double * q_DrainEquIdsPtr
double unitLengthGateSidewallJctCap
const DeviceOptions & getDeviceOptions() const
int ADrainPrimeEquDrainNodeOffset
double * q_ChargeEquChargeVarPtr
double bulkJctGateSideGradingCoeff
double * nextStoVectorRawPtr
double * f_SourceEquSourceNodePtr
virtual std::ostream & printOutInstances(std::ostream &os) const
int AChargeEquDrainPrimeNodeOffset
double * f_GateEquGateNodePtr
double * f_DrainPrimeEquBulkNodePtr
double * f_ChargeEquChargeVarPtr
bool updateTemperature(const double &temp_tmp)
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
double limvds(double vnew, double vold)
double * q_BulkEquDrainPrimeNodePtr
bool updatePrimaryState()
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
const std::vector< std::vector< int > > & jacobianStamp() const
Linear::Matrix * dFdxMatrixPtr
double referenceTemperature
const DeviceOptions & getDeviceOptions() const
Returns the device options given during device construction.
bool setupCapacitors_newDAE()
bool processInstanceParams()
processInstanceParams
The Device class is an interface for device implementations.
bool updateIntermediateVars()
double * f_icVBSEquIbsPtr
int AChargeEquGateNodeOffset
int ASourcePrimeEquGateNodeOffset
void addStoreNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
double jctTempSatCurDensity
int ASourceEquSourcePrimeNodeOffset
double * q_DrainPrimeEquBulkNodePtr
int ADrainPrimeEquChargeVarOffset
double bulkJctSideGradingCoeff
double GatesidewallJctPotential
double * f_GateEquBulkNodePtr
static std::vector< std::vector< int > > jacMap2_SC
double defas
MOS source diffusion area.
double * f_SourceEquIdsPtr
double * q_ChargeEquSourcePrimeNodePtr
double * q_DrainEquDrainPrimeNodePtr
std::vector< std::vector< int > > jacSpecialMap2
int ABulkEquDrainPrimeNodeOffset
const SolverState & solverState_
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
int getGainScaleBlockID(int numBlocks)
double * dQdxdVpVectorRawPtr
Class Configuration contains device configuration data.
std::vector< double > lnNoiseDens
bool processParams()
processParams
std::vector< std::vector< int > > jacSpecialMergedMap2
double * f_SourcePrimeEquBulkNodePtr
double * f_DrainEquIdsPtr
double * q_BulkEquGateNodePtr
double * f_ChargeEquGateNodePtr
double * q_SourceEquSourceNodePtr
int ABulkEquBulkNodeOffset
static std::vector< int > jacMap
double * f_SourcePrimeEquSourcePrimeNodePtr
double * q_DrainEquDrainNodePtr
double * f_GateEquSourcePrimeNodePtr
double * q_SourcePrimeEquDrainPrimeNodePtr
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 * q_SourceEquIbsPtr
double unitLengthSidewallJctCap
double * q_DrainPrimeEquGateNodePtr
double * q_BulkEquSourcePrimeNodePtr
int ABulkEquGateNodeOffset
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.
const SolverState & getSolverState() const
double * f_DrainEquDrainNodePtr
double * q_ChargeEquDrainPrimeNodePtr
std::vector< std::vector< int > > jacStampSpecial
std::vector< std::vector< int > > jacStampSpecialMerged
int ADrainEquDrainNodeOffset
double jctSidewallTempSatCurDensity
double * f_BulkEquBulkNodePtr
double * q_icVGSEquIgsPtr
bool ChargeComputationNeeded
double * q_ChargeEquGateNodePtr
double * q_SourcePrimeEquBulkNodePtr
double * q_DrainPrimeEquDrainNodePtr
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
int AGateEquSourcePrimeNodeOffset
#define CONSTEXP_THRESHOLD
double * nextStaVectorRawPtr
#define Xyce_NONPOINTER_MATRIX_LOAD
double * f_BulkEquDrainPrimeNodePtr
static std::vector< std::vector< int > > jacStamp_SC
double * q_ChargeEquBulkNodePtr
void noiseSupport(double &noise, double &lnNoise, const int type, const double param, const double temp)
const std::string & getType() const
double gmin
minimum allowed conductance.
static std::vector< int > jacMap_DC_SC
double contVds(double vds, double alpha, double min=0.3)
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
double * f_GateEquDrainPrimeNodePtr
double * f_SourcePrimeEquDrainPrimeNodePtr
double * q_SourcePrimeEquChargeVarPtr
int ASourcePrimeEquSourceNodeOffset
const ExternData & extData
static std::vector< std::vector< int > > jacStamp_DC
ModelBlock represents a .MODEL line from the netlist.
static std::vector< std::vector< int > > jacStamp
double * f_BulkEquGateNodePtr
Manages parameter binding for class C.
int getNumNoiseSources() const
double * q_GateEquBulkNodePtr
InstanceBlock represent a device instance line from the netlist.
int AGateEquGateNodeOffset
double * q_GateEquGateNodePtr
Util::Param temp
operating temperature of ckt.
std::vector< Param > params
int ADrainPrimeEquGateNodeOffset
Linear::Matrix * dQdxMatrixPtr
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Populates the device's Jacobian object with these pointers.
static std::vector< std::vector< int > > jacMap2_DC
double * f_DrainPrimeEquGateNodePtr
double * f_SourcePrimeEquSourceNodePtr
double bulkJctBotGradingCoeff
bool auxChargeCalculations()
int AGateEquChargeVarOffset
double * f_ChargeEquDrainPrimeNodePtr
int AGateEquDrainPrimeNodeOffset
Linear::Vector * flagSolVectorPtr
double * f_ChargeEquSourcePrimeNodePtr
double * f_DrainPrimeEquDrainNodePtr
int ASourcePrimeEquSourcePrimeNodeOffset
double * q_SourcePrimeEquSourceNodePtr
const SolverState & getSolverState() const
Returns the solver state given during device construction.
double * f_DrainPrimeEquDrainPrimeNodePtr
void setModParams(const std::vector< Param > ¶ms)
double * f_DrainEquDrainPrimeNodePtr
int ADrainPrimeEquDrainPrimeNodeOffset
double * nextSolVectorRawPtr
int numLeadCurrentStoreVars
double * f_icVDSEquIdsPtr
double * q_GateEquSourcePrimeNodePtr