/* $Id: d_mos4.h,v 20.15 2001/10/30 03:58:55 al Exp $ -*- C++ -*-
 * Copyright (C) 2001 Albert Davis
 * Author: Albert Davis <aldavis@ieee.org>
 *
 * This file is part of "GnuCap", the Gnu Circuit Analysis Package
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *------------------------------------------------------------------
 * MOS BSIM1 model.
 * derived from Spice3f4,Copyright 1990 Regents of the University of California
 * 1985 Hong J. Park, Thomas L. Quarles
 * Recoded for GnuCap model compiler, Al Davis, 2000
 */
/* This file is automatically generated. DO NOT EDIT */
#ifndef D_MOS4_H_INCLUDED
#define D_MOS4_H_INCLUDED

#include "u_sdp.h"
#include "d_mos_base.h"
/*--------------------------------------------------------------------------*/
class SDP_MOS4
  :public SDP_MOS_BASE{
public:
  explicit SDP_MOS4(const COMMON_COMPONENT*);
public:
  double phi;	// Strong inversion surface potential
  double vfb;	// Flat band voltage
  double k1;	// Bulk effect coefficient 1
  double k2;	// Bulk effect coefficient 2
  double eta;	// VDS dependence of threshold voltage
  double etaB;	// VBS dependence of eta (x2e)
  double etaD;	// VDS dependence of eta (x3e)
  double mobZero;	// Zero field mobility at VDS=0 VGS=VTH (muz)
  double mobZeroB;	// VBS dependence of muz (x2mz)
  double mobVdd;	// Mobility @ VDS=VDD VGS=VTH, chan len modulation
  double mobVddB;	// VBS dependence of mus (x2ms)
  double mobVddD;	// VDS dependence of mus (x3ms)
  double ugs;	// VGS dependence of mobility (u0)
  double ugsB;	// VBS dependence of u0 (x2u0)
  double uds;	// VDS dependence of mobility, velocity saturation
  double udsB;	// VBS dependence of u1 (x2u1)
  double udsD;	// VDS dependence of u1 (x3u1)
  double n0;	// Subthreshold slope (n0)
  double nB;	// VBS dependence of subthreshold slope (nb)
  double nD;	// VDS dependence of subthreshold slope (nd)
  double betaZero;	// Beta at vds = 0 and vgs = Vth
  double betaZeroB;	// Vbs dependence of BetaZero
  double betaVdd;	// Beta at vds=Vdd and vgs=Vth
  double betaVddB;	// Vbs dependence of BVdd
  double betaVddD;	// Vds dependence of BVdd
  double vt0;	// 
};
/*--------------------------------------------------------------------------*/
class TDP_MOS4
  :public TDP_MOS_BASE{
public:
  explicit TDP_MOS4(const DEV_MOS*);
public:
};
/*--------------------------------------------------------------------------*/
class MODEL_MOS4
  :public MODEL_MOS_BASE{
public:
  // using generated copy constructor, should be unreachable
  explicit MODEL_MOS4();
  ~MODEL_MOS4() {--_count;}
public: // override virtual
  bool      parse_front(CS&);
  void      parse_params(CS&);
  void      parse_finish();
  SDP_CARD* new_sdp(const COMMON_COMPONENT* c)const;
  void      print_front(OMSTREAM&)const;
  void      print_params(OMSTREAM&)const;
  void      print_calculated(OMSTREAM&)const;
  void      tr_eval(COMPONENT*)const;
public: // not virtual
  static int count() {return _count;}
private: // strictly internal
  enum {LEVEL=4};
  static int _count;
public: // input parameters
  SDP phi;	// Strong inversion surface potential
  SDP vfb;	// Flat band voltage
  SDP k1;	// Bulk effect coefficient 1
  SDP k2;	// Bulk effect coefficient 2
  SDP eta;	// VDS dependence of threshold voltage
  SDP etaB;	// VBS dependence of eta (x2e)
  SDP etaD;	// VDS dependence of eta (x3e)
  SDP mobZero;	// Zero field mobility at VDS=0 VGS=VTH (muz)
  SDP mobZeroB;	// VBS dependence of muz (x2mz)
  SDP mobVdd;	// Mobility @ VDS=VDD VGS=VTH, chan len modulation
  SDP mobVddB;	// VBS dependence of mus (x2ms)
  SDP mobVddD;	// VDS dependence of mus (x3ms)
  SDP ugs;	// VGS dependence of mobility (u0)
  SDP ugsB;	// VBS dependence of u0 (x2u0)
  SDP uds;	// VDS dependence of mobility, velocity saturation
  SDP udsB;	// VBS dependence of u1 (x2u1)
  SDP udsD;	// VDS dependence of u1 (x3u1)
  SDP n0;	// Subthreshold slope (n0)
  SDP nB;	// VBS dependence of subthreshold slope (nb)
  SDP nD;	// VDS dependence of subthreshold slope (nd)
  double dl;	// Channel length reduction
  double dw;	// Channel width reduction
  double tox;	// Gate oxide thickness
  double vdd;	// Supply voltage to specify mus
  double wdf;	// Default width of source drain diffusion (ignored)
  double dell;	// Length reduction of source drain diff (ignored)
  double temp;	// temperature (ignored)
  double xpart;	// Flag for channel charge partitioning
public: // calculated parameters
  double cox;	// 
};
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
#endif
