Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/mod_amp.cpp
Go to the documentation of this file.
00001 /*
00002  * mod_amp.cpp - device implementations for mod_amp module
00003  *
00004  * This is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2, or (at your option)
00007  * any later version.
00008  * 
00009  */
00010 
00011 #include "mod_amp.h"
00012 
00013 mod_amp::mod_amp()
00014 {
00015   Description = QObject::tr ("Modular Operational Amplifier verilog device");
00016 
00017   Props.append (new Property ("GBP", "1e6", false,
00018     QObject::tr ("Gain bandwidth product (Hz)")));
00019   Props.append (new Property ("AOLDC", "106.0", false,
00020     QObject::tr ("Open-loop differential gain at DC (dB)")));
00021   Props.append (new Property ("FP2", "3e6", false,
00022     QObject::tr ("Second pole frequency (Hz)")));
00023   Props.append (new Property ("RO", "75", false,
00024     QObject::tr ("Output resistance (Ohm)")));
00025   Props.append (new Property ("CD", "1e-12", false,
00026     QObject::tr ("Differential input capacitance (F)")));
00027   Props.append (new Property ("RD", "2e6", false,
00028     QObject::tr ("Differential input resistance (Ohm)")));
00029   Props.append (new Property ("IOFF", "20e-9", false,
00030     QObject::tr ("Input offset current (A)")));
00031   Props.append (new Property ("IB", "80e-9", false,
00032     QObject::tr ("Input bias current (A)")));
00033   Props.append (new Property ("VOFF", "7e-4", false,
00034     QObject::tr ("Input offset voltage (V)")));
00035   Props.append (new Property ("CMRRDC", "90.0", false,
00036     QObject::tr ("Common-mode rejection ratio at DC (dB)")));
00037   Props.append (new Property ("FCM", "200.0", false,
00038     QObject::tr ("Common-mode zero corner frequency (Hz)")));
00039   Props.append (new Property ("PSRT", "5e5", false,
00040     QObject::tr ("Positive slew rate (V/s)")));
00041   Props.append (new Property ("NSRT", "5e5", false,
00042     QObject::tr ("Negative slew rate (V/s)")));
00043   Props.append (new Property ("VLIMP", "14", false,
00044     QObject::tr ("Positive output voltage limit (V)")));
00045   Props.append (new Property ("VLIMN", "-14", false,
00046     QObject::tr ("Negative output voltage limit (V)")));
00047   Props.append (new Property ("ILMAX", "35e-3", false,
00048     QObject::tr ("Maximum DC output current (A)")));
00049  Props.append (new Property ("CSCALE", "50", false,
00050     QObject::tr ("Current limit scale factor")));
00051   createSymbol ();
00052   tx = x2 + 4;
00053   ty = y1 + 4;
00054   Model = "mod_amp";
00055   Name  = "OP";
00056 }
00057 
00058 Component * mod_amp::newOne()
00059 {
00060   mod_amp * p = new mod_amp();
00061   p->Props.getFirst()->Value = Props.getFirst()->Value; 
00062   p->recreate(0); 
00063   return p;
00064 }
00065 
00066 Element * mod_amp::info(QString& Name, char * &BitmapFile, bool getNewOne)
00067 {
00068   Name = QObject::tr("Modular OpAmp");
00069   BitmapFile = (char *) "mod_amp";
00070 
00071   if(getNewOne) return new mod_amp();
00072   return 0;
00073 }
00074 
00075 void mod_amp::createSymbol()
00076 {
00077 
00078   Lines.append(new Line(-30,-20,-20,-20,QPen(Qt::darkBlue,2)));
00079   Lines.append(new Line(-30, 20,-20, 20,QPen(Qt::darkBlue,2)));
00080   Lines.append(new Line( 30,  0, 40,  0,QPen(Qt::darkBlue,2)));
00081 
00082   Lines.append(new Line(-20,-35,-20, 35,QPen(Qt::darkBlue,2)));
00083   Lines.append(new Line(-20,-35, 30,  0,QPen(Qt::darkBlue,2)));
00084   Lines.append(new Line(-20, 35, 30,  0,QPen(Qt::darkBlue,2)));
00085 
00086   Lines.append(new Line(-16, 19, -9, 19,QPen(Qt::black,2)));
00087   Lines.append(new Line(-16,-19, -9,-19,QPen(Qt::red,2)));
00088   Lines.append(new Line(-13,-22,-13,-15,QPen(Qt::red,2)));
00089 
00090   Lines.append(new Line(-10, -10, -10, 10,QPen(Qt::red,2)));
00091   Lines.append(new Line(-10, -10,  0,   0,QPen(Qt::red,2)));
00092   Lines.append(new Line(  0,  0,  10, -10,QPen(Qt::red,2)));
00093   Lines.append(new Line( 10, -10, 10,  10,QPen(Qt::red,2)));
00094   
00095   Ports.append(new Port(-30,-20));
00096   Ports.append(new Port(-30, 20));
00097   Ports.append(new Port( 40,  0));
00098 
00099   x1 = -30; y1 = -38;
00100   x2 =  40; y2 =  38;
00101 
00102 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines