home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
- A Short Introduction to SPICE3
-
-
- Wayne Christopher
-
- CAD Group
- U. C. Berkeley
-
-
-
-
-
- SPICE3 is an interactive circuit simulation program.
- You can find details about preparing SPICE3 decks in the
- SPICE3 Users' Guide - this paper assumes that you are fami-
- liar with SPICE2. If you are not familiar with nutmeg, you
- should read the nutmeg manual page or A Short Introduction
- to Nutmeg before reading further.
-
- To start SPICE3, you should type
-
- spice input_deck
-
- Where input_deck is the name of the SPICE3 deck you want to
- run. Alternately, you can just type
-
- spice
-
- In which case SPICE3 will just start up without loading a
- circuit.
-
- Then, if you have any .ac, .dc, .tran, or .op cards in
- the deck and you want to run them as given, you can just
- type
-
- run
-
- SPICE3 will runs the requested analyses and will prompt you
- again when it is done and the data is available to you. If
- you want to do an analysis that is not asked for by a line
- in the deck, you can type the line just as you would write
- it in the deck, without the dot. For instance, the command
-
- ac lin 20 0.99 1.01
-
- will do an ac analysis with 20 frequency values between 0.99
- and 1.01.
-
- After the analysis is done and you get the SPICE3
- prompt, the values of the nodes are available to you as if
- you had loaded them into nutmeg. For instance, you could
-
-
-
- December 9, 1985
-
-
-
-
-
- - 2 -
-
-
- then give a command like
-
- plot v(4) v(5)
-
- If you want to save the values in a rawfile, you can
- then type
-
- write filename FREQ v(4) v(5)
-
- to put the values of FREQ, v(4), and v(5) into filename.
- Note that the scale for the vectors (frequency or time)
- should always be written, and should be first. If you want
- to save everything, you can type
-
- write filename all
-
- All nutmeg commands are available in SPICE3 - you can
- use display, asciiplot, help, and so forth. There are also
- many commands for tracing the analysis - you can print the
- values at a node for each time point or cause SPICE3 to stop
- whenever a value gets to a certain point. Descriptions of
- the commands stop, trace, and step can be found in the
- SPICE3 manual page.
-
- After you are done with the values you have obtained,
- you can change the circuit and re-run the analysis. If you
- want to edit the circuit itself, you can use the command
- edit - it will put you into vi and let you change the cir-
- cuit in whatever way you want, and then when you are done it
- will re-load the circuit and let you run it again. Also you
- can give another ac, dc, tran, or op command after the first
- one completes. (If the analysis is not finished, i.e. you
- typed an interrupt, or made it stop, then you will have to
- type reset before you can re-run it.)
-
- Each separate analysis that you do will create one or
- more sets of values. Such a set of values is called a plot
- - if you have done several analyses, and you want to switch
- from the results of one to the results of another, the set-
- plot command will tell you which ones are available and let
- you choose one.
-
- Here is a sample SPICE3 run:
-
-
- % spice
-
- spice 10 -> source xtal.in
-
- Circuit: crystal filter
-
- spice 11 -> listing
-
- (listing of the circuit is printed)
-
-
-
- December 9, 1985
-
-
-
-
-
- - 3 -
-
-
- spice 12 -> run
- spice 15 -> display
- Here are the vectors currently active:
-
- Title: crystal filter
- Plotname: AC analysis curves.
- Date: Thu Sep 26 12:16:34 PDT 1985
-
- FREQ : frequency (complex, 20 long) [scale]
- V(4) : voltage (complex, 20 long)
- V(6) : voltage (complex, 20 long)
- V(5) : voltage (complex, 20 long)
-
- (and so on...)
-
- spice 16 -> plot v(4)
-
- (plot takes place)
-
- spice 17 -> write outfile FREQ v(4)
- spice 18 -> ac lin 30 1 2
- spice 19 -> display
- Here are the vectors currently active:
-
- Title: crystal filter
- Plotname: AC analysis curves.
- Date: Thu Sep 26 12:16:34 PDT 1985
-
- FREQ : frequency (complex, 30 long) [scale]
- V(4) : voltage (complex, 30 long)
- V(6) : voltage (complex, 30 long)
- V(5) : voltage (complex, 30 long)
-
- (and so on...)
-
- spice 20 -> asciiplot v(4) > tempfile
-
- (ascii plot takes place)
-
- spice 21 -> shell lpr tempfile
-
- (a printout is made of the ascii plot)
-
- spice 22 -> quit
- Warning: the following plot hasn't been saved:
- crystal filter, AC analysis curves.
-
- Are you sure you want to quit? y
- Ok, later days...
- %
-
-
- Note that SPICE3 will warn you if you have work in pro-
- gress that you haven't saved and might not want to lose.
-
-
-
- December 9, 1985
-
-
-
-
-
- - 4 -
-
-
- Any problems with SPICE3 should be sent to:
- Tom Quarles (quarles@ucbcad.berkeley.edu)
- and
- Wayne Christopher (faustus@ucbcad.berkeley.edu).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- December 9, 1985
-
-
-