My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hic0_full.cpp
Go to the documentation of this file.
1 /*
2  * hic0_full.cpp - device implementations for hic0_full module
3  *
4  * This is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2, or (at your option)
7  * any later version.
8  *
9  */
10 
11 #include "node.h"
12 #include "hic0_full.h"
13 
15 {
16  Description = QObject::tr ("HICUM Level 0 v1.12 verilog device");
17 
18  Props.append (new Property ("Type", "npn", true,
19  QObject::tr ("polarity") + " [npn, pnp]"));
20  Props.append (new Property ("is", "1.0e-16", false,
21  QObject::tr ("(Modified) saturation current")
22  +" ("+QObject::tr ("A")+")"));
23  Props.append (new Property ("mcf", "1.00", false,
24  QObject::tr ("Non-ideality coefficient of forward collector current")));
25  Props.append (new Property ("mcr", "1.00", false,
26  QObject::tr ("Non-ideality coefficient of reverse collector current")));
27  Props.append (new Property ("vef", "1.0e6", false,
28  QObject::tr ("forward Early voltage (normalization volt.)")
29  +" ("+QObject::tr ("V")+")"));
30  Props.append (new Property ("iqf", "1.0e6", false,
31  QObject::tr ("forward d.c. high-injection roll-off current")
32  +" ("+QObject::tr ("A")+")"));
33  Props.append (new Property ("iqr", "1.0e6", false,
34  QObject::tr ("inverse d.c. high-injection roll-off current")
35  +" ("+QObject::tr ("A")+")"));
36  Props.append (new Property ("iqfh", "1.0e6", false,
37  QObject::tr ("high-injection correction current")
38  +" ("+QObject::tr ("A")+")"));
39  Props.append (new Property ("tfh", "1.0e6", false,
40  QObject::tr ("high-injection correction factor")));
41  Props.append (new Property ("ibes", "1e-18", false,
42  QObject::tr ("BE saturation current")
43  +" ("+QObject::tr ("A")+")"));
44  Props.append (new Property ("mbe", "1.0", false,
45  QObject::tr ("BE non-ideality factor")));
46  Props.append (new Property ("ires", "0.0", false,
47  QObject::tr ("BE recombination saturation current")
48  +" ("+QObject::tr ("A")+")"));
49  Props.append (new Property ("mre", "2.0", false,
50  QObject::tr ("BE recombination non-ideality factor")));
51  Props.append (new Property ("ibcs", "0.0", false,
52  QObject::tr ("BC saturation current")
53  +" ("+QObject::tr ("A")+")"));
54  Props.append (new Property ("mbc", "1.0", false,
55  QObject::tr ("BC non-ideality factor")));
56  Props.append (new Property ("cje0", "1.0e-20", false,
57  QObject::tr ("Zero-bias BE depletion capacitance")
58  +" ("+QObject::tr ("F")+")"));
59  Props.append (new Property ("vde", "0.9", false,
60  QObject::tr ("BE built-in voltage")
61  +" ("+QObject::tr ("V")+")"));
62  Props.append (new Property ("ze", "0.5", false,
63  QObject::tr ("BE exponent factor")));
64  Props.append (new Property ("aje", "2.5", false,
65  QObject::tr ("Ratio of maximum to zero-bias value")));
66  Props.append (new Property ("t0", "0.0", false,
67  QObject::tr ("low current transit time at Vbici=0")
68  +" ("+QObject::tr ("s")+")"));
69  Props.append (new Property ("dt0h", "0.0", false,
70  QObject::tr ("Base width modulation contribution")
71  +" ("+QObject::tr ("s")+")"));
72  Props.append (new Property ("tbvl", "0.0", false,
73  QObject::tr ("SCR width modulation contribution")
74  +" ("+QObject::tr ("s")+")"));
75  Props.append (new Property ("tef0", "0.0", false,
76  QObject::tr ("Storage time in neutral emitter")
77  +" ("+QObject::tr ("s")+")"));
78  Props.append (new Property ("gte", "1.0", false,
79  QObject::tr ("Exponent factor for emitter transit time")));
80  Props.append (new Property ("thcs", "0.0", false,
81  QObject::tr ("Saturation time at high current densities")
82  +" ("+QObject::tr ("s")+")"));
83  Props.append (new Property ("ahc", "0.1", false,
84  QObject::tr ("Smoothing factor for current dependence")));
85  Props.append (new Property ("tr", "0.0", false,
86  QObject::tr ("Storage time at inverse operation")
87  +" ("+QObject::tr ("s")+")"));
88  Props.append (new Property ("rci0", "150", false,
89  QObject::tr ("Low-field collector resistance under emitter")
90  +" ("+QObject::tr ("Ohm")+")"));
91  Props.append (new Property ("vlim", "0.5", false,
92  QObject::tr ("Voltage dividing ohmic and satur.region")
93  +" ("+QObject::tr ("V")+")"));
94  Props.append (new Property ("vpt", "100", false,
95  QObject::tr ("Punch-through voltage")
96  +" ("+QObject::tr ("V")+")"));
97  Props.append (new Property ("vces", "0.1", false,
98  QObject::tr ("Saturation voltage")
99  +" ("+QObject::tr ("V")+")"));
100  Props.append (new Property ("cjci0", "1.0e-20", false,
101  QObject::tr ("Total zero-bias BC depletion capacitance")
102  +" ("+QObject::tr ("F")+")"));
103  Props.append (new Property ("vdci", "0.7", false,
104  QObject::tr ("BC built-in voltage")
105  +" ("+QObject::tr ("V")+")"));
106  Props.append (new Property ("zci", "0.333", false,
107  QObject::tr ("BC exponent factor")));
108  Props.append (new Property ("vptci", "100", false,
109  QObject::tr ("Punch-through voltage of BC junction")
110  +" ("+QObject::tr ("V")+")"));
111  Props.append (new Property ("cjcx0", "1.0e-20", false,
112  QObject::tr ("Zero-bias external BC depletion capacitance")
113  +" ("+QObject::tr ("F")+")"));
114  Props.append (new Property ("vdcx", "0.7", false,
115  QObject::tr ("External BC built-in voltage")
116  +" ("+QObject::tr ("V")+")"));
117  Props.append (new Property ("zcx", "0.333", false,
118  QObject::tr ("External BC exponent factor")));
119  Props.append (new Property ("vptcx", "100", false,
120  QObject::tr ("Punch-through voltage")
121  +" ("+QObject::tr ("V")+")"));
122  Props.append (new Property ("fbc", "1.0", false,
123  QObject::tr ("Split factor = Cjci0/Cjc0")));
124  Props.append (new Property ("rbi0", "0.0", false,
125  QObject::tr ("Internal base resistance at zero-bias")
126  +" ("+QObject::tr ("Ohm")+")"));
127  Props.append (new Property ("vr0e", "2.5", false,
128  QObject::tr ("forward Early voltage (normalization volt.)")
129  +" ("+QObject::tr ("V")+")"));
130  Props.append (new Property ("vr0c", "1.0e6", false,
131  QObject::tr ("forward Early voltage (normalization volt.)")
132  +" ("+QObject::tr ("V")+")"));
133  Props.append (new Property ("fgeo", "0.656", false,
134  QObject::tr ("Geometry factor")));
135  Props.append (new Property ("rbx", "0.0", false,
136  QObject::tr ("External base series resistance")
137  +" ("+QObject::tr ("Ohm")+")"));
138  Props.append (new Property ("rcx", "0.0", false,
139  QObject::tr ("Emitter series resistance")
140  +" ("+QObject::tr ("Ohm")+")"));
141  Props.append (new Property ("re", "0.0", false,
142  QObject::tr ("External collector series resistance")
143  +" ("+QObject::tr ("Ohm")+")"));
144  Props.append (new Property ("itss", "0.0", false,
145  QObject::tr ("Substrate transistor transfer saturation current")
146  +" ("+QObject::tr ("A")+")"));
147  Props.append (new Property ("msf", "1.0", false,
148  QObject::tr ("Substrate transistor transfer current non-ideality factor")));
149  Props.append (new Property ("iscs", "0.0", false,
150  QObject::tr ("SC saturation current")
151  +" ("+QObject::tr ("A")+")"));
152  Props.append (new Property ("msc", "1.0", false,
153  QObject::tr ("SC non-ideality factor")));
154  Props.append (new Property ("cjs0", "1.0e-20", false,
155  QObject::tr ("Zero-bias SC depletion capacitance")
156  +" ("+QObject::tr ("F")+")"));
157  Props.append (new Property ("vds", "0.3", false,
158  QObject::tr ("SC built-in voltage")
159  +" ("+QObject::tr ("V")+")"));
160  Props.append (new Property ("zs", "0.3", false,
161  QObject::tr ("External SC exponent factor")));
162  Props.append (new Property ("vpts", "100", false,
163  QObject::tr ("SC punch-through voltage")
164  +" ("+QObject::tr ("V")+")"));
165  Props.append (new Property ("cbcpar", "0.0", false,
166  QObject::tr ("Collector-base isolation (overlap) capacitance")
167  +" ("+QObject::tr ("F")+")"));
168  Props.append (new Property ("cbepar", "0.0", false,
169  QObject::tr ("Emitter-base oxide capacitance")
170  +" ("+QObject::tr ("F")+")"));
171  Props.append (new Property ("eavl", "0.0", false,
172  QObject::tr ("Exponent factor")));
173  Props.append (new Property ("kavl", "0.0", false,
174  QObject::tr ("Prefactor")));
175  Props.append (new Property ("kf", "0.0", false,
176  QObject::tr ("flicker noise coefficient")
177  +" ("+QObject::tr ("M^(1-AF)")+")"));
178  Props.append (new Property ("af", "2.0", false,
179  QObject::tr ("flicker noise exponent factor")));
180  Props.append (new Property ("vgb", "1.2", false,
181  QObject::tr ("Bandgap-voltage")
182  +" ("+QObject::tr ("V")+")"));
183  Props.append (new Property ("vge", "1.17", false,
184  QObject::tr ("Effective emitter bandgap-voltage")
185  +" ("+QObject::tr ("V")+")"));
186  Props.append (new Property ("vgc", "1.17", false,
187  QObject::tr ("Effective collector bandgap-voltage")
188  +" ("+QObject::tr ("V")+")"));
189  Props.append (new Property ("vgs", "1.17", false,
190  QObject::tr ("Effective substrate bandgap-voltage")
191  +" ("+QObject::tr ("V")+")"));
192  Props.append (new Property ("f1vg", "-1.02377e-4", false,
193  QObject::tr ("Coefficient K1 in T-dependent bandgap equation")
194  +" ("+QObject::tr ("V/K")+")"));
195  Props.append (new Property ("f2vg", "4.3215e-4", false,
196  QObject::tr ("Coefficient K2 in T-dependent bandgap equation")
197  +" ("+QObject::tr ("V/K")+")"));
198  Props.append (new Property ("alt0", "0.0", false,
199  QObject::tr ("Frist-order TC of tf0")
200  +" ("+QObject::tr ("1/K")+")"));
201  Props.append (new Property ("kt0", "0.0", false,
202  QObject::tr ("Second-order TC of tf0")
203  +" ("+QObject::tr ("1/K^2")+")"));
204  Props.append (new Property ("zetact", "3.0", false,
205  QObject::tr ("Exponent coefficient in transfer current temperature dependence")));
206  Props.append (new Property ("zetabet", "3.5", false,
207  QObject::tr ("Exponent coefficient in BE junction current temperature dependence")));
208  Props.append (new Property ("zetaci", "0.0", false,
209  QObject::tr ("TC of epi-collector diffusivity")));
210  Props.append (new Property ("alvs", "0.0", false,
211  QObject::tr ("Relative TC of satur.drift velocity")
212  +" ("+QObject::tr ("1/K")+")"));
213  Props.append (new Property ("alces", "0.0", false,
214  QObject::tr ("Relative TC of vces")
215  +" ("+QObject::tr ("1/K")+")"));
216  Props.append (new Property ("zetarbi", "0.0", false,
217  QObject::tr ("TC of internal base resistance")));
218  Props.append (new Property ("zetarbx", "0.0", false,
219  QObject::tr ("TC of external base resistance")));
220  Props.append (new Property ("zetarcx", "0.0", false,
221  QObject::tr ("TC of external collector resistance")));
222  Props.append (new Property ("zetare", "0.0", false,
223  QObject::tr ("TC of emitter resistances")));
224  Props.append (new Property ("alkav", "0.0", false,
225  QObject::tr ("TC of avalanche prefactor")
226  +" ("+QObject::tr ("1/K")+")"));
227  Props.append (new Property ("aleav", "0.0", false,
228  QObject::tr ("TC of avalanche exponential factor")
229  +" ("+QObject::tr ("1/K")+")"));
230  Props.append (new Property ("flsh", "0", false,
231  QObject::tr ("Flag for self-heating calculation")));
232  Props.append (new Property ("rth", "0.0", false,
233  QObject::tr ("Thermal resistance")
234  +" ("+QObject::tr ("K/W")+")"));
235  Props.append (new Property ("cth", "0.0", false,
236  QObject::tr ("Thermal capacitance")
237  +" ("+QObject::tr ("Ws/K")+")"));
238  Props.append (new Property ("tnom", "27", false,
239  QObject::tr ("Temperature for which parameters are valid")
240  +" ("+QObject::tr ("C")+")"));
241  Props.append (new Property ("dt", "0.0", false,
242  QObject::tr ("Temperature change for particular transistor")
243  +" ("+QObject::tr ("K")+")"));
244  Props.append (new Property ("Temp", "26.85", false,
245  QObject::tr ("simulation temperature")));
246 
247  createSymbol ();
248  tx = x2 + 4;
249  ty = y1 + 4;
250  Model = "hic0_full";
251  Name = "T";
252 }
253 
255 {
256  hic0_full * p = new hic0_full();
257  p->Props.getFirst()->Value = Props.getFirst()->Value;
258  p->recreate(0);
259  return p;
260 }
261 
262 Element * hic0_full::info(QString& Name, char * &BitmapFile, bool getNewOne)
263 {
264  Name = QObject::tr("npn HICUM L0 v1.12");
265  BitmapFile = (char *) "npnsub_therm";
266 
267  if(getNewOne) return new hic0_full();
268  return 0;
269 }
270 
271 Element * hic0_full::info_pnp(QString& Name, char * &BitmapFile, bool getNewOne)
272 {
273  Name = QObject::tr("pnp HICUM L0 v1.12");
274  BitmapFile = (char *) "pnpsub_therm";
275 
276  if(getNewOne)
277  {
278  hic0_full* p = new hic0_full();
279  p->Props.getFirst()->Value = "pnp";
280  p->recreate(0);
281  return p;
282  }
283  return 0;
284 }
285 
287 {
288  // normal bipolar
289  Lines.append(new Line(-10,-15,-10, 15,QPen(QPen::darkBlue,3)));
290  Lines.append(new Line(-30, 0,-10, 0,QPen(QPen::darkBlue,2)));
291  Lines.append(new Line(-10, -5, 0,-15,QPen(QPen::darkBlue,2)));
292  Lines.append(new Line( 0,-15, 0,-30,QPen(QPen::darkBlue,2)));
293  Lines.append(new Line(-10, 5, 0, 15,QPen(QPen::darkBlue,2)));
294  Lines.append(new Line( 0, 15, 0, 30,QPen(QPen::darkBlue,2)));
295 
296  // substrate node
297  Lines.append(new Line( 9, 0, 30, 0,QPen(QPen::darkBlue,2)));
298  Lines.append(new Line( 9, -7, 9, 7,QPen(QPen::darkBlue,3)));
299 
300  // thermal node
301  Lines.append(new Line(-30, 20,-20, 20,QPen(QPen::darkBlue,2)));
302  Lines.append(new Line(-20, 17,-20, 23,QPen(QPen::darkBlue,2)));
303 
304  // arrow
305  if(Props.getFirst()->Value == "npn") {
306  Lines.append(new Line( -6, 15, 0, 15,QPen(QPen::darkBlue,2)));
307  Lines.append(new Line( 0, 9, 0, 15,QPen(QPen::darkBlue,2)));
308  } else {
309  Lines.append(new Line( -5, 10, -5, 16,QPen(QPen::darkBlue,2)));
310  Lines.append(new Line( -5, 10, 1, 10,QPen(QPen::darkBlue,2)));
311  }
312 
313  // H
314  Lines.append(new Line(-30,-30,-30,-24,QPen(QPen::darkBlue,1)));
315  Lines.append(new Line(-30,-27,-26,-27,QPen(QPen::darkBlue,1)));
316  Lines.append(new Line(-26,-30,-26,-24,QPen(QPen::darkBlue,1)));
317  // I
318  Lines.append(new Line(-24,-30,-24,-24,QPen(QPen::darkBlue,1)));
319  // C
320  Lines.append(new Line(-22,-30,-22,-24,QPen(QPen::darkBlue,1)));
321  Lines.append(new Line(-22,-30,-19,-30,QPen(QPen::darkBlue,1)));
322  Lines.append(new Line(-22,-24,-19,-24,QPen(QPen::darkBlue,1)));
323  // U
324  Lines.append(new Line(-17,-30,-17,-24,QPen(QPen::darkBlue,1)));
325  Lines.append(new Line(-14,-30,-14,-24,QPen(QPen::darkBlue,1)));
326  Lines.append(new Line(-17,-24,-14,-24,QPen(QPen::darkBlue,1)));
327  // M
328  Lines.append(new Line(-12,-30,-12,-24,QPen(QPen::darkBlue,1)));
329  Lines.append(new Line( -8,-30, -8,-24,QPen(QPen::darkBlue,1)));
330  Lines.append(new Line(-12,-30,-10,-28,QPen(QPen::darkBlue,1)));
331  Lines.append(new Line( -8,-30,-10,-28,QPen(QPen::darkBlue,1)));
332 
333  // terminal definitions
334  Ports.append(new Port( 0,-30)); // collector
335  Ports.append(new Port(-30, 0)); // base
336  Ports.append(new Port( 0, 30)); // emitter
337  Ports.append(new Port( 30, 0)); // substrate
338  Ports.append(new Port(-30, 20)); // thermal node
339 
340  // relative boundings
341  x1 = -30; y1 = -30;
342  x2 = 30; y2 = 30;
343 }
344 
346 {
347  QString s = "hic0_full:"+Name;
348 
349  // output all node names
350  for(Port *p1 = Ports.first(); p1 != 0; p1 = Ports.next())
351  s += " "+p1->Connection->Name; // node names
352 
353  // output type npn/pnp property
354  Property *p2 = Props.first();
355  if(p2->Value == "npn")
356  s += " npn=\"1\"";
357  else
358  s += " pnp=\"1\"";
359 
360  // output all remaining properties
361  for(p2 = Props.next(); p2 != 0; p2 = Props.next())
362  s += " "+p2->Name+"=\""+p2->Value+"\"";
363 
364  return s + '\n';
365 }