%$Id: d.tex,v 25.95 2006/08/26 01:26:53 al Exp $ -*- LaTeX -*-
% man circuit d .
% 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., 51 Franklin Street, Fifth Floor, Boston, MA
% 02110-1301, USA.
%------------------------------------------------------------------------
\section{{\tt D}: Diode}
%------------------------------------------------------------------------
\subsection{Syntax}
\subsubsection{Device}
\begin{verse}
{\tt D}{\it xxxxxxx n+ n-- mname} \{{\it area}\} \{{\it args}\}\\
{\tt .diode} {\it xxxxxxx n+ n-- mname} \{{\it area}\}
	\{{\it args}\}
\end{verse}
\subsubsection{Model (required)}
\begin{verse}
{\tt .model} {\it mname} {\tt D} \{{\it args}\}
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

Junction diode.
%------------------------------------------------------------------------
\subsection{Comments}

{\it N+} and {\it n--} are the positive and negative element nodes,
respectively.  {\it Mname} is the model name.  {\it Area} is the area
factor.  If the area factor is omitted, a value of 1.0 is assumed.
{\it Args} is a list of additional arguments.  The parameters
available are a superset of those available in SPICE.

A diode can also use a MOSFET model (type {\tt NMOS} or {\tt PMOS}) to
represent the equivalent of the source-bulk or drain-bulk diodes.

When the element is printed out, by a {\tt list} or {\tt save}
command, the the computed values of {\tt IS}, {\tt RS}, {\tt CJ}, and
{\tt CJSW} are printed as a comment if they were not explicitly
entered.
%------------------------------------------------------------------------
\subsection{Element Parameters}

\begin{description}
  
\item[{\tt AREA} = {\it x}] Area factor.  (Default = 1.0) If optional
  parameters {\tt IS}, {\tt RS}, and {\tt CJO} are not specified, the
  {\tt .model} value is multiplied by {\tt area} to get the actual
  value.
  
\item[{\tt PERIM} = {\it x}] Perimeter factor.  (Default = 1.0) If
  optional parameter {\tt CJSW} is not specified, the {\tt .model}
  value is multiplied by {\tt perim} to get the actual value.
  
\item[{\tt IC} = {\it x}] Initial condition.  The initial voltage to
  use in transient analysis, if the {\tt UIC} option is specified.
  Default: don't use initial condition.  This is presently ignored,
  but accepted for compatibility.
  
\item[{\tt OFF}] Start iterating with this diode off, in DC analysis.
  
\item[{\tt IS} = {\it x}] Saturation current.  This overrides {\tt IS}
  in the {\tt .model}, and is not affected by {\tt area}.  Default:
  use {\tt IS} from {\tt .model} * {\tt area}.
  
\item[{\tt RS} = {\it x}] Ohmic (series) resistance.  This overrides
  {\tt RS} in the {\tt .model}, and is not affected by {\tt area}.
  Default: use {\tt RS} from {\tt .model} * {\tt area}.
  
\item[{\tt CJ} = {\it x}] Zero-bias junction capacitance.  This
  overrides {\tt CJ} in the {\tt .model}, and is not affected by {\tt
    area}.  Default: use {\tt CJ} from {\tt .model} * {\tt area}.
  
\item[{\tt CJSW} = {\it x}] Zero-bias sidewall capacitance.  This
  overrides {\tt CJSW} in the {\tt .model}, and is not affected by
  {\tt perim}.  Default: use {\tt CJSW} from {\tt .model} * {\tt
    perim}.
  
\item[{\tt GPARALLEL} = {\it x}] Parallel conductance.  This overrides
  {\tt GParallel} in the {\tt .model}, and is not affected by {\tt
    area}.  Default: use {\tt GParallel} from {\tt .model} * {\tt
    area}.

\end{description}
%------------------------------------------------------------------------
\subsection{Model Parameters}

\begin{description}
  
\item[{\tt IS} = {\it x}] Normalized saturation current. (Amperes).
  (Default = 1.0e-14) {\tt IS} is multiplied by the {\it area} in the
  element statement to get the actual saturation current.  It may be
  overridden by specifying {\tt IS} in the element statement.
  
\item[{\tt RS} = {\it x}] Normalized ohmic resistance. (Ohms) (Default
  = 0.)  {\tt RS} is multiplied by the {\it area} in the element
  statement to get the actual ohmic resistance.  It may be overridden
  by specifying {\tt RS} in the element statement.
  
\item[{\tt N} = {\it x}] Emission coefficient. (Default = 1.0) In
  ECA-2 the default value was 2.
  
\item[{\tt TT} = {\it x}] Transit time. (Default = 0.)  The diffusion
  capacitance is given by: $c_d = TT g_d$ where $g_d$ is the diode
  conductance.
  
\item[{\tt VJ} = {\it x}] Junction potential.  (Default = 1.0) Used in
  computation of capacitance.  For compatibility with older versions
  of SPICE, {\tt PB} is accepted as an alias for {\tt VJ}.

\item[{\tt CJO} = {\it x}] Normalized zero-bias depletion capacitance.
  (Default = 0.)  {\tt CJo} is multiplied by the {\it area} in the
  element statement to get the actual zero-bias capacitance.  It may
  be overridden by specifying {\tt CJ} in the element statement.
  
\item[{\tt MJ} = {\it x}] Grading coefficient.  (Default = 0.5)
  
\item[{\tt PBSW} = {\it x}] Sidewall junction potential.  (Default =
  PB)
  
\item[{\tt CJSW} = {\it x}] Normalized zero-bias sidewall capacitance.
  (Default = 0.)  {\tt CJSw} is multiplied by the {\it perimeter} in
  the element statement to get the actual zero-bias capacitance.  It
  may be overridden by specifying {\tt CJSW} in the element statement.
  
\item[{\tt MJSW} = {\it x}] Sidewall grading coefficient.  (Default =
  0.33)
  
\item[{\tt EG} = {\it x}] Activation energy. (electron Volts) (Default
  = 1.11, silicon.)  For other types of diodes, use:
\begin{verse}
1.11 ev.  Silicon (default value)\\
0.69 ev.  Schottky barrier\\
0.67 ev.  Germanium\\
1.43 ev.  GaAs\\
2.26 ev.  GaP
\end{verse}

\item[{\tt XTI} = {\it x}] Saturation current temperature exponent.
  (Default = 3.0) For Schottky barrier, use 2.0.
  
\item[{\tt KF} = {\it x}] Flicker noise coefficient.  (Default = 0.)
  SPICE parameter accepted but not implemented.
  
\item[{\tt AF} = {\it x}] Flicker noise exponent.  (Default = 1.0)
  SPICE parameter accepted but not implemented.
  
\item[{\tt FC} = {\it x}] Coefficient for forward bias depletion
  capacitance formula. (Default = 0.5)
  
\item[{\tt BV} = {\it x}] Reverse breakdown voltage.  (Default =
  $\infty$.)  SPICE parameter accepted but not implemented.
  
\item[{\tt IBV} = {\it x}] Current at breakdown voltage. (Default = 1
  ma.)  SPICE parameter accepted but not implemented.
  
\item[{\tt GPARALLEL} = {\it x}] Parallel conductance. (Default = 0.)

\end{description}
%------------------------------------------------------------------------
\subsection{Probes}

\begin{description}
  
\item[{\tt VD}] Voltage.  The first node (anode) is assumed positive.
  
\item[{\tt ID}] Total current.  It flows into the first node (anode),
  out of the second (cathode).  I(Dxxxx) is the same as IJ(Dxxxx) +
  IC(Dxxxx).
  
\item[{\tt VJ}] Junction voltage.  The voltage across the junction,
  excluding the series resistance.

\item[{\tt VSR}] Resistive voltage.  The voltage across the series
  resistance, excluding the junction voltage.

\item[{\tt IJ}] Junction current.  The current through the junction.
  IJ(Dxxxx) is the same as I(Yj.Dxxxx).
  
\item[{\tt IC}] Capacitor current.  The current through the parallel
  capacitor.  IC(Dxxxx) is the same as I(Cj.Dxxxx).
  
\item[{\tt P}] Power.  P(Dxxxx) is the same as PJ(Dxxxx) + PC(Dxxxx).
  
\item[{\tt PD}] Power dissipated.  The power dissipated as heat.  It
  is always positive and does not include power sourced.  It should be
  the same as P because the diode is passive.
  
\item[{\tt PS}] Power sourced.  The power sourced by the part.  It is
  always positive and does not consider its own dissipation.  It
  should be 0 because the diode is passive.
  
\item[{\tt PJ}] Junction power.  PJ(Dxxxx) is the same as P(Yj.Dxxxx).
  
\item[{\tt PC}] Capacitor power.  PC(Dxxxx) is the same as
  P(Cj.Dxxxx).
  
\item[{\tt CAPACITANCE}] Effective capacitance.  C(Dxxxx) is the same
  as Capacitance(Cj.Dxxxx).
  
\item[{\tt CHARGE}] Charge stored in the diode's capacitance.
  It is the same as charge(Cj.Dxxxx).

\item[{\tt REQ}] Effective resistance.  R(Dxxxx) is the same as
  R(Yj.Dxxxx).

\item[{\tt GEQ}] Effective conductance.  1/{\tt req}.
  
\item[{\tt Z}] Impedance at a port.  The port impedance seen looking
  into the circuit across the branch.  It does not include the part
  itself.  In transient analysis, it shows the effective Z-domain
  impedance, which is a meaningless number if there are capacitors or
  inductors in the circuit.  (DC only)
  
\item[{\tt ZRAW}] Impedance at a port, raw.  This is the same as ``Z''
  except that it includes the part itself. (DC only)
  
\item[{\tt REGION}] Region code.  A numeric code that represents the
  region it is operating in.  +1 = forward, -1 = reversed, 0 =
  unknown, -2 = assumed off.

\end{description}

All parameters of the internal elements Yj and Cj are available.  To
access them, concatenate the labels for the internal element with the
diode, separated by a dot.  Yj.D6 is the admittance (Yj) element of
the diode D6.

In this release, there are no probes available in AC analysis except
for the internal elements.

The general element probes do not apply to diodes, but do apply to the
internal elements.
%------------------------------------------------------------------------
%------------------------------------------------------------------------
