|
|
@ -1,65 +1,36 @@ |
|
|
/* ****************************************************************************** |
|
|
/* ****************************************************************************** |
|
|
* BSIM4 4.8.1 released by Chetan Kumar Dabhi 2/15/2017 * |
|
|
|
|
|
|
|
|
* BSIM4 4.8.2 released by Chetan Kumar Dabhi 01/01/2020 * |
|
|
* BSIM4 Model Equations * |
|
|
* BSIM4 Model Equations * |
|
|
****************************************************************************** |
|
|
****************************************************************************** |
|
|
|
|
|
|
|
|
****************************************************************************** |
|
|
****************************************************************************** |
|
|
* Copyright 2017 Regents of the University of California. * |
|
|
|
|
|
* All rights reserved. * |
|
|
|
|
|
|
|
|
* Copyright (c) 2020 University of California * |
|
|
* * |
|
|
* * |
|
|
* Project Director: Prof. Chenming Hu. * |
|
|
* 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 * |
|
|
* Authors: Gary W. Ng, Weidong Liu, Xuemei Xi, Mohan Dunga, Wenwei Yang * |
|
|
* Ali Niknejad, Shivendra Singh Parihar, Chetan Kumar Dabhi * |
|
|
|
|
|
* Yogesh Singh Chauhan, Sayeef Salahuddin, Chenming Hu * |
|
|
|
|
|
****************************************************************************** |
|
|
|
|
|
|
|
|
|
|
|
****************************************************************************** |
|
|
|
|
|
* CMC In-Code Statement * |
|
|
|
|
|
* * |
|
|
|
|
|
* The Developer agrees that the following statement will appear in the * |
|
|
|
|
|
* model code that has been adopted as a CMC Standard. * |
|
|
|
|
|
* * |
|
|
|
|
|
* Software is distributed as is, completely without warranty or service * |
|
|
|
|
|
* support. The University of California and its employees are not liable * |
|
|
|
|
|
* for the condition or performance of the software. * |
|
|
|
|
|
* * |
|
|
|
|
|
* The University of California owns the copyright and grants users a * |
|
|
|
|
|
* perpetual, irrevocable, worldwide, non-exclusive, royalty-free license * |
|
|
|
|
|
* with respect to the software as set forth below. * |
|
|
|
|
|
* * |
|
|
|
|
|
* The University of California hereby disclaims all implied warranties. * |
|
|
|
|
|
* * |
|
|
|
|
|
* The University of California grants the users the right to modify, * |
|
|
|
|
|
* copy, and redistribute the software and documentation, both within * |
|
|
|
|
|
* the user's organization and externally, subject to the following * |
|
|
|
|
|
* restrictions: * |
|
|
|
|
|
* * |
|
|
|
|
|
* 1. The users agree not to charge for the University of California code * |
|
|
|
|
|
* itself but may charge for additions, extensions, or support. * |
|
|
|
|
|
* * |
|
|
|
|
|
* 2. In any product based on the software, the users agree to * |
|
|
|
|
|
* acknowledge the University of California that developed the * |
|
|
|
|
|
* software. This acknowledgment shall appear in the product * |
|
|
|
|
|
* documentation. * |
|
|
|
|
|
* * |
|
|
|
|
|
* 3. Redistributions to others of source code and documentation must * |
|
|
|
|
|
* retain the copyright notice, disclaimer, and list of conditions. * |
|
|
|
|
|
* * |
|
|
|
|
|
* 4. Redistributions to others in binary form must reproduce the * |
|
|
|
|
|
* copyright notice, disclaimer, and list of conditions in the * |
|
|
|
|
|
* documentation and/or other materials provided with the * |
|
|
|
|
|
* distribution. * |
|
|
|
|
|
* * |
|
|
|
|
|
* Agreed to on ______Feb. 15, 2017______________ * |
|
|
|
|
|
* * |
|
|
|
|
|
* By: ____University of California, Berkeley___ * |
|
|
|
|
|
* ____Chenming Hu__________________________ * |
|
|
|
|
|
* ____Professor in Graduate School ________ * |
|
|
|
|
|
* * |
|
|
|
|
|
****************************************************************************** |
|
|
|
|
|
* Modified by Holger Vogt, 12/27/2020 |
|
|
|
|
|
|
|
|
* Ali Niknejad, Chetan Kumar Dabhi, Yogesh Singh Chauhan, * |
|
|
|
|
|
* Sayeef Salahuddin, Chenming Hu * |
|
|
******************************************************************************/ |
|
|
******************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
Licensed under Educational Community License, Version 2.0 (the "License"); you may |
|
|
|
|
|
not use this file except in compliance with the License. You may obtain a copy of the license at |
|
|
|
|
|
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. |
|
|
|
|
|
|
|
|
|
|
|
BSIM-CMG 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 |
|
|
|
|
|
|
|
|
|
|
|
* Modified by Holger Vogt, 12/27/2020 |
|
|
|
|
|
********************************************************************************/ |
|
|
|
|
|
|
|
|
#include "ngspice/ngspice.h" |
|
|
#include "ngspice/ngspice.h" |
|
|
#include "ngspice/cktdefs.h" |
|
|
#include "ngspice/cktdefs.h" |
|
|
#include "bsim4def.h" |
|
|
#include "bsim4def.h" |
|
|
@ -108,12 +79,13 @@ CKTcircuit *ckt) |
|
|
wl->wl_next = NULL; |
|
|
wl->wl_next = NULL; |
|
|
wl->wl_word = tprintf("\nChecking parameters for BSIM 4.8 model %s\n", model->BSIM4modName); |
|
|
wl->wl_word = tprintf("\nChecking parameters for BSIM 4.8 model %s\n", model->BSIM4modName); |
|
|
|
|
|
|
|
|
if ((strcmp(model->BSIM4version, "4.8.1")) && (strncmp(model->BSIM4version, "4.81", 4)) && (strncmp(model->BSIM4version, "4.8", 3))) |
|
|
|
|
|
|
|
|
if ((strcmp(model->BSIM4version, "4.8.0")) && (strncmp(model->BSIM4version, "4.80", 4)) && (strncmp(model->BSIM4version, "4.8", 3)) && |
|
|
|
|
|
(strcmp(model->BSIM4version, "4.8.1")) && (strncmp(model->BSIM4version, "4.81", 4))) |
|
|
{ |
|
|
{ |
|
|
printf("Warning: This model supports BSIM4 version 4.8\n"); |
|
|
printf("Warning: This model supports BSIM4 version 4.8\n"); |
|
|
printf("You specified a wrong version number. Working now with BSIM4.8.1\n"); |
|
|
|
|
|
|
|
|
printf("You specified a wrong version number. Working now with BSIM4.8.2\n"); |
|
|
wl_append_word(&wl, &wl, tprintf("Warning: This model supports BSIM4 version 4.8\n")); |
|
|
wl_append_word(&wl, &wl, tprintf("Warning: This model supports BSIM4 version 4.8\n")); |
|
|
wl_append_word(&wl, &wl, tprintf("You specified a wrong version number. Working now with BSIM4.8.1.\n")); |
|
|
|
|
|
|
|
|
wl_append_word(&wl, &wl, tprintf("You specified a wrong version number. Working now with BSIM4.8.2.\n")); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ((here->BSIM4rgateMod == 2) || (here->BSIM4rgateMod == 3)) |
|
|
if ((here->BSIM4rgateMod == 2) || (here->BSIM4rgateMod == 3)) |
|
|
@ -538,7 +510,11 @@ CKTcircuit *ckt) |
|
|
{ |
|
|
{ |
|
|
wl_append_word(&wl, &wl, tprintf("Warning: Eta0 = %g is negative.\n", here->BSIM4eta0)); |
|
|
wl_append_word(&wl, &wl, tprintf("Warning: Eta0 = %g is negative.\n", here->BSIM4eta0)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Check GIDL parameters */ |
|
|
|
|
|
if (model->BSIM4gidlclamp >= 0.0) |
|
|
|
|
|
{ |
|
|
|
|
|
wl_append_word(&wl, &wl, tprintf("Warning: gidlclamp = %g is zero or positive.\n", model->BSIM4gidlclamp)); |
|
|
|
|
|
} |
|
|
/* Check Abulk parameters */ |
|
|
/* Check Abulk parameters */ |
|
|
if (fabs(1.0e-8 / (pParam->BSIM4b1 + pParam->BSIM4weff)) > 10.0) |
|
|
if (fabs(1.0e-8 / (pParam->BSIM4b1 + pParam->BSIM4weff)) > 10.0) |
|
|
{ |
|
|
{ |
|
|
@ -754,8 +730,14 @@ CKTcircuit *ckt) |
|
|
if (model->BSIM4tnoiMod == 1){ |
|
|
if (model->BSIM4tnoiMod == 1){ |
|
|
wl_append_word(&wl, &wl, tprintf("Warning: TNOIMOD=1 is not supported and may be removed from future version.\n")); |
|
|
wl_append_word(&wl, &wl, tprintf("Warning: TNOIMOD=1 is not supported and may be removed from future version.\n")); |
|
|
} |
|
|
} |
|
|
|
|
|
if (model->BSIM4idovvdsc <= 0.0) |
|
|
|
|
|
{ |
|
|
|
|
|
wl_append_word(&wl, &wl, tprintf("Warning: idovvdsc = %g is zero or negative.\n", model->BSIM4idovvdsc)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ((strcmp(model->BSIM4version, "4.8.1")) && (strncmp(model->BSIM4version, "4.81", 4))) { |
|
|
|
|
|
|
|
|
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))) |
|
|
|
|
|
{ /* checking for version <= 4.8 */ |
|
|
/* v4.7 */ |
|
|
/* v4.7 */ |
|
|
if (model->BSIM4tnoiMod == 1 || model->BSIM4tnoiMod == 2) { |
|
|
if (model->BSIM4tnoiMod == 1 || model->BSIM4tnoiMod == 2) { |
|
|
if (model->BSIM4tnoia < 0.0) |
|
|
if (model->BSIM4tnoia < 0.0) |
|
|
|