home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
- A Short Introduction to Nutmeg
-
-
- Wayne Christopher
-
- CAD Group
- U. C. Berkeley
-
-
-
-
-
- Nutmeg is a post-processor for SPICE3: it takes data
- that SPICE3 generates and plots it on a graphics terminal.
- If you run SPICE3 as
-
- spice -r filename,
-
- it will write the values of the variables you specify into
- the file filename. Then you can run
-
- nutmeg filename
-
- to load the data into the post-processor. The default
- filename for both SPICE3 and nutmeg is rawspice.
-
- The most important command in nutmeg is the plot com-
- mand. If you type
-
- plot varname
-
- where varname is the name of one of the outputs in the file
- (such as TIME), nutmeg will plot a graph of the variable on
- the screen. Nutmeg will print the names of the variables on
- the bottom line of the screen as they are plotted. When it
- prints "-more-" it is waiting for you to hit a key before
- proceeding to something else. You can specify many vari-
- ables in a plot command, like
-
- plot TIME v(1) v(2) VWB
-
- You can also specify combinations of outputs and functions
- of them, as in
-
- plot v(1) + 2 * v(2)
- or
-
- plot log(v(1)) sin(cos(v(2)))
-
- Notice that the variable name v(1) is not a function, but
- rather denotes the voltage at the node named 1. (If there is
-
-
-
- December 9, 1985
-
-
-
-
-
- - 2 -
-
-
- a variable with a number as a name, like 5, you can name it
- by writing "5", or if the type is voltage, as V(5).) You can
- use most algebraic functions, including trig functions,
- log(), log base 10, ln(), log base e, and functions such as
- mag(), the magnitude of the complex number, phase(), the
- phase, real(), the real part, and imag(), the imaginary
- part. These all operate on real or complex values. You
- cannot plot complex values, so should you use these func-
- tions to specify what parts of the complex values you want
- to plot. (The default for complex values is to plot the real
- part.) A complete list of functions and operations available
- can be found in the manual page for nutmeg.
-
- A few other commands are useful -- the display command
- prints out the variables that you have available, along with
- some information about them. You can leave nutmeg with the
- quit command, and the bug command sends a bug report to the
- person in charge of nutmeg. (This depends upon what networks
- your machine can send mail to -- if you are an internet host
- it should work. If it doesn't report the bug to whomever on
- your system is in charge of CAD software.)
-
- You can create new variables with the let command, as
- in
-
- let hodedo = v(1) + 2 * v(2)
-
- (The let command is different from the set command,
- which sets non-vector variables like width, nosort, and
- prompt.)
-
- You can print variables with the print command:
-
- print TIME
-
- There are also alias and history mechanisms available
- (see the manual page for details), and a shell command,
- which passes its arguments to the UNIX| shell (if you are
- using UNIX), or starts a subshell.
-
- Ascii plots are also available, with the asciiplot com-
- mand. The command
-
- asciiplot one two log(three) > file
-
- creates an ascii plot in the file "file". If you want a dif-
- ferent size plot, use the set command to reset the sizes,
- like
-
- set width=80 height=14
-
- _________________________
- | UNIX is a trademark of AT&T Bell Laboratories.
-
-
-
-
- December 9, 1985
-
-
-
-
-
- - 3 -
-
-
- The default values are 130 and 60, suitable for a line
- printer. Normally every height lines there is a page break,
- but if you do
-
- set nobreak
-
- this will be suppressed.
-
- To see what other commands are available, look at the
- manual page, or type help in nutmeg. This introduction
- should be enough to get you started. Here is a sample nutmeg
- run (user input is in italics):
-
- % nutmeg
-
- Title: SPICE 3-C raw output test heading
- Name: Transient analysis.
- Date: 08/19/8403:17:11
-
- nutmeg 1 -> display
- Here are the variables currently active:
-
- Title: SPICE 3-C raw output test heading
- Plotname: Transient analysis.
- Date: Sun Dec 1 11:18:25 PST 1985
-
- TIME : time (real, 152 long) [scale]
- v(1) : voltage (real, 152 long)
- v(2) : voltage (real, 152 long)
- v(3) : voltage (real, 152 long)
- v(4) : voltage (real, 152 long)
- v(5) : voltage (real, 152 long)
-
- nutmeg 2 -> print v(1)
- v(1) = ( 0 0 0 0 0 0 0 0 0 0.010663 0.031989 0.074641
- 0.159945 0.330552 0.671767 1.354197 2 2 2 2 2
-
- (and so forth)
-
- 0 0 0 0 0 0 0 0 )
- nutmeg 3 -> plot v(1)
-
- (plot takes place)
-
- nutmeg 4 -> let xxx = log(v(1))
- nutmeg 5 -> plot xxx
-
- (plot takes place)
-
- nutmeg 6 -> plot v(1) v(2) v(3) + 1 vs TIME * 2
-
- (plot takes place)
-
- nutmeg 7 -> bug
-
-
-
- December 9, 1985
-
-
-
-
-
- - 4 -
-
-
- Enter a description of the bug. End with ^D.
- This works only if you can mail directly to faustus@ic.berkeley.edu
-
- Great program!!
-
- ^D
- Bug report sent. Thank you.
- nutmeg 8 -> asciiplot v(1) v(2) TIME + 2 > File
- nutmeg 9 -> shell lpr File
-
- (Pick up ascii plot ...)
-
- nutmeg 10 -> help
- For a complete description of nutmeg read the nutmeg manual.
- Here is a short list of available commands:
-
- alias [[word] alias] : Define an alias.
- asciiplot plotargs : Produce ascii plots.
- aspice file [outfile] : Run a spice job asynchronously.
- bug : Report a nutmeg bug.
- cd [directory] : Change working directory.
- define [[func (args)] stuff] : Define a user-definable function.
- diff plotname plotname [vec ...] : 'diff' two plots.
- display : Display vector status.
- echo [stuff ...] : Print stuff.
- fourier fund_freq vector ... : Do a fourier analysis of some data.
- hardcopy device file plotargs : Produce hardcopy plots.
- help commandname ... : Print help.
- history [number] : Print the history (last number events).
- jobs : Report on asynchronous spice jobs.
- let varname = expr : Assign vector variables.
- load file : Load in data.
- plot expr ... [vs expr] [xl xlo xhi] [yl ylo yhi] : Plot things.
- print expr ... : Print vector values.
- quit : Quit nutmeg.
- rspice [input file] : Run a spice job remotely.
- rusage : Print current resource usage.
- set [option] [option = value] ... : Set a variable.
- setplot [plotname] : Change the current working plot.
- shell [args] : Fork a shell, or execute the command.
- source file : Source a nutmeg file.
- unalias word ... : Undefine an alias.
- undefine [func ...] : Undefine a user-definable function.
- unset varname ... : Unset a variable.
- version [number] : Print the version number.
- write file expr ... : Write data to a file.
-
- nutmeg 11 -> quit
- So long.
-
- %
-
-
-
-
-
-
- December 9, 1985
-
-
-