1 /* $Id: d_mos3.h,v 1.2 2010-04-15 07:42:56 felix Exp $ -*- C++ -*-
2 * Copyright (C) 2001 Albert Davis
3 * Author: Albert Davis <aldavis@gnu.org>
5 * This file is part of "Gnucap", the Gnu Circuit Analysis Package
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 *------------------------------------------------------------------
22 * mos model equations: spice level 3 equivalent
24 /* This file is automatically generated. DO NOT EDIT */
25 #ifndef D_MOS3_H_INCLUDED
26 #define D_MOS3_H_INCLUDED
33 /*--------------------------------------------------------------------------*/
34 class SDP_BUILT_IN_MOS3
35 :public SDP_BUILT_IN_MOS123
{
37 explicit SDP_BUILT_IN_MOS3(const COMMON_COMPONENT
* c
) : SDP_BUILT_IN_MOS123(c
) {init(c
);}
38 void init(const COMMON_COMPONENT
*);
41 /*--------------------------------------------------------------------------*/
42 class DEV_BUILT_IN_MOS
;
43 class TDP_BUILT_IN_MOS3
44 :public TDP_BUILT_IN_MOS123
{
46 explicit TDP_BUILT_IN_MOS3(const DEV_BUILT_IN_MOS
*);
55 /*--------------------------------------------------------------------------*/
56 //class ADP_BUILT_IN_MOS3
57 // :public ADP_BUILT_IN_MOS123{
59 // explicit ADP_BUILT_IN_MOS3(const COMMON_COMPONENT* c) : ADP_BUILT_IN_MOS123(c) {init(c);}
60 // void init(const COMMON_COMPONENT*);
62 // double vto; // replace m->vto
64 // double ids_stress; // base
67 /*--------------------------------------------------------------------------*/
68 class ADP_BUILT_IN_MOS3
:public ADP_BUILT_IN_MOS123
{
70 explicit ADP_BUILT_IN_MOS3( COMPONENT
* c
, const std::string n
) :
71 ADP_BUILT_IN_MOS123(c
,n
) { init(c
);}
72 void init(const COMPONENT
* );
74 // double vto; // replace m->vto
78 /*--------------------------------------------------------------------------*/
79 class MODEL_BUILT_IN_MOS3
80 :public MODEL_BUILT_IN_MOS123
{
82 explicit MODEL_BUILT_IN_MOS3(const MODEL_BUILT_IN_MOS3
& p
);
84 explicit MODEL_BUILT_IN_MOS3(const BASE_SUBCKT
*);
85 ~MODEL_BUILT_IN_MOS3() {--_count
;}
86 public: // override virtual
87 std::string
dev_type()const;
88 void set_dev_type(const std::string
& nt
);
89 CARD
* clone()const {return new MODEL_BUILT_IN_MOS3(*this);}
92 SDP_CARD
* new_sdp(COMMON_COMPONENT
* c
)const; //y !const COMMON_COMPONENT*?
93 virtual ADP_CARD
* new_adp(COMPONENT
* c
)const;
94 void set_param_by_index(int, std::string
&, int);
95 bool param_is_printable(int)const;
96 std::string
param_name(int)const;
97 std::string
param_name(int,int)const;
98 std::string
param_value(int)const;
99 int param_count()const {return (15 + MODEL_BUILT_IN_MOS123::param_count());}
100 bool is_valid(const COMPONENT
*)const;
101 void tr_eval(COMPONENT
*)const;
103 public: // stress and tt
104 virtual void do_stress_apply( COMPONENT
* ) const;
105 virtual void do_tt_prepare( COMPONENT
* ) const;
106 public: // not virtual
107 static int count() {return _count
;}
108 private: // strictly internal
110 public: // input parameters
111 PARAMETER
<double> kp
; // transconductance parameter
112 PARAMETER
<double> nfs_cm
; // fast surface state density
113 PARAMETER
<double> vmax
; // max drift velocity of carriers
114 PARAMETER
<double> theta
; // mobility modulation
115 PARAMETER
<double> eta
; // static feedback
116 PARAMETER
<double> kappa
; // saturation field vector
117 PARAMETER
<double> delta
; // width effect on threshold voltage
118 public: // calculated parameters
122 double xd
; // coeffDepLayWidth
124 double delta3
; // narrow factor
126 /*--------------------------------------------------------------------------*/
127 /*--------------------------------------------------------------------------*/
128 /*--------------------------------------------------------------------------*/