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