home *** CD-ROM | disk | FTP | other *** search
-
- .\" RCS Info: $Revision: 1.2 $ on $Date: 85/09/16 17:34:03 $
- .\" $Source: /cad4/faustus/spice/doc/RCS/nutmegintro.ms,v $
- .\" Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
- .ds S \s-2SPICE\s+2\&3
- .TL
- A Short Introduction to \*S
- .AU
- Wayne Christopher
- .AI
- CAD Group
- U. C. Berkeley
- .PP
- \*S is an interactive circuit simulation program. You can find details
- about preparing \*S decks in the \*S Users' Guide \- this paper assumes
- that you are familiar with \s-2SPICE\s+2\&2. If you are not familiar with
- \fBnutmeg\fR, you should read the \fBnutmeg\fR manual page or \fBA Short
- Introduction to Nutmeg\fR before reading further.
- .PP
- To start \*S, you should type
- .IP
- .B
- spice input_deck
- .R
- .LP
- Where \fBinput_deck\fR is the name of the \*S deck you want to run.
- Alternately, you can just type
- .IP
- .B
- spice
- .R
- .LP
- In which case \*S will just start up without loading a circuit.
- .PP
- Then, if you have any \fB.ac, .dc, .tran,\fR or \fB.op\fR cards in the
- deck and you want to run them as given, you can just type
- .IP
- .B
- run
- .R
- .LP
- \*S 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
- .IP
- .B
- ac lin 20 0.99 1.01
- .R
- .LP
- will do an ac analysis with 20 frequency values between 0.99 and 1.01.
- .PP
- After the analysis is done and you get the \*S prompt, the
- values of the nodes are available to you as if you had loaded
- them into \fBnutmeg\fR. For instance, you could then give a command
- like
- .IP
- .B
- plot v(4) v(5)
- .R
- .PP
- If you want to save the values in a \fBrawfile\fR, you can then type
- .IP
- .B
- write filename FREQ v(4) v(5)
- .R
- .LP
- to put the values of \fBFREQ, v(4),\fR and \fBv(5)\fR into \fBfilename\fR.
- 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
- .IP
- .B
- write filename all
- .R
- .PP
- All \fBnutmeg\fR commands are available in \*S \- you can use \fBdisplay,
- asciiplot, help,\fR 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 \*S to stop whenever a value gets to a certain point. Descriptions
- of the commands \fBstop, trace,\fR and \fBstep\fR can be found in the
- \*S manual page.
- .PP
- 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 \fBedit\fR \- it will put you into \fIvi\fR and
- let you change the circuit in whatever way you want, and then when you
- are done it will re-load the circuit and let you \fBrun\fR it again.
- Also you can give another \fBac, dc, tran,\fR or \fBop\fR command after
- the first one completes. (If the analysis is not finished, i.e. you
- typed an interrupt, or made it \fBstop\fR, then you will have to type
- \fBreset\fR before you can re-run it.)
- .PP
- Each separate analysis that you do will create one or more sets of values.
- Such a set of values is called a \fBplot\fR \-
- if you have done several analyses, and you want to switch from the
- results of one to the results of another, the \fBsetplot\fR command
- will tell you which ones are available and let you choose one.
- .PP
- Here is a sample \*S run:
- .nf
- .na
-
-
- % spice
-
- spice 10 -> \fIsource xtal.in\fR
-
- Circuit: crystal filter
-
- spice 11 -> \fIlisting\fR
-
- (\fBlisting of the circuit is printed\fR)
-
- spice 12 -> \fIrun\fR
- spice 15 -> \fIdisplay\fR
- 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)
-
- (\fBand so on...\fR)
-
- spice 16 -> \fIplot v(4)\fR
-
- (\fBplot takes place\fR)
-
- spice 17 -> \fIwrite outfile FREQ v(4)\fR
- spice 18 -> \fIac lin 30 1 2\fR
- spice 19 -> \fIdisplay\fR
- 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)
-
- (\fBand so on...\fR)
-
- spice 20 -> \fIasciiplot v(4) > tempfile\fR
-
- (\fBascii plot takes place\fB)
-
- spice 21 -> \fIshell lpr tempfile\fR
-
- (\fBa printout is made of the ascii plot\fR)
-
- spice 22 -> \fIquit\fR
- Warning: the following plot hasn't been saved:
- crystal filter, AC analysis curves.
-
- Are you sure you want to quit? \fIy\fR
- Ok, later days...
- %
-
- .PP
- Note that \*S will warn you if you have work in progress that you haven't
- saved and might not want to lose.
- .PP
- Any problems with \*S should be sent to:
- .br
- Tom Quarles (\fIquarles@ucbcad.berkeley.edu\fR)
- .br
- and
- .br
- Wayne Christopher (\fIfaustus@ucbcad.berkeley.edu\fR).
-
-