Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
jfet.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  jfet.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 "jfet.h"
19 
20 
22 {
23  Description = QObject::tr("junction field-effect transistor");
24 
25  // this must be the first property in the list !!!
26  Props.append(new Property("Type", "nfet", true,
27  QObject::tr("polarity")+" [nfet, pfet]"));
28  Props.append(new Property("Vt0", "-2.0 V", true,
29  QObject::tr("threshold voltage")));
30  Props.append(new Property("Beta", "1e-4", true,
31  QObject::tr("transconductance parameter")));
32  Props.append(new Property("Lambda", "0.0", true,
33  QObject::tr("channel-length modulation parameter")));
34  Props.append(new Property("Rd", "0.0", false,
35  QObject::tr("parasitic drain resistance")));
36  Props.append(new Property("Rs", "0.0", false,
37  QObject::tr("parasitic source resistance")));
38  Props.append(new Property("Is", "1e-14", false,
39  QObject::tr("gate-junction saturation current")));
40  Props.append(new Property("N", "1.0", false,
41  QObject::tr("gate-junction emission coefficient")));
42  Props.append(new Property("Isr", "1e-14", false,
43  QObject::tr("gate-junction recombination current parameter")));
44  Props.append(new Property("Nr", "2.0", false,
45  QObject::tr("Isr emission coefficient")));
46  Props.append(new Property("Cgs", "0.0", false,
47  QObject::tr("zero-bias gate-source junction capacitance")));
48  Props.append(new Property("Cgd", "0.0", false,
49  QObject::tr("zero-bias gate-drain junction capacitance")));
50  Props.append(new Property("Pb", "1.0", false,
51  QObject::tr("gate-junction potential")));
52  Props.append(new Property("Fc", "0.5", false,
53  QObject::tr("forward-bias junction capacitance coefficient")));
54  Props.append(new Property("M", "0.5", false,
55  QObject::tr("gate P-N grading coefficient")));
56  Props.append(new Property("Kf", "0.0", false,
57  QObject::tr("flicker noise coefficient")));
58  Props.append(new Property("Af", "1.0", false,
59  QObject::tr("flicker noise exponent")));
60  Props.append(new Property("Ffe", "1.0", false,
61  QObject::tr("flicker noise frequency exponent")));
62  Props.append(new Property("Temp", "26.85", false,
63  QObject::tr("simulation temperature in degree Celsius")));
64  Props.append(new Property("Xti", "3.0", false,
65  QObject::tr("saturation current temperature exponent")));
66  Props.append(new Property("Vt0tc", "0.0", false,
67  QObject::tr("Vt0 temperature coefficient")));
68  Props.append(new Property("Betatce", "0.0", false,
69  QObject::tr("Beta exponential temperature coefficient")));
70  Props.append(new Property("Tnom", "26.85", false,
71  QObject::tr("temperature at which parameters were extracted")));
72  Props.append(new Property("Area", "1.0", false,
73  QObject::tr("default area for JFET")));
74 
75  createSymbol();
76  tx = x2+4;
77  ty = y1+4;
78  Model = "JFET";
79  Name = "T";
80 }
81 
82 // -------------------------------------------------------
84 {
85  JFET* p = new JFET();
86  p->Props.getFirst()->Value = Props.getFirst()->Value;
87  p->recreate(0);
88  return p;
89 }
90 
91 // -------------------------------------------------------
92 Element* JFET::info(QString& Name, char* &BitmapFile, bool getNewOne)
93 {
94  Name = QObject::tr("n-JFET");
95  BitmapFile = (char *) "nfet";
96 
97  if(getNewOne) return new JFET();
98  return 0;
99 }
100 
101 // -------------------------------------------------------
102 Element* JFET::info_p(QString& Name, char* &BitmapFile, bool getNewOne)
103 {
104  Name = QObject::tr("p-JFET");
105  BitmapFile = (char *) "pfet";
106 
107  if(getNewOne) {
108  JFET* p = new JFET();
109  p->Props.getFirst()->Value = "pfet";
110  p->recreate(0);
111  return p;
112  }
113  return 0;
114 }
115 
116 // -------------------------------------------------------
118 {
119  Lines.append(new Line(-10,-15,-10, 15,QPen(Qt::darkBlue,3)));
120  Lines.append(new Line(-30, 0,-10, 0,QPen(Qt::darkBlue,2)));
121  Lines.append(new Line(-10,-10, 0,-10,QPen(Qt::darkBlue,2)));
122  Lines.append(new Line( 0,-10, 0,-30,QPen(Qt::darkBlue,2)));
123  Lines.append(new Line(-10, 10, 0, 10,QPen(Qt::darkBlue,2)));
124  Lines.append(new Line( 0, 10, 0, 30,QPen(Qt::darkBlue,2)));
125 
126  Lines.append(new Line( -4, 24, 4, 20,QPen(Qt::darkBlue,2)));
127 
128  if(Props.getFirst()->Value == "nfet") {
129  Lines.append(new Line(-16, -5,-11, 0,QPen(Qt::darkBlue,2)));
130  Lines.append(new Line(-16, 5,-11, 0,QPen(Qt::darkBlue,2)));
131  }
132  else {
133  Lines.append(new Line(-18, 0,-13, -5,QPen(Qt::darkBlue,2)));
134  Lines.append(new Line(-18, 0,-13, 5,QPen(Qt::darkBlue,2)));
135  }
136 
137  Ports.append(new Port(-30, 0));
138  Ports.append(new Port( 0,-30));
139  Ports.append(new Port( 0, 30));
140 
141  x1 = -30; y1 = -30;
142  x2 = 4; y2 = 30;
143 }
Q3PtrList< Line > Lines
Definition: component.h:67
int y1
Definition: element.h:153
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
JFET()
Definition: jfet.cpp:21
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: jfet.cpp:92
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Definition: jfet.h:24
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
void recreate(Schematic *)
Definition: component.cpp:1250
Component * newOne()
Definition: jfet.cpp:83
Q3PtrList< Port > Ports
Definition: component.h:70
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
void createSymbol()
Definition: jfet.cpp:117
QString Description
Definition: component.h:81
static Element * info_p(QString &, char *&, bool getNewOne=false)
Definition: jfet.cpp:102
int x2
Definition: element.h:153