|
|
|
@ -1,20 +1,13 @@ |
|
|
|
/* ****************************************************************************** |
|
|
|
* BSIM4 4.8.2 released by Chetan Kumar Dabhi 01/01/2020 * |
|
|
|
* BSIM4 4.8.3 released on 05/19/2025 * |
|
|
|
* BSIM4 Model Equations * |
|
|
|
****************************************************************************** |
|
|
|
|
|
|
|
****************************************************************************** |
|
|
|
* Copyright (c) 2020 University of California * |
|
|
|
* Copyright (c) 2025 University of California * |
|
|
|
* * |
|
|
|
* Project Director: Prof. Chenming Hu. * |
|
|
|
* Current developers: Chetan Kumar Dabhi (Ph.D. student, IIT Kanpur) * |
|
|
|
* Prof. Yogesh Chauhan (IIT Kanpur) * |
|
|
|
* Dr. Pragya Kushwaha (Postdoc, UC Berkeley) * |
|
|
|
* Dr. Avirup Dasgupta (Postdoc, UC Berkeley) * |
|
|
|
* Ming-Yen Kao (Ph.D. student, UC Berkeley) * |
|
|
|
* Authors: Gary W. Ng, Weidong Liu, Xuemei Xi, Mohan Dunga, Wenwei Yang * |
|
|
|
* Ali Niknejad, Chetan Kumar Dabhi, Yogesh Singh Chauhan, * |
|
|
|
* Sayeef Salahuddin, Chenming Hu * |
|
|
|
* Project Directors: Prof. Sayeef Salahuddin and Prof. Chenming Hu * |
|
|
|
* Developers list: https://www.bsim.berkeley.edu/models/bsim4/auth_bsim4/ * |
|
|
|
******************************************************************************/ |
|
|
|
|
|
|
|
/* |
|
|
|
@ -24,6 +17,9 @@ http://opensource.org/licenses/ECL-2.0 |
|
|
|
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
|
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations |
|
|
|
under the License. |
|
|
|
|
|
|
|
BSIM4 model is supported by the members of Silicon Integration Initiative's Compact Model Coalition. A link to the most recent version of this |
|
|
|
standard can be found at: http://www.si2.org/cmc |
|
|
|
*/ |
|
|
|
|
|
|
|
#include "ngspice/ngspice.h" |
|
|
|
@ -144,12 +140,6 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4geoModGiven) |
|
|
|
model->BSIM4geoMod = 0; |
|
|
|
|
|
|
|
if (!model->BSIM4rgeoModGiven) |
|
|
|
model->BSIM4rgeoMod = 0; |
|
|
|
else if ((model->BSIM4rgeoMod != 0) && (model->BSIM4rgeoMod != 1)) |
|
|
|
{ model->BSIM4rgeoMod = 1; |
|
|
|
printf("Warning: rgeoMod has been set to its default value: 1.\n"); |
|
|
|
} |
|
|
|
if (!model->BSIM4fnoiModGiven) |
|
|
|
model->BSIM4fnoiMod = 1; |
|
|
|
else if ((model->BSIM4fnoiMod != 0) && (model->BSIM4fnoiMod != 1)) |
|
|
|
@ -194,7 +184,7 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4igcModGiven) |
|
|
|
model->BSIM4igcMod = 0; |
|
|
|
else if ((model->BSIM4igcMod != 0) && (model->BSIM4igcMod != 1) |
|
|
|
&& (model->BSIM4igcMod != 2)) |
|
|
|
&& (model->BSIM4igcMod != 2)) |
|
|
|
{ model->BSIM4igcMod = 0; |
|
|
|
printf("Warning: igcMod has been set to its default value: 0.\n"); |
|
|
|
} |
|
|
|
@ -207,13 +197,12 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4tempModGiven) |
|
|
|
model->BSIM4tempMod = 0; |
|
|
|
else if ((model->BSIM4tempMod != 0) && (model->BSIM4tempMod != 1) |
|
|
|
&& (model->BSIM4tempMod != 2) && (model->BSIM4tempMod != 3)) |
|
|
|
&& (model->BSIM4tempMod != 2) && (model->BSIM4tempMod != 3)) |
|
|
|
{ model->BSIM4tempMod = 0; |
|
|
|
printf("Warning: tempMod has been set to its default value: 0.\n"); |
|
|
|
} |
|
|
|
|
|
|
|
if (!model->BSIM4versionGiven) |
|
|
|
model->BSIM4version = copy("4.8.2"); |
|
|
|
model->BSIM4version = copy("4.8.3"); |
|
|
|
if (!model->BSIM4toxrefGiven) |
|
|
|
model->BSIM4toxref = 30.0e-10; |
|
|
|
if (!model->BSIM4eotGiven) |
|
|
|
@ -240,7 +229,6 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4dtox = 0.0; |
|
|
|
if (!model->BSIM4epsroxGiven) |
|
|
|
model->BSIM4epsrox = 3.9; |
|
|
|
|
|
|
|
if (!model->BSIM4cdscGiven) |
|
|
|
model->BSIM4cdsc = 2.4e-4; /* unit Q/V/m^2 */ |
|
|
|
if (!model->BSIM4cdscbGiven) |
|
|
|
@ -267,6 +255,8 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4a2 = 1.0; |
|
|
|
if (!model->BSIM4ketaGiven) |
|
|
|
model->BSIM4keta = -0.047; /* unit / V */ |
|
|
|
if (!model->BSIM4ketacGiven) |
|
|
|
model->BSIM4ketac = model->BSIM4keta; /* unit / V */ |
|
|
|
if (!model->BSIM4nsubGiven) |
|
|
|
model->BSIM4nsub = 6.0e16; /* unit 1/cm3 */ |
|
|
|
if (!model->BSIM4phigGiven) |
|
|
|
@ -317,7 +307,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4dvtp0 = 0.0; |
|
|
|
if (!model->BSIM4dvtp1Given) |
|
|
|
model->BSIM4dvtp1 = 0.0; |
|
|
|
if (!model->BSIM4dvtp2Given) /* New DIBL/Rout */ |
|
|
|
if (!model->BSIM4dvtp2Given) /* New DIBL/Rout */ |
|
|
|
model->BSIM4dvtp2 = 0.0; |
|
|
|
if (!model->BSIM4dvtp3Given) |
|
|
|
model->BSIM4dvtp3 = 0.0; |
|
|
|
@ -351,26 +341,28 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4eu = (model->BSIM4type == NMOS) ? 1.67 : 1.0; |
|
|
|
if (!model->BSIM4ucsGiven) |
|
|
|
model->BSIM4ucs = (model->BSIM4type == NMOS) ? 1.67 : 1.0; |
|
|
|
|
|
|
|
if ((strcmp(model->BSIM4version, "4.8.1")) && (strncmp(model->BSIM4version, "4.81", 4)) && |
|
|
|
(strcmp(model->BSIM4version, "4.8.2")) && (strncmp(model->BSIM4version, "4.82", 4))) |
|
|
|
{ /* check only for version <= 4.80 */ |
|
|
|
if (!model->BSIM4uaGiven) |
|
|
|
(strcmp(model->BSIM4version, "4.8.2")) && (strncmp(model->BSIM4version, "4.82", 4)) && |
|
|
|
(strcmp(model->BSIM4version, "4.8.3")) && (strncmp(model->BSIM4version, "4.83", 4))) |
|
|
|
{ |
|
|
|
if (!model->BSIM4uaGiven) |
|
|
|
model->BSIM4ua = ((model->BSIM4mobMod == 2)) ? 1.0e-15 : 1.0e-9; /* unit m/V */ |
|
|
|
if (!model->BSIM4ucGiven) |
|
|
|
if (!model->BSIM4ucGiven) |
|
|
|
model->BSIM4uc = (model->BSIM4mobMod == 1) ? -0.0465 : -0.0465e-9; |
|
|
|
if (!model->BSIM4uc1Given) |
|
|
|
if (!model->BSIM4uc1Given) |
|
|
|
model->BSIM4uc1 = (model->BSIM4mobMod == 1) ? -0.056 : -0.056e-9; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4uaGiven) |
|
|
|
if (!model->BSIM4uaGiven) |
|
|
|
model->BSIM4ua = ((model->BSIM4mobMod == 2 || model->BSIM4mobMod == 6)) ? 1.0e-15 : 1.0e-9; /* unit m/V */ |
|
|
|
/*printf("warning:ua=%g",model->BSIM4ua);*/ |
|
|
|
if (!model->BSIM4ucGiven) |
|
|
|
if (!model->BSIM4ucGiven) |
|
|
|
model->BSIM4uc = (model->BSIM4mobMod == 1 || model->BSIM4mobMod == 5) ? -0.0465 : -0.0465e-9; |
|
|
|
if (!model->BSIM4uc1Given) |
|
|
|
if (!model->BSIM4uc1Given) |
|
|
|
model->BSIM4uc1 = (model->BSIM4mobMod == 1 || model->BSIM4mobMod == 5) ? -0.056 : -0.056e-9; |
|
|
|
} |
|
|
|
|
|
|
|
if (!model->BSIM4ua1Given) |
|
|
|
model->BSIM4ua1 = 1.0e-9; /* unit m/V */ |
|
|
|
if (!model->BSIM4ubGiven) |
|
|
|
@ -464,7 +456,7 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4beta0Given) |
|
|
|
model->BSIM4beta0 = 0.0; |
|
|
|
if (!model->BSIM4gidlModGiven) |
|
|
|
model->BSIM4gidlMod = 0; /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4gidlMod = 0; /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4agidlGiven) |
|
|
|
model->BSIM4agidl = 0.0; |
|
|
|
if (!model->BSIM4bgidlGiven) |
|
|
|
@ -473,11 +465,11 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4cgidl = 0.5; /* V^3 */ |
|
|
|
if (!model->BSIM4egidlGiven) |
|
|
|
model->BSIM4egidl = 0.8; /* V */ |
|
|
|
if (!model->BSIM4rgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4rgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4rgidl = 1.0; |
|
|
|
if (!model->BSIM4kgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4kgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4kgidl = 0.0; |
|
|
|
if (!model->BSIM4fgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4fgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
/*model->BSIM4fgidl = 0.0;*/ |
|
|
|
/* Default value of fgdil set to 1 in BSIM4.8.0*/ |
|
|
|
model->BSIM4fgidl = 1.0; |
|
|
|
@ -529,12 +521,13 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4cgisl = model->BSIM4cgidl; |
|
|
|
if (!model->BSIM4egislGiven) |
|
|
|
model->BSIM4egisl = model->BSIM4egidl; |
|
|
|
if (!model->BSIM4rgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4rgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4rgisl = model->BSIM4rgidl; |
|
|
|
if (!model->BSIM4kgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4kgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4kgisl = model->BSIM4kgidl; |
|
|
|
if (!model->BSIM4fgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4fgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4fgisl = model->BSIM4fgidl; |
|
|
|
|
|
|
|
if (!model->BSIM4aigcGiven) |
|
|
|
model->BSIM4aigc = (model->BSIM4type == NMOS) ? 1.36e-2 : 9.80e-3; |
|
|
|
if (!model->BSIM4bigcGiven) |
|
|
|
@ -625,9 +618,9 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4rnoia = 0.577; |
|
|
|
if (!model->BSIM4rnoibGiven) |
|
|
|
model->BSIM4rnoib = 0.5164; |
|
|
|
if (!model->BSIM4gidlclampGiven) |
|
|
|
if (!model->BSIM4gidlclampGiven) |
|
|
|
model->BSIM4gidlclamp = -1e-5; |
|
|
|
if (!model->BSIM4idovvdscGiven) |
|
|
|
if (!model->BSIM4idovvdscGiven) |
|
|
|
model->BSIM4idovvdsc = 1e-9; |
|
|
|
if (!model->BSIM4rnoicGiven) |
|
|
|
model->BSIM4rnoic = 0.395; |
|
|
|
@ -647,11 +640,11 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4tvfbsdoff = 0.0; |
|
|
|
if (!model->BSIM4tvoffGiven) |
|
|
|
model->BSIM4tvoff = 0.0; |
|
|
|
if (!model->BSIM4tnfactorGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4tnfactorGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4tnfactor = 0.0; |
|
|
|
if (!model->BSIM4teta0Given) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4teta0Given) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4teta0 = 0.0; |
|
|
|
if (!model->BSIM4tvoffcvGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4tvoffcvGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4tvoffcv = 0.0; |
|
|
|
|
|
|
|
if (!model->BSIM4lintnoiGiven) |
|
|
|
@ -789,7 +782,7 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4tpbswgGiven) |
|
|
|
model->BSIM4tpbswg = 0.0; |
|
|
|
|
|
|
|
/* Length dependence */ |
|
|
|
/* Length dependence */ |
|
|
|
if (!model->BSIM4lcdscGiven) |
|
|
|
model->BSIM4lcdsc = 0.0; |
|
|
|
if (!model->BSIM4lcdscbGiven) |
|
|
|
@ -816,6 +809,8 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4la2 = 0.0; |
|
|
|
if (!model->BSIM4lketaGiven) |
|
|
|
model->BSIM4lketa = 0.0; |
|
|
|
if (!model->BSIM4lketacGiven) |
|
|
|
model->BSIM4lketac = model->BSIM4lketa; |
|
|
|
if (!model->BSIM4lnsubGiven) |
|
|
|
model->BSIM4lnsub = 0.0; |
|
|
|
if (!model->BSIM4lndepGiven) |
|
|
|
@ -827,9 +822,9 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4lngateGiven) |
|
|
|
model->BSIM4lngate = 0.0; |
|
|
|
if (!model->BSIM4lvbmGiven) |
|
|
|
model->BSIM4lvbm = 0.0; |
|
|
|
model->BSIM4lvbm = 0.0; |
|
|
|
if (!model->BSIM4lxtGiven) |
|
|
|
model->BSIM4lxt = 0.0; |
|
|
|
model->BSIM4lxt = 0.0; |
|
|
|
if (!model->BSIM4lk1Given) |
|
|
|
model->BSIM4lk1 = 0.0; |
|
|
|
if (!model->BSIM4lkt1Given) |
|
|
|
@ -854,7 +849,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4ldvtp0 = 0.0; |
|
|
|
if (!model->BSIM4ldvtp1Given) |
|
|
|
model->BSIM4ldvtp1 = 0.0; |
|
|
|
if (!model->BSIM4ldvtp2Given) /* New DIBL/Rout */ |
|
|
|
if (!model->BSIM4ldvtp2Given) /* New DIBL/Rout */ |
|
|
|
model->BSIM4ldvtp2 = 0.0; |
|
|
|
if (!model->BSIM4ldvtp3Given) |
|
|
|
model->BSIM4ldvtp3 = 0.0; |
|
|
|
@ -904,7 +899,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4lu0 = 0.0; |
|
|
|
if (!model->BSIM4luteGiven) |
|
|
|
model->BSIM4lute = 0.0; |
|
|
|
if (!model->BSIM4lucsteGiven) |
|
|
|
if (!model->BSIM4lucsteGiven) |
|
|
|
model->BSIM4lucste = 0.0; |
|
|
|
if (!model->BSIM4lvoffGiven) |
|
|
|
model->BSIM4lvoff = 0.0; |
|
|
|
@ -974,11 +969,11 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4lcgidl = 0.0; |
|
|
|
if (!model->BSIM4legidlGiven) |
|
|
|
model->BSIM4legidl = 0.0; |
|
|
|
if (!model->BSIM4lrgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4lrgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4lrgidl = 0.0; |
|
|
|
if (!model->BSIM4lkgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4lkgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4lkgidl = 0.0; |
|
|
|
if (!model->BSIM4lfgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4lfgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4lfgidl = 0.0; |
|
|
|
/*if (!model->BSIM4lagislGiven) |
|
|
|
{ |
|
|
|
@ -1033,11 +1028,11 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4lcgisl = model->BSIM4lcgidl; |
|
|
|
if (!model->BSIM4legislGiven) |
|
|
|
model->BSIM4legisl = model->BSIM4legidl; |
|
|
|
if (!model->BSIM4lrgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4lrgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4lrgisl = model->BSIM4lrgidl; |
|
|
|
if (!model->BSIM4lkgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4lkgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4lkgisl = model->BSIM4lkgidl; |
|
|
|
if (!model->BSIM4lfgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4lfgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4lfgisl = model->BSIM4lfgidl; |
|
|
|
|
|
|
|
if (!model->BSIM4laigcGiven) |
|
|
|
@ -1055,9 +1050,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4laigsdGiven) |
|
|
|
model->BSIM4laigsd = 0.0; |
|
|
|
model->BSIM4laigs = model->BSIM4laigd = model->BSIM4laigsd; |
|
|
|
if (!model->BSIM4laigsdGiven) |
|
|
|
model->BSIM4laigsd = 0.0; |
|
|
|
model->BSIM4laigs = model->BSIM4laigd = model->BSIM4laigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4bigsdGiven && (model->BSIM4bigsGiven || model->BSIM4bigdGiven)) |
|
|
|
{ |
|
|
|
@ -1068,9 +1063,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4lbigsdGiven) |
|
|
|
model->BSIM4lbigsd = 0.0; |
|
|
|
model->BSIM4lbigs = model->BSIM4lbigd = model->BSIM4lbigsd; |
|
|
|
if (!model->BSIM4lbigsdGiven) |
|
|
|
model->BSIM4lbigsd = 0.0; |
|
|
|
model->BSIM4lbigs = model->BSIM4lbigd = model->BSIM4lbigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4cigsdGiven && (model->BSIM4cigsGiven || model->BSIM4cigdGiven)) |
|
|
|
{ |
|
|
|
@ -1081,9 +1076,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4lcigsdGiven) |
|
|
|
model->BSIM4lcigsd = 0.0; |
|
|
|
model->BSIM4lcigs = model->BSIM4lcigd = model->BSIM4lcigsd; |
|
|
|
if (!model->BSIM4lcigsdGiven) |
|
|
|
model->BSIM4lcigsd = 0.0; |
|
|
|
model->BSIM4lcigs = model->BSIM4lcigd = model->BSIM4lcigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4laigbaccGiven) |
|
|
|
model->BSIM4laigbacc = 0.0; |
|
|
|
@ -1117,7 +1112,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4lxrcrg2 = 0.0; |
|
|
|
if (!model->BSIM4leuGiven) |
|
|
|
model->BSIM4leu = 0.0; |
|
|
|
if (!model->BSIM4lucsGiven) |
|
|
|
if (!model->BSIM4lucsGiven) |
|
|
|
model->BSIM4lucs = 0.0; |
|
|
|
if (!model->BSIM4lvfbGiven) |
|
|
|
model->BSIM4lvfb = 0.0; |
|
|
|
@ -1133,11 +1128,11 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4ltvfbsdoff = 0.0; |
|
|
|
if (!model->BSIM4ltvoffGiven) |
|
|
|
model->BSIM4ltvoff = 0.0; |
|
|
|
if (!model->BSIM4ltnfactorGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4ltnfactorGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4ltnfactor = 0.0; |
|
|
|
if (!model->BSIM4lteta0Given) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4lteta0Given) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4lteta0 = 0.0; |
|
|
|
if (!model->BSIM4ltvoffcvGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4ltvoffcvGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4ltvoffcv = 0.0; |
|
|
|
|
|
|
|
|
|
|
|
@ -1166,7 +1161,7 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4lvoffcvGiven) |
|
|
|
model->BSIM4lvoffcv = 0.0; |
|
|
|
|
|
|
|
/* Width dependence */ |
|
|
|
/* Width dependence */ |
|
|
|
if (!model->BSIM4wcdscGiven) |
|
|
|
model->BSIM4wcdsc = 0.0; |
|
|
|
if (!model->BSIM4wcdscbGiven) |
|
|
|
@ -1193,6 +1188,8 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4wa2 = 0.0; |
|
|
|
if (!model->BSIM4wketaGiven) |
|
|
|
model->BSIM4wketa = 0.0; |
|
|
|
if (!model->BSIM4wketacGiven) |
|
|
|
model->BSIM4wketac = model->BSIM4wketa; |
|
|
|
if (!model->BSIM4wnsubGiven) |
|
|
|
model->BSIM4wnsub = 0.0; |
|
|
|
if (!model->BSIM4wndepGiven) |
|
|
|
@ -1231,7 +1228,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4wdvtp0 = 0.0; |
|
|
|
if (!model->BSIM4wdvtp1Given) |
|
|
|
model->BSIM4wdvtp1 = 0.0; |
|
|
|
if (!model->BSIM4wdvtp2Given) /* New DIBL/Rout */ |
|
|
|
if (!model->BSIM4wdvtp2Given) /* New DIBL/Rout */ |
|
|
|
model->BSIM4wdvtp2 = 0.0; |
|
|
|
if (!model->BSIM4wdvtp3Given) |
|
|
|
model->BSIM4wdvtp3 = 0.0; |
|
|
|
@ -1256,7 +1253,7 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4wdsubGiven) |
|
|
|
model->BSIM4wdsub = 0.0; |
|
|
|
if (!model->BSIM4wvth0Given) |
|
|
|
model->BSIM4wvth0 = 0.0; |
|
|
|
model->BSIM4wvth0 = 0.0; |
|
|
|
if (!model->BSIM4wuaGiven) |
|
|
|
model->BSIM4wua = 0.0; |
|
|
|
if (!model->BSIM4wua1Given) |
|
|
|
@ -1280,11 +1277,11 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4wu0Given) |
|
|
|
model->BSIM4wu0 = 0.0; |
|
|
|
if (!model->BSIM4wuteGiven) |
|
|
|
model->BSIM4wute = 0.0; |
|
|
|
model->BSIM4wute = 0.0; |
|
|
|
if (!model->BSIM4wucsteGiven) |
|
|
|
model->BSIM4wucste = 0.0; |
|
|
|
model->BSIM4wucste = 0.0; |
|
|
|
if (!model->BSIM4wvoffGiven) |
|
|
|
model->BSIM4wvoff = 0.0; |
|
|
|
model->BSIM4wvoff = 0.0; |
|
|
|
if (!model->BSIM4wminvGiven) |
|
|
|
model->BSIM4wminv = 0.0; |
|
|
|
if (!model->BSIM4wminvcvGiven) |
|
|
|
@ -1351,13 +1348,12 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4wcgidl = 0.0; |
|
|
|
if (!model->BSIM4wegidlGiven) |
|
|
|
model->BSIM4wegidl = 0.0; |
|
|
|
if (!model->BSIM4wrgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4wrgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4wrgidl = 0.0; |
|
|
|
if (!model->BSIM4wkgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4wkgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4wkgidl = 0.0; |
|
|
|
if (!model->BSIM4wfgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4wfgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4wfgidl = 0.0; |
|
|
|
|
|
|
|
/*if (!model->BSIM4wagislGiven) |
|
|
|
{ |
|
|
|
if (model->BSIM4wagidlGiven) |
|
|
|
@ -1404,18 +1400,18 @@ BSIM4instance **InstArray; |
|
|
|
|
|
|
|
/*Default value of wagisl, wbgisl, wcgisl, wegisl, wrgisl, wkgisl, and wfgisl are set as follows */ |
|
|
|
if (!model->BSIM4wagislGiven) |
|
|
|
model->BSIM4wagisl = model->BSIM4wagidl; |
|
|
|
model->BSIM4wagisl = model->BSIM4wagidl; |
|
|
|
if (!model->BSIM4wbgislGiven) |
|
|
|
model->BSIM4wbgisl = model->BSIM4wbgidl; |
|
|
|
if (!model->BSIM4wcgislGiven) |
|
|
|
model->BSIM4wcgisl = model->BSIM4wcgidl; |
|
|
|
if (!model->BSIM4wegislGiven) |
|
|
|
model->BSIM4wegisl = model->BSIM4wegidl; |
|
|
|
if (!model->BSIM4wrgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4wrgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4wrgisl = model->BSIM4wrgidl; |
|
|
|
if (!model->BSIM4wkgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4wkgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4wkgisl = model->BSIM4wkgidl; |
|
|
|
if (!model->BSIM4wfgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4wfgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4wfgisl = model->BSIM4wfgidl; |
|
|
|
|
|
|
|
if (!model->BSIM4waigcGiven) |
|
|
|
@ -1433,9 +1429,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4waigsdGiven) |
|
|
|
model->BSIM4waigsd = 0.0; |
|
|
|
model->BSIM4waigs = model->BSIM4waigd = model->BSIM4waigsd; |
|
|
|
if (!model->BSIM4waigsdGiven) |
|
|
|
model->BSIM4waigsd = 0.0; |
|
|
|
model->BSIM4waigs = model->BSIM4waigd = model->BSIM4waigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4bigsdGiven && (model->BSIM4bigsGiven || model->BSIM4bigdGiven)) |
|
|
|
{ |
|
|
|
@ -1446,9 +1442,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4wbigsdGiven) |
|
|
|
model->BSIM4wbigsd = 0.0; |
|
|
|
model->BSIM4wbigs = model->BSIM4wbigd = model->BSIM4wbigsd; |
|
|
|
if (!model->BSIM4wbigsdGiven) |
|
|
|
model->BSIM4wbigsd = 0.0; |
|
|
|
model->BSIM4wbigs = model->BSIM4wbigd = model->BSIM4wbigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4cigsdGiven && (model->BSIM4cigsGiven || model->BSIM4cigdGiven)) |
|
|
|
{ |
|
|
|
@ -1459,9 +1455,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4wcigsdGiven) |
|
|
|
model->BSIM4wcigsd = 0.0; |
|
|
|
model->BSIM4wcigs = model->BSIM4wcigd = model->BSIM4wcigsd; |
|
|
|
if (!model->BSIM4wcigsdGiven) |
|
|
|
model->BSIM4wcigsd = 0.0; |
|
|
|
model->BSIM4wcigs = model->BSIM4wcigd = model->BSIM4wcigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4waigbaccGiven) |
|
|
|
model->BSIM4waigbacc = 0.0; |
|
|
|
@ -1511,11 +1507,11 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4wtvfbsdoff = 0.0; |
|
|
|
if (!model->BSIM4wtvoffGiven) |
|
|
|
model->BSIM4wtvoff = 0.0; |
|
|
|
if (!model->BSIM4wtnfactorGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4wtnfactorGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4wtnfactor = 0.0; |
|
|
|
if (!model->BSIM4wteta0Given) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4wteta0Given) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4wteta0 = 0.0; |
|
|
|
if (!model->BSIM4wtvoffcvGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4wtvoffcvGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4wtvoffcv = 0.0; |
|
|
|
|
|
|
|
if (!model->BSIM4wcgslGiven) |
|
|
|
@ -1543,7 +1539,7 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4wvoffcvGiven) |
|
|
|
model->BSIM4wvoffcv = 0.0; |
|
|
|
|
|
|
|
/* Cross-term dependence */ |
|
|
|
/* Cross-term dependence */ |
|
|
|
if (!model->BSIM4pcdscGiven) |
|
|
|
model->BSIM4pcdsc = 0.0; |
|
|
|
if (!model->BSIM4pcdscbGiven) |
|
|
|
@ -1562,7 +1558,6 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4pat = 0.0; |
|
|
|
if (!model->BSIM4pa0Given) |
|
|
|
model->BSIM4pa0 = 0.0; |
|
|
|
|
|
|
|
if (!model->BSIM4pagsGiven) |
|
|
|
model->BSIM4pags = 0.0; |
|
|
|
if (!model->BSIM4pa1Given) |
|
|
|
@ -1571,6 +1566,8 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4pa2 = 0.0; |
|
|
|
if (!model->BSIM4pketaGiven) |
|
|
|
model->BSIM4pketa = 0.0; |
|
|
|
if (!model->BSIM4pketacGiven) |
|
|
|
model->BSIM4pketac = model->BSIM4pketa; |
|
|
|
if (!model->BSIM4pnsubGiven) |
|
|
|
model->BSIM4pnsub = 0.0; |
|
|
|
if (!model->BSIM4pndepGiven) |
|
|
|
@ -1609,7 +1606,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4pdvtp0 = 0.0; |
|
|
|
if (!model->BSIM4pdvtp1Given) |
|
|
|
model->BSIM4pdvtp1 = 0.0; |
|
|
|
if (!model->BSIM4pdvtp2Given) /* New DIBL/Rout */ |
|
|
|
if (!model->BSIM4pdvtp2Given) /* New DIBL/Rout */ |
|
|
|
model->BSIM4pdvtp2 = 0.0; |
|
|
|
if (!model->BSIM4pdvtp3Given) |
|
|
|
model->BSIM4pdvtp3 = 0.0; |
|
|
|
@ -1659,7 +1656,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4pu0 = 0.0; |
|
|
|
if (!model->BSIM4puteGiven) |
|
|
|
model->BSIM4pute = 0.0; |
|
|
|
if (!model->BSIM4pucsteGiven) |
|
|
|
if (!model->BSIM4pucsteGiven) |
|
|
|
model->BSIM4pucste = 0.0; |
|
|
|
if (!model->BSIM4pvoffGiven) |
|
|
|
model->BSIM4pvoff = 0.0; |
|
|
|
@ -1729,11 +1726,11 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4pcgidl = 0.0; |
|
|
|
if (!model->BSIM4pegidlGiven) |
|
|
|
model->BSIM4pegidl = 0.0; |
|
|
|
if (!model->BSIM4prgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4prgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4prgidl = 0.0; |
|
|
|
if (!model->BSIM4pkgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4pkgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4pkgidl = 0.0; |
|
|
|
if (!model->BSIM4pfgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
if (!model->BSIM4pfgidlGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4pfgidl = 0.0; |
|
|
|
|
|
|
|
/*if (!model->BSIM4pagislGiven) |
|
|
|
@ -1796,6 +1793,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4pkgisl = model->BSIM4pkgidl; |
|
|
|
if (!model->BSIM4pfgislGiven) /* v4.7 New GIDL/GISL */ |
|
|
|
model->BSIM4pfgisl = model->BSIM4pfgidl; |
|
|
|
|
|
|
|
if (!model->BSIM4paigcGiven) |
|
|
|
model->BSIM4paigc = 0.0; |
|
|
|
if (!model->BSIM4pbigcGiven) |
|
|
|
@ -1811,9 +1809,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4paigsdGiven) |
|
|
|
model->BSIM4paigsd = 0.0; |
|
|
|
model->BSIM4paigs = model->BSIM4paigd = model->BSIM4paigsd; |
|
|
|
if (!model->BSIM4paigsdGiven) |
|
|
|
model->BSIM4paigsd = 0.0; |
|
|
|
model->BSIM4paigs = model->BSIM4paigd = model->BSIM4paigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4bigsdGiven && (model->BSIM4bigsGiven || model->BSIM4bigdGiven)) |
|
|
|
{ |
|
|
|
@ -1824,9 +1822,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4pbigsdGiven) |
|
|
|
model->BSIM4pbigsd = 0.0; |
|
|
|
model->BSIM4pbigs = model->BSIM4pbigd = model->BSIM4pbigsd; |
|
|
|
if (!model->BSIM4pbigsdGiven) |
|
|
|
model->BSIM4pbigsd = 0.0; |
|
|
|
model->BSIM4pbigs = model->BSIM4pbigd = model->BSIM4pbigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4cigsdGiven && (model->BSIM4cigsGiven || model->BSIM4cigdGiven)) |
|
|
|
{ |
|
|
|
@ -1837,9 +1835,9 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (!model->BSIM4pcigsdGiven) |
|
|
|
model->BSIM4pcigsd = 0.0; |
|
|
|
model->BSIM4pcigs = model->BSIM4pcigd = model->BSIM4pcigsd; |
|
|
|
if (!model->BSIM4pcigsdGiven) |
|
|
|
model->BSIM4pcigsd = 0.0; |
|
|
|
model->BSIM4pcigs = model->BSIM4pcigd = model->BSIM4pcigsd; |
|
|
|
} |
|
|
|
if (!model->BSIM4paigbaccGiven) |
|
|
|
model->BSIM4paigbacc = 0.0; |
|
|
|
@ -1873,7 +1871,7 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4pxrcrg2 = 0.0; |
|
|
|
if (!model->BSIM4peuGiven) |
|
|
|
model->BSIM4peu = 0.0; |
|
|
|
if (!model->BSIM4pucsGiven) |
|
|
|
if (!model->BSIM4pucsGiven) |
|
|
|
model->BSIM4pucs = 0.0; |
|
|
|
if (!model->BSIM4pvfbGiven) |
|
|
|
model->BSIM4pvfb = 0.0; |
|
|
|
@ -1889,13 +1887,12 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4ptvfbsdoff = 0.0; |
|
|
|
if (!model->BSIM4ptvoffGiven) |
|
|
|
model->BSIM4ptvoff = 0.0; |
|
|
|
if (!model->BSIM4ptnfactorGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4ptnfactorGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4ptnfactor = 0.0; |
|
|
|
if (!model->BSIM4pteta0Given) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4pteta0Given) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4pteta0 = 0.0; |
|
|
|
if (!model->BSIM4ptvoffcvGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
if (!model->BSIM4ptvoffcvGiven) /* v4.7 temp dep of leakage current */ |
|
|
|
model->BSIM4ptvoffcv = 0.0; |
|
|
|
|
|
|
|
if (!model->BSIM4pcgslGiven) |
|
|
|
model->BSIM4pcgsl = 0.0; |
|
|
|
if (!model->BSIM4pcgdlGiven) |
|
|
|
@ -1920,7 +1917,6 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4pnoff = 0.0; |
|
|
|
if (!model->BSIM4pvoffcvGiven) |
|
|
|
model->BSIM4pvoffcv = 0.0; |
|
|
|
|
|
|
|
if (!model->BSIM4gamma1Given) |
|
|
|
model->BSIM4gamma1 = 0.0; |
|
|
|
if (!model->BSIM4lgamma1Given) |
|
|
|
@ -1948,7 +1944,7 @@ BSIM4instance **InstArray; |
|
|
|
|
|
|
|
/* unit degree celcius */ |
|
|
|
if (!model->BSIM4tnomGiven) |
|
|
|
model->BSIM4tnom = ckt->CKTnomTemp; |
|
|
|
model->BSIM4tnom = ckt->CKTnomTemp; |
|
|
|
if (!model->BSIM4LintGiven) |
|
|
|
model->BSIM4Lint = 0.0; |
|
|
|
if (!model->BSIM4LlGiven) |
|
|
|
@ -2007,7 +2003,7 @@ BSIM4instance **InstArray; |
|
|
|
{ |
|
|
|
if (model->BSIM4dlcigGiven) |
|
|
|
model->BSIM4dlcigd = model->BSIM4dlcig; |
|
|
|
else |
|
|
|
else |
|
|
|
model->BSIM4dlcigd = model->BSIM4Lint; |
|
|
|
} |
|
|
|
if (!model->BSIM4dwjGiven) |
|
|
|
@ -2085,8 +2081,8 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4jtsswgs = 0.0; |
|
|
|
if (!model->BSIM4jtsswgdGiven) |
|
|
|
model->BSIM4jtsswgd = model->BSIM4jtsswgs; |
|
|
|
if (!model->BSIM4jtweffGiven) |
|
|
|
model->BSIM4jtweff = 0.0; |
|
|
|
if (!model->BSIM4jtweffGiven) |
|
|
|
model->BSIM4jtweff = 0.0; |
|
|
|
if (!model->BSIM4njtsGiven) |
|
|
|
model->BSIM4njts = 20.0; |
|
|
|
if (!model->BSIM4njtsswGiven) |
|
|
|
@ -2098,21 +2094,21 @@ BSIM4instance **InstArray; |
|
|
|
if (model->BSIM4njtsGiven) |
|
|
|
model->BSIM4njtsd = model->BSIM4njts; |
|
|
|
else |
|
|
|
model->BSIM4njtsd = 20.0; |
|
|
|
model->BSIM4njtsd = 20.0; |
|
|
|
} |
|
|
|
if (!model->BSIM4njtsswdGiven) |
|
|
|
{ |
|
|
|
if (model->BSIM4njtsswGiven) |
|
|
|
model->BSIM4njtsswd = model->BSIM4njtssw; |
|
|
|
else |
|
|
|
model->BSIM4njtsswd = 20.0; |
|
|
|
model->BSIM4njtsswd = 20.0; |
|
|
|
} |
|
|
|
if (!model->BSIM4njtsswgdGiven) |
|
|
|
{ |
|
|
|
if (model->BSIM4njtsswgGiven) |
|
|
|
model->BSIM4njtsswgd = model->BSIM4njtsswg; |
|
|
|
else |
|
|
|
model->BSIM4njtsswgd = 20.0; |
|
|
|
model->BSIM4njtsswgd = 20.0; |
|
|
|
} |
|
|
|
if (!model->BSIM4xtssGiven) |
|
|
|
model->BSIM4xtss = 0.02; |
|
|
|
@ -2137,21 +2133,21 @@ BSIM4instance **InstArray; |
|
|
|
if (model->BSIM4tnjtsGiven) |
|
|
|
model->BSIM4tnjtsd = model->BSIM4tnjts; |
|
|
|
else |
|
|
|
model->BSIM4tnjtsd = 0.0; |
|
|
|
model->BSIM4tnjtsd = 0.0; |
|
|
|
} |
|
|
|
if (!model->BSIM4tnjtsswdGiven) |
|
|
|
{ |
|
|
|
if (model->BSIM4tnjtsswGiven) |
|
|
|
model->BSIM4tnjtsswd = model->BSIM4tnjtssw; |
|
|
|
else |
|
|
|
model->BSIM4tnjtsswd = 0.0; |
|
|
|
model->BSIM4tnjtsswd = 0.0; |
|
|
|
} |
|
|
|
if (!model->BSIM4tnjtsswgdGiven) |
|
|
|
{ |
|
|
|
if (model->BSIM4tnjtsswgGiven) |
|
|
|
model->BSIM4tnjtsswgd = model->BSIM4tnjtsswg; |
|
|
|
else |
|
|
|
model->BSIM4tnjtsswgd = 0.0; |
|
|
|
else |
|
|
|
model->BSIM4tnjtsswgd = 0.0; |
|
|
|
} |
|
|
|
if (!model->BSIM4vtssGiven) |
|
|
|
model->BSIM4vtss = 10.0; |
|
|
|
@ -2167,13 +2163,15 @@ BSIM4instance **InstArray; |
|
|
|
model->BSIM4vtsswgd = model->BSIM4vtsswgs; |
|
|
|
|
|
|
|
if (!model->BSIM4oxideTrapDensityAGiven) |
|
|
|
{ if (model->BSIM4type == NMOS) |
|
|
|
{ |
|
|
|
if (model->BSIM4type == NMOS) |
|
|
|
model->BSIM4oxideTrapDensityA = 6.25e41; |
|
|
|
else |
|
|
|
model->BSIM4oxideTrapDensityA= 6.188e40; |
|
|
|
} |
|
|
|
if (!model->BSIM4oxideTrapDensityBGiven) |
|
|
|
{ if (model->BSIM4type == NMOS) |
|
|
|
{ |
|
|
|
if (model->BSIM4type == NMOS) |
|
|
|
model->BSIM4oxideTrapDensityB = 3.125e26; |
|
|
|
else |
|
|
|
model->BSIM4oxideTrapDensityB = 1.5e25; |
|
|
|
@ -2256,7 +2254,7 @@ BSIM4instance **InstArray; |
|
|
|
if (!model->BSIM4lodeta0Given) |
|
|
|
model->BSIM4lodeta0 = 1.0; |
|
|
|
|
|
|
|
/* Well Proximity Effect */ |
|
|
|
/* Well Proximity Effect */ |
|
|
|
if (!model->BSIM4webGiven) |
|
|
|
model->BSIM4web = 0.0; |
|
|
|
if (!model->BSIM4wecGiven) |
|
|
|
@ -2305,11 +2303,9 @@ BSIM4instance **InstArray; |
|
|
|
|
|
|
|
for (here = BSIM4instances(model); here != NULL ; |
|
|
|
here=BSIM4nextInstance(here)) |
|
|
|
{ |
|
|
|
/* allocate a chunk of the state vector */ |
|
|
|
{ /* allocate a chunk of the state vector */ |
|
|
|
here->BSIM4states = *states; |
|
|
|
*states += BSIM4numStates; |
|
|
|
|
|
|
|
/* perform the parameter defaulting */ |
|
|
|
if (!here->BSIM4lGiven) |
|
|
|
here->BSIM4l = 5.0e-6; |
|
|
|
@ -2317,6 +2313,12 @@ BSIM4instance **InstArray; |
|
|
|
here->BSIM4w = 5.0e-6; |
|
|
|
if (!here->BSIM4mGiven) |
|
|
|
here->BSIM4m = 1.0; |
|
|
|
if (!here->BSIM4mult_iGiven) |
|
|
|
here->BSIM4mult_i = 1.0; |
|
|
|
if (!here->BSIM4mult_qGiven) |
|
|
|
here->BSIM4mult_q = 1.0; |
|
|
|
if (!here->BSIM4mult_fnGiven) |
|
|
|
here->BSIM4mult_fn = here->BSIM4mult_i; |
|
|
|
if (!here->BSIM4nfGiven) |
|
|
|
here->BSIM4nf = 1.0; |
|
|
|
if (!here->BSIM4minGiven) |
|
|
|
@ -2352,29 +2354,30 @@ BSIM4instance **InstArray; |
|
|
|
here->BSIM4rbpd = model->BSIM4rbpd; |
|
|
|
if (!here->BSIM4delvtoGiven) |
|
|
|
here->BSIM4delvto = 0.0; |
|
|
|
if (!here->BSIM4mulu0Given) |
|
|
|
here->BSIM4mulu0 = 1.0; |
|
|
|
if (!here->BSIM4xgwGiven) |
|
|
|
here->BSIM4xgw = model->BSIM4xgw; |
|
|
|
if (!here->BSIM4ngconGiven) |
|
|
|
here->BSIM4ngcon = model->BSIM4ngcon; |
|
|
|
|
|
|
|
here->BSIM4mult_i = here->BSIM4mult_i * here->BSIM4m; |
|
|
|
here->BSIM4mult_q = here->BSIM4mult_q * here->BSIM4m; |
|
|
|
here->BSIM4mult_fn = here->BSIM4mult_fn * here->BSIM4m; |
|
|
|
|
|
|
|
/* Process instance model selectors, some |
|
|
|
* may override their global counterparts |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
if (!here->BSIM4rbodyModGiven) |
|
|
|
here->BSIM4rbodyMod = model->BSIM4rbodyMod; |
|
|
|
else if ((here->BSIM4rbodyMod != 0) && (here->BSIM4rbodyMod != 1) && (here->BSIM4rbodyMod != 2)) |
|
|
|
{ here->BSIM4rbodyMod = model->BSIM4rbodyMod; |
|
|
|
printf("Warning: rbodyMod has been set to its global value %d.\n", |
|
|
|
model->BSIM4rbodyMod); |
|
|
|
model->BSIM4rbodyMod); |
|
|
|
} |
|
|
|
|
|
|
|
if (!here->BSIM4rgateModGiven) |
|
|
|
here->BSIM4rgateMod = model->BSIM4rgateMod; |
|
|
|
else if ((here->BSIM4rgateMod != 0) && (here->BSIM4rgateMod != 1) |
|
|
|
&& (here->BSIM4rgateMod != 2) && (here->BSIM4rgateMod != 3)) |
|
|
|
&& (here->BSIM4rgateMod != 2) && (here->BSIM4rgateMod != 3)) |
|
|
|
{ here->BSIM4rgateMod = model->BSIM4rgateMod; |
|
|
|
printf("Warning: rgateMod has been set to its global value %d.\n", |
|
|
|
model->BSIM4rgateMod); |
|
|
|
@ -2382,15 +2385,8 @@ BSIM4instance **InstArray; |
|
|
|
|
|
|
|
if (!here->BSIM4geoModGiven) |
|
|
|
here->BSIM4geoMod = model->BSIM4geoMod; |
|
|
|
|
|
|
|
if (!here->BSIM4rgeoModGiven) |
|
|
|
here->BSIM4rgeoMod = model->BSIM4rgeoMod; |
|
|
|
else if ((here->BSIM4rgeoMod != 0) && (here->BSIM4rgeoMod != 1)) |
|
|
|
{ here->BSIM4rgeoMod = model->BSIM4rgeoMod; |
|
|
|
printf("Warning: rgeoMod has been set to its global value %d.\n", |
|
|
|
model->BSIM4rgeoMod); |
|
|
|
} |
|
|
|
|
|
|
|
here->BSIM4rgeoMod = 0; |
|
|
|
if (!here->BSIM4trnqsModGiven) |
|
|
|
here->BSIM4trnqsMod = model->BSIM4trnqsMod; |
|
|
|
else if ((here->BSIM4trnqsMod != 0) && (here->BSIM4trnqsMod != 1)) |
|
|
|
@ -2439,7 +2435,7 @@ BSIM4instance **InstArray; |
|
|
|
} else if (!here->BSIM4drainSquaresGiven |
|
|
|
&& (here->BSIM4rgeoMod != 0)) |
|
|
|
{ |
|
|
|
BSIM4RdseffGeo(here->BSIM4nf*here->BSIM4m, here->BSIM4geoMod, |
|
|
|
BSIM4RdseffGeo(here->BSIM4nf, here->BSIM4geoMod, |
|
|
|
here->BSIM4rgeoMod, here->BSIM4min, |
|
|
|
here->BSIM4w, model->BSIM4sheetResistance, |
|
|
|
DMCGeff, DMCIeff, DMDGeff, 0, &Rtot); |
|
|
|
@ -2447,8 +2443,7 @@ BSIM4instance **InstArray; |
|
|
|
createNode = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
if ( createNode != 0 ) |
|
|
|
{ if ( here->BSIM4dNodePrime == 0 ) |
|
|
|
if ( createNode != 0 && (here->BSIM4dNodePrime == 0)) |
|
|
|
{ error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"drain"); |
|
|
|
if(error) return(error); |
|
|
|
here->BSIM4dNodePrime = tmp->number; |
|
|
|
@ -2463,7 +2458,6 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ here->BSIM4dNodePrime = here->BSIM4dNode; |
|
|
|
} |
|
|
|
@ -2475,7 +2469,7 @@ BSIM4instance **InstArray; |
|
|
|
{ |
|
|
|
createNode = 1; |
|
|
|
} else if (model->BSIM4sheetResistance > 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (here->BSIM4sourceSquaresGiven |
|
|
|
&& here->BSIM4sourceSquares > 0) |
|
|
|
{ |
|
|
|
@ -2483,16 +2477,15 @@ BSIM4instance **InstArray; |
|
|
|
} else if (!here->BSIM4sourceSquaresGiven |
|
|
|
&& (here->BSIM4rgeoMod != 0)) |
|
|
|
{ |
|
|
|
BSIM4RdseffGeo(here->BSIM4nf*here->BSIM4m, here->BSIM4geoMod, |
|
|
|
BSIM4RdseffGeo(here->BSIM4nf, here->BSIM4geoMod, |
|
|
|
here->BSIM4rgeoMod, here->BSIM4min, |
|
|
|
here->BSIM4w, model->BSIM4sheetResistance, |
|
|
|
DMCGeff, DMCIeff, DMDGeff, 1, &Rtot); |
|
|
|
if(Rtot > 0) |
|
|
|
createNode = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
if ( createNode != 0 ) |
|
|
|
{ if ( here->BSIM4sNodePrime == 0 ) |
|
|
|
} |
|
|
|
if ( createNode != 0 && here->BSIM4sNodePrime == 0) |
|
|
|
{ error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"source"); |
|
|
|
if(error) return(error); |
|
|
|
here->BSIM4sNodePrime = tmp->number; |
|
|
|
@ -2507,12 +2500,10 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
here->BSIM4sNodePrime = here->BSIM4sNode; |
|
|
|
|
|
|
|
if ( here->BSIM4rgateMod > 0 ) |
|
|
|
{ if ( here->BSIM4gNodePrime == 0 ) |
|
|
|
if ((here->BSIM4rgateMod > 0) && (here->BSIM4gNodePrime == 0)) |
|
|
|
{ error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"gate"); |
|
|
|
if(error) return(error); |
|
|
|
here->BSIM4gNodePrime = tmp->number; |
|
|
|
@ -2527,17 +2518,14 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
here->BSIM4gNodePrime = here->BSIM4gNodeExt; |
|
|
|
|
|
|
|
if ( here->BSIM4rgateMod == 3 ) |
|
|
|
{ if ( here->BSIM4gNodeMid == 0 ) |
|
|
|
if ((here->BSIM4rgateMod == 3) && (here->BSIM4gNodeMid == 0)) |
|
|
|
{ error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"midgate"); |
|
|
|
if(error) return(error); |
|
|
|
here->BSIM4gNodeMid = tmp->number; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
here->BSIM4gNodeMid = here->BSIM4gNodeExt; |
|
|
|
|
|
|
|
@ -2571,23 +2559,20 @@ BSIM4instance **InstArray; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
here->BSIM4dbNode = here->BSIM4bNodePrime = here->BSIM4sbNode |
|
|
|
= here->BSIM4bNode; |
|
|
|
here->BSIM4dbNode = here->BSIM4bNodePrime = here->BSIM4sbNode |
|
|
|
= here->BSIM4bNode; |
|
|
|
|
|
|
|
/* NQS node */ |
|
|
|
if ( here->BSIM4trnqsMod ) |
|
|
|
{ if ( here->BSIM4qNode == 0 ) |
|
|
|
if ((here->BSIM4trnqsMod) && (here->BSIM4qNode == 0)) |
|
|
|
{ error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"charge"); |
|
|
|
if(error) return(error); |
|
|
|
here->BSIM4qNode = tmp->number; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
here->BSIM4qNode = 0; |
|
|
|
|
|
|
|
|
|
|
|
/* set Sparse Matrix Pointers |
|
|
|
* macro to make elements with built-in out-of-memory test */ |
|
|
|
* macro to make elements with built-in out-of-memory test */ |
|
|
|
#define TSTALLOC(ptr,first,second) \ |
|
|
|
do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ |
|
|
|
return(E_NOMEM);\ |
|
|
|
@ -2619,7 +2604,7 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL |
|
|
|
TSTALLOC(BSIM4SPdpPtr, BSIM4sNodePrime, BSIM4dNodePrime); |
|
|
|
|
|
|
|
TSTALLOC(BSIM4QqPtr, BSIM4qNode, BSIM4qNode); |
|
|
|
TSTALLOC(BSIM4QbpPtr, BSIM4qNode, BSIM4bNodePrime) ; |
|
|
|
TSTALLOC(BSIM4QbpPtr, BSIM4qNode, BSIM4bNodePrime); |
|
|
|
TSTALLOC(BSIM4QdpPtr, BSIM4qNode, BSIM4dNodePrime); |
|
|
|
TSTALLOC(BSIM4QspPtr, BSIM4qNode, BSIM4sNodePrime); |
|
|
|
TSTALLOC(BSIM4QgpPtr, BSIM4qNode, BSIM4gNodePrime); |
|
|
|
@ -2722,10 +2707,9 @@ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NUL |
|
|
|
|
|
|
|
int |
|
|
|
BSIM4unsetup( |
|
|
|
GENmodel *inModel, |
|
|
|
CKTcircuit *ckt) |
|
|
|
GENmodel *inModel, |
|
|
|
CKTcircuit *ckt) |
|
|
|
{ |
|
|
|
#ifndef HAS_BATCHSIM |
|
|
|
BSIM4model *model; |
|
|
|
BSIM4instance *here; |
|
|
|
|
|
|
|
@ -2780,6 +2764,5 @@ CKTcircuit *ckt) |
|
|
|
here->BSIM4dNodePrime = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
return OK; |
|
|
|
} |