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

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