Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/hicumL0V1p2.cpp
Go to the documentation of this file.
00001 /*
00002  * hicumL0V1p2.cpp - device implementations for hicumL0V1p2 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 "hicumL0V1p2.h"
00012 
00013 hicumL0V1p2::hicumL0V1p2()
00014 {
00015   Description = QObject::tr ("HICUM Level 0 v1.2 verilog device");
00016 
00017   Props.append (new Property ("Type", "npn", true,
00018     QObject::tr ("polarity") + " [npn, pnp]"));
00019   Props.append (new Property ("is", "1.0e-16", false,
00020     QObject::tr ("(Modified) saturation current")
00021     +" ("+QObject::tr ("A")+")"));
00022   Props.append (new Property ("mcf", "1.00", false,
00023     QObject::tr ("Non-ideality coefficient of forward collector current")));
00024   Props.append (new Property ("mcr", "1.00", false,
00025     QObject::tr ("Non-ideality coefficient of reverse collector current")));
00026   Props.append (new Property ("vef", "1.0e6", false,
00027     QObject::tr ("forward Early voltage (normalization volt.)")
00028     +" ("+QObject::tr ("V")+")"));
00029   Props.append (new Property ("ver", "1.0e6", false,
00030     QObject::tr ("reverse Early voltage (normalization volt.)")
00031     +" ("+QObject::tr ("V")+")"));
00032   Props.append (new Property ("iqf", "1.0e6", false,
00033     QObject::tr ("forward d.c. high-injection roll-off current")
00034     +" ("+QObject::tr ("A")+")"));
00035   Props.append (new Property ("fiqf", "0", false,
00036     QObject::tr ("flag for turning on base related critical current")));
00037   Props.append (new Property ("iqr", "1.0e6", false,
00038     QObject::tr ("inverse d.c. high-injection roll-off current")
00039     +" ("+QObject::tr ("A")+")"));
00040   Props.append (new Property ("iqfh", "1.0e6", false,
00041     QObject::tr ("high-injection correction current")
00042     +" ("+QObject::tr ("A")+")"));
00043   Props.append (new Property ("tfh", "0.0", false,
00044     QObject::tr ("high-injection correction factor")));
00045   Props.append (new Property ("ahq", "0", false,
00046     QObject::tr ("Smoothing factor for the d.c. injection width")));
00047   Props.append (new Property ("ibes", "1e-18", false,
00048     QObject::tr ("BE saturation current")
00049     +" ("+QObject::tr ("A")+")"));
00050   Props.append (new Property ("mbe", "1.0", false,
00051     QObject::tr ("BE non-ideality factor")));
00052   Props.append (new Property ("ires", "0.0", false,
00053     QObject::tr ("BE recombination saturation current")
00054     +" ("+QObject::tr ("A")+")"));
00055   Props.append (new Property ("mre", "2.0", false,
00056     QObject::tr ("BE recombination non-ideality factor")));
00057   Props.append (new Property ("ibcs", "0.0", false,
00058     QObject::tr ("BC saturation current")
00059     +" ("+QObject::tr ("A")+")"));
00060   Props.append (new Property ("mbc", "1.0", false,
00061     QObject::tr ("BC non-ideality factor")));
00062   Props.append (new Property ("cje0", "1.0e-20", false,
00063     QObject::tr ("Zero-bias BE depletion capacitance")
00064     +" ("+QObject::tr ("F")+")"));
00065   Props.append (new Property ("vde", "0.9", false,
00066     QObject::tr ("BE built-in voltage")
00067     +" ("+QObject::tr ("V")+")"));
00068   Props.append (new Property ("ze", "0.5", false,
00069     QObject::tr ("BE exponent factor")));
00070   Props.append (new Property ("aje", "2.5", false,
00071     QObject::tr ("Ratio of maximum to zero-bias value")));
00072   Props.append (new Property ("vdedc", "0.9", false,
00073     QObject::tr ("BE charge built-in voltage for d.c. transfer current")
00074     +" ("+QObject::tr ("V")+")"));
00075   Props.append (new Property ("zedc", "0.5", false,
00076     QObject::tr ("charge BE exponent factor for d.c. transfer current")));
00077   Props.append (new Property ("ajedc", "2.5", false,
00078     QObject::tr ("BE capacitance ratio (maximum to zero-bias value) for d.c. transfer current")));
00079   Props.append (new Property ("t0", "0.0", false,
00080     QObject::tr ("low current transit time at Vbici=0")
00081     +" ("+QObject::tr ("s")+")"));
00082   Props.append (new Property ("dt0h", "0.0", false,
00083     QObject::tr ("Base width modulation contribution")
00084     +" ("+QObject::tr ("s")+")"));
00085   Props.append (new Property ("tbvl", "0.0", false,
00086     QObject::tr ("SCR width modulation contribution")
00087     +" ("+QObject::tr ("s")+")"));
00088   Props.append (new Property ("tef0", "0.0", false,
00089     QObject::tr ("Storage time in neutral emitter")
00090     +" ("+QObject::tr ("s")+")"));
00091   Props.append (new Property ("gte", "1.0", false,
00092     QObject::tr ("Exponent factor for emitter transit time")));
00093   Props.append (new Property ("thcs", "0.0", false,
00094     QObject::tr ("Saturation time at high current densities")
00095     +" ("+QObject::tr ("s")+")"));
00096   Props.append (new Property ("ahc", "0.1", false,
00097     QObject::tr ("Smoothing factor for current dependence")));
00098   Props.append (new Property ("tr", "0.0", false,
00099     QObject::tr ("Storage time at inverse operation")
00100     +" ("+QObject::tr ("s")+")"));
00101   Props.append (new Property ("rci0", "150", false,
00102     QObject::tr ("Low-field collector resistance under emitter")
00103     +" ("+QObject::tr ("Ohm")+")"));
00104   Props.append (new Property ("vlim", "0.5", false,
00105     QObject::tr ("Voltage dividing ohmic and satur.region")
00106     +" ("+QObject::tr ("V")+")"));
00107   Props.append (new Property ("vpt", "100", false,
00108     QObject::tr ("Punch-through voltage")
00109     +" ("+QObject::tr ("V")+")"));
00110   Props.append (new Property ("vces", "0.1", false,
00111     QObject::tr ("Saturation voltage")
00112     +" ("+QObject::tr ("V")+")"));
00113   Props.append (new Property ("cjci0", "1.0e-20", false,
00114     QObject::tr ("Total zero-bias BC depletion capacitance")
00115     +" ("+QObject::tr ("F")+")"));
00116   Props.append (new Property ("vdci", "0.7", false,
00117     QObject::tr ("BC built-in voltage")
00118     +" ("+QObject::tr ("V")+")"));
00119   Props.append (new Property ("zci", "0.333", false,
00120     QObject::tr ("BC exponent factor")));
00121   Props.append (new Property ("vptci", "100", false,
00122     QObject::tr ("Punch-through voltage of BC junction")
00123     +" ("+QObject::tr ("V")+")"));
00124   Props.append (new Property ("cjcx0", "1.0e-20", false,
00125     QObject::tr ("Zero-bias external BC depletion capacitance")
00126     +" ("+QObject::tr ("F")+")"));
00127   Props.append (new Property ("vdcx", "0.7", false,
00128     QObject::tr ("External BC built-in voltage")
00129     +" ("+QObject::tr ("V")+")"));
00130   Props.append (new Property ("zcx", "0.333", false,
00131     QObject::tr ("External BC exponent factor")));
00132   Props.append (new Property ("vptcx", "100", false,
00133     QObject::tr ("Punch-through voltage")
00134     +" ("+QObject::tr ("V")+")"));
00135   Props.append (new Property ("fbc", "1.0", false,
00136     QObject::tr ("Split factor = Cjci0/Cjc0")));
00137   Props.append (new Property ("rbi0", "0.0", false,
00138     QObject::tr ("Internal base resistance at zero-bias")
00139     +" ("+QObject::tr ("Ohm")+")"));
00140   Props.append (new Property ("vr0e", "2.5", false,
00141     QObject::tr ("forward Early voltage (normalization volt.)")
00142     +" ("+QObject::tr ("V")+")"));
00143   Props.append (new Property ("vr0c", "1.0e6", false,
00144     QObject::tr ("forward Early voltage (normalization volt.)")
00145     +" ("+QObject::tr ("V")+")"));
00146   Props.append (new Property ("fgeo", "0.656", false,
00147     QObject::tr ("Geometry factor")));
00148   Props.append (new Property ("rbx", "0.0", false,
00149     QObject::tr ("External base series resistance")
00150     +" ("+QObject::tr ("Ohm")+")"));
00151   Props.append (new Property ("rcx", "0.0", false,
00152     QObject::tr ("Emitter series resistance")
00153     +" ("+QObject::tr ("Ohm")+")"));
00154   Props.append (new Property ("re", "0.0", false,
00155     QObject::tr ("External collector series resistance")
00156     +" ("+QObject::tr ("Ohm")+")"));
00157   Props.append (new Property ("itss", "0.0", false,
00158     QObject::tr ("Substrate transistor transfer saturation current")
00159     +" ("+QObject::tr ("A")+")"));
00160   Props.append (new Property ("msf", "1.0", false,
00161     QObject::tr ("Substrate transistor transfer current non-ideality factor")));
00162   Props.append (new Property ("iscs", "0.0", false,
00163     QObject::tr ("SC saturation current")
00164     +" ("+QObject::tr ("A")+")"));
00165   Props.append (new Property ("msc", "1.0", false,
00166     QObject::tr ("SC non-ideality factor")));
00167   Props.append (new Property ("cjs0", "1.0e-20", false,
00168     QObject::tr ("Zero-bias SC depletion capacitance")
00169     +" ("+QObject::tr ("F")+")"));
00170   Props.append (new Property ("vds", "0.3", false,
00171     QObject::tr ("SC built-in voltage")
00172     +" ("+QObject::tr ("V")+")"));
00173   Props.append (new Property ("zs", "0.3", false,
00174     QObject::tr ("External SC exponent factor")));
00175   Props.append (new Property ("vpts", "100", false,
00176     QObject::tr ("SC punch-through voltage")
00177     +" ("+QObject::tr ("V")+")"));
00178   Props.append (new Property ("cbcpar", "0.0", false,
00179     QObject::tr ("Collector-base isolation (overlap) capacitance")
00180     +" ("+QObject::tr ("F")+")"));
00181   Props.append (new Property ("cbepar", "0.0", false,
00182     QObject::tr ("Emitter-base oxide capacitance")
00183     +" ("+QObject::tr ("F")+")"));
00184   Props.append (new Property ("eavl", "0.0", false,
00185     QObject::tr ("Exponent factor")));
00186   Props.append (new Property ("kavl", "0.0", false,
00187     QObject::tr ("Prefactor")));
00188   Props.append (new Property ("kf", "0.0", false,
00189     QObject::tr ("flicker noise coefficient")
00190     +" ("+QObject::tr ("M^(1-AF)")+")"));
00191   Props.append (new Property ("af", "2.0", false,
00192     QObject::tr ("flicker noise exponent factor")));
00193   Props.append (new Property ("vgb", "1.2", false,
00194     QObject::tr ("Bandgap-voltage")
00195     +" ("+QObject::tr ("V")+")"));
00196   Props.append (new Property ("vge", "1.17", false,
00197     QObject::tr ("Effective emitter bandgap-voltage")
00198     +" ("+QObject::tr ("V")+")"));
00199   Props.append (new Property ("vgc", "1.17", false,
00200     QObject::tr ("Effective collector bandgap-voltage")
00201     +" ("+QObject::tr ("V")+")"));
00202   Props.append (new Property ("vgs", "1.17", false,
00203     QObject::tr ("Effective substrate bandgap-voltage")
00204     +" ("+QObject::tr ("V")+")"));
00205   Props.append (new Property ("f1vg", "-1.02377e-4", false,
00206     QObject::tr ("Coefficient K1 in T-dependent bandgap equation")
00207     +" ("+QObject::tr ("V/K")+")"));
00208   Props.append (new Property ("f2vg", "4.3215e-4", false,
00209     QObject::tr ("Coefficient K2 in T-dependent bandgap equation")
00210     +" ("+QObject::tr ("V/K")+")"));
00211   Props.append (new Property ("alt0", "0.0", false,
00212     QObject::tr ("Frist-order TC of tf0")
00213     +" ("+QObject::tr ("1/K")+")"));
00214   Props.append (new Property ("kt0", "0.0", false,
00215     QObject::tr ("Second-order TC of tf0")
00216     +" ("+QObject::tr ("1/K^2")+")"));
00217   Props.append (new Property ("zetact", "3.0", false,
00218     QObject::tr ("Exponent coefficient in transfer current temperature dependence")));
00219   Props.append (new Property ("zetabet", "3.5", false,
00220     QObject::tr ("Exponent coefficient in BE junction current temperature dependence")));
00221   Props.append (new Property ("zetaci", "0.0", false,
00222     QObject::tr ("TC of epi-collector diffusivity")));
00223   Props.append (new Property ("alvs", "0.0", false,
00224     QObject::tr ("Relative TC of satur.drift velocity")
00225     +" ("+QObject::tr ("1/K")+")"));
00226   Props.append (new Property ("alces", "0.0", false,
00227     QObject::tr ("Relative TC of vces")
00228     +" ("+QObject::tr ("1/K")+")"));
00229   Props.append (new Property ("zetarbi", "0.0", false,
00230     QObject::tr ("TC of internal base resistance")));
00231   Props.append (new Property ("zetarbx", "0.0", false,
00232     QObject::tr ("TC of external base resistance")));
00233   Props.append (new Property ("zetarcx", "0.0", false,
00234     QObject::tr ("TC of external collector resistance")));
00235   Props.append (new Property ("zetare", "0.0", false,
00236     QObject::tr ("TC of emitter resistances")));
00237   Props.append (new Property ("zetaiqf", "0.0", false,
00238     QObject::tr ("TC of iqf")));
00239   Props.append (new Property ("alkav", "0.0", false,
00240     QObject::tr ("TC of avalanche prefactor")
00241     +" ("+QObject::tr ("1/K")+")"));
00242   Props.append (new Property ("aleav", "0.0", false,
00243     QObject::tr ("TC of avalanche exponential factor")
00244     +" ("+QObject::tr ("1/K")+")"));
00245   Props.append (new Property ("zetarth", "0.0", false,
00246     QObject::tr ("Exponent factor for temperature dependent thermal resistance")));
00247   Props.append (new Property ("flsh", "0", false,
00248     QObject::tr ("Flag for self-heating calculation")));
00249   Props.append (new Property ("rth", "0.0", false,
00250     QObject::tr ("Thermal resistance")
00251     +" ("+QObject::tr ("K/W")+")"));
00252   Props.append (new Property ("cth", "0.0", false,
00253     QObject::tr ("Thermal capacitance")
00254     +" ("+QObject::tr ("Ws/K")+")"));
00255   Props.append (new Property ("tnom", "27", false,
00256     QObject::tr ("Temperature for which parameters are valid")
00257     +" ("+QObject::tr ("C")+")"));
00258   Props.append (new Property ("dt", "0.0", false,
00259     QObject::tr ("Temperature change for particular transistor")
00260     +" ("+QObject::tr ("K")+")"));
00261   Props.append (new Property ("Temp", "27", false,
00262     QObject::tr ("simulation temperature")));
00263 
00264   createSymbol ();
00265   tx = x2 + 4;
00266   ty = y1 + 4;
00267   Model = "hicumL0V1p2";
00268   Name  = "T";
00269 }
00270 
00271 Component * hicumL0V1p2::newOne()
00272 {
00273   hicumL0V1p2 * p = new hicumL0V1p2();
00274   p->Props.getFirst()->Value = Props.getFirst()->Value; 
00275   p->recreate(0); 
00276   return p;
00277 }
00278 
00279 Element * hicumL0V1p2::info(QString& Name, char * &BitmapFile, bool getNewOne)
00280 {
00281   Name = QObject::tr("npn HICUM L0 v1.2");
00282   BitmapFile = (char *) "npnsub_therm";
00283 
00284   if(getNewOne) return new hicumL0V1p2();
00285   return 0;
00286 }
00287 
00288 Element * hicumL0V1p2::info_pnp(QString& Name, char * &BitmapFile, bool getNewOne)
00289 {
00290   Name = QObject::tr("pnp HICUM L0 v1.2");
00291   BitmapFile = (char *) "pnpsub_therm";
00292 
00293   if(getNewOne)
00294   {
00295     hicumL0V1p2* p = new hicumL0V1p2();
00296     p->Props.getFirst()->Value = "pnp";
00297     p->recreate(0);
00298     return p;
00299   }
00300   return 0;
00301 }
00302 
00303 void hicumL0V1p2::createSymbol()
00304 {
00305   // normal bipolar
00306   Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
00307   Lines.append(new Line(-30,  0,-10,  0,QPen(Qt::darkBlue,2)));
00308   Lines.append(new Line(-10, -5,  0,-15,QPen(Qt::darkBlue,2)));
00309   Lines.append(new Line(  0,-15,  0,-30,QPen(Qt::darkBlue,2)));
00310   Lines.append(new Line(-10,  5,  0, 15,QPen(Qt::darkBlue,2)));
00311   Lines.append(new Line(  0, 15,  0, 30,QPen(Qt::darkBlue,2)));
00312 
00313   // substrate node
00314   Lines.append(new Line(  9,  0, 30,  0,QPen(Qt::darkBlue,2)));
00315   Lines.append(new Line(  9, -7,  9,  7,QPen(Qt::darkBlue,3)));
00316 
00317   // thermal node
00318   Lines.append(new Line(-30, 20,-20, 20,QPen(Qt::darkBlue,2)));
00319   Lines.append(new Line(-20, 17,-20, 23,QPen(Qt::darkBlue,2)));  
00320 
00321   // arrow
00322   if(Props.getFirst()->Value == "npn") {
00323     Lines.append(new Line( -6, 15,  0, 15,QPen(Qt::darkBlue,2)));
00324     Lines.append(new Line(  0,  9,  0, 15,QPen(Qt::darkBlue,2)));
00325   } else {
00326     Lines.append(new Line( -5, 10, -5, 16,QPen(Qt::darkBlue,2)));
00327     Lines.append(new Line( -5, 10,  1, 10,QPen(Qt::darkBlue,2)));
00328   }
00329 
00330   // H
00331   Lines.append(new Line(-30,-30,-30,-24,QPen(Qt::darkBlue,1)));
00332   Lines.append(new Line(-30,-27,-26,-27,QPen(Qt::darkBlue,1)));
00333   Lines.append(new Line(-26,-30,-26,-24,QPen(Qt::darkBlue,1)));
00334   // I
00335   Lines.append(new Line(-24,-30,-24,-24,QPen(Qt::darkBlue,1)));
00336   // C
00337   Lines.append(new Line(-22,-30,-22,-24,QPen(Qt::darkBlue,1)));
00338   Lines.append(new Line(-22,-30,-19,-30,QPen(Qt::darkBlue,1)));
00339   Lines.append(new Line(-22,-24,-19,-24,QPen(Qt::darkBlue,1)));
00340   // U
00341   Lines.append(new Line(-17,-30,-17,-24,QPen(Qt::darkBlue,1)));
00342   Lines.append(new Line(-14,-30,-14,-24,QPen(Qt::darkBlue,1)));
00343   Lines.append(new Line(-17,-24,-14,-24,QPen(Qt::darkBlue,1)));
00344   // M
00345   Lines.append(new Line(-12,-30,-12,-24,QPen(Qt::darkBlue,1)));
00346   Lines.append(new Line( -8,-30, -8,-24,QPen(Qt::darkBlue,1)));
00347   Lines.append(new Line(-12,-30,-10,-28,QPen(Qt::darkBlue,1)));
00348   Lines.append(new Line( -8,-30,-10,-28,QPen(Qt::darkBlue,1)));
00349 
00350   // terminal definitions
00351   Ports.append(new Port(  0,-30)); // collector
00352   Ports.append(new Port(-30,  0)); // base
00353   Ports.append(new Port(  0, 30)); // emitter
00354   Ports.append(new Port( 30,  0)); // substrate
00355   Ports.append(new Port(-30, 20)); // thermal node
00356 
00357   // relative boundings
00358   x1 = -30; y1 = -30;
00359   x2 =  30; y2 =  30;
00360 }
00361 
00362 QString hicumL0V1p2::netlist()
00363 {
00364   QString s = "hicumL0V1p2:"+Name;
00365 
00366   // output all node names
00367   foreach(Port *p1, Ports)
00368     s += " "+p1->Connection->Name;   // node names
00369 
00370   // output type npn/pnp property
00371   Property *p2 = Props.first();
00372   if(p2->Value == "npn")
00373     s += " npn=\"1\"";
00374   else
00375     s += " pnp=\"1\"";
00376 
00377   // output all remaining properties
00378   for(p2 = Props.next(); p2 != 0; p2 = Props.next())
00379     s += " "+p2->Name+"=\""+p2->Value+"\"";
00380 
00381   return s + '\n';
00382 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines