home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / education / n / spice / docs / FTE / MS / SPICEINTRO < prev   
Encoding:
Text File  |  1988-01-27  |  5.0 KB  |  179 lines

  1.  
  2. .\" RCS Info: $Revision: 1.2 $ on $Date: 85/09/16 17:34:03 $
  3. .\"           $Source: /cad4/faustus/spice/doc/RCS/nutmegintro.ms,v $
  4. .\" Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
  5. .ds S \s-2SPICE\s+2\&3
  6. .TL
  7. A Short Introduction to \*S
  8. .AU
  9. Wayne Christopher
  10. .AI
  11. CAD Group
  12. U. C. Berkeley
  13. .PP
  14. \*S is an interactive circuit simulation program. You can find details
  15. about preparing \*S decks in the \*S Users' Guide \- this paper assumes
  16. that you are familiar with \s-2SPICE\s+2\&2. If you are not familiar with
  17. \fBnutmeg\fR, you should read the \fBnutmeg\fR manual page or \fBA Short
  18. Introduction to Nutmeg\fR before reading further.
  19. .PP
  20. To start \*S, you should type
  21. .IP
  22. .B
  23. spice input_deck
  24. .R
  25. .LP
  26. Where \fBinput_deck\fR is the name of the \*S deck you want to run.
  27. Alternately, you can just type
  28. .IP
  29. .B
  30. spice
  31. .R
  32. .LP
  33. In which case \*S will just start up without loading a circuit.
  34. .PP
  35. Then, if you have any \fB.ac, .dc, .tran,\fR or \fB.op\fR cards in the
  36. deck and you want to run them as given, you can just type
  37. .IP
  38. .B
  39. run
  40. .R
  41. .LP
  42. \*S will runs the requested analyses and will prompt you again when
  43. it is done and the data is available to you. If you want to do an
  44. analysis that is not asked for by a line in the deck, you can type
  45. the line just as you would write it in the deck, without the dot.
  46. For instance, the command
  47. .IP
  48. .B
  49. ac lin 20 0.99 1.01
  50. .R
  51. .LP
  52. will do an ac analysis with 20 frequency values between 0.99 and 1.01.
  53. .PP
  54. After the analysis is done and you get the \*S prompt, the
  55. values of the nodes are available to you as if you had loaded
  56. them into \fBnutmeg\fR. For instance, you could then give a command
  57. like
  58. .IP
  59. .B
  60. plot v(4) v(5)
  61. .R
  62. .PP
  63. If you want to save the values in a \fBrawfile\fR, you can then type
  64. .IP
  65. .B
  66. write filename FREQ v(4) v(5)
  67. .R
  68. .LP
  69. to put the values of \fBFREQ, v(4),\fR and \fBv(5)\fR into \fBfilename\fR.
  70. Note that the scale for the vectors (frequency or time) should always
  71. be written, and should be first. If you want to save everything, you
  72. can type
  73. .IP
  74. .B
  75. write filename all
  76. .R
  77. .PP
  78. All \fBnutmeg\fR commands are available in \*S \- you can use \fBdisplay,
  79. asciiplot, help,\fR and so forth. There are also many commands for tracing
  80. the analysis \- you can print the values at a node for each time point
  81. or cause \*S to stop whenever a value gets to a certain point. Descriptions
  82. of the commands \fBstop, trace,\fR and \fBstep\fR can be found in the
  83. \*S manual page.
  84. .PP
  85. After you are done with the values you have obtained, you can change the
  86. circuit and re-run the analysis. If you want to edit the circuit itself,
  87. you can use the command \fBedit\fR \- it will put you into \fIvi\fR and
  88. let you change the circuit in whatever way you want, and then when you
  89. are done it will re-load the circuit and let you \fBrun\fR it again.
  90. Also you can give another \fBac, dc, tran,\fR or \fBop\fR command after
  91. the first one completes. (If the analysis is not finished, i.e. you
  92. typed an interrupt, or made it \fBstop\fR, then you will have to type
  93. \fBreset\fR before you can re-run it.)
  94. .PP
  95. Each separate analysis that you do will create one or more sets of values.
  96. Such a set of values is called a \fBplot\fR \-
  97. if you have done several analyses, and you want to switch from the
  98. results of one to the results of another, the \fBsetplot\fR command
  99. will tell you which ones are available and let you choose one.
  100. .PP
  101. Here is a sample \*S run:
  102. .nf
  103. .na
  104.  
  105.  
  106. % spice
  107.  
  108. spice 10 -> \fIsource xtal.in\fR
  109.  
  110. Circuit: crystal filter
  111.  
  112. spice 11 -> \fIlisting\fR
  113.  
  114.     (\fBlisting of the circuit is printed\fR)
  115.  
  116. spice 12 -> \fIrun\fR
  117. spice 15 -> \fIdisplay\fR
  118. Here are the vectors currently active:
  119.  
  120. Title: crystal filter
  121. Plotname: AC analysis curves.
  122. Date: Thu Sep 26 12:16:34 PDT 1985
  123.  
  124.     FREQ                    : frequency (complex, 20 long) [scale]
  125.     V(4)                    : voltage (complex, 20 long)
  126.     V(6)                    : voltage (complex, 20 long)
  127.     V(5)                    : voltage (complex, 20 long)
  128.  
  129.         (\fBand so on...\fR)
  130.  
  131. spice 16 -> \fIplot v(4)\fR
  132.  
  133.         (\fBplot takes place\fR)
  134.  
  135. spice 17 -> \fIwrite outfile FREQ v(4)\fR
  136. spice 18 -> \fIac lin 30 1 2\fR
  137. spice 19 -> \fIdisplay\fR
  138. Here are the vectors currently active:
  139.  
  140. Title: crystal filter
  141. Plotname: AC analysis curves.
  142. Date: Thu Sep 26 12:16:34 PDT 1985
  143.  
  144.     FREQ                    : frequency (complex, 30 long) [scale]
  145.     V(4)                    : voltage (complex, 30 long)
  146.     V(6)                    : voltage (complex, 30 long)
  147.     V(5)                    : voltage (complex, 30 long)
  148.  
  149.         (\fBand so on...\fR)
  150.     
  151. spice 20 -> \fIasciiplot v(4) > tempfile\fR
  152.  
  153.         (\fBascii plot takes place\fB)
  154.  
  155. spice 21 -> \fIshell lpr tempfile\fR
  156.     
  157.         (\fBa printout is made of the ascii plot\fR)
  158.  
  159. spice 22 -> \fIquit\fR
  160. Warning: the following plot hasn't been saved:
  161.     crystal filter, AC analysis curves.
  162.  
  163. Are you sure you want to quit? \fIy\fR
  164. Ok, later days...
  165. %
  166.  
  167. .PP
  168. Note that \*S will warn you if you have work in progress that you haven't
  169. saved and might not want to lose.
  170. .PP
  171. Any problems with \*S should be sent to:
  172. .br
  173. Tom Quarles (\fIquarles@ucbcad.berkeley.edu\fR) 
  174. .br
  175. and
  176. .br
  177. Wayne Christopher (\fIfaustus@ucbcad.berkeley.edu\fR).
  178.  
  179.