home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / education / n / spice / docs / FTE / MS / NUTMEGINTR next >
Encoding:
Text File  |  1988-01-27  |  6.8 KB  |  232 lines

  1. .\" RCS Info: $Revision: 1.2 $ on $Date: 85/09/16 17:34:03 $
  2. .\"           $Source: /cad4/faustus/spice/doc/RCS/nutmegintro.ms,v $
  3. .\" Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
  4. .TL
  5. A Short Introduction to Nutmeg
  6. .AU
  7. Wayne Christopher
  8. .AI
  9. CAD Group
  10. U. C. Berkeley
  11. .PP
  12. \fBNutmeg\fR
  13. is a post-processor for \s-2SPICE\s+2\&3: it takes data that \s-2SPICE\s+2\&3
  14. generates and plots it on a graphics terminal. If you run \s-2SPICE\s+2\&3 as
  15. .IP
  16. \fBspice -r filename\fR, 
  17. .LP
  18. it will write the values of the variables you
  19. specify into the file \fBfilename\fR. Then you can run
  20. .IP
  21. \fBnutmeg filename\fR
  22. .LP
  23. to load the data into the post-processor. The default filename for both
  24. \s-2SPICE\s+2\&3 and \fBnutmeg\fR is \fBrawspice\fR.
  25. .PP
  26. The most important command in \fBnutmeg\fR is the 
  27. .B plot 
  28. command. If you type
  29. .IP
  30. \fBplot varname\fR
  31. .LP
  32. where 
  33. .B varname 
  34. is the name of one of the outputs in the file (such as
  35. .B TIME), 
  36. \fBnutmeg\fR will plot a graph of the variable on the screen. \fBNutmeg\fR
  37. will print the names of the variables on the bottom line of the
  38. screen as they are plotted. When it prints "-more-" it is waiting
  39. for you to hit a key before proceeding to something else.
  40. You can specify many variables in a 
  41. .B plot 
  42. command, like
  43. .IP
  44. \fBplot TIME v(1) v(2) VWB\fR
  45. .LP
  46. You can also specify combinations of outputs and functions of them, as
  47. in
  48. .IP
  49. \fBplot v(1) + 2 * v(2)\fR
  50. .br
  51. or
  52. .IP
  53. \fBplot log(v(1)) sin(cos(v(2)))\fR
  54. .LP
  55. Notice that the variable name \fBv(1)\fR is not a function, but rather
  56. denotes the voltage at the node named \fB1\fR. (If there is a variable
  57. with a number as a name, like \fB5\fR, you can name it by writing
  58. \fB"5"\fR, or if the type is voltage, as \fBV(5)\fR.) You can use
  59. most algebraic functions, including trig functions, 
  60. \fBlog()\fR, log base 10,
  61. \fBln()\fR, log base \fBe\fR, and functions such as 
  62. \fBmag()\fR, the magnitude of the complex number, 
  63. \fBphase()\fR, the phase,
  64. \fBreal()\fR, the real part, and
  65. \fBimag()\fR, the imaginary part.
  66. These all operate on real or complex values.
  67. You cannot plot complex values, so should you use these
  68. functions to specify what parts of the complex values you want to
  69. plot. (The default for complex values is to plot the real part.)
  70. A complete list of functions and operations available can be 
  71. found in the manual page for \fBnutmeg\fR.
  72. .PP
  73. A few other commands are useful -- the 
  74. .B display
  75. command prints out
  76. the variables that you have available, along with some information
  77. about them. You can leave \fBnutmeg\fR with the 
  78. .B quit
  79. command, and the
  80. .B bug
  81. command sends a bug report to the person in charge of
  82. \fBnutmeg\fR. (This depends upon what networks your machine can send 
  83. mail to -- if you are an internet host it should work. If it doesn't
  84. report the bug to whomever on your system is in charge of CAD
  85. software.)
  86. .PP
  87. You can create new variables with the 
  88. .B let
  89. command, as in
  90. .IP
  91. \fBlet hodedo = v(1) + 2 * v(2)\fR
  92. .PP
  93. (The \fBlet\fR command is different from the \fBset\fR command, which 
  94. sets non-vector variables like \fBwidth, nosort,\fR and \fBprompt\fR.)
  95. .PP
  96. You can print variables with the 
  97. .B print
  98. command:
  99. .IP
  100. \fBprint TIME\fR
  101. .PP
  102. There are also alias and history mechanisms available (see the manual
  103. page for details), and a \fBshell\fR command, which passes its 
  104. arguments to the 
  105. .UX
  106. shell (if you are using 
  107. .UX ),
  108. or starts a subshell.
  109. .PP
  110. Ascii plots are also available, with the 
  111. .B asciiplot
  112. command. The command
  113. .IP
  114. \fBasciiplot one two log(three) > file\fR
  115. .LP
  116. creates an ascii plot in the file "file". If you want a different size
  117. plot, use the 
  118. .B set
  119. command to reset the sizes, like
  120. .IP
  121. \fBset width=80 height=14\fR
  122. .LP
  123. The default values are 130 and 60, suitable for a line printer. Normally
  124. every \fBheight\fR lines there is a page break, but if you do
  125. .IP
  126. \fBset nobreak\fR
  127. .LP
  128. this will be suppressed.
  129. .PP
  130. To see what other commands are available, look at the manual page, or
  131. type 
  132. .B help
  133. in \fBnutmeg\fR. This introduction should be enough to get you
  134. started. Here is a sample \fBnutmeg\fR run (user input is in italics):
  135.  
  136. .nf
  137. % \fInutmeg\fR
  138.  
  139. Title:  SPICE 3-C raw output test heading
  140. Name:      Transient analysis.
  141. Date: 08/19/8403:17:11
  142.  
  143. nutmeg 1 -> \fIdisplay\fR
  144. Here are the variables currently active:
  145.  
  146. Title: SPICE 3-C raw output test heading
  147. Plotname:      Transient analysis.
  148. Date: Sun Dec 1 11:18:25 PST 1985
  149.  
  150. .cs R 20
  151.     TIME                    : time (real, 152 long) [scale]
  152.     v(1)                    : voltage (real, 152 long)
  153.     v(2)                    : voltage (real, 152 long)
  154.     v(3)                    : voltage (real, 152 long)
  155.     v(4)                    : voltage (real, 152 long)
  156.     v(5)                    : voltage (real, 152 long)
  157. .cs R 0
  158.  
  159. nutmeg 2 -> \fIprint v(1)\fR
  160. v(1) = (  0  0  0  0  0  0  0  0  0  0.010663  0.031989  0.074641
  161.     0.159945  0.330552  0.671767  1.354197  2  2  2  2  2
  162.  
  163.         (\fBand so forth\fR)
  164.  
  165.     0  0  0  0  0  0  0  0  )
  166. nutmeg 3 -> \fIplot v(1)\fR
  167.  
  168.         (\fBplot takes place\fR)
  169.  
  170. nutmeg 4 -> \fIlet xxx = log(v(1))\fR
  171. nutmeg 5 -> \fIplot xxx\fR
  172.  
  173.         (\fBplot takes place\fR)
  174.  
  175. nutmeg 6 -> \fIplot v(1) v(2) v(3) + 1 vs TIME * 2\fR
  176.  
  177.         (\fBplot takes place\fR)
  178.  
  179. nutmeg 7 -> \fIbug\fR
  180. Enter a description of the bug. End with ^D.
  181. This works only if you can mail directly to faustus@ic.berkeley.edu
  182.  
  183. \fIGreat program!!
  184.  
  185. ^D\fR
  186. Bug report sent. Thank you.
  187. nutmeg 8 -> \fIasciiplot v(1) v(2) TIME + 2 > File\fR
  188. nutmeg 9 -> \fIshell lpr File\fR
  189.  
  190.     (\fBPick up ascii plot ...\fR)
  191.  
  192. nutmeg 10 -> \fIhelp\fR
  193. For a complete description of nutmeg read the nutmeg manual.
  194. Here is a short list of available commands:
  195.  
  196. alias [[word] alias] : Define an alias.
  197. asciiplot plotargs : Produce ascii plots.
  198. aspice file [outfile] : Run a spice job asynchronously.
  199. bug : Report a nutmeg bug.
  200. cd [directory] : Change working directory.
  201. define [[func (args)] stuff] : Define a user-definable function.
  202. diff plotname plotname [vec ...] : 'diff' two plots.
  203. display : Display vector status.
  204. echo [stuff ...] : Print stuff.
  205. fourier fund_freq vector ... : Do a fourier analysis of some data.
  206. hardcopy device file plotargs : Produce hardcopy plots.
  207. help commandname ... : Print help.
  208. history [number] : Print the history (last number events).
  209. jobs : Report on asynchronous spice jobs.
  210. let varname = expr : Assign vector variables.
  211. load file : Load in data.
  212. plot expr ... [vs expr] [xl xlo xhi] [yl ylo yhi] : Plot things.
  213. print expr ... : Print vector values.
  214. quit : Quit nutmeg.
  215. rspice [input file] : Run a spice job remotely.
  216. rusage : Print current resource usage.
  217. set [option] [option = value] ... : Set a variable.
  218. setplot [plotname] : Change the current working plot.
  219. shell [args] : Fork a shell, or execute the command.
  220. source file : Source a nutmeg file.
  221. unalias word ... : Undefine an alias.
  222. undefine [func ...] : Undefine a user-definable function.
  223. unset varname ... : Unset a variable.
  224. version [number] : Print the version number.
  225. write file expr ... : Write data to a file.
  226.  
  227. nutmeg 11 -> \fIquit\fR
  228. So long.
  229.  
  230. %
  231.  
  232.