00001 // SuperMix version 1.0 C++ source file 00002 // 00003 // Copyright (c) 1999 California Institute of Technology. 00004 // All rights reserved. 00005 // 00006 // Redistribution and use in source and binary forms for noncommercial 00007 // purposes are permitted provided that the above copyright notice and 00008 // this paragraph are duplicated in all such forms and that any 00009 // documentation and other materials related to such distribution and 00010 // use acknowledge that the software was developed by California 00011 // Institute of Technology. Redistribution and/or use in source or 00012 // binary forms is not permitted for any commercial purpose. Use of 00013 // this software does not include a permitted use of the Institute's 00014 // name or trademark for any purpose. 00015 // 00016 // DISCLAIMER: 00017 // THIS SOFTWARE AND/OR RELATED MATERIALS ARE PROVIDED "AS-IS" WITHOUT 00018 // WARRANTY OF ANY KIND INCLUDING ANY WARRANTIES OF PERFORMANCE OR 00019 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE (AS SET 00020 // FORTH IN UCC 23212-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE 00021 // LICENSED PRODUCT, HOWEVER USED. IN NO EVENT SHALL CALTECH/JPL BE 00022 // LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING BUT NOT LIMITED TO 00023 // INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING ECONOMIC 00024 // DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF 00025 // WHETHER CALTECH/JPL SHALL BE ADVISED, HAVE REASON TO KNOW, OR IN 00026 // FACT SHALL KNOW OF THE POSSIBILITY. THE USER BEARS ALL RISK 00027 // RELATING TO QUALITY AND PERFORMANCE OF THE SOFTWARE AND/OR RELATED 00028 // MATERIALS. 00029 // 00030 00043 // ************************************************************************** 00044 // 00045 // 5/12/01: Changed comments to javadoc format. 00046 // 11/16/99: changes to support new noise calculations 00047 // 11/2/99: Added support for is_source(), is_active() 00048 // 9/22/98: Added fet copy constructor, operator=. 00049 // 9/18/98: Made fet a subclass of data_ptr_nport. 00050 // 00051 // ************************************************************************** 00052 00053 #ifndef FET_H 00054 #define FET_H 1 00055 00056 #include "nport.h" 00057 #include "circuit.h" 00058 #include "elements.h" 00059 00063 class transconductance: public nport 00064 { 00065 public: 00069 parameter G; 00070 00077 parameter Tau; 00078 00082 transconductance() : nport(2), G(0.0), Tau(0.0) 00083 { info.source = false; } // Transconductances are sourceless. 00084 00090 int size() { return 2; } 00091 00092 00093 private: 00094 // The calculation is done here. 00095 void recalc(); 00096 }; 00097 00120 class fet: public data_ptr_nport 00121 { 00122 public: 00123 // Circuit elements in the model. At this time, circuit elements 00124 // are public so that users can set their values for a particular fet. 00125 // Perhaps there is a fancier way to do it, but this method has the 00126 // advantage of being simple, and it works. 00127 inductor Lg; 00128 inductor Ld; 00129 inductor Ls; 00130 resistor Rg; 00131 resistor Rd; 00132 resistor Rs; 00133 resistor Rgs; 00134 resistor Rds; 00135 capacitor Cpg; 00136 capacitor Cpd; 00137 capacitor Cgs; 00138 capacitor Cds; 00139 capacitor Cgd; 00140 transconductance Gm; 00141 00147 fet(); 00148 00154 fet(const fet & f); 00155 00161 fet & operator=(const fet & f); 00162 00168 int size() { return 2; } 00169 00170 protected: 00174 circuit fetckt; 00175 00176 private: 00177 // Some connector elements used to build the circuit. 00178 branch b1, b2; 00179 series_tee st3, st4, st5, st6; 00180 00185 void construct(); 00186 00190 void fet_copy(const fet & f); 00191 00192 // The calculation is done here. 00193 virtual void recalc() { data_ptr = &fetckt.get_data(); } 00194 virtual void recalc_S() { data_ptr = &fetckt.get_data_S(); } 00195 }; 00196 00197 #endif /* FET_H */
Please direct comments and corrections to
supermix@submm.caltech.edu
Go to the supermix home page
Generated by
1.2.7