Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mod_amp.cpp
Go to the documentation of this file.
1 /*
2  * mod_amp.cpp - device implementations for mod_amp 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 "mod_amp.h"
12 
14 {
15  Description = QObject::tr ("Modular Operational Amplifier verilog device");
16 
17  Props.append (new Property ("GBP", "1e6", false,
18  QObject::tr ("Gain bandwidth product (Hz)")));
19  Props.append (new Property ("AOLDC", "106.0", false,
20  QObject::tr ("Open-loop differential gain at DC (dB)")));
21  Props.append (new Property ("FP2", "3e6", false,
22  QObject::tr ("Second pole frequency (Hz)")));
23  Props.append (new Property ("RO", "75", false,
24  QObject::tr ("Output resistance (Ohm)")));
25  Props.append (new Property ("CD", "1e-12", false,
26  QObject::tr ("Differential input capacitance (F)")));
27  Props.append (new Property ("RD", "2e6", false,
28  QObject::tr ("Differential input resistance (Ohm)")));
29  Props.append (new Property ("IOFF", "20e-9", false,
30  QObject::tr ("Input offset current (A)")));
31  Props.append (new Property ("IB", "80e-9", false,
32  QObject::tr ("Input bias current (A)")));
33  Props.append (new Property ("VOFF", "7e-4", false,
34  QObject::tr ("Input offset voltage (V)")));
35  Props.append (new Property ("CMRRDC", "90.0", false,
36  QObject::tr ("Common-mode rejection ratio at DC (dB)")));
37  Props.append (new Property ("FCM", "200.0", false,
38  QObject::tr ("Common-mode zero corner frequency (Hz)")));
39  Props.append (new Property ("PSRT", "5e5", false,
40  QObject::tr ("Positive slew rate (V/s)")));
41  Props.append (new Property ("NSRT", "5e5", false,
42  QObject::tr ("Negative slew rate (V/s)")));
43  Props.append (new Property ("VLIMP", "14", false,
44  QObject::tr ("Positive output voltage limit (V)")));
45  Props.append (new Property ("VLIMN", "-14", false,
46  QObject::tr ("Negative output voltage limit (V)")));
47  Props.append (new Property ("ILMAX", "35e-3", false,
48  QObject::tr ("Maximum DC output current (A)")));
49  Props.append (new Property ("CSCALE", "50", false,
50  QObject::tr ("Current limit scale factor")));
51  createSymbol ();
52  tx = x2 + 4;
53  ty = y1 + 4;
54  Model = "mod_amp";
55  Name = "OP";
56 }
57 
59 {
60  mod_amp * p = new mod_amp();
61  p->Props.getFirst()->Value = Props.getFirst()->Value;
62  p->recreate(0);
63  return p;
64 }
65 
66 Element * mod_amp::info(QString& Name, char * &BitmapFile, bool getNewOne)
67 {
68  Name = QObject::tr("Modular OpAmp");
69  BitmapFile = (char *) "mod_amp";
70 
71  if(getNewOne) return new mod_amp();
72  return 0;
73 }
74 
76 {
77 
78  Lines.append(new Line(-30,-20,-20,-20,QPen(Qt::darkBlue,2)));
79  Lines.append(new Line(-30, 20,-20, 20,QPen(Qt::darkBlue,2)));
80  Lines.append(new Line( 30, 0, 40, 0,QPen(Qt::darkBlue,2)));
81 
82  Lines.append(new Line(-20,-35,-20, 35,QPen(Qt::darkBlue,2)));
83  Lines.append(new Line(-20,-35, 30, 0,QPen(Qt::darkBlue,2)));
84  Lines.append(new Line(-20, 35, 30, 0,QPen(Qt::darkBlue,2)));
85 
86  Lines.append(new Line(-16, 19, -9, 19,QPen(Qt::black,2)));
87  Lines.append(new Line(-16,-19, -9,-19,QPen(Qt::red,2)));
88  Lines.append(new Line(-13,-22,-13,-15,QPen(Qt::red,2)));
89 
90  Lines.append(new Line(-10, -10, -10, 10,QPen(Qt::red,2)));
91  Lines.append(new Line(-10, -10, 0, 0,QPen(Qt::red,2)));
92  Lines.append(new Line( 0, 0, 10, -10,QPen(Qt::red,2)));
93  Lines.append(new Line( 10, -10, 10, 10,QPen(Qt::red,2)));
94 
95  Ports.append(new Port(-30,-20));
96  Ports.append(new Port(-30, 20));
97  Ports.append(new Port( 40, 0));
98 
99  x1 = -30; y1 = -38;
100  x2 = 40; y2 = 38;
101 
102 }
Q3PtrList< Line > Lines
Definition: component.h:67
mod_amp()
Definition: mod_amp.cpp:13
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
Component * newOne()
Definition: mod_amp.cpp:58
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
void createSymbol()
Definition: mod_amp.cpp:75
Q3PtrList< Port > Ports
Definition: component.h:70
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: mod_amp.cpp:66
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
QString Description
Definition: component.h:81
int x2
Definition: element.h:153
virtual void recreate(Schematic *)
Definition: component.h:39