Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 mosfet_sub.cpp 00003 ---------------- 00004 begin : Fri Jun 4 2004 00005 copyright : (C) 2003 by Michael Margraf 00006 email : michael.margraf@alumni.tu-berlin.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #include "mosfet_sub.h" 00019 00020 Basic_MOSFET::Basic_MOSFET() 00021 { 00022 // these must be the first properties in the list !!! 00023 Props.append(new Property("Type", "nfet", false, 00024 QObject::tr("polarity")+" [nfet, pfet]")); 00025 Props.append(new Property("Vt0", "1.0 V", true, 00026 QObject::tr("zero-bias threshold voltage"))); 00027 00028 Props.append(new Property("Kp", "2e-5", true, 00029 QObject::tr("transconductance coefficient in A/V^2"))); 00030 Props.append(new Property("Gamma", "0.0", false, 00031 QObject::tr("bulk threshold in sqrt(V)"))); 00032 Props.append(new Property("Phi", "0.6 V", false, 00033 QObject::tr("surface potential"))); 00034 Props.append(new Property("Lambda", "0.0", true, 00035 QObject::tr("channel-length modulation parameter in 1/V"))); 00036 Props.append(new Property("Rd", "0.0 Ohm", false, 00037 QObject::tr("drain ohmic resistance"))); 00038 Props.append(new Property("Rs", "0.0 Ohm", false, 00039 QObject::tr("source ohmic resistance"))); 00040 Props.append(new Property("Rg", "0.0 Ohm", false, 00041 QObject::tr("gate ohmic resistance"))); 00042 Props.append(new Property("Is", "1e-14 A", false, 00043 QObject::tr("bulk junction saturation current"))); 00044 Props.append(new Property("N", "1.0", false, 00045 QObject::tr("bulk junction emission coefficient"))); 00046 Props.append(new Property("W", "1 um", false, 00047 QObject::tr("channel width"))); 00048 Props.append(new Property("L", "1 um", false, 00049 QObject::tr("channel length"))); 00050 Props.append(new Property("Ld", "0.0", false, 00051 QObject::tr("lateral diffusion length"))); 00052 Props.append(new Property("Tox", "0.1 um", false, 00053 QObject::tr("oxide thickness"))); 00054 Props.append(new Property("Cgso", "0.0", false, 00055 QObject::tr("gate-source overlap capacitance per meter of " 00056 "channel width in F/m"))); 00057 Props.append(new Property("Cgdo", "0.0", false, 00058 QObject::tr("gate-drain overlap capacitance per meter of " 00059 "channel width in F/m"))); 00060 Props.append(new Property("Cgbo", "0.0", false, 00061 QObject::tr("gate-bulk overlap capacitance per meter of " 00062 "channel length in F/m"))); 00063 Props.append(new Property("Cbd", "0.0 F", false, 00064 QObject::tr("zero-bias bulk-drain junction capacitance"))); 00065 Props.append(new Property("Cbs", "0.0 F", false, 00066 QObject::tr("zero-bias bulk-source junction capacitance"))); 00067 Props.append(new Property("Pb", "0.8 V", false, 00068 QObject::tr("bulk junction potential"))); 00069 Props.append(new Property("Mj", "0.5", false, 00070 QObject::tr("bulk junction bottom grading coefficient"))); 00071 Props.append(new Property("Fc", "0.5", false, 00072 QObject::tr("bulk junction forward-bias depletion capacitance " 00073 "coefficient"))); 00074 Props.append(new Property("Cjsw", "0.0", false, 00075 QObject::tr("zero-bias bulk junction periphery capacitance per meter " 00076 "of junction perimeter in F/m"))); 00077 Props.append(new Property("Mjsw", "0.33", false, 00078 QObject::tr("bulk junction periphery grading coefficient"))); 00079 Props.append(new Property("Tt", "0.0 ps", false, 00080 QObject::tr("bulk transit time"))); 00081 Props.append(new Property("Nsub", "0.0", false, 00082 QObject::tr("substrate bulk doping density in 1/cm^3"))); 00083 Props.append(new Property("Nss", "0.0", false, 00084 QObject::tr("surface state density in 1/cm^2"))); 00085 Props.append(new Property("Tpg", "1", false, 00086 QObject::tr("gate material type: 0 = alumina; -1 = same as bulk; " 00087 "1 = opposite to bulk"))); 00088 Props.append(new Property("Uo", "600.0", false, 00089 QObject::tr("surface mobility in cm^2/Vs"))); 00090 Props.append(new Property("Rsh", "0.0", false, 00091 QObject::tr("drain and source diffusion sheet resistance in " 00092 "Ohms/square"))); 00093 Props.append(new Property("Nrd", "1", false, 00094 QObject::tr("number of equivalent drain squares"))); 00095 Props.append(new Property("Nrs", "1", false, 00096 QObject::tr("number of equivalent source squares"))); 00097 Props.append(new Property("Cj", "0.0", false, 00098 QObject::tr("zero-bias bulk junction bottom capacitance per square " 00099 "meter of junction area in F/m^2"))); 00100 Props.append(new Property("Js", "0.0", false, 00101 QObject::tr("bulk junction saturation current per square " 00102 "meter of junction area in A/m^2"))); 00103 Props.append(new Property("Ad", "0.0", false, 00104 QObject::tr("drain diffusion area in m^2"))); 00105 Props.append(new Property("As", "0.0", false, 00106 QObject::tr("source diffusion area in m^2"))); 00107 Props.append(new Property("Pd", "0.0 m", false, 00108 QObject::tr("drain junction perimeter"))); 00109 Props.append(new Property("Ps", "0.0 m", false, 00110 QObject::tr("source junction perimeter"))); 00111 Props.append(new Property("Kf", "0.0", false, 00112 QObject::tr("flicker noise coefficient"))); 00113 Props.append(new Property("Af", "1.0", false, 00114 QObject::tr("flicker noise exponent"))); 00115 Props.append(new Property("Ffe", "1.0", false, 00116 QObject::tr("flicker noise frequency exponent"))); 00117 Props.append(new Property("Temp", "26.85", false, 00118 QObject::tr("simulation temperature in degree Celsius"))); 00119 Props.append(new Property("Tnom", "26.85", false, 00120 QObject::tr("parameter measurement temperature"))); 00121 00122 Name = "T"; 00123 } 00124 00125 MOSFET_sub::MOSFET_sub() 00126 { 00127 Description = QObject::tr("MOS field-effect transistor with substrate"); 00128 createSymbol(); 00129 tx = x2+4; 00130 ty = y1+4; 00131 Model = "MOSFET"; 00132 } 00133 00134 // ------------------------------------------------------- 00135 Component* MOSFET_sub::newOne() 00136 { 00137 MOSFET_sub* p = new MOSFET_sub(); 00138 p->Props.first()->Value = Props.first()->Value; 00139 p->Props.next()->Value = Props.next()->Value; 00140 p->recreate(0); 00141 return p; 00142 } 00143 00144 // ------------------------------------------------------- 00145 Element* MOSFET_sub::info(QString& Name, char* &BitmapFile, bool getNewOne) 00146 { 00147 Name = QObject::tr("n-MOSFET"); 00148 BitmapFile = (char *) "nmosfet_sub"; 00149 00150 if(getNewOne) return new MOSFET_sub(); 00151 return 0; 00152 } 00153 00154 // ------------------------------------------------------- 00155 Element* MOSFET_sub::info_p(QString& Name, 00156 char* &BitmapFile, bool getNewOne) 00157 { 00158 Name = QObject::tr("p-MOSFET"); 00159 BitmapFile = (char *) "pmosfet_sub"; 00160 00161 if(getNewOne) { 00162 MOSFET_sub* p = new MOSFET_sub(); 00163 p->Props.first()->Value = "pfet"; 00164 p->Props.next()->Value = "-1.0 V"; 00165 p->recreate(0); 00166 return p; 00167 } 00168 return 0; 00169 } 00170 00171 // ------------------------------------------------------- 00172 Element* MOSFET_sub::info_depl(QString& Name, 00173 char* &BitmapFile, bool getNewOne) 00174 { 00175 Name = QObject::tr("depletion MOSFET"); 00176 BitmapFile = (char *) "dmosfet_sub"; 00177 00178 if(getNewOne) { 00179 MOSFET_sub* p = new MOSFET_sub(); 00180 p->Props.first(); 00181 p->Props.next()->Value = "-1.0 V"; 00182 p->recreate(0); 00183 return p; 00184 } 00185 return 0; 00186 } 00187 00188 // ------------------------------------------------------- 00189 void MOSFET_sub::createSymbol() 00190 { 00191 Lines.append(new Line(-14,-13,-14, 13,QPen(Qt::darkBlue,3))); 00192 Lines.append(new Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2))); 00193 00194 Lines.append(new Line(-10,-11, 0,-11,QPen(Qt::darkBlue,2))); 00195 Lines.append(new Line( 0,-11, 0,-30,QPen(Qt::darkBlue,2))); 00196 Lines.append(new Line(-10, 11, 0, 11,QPen(Qt::darkBlue,2))); 00197 Lines.append(new Line( 0, 11, 0, 30,QPen(Qt::darkBlue,2))); 00198 Lines.append(new Line(-10, 0, 20, 0,QPen(Qt::darkBlue,2))); 00199 00200 Lines.append(new Line(-10,-16,-10, -7,QPen(Qt::darkBlue,3))); 00201 Lines.append(new Line(-10, 7,-10, 16,QPen(Qt::darkBlue,3))); 00202 00203 Lines.append(new Line( -4, 24, 4, 20,QPen(Qt::darkBlue,2))); 00204 00205 if(Props.first()->Value == "nfet") { 00206 Lines.append(new Line( -9, 0, -4, -5,QPen(Qt::darkBlue,2))); 00207 Lines.append(new Line( -9, 0, -4, 5,QPen(Qt::darkBlue,2))); 00208 } 00209 else { 00210 Lines.append(new Line( -1, 0, -6, -5,QPen(Qt::darkBlue,2))); 00211 Lines.append(new Line( -1, 0, -6, 5,QPen(Qt::darkBlue,2))); 00212 } 00213 00214 if((Props.next()->Value.trimmed().at(0) == '-') == 00215 (Props.first()->Value == "nfet")) 00216 Lines.append(new Line(-10, -8,-10, 8,QPen(Qt::darkBlue,3))); 00217 else 00218 Lines.append(new Line(-10, -4,-10, 4,QPen(Qt::darkBlue,3))); 00219 00220 Ports.append(new Port(-30, 0)); 00221 Ports.append(new Port( 0,-30)); 00222 Ports.append(new Port( 0, 30)); 00223 Ports.append(new Port( 20, 0)); 00224 00225 x1 = -30; y1 = -30; 00226 x2 = 30; y2 = 30; 00227 }