home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / progs / spice / guide.prt < prev    next >
Text File  |  1987-10-29  |  121KB  |  4,949 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                                                           1
  8.  
  9.  
  10.                             SPICE Version 2G User's Guide
  11.  
  12.                                     (10 Aug 1981)
  13.  
  14.                             A.Vladimirescu, Kaihe Zhang,
  15.                  A.R.Newton, D.O.Pederson, A.Sangiovanni-Vincentelli
  16.  
  17.              Department of Electrical Engineering and Computer Sciences
  18.                               University of California
  19.                                 Berkeley, Ca., 94720
  20.  
  21.  
  22.  
  23.           Acknowledgement: Dr. Richard Dowell and Dr. Sally Liu  have  con-
  24.  
  25.           tributed  to develop the present SPICE version.  SPICE was origi-
  26.  
  27.           nally developed by Dr.  Lawrence  Nagel  and  has  been  modified
  28.  
  29.           extensively by Dr. Ellis Cohen.
  30.  
  31.  
  32.  
  33.                SPICE is a general-purpose circuit  simulation  program  for
  34.  
  35.           nonlinear  dc, nonlinear transient, and linear ac analyses.  Cir-
  36.  
  37.           cuits may contain resistors, capacitors, inductors, mutual induc-
  38.  
  39.           tors,  independent  voltage  and  current  sources, four types of
  40.  
  41.           dependent sources, transmission lines, and the four  most  common
  42.  
  43.           semiconductor devices:  diodes, BJT's, JFET's, and MOSFET's.
  44.  
  45.  
  46.                SPICE has built-in models for the semiconductor devices, and
  47.  
  48.           the  user need specify only the pertinent model parameter values.
  49.  
  50.           The model for the BJT is based on the integral  charge  model  of
  51.  
  52.           Gummel and Poon;  however, if the Gummel- Poon parameters are not
  53.  
  54.           specified, the model reduces to the simpler Ebers-Moll model.  In
  55.  
  56.           either  case,  charge  storage  effects, ohmic resistances, and a
  57.  
  58.           current-dependent output conductance may be included.  The  diode
  59.  
  60.           model  can be used for either junction diodes or Schottky barrier
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                                                           2
  74.  
  75.  
  76.           diodes.  The JFET model is based on the FET model of Shichman and
  77.  
  78.           Hodges. Three MOSFET models are implemented; MOS1 is described by
  79.  
  80.           a square-law I-V characteristic MOS2 is an analytical model while
  81.  
  82.           MOS3  is  a  semi-empirical  model.   Both  MOS2 and MOS3 include
  83.  
  84.           second-order effects such as channel length modulation, subthres-
  85.  
  86.           hold  conduction,  scattering limited velocity saturation, small-
  87.  
  88.           size effects and charge-controlled capacitances.
  89.  
  90.  
  91.  
  92.  
  93.  
  94.           1.  TYPES OF ANALYSIS
  95.  
  96.  
  97.  
  98.           1.1.  DC Analysis
  99.  
  100.  
  101.  
  102.                The dc analysis portion of SPICE determines the dc operating
  103.  
  104.           point  of  the  circuit  with  inductors  shorted  and capacitors
  105.  
  106.           opened.  A dc analysis is  automatically  performed  prior  to  a
  107.  
  108.           transient analysis to determine the transient initial conditions,
  109.  
  110.           and prior to an ac small-signal analysis to determine the linear-
  111.  
  112.           ized,  small-signal  models for nonlinear devices.  If requested,
  113.  
  114.           the dc small-signal value of a transfer function (ratio of output
  115.  
  116.           variable  to  input  source), input resistance, and output resis-
  117.  
  118.           tance will also be computed as a part of the dc solution.  The dc
  119.  
  120.           analysis  can  also  be  used  to generate dc transfer curves:  a
  121.  
  122.           specified independent voltage or current source is stepped over a
  123.  
  124.           user-specified  range  and the dc output variables are stored for
  125.  
  126.           each sequential source value.   If  requested,  SPICE  also  will
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.                                                                           3
  140.  
  141.  
  142.           determine  the  dc small-signal sensitivities of specified output
  143.  
  144.           variables with respect to circuit parameters.   The  dc  analysis
  145.  
  146.           options  are  specified  on  the .DC, .TF, .OP, and .SENS control
  147.  
  148.           cards.
  149.  
  150.  
  151.                If one desires to see the small-signal models for  nonlinear
  152.  
  153.           devices in conjunction with a transient analysis operating point,
  154.  
  155.           then the .OP card must be provided.  The dc bias conditions  will
  156.  
  157.           be  identical for each case, but the more comprehensive operating
  158.  
  159.           point information is not available to be printed  when  transient
  160.  
  161.           initial conditions are computed.
  162.  
  163.  
  164.  
  165.           1.2.  AC Small-Signal Analysis
  166.  
  167.  
  168.  
  169.                The ac small-signal portion of SPICE computes the ac  output
  170.  
  171.           variables as a function of frequency.  The program first computes
  172.  
  173.           the dc operating point of the circuit and determines  linearized,
  174.  
  175.           small-signal  models for all of the nonlinear devices in the cir-
  176.  
  177.           cuit.  The resultant linear  circuit  is  then  analyzed  over  a
  178.  
  179.           user-specified range of frequencies.  The desired output of an ac
  180.  
  181.           small- signal analysis is usually a  transfer  function  (voltage
  182.  
  183.           gain,  transimpedance,  etc).   If  the  circuit  has only one ac
  184.  
  185.           input, it is convenient to set  that  input  to  unity  and  zero
  186.  
  187.           phase,  so  that  output  variables  have  the  same value as the
  188.  
  189.           transfer function of the output  variable  with  respect  to  the
  190.  
  191.           input.
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                                                                           4
  206.  
  207.  
  208.                The generation of white noise by resistors and semiconductor
  209.  
  210.           devices can also be simulated with the ac small-signal portion of
  211.  
  212.           SPICE.  Equivalent noise source values are  determined  automati-
  213.  
  214.           cally  from  the small-signal operating point of the circuit, and
  215.  
  216.           the contribution of each noise source is added at a given summing
  217.  
  218.           point.   The  total  output  noise level and the equivalent input
  219.  
  220.           noise level are determined at each frequency point.   The  output
  221.  
  222.           and  input noise levels are normalized with respect to the square
  223.  
  224.           root of the noise bandwidth and have the  units  Volts/rt  Hz  or
  225.  
  226.           Amps/rt  Hz.   The output noise and equivalent input noise can be
  227.  
  228.           printed or plotted in the same fashion as other output variables.
  229.  
  230.           No additional input data are necessary for this analysis.
  231.  
  232.  
  233.                Flicker noise sources can be simulated in the noise analysis
  234.  
  235.           by including values for the parameters KF and AF on the appropri-
  236.  
  237.           ate device model cards.
  238.  
  239.  
  240.                The distortion characteristics of a circuit  in  the  small-
  241.  
  242.           signal  mode  can  be  simulated as a part of the ac small-signal
  243.  
  244.           analysis.  The analysis is performed assuming  that  one  or  two
  245.  
  246.           signal frequencies are imposed at the input.
  247.  
  248.  
  249.                The frequency range and the noise  and  distortion  analysis
  250.  
  251.           parameters  are  specified on the .AC, .NOISE, and .DISTO control
  252.  
  253.           lines.
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                                                                           5
  272.  
  273.  
  274.           1.3.  Transient Analysis
  275.  
  276.  
  277.  
  278.                The transient analysis portion of SPICE computes  the  tran-
  279.  
  280.           sient  output  variables  as  a  function  of  time  over a user-
  281.  
  282.           specified time interval.  The initial  conditions  are  automati-
  283.  
  284.           cally  determined  by  a  dc analysis.  All sources which are not
  285.  
  286.           time dependent (for example, power supplies) are set to their  dc
  287.  
  288.           value.    For  large-signal  sinusoidal  simulations,  a  Fourier
  289.  
  290.           analysis of the output waveform can be specified  to  obtain  the
  291.  
  292.           frequency domain Fourier coefficients.  The transient time inter-
  293.  
  294.           val and the Fourier analysis options are specified on  the  .TRAN
  295.  
  296.           and .FOURIER control lines.
  297.  
  298.  
  299.  
  300.           1.4.  Analysis at Different Temperatures
  301.  
  302.  
  303.                All input data for SPICE is assumed to have been measured at
  304.  
  305.           27 deg C (300 deg K).  The simulation also assumes a nominal tem-
  306.  
  307.           perature of 27 deg C.  The circuit can be simulated at other tem-
  308.  
  309.           peratures by using a .TEMP control line.
  310.  
  311.  
  312.                Temperature appears explicitly in the exponential  terms  of
  313.  
  314.           the  BJT  and  diode  model  equations.   In addition, saturation
  315.  
  316.           currents have a built-in temperature dependence.  The temperature
  317.  
  318.           dependence  of the saturation current in the BJT models is deter-
  319.  
  320.           mined by:
  321.  
  322.  
  323.               IS(T1) = IS(T0)*((T1/T0)**XTI)*exp(q*EG*(T1-T0)/(k*T1*T0))
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.                                                                           6
  338.  
  339.  
  340.           where k is Boltzmann's constant, q is the electronic  charge,  EG
  341.  
  342.           is  the  energy  gap  which  is a model parameter, and XTI is the
  343.  
  344.           saturation current temperature exponent (also a model  parameter,
  345.  
  346.           and  usually  equal to 3).  The temperature dependence of forward
  347.  
  348.           and reverse beta is according to the formula:
  349.  
  350.  
  351.               beta(T1)=beta(T0)*(T1/T0)**XTB
  352.  
  353.  
  354.           where T1 and T0 are in degrees Kelvin, and XTB is a user-supplied
  355.  
  356.           model  parameter.  Temperature effects on beta are carried out by
  357.  
  358.           appropriate adjustment to the values of BF,  ISE,  BR,  and  ISC.
  359.  
  360.           Temperature  dependence of the saturation current in the junction
  361.  
  362.           diode model is determined by:
  363.  
  364.  
  365.               IS(T1) = IS(T0)*((T1/T0)**(XTI/N))*exp(q*EG*(T1-T0)/(k*N*T1*T0))
  366.  
  367.  
  368.           where N is the emission coefficient, which is a model  parameter,
  369.  
  370.           and  the other symbols have the same meaning as above.  Note that
  371.  
  372.           for Schottky barrier diodes, the value of the saturation  current
  373.  
  374.           temperature exponent, XTI, is usually 2.
  375.  
  376.  
  377.                Temperature appears explicitly  in  the  value  of  junction
  378.  
  379.           potential,  PHI,  for  all  the  device  models.  The temperature
  380.  
  381.           dependence is determined by:
  382.  
  383.  
  384.               PHI(TEMP) = k*TEMP/q*log(Na*Nd/Ni(TEMP)**2)
  385.  
  386.  
  387.           where k is Boltzmann's constant, q is the electronic  charge,  Na
  388.  
  389.           is  the  acceptor impurity density, Nd is the donor impurity den-
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                                                                           7
  404.  
  405.  
  406.           sity, Ni is the intrinsic concentration, and  EG  is  the  energy
  407.  
  408.           gap.
  409.  
  410.  
  411.                Temperature appears  explicitly  in  the  value  of  surface
  412.  
  413.           mobility,  UO,  for the MOSFET model.  The temperature dependence
  414.  
  415.           is determined by:
  416.  
  417.  
  418.               UO(TEMP) = UO(TNOM)/(TEMP/TNOM)**(1.5)
  419.  
  420.  
  421.           The effects of temperature on resistors is modeled  by  the  for-
  422.  
  423.           mula:
  424.  
  425.  
  426.               value(TEMP) = value(TNOM)*(1+TC1*(TEMP-TNOM)+TC2*(TEMP-TNOM)**2))
  427.  
  428.  
  429.           where TEMP is the circuit temperature, TNOM is the  nominal  tem-
  430.  
  431.           perature,  and  TC1  and TC2 are the first- and second-order tem-
  432.  
  433.           perature coefficients.
  434.  
  435.  
  436.  
  437.  
  438.  
  439.           2.  CONVERGENCE
  440.  
  441.  
  442.  
  443.                Both dc and transient solutions are obtained by an iterative
  444.  
  445.           process which is terminated when both of the following conditions
  446.  
  447.           hold:
  448.  
  449.  
  450.  
  451.           1)   The nonlinear branch currents converge to within a tolerance
  452.  
  453.                of  0.1  percent  or  1  picoamp (1.0E-12 Amp), whichever is
  454.  
  455.                larger.
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                                                                           8
  470.  
  471.  
  472.           2)   The node voltages converge to within a tolerance of 0.1 per-
  473.  
  474.                cent or 1 microvolt (1.0E-6 Volt), whichever is larger.
  475.  
  476.  
  477.                Although the algorithm used in SPICE has been  found  to  be
  478.  
  479.           very  reliable, in some cases it will fail to converge to a solu-
  480.  
  481.           tion.  When this failure occurs, the program will print the  node
  482.  
  483.           voltages  at  the  last iteration and terminate the job.  In such
  484.  
  485.           cases, the node voltages that are  printed  are  not  necessarily
  486.  
  487.           correct or even close to the correct solution.
  488.  
  489.  
  490.                Failure to converge in the dc analysis is usually due to  an
  491.  
  492.           error in specifying circuit connections, element values, or model
  493.  
  494.           parameter values.  Regenerative switching  circuits  or  circuits
  495.  
  496.           with  positive  feedback  probably  will  not  converge in the dc
  497.  
  498.           analysis unless the OFF option is used for some of the devices in
  499.  
  500.           the feedback path, or the .NODESET card is used to force the cir-
  501.  
  502.           cuit to converge to the desired state.
  503.  
  504.  
  505.  
  506.  
  507.  
  508.           3.  INPUT FORMAT
  509.  
  510.  
  511.  
  512.                The input format for SPICE  is  of  the  free  format  type.
  513.  
  514.           Fields on a card are separated by one or more blanks, a comma, an
  515.  
  516.           equal (=) sign, or a left or right parenthesis;  extra spaces are
  517.  
  518.           ignored.   A  card  may  be  continued  by entering a + (plus) in
  519.  
  520.           column 1 of the following card;  SPICE continues  reading  begin-
  521.  
  522.           ning with column 2.
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                                                                           9
  536.  
  537.  
  538.                A name field must begin with a letter (A through Z) and can-
  539.  
  540.           not  contain  any delimiters.  Only the first eight characters of
  541.  
  542.           the name are used.
  543.  
  544.  
  545.                A number field may be an integer field (12, -44), a floating
  546.  
  547.           point field (3.14159), either an integer or floating point number
  548.  
  549.           followed by an integer exponent (1E-14,  2.65E3),  or  either  an
  550.  
  551.           integer or a floating point number followed by one of the follow-
  552.  
  553.           ing scale factors:
  554.  
  555.  
  556.  
  557.                   T=1E12   G=1E9    MEG=1E6   K=1E3     MIL=25.4E-6
  558.                   M=1E-3   U=1E-6   N=1E-9    P=1E-12   F=1E-15
  559.  
  560.  
  561.           Letters immediately following a number that are not scale factors
  562.  
  563.           are ignored, and letters immediately following a scale factor are
  564.  
  565.           ignored.  Hence, 10, 10V, 10VOLTS, and  10HZ  all  represent  the
  566.  
  567.           same  number,  and  M, MA, MSEC, and MMHOS all represent the same
  568.  
  569.           scale factor.  Note that 1000, 1000.0, 1000HZ, 1E3, 1.0E3,  1KHZ,
  570.  
  571.           and 1K all represent the same number.
  572.  
  573.  
  574.  
  575.  
  576.  
  577.           4.  CIRCUIT DESCRIPTION
  578.  
  579.  
  580.  
  581.                The circuit to be analyzed is described to SPICE by a set of
  582.  
  583.           element  cards,  which  define  the  circuit topology and element
  584.  
  585.           values, and a set of control cards, which define the model param-
  586.  
  587.           eters  and  the  run  controls.  The first card in the input deck
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.                                                                          10
  602.  
  603.  
  604.           must be a title card, and the last card must be a .END card.  The
  605.  
  606.           order  of  the  remaining  cards is arbitrary (except, of course,
  607.  
  608.           that continuation cards must immediately follow  the  card  being
  609.  
  610.           continued).
  611.  
  612.  
  613.                Each element in the circuit is specified by an element  card
  614.  
  615.           that  contains  the  element name, the circuit nodes to which the
  616.  
  617.           element is connected, and  the  values  of  the  parameters  that
  618.  
  619.           determine  the  electrical  characteristics  of the element.  The
  620.  
  621.           first letter of the element name specifies the element type.  The
  622.  
  623.           format for the SPICE element types is given in what follows.  The
  624.  
  625.           strings  XXXXXXX,   YYYYYYY,   and   ZZZZZZZ   denote   arbitrary
  626.  
  627.           alphanumeric  strings.   For  example, a resistor name must begin
  628.  
  629.           with the letter R and can contain from one to  eight  characters.
  630.  
  631.           Hence, R, R1, RSE, ROUT, and R3AC2ZY are valid resistor names.
  632.  
  633.  
  634.                Data fields that are enclosed in lt and gt signs '<  >'  are
  635.  
  636.           optional.   All  indicated punctuation (parentheses, equal signs,
  637.  
  638.           etc.)  are  required.   With  respect  to  branch  voltages   and
  639.  
  640.           currents,  SPICE  uniformly uses the associated reference conven-
  641.  
  642.           tion (current flows in the direction of voltage drop).
  643.  
  644.  
  645.                Nodes must be nonnegative integers but need not be  numbered
  646.  
  647.           sequentially.   The  datum  (ground)  node must be numbered zero.
  648.  
  649.           The circuit cannot contain  a  loop  of  voltage  sources  and/or
  650.  
  651.           inductors  and  cannot contain a cutset of current sources and/or
  652.  
  653.           capacitors.  Each node in the circuit must  have  a  dc  path  to
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.                                                                          11
  668.  
  669.  
  670.           ground.  Every node must have at least two connections except for
  671.  
  672.           transmission line  nodes  (to  permit  unterminated  transmission
  673.  
  674.           lines)  and  MOSFET substrate nodes (which have two internal con-
  675.  
  676.           nections anyway).
  677.  
  678.  
  679.  
  680.  
  681.  
  682.           5.  TITLE CARD, COMMENT CARDS AND .END CARD
  683.  
  684.  
  685.  
  686.           5.1.  Title Card
  687.  
  688.  
  689.           Examples:
  690.  
  691.  
  692.               POWER AMPLIFIER CIRCUIT
  693.               TEST OF CAM CELL
  694.  
  695.  
  696.  
  697.                This card must be the first card in  the  input  deck.   Its
  698.  
  699.           contents  are printed verbatim as the heading for each section of
  700.  
  701.           output.
  702.  
  703.  
  704.  
  705.           5.2.  .END Card
  706.  
  707.           Examples:
  708.  
  709.  
  710.                .END
  711.  
  712.  
  713.  
  714.                This card must always be the last card in  the  input  deck.
  715.  
  716.           Note that the period is an integral part of the name.
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.                                                                          12
  734.  
  735.  
  736.           5.3.  Comment Card
  737.  
  738.  
  739.           General Form:
  740.  
  741.  
  742.               * <any comment>
  743.  
  744.  
  745.           Examples:
  746.  
  747.  
  748.               * RF=1K      GAIN SHOULD BE 100
  749.               * MAY THE FORCE BE WITH MY CIRCUIT
  750.  
  751.  
  752.  
  753.                The asterisk in the first column indicates that this card is
  754.  
  755.           a comment card.  Comment cards may be placed anywhere in the cir-
  756.  
  757.           cuit description.
  758.  
  759.  
  760.  
  761.  
  762.  
  763.           6.  ELEMENT CARDS
  764.  
  765.  
  766.  
  767.           6.1.  Resistors
  768.  
  769.           General form:
  770.  
  771.  
  772.               RXXXXXXX N1 N2 VALUE <TC=TC1<,TC2>>
  773.  
  774.  
  775.           Examples:
  776.  
  777.  
  778.               R1 1 2 100
  779.               RC1 12 17 1K TC=0.001,0.015
  780.  
  781.  
  782.  
  783.                N1 and N2 are the two element nodes.  VALUE  is  the  resis-
  784.  
  785.           tance  (in  ohms)  and  may be positive or negative but not zero.
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.                                                                          13
  800.  
  801.  
  802.           TC1 and TC2 are the (optional) temperature coefficients;  if  not
  803.  
  804.           specified,  zero  is assumed for both.  The value of the resistor
  805.  
  806.           as a function of temperature is given by:
  807.  
  808.  
  809.               value(TEMP) = value(TNOM)*(1+TC1*(TEMP-TNOM)+TC2*(TEMP-TNOM)**2))
  810.  
  811.  
  812.  
  813.  
  814.           6.2.  Capacitors and Inductors
  815.  
  816.  
  817.           General form:
  818.  
  819.  
  820.               CXXXXXXX N+ N- VALUE <IC=INCOND>
  821.               LYYYYYYY N+ N- VALUE <IC=INCOND>
  822.  
  823.  
  824.           Examples:
  825.  
  826.  
  827.               CBYP 13 0 1UF
  828.               COSC 17 23 10U IC=3V
  829.               LLINK 42 69 1UH
  830.               LSHUNT 23 51 10U IC=15.7MA
  831.  
  832.  
  833.  
  834.                N+ and N- are  the  positive  and  negative  element  nodes,
  835.  
  836.           respectively.   VALUE  is the capacitance in Farads or the induc-
  837.  
  838.           tance in Henries.
  839.  
  840.  
  841.                For the capacitor, the (optional) initial condition  is  the
  842.  
  843.           initial  (time-zero)  value of capacitor voltage (in Volts).  For
  844.  
  845.           the inductor, the (optional) initial  condition  is  the  initial
  846.  
  847.           (time-zero)  value  of inductor current (in Amps) that flows from
  848.  
  849.           N+, through the inductor, to N-.  Note that  the  initial  condi-
  850.  
  851.           tions (if any) apply 'only' if the UIC option is specified on the
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                                                                          14
  866.  
  867.  
  868.           .TRAN card.
  869.  
  870.  
  871.                Nonlinear capacitors and inductors can be described.
  872.  
  873.  
  874.           General form :
  875.  
  876.  
  877.               CXXXXXXX N+ N- POLY C0 C1 C2 ... <IC=INCOND>
  878.               LYYYYYYY N+ N- POLY L0 L1 L2 ... <IC=INCOND>
  879.  
  880.  
  881.  
  882.                C0 C1 C2 ...(and L0 L1 L2 ...) are  the  coefficients  of  a
  883.  
  884.           polynomial  describing  the  element  value.  The  capacitance is
  885.  
  886.           expressed as a function of the voltage across the  element  while
  887.  
  888.           the inductance is a function of the current through the inductor.
  889.  
  890.           The value is computed as
  891.  
  892.  
  893.               value=C0+C1*V+C2*V**2+...
  894.               value=L0+L1*I+L2*I**2+...
  895.  
  896.  
  897.  
  898.                where V is the  voltage  across  the  capacitor  and  I  the
  899.  
  900.           current flowing in the inductor.
  901.  
  902.  
  903.  
  904.           6.3.  Coupled (Mutual) Inductors
  905.  
  906.  
  907.           General form:
  908.  
  909.  
  910.               KXXXXXXX LYYYYYYY LZZZZZZZ VALUE
  911.  
  912.  
  913.           Examples:
  914.  
  915.  
  916.               K43 LAA LBB 0.999
  917.               KXFRMR L1 L2 0.87
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.                                                                          15
  932.  
  933.  
  934.                LYYYYYYY and LZZZZZZZ are  the  names  of  the  two  coupled
  935.  
  936.           inductors,  and  VALUE  is  the coefficient of coupling, K, which
  937.  
  938.           must be greater than 0 and less than or equal to  1.   Using  the
  939.  
  940.           'dot'  convention, place a 'dot' on the first node of each induc-
  941.  
  942.           tor.
  943.  
  944.  
  945.  
  946.           6.4.  Transmission Lines (Lossless)
  947.  
  948.  
  949.           General form:
  950.  
  951.  
  952.               TXXXXXXX N1 N2 N3 N4 Z0=VALUE <TD=VALUE> <F=FREQ <NL=NRMLEN>>
  953.               +                    <IC=V1,I1,V2,I2>
  954.  
  955.  
  956.           Examples:
  957.  
  958.  
  959.               T1 1 0 2 0 Z0=50 TD=10NS
  960.  
  961.  
  962.  
  963.                N1 and N2 are the nodes at port 1;  N3 and N4 are the  nodes
  964.  
  965.           at  port  2.   Z0 is the characteristic impedance.  The length of
  966.  
  967.           the line may be expressed in either of two forms.  The  transmis-
  968.  
  969.           sion  delay, TD, may be specified directly (as TD=10ns, for exam-
  970.  
  971.           ple).  Alternatively, a frequency F may be given,  together  with
  972.  
  973.           NL,  the  normalized  electrical  length of the transmission line
  974.  
  975.           with respect to the wavelength in the line at  the  frequency  F.
  976.  
  977.           If  a  frequency  is specified but NL is omitted, 0.25 is assumed
  978.  
  979.           (that is, the frequency is assumed to be  the  quarter-wave  fre-
  980.  
  981.           quency).   Note  that although both forms for expressing the line
  982.  
  983.           length are indicated as optional, one of the two must  be  speci-
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.                                                                          16
  998.  
  999.  
  1000.           fied.
  1001.  
  1002.  
  1003.                Note that this element models only one propagating mode.  If
  1004.  
  1005.           all four nodes are distinct in the actual circuit, then two modes
  1006.  
  1007.           may be excited.  To simulate such a situation, two  transmission-
  1008.  
  1009.           line  elements  are required.  (see the example in Appendix A for
  1010.  
  1011.           further clarification.)
  1012.  
  1013.  
  1014.                The (optional) initial condition specification  consists  of
  1015.  
  1016.           the  voltage  and current at each of the transmission line ports.
  1017.  
  1018.           Note that the initial conditions (if any) apply 'only' if the UIC
  1019.  
  1020.           option is specified on the .TRAN card.
  1021.  
  1022.  
  1023.                One should be aware that SPICE will use  a  transient  time-
  1024.  
  1025.           step  which  does  not  exceed  1/2 the minimum transmission line
  1026.  
  1027.           delay.  Therefore very short transmission  lines  (compared  with
  1028.  
  1029.           the analysis time frame) will cause long run times.
  1030.  
  1031.  
  1032.  
  1033.           6.5.  Linear Dependent Sources
  1034.  
  1035.  
  1036.  
  1037.                SPICE allows circuits to contain  linear  dependent  sources
  1038.  
  1039.           characterized by any of the four equations
  1040.  
  1041.  
  1042.                   i=g*v          v=e*v          i=f*i          v=h*i
  1043.  
  1044.  
  1045.           where g, e, f, and h are constants representing transconductance,
  1046.  
  1047.           voltage  gain,  current  gain, and transresistance, respectively.
  1048.  
  1049.           Note:  a more complete description of dependent sources as imple-
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.                                                                          17
  1064.  
  1065.  
  1066.           mented in SPICE is given in Appendix B.
  1067.  
  1068.  
  1069.  
  1070.           6.6.  Linear Voltage-Controlled Current Sources
  1071.  
  1072.  
  1073.           General form:
  1074.  
  1075.  
  1076.               GXXXXXXX N+ N- NC+ NC- VALUE
  1077.  
  1078.  
  1079.           Examples:
  1080.  
  1081.  
  1082.               G1 2 0 5 0 0.1MMHO
  1083.  
  1084.  
  1085.  
  1086.                N+ and N- are the positive and negative nodes, respectively.
  1087.  
  1088.           Current  flow  is  from the positive node, through the source, to
  1089.  
  1090.           the negative node.  NC+ and NC- are  the  positive  and  negative
  1091.  
  1092.           controlling  nodes,  respectively.  VALUE is the transconductance
  1093.  
  1094.           (in mhos).
  1095.  
  1096.  
  1097.  
  1098.           6.7.  Linear Voltage-Controlled Voltage Sources
  1099.  
  1100.           General form:
  1101.  
  1102.  
  1103.               EXXXXXXX N+ N- NC+ NC- VALUE
  1104.  
  1105.  
  1106.           Examples:
  1107.  
  1108.  
  1109.               E1 2 3 14 1 2.0
  1110.  
  1111.  
  1112.  
  1113.                N+ is the positive node, and N- is the negative  node.   NC+
  1114.  
  1115.           and  NC- are the positive and negative controlling nodes, respec-
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.                                                                          18
  1130.  
  1131.  
  1132.           tively.  VALUE is the voltage gain.
  1133.  
  1134.  
  1135.  
  1136.           6.8.  Linear Current-Controlled Current Sources
  1137.  
  1138.  
  1139.           General form:
  1140.  
  1141.  
  1142.               FXXXXXXX N+ N- VNAM VALUE
  1143.  
  1144.  
  1145.           Examples:
  1146.  
  1147.  
  1148.               F1 13 5 VSENS 5
  1149.  
  1150.  
  1151.  
  1152.                N+ and N- are the positive and negative nodes, respectively.
  1153.  
  1154.           Current  flow  is  from the positive node, through the source, to
  1155.  
  1156.           the negative node.  VNAM is the name of a voltage source  through
  1157.  
  1158.           which  the  controlling current flows.  The direction of positive
  1159.  
  1160.           controlling current flow is from the positive node,  through  the
  1161.  
  1162.           source, to the negative node of VNAM.  VALUE is the current gain.
  1163.  
  1164.  
  1165.  
  1166.           6.9.  Linear Current-Controlled Voltage Sources
  1167.  
  1168.           General form:
  1169.  
  1170.  
  1171.               HXXXXXXX N+ N- VNAM VALUE
  1172.  
  1173.  
  1174.           Examples:
  1175.  
  1176.  
  1177.               HX 5 17 VZ 0.5K
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.                                                                          19
  1196.  
  1197.  
  1198.                N+ and N- are the positive and negative nodes, respectively.
  1199.  
  1200.           VNAM  is  the name of a voltage source through which the control-
  1201.  
  1202.           ling  current  flows.   The  direction  of  positive  controlling
  1203.  
  1204.           current  flow  is  from the positive node, through the source, to
  1205.  
  1206.           the negative node of VNAM.   VALUE  is  the  transresistance  (in
  1207.  
  1208.           ohms).
  1209.  
  1210.  
  1211.  
  1212.           6.10.  Independent Sources
  1213.  
  1214.  
  1215.           General form:
  1216.  
  1217.  
  1218.               VXXXXXXX N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
  1219.               IYYYYYYY N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
  1220.  
  1221.  
  1222.           Examples:
  1223.  
  1224.  
  1225.               VCC 10 0 DC 6
  1226.               VIN 13 2 0.001 AC 1 SIN(0 1 1MEG)
  1227.               ISRC 23 21 AC 0.333 45.0 SFFM(0 1 10K 5 1K)
  1228.               VMEAS 12 9
  1229.  
  1230.  
  1231.  
  1232.                N+ and N- are the positive and negative nodes, respectively.
  1233.  
  1234.           Note that voltage sources need not be grounded.  Positive current
  1235.  
  1236.           is assumed to flow from the positive node, through the source, to
  1237.  
  1238.           the  negative  node.   A  current  source of positive value, will
  1239.  
  1240.           force current to flow out of the N+ node, through the source, and
  1241.  
  1242.           into the N- node.  Voltage sources, in addition to being used for
  1243.  
  1244.           circuit excitation, are the 'ammeters' for SPICE, that  is,  zero
  1245.  
  1246.           valued  voltage  sources may be inserted into the circuit for the
  1247.  
  1248.           purpose of measuring current.  They  will,  of  course,  have  no
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.                                                                          20
  1262.  
  1263.  
  1264.           effect on circuit operation since they represent short-circuits.
  1265.  
  1266.  
  1267.  
  1268.                DC/TRAN is the  dc  and  transient  analysis  value  of  the
  1269.  
  1270.           source.   If  the  source value is zero both for dc and transient
  1271.  
  1272.           analyses, this value may be omitted.   If  the  source  value  is
  1273.  
  1274.           time-invariant (e.g., a power supply), then the value may option-
  1275.  
  1276.           ally be preceded by the letters DC.
  1277.  
  1278.  
  1279.  
  1280.                ACMAG is the ac magnitude and ACPHASE is the ac phase.   The
  1281.  
  1282.           source  is  set  to  this  value in the ac analysis.  If ACMAG is
  1283.  
  1284.           omitted following the keyword AC, a value of  unity  is  assumed.
  1285.  
  1286.           If ACPHASE is omitted, a value of zero is assumed.  If the source
  1287.  
  1288.           is not an ac small-signal input, the keyword AC and the ac values
  1289.  
  1290.           are omitted.
  1291.  
  1292.  
  1293.  
  1294.                Any independent source  can  be  assigned  a  time-dependent
  1295.  
  1296.           value  for  transient  analysis.  If a source is assigned a time-
  1297.  
  1298.           dependent value, the time-zero value is  used  for  dc  analysis.
  1299.  
  1300.           There are five independent source functions:  pulse, exponential,
  1301.  
  1302.           sinusoidal,  piece-wise  linear,  and  single-frequency  FM.   If
  1303.  
  1304.           parameters  other  than source values are omitted or set to zero,
  1305.  
  1306.           the default values shown will be assumed.  (TSTEP is the printing
  1307.  
  1308.           increment  and  TSTOP  is  the final time (see the .TRAN card for
  1309.  
  1310.           explanation)).
  1311.  
  1312.  
  1313.           1.  Pulse         PULSE(V1 V2 TD TR TF PW PER)
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.                                                                          21
  1328.  
  1329.  
  1330.           Examples:
  1331.  
  1332.  
  1333.               VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS)
  1334.  
  1335.  
  1336.  
  1337.                parameters              default values         units
  1338.  
  1339.                V1 (initial value)                       Volts or Amps
  1340.                V2 (pulsed value)                        Volts or Amps
  1341.                TD (delay time)         0.0              seconds
  1342.                TR (rise time)          TSTEP            seconds
  1343.                TF (fall time)          TSTEP            seconds
  1344.                PW (pulse width)        TSTOP            seconds
  1345.                PER(period)             TSTOP            seconds
  1346.  
  1347.  
  1348.  
  1349.                A single pulse so specified is described  by  the  following
  1350.  
  1351.           table:
  1352.  
  1353.  
  1354.  
  1355.                                  time          value
  1356.  
  1357.                                  0             V1
  1358.                                  TD            V1
  1359.                                  TD+TR         V2
  1360.                                  TD+TR+PW      V2
  1361.                                  TD+TR+PW+TF   V1
  1362.                                  TSTOP         V1
  1363.  
  1364.  
  1365.           Intermediate points are determined by linear interpolation.
  1366.  
  1367.  
  1368.           2.  Sinusoidal    SIN(VO VA FREQ TD THETA)
  1369.  
  1370.           Examples:
  1371.  
  1372.  
  1373.               VIN 3 0 SIN(0 1 100MEG 1NS 1E10)
  1374.  
  1375.  
  1376.  
  1377.  
  1378.                parameters                default value   units
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.                                                                          22
  1394.  
  1395.  
  1396.                VO     (offset)                           Volts or Amps
  1397.                VA     (amplitude)                        Volts or Amps
  1398.                FREQ   (frequency)        1/TSTOP         Hz
  1399.                TD     (delay)            0.0             seconds
  1400.                THETA  (damping factor)   0.0             1/seconds
  1401.  
  1402.  
  1403.  
  1404.                The shape of the waveform  is  described  by  the  following
  1405.  
  1406.           table:
  1407.  
  1408.  
  1409.  
  1410.           time          value
  1411.  
  1412.           0 to TD       VO
  1413.           TD to TSTOP   VO + VA*exp(-(time-TD)*THETA)*sine(twopi*FREQ*(time+TD))
  1414.  
  1415.  
  1416.  
  1417.           3.  Exponential  EXP(V1 V2 TD1 TAU1 TD2 TAU2)
  1418.  
  1419.  
  1420.           Examples:
  1421.  
  1422.  
  1423.               VIN 3 0 EXP(-4 -1 2NS 30NS 60NS 40NS)
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.                                                                          23
  1460.  
  1461.  
  1462.              parameters                  default values   units
  1463.  
  1464.              V1   (initial value)                         Volts or Amps
  1465.              V2   (pulsed value)                          Volts or Amps
  1466.              TD1  (rise delay time)      0.0              seconds
  1467.              TAU1 (rise time constant)   TSTEP            seconds
  1468.              TD2  (fall delay time)      TD1+TSTEP        seconds
  1469.              TAU2 (fall time constant)   TSTEP            seconds
  1470.  
  1471.  
  1472.  
  1473.                The shape of the waveform  is  described  by  the  following
  1474.  
  1475.           table:
  1476.  
  1477.  
  1478.                  time           value
  1479.  
  1480.                  0 to TD1       V1
  1481.                  TD1 to TD2     V1+(V2-V1)*(1-exp(-(time-TD1)/TAU1))
  1482.                  TD2 to TSTOP   V1+(V2-V1)*(1-exp(-(time-TD1)/TAU1))
  1483.                                 +(V1-V2)*(1-exp(-(time-TD2)/TAU2))
  1484.  
  1485.  
  1486.  
  1487.           4.  Piece-Wise Linear  PWL(T1 V1 <T2 V2 T3 V3 T4 V4 ...>)
  1488.  
  1489.           Examples:
  1490.  
  1491.  
  1492.               VCLOCK 7 5 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7)
  1493.  
  1494.  
  1495.  
  1496.           Parameters and default values
  1497.  
  1498.  
  1499.  
  1500.               Each pair of values (Ti, Vi) specifies that the value of the source is Vi
  1501.               (in Volts or Amps) at time=Ti.  The value of the source at intermediate values
  1502.               of time is determined by using linear interpolation on the input values.
  1503.  
  1504.  
  1505.  
  1506.           5.  Single-Frequency FM   SFFM(VO VA FC MDI FS)
  1507.  
  1508.  
  1509.           Examples:
  1510.  
  1511.  
  1512.               V1 12 0 SFFM(0 1M 20K 5 1K)
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.                                                                          24
  1526.  
  1527.  
  1528.               parameters                default values   units
  1529.  
  1530.               VO  (offset)                               Volts or Amps
  1531.               VA  (amplitude)                            Volts or Amps
  1532.               FC  (carrier frequency)   1/TSTOP          Hz
  1533.               MDI (modulation index)
  1534.               FS  (signal frequency)    1/TSTOP          Hz
  1535.  
  1536.  
  1537.  
  1538.                The shape of the waveform  is  described  by  the  following
  1539.  
  1540.           equation:
  1541.  
  1542.  
  1543.  
  1544.               value = VO + VA*sine((twopi*FC*time) + MDI*sine(twopi*FS*time))
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.           7.  SEMICONDUCTOR DEVICES
  1552.  
  1553.  
  1554.  
  1555.                The elements that have been described to  this  point  typi-
  1556.  
  1557.           cally  require  only a few parameter values to specify completely
  1558.  
  1559.           the electrical characteristics  of  the  element.   However,  the
  1560.  
  1561.           models  for  the  four semiconductor devices that are included in
  1562.  
  1563.           the SPICE program require many parameter values.  Moreover,  many
  1564.  
  1565.           devices  in a circuit often are defined by the same set of device
  1566.  
  1567.           model parameters.  For these  reasons,  a  set  of  device  model
  1568.  
  1569.           parameters  is  defined  on a separate .MODEL card and assigned a
  1570.  
  1571.           unique model name.  The device element cards in SPICE then refer-
  1572.  
  1573.           ence  the model name.  This scheme alleviates the need to specify
  1574.  
  1575.           all of the model parameters on each device element card.
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.                                                                          25
  1592.  
  1593.  
  1594.                Each device element card contains the device name, the nodes
  1595.  
  1596.           to  which the device is connected, and the device model name.  In
  1597.  
  1598.           addition, other optional parameters may  be  specified  for  each
  1599.  
  1600.           device:  geometric factors and an initial condition.
  1601.  
  1602.  
  1603.                The area factor used on the diode, BJT and JFET device  card
  1604.  
  1605.           determines  the number of equivalent parallel devices of a speci-
  1606.  
  1607.           fied model.  The affected parameters are marked with an  asterisk
  1608.  
  1609.           under  the  heading  'area'  in  the  model  descriptions  below.
  1610.  
  1611.           Several geometric factors associated with  the  channel  and  the
  1612.  
  1613.           drain and source diffusions can be specified on the MOSFET device
  1614.  
  1615.           card.
  1616.  
  1617.  
  1618.                Two different forms of initial conditions may  be  specified
  1619.  
  1620.           for  devices.   The first form is included to improve the dc con-
  1621.  
  1622.           vergence for circuits that contain more than  one  stable  state.
  1623.  
  1624.           If  a  device  is specified OFF, the dc operating point is deter-
  1625.  
  1626.           mined with the terminal voltages for that  device  set  to  zero.
  1627.  
  1628.           After  convergence  is obtained, the program continues to iterate
  1629.  
  1630.           to obtain the exact value for the terminal voltages.  If  a  cir-
  1631.  
  1632.           cuit  has  more  than  one dc stable state, the OFF option can be
  1633.  
  1634.           used to force the solution to correspond to a desired state.   If
  1635.  
  1636.           a  device is specified OFF when in reality the device is conduct-
  1637.  
  1638.           ing, the program will still obtain the correct solution (assuming
  1639.  
  1640.           the  solutions  converge)  but  more  iterations will be required
  1641.  
  1642.           since the program must independently  converge  to  two  separate
  1643.  
  1644.           solutions.  The .NODESET card serves a similar purpose as the OFF
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.                                                                          26
  1658.  
  1659.  
  1660.           option.  The .NODESET option is easier to apply and is  the  pre-
  1661.  
  1662.           ferred means to aid convergence.
  1663.  
  1664.  
  1665.                The second form of initial conditions are specified for  use
  1666.  
  1667.           with the transient analysis.  These are true 'initial conditions'
  1668.  
  1669.           as opposed to the convergence aids above.  See the description of
  1670.  
  1671.           the  .IC  card  and  the .TRAN card for a detailed explanation of
  1672.  
  1673.           initial conditions.
  1674.  
  1675.  
  1676.  
  1677.           7.1.  Junction Diodes
  1678.  
  1679.  
  1680.           General form:
  1681.  
  1682.  
  1683.               DXXXXXXX N+ N- MNAME <AREA> <OFF> <IC=VD>
  1684.  
  1685.  
  1686.           Examples:
  1687.  
  1688.  
  1689.               DBRIDGE 2 10 DIODE1
  1690.               DCLMP 3 7 DMOD 3.0 IC=0.2
  1691.  
  1692.  
  1693.  
  1694.                N+ and N- are the positive and negative nodes, respectively.
  1695.  
  1696.           MNAME  is  the model name, AREA is the area factor, and off indi-
  1697.  
  1698.           cates an (optional) starting  condition  on  the  device  for  dc
  1699.  
  1700.           analysis.   If  the  area  factor  is  omitted, a value of 1.0 is
  1701.  
  1702.           assumed.  The (optional) initial  condition  specification  using
  1703.  
  1704.           IC=VD  is intended for use with the UIC option on the .TRAN card,
  1705.  
  1706.           when a transient analysis is desired starting from other than the
  1707.  
  1708.           quiescent operating point.
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.                                                                          27
  1724.  
  1725.  
  1726.           7.2.  Bipolar Junction Transistors (BJT's)
  1727.  
  1728.  
  1729.           General form:
  1730.  
  1731.  
  1732.               QXXXXXXX NC NB NE <NS> MNAME <AREA> <OFF> <IC=VBE,VCE>
  1733.  
  1734.  
  1735.           Examples:
  1736.  
  1737.  
  1738.               Q23 10 24 13 QMOD IC=0.6,5.0
  1739.               Q50A 11 26 4 20 MOD1
  1740.  
  1741.  
  1742.  
  1743.                NC, NB, and NE are the collector, base, and  emitter  nodes,
  1744.  
  1745.           respectively.   NS is the (optional) substrate node.  If unspeci-
  1746.  
  1747.           fied, ground is used.  MNAME is the model name, AREA is the  area
  1748.  
  1749.           factor,  and OFF indicates an (optional) initial condition on the
  1750.  
  1751.           device for the dc analysis.  If the area  factor  is  omitted,  a
  1752.  
  1753.           value  of  1.0  is  assumed.   The  (optional)  initial condition
  1754.  
  1755.           specification using IC=VBE,VCE is intended for use with  the  UIC
  1756.  
  1757.           option  on  the  .TRAN card, when a transient analysis is desired
  1758.  
  1759.           starting from other than the quiescent operating point.  See  the
  1760.  
  1761.           .IC  card  description  for a better way to set transient initial
  1762.  
  1763.           conditions.
  1764.  
  1765.  
  1766.  
  1767.           7.3.  Junction Field-Effect Transistors (JFET's)
  1768.  
  1769.           General form:
  1770.  
  1771.  
  1772.               JXXXXXXX ND NG NS MNAME <AREA> <OFF> <IC=VDS,VGS>
  1773.  
  1774.  
  1775.           Examples:
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.                                                                          28
  1790.  
  1791.  
  1792.               J1 7 2 3 JM1 OFF
  1793.  
  1794.  
  1795.  
  1796.                ND, NG, and NS  are  the  drain,  gate,  and  source  nodes,
  1797.  
  1798.           respectively.   MNAME is the model name, AREA is the area factor,
  1799.  
  1800.           and OFF indicates an (optional) initial condition on  the  device
  1801.  
  1802.           for  dc  analysis.  If the area factor is omitted, a value of 1.0
  1803.  
  1804.           is assumed.   The  (optional)  initial  condition  specification,
  1805.  
  1806.           using  IC=VDS,VGS  is intended for use with the UIC option on the
  1807.  
  1808.           .TRAN card, when a transient analysis is  desired  starting  from
  1809.  
  1810.           other  than the quiescent operating point (see the .IC card for a
  1811.  
  1812.           better way to set initial conditions).
  1813.  
  1814.  
  1815.  
  1816.           7.4.  MOSFET's
  1817.  
  1818.  
  1819.           General form:
  1820.  
  1821.  
  1822.               MXXXXXXX ND NG NS NB MNAME <L=VAL> <W=VAL> <AD=VAL> <AS=VAL>
  1823.               + <PD=VAL> <PS=VAL> <NRD=VAL> <NRS=VAL> <OFF> <IC=VDS,VGS,VBS>
  1824.  
  1825.  
  1826.           Examples:
  1827.  
  1828.  
  1829.               M1 24 2 0 20 TYPE1
  1830.               M31 2 17 6 10 MODM L=5U W=2U
  1831.               M31 2 16 6 10 MODM 5U 2U
  1832.               M1 2 9 3 0 MOD1 L=10U W=5U AD=100P AS=100P PD=40U PS=40U
  1833.               M1 2 9 3 0 MOD1 10U 5U 2P 2P
  1834.  
  1835.  
  1836.           ND, NG, NS, and NB are the drain, gate, source,  and  bulk  (sub-
  1837.  
  1838.           strate)  nodes,  respectively.  MNAME is the model name.  L and W
  1839.  
  1840.           are the channel length and width, in meters.  AD and AS  are  the
  1841.  
  1842.           areas  of  the  drain  and source diffusions, in sq-meters.  Note
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.                                                                          29
  1856.  
  1857.  
  1858.           that the suffix U specifies microns (1E-6  m)  and  P  sq-microns
  1859.  
  1860.           (1E-12  sq-m).  If  any  of  L,  W,  AD, or AS are not specified,
  1861.  
  1862.           default values are used.  The user may specify the values  to  be
  1863.  
  1864.           used  for these default parameters on the .OPTIONS card.  The use
  1865.  
  1866.           of defaults simplifies input deck preparation,  as  well  as  the
  1867.  
  1868.           editing  required if device geometries are to be changed.  PD and
  1869.  
  1870.           PS are the perimeters of  the  drain  and  source  junctions,  in
  1871.  
  1872.           meters.   NRD  and NRS designate the equivalent number of squares
  1873.  
  1874.           of the drain and source diffusions;  these  values  multiply  the
  1875.  
  1876.           sheet resistance RSH specified on the .MODEL card for an accurate
  1877.  
  1878.           representation of the parasitic series drain  and  source  resis-
  1879.  
  1880.           tance of each transistor.  PD and PS default to 0.0 while NRD and
  1881.  
  1882.           NRS to 1.0.  OFF indicates an (optional) initial condition on the
  1883.  
  1884.           device for dc analysis.  The (optional) initial condition specif-
  1885.  
  1886.           ication using IC=VDS,VGS,VBS is intended for  use  with  the  UIC
  1887.  
  1888.           option  on  the  .TRAN card, when a transient analysis is desired
  1889.  
  1890.           starting from other than the quiescent operating point.  See  the
  1891.  
  1892.           .IC  card  for  a better and more convenient way to specify tran-
  1893.  
  1894.           sient initial conditions.
  1895.  
  1896.  
  1897.  
  1898.           7.5.  .MODEL Card
  1899.  
  1900.  
  1901.           General form:
  1902.  
  1903.  
  1904.                .MODEL MNAME TYPE(PNAME1=PVAL1 PNAME2=PVAL2 ... )
  1905.  
  1906.  
  1907.           Examples:
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.                                                                          30
  1922.  
  1923.  
  1924.                .MODEL MOD1 NPN BF=50 IS=1E-13 VBF=50
  1925.  
  1926.  
  1927.  
  1928.                The .MODEL card specifies a set  of  model  parameters  that
  1929.  
  1930.           will  be  used  by one or more devices.  MNAME is the model name,
  1931.  
  1932.           and type is one of the following seven types:
  1933.  
  1934.  
  1935.                             NPN    NPN BJT model
  1936.                             PNP    PNP BJT model
  1937.                             D      diode model
  1938.                             NJF    N-channel JFET model
  1939.                             PJF    P-channel JFET model
  1940.                             NMOS   N-channel MOSFET model
  1941.                             PMOS   P-channel MOSFET model
  1942.  
  1943.  
  1944.  
  1945.                Parameter values are  defined  by  appending  the  parameter
  1946.  
  1947.           name,  as  given  below for each model type, followed by an equal
  1948.  
  1949.           sign and the parameter value.   Model  parameters  that  are  not
  1950.  
  1951.           given  a  value  are  assigned the default values given below for
  1952.  
  1953.           each model type.
  1954.  
  1955.  
  1956.  
  1957.           7.6.  Diode Model
  1958.  
  1959.  
  1960.  
  1961.                The dc characteristics of the diode are  determined  by  the
  1962.  
  1963.           parameters  IS  and  N.   An  ohmic  resistance, RS, is included.
  1964.  
  1965.           Charge storage effects are modeled by a transit time, TT,  and  a
  1966.  
  1967.           nonlinear  depletion layer capacitance which is determined by the
  1968.  
  1969.           parameters CJO, VJ, and M.  The  temperature  dependence  of  the
  1970.  
  1971.           saturation  current  is  defined by the parameters EG, the energy
  1972.  
  1973.           and XTI, the saturation current  temperature  exponent.   Reverse
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.                                                                          31
  1988.  
  1989.  
  1990.           breakdown  is  modeled  by an exponential increase in the reverse
  1991.  
  1992.           diode current and is determined by  the  parameters  BV  and  IBV
  1993.  
  1994.           (both of which are positive numbers).
  1995.  
  1996.  
  1997.  
  1998.                name   parameter                        units   default    example    area
  1999.  
  2000.            1   IS     saturation current               A       1.0E-14    1.0E-14    *
  2001.            2   RS     ohmic resistance                 Ohm     0          10         *
  2002.            3   N      emission coefficient             -       1          1.0
  2003.            4   TT     transit-time                     sec     0          0.1Ns
  2004.            5   CJO    zero-bias junction capacitance   F       0          2PF        *
  2005.            6   VJ     junction potential               V       1          0.6
  2006.            7   M      grading coefficient              -       0.5        0.5
  2007.            8   EG     activation energy                eV      1.11       1.11 Si
  2008.                                                                           0.69 Sbd
  2009.                                                                           0.67 Ge
  2010.            9   XTI    saturation-current temp. exp     -       3.0        3.0 jn
  2011.                                                                           2.0 Sbd
  2012.           10   KF     flicker noise coefficient        -       0
  2013.           11   AF     flicker noise exponent           -       1
  2014.           12   FC     coefficient for forward-bias     -       0.5
  2015.                       depletion capacitance formula
  2016.           13   BV     reverse breakdown voltage        V       infinite   40.0
  2017.           14   IBV    current at breakdown voltage     A       1.0E-3
  2018.  
  2019.  
  2020.  
  2021.  
  2022.           7.7.  BJT Models (both NPN and PNP)
  2023.  
  2024.  
  2025.                The bipolar junction transistor model in SPICE is an adapta-
  2026.  
  2027.           tion  of  the  integral  charge control model of Gummel and Poon.
  2028.  
  2029.           This modified Gummel-Poon model extends  the  original  model  to
  2030.  
  2031.           include  several  effects  at  high  bias levels.  The model will
  2032.  
  2033.           automatically simplify to the simpler Ebers-Moll model when  cer-
  2034.  
  2035.           tain  parameters  are  not specified. The parameter names used in
  2036.  
  2037.           the modified Gummel-Poon model have been chosen to be more easily
  2038.  
  2039.           understood by the program user, and to reflect better both physi-
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.                                                                          32
  2054.  
  2055.  
  2056.           cal and circuit design thinking.
  2057.  
  2058.  
  2059.                The dc model is defined by the parameters IS, BF,  NF,  ISE,
  2060.  
  2061.           IKF, and NE which determine the forward current gain characteris-
  2062.  
  2063.           tics, IS, BR, NR, ISC, IKR, and NC which  determine  the  reverse
  2064.  
  2065.           current gain characteristics, and VAF and VAR which determine the
  2066.  
  2067.           output conductance for forward and reverse regions.  Three  ohmic
  2068.  
  2069.           resistances  RB,  RC,  and  RE are included, where RB can be high
  2070.  
  2071.           current dependent.  Base charge storage is modeled by forward and
  2072.  
  2073.           reverse  transit  times,  TF  and TR, the forward transit time TF
  2074.  
  2075.           being bias dependent if desired, and  nonlinear  depletion  layer
  2076.  
  2077.           capacitances  which  are  determined by CJE, VJE, and MJE for the
  2078.  
  2079.           B-E junction , CJC, VJC, and MJC for the B-C  junction  and  CJS,
  2080.  
  2081.           VJS,  and  MJS  for  the C-S (Collector-Substrate) junction.  The
  2082.  
  2083.           temperature dependence of the saturation current, IS,  is  deter-
  2084.  
  2085.           mined  by the energy-gap, EG, and the saturation current tempera-
  2086.  
  2087.           ture exponent, XTI.  Additionally base current temperature depen-
  2088.  
  2089.           dence  is modeled by the beta temperature exponent XTB in the new
  2090.  
  2091.           model.
  2092.  
  2093.  
  2094.                The  BJT parameters used in the modified  Gummel-Poon  model
  2095.  
  2096.           are listed below. The parameter names used in earlier versions of
  2097.  
  2098.           SPICE2 are still accepted.
  2099.  
  2100.  
  2101.                   Modified Gummel-Poon BJT Parameters.
  2102.  
  2103.  
  2104.  
  2105.                name   parameter                               units   default    example   area
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.                                                                          33
  2120.  
  2121.  
  2122.           1    IS     transport saturation current            A       1.0E-16    1.0E-15   *
  2123.           2    BF     ideal maximum forward beta              -       100        100
  2124.           3    NF     forward current emission coefficient    -       1.0        1
  2125.           4    VAF    forward Early voltage                   V       infinite   200
  2126.           5    IKF    corner for forward beta
  2127.                       high current roll-off                   A       infinite   0.01      *
  2128.           6    ISE    B-E leakage saturation current          A       0          1.0E-13   *
  2129.           7    NE     B-E leakage emission coefficient        -       1.5        2
  2130.           8    BR     ideal maximum reverse beta              -       1          0.1
  2131.           9    NR     reverse current emission coefficient    -       1          1
  2132.           10   VAR    reverse Early voltage                   V       infinite   200
  2133.           11   IKR    corner for reverse beta
  2134.                       high current roll-off                   A       infinite   0.01      *
  2135.           12   ISC    B-C leakage saturation current          A       0          1.0E-13   *
  2136.           13   NC     B-C leakage emission coefficient        -       2          1.5
  2137.           14   RB     zero bias base resistance               Ohms    0          100       *
  2138.           15   IRB    current where base resistance
  2139.                       falls halfway to its min value          A       infinite   0.1       *
  2140.           16   RBM    minimum base resistance
  2141.                       at high currents                        Ohms    RB         10        *
  2142.           17   RE     emitter resistance                      Ohms    0          1         *
  2143.           18   RC     collector resistance                    Ohms    0          10        *
  2144.           19   CJE    B-E zero-bias depletion capacitance     F       0          2PF       *
  2145.           20   VJE    B-E built-in potential                  V       0.75       0.6
  2146.           21   MJE    B-E junction exponential factor         -       0.33       0.33
  2147.           22   TF     ideal forward transit time              sec     0          0.1Ns
  2148.           23   XTF    coefficient for bias dependence of TF   -       0
  2149.           24   VTF    voltage describing VBC
  2150.                       dependence of TF                        V       infinite
  2151.           25   ITF    high-current parameter
  2152.                       for effect on TF                        A       0                    *
  2153.           26   PTF    excess phase at freq=1.0/(TF*2PI) Hz    deg     0
  2154.           27   CJC    B-C zero-bias depletion capacitance     F       0          2PF       *
  2155.           28   VJC    B-C built-in potential                  V       0.75       0.5
  2156.           29   MJC    B-C junction exponential factor         -       0.33       0.5
  2157.           30   XCJC   fraction of B-C depletion capacitance   -       1
  2158.                       connected to internal base node
  2159.           31   TR     ideal reverse transit time              sec     0          10Ns
  2160.           32   CJS    zero-bias collector-substrate
  2161.                       capacitance                             F       0          2PF       *
  2162.           33   VJS    substrate junction built-in potential   V       0.75
  2163.           34   MJS    substrate junction exponential factor   -       0          0.5
  2164.           35   XTB    forward and reverse beta
  2165.                       temperature exponent                    -       0
  2166.           36   EG     energy gap for temperature
  2167.                       effect on IS                            eV      1.11
  2168.           37   XTI    temperature exponent for effect on IS   -       3
  2169.           38   KF     flicker-noise coefficient               -       0
  2170.           39   AF     flicker-noise exponent                  -       1
  2171.           40   FC     coefficient for forward-bias
  2172.                       depletion capacitance formula           -       0.5
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.                                                                          34
  2186.  
  2187.  
  2188.           7.8.  JFET Models (both N and P Channel)
  2189.  
  2190.  
  2191.  
  2192.                The JFET model is derived from the FET model of Shichman and
  2193.  
  2194.           Hodges.  The dc characteristics are defined by the parameters VTO
  2195.  
  2196.           and BETA, which determine the variation  of  drain  current  with
  2197.  
  2198.           gate  voltage,  LAMBDA,  which determines the output conductance,
  2199.  
  2200.           and IS, the saturation current of the two  gate  junctions.   Two
  2201.  
  2202.           ohmic  resistances,  RD  and RS, are included.  Charge storage is
  2203.  
  2204.           modeled by nonlinear depletion layer capacitances for  both  gate
  2205.  
  2206.           junctions  which  vary  as the -1/2 power of junction voltage and
  2207.  
  2208.           are defined by the parameters CGS, CGD, and PB.
  2209.  
  2210.  
  2211.                name     parameter                            units    default   example   area
  2212.  
  2213.            1   VTO      threshold voltage                    V        -2.0      -2.0
  2214.            2   BETA     transconductance parameter           A/V**2   1.0E-4    1.0E-3    *
  2215.            3   LAMBDA   channel length modulation
  2216.                         parameter                            1/V      0         1.0E-4
  2217.            4   RD       drain ohmic resistance               Ohm      0         100       *
  2218.            5   RS       source ohmic resistance              Ohm      0         100       *
  2219.            6   CGS      zero-bias G-S junction capacitance   F        0         5PF       *
  2220.            7   CGD      zero-bias G-D junction capacitance   F        0         1PF       *
  2221.            8   PB       gate junction potential              V        1         0.6
  2222.            9   IS       gate junction saturation current     A        1.0E-14   1.0E-14   *
  2223.           10   KF       flicker noise coefficient            -        0
  2224.           11   AF       flicker noise exponent               -        1
  2225.           12   FC       coefficient for forward-bias         -        0.5
  2226.                         depletion capacitance formula
  2227.  
  2228.  
  2229.  
  2230.  
  2231.           7.9.  MOSFET Models (both N and P channel)
  2232.  
  2233.  
  2234.                SPICE provides three MOSFET device models  which  differ  in
  2235.  
  2236.           the  formulation  of  the I-V characteristic.  The variable LEVEL
  2237.  
  2238.           specifies the model to be used:
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.                                                                          35
  2252.  
  2253.  
  2254.                  LEVEL=1 ->    Shichman-Hodges
  2255.                  LEVEL=2 ->    MOS2 (as described in [1])
  2256.                  LEVEL=3 ->    MOS3, a semi-empirical model(see [1])
  2257.  
  2258.  
  2259.  
  2260.           The dc characteristics of the MOSFET are defined  by  the  device
  2261.  
  2262.           parameters  VTO,  KP, LAMBDA, PHI and GAMMA. These parameters are
  2263.  
  2264.           computed by SPICE if process  parameters  (NSUB,  TOX,  ...)  are
  2265.  
  2266.           given,  but  user-specified values always override.  VTO is posi-
  2267.  
  2268.           tive (negative) for enhancement mode and negative (positive)  for
  2269.  
  2270.           depletion  mode  N-channel (P-channel) devices. Charge storage is
  2271.  
  2272.           modeled by three constant capacitors, CGSO, CGDO, and CGBO  which
  2273.  
  2274.           represent overlap capacitances, by the nonlinear thin-oxide capa-
  2275.  
  2276.           citance which is distributed among the gate, source,  drain,  and
  2277.  
  2278.           bulk  regions,  and by the nonlinear depletion-layer capacitances
  2279.  
  2280.           for both substrate junctions divided into bottom  and  periphery,
  2281.  
  2282.           which  vary  as the MJ and MJSW power of junction voltage respec-
  2283.  
  2284.           tively, and are determined by the parameters CBD, CBS, CJ,  CJSW,
  2285.  
  2286.           MJ,  MJSW  and  PB.   There are two built-in models of the charge
  2287.  
  2288.           storage effects associated with the thin-oxide.  The  default  is
  2289.  
  2290.           the piecewise linear voltage-dependent capacitance model proposed
  2291.  
  2292.           by Meyer.  The second choice is the charge-controlled capacitance
  2293.  
  2294.           model  of Ward and Dutton [1].  The XQC model parameter acts as a
  2295.  
  2296.           flag and a coefficient at the same time.  As the former it causes
  2297.  
  2298.           the  program to use Meyer's model whenever larger than 0.5 or not
  2299.  
  2300.           specified, and the charge-controlled model  when  between  0  and
  2301.  
  2302.           0.5.  In the latter case its value defines the share of the chan-
  2303.  
  2304.           nel charge associated with the drain terminal in  the  saturation
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.                                                                          36
  2318.  
  2319.  
  2320.           region.   The  thin-oxide  charge  storage  effects  are  treated
  2321.  
  2322.           slightly  different  for  the  LEVEL=1  model.   These   voltage-
  2323.  
  2324.           dependent  capacitances  are included only if TOX is specified in
  2325.  
  2326.           the input description and they are represented using Meyer's for-
  2327.  
  2328.           mulation.
  2329.  
  2330.  
  2331.                There is some overlap among the  parameters  describing  the
  2332.  
  2333.           junctions, e.g. the reverse current can be input either as IS (in
  2334.  
  2335.           A) or as JS (in A/m**2). Whereas the first is an  absolute  value
  2336.  
  2337.           the second is multiplied by AD and AS to give the reverse current
  2338.  
  2339.           of the drain and source junctions respectively. This  methodology
  2340.  
  2341.           has  been chosen since there is no sense in relating always junc-
  2342.  
  2343.           tion characteristics with AD and AS entered on the  device  card;
  2344.  
  2345.           the  areas  can  be defaulted.  The same idea applies also to the
  2346.  
  2347.           zero-bias junction capacitances CBD and CBS (in F) on  one  hand,
  2348.  
  2349.           and  CJ (in F/m**2) on the other.  The parasitic drain and source
  2350.  
  2351.           series resistance can be expressed as either RD and RS (in  ohms)
  2352.  
  2353.           or  RSH  (in ohms/sq.), the latter being multiplied by the number
  2354.  
  2355.           of squares NRD and NRS input on the device card.
  2356.  
  2357.  
  2358.  
  2359.                name     parameter                               units       default   example
  2360.  
  2361.           1    LEVEL    model index                             -           1
  2362.           2    VTO      zero-bias threshold voltage             V           0.0       1.0
  2363.           3    KP       transconductance parameter              A/V**2      2.0E-5    3.1E-5
  2364.           4    GAMMA    bulk threshold parameter                V**0.5      0.0       0.37
  2365.           5    PHI      surface potential                       V           0.6       0.65
  2366.           6    LAMBDA   channel-length modulation
  2367.                         (MOS1 and MOS2 only)                    1/V         0.0       0.02
  2368.           7    RD       drain ohmic resistance                  Ohm         0.0       1.0
  2369.           8    RS       source ohmic resistance                 Ohm         0.0       1.0
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.                                                                          37
  2384.  
  2385.  
  2386.           9    CBD      zero-bias B-D junction capacitance      F           0.0       20FF
  2387.           10   CBS      zero-bias B-S junction capacitance      F           0.0       20FF
  2388.           11   IS       bulk junction saturation current        A           1.0E-14   1.0E-15
  2389.           12   PB       bulk junction potential                 V           0.8       0.87
  2390.           13   CGSO     gate-source overlap capacitance
  2391.                         per meter channel width                 F/m         0.0       4.0E-11
  2392.           14   CGDO     gate-drain overlap capacitance
  2393.                         per meter channel width                 F/m         0.0       4.0E-11
  2394.           15   CGBO     gate-bulk overlap capacitance
  2395.                         per meter channel length                F/m         0.0       2.0E-10
  2396.           16   RSH      drain and source diffusion
  2397.                         sheet resisitance                       Ohm/sq.     0.0       10.0
  2398.           17   CJ       zero-bias bulk junction bottom cap.
  2399.                         per sq-meter of junction area           F/m**2      0.0       2.0E-4
  2400.           18   MJ       bulk junction bottom grading coef.      -           0.5       0.5
  2401.           19   CJSW     zero-bias bulk junction sidewall cap.
  2402.                         per meter of junction perimeter         F/m         0.0       1.0E-9
  2403.           20   MJSW     bulk junction sidewall grading coef.    -           0.33
  2404.           21   JS       bulk junction saturation current
  2405.                         per sq-meter of junction area           A/m**2                1.0E-8
  2406.           22   TOX      oxide thickness                         meter       1.0E-7    1.0E-7
  2407.           23   NSUB     substrate doping                        1/cm**3     0.0       4.0E15
  2408.           24   NSS      surface state density                   1/cm**2     0.0       1.0E10
  2409.           25   NFS      fast surface state density              1/cm**2     0.0       1.0E10
  2410.           26   TPG      type of gate material:                  -           1.0
  2411.                             +1 opp. to substrate
  2412.                             -1 same as substrate
  2413.                              0  Al gate
  2414.           27   XJ       metallurgical junction depth            meter       0.0       1U
  2415.           28   LD       lateral diffusion                       meter       0.0       0.8U
  2416.           29   UO       surface mobility                        cm**2/V-s   600       700
  2417.           30   UCRIT    critical field for mobility
  2418.                         degradation (MOS2 only)                 V/cm        1.0E4     1.0E4
  2419.           31   UEXP     critical field exponent in
  2420.                         mobility degradation (MOS2 only)        -           0.0       0.1
  2421.           32   UTRA     transverse field coef (mobility)
  2422.                         (deleted for MOS2)                      -           0.0       0.3
  2423.           33   VMAX     maximum drift velocity of carriers      m/s         0.0       5.0E4
  2424.           34   NEFF     total channel charge (fixed and
  2425.                         mobile) coefficient (MOS2 only)         -           1.0       5.0
  2426.           35   XQC      thin-oxide capacitance model flag
  2427.                         and coefficient of channel charge
  2428.                         share attributed to drain (0-0.5)       -           1.0       0.4
  2429.           36   KF       flicker noise coefficient               -           0.0       1.0E-26
  2430.           37   AF       flicker noise exponent                  -           1.0       1.2
  2431.           38   FC       coefficient for forward-bias
  2432.                         depletion capacitance formula           -           0.5
  2433.           39   DELTA    width effect on threshold voltage
  2434.                         (MOS2 and MOS3)                         -           0.0       1.0
  2435.           40   THETA    mobility modulation (MOS3 only)         1/V         0.0       0.1
  2436.           41   ETA      static feedback (MOS3 only)             -           0.0       1.0
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.                                                                          38
  2450.  
  2451.  
  2452.           42   KAPPA    saturation field factor (MOS3 only)     -           0.2       0.5
  2453.  
  2454.  
  2455.  
  2456.           [1] A. Vladimirescu and S. Liu, "The Simulation of MOS Integrated
  2457.  
  2458.           Circuits  Using  SPICE2",  ERL  Memo  No.  ERL  M80/7,Electronics
  2459.  
  2460.           Research Laboratory, University  of  California,  Berkeley,  Oct.
  2461.  
  2462.           1980.
  2463.  
  2464.  
  2465.  
  2466.  
  2467.           8.  SUBCIRCUITS
  2468.  
  2469.  
  2470.  
  2471.                A subcircuit that consists of SPICE elements can be  defined
  2472.  
  2473.           and  referenced  in a fashion similar to device models.  The sub-
  2474.  
  2475.           circuit is defined in the input deck by  a  grouping  of  element
  2476.  
  2477.           cards;   the program then automatically inserts the group of ele-
  2478.  
  2479.           ments wherever the subcircuit is referenced.  There is  no  limit
  2480.  
  2481.           on  the  size  or  complexity of subcircuits, and subcircuits may
  2482.  
  2483.           contain other subcircuits.  An example  of  subcircuit  usage  is
  2484.  
  2485.           given in Appendix A.
  2486.  
  2487.  
  2488.  
  2489.           8.1.  .SUBCKT Card
  2490.  
  2491.           General form:
  2492.  
  2493.  
  2494.                .SUBCKT subnam N1 <N2 N3 ...>
  2495.  
  2496.  
  2497.           Examples:
  2498.  
  2499.  
  2500.                .SUBCKT OPAMP 1 2 3 4
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.                                                                          39
  2516.  
  2517.  
  2518.                A circuit definition is begun with a .SUBCKT  card.   SUBNAM
  2519.  
  2520.           is  the  subcircuit name, and N1, N2, ... are the external nodes,
  2521.  
  2522.           which cannot be zero.  The group of element cards  which  immedi-
  2523.  
  2524.           ately  follow  the  .SUBCKT card define the subcircuit.  The last
  2525.  
  2526.           card in a subcircuit definition is the .ENDS  card  (see  below).
  2527.  
  2528.           Control  cards  may  not  appear  within a subcircuit definition;
  2529.  
  2530.           however,  subcircuit  definitions  may  contain  anything   else,
  2531.  
  2532.           including  other  subcircuit definitions, device models, and sub-
  2533.  
  2534.           circuit calls (see below).  Note that any device models  or  sub-
  2535.  
  2536.           circuit  definitions  included as part of a subcircuit definition
  2537.  
  2538.           are strictly local (i.e., such models  and  definitions  are  not
  2539.  
  2540.           known  outside  the  subcircuit  definition).   Also, any element
  2541.  
  2542.           nodes not included on the .SUBCKT card are strictly  local,  with
  2543.  
  2544.           the exception of 0 (ground) which is always global.
  2545.  
  2546.  
  2547.  
  2548.           8.2.  .ENDS Card
  2549.  
  2550.  
  2551.           General form:
  2552.  
  2553.  
  2554.                .ENDS <SUBNAM>
  2555.  
  2556.  
  2557.           Examples:
  2558.  
  2559.  
  2560.                .ENDS OPAMP
  2561.  
  2562.  
  2563.  
  2564.                This card must be the last one for  any  subcircuit  defini-
  2565.  
  2566.           tion.   The subcircuit name, if included, indicates which subcir-
  2567.  
  2568.           cuit definition is being terminated;  if omitted, all subcircuits
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.                                                                          40
  2582.  
  2583.  
  2584.           being  defined  are  terminated.   The  name  is needed only when
  2585.  
  2586.           nested subcircuit definitions are being made.
  2587.  
  2588.  
  2589.  
  2590.           8.3.  Subcircuit Calls
  2591.  
  2592.  
  2593.           General form:
  2594.  
  2595.  
  2596.               XYYYYYYY N1 <N2 N3 ...> SUBNAM
  2597.  
  2598.  
  2599.           Examples:
  2600.  
  2601.  
  2602.               X1 2 4 17 3 1 MULTI
  2603.  
  2604.  
  2605.  
  2606.                Subcircuits are used in SPICE by specifying  pseudo-elements
  2607.  
  2608.           beginning  with the letter X, followed by the circuit nodes to be
  2609.  
  2610.           used in expanding the subcircuit.
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.                                                                          41
  2648.  
  2649.  
  2650.           9.  CONTROL CARDS
  2651.  
  2652.  
  2653.  
  2654.           9.1.  .TEMP Card
  2655.  
  2656.  
  2657.           General form:
  2658.  
  2659.  
  2660.                .TEMP T1 <T2 <T3 ...>>
  2661.  
  2662.  
  2663.           Examples:
  2664.  
  2665.  
  2666.                .TEMP -55.0 25.0 125.0
  2667.  
  2668.  
  2669.  
  2670.                This card specifies the temperatures at which the circuit is
  2671.  
  2672.           to  be simulated.  T1, T2, ... Are the different temperatures, in
  2673.  
  2674.           degrees C.  Temperatures less than  -223.0  deg  C  are  ignored.
  2675.  
  2676.           Model  data  are specified at TNOM degrees (see the .OPTIONS card
  2677.  
  2678.           for TNOM);  if the .TEMP card is  omitted,  the  simulation  will
  2679.  
  2680.           also be performed at a temperature equal to TNOM.
  2681.  
  2682.  
  2683.  
  2684.           9.2.  .WIDTH Card
  2685.  
  2686.           General form:
  2687.  
  2688.  
  2689.                .WIDTH IN=COLNUM OUT=COLNUM
  2690.  
  2691.  
  2692.           Examples:
  2693.  
  2694.  
  2695.                .WIDTH IN=72 OUT=133
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.                                                                          42
  2714.  
  2715.  
  2716.                COLNUM is the last column read from each line of input;  the
  2717.  
  2718.           setting  takes effect with the next line read.  The default value
  2719.  
  2720.           for COLNUM is 80.  The out parameter specifies the  output  print
  2721.  
  2722.           width.   Permissible values for the output print width are 80 and
  2723.  
  2724.           133.
  2725.  
  2726.  
  2727.  
  2728.           9.3.  .OPTIONS Card
  2729.  
  2730.  
  2731.           General form:
  2732.  
  2733.  
  2734.                .OPTIONS OPT1 OPT2 ... (or OPT=OPTVAL ...)
  2735.  
  2736.  
  2737.           Examples:
  2738.  
  2739.  
  2740.                .OPTIONS ACCT LIST NODE
  2741.  
  2742.  
  2743.  
  2744.                This card allows the user to reset program control and  user
  2745.  
  2746.           options for specific simulation purposes.  Any combination of the
  2747.  
  2748.           following options may be included, in  any  order.   'x'  (below)
  2749.  
  2750.           represents some positive number.
  2751.  
  2752.  
  2753.           option                                                             effect
  2754.  
  2755.           ACCT                                                               causes accounting and run time statistics to be printed
  2756.           LIST                                                               causes the summary listing of the input data to be printed
  2757.           NOMOD                                                              suppresses the printout of the model parameters.
  2758.           NOPAGE                                                             suppresses page ejects
  2759.           NODE                                                               causes the printing of the node table.
  2760.           OPTS                                                               causes the option values to be printed.
  2761.           GMIN=x                                                             resets the value of GMIN, the minimum conductance
  2762.                                                                              allowed by the program.  The default value is 1.0E-12.
  2763.           RELTOL=x                                                           resets the relative error tolerance of the program.  The
  2764.                                                                              default value is 0.001 (0.1 percent).
  2765.           ABSTOL=x                                                           resets the absolute current error tolerance of the
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.                                                                          43
  2780.  
  2781.  
  2782.                                                                              program.  The default value is 1 picoamp.
  2783.           VNTOL=x                                                            resets the absolute voltage error tolerance of the
  2784.                                                                              program.  The default value is 1 microvolt.
  2785.           TRTOL=x                                                            resets the transient error tolerance.  The default value
  2786.                                                                              is 7.0.  This parameter is an estimate of the factor by
  2787.                                                                              which SPICE overestimates the actual truncation error.
  2788.           CHGTOL=x                                                           resets the charge tolerance of the program.  The default
  2789.                                                                              value is 1.0E-14.
  2790.           PIVTOL=x                                                           resets the absolute minimum value for a matrix entry
  2791.                                                                              to be accepted as a pivot.  The default value is 1.0E-13.
  2792.           PIVREL=x                                                           resets the relative ratio between the largest column entry
  2793.                                                                              and an acceptable pivot value. The default value is 1.0E-3.
  2794.                                                                              In the numerical pivoting algorithm the allowed minimum
  2795.                                                                              pivot value is determined by
  2796.                                                                              EPSREL=AMAX1(PIVREL*MAXVAL,PIVTOL)
  2797.                                                                              where MAXVAL is the maximum element in the column where
  2798.                                                                              a pivot is sought (partial pivoting).
  2799.           NUMDGT=x                                                           resets the number of significant digits printed for
  2800.                                                                              output variable values.  X must satisfy the relation
  2801.                                                                              0 < x < 8.  The default value is 4.  Note:  this option is
  2802.                                                                              independent of the error tolerance used by SPICE (i.e., if
  2803.                                                                              the values of options RELTOL, ABSTOL, etc., are not changed
  2804.                                                                              then one may be printing numerical 'noise' for NUMDGT > 4.
  2805.           TNOM=x                                                             resets the nominal temperature.  The default value is
  2806.                                                                              27 deg C (300 deg K).
  2807.           ITL1=x                                                             resets the dc iteration limit.  The default is 100.
  2808.           ITL2=x                                                             resets the dc transfer curve iteration limit.  The
  2809.                                                                              default is 50.
  2810.           ITL3=x                                                             resets the lower transient analysis iteration limit.
  2811.                                                                              the default value is 4.
  2812.           ITL4=x                                                             resets the transient analysis timepoint iteration limit.
  2813.                                                                              the default is 10.
  2814.           ITL5=x                                                             resets the transient analysis total iteration limit.
  2815.                                                                              the default is 5000.  Set ITL5=0 to omit this test.
  2816.           ITL6=x  resets the dc iteration limit at each step of the source
  2817.                                                                              stepping method.  The default is 0 which means not to use
  2818.                                                                              this method.
  2819.           CPTIME=x                                                           the maximum cpu-time in seconds allowed for this job.
  2820.           LIMTIM=x                                                           resets the amount of cpu time reserved by SPICE for
  2821.                                                                              generating plots should a cpu time-limit cause job
  2822.                                                                              termination.  The default value is 2 (seconds).
  2823.           LIMPTS=x                                                           resets the total number of points that can be printed
  2824.                                                                              or plotted in a dc, ac, or transient analysis.  The
  2825.                                                                              default value is 201.
  2826.           LVLCOD=x                                                           if x is 2 (two), then machine code for the matrix
  2827.                                                                              solution will be generated.  Otherwise, no machine code is
  2828.                                                                              generated.  The default value is 2.  Applies only to CDC
  2829.                                                                              computers.
  2830.           LVLTIM=x                                                           if x is 1 (one), the iteration timestep control is used.
  2831.                                                                              if x is 2 (two), the truncation-error timestep is used.
  2832.                                                                              The default value is 2.  If method=Gear and MAXORD>2 then
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.                                                                          44
  2846.  
  2847.  
  2848.                                                                              LVLTIM is set to 2 by SPICE.
  2849.           METHOD=name                                                        sets the numerical integration method used by SPICE.
  2850.                                                                              Possible names are Gear or trapezoidal.  The default is
  2851.                                                                              trapezoidal.
  2852.           MAXORD=x                                                           sets the maximum order for the integration method if
  2853.                                                                              Gear's variable-order method is used.  X must be between
  2854.                                                                              2 and 6.  The default value is 2.
  2855.           DEFL=x                                                             resets the value for MOS channel length; the default
  2856.                                                                              is 100.0 micrometer.
  2857.           DEFW=x                                                             resets the value for MOS channel width; the default
  2858.                                                                              is 100.0 micrometer.
  2859.           DEFAD=x                                                            resets the value for MOS drain diffusion area; the
  2860.                                                                              default is 0.0.
  2861.           DEFAS=x                                                            resets the value for MOS source diffusion area; the
  2862.                                                                              default is 0.0.
  2863.  
  2864.  
  2865.  
  2866.  
  2867.           9.4.  .OP Card
  2868.  
  2869.  
  2870.           General form:
  2871.  
  2872.  
  2873.                .OP
  2874.  
  2875.  
  2876.  
  2877.  
  2878.                The inclusion of this card in an input deck will force SPICE
  2879.  
  2880.           to determine the dc operating point of the circuit with inductors
  2881.  
  2882.           shorted and capacitors opened.  Note:  a dc analysis is automati-
  2883.  
  2884.           cally  performed  prior  to a transient analysis to determine the
  2885.  
  2886.           transient initial conditions, and prior  to  an  ac  small-signal
  2887.  
  2888.           analysis  to  determine  the  linearized, small-signal models for
  2889.  
  2890.           nonlinear devices.
  2891.  
  2892.  
  2893.                SPICE performs a dc operating point  analysis  if  no  other
  2894.  
  2895.           analyses are requested.
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.                                                                          45
  2912.  
  2913.  
  2914.           9.5.  .DC Card
  2915.  
  2916.  
  2917.           General form:
  2918.  
  2919.  
  2920.                .DC SRCNAM VSTART VSTOP VINCR [SRC2 START2 STOP2 INCR2]
  2921.  
  2922.  
  2923.           Examples:
  2924.  
  2925.  
  2926.                .DC VIN 0.25 5.0 0.25
  2927.                .DC VDS 0 10 .5 VGS 0 5 1
  2928.                .DC VCE 0 10 .25 IB 0 10U 1U
  2929.  
  2930.  
  2931.  
  2932.                This card defines the dc transfer  curve  source  and  sweep
  2933.  
  2934.           limits.   SRCNAM is the name of an independent voltage or current
  2935.  
  2936.           source.  VSTART, VSTOP, and VINCR are the  starting,  final,  and
  2937.  
  2938.           incrementing  values  respectively.  The first example will cause
  2939.  
  2940.           the value of the voltage source VIN to be swept from  0.25  Volts
  2941.  
  2942.           to 5.0 Volts in increments of 0.25 Volts.  A second source (SRC2)
  2943.  
  2944.           may optionally be specified with associated sweep parameters.  In
  2945.  
  2946.           this case, the first source will be swept over its range for each
  2947.  
  2948.           value of the second  source.   This  option  can  be  useful  for
  2949.  
  2950.           obtaining  semiconductor  device output characteristics.  See the
  2951.  
  2952.           second example data deck in that section of the guide.
  2953.  
  2954.  
  2955.  
  2956.           9.6.  .NODESET Card
  2957.  
  2958.           General form:
  2959.  
  2960.  
  2961.                .NODESET V(NODNUM)=VAL V(NODNUM)=VAL ...
  2962.  
  2963.  
  2964.           Examples:
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.                                                                          46
  2978.  
  2979.  
  2980.                .NODESET V(12)=4.5 V(4)=2.23
  2981.  
  2982.  
  2983.  
  2984.                This card helps the program find the dc or initial transient
  2985.  
  2986.           solution  by  making  a preliminary pass with the specified nodes
  2987.  
  2988.           held to the given voltages.  The restriction is then released and
  2989.  
  2990.           the  iteration continues to the true solution.  The .NODESET card
  2991.  
  2992.           may be necessary for convergence on bistable or astable circuits.
  2993.  
  2994.           In general, this card should not be necessary.
  2995.  
  2996.  
  2997.  
  2998.           9.7.  .IC Card
  2999.  
  3000.  
  3001.           General form:
  3002.  
  3003.  
  3004.                .IC V(NODNUM)=VAL V(NODNUM)=VAL ...
  3005.  
  3006.  
  3007.           Examples:
  3008.  
  3009.  
  3010.                .IC V(11)=5 V(4)=-5 V(2)=2.2
  3011.  
  3012.  
  3013.  
  3014.                This card is for setting transient initial  conditions.   It
  3015.  
  3016.           has  two  different interpretations, depending on whether the UIC
  3017.  
  3018.           parameter is specified on the .TRAN card.  Also, one  should  not
  3019.  
  3020.           confuse  this  card with the .NODESET card.  The .NODESET card is
  3021.  
  3022.           only to help dc convergence, and does not affect final bias solu-
  3023.  
  3024.           tion (except for multi-stable circuits).  The two interpretations
  3025.  
  3026.           of this card are as follows:
  3027.  
  3028.  
  3029.            1.  When the UIC parameter is specified on the .TRAN card,  then
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.                                                                          47
  3044.  
  3045.  
  3046.           the  node  voltages specified on the .IC card are used to compute
  3047.  
  3048.           the capacitor, diode, BJT, JFET, and MOSFET  initial  conditions.
  3049.  
  3050.           This  is  equivalent  to  specifying the IC=... parameter on each
  3051.  
  3052.           device card, but is much more convenient.  The  IC=...  parameter
  3053.  
  3054.           can  still  be  specified  and  will take precedence over the .IC
  3055.  
  3056.           values.  Since no dc bias (initial transient)  solution  is  com-
  3057.  
  3058.           puted  before  the  transient  analysis,  one should take care to
  3059.  
  3060.           specify all dc source voltages on the .IC card if they are to  be
  3061.  
  3062.           used to compute device initial conditions.
  3063.  
  3064.  
  3065.            2.  When the UIC parameter is not specified on the  .TRAN  card,
  3066.  
  3067.           the  dc bias (initial transient) solution will be computed before
  3068.  
  3069.           the transient analysis.  In this case, the node  voltages  speci-
  3070.  
  3071.           fied on the .IC card will be forced to the desired initial values
  3072.  
  3073.           during the bias solution.  During transient  analysis,  the  con-
  3074.  
  3075.           straint on these node voltages is removed.
  3076.  
  3077.  
  3078.  
  3079.           9.8.  .TF Card
  3080.  
  3081.  
  3082.           General form:
  3083.  
  3084.  
  3085.                .TF OUTVAR INSRC
  3086.  
  3087.  
  3088.           Examples:
  3089.  
  3090.  
  3091.                .TF V(5,3) VIN
  3092.                .TF I(VLOAD) VIN
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.                                                                          48
  3110.  
  3111.  
  3112.                This card defines the small-signal output and input for  the
  3113.  
  3114.           dc  small-  signal  analysis.   OUTVAR is the small-signal output
  3115.  
  3116.           variable and INSRC is the small-signal  input  source.   If  this
  3117.  
  3118.           card is included, SPICE will compute the dc small-signal value of
  3119.  
  3120.           the transfer function (output/input), input resistance, and  out-
  3121.  
  3122.           put  resistance.   For the first example, SPICE would compute the
  3123.  
  3124.           ratio of V(5,3) to VIN, the small-signal input resistance at VIN,
  3125.  
  3126.           and  the  small-signal  output resistance measured across nodes 5
  3127.  
  3128.           and 3.
  3129.  
  3130.  
  3131.  
  3132.           9.9.  .SENS Card
  3133.  
  3134.  
  3135.           General form:
  3136.  
  3137.  
  3138.                .SENS OV1 <OV2 ... >
  3139.  
  3140.  
  3141.           Examples:
  3142.  
  3143.  
  3144.                .SENS V(9) V(4,3) V(17) I(VCC)
  3145.  
  3146.  
  3147.  
  3148.                If a .SENS card is included in the input  deck,  SPICE  will
  3149.  
  3150.           determine  the  dc  small-signal  sensitivities of each specified
  3151.  
  3152.           output variable with respect to every circuit  parameter.   Note:
  3153.  
  3154.           for large circuits, large amounts of output can be generated.
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.                                                                          49
  3176.  
  3177.  
  3178.           9.10.  .AC Card
  3179.  
  3180.  
  3181.           General form:
  3182.  
  3183.  
  3184.                .AC DEC ND FSTART FSTOP
  3185.                .AC OCT NO FSTART FSTOP
  3186.                .AC LIN NP FSTART FSTOP
  3187.  
  3188.  
  3189.           Examples:
  3190.  
  3191.  
  3192.                .AC DEC 10 1 10K
  3193.                .AC DEC 10 1K 100MEG
  3194.                .AC LIN 100 1 100HZ
  3195.  
  3196.  
  3197.  
  3198.  
  3199.                DEC stands for decade variation, and ND  is  the  number  of
  3200.  
  3201.           points  per  decade.   OCT stands for octave variation, and NO is
  3202.  
  3203.           the number of points per octave.  LIN stands  for  linear  varia-
  3204.  
  3205.           tion,  and  NP  is  the number of points.  FSTART is the starting
  3206.  
  3207.           frequency, and FSTOP is the final frequency.   If  this  card  is
  3208.  
  3209.           included  in  the  deck, SPICE will perform an ac analysis of the
  3210.  
  3211.           circuit over the specified frequency range.  Note that  in  order
  3212.  
  3213.           for  this  analysis  to  be  meaningful, at least one independent
  3214.  
  3215.           source must have been specified with an ac value.
  3216.  
  3217.  
  3218.  
  3219.           9.11.  .DISTO Card
  3220.  
  3221.           General form:
  3222.  
  3223.  
  3224.                .DISTO RLOAD <INTER <SKW2 <REFPWR <SPW2>>>>
  3225.  
  3226.  
  3227.           Examples:
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.                                                                          50
  3242.  
  3243.  
  3244.                .DISTO RL 2 0.95 1.0E-3 0.75
  3245.  
  3246.  
  3247.  
  3248.  
  3249.                This card controls whether SPICE will compute the distortion
  3250.  
  3251.           characteristic of the circuit in a small-signal mode as a part of
  3252.  
  3253.           the  ac  small-signal  sinusoidal  steady-state  analysis.    The
  3254.  
  3255.           analysis is performed assuming that one or two signal frequencies
  3256.  
  3257.           are imposed at the input;  let the two  frequencies  be  f1  (the
  3258.  
  3259.           nominal  analysis frequency) and f2 (=SKW2*f1).  The program then
  3260.  
  3261.           computes the following distortion measures:
  3262.  
  3263.  
  3264.               HD2  - the magnitude of the frequency component 2*f1 assuming
  3265.  
  3266.           that f2
  3267.  
  3268.                      is not present.
  3269.  
  3270.               HD3  - the magnitude of the frequency component 3*f1 assuming
  3271.  
  3272.           that f2
  3273.  
  3274.                      is not present.
  3275.  
  3276.               SIM2 - the magnitude of the frequency component f1 + f2.
  3277.  
  3278.               DIM2 - the magnitude of the frequency component f1 - f2.
  3279.  
  3280.               DIM3 - the magnitude of the frequency component 2*f1 - f2.
  3281.  
  3282.  
  3283.                RLOAD is the name of the output load resistor into which all
  3284.  
  3285.           distortion  power  products  are  to  be  computed.  INTER is the
  3286.  
  3287.           interval at which the summary printout of  the  contributions  of
  3288.  
  3289.           all  nonlinear  devices to the total distortion is to be printed.
  3290.  
  3291.           If omitted or set to zero, no  summary  printout  will  be  made.
  3292.  
  3293.           REFPWR is the reference power level used in computing the distor-
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.                                                                          51
  3308.  
  3309.  
  3310.           tion products; if omitted, a value of 1  mW  (that  is,  dbm)  is
  3311.  
  3312.           used.  SKW2 is the ratio of f2 to f1.  If omitted, a value of 0.9
  3313.  
  3314.           is used (i.e., f2 = 0.9*f1).  SPW2 is the amplitude  of  f2.   If
  3315.  
  3316.           omitted, a value of 1.0 is assumed.
  3317.  
  3318.  
  3319.                The distortion measures HD2, HD3, SIM2, DIM2, and  DIM3  may
  3320.  
  3321.           also  be  be  printed  and/or plotted (see the description of the
  3322.  
  3323.           .PRINT and .PLOT cards).
  3324.  
  3325.  
  3326.  
  3327.           9.12.  .NOISE Card
  3328.  
  3329.  
  3330.           General form:
  3331.  
  3332.  
  3333.                .NOISE OUTV INSRC NUMS
  3334.  
  3335.  
  3336.           Examples:
  3337.  
  3338.  
  3339.                .NOISE V(5) VIN 10
  3340.  
  3341.  
  3342.  
  3343.                This card controls the noise analysis of the  circuit.   The
  3344.  
  3345.           noise  analysis  is performed in conjunction with the ac analysis
  3346.  
  3347.           (see .AC card). OUTV is an output voltage which defines the  sum-
  3348.  
  3349.           ming  point.   INSRC  is  the  name of the independent voltage or
  3350.  
  3351.           current source which is the noise input reference.  NUMS  is  the
  3352.  
  3353.           summary interval.  SPICE will compute the equivalent output noise
  3354.  
  3355.           at the specified output as well as the equivalent input noise  at
  3356.  
  3357.           the  specified  input.   In  addition, the contributions of every
  3358.  
  3359.           noise generator in the circuit will be printed at every NUMS fre-
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.                                                                          52
  3374.  
  3375.  
  3376.           quency  points  (the summary interval).  If NUMS is zero, no sum-
  3377.  
  3378.           mary printout will be made.
  3379.  
  3380.  
  3381.                The output noise and the equivalent input noise may also  be
  3382.  
  3383.           printed  and/or  plotted  (see  the description of the .PRINT and
  3384.  
  3385.           .PLOT cards).
  3386.  
  3387.  
  3388.  
  3389.           9.13.  .TRAN Card
  3390.  
  3391.  
  3392.           General form:
  3393.  
  3394.  
  3395.                .TRAN TSTEP TSTOP <TSTART <TMAX>> <UIC>
  3396.  
  3397.  
  3398.           Examples:
  3399.  
  3400.  
  3401.                .TRAN 1NS 100NS
  3402.                .TRAN 1NS 1000NS 500NS
  3403.                .TRAN 10NS 1US UIC
  3404.  
  3405.  
  3406.  
  3407.                TSTEP is the printing or plotting increment for line-printer
  3408.  
  3409.           output.   For use with the post-processor, TSTEP is the suggested
  3410.  
  3411.           computing increment.  TSTOP is the final time, and TSTART is  the
  3412.  
  3413.           initial  time.   If  TSTART is omitted, it is assumed to be zero.
  3414.  
  3415.           The transient analysis always begins at time zero.  In the inter-
  3416.  
  3417.           val  <zero,  TSTART>,  the circuit is analyzed (to reach a steady
  3418.  
  3419.           state), but no outputs are  stored.   In  the  interval  <TSTART,
  3420.  
  3421.           TSTOP>,  the circuit is analyzed and outputs are stored.  TMAX is
  3422.  
  3423.           the maximum stepsize that SPICE will use (for default,  the  pro-
  3424.  
  3425.           gram  chooses  either  TSTEP or (TSTOP-TSTART)/50.0, whichever is
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.                                                                          53
  3440.  
  3441.  
  3442.           smaller.  TMAX is useful when one wishes to guarantee a computing
  3443.  
  3444.           interval which is smaller than the printer increment, TSTEP.
  3445.  
  3446.  
  3447.                UIC (use initial conditions) is an  optional  keyword  which
  3448.  
  3449.           indicates  that  the  user  does  not want SPICE to solve for the
  3450.  
  3451.           quiescent  operating  point  before   beginning   the   transient
  3452.  
  3453.           analysis.   If  this  keyword is specified, SPICE uses the values
  3454.  
  3455.           specified using IC=... on the various  elements  as  the  initial
  3456.  
  3457.           transient  condition  and proceeds with the analysis.  If the .IC
  3458.  
  3459.           card has been specified, then the node voltages on the  .IC  card
  3460.  
  3461.           are  used  to  compute  the  intitial conditions for the devices.
  3462.  
  3463.           Look at the description on the .IC card  for  its  interpretation
  3464.  
  3465.           when UIC is not specified.
  3466.  
  3467.  
  3468.  
  3469.           9.14.  .FOUR Card
  3470.  
  3471.  
  3472.           General form:
  3473.  
  3474.  
  3475.                .FOUR FREQ OV1 <OV2 OV3 ...>
  3476.  
  3477.  
  3478.           Examples:
  3479.  
  3480.  
  3481.                .FOUR 100K  V(5)
  3482.  
  3483.  
  3484.  
  3485.                This card controls whether SPICE performs a Fourier analysis
  3486.  
  3487.           as  a  part  of  the transient analysis.  FREQ is the fundamental
  3488.  
  3489.           frequency, and OV1, ..., are the output variables for  which  the
  3490.  
  3491.           analysis  is desired.  The Fourier analysis is performed over the
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.                                                                          54
  3506.  
  3507.  
  3508.           interval <TSTOP-period, TSTOP>, where TSTOP  is  the  final  time
  3509.  
  3510.           specified for the transient analysis, and period is one period of
  3511.  
  3512.           the fundamental frequency.  The dc component and the  first  nine
  3513.  
  3514.           components  are  determined.  For maximum accuracy, TMAX (see the
  3515.  
  3516.           .TRAN card) should be set  to  period/100.0  (or  less  for  very
  3517.  
  3518.           high-Q circuits).
  3519.  
  3520.  
  3521.  
  3522.           9.15.  .PRINT Cards
  3523.  
  3524.  
  3525.           General form:
  3526.  
  3527.  
  3528.                .PRINT PRTYPE OV1 <OV2 ... OV8>
  3529.  
  3530.  
  3531.           Examples:
  3532.  
  3533.  
  3534.                .PRINT TRAN V(4) I(VIN)
  3535.                .PRINT AC VM(4,2) VR(7) VP(8,3)
  3536.                .PRINT DC V(2) I(VSRC) V(23,17)
  3537.                .PRINT NOISE INOISE
  3538.                .PRINT DISTO HD3 SIM2(DB)
  3539.  
  3540.  
  3541.  
  3542.                This card defines the contents of a tabular listing  of  one
  3543.  
  3544.           to  eight  output  variables.  PRTYPE is the type of the analysis
  3545.  
  3546.           (DC, AC, TRAN, NOISE, or DISTO) for which the  specified  outputs
  3547.  
  3548.           are  desired. The form for voltage or current output variables is
  3549.  
  3550.           as follows:
  3551.  
  3552.  
  3553.  
  3554.           V(N1<,N2>)
  3555.  
  3556.                     specifies the voltage difference between nodes  N1  and
  3557.  
  3558.                     N2.  If N2 (and the preceding comma) is omitted, ground
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.                                                                          55
  3572.  
  3573.  
  3574.                     (0) is assumed.  For the ac analysis,  five  additional
  3575.  
  3576.                     outputs can be accessed by replacing the letter V by:
  3577.  
  3578.  
  3579.  
  3580.                                  VR  -    real part
  3581.                                  VI  -    imaginary part
  3582.                                  VM  -    magnitude
  3583.                                  VP  -    phase
  3584.                                  VDB -    20*log10(magnitude)
  3585.  
  3586.  
  3587.  
  3588.  
  3589.           I(VXXXXXXX)
  3590.  
  3591.                     specifies the current flowing in the  independent  vol-
  3592.  
  3593.                     tage  source  named  VXXXXXXX.   Positive current flows
  3594.  
  3595.                     from the positive node,  through  the  source,  to  the
  3596.  
  3597.                     negative  node.  For the ac analysis, the corresponding
  3598.  
  3599.                     replacements for the letter I may be made in  the  same
  3600.  
  3601.                     way as described for voltage outputs.
  3602.  
  3603.  
  3604.  
  3605.                Output variables for the noise and distortion analyses  have
  3606.  
  3607.           a different general form from that of the other analyses, i.e.
  3608.  
  3609.  
  3610.                                 OV<(X)>
  3611.  
  3612.  
  3613.           where OV is any of  ONOISE  (output  noise),  INOISE  (equivalent
  3614.  
  3615.           input  noise),  D2,  HD3, SIM2, DIM2, or DIM3 (see description of
  3616.  
  3617.           distortion analysis), and X may be any of:
  3618.  
  3619.  
  3620.                   R  -    real part
  3621.                   I  -    imaginary part
  3622.                   M  -    magnitude (default if nothing specified)
  3623.                   P  -    phase
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.                                                                          56
  3638.  
  3639.  
  3640.                   DB -    20*log10(magnitude)
  3641.  
  3642.  
  3643.           thus, SIM2 (or SIM2(M)) describes the magnitude of the SIM2  dis-
  3644.  
  3645.           tortion  measure, while HD2(R) describes the real part of the HD2
  3646.  
  3647.           distortion measure.
  3648.  
  3649.  
  3650.                There is no limit on the number of  .PRINT  cards  for  each
  3651.  
  3652.           type of analysis.
  3653.  
  3654.  
  3655.  
  3656.           9.16.  .PLOT Cards
  3657.  
  3658.  
  3659.           General form:
  3660.  
  3661.  
  3662.                .PLOT PLTYPE OV1 <(PLO1,PHI1)> <OV2 <(PLO2,PHI2)> ... OV8>
  3663.  
  3664.  
  3665.           Examples:
  3666.  
  3667.  
  3668.                .PLOT DC V(4) V(5) V(1)
  3669.                .PLOT TRAN V(17,5) (2,5) I(VIN) V(17) (1,9)
  3670.                .PLOT AC VM(5) VM(31,24) VDB(5) VP(5)
  3671.                .PLOT DISTO HD2 HD3(R) SIM2
  3672.                .PLOT TRAN V(5,3) V(4) (0,5) V(7) (0,10)
  3673.  
  3674.  
  3675.  
  3676.                This card defines the contents of one plot of  from  one  to
  3677.  
  3678.           eight  output variables.  PLTYPE is the type of analysis (DC, AC,
  3679.  
  3680.           TRAN, NOISE, or  DISTO)  for  which  the  specified  outputs  are
  3681.  
  3682.           desired.   The  syntax  for  the OVI is identical to that for the
  3683.  
  3684.           .PRINT card, described above.
  3685.  
  3686.  
  3687.                The optional plot limits (PLO,PHI) may  be  specified  after
  3688.  
  3689.           any of the output variables.  All output variables to the left of
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.                                                                          57
  3704.  
  3705.  
  3706.           a pair of plot limits (PLO,PHI) will be plotted  using  the  same
  3707.  
  3708.           lower  and  upper plot bounds.  If plot limits are not specified,
  3709.  
  3710.           SPICE will automatically determine the minimum and maximum values
  3711.  
  3712.           of  all output variables being plotted and scale the plot to fit.
  3713.  
  3714.           More than one scale will be used if the  output  variable  values
  3715.  
  3716.           warrant  (i.e.,  mixing  output  variables  with values which are
  3717.  
  3718.           orders-of-magnitude different still gives readable plots).
  3719.  
  3720.  
  3721.                The overlap of two or more traces on any plot  is  indicated
  3722.  
  3723.           by the letter X.
  3724.  
  3725.  
  3726.                When more than one output variable appears on the same plot,
  3727.  
  3728.           the  first variable specified will be printed as well as plotted.
  3729.  
  3730.           If a printout of all  variables  is  desired,  then  a  companion
  3731.  
  3732.           .PRINT card should be included.
  3733.  
  3734.  
  3735.                There is no limit on the number of .PLOT cards specified for
  3736.  
  3737.           each type of analysis.
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.                                                                          58
  3770.  
  3771.  
  3772.           10.  APPENDIX A:  EXAMPLE DATA DECKS
  3773.  
  3774.  
  3775.  
  3776.           10.1.  Circuit 1
  3777.  
  3778.  
  3779.  
  3780.                The following deck determines the  dc  operating  point  and
  3781.  
  3782.           small-signal transfer function of a simple differential pair.  In
  3783.  
  3784.           addition, the ac small-signal response is computed over the  fre-
  3785.  
  3786.           quency range 1Hz to 100MEGHz.
  3787.  
  3788.  
  3789.               SIMPLE DIFFERENTIAL PAIR
  3790.               VCC 7 0 12
  3791.               VEE 8 0 -12
  3792.               VIN 1 0 AC 1
  3793.               RS1 1 2 1K
  3794.               RS2 6 0 1K
  3795.               Q1 3 2 4 MOD1
  3796.               Q2 5 6 4 MOD1
  3797.               RC1 7 3 10K
  3798.               RC2 7 5 10K
  3799.               RE 4 8 10K
  3800.                .MODEL MOD1 NPN BF=50 VAF=50 IS=1.E-12 RB=100 CJC=.5PF TF=.6NS
  3801.                .TF V(5) VIN
  3802.                .AC DEC 10 1 100MEG
  3803.                .PLOT AC VM(5) VP(5)
  3804.                .PRINT AC VM(5) VP(5)
  3805.                .END
  3806.  
  3807.  
  3808.  
  3809.  
  3810.           10.2.  Circuit 2
  3811.  
  3812.           The following deck computes the output characteristics of a  MOS-
  3813.  
  3814.           FET device over the range 0-10V for VDS and 0-5V for VGS.
  3815.  
  3816.  
  3817.  
  3818.                MOS OUTPUT CHARACTERISTICS
  3819.                .OPTIONS NODE NOPAGE
  3820.                VDS 3 0
  3821.                VGS 2 0
  3822.                M1 1 2 0 0 MOD1 L=4U W=6U AD=10P AS=10P
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.                                                                          59
  3836.  
  3837.  
  3838.                .MODEL MOD1 NMOS VTO=-2 NSUB=1.0E15 UO=550
  3839.                * VIDS MEASURES ID, WE COULD HAVE USED VDS, BUT ID WOULD BE NEGATIVE
  3840.                VIDS 3 1
  3841.                .DC VDS 0 10 .5 VGS 0 5 1
  3842.                .PRINT DC I(VIDS) V(2)
  3843.                .PLOT DC I(VIDS)
  3844.                .END
  3845.  
  3846.  
  3847.  
  3848.  
  3849.  
  3850.  
  3851.  
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.                                                                          60
  3902.  
  3903.  
  3904.           10.3.  Circuit 3
  3905.  
  3906.  
  3907.  
  3908.                The following deck determines the dc transfer curve and  the
  3909.  
  3910.           transient  pulse response of a simple RTL inverter.  The input is
  3911.  
  3912.           a pulse from 0 to 5 Volts with delay, rise, and fall times of 2ns
  3913.  
  3914.           and a pulse width of 30ns.  The transient interval is 0 to 100ns,
  3915.  
  3916.           with printing to be done every nanosecond.
  3917.  
  3918.  
  3919.  
  3920.                SIMPLE RTL INVERTER
  3921.                VCC 4 0 5
  3922.                VIN 1 0 PULSE 0 5 2NS 2NS 2NS 30NS
  3923.                RB 1 2 10K
  3924.                Q1 3 2 0 Q1
  3925.                RC 3 4 1K
  3926.                .PLOT DC V(3)
  3927.                .PLOT TRAN V(3) (0,5)
  3928.                .PRINT TRAN V(3)
  3929.                .MODEL Q1 NPN BF 20 RB 100 TF .1NS CJC 2PF
  3930.                .DC VIN 0 5 0.1
  3931.                .TRAN 1NS 100NS
  3932.                .END
  3933.  
  3934.  
  3935.  
  3936.  
  3937.           10.4.  Circuit 4
  3938.  
  3939.  
  3940.                The following deck simulates a four-bit binary adder,  using
  3941.  
  3942.           several  subcircuits  to  describe  various pieces of the overall
  3943.  
  3944.           circuit.
  3945.  
  3946.  
  3947.  
  3948.               ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER
  3949.  
  3950.                    *** SUBCIRCUIT DEFINITIONS
  3951.  
  3952.                .SUBCKT NAND 1 2 3 4
  3953.                     *   NODES:  INPUT(2), OUTPUT, VCC
  3954.                Q1 9 5 1 QMOD
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.                                                                          61
  3968.  
  3969.  
  3970.                D1CLAMP 0 1 DMOD
  3971.                Q2 9 5 2 QMOD
  3972.                D2CLAMP 0 2 DMOD
  3973.                RB 4 5 4K
  3974.                R1 4 6 1.6K
  3975.                Q3 6 9 8 QMOD
  3976.                R2 8 0 1K
  3977.                RC 4 7 130
  3978.                Q4 7 6 10 QMOD
  3979.                DVBEDROP 10 3 DMOD
  3980.                Q5 3 8 0 QMOD
  3981.                .ENDS NAND
  3982.                .SUBCKT ONEBIT 1 2 3 4 5 6
  3983.                     *   NODES:  INPUT(2), CARRY-IN, OUTPUT, CARRY-OUT, VCC
  3984.                X1 1 2 7 6 NAND
  3985.                X2 1 7 8 6 NAND
  3986.                X3 2 7 9 6 NAND
  3987.                X4 8 9 10 6 NAND
  3988.                X5 3 10 11 6 NAND
  3989.                X6 3 11 12 6 NAND
  3990.                X7 10 11 13 6 NAND
  3991.                X8 12 13 4 6 NAND
  3992.                X9 11 7 5 6 NAND
  3993.                .ENDS ONEBIT
  3994.                .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9
  3995.                     *   NODES:  INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1,
  3996.                     *           CARRY-IN, CARRY-OUT, VCC
  3997.                X1 1 2 7 5 10 9 ONEBIT
  3998.                X2 3 4 10 6 8 9 ONEBIT
  3999.                .ENDS TWOBIT
  4000.  
  4001.                .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  4002.                    *   NODES:  INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2),
  4003.                    *           OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN, CARRY-OUT, VCC
  4004.                X1 1 2 3 4 9 10 13 16 15 TWOBIT
  4005.                X2 5 6 7 8 11 12 16 14 15 TWOBIT
  4006.                .ENDS FOURBIT
  4007.  
  4008.                    *** DEFINE NOMINAL CIRCUIT
  4009.  
  4010.                .MODEL DMOD D
  4011.                .MODEL QMOD NPN(BF=75 RB=100 CJE=1PF CJC=3PF)
  4012.                VCC 99 0 DC 5V
  4013.                VIN1A 1 0 PULSE(0 3 0 10NS 10NS   10NS   50NS)
  4014.                VIN1B 2 0 PULSE(0 3 0 10NS 10NS   20NS  100NS)
  4015.                VIN2A 3 0 PULSE(0 3 0 10NS 10NS   40NS  200NS)
  4016.                VIN2B 4 0 PULSE(0 3 0 10NS 10NS   80NS  400NS)
  4017.                VIN3A 5 0 PULSE(0 3 0 10NS 10NS  160NS  800NS)
  4018.                VIN3B 6 0 PULSE(0 3 0 10NS 10NS  320NS 1600NS)
  4019.                VIN4A 7 0 PULSE(0 3 0 10NS 10NS  640NS 3200NS)
  4020.                VIN4B 8 0 PULSE(0 3 0 10NS 10NS 1280NS 6400NS)
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.                                                                          62
  4034.  
  4035.  
  4036.                X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT
  4037.                RBIT0 9 0 1K
  4038.                RBIT1 10 0 1K
  4039.                RBIT2 11 0 1K
  4040.                RBIT3 12 0 1K
  4041.                RCOUT 13 0 1K
  4042.                .PLOT TRAN V(1) V(2) V(3) V(4) V(5) V(6) V(7) V(8)
  4043.                .PLOT TRAN V(9) V(10) V(11) V(12) V(13)
  4044.                .PRINT TRAN V(1) V(2) V(3) V(4) V(5) V(6) V(7) V(8)
  4045.                .PRINT TRAN V(9) V(10) V(11) V(12) V(13)
  4046.  
  4047.                    *** (FOR THOSE WITH MONEY (AND MEMORY) TO BURN)
  4048.                .TRAN 1NS 6400NS
  4049.  
  4050.                .OPTIONS ACCT LIST NODE LIMPTS=6401
  4051.                .END
  4052.  
  4053.  
  4054.  
  4055.  
  4056.           10.5.  Circuit 5
  4057.  
  4058.  
  4059.  
  4060.                The following deck simulates a  transmission-line  inverter.
  4061.  
  4062.           Two transmission-line elements are required since two propagation
  4063.  
  4064.           modes are excited.  In the case of a coaxial line, the first line
  4065.  
  4066.           (T1)  models  the inner conductor with respect to the shield, and
  4067.  
  4068.           the second line (T2) models the shield with respect to  the  out-
  4069.  
  4070.           side world.
  4071.  
  4072.  
  4073.  
  4074.               TRANSMISSION-LINE INVERTER
  4075.               V1 1 0 PULSE(0 1 0 0.1N)
  4076.               R1 1 2 50
  4077.               X1 2 0 0 4 TLINE
  4078.               R2 4 0 50
  4079.                .SUBCKT TLINE 1 2 3 4
  4080.               T1 1 2 3 4 Z0=50 TD=1.5NS
  4081.               T2 2 0 4 0 Z0=100 TD=1NS
  4082.                .ENDS TLINE
  4083.                .TRAN 0.1NS 20NS
  4084.                .PLOT TRAN V(2) V(4)
  4085.                .END
  4086.  
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.                                                                          63
  4100.  
  4101.  
  4102.           11.  APPENDIX B:  NONLINEAR DEPENDENT SOURCES
  4103.  
  4104.  
  4105.  
  4106.                SPICE allows circuits to contain dependent  sources  charac-
  4107.  
  4108.           terized by any of the four equations
  4109.  
  4110.  
  4111.                   i=f(v)          v=f(v)          i=f(i)          v=f(i)
  4112.  
  4113.  
  4114.           where the functions must be polynomials, and the arguments may be
  4115.  
  4116.           multidimensional.   The  polynomial  functions are specified by a
  4117.  
  4118.           set of coefficients p0, p1, ..., pn.  Both the number  of  dimen-
  4119.  
  4120.           sions  and the number of coefficients are arbitrary.  The meaning
  4121.  
  4122.           of the coefficients depends upon the dimension of the polynomial,
  4123.  
  4124.           as shown in the following examples:
  4125.  
  4126.  
  4127.                Suppose that the function is  one-dimensional  (that  is,  a
  4128.  
  4129.           function  of one argument).  Then the function value fv is deter-
  4130.  
  4131.           mined by the following expression in fa (the function argument):
  4132.  
  4133.  
  4134.               fv = p0 + (p1*fa) + (p2*fa**2) + (p3*fa**3) + (p4*fa**4)
  4135.  
  4136.  
  4137.                    + (p5*fa**5) + ...
  4138.  
  4139.  
  4140.                Suppose now that the function is two-dimensional, with argu-
  4141.  
  4142.           ments fa and fb.  Then the function value fv is determined by the
  4143.  
  4144.           following expression:
  4145.  
  4146.  
  4147.               fv = p0 + (p1*fa) +  (p2*fb)  +  (p3*fa**2)  +  (p4*fa*fb)  +
  4148.  
  4149.           (p5*fb**2)
  4150.  
  4151.  
  4152.                    +  (p6*fa**3)  +   (p7*fa**2*fb)   +   (p8*fa*fb**2)   +
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.                                                                          64
  4166.  
  4167.  
  4168.           (p9*fb**3) + ...
  4169.  
  4170.  
  4171.                Consider now the  case  of  a  three-dimensional  polynomial
  4172.  
  4173.           function  with arguments fa, fb, and fc.  Then the function value
  4174.  
  4175.           fv is determined by the following expression:
  4176.  
  4177.  
  4178.               fv = p0  +  (p1*fa)  +  (p2*fb)  +  (p3*fc)  +  (p4*fa**2)  +
  4179.  
  4180.           (p5*fa*fb)
  4181.  
  4182.  
  4183.                    + (p6*fa*fc) + (p7*fb**2) + (p8*fb*fc)  +  (p9*fc**2)  +
  4184.  
  4185.           (p10*fa**3)
  4186.  
  4187.  
  4188.                    + (p11*fa**2*fb) + (p12*fa**2*fc) + (p13*fa*fb**2)
  4189.  
  4190.  
  4191.                    + (p14*fa*fb*fc)
  4192.  
  4193.  
  4194.                    +  (p15*fa*fc**2)  +  (p16*fb**3)  +  (p17*fb**2*fc)   +
  4195.  
  4196.           (p18*fb*fc**2)
  4197.  
  4198.  
  4199.                    + (p19*fc**3) + (p20*fa**4) + ...
  4200.  
  4201.  
  4202.                Note:  if the polynomial is one-dimensional and exactly  one
  4203.  
  4204.           coefficient  is specified, then SPICE assumes it to be p1 (and p0
  4205.  
  4206.           = 0.0), in order to facilitate the  input  of  linear  controlled
  4207.  
  4208.           sources.
  4209.  
  4210.  
  4211.                For all four of the dependent sources described  below,  the
  4212.  
  4213.           initial  condition  parameter  is  described as optional.  If not
  4214.  
  4215.           specified, SPICE assumes 0 the initial  condition  for  dependent
  4216.  
  4217.           sources  is  an  initial 'guess' for the value of the controlling
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.                                                                          65
  4232.  
  4233.  
  4234.           variable.  The program uses this initial condition to obtain  the
  4235.  
  4236.           dc  operating  point  of the circuit.  After convergence has been
  4237.  
  4238.           obtained, the program continues iterating  to  obtain  the  exact
  4239.  
  4240.           value  for the controlling variable.  Hence, to reduce the compu-
  4241.  
  4242.           tational effort for the dc operating point (or if the  polynomial
  4243.  
  4244.           specifies  a  strong  nonlinearity),  a value fairly close to the
  4245.  
  4246.           actual controlling variable should be specified for  the  initial
  4247.  
  4248.           condition.
  4249.  
  4250.  
  4251.  
  4252.           11.1.  Voltage-Controlled Current Sources
  4253.  
  4254.  
  4255.           General form:
  4256.  
  4257.  
  4258.               GXXXXXXX N+ N- <POLY(ND)> NC1+ NC1- ... P0 <P1 ...> <IC=...>
  4259.  
  4260.  
  4261.           Examples:
  4262.  
  4263.  
  4264.               G1 1 0 5 3 0 0.1M
  4265.               GR 17 3 17 3 0 1M 1.5M IC=2V
  4266.               GMLT 23 17 POLY(2) 3 5 1 2 0 1M 17M 3.5U IC=2.5, 1.3
  4267.  
  4268.  
  4269.  
  4270.                N+ and N- are the positive and negative nodes, respectively.
  4271.  
  4272.           Current  flow  is  from the positive node, through the source, to
  4273.  
  4274.           the negative node.  POLY(ND) only has  to  be  specified  if  the
  4275.  
  4276.           source is multi-dimensional (one-dimensional is the default).  If
  4277.  
  4278.           specified, ND is the number of dimensions, which  must  be  posi-
  4279.  
  4280.           tive.   NC1+, NC1-, ... Are the positive and negative controlling
  4281.  
  4282.           nodes, respectively.  One pair of nodes  must  be  specified  for
  4283.  
  4284.           each   dimension.   P0,  P1,  P2,  ...,  Pn  are  the  polynomial
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.                                                                          66
  4298.  
  4299.  
  4300.           coefficients.  The (optional) initial condition  is  the  initial
  4301.  
  4302.           guess  at  the  value(s)  of  the controlling voltage(s).  If not
  4303.  
  4304.           specified, 0.0 is assumed.  The polynomial specifies  the  source
  4305.  
  4306.           current  as a function of the controlling voltage(s).  The second
  4307.  
  4308.           example above describes a current source with value
  4309.  
  4310.  
  4311.                   I = 1E-3*V(17,3) + 1.5E-3*V(17,3)**2
  4312.  
  4313.  
  4314.           note that since the source nodes are the same as the  controlling
  4315.  
  4316.           nodes, this source actually models a nonlinear resistor.
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.                                                                          67
  4364.  
  4365.  
  4366.           11.2.  Voltage-Controlled Voltage Sources
  4367.  
  4368.  
  4369.           General form:
  4370.  
  4371.  
  4372.               EXXXXXXX N+ N- <POLY(ND)> NC1+ NC1- ... P0 <P1 ...> <IC=...>
  4373.  
  4374.  
  4375.           Examples:
  4376.  
  4377.  
  4378.               E1 3 4 21 17 10.5 2.1 1.75
  4379.               EX 17 0 POLY(3) 13 0 15 0 17 0 0 1 1 1 IC=1.5,2.0,17.35
  4380.  
  4381.  
  4382.  
  4383.                N+ and N- are the positive and negative nodes, respectively.
  4384.  
  4385.           POLY(ND)  only  has  to  be  specified  if  the  source is multi-
  4386.  
  4387.           dimensional (one-dimensional is the default).  If  specified,  ND
  4388.  
  4389.           is the number of dimensions, which must be positive.  NC1+, NC1-,
  4390.  
  4391.           ... are the positive  and  negative  controlling  nodes,  respec-
  4392.  
  4393.           tively.   One pair of nodes must be specified for each dimension.
  4394.  
  4395.           P0, P1,  P2,  ...,  Pn  are  the  polynomial  coefficients.   The
  4396.  
  4397.           (optional) initial condition is the initial guess at the value(s)
  4398.  
  4399.           of the controlling voltage(s).  If not specified, 0.0 is assumed.
  4400.  
  4401.           The  polynomial specifies the source voltage as a function of the
  4402.  
  4403.           controlling voltage(s).  The second  example  above  describes  a
  4404.  
  4405.           voltage source with value
  4406.  
  4407.  
  4408.                   V = V(13,0) + V(15,0) + V(17,0)
  4409.  
  4410.  
  4411.           (in other words, an ideal voltage summer).
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.                                                                          68
  4430.  
  4431.  
  4432.           11.3.  Current-Controlled Current Sources
  4433.  
  4434.  
  4435.           General form:
  4436.  
  4437.  
  4438.               FXXXXXXX N+ N- <POLY(ND)> VN1 <VN2 ...> P0 <P1 ...> <IC=...>
  4439.  
  4440.  
  4441.           Examples:
  4442.  
  4443.  
  4444.               F1 12 10 VCC 1MA 1.3M
  4445.               FXFER 13 20 VSENS 0 1
  4446.  
  4447.  
  4448.  
  4449.                N+ and N- are the positive and negative nodes, respectively.
  4450.  
  4451.           Current  flow  is  from the positive node, through the source, to
  4452.  
  4453.           the negative node.  POLY(ND) only has  to  be  specified  if  the
  4454.  
  4455.           source is multi-dimensional (one-dimensional is the default).  If
  4456.  
  4457.           specified, ND is the number of dimensions, which  must  be  posi-
  4458.  
  4459.           tive.   VN1,  VN2,  ...  are the names of voltage sources through
  4460.  
  4461.           which the controlling current flows;  one name must be  specified
  4462.  
  4463.           for  each  dimension.   The  direction  of  positive  controlling
  4464.  
  4465.           current flow is from the positive node, through  the  source,  to
  4466.  
  4467.           the  negative  node  of each voltage source.  P0, P1, P2, ..., Pn
  4468.  
  4469.           are the polynomial coefficients.  The (optional)  initial  condi-
  4470.  
  4471.           tion  is  the  initial  guess  at the value(s) of the controlling
  4472.  
  4473.           current(s) (in Amps).  If not specified,  0.0  is  assumed.   The
  4474.  
  4475.           polynomial specifies the source current as a function of the con-
  4476.  
  4477.           trolling current(s).  The first example above describes a current
  4478.  
  4479.           source with value
  4480.  
  4481.  
  4482.                   I = 1E-3 + 1.3E-3*I(VCC)
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.                                                                          69
  4496.  
  4497.  
  4498.           11.4.  Current-Controlled Voltage Sources
  4499.  
  4500.  
  4501.           General form:
  4502.  
  4503.  
  4504.               HXXXXXXX N+ N- <POLY(ND)> VN1 <VN2 ...> P0 <P1 ...> <IC=...>
  4505.  
  4506.  
  4507.           Examples:
  4508.  
  4509.  
  4510.               HXY 13 20 POLY(2) VIN1 VIN2 0 0 0 0 1 IC=0.5 1.3
  4511.               HR 4 17 VX 0 0 1
  4512.  
  4513.  
  4514.  
  4515.                N+ and N- are the positive and negative nodes, respectively.
  4516.  
  4517.           POLY(ND)  only  has  to  be  specified  if  the  source is multi-
  4518.  
  4519.           dimensional (one-dimensional is the default).  If  specified,  ND
  4520.  
  4521.           is  the  number of dimensions, which must be positive.  VN1, VN2,
  4522.  
  4523.           ... are the names of voltage sources through which  the  control-
  4524.  
  4525.           ling  current  flows;  one name must be specified for each dimen-
  4526.  
  4527.           sion.  The direction of positive controlling current flow is from
  4528.  
  4529.           the  positive  node,  through the source, to the negative node of
  4530.  
  4531.           each voltage source.  P0, P1, P2,  ...,  Pn  are  the  polynomial
  4532.  
  4533.           coefficients.   The  (optional)  initial condition is the initial
  4534.  
  4535.           guess at the value(s) of the controlling  current(s)  (in  Amps).
  4536.  
  4537.           If  not  specified, 0.0 is assumed.  The polynomial specifies the
  4538.  
  4539.           source voltage as a function of the controlling current(s).   The
  4540.  
  4541.           first example above describes a voltage source with value
  4542.  
  4543.  
  4544.                   V = I(VIN1)*I(VIN2)
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.                                                                          70
  4562.  
  4563.  
  4564.           12. APPENDIX C: BIPOLAR MODEL EQUATIONS
  4565.  
  4566.  
  4567.               (G    terms omitted)
  4568.                 min
  4569.  
  4570.  
  4571.           Acknowledgment: This section has been contributed by Bill  Bider-
  4572.  
  4573.           mann at HP labs.
  4574.  
  4575.  
  4576.           12.1  D.C. MODEL
  4577.  
  4578.                          qVB'E'    qVB'C'        qVB'C'           qVB'C'
  4579.                    IS    ______    ______        ______           ______
  4580.                    __    NF*kT     NR*kT   IS    NR*kT            NC*kT
  4581.               IC = QB( e       - e       )-  ( e       -1)-ISC( e       -1)
  4582.                                            BR
  4583.  
  4584.                          qVB'E'          qVB'C'           qVB'E'           qVB'C'
  4585.                    IS    NF*kT     IS    NR*kT            NE*kT            NC*kT
  4586.               IB =   ( e       -1)+__( e       -1)+ISE( e       -1)+ISC( e       -1)
  4587.                    BF              BR
  4588.  
  4589.           NOTE: The last two terms in the expression of the base current IB
  4590.  
  4591.           represent  the  components  due to recombination in the BE and BC
  4592.  
  4593.           space charge regions at low injection.
  4594.  
  4595.  
  4596.           If IRB not specified
  4597.  
  4598.                        RB-RBM
  4599.             RBB' = RBM+
  4600.                          QB
  4601.  
  4602.           If IRB specified
  4603.  
  4604.                                ____TAN(Z)-Z___
  4605.             RBB' = 3(RB-RBM) *                +RBM
  4606.                                Z*TAN(Z)*TAN(Z)
  4607.  
  4608.           Where:
  4609.  
  4610.                           -1+(144IB/(pi*pi*IRB)+1)**0.5
  4611.                      Z =
  4612.                             24/(pi*pi)*(IB/IRB)**0.5
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.                                                                          71
  4627.  
  4628.                     Q1
  4629.               QB =    (1+(1+4Q2)**0.5)
  4630.                     2
  4631.  
  4632.                          1
  4633.                    _____________
  4634.               Q1 =   VB'C' VB'E'
  4635.                    1-_____-_____
  4636.                       VAF   VAR
  4637.  
  4638.                           qVB'E'           qVB'C'
  4639.                     IS    ______           ______
  4640.                    ___    NF*kT     _IS    NR*kT
  4641.               Q2 = IKF( e       -1)+   ( e       -1)
  4642.                                     IKR
  4643.  
  4644.           NOTE: IRB is the current where the base resistance falls  halfway
  4645.  
  4646.           to  its minimum value.  VAF and VAR are forward and reverse Early
  4647.  
  4648.           voltages respectively.  IKF and IKR determine  the  high  current
  4649.  
  4650.           beta  rolloff  with  IC.   ISE,  ISC, NE and NC determine the low
  4651.  
  4652.           current beta rolloff with IC.
  4653.  
  4654.  
  4655.           12.2  A.C. MODEL
  4656.  
  4657.                                        qVB'E'
  4658.                     ___d___      IS    NF*kT             VB'E'
  4659.               CBE =        ( TFF*__( e       -1))+CJE( 1-_____)-MJ
  4660.                     d VB'E'      QB                       VJE
  4661.  
  4662.           Where:
  4663.  
  4664.                                                                VB'C'
  4665.                                                               _______
  4666.                                                         2     1.44VTF
  4667.                       TFF = TF ( 1 + XTF * (IF/(IF+ITF))  * e        )
  4668.  
  4669.                                  qVB'E'
  4670.                                  ______
  4671.                                  NF*kT
  4672.                       IF = IS( e       -1)
  4673.  
  4674.  
  4675.               CB1 = CBC*(1-XCJC)
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.                                                                          72
  4692.  
  4693.  
  4694.               CB2 = CBC * XCJC
  4695.  
  4696.                                qVB'C'
  4697.                                ______
  4698.                         _qIS_    kT            VB'C' -MJC
  4699.               CBC = TR (      e      )+CJC ( 1-     )
  4700.                         NR*kT                   VJC
  4701.  
  4702.                            VC'S' -MJS
  4703.               CSS = CJS (1-     )
  4704.                             VJS
  4705.                                                              _V_ -M
  4706.           NOTE: all junction capacitances of the form  C0*(1-   )    revert
  4707.                                                              phi
  4708.           to the form
  4709.  
  4710.  
  4711.                                                 M*(V-FC*phi)
  4712.                        C0/((1-FC)**M)  *  (1 +              )
  4713.                                                  phi(1-FC)
  4714.           when V > FC*phi   ( For CSS assumes FC = 0 )
  4715.  
  4716.  
  4717.           12.3  NOISE MODEL
  4718.  
  4719.  
  4720.                      4kT
  4721.                 2   ____
  4722.           IRBB'   = RBB' DELTA f
  4723.                                 |
  4724.                                 |
  4725.                                 |
  4726.                      4kT        |
  4727.                 2    ___        |
  4728.             IRC   =  RC  DELTA f|   Thermal nois*
  4729.                                 |
  4730.                                 |
  4731.                                 |
  4732.                      4kT        |KF*IB**AF
  4733.                 2    ___        |_________
  4734.             IRE   = 2REB DELTA f+    f     DELTA f
  4735.  
  4736.  
  4737.  
  4738.  
  4739.           Note: The first term is shot noise and the second term is flicker
  4740.  
  4741.           noise.
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.                                                                          73
  4758.  
  4759.                 2
  4760.             ICN   = 2qIC DELTA f
  4761.  
  4762.           Note: This is shot noise.
  4763.  
  4764.  
  4765.           12.4  TEMPERATURE EFFECTS
  4766.  
  4767.           All junctions have dependences identical  to the diode model  but
  4768.  
  4769.           all N factors are considered equal 1.
  4770.  
  4771.                                T
  4772.            BF and  BR go as (____)XTB
  4773.                              TNOM
  4774.  
  4775.            when NF=1.  This is done through appropriate changes in  BF , BR
  4776.  
  4777.           and ISE, ISC according to the following equations respectively:
  4778.  
  4779.                                            T
  4780.                                          ____ XTB
  4781.               BF' (or BR') = BF (or BR)*(TNOM)
  4782.  
  4783.  
  4784.                                                                 qEG T-TNOM
  4785.                                                                 ___ ______
  4786.                                               __T_ (XTI-XTB)    Nk  T*TNOM
  4787.               ISE' (or ISC') = ISE (or ISC) *(    )          *e
  4788.                                               TNOM
  4789.  
  4790.           12.5  EXCESS PHASE
  4791.  
  4792.  
  4793.           This is a  delay  (linear  phase)  in  the  gm  generator  in  AC
  4794.  
  4795.           analysis.   It  is also used in transient analysis using a Bessel
  4796.  
  4797.           polynomial approximation.  Excess phase, PTF, is specified as the
  4798.  
  4799.           number of extra degrees of phase at the frequency
  4800.  
  4801.                                         1
  4802.                                   f = _____  Hertz
  4803.                                       2piTF
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.                                                                          74
  4823.  
  4824.  
  4825.           12.   APPENDIX  D:    ALTER  STATEMENT  AND  THE  SOURCE-STEPPING
  4826.  
  4827.           METHOD
  4828.  
  4829.  
  4830.  
  4831.                The ALTER statement allows SPICE to run with altered circuit
  4832.  
  4833.           parameters.
  4834.  
  4835.  
  4836.           General form:
  4837.  
  4838.  
  4839.                .ALTER
  4840.                ELEMENT CARDS (DEVICE CARDS, MODEL CARDS)
  4841.                .ALTER (or .END CARD)
  4842.  
  4843.  
  4844.  
  4845.           Examples:
  4846.  
  4847.  
  4848.  
  4849.                R1 1 0 5K
  4850.                VCC 3 0 10
  4851.                M1 3 2 0 MOD1 L=5U W=2U
  4852.                .MODEL MOD1 NMOS(VTO=1.0 KP=2.0E-5 PHI=0.6 NSUB=2.0E15 TOX=0.1U)
  4853.                .ALTER
  4854.                R1 1 0 3.5K
  4855.                VCC 3 0 12
  4856.                M1 3 2 0 MOD1 L=10U W=2U
  4857.                .MODEL MOD1 NMOS(VTO=1.2 KP=2.0E-5 PHI=0.6 NSUB=5.0E15 TOX=1.5U)
  4858.                .ALTER
  4859.                M1 3 2 0 MOD1 L=10U W=4U
  4860.                .END
  4861.  
  4862.  
  4863.  
  4864.                This card introduces the element(s), device(s) and  model(s)
  4865.  
  4866.           whose  parameters  are  changed during the execution of the input
  4867.  
  4868.           deck.  The analyses specified in the deck will start  over  again
  4869.  
  4870.           with  the  changed  parameters.  The  .ALTER  card with the cards
  4871.  
  4872.           defining the new parameters should be placed just before the .END
  4873.  
  4874.           card.  The syntax for the element (device, model) cards is ident-
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.                                                                          75
  4889.  
  4890.  
  4891.           ical to that of the cards with the original parameters.
  4892.  
  4893.  
  4894.                There is no limit on the number of .ALTER cards and the cir-
  4895.  
  4896.           cuit  will  be  re-analyzed as many times as the number of .ALTER
  4897.  
  4898.           cards.  Subsequent ALTER operations employ parameters of the pre-
  4899.  
  4900.           vious change.  No topological change of the circuit is allowed.
  4901.  
  4902.  
  4903.  
  4904.                The source-stepping method can enhance DC convergence.   But
  4905.  
  4906.           it  is  slower  than  direct  use  of  the Newton-Raphson method.
  4907.  
  4908.           Therefore it is best used as an alternative  to  achieve  conver-
  4909.  
  4910.           gence of DC operating point when the circuit fails to converge by
  4911.  
  4912.           using the Newton-Raphson method.  The source-stepping  method  is
  4913.  
  4914.           used  by SPICE when the variable ITL6 in the .OPTIONS card is set
  4915.  
  4916.           to the iteration limit at each step of the source(s).
  4917.  
  4918.  
  4919.           For example,
  4920.  
  4921.  
  4922.                .OPTIONS ITL6=30
  4923.  
  4924.  
  4925.           will cause SPICE to use  source-stepping  method  with  iteration
  4926.  
  4927.           limit  30 at each step.  By default, ITL6 is 0 which means to use
  4928.  
  4929.           the Newton-Raphson method directly.
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.