1 /* $Id: d_mos1.h,v 1.1 2009-12-14 10:15:01 felix Exp $ -*- C++ -*-
3 * Copyright (C) 2001 Albert Davis
4 * Author: Albert Davis <aldavis@gnu.org>
6 * This file is part of "Gnucap", the Gnu Circuit Analysis Package
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3, or (at your option)
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 *------------------------------------------------------------------
23 * mos model equations: spice level 1 equivalent
25 /* This file is automatically generated. DO NOT EDIT */
26 #ifndef D_MOS1_H_INCLUDED
27 #define D_MOS1_H_INCLUDED
34 /*--------------------------------------------------------------------------*/
36 class SDP_BUILT_IN_MOS1
37 :public SDP_BUILT_IN_MOS123
{
39 explicit SDP_BUILT_IN_MOS1(const COMMON_COMPONENT
* c
) : SDP_BUILT_IN_MOS123(c
) {init(c
);}
40 void init(const COMMON_COMPONENT
*);
43 /*--------------------------------------------------------------------------*/
44 class DEV_BUILT_IN_MOS
;
45 class TDP_BUILT_IN_MOS1
46 :public TDP_BUILT_IN_MOS123
{
48 explicit TDP_BUILT_IN_MOS1(const DEV_BUILT_IN_MOS
*);
57 /*--------------------------------------------------------------------------*/
58 class MODEL_BUILT_IN_MOS1
59 :public MODEL_BUILT_IN_MOS123
{
61 explicit MODEL_BUILT_IN_MOS1(const MODEL_BUILT_IN_MOS1
& p
);
63 explicit MODEL_BUILT_IN_MOS1(const BASE_SUBCKT
*);
64 ~MODEL_BUILT_IN_MOS1() {--_count
;}
65 public: // override virtual
66 std::string
dev_type()const;
67 void set_dev_type(const std::string
& nt
);
68 CARD
* clone()const {return new MODEL_BUILT_IN_MOS1(*this);}
71 SDP_CARD
* new_sdp(COMMON_COMPONENT
* c
)const;
72 void set_param_by_index(int, std::string
&, int);
73 bool param_is_printable(int)const;
74 std::string
param_name(int)const;
75 std::string
param_name(int,int)const;
76 std::string
param_value(int)const;
77 int param_count()const {return (8 + MODEL_BUILT_IN_MOS123::param_count());}
78 bool is_valid(const COMPONENT
*)const;
79 void tr_eval(COMPONENT
*)const;
80 public: // not virtual
81 static int count() {return _count
;}
82 private: // strictly internal
84 public: // input parameters
85 PARAMETER
<double> kp
; // transconductance parameter
86 public: // calculated parameters
90 double dgmdl_eff(const DEV_BUILT_IN_MOS
*) const;
91 double dgmdw_eff(const DEV_BUILT_IN_MOS
*) const;
93 /*--------------------------------------------------------------------------*/
94 /*--------------------------------------------------------------------------*/
95 /*--------------------------------------------------------------------------*/