Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/EKV26MOS.cpp
Go to the documentation of this file.
00001 /*
00002  * EKV26MOS.cpp - device implementations for EKV26MOS module
00003  *
00004  * This is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2, or (at your option)
00007  * any later version.
00008  * 
00009  */
00010 #include "node.h"
00011 #include "EKV26MOS.h"
00012 
00013 EKV26MOS::EKV26MOS()
00014 {
00015   Description = QObject::tr ("EPFL-EKV MOS 2.6 verilog device");
00016 
00017   Props.append (new Property ("Type", "nmos", true,
00018     QObject::tr ("polarity") + " [nmos, pmos]"));
00019   Props.append (new Property ("LEVEL", "1", false,
00020     QObject::tr ("long = 1, short = 2")));
00021   Props.append (new Property ("L", "0.5e-6", false,
00022     QObject::tr ("length parameter")
00023     +" ("+QObject::tr ("m")+")"));
00024   Props.append (new Property ("W", "10e-6", false,
00025     QObject::tr ("Width parameter")
00026     +" ("+QObject::tr ("m")+")"));
00027   Props.append (new Property ("Np", "1.0", false,
00028     QObject::tr ("parallel multiple device number")));
00029   Props.append (new Property ("Ns", "1.0", false,
00030     QObject::tr ("series multiple device number")));
00031   Props.append (new Property ("Cox", "3.45e-3", false,
00032     QObject::tr ("gate oxide capacitance per unit area")
00033     +" ("+QObject::tr ("F/m**2")+")"));
00034   Props.append (new Property ("Xj", "0.15e-6", false,
00035     QObject::tr ("metallurgical junction depth")
00036     +" ("+QObject::tr ("m")+")"));
00037   Props.append (new Property ("Dw", "-0.02e-6", false,
00038     QObject::tr ("channel width correction")
00039     +" ("+QObject::tr ("m")+")"));
00040   Props.append (new Property ("Dl", "-0.05e-6", false,
00041     QObject::tr ("channel length correction")
00042     +" ("+QObject::tr ("m")+")"));
00043   Props.append (new Property ("Vto", "0.6", false,
00044     QObject::tr ("long channel threshold voltage")
00045     +" ("+QObject::tr ("V")+")"));
00046   Props.append (new Property ("Gamma", "0.71", false,
00047     QObject::tr ("body effect parameter")
00048     +" ("+QObject::tr ("V**(1/2)")+")"));
00049   Props.append (new Property ("Phi", "0.97", false,
00050     QObject::tr ("bulk Fermi potential")
00051     +" ("+QObject::tr ("V")+")"));
00052   Props.append (new Property ("Kp", "150e-6", false,
00053     QObject::tr ("transconductance parameter")
00054     +" ("+QObject::tr ("A/V**2")+")"));
00055   Props.append (new Property ("Theta", "50e-3", false,
00056     QObject::tr ("mobility reduction coefficient")
00057     +" ("+QObject::tr ("1/V")+")"));
00058   Props.append (new Property ("EO", "88.0e6", false,
00059     QObject::tr ("mobility coefficient")
00060     +" ("+QObject::tr ("V/m")+")"));
00061   Props.append (new Property ("Ucrit", "4.5e6", false,
00062     QObject::tr ("longitudinal critical field")
00063     +" ("+QObject::tr ("V/m")+")"));
00064   Props.append (new Property ("Lambda", "0.23", false,
00065     QObject::tr ("depletion length coefficient")));
00066   Props.append (new Property ("Weta", "0.05", false,
00067     QObject::tr ("narrow-channel effect coefficient")));
00068   Props.append (new Property ("Leta", "0.28", false,
00069     QObject::tr ("longitudinal critical field")));
00070   Props.append (new Property ("Q0", "280e-6", false,
00071     QObject::tr ("reverse short channel charge density")
00072     +" ("+QObject::tr ("A*s/m**2")+")"));
00073   Props.append (new Property ("Lk", "0.5e-6", false,
00074     QObject::tr ("characteristic length")
00075     +" ("+QObject::tr ("m")+")"));
00076   Props.append (new Property ("Tcv", "1.5e-3", false,
00077     QObject::tr ("threshold voltage temperature coefficient")
00078     +" ("+QObject::tr ("V/K")+")"));
00079   Props.append (new Property ("Bex", "-1.5", false,
00080     QObject::tr ("mobility temperature coefficient")));
00081   Props.append (new Property ("Ucex", "1.7", false,
00082     QObject::tr ("Longitudinal critical field temperature exponent")));
00083   Props.append (new Property ("Ibbt", "0.0", false,
00084     QObject::tr ("Ibb temperature coefficient")
00085     +" ("+QObject::tr ("1/K")+")"));
00086   Props.append (new Property ("Hdif", "0.9e-6", false,
00087     QObject::tr ("heavily doped diffusion length")
00088     +" ("+QObject::tr ("m")+")"));
00089   Props.append (new Property ("Rsh", "510.0", false,
00090     QObject::tr ("drain/source diffusion sheet resistance")
00091     +" ("+QObject::tr ("Ohm/square")+")"));
00092   Props.append (new Property ("Rsc", "0.0", false,
00093     QObject::tr ("source contact resistance")
00094     +" ("+QObject::tr ("Ohm")+")"));
00095   Props.append (new Property ("Rdc", "0.0", false,
00096     QObject::tr ("drain contact resistance")
00097     +" ("+QObject::tr ("Ohm")+")"));
00098   Props.append (new Property ("Cgso", "1.5e-10", false,
00099     QObject::tr ("gate to source overlap capacitance")
00100     +" ("+QObject::tr ("F/m")+")"));
00101   Props.append (new Property ("Cgdo", "1.5e-10", false,
00102     QObject::tr ("gate to drain overlap capacitance")
00103     +" ("+QObject::tr ("F/m")+")"));
00104   Props.append (new Property ("Cgbo", "4.0e-10", false,
00105     QObject::tr ("gate to bulk overlap capacitance")
00106     +" ("+QObject::tr ("F/m")+")"));
00107   Props.append (new Property ("Iba", "2e8", false,
00108     QObject::tr ("first impact ionization coefficient")
00109     +" ("+QObject::tr ("1/m")+")"));
00110   Props.append (new Property ("Ibb", "3.5e8", false,
00111     QObject::tr ("second impact ionization coefficient")
00112     +" ("+QObject::tr ("V/m")+")"));
00113   Props.append (new Property ("Ibn", "1.0", false,
00114     QObject::tr ("saturation voltage factor for impact ionization")));
00115   Props.append (new Property ("Kf", "1.0e-27", false,
00116     QObject::tr ("flicker noise coefficient")));
00117   Props.append (new Property ("Af", "1.0", false,
00118     QObject::tr ("flicker noise exponent")));
00119   Props.append (new Property ("Avto", "0.0", false,
00120     QObject::tr ("area related theshold voltage mismatch parameter")
00121     +" ("+QObject::tr ("V*m")+")"));
00122   Props.append (new Property ("Akp", "0.0", false,
00123     QObject::tr ("area related gain mismatch parameter")
00124     +" ("+QObject::tr ("m")+")"));
00125   Props.append (new Property ("Agamma", "0.0", false,
00126     QObject::tr ("area related body effect mismatch parameter")
00127     +" ("+QObject::tr ("sqrt(V)*m")+")"));
00128   Props.append (new Property ("N", "1.0", false,
00129     QObject::tr ("emission coefficient")));
00130   Props.append (new Property ("Is", "1e-14", false,
00131     QObject::tr ("saturation current")
00132     +" ("+QObject::tr ("A")+")"));
00133   Props.append (new Property ("Bv", "100", false,
00134     QObject::tr ("reverse breakdown voltage")
00135     +" ("+QObject::tr ("V")+")"));
00136   Props.append (new Property ("Ibv", "1e-3", false,
00137     QObject::tr ("current at reverse breakdown voltage")
00138     +" ("+QObject::tr ("A")+")"));
00139   Props.append (new Property ("Vj", "1.0", false,
00140     QObject::tr ("junction potential")
00141     +" ("+QObject::tr ("V")+")"));
00142   Props.append (new Property ("Cj0", "300e-15", false,
00143     QObject::tr ("zero-bias junction capacitance")
00144     +" ("+QObject::tr ("F")+")"));
00145   Props.append (new Property ("M", "0.5", false,
00146     QObject::tr ("grading coefficient")));
00147   Props.append (new Property ("Area", "1.0", false,
00148     QObject::tr ("diode relative area")));
00149   Props.append (new Property ("Fc", "0.5", false,
00150     QObject::tr ("forward-bias depletion capacitance coefficient")));
00151   Props.append (new Property ("Tt", "0.1e-9", false,
00152     QObject::tr ("transit time")
00153     +" ("+QObject::tr ("s")+")"));
00154   Props.append (new Property ("Xti", "3.0", false,
00155     QObject::tr ("saturation current temperature exponent")));
00156   Props.append (new Property ("Xpart", "0.4", false,
00157     QObject::tr ("charge partition parameter")));
00158   Props.append (new Property ("Tnom", "26.85", false,
00159     QObject::tr ("parameter measurement temperature")
00160     +" ("+QObject::tr ("Celsius")+")"));
00161   Props.append (new Property ("Temp", "26.85", false,
00162     QObject::tr ("simulation temperature")));
00163 
00164   createSymbol ();
00165   tx = x2 + 4;
00166   ty = y1 + 4;
00167   Model = "EKV26MOS";
00168   Name  = "M";
00169 }
00170 
00171 Component * EKV26MOS::newOne()
00172 {
00173   EKV26MOS * p = new EKV26MOS();
00174   p->getProperty("Type")->Value = getProperty("Type")->Value; 
00175   p->recreate(0); 
00176   return p;
00177 }
00178 
00179 Element * EKV26MOS::info(QString& Name, char * &BitmapFile, bool getNewOne)
00180 {
00181   Name = QObject::tr("EPFL-EKV NMOS 2.6");
00182   BitmapFile = (char *) "EKV26nMOS";
00183 
00184   if(getNewOne) return new EKV26MOS();
00185   return 0;
00186 }
00187 
00188 Element * EKV26MOS::info_pmos(QString& Name, char * &BitmapFile, bool getNewOne)
00189 {
00190   Name = QObject::tr("EPFL-EKV PMOS 2.6");
00191   BitmapFile = (char *) "EKV26pMOS";
00192 
00193   if(getNewOne)
00194   {
00195     EKV26MOS* p = new EKV26MOS();
00196     p->getProperty("Type")->Value = "pmos";
00197     p->getProperty("Dw")->Value = "-0.03e-6";
00198     p->getProperty("Vto")->Value = "-0.55";
00199     p->getProperty("Gamma")->Value = "0.69";
00200     p->getProperty("Phi")->Value = "0.87";
00201     p->getProperty("Kp")->Value = "35e-6";
00202     p->getProperty("EO")->Value = "51.0e6";
00203     p->getProperty("Ucrit")->Value = "18.0e6";
00204     p->getProperty("Lambda")->Value = "1.1";
00205     p->getProperty("Weta")->Value = "0.0";
00206     p->getProperty("Leta")->Value = "0.45";
00207     p->getProperty("Q0")->Value = "200e-6";
00208     p->getProperty("Lk")->Value = "0.6e-6";
00209     p->getProperty("Tcv")->Value = "-1.4e-3";
00210     p->getProperty("Bex")->Value = "-1.4";
00211     p->getProperty("Ucex")->Value = "2.0";
00212     p->getProperty("Rsh")->Value = "990.0";
00213     p->getProperty("Iba")->Value = "0.0";
00214     p->getProperty("Ibb")->Value = "3.0e8";
00215     p->getProperty("Kf")->Value = "1.0e-28";
00216     p->recreate(0);
00217     return p;
00218   }
00219   return 0;
00220 }
00221 
00222 void EKV26MOS::createSymbol()
00223 {
00224   // put in here symbol drawing code and terminal definitions
00225   Lines.append(new Line(-14,-13,-14, 13,QPen(Qt::darkBlue,3)));
00226   Lines.append(new Line(-30,  0,-14,  0,QPen(Qt::darkBlue,2)));
00227   Lines.append(new Line(-10,-11,  0,-11,QPen(Qt::darkBlue,2)));
00228   Lines.append(new Line(  0,-11,  0,-30,QPen(Qt::darkBlue,2)));
00229   
00230   Lines.append(new Line(-10, 11,  0, 11,QPen(Qt::darkBlue,2)));
00231   Lines.append(new Line(  0, 11,  0, 30,QPen(Qt::darkBlue,2)));
00232   Lines.append(new Line(-10,  0, 20,  0,QPen(Qt::darkBlue,2)));
00233   Lines.append(new Line(-10,-16,-10, -7,QPen(Qt::darkBlue,3)));
00234   
00235   Lines.append(new Line(-10,  7,-10, 16,QPen(Qt::darkBlue,3)));
00236   Lines.append(new Line( -4, 24,  4, 20,QPen(Qt::darkBlue,2)));
00237 
00238   // arrow
00239   if(getProperty("Type")->Value == "nmos") {
00240     Lines.append(new Line( -9,  0, -4, -5,QPen(Qt::darkBlue,2)));
00241     Lines.append(new Line( -9,  0, -4,  5,QPen(Qt::darkBlue,2)));
00242   } else {
00243     Lines.append(new Line( -5,  5,  0,   0,QPen(Qt::darkBlue,2)));
00244     Lines.append(new Line( -5,  -5, 0,  0,QPen(Qt::darkBlue,2)));
00245   }
00246   
00247   Lines.append(new Line(-10, -3,-10,  3,QPen(Qt::darkBlue,3)));
00248   Lines.append(new Line(-10, -8,-10, -6,QPen(Qt::darkBlue,3)));
00249   Lines.append(new Line(-10,  8,-10,  6,QPen(Qt::darkBlue,3)));
00250 
00251   // E
00252   Lines.append(new Line(-30,-30,-30,-24,QPen(Qt::darkBlue,1)));
00253   Lines.append(new Line(-30,-30,-26,-30,QPen(Qt::darkBlue,1)));
00254   Lines.append(new Line(-30,-27,-26,-27,QPen(Qt::darkBlue,1)));
00255   Lines.append(new Line(-30,-24,-26,-24,QPen(Qt::darkBlue,1)));
00256   // K
00257   Lines.append(new Line(-24,-30,-24,-24,QPen(Qt::darkBlue,1)));
00258   Lines.append(new Line(-24,-27,-20,-30,QPen(Qt::darkBlue,1)));
00259   Lines.append(new Line(-24,-27,-20,-24,QPen(Qt::darkBlue,1)));
00260   // V
00261   Lines.append(new Line(-18,-30,-16,-24,QPen(Qt::darkBlue,1)));
00262   Lines.append(new Line(-14,-30,-16,-24,QPen(Qt::darkBlue,1)));
00263 
00264   Ports.append(new Port(  0,-30)); // drain
00265   Ports.append(new Port(-30,  0)); // gate
00266   Ports.append(new Port(  0, 30)); // source
00267   Ports.append(new Port( 20,  0)); // bulk
00268 
00269   x1 = -30; y1 = -30;
00270   x2 =  20; y2 =  30;
00271 }
00272 
00273 QString EKV26MOS::netlist()
00274 {
00275   QString s = Model+":"+Name;
00276 
00277   // output all node names
00278   foreach(Port *p1, Ports)
00279     s += " "+p1->Connection->Name;   // node names
00280 
00281   // output type npn/pnp property
00282   Property *p2 = Props.first();
00283   if(p2->Value == "nmos")
00284     s += " nmos=\"1\"";
00285   else
00286     s += " pmos=\"1\"";
00287 
00288   // output all remaining properties
00289   for(p2 = Props.next(); p2 != 0; p2 = Props.next())
00290     s += " "+p2->Name+"=\""+p2->Value+"\"";
00291 
00292   return s + '\n';
00293 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines