From ce1be5509e76a85177578078e91479ae70694fba Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 12 Jun 2010 10:13:15 +0000 Subject: [PATCH] manpage updates --- ChangeLog | 2 + man/man1/ngnutmeg.1 | 1095 +++---------------------------------------- man/man1/ngspice.1 | 386 ++++----------- 3 files changed, 161 insertions(+), 1322 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4d288fa9..804de51f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2010-06-11 Holger Vogt * DEVICES: update 4.6.5 + /man/man1/ngnutmeg.1 ngspice.1: updated with link to actual + ngspice documentation 2010-06-11 Holger Vogt * ngspice.txt: notice to users: help file outdated diff --git a/man/man1/ngnutmeg.1 b/man/man1/ngnutmeg.1 index b3bd6e971..4bec54b22 100644 --- a/man/man1/ngnutmeg.1 +++ b/man/man1/ngnutmeg.1 @@ -1,1057 +1,84 @@ .\" RCS Info: $Revision$ on $Date$ .\" $Source$ .\" Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group -.TH NUTMEG 1 "27 April 1987" -.UC 4 -.SH NAME -nutmeg \- spice post-processor -.SH SYNOPSIS -\fBnutmeg [ \- ] [ \-n ] [ \-t term ] [ datafile ... ]\fR -.SH DESCRIPTION -.B Nutmeg -is a post processor for \s-2SPICE\s+2 \- it takes the raw -output file created -by \fBspice \-r\fR +.ig + +(woman-find-file buffer-file-name) + +(let* ((man-args (concat "-l " buffer-file-name)) + (bufname (concat "*Man " man-args "*"))) + (when (get-buffer bufname) + (kill-buffer bufname)) + (man man-args)) + +(compile + (concat "groff -t -e -man -Tps " + buffer-file-name + " > /tmp/tmp.ps && gv /tmp/tmp.ps")) + +.. +.TH NGNUTMEG 1 "6 June 2010" +.ds = \-\^\- +.ds ngspice \s-2NGSPICE\s+2 +.SH "NAME" +ngnutmeg \- ngspice post-processor +.SH "SYNOPSIS" +\fBngnutmeg\fP [\fIoptions\fP] [\fIdatafile\fP ...] +.SH "DESCRIPTION" +This man page is just a small overview. +The primary documentation of ngspice is in the \*[ngspice] User's Manual, +which is available as a pdf file. +.br +\fBngnutmeg\fP is a post processor for \*[ngspice] \- it takes +the raw output file created by \fBngspice \-r\fP and plots the data on a graphics terminal or a workstation display. Note that the raw output file is different from the -data that \s-2SPICE\s+2 writes to the standard output. -.PP -Arguments are: +data that \*[ngspice] writes to the standard output. +.SH "OPTIONS" .TP -\fB-\fR +\fB\-\fP +.br Don't try to load the default data file ("rawspice") if no other files are given. .TP -\fB-n\fR (or \fB--no-spiceinit\fR) -Don't try to source the file ".spiceinit" upon startup. Normally \fBnutmeg\fR +\fB\-n\fP or \fB\*=no\-spiceinit\fP +Don't try to source the file ".spiceinit" upon startup. Normally \fBngnutmeg\fP tries to find the file in the current directory, and if it is not found then in the user's home directory. .TP -\fB-t term\fR (or \fB--term=term\fR) -The program is being run on a terminal with \fImfb\fR name \fBterm\fR. +\fB\-q\fP or \fB\*=completion\fP +Enable command completion. (defect) +.TP +\fB\-t\fP \fIterm\fP or \fB\*=term=\fP\fIterm\fP +The program is being run on a terminal with \fBmfb\fP name \fIterm\fP. .TP -\fB-h\fR (or \fB--help\fR) +\fB\-h\fP or \fB\*=help\fP Display a verbose help on the arguments available to the program. .TP -\fB-v\fR (or \fB--version\fR) +\fB\-v\fP or \fB\*=version\fP Display a version number and copyright information of the program. .PP Further arguments are taken to be data files in binary or ascii format -(see \fBsconvert\fR(1)) which are loaded into nutmeg. If the file +(see \fBsconvert\fP(1)) which are loaded into ngnutmeg. If the file is in binary format, it may be only partially completed (useful for -examining \s-2SPICE\s+2 ouput before the simulation is finished). One +examining \*[ngspice] ouput before the simulation is finished). One file may contain any number of data sets from different analyses. -.PP -\fBNutmeg\fR -data is in the form of vectors: time, voltage, etc. Each vector has -a type, and vectors can be operated on and combined algebraicly in -ways consistent with their types. Vectors are normally created when -a data file is read in (see the -.B load -command below), and when the initial datafile is loaded. They can -also be created with the -.B let -command. -.PP -An expression -is an algebraic -formula involving vectors and scalars (a scalar is a vector of -length 1), and the following operations: -.IP -+, -, *, %, /, ^, and ,. -.PP -% is the modulo operator, and the comma operator has two meanings: -if it is present in the argument list of a user-definable function, it -serves to seperate the arguments. Otherwise, the term \fBx , y\fR is -synonymous with \fBx + j(y)\fR. -.PP -Also available are the logical operations & (and), | (or), ! (not), -and the relational operations <, >, >=, <=, =, and <> (not equal). -If used in an algebraic expression they work like they would in C, -producing values of 0 or 1. The relational operators have the -following synonyms: -\fB"gt"\fR is >, -\fB"lt"\fR is <, -\fB"ge"\fR is >=, -\fB"le"\fR is <=, -\fB"ne"\fR is <>, -\fB"eq"\fR is =, -\fB"and"\fR is &, -\fB"or"\fR is |, -and -\fB"not"\fR is !. -These are useful when < and > might be confused with IO redirection -(which is almost always). -.PP -The following functions are available: -.IP -\fBmag(vector) \-\fR -The magnitude of vector. -.IP -\fBph(vector) \-\fR -The phase of vector. -.IP -\fBj(vector) \-\fR -\fIi\fR (sqrt(\-1)) times vector. -.IP -\fBreal(vector) \-\fR -The real component of vector. -.IP -\fBimag(vector) \-\fR -The imaginary part of vector. -.IP -\fBdb(vector) \-\fR -20 * log10(mag(vector)). -.IP -\fBlog(vector) \-\fR -The logarithm (base 10) of the vector. -.IP -\fBln(vector) \-\fR -The natural logarithm (base e) of vector. -.IP -\fBexp(vector) \-\fR -e to the vector power. -.IP -\fBabs(vector) \-\fR -The absolute value of vector. -.IP -\fBsqrt(vector) \-\fR -The square root of vector. -.IP -\fBsin(vector) \-\fR -The sin of vector. -.IP -\fBcos(vector) \-\fR -The cosine of vector. -.IP -\fBtan(vector) \-\fR -The tangent of vector. -.IP -\fBatan(vector) \-\fR -The inverse tangent of vector. -.IP -\fBnorm(vector) \-\fR -The \fBvector\fR normalized to 1 (i.e, the largest magnitude of any component -will be 1). -.IP -\fBrnd(vector) \-\fR -A vector with each component a random integer between 0 and the absolute -value of the vectors's corresponding component. -.IP -\fBmean(vector) \-\fR -The result is a scalar (a length 1 vector) that is the mean of the elements -of \fBvector\fR. -.IP -\fBvector(number) \-\fR -The result is a vector of length \fBnumber\fR, with elements 0, 1, ... -\fBnumber - 1\fR. If \fBnumber\fR is a vector then just the first element -is taken, and if it isn't an integer then the floor of the magnitude is -used. -.IP -\fBlength(vector) \-\fR -The length of \fBvector\fR. -.IP -\fBinterpolate(plot.vector) \-\fR -The result of interpolating the named vector onto the scale of the current -plot. This function uses the variable \fBpolydegree\fR to determine -the degree of interpolation. -.PP -A vector may be either the name of a vector already defined, a floating- -point number (a scalar), or a list like \fB[elt1 elt2 ... eltn]\fR, which -is a vector of length n. -A number may be written in any format acceptable to \s-2SPICE\s+2, such -as \fB14.6MEG\fR or \fB-1.231E-4\fR. Note that you can either use -scientific notation or one of the abbreviations like \fIMEG\fR or \fIG\fR, -but not both. As with \s-2SPICE\s+2, a number may have trailing -alphabetic characters after it. -.PP -The notation \fBexpr [lower upper]\fR, where \fBlower\fR and \fBupper\fR -are numbers, denotes the range of elements from \fBexpr\fR between -\fBlower\fR and \fBupper\fR. The notation \fBexpr [num]\fR denotes -the \fBnum\fR'th element of \fBexpr\fR. If \fBupper\fR -is lower than \fBlower\fR, the order of the elements in the vector -is reversed. In all other cases, \fB[\fR and \fB]\fR serve to surround -literal vectors as described above. (You may have to use a lot of -parentheses to make sure that you get what you want. For instance, -you have to type \fBprint (foo) ([1 2])\fR to print the two vectors. -Otherwise it will be interpreted as a function call or a vector with an -index.) Note that the expression \fBfoo[10 20][5]\fR will \fInot\fR -yield the 15th element of \fBfoo\fR, but rather the 5th. In general only -the last index suffix on an expression will take effect. -.PP -To reference vectors in a plot that is not the -\fIcurrent plot\fR (see the \fBsetplot\fR command, below), the -notation \fBplotname.vecname\fR can be used. -.PP -Either a plotname or a vector name may be the wildcard \fBall\fR. If the -plotname is \fBall\fR, matching vectors from all plots are specified, and -if the vector name is \fBall\fR, all vectors in the specified plots are -referenced. Note that you may not use binary operations on expressions -involving wildcards \- it is not obvious what \fBall + all\fR should -denote, for instance. -.PP -Thus some (contrived) examples of expressions are: -.IP -\fBcos(TIME) + db(v(3))\fR -.IP -\fBsin(cos(log([1 2 3 4 5 6 7 8 9 10])))\fR -.IP -\fBTIME * rnd(v(9)) - 15 * cos(vin#branch) ^ [7.9e5 8]\fR -.IP -\fBnot ((ac3.FREQ[32] & tran1.TIME[10]) gt 3)\fR -.PP -.B Nutmeg -commands are as follows: -.TP -\fBplot exprs [ylimit ylo yhi] [xlimit xlo xhi] [xindices xilo xihi]\fR -.ce -\fB[xcompress comp] [xdelta xdel] [ydelta ydel] [xlog] [ylog] [vs xname]\fR -.ce -\fB[xlabel word] [ylabel word] [title word] [samep]\fR -Plot the given -.B exprs -on the screen (if you are on a graphics terminal). The -.B xlimit -and -.B ylimit -arguments determine the high and low x- and y-limits of the axes, -respectively. The -.B xindices -arguments determine what range of points are to be plotted \- everything -between the \fBxilo\fR'th point and the \fBxihi\fR'th point is plotted. -The -.B xcompress -argument specifies that only one out of every \fBcomp\fR points should -be plotted. If an \fBxdelta\fR or a \fBydelta\fR parameter is present, -it specifies the spacing between grid lines on the X- and Y-axis. -These parameter names may be abbreviated to -.B xl, -.B yl, -.B xind, -.B xcomp, -.B xdel, -and -.B ydel -respectively. -The -.B xname -argument is an expression to use as the scale on the x-axis. -If \fBxlog\fR or \fBylog\fR are present, the X or Y scale respectively -will be logarithmic. -The \fBxlabel\fR and \fBylabel\fR arguments cause the specified -labels to be used for the X and Y axes, respectively. -If \fBsamep\fR is given, the values of the other parameters (other than -\fBxname\fR) from the previous \fBplot, hardcopy,\fR or \fBasciiplot\fR -command will be used unless re-defined on the command line. -Finally, the \fBtitle\fR argument will be used in the place of the plot -name at the bottom of the graph. -.TP -\fBhardcopy file \fIplotargs\fR -Just like \fBplot\fR, except creates a file called -.B file -containing the plot. The file is an image in \fIplot(5)\fR format, -and can be printed by either the \fBplot(1)\fR program or \fBlpr\fR -with the \fB-g\fR flag. -.TP -\fBasciiplot \fIplotargs\fR -Produce a line printer plot of the vectors. -The plot is sent to the standard -output, so you can put it into a file with \fIasciiplot args ... > file\fR. -The \fBset\fR options \fBwidth, height,\fR and \fBnobreak\fR determine -the width and height of the plot, and whether there are page breaks, -respectively. Note that you will have problems if you try to \fBasciiplot\fR -something with an X-scale that isn't monotonic (i.e, something -like \fIsin(TIME)\fR ), because \fBasciiplot\fR uses a simple-minded sort -of linear interpolation. -.TP -\fBdefine function(arg1, arg2, ...) expression\fR -Define the \fIuser-definable function\fR with the name \fIfunction\fR -and arguments \fIarg1, arg2, ...\fR to be \fIexpression\fR, which -may involve the arguments. When the function is later used, the arguments -it is given are substituted for the formal arguments when it is parsed. -If \fIexpression\fR is not present, any definition for \fIfunction\fR -is printed, and if there are no arguments to \fIdefine\fR then all -currently active definitions are printed. Note that you may have different -functions defined with the same name but different arities. -Some useful definitions are: -.IP -define max(x,y) (x > y) * x + (x <= y) * y -.br -define min(x,y) (x < y) * x + (x >= y) * y -.TP -\fBundefine function ...\fR -Definitions for the named user-defined functions are deleted. -.TP -\fBlet name = expr\fR -Creates a new vector called -.B name -with the value specified by -.B expr, -an expression as described above. If \fBexpr\fR is [] (a zero-length vector) -then the vector becomes undefined. -If there are no arguments, \fBlet\fR is the same as \fBdisplay\fR. -.TP -\fBprint [col] [line] expr ... \fR -Prints the vector described by the expression -.B expr. -If the -.B col -argument is present, print the vectors named side by side. If \fBline\fR -is given, the vectors are printed horizontally. \fBcol\fR is the default, -unless all the vectors named have a length of one, in which case \fBline\fR -is the default. -The options -\fBwidth, length,\fR and \fBnobreak\fR are effective for this -command (see \fBasciiplot\fR). If the expression is \fBall\fR, -all of the vectors available are printed. Thus \fBprint col all > file\fR -will print everything in the file in \s-2SPICE\s+2\&2 format. -The scale vector (time, frequency) will always be in the first column -unless the variable \fBnoprintscale\fR is true. -.TP -\fBload [filename] ... \fR -Loads the raw data in either binary or ascii format -from the files named. The default filename is \fBrawspice\fR, or the argument -to the \fB-r\fR flag if there was one. -.TP -\fBsource filename\fR -Reads commands from the file -.B filename. -Lines beginning with the character \fB*\fR are considered comments and -ignored. -.TP -\fBhelp [all] [command ...]\fR -Prints help. If the argument \fBall\fR is given, a short description -of everything you could possibly type is printed. If \fBcommand\fRs are -given, descriptions of those commands are printed. Otherwise help for -only a few major commands is printed. -.TP -\fBdisplay [varname ...]\fR -Prints a summary of currently defined vectors, or of the names specified. -The vectors are sorted by name unless the variable \fBnosort\fR is set. -The information given is the name of the vector, the length, the -type of the vector, and whether it is real or complex data. Additionally, -one vector will be labeled \fB[scale]\fR. When a command such as -\fIplot\fR is given without a \fIvs\fR argument, this scale is used -for the X-axis. It is always the first vector in a rawfile, or -the first vector defined in a new plot. If you undefine the scale -(i.e, \fIlet TIME = []\fR), a random remaining -vector will become the scale. -.TP -\fBsetplot [plotname]\fR -Set the \fBcurrent plot\fR to the plot with the given -name, or if no name is given, prompt the user with a menu. -(Note that the plots are named as they are loaded, with names -like \fBtran1\fR or \fBop2\fR. These names are shown by the -\fBsetplot\fR and \fBdisplay\fR commands and are used by \fBdiff\fR, -below.) -If the -"New plot" item is selected, the current plot will become one with -no vectors defined. -Note that here the word "plot" refers -to a group of vectors that are the result of one \s-2SPICE\s+2 run. -When -more than one file is loaded in, or more than one plot is present -in one file, \fBnutmeg\fR keeps them seperate and only shows you the -vectors in the current plot. -.TP -\fBsettype type vector ...\fR -Change the type of the named vectors to \fBtype\fR. Type names can -be found in the manual page for \fBsconvert\fR. -.TP -\fBdiff plot1 plot2 [vec ...]\fR -Compare all the vectors in the specified \fIplots\fR, or only the named -vectors if any are given. There are different vectors in the two plots, -or any values in the vectors differ significantly the difference is -reported. The variables \fBabstol, reltol,\fR and \fBvntol\fR are used -to determine what "significantly" means (see the \s-2SPICE\s+2\&3 User's -Manual). -.TP -.B quit -Quit nutmeg. -.TP -.B bug -Send a bug report. (If you have defined BUGADDR, the mail will go there.) -.TP -\fBwrite [file] [exprs]\fR -Writes out the expr's to -.B file. -First vectors are grouped together by plots, and written out as such. -(I.e, if the expression list contained three vectors from one plot -and two from another, then two plots will be written, one with three -vectors and one with two.) Additionally, if the scale for a vector -isn't present, it is automatically written out as well. -The default format -is ascii, but this can be changed with the \fBset filetype\fR command. -The default filename is \fBrawspice\fR, or the argument to the \fB-r\fR -flag on the command line, if there was one, and the default expression -list is \fBall\fR. -.TP -\fBshell [args ...]\fR -Fork a shell, or execute the arguments as a command to the shell. -.TP -\fBalias [word] [text ...]\fR -Causes \fBword\fR to be aliased to \fBtext\fR. History substitutions may -be used, as in C-shell aliases. -.TP -\fBunalias [word ...]\fR -Removes any aliases present for the \fBword\fRs. -.TP -\fBhistory [number]\fR -Print out the history, or the last \fBnumber\fR commands typed at the keyboard. -\fINote:\fR in \*S version 3a7 and earlier, all commands (including ones read -from files) were saved. -.TP -\fBset [word] [word = value] ... \fR -Set the value of \fBword\fR to be \fBvalue\fR, if it is present. -You can set any word to be any value, numeric or string. If no value is -given then the value is the boolean 'true'. The value of \fIword\fR may -be inserted into a command by writing \fI$word\fR. -If a variable is set to a list of values that are enclosed in parentheses -(which -\fBmust\fR be seperated from their values by white space), the value -of the variable is the list. -The variables meaningful to \fBnutmeg\fR (of which there are too many) are: -.IP "" 16 -\fBabstol\fR -.br -The absolute tolerance used by the \fBdiff\fR command. -.IP -\fBappendwrite\fR -.br -Append to the file when a \fBwrite\fR command is issued, if one -already exists. -.IP -\fBcolor\fIN\fR -.br -These variables determine the colors used, if \fBX\fR is being run on -a color display. -\fIN\fR may be between 0 and 15. Color 0 is the background, color 1 -is the grid and text color, and colors 2 through 15 are used in order for -vectors plotted. The value of the \fBcolor\fR variables should be names -of colors, which may be found in the file \fB/usr/lib/rgb.txt\fR. -.IP -\fBcombplot\fR -.br -Plot vectors by drawing a vertical line from each point to the X-axis, -as opposed to joining the points. Note that this option is subsumed -in the \fIplottype\fR option, below. -.IP -\fBcpdebug\fR -.br -Print \fIcshpar\fR debugging information. (Must be complied with the -\-DCPDEBUG flag.) -.IP -\fBdebug\fR -.br -If set then a lot of debugging information is printed. (Must be -compiled with the \-DFTEDEBUG flag.) -.IP -\fBdevice\fR -.br -The name (/dev/tty??) of the graphics device. If this variable -isn't set then the user's terminal is used. To do plotting on -another monitor you will probably have to set both the \fBdevice\fR -and \fBterm\fR variables. (If \fBdevice\fR is set to the name of -a file, \fBnutmeg\fR will dump the graphics control codes into -this file -- this is useful for saving plots.) -.\".IP -.\"\fBdontplot\fR -.\".br -.\"No graphics control codes are actually sent. (Useful for debugging on -.\"non-graphics terminals.) -.IP -\fBecho\fR -.br -Print out each command before it is executed. -.IP -\fBfiletype\fR -.br -This can be either -.B ascii -or -.B binary, -and determines what the format of -.I rawfiles -will be. The default is -.B ascii. -.IP -\fBfourgridsize\fR -.br -How many points to use for interpolating into when doing fourier analysis. -.\".IP -.\"\fBgeometry\fIN\fR -.\".br -.\"The size and positioning information for X windows. \fIN\fR may be -.\"any positive integer, in which case it is the information for the \fIN\fR'th -.\"window on the screen, or may be omitted, in which case it is used whenever -.\"there is no information for the window. The geometry information is a string -.\"of the form \fR=\fIheight\fBx\fIwidth\fB+\fIxoff\fB+\fIyoff\fR, where the -.\"window will be of size \fIheight\fR by \fIwidth\fR and be positioned at -.\"(\fIxoff, yoff\fR), where (0,0) is the upper left hand corner of the screen. -.\"Either the positioning information or the size information may be omitted, -.\"in which case the window will be opened interactively (as will happen if no -.\"\fBgeometry\fR information is given). The method of interactive sizing is -.\"the same as for other X utilities. -.\"A typical use for the \fBgeometry\fR variables might be to set \fBmaxwins\fR -.\"to 3 and set \fBgeometry1, geometry2,\fR and \fBgeometry3\fR to position three -.\"plot windows in a row across the top of the screen. -.IP -\fBgridsize\fR -.br -If this variable is set to an integer, this number will be used as the number -of equally spaced points to use for the Y-axis when plotting. Otherwise -the current scale will be used (which may not have equally spaced points). -If the current scale isn't strictly monotonic, then this option will have -no effect. -.IP -\fBhcopydev\fR -.br -If this is set, when the \fBhardcopy\fR command is run the resulting file -is automatically printed on the printer named \fBhcopydev\fR with the -command \fIlpr \-P\fBhcopydev\fI \-g \fBfile\fR. -.IP -\fBhcopydevtype\fR -.br -This variable specifies the type of the printer output to use in the -\fBhardcopy\fR command. If hcopydevtype is not set, plot (5) format -is assumed. The standard distribution currently recognizes \fBpostscript\fR -as an alternative output format. When used in conjunction with -\fBhcopydev\fR, \fBhcopydevtype\fR should specify a format supported by -the printer. -.IP -\fBheight\fR -.br -The length of the page for \fBasciiplot\fR and \fBprint col\fR. -.IP -\fBhistory\fR -.br -The number of events to save in the history list. -.\".IP -.\"\fBmaxwins\fR -.\".br -.\"The maximum number of windows X should have on the screen at one time. -.\"If it has \fBmaxwins\fR or more windows, it will begin re-using them -.\"for plots in an oldest-first manner. -.IP -\fBnfreqs\fR -.br -The number of frequencies to compute in the -.B fourier -command. (Defaults to 10.) -.IP -\fBnobreak\fR -.br -Don't have \fBasciiplot\fR and \fBprint col\fR break between pages. -.IP -\fBnoasciiplotvalue\fR -.br -Don't print the first vector plotted to the left when doing an -\fBasciiplot\fR. -.IP -\fBnoclobber\fR -.br -Don't overwrite existing files when doing IO redirection. -.IP -\fBnoglob\fR -.br -Don't expand the global characters `*', `?', `[', and `]'. This is the -default. -.IP -\fBnogrid\fR -.br -Don't plot a grid when graphing curves (but do label the axes). -.IP -\fBnomoremode\fR -.br -If \fBnomoremode\fR is not set, whenever a large amount of data is being -printed to the screen (e.g, the \fBprint\fR or \fBasciiplot\fR commands), -the output will be stopped every screenful and will continue when -a carriage return is typed. If \fBnomoremode\fR is set then data will scroll -off the screen without hesitation. -.IP -\fBnonomatch\fR -.br -If \fBnoglob\fR is unset and a global expression cannot be matched, use -the global characters literally instead of complaining. -.IP -\fBnosort\fR -.br -Don't have \fBdisplay\fR sort the variable names. -.IP -\fBnoprintscale\fR -.br -Don't print the scale in the leftmost column when a \fBprint col\fR command -is given. -.IP -\fBnumdgt\fR -.br -The number of digits to print when printing tables of data (\fBfourier, print -col\fR). The default precision is 6 digits. On the VAX, approximately -16 decimal digits are available using double precision, so \fBnumdgt\fR -should not be more than 16. If the number is negative, one fewer digit -is printed to ensure constant widths in tables. -.IP -\fBplottype\fR -.br -This should be one of \fInormal\fR, \fIcomb\fR, or \fIpoint:\fBchars\fR. -\fInormal\fR, the default, causes points to be plotted as parts of connected -lines. \fIcomb\fR causes a comb plot to be done (see the description of the -\fIcombplot\fR variable above). \fIpoint\fR causes each point to be plotted -seperately \- the \fBchars\fR are a list of characters that will be used -for each vector plotted. If they are omitted then a default set is used. -.IP -\fBpolydegree\fR -.br -The degree of the polynomial that the \fBplot\fR command should fit -to the data. If \fIpolydegree\fR is N, then \fBnutmeg\fR will fit a degree N -polynomial to every set of N points and draw 10 intermediate points -in between each endpoint. If the points aren't monotonic, then it will try -rotating the curve and reducing the degree until a fit is achieved. -.IP -\fBpolysteps\fR -.br -The number of points to interpolate between every pair of points available -when doing curve fitting. The default is 10. (This should really be done -automatically.) -.IP -\fBprogram\fR -.br -The name of the current program (\fIargv[0]\fR). -.IP -\fBprompt\fR -.br -The prompt, with the character `!' replaced by the current event number. -.IP -\fBrawfile\fR -.br -The default name for rawfiles created. -.IP -\fBreltol\fR -.br -The relative tolerance used by the \fBdiff\fR command. -.IP -\fBrhost\fR -.br -The machine to use for remote \s-2SPICE-3\s+2 runs, instead of the -default one. (See the description of the \fBrspice\fR command, -below.) -.IP -\fBrprogram\fR -.br -The name of the remote program to use in the \fBrspice\fR command. -.\".IP -.\"\fBsavewins\fR -.\".br -.\"If true, then don't get rid of the plot window after the plot is done (X -.\"only). The window may be removed by clicking any mouse button inside of it. -.IP -\fBslowplot\fR -.br -Stop between each graph plotted and wait for the user to type -return before continuing. -.IP -\fBsourcepath\fR -.br -A list of the directories to search when a \fBsource\fR command is given. -The default is the current directory and the standard spice library -(\fI/usr/local/lib/spice\fR, or whatever \fBLIBPATH\fR is #defined to -in the \*S source. -.IP -\fBspicepath\fR -.br -The program to use for the \fBaspice\fR command. The default is -/cad/bin/spice. -.IP -\fBterm\fR -.br -The \fImfb\fR name of the current terminal. -.IP -\fBunits\fR -.br -If this is \fBdegrees\fR, then all the trig functions will use degrees -instead of radians. -.IP -\fBunixcom\fR -.br -If a command isn't defined, try to execute it as a \s-2UNIX\s+2 command. -Setting this option has the effect of giving a \fBrehash\fR command, -below. -This is useful for people who want to use \fBnutmeg\fR as a login shell. -.IP -\fBverbose\fR -.br -Be verbose. This is midway between \fBecho\fR and \fBdebug\fR / \fBcpdebug\fR. -.IP -\fBvntol\fR -.br -The absolute voltage tolerance used by the \fBdiff\fR command. -.IP -\fBwidth\fR -.br -The width of the page for \fBasciiplot\fR and \fBprint col\fR. -.IP -\fBxbrushheight\fR -.br -The height of the brush to use if \fBX\fR is being run. -.IP -\fBxbrushwidth\fR -.br -The width of the brush to use if \fBX\fR is being run. -.IP -\fBxfont\fR -.br -The name of the X font to use when plotting data and entering labels. -The plot may not look entirely great if this is a variable-width font. -.PP -.TP -\fBunset [word] ... \fR -Unset the variables \fBword\fR. -.TP -\fBshift [varname] [number]\fR -If \fIvarname\fR is the name of a list variable, it is shifted to the left -by \fInumber\fR elements. (I.e, the \fInumber\fR leftmost elements are -removed.) The default \fIvarname\fR is \fBargv\fR, and the default -\fInumber\fR is 1. -.TP -\fBrusage [resource ...]\fR -Print resource usage statistics. If any \fBresource\fR\&s are given, -just print the usage of that resource. Currently valid \fBresource\fR\&s -are: -.IP "" 16 -\fBelapsed\fR -.br -The amount of time elapsed since the last \fBrusage elaped\fR call. -.IP -\fBfaults\fR -.br -Number of page faults and context switches (BSD only). -.IP -\fBspace\fR -.br -Data space used. -.IP -\fBtime\fR +.SH "ENVIRONMENT" +See ngspice(1) +.SH "FILES" +See ngspice(1) +.SH "SEE ALSO" +sconvert(1), ngspice(1), mfb(3), writedata(3), .br -CPU time used so far. -.IP -\fBeverything\fR +and \*[ngspice] User's Manual at \fBhttp://ngspice.sourceforge.net/docs.html\fP +.SH "BUGS" +Please report bugs to the ngspice project via .br -All of the above. -.TP -\fBcd [directory]\fR -Change the current working directory to \fBdirectory\fR, or to the user's -home directory if none is given. -.TP -\fBaspice [output-file]\fR -Start a \s-2SPICE-3\s+2 run, and when it is finished load the data. The -raw data is kept in a temporary file. If \fIoutput-file\fR is specified -then the diagnostic output is directed into that file, otherwise it -is thrown away. -.TP -\fBjobs\fR -Report on the asynchronous \s-2SPICE-3\s+2 jobs currently running. -\fBNutmeg\fR checks to see if the jobs are finished every time you -execute a command. -If it is done then the data is loaded and becomes available. -.TP -\fBrspice [input file]\fR -Runs a \s-2SPICE-3\s+2 remotely taking the \fBinput file\fR as a -\s-2SPICE-3\s+2 input deck, or the current circuit if no argument is -given. \fBNutmeg\fR waits for the job to complete, and passes output -from the remote job to the user's standard output. When the job is -finished the data is loaded in as with \fRaspice\fR. If the variable -\fIrhost\fR is set, \fBnutmeg\fR will connect to this host instead of -the default remote \s-2SPICE-3\s+2 server machine. Note that this -command will only work if your system administrator is running a -\s-2SPICE-3\s+2 daemon on the remote host. If the variable \fIrprogram\fR -is set, then \fBrspice\fR will use this as the pathname to the program -to run. -.TP -\fBecho [stuff...]\fR -Echos the arguments. -.TP -\fBfourier fundamental_frequency [value ...]\fR -Does a fourier analysis of each of the given values, using the first 10 -multiples of the fundamental frequency (or the first \fInfreqs\fR, if that -variable is set \- see below). The output is like that of -the \fB.four\fR \*S card. The values may be any valid expression. -The values are interpolated onto a fixed-space grid with the number of -points given by the \fBfourgridsize\fR variable, or 200 if it is not set. -The interpolation will be of degree \fBpolydegree\fR if that variable is -set, or 1. If \fBpolydegree\fR is 0, then no interpolation will be done. -This is likely to give erroneous results if the time scale is not monotonic, -though. -.TP -\fBversion [version id]\fR -Print out the version of \fBnutmeg\fR that is running. -If there are arguments, it checks to make sure that the arguments match -the current version of \s-2SPICE\s+2. (This is mainly used as a \fBCommand:\fR -line in rawfiles.) -.TP -\fBrehash\fR -Recalculate the internal hash tables used when looking up UNIX commands, -and make all UNIX commands in the user's PATH available for command -completion. -This is useless unless you have \fBset unixcom\fR first (see above). -.PP -The following control structures are available: -.IP -.nf -\fBwhile\fR \fIcondition\fR - statement - ... -\fBend\fR -.fi -.PP -While \fIcondition\fR, an arbitrary algebraic expression, is true, -execute the statements. -.IP -.nf -\fBrepeat\fR \fI[number]\fR - statement - ... -\fBend\fR -.fi -.PP -Execute the statements \fInumber\fR times, or forever if no argument is -given. -.IP -.nf -\fBdowhile\fR \fIcondition\fR - statement - ... -\fBend\fR -.fi -.PP -The same as \fBwhile\fR, except that the \fIcondition\fR is tested after -the statements are executed. -.IP -.nf -\fBforeach\fR \fIvar\fR \fIvalue ...\fR - statement - ... -\fBend\fR -.fi -.PP -The statements are executed once for each of the \fIvalue\fRs, each time -with the variable \fIvar\fR set to the current one. (\fIvar\fR can be accessed -by the $\fIvar\fR notation \- see below). -.IP -.nf -\fBif\fR \fIcondition\fR - statement - ... -\fBelse\fR - statement - ... -\fBend\fR -.fi -.PP -If the \fIcondition\fR is non-zero then the first set of statements are -executed, otherwise the second set. The \fBelse\fR and the second set -of statements may be omitted. -.IP -\fBlabel\fR \fIword\fR -.PP -If a statement of the form \fBgoto\fI word\fR is encountered, control is -transfered to this point, otherwise this is a no-op. -.IP -\fBgoto\fR \fIword\fR -.PP -If a statement of the form \fBlabel\fI word\fR is present in the block -or an enclosing block, control is transfered there. Note that if the -label is at the top level, it \fImust\fR be before the \fBgoto\fR statement -(i.e, a forward \fBgoto\fR may occur only within a block). -.IP -\fBcontinue\fR -.PP -If there is a \fBwhile, dowhile,\fR or \fBforeach\fR block enclosing this -statement, control passes to the test, or in the case of \fBforeach\fR, -the next value is taken. -Otherwise an -error results. -.IP -\fBbreak\fR -.PP -If there is a \fBwhile, dowhile,\fR or \fBforeach\fR block enclosing this -statement, control passes out of the block. Otherwise an -error results. -.PP -Of course, control structures may be nested. When a block is entered -and the input is the terminal, the prompt becomes a number of >'s -equalling the number of blocks the user has entered. The current control -structures may be examined with the debugging command -.B cdump. -.PP -If a word is typed as a command, and there is no built-in command -with that name, the directories in the \fIsourcepath\fR list are searched -in order for the file. If it is found, it is read in as a command file (as -if it were \fBsource\fRd). Before it is read, however, the variables -\fIargc\fR and \fIargv\fR are set to the number of words following the -filename on the command line, and a list of those words respectively. -After the file is finished, these variables are \fBunset\fR. Note that -if a command file calls another, it must save its \fIargv\fR and \fIargc\fR -since they will get altered. Also, command files may not be re-entrant -since there are no local variables. (Of course, the procedures may -explicitly manipulate a stack...) -This way one can write scripts analogous to shell scripts for \fBnutmeg\fR and -\*S. Note that for the script to work with \*S, it \fBmust\fR begin -with a blank line (or whatever you like, since it will be thrown away) -and then a line with \fB.control\fR on it. This is an unfortunate result -of the \fBsource\fR command being used for both circuit input and command -file execution. Note also that this allows the user to merely type the -name of a circuit file as a command, and it will be automatically run. -.PP -There are various command scripts installed in -\fI/usr/local/lib/spice/scripts\fR (or whatever the path is on your machine), -and the default \fIsourcepath\fR includes this directory, so you can use -these command files (almost) like builtin commands. -.PP -\fBNutmeg\fR will use either \fBX\fR or \fBMFB\fR, depending on whether -it finds the variable \fBDISPLAY\fR in the environment. If you are -using \fBX\fR on a workstation, it should already be present, but if you -want to display graphics on a different machine than the one you -are running \fBnutmeg\fR on, \fBDISPLAY\fR should be of the form -\fImachine\fR:0. -.PP -If \fBX\fR is being used, the cursor may be positioned at any -point on the screen when the window is up and characters typed at the -keyboard will be added to the window at that point. The window may -then be sent to a printer using the \fBxpr(1)\fR program. -.PP -There are a number of pre-defined constants in \fBnutmeg\fR. They are: -.na -.nf - pi pi - e The base of natural logarithms - c The speed of light - i The square root of \-1 - kelvin Absolute 0 in Centigrade - echarge The charge on an electron - boltz Boltzman's constant - planck Planck's constant (h) - -.fi -.ad -.PP -These are all in MKS units. If you have another variable with -a name that conflicts with one of these then it takes precedence. -.PP -Nutmeg occasionally checks to see if it -is getting close to running out of space, and warns the user if this -is the case. (This is more likely to be useful with the \s-2SPICE\s+2 -front end.) -.PP -C-shell type quoting with "" and '', and backquote substitution may -be used. Within single quotes, no further substitution (like -history substitution) is done, and within double quotes, the words -are kept together but further substitution is done. Any text between -backquotes is replaced by the result of executing the text as a command -to the shell. -.PP -Tenex-style ('set filec' in the 4.3 C-shell) -command, filename, and keyword completion is possible: If EOF -(control-D) is typed after the first character on the line, a list -of the commands or possible arguments is printed. (If it is alone -on the line it will exit \fBnutmeg\fR.) If escape is typed, then -\fBnutmeg\fR will try to complete what the user has already typed. -To get a list of all commands, the user should type ^D. -.PP -The values of variables may be used in commands by writing \fB$varname\fR -where the value of the variable is to appear. The special variables -\fI$$\fR and \fI$<\fR refer to the process ID of the program and a -line of input which is read from the terminal when the variable -is evaluated, respectively. If a variable has a name of the form -\fB$&word\fR, then \fBword\fR is considered a vector (see above), -and its value is taken to be the value of the variable. -If \fI$foo\fR is a valid variable, and is of type \fBlist\fR, then the -expression \fI$foo[low-high]\fR represents a range of elements. Either -the upper index or the lower may be left out, and the reverse of a list may -be obtained with \fI$foo[len-0]\fR. Also, the notation \fI$?foo\fR evaluates -to 1 if the variable \fIfoo\fR is defined, 0 otherwise, and \fI$#foo\fR -evaluates to the number of elements in \fIfoo\fR if it is a list, 1 if it -is a number or string, and 0 if it is a boolean variable. -.PP -History substitutions, similar to C-shell history substitutions, are -also available \- see the C-shell manual page for all of the details. -.PP -The characters ~, {, and } have the same effects as they do in the -C-Shell, i.e., home directory and alternative expansion. It is -possible to use the wildcard characters *, ?, [, and ] also, -but only if you \fBunset noglob\fR first. This makes them rather -useless for typing algebraic expressions, so you should \fBset noglob\fR -again after you are done with wildcard expansion. Note that the -pattern \fB[^abc]\fR will match all characters \fIexcept\fB a, b, -\fRand\fB c.\fR -.PP -IO redirection is available \- the symbols \fB>, >>, >&, >>&, \fRand\fB <\fR -have the same effects as in the C-shell. -.PP -You may type multiple commands on one line, seperated by semicolons. -.PP -If you want to use a different \fBmfbcap\fR file than the default (usually -\fB~cad/lib/mfbcap\fR), you have to set the environment variable \fBMFBCAP\fR -before you start \fBnutmeg\fR. The \fB-m\fR option and the \fBmfbcap\fR -variable no longer work. -.SH "VMS NOTES" -\fBNutmeg\fR can be run under VAX/VMS. Some features like command, etc -completion, expansion of *, ?, and [], backquote substitution, the -shell command, and so forth do not work. (In fact command completion -only works on 4.2 or 4.3 BSD.) -.PP -\fBNutmeg\fR will look for start-up -commands in the file \fIspice.rc\fR in the current directory. -.PP -The standard suffix for rawspice files in VMS is ".raw". -.PP -You will have to respond to the \fI-more-\fR prompt during plot with a -carriage return instead of any key as you can do on UNIX. -.SH "SEE ALSO" -sconvert(1), spice(1), mfb(3), writedata(3) -.SH AUTHOR +\fBhttp://ngspice.sourceforge.net/bugrep.html\fP +.SH "AUTHOR" Wayne Christopher (faustus@cad.berkeley.edu) -.SH BUGS -.PP -The label entry facilities are very primitive \- after all, \fBnutmeg\fR isn't -a graphics editor (yet). You must be careful to type very slowly when -entering labels -- \fBnutmeg\fR checks the \fBX\fR event queue once -every second, and can get very confused if characters arrive faster than -that. -.PP -If you redefine colors after creating a plot window with X, and then -cause the window to be redrawn, it will not to the right thing. -.PP -When defining aliases like -.IP -\fIalias pdb plot db( '!:1' - '!:2' )\fR -.PP -you must be careful to quote the argument list substitutions in this -manner. If you quote the whole argument it might not work properly. -.PP -In a user-defined function, the arguments cannot be part of a name that -uses the \fIplot.vec\fR syntax. I.e, -.IP -\fIdefine poke(duck) cos(tran1.duck) -.PP -won't do the right thing. -.PP -If you type \fBplot all all\fR, or otherwise use a wildcard reference for -one plot twice in a command, bad things will happen. -.PP -The \fBasciiplot\fR command doesn't deal with log scales or the \fBdelta\fR -keywords. -.PP -There are probably some features that \fBnutmeg\fR doesn't have yet. -.SH CAVEATS -Often the names of terminals recognised by \fBMFB\fR are different -from those in /etc/termcap. Thus you may have to reset your terminal -type with the command -.IP -\fBset term = termname\fR -.PP -where \fBtermname\fR is the name in the \fBmfbcap\fR file. -.PP -The \fBhardcopy\fR command is useless on VMS and other systems without -the \fBplot\fR command, unless the user has a program that understands -\fIplot(5)\fR format. - +.br +\fBngspice\fR: various authors (see \fBhttp://sourceforge.net/projects/ngspice/)\fP +.\" Local Variables: +.\" mode: nroff +.\" End: diff --git a/man/man1/ngspice.1 b/man/man1/ngspice.1 index 5ca85bcd0..3641e35aa 100644 --- a/man/man1/ngspice.1 +++ b/man/man1/ngspice.1 @@ -1,337 +1,147 @@ .\" RCS Info: $Revision$ on $Date$ .\" $Source$ .\" Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group -.TH SPICE 1 "20 March 1986" -.ds S \s-2SPICE\s+2\&3 -.UC 4 -.SH NAME -spice \- circuit simulator -.SH SYNOPSIS -\fBspice [ \-n ] [ \-t term ] [ \-r rawfile] [ \-b ] -[ \-i ] [ input file ... ]\fR -.SH DESCRIPTION -This manual page describes the commands available for interactive -use of \*S. For details of circuit descriptions and the -process of simulating a circuit, see the \*S User's Manual. -The commands available are a superset of those available for -\fBnutmeg\fR \- only the additional commands available in \*S -are described here. You should be familiar with the manual page for -\fBnutmeg(1)\fR before reading this manual page. -.PP -Arguments are: -.TP -\fB-n\fR (or \fB--no-spiceinit\fR) -Don't try to source the file ".spiceinit" upon startup. Normally \*S +.ig + +(woman-find-file buffer-file-name) + +(let* ((man-args (concat "-l " buffer-file-name)) + (bufname (concat "*Man " man-args "*"))) + (when (get-buffer bufname) + (kill-buffer bufname)) + (man man-args)) + +(compile (concat "groff -t -e -man -Tps " + buffer-file-name + " > /tmp/tmp.ps && gv /tmp/tmp.ps")) + +.. +.TH NGSPICE 1 "6 June 2010" +.ds = \-\^\- +.ds ngspice \s-2NGSPICE\s+2 +.SH "NAME" +ngspice \- circuit simulator derived from \*[spice]\&3f5 +.SH "SYNOPSIS" +\fBngspice\fP [\fIoptions\fP] [\fIfile\fP ...] +.SH "DESCRIPTION" +This man page is just a small overview. +The primary documentation of ngspice is in the \*[ngspice] User's Manual, +which is available as a pdf file. +.SH "OPTIONS" +.TP +\fB\-n\fP or \fB\*=no\-spiceinit\fP +Don't try to source the file ".spiceinit" upon startup. Normally \*[ngspice] tries to find the file in the current directory, and if it is not found then in the user's home directory. .TP -\fB-q\fR (or \fB--completion\fR) -Enable command completion. +\fB\-q\fP or \fB\*=completion\fP +Enable command completion. (defect) .TP -\fB-t term\fR (or \fB--term=term\fR) -The program is being run on a terminal with \fImfb\fR name \fBterm\fR. +\fB\-t\fP \fIterm\fP or \fB\*=term=\fP\fIterm\fP +The program is being run on a terminal with \fBmfb\fP name \fIterm\fP. .TP -\fB-b\fR (or \fB--batch\fR) -Run in batch mode. \*S will read the standard input or the specified +\fB\-b\fP or \fB\*=batch\fP +Run in batch mode. \*[ngspice] will read the standard input or the specified input file and do the simulation. Note that if the standard input -is not a terminal, \*S will default to batch mode, unless the +is not a terminal, \*[ngspice] will default to batch mode, unless the \-i flag is given. .TP -\fB-s\fR (or \fB--server\fR) +\fB\-s\fP or \fB\*=server\fP Run in server mode. This is like batch mode, except that a temporary rawfile is used and then written to the standard output, preceded by a line with a single "@", after the simulation is done. This mode -is used by the spice daemon. +is used by the ngspice daemon. .TP -\fB-i\fR (or \fB--interactive\fR) +\fB\-i\fP or \fB\*=interactive\fP Run in interactive mode. This is useful if the standard input is not a terminal but interactive mode is desired. Command completion is not available unless the standard input is a terminal, however. .TP -\fB-r rawfile\fR (or \fB--rawfile=file\fR) -Use \fBrawfile\fR as the default file into which the results of +\fB\-r\fP \fIrawfile\fP or \fB\*=rawfile=\fP\fIfile\fP +Use \fIrawfile\fP as the default file into which the results of the simulation are saved. .TP -\fB-c circuitfile\fR (or \fB--circuitfile=circuitfile\fR) -Use \fBcircuitfile\fR as the default input deck. +\fB\-c\fP \fIcircuitfile\fP or \fB\*=circuitfile=\fP\fIcircuitfile\fP +Use \fIcircuitfile\fP as the default input deck. .TP -\fB-h\fR (or \fB--help\fR) +\fB\-h\fP or \fB\*=help\fP Display a verbose help on the arguments available to the program. .TP -\fB-v\fR (or \fB--version\fR) +\fB\-v\fP or \fB\*=version\fP Display a version number and copyright information of the program. -.PP -Further arguments are taken to be \*S input decks, which are read -and saved. (If batch mode is requested then they are run immediately.) -.PP -\*S will accept any \s-2SPICE\s+2\&2 input decks, and output -ascii plots, fourier analyses, and node printouts as specified -in .plot, .four, and .print cards. If a \fBout\fR parameter -is given on a .width card, the effect is the same as \fBset width = ...\fR. -Since \*S ascii plots do not use multiple ranges, however, if vectors -together on a .plot card have different ranges they will not provide -as much information as they would in \s-2SPICE\s+2\&2. The output -of \*S is also much less verbose than \s-2SPICE\s+2\&2, in that the only -data printed is that requested by the above cards. -.PP -Vector names are the same as in \fBnutmeg\fR, with this addition: -a name such as \fB@name[param]\fR, where \fBname\fR is either -the name of a device instance or model, denotes the value of the -\fBparam\fR parameter of the device or model. See the \*S User's -Manual for details of what parameters are available. The value is a -vector of length 1. This function is also available with the -\fBshow\fR command, and is available with variables for convenience for -command scripts. -.PP -\*S -commands are as follows (these are only those commands not also -available in \fBnutmeg\fR \- consult the \fBnutmeg\fR manual page for -more commands): -.TP -\fBsetcirc [circuit name]\fR -Change the current circuit. The current circuit is the one that is -used for the simulation commands below. When a circuit is loaded -with the \fIsource\fR command (see below) it becomes the -current circuit. -.TP -\fBop [.op card args]\fR -Do an operating point analysis. .TP -\fBtran [.tran card args]\fR -Do a transient analysis. +\fB\-a\fP or \fB\*=autorun\fP +FIXME .TP -\fBac [.ac card args]\fR -Do an ac analysis. +\fB\-o\fP \fIoutfile\fP or \fB\*=output=\fP\fIoutfile\fP +All logs generated during a batch run (\fB\-b\fP) will be saved in \fIoutfile\fP. .TP -\fBdc [.dc card args]\fR -Do a dc transfer curve analysis. +\fB\-p\fP or \fB\*=pipe\fP +Allow a program (e.g., xcircuit) to act as a GUI frontend for +ngspice through a pipe. Thus ngspice will assume that the pipe +is a tty and allows to run in interactive mode. +.PP +Further arguments are taken to be \*[spice] input decks, which are read +and saved. (If batch mode is requested then they are run immediately.) +.SH "ENVIRONMENT" .TP -\fBlisting [logical] [physical] [deck] [expand]\fR -Print a listing of the current circuit. If the \fBlogical\fR argument -is given, the listing is with all continuation lines collapsed -into one line, and if the \fBphysical\fR -argument is given the lines are printed out as they were found in -the file. The default is \fBlogical\fR. A \fBdeck\fR listing is just like -the \fBphysical\fR listing, except without the line numbers it recreates -the input file verbatim (except that it does not preserve case). -If the word \fBexpand\fR is present, the circuit will be printed with all -subcircuits expanded. +\fBSPICE_LIB_DIR\fP .TP -\fBedit [file]\fR -Print the current \*S deck into a file, call up the editor on that file -and allow the user to modify it, and then read it back in, replacing -the origonal deck. If a \fBfilename\fR is given, then edit that file -and load it, making the circuit the current one. +\fBSPICE_EXEC_DIR\fP .TP -\fBresume\fR -Resume a simulation after a stop. +\fBSPICE_HOST\fP .TP -\fBshow \fR -Show a device parameter. +\fBSPICE_BUGADDR\fP .TP -\fBalter \fR -Alter a device parameter. +\fBSPICE_EDITOR\fP .TP -\fBstate\fR -Print the state of the circuit. (This command is largely unimplemented.) +\fBSPICE_ASCIIRAWFILE\fP default \fI0\fP +Format of the rawfile. \fI0\fP for binary, and \fI1\fP for ascii. .TP -\fBsave [all] [output ...]\fR or \fB.save [all] [output ...]\fR -Save a set of outputs, discarding the rest. If a node has been mentioned -in a \fBsave\fR command, it will appear in the working plot after -a run has completed, or in the rawfile if spice is run in batch -mode. If a node is traced or plotted (see below) it will -also be saved. For backward compatibility, if there are \fBno\fR save -commands given, all outputs are saved. +\fBSPICE_NEWS\fP default \fI$SPICE_LIB_DIR/news\fP +A file which is copied verbatim to stdout when ngspice starts in interactive mode. .TP -\fBstop [ after n] [ when something cond something ] ... \fR -Set a breakpoint. The argument \fBafter n\fR means stop after \fBn\fR -iteration number \fBn\fR, and the argument -\fBwhen something cond something\fR means -stop when the first \fBsomething\fR is in the given relation with -the second \fBsomething\fR, the possible relations being -\fBeq\fR or = (equal to), -\fBne\fR or <> (not equal to), -\fBgt\fR or > (greater than), -\fBlt\fR or < (less than), -\fBge\fR or >= (greater than or equal to), and -\fBle\fR or <= (less than or equal to). -IO redirection is disabled for the \fBstop\fR command, since the relational -operations conflict with it (it doesn't produce any output anyway). -The \fBsomething\fR\&s above may be node names in -the running circuit, or real values. -If more than one condition is given, e.g. -\fBstop after 4 when v(1) > 4 when v(2) < 2\fR, the conjunction of -the conditions is implied. +\fBSPICE_MFBCAP\fP default \fI$SPICE_LIB_DIR/mfbcap\fP .TP -\fBtrace [ node ...]\fR -Trace nodes. Every iteration the value of the node is printed to the -standard output. +\fBSPICE_HELP_DIR\fP default \fI$SPICE_LIB_DIR/helpdir\fP .TP -\fBiplot [ node ...]\fR -Incrementally plot the values of the nodes while \*S runs. +\fBSPICE_SCRIPTS\fP default \fI$SPICE_LIB_DIR/scripts\fP +In this directory the \fIspinit\fP file will be searched. .TP -\fBstep [number]\fR -Iterate \fBnumber\fR times, or once, and then stop. +\fBSPICE_PATH\fP default \fI$SPICE_EXEC_DIR/ngspice\fP +.PP +various undocumented ngspice centric environment variables : .TP -\fBstatus\fR -Display all of the traces and breakpoints currently in effect. +\fBNGSPICE_MEAS_PRECISION\fP .TP -\fBdelete [debug number ...]\fR -Delete the specified breakpoints and traces. The \fBdebug numbers\fR -are those shown by the \fBstatus\fR command. (Unless you do -\fBstatus > file\fR, in which case the debug numbers aren't printed.) +\fBSPICE_NO_DATASEG_CHECK\fP +.PP +Common environment variables : .TP -\fBreset\fR -Throw out any intermediate data in the circuit (e.g, after a breakpoint -or after one or more analyses have been done already), and re-parse -the deck. The circuit can then be re-run. (\fBNote\fR: this command -used to be \fBend\fR in \s-2SPICE\s+2 3a5 and earlier versions -- \fBend\fR -is now used for control structures.) The \fBrun\fR command will take -care of this automatically, so this command should not be necessary... +\fBTERM\fP \fBLINES\fP \fBCOLS\fP \fBDISPLAY\fP \fBHOME\fP \fBPATH\fP \fBEDITOR\fP \fBSHELL\fP .TP -\fBrun [rawfile]\fR -Run the simulation as specified in the input file. If there were any -of the control cards .ac, .op, .tran, or .dc, they are executed. The output -is put in \fBrawfile\fR if it was given, in addition to being available -interactively. +\fBPOSIXLY_CORRECT\fP +.SH "FILES" .TP -\fBsource file\fR -Read the \*S input file \fBfile\fR. \fBNutmeg\fR and \*S commands may be -included in the file, and must be enclosed between the lines -\fI.control\fR and \fI.endc\fR. These commands -are executed immediately after the circuit is loaded, so a control line -of \fIac ...\fR will work the same as the corresponding \fI.ac\fR card. -The first line in any input file is considered a title -line and not parsed but kept as the name of the circuit. The -exception to this rule is the file \fI.spiceinit\fR. -Thus, a \*S command script must begin with a blank line and then with -a \fI.control\fR line. -Also, any line beginning with the characters *# is considered a control -line. This makes it possible to imbed commands in \*S input files -that will be ignored by earlier versions of \s-2SPICE\s+2. -\fINote:\fR in spice3a7 and before, the \fI.control\fR and \fI.endc\fR -lines were not needed, and any line beginning with the name of a front-end -command would be executed. +\fI$SPICE_LIB_DIR/scripts/spinit\fP +The System's Initialisation File. .TP -\fBlinearize vec ...\fR -Create a new plot with all of the vectors in the current plot, or -only those mentioned if arguments are given. The new vectors -will be interpolated onto a linear time scale, which is determined -by the values of \fBtstep, tstart,\fR and \fBtstop\fR in the -currently active transient analysis. The currently loaded deck -must include a transient analysis (a \fBtran\fR command may be run -interactively before the last \fBreset\fR, alternately), and the -current plot must be from this transient analysis. This command -is needed because \s-2SPICE\s+2\&3 doesn't output the results -from a transient analysis in the same manner that \s-2SPICE\s+2\&2 did. -.PP -There are several \fBset\fR variables that \*S uses but \fBnutmeg\fR -does not. They are: -.IP "" 16 -\fBeditor\fR -.br -The editor to use for the \fBedit\fR command. -.IP -\fBmodelcard\fR -.br -The name of the model card (normally \fB.model\fR). -.IP -\fBnoaskquit\fR -.br -Do not check to make sure that there are no circuits suspended and -no plots unsaved. Normally \*S will warn the user when he tries to -quit if this is the case. -.IP -\fBnobjthack\fR -.br -Assume that BJT's have 4 nodes. -.IP -\fBnoparse\fR -.br -Don't attempt to parse decks when they are read in (useful for -debugging). Of course, they -cannot be run if they are not parsed. -.IP -\fBnosubckt\fR -.br -Don't expand subcircuits. -.IP -\fBrenumber\fR -.br -Renumber input lines when a deck has \fB.include\fR's. -.IP -\fBsubend\fR +\fI\&.spiceinit\fP or \fI$HOME/.spiceinit\fP +The User's Initialisation File. +.SH "SEE ALSO" +sconvert(1), ngnutmeg(1), mfb(3), writedata(3), .br -The card to end subcircuits (normally \fB.ends\fR). -.IP -\fBsubinvoke\fR +and \*[ngspice] User's Manual at \fBhttp://ngspice.sourceforge.net/docs.html\fP +.SH "BUGS" +Please report bugs to the ngspice project via .br -The prefix to invoke subcircuits (normally \fBx\fR). -.IP -\fBsubstart\fR -.br -The card to begin subcircuits (normally \fB.subckt\fR). -.PP -There are a number of \fBrusage\fR parameters available, in addition -to the ones available in \fBnutmeg\fR: -.IP "" 16 -.PP -If there are subcircuits in the input file, \*S expands instances of them. -A subcircuit is delimited by the cards -.B .subckt -and -.B .ends, -or whatever the value of the variables -.B substart -and -.B subend -is, respectively. An instance of a subcircuit is created by specifying -a device with type 'x' \- the device line is written -.IP -\fBxname node1 node2 ... subcktname\fR -.LP -where the nodes are the node names that replace the formal parameters -on the \fB.subckt\fR line. All nodes that are not formal parameters -are prepended with the name given to the instance and a ':', as are -the names of the devices in the subcircuit. If there are several nested -subcircuits, node and device names look like \fBsubckt1:subckt2:...:name\fR. -If the variable \fBsubinvoke\fR is set, then it is used as the prefix -that specifies instances of subcircuits, instead of 'x'. -.SH "VMS NOTES" -The standard suffix for rawspice files in VMS is ".raw". -.PP -You may have to redefine the value EDITOR if you wish to use the \fBedit\fR -command, since the default for VMS is "vi". -.SH "SEE ALSO" -nutmeg(1), sconvert(1), spice(1), mfb(3), writedata(3) -\*S User's Guide -.SH AUTHORS -\*S: Tom Quarles (quarles@cad.berkeley.edu) +See \fBhttp://ngspice.sourceforge.net/bugrep.html\fP +.SH "AUTHORS" +\fBspice3\fR: Tom Quarles (quarles@cad.berkeley.edu) .br \fBnutmeg\fR / User interface: Wayne Christopher (faustus@cad.berkeley.edu) -.SH BUGS -.PP -\*S will recognise all the notations used in \s-2SPICE\s+2\&2 \fB.plot\fR -cards, and will translate \fBvp(1)\fR into \fBph(v(1))\fR, and so -forth. However, if there are spaces in these names it won't work. Hence -\fBv(1, 2)\fR and \fB(-.5, .5)\fR aren't recognised. -.PP -BJT's can have either 3 or 4 nodes, which makes it difficult for the subcircuit -expansion routines to decide what to rename. If the fourth parameter has -been declared as a model name, then it is assumed that there are 3 nodes, -otherwise it is considered a node. To disable this kludge, you can set -the variable "nobjthack", which will force BJT's to have 4 nodes (for the -purposes of subcircuit expansion, at least). -.PP -The \fB@name[param]\fR notation might not work with \fBtrace, iplot,\fR etc. -yet. -.PP -The first line of a command file (except for the \fI.spiceinit\fR file) -should be a comment. Otherwise \s-2SPICE\s+2 may create an empty circuit -structure. -.SH CAVEATS -.PP -\*S files specified on the command line are read in before the\fB .spiceinit\fR -file is read. Thus if you define aliases there that you call in a -\*S source file mentioned on the command line, they won't be recognised. - +.br +\fBngspice\fR: various authors (see \fBhttp://sourceforge.net/projects/ngspice/)\fP +.\" Local Variables: +.\" mode: nroff +.\" End: