My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EKV26MOS.cpp
Go to the documentation of this file.
1 /*
2  * EKV26MOS.cpp - device implementations for EKV26MOS 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 "EKV26MOS.h"
13 
15 {
16  Description = QObject::tr ("EPFL-EKV MOS 2.6 verilog device");
17 
18  Props.append (new Property ("Type", "nmos", true,
19  QObject::tr ("polarity") + " [nmos, pmos]"));
20  Props.append (new Property ("LEVEL", "1", false,
21  QObject::tr ("long = 1, short = 2")));
22  Props.append (new Property ("L", "0.5e-6", false,
23  QObject::tr ("length parameter")
24  +" ("+QObject::tr ("m")+")"));
25  Props.append (new Property ("W", "10e-6", false,
26  QObject::tr ("Width parameter")
27  +" ("+QObject::tr ("m")+")"));
28  Props.append (new Property ("Np", "1.0", false,
29  QObject::tr ("parallel multiple device number")));
30  Props.append (new Property ("Ns", "1.0", false,
31  QObject::tr ("series multiple device number")));
32  Props.append (new Property ("Cox", "3.45e-3", false,
33  QObject::tr ("gate oxide capacitance per unit area")
34  +" ("+QObject::tr ("F/m**2")+")"));
35  Props.append (new Property ("Xj", "0.15e-6", false,
36  QObject::tr ("metallurgical junction depth")
37  +" ("+QObject::tr ("m")+")"));
38  Props.append (new Property ("Dw", "-0.02e-6", false,
39  QObject::tr ("channel width correction")
40  +" ("+QObject::tr ("m")+")"));
41  Props.append (new Property ("Dl", "-0.05e-6", false,
42  QObject::tr ("channel length correction")
43  +" ("+QObject::tr ("m")+")"));
44  Props.append (new Property ("Vto", "0.6", false,
45  QObject::tr ("long channel threshold voltage")
46  +" ("+QObject::tr ("V")+")"));
47  Props.append (new Property ("Gamma", "0.71", false,
48  QObject::tr ("body effect parameter")
49  +" ("+QObject::tr ("V**(1/2)")+")"));
50  Props.append (new Property ("Phi", "0.97", false,
51  QObject::tr ("bulk Fermi potential")
52  +" ("+QObject::tr ("V")+")"));
53  Props.append (new Property ("Kp", "150e-6", false,
54  QObject::tr ("transconductance parameter")
55  +" ("+QObject::tr ("A/V**2")+")"));
56  Props.append (new Property ("Theta", "50e-3", false,
57  QObject::tr ("mobility reduction coefficient")
58  +" ("+QObject::tr ("1/V")+")"));
59  Props.append (new Property ("EO", "88.0e6", false,
60  QObject::tr ("mobility coefficient")
61  +" ("+QObject::tr ("V/m")+")"));
62  Props.append (new Property ("Ucrit", "4.5e6", false,
63  QObject::tr ("longitudinal critical field")
64  +" ("+QObject::tr ("V/m")+")"));
65  Props.append (new Property ("Lambda", "0.23", false,
66  QObject::tr ("depletion length coefficient")));
67  Props.append (new Property ("Weta", "0.05", false,
68  QObject::tr ("narrow-channel effect coefficient")));
69  Props.append (new Property ("Leta", "0.28", false,
70  QObject::tr ("longitudinal critical field")));
71  Props.append (new Property ("Q0", "280e-6", false,
72  QObject::tr ("reverse short channel charge density")
73  +" ("+QObject::tr ("A*s/m**2")+")"));
74  Props.append (new Property ("Lk", "0.5e-6", false,
75  QObject::tr ("characteristic length")
76  +" ("+QObject::tr ("m")+")"));
77  Props.append (new Property ("Tcv", "1.5e-3", false,
78  QObject::tr ("threshold voltage temperature coefficient")
79  +" ("+QObject::tr ("V/K")+")"));
80  Props.append (new Property ("Bex", "-1.5", false,
81  QObject::tr ("mobility temperature coefficient")));
82  Props.append (new Property ("Ucex", "1.7", false,
83  QObject::tr ("Longitudinal critical field temperature exponent")));
84  Props.append (new Property ("Ibbt", "0.0", false,
85  QObject::tr ("Ibb temperature coefficient")
86  +" ("+QObject::tr ("1/K")+")"));
87  Props.append (new Property ("Hdif", "0.9e-6", false,
88  QObject::tr ("heavily doped diffusion length")
89  +" ("+QObject::tr ("m")+")"));
90  Props.append (new Property ("Rsh", "510.0", false,
91  QObject::tr ("drain/source diffusion sheet resistance")
92  +" ("+QObject::tr ("Ohm/square")+")"));
93  Props.append (new Property ("Rsc", "0.0", false,
94  QObject::tr ("source contact resistance")
95  +" ("+QObject::tr ("Ohm")+")"));
96  Props.append (new Property ("Rdc", "0.0", false,
97  QObject::tr ("drain contact resistance")
98  +" ("+QObject::tr ("Ohm")+")"));
99  Props.append (new Property ("Cgso", "1.5e-10", false,
100  QObject::tr ("gate to source overlap capacitance")
101  +" ("+QObject::tr ("F/m")+")"));
102  Props.append (new Property ("Cgdo", "1.5e-10", false,
103  QObject::tr ("gate to drain overlap capacitance")
104  +" ("+QObject::tr ("F/m")+")"));
105  Props.append (new Property ("Cgbo", "4.0e-10", false,
106  QObject::tr ("gate to bulk overlap capacitance")
107  +" ("+QObject::tr ("F/m")+")"));
108  Props.append (new Property ("Iba", "2e8", false,
109  QObject::tr ("first impact ionization coefficient")
110  +" ("+QObject::tr ("1/m")+")"));
111  Props.append (new Property ("Ibb", "3.5e8", false,
112  QObject::tr ("second impact ionization coefficient")
113  +" ("+QObject::tr ("V/m")+")"));
114  Props.append (new Property ("Ibn", "1.0", false,
115  QObject::tr ("saturation voltage factor for impact ionization")));
116  Props.append (new Property ("Kf", "1.0e-27", false,
117  QObject::tr ("flicker noise coefficient")));
118  Props.append (new Property ("Af", "1.0", false,
119  QObject::tr ("flicker noise exponent")));
120  Props.append (new Property ("Avto", "0.0", false,
121  QObject::tr ("area related theshold voltage mismatch parameter")
122  +" ("+QObject::tr ("V*m")+")"));
123  Props.append (new Property ("Akp", "0.0", false,
124  QObject::tr ("area related gain mismatch parameter")
125  +" ("+QObject::tr ("m")+")"));
126  Props.append (new Property ("Agamma", "0.0", false,
127  QObject::tr ("area related body effect mismatch parameter")
128  +" ("+QObject::tr ("sqrt(V)*m")+")"));
129  Props.append (new Property ("N", "1.0", false,
130  QObject::tr ("emission coefficient")));
131  Props.append (new Property ("Is", "1e-14", false,
132  QObject::tr ("saturation current")
133  +" ("+QObject::tr ("A")+")"));
134  Props.append (new Property ("Bv", "100", false,
135  QObject::tr ("reverse breakdown voltage")
136  +" ("+QObject::tr ("V")+")"));
137  Props.append (new Property ("Ibv", "1e-3", false,
138  QObject::tr ("current at reverse breakdown voltage")
139  +" ("+QObject::tr ("A")+")"));
140  Props.append (new Property ("Vj", "1.0", false,
141  QObject::tr ("junction potential")
142  +" ("+QObject::tr ("V")+")"));
143  Props.append (new Property ("Cj0", "300e-15", false,
144  QObject::tr ("zero-bias junction capacitance")
145  +" ("+QObject::tr ("F")+")"));
146  Props.append (new Property ("M", "0.5", false,
147  QObject::tr ("grading coefficient")));
148  Props.append (new Property ("Area", "1.0", false,
149  QObject::tr ("diode relative area")));
150  Props.append (new Property ("Fc", "0.5", false,
151  QObject::tr ("forward-bias depletion capacitance coefficient")));
152  Props.append (new Property ("Tt", "0.1e-9", false,
153  QObject::tr ("transit time")
154  +" ("+QObject::tr ("s")+")"));
155  Props.append (new Property ("Xti", "3.0", false,
156  QObject::tr ("saturation current temperature exponent")));
157  Props.append (new Property ("Xpart", "0.4", false,
158  QObject::tr ("charge partition parameter")));
159  Props.append (new Property ("Tnom", "26.85", false,
160  QObject::tr ("parameter measurement temperature")
161  +" ("+QObject::tr ("Celsius")+")"));
162  Props.append (new Property ("Temp", "26.85", false,
163  QObject::tr ("simulation temperature")));
164 
165  createSymbol ();
166  tx = x2 + 4;
167  ty = y1 + 4;
168  Model = "EKV26MOS";
169  Name = "M";
170 }
171 
173 {
174  EKV26MOS * p = new EKV26MOS();
175  p->getProperty("Type")->Value = getProperty("Type")->Value;
176  p->recreate(0);
177  return p;
178 }
179 
180 Element * EKV26MOS::info(QString& Name, char * &BitmapFile, bool getNewOne)
181 {
182  Name = QObject::tr("EPFL-EKV NMOS 2.6");
183  BitmapFile = (char *) "EKV26nMOS";
184 
185  if(getNewOne) return new EKV26MOS();
186  return 0;
187 }
188 
189 Element * EKV26MOS::info_pmos(QString& Name, char * &BitmapFile, bool getNewOne)
190 {
191  Name = QObject::tr("EPFL-EKV PMOS 2.6");
192  BitmapFile = (char *) "EKV26pMOS";
193 
194  if(getNewOne)
195  {
196  EKV26MOS* p = new EKV26MOS();
197  p->getProperty("Type")->Value = "pmos";
198  p->getProperty("Dw")->Value = "-0.03e-6";
199  p->getProperty("Vto")->Value = "-0.55";
200  p->getProperty("Gamma")->Value = "0.69";
201  p->getProperty("Phi")->Value = "0.87";
202  p->getProperty("Kp")->Value = "35e-6";
203  p->getProperty("EO")->Value = "51.0e6";
204  p->getProperty("Ucrit")->Value = "18.0e6";
205  p->getProperty("Lambda")->Value = "1.1";
206  p->getProperty("Weta")->Value = "0.0";
207  p->getProperty("Leta")->Value = "0.45";
208  p->getProperty("Q0")->Value = "200e-6";
209  p->getProperty("Lk")->Value = "0.6e-6";
210  p->getProperty("Tcv")->Value = "-1.4e-3";
211  p->getProperty("Bex")->Value = "-1.4";
212  p->getProperty("Ucex")->Value = "2.0";
213  p->getProperty("Rsh")->Value = "990.0";
214  p->getProperty("Iba")->Value = "0.0";
215  p->getProperty("Ibb")->Value = "3.0e8";
216  p->getProperty("Kf")->Value = "1.0e-28";
217  p->recreate(0);
218  return p;
219  }
220  return 0;
221 }
222 
224 {
225  // put in here symbol drawing code and terminal definitions
226  Lines.append(new Line(-14,-13,-14, 13,QPen(QPen::darkBlue,3)));
227  Lines.append(new Line(-30, 0,-14, 0,QPen(QPen::darkBlue,2)));
228  Lines.append(new Line(-10,-11, 0,-11,QPen(QPen::darkBlue,2)));
229  Lines.append(new Line( 0,-11, 0,-30,QPen(QPen::darkBlue,2)));
230 
231  Lines.append(new Line(-10, 11, 0, 11,QPen(QPen::darkBlue,2)));
232  Lines.append(new Line( 0, 11, 0, 30,QPen(QPen::darkBlue,2)));
233  Lines.append(new Line(-10, 0, 20, 0,QPen(QPen::darkBlue,2)));
234  Lines.append(new Line(-10,-16,-10, -7,QPen(QPen::darkBlue,3)));
235 
236  Lines.append(new Line(-10, 7,-10, 16,QPen(QPen::darkBlue,3)));
237  Lines.append(new Line( -4, 24, 4, 20,QPen(QPen::darkBlue,2)));
238 
239  // arrow
240  if(getProperty("Type")->Value == "nmos") {
241  Lines.append(new Line( -9, 0, -4, -5,QPen(QPen::darkBlue,2)));
242  Lines.append(new Line( -9, 0, -4, 5,QPen(QPen::darkBlue,2)));
243  } else {
244  Lines.append(new Line( -5, 5, 0, 0,QPen(QPen::darkBlue,2)));
245  Lines.append(new Line( -5, -5, 0, 0,QPen(QPen::darkBlue,2)));
246  }
247 
248  Lines.append(new Line(-10, -3,-10, 3,QPen(QPen::darkBlue,3)));
249  Lines.append(new Line(-10, -8,-10, -6,QPen(QPen::darkBlue,3)));
250  Lines.append(new Line(-10, 8,-10, 6,QPen(QPen::darkBlue,3)));
251 
252  // E
253  Lines.append(new Line(-30,-30,-30,-24,QPen(QPen::darkBlue,1)));
254  Lines.append(new Line(-30,-30,-26,-30,QPen(QPen::darkBlue,1)));
255  Lines.append(new Line(-30,-27,-26,-27,QPen(QPen::darkBlue,1)));
256  Lines.append(new Line(-30,-24,-26,-24,QPen(QPen::darkBlue,1)));
257  // K
258  Lines.append(new Line(-24,-30,-24,-24,QPen(QPen::darkBlue,1)));
259  Lines.append(new Line(-24,-27,-20,-30,QPen(QPen::darkBlue,1)));
260  Lines.append(new Line(-24,-27,-20,-24,QPen(QPen::darkBlue,1)));
261  // V
262  Lines.append(new Line(-18,-30,-16,-24,QPen(QPen::darkBlue,1)));
263  Lines.append(new Line(-14,-30,-16,-24,QPen(QPen::darkBlue,1)));
264 
265  Ports.append(new Port( 0,-30)); // drain
266  Ports.append(new Port(-30, 0)); // gate
267  Ports.append(new Port( 0, 30)); // source
268  Ports.append(new Port( 20, 0)); // bulk
269 
270  x1 = -30; y1 = -30;
271  x2 = 20; y2 = 30;
272 }
273 
275 {
276  QString s = Model+":"+Name;
277 
278  // output all node names
279  for(Port *p1 = Ports.first(); p1 != 0; p1 = Ports.next())
280  s += " "+p1->Connection->Name; // node names
281 
282  // output type npn/pnp property
283  Property *p2 = Props.first();
284  if(p2->Value == "nmos")
285  s += " nmos=\"1\"";
286  else
287  s += " pmos=\"1\"";
288 
289  // output all remaining properties
290  for(p2 = Props.next(); p2 != 0; p2 = Props.next())
291  s += " "+p2->Name+"=\""+p2->Value+"\"";
292 
293  return s + '\n';
294 }