home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / education / n / spice / docs / Spice < prev   
Text File  |  1988-01-27  |  95KB  |  3,829 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                                                           1
  8.  
  9.  
  10.                                SPICE 3A6 User's Guide
  11.  
  12.                                   December 15, 1985
  13.  
  14.                                      T. Quarles
  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.                 ____________________________________________________
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                                                           2
  74.  
  75.  
  76.                |                                                   |
  77.                |                    Please Note                    |
  78.                |                                                   |
  79.                |                                                   |
  80.                |      This is an update to  the  first  release  of|
  81.                | SPICE3  and the development of SPICE and its algo-|
  82.                | rithms is ongoing at Berkeley.   We  believe  that|
  83.                | all of the features described here are fully func-|
  84.                | tional; however, not all of the intended capabili-|
  85.                | ties  of the program have been implemented in full|
  86.                | yet.  Please mail any reports of suspected bugs in|
  87.                | the  program or suggested enhancements to the pro-|
  88.                | gram to:                                          |
  89.                |                                                   |
  90.                |     EECS/ERL Industrial Support Office            |
  91.                |     461 Cory Hall                                 |
  92.                |     U.C. Berkeley                                 |
  93.                |     Berkeley, Ca.   94720                         |
  94.                |                                                   |
  95.                |     or by electronic mail to:                     |
  96.                |                                                   |
  97.                |         spice@cad.BERKELEY.EDU  (ARPAnet, CSnet)  |
  98.                |         ucbvax!ucbcad!spice  (UUCPnet)            |
  99.                |                                                   |
  100.                |                                                   |
  101.                |      Please include input to the program, out-    |
  102.                | put,  suggestions  as to where the problem may    |
  103.                | be, and if possible, a suggested fix!             |
  104.                |                                                   |
  105.                |      SPICE3 has been in beta-test since  April    |
  106.                | 1985 and has been in use at over twenty sites.    |
  107.                | This version is the result of our own work  at    |
  108.                | Berkeley  and  the  feedback  we have received    |
  109.                | from our beta sites. We thank them  for  their    |
  110.                | help.                                             |
  111.                |___________________________________________________|
  112.  
  113.  
  114.  
  115.  
  116.                SPICE is a general-purpose circuit  simulation  program  for
  117.  
  118.           nonlinear  dc, nonlinear transient, and linear ac analyses.  Cir-
  119.  
  120.           cuits may contain resistors, capacitors, inductors, mutual induc-
  121.  
  122.           tors,  independent  voltage  and  current  sources, four types of
  123.  
  124.           dependent sources, transmission lines, and the four  most  common
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.                                                                           3
  140.  
  141.  
  142.           semiconductor devices:  diodes, BJT's, JFET's, and MOSFET's.
  143.  
  144.  
  145.                The SPICE3 version is based directly on SPICE  2G.6.   While
  146.  
  147.           SPICE3  is  being developed to include new features, it will con-
  148.  
  149.           tinue to support those capabilities and models  which  remain  in
  150.  
  151.           extensive use in the SPICE2 program.
  152.  
  153.  
  154.                SPICE has built-in models for the semiconductor devices, and
  155.  
  156.           the  user need specify only the pertinent model parameter values.
  157.  
  158.           The model for the BJT is based on the integral  charge  model  of
  159.  
  160.           Gummel and Poon;  however, if the Gummel- Poon parameters are not
  161.  
  162.           specified, the model reduces to the simpler Ebers-Moll model.  In
  163.  
  164.           either  case,  charge  storage  effects, ohmic resistances, and a
  165.  
  166.           current-dependent output conductance may be included.  The  diode
  167.  
  168.           model  can be used for either junction diodes or Schottky barrier
  169.  
  170.           diodes.  The JFET model is based on the FET model of Shichman and
  171.  
  172.           Hodges.  Four MOSFET models are implemented: MOS1 is described by
  173.  
  174.           a square-law I-V characteristic, MOS2[1] is an analytical  model,
  175.  
  176.           while MOS3[1] is a semi-empirical model, and MOS4[2,3] is the new
  177.  
  178.           BSIM (Berkeley Short-channel IGFET Model).  MOS2, MOS3, and  MOS4
  179.  
  180.           include  second-order  effects such as channel length modulation,
  181.  
  182.           subthreshold conduction, scattering limited velocity  saturation,
  183.  
  184.           small-size effects, and charge-controlled capacitances.
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                                                                           4
  206.  
  207.  
  208.           1.  TYPES OF ANALYSIS
  209.  
  210.  
  211.  
  212.           1.1.  DC Analysis
  213.  
  214.  
  215.  
  216.                The dc analysis portion of SPICE determines the dc operating
  217.  
  218.           point  of  the  circuit  with  inductors  shorted  and capacitors
  219.  
  220.           opened.  A dc analysis is  automatically  performed  prior  to  a
  221.  
  222.           transient analysis to determine the transient initial conditions,
  223.  
  224.           and prior to an ac small-signal analysis to determine the linear-
  225.  
  226.           ized,  small-signal models for nonlinear devices. The dc analysis
  227.  
  228.           can also be used to generate dc  transfer  curves:   a  specified
  229.  
  230.           independent  voltage  or  current  source is stepped over a user-
  231.  
  232.           specified range and the dc output variables are stored  for  each
  233.  
  234.           sequential source value.
  235.  
  236.  
  237.  
  238.           1.2.  AC Small-Signal Analysis
  239.  
  240.  
  241.                The ac small-signal portion of SPICE computes the ac  output
  242.  
  243.           variables as a function of frequency.  The program first computes
  244.  
  245.           the dc operating point of the circuit and determines  linearized,
  246.  
  247.           small-signal  models for all of the nonlinear devices in the cir-
  248.  
  249.           cuit.  The resultant linear  circuit  is  then  analyzed  over  a
  250.  
  251.           user-specified range of frequencies.  The desired output of an ac
  252.  
  253.           small- signal analysis is usually a  transfer  function  (voltage
  254.  
  255.           gain,  transimpedance,  etc).   If  the  circuit  has only one ac
  256.  
  257.           input, it is convenient to set  that  input  to  unity  and  zero
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                                                                           5
  272.  
  273.  
  274.           phase,  so  that  output  variables  have  the  same value as the
  275.  
  276.           transfer function of the output  variable  with  respect  to  the
  277.  
  278.           input.
  279.  
  280.  
  281.  
  282.           1.3.  Transient Analysis
  283.  
  284.  
  285.  
  286.                The transient analysis portion of SPICE computes  the  tran-
  287.  
  288.           sient  output  variables  as  a  function  of  time  over a user-
  289.  
  290.           specified time interval.  The initial  conditions  are  automati-
  291.  
  292.           cally  determined  by  a  dc analysis.  All sources which are not
  293.  
  294.           time dependent (for example, power supplies) are set to their  dc
  295.  
  296.           value.  The  transient time interval is specified on a .TRAN con-
  297.  
  298.           trol line.
  299.  
  300.  
  301.  
  302.  
  303.  
  304.           2.  CONVERGENCE
  305.  
  306.  
  307.  
  308.                Both dc and transient solutions are obtained by an iterative
  309.  
  310.           process which is terminated when both of the following conditions
  311.  
  312.           hold:
  313.  
  314.  
  315.           1)   The nonlinear branch currents converge to within a tolerance
  316.  
  317.                of  0.1  percent  or  1  picoamp (1.0E-12 Amp), whichever is
  318.  
  319.                larger.
  320.  
  321.  
  322.           2)   The node voltages converge to within a tolerance of 0.1 per-
  323.  
  324.                cent or 1 microvolt (1.0E-6 Volt), whichever is larger.
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.                                                                           6
  338.  
  339.  
  340.                Although the algorithm used in SPICE has been  found  to  be
  341.  
  342.           very  reliable, in some cases it will fail to converge to a solu-
  343.  
  344.           tion.  When this failure occurs, the program will  terminate  the
  345.  
  346.           job.
  347.  
  348.  
  349.                Failure to converge in dc analysis  is  usually  due  to  an
  350.  
  351.           error in specifying circuit connections, element values, or model
  352.  
  353.           parameter values.  Regenerative switching  circuits  or  circuits
  354.  
  355.           with  positive  feedback  probably  will  not  converge in the dc
  356.  
  357.           analysis unless the OFF option is used for some of the devices in
  358.  
  359.           the feedback path, or the .NODESET card is used to force the cir-
  360.  
  361.           cuit to converge to the desired state.
  362.  
  363.  
  364.  
  365.  
  366.  
  367.           3.  INPUT FORMAT
  368.  
  369.  
  370.  
  371.                The input format for SPICE  is  of  the  free  format  type.
  372.  
  373.           Fields on a card are separated by one or more blanks, a comma, an
  374.  
  375.           equal (=) sign, or a left or right parenthesis;  extra spaces are
  376.  
  377.           ignored.   A  card  may  be  continued  by entering a + (plus) in
  378.  
  379.           column 1 of the following card;  SPICE continues  reading  begin-
  380.  
  381.           ning with column 2.
  382.  
  383.  
  384.                A name field must begin with a letter (A through Z) and can-
  385.  
  386.           not contain any delimiters.
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                                                                           7
  404.  
  405.  
  406.                A number field may be an integer field (12, -44), a floating
  407.  
  408.           point field (3.14159), either an integer or floating point number
  409.  
  410.           followed by an integer exponent (1E-14,  2.65E3),  or  either  an
  411.  
  412.           integer or a floating point number followed by one of the follow-
  413.  
  414.           ing scale factors:
  415.  
  416.  
  417.  
  418.                   T=1E12   G=1E9    MEG=1E6   K=1E3     MIL=25.4E-6
  419.                   M=1E-3   U=1E-6   N=1E-9    P=1E-12   F=1E-15
  420.  
  421.  
  422.           Letters immediately following a number that are not scale factors
  423.  
  424.           are ignored, and letters immediately following a scale factor are
  425.  
  426.           ignored.  Hence, 10, 10V, 10VOLTS, and  10HZ  all  represent  the
  427.  
  428.           same  number,  and  M, MA, MSEC, and MMHOS all represent the same
  429.  
  430.           scale factor.  Note that 1000, 1000.0, 1000HZ, 1E3, 1.0E3,  1KHZ,
  431.  
  432.           and 1K all represent the same number.
  433.  
  434.  
  435.  
  436.  
  437.  
  438.           4.  CIRCUIT DESCRIPTION
  439.  
  440.  
  441.  
  442.                The circuit to be analyzed is described to SPICE by a set of
  443.  
  444.           element  cards,  which  define  the  circuit topology and element
  445.  
  446.           values, and a set of control cards, which define the model param-
  447.  
  448.           eters  and  the  run  controls.  The first card in the input deck
  449.  
  450.           must be a title card, and the last card must be a .END card.  The
  451.  
  452.           order  of  the  remaining  cards is arbitrary (except, of course,
  453.  
  454.           that continuation cards must immediately follow  the  card  being
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                                                                           8
  470.  
  471.  
  472.           continued).
  473.  
  474.  
  475.                Each element in the circuit is specified by an element  card
  476.  
  477.           that  contains  the  element name, the circuit nodes to which the
  478.  
  479.           element is connected, and  the  values  of  the  parameters  that
  480.  
  481.           determine  the  electrical  characteristics  of the element.  The
  482.  
  483.           first letter of the element name specifies the element type.  The
  484.  
  485.           format for the SPICE element types is given in what follows.  The
  486.  
  487.           strings  XXXXXXX,   YYYYYYY,   and   ZZZZZZZ   denote   arbitrary
  488.  
  489.           alphanumeric  strings.   For  example, a resistor name must begin
  490.  
  491.           with the letter R and can contain one or more characters.  Hence,
  492.  
  493.           R, R1, RSE, ROUT, and R3AC2ZY are valid resistor names.
  494.  
  495.  
  496.                Data fields that are enclosed in less than and greater  than
  497.  
  498.           signs   '<   >'   are   optional.    All   indicated  punctuation
  499.  
  500.           (parentheses, equal signs, etc.) is optional and merely  indicate
  501.  
  502.           the  presence  of  any delimiter. A consistent style such as that
  503.  
  504.           shown here will  make  the  input  easier  to  understand.   With
  505.  
  506.           respect to branch voltages and currents, SPICE uniformly uses the
  507.  
  508.           associated reference convention (current flows in  the  direction
  509.  
  510.           of voltage drop).
  511.  
  512.  
  513.                Nodes names may be arbitrary character strings.   The  datum
  514.  
  515.           (ground)  node  must  be named '0'.  The circuit cannot contain a
  516.  
  517.           loop of voltage sources and/or inductors  and  cannot  contain  a
  518.  
  519.           cutset  of  current  sources and/or capacitors.  Each node in the
  520.  
  521.           circuit must have a dc path to ground.  Every node must  have  at
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                                                                           9
  536.  
  537.  
  538.           least two connections except for transmission line nodes (to per-
  539.  
  540.           mit unterminated transmission lines) and MOSFET  substrate  nodes
  541.  
  542.           (which have two internal connections anyway).
  543.  
  544.  
  545.  
  546.  
  547.  
  548.           5.  TITLE CARD, COMMENT CARDS AND .END CARD
  549.  
  550.  
  551.  
  552.           5.1.  Title Card
  553.  
  554.  
  555.           Examples:
  556.  
  557.  
  558.               POWER AMPLIFIER CIRCUIT
  559.               TEST OF CAM CELL
  560.  
  561.  
  562.  
  563.                This card must be the first card in  the  input  deck.   Its
  564.  
  565.           contents  are printed verbatim as the heading for each section of
  566.  
  567.           output.
  568.  
  569.  
  570.  
  571.           5.2.  .END Card
  572.  
  573.           Examples:
  574.  
  575.  
  576.                .END
  577.  
  578.  
  579.  
  580.                This card must always be the last card in  the  input  deck.
  581.  
  582.           Note that the period is an integral part of the name.
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.                                                                          10
  602.  
  603.  
  604.           5.3.  Comment Card
  605.  
  606.  
  607.           General Form:
  608.  
  609.  
  610.               * <any comment>
  611.  
  612.  
  613.           Examples:
  614.  
  615.  
  616.               * RF=1K      GAIN SHOULD BE 100
  617.               * MAY THE FORCE BE WITH MY CIRCUIT
  618.  
  619.  
  620.  
  621.                The asterisk in the first column indicates that this card is
  622.  
  623.           a comment card.  Comment cards may be placed anywhere in the cir-
  624.  
  625.           cuit description.
  626.  
  627.  
  628.  
  629.  
  630.  
  631.           6.  ELEMENT CARDS
  632.  
  633.  
  634.  
  635.           6.1.  Resistors
  636.  
  637.           General form:
  638.  
  639.  
  640.               RXXXXXXX N1 N2 VALUE
  641.  
  642.  
  643.           Examples:
  644.  
  645.  
  646.               R1 1 2 100
  647.               RC1 12 17 1K
  648.  
  649.  
  650.  
  651.                N1 and N2 are the two element nodes.  VALUE  is  the  resis-
  652.  
  653.           tance (in ohms) and may be positive or negative but not zero.
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.                                                                          11
  668.  
  669.  
  670.           6.2.  Capacitors and Inductors
  671.  
  672.  
  673.           General form:
  674.  
  675.  
  676.               CXXXXXXX N+ N- VALUE <IC=INCOND>
  677.               LYYYYYYY N+ N- VALUE <IC=INCOND>
  678.  
  679.  
  680.           Examples:
  681.  
  682.  
  683.               CBYP 13 0 1UF
  684.               COSC 17 23 10U IC=3V
  685.               LLINK 42 69 1UH
  686.               LSHUNT 23 51 10U IC=15.7MA
  687.  
  688.  
  689.  
  690.                N+ and N- are  the  positive  and  negative  element  nodes,
  691.  
  692.           respectively.   VALUE  is the capacitance in Farads or the induc-
  693.  
  694.           tance in Henries.
  695.  
  696.  
  697.                For the capacitor, the (optional) initial condition  is  the
  698.  
  699.           initial  (time-zero)  value of capacitor voltage (in Volts).  For
  700.  
  701.           the inductor, the (optional) initial  condition  is  the  initial
  702.  
  703.           (time-zero)  value  of inductor current (in Amps) that flows from
  704.  
  705.           N+, through the inductor, to N-.  Note that  the  initial  condi-
  706.  
  707.           tions (if any) apply 'only' if the UIC option is specified on the
  708.  
  709.           .TRAN card.
  710.  
  711.  
  712.  
  713.           6.3.  Coupled (Mutual) Inductors
  714.  
  715.           General form:
  716.  
  717.  
  718.               KXXXXXXX LYYYYYYY LZZZZZZZ VALUE
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.                                                                          12
  734.  
  735.  
  736.           Examples:
  737.  
  738.  
  739.               K43 LAA LBB 0.999
  740.               KXFRMR L1 L2 0.87
  741.  
  742.  
  743.  
  744.                LYYYYYYY and LZZZZZZZ are  the  names  of  the  two  coupled
  745.  
  746.           inductors,  and  VALUE  is  the coefficient of coupling, K, which
  747.  
  748.           must be greater than 0 and less than or equal to  1.   Using  the
  749.  
  750.           'dot'  convention, place a 'dot' on the first node of each induc-
  751.  
  752.           tor.
  753.  
  754.  
  755.  
  756.           6.4.  Transmission Lines (Lossless)
  757.  
  758.  
  759.           General form:
  760.  
  761.  
  762.               TXXXXXXX N1 N2 N3 N4 Z0=VALUE <TD=VALUE> <F=FREQ <NL=NRMLEN>>
  763.               +                    <IC=V1,I1,V2,I2>
  764.  
  765.  
  766.           Examples:
  767.  
  768.  
  769.               T1 1 0 2 0 Z0=50 TD=10NS
  770.  
  771.  
  772.  
  773.                N1 and N2 are the nodes at port 1;  N3 and N4 are the  nodes
  774.  
  775.           at  port  2.   Z0 is the characteristic impedance.  The length of
  776.  
  777.           the line may be expressed in either of two forms.  The  transmis-
  778.  
  779.           sion  delay, TD, may be specified directly (as TD=10ns, for exam-
  780.  
  781.           ple).  Alternatively, a frequency F may be given,  together  with
  782.  
  783.           NL,  the  normalized  electrical  length of the transmission line
  784.  
  785.           with respect to the wavelength in the line at  the  frequency  F.
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.                                                                          13
  800.  
  801.  
  802.           If  a  frequency  is specified but NL is omitted, 0.25 is assumed
  803.  
  804.           (that is, the frequency is assumed to be  the  quarter-wave  fre-
  805.  
  806.           quency).   Note  that although both forms for expressing the line
  807.  
  808.           length are indicated as optional, one of the two must  be  speci-
  809.  
  810.           fied.
  811.  
  812.  
  813.                Note that this element models only one propagating mode.  If
  814.  
  815.           all four nodes are distinct in the actual circuit, then two modes
  816.  
  817.           may be excited.  To simulate such a situation, two  transmission-
  818.  
  819.           line  elements  are required.  (see the example in Appendix A for
  820.  
  821.           further clarification.)
  822.  
  823.  
  824.                The (optional) initial condition specification  consists  of
  825.  
  826.           the  voltage  and current at each of the transmission line ports.
  827.  
  828.           Note that the initial conditions (if any) apply 'only' if the UIC
  829.  
  830.           option is specified on the .TRAN card.
  831.  
  832.  
  833.  
  834.           6.5.  Linear Dependent Sources
  835.  
  836.  
  837.  
  838.                SPICE allows circuits to contain  linear  dependent  sources
  839.  
  840.           characterized by any of the four equations
  841.  
  842.  
  843.                   i=g*v          v=e*v          i=f*i          v=h*i
  844.  
  845.  
  846.           where g, e, f, and h are constants representing transconductance,
  847.  
  848.           voltage gain, current gain, and transresistance, respectively.
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                                                                          14
  866.  
  867.  
  868.           6.6.  Linear Voltage-Controlled Current Sources
  869.  
  870.  
  871.           General form:
  872.  
  873.  
  874.               GXXXXXXX N+ N- NC+ NC- VALUE
  875.  
  876.  
  877.           Examples:
  878.  
  879.  
  880.               G1 2 0 5 0 0.1MMHO
  881.  
  882.  
  883.  
  884.                N+ and N- are the positive and negative nodes, respectively.
  885.  
  886.           Current  flow  is  from the positive node, through the source, to
  887.  
  888.           the negative node.  NC+ and NC- are  the  positive  and  negative
  889.  
  890.           controlling  nodes,  respectively.  VALUE is the transconductance
  891.  
  892.           (in mhos).
  893.  
  894.  
  895.  
  896.           6.7.  Linear Voltage-Controlled Voltage Sources
  897.  
  898.           General form:
  899.  
  900.  
  901.               EXXXXXXX N+ N- NC+ NC- VALUE
  902.  
  903.  
  904.           Examples:
  905.  
  906.  
  907.               E1 2 3 14 1 2.0
  908.  
  909.  
  910.  
  911.                N+ is the positive node, and N- is the negative  node.   NC+
  912.  
  913.           and  NC- are the positive and negative controlling nodes, respec-
  914.  
  915.           tively.  VALUE is the voltage gain.
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.                                                                          15
  932.  
  933.  
  934.           6.8.  Linear Current-Controlled Current Sources
  935.  
  936.  
  937.           General form:
  938.  
  939.  
  940.               FXXXXXXX N+ N- VNAM VALUE
  941.  
  942.  
  943.           Examples:
  944.  
  945.  
  946.               F1 13 5 VSENS 5
  947.  
  948.  
  949.  
  950.                N+ and N- are the positive and negative nodes, respectively.
  951.  
  952.           Current  flow  is  from the positive node, through the source, to
  953.  
  954.           the negative node.  VNAM is the name of a voltage source  through
  955.  
  956.           which  the  controlling current flows.  The direction of positive
  957.  
  958.           controlling current flow is from the positive node,  through  the
  959.  
  960.           source, to the negative node of VNAM.  VALUE is the current gain.
  961.  
  962.  
  963.  
  964.           6.9.  Linear Current-Controlled Voltage Sources
  965.  
  966.           General form:
  967.  
  968.  
  969.               HXXXXXXX N+ N- VNAM VALUE
  970.  
  971.  
  972.           Examples:
  973.  
  974.  
  975.               HX 5 17 VZ 0.5K
  976.  
  977.  
  978.  
  979.                N+ and N- are the positive and negative nodes, respectively.
  980.  
  981.           VNAM  is  the name of a voltage source through which the control-
  982.  
  983.           ling  current  flows.   The  direction  of  positive  controlling
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.                                                                          16
  998.  
  999.  
  1000.           current  flow  is  from the positive node, through the source, to
  1001.  
  1002.           the negative node of VNAM.   VALUE  is  the  transresistance  (in
  1003.  
  1004.           ohms).
  1005.  
  1006.  
  1007.  
  1008.           6.10.  Independent Sources
  1009.  
  1010.  
  1011.           General form:
  1012.  
  1013.  
  1014.               VXXXXXXX N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
  1015.               IYYYYYYY N+ N- <<DC> DC/TRAN VALUE> <AC <ACMAG <ACPHASE>>>
  1016.  
  1017.  
  1018.           Examples:
  1019.  
  1020.  
  1021.               VCC 10 0 DC 6
  1022.               VIN 13 2 0.001 AC 1 SIN(0 1 1MEG)
  1023.               ISRC 23 21 AC 0.333 45.0 SFFM(0 1 10K 5 1K)
  1024.               VMEAS 12 9
  1025.  
  1026.  
  1027.  
  1028.                N+ and N- are the positive and negative nodes, respectively.
  1029.  
  1030.           Note that voltage sources need not be grounded.  Positive current
  1031.  
  1032.           is assumed to flow from the positive node, through the source, to
  1033.  
  1034.           the  negative  node.   A  current  source of positive value, will
  1035.  
  1036.           force current to flow out of the N+ node, through the source, and
  1037.  
  1038.           into the N- node.  Voltage sources, in addition to being used for
  1039.  
  1040.           circuit excitation, are the 'ammeters' for SPICE, that  is,  zero
  1041.  
  1042.           valued  voltage  sources may be inserted into the circuit for the
  1043.  
  1044.           purpose of measuring current.  They  will,  of  course,  have  no
  1045.  
  1046.           effect on circuit operation since they represent short-circuits.
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.                                                                          17
  1064.  
  1065.  
  1066.                DC/TRAN is the  dc  and  transient  analysis  value  of  the
  1067.  
  1068.           source.   If  the  source value is zero both for dc and transient
  1069.  
  1070.           analyses, this value may be omitted.   If  the  source  value  is
  1071.  
  1072.           time-invariant (e.g., a power supply), then the value may option-
  1073.  
  1074.           ally be preceded by the letters DC.
  1075.  
  1076.  
  1077.  
  1078.                ACMAG is the ac magnitude and ACPHASE is the ac phase.   The
  1079.  
  1080.           source  is  set  to  this  value in the ac analysis.  If ACMAG is
  1081.  
  1082.           omitted following the keyword AC, a value of  unity  is  assumed.
  1083.  
  1084.           If ACPHASE is omitted, a value of zero is assumed.  If the source
  1085.  
  1086.           is not an ac small-signal input, the keyword AC and the ac values
  1087.  
  1088.           are omitted.
  1089.  
  1090.  
  1091.  
  1092.                Any independent source  can  be  assigned  a  time-dependent
  1093.  
  1094.           value  for  transient  analysis.  If a source is assigned a time-
  1095.  
  1096.           dependent value, the time-zero value is  used  for  dc  analysis.
  1097.  
  1098.           There are five independent source functions:  pulse, exponential,
  1099.  
  1100.           sinusoidal,  piece-wise  linear,  and  single-frequency  FM.   If
  1101.  
  1102.           parameters  other  than source values are omitted or set to zero,
  1103.  
  1104.           the default values shown will be assumed.  (TSTEP is the printing
  1105.  
  1106.           increment  and  TSTOP  is  the final time (see the .TRAN card for
  1107.  
  1108.           explanation)).
  1109.  
  1110.  
  1111.           1.  Pulse         PULSE(V1 V2 TD TR TF PW PER)
  1112.  
  1113.  
  1114.           Examples:
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.                                                                          18
  1130.  
  1131.  
  1132.               VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS)
  1133.  
  1134.  
  1135.  
  1136.                parameters              default values         units
  1137.  
  1138.                V1 (initial value)                       Volts or Amps
  1139.                V2 (pulsed value)                        Volts or Amps
  1140.                TD (delay time)         0.0              seconds
  1141.                TR (rise time)          TSTEP            seconds
  1142.                TF (fall time)          TSTEP            seconds
  1143.                PW (pulse width)        TSTOP            seconds
  1144.                PER(period)             TSTOP            seconds
  1145.  
  1146.  
  1147.  
  1148.                A single pulse so specified is described  by  the  following
  1149.  
  1150.           table:
  1151.  
  1152.  
  1153.  
  1154.                                  time          value
  1155.  
  1156.                                  0             V1
  1157.                                  TD            V1
  1158.                                  TD+TR         V2
  1159.                                  TD+TR+PW      V2
  1160.                                  TD+TR+PW+TF   V1
  1161.                                  TSTOP         V1
  1162.  
  1163.  
  1164.           Intermediate points are determined by linear interpolation.
  1165.  
  1166.  
  1167.           2.  Sinusoidal    SIN(VO VA FREQ TD THETA)
  1168.  
  1169.           Examples:
  1170.  
  1171.  
  1172.               VIN 3 0 SIN(0 1 100MEG 1NS 1E10)
  1173.  
  1174.  
  1175.  
  1176.  
  1177.                parameters                default value   units
  1178.  
  1179.                VO     (offset)                           Volts or Amps
  1180.                VA     (amplitude)                        Volts or Amps
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.                                                                          19
  1196.  
  1197.  
  1198.                FREQ   (frequency)        1/TSTOP         Hz
  1199.                TD     (delay)            0.0             seconds
  1200.                THETA  (damping factor)   0.0             1/seconds
  1201.  
  1202.  
  1203.  
  1204.                The shape of the waveform  is  described  by  the  following
  1205.  
  1206.           table:
  1207.  
  1208.  
  1209.  
  1210.           time          value
  1211.  
  1212.           0 to TD       VO
  1213.           TD to TSTOP   VO + VA*exp(-(time-TD)*THETA)*sine(twopi*FREQ*(time+TD))
  1214.  
  1215.  
  1216.  
  1217.           3.  Exponential  EXP(V1 V2 TD1 TAU1 TD2 TAU2)
  1218.  
  1219.  
  1220.           Examples:
  1221.  
  1222.  
  1223.               VIN 3 0 EXP(-4 -1 2NS 30NS 60NS 40NS)
  1224.  
  1225.  
  1226.  
  1227.              parameters                  default values   units
  1228.              V1   (initial value)                         Volts or Amps
  1229.              V2   (pulsed value)                          Volts or Amps
  1230.              TD1  (rise delay time)      0.0              seconds
  1231.              TAU1 (rise time constant)   TSTEP            seconds
  1232.              TD2  (fall delay time)      TD1+TSTEP        seconds
  1233.              TAU2 (fall time constant)   TSTEP            seconds
  1234.  
  1235.  
  1236.  
  1237.                The shape of the waveform  is  described  by  the  following
  1238.  
  1239.           table:
  1240.  
  1241.  
  1242.  
  1243.                  time           value
  1244.                  0 to TD1       V1
  1245.                  TD1 to TD2     V1+(V2-V1)*(1-exp(-(time-TD1)/TAU1))
  1246.                  TD2 to TSTOP   V1+(V2-V1)*(1-exp(-(time-TD1)/TAU1))
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.                                                                          20
  1262.  
  1263.  
  1264.                                 +(V1-V2)*(1-exp(-(time-TD2)/TAU2))
  1265.  
  1266.  
  1267.  
  1268.           4.  Piece-Wise Linear  PWL(T1 V1 <T2 V2 T3 V3 T4 V4 ...>)
  1269.  
  1270.  
  1271.           Examples:
  1272.  
  1273.  
  1274.               VCLOCK 7 5 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7)
  1275.  
  1276.  
  1277.  
  1278.           Parameters and default values
  1279.  
  1280.  
  1281.  
  1282.               Each pair of values (Ti, Vi) specifies that the value of the source is Vi
  1283.               (in Volts or Amps) at time=Ti.  The value of the source at intermediate values
  1284.               of time is determined by using linear interpolation on the input values.
  1285.  
  1286.  
  1287.  
  1288.           5.  Single-Frequency FM   SFFM(VO VA FC MDI FS)
  1289.  
  1290.           Examples:
  1291.  
  1292.  
  1293.               V1 12 0 SFFM(0 1M 20K 5 1K)
  1294.  
  1295.  
  1296.  
  1297.  
  1298.               parameters                default values   units
  1299.  
  1300.               VO  (offset)                               Volts or Amps
  1301.               VA  (amplitude)                            Volts or Amps
  1302.               FC  (carrier frequency)   1/TSTOP          Hz
  1303.               MDI (modulation index)
  1304.               FS  (signal frequency)    1/TSTOP          Hz
  1305.  
  1306.  
  1307.  
  1308.                The shape of the waveform  is  described  by  the  following
  1309.  
  1310.           equation:
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.                                                                          21
  1328.  
  1329.  
  1330.               value = VO + VA*sine((twopi*FC*time) + MDI*sine(twopi*FS*time))
  1331.  
  1332.  
  1333.  
  1334.  
  1335.           6.11.  Switches
  1336.  
  1337.  
  1338.           General form:
  1339.  
  1340.  
  1341.               SXXXXXXX N+ N- NC+ NC- MODEL <ON><OFF>
  1342.               WYYYYYYY N+ N- VNAM MODEL <ON><OFF>
  1343.  
  1344.  
  1345.           Examples:
  1346.  
  1347.  
  1348.               s1 1 2 3 4 switch1 ON
  1349.               s2 5 6 3 0 sm2 off
  1350.               Switch1 1 2 10 0 smodel1
  1351.               w1 1 2 vclock switchmod1
  1352.               W2 3 0 vramp sm1 ON
  1353.               wreset 5 6 vclck lossyswitch OFF
  1354.  
  1355.  
  1356.  
  1357.                Nodes 1 and 2 are the nodes between which the switch  termi-
  1358.  
  1359.           nals  are  connected.  The model name is mandatory while the ini-
  1360.  
  1361.           tial conditions are optional.  For the voltage controlled switch,
  1362.  
  1363.           nodes  3  and  4  are the positive and negative controlling nodes
  1364.  
  1365.           respectively.  For the current controlled switch, the controlling
  1366.  
  1367.           current  is that through the specified voltage source. The direc-
  1368.  
  1369.           tion of positive controlling current flow is  from  the  positive
  1370.  
  1371.           node, through the source, to the negative node.
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.                                                                          22
  1394.  
  1395.  
  1396.           7.  SEMICONDUCTOR DEVICES
  1397.  
  1398.  
  1399.  
  1400.                The elements described to this point typically require  only
  1401.  
  1402.           a  few parameter values.  However, the models for the semiconduc-
  1403.  
  1404.           tor devices that are included in the SPICE program  require  many
  1405.  
  1406.           parameter  values.   Often, many devices in a circuit are defined
  1407.  
  1408.           by the same set of device model parameters.  For these reasons, a
  1409.  
  1410.           set  of  device  model parameters is defined on a separate .MODEL
  1411.  
  1412.           card and assigned a unique model name.  The device element  cards
  1413.  
  1414.           in  SPICE  then  refer to the model name.  This scheme alleviates
  1415.  
  1416.           the need to specify all of the model parameters  on  each  device
  1417.  
  1418.           element card.
  1419.  
  1420.  
  1421.                Each device element card contains the device name, the nodes
  1422.  
  1423.           to  which the device is connected, and the device model name.  In
  1424.  
  1425.           addition, other optional parameters may  be  specified  for  some
  1426.  
  1427.           devices:  geometric factors and an initial condition.
  1428.  
  1429.  
  1430.                The area factor used on the diode, BJT and JFET device cards
  1431.  
  1432.           determines  the number of equivalent parallel devices of a speci-
  1433.  
  1434.           fied model.  The affected parameters are marked with an  asterisk
  1435.  
  1436.           under  the  heading  'area'  in  the  model  descriptions  below.
  1437.  
  1438.           Several geometric factors associated with  the  channel  and  the
  1439.  
  1440.           drain and source diffusions can be specified on the MOSFET device
  1441.  
  1442.           card.
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.                                                                          23
  1460.  
  1461.  
  1462.                Two different forms of initial conditions may  be  specified
  1463.  
  1464.           for  some  devices.  The first form is included to improve the dc
  1465.  
  1466.           convergence for circuits that contain more than one stable state.
  1467.  
  1468.           If  a  device  is specified OFF, the dc operating point is deter-
  1469.  
  1470.           mined with the terminal voltages for that  device  set  to  zero.
  1471.  
  1472.           After  convergence  is obtained, the program continues to iterate
  1473.  
  1474.           to obtain the exact value for the terminal voltages.  If  a  cir-
  1475.  
  1476.           cuit  has  more  than  one dc stable state, the OFF option can be
  1477.  
  1478.           used to force the solution to correspond to a desired state.   If
  1479.  
  1480.           a  device is specified OFF when in reality the device is conduct-
  1481.  
  1482.           ing, the program will still obtain the correct solution (assuming
  1483.  
  1484.           the  solutions  converge)  but  more  iterations will be required
  1485.  
  1486.           since the program must independently  converge  to  two  separate
  1487.  
  1488.           solutions.  The .NODESET card serves a similar purpose as the OFF
  1489.  
  1490.           option.  The .NODESET option is easier to apply and is  the  pre-
  1491.  
  1492.           ferred means to aid convergence.
  1493.  
  1494.  
  1495.                The second form of initial conditions are specified for  use
  1496.  
  1497.           with the transient analysis.  These are true 'initial conditions'
  1498.  
  1499.           as opposed to the convergence aids above.  See the description of
  1500.  
  1501.           the  .IC  card  and  the .TRAN card for a detailed explanation of
  1502.  
  1503.           initial conditions.
  1504.  
  1505.  
  1506.  
  1507.           7.1.  Semiconductor Resistors
  1508.  
  1509.  
  1510.           General form:
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.                                                                          24
  1526.  
  1527.  
  1528.               RXXXXXXX N1 N2 <VALUE> <MNAME> <L=LENGTH> <W=WIDTH>
  1529.  
  1530.  
  1531.           Examples:
  1532.  
  1533.  
  1534.               RLOAD 2 10 10K
  1535.               RMOD 3 7 RMODEL L=10u W=1u
  1536.  
  1537.  
  1538.  
  1539.                This is the more general form of the resistor  presented  in
  1540.  
  1541.           section  6.1,  and allows the modeling of temperature effects and
  1542.  
  1543.           for the calculation of the actual resistance value from  strictly
  1544.  
  1545.           geometric  information and the specifications of the process.  If
  1546.  
  1547.           VALUE is specified, it overrides the  geometric  information  and
  1548.  
  1549.           defines  the  resistance.  If MNAME is specified, then the resis-
  1550.  
  1551.           tance may be calculated from the process information in the model
  1552.  
  1553.           MNAME and the given LENGTH and WIDTH.  If VALUE is not specified,
  1554.  
  1555.           then MNAME and LENGTH must be specified.  If WIDTH is not  speci-
  1556.  
  1557.           fied,  then  it will be taken from the default width given in the
  1558.  
  1559.           model.
  1560.  
  1561.  
  1562.  
  1563.           7.2.  Semiconductor Capacitors
  1564.  
  1565.  
  1566.           General form:
  1567.  
  1568.  
  1569.               CXXXXXXX N1 N2 <VALUE> <MNAME> <L=LENGTH> <W=WIDTH> <IC=VAL>
  1570.  
  1571.  
  1572.           Examples:
  1573.  
  1574.  
  1575.               CLOAD 2 10 10P
  1576.               CMOD 3 7 CMODEL L=10u W=1u
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.                                                                          25
  1592.  
  1593.  
  1594.                This is the more general form of the Capacitor presented  in
  1595.  
  1596.           section 6.2, and allows for the calculation of the actual capaci-
  1597.  
  1598.           tance value from strictly geometric information and the  specifi-
  1599.  
  1600.           cations  of  the  process.  If VALUE is specified, it defines the
  1601.  
  1602.           capacitance.  If MNAME is specified, then the capacitance is cal-
  1603.  
  1604.           culated  from  the process information in the model MNAME and the
  1605.  
  1606.           given LENGTH and WIDTH.  If VALUE is not  specified,  then  MNAME
  1607.  
  1608.           and LENGTH must be specified.  If WIDTH is not specified, then it
  1609.  
  1610.           will be taken from the default width given in the model.   Either
  1611.  
  1612.           VALUE  or MNAME, LENGTH, and WIDTH may be specified, but not both
  1613.  
  1614.           sets.
  1615.  
  1616.  
  1617.  
  1618.           7.3.  Uniform Distributed RC Lines (Lossy)
  1619.  
  1620.  
  1621.           General form:
  1622.  
  1623.  
  1624.               UXXXXXXX N1 N2 N3 MNAME L=LEN <N=LUMPS>
  1625.  
  1626.  
  1627.           Examples:
  1628.  
  1629.  
  1630.               U1 1 2 0 URCMOD L=50U
  1631.               URC2 1 12 2 UMODL l=1MIL N=6
  1632.  
  1633.  
  1634.  
  1635.                N1 and N2 are the two element nodes the  RC  line  connects,
  1636.  
  1637.           while  N3  is  the  node to which the capacitances are connected.
  1638.  
  1639.           MNAME is the model name, LEN is the length  of  the  RC  line  in
  1640.  
  1641.           meters.  LUMPS, if specified, is the number of lumped segments to
  1642.  
  1643.           use in modeling the RC line (see the model  description  for  the
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.                                                                          26
  1658.  
  1659.  
  1660.           action taken if this parameter is omitted).
  1661.  
  1662.  
  1663.  
  1664.           7.4.  Junction Diodes
  1665.  
  1666.  
  1667.           General form:
  1668.  
  1669.  
  1670.               DXXXXXXX N+ N- MNAME <AREA> <OFF> <IC=VD>
  1671.  
  1672.  
  1673.           Examples:
  1674.  
  1675.  
  1676.               DBRIDGE 2 10 DIODE1
  1677.               DCLMP 3 7 DMOD 3.0 IC=0.2
  1678.  
  1679.  
  1680.  
  1681.                N+ and N- are the positive and negative nodes, respectively.
  1682.  
  1683.           MNAME  is  the model name, AREA is the area factor, and OFF indi-
  1684.  
  1685.           cates an (optional) starting  condition  on  the  device  for  dc
  1686.  
  1687.           analysis.   If  the  area  factor  is  omitted, a value of 1.0 is
  1688.  
  1689.           assumed.  The (optional) initial  condition  specification  using
  1690.  
  1691.           IC=VD  is intended for use with the UIC option on the .TRAN card,
  1692.  
  1693.           when a transient analysis is desired starting from other than the
  1694.  
  1695.           quiescent operating point.
  1696.  
  1697.  
  1698.  
  1699.           7.5.  Bipolar Junction Transistors (BJT's)
  1700.  
  1701.           General form:
  1702.  
  1703.  
  1704.               QXXXXXXX NC NB NE <NS> MNAME <AREA> <OFF> <IC=VBE,VCE>
  1705.  
  1706.  
  1707.           Examples:
  1708.  
  1709.  
  1710.               Q23 10 24 13 QMOD IC=0.6,5.0
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.                                                                          27
  1724.  
  1725.  
  1726.               Q50A 11 26 4 20 MOD1
  1727.  
  1728.  
  1729.  
  1730.                NC, NB, and NE are the collector, base, and  emitter  nodes,
  1731.  
  1732.           respectively.   NS is the (optional) substrate node.  If unspeci-
  1733.  
  1734.           fied, ground is used.  MNAME is the model name, AREA is the  area
  1735.  
  1736.           factor,  and OFF indicates an (optional) initial condition on the
  1737.  
  1738.           device for the dc analysis.  If the area  factor  is  omitted,  a
  1739.  
  1740.           value  of  1.0  is  assumed.   The  (optional)  initial condition
  1741.  
  1742.           specification using IC=VBE,VCE is intended for use with  the  UIC
  1743.  
  1744.           option  on  the  .TRAN card, when a transient analysis is desired
  1745.  
  1746.           starting from other than the quiescent operating point.  See  the
  1747.  
  1748.           .IC  card  description  for a better way to set transient initial
  1749.  
  1750.           conditions.
  1751.  
  1752.  
  1753.  
  1754.           7.6.  Junction Field-Effect Transistors (JFET's)
  1755.  
  1756.  
  1757.           General form:
  1758.  
  1759.  
  1760.               JXXXXXXX ND NG NS MNAME <AREA> <OFF> <IC=VDS,VGS>
  1761.  
  1762.  
  1763.           Examples:
  1764.  
  1765.  
  1766.               J1 7 2 3 JM1 OFF
  1767.  
  1768.  
  1769.  
  1770.                ND, NG, and NS  are  the  drain,  gate,  and  source  nodes,
  1771.  
  1772.           respectively.   MNAME is the model name, AREA is the area factor,
  1773.  
  1774.           and OFF indicates an (optional) initial condition on  the  device
  1775.  
  1776.           for  dc  analysis.  If the area factor is omitted, a value of 1.0
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.                                                                          28
  1790.  
  1791.  
  1792.           is assumed.   The  (optional)  initial  condition  specification,
  1793.  
  1794.           using  IC=VDS,VGS  is intended for use with the UIC option on the
  1795.  
  1796.           .TRAN card, when a transient analysis is  desired  starting  from
  1797.  
  1798.           other than the quiescent operating point.  See the .IC card for a
  1799.  
  1800.           better way to set initial conditions.
  1801.  
  1802.  
  1803.  
  1804.           7.7.  MOSFET's
  1805.  
  1806.  
  1807.           General form:
  1808.  
  1809.  
  1810.               MXXXXXXX ND NG NS NB MNAME <L=VAL> <W=VAL> <AD=VAL> <AS=VAL>
  1811.               + <PD=VAL> <PS=VAL> <NRD=VAL> <NRS=VAL> <OFF> <IC=VDS,VGS,VBS>
  1812.  
  1813.  
  1814.           Examples:
  1815.  
  1816.  
  1817.               M1 24 2 0 20 TYPE1
  1818.               M31 2 17 6 10 MODM L=5U W=2U
  1819.               M1 2 9 3 0 MOD1 L=10U W=5U AD=100P AS=100P PD=40U PS=40U
  1820.  
  1821.  
  1822.           ND, NG, NS, and NB are the drain, gate, source,  and  bulk  (sub-
  1823.  
  1824.           strate)  nodes,  respectively.  MNAME is the model name.  L and W
  1825.  
  1826.           are the channel length and width, in meters.  AD and AS  are  the
  1827.  
  1828.           areas  of  the  drain  and source diffusions, in sq-meters.  Note
  1829.  
  1830.           that the suffix U specifies microns (1E-6  m)  and  P  sq-microns
  1831.  
  1832.           (1E-12  sq-m).  If  any  of  L,  W,  AD, or AS are not specified,
  1833.  
  1834.           default values are used. The use  of  defaults  simplifies  input
  1835.  
  1836.           deck  preparation,  as  well  as  the  editing required if device
  1837.  
  1838.           geometries are to be changed.  PD and PS are  the  perimeters  of
  1839.  
  1840.           the drain and source junctions, in meters.  NRD and NRS designate
  1841.  
  1842.           the  equivalent  number  of  squares  of  the  drain  and  source
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.                                                                          29
  1856.  
  1857.  
  1858.           diffusions; these values multiply the sheet resistance RSH speci-
  1859.  
  1860.           fied on the .MODEL card for an  accurate  representation  of  the
  1861.  
  1862.           parasitic  series drain and source resistance of each transistor.
  1863.  
  1864.           PD and PS default to 0.0 while NRD and NRS to 1.0.  OFF indicates
  1865.  
  1866.           an  (optional)  initial  condition on the device for dc analysis.
  1867.  
  1868.           The   (optional)   initial    condition    specification    using
  1869.  
  1870.           IC=VDS,VGS,VBS  is  intended  for  use with the UIC option on the
  1871.  
  1872.           .TRAN card, when a transient analysis is  desired  starting  from
  1873.  
  1874.           other than the quiescent operating point.  See the .IC card for a
  1875.  
  1876.           better and more convenient way to specify transient initial  con-
  1877.  
  1878.           ditions.
  1879.  
  1880.  
  1881.  
  1882.           7.8.  .MODEL Card
  1883.  
  1884.  
  1885.           General form:
  1886.  
  1887.  
  1888.                .MODEL MNAME TYPE(PNAME1=PVAL1 PNAME2=PVAL2 ... )
  1889.  
  1890.  
  1891.           Examples:
  1892.  
  1893.  
  1894.                .MODEL MOD1 NPN (BF=50 IS=1E-13 VBF=50)
  1895.  
  1896.  
  1897.  
  1898.                The .MODEL card specifies a set  of  model  parameters  that
  1899.  
  1900.           will  be  used  by one or more devices.  MNAME is the model name,
  1901.  
  1902.           and type is one of the following ten types:
  1903.  
  1904.  
  1905.                          R      resistor model
  1906.                          C      capacitor model
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.                                                                          30
  1922.  
  1923.  
  1924.                          URC    Uniform Distributed RC model
  1925.                          D      diode model
  1926.                          NPN    NPN BJT model
  1927.                          PNP    PNP BJT model
  1928.                          NJF    N-channel JFET model
  1929.                          PJF    P-channel JFET model
  1930.                          NMOS   N-channel MOSFET model
  1931.                          PMOS   P-channel MOSFET model
  1932.                          SW     voltage controlled switch
  1933.                          CSW    current controlled switch
  1934.  
  1935.  
  1936.  
  1937.                Parameter values are  defined  by  appending  the  parameter
  1938.  
  1939.           name,  as  given  below for each model type, followed by an equal
  1940.  
  1941.           sign and the parameter value.   Model  parameters  that  are  not
  1942.  
  1943.           given  a  value  are  assigned the default values given below for
  1944.  
  1945.           each model type.
  1946.  
  1947.  
  1948.  
  1949.           7.9.  Resistor Model
  1950.  
  1951.  
  1952.  
  1953.                The resistor model consists of process-related  device  data
  1954.  
  1955.           that  allow the resistance to be calculated from geometric infor-
  1956.  
  1957.           mation and to  be  corrected  for  temperature.   The  parameters
  1958.  
  1959.           available are:
  1960.  
  1961.  
  1962.           name     parameter                         units    default   example
  1963.                                                        o
  1964.           TC1      first order temperature coeff.    Z/oC2    0.0       -
  1965.           TC2      second order temperature coeff.   Z/ C     0.0       -
  1966.           RSH      sheet resistance                  Z/[]     -         50
  1967.           DEFW     default width                     meters   1e-6      2e-6
  1968.           NARROW   narrowing due to side etching     meters   0.0       1e-7
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.                                                                          31
  1988.  
  1989.  
  1990.                The sheet resistance is used with  the  narrowing  parameter
  1991.  
  1992.           and  L  and  W  from  the  resistor card to determine the nominal
  1993.  
  1994.           resistance by the formula
  1995.  
  1996.  
  1997.                                          L-NARROW
  1998.                                    R=RSHx
  1999.                                          W-NARROW
  2000.           Defw is used to supply a default value for W if one is not speci-
  2001.  
  2002.           fied  on  the  device card.  If either RSH or L is not specified,
  2003.  
  2004.           then the standard default resistance  value  of  1k  Z  is  used.
  2005.  
  2006.           After  the  nominal  resistance is calculated, it is adjusted for
  2007.  
  2008.           temperature by the formula:
  2009.  
  2010.  
  2011.               RES(temp)=RES(tnom)x(1+TC1x(temp-tnom)+TC2*(temp-tnom)2)
  2012.  
  2013.  
  2014.  
  2015.           7.10.  Capacitor Model
  2016.  
  2017.  
  2018.  
  2019.                The capacitor model contains process information that may be
  2020.  
  2021.           used  to compute the capacitance from strictly geometric informa-
  2022.  
  2023.           tion.
  2024.  
  2025.  
  2026.  
  2027.           name     parameter                       units       default   example
  2028.                                                            2
  2029.           CJ       junction bottom capacitance     F/meters    -         5e-5
  2030.           CJSW     junction sidewall capacitance   F/meters    -         2e-11
  2031.           DEFW     default device width            meters      1e-6      2e-6
  2032.           NARROW   narrowing due to side etching   meters      0.0       1e-7
  2033.  
  2034.  
  2035.  
  2036.                The capacitor has a capacitance computed as
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.                                                                          32
  2054.  
  2055.  
  2056.           CAP=CJx(LENGTH-NARROW)x(WIDTH-NARROW)+2xCJSWx(LENGTH+WIDTH-2*NARROW)
  2057.  
  2058.  
  2059.  
  2060.           7.11.  Uniform Distributed RC Model
  2061.  
  2062.  
  2063.  
  2064.                The URC model  is  derived  from  a  model  proposed  by  L.
  2065.  
  2066.           Gertzberrg  in  1974.   The model is accomplished by a subcircuit
  2067.  
  2068.           type expansion of the URC line into a network of lumped  RC  seg-
  2069.  
  2070.           ments  with internally generated nodes.  The RC segments are in a
  2071.  
  2072.           geometric progression, increasing toward the middle  of  the  URC
  2073.  
  2074.           line, with K as a proportionality constant.  The number of lumped
  2075.  
  2076.           segments used, if not specified on the URC line card,  is  deter-
  2077.  
  2078.           mined by the following formula:
  2079.  
  2080.                                                         2
  2081.                                 |     R C      2 |(K-1)| |
  2082.                              log|Fmaxx x x2xJxl x|     | |
  2083.                                 |     L L        |  K  | |
  2084.                           N= _____________________________
  2085.                                          logK
  2086.  
  2087.  
  2088.                The URC line will be made up strictly of resistor and  capa-
  2089.  
  2090.           citor  segments  unless  the ISPERL parameter is given a non-zero
  2091.  
  2092.           value, in which case the capacitors  are  replaced  with  reverse
  2093.  
  2094.           biased diodes with a zero-bias junction capacitance equivalent to
  2095.  
  2096.           the capacitance replaced, and with a saturation current of ISPERL
  2097.  
  2098.           amps per meter of transmission line and an optional series resis-
  2099.  
  2100.           tance equivalent to RSPERL ohms per meter.
  2101.  
  2102.  
  2103.                name     parameter                            units   default   example   area
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.                                                                          33
  2120.  
  2121.  
  2122.            1   K        Propagation Constant                 -       2.0       1.2       -
  2123.            2   FMAX     Maximum Frequency of interest        Hz      1.0G      6.5MEG    -
  2124.            3   RPERL    Resistance per unit length           Ohm/m   1000      10        -
  2125.            4   CPERL    Capacitance per unit length          F/m     1.0E-15   1PF       -
  2126.            5   ISPERL   Saturation Current per unit length   Amp/m   0         -         -
  2127.            6   RSPERL   Diode Resistance per unit length     Ohm/m   0         -         -
  2128.  
  2129.  
  2130.  
  2131.  
  2132.           7.12.  Switch Model
  2133.  
  2134.  
  2135.  
  2136.                The switch  model  allows  an  almost  ideal  switch  to  be
  2137.  
  2138.           described  in  SPICE.  The switch is not quite ideal, in that the
  2139.  
  2140.           resistance can not change from 0 to  infinity,  but  must  always
  2141.  
  2142.           have  a finite positive value.  By proper selection of the on and
  2143.  
  2144.           off resistances, they can be effectively  zero  and  infinity  in
  2145.  
  2146.           comparison  to  other circuit elements.  The parameters available
  2147.  
  2148.           are:
  2149.  
  2150.  
  2151.                 name   parameter            units   default   switch
  2152.  
  2153.                 VT     threshold voltage    Volts   0.0       S
  2154.                 IT     threshold current    Amps    0.0       W
  2155.                 VH     hysteresis voltage   Volts   0.0       S
  2156.                 IH     hysteresis current   Amps    0.0       W
  2157.                 RON    on resistance        Z       1.0       both
  2158.                 ROFF   off resistance       Z       1/GMIN*   both
  2159.  
  2160.  
  2161.  
  2162.                *(See the .OPTIONS card  for  a  description  of  GMIN,  its
  2163.  
  2164.           default value results is a off resistance of 1.0e+12 ohms.)
  2165.  
  2166.  
  2167.  
  2168.                The use of an ideal element that is highly  non-linear  such
  2169.  
  2170.           as  a switch can cause large discontinuities to occur in the cir-
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.                                                                          34
  2186.  
  2187.  
  2188.           cuit node voltages.  A rapid change such as that associated  with
  2189.  
  2190.           a switch changing state can cause numerical roundoff or tolerance
  2191.  
  2192.           problems leading to erroneous results or  timestep  difficulties.
  2193.  
  2194.           The user of switches can improve the situation by taking the fol-
  2195.  
  2196.           lowing steps:
  2197.  
  2198.  
  2199.                First of all it is wise to set ideal switch impedences  only
  2200.  
  2201.           high  and  low enough to be negligible with respect to other cir-
  2202.  
  2203.           cuit elements.  Using switch impedences that are close to "ideal"
  2204.  
  2205.           in  all  cases will aggravate the problem of discontinuities men-
  2206.  
  2207.           tioned above.  Of cource, when modeling real devices such as MOS-
  2208.  
  2209.           FETS,  the  on resistance should be adjusted to a realistic level
  2210.  
  2211.           depending on the size of the device being modelled.
  2212.  
  2213.  
  2214.                If a wide rango of ON to OFF resistance must be used in  the
  2215.  
  2216.           switched  (ROFF/RON >1e+12), then the tolerance on errors allowed
  2217.  
  2218.           during transient  analysis  should  be  decreased  by  using  the
  2219.  
  2220.           .OPTIONS  card  and  specifying TRTOL to be less than the default
  2221.  
  2222.           value of 7.0.  When switches are placed around  capacitors,  then
  2223.  
  2224.           the  option  CHGTOL should also be reduced.  Suggested values for
  2225.  
  2226.           these two options are 1.0 and 1e-16 respectively.  These  changes
  2227.  
  2228.           inform SPICE3 to be more careful around the switch points so that
  2229.  
  2230.           no errors are made due to the rapid change in the circuit.
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.                                                                          35
  2252.  
  2253.  
  2254.           7.13.  Diode Model
  2255.  
  2256.  
  2257.  
  2258.                The dc characteristics of the diode are  determined  by  the
  2259.  
  2260.           parameters  IS  and  N.   An  ohmic  resistance, RS, is included.
  2261.  
  2262.           Charge storage effects are modeled by a transit time, TT,  and  a
  2263.  
  2264.           nonlinear  depletion layer capacitance which is determined by the
  2265.  
  2266.           parameters CJO, VJ, and M.  The  temperature  dependence  of  the
  2267.  
  2268.           saturation  current  is  defined by the parameters EG, the energy
  2269.  
  2270.           and XTI, the saturation current  temperature  exponent.   Reverse
  2271.  
  2272.           breakdown  is  modeled  by an exponential increase in the reverse
  2273.  
  2274.           diode current and is determined by  the  parameters  BV  and  IBV
  2275.  
  2276.           (both of which are positive numbers).
  2277.  
  2278.  
  2279.                name   parameter                        units   default    example    area
  2280.  
  2281.            1   IS     saturation current               A       1.0E-14    1.0E-14    *
  2282.            2   RS     ohmic resistance                 Ohm     0          10         *
  2283.            3   N      emission coefficient             -       1          1.0
  2284.            4   TT     transit-time                     sec     0          0.1Ns
  2285.            5   CJO    zero-bias junction capacitance   F       0          2PF        *
  2286.            6   VJ     junction potential               V       1          0.6
  2287.            7   M      grading coefficient              -       0.5        0.5
  2288.            8   EG     activation energy                eV      1.11       1.11 Si
  2289.                                                                           0.69 Sbd
  2290.                                                                           0.67 Ge
  2291.            9   XTI    saturation-current temp. exp     -       3.0        3.0 jn
  2292.                                                                           2.0 Sbd
  2293.           10   KF     flicker noise coefficient        -       0
  2294.           11   AF     flicker noise exponent           -       1
  2295.           12   FC     coefficient for forward-bias     -       0.5
  2296.                       depletion capacitance formula
  2297.           13   BV     reverse breakdown voltage        V       infinite   40.0
  2298.           14   IBV    current at breakdown voltage     A       1.0E-3
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.                                                                          36
  2318.  
  2319.  
  2320.           7.14.  BJT Models (both NPN and PNP)
  2321.  
  2322.  
  2323.  
  2324.                The bipolar junction transistor model in SPICE is an adapta-
  2325.  
  2326.           tion  of  the  integral  charge control model of Gummel and Poon.
  2327.  
  2328.           This modified Gummel-Poon model extends  the  original  model  to
  2329.  
  2330.           include  several  effects  at  high  bias levels.  The model will
  2331.  
  2332.           automatically simplify to the simpler Ebers-Moll model when  cer-
  2333.  
  2334.           tain  parameters  are  not specified. The parameter names used in
  2335.  
  2336.           the modified Gummel-Poon model have been chosen to be more easily
  2337.  
  2338.           understood by the program user, and to reflect better both physi-
  2339.  
  2340.           cal and circuit design thinking.
  2341.  
  2342.  
  2343.                The dc model is defined by the parameters IS, BF,  NF,  ISE,
  2344.  
  2345.           IKF, and NE which determine the forward current gain characteris-
  2346.  
  2347.           tics, IS, BR, NR, ISC, IKR, and NC which  determine  the  reverse
  2348.  
  2349.           current gain characteristics, and VAF and VAR which determine the
  2350.  
  2351.           output conductance for forward and reverse regions.  Three  ohmic
  2352.  
  2353.           resistances  RB,  RC,  and  RE are included, where RB can be high
  2354.  
  2355.           current dependent.  Base charge storage is modeled by forward and
  2356.  
  2357.           reverse  transit  times,  TF  and TR, the forward transit time TF
  2358.  
  2359.           being bias dependent if desired, and  nonlinear  depletion  layer
  2360.  
  2361.           capacitances  which  are  determined by CJE, VJE, and MJE for the
  2362.  
  2363.           B-E junction , CJC, VJC, and MJC for the B-C  junction  and  CJS,
  2364.  
  2365.           VJS,  and  MJS  for  the C-S (Collector-Substrate) junction.  The
  2366.  
  2367.           temperature dependence of the saturation current, IS,  is  deter-
  2368.  
  2369.           mined  by the energy-gap, EG, and the saturation current tempera-
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.                                                                          37
  2384.  
  2385.  
  2386.           ture exponent, XTI.  Additionally base current temperature depen-
  2387.  
  2388.           dence  is modeled by the beta temperature exponent XTB in the new
  2389.  
  2390.           model.
  2391.  
  2392.  
  2393.                The  BJT parameters used in the modified  Gummel-Poon  model
  2394.  
  2395.           are listed below. The parameter names used in earlier versions of
  2396.  
  2397.           SPICE2 are still accepted.
  2398.  
  2399.  
  2400.                   Modified Gummel-Poon BJT Parameters.
  2401.  
  2402.  
  2403.  
  2404.                name   parameter                               units   default    example   area
  2405.  
  2406.           1    IS     transport saturation current            A       1.0E-16    1.0E-15   *
  2407.           2    BF     ideal maximum forward beta              -       100        100
  2408.           3    NF     forward current emission coefficient    -       1.0        1
  2409.           4    VAF    forward Early voltage                   V       infinite   200
  2410.           5    IKF    corner for forward beta
  2411.                       high current roll-off                   A       infinite   0.01      *
  2412.           6    ISE    B-E leakage saturation current          A       0          1.0E-13   *
  2413.           7    NE     B-E leakage emission coefficient        -       1.5        2
  2414.           8    BR     ideal maximum reverse beta              -       1          0.1
  2415.           9    NR     reverse current emission coefficient    -       1          1
  2416.           10   VAR    reverse Early voltage                   V       infinite   200
  2417.           11   IKR    corner for reverse beta
  2418.                       high current roll-off                   A       infinite   0.01      *
  2419.           12   ISC    B-C leakage saturation current          A       0          1.0E-13   *
  2420.           13   NC     B-C leakage emission coefficient        -       2          1.5
  2421.           14   RB     zero bias base resistance               Ohms    0          100       *
  2422.           15   IRB    current where base resistance
  2423.                       falls halfway to its min value          A       infinite   0.1       *
  2424.           16   RBM    minimum base resistance
  2425.                       at high currents                        Ohms    RB         10        *
  2426.           17   RE     emitter resistance                      Ohms    0          1         *
  2427.           18   RC     collector resistance                    Ohms    0          10        *
  2428.           19   CJE    B-E zero-bias depletion capacitance     F       0          2PF       *
  2429.           20   VJE    B-E built-in potential                  V       0.75       0.6
  2430.           21   MJE    B-E junction exponential factor         -       0.33       0.33
  2431.           22   TF     ideal forward transit time              sec     0          0.1Ns
  2432.           23   XTF    coefficient for bias dependence of TF   -       0
  2433.           24   VTF    voltage describing VBC
  2434.                       dependence of TF                        V       infinite
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.                                                                          38
  2450.  
  2451.  
  2452.           25   ITF    high-current parameter
  2453.                       for effect on TF                        A       0                    *
  2454.           26   PTF    excess phase at freq=1.0/(TF*2PI) Hz    deg     0
  2455.           27   CJC    B-C zero-bias depletion capacitance     F       0          2PF       *
  2456.           28   VJC    B-C built-in potential                  V       0.75       0.5
  2457.           29   MJC    B-C junction exponential factor         -       0.33       0.5
  2458.           30   XCJC   fraction of B-C depletion capacitance   -       1
  2459.                       connected to internal base node
  2460.           31   TR     ideal reverse transit time              sec     0          10Ns
  2461.           32   CJS    zero-bias collector-substrate
  2462.                       capacitance                             F       0          2PF       *
  2463.           33   VJS    substrate junction built-in potential   V       0.75
  2464.           34   MJS    substrate junction exponential factor   -       0          0.5
  2465.           35   XTB    forward and reverse beta
  2466.                       temperature exponent                    -       0
  2467.           36   EG     energy gap for temperature
  2468.                       effect on IS                            eV      1.11
  2469.           37   XTI    temperature exponent for effect on IS   -       3
  2470.           38   KF     flicker-noise coefficient               -       0
  2471.           39   AF     flicker-noise exponent                  -       1
  2472.           40   FC     coefficient for forward-bias
  2473.                       depletion capacitance formula           -       0.5
  2474.  
  2475.  
  2476.  
  2477.  
  2478.           7.15.  JFET Models (both N and P Channel)
  2479.  
  2480.  
  2481.  
  2482.                The JFET model is derived from the FET model of Shichman and
  2483.  
  2484.           Hodges.  The dc characteristics are defined by the parameters VTO
  2485.  
  2486.           and BETA, which determine the variation  of  drain  current  with
  2487.  
  2488.           gate  voltage,  LAMBDA,  which determines the output conductance,
  2489.  
  2490.           and IS, the saturation current of the two  gate  junctions.   Two
  2491.  
  2492.           ohmic  resistances,  RD  and RS, are included.  Charge storage is
  2493.  
  2494.           modeled by nonlinear depletion layer capacitances for  both  gate
  2495.  
  2496.           junctions  which  vary  as the -1/2 power of junction voltage and
  2497.  
  2498.           are defined by the parameters CGS, CGD, and PB.
  2499.  
  2500.  
  2501.                name     parameter                            units    default   example   area
  2502.  
  2503.            1   VTO      threshold voltage                    V        -2.0      -2.0
  2504.            2   BETA     transconductance parameter           A/V**2   1.0E-4    1.0E-3    *
  2505.            3   LAMBDA   channel length modulation
  2506.                         parameter                            1/V      0         1.0E-4
  2507.            4   RD       drain ohmic resistance               Ohm      0         100       *
  2508.            5   RS       source ohmic resistance              Ohm      0         100       *
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.                                                                          39
  2516.  
  2517.  
  2518.            6   CGS      zero-bias G-S junction capacitance   F        0         5PF       *
  2519.            7   CGD      zero-bias G-D junction capacitance   F        0         1PF       *
  2520.            8   PB       gate junction potential              V        1         0.6
  2521.            9   IS       gate junction saturation current     A        1.0E-14   1.0E-14   *
  2522.           10   KF       flicker noise coefficient            -        0
  2523.           11   AF       flicker noise exponent               -        1
  2524.           12   FC       coefficient for forward-bias         -        0.5
  2525.                         depletion capacitance formula
  2526.  
  2527.  
  2528.  
  2529.  
  2530.           7.16.  MOSFET Models (both N and P channel)
  2531.  
  2532.  
  2533.                SPICE provides four MOSFET device models,  which  differ  in
  2534.  
  2535.           the  formulation  of  the I-V characteristic.  The variable LEVEL
  2536.  
  2537.           specifies the model to be used:
  2538.  
  2539.  
  2540.  
  2541.                  LEVEL=1 ->    Shichman-Hodges
  2542.                  LEVEL=2 ->    MOS2 (as described in [1])
  2543.                  LEVEL=3 ->    MOS3, a semi-empirical model(see [1])
  2544.                  LEVEL=4 ->    BSIM (as described in [2])
  2545.  
  2546.  
  2547.           The dc characteristics of the level 1 through level 3 MOSFETs are
  2548.  
  2549.           defined  by the device parameters VTO, KP, LAMBDA, PHI and GAMMA.
  2550.  
  2551.           These parameters are computed  by  SPICE  if  process  parameters
  2552.  
  2553.           (NSUB,  TOX,  ...)  are  given,  but user-specified values always
  2554.  
  2555.           override.  VTO is positive (negative) for  enhancement  mode  and
  2556.  
  2557.           negative (positive) for depletion mode N-channel (P-channel) dev-
  2558.  
  2559.           ices. Charge storage is modeled  by  three  constant  capacitors,
  2560.  
  2561.           CGSO, CGDO, and CGBO which represent overlap capacitances, by the
  2562.  
  2563.           nonlinear thin-oxide capacitance which is distributed  among  the
  2564.  
  2565.           gate,  source,  drain,  and  bulk  regions,  and by the nonlinear
  2566.  
  2567.           depletion-layer capacitances for both substrate junctions divided
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.                                                                          40
  2582.  
  2583.  
  2584.           into bottom and periphery, which vary as the MJ and MJSW power of
  2585.  
  2586.           junction voltage respectively, and are determined by the  parame-
  2587.  
  2588.           ters CBD, CBS, CJ, CJSW, MJ, MJSW and PB.  Charge storage effects
  2589.  
  2590.           are modeled by the piecewise linear voltags-dependent capacitance
  2591.  
  2592.           model  proposed  by Meyer.  The thin-oxide charge storage effects
  2593.  
  2594.           are treated slightly different  for  the  LEVEL=1  model.   These
  2595.  
  2596.           voltage-dependent capacitances are included only if TOX is speci-
  2597.  
  2598.           fied in the input description  and  they  are  represented  using
  2599.  
  2600.           Meyer's formulation.
  2601.  
  2602.  
  2603.                There is some overlap among the  parameters  describing  the
  2604.  
  2605.           junctions, e.g. the reverse current can be input either as IS (in
  2606.  
  2607.           A) or as JS (in A/m**2). Whereas the first is an  absolute  value
  2608.  
  2609.           the second is multiplied by AD and AS to give the reverse current
  2610.  
  2611.           of the drain and source junctions respectively. This  methodology
  2612.  
  2613.           has  been chosen since there is no sense in relating always junc-
  2614.  
  2615.           tion characteristics with AD and AS entered on the  device  card;
  2616.  
  2617.           the  areas  can  be defaulted.  The same idea applies also to the
  2618.  
  2619.           zero-bias junction capacitances CBD and CBS (in F) on  one  hand,
  2620.  
  2621.           and  CJ (in F/m**2) on the other.  The parasitic drain and source
  2622.  
  2623.           series resistance can be expressed as either RD and RS (in  ohms)
  2624.  
  2625.           or  RSH  (in ohms/sq.), the latter being multiplied by the number
  2626.  
  2627.           of squares NRD and NRS input on the device card.
  2628.  
  2629.  
  2630.           SPICE level 1 to level 3 parameters.
  2631.  
  2632.  
  2633.  
  2634.                name     parameter                               units       default          example
  2635.  
  2636.           1    LEVEL    model index                             -           1
  2637.           2    VTO      zero-bias threshold voltage             V           0.0              1.0
  2638.           3    KP       transconductance parameter              A/V**2      2.0E-5           3.1E-5
  2639.           4    GAMMA    bulk threshold parameter                V**0.5      0.0              0.37
  2640.           5    PHI      surface potential                       V           0.6              0.65
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.                                                                          41
  2648.  
  2649.  
  2650.           6    LAMBDA   channel-length modulation
  2651.                         (MOS1 and MOS2 only)                    1/V         0.0              0.02
  2652.           7    RD       drain ohmic resistance                  Ohm         0.0              1.0
  2653.           8    RS       source ohmic resistance                 Ohm         0.0              1.0
  2654.           9    CBD      zero-bias B-D junction capacitance      F           0.0              20FF
  2655.           10   CBS      zero-bias B-S junction capacitance      F           0.0              20FF
  2656.           11   IS       bulk junction saturation current        A           1.0E-14          1.0E-15
  2657.           12   PB       bulk junction potential                 V           0.8              0.87
  2658.           13   CGSO     gate-source overlap capacitance
  2659.                         per meter channel width                 F/m         0.0              4.0E-11
  2660.           14   CGDO     gate-drain overlap capacitance
  2661.                         per meter channel width                 F/m         0.0              4.0E-11
  2662.           15   CGBO     gate-bulk overlap capacitance
  2663.                         per meter channel length                F/m         0.0              2.0E-10
  2664.           16   RSH      drain and source diffusion
  2665.                         sheet resistance                        Ohm/sq.     0.0              10.0
  2666.           17   CJ       zero-bias bulk junction bottom cap.
  2667.                         per sq-meter of junction area           F/m**2      0.0              2.0E-4
  2668.           18   MJ       bulk junction bottom grading coef.      -           0.5              0.5
  2669.           19   CJSW     zero-bias bulk junction sidewall cap.
  2670.                         per meter of junction perimeter         F/m         0.0              1.0E-9
  2671.           20   MJSW     bulk junction sidewall grading coef.    -           0.50(level1)
  2672.                                                                             0.33(level2,3)
  2673.           21   JS       bulk junction saturation current
  2674.                         per sq-meter of junction area           A/m**2                       1.0E-8
  2675.           22   TOX      oxide thickness                         meter       1.0E-7           1.0E-7
  2676.           23   NSUB     substrate doping                        1/cm**3     0.0              4.0E15
  2677.           24   NSS      surface state density                   1/cm**2     0.0              1.0E10
  2678.           25   NFS      fast surface state density              1/cm**2     0.0              1.0E10
  2679.           26   TPG      type of gate material:                  -           1.0
  2680.                             +1 opp. to substrate
  2681.                             -1 same as substrate
  2682.                              0  Al gate
  2683.           27   XJ       metallurgical junction depth            meter       0.0              1U
  2684.           28   LD       lateral diffusion                       meter       0.0              0.8U
  2685.           29   UO       surface mobility                        cm**2/V-s   600              700
  2686.           30   UCRIT    critical field for mobility
  2687.                         degradation (MOS2 only)                 V/cm        1.0E4            1.0E4
  2688.           31   UEXP     critical field exponent in
  2689.                         mobility degradation (MOS2 only)        -           0.0              0.1
  2690.           32   UTRA     transverse field coef (mobility)
  2691.                         (deleted for MOS2)                      -           0.0              0.3
  2692.           33   VMAX     maximum drift velocity of carriers      m/s         0.0              5.0E4
  2693.           34   NEFF     total channel charge (fixed and
  2694.                         mobile) coefficient (MOS2 only)         -           1.0              5.0
  2695.           35   KF       flicker noise coefficient               -           0.0              1.0E-26
  2696.           36   AF       flicker noise exponent                  -           1.0              1.2
  2697.           37   FC       coefficient for forward-bias
  2698.                         depletion capacitance formula           -           0.5
  2699.           38   DELTA    width effect on threshold voltage
  2700.                         (MOS2 and MOS3)                         -           0.0              1.0
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.                                                                          42
  2714.  
  2715.  
  2716.           39   THETA    mobility modulation (MOS3 only)         1/V         0.0              0.1
  2717.           40   ETA      static feedback (MOS3 only)             -           0.0              1.0
  2718.           41   KAPPA    saturation field factor (MOS3 only)     -           0.2              0.5
  2719.  
  2720.  
  2721.  
  2722.  
  2723.                The level 4 parameters are all values obtained from  process
  2724.  
  2725.           characterization, and can be generated automatically.  J. Pierret
  2726.  
  2727.           [3] describes a means of generating a  'process'  file,  and  the
  2728.  
  2729.           program Proc2Mod provided with SPICE3 will convert this file into
  2730.  
  2731.           a sequence of .MODEL cards suitable  for  inclusion  in  a  SPICE
  2732.  
  2733.           deck.   Parameters  marked below with an * in the l/w column also
  2734.  
  2735.           have corresponding parameters with a length and width dependency.
  2736.  
  2737.           For  example, VFB is the basic parameter with units of Volts, and
  2738.  
  2739.           LVFB and WVFB also exist and have units of Volt-Mmeter  The  for-
  2740.  
  2741.           mula
  2742.  
  2743.  
  2744.                                       P          P
  2745.                              P=P +_____L____+_____W____
  2746.                                 0 L          W
  2747.                                    effective  effective
  2748.           is used to evaluate the parameter for the actual device specified
  2749.  
  2750.           with
  2751.  
  2752.  
  2753.                                 L         =L     -DL
  2754.                                  effective  input
  2755.           and
  2756.  
  2757.  
  2758.                                 W         =W     -DW
  2759.                                  effective  input
  2760.  
  2761.                Note that unlike the other models in SPICE, the  BSIM  model
  2762.  
  2763.           is  designed  for use with a process characterization system that
  2764.  
  2765.           provides all the parameters, thus there are no defaults  for  the
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.                                                                          43
  2780.  
  2781.  
  2782.           parameters,  and  leaving one out is considered an error.  For an
  2783.  
  2784.           example set of parameters and the format of a process  file,  see
  2785.  
  2786.           the SPICE2 implementation notes[2].
  2787.  
  2788.  
  2789.           SPICE BSIM (level 4) parameters.
  2790.  
  2791.  
  2792.  
  2793.           name    parameter                                                                 units      l/w
  2794.  
  2795.           VFB     flat-band voltage                                                         V          *
  2796.           PHI     surface inversion potential                                               V          *
  2797.           K1      body effect coefficient                                                   V1/2       *
  2798.           K2      drain/source depletion charge sharing coefficient                         -          *
  2799.           ETA     zero-bias drain-induced barrier lowering coefficient                      -          *
  2800.           MUZ     zero-bias mobility                                                        cm2/V-s
  2801.           DL      shortening of channel                                                     Mm
  2802.           DW      narrowing of channel                                                      Mm
  2803.           U0      zero-bias transverse-field mobility degradation coefficient               V-1        *
  2804.           U1      zero-bias velocity saturation coefficient                                 Mm/V       *
  2805.           X2MZ    sens. of mobility to substrate bias at v  =0                              cm2/V2-s   *
  2806.           X2E     sens. of drain-induced barrier lowering dsfect to substrate bias          V-1        *
  2807.           X3E     sens. of drain-induced barrier lowering effect to drain bias at V  =V     V-1        *
  2808.           X2U0    sens. of transverse field mobility degradation effect to substratdsbidd   V-2        *
  2809.           X2U1    sens. of velocity saturation effect to substrate bias                     MmV-2      *
  2810.           MUS     mobility at zero substrate bias and at V  =V                              cm2/V2-s
  2811.           X2MS    sens. of mobility to substrate bias at Vds=Vdd                            cm2/V2-s   *
  2812.           X3MS    sens. of mobility to drain bias at V  =Vds  dd                            cm2/V2-s   *
  2813.           X3U1    sens. of velocity saturation effect ds dddin bias at V  =V                MmV-2      *
  2814.           TOX     gate oxide thickness                                  ds  dd              Mm
  2815.           TEMP    temperature at which parameters were measured                             oC
  2816.           VDD     measurement bias range                                                    V
  2817.           CGDO    gate-drain overlap capacitance per meter channel width                    F/m
  2818.           CGSO    gate-source overlap capacitance per meter channel width                   F/m
  2819.           CGBO    gate-bulk overlap capacitance per meter channel length                    F/m
  2820.           XPART   gate-oxide capacitance charge model flag                                  -
  2821.           N0      zero-bias subthreshold slope coefficient                                  -          *
  2822.           NB      sens. of subthreshold slope to substrate bias                             -          *
  2823.           ND      sens. of subthreshold slope to drain bias                                 -          *
  2824.  
  2825.  
  2826.  
  2827.  
  2828.                XPART = 0 selects a 40/60 drain/source charge  partition  in
  2829.  
  2830.           saturation,  while  XPART=1  selects  a 0/100 drain/source charge
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.                                                                          44
  2846.  
  2847.  
  2848.           partition.  XPART=1 is recommended.
  2849.  
  2850.  
  2851.           [1] A. Vladimirescu and S. Liu, "The Simulation of MOS Integrated
  2852.  
  2853.           Circuits  Using  SPICE2",  ERL  Memo  No.  ERL M80/7, Electronics
  2854.  
  2855.           Research Laboratory, University  of  California,  Berkeley,  Oct.
  2856.  
  2857.           1980.
  2858.  
  2859.           [2] B. J. Sheu, D. L. Scharfetter, and P. K. Ko,  "SPICE2  Imple-
  2860.  
  2861.           mentation  of BSIM" ERL Memo No. ERL M85/42, Electronics Research
  2862.  
  2863.           Laboratory, University of California, Berkeley, May 1985.
  2864.  
  2865.           [3] J. R. Pierret, "A MOS Parameter Extraction  Program  for  the
  2866.  
  2867.           BSIM  Model"  ERL  Memo  Nos. ERL M84/99 and M84/100, Electronics
  2868.  
  2869.           Research Laboratory, University  of  California,  Berkeley,  Nov.
  2870.  
  2871.           1984.
  2872.  
  2873.  
  2874.  
  2875.  
  2876.           8.  SUBCIRCUITS
  2877.  
  2878.  
  2879.  
  2880.                A subcircuit that consists of SPICE elements can be  defined
  2881.  
  2882.           and  referenced  in a fashion similar to device models.  The sub-
  2883.  
  2884.           circuit is defined in the input deck by  a  grouping  of  element
  2885.  
  2886.           cards;   the program then automatically inserts the group of ele-
  2887.  
  2888.           ments wherever the subcircuit is referenced.  There is  no  limit
  2889.  
  2890.           on  the  size  or  complexity of subcircuits, and subcircuits may
  2891.  
  2892.           contain other subcircuits.  An example  of  subcircuit  usage  is
  2893.  
  2894.           given in Appendix A.
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.                                                                          45
  2912.  
  2913.  
  2914.           8.1.  .SUBCKT Card
  2915.  
  2916.  
  2917.           General form:
  2918.  
  2919.  
  2920.  
  2921.  
  2922.           Examples:
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.                A circuit definition is begun with a .SUBCKT  card.   SUBNAM
  2929.  
  2930.           is  the  subcircuit name, and N1, N2, ... are the external nodes,
  2931.  
  2932.           which cannot be zero.  The group of element cards  which  immedi-
  2933.  
  2934.           ately  follow  the  .SUBCKT card define the subcircuit.  The last
  2935.  
  2936.           card in a subcircuit definition is the .ENDS  card  (see  below).
  2937.  
  2938.           Control  cards  may  not  appear  within a subcircuit definition;
  2939.  
  2940.           however,  subcircuit  definitions  may  contain  anything   else,
  2941.  
  2942.           including  other  subcircuit definitions, device models, and sub-
  2943.  
  2944.           circuit calls (see below).  Note that any device models  or  sub-
  2945.  
  2946.           circuit  definitions  included as part of a subcircuit definition
  2947.  
  2948.           are strictly local (i.e., such models  and  definitions  are  not
  2949.  
  2950.           known  outside  the  subcircuit  definition).   Also, any element
  2951.  
  2952.           nodes not included on the .SUBCKT card are strictly  local,  with
  2953.  
  2954.           the exception of 0 (ground) which is always global.
  2955.  
  2956.  
  2957.  
  2958.           8.2.  .ENDS Card
  2959.  
  2960.           General form:
  2961.  
  2962.  
  2963.                .ENDS <SUBNAM>
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.                                                                          46
  2978.  
  2979.  
  2980.           Examples:
  2981.  
  2982.  
  2983.                .ENDS OPAMP
  2984.  
  2985.  
  2986.  
  2987.                This card must be the last one for  any  subcircuit  defini-
  2988.  
  2989.           tion.   The subcircuit name, if included, indicates which subcir-
  2990.  
  2991.           cuit definition is being terminated;  if omitted, all subcircuits
  2992.  
  2993.           being  defined  are  terminated.   The  name  is needed only when
  2994.  
  2995.           nested subcircuit definitions are being made.
  2996.  
  2997.  
  2998.  
  2999.           8.3.  Subcircuit Calls
  3000.  
  3001.  
  3002.           General form:
  3003.  
  3004.  
  3005.               XYYYYYYY N1 <N2 N3 ...> SUBNAM
  3006.  
  3007.  
  3008.           Examples:
  3009.  
  3010.  
  3011.               X1 2 4 17 3 1 MULTI
  3012.  
  3013.  
  3014.  
  3015.                Subcircuits are used in SPICE by specifying  pseudo-elements
  3016.  
  3017.           beginning  with the letter X, followed by the circuit nodes to be
  3018.  
  3019.           used in expanding the subcircuit.
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.                                                                          47
  3044.  
  3045.  
  3046.           9.  CONTROL CARDS
  3047.  
  3048.  
  3049.  
  3050.           9.1.  .OPTIONS Card
  3051.  
  3052.  
  3053.           General form:
  3054.  
  3055.  
  3056.                .OPTIONS OPT1 OPT2 ... (or OPT=OPTVAL ...)
  3057.  
  3058.  
  3059.           Examples:
  3060.  
  3061.  
  3062.                .OPTIONS RELTOL=.005 TRTOL=8
  3063.  
  3064.  
  3065.  
  3066.                This card allows the user to reset program control and  user
  3067.  
  3068.           options for specific simulation purposes.  Any combination of the
  3069.  
  3070.           following options may be included, in  any  order.   'x'  (below)
  3071.  
  3072.           represents some positive number.
  3073.  
  3074.  
  3075.           option     effect
  3076.  
  3077.           GMIN=x     resets the value of GMIN, the minimum conductance
  3078.                      allowed by the program.  The default value is 1.0E-12.
  3079.           RELTOL=x   resets the relative error tolerance of the program.  The
  3080.                      default value is 0.001 (0.1 percent).
  3081.           ABSTOL=x   resets the absolute current error tolerance of the
  3082.                      program.  The default value is 1 picoamp.
  3083.           VNTOL=x    resets the absolute voltage error tolerance of the
  3084.                      program.  The default value is 1 microvolt.
  3085.           TRTOL=x    resets the transient error tolerance.  The default value
  3086.                      is 7.0.  This parameter is an estimate of the factor by
  3087.                      which SPICE overestimates the actual truncation error.
  3088.           CHGTOL=x   resets the charge tolerance of the program.  The default
  3089.                      value is 1.0E-14.
  3090.           PIVTOL=x   resets the absolute minimum value for a matrix entry
  3091.                      to be accepted as a pivot.  The default value is 1.0E-13.
  3092.           PIVREL=x   resets the relative ratio between the largest column entry
  3093.                      and an acceptable pivot value. The default value is 1.0E-3.
  3094.                      In the numerical pivoting algorithm the allowed minimum
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.                                                                          48
  3110.  
  3111.  
  3112.                      pivot value is determined by
  3113.                      EPSREL=AMAX1(PIVREL*MAXVAL,PIVTOL)
  3114.                      where MAXVAL is the maximum element in the column where
  3115.                      a pivot is sought (partial pivoting).
  3116.           TNOM=x     resets the nominal temperature.  The default value is
  3117.                      27 deg C (300 deg K).
  3118.           ITL1=x     resets the dc iteration limit.  The default is 100.
  3119.           ITL2=x     resets the dc transfer curve iteration limit.  The
  3120.                      default is 50.
  3121.           ITL5=x     resets the transient analysis total iteration limit.
  3122.                      the default is 5000.  Set ITL5=0 to omit this test.
  3123.           DEFL=x     resets the value for MOS channel length; the default
  3124.                      is 100.0 micrometer.
  3125.           DEFW=x     resets the value for MOS channel width; the default
  3126.                      is 100.0 micrometer.
  3127.           DEFAD=x    resets the value for MOS drain diffusion area; the
  3128.                      default is 0.0.
  3129.           DEFAS=x    resets the value for MOS source diffusion area; the
  3130.                      default is 0.0.
  3131.  
  3132.  
  3133.  
  3134.  
  3135.           9.2.  .OP Card
  3136.  
  3137.  
  3138.           General form:
  3139.  
  3140.  
  3141.                .OP
  3142.  
  3143.  
  3144.  
  3145.  
  3146.                The inclusion of this card in an input deck will force SPICE
  3147.  
  3148.           to determine the dc operating point of the circuit with inductors
  3149.  
  3150.           shorted and capacitors opened.  Note:  a dc analysis is automati-
  3151.  
  3152.           cally  performed  prior  to a transient analysis to determine the
  3153.  
  3154.           transient initial conditions, and prior  to  an  ac  small-signal
  3155.  
  3156.           analysis  to  determine  the  linearized, small-signal models for
  3157.  
  3158.           nonlinear devices.
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.                                                                          49
  3176.  
  3177.  
  3178.                SPICE performs a dc operating point  analysis  if  no  other
  3179.  
  3180.           analyses are requested.
  3181.  
  3182.  
  3183.  
  3184.           9.3.  .DC Card
  3185.  
  3186.  
  3187.           General form:
  3188.  
  3189.  
  3190.                .DC SRCNAM VSTART VSTOP VINCR [SRC2 START2 STOP2 INCR2]
  3191.  
  3192.  
  3193.           Examples:
  3194.  
  3195.  
  3196.                .DC VIN 0.25 5.0 0.25
  3197.                .DC VDS 0 10 .5 VGS 0 5 1
  3198.                .DC VCE 0 10 .25 IB 0 10U 1U
  3199.  
  3200.  
  3201.  
  3202.                This card defines the dc transfer  curve  source  and  sweep
  3203.  
  3204.           limits.   SRCNAM is the name of an independent voltage or current
  3205.  
  3206.           source.  VSTART, VSTOP, and VINCR are the  starting,  final,  and
  3207.  
  3208.           incrementing  values  respectively.  The first example will cause
  3209.  
  3210.           the value of the voltage source VIN to be swept from  0.25  Volts
  3211.  
  3212.           to 5.0 Volts in increments of 0.25 Volts.  A second source (SRC2)
  3213.  
  3214.           may optionally be specified with associated sweep parameters.  In
  3215.  
  3216.           this case, the first source will be swept over its range for each
  3217.  
  3218.           value of the second  source.   This  option  can  be  useful  for
  3219.  
  3220.           obtaining  semiconductor  device output characteristics.  See the
  3221.  
  3222.           second example data deck in that section of the guide.
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.                                                                          50
  3242.  
  3243.  
  3244.           9.4.  .NODESET Card
  3245.  
  3246.  
  3247.           General form:
  3248.  
  3249.  
  3250.                .NODESET V(NODNUM)=VAL V(NODNUM)=VAL ...
  3251.  
  3252.  
  3253.           Examples:
  3254.  
  3255.  
  3256.                .NODESET V(12)=4.5 V(4)=2.23
  3257.  
  3258.  
  3259.  
  3260.                This card helps the program find the dc or initial transient
  3261.  
  3262.           solution  by  making  a preliminary pass with the specified nodes
  3263.  
  3264.           held to the given voltages.  The restriction is then released and
  3265.  
  3266.           the  iteration continues to the true solution.  The .NODESET card
  3267.  
  3268.           may be necessary for convergence on bistable or astable circuits.
  3269.  
  3270.           In general, this card should not be necessary.
  3271.  
  3272.  
  3273.  
  3274.           9.5.  .IC Card
  3275.  
  3276.           General form:
  3277.  
  3278.  
  3279.                .IC V(NODNUM)=VAL V(NODNUM)=VAL ...
  3280.  
  3281.  
  3282.           Examples:
  3283.  
  3284.  
  3285.                .IC V(11)=5 V(4)=-5 V(2)=2.2
  3286.  
  3287.  
  3288.  
  3289.                This card is for setting transient initial  conditions.   It
  3290.  
  3291.           has  two  different interpretations, depending on whether the UIC
  3292.  
  3293.           parameter is specified on the .TRAN card.  Also, one  should  not
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.                                                                          51
  3308.  
  3309.  
  3310.           confuse  this  card with the .NODESET card.  The .NODESET card is
  3311.  
  3312.           only to help dc convergence, and does not affect final bias solu-
  3313.  
  3314.           tion (except for multi-stable circuits).  The two interpretations
  3315.  
  3316.           of this card are as follows:
  3317.  
  3318.  
  3319.            1.  When the UIC parameter is specified on the .TRAN card,  then
  3320.  
  3321.           the  node  voltages specified on the .IC card are used to compute
  3322.  
  3323.           the capacitor, diode, BJT, JFET, and MOSFET  initial  conditions.
  3324.  
  3325.           This  is  equivalent  to  specifying the IC=... parameter on each
  3326.  
  3327.           device card, but is much more convenient.  The  IC=...  parameter
  3328.  
  3329.           can  still  be  specified  and  will take precedence over the .IC
  3330.  
  3331.           values.  Since no dc bias (initial transient)  solution  is  com-
  3332.  
  3333.           puted  before  the  transient  analysis,  one should take care to
  3334.  
  3335.           specify all dc source voltages on the .IC card if they are to  be
  3336.  
  3337.           used to compute device initial conditions.
  3338.  
  3339.  
  3340.            2.  When the UIC parameter is not specified on the  .TRAN  card,
  3341.  
  3342.           the  dc bias (initial transient) solution will be computed before
  3343.  
  3344.           the transient analysis.  In this case, the node  voltages  speci-
  3345.  
  3346.           fied on the .IC card will be forced to the desired initial values
  3347.  
  3348.           during the bias solution.  During transient  analysis,  the  con-
  3349.  
  3350.           straint on these node voltages is removed.
  3351.  
  3352.  
  3353.  
  3354.           9.6.  .AC Card
  3355.  
  3356.  
  3357.           General form:
  3358.  
  3359.  
  3360.                .AC DEC ND FSTART FSTOP
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.                                                                          52
  3374.  
  3375.  
  3376.                .AC OCT NO FSTART FSTOP
  3377.                .AC LIN NP FSTART FSTOP
  3378.  
  3379.  
  3380.           Examples:
  3381.  
  3382.  
  3383.                .AC DEC 10 1 10K
  3384.                .AC DEC 10 1K 100MEG
  3385.                .AC LIN 100 1 100HZ
  3386.  
  3387.  
  3388.  
  3389.  
  3390.                DEC stands for decade variation, and ND  is  the  number  of
  3391.  
  3392.           points  per  decade.   OCT stands for octave variation, and NO is
  3393.  
  3394.           the number of points per octave.  LIN stands  for  linear  varia-
  3395.  
  3396.           tion,  and  NP  is  the number of points.  FSTART is the starting
  3397.  
  3398.           frequency, and FSTOP is the final frequency.   If  this  card  is
  3399.  
  3400.           included  in  the  deck, SPICE will perform an ac analysis of the
  3401.  
  3402.           circuit over the specified frequency range.  Note that  in  order
  3403.  
  3404.           for  this  analysis  to  be  meaningful, at least one independent
  3405.  
  3406.           source must have been specified with an ac value.
  3407.  
  3408.  
  3409.  
  3410.           9.7.  .TRAN Card
  3411.  
  3412.  
  3413.           General form:
  3414.  
  3415.  
  3416.                .TRAN TSTEP TSTOP <TSTART <TMAX>>
  3417.  
  3418.  
  3419.           Examples:
  3420.  
  3421.  
  3422.                .TRAN 1NS 100NS
  3423.                .TRAN 1NS 1000NS 500NS
  3424.                .TRAN 10NS 1US
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.                                                                          53
  3440.  
  3441.  
  3442.                TSTEP is the printing or plotting increment for line-printer
  3443.  
  3444.           output.   For use with the post-processor, TSTEP is the suggested
  3445.  
  3446.           computing increment.  TSTOP is the final time, and TSTART is  the
  3447.  
  3448.           initial  time.   If  TSTART is omitted, it is assumed to be zero.
  3449.  
  3450.           The transient analysis always begins at time zero.  In the inter-
  3451.  
  3452.           val  <zero,  TSTART>,  the circuit is analyzed (to reach a steady
  3453.  
  3454.           state), but no outputs are  stored.   In  the  interval  <TSTART,
  3455.  
  3456.           TSTOP>,  the circuit is analyzed and outputs are stored.  TMAX is
  3457.  
  3458.           the maximum stepsize that SPICE will use (for default,  the  pro-
  3459.  
  3460.           gram  chooses  either  TSTEP or (TSTOP-TSTART)/50.0, whichever is
  3461.  
  3462.           smaller.  TMAX is useful when one wishes to guarantee a computing
  3463.  
  3464.           interval which is smaller than the printer increment, TSTEP.
  3465.  
  3466.  
  3467.                UIC (use initial conditions) is an  optional  keyword  which
  3468.  
  3469.           indicates  that  the  user  does  not want SPICE to solve for the
  3470.  
  3471.           quiescent  operating  point  before   beginning   the   transient
  3472.  
  3473.           analysis.   If  this  keyword is specified, SPICE uses the values
  3474.  
  3475.           specified using IC=... on the various  elements  as  the  initial
  3476.  
  3477.           transient  condition  and proceeds with the analysis.  If the .IC
  3478.  
  3479.           card has been specified, then the node voltages on the  .IC  card
  3480.  
  3481.           are  used  to  compute  the  intitial conditions for the devices.
  3482.  
  3483.           Look at the description on the .IC card  for  its  interpretation
  3484.  
  3485.           when UIC is not specified.
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.                                                                          54
  3506.  
  3507.  
  3508.           9.8.  .FOUR Card
  3509.  
  3510.  
  3511.  
  3512.                The .FOUR card used by SPICE2 to request fourier analysis of
  3513.  
  3514.           outputs  has  been  replaced by the fourier command in nutmeg and
  3515.  
  3516.           the interactive SPICE3 front end. For details  of  this  command,
  3517.  
  3518.           see the manuals for these interfaces.
  3519.  
  3520.  
  3521.  
  3522.  
  3523.  
  3524.           10.  APPENDIX A:  EXAMPLE DATA DECKS
  3525.  
  3526.  
  3527.  
  3528.           10.1.  Circuit 1
  3529.  
  3530.  
  3531.                The following deck determines the dc operating  point  of  a
  3532.  
  3533.           simple  differential  pair.  In  addition,  the  ac  small-signal
  3534.  
  3535.           response is computed over the frequency range 1Hz to 100MEGHz.
  3536.  
  3537.  
  3538.               SIMPLE DIFFERENTIAL PAIR
  3539.               VCC 7 0 12
  3540.               VEE 8 0 -12
  3541.               VIN 1 0 AC 1
  3542.               RS1 1 2 1K
  3543.               RS2 6 0 1K
  3544.               Q1 3 2 4 MOD1
  3545.               Q2 5 6 4 MOD1
  3546.               RC1 7 3 10K
  3547.               RC2 7 5 10K
  3548.               RE 4 8 10K
  3549.                .MODEL MOD1 NPN BF=50 VAF=50 IS=1.E-12 RB=100 CJC=.5PF TF=.6NS
  3550.                .AC DEC 10 1 100MEG
  3551.                .END
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.                                                                          55
  3572.  
  3573.  
  3574.           10.2.  Circuit 2
  3575.  
  3576.  
  3577.           The following deck computes the output characteristics of a  MOS-
  3578.  
  3579.           FET device over the range 0-10V for VDS and 0-5V for VGS.
  3580.  
  3581.  
  3582.  
  3583.                MOS OUTPUT CHARACTERISTICS
  3584.                .OPTIONS NODE NOPAGE
  3585.                VDS 3 0
  3586.                VGS 2 0
  3587.                M1 1 2 0 0 MOD1 L=4U W=6U AD=10P AS=10P
  3588.                .MODEL MOD1 NMOS VTO=-2 NSUB=1.0E15 UO=550
  3589.                * VIDS MEASURES ID, WE COULD HAVE USED VDS, BUT ID WOULD BE NEGATIVE
  3590.                VIDS 3 1
  3591.                .DC VDS 0 10 .5 VGS 0 5 1
  3592.                .END
  3593.  
  3594.  
  3595.  
  3596.  
  3597.           10.3.  Circuit 3
  3598.  
  3599.  
  3600.                The following deck determines the dc transfer curve and  the
  3601.  
  3602.           transient  pulse response of a simple RTL inverter.  The input is
  3603.  
  3604.           a pulse from 0 to 5 Volts with delay, rise, and fall times of 2ns
  3605.  
  3606.           and a pulse width of 30ns.  The transient interval is 0 to 100ns,
  3607.  
  3608.           with printing to be done every nanosecond.
  3609.  
  3610.  
  3611.  
  3612.                SIMPLE RTL INVERTER
  3613.                VCC 4 0 5
  3614.                VIN 1 0 PULSE 0 5 2NS 2NS 2NS 30NS
  3615.                RB 1 2 10K
  3616.                Q1 3 2 0 Q1
  3617.                RC 3 4 1K
  3618.                .MODEL Q1 NPN BF 20 RB 100 TF .1NS CJC 2PF
  3619.                .DC VIN 0 5 0.1
  3620.                .TRAN 1NS 100NS
  3621.                .END
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.                                                                          56
  3638.  
  3639.  
  3640.           10.4.  Circuit 4
  3641.  
  3642.  
  3643.  
  3644.                The following deck simulates a four-bit binary adder,  using
  3645.  
  3646.           several  subcircuits  to  describe  various pieces of the overall
  3647.  
  3648.           circuit.
  3649.  
  3650.  
  3651.  
  3652.               ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER
  3653.  
  3654.                    *** SUBCIRCUIT DEFINITIONS
  3655.  
  3656.                .SUBCKT NAND 1 2 3 4
  3657.                     *   NODES:  INPUT(2), OUTPUT, VCC
  3658.                Q1 9 5 1 QMOD
  3659.                D1CLAMP 0 1 DMOD
  3660.                Q2 9 5 2 QMOD
  3661.                D2CLAMP 0 2 DMOD
  3662.                RB 4 5 4K
  3663.                R1 4 6 1.6K
  3664.                Q3 6 9 8 QMOD
  3665.                R2 8 0 1K
  3666.                RC 4 7 130
  3667.                Q4 7 6 10 QMOD
  3668.                DVBEDROP 10 3 DMOD
  3669.                Q5 3 8 0 QMOD
  3670.                .ENDS NAND
  3671.                .SUBCKT ONEBIT 1 2 3 4 5 6
  3672.                     *   NODES:  INPUT(2), CARRY-IN, OUTPUT, CARRY-OUT, VCC
  3673.                X1 1 2 7 6 NAND
  3674.                X2 1 7 8 6 NAND
  3675.                X3 2 7 9 6 NAND
  3676.                X4 8 9 10 6 NAND
  3677.                X5 3 10 11 6 NAND
  3678.                X6 3 11 12 6 NAND
  3679.                X7 10 11 13 6 NAND
  3680.                X8 12 13 4 6 NAND
  3681.                X9 11 7 5 6 NAND
  3682.                .ENDS ONEBIT
  3683.                .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9
  3684.                     *   NODES:  INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1,
  3685.                     *           CARRY-IN, CARRY-OUT, VCC
  3686.                X1 1 2 7 5 10 9 ONEBIT
  3687.                X2 3 4 10 6 8 9 ONEBIT
  3688.                .ENDS TWOBIT
  3689.  
  3690.                .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.                                                                          57
  3704.  
  3705.  
  3706.                    *   NODES:  INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2),
  3707.                    *           OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN, CARRY-OUT, VCC
  3708.                X1 1 2 3 4 9 10 13 16 15 TWOBIT
  3709.                X2 5 6 7 8 11 12 16 14 15 TWOBIT
  3710.                .ENDS FOURBIT
  3711.  
  3712.                    *** DEFINE NOMINAL CIRCUIT
  3713.  
  3714.                .MODEL DMOD D
  3715.                .MODEL QMOD NPN(BF=75 RB=100 CJE=1PF CJC=3PF)
  3716.                VCC 99 0 DC 5V
  3717.                VIN1A 1 0 PULSE(0 3 0 10NS 10NS   10NS   50NS)
  3718.                VIN1B 2 0 PULSE(0 3 0 10NS 10NS   20NS  100NS)
  3719.                VIN2A 3 0 PULSE(0 3 0 10NS 10NS   40NS  200NS)
  3720.                VIN2B 4 0 PULSE(0 3 0 10NS 10NS   80NS  400NS)
  3721.                VIN3A 5 0 PULSE(0 3 0 10NS 10NS  160NS  800NS)
  3722.                VIN3B 6 0 PULSE(0 3 0 10NS 10NS  320NS 1600NS)
  3723.                VIN4A 7 0 PULSE(0 3 0 10NS 10NS  640NS 3200NS)
  3724.                VIN4B 8 0 PULSE(0 3 0 10NS 10NS 1280NS 6400NS)
  3725.                X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT
  3726.                RBIT0 9 0 1K
  3727.                RBIT1 10 0 1K
  3728.                RBIT2 11 0 1K
  3729.                RBIT3 12 0 1K
  3730.                RCOUT 13 0 1K
  3731.  
  3732.                    *** (FOR THOSE WITH MONEY (AND MEMORY) TO BURN)
  3733.                .TRAN 1NS 6400NS
  3734.  
  3735.                .END
  3736.  
  3737.  
  3738.  
  3739.  
  3740.           10.5.  Circuit 5
  3741.  
  3742.  
  3743.  
  3744.                The following deck simulates a  transmission-line  inverter.
  3745.  
  3746.           Two transmission-line elements are required since two propagation
  3747.  
  3748.           modes are excited.  In the case of a coaxial line, the first line
  3749.  
  3750.           (T1)  models  the inner conductor with respect to the shield, and
  3751.  
  3752.           the second line (T2) models the shield with respect to  the  out-
  3753.  
  3754.           side world.
  3755.  
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.                                                                          58
  3770.  
  3771.  
  3772.               TRANSMISSION-LINE INVERTER
  3773.               V1 1 0 PULSE(0 1 0 0.1N)
  3774.               R1 1 2 50
  3775.               X1 2 0 0 4 TLINE
  3776.               R2 4 0 50
  3777.                .SUBCKT TLINE 1 2 3 4
  3778.               T1 1 2 3 4 Z0=50 TD=1.5NS
  3779.               T2 2 0 4 0 Z0=100 TD=1NS
  3780.                .ENDS TLINE
  3781.                .TRAN 0.1NS 20NS
  3782.                .END
  3783.  
  3784.  
  3785.  
  3786.  
  3787.  
  3788.  
  3789.  
  3790.  
  3791.  
  3792.  
  3793.  
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.