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");
2306 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
2325 l (getDeviceOptions().defl),
2326 w (getDeviceOptions().defw),
2327 drainArea (getDeviceOptions().defad),
2328 sourceArea (getDeviceOptions().defas),
2330 sourceSquares (1.0),
2331 drainPerimeter (0.0),
2332 sourcePerimeter (0.0),
2333 sourceConductance (0.0),
2334 drainConductance (0.0),
2341 numberParallel (1.0),
2384 limitedFlag (false),
2389 temp (getDeviceOptions().temp.getImmutableValue<double>()),
2390 ChargeComputationNeeded (true),
2473 dDeltaPhi_dVg (0.0),
2474 dDeltaPhi_dVd (0.0),
2475 dDeltaPhi_dVb (0.0),
2477 jctTempSatCurDensity (0.0),
2478 jctSidewallTempSatCurDensity (0.0),
2479 unitAreaJctCapTemp (0.0),
2480 unitLengthSidewallJctCapTemp (0.0),
2481 unitLengthGateSidewallJctCapTemp (0.0),
2539 ScalingFactor (0.0),
2557 li_store_dev_id (-1),
2558 li_store_dev_is (-1),
2559 li_store_dev_ig (-1),
2560 li_store_dev_ib (-1),
2566 li_state_qcheq (-1),
2567 li_state_qcdump (-1),
2575 li_SourcePrime (-1),
2583 ADrainEquDrainNodeOffset (-1),
2584 ADrainEquDrainPrimeNodeOffset (-1),
2585 ADrainEquIdsOffset (-1),
2587 AGateEquGateNodeOffset (-1),
2588 AGateEquBulkNodeOffset (-1),
2589 AGateEquDrainPrimeNodeOffset (-1),
2590 AGateEquSourcePrimeNodeOffset (-1),
2591 AGateEquChargeVarOffset (-1),
2592 AGateEquIgsOffset (-1),
2594 ASourceEquSourceNodeOffset (-1),
2595 ASourceEquSourcePrimeNodeOffset (-1),
2596 ASourceEquIbsOffset (-1),
2597 ASourceEquIdsOffset (-1),
2598 ASourceEquIgsOffset (-1),
2600 ABulkEquGateNodeOffset (-1),
2601 ABulkEquBulkNodeOffset (-1),
2602 ABulkEquDrainPrimeNodeOffset (-1),
2603 ABulkEquSourcePrimeNodeOffset (-1),
2604 ABulkEquChargeVarOffset (-1),
2605 ABulkEquIbsOffset (-1),
2607 ADrainPrimeEquDrainNodeOffset (-1),
2608 ADrainPrimeEquGateNodeOffset (-1),
2609 ADrainPrimeEquBulkNodeOffset (-1),
2610 ADrainPrimeEquDrainPrimeNodeOffset (-1),
2611 ADrainPrimeEquSourcePrimeNodeOffset (-1),
2612 ADrainPrimeEquChargeVarOffset (-1),
2614 ASourcePrimeEquGateNodeOffset (-1),
2615 ASourcePrimeEquSourceNodeOffset (-1),
2616 ASourcePrimeEquBulkNodeOffset (-1),
2617 ASourcePrimeEquDrainPrimeNodeOffset (-1),
2618 ASourcePrimeEquSourcePrimeNodeOffset (-1),
2619 ASourcePrimeEquChargeVarOffset (-1),
2621 AChargeEquChargeVarOffset (-1),
2622 AChargeEquDrainPrimeNodeOffset (-1),
2623 AChargeEquGateNodeOffset (-1),
2624 AChargeEquSourcePrimeNodeOffset (-1),
2625 AChargeEquBulkNodeOffset (-1),
2626 icVBSEquVsOffset (-1),
2627 icVBSEquVbOffset (-1),
2628 icVBSEquIbsOffset (-1),
2629 icVDSEquVdOffset (-1),
2630 icVDSEquVsOffset (-1),
2631 icVDSEquIdsOffset (-1),
2632 icVGSEquVgOffset (-1),
2633 icVGSEquVsOffset (-1),
2634 icVGSEquIgsOffset (-1),
2638 f_DrainEquDrainNodePtr(0),
2639 f_DrainEquDrainPrimeNodePtr(0),
2640 f_DrainEquIdsPtr(0),
2643 f_GateEquGateNodePtr(0),
2644 f_GateEquBulkNodePtr(0),
2645 f_GateEquDrainPrimeNodePtr(0),
2646 f_GateEquSourcePrimeNodePtr(0),
2647 f_GateEquChargeVarPtr(0),
2651 f_SourceEquSourceNodePtr(0),
2652 f_SourceEquSourcePrimeNodePtr(0),
2653 f_SourceEquIbsPtr(0),
2654 f_SourceEquIdsPtr(0),
2655 f_SourceEquIgsPtr(0),
2658 f_BulkEquGateNodePtr(0),
2659 f_BulkEquBulkNodePtr(0),
2660 f_BulkEquDrainPrimeNodePtr(0),
2661 f_BulkEquSourcePrimeNodePtr(0),
2662 f_BulkEquChargeVarPtr(0),
2666 f_DrainPrimeEquDrainNodePtr(0),
2667 f_DrainPrimeEquGateNodePtr(0),
2668 f_DrainPrimeEquBulkNodePtr(0),
2669 f_DrainPrimeEquDrainPrimeNodePtr(0),
2670 f_DrainPrimeEquSourcePrimeNodePtr(0),
2671 f_DrainPrimeEquChargeVarPtr(0),
2674 f_SourcePrimeEquGateNodePtr(0),
2675 f_SourcePrimeEquSourceNodePtr(0),
2676 f_SourcePrimeEquBulkNodePtr(0),
2677 f_SourcePrimeEquDrainPrimeNodePtr(0),
2678 f_SourcePrimeEquSourcePrimeNodePtr(0),
2679 f_SourcePrimeEquChargeVarPtr(0),
2682 f_ChargeEquChargeVarPtr(0),
2683 f_ChargeEquDrainPrimeNodePtr(0),
2684 f_ChargeEquGateNodePtr(0),
2685 f_ChargeEquSourcePrimeNodePtr(0),
2686 f_ChargeEquBulkNodePtr(0),
2691 f_icVBSEquIbsPtr(0),
2696 f_icVDSEquIdsPtr(0),
2701 f_icVGSEquIgsPtr(0),
2704 q_DrainEquDrainNodePtr(0),
2705 q_DrainEquDrainPrimeNodePtr(0),
2706 q_DrainEquIdsPtr(0),
2709 q_GateEquGateNodePtr(0),
2710 q_GateEquBulkNodePtr(0),
2711 q_GateEquDrainPrimeNodePtr(0),
2712 q_GateEquSourcePrimeNodePtr(0),
2713 q_GateEquChargeVarPtr(0),
2717 q_SourceEquSourceNodePtr(0),
2718 q_SourceEquSourcePrimeNodePtr(0),
2719 q_SourceEquIbsPtr(0),
2720 q_SourceEquIdsPtr(0),
2721 q_SourceEquIgsPtr(0),
2724 q_BulkEquGateNodePtr(0),
2725 q_BulkEquBulkNodePtr(0),
2726 q_BulkEquDrainPrimeNodePtr(0),
2727 q_BulkEquSourcePrimeNodePtr(0),
2728 q_BulkEquChargeVarPtr(0),
2732 q_DrainPrimeEquDrainNodePtr(0),
2733 q_DrainPrimeEquGateNodePtr(0),
2734 q_DrainPrimeEquBulkNodePtr(0),
2735 q_DrainPrimeEquDrainPrimeNodePtr(0),
2736 q_DrainPrimeEquSourcePrimeNodePtr(0),
2737 q_DrainPrimeEquChargeVarPtr(0),
2740 q_SourcePrimeEquGateNodePtr(0),
2741 q_SourcePrimeEquSourceNodePtr(0),
2742 q_SourcePrimeEquBulkNodePtr(0),
2743 q_SourcePrimeEquDrainPrimeNodePtr(0),
2744 q_SourcePrimeEquSourcePrimeNodePtr(0),
2745 q_SourcePrimeEquChargeVarPtr(0),
2748 q_ChargeEquChargeVarPtr(0),
2749 q_ChargeEquDrainPrimeNodePtr(0),
2750 q_ChargeEquGateNodePtr(0),
2751 q_ChargeEquSourcePrimeNodePtr(0),
2752 q_ChargeEquBulkNodePtr(0),
2757 q_icVBSEquIbsPtr(0),
2762 q_icVDSEquIdsPtr(0),
2767 q_icVGSEquIgsPtr(0),
2770 blockHomotopyID (0),
2771 randomPerturb (0.0),
2773 updateTemperatureCalled_ (false)
2835 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
2837 Xyce::dout() <<
"Instance::Instance jacStampMap_DS_SC" << std::endl;
2840 Xyce::dout() <<
"jacStamp_DC_SC[ " <<
jacMap_DC_SC[k] <<
" ] = { ";
2845 Xyce::dout() <<
"}" << std::endl;
2848 Xyce::dout() <<
"Instance::Instance jacStampMap_DS" << std::endl;
2849 for (
int k = 0; k<
jacMap_DC.size(); ++k )
2851 Xyce::dout() <<
"jacStamp_DC[ " <<
jacMap_DC[k] <<
" ] = { ";
2852 for (
int q = 0; q <
jacMap2_DC[k].size(); ++q )
2856 Xyce::dout() <<
"}" << std::endl;
2859 Xyce::dout() <<
"Instance::Instance jacStampMap_SC" << std::endl;
2860 for (
int k = 0; k<
jacMap_SC.size(); ++k )
2862 Xyce::dout() <<
"jacStamp_SC[ " <<
jacMap_SC[k] <<
" ] = { ";
2863 for (
int q = 0; q <
jacMap2_SC[k].size(); ++q )
2867 Xyce::dout() <<
"}" << std::endl;
2870 Xyce::dout() <<
"Instance::Instance jacStampMap" << std::endl;
2871 for (
int k = 0; k<
jacMap.size(); ++k )
2873 Xyce::dout() <<
"jacStamp[ " <<
jacMap[k] <<
" ] = { ";
2874 for (
int q = 0; q <
jacMap2[k].size(); ++q )
2878 Xyce::dout() <<
"}" << std::endl;
2907 if (
given(
"NQSMOD"))
2909 std::string msg =
"Instance::Instance";
2910 msg +=
" nsqMod = 1. Not allowed yet. Setting to 0.\n";
2911 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::USR_WARNING_0,msg);
2916 UserWarning(*
this) <<
"Channel length out of range";
2921 UserWarning(*
this) <<
"Channel width out of range";
2939 int numExtraCol = 0;
2940 int qCol = -1, icVBSCol = -1, icVDSCol = -1, icVGSCol = -1;
2949 icVBSCol = currentCol;
2955 icVDSCol = currentCol;
2961 icVGSCol = currentCol;
3043 numNonZeros = 5 + (
nqsMod ? 1:0 );
3058 numNonZeros = 5 + (
nqsMod ? 1:0 );
3122 std::vector< std::vector<int> > jacStampSpecialMergedTemp;
3123 std::vector<int> jacSpecialMapTemp;
3124 std::vector< std::vector<int> > jacSpecialMapTemp2;
3127 jacStampSpecialMergedTemp, jacSpecialMapTemp, jacSpecialMapTemp2,
3130 jacStampMap( jacStampSpecialMergedTemp, jacSpecialMapTemp, jacSpecialMapTemp2,
3171 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3173 Xyce::dout() <<
"Instance::Instance jacStampSpecial" << std::endl;
3176 Xyce::dout() <<
"jacSpecialMap[" <<
jacSpecialMap[k] <<
" ] = { ";
3181 Xyce::dout() <<
"}" << std::endl;
3184 Xyce::dout() <<
"Instance::Instance jacStampSpecialMerged" << std::endl;
3192 Xyce::dout() <<
"}" << std::endl;
3218 const std::vector<int> & extLIDVecRef )
3231 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3233 Xyce::dout() << section_divider << std::endl;
3234 Xyce::dout() <<
" In Instance::register LIDs\n\n";
3235 Xyce::dout() <<
" name = " <<
getName() << std::endl;
3236 Xyce::dout() <<
" number of internal variables: " <<
numIntVars << std::endl;
3237 Xyce::dout() <<
" number of external variables: " <<
numExtVars << std::endl;
3272 DevelFatal(*this).in(
"Instance::registerLIDs")
3273 <<
"Tried to specify an initial condition on V_Bulk_Source when Bulk and Source nodes are the same node";
3282 DevelFatal(*this).in(
"Instance::registerLIDs")
3283 <<
"Tried to specify an initial condition on V_Drain_Source when Drain and Source nodes are the same node";
3292 DevelFatal(*this).in(
"Instance::registerLIDs")
3293 <<
"Tried to specify an initial condition on V_Gate_Source when Gate and Source nodes are the same node";
3298 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3300 Xyce::dout() <<
"\n local variable indices:\n";
3301 Xyce::dout() <<
" li_Drain = " <<
li_Drain << std::endl;
3302 Xyce::dout() <<
" li_Gate = " <<
li_Gate << std::endl;
3303 Xyce::dout() <<
" li_Source = " <<
li_Source << std::endl;
3304 Xyce::dout() <<
" li_Bulk = " <<
li_Bulk << std::endl;
3307 Xyce::dout() <<
" li_DrainPrime = " <<
li_DrainPrime << std::endl;
3309 Xyce::dout() <<
" li_SourcePrime = " <<
li_SourcePrime << std::endl;
3312 Xyce::dout() <<
" li_Charge = " <<
li_Charge << std::endl;
3315 Xyce::dout() <<
" li_Ibs = " <<
li_Ibs << std::endl;
3318 Xyce::dout() <<
" li_Ids = " <<
li_Ids << std::endl;
3321 Xyce::dout() <<
" li_Igs = " <<
li_Igs << std::endl;
3322 Xyce::dout() << section_divider << std::endl;
3373 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3375 Xyce::dout() << std::endl;
3376 Xyce::dout() << section_divider << std::endl;
3377 Xyce::dout() <<
" In Instance::registerStateLIDs\n\n";
3378 Xyce::dout() <<
" name = " <<
getName() << std::endl;
3379 Xyce::dout() <<
" Number of State LIDs: " <<
numStateVars << std::endl;
3405 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3407 Xyce::dout() <<
" Local State indices:" << std::endl;
3408 Xyce::dout() << std::endl;
3409 Xyce::dout() <<
" li_state_qb = " <<
li_state_qb << std::endl;
3410 Xyce::dout() <<
" li_state_qg = " <<
li_state_qg << std::endl;
3411 Xyce::dout() <<
" li_state_qd = " <<
li_state_qd << std::endl;
3412 Xyce::dout() <<
" li_state_qbs = " <<
li_state_qbs << std::endl;
3413 Xyce::dout() <<
" li_state_qbd = " <<
li_state_qbd << std::endl;
3414 Xyce::dout() <<
" li_state_qcheq = " <<
li_state_qcheq << std::endl;
3415 Xyce::dout() <<
" li_state_qcdump = " <<
li_state_qcdump << std::endl;
3416 Xyce::dout() <<
" li_state_qdef = " <<
li_state_qdef << std::endl;
3417 Xyce::dout() << section_divider << std::endl;
3486 N_ERH_ErrorMgr::report( N_ERH_ErrorMgr::DEV_FATAL,
3487 ": NQSMOD not supported for DIRECT MATRIX ACCESS\n" );
3490 N_ERH_ErrorMgr::report( N_ERH_ErrorMgr::DEV_FATAL,
3491 "Instance::jacobianStamp should not get here!\n" );
3507 std::vector<int> map;
3508 std::vector< std::vector<int> > map2;
3554 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
3556 Xyce::dout() <<
"Instance::registerJacLIDs map selected" << std::endl;
3557 for (
int k = 0; k<map.size(); ++k )
3559 Xyce::dout() <<
"map[ " << k <<
"] = " << map[k] <<
" map2[] = { ";
3560 for (
int q = 0; q < map2[k].size(); ++q )
3562 Xyce::dout() << map2[k][q] <<
" ";
3564 Xyce::dout() <<
"}" << std::endl;
3567 for(
int k = 0; k<jacLIDVec.size(); ++k )
3569 Xyce::dout() <<
"jacLIDVec[ " << k <<
"] = { ";
3570 for (
int q = 0; q < jacLIDVec[k].size(); ++q )
3572 Xyce::dout() << jacLIDVec[k][q] <<
" ";
3574 Xyce::dout() <<
"}" << std::endl;
3703 N_ERH_ErrorMgr::report( N_ERH_ErrorMgr::DEV_FATAL,
3704 ": NQSMOD not supported.\n" );
3718 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
3967 double tmp, tmp1, tmp2, tmp3, Eg;
3968 double T0, T1, T2, T3, T4, T5, Ldrn, Wdrn;
3969 double delTemp, TRatio, Inv_L, Inv_W, Inv_LW;
3972 double Nvtm, SourceSatCurrent, DrainSatCurrent;
3979 bool bsuccess =
true;
3981 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3983 Xyce::dout() << std::endl << subsection_divider << std::endl;
3984 Xyce::dout() <<
"Instance::updateTemperature\n";
3985 Xyce::dout() <<
"name = " <<
getName() << std::endl;
3989 if (temp_tmp != -999.0)
temp = temp_tmp;
4015 delTemp = temp - Tnom;
4026 lout() <<
"Temperature effect has caused cj to be negative. Cj clamped to zero.\n" << std::endl;
4039 lout() <<
"Temperature effect has caused cjsw to be negative. Cjsw clamped to zero.\n" << std::endl;
4052 lout() <<
"Temperature effect has caused cjswg to be negative. Cjswg clamped to zero.\n" << std::endl;
4060 lout() <<
"Temperature effect has caused pb to be < 0.01. Pb clamped to 0.01.\n" << std::endl;
4068 lout() <<
"Temperature effect has caused pbsw to be < 0.01. Pbsw clamped to 0.01.\n" << std::endl;
4076 lout() <<
"Temperature effect has caused pbswg to be < 0.01. Pbswg clamped to 0.01.\n" << std::endl;
4086 std::list<SizeDependParam*>::iterator it_dpL =
4088 std::list<SizeDependParam*>::iterator end_dpL =
4093 for( ; it_dpL != end_dpL; ++it_dpL )
4094 if( (*it_dpL)->Length ==
l && (*it_dpL)->Width ==
w )
4140 UserWarning0(*
this) <<
"Effective channel length <= 0";
4152 UserWarning0(*
this) <<
"Effective channel length for C-V <= 0";
4158 UserWarning(*
this) <<
"Effective channel width for C-V <= 0";
4594 T0 = (TRatio - 1.0);
4609 #ifdef CHECK_MODEL_DONE
4610 if (checkModel((*M_iter), iterI, ckt))
4612 UserError0(*
this) <<
"Error(s) detected during V3.2 parameter checking for " << name.c_str() <<
" in model " <<
model_.name;
4655 UserWarning0(*
this) <<
"k1 should be specified with k2.";
4661 UserWarning0(*
this) <<
"k2 should be specified with k1.";
4667 UserWarning0(*
this) <<
"nsub is ignored because k1 or k2 is given.";
4672 UserWarning0(*
this) <<
"xt is ignored because k1 or k2 is given.";
4677 UserWarning0(*
this) <<
"vbx is ignored because k1 or k2 is given.";
4682 UserWarning0(*
this) <<
"gamma1 is ignored because k1 or k2 is given.";
4687 UserWarning0(*
this) <<
"gamma2 is ignored because k1 or k2 is given.";
4760 T2 = (T0 + 2.0 * T0 * T0);
4773 T2 = T1 * (1.0 + 2.0 * T1);
4778 T2 = T1 * (1.0 + 2.0 * T1);
4788 T3 = T1 * (1.0 + 2.0 * T1);
4793 T3 = T1 * (1.0 + 2.0 * T1);
4818 SourceSatCurrent = 1.0e-14;
4827 if ((SourceSatCurrent > 0.0) && (
model_.
ijth > 0.0))
4836 DrainSatCurrent = 1.0e-14;
4845 if ((DrainSatCurrent > 0.0) && (
model_.
ijth > 0.0))
4866 bool bsuccess =
true;
4869 double SourceSatCurrent(0.0), DrainSatCurrent(0.0);
4872 double VgstNVt(0.0), ExpVgst(0.0);
4874 double czbd(0.0), czbdsw(0.0), czbdswg(0.0), czbs(0.0), czbssw(0.0), czbsswg(0.0);
4875 double evbd(0.0), evbs(0.0), arg(0.0), sarg(0.0);
4877 double Vfbeff(0.0), dVfbeff_dVg(0.0), dVfbeff_dVb(0.0), V3(0.0), V4(0.0);
4879 double MJ(0.0), MJSW(0.0), MJSWG(0.0);
4882 double Vds(0.0), Vgs(0.0), Vbs(0.0);
4883 double Vgs_eff(0.0), Vfb(0.0);
4884 double Phis(0.0), dPhis_dVb(0.0), sqrtPhis(0.0), dsqrtPhis_dVb(0.0);
4885 double Vth(0.0), dVth_dVb(0.0), dVth_dVd(0.0);
4890 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);
4891 double ExpArg(0.0), V0(0.0), CoxWLcen(0.0), QovCox(0.0), LINK(0.0);
4892 double DeltaPhi(0.0);
4894 double Cox(0.0), Tox(0.0), Tcen(0.0), dTcen_dVg(0.0), dTcen_dVd(0.0), dTcen_dVb(0.0);
4895 double Ccen(0.0), Coxeff(0.0), dCoxeff_dVg(0.0), dCoxeff_dVd(0.0), dCoxeff_dVb(0.0);
4896 double Denomi(0.0), dDenomi_dVg(0.0), dDenomi_dVd(0.0), dDenomi_dVb(0.0);
4898 double dueff_dVg(0.0), dueff_dVd(0.0), dueff_dVb(0.0);
4903 double EsatL(0.0), dEsatL_dVg(0.0), dEsatL_dVd(0.0), dEsatL_dVb(0.0);
4905 double dVdsat_dVg(0.0), dVdsat_dVb(0.0), dVdsat_dVd(0.0), Vasat(0.0), dAlphaz_dVg(0.0), dAlphaz_dVb(0.0);
4906 double dVasat_dVg(0.0), dVasat_dVb(0.0), dVasat_dVd(0.0), Va(0.0);
4908 double dVa_dVd(0.0), dVa_dVg(0.0), dVa_dVb(0.0);
4909 double Vbseff(0.0), dVbseff_dVb(0.0), VbseffCV(0.0), dVbseffCV_dVb(0.0);
4912 double One_Third_CoxWL(0.0), Two_Third_CoxWL(0.0), Alphaz(0.0);
4914 double T0(0.0), dT0_dVg(0.0), dT0_dVd(0.0), dT0_dVb(0.0);
4915 double T1(0.0), dT1_dVg(0.0), dT1_dVd(0.0), dT1_dVb(0.0);
4916 double T2(0.0), dT2_dVg(0.0), dT2_dVd(0.0), dT2_dVb(0.0);
4917 double T3(0.0), dT3_dVg(0.0), dT3_dVd(0.0), dT3_dVb(0.0);
4926 double T11(0.0), T12(0.0);
4932 double dAbulk_dVb(0.0), Abulk0(0.0), dAbulk0_dVb(0.0);
4934 double VACLM(0.0), dVACLM_dVg(0.0), dVACLM_dVd(0.0), dVACLM_dVb(0.0);
4935 double VADIBL(0.0), dVADIBL_dVg(0.0), dVADIBL_dVd(0.0), dVADIBL_dVb(0.0);
4937 double Xdep(0.0), dXdep_dVb(0.0), lt1(0.0), dlt1_dVb(0.0), ltw(0.0), dltw_dVb(0.0);
4938 double Delt_vth(0.0), dDelt_vth_dVb(0.0);
4940 double Theta0(0.0), dTheta0_dVb(0.0);
4942 double TempRatio(0.0), tmp1(0.0), tmp2(0.0), tmp3(0.0), tmp4(0.0);
4944 double DIBL_Sft(0.0), dDIBL_Sft_dVd(0.0);
4946 double Lambda(0.0), dLambda_dVg(0.0);
4952 double dVgsteff_dVg(0.0), dVgsteff_dVd(0.0), dVgsteff_dVb(0.0);
4954 double dVdseff_dVg(0.0), dVdseff_dVd(0.0), dVdseff_dVb(0.0);
4955 double VdseffCV(0.0), dVdseffCV_dVg(0.0), dVdseffCV_dVd(0.0), dVdseffCV_dVb(0.0);
4956 double diffVds(0.0);
4958 double dAbulk_dVg(0.0);
4959 double beta(0.0), dbeta_dVg(0.0), dbeta_dVd(0.0), dbeta_dVb(0.0);
4960 double gche(0.0), dgche_dVg(0.0), dgche_dVd(0.0), dgche_dVb(0.0);
4961 double fgche1(0.0), dfgche1_dVg(0.0), dfgche1_dVd(0.0), dfgche1_dVb(0.0);
4962 double fgche2(0.0), dfgche2_dVg(0.0), dfgche2_dVd(0.0), dfgche2_dVb(0.0);
4963 double Idl(0.0), dIdl_dVg(0.0), dIdl_dVd(0.0), dIdl_dVb(0.0);
4964 double Idsa(0.0), dIdsa_dVg(0.0), dIdsa_dVd(0.0), dIdsa_dVb(0.0);
4967 double Gds(0.0), Gmb(0.0);
4970 double Gbd(0.0), Gbg(0.0), Gbb(0.0);
4971 double VASCBE(0.0), dVASCBE_dVg(0.0), dVASCBE_dVd(0.0), dVASCBE_dVb(0.0);
4972 double CoxWovL(0.0);
4973 double Rds(0.0), dRds_dVg(0.0), dRds_dVb(0.0), WVCox(0.0), WVCoxRds(0.0);
4974 double Vgst2Vtm(0.0), VdsatCV(0.0);
4976 double dVdsatCV_dVg(0.0), dVdsatCV_dVb(0.0);
4977 double Leff(0.0), Weff(0.0), dWeff_dVg(0.0), dWeff_dVb(0.0);
4978 double AbulkCV(0.0), dAbulkCV_dVb(0.0);
4980 double gtau_diff(0.0), gtau_drift(0.0);
4985 double Cgg1(0.0), Cgb1(0.0), Cgd1(0.0), Cbg1(0.0), Cbb1(0.0), Cbd1(0.0);
4987 double Qac0(0.0), Qsub0(0.0);
4988 double dQac0_dVg(0.0), dQac0_dVb(0.0), dQsub0_dVg(0.0), dQsub0_dVd(0.0), dQsub0_dVb(0.0);
4989 double von_local(0.0);
5003 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
5005 Xyce::dout() << subsection_divider << std::endl;
5006 Xyce::dout() <<
" Instance::updateIntermediateVars\n";
5007 Xyce::dout() <<
" name = " <<
getName();
5009 Xyce::dout() <<
" dtype is " <<
model_.
dtype << std::endl;
5010 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
5011 Xyce::dout() <<
" " << std::endl;
5051 Xyce::dout() <<
" Vg = " <<
Vg << std::endl;
5052 Xyce::dout() <<
" Vb = " <<
Vb << std::endl;
5053 Xyce::dout() <<
" Vs = " <<
Vs << std::endl;
5054 Xyce::dout() <<
" Vd = " <<
Vd << std::endl;
5055 Xyce::dout() <<
" Vsp = " <<
Vsp << std::endl;
5056 Xyce::dout() <<
" Vdp = " <<
Vdp << std::endl;
5057 Xyce::dout() <<
" Qtotal = " <<
Qtotal << std::endl;
5113 if ((*flagSolVectorPtr)[
li_Drain] == 0 || (*flagSolVectorPtr)[
li_Gate] == 0 ||
5182 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
5183 Xyce::dout() <<
" von_local = " << von_local << std::endl;
5184 Xyce::dout() <<
" CONSTvt0 = " <<
CONSTvt0 << std::endl;
5185 Xyce::dout() <<
" vcrit = " <<
model_.
vcrit << std::endl;
5186 Xyce::dout().width(3);
5188 Xyce::dout().width(5);Xyce::dout() <<
getName();
5189 Xyce::dout() <<
" old :";
5190 Xyce::dout()<<
" vgs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5192 Xyce::dout()<<
" vds:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5194 Xyce::dout()<<
" vbs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5196 Xyce::dout()<<
" vbd:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5197 Xyce::dout() <<
vbd_old << std::endl;
5198 Xyce::dout().width(3);
5200 Xyce::dout().width(5);Xyce::dout() <<
getName();
5201 Xyce::dout() <<
" Blim:";
5202 Xyce::dout()<<
" vgs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5203 Xyce::dout() <<
vgs;
5204 Xyce::dout()<<
" vds:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5205 Xyce::dout() <<
vds;
5206 Xyce::dout()<<
" vbs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5207 Xyce::dout() <<
vbs;
5208 Xyce::dout()<<
" vbd:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5209 Xyce::dout() <<
vbd << std::endl;
5210 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
5249 #ifdef Xyce_NEW_ORIG_TEST
5251 double vds_diff = fabs(vds -
vds_orig);
5255 bool noOrigFlag_vgs = 0;
5256 bool noOrigFlag_vds = 0;
5257 bool noOrigFlag_vbs = 0;
5258 bool noOrigFlag_vgd = 0;
5260 if (vgs_diff != 0.0)
5264 if ( fabs(vgs_diff/
vgs_orig) > reltol) noOrigFlag_vgs = 1;
5268 if ( fabs(vgs_diff) > voltTol ) noOrigFlag_vgs = 1;
5272 if (vds_diff != 0.0)
5276 if ( fabs(vds_diff/
vds_orig) > reltol) noOrigFlag_vds = 1;
5280 if ( fabs(vds_diff) > voltTol ) noOrigFlag_vds = 1;
5284 if (vbs_diff != 0.0)
5288 if ( fabs(vbs_diff/
vbs_orig) > reltol) noOrigFlag_vbs = 1;
5292 if ( fabs(vbs_diff) > voltTol ) noOrigFlag_vbs = 1;
5296 if (vgd_diff != 0.0)
5300 if ( fabs(vgd_diff/
vgd_orig) > reltol) noOrigFlag_vgd = 1;
5304 if ( fabs(vgd_diff) > voltTol ) noOrigFlag_vgd = 1;
5308 origFlag = !( noOrigFlag_vgs || noOrigFlag_vds ||
5309 noOrigFlag_vbs || noOrigFlag_vgd);
5321 Xyce::dout().width(3);
5323 Xyce::dout().width(5);Xyce::dout() <<
getName();
5324 Xyce::dout() <<
" Alim:";
5325 Xyce::dout()<<
" vgs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5326 Xyce::dout() <<
vgs;
5327 Xyce::dout()<<
" vds:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5328 Xyce::dout() <<
vds;
5329 Xyce::dout()<<
" vbs:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5330 Xyce::dout() <<
vbs;
5331 Xyce::dout()<<
" vbd:";Xyce::dout().width(10);Xyce::dout().precision(3);Xyce::dout().setf(std::ios::scientific);
5332 Xyce::dout() <<
vbd;
5333 if (
origFlag) Xyce::dout() <<
" SAME";
5334 else Xyce::dout() <<
" DIFF";
5335 Xyce::dout() << std::endl;
5336 Xyce::dout().width(21); Xyce::dout().precision(13); Xyce::dout().setf(std::ios::scientific);
5350 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
5352 Xyce::dout() <<
" mod type = " <<
model_.
modType << std::endl;
5353 Xyce::dout() <<
"dtype = " <<
model_.
dtype << std::endl;
5354 Xyce::dout() <<
" vbs = " << vbs << std::endl;
5355 Xyce::dout() <<
" vds = " << vds << std::endl;
5356 Xyce::dout() <<
" vgs = " <<
vgs << std::endl;
5358 Xyce::dout() <<
" vbd = " <<
vbd << std::endl;
5359 Xyce::dout() <<
" vgd = " <<
vgd << std::endl;
5360 Xyce::dout() <<
" vgb = " <<
vgs << std::endl;
5361 Xyce::dout() <<
" qdef = " <<
qdef << std::endl;
5369 SourceSatCurrent = 1.0e-14;
5379 if (SourceSatCurrent <= 0.0)
5388 evbs = exp(vbs / Nvtm);
5396 evbs = exp(vbs / Nvtm);
5413 DrainSatCurrent = 1.0e-14;
5423 if (DrainSatCurrent <= 0.0)
5432 evbd = exp(
vbd / Nvtm);
5440 evbd = exp(
vbd / Nvtm);
5477 Xyce::dout() <<
"HOMOTOPY INFO: gainscale = "
5479 Xyce::dout() <<
"HOMOTOPY INFO: before vds = " << Vds << std::endl;
5480 Xyce::dout() <<
"HOMOTOPY INFO: before vgst = " << Vgs << std::endl;
5503 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
5505 Xyce::dout() <<
"HOMOTOPY INFO: after vds = " << Vds << std::endl;
5506 Xyce::dout() <<
"HOMOTOPY INFO: after vgst = " << Vgs << std::endl;
5513 dVbseff_dVb = 0.5 * (1.0 + T0 /
T1global);
5515 if (Vbseff < Vbs) Vbseff = Vbs;
5521 dPhis_dVb = -T0 * T0;
5523 dsqrtPhis_dVb = -0.5 * sqrtPhis * sqrtPhis /
paramPtr->
phis3;
5529 sqrtPhis = sqrt(Phis);
5530 dsqrtPhis_dVb = -0.5 / sqrtPhis;
5550 T4 = 1.0 / (3.0 + 8.0 * T0);
5551 T1 = (1.0 + 3.0 * T0) * T4;
5556 dlt1_dVb =
model_.
factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2);
5566 T4 = 1.0 / (3.0 + 8.0 * T0);
5567 T1 = (1.0 + 3.0 * T0) * T4;
5572 dltw_dVb =
model_.
factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2);
5578 Theta0 = T1 * (1.0 + 2.0 * T1);
5579 dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb;
5580 dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb;
5585 Theta0 = T1 * (1.0 + 2.0 * T1);
5597 T2 = T1 * (1.0 + 2.0 * T1);
5598 dT1_dVb = -T0 / ltw * T1 * dltw_dVb;
5599 dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb;
5604 T2 = T1 * (1.0 + 2.0 * T1);
5623 T9 = 1.0 / (3.0 - 2.0e4 * T3);
5624 T3 = (2.0e-4 - T3) * T9;
5633 DIBL_Sft = dDIBL_Sft_dVd * Vds;
5647 dVth_dVd = -dDIBL_Sft_dVd;
5658 dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb
5664 T0 = 1.0 / (3.0 + 8.0 * tmp4);
5665 n = (1.0 + 3.0 * tmp4) * T0;
5667 dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb
5680 T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1);
5682 T2 = T1 * (T4 - 1.0);
5683 T3 = 0.5 * T2 * T2 / T1;
5684 T7 = 1.12 - T3 - 0.05;
5685 T6 = sqrt(T7 * T7 + 0.224);
5686 T5 = 1.12 - 0.5 * (T7 + T6);
5688 dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6);
5695 Vgst = Vgs_eff - Vth;
5698 T10 = 2.0 * n * Vtm;
5699 VgstNVt = Vgst / T10;
5707 dVgsteff_dVd = -dVth_dVd;
5708 dVgsteff_dVb = -dVth_dVb;
5715 dVgsteff_dVg =
Vgsteff / (n * Vtm);
5716 dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + T0 * Vtm * dn_dVd);
5717 dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + T0 * Vtm * dn_dVb);
5722 ExpVgst = exp(VgstNVt);
5723 T1 = T10 * log(1.0 + ExpVgst);
5724 dT1_dVg = ExpVgst / (1.0 + ExpVgst);
5725 dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb;
5726 dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd;
5729 T2 = 1.0 - T10 * dT2_dVg;
5731 dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd)
5732 + (T2 - 1.0) / n * dn_dVd;
5734 dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb)
5735 + (T2 - 1.0) / n * dn_dVb;
5740 dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3 *
dVgs_eff_dVg;
5741 dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3;
5742 dVgsteff_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / T3;
5753 T0 = 1.0 / (6.0e-8 - 2.0 * Weff);
5754 Weff = 2.0e-8 * (4.0e-8 - Weff) * T0;
5769 T1 = 1.0 / (17.0 + 20.0 * T0);
5778 dT1_dVb = -T1 / sqrtPhis * dsqrtPhis_dVb;
5781 tmp1 = Leff + 2.0 * T9;
5787 dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb;
5791 Abulk0 = 1.0 + T1 * T2;
5792 dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb;
5795 dAbulk_dVg = -T1 * T8;
5797 dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb);
5801 T9 = 1.0 / (3.0 - 20.0 * Abulk0);
5802 Abulk0 = (0.2 - Abulk0) * T9;
5803 dAbulk0_dVb *= T9 * T9;
5808 T9 = 1.0 / (3.0 - 20.0 *
Abulk);
5818 T0 = 1.0 / (1.0 + T2);
5823 T1 = 1.0 / (0.8 + T2);
5824 T0 = (17.0 + 20.0 * T2) * T1;
5829 dAbulk_dVb = dAbulk_dVb * T0 +
Abulk * dT0_dVb;
5830 dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb;
5837 T0 = Vgsteff + Vth + Vth;
5842 dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd;
5843 dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb +
paramPtr->
uc * T3;
5858 T0 = Vgsteff + Vth + Vth;
5865 dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd;
5866 dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb +
paramPtr->
uc * T4;
5875 T9 = 1.0 / (7.0 + 10.0 * T5);
5876 Denomi = (0.6 + T5) * T9;
5884 T9 = -
ueff / Denomi;
5885 dueff_dVg = T9 * dDenomi_dVg;
5886 dueff_dVd = T9 * dDenomi_dVd;
5887 dueff_dVb = T9 * dDenomi_dVb;
5891 WVCoxRds = WVCox * Rds;
5894 EsatL = Esat * Leff;
5896 dEsatL_dVg = T0 * dueff_dVg;
5897 dEsatL_dVd = T0 * dueff_dVd;
5898 dEsatL_dVb = T0 * dueff_dVb;
5912 T2 = sqrt(T1 * T1 + 0.0004 * T0);
5913 Lambda =
paramPtr->
a2 + T0 - 0.5 * (T1 + T2);
5914 dLambda_dVg = 0.5 *
paramPtr->
a1 * (1.0 + T1 / T2);
5920 Lambda = 0.5 * (T1 + T2);
5921 dLambda_dVg = 0.5 *
paramPtr->
a1 * (1.0 + T1 / T2);
5924 Vgst2Vtm = Vgsteff + 2.0 * Vtm;
5927 tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff;
5928 tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff;
5932 tmp2 = dWeff_dVg / Weff;
5933 tmp3 = dWeff_dVb / Weff;
5936 if ((Rds == 0.0) && (Lambda == 1.0))
5938 T0 = 1.0 / (
Abulk * EsatL + Vgst2Vtm);
5942 T3 = EsatL * Vgst2Vtm;
5945 dT0_dVg = -(
Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1;
5946 dT0_dVd = -(
Abulk * dEsatL_dVd) * T1;
5947 dT0_dVb = -(
Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1;
5949 dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0;
5950 dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd;
5951 dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb;
5955 tmp1 = dLambda_dVg / (Lambda * Lambda);
5956 T9 =
Abulk * WVCoxRds;
5959 T6 = Vgst2Vtm * WVCoxRds;
5960 T0 = 2.0 *
Abulk * (T9 - 1.0 + 1.0 / Lambda);
5961 dT0_dVg = 2.0 * (T8 * tmp2 -
Abulk * tmp1
5962 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg);
5964 dT0_dVb = 2.0 * (T8 * (2.0 /
Abulk * dAbulk_dVb + tmp3)
5965 + (1.0 / Lambda - 1.0) * dAbulk_dVb);
5967 T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) +
Abulk * EsatL + 3.0 * T7;
5969 dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1
5970 +
Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9
5971 + T7 * tmp2 + T6 * dAbulk_dVg);
5973 dT1_dVb =
Abulk * dEsatL_dVb + EsatL * dAbulk_dVb
5974 + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3);
5976 dT1_dVd =
Abulk * dEsatL_dVd;
5978 T2 = Vgst2Vtm * (EsatL + 2.0 * T6);
5979 dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg
5980 + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2);
5982 dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3);
5983 dT2_dVd = Vgst2Vtm * dEsatL_dVd;
5985 T3 = sqrt(T1 * T1 - 2.0 * T0 * T2);
5986 Vdsat = (T1 - T3) / T0;
5988 dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3;
5989 dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3;
5990 dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3;
5992 dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2
5993 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0;
5995 dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2
5996 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0;
5998 dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0;
6004 dT1_dVg = dVdsat_dVg;
6005 dT1_dVd = dVdsat_dVd - 1.0;
6006 dT1_dVb = dVdsat_dVb;
6011 dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg;
6012 dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd;
6013 dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb;
6015 Vdseff = Vdsat - 0.5 * (T1 + T2);
6016 dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg);
6017 dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd);
6018 dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb);
6029 tmp4 = 1.0 - 0.5 *
Abulk * Vdsat / Vgst2Vtm;
6032 T0 = EsatL + Vdsat + 2.0 * T9 * tmp4;
6034 T7 = 2.0 * WVCoxRds * tmp4;
6035 dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 *
Vgsteff)
6036 - T8 * (
Abulk * dVdsat_dVg -
Abulk * Vdsat / Vgst2Vtm
6037 + Vdsat * dAbulk_dVg);
6039 dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff
6040 - T8 * (dAbulk_dVb * Vdsat +
Abulk * dVdsat_dVb);
6041 dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 *
Abulk * dVdsat_dVd;
6043 T9 = WVCoxRds *
Abulk;
6044 T1 = 2.0 / Lambda - 1.0 + T9;
6045 dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg);
6046 dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3;
6049 dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1;
6050 dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1;
6051 dVasat_dVd = dT0_dVd / T1;
6061 dT0_dVb = -T0 / Abulk * dAbulk_dVb;
6062 dT0_dVg = -T0 / Abulk * dAbulk_dVg;
6064 T2 = Vgsteff / EsatL;
6065 T1 = Leff * (Abulk + T2);
6066 dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL + dAbulk_dVg);
6067 dT1_dVb = Leff * (dAbulk_dVb - T2 * dEsatL_dVb / EsatL);
6068 dT1_dVd = -T2 * dEsatL_dVd / Esat;
6071 VACLM = T9 * diffVds;
6072 dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg
6073 + T1 * diffVds * dT0_dVg;
6075 dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds
6078 dVACLM_dVd = T0 * dT1_dVd * diffVds + T9 * (1.0 - dVdseff_dVd);
6083 dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0;
6091 dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8
6092 + Vgst2Vtm * Vdsat * dAbulk_dVg;
6094 dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb);
6095 dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd;
6098 dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg;
6099 dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat;
6100 dT1_dVd = Abulk * dVdsat_dVd;
6105 VADIBL = (Vgst2Vtm - T0 / T1) / T2;
6106 dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2;
6107 dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2;
6108 dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2;
6113 T3 = 1.0 / (1.0 + T7);
6121 T4 = 1.0 / (0.8 + T7);
6122 T3 = (17.0 + 20.0 * T7) * T4;
6124 dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL *
paramPtr->
pdiblb * T4 * T4;
6133 dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0;
6142 dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL);
6143 dT0_dVb = -T9 * dEsatL_dVb / EsatL;
6144 dT0_dVd = -T9 * dEsatL_dVd / EsatL;
6148 T1 = 1.0 / (17.0 + 20.0 * T9);
6149 T0 = (0.8 + T9) * T1;
6151 dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T1;
6154 dT0_dVb = -T9 * dEsatL_dVb;
6155 dT0_dVd = -T9 * dEsatL_dVd;
6158 tmp1 = VACLM * VACLM;
6159 tmp2 = VADIBL * VADIBL;
6160 tmp3 = VACLM + VADIBL;
6162 T1 = VACLM * VADIBL / tmp3;
6164 dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3;
6165 dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3;
6166 dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3;
6168 Va = Vasat + T0 * T1;
6169 dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg;
6170 dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd;
6171 dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb;
6180 T1 = T0 * VASCBE / diffVds;
6181 dVASCBE_dVg = T1 * dVdseff_dVg;
6182 dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd);
6183 dVASCBE_dVb = T1 * dVdseff_dVb;
6188 dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0;
6194 dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0;
6199 beta =
ueff * CoxWovL;
6200 dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff;
6201 dbeta_dVd = CoxWovL * dueff_dVd;
6202 dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff;
6204 T0 = 1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm;
6205 dT0_dVg = -0.5 * (Abulk * dVdseff_dVg
6206 - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm;
6207 dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm;
6208 dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb *
Vdseff) / Vgst2Vtm;
6210 fgche1 = Vgsteff * T0;
6211 dfgche1_dVg = Vgsteff * dT0_dVg + T0;
6212 dfgche1_dVd = Vgsteff * dT0_dVd;
6213 dfgche1_dVb = Vgsteff * dT0_dVb;
6215 T9 = Vdseff / EsatL;
6217 dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL;
6218 dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL;
6219 dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL;
6221 gche = beta * fgche1 / fgche2;
6222 dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg
6223 - gche * dfgche2_dVg) / fgche2;
6225 dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd
6226 - gche * dfgche2_dVd) / fgche2;
6228 dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb
6229 - gche * dfgche2_dVb) / fgche2;
6231 T0 = 1.0 + gche * Rds;
6235 dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0
6236 - Idl * gche / T0 * dRds_dVg ;
6238 dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd) / T0;
6239 dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb
6240 - Idl * dRds_dVb * gche) / T0;
6245 dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va;
6246 dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd
6247 - T9 * dVa_dVd) / Va;
6249 dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va;
6251 T9 = diffVds / VASCBE;
6255 Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE;
6256 Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd
6257 - T9 * dVASCBE_dVd) / VASCBE;
6258 Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb
6259 + T9 * dVASCBE_dVb) / VASCBE;
6261 Gds +=
Gm * dVgsteff_dVd;
6262 Gmb +=
Gm * dVgsteff_dVb;
6270 Isub = Gbd = Gbb = Gbg = 0.0;
6278 T1 = T2 * diffVds * exp(T0);
6279 T3 = T1 / diffVds * (T0 - 1.0);
6280 dT1_dVg = T3 * dVdseff_dVg;
6281 dT1_dVd = T3 * (dVdseff_dVd - 1.0);
6282 dT1_dVb = T3 * dVdseff_dVb;
6288 dT1_dVg = -T3 * dVdseff_dVg;
6289 dT1_dVd = T3 * (1.0 - dVdseff_dVd);
6290 dT1_dVb = -T3 * dVdseff_dVb;
6293 Gbg = T1 * dIdsa_dVg + Idsa * dT1_dVg;
6294 Gbd = T1 * dIdsa_dVd + Idsa * dT1_dVd;
6295 Gbb = T1 * dIdsa_dVb + Idsa * dT1_dVb;
6297 Gbd += Gbg * dVgsteff_dVd;
6298 Gbb += Gbg * dVgsteff_dVb;
6299 Gbg *= dVgsteff_dVg;
6339 dVbseff_dVb = -dPhis_dVb;
6344 Vgst = Vgs_eff - Vth;
6350 Arg1 = Vgs_eff - Vbseff - Vfb;
6371 else if (Vgst <= 0.0)
6374 T2 = sqrt(T1 * T1 + Arg1);
6379 T0 =
CoxWL * T1 / T2;
6395 One_Third_CoxWL =
CoxWL / 3.0;
6396 Two_Third_CoxWL = 2.0 * One_Third_CoxWL;
6401 Vdsat = Vgst / AbulkCV;
6403 dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)/ AbulkCV;
6412 T2 = -Two_Third_CoxWL * Vgst;
6417 T2 = -One_Third_CoxWL * dVdsat_dVb;
6427 T3 = -(T2 + Two_Third_CoxWL * dVth_dVb);
6435 Alphaz = Vgst / Vdsat;
6436 T1 = 2.0 * Vdsat - Vds;
6437 T2 = Vds / (3.0 * T1);
6441 T7 = 2.0 * Vds - T1 - 3.0 * T3;
6442 T8 = T3 - T1 - 2.0 * Vds;
6452 T11 = -
CoxWL * T5 * dVdsat_dVb;
6457 dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg);
6458 dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb);
6462 T9 = 2.0 * T4 * (1.0 - 3.0 * T5);
6465 T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb;
6466 cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5);
6469 T9 = 2.0 * T4 * (1.0 + T5);
6470 T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) *
dVgs_eff_dVg;
6471 T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb;
6472 T12 = T4 * (2.0 * T2 + T5 - 1.0);
6473 T0 = -(T10 + T11 + T12);
6478 cbsb = -(cgsb + cdsb + T0);
6489 T2 = -Two_Third_CoxWL * Vgst;
6495 T2 = -One_Third_CoxWL * dVdsat_dVb;
6499 T3 = 0.4 * Two_Third_CoxWL;
6507 T3 = -(T2 + Two_Third_CoxWL * dVth_dVb);
6514 Alphaz = Vgst / Vdsat;
6515 T1 = 2.0 * Vdsat - Vds;
6516 T2 = Vds / (3.0 * T1);
6524 tmp = -
CoxWL * T5 * dVdsat_dVb;
6529 dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg);
6530 dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb);
6532 T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds;
6534 T7 = Vds - T1 - T8 * T6;
6538 tmp1 = T4*(2.0 - 4.0 * tmp * T6 + T8 *(16.0 * Vdsat - 6.0 *Vds));
6542 T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb;
6543 cddb = T4 * (2.0 - (1.0 / (3.0 * T1
6544 * T1) + 2.0 * tmp) * T6 + T8
6545 * (6.0 * Vdsat - 2.4 * Vds));
6549 T7 = 2.0 * (T1 + T3);
6552 T0 = 4.0 * T4 * (1.0 - T5);
6553 T12 = (-T7 * dAlphaz_dVg -
cdgb
6555 T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb;
6556 T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5)
6559 tmp = -(T10 + T11 + T12);
6573 T2 = -Two_Third_CoxWL * Vgst;
6578 T2 = -One_Third_CoxWL * dVdsat_dVb;
6584 T4 = One_Third_CoxWL * dVth_dVb;
6588 T3 = -(T2 + Two_Third_CoxWL * dVth_dVb);
6595 Alphaz = Vgst / Vdsat;
6596 T1 = 2.0 * Vdsat - Vds;
6597 T2 = Vds / (3.0 * T1);
6607 tmp = -
CoxWL * T5 * dVdsat_dVb;
6612 dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg);
6613 dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb);
6619 T0 = T4 * (2.0 * T5 - 2.0);
6622 T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb;
6623 cddb = T4 * (1.0 - 2.0 * T2 - T5);
6639 dVbseffCV_dVb = 1.0;
6644 dVbseffCV_dVb = -dPhis_dVb;
6655 VgstNVt = (Vgst - voffcv) / T0;
6659 Vgsteff = Vgst - voffcv;
6661 dVgsteff_dVd = -dVth_dVd;
6662 dVgsteff_dVb = -dVth_dVb;
6668 dVgsteff_dVd = Vgsteff / noff;
6669 dVgsteff_dVb = dVgsteff_dVd * dnoff_dVb;
6670 dVgsteff_dVd *= dnoff_dVd;
6674 ExpVgst = exp(VgstNVt);
6675 Vgsteff = T0 * log(1.0 + ExpVgst);
6676 dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst);
6677 dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgst - voffcv)
6678 / noff * dnoff_dVd) + Vgsteff / noff * dnoff_dVd;
6679 dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgst - voffcv)
6680 / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb;
6687 Arg1 = Vgs_eff - VbseffCV - Vfb -
Vgsteff;
6694 Cgb = -
CoxWL * (dVbseffCV_dVb + dVgsteff_dVb);
6699 T1 = sqrt(T0 * T0 + Arg1);
6700 T2 =
CoxWL * T0 / T1;
6705 Cgd = -T2 * dVgsteff_dVd;
6706 Cgb = -T2 * (dVbseffCV_dVb + dVgsteff_dVb);
6713 One_Third_CoxWL =
CoxWL / 3.0;
6714 Two_Third_CoxWL = 2.0 * One_Third_CoxWL;
6717 VdsatCV = Vgsteff / AbulkCV;
6721 dVdsatCV_dVg = 1.0 / AbulkCV;
6722 dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV;
6723 T0 = Vgsteff - VdsatCV / 3.0;
6724 dT0_dVg = 1.0 - dVdsatCV_dVg / 3.0;
6725 dT0_dVb = -dVdsatCV_dVb / 3.0;
6727 Cgg1 =
CoxWL * dT0_dVg;
6728 Cgb1 =
CoxWL * dT0_dVb + Cgg1 * dVgsteff_dVb;
6729 Cgd1 = Cgg1 * dVgsteff_dVd;
6730 Cgg1 *= dVgsteff_dVg;
6736 dT0_dVg = dVdsatCV_dVg - 1.0;
6737 dT0_dVb = dVdsatCV_dVb;
6738 qbulk += One_Third_CoxWL * T0;
6739 Cbg1 = One_Third_CoxWL * dT0_dVg;
6740 Cbb1 = One_Third_CoxWL * dT0_dVb + Cbg1 * dVgsteff_dVb;
6741 Cbd1 = Cbg1 * dVgsteff_dVd;
6742 Cbg1 *= dVgsteff_dVg;
6749 else T0 = -One_Third_CoxWL;
6752 Csg = T0 * dVgsteff_dVg;
6753 Csb = T0 * dVgsteff_dVb;
6754 Csd = T0 * dVgsteff_dVd;
6762 T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.e-20);
6765 dT3_dVg = -12.0 * T2 * T2 * AbulkCV;
6766 dT3_dVd = 6.0 * T0 * (4.0 * Vgsteff - T0) / T1 / T1 - 0.5;
6767 dT3_dVb = 12.0 * T2 * T2 * dAbulkCV_dVb *
Vgsteff;
6770 Cgg1 =
CoxWL * (1.0 + dT3_dVg);
6771 Cgb1 =
CoxWL * dT3_dVb + Cgg1 * dVgsteff_dVb;
6772 Cgd1 =
CoxWL * dT3_dVd + Cgg1 * dVgsteff_dVd;
6773 Cgg1 *= dVgsteff_dVg;
6778 qbulk +=
CoxWL * (1.0 - AbulkCV) * (0.5 * Vds - T3);
6779 Cbg1 = -
CoxWL * ((1.0 - AbulkCV) * dT3_dVg);
6780 Cbb1 = -
CoxWL * ((1.0 - AbulkCV) * dT3_dVb
6781 + (0.5 * Vds - T3) * dAbulkCV_dVb)
6782 + Cbg1 * dVgsteff_dVb;
6783 Cbd1 = -
CoxWL * (1.0 - AbulkCV) * dT3_dVd
6784 + Cbg1 * dVgsteff_dVd;
6785 Cbg1 *= dVgsteff_dVg;
6793 qsrc = -
CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1);
6794 Csg = -
CoxWL * (0.5 + 24.0 * T0 * Vds / T1 / T1 * AbulkCV);
6795 Csb = -
CoxWL * (0.25 * Vds * dAbulkCV_dVb
6796 - 12.0 * T0 * Vds / T1 / T1 * (4.0 * Vgsteff - T0)
6797 * dAbulkCV_dVb) + Csg * dVgsteff_dVb;
6798 Csd = -
CoxWL * (0.25 * AbulkCV - 12.0 * AbulkCV * T0
6799 / T1 / T1 * (4.0 * Vgsteff - T0))
6800 + Csg * dVgsteff_dVd;
6801 Csg *= dVgsteff_dVg;
6806 T2 = 0.5 *
CoxWL / (T1 * T1);
6807 T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff
6808 * (Vgsteff - 4.0 * T0 / 3.0))
6809 - 2.0 * T0 * T0 * T0 / 15.0;
6811 T4 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0)
6813 Csg = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0
6814 * Vgsteff - 8.0 * T0 / 3.0)
6815 + 2.0 * T0 * T0 / 3.0);
6816 Csb = (qsrc / T1 * Vds + T2 * T4 * Vds) * dAbulkCV_dVb
6817 + Csg * dVgsteff_dVb;
6818 Csd = (qsrc / T1 + T2 * T4) * AbulkCV
6819 + Csg * dVgsteff_dVd;
6820 Csg *= dVgsteff_dVg;
6825 Csg = -0.5 * (Cgg1 + Cbg1);
6826 Csb = -0.5 * (Cgb1 + Cbb1);
6827 Csd = -0.5 * (Cgd1 + Cbd1);
6851 T0 = sqrt(V3 * V3 - 4.0 * CONSTDELTA_3 * Vfb);
6852 T2 = -CONSTDELTA_3 / T0;
6856 T0 = sqrt(V3 * V3 + 4.0 * CONSTDELTA_3 * Vfb);
6857 T2 = CONSTDELTA_3 / T0;
6860 T1 = 0.5 * (1.0 + V3 / T0);
6861 Vfbeff = Vfb - 0.5 * (V3 + T0);
6863 dVfbeff_dVb = -T1 * dVbseffCV_dVb;
6864 Qac0 =
CoxWL * (Vfbeff - Vfb);
6865 dQac0_dVg =
CoxWL * dVfbeff_dVg;
6866 dQac0_dVb =
CoxWL * dVfbeff_dVb;
6869 T3 = Vgs_eff - Vfbeff - VbseffCV -
Vgsteff;
6882 T1 = sqrt(T0 * T0 + T3);
6883 T2 =
CoxWL * T0 / T1;
6888 dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg);
6889 dQsub0_dVd = -T2 * dVgsteff_dVd;
6890 dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb);
6894 VdsatCV = Vgsteff / AbulkCV;
6897 T0 = sqrt(V4 * V4 + 4.0 * CONSTDELTA_4 * VdsatCV);
6898 VdseffCV = VdsatCV - 0.5 * (V4 + T0);
6899 T1 = 0.5 * (1.0 + V4 / T0);
6900 T2 = CONSTDELTA_4 / T0;
6901 T3 = (1.0 - T1 - T2) / AbulkCV;
6904 dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb;
6909 dVdseffCV_dVg = 0.0;
6910 dVdseffCV_dVb = 0.0;
6913 T0 = AbulkCV * VdseffCV;
6914 T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20);
6918 T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV);
6919 T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5);
6920 T6 = 12.0 * T2 * T2 *
Vgsteff;
6922 qinoi = -
CoxWL * (Vgsteff - 0.5 * T0 + AbulkCV * T3);
6923 qgate =
CoxWL * (Vgsteff - 0.5 * VdseffCV + T3);
6924 Cgg1 =
CoxWL * (T4 + T5 * dVdseffCV_dVg);
6925 Cgd1 =
CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd;
6926 Cgb1 =
CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
6927 + Cgg1 * dVgsteff_dVb;
6928 Cgg1 *= dVgsteff_dVg;
6932 T4 = -T7 * (T4 - 1.0);
6934 T6 = -(T7 * T6 + (0.5 * VdseffCV - T3));
6935 Cbg1 =
CoxWL * (T4 + T5 * dVdseffCV_dVg);
6936 Cbd1 =
CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd;
6937 Cbb1 =
CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
6938 + Cbg1 * dVgsteff_dVb;
6939 Cbg1 *= dVgsteff_dVg;
6944 qsrc = -
CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1);
6945 T7 = (4.0 * Vgsteff - T0) / (T1 * T1);
6946 T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1));
6947 T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7);
6948 T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7);
6949 Csg =
CoxWL * (T4 + T5 * dVdseffCV_dVg);
6950 Csd =
CoxWL * T5 * dVdseffCV_dVd +
Csg * dVgsteff_dVd;
6951 Csb =
CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
6952 +
Csg * dVgsteff_dVb;
6953 Csg *= dVgsteff_dVg;
6958 T2 = 0.5 *
CoxWL / (T1 * T1);
6959 T3 = Vgsteff *(2.0 * T0 *T0/3.0 +Vgsteff *(Vgsteff - 4.0 *T0/ 3.0))
6960 - 2.0 * T0 * T0 * T0 / 15.0;
6962 T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0)
6964 T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0
6965 * Vgsteff - 8.0 * T0 / 3.0)
6966 + 2.0 * T0 * T0 / 3.0);
6967 T5 = (qsrc / T1 + T2 * T7) * AbulkCV;
6968 T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV);
6969 Csg = (T4 + T5 * dVdseffCV_dVg);
6970 Csd = T5 * dVdseffCV_dVd +
Csg * dVgsteff_dVd;
6971 Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
6972 +
Csg * dVgsteff_dVb;
6973 Csg *= dVgsteff_dVg;
6978 Csg = -0.5 * (Cgg1 + Cbg1);
6979 Csb = -0.5 * (Cgb1 + Cbb1);
6980 Csd = -0.5 * (Cgd1 + Cbd1);
6983 qgate += Qac0 + Qsub0;
6984 qbulk -= (Qac0 + Qsub0);
6987 Cgg = dQac0_dVg + dQsub0_dVg + Cgg1;
6988 Cgd = dQsub0_dVd + Cgd1;
6989 Cgb = dQac0_dVb + dQsub0_dVb + Cgb1;
6991 Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg;
6992 Cbd = Cbd1 - dQsub0_dVd;
6993 Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb;
7018 T2 = -CONSTDELTA_3 / T0;
7023 T2 = CONSTDELTA_3 / T0;
7026 T1 = 0.5 * (1.0 + V3 / T0);
7029 dVfbeff_dVb = -T1 * dVbseffCV_dVb;
7034 dT0_dVg = dVgs_eff_dVg / Tox;
7035 dT0_dVb = -dVbseffCV_dVb / Tox;
7042 dTcen_dVb = dTcen_dVg * dT0_dVb;
7043 dTcen_dVg *= dT0_dVg;
7048 dTcen_dVg = dTcen_dVb = 0.0;
7053 dTcen_dVg = dTcen_dVb = 0.0;
7060 T1 = 0.5 * (1.0 + V3 / V4);
7065 T2 = Cox / (Cox + Ccen);
7068 dCoxeff_dVg = T2 * T2 * T3;
7069 dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb;
7070 dCoxeff_dVg *= dTcen_dVg;
7071 CoxWLcen =
CoxWL * Coxeff / Cox;
7074 QovCox = Qac0 / Coxeff;
7075 dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg;
7076 dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb;
7079 T3 = Vgs_eff - Vfbeff - VbseffCV -
Vgsteff;
7092 T1 = sqrt(T0 * T0 + T3);
7093 T2 = CoxWLcen * T0 / T1;
7097 QovCox = Qsub0 / Coxeff;
7098 dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg)
7099 + QovCox * dCoxeff_dVg;
7100 dQsub0_dVd = -T2 * dVgsteff_dVd;
7101 dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb)
7102 + QovCox * dCoxeff_dVb;
7117 DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi);
7118 dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff);
7126 { T0 = (Vgsteff + T3) / Tox;
7127 dT0_dVd = (dVgsteff_dVd + 4.0 * dVth_dVd) / Tox;
7128 dT0_dVb = (dVgsteff_dVb + 4.0 * dVth_dVb) / Tox;
7131 { T0 = (Vgsteff + 1.0e-20) / Tox;
7132 dT0_dVd = dVgsteff_dVd / Tox;
7133 dT0_dVb = dVgsteff_dVb / Tox;
7135 tmp = exp(0.7 * log(T0));
7137 T2 = 0.7 * tmp / (T0 * Tox);
7139 dTcen_dVg = -1.9e-9 * T2 / T1 /T1;
7140 dTcen_dVd = Tox * dTcen_dVg;
7141 dTcen_dVb = dTcen_dVd * dT0_dVb;
7142 dTcen_dVd *= dT0_dVd;
7143 dTcen_dVg *= dVgsteff_dVg;
7146 T0 = Cox / (Cox + Ccen);
7149 dCoxeff_dVg = T0 * T0 * T1;
7150 dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd;
7151 dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb;
7152 dCoxeff_dVg *= dTcen_dVg;
7153 CoxWLcen =
CoxWL * Coxeff / Cox;
7157 VdsatCV = (Vgsteff - DeltaPhi) / AbulkCV;
7159 T0 = sqrt(V4 * V4 + 4.0 * CONSTDELTA_4 * VdsatCV);
7160 VdseffCV = VdsatCV - 0.5 * (V4 + T0);
7161 T1 = 0.5 * (1.0 + V4 / T0);
7162 T2 = CONSTDELTA_4 / T0;
7163 T3 = (1.0 - T1 - T2) / AbulkCV;
7167 dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb;
7172 dVdseffCV_dVg = 0.0;
7173 dVdseffCV_dVb = 0.0;
7176 T0 = AbulkCV * VdseffCV;
7177 T1 = Vgsteff - DeltaPhi;
7178 T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20);
7180 T4 = 1.0 - 12.0 * T3 * T3;
7181 T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5);
7182 T6 = T5 * VdseffCV / AbulkCV;
7184 qgate = qinoi = CoxWLcen * (T1 - T0 * (0.5 - T3));
7185 QovCox =
qgate / Coxeff;
7186 Cgg1 = CoxWLcen * (T4 * (1.0 -
dDeltaPhi_dVg) + T5 * dVdseffCV_dVg);
7187 Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1
7188 * dVgsteff_dVd + QovCox * dCoxeff_dVd;
7189 Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
7190 + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb;
7191 Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg;
7196 T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV);
7198 T11 = -T7 * T5 / AbulkCV;
7199 T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2));
7201 qbulk = CoxWLcen * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2);
7202 QovCox =
qbulk / Coxeff;
7203 Cbg1 = CoxWLcen * (T10 + T11 * dVdseffCV_dVg);
7204 Cbd1 = CoxWLcen * T11 * dVdseffCV_dVd + Cbg1
7205 * dVgsteff_dVd + QovCox * dCoxeff_dVd;
7206 Cbb1 = CoxWLcen * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb)
7207 + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb;
7208 Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg;
7212 qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2);
7213 QovCox =
qsrc / Coxeff;
7216 T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3);
7221 Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg);
7222 Csd = CoxWLcen * T5 * dVdseffCV_dVd +
Csg * dVgsteff_dVd
7223 + QovCox * dCoxeff_dVd;
7224 Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb)
7225 +
Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb;
7226 Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg;
7231 T3 = 0.5 * CoxWLcen / (T2 * T2);
7232 T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0
7233 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0;
7235 QovCox = qsrc / Coxeff;
7236 T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0;
7237 T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0
7238 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0);
7239 T6 = AbulkCV * (qsrc / T2 + T3 * T8);
7240 T7 = T6 * VdseffCV / AbulkCV;
7243 Csd =
Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd
7244 + QovCox * dCoxeff_dVd;
7245 Csb =
Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb
7246 + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb;
7247 Csg =
Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg;
7258 qbulk -= (Qac0 + Qsub0);
7261 Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg;
7262 Cbd = Cbd1 - dQsub0_dVd;
7263 Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb;
7309 if (drainPerimeter < paramPtr->weff)
7321 if (sourcePerimeter < paramPtr->weff)
7342 capbs = czbs + czbssw + czbsswg;
7350 if (MJ == 0.5) sarg = 1.0 / sqrt(arg);
7351 else sarg = exp(-MJ * log(arg));
7354 qbs =
PhiBTemp * czbs * (1.0 - arg * sarg) / (1.0 - MJ);
7356 capbs = czbs * sarg;
7368 if (MJSW == 0.5) sarg = 1.0 / sqrt(arg);
7369 else sarg = exp(-MJSW * log(arg));
7372 qbs +=
PhiBSWTemp * czbssw * (1.0 - arg * sarg) / (1.0 - MJSW);
7374 capbs += czbssw * sarg;
7380 if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg);
7381 else sarg = exp(-MJSWG * log(arg));
7384 qbs +=
PhiBSWGTemp * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWG);
7386 capbs += czbsswg * sarg;
7392 T0 = czbs + czbssw + czbsswg;
7393 T1 = vbs * (czbs * MJ /
PhiBTemp + czbssw * MJSW
7397 qbs = vbs * (T0 + 0.5 * T1);
7406 capbd = czbd + czbdsw + czbdswg;
7413 if (MJ == 0.5) sarg = 1.0 / sqrt(arg);
7414 else sarg = exp(-MJ * log(arg));
7417 qbd =
PhiBTemp * czbd * (1.0 - arg * sarg) / (1.0 - MJ);
7418 capbd = czbd * sarg;
7430 if (MJSW == 0.5) sarg = 1.0 / sqrt(arg);
7431 else sarg = exp(-MJSW * log(arg));
7434 qbd +=
PhiBSWTemp * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSW);
7435 capbd += czbdsw * sarg;
7441 if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg);
7442 else sarg = exp(-MJSWG * log(arg));
7445 qbd +=
PhiBSWGTemp * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWG);
7446 capbd += czbdswg * sarg;
7451 T0 = czbd + czbdsw + czbdswg;
7456 qbd =
vbd * (T0 + 0.5 * T1);
7485 gtau = gtau_drift + gtau_diff;
7544 T1 = sqrt(T0 * T0 + 4.0 * CONSTDELTA_1);
7545 T2 = 0.5 * (T0 - T1);
7549 cgdo =
paramPtr->
cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1);
7555 T1 = sqrt(T0 * T0 + 4.0 * CONSTDELTA_1);
7556 T2 = 0.5 * (T0 - T1);
7559 cgso =
paramPtr->
cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1);
7615 bool bsuccess =
true;
7690 double cdAbs, esat, DelClm, EffFreq, N0, Nl, Vgst, Leff, Leffsq;
7691 double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, Ssi;
7695 Leffsq = Leff * Leff;
7706 if (DelClm < 0.0) DelClm = 0.0;
7719 T6 = 8.62e-5 * temp * cdAbs * cdAbs;
7724 T9 = (Nl + 2.0e14) * (Nl + 2.0e14);
7726 Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9;
7755 noiseData.
resize(numSources);
7766 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;
7938 double Qqcheq = 0.0;
7963 qVec[
li_Bulk] += (Qeqqb)*numberParallel;
7985 qVec[
li_Charge] += -(Qqcheq - Qqdef)*numberParallel;
8089 msg =
"Instance::auxChargeCalculations ()";
8090 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
8091 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
8792 msg =
"Instance::loadDAEdQdx";
8793 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
8794 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
8886 += (-
gbgs)*numberParallel;
8947 msg =
"Instance::loadDAEdFdx";
8948 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
8949 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
9008 bool bsuccess =
true;
9047 cox = 3.453133e-11 / tox;
9048 if (!
given(
"TOXM")) toxm = tox;
9049 if (!
given(
"DSUB")) dsub = drout;
9050 if (!
given(
"LLC")) Llc = Ll;
9051 if (!
given(
"LWC")) Lwc = Lw;
9052 if (!
given(
"LWLC")) Lwlc = Lwl;
9053 if (!
given(
"WLC")) Wlc = Wl;
9054 if (!
given(
"WWL")) Wwlc = Wwl;
9055 if (!
given(
"WWLC")) Wwlc = Wwl;
9056 if (!
given(
"DWC")) dwc = Wint;
9057 if (!
given(
"DLC")) dlc = Lint;
9063 double C2 = 1.0 + (0.4e-6 / tox);
9064 double C3 = log(C2);
9070 if (
given(
"DLC") && (dlc > 0.0))
cgdo = dlc * cox - cgdl ;
9071 else cgdo = 0.6 * xj * cox;
9076 if (
given(
"DLC") && (dlc > 0.0))
cgso = dlc * cox - cgsl ;
9077 else cgso = 0.6 * xj * cox;
9080 if (!
given(
"CGBO")) cgbo = 2.0 * dwc * cox;
9082 if (!
given(
"CJSWG"))
9083 unitLengthGateSidewallJctCap = unitLengthSidewallJctCap ;
9085 if (!
given(
"PBSWG"))
9086 GatesidewallJctPotential = sidewallJctPotential;
9088 if (!
given(
"MJSWG"))
9089 bulkJctGateSideGradingCoeff = bulkJctSideGradingCoeff;
9093 if (bulkJctPotential < 0.1)
9095 bulkJctPotential = 0.1;
9096 msg =
"Given pb is less than 0.1. Pb is set to 0.1.\n";
9097 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::USR_WARNING_0,msg);
9100 if (sidewallJctPotential < 0.1)
9102 sidewallJctPotential = 0.1;
9103 msg =
"Given pbsw is less than 0.1. Pbsw is set to 0.1.\n";
9104 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::USR_WARNING_0,msg);
9107 if (GatesidewallJctPotential < 0.1)
9109 GatesidewallJctPotential = 0.1;
9110 msg =
"Given pbswg is less than 0.1. Pbswg is set to 0.1.\n";
9111 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::USR_WARNING_0,msg);
9120 * exp(21.5565981 - Eg0 / (2.0 * Vtm0));
9138 std::vector<Instance*>::iterator iter;
9139 std::vector<Instance*>::iterator first = instanceContainer.begin();
9140 std::vector<Instance*>::iterator last = instanceContainer.end();
9142 for (iter=first; iter!=last; ++iter)
9144 (*iter)->processParams();
9162 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
9521 sheetResistance (0.0),
9522 jctSatCurDensity (0.0),
9523 jctSidewallSatCurDensity (0.0),
9524 bulkJctPotential (0.0),
9525 bulkJctBotGradingCoeff (0.0),
9526 bulkJctSideGradingCoeff (0.0),
9527 bulkJctGateSideGradingCoeff (0.0),
9528 sidewallJctPotential (0.0),
9529 GatesidewallJctPotential (0.0),
9530 unitAreaJctCap (0.0),
9531 unitLengthSidewallJctCap (0.0),
9532 unitLengthGateSidewallJctCap (0.0),
9533 jctEmissionCoeff (0.0),
9534 jctTempExponent (0.0),
9570 oxideTrapDensityA (0.0),
9571 oxideTrapDensityB (0.0),
9572 oxideTrapDensityC (0.0),
9598 else if (
getType() ==
"PMOS") {
9614 #ifdef Xyce_BSIM3_USE_DEFL
9624 Report::DevelFatal0() <<
"TNOM is zero";
9633 uc = (
mobMod == 3) ? -0.0465 : -0.0465e-9;
9635 uc1 = (
mobMod == 3) ? -0.056 : -0.056e-9;
9673 std::list<SizeDependParam*>::iterator it_dpL =
9675 std::list<SizeDependParam*>::iterator end_dpL =
9677 for( ; it_dpL != end_dpL; ++it_dpL )
9682 std::vector<Instance*>::iterator iter;
9686 for (iter=first; iter!=last; ++iter)
9703 std::vector<Instance*>::const_iterator iter;
9709 os <<
" name modelName Parameters" << std::endl;
9711 for (i=0, iter=first; iter!=last; ++iter,++i)
9713 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
9739 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
9760 std::list<SizeDependParam*>::iterator it_dpL =
9762 std::list<SizeDependParam*>::iterator end_dpL =
9764 for( ; it_dpL != end_dpL; ++it_dpL )
9786 bool bsuccess =
true;
9792 bsuccess = bsuccess && btmp;
9861 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV)
10111 double Qeqqg = 0.0;
10112 double Qeqqb = 0.0;
10113 double Qeqqd = 0.0;
10114 double Qqdef = 0.0;
10115 double Qqcheq = 0.0;
10136 Qqcheq = -mi.
qcheq;
10200 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
10356 msg =
"Instance::loadDAEMatrices";
10357 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
10358 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
10477 msg =
"Master::loadDAEMatrices";
10478 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
10479 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
10497 int sizeInstances = instanceContainer_.size();
10498 for (
int i=0; i<sizeInstances; ++i)
10500 Instance & mi = *(instanceContainer_.at(i));
10653 msg =
"Master::loadDAEMatrices";
10654 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
10655 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
10774 msg =
"Master::loadDAEMatrices";
10775 msg +=
" nqsMod=1 is not ready yet. Re-run with nqsMod=0\n";
10776 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
10792 .registerDevice(
"m", 9)
10793 .registerDevice(
"m", 49)
10794 .registerModelType(
"pmos", 9)
10795 .registerModelType(
"nmos", 9)
10796 .registerModelType(
"pmos", 49)
10797 .registerModelType(
"nmos", 49);
const InstanceName & getName() const
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &Miter, const FactoryBlock &factory_block)
double * q_GateEquDrainPrimeNodePtr
double jctSidewallSatCurDensity
int ASourcePrimeEquChargeVarOffset
double unitAreaJctCapTemp
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 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)
int ABulkEquSourcePrimeNodeOffset
double getRandomPerturbation()
std::vector< double > gainScale
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
int ASourceEquSourceNodeOffset
double * f_DrainPrimeEquChargeVarPtr
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
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 * 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
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
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