Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mosfet_sub.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  mosfet_sub.cpp
3  ----------------
4  begin : Fri Jun 4 2004
5  copyright : (C) 2003 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "mosfet_sub.h"
19 
21 {
22  // these must be the first properties in the list !!!
23  Props.append(new Property("Type", "nfet", false,
24  QObject::tr("polarity")+" [nfet, pfet]"));
25  Props.append(new Property("Vt0", "1.0 V", true,
26  QObject::tr("zero-bias threshold voltage")));
27 
28  Props.append(new Property("Kp", "2e-5", true,
29  QObject::tr("transconductance coefficient in A/V^2")));
30  Props.append(new Property("Gamma", "0.0", false,
31  QObject::tr("bulk threshold in sqrt(V)")));
32  Props.append(new Property("Phi", "0.6 V", false,
33  QObject::tr("surface potential")));
34  Props.append(new Property("Lambda", "0.0", true,
35  QObject::tr("channel-length modulation parameter in 1/V")));
36  Props.append(new Property("Rd", "0.0 Ohm", false,
37  QObject::tr("drain ohmic resistance")));
38  Props.append(new Property("Rs", "0.0 Ohm", false,
39  QObject::tr("source ohmic resistance")));
40  Props.append(new Property("Rg", "0.0 Ohm", false,
41  QObject::tr("gate ohmic resistance")));
42  Props.append(new Property("Is", "1e-14 A", false,
43  QObject::tr("bulk junction saturation current")));
44  Props.append(new Property("N", "1.0", false,
45  QObject::tr("bulk junction emission coefficient")));
46  Props.append(new Property("W", "1 um", false,
47  QObject::tr("channel width")));
48  Props.append(new Property("L", "1 um", false,
49  QObject::tr("channel length")));
50  Props.append(new Property("Ld", "0.0", false,
51  QObject::tr("lateral diffusion length")));
52  Props.append(new Property("Tox", "0.1 um", false,
53  QObject::tr("oxide thickness")));
54  Props.append(new Property("Cgso", "0.0", false,
55  QObject::tr("gate-source overlap capacitance per meter of "
56  "channel width in F/m")));
57  Props.append(new Property("Cgdo", "0.0", false,
58  QObject::tr("gate-drain overlap capacitance per meter of "
59  "channel width in F/m")));
60  Props.append(new Property("Cgbo", "0.0", false,
61  QObject::tr("gate-bulk overlap capacitance per meter of "
62  "channel length in F/m")));
63  Props.append(new Property("Cbd", "0.0 F", false,
64  QObject::tr("zero-bias bulk-drain junction capacitance")));
65  Props.append(new Property("Cbs", "0.0 F", false,
66  QObject::tr("zero-bias bulk-source junction capacitance")));
67  Props.append(new Property("Pb", "0.8 V", false,
68  QObject::tr("bulk junction potential")));
69  Props.append(new Property("Mj", "0.5", false,
70  QObject::tr("bulk junction bottom grading coefficient")));
71  Props.append(new Property("Fc", "0.5", false,
72  QObject::tr("bulk junction forward-bias depletion capacitance "
73  "coefficient")));
74  Props.append(new Property("Cjsw", "0.0", false,
75  QObject::tr("zero-bias bulk junction periphery capacitance per meter "
76  "of junction perimeter in F/m")));
77  Props.append(new Property("Mjsw", "0.33", false,
78  QObject::tr("bulk junction periphery grading coefficient")));
79  Props.append(new Property("Tt", "0.0 ps", false,
80  QObject::tr("bulk transit time")));
81  Props.append(new Property("Nsub", "0.0", false,
82  QObject::tr("substrate bulk doping density in 1/cm^3")));
83  Props.append(new Property("Nss", "0.0", false,
84  QObject::tr("surface state density in 1/cm^2")));
85  Props.append(new Property("Tpg", "1", false,
86  QObject::tr("gate material type: 0 = alumina; -1 = same as bulk; "
87  "1 = opposite to bulk")));
88  Props.append(new Property("Uo", "600.0", false,
89  QObject::tr("surface mobility in cm^2/Vs")));
90  Props.append(new Property("Rsh", "0.0", false,
91  QObject::tr("drain and source diffusion sheet resistance in "
92  "Ohms/square")));
93  Props.append(new Property("Nrd", "1", false,
94  QObject::tr("number of equivalent drain squares")));
95  Props.append(new Property("Nrs", "1", false,
96  QObject::tr("number of equivalent source squares")));
97  Props.append(new Property("Cj", "0.0", false,
98  QObject::tr("zero-bias bulk junction bottom capacitance per square "
99  "meter of junction area in F/m^2")));
100  Props.append(new Property("Js", "0.0", false,
101  QObject::tr("bulk junction saturation current per square "
102  "meter of junction area in A/m^2")));
103  Props.append(new Property("Ad", "0.0", false,
104  QObject::tr("drain diffusion area in m^2")));
105  Props.append(new Property("As", "0.0", false,
106  QObject::tr("source diffusion area in m^2")));
107  Props.append(new Property("Pd", "0.0 m", false,
108  QObject::tr("drain junction perimeter")));
109  Props.append(new Property("Ps", "0.0 m", false,
110  QObject::tr("source junction perimeter")));
111  Props.append(new Property("Kf", "0.0", false,
112  QObject::tr("flicker noise coefficient")));
113  Props.append(new Property("Af", "1.0", false,
114  QObject::tr("flicker noise exponent")));
115  Props.append(new Property("Ffe", "1.0", false,
116  QObject::tr("flicker noise frequency exponent")));
117  Props.append(new Property("Temp", "26.85", false,
118  QObject::tr("simulation temperature in degree Celsius")));
119  Props.append(new Property("Tnom", "26.85", false,
120  QObject::tr("parameter measurement temperature")));
121 
122  Name = "T";
123 }
124 
126 {
127  Description = QObject::tr("MOS field-effect transistor with substrate");
128  createSymbol();
129  tx = x2+4;
130  ty = y1+4;
131  Model = "MOSFET";
132 }
133 
134 // -------------------------------------------------------
136 {
137  MOSFET_sub* p = new MOSFET_sub();
138  p->Props.first()->Value = Props.first()->Value;
139  p->Props.next()->Value = Props.next()->Value;
140  p->recreate(0);
141  return p;
142 }
143 
144 // -------------------------------------------------------
145 Element* MOSFET_sub::info(QString& Name, char* &BitmapFile, bool getNewOne)
146 {
147  Name = QObject::tr("n-MOSFET");
148  BitmapFile = (char *) "nmosfet_sub";
149 
150  if(getNewOne) return new MOSFET_sub();
151  return 0;
152 }
153 
154 // -------------------------------------------------------
156  char* &BitmapFile, bool getNewOne)
157 {
158  Name = QObject::tr("p-MOSFET");
159  BitmapFile = (char *) "pmosfet_sub";
160 
161  if(getNewOne) {
162  MOSFET_sub* p = new MOSFET_sub();
163  p->Props.first()->Value = "pfet";
164  p->Props.next()->Value = "-1.0 V";
165  p->recreate(0);
166  return p;
167  }
168  return 0;
169 }
170 
171 // -------------------------------------------------------
173  char* &BitmapFile, bool getNewOne)
174 {
175  Name = QObject::tr("depletion MOSFET");
176  BitmapFile = (char *) "dmosfet_sub";
177 
178  if(getNewOne) {
179  MOSFET_sub* p = new MOSFET_sub();
180  p->Props.first();
181  p->Props.next()->Value = "-1.0 V";
182  p->recreate(0);
183  return p;
184  }
185  return 0;
186 }
187 
188 // -------------------------------------------------------
190 {
191  Lines.append(new Line(-14,-13,-14, 13,QPen(Qt::darkBlue,3)));
192  Lines.append(new Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2)));
193 
194  Lines.append(new Line(-10,-11, 0,-11,QPen(Qt::darkBlue,2)));
195  Lines.append(new Line( 0,-11, 0,-30,QPen(Qt::darkBlue,2)));
196  Lines.append(new Line(-10, 11, 0, 11,QPen(Qt::darkBlue,2)));
197  Lines.append(new Line( 0, 11, 0, 30,QPen(Qt::darkBlue,2)));
198  Lines.append(new Line(-10, 0, 20, 0,QPen(Qt::darkBlue,2)));
199 
200  Lines.append(new Line(-10,-16,-10, -7,QPen(Qt::darkBlue,3)));
201  Lines.append(new Line(-10, 7,-10, 16,QPen(Qt::darkBlue,3)));
202 
203  Lines.append(new Line( -4, 24, 4, 20,QPen(Qt::darkBlue,2)));
204 
205  if(Props.first()->Value == "nfet") {
206  Lines.append(new Line( -9, 0, -4, -5,QPen(Qt::darkBlue,2)));
207  Lines.append(new Line( -9, 0, -4, 5,QPen(Qt::darkBlue,2)));
208  }
209  else {
210  Lines.append(new Line( -1, 0, -6, -5,QPen(Qt::darkBlue,2)));
211  Lines.append(new Line( -1, 0, -6, 5,QPen(Qt::darkBlue,2)));
212  }
213 
214  if((Props.next()->Value.stripWhiteSpace().at(0) == '-') ==
215  (Props.first()->Value == "nfet"))
216  Lines.append(new Line(-10, -8,-10, 8,QPen(Qt::darkBlue,3)));
217  else
218  Lines.append(new Line(-10, -4,-10, 4,QPen(Qt::darkBlue,3)));
219 
220  Ports.append(new Port(-30, 0));
221  Ports.append(new Port( 0,-30));
222  Ports.append(new Port( 0, 30));
223  Ports.append(new Port( 20, 0));
224 
225  x1 = -30; y1 = -30;
226  x2 = 30; y2 = 30;
227 }
Q3PtrList< Line > Lines
Definition: component.h:67
int y1
Definition: element.h:153
void createSymbol()
Definition: mosfet_sub.cpp:189
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: mosfet_sub.cpp:145
static Element * info_depl(QString &, char *&, bool getNewOne=false)
Definition: mosfet_sub.cpp:172
int ty
Definition: component.h:78
Component * newOne()
Definition: mosfet_sub.cpp:135
Q3PtrList< Property > Props
Definition: component.h:72
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
void recreate(Schematic *)
Definition: component.cpp:1250
Q3PtrList< Port > Ports
Definition: component.h:70
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
QString Description
Definition: component.h:81
static Element * info_p(QString &, char *&, bool getNewOne=false)
Definition: mosfet_sub.cpp:155
int x2
Definition: element.h:153