1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
|
/* $Id: d_mos123.model,v 26.133 2009/11/26 04:58:04 al Exp $ -*- C++ -*-
* Copyright (C) 2001 Albert Davis
* Author: Albert Davis <aldavis@gnu.org>
*
* This file is part of "Gnucap", the Gnu Circuit Analysis Package
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*------------------------------------------------------------------
* MOS model - base for levels 1,2,3,6
*/
h_headers {
#include "d_mos_base.h"
enum gate_t {gtSAME = -1, gtMETAL = 0, gtOPP = 1};
const double NI = 1.45e16; /* intrinsic carrier concentration */
}
cc_headers {
}
/*--------------------------------------------------------------------------*/
model BUILT_IN_MOS123 {
dev_type BUILT_IN_MOS;
inherit BUILT_IN_MOS_BASE;
independent {
override {
double cjo "" default=0.;
double pb "" default=0.8;
double pbsw "" final_default=pb;
int cmodel "CMODEL" print_test="cmodel!=3"
calculate="((!cmodel)?3:cmodel)";
}
raw_parameters {
double vto_raw "zero-bias threshold voltage"
name=VTO default=NA
print_test="!calc_vto";
double gamma "bulk threshold parameter"
name=GAmma default=NA
print_test="!calc_gamma" calc_print_test="calc_gamma";
double phi "surface potential"
name=PHI default=NA positive
print_test="!calc_phi" calc_print_test="calc_phi";
double lambda "channel-length modulation"
name=LAmbda default=NA;
double tox "oxide thickness"
name=TOX default=NA positive;
double nsub_cm "substrate doping"
name=NSUb default=NA;
double nss_cm "surface state density"
name=NSS default=0.0
print_test="nss_cm != 0.0 || has_hard_value(nsub_cm)";
double xj "metallurgical junction depth"
name=XJ default=NA positive;
double uo_cm "surface mobility"
name=UO alt_name=U0 default="600.";
int tpg "type of gate material - really gate_t"
name=TPG default="int(gtOPP)";
}
calculated_parameters {
double nsub ""
calculate="((nsub_cm.has_hard_value()) ? nsub_cm*ICM2M3 : NA)";
double nss "" calculate="nss_cm*ICM2M2";
double uo "" calculate="uo_cm*CM2M2";
double vto "" name=VTO
calculate="((vto_raw.has_hard_value()) ? vto_raw * polarity : NA)"
calc_print_test="calc_vto";
double cox "oxide capacitance (E_OX / tox)"
name=COX calc_print_test=true default=NA;
bool calc_vto "" default=false;
bool calc_gamma "" default=false;
bool calc_phi "" default=false;
}
code_post {
if (tpg < 0) { // coerce tpg to a proper value
tpg = gtSAME;
}else if (tpg > 0) {
tpg = gtOPP;
}else{
assert(tpg == gtMETAL);
}
if (has_hard_value(tox) && tox <= 0) {
untested();
set_default(&tox, NA);
error(((!_sim->is_first_expand()) ? (bDEBUG) : (bWARNING)),
long_label()+": tox <= 0, treating as if not input\n");
}
if (has_hard_value(nsub_cm) && nsub < NI) {
untested();
nsub = NA;
error(((!_sim->is_first_expand()) ? (bDEBUG) : (bWARNING)),
long_label()+": nsub < ni, treating as if not input\n");
}
}
}
size_dependent {
override {
double cgate "" calculate="m->cox * w_eff * l_eff";
double phi "" calculate="m->phi";
}
}
}
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
|