home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / education / n / spice / docs / FTE / LPR / SPICE < prev    next >
Encoding:
Text File  |  1988-01-27  |  13.1 KB  |  397 lines

  1.  
  2.  
  3.  
  4. SPICE(1)            UNIX Programmer's Manual             SPICE(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      spice - circuit simulator
  10.  
  11. SYNOPSIS
  12.      spice [ -n ] [ -t term ] [ -m mfbcap ] [ -r rawfile] [ -b ]
  13.      [ -i ] [ input file ... ]
  14.  
  15. DESCRIPTION
  16.      This manual page describes the commands available for
  17.      interactive use of SPICE3. For details of circuit descrip-
  18.      tions and the process of simulating a circuit, see the
  19.      SPICE3 User's Manual.  The commands available are a superset
  20.      of those available for nutmeg - only the additional commands
  21.      available in SPICE3 are described here.
  22.  
  23.      Arguments are:
  24.  
  25.      -n (or -N)
  26.           Don't try to source the file ".spiceinit" upon startup.
  27.           Normally SPICE3 tries to find the file in the current
  28.           directory, and if it is not found then in the user's
  29.           home directory.
  30.  
  31.      -t term (or -T term)
  32.           The program is being run on a terminal with mfb name
  33.           term.
  34.  
  35.      -m mfbcap (or -M mfbcap)
  36.           Use mfbcap as the file containing terminal descrip-
  37.           tions, instead of the default (~cad/lib/mfbcap). This
  38.           option and the -m option may also be used with the set
  39.           command. Note that is the environment variable MFBCAP
  40.           is set then it becomes the default mfbcap file, instead
  41.           of ~cad/lib/mfbcap.
  42.  
  43.      -b (or -B)
  44.           Run in batch mode. SPICE3 will read the standard input
  45.           or the specified input file and do the simulation. Note
  46.           that if the standard input is not a terminal, SPICE3
  47.           will default to batch mode, unless the -i flag is
  48.           given.
  49.  
  50.      -s (or -S)
  51.           Run in server mode. This is like batch mode, except
  52.           that a temporary rawfile is used and then written to
  53.           the standard output, preceded by a line with a single
  54.           "@", after the simulation is done. This mode is used by
  55.           the spice daemon.
  56.  
  57.      -i (or -I)
  58.           Run in interactive mode. This is useful if the standard
  59.           input is not a terminal but interactive mode is
  60.  
  61.  
  62.  
  63. Printed 12/9/85          20 January 1985                        1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SPICE(1)            UNIX Programmer's Manual             SPICE(1)
  71.  
  72.  
  73.  
  74.           desired. Command completion is not available unless the
  75.           standard input is a terminal, however.
  76.  
  77.      -r rawfile (or -R rawfile)
  78.           Use rawfile as the default file into which the results
  79.           of the simulation are saved.
  80.  
  81.      Further arguments are taken to be SPICE3 input decks, which
  82.      are read and saved. (If batch mode is requested then they
  83.      are run immediately.)
  84.  
  85.      SPICE3 will accept any SPICE2 input decks, and output ascii
  86.      plots, fourier analyses, and node printouts as specified in
  87.      .plot, .four, and .print cards.  If a out parameter is given
  88.      on a .width card, the effect is the same as set width = ....
  89.      Since SPICE3 ascii plots do not use multiple ranges, how-
  90.      ever, if vectors together on a .plot card have different
  91.      ranges they will not provide as much information as they
  92.      would in SPICE2. The output of SPICE3 is also much less ver-
  93.      bose than SPICE2, in that the only data printed is that
  94.      requested by the above cards.
  95.  
  96.      Vector names are the same as in nutmeg, with this addition:
  97.      a name such as @name[param], where name is either the name
  98.      of a device instance or model, denotes the value of the
  99.      param parameter of the device or model. See the SPICE3
  100.      User's Manual for details of what parameters are available.
  101.      The value is a vector of length 1.
  102.  
  103.      SPICE3 commands are as follows (these are only those com-
  104.      mands not also available in nutmeg - consult the nutmeg
  105.      manual page for more commands):
  106.  
  107.      setcirc [circuit name]
  108.           Change the current circuit. The current circuit is the
  109.           one that is used for the simulation commands below.
  110.           When a circuit is loaded with the source command (see
  111.           below) it becomes the current circuit.
  112.  
  113.      op [.op card args]
  114.           Do an operating point analysis.
  115.  
  116.      tran [.tran card args]
  117.           Do a transient analysis.
  118.  
  119.      ac [.ac card args]
  120.           Do an ac analysis.
  121.  
  122.      dc [.dc card args]
  123.           Do a dc transfer curve analysis.
  124.  
  125.      listing [logical] [physical] [deck]
  126.  
  127.  
  128.  
  129. Printed 12/9/85          20 January 1985                        2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SPICE(1)            UNIX Programmer's Manual             SPICE(1)
  137.  
  138.  
  139.  
  140.           Print a listing of the current circuit. If the logical
  141.           argument is given, the listing is with all continuation
  142.           lines collapsed into one line, and if the physical
  143.           argument is given the lines are printed out as they
  144.           were found in the file. The default is logical. A deck
  145.           listing is just like the physical listing, except
  146.           without the line numbers it recreates the input file
  147.           verbatim (except that it does not preserve case).
  148.  
  149.      edit [file]
  150.           Print the current SPICE3 deck into a file, call up the
  151.           editor on that file and allow the user to modify it,
  152.           and then read it back in, replacing the origonal deck.
  153.           If a filename is given, then edit that file and load
  154.           it, making the circuit the current one.
  155.  
  156.      device devname ...
  157.           Print out all the available parameters for the named
  158.           devices.
  159.  
  160.      continue
  161.           Continue after a stop.
  162.  
  163.      state XXX
  164.           Print the state of the circuit. (unimplemented)
  165.  
  166.      save [all] [output ...]  or .save [all] [output ...]
  167.           Save a set of outputs, discarding the rest. If a node
  168.           has been mentioned in a save command, it will appear in
  169.           the working plot after a run has completed, or in the
  170.           rawfile if spice is run in batch mode. If a node is
  171.           traced or plotted (see below) it will also be saved.
  172.           For backward compatibility, if there are no save com-
  173.           mands given, all outputs are saved.
  174.  
  175.      stop [ after n] [ when something cond something ] ...
  176.           Set a breakpoint. The argument after n means stop after
  177.           n iteration number n, and the argument when something
  178.           cond something means stop when the first something is
  179.           in the given relation with the second something, the
  180.           possible relations being eq or = (equal to), ne or <>
  181.           (not equal to), gt or > (greater than), lt or < (less
  182.           than), ge or >= (greater than or equal to), and le or
  183.           <= (less than or equal to).  IO redirection is disabled
  184.           for the stop command, since the relational operations
  185.           conflict with it (it doesn't produce any output any-
  186.           way).  The somethings above may be node names in the
  187.           running circuit, or real values. (You can do stop after
  188.           1 lt 0, although it isn't much use.) If more than one
  189.           condition is given, e.g.  stop after 4 when v(1) > 4
  190.           when v(2) < 2, the conjunction of the conditions is
  191.           implied.
  192.  
  193.  
  194.  
  195. Printed 12/9/85          20 January 1985                        3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SPICE(1)            UNIX Programmer's Manual             SPICE(1)
  203.  
  204.  
  205.  
  206.      trace [ node ...]
  207.           Trace nodes. Every iteration the value of the node is
  208.           printed to the standard output.
  209.  
  210.      iplot [ node ...]
  211.           Incrementally plot the values of the nodes while SPICE3
  212.           runs.
  213.  
  214.      step [number]
  215.           Iterate number times, or once, and then stop.
  216.  
  217.      status
  218.           Display all of the traces and breakpoints currently in
  219.           effect.
  220.  
  221.      delete [debug number ...]
  222.           Delete the specified breakpoints and traces. The debug
  223.           numbers are those shown by the status command. (Unless
  224.           you do status > file, in which case the debug numbers
  225.           aren't printed.)
  226.  
  227.      reset
  228.           Throw out any intermediate data in the circuit (e.g,
  229.           after a breakpoint or after one or more analyses have
  230.           been done already), and re-parse the deck. The circuit
  231.           can then be re-run. (Note: this command used to be end
  232.           in SPICE 3a5 and earlier versions -- end is now used
  233.           for control structures (stay tuned...)).
  234.  
  235.      run [rawfile]
  236.           Run the simulation as specified in the input file. If
  237.           there were any of the control cards .ac, .op, .tran, or
  238.           .dc, they are executed. The output is put in rawfile if
  239.           it was given, in addition to being available interac-
  240.           tively.
  241.  
  242.      source file
  243.           Read the SPICE3 input file file. Nutmeg and SPICE3 com-
  244.           mands may be included in the file, and are executed
  245.           when read. Needless to say, device names may not have
  246.           names that are identical with nutmeg command names. The
  247.           first line in any input file is considered a title line
  248.           and not parsed but kept as the name of the circuit. The
  249.           exception to this rule is the file .spiceinit.
  250.  
  251.      There are several set variables that SPICE3 uses but nutmeg
  252.      does not. They are:
  253.  
  254.                      modelcard
  255.                      The name of the model card (normally
  256.                      .model).
  257.  
  258.  
  259.  
  260.  
  261. Printed 12/9/85          20 January 1985                        4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SPICE(1)            UNIX Programmer's Manual             SPICE(1)
  269.  
  270.  
  271.  
  272.                      noaskquit
  273.                      Do not check to make sure that there are no
  274.                      circuits suspended and no plots unsaved.
  275.                      Normally SPICE3 will warn the user when he
  276.                      tries to quit if this is the case.
  277.  
  278.                      nobjthack
  279.                      Assume that BJT's have 4 nodes.
  280.  
  281.                      noparse
  282.                      Don't attempt to parse decks when they are
  283.                      read in (useful for debugging). Of course,
  284.                      they cannot be run if they are not parsed.
  285.  
  286.                      nosubckt
  287.                      Don't expand subcircuits.
  288.  
  289.                      renumber
  290.                      Renumber input lines when a deck has
  291.                      .include's.
  292.  
  293.                      spdebug
  294.                      Print spice debugging information (as
  295.                      opposed to front-end debugging information
  296.                      and C-shell parser debugging information...)
  297.  
  298.                      subend
  299.                      The card to end subcircuits (normally
  300.                      .ends).
  301.  
  302.                      subinvoke
  303.                      The prefix to invoke subcircuits (normally
  304.                      x).
  305.  
  306.                      substart
  307.                      The card to begin subcircuits (normally
  308.                      .subckt).
  309.  
  310.      There are a number of rusage parameters available, in addi-
  311.      tion to the ones available in nutmeg:
  312.  
  313.                      ducks
  314.                      How many ducks have been used.
  315.  
  316.      If there are subcircuits in the input file, SPICE3 expands
  317.      instances of them.  A subcircuit is delimited by the cards
  318.      .subckt and .ends, or whatever the value of the variables
  319.      substart and subend is, respectively. An instance of a sub-
  320.      circuit is created by specifying a device with type 'x' -
  321.      the device line is written
  322.  
  323.           xname node1 node2 ... subcktname
  324.  
  325.  
  326.  
  327. Printed 12/9/85          20 January 1985                        5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. SPICE(1)            UNIX Programmer's Manual             SPICE(1)
  335.  
  336.  
  337.  
  338.      where the nodes are the node names that replace the formal
  339.      parameters on the .subckt line. All nodes that are not for-
  340.      mal parameters are prepended with the name given to the
  341.      instance and a ':', as are the names of the devices in the
  342.      subcircuit. If there are several nested subcircuits, node
  343.      and device names look like subckt1:subckt2:...:name.  If the
  344.      variable subinvoke is set, then it is used as the prefix
  345.      that specifies instances of subcircuits, instead of 'x'.
  346.  
  347. VMS NOTES
  348.      The standard suffix for rawspice files in VMS is ".raw".
  349.  
  350. SEE ALSO
  351.      nutmeg(1), sconvert(1), spice(1), mfb(3), spop(1),
  352.      mfb2lpr(1), mhc(3), SPICE3 User's Guide
  353.  
  354. AUTHORS
  355.      SPICE3:  Tom Quarles (quarles@cad.berkeley.edu)
  356.      User interface: Wayne Christopher (faustus@cad.berkeley.edu)
  357.  
  358. BUGS
  359.      SPICE3 will recognise all the notations used in SPICE2 .plot
  360.      cards, and will translate vp(1) into ph(v(1)), and so forth.
  361.      However, if there are spaces in these names it won't work.
  362.      Hence v(1, 2) and (-.5, .5) aren't recognised.
  363.  
  364.      BJT's can have either 3 or 4 nodes, which makes it difficult
  365.      for the subcircuit expansion routines to decide what to
  366.      rename. If the fourth parameter has been declared as a model
  367.      name, then it is assumed that there are 3 nodes, otherwise
  368.      it is considered a node. To disable this kludge, you can set
  369.      the variable "nobjthack", which will force BJT's to have 4
  370.      nodes (for the purposes of subcircuit expansion, at least).
  371.  
  372.      The @name[param] notation doesn't work with trace, iplot,
  373.      etc.  yet.
  374.  
  375. CAVEATS
  376.      SPICE3 files specified on the command line are read in
  377.      before the .spiceinit file is read. Thus if you define
  378.      aliases there that you call in a SPICE3 source file men-
  379.      tioned on the command line, they won't be recognised.
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393. Printed 12/9/85          20 January 1985                        6
  394.  
  395.  
  396.  
  397.