📄 nutmeg.1
字号:
.TP\fBshift [varname] [number]\fRIf \fIvarname\fR is the name of a list variable, it is shifted to the leftby \fInumber\fR elements. (I.e, the \fInumber\fR leftmost elements areremoved.) The default \fIvarname\fR is \fBargv\fR, and the default\fInumber\fR is 1..TP\fBrusage [resource ...]\fRPrint resource usage statistics. If any \fBresource\fR\&s are given,just print the usage of that resource. Currently valid \fBresource\fR\&sare:.IP "" 16\fBelapsed\fR.brThe amount of time elapsed since the last \fBrusage elaped\fR call..IP\fBfaults\fR.brNumber of page faults and context switches (BSD only)..IP\fBspace\fR.brData space used..IP\fBtime\fR.brCPU time used so far..IP\fBeverything\fR.brAll of the above..TP\fBcd [directory]\fRChange the current working directory to \fBdirectory\fR, or to the user'shome directory if none is given..TP\fBaspice [output-file]\fRStart a \s-2SPICE-3\s+2 run, and when it is finished load the data. Theraw data is kept in a temporary file. If \fIoutput-file\fR is specifiedthen the diagnostic output is directed into that file, otherwise itis thrown away..TP\fBjobs\fRReport on the asynchronous \s-2SPICE-3\s+2 jobs currently running.\fBNutmeg\fR checks to see if the jobs are finished every time youexecute a command.If it is done then the data is loaded and becomes available..TP\fBrspice [input file]\fRRuns 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 isgiven. \fBNutmeg\fR waits for the job to complete, and passes outputfrom the remote job to the user's standard output. When the job isfinished the data is loaded in as with \fRaspice\fR. If the variable\fIrhost\fR is set, \fBnutmeg\fR will connect to this host instead ofthe default remote \s-2SPICE-3\s+2 server machine. Note that thiscommand will only work if your system administrator is running a\s-2SPICE-3\s+2 daemon on the remote host. If the variable \fIrprogram\fRis set, then \fBrspice\fR will use this as the pathname to the programto run..TP\fBecho [stuff...]\fREchos the arguments..TP\fBfourier fundamental_frequency [value ...]\fRDoes a fourier analysis of each of the given values, using the first 10multiples of the fundamental frequency (or the first \fInfreqs\fR, if thatvariable 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 ofpoints given by the \fBfourgridsize\fR variable, or 200 if it is not set.The interpolation will be of degree \fBpolydegree\fR if that variable isset, 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]\fRPrint out the version of \fBnutmeg\fR that is running.If there are arguments, it checks to make sure that the arguments matchthe current version of \s-2SPICE\s+2. (This is mainly used as a \fBCommand:\fRline in rawfiles.).TP\fBrehash\fRRecalculate the internal hash tables used when looking up UNIX commands,and make all UNIX commands in the user's PATH available for commandcompletion.This is useless unless you have \fBset unixcom\fR first (see above)..PPThe following control structures are available:.IP.nf\fBwhile\fR \fIcondition\fR statement ...\fBend\fR.fi.PPWhile \fIcondition\fR, an arbitrary algebraic expression, is true,execute the statements..IP.nf\fBrepeat\fR \fI[number]\fR statement ...\fBend\fR.fi.PPExecute the statements \fInumber\fR times, or forever if no argument isgiven..IP.nf\fBdowhile\fR \fIcondition\fR statement ...\fBend\fR.fi.PPThe same as \fBwhile\fR, except that the \fIcondition\fR is tested afterthe statements are executed..IP.nf\fBforeach\fR \fIvar\fR \fIvalue ...\fR statement ...\fBend\fR.fi.PPThe statements are executed once for each of the \fIvalue\fRs, each timewith the variable \fIvar\fR set to the current one. (\fIvar\fR can be accessedby the $\fIvar\fR notation \- see below)..IP.nf\fBif\fR \fIcondition\fR statement ...\fBelse\fR statement ...\fBend\fR.fi.PPIf the \fIcondition\fR is non-zero then the first set of statements areexecuted, otherwise the second set. The \fBelse\fR and the second setof statements may be omitted..IP\fBlabel\fR \fIword\fR.PPIf a statement of the form \fBgoto\fI word\fR is encountered, control istransfered to this point, otherwise this is a no-op..IP\fBgoto\fR \fIword\fR.PPIf a statement of the form \fBlabel\fI word\fR is present in the blockor an enclosing block, control is transfered there. Note that if thelabel 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.PPIf there is a \fBwhile, dowhile,\fR or \fBforeach\fR block enclosing thisstatement, control passes to the test, or in the case of \fBforeach\fR,the next value is taken.Otherwise anerror results..IP\fBbreak\fR.PPIf there is a \fBwhile, dowhile,\fR or \fBforeach\fR block enclosing thisstatement, control passes out of the block. Otherwise anerror results..PPOf course, control structures may be nested. When a block is enteredand the input is the terminal, the prompt becomes a number of >'sequalling the number of blocks the user has entered. The current controlstructures may be examined with the debugging command.B cdump..PPIf a word is typed as a command, and there is no built-in commandwith that name, the directories in the \fIsourcepath\fR list are searchedin order for the file. If it is found, it is read in as a command file (asif it were \fBsource\fRd). Before it is read, however, the variables\fIargc\fR and \fIargv\fR are set to the number of words following thefilename on the command line, and a list of those words respectively.After the file is finished, these variables are \fBunset\fR. Note thatif a command file calls another, it must save its \fIargv\fR and \fIargc\fRsince they will get altered. Also, command files may not be re-entrantsince there are no local variables. (Of course, the procedures mayexplicitly 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 beginwith 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 resultof the \fBsource\fR command being used for both circuit input and commandfile execution. Note also that this allows the user to merely type thename of a circuit file as a command, and it will be automatically run..PPThere 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 usethese command files (almost) like builtin commands. .PP\fBNutmeg\fR will use either \fBX\fR or \fBMFB\fR, depending on whetherit finds the variable \fBDISPLAY\fR in the environment. If you areusing \fBX\fR on a workstation, it should already be present, but if youwant to display graphics on a different machine than the one youare running \fBnutmeg\fR on, \fBDISPLAY\fR should be of the form \fImachine\fR:0..PPIf \fBX\fR is being used, the cursor may be positioned at anypoint on the screen when the window is up and characters typed at thekeyboard will be added to the window at that point. The window maythen be sent to a printer using the \fBxpr(1)\fR program..PPThere 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.PPThese are all in MKS units. If you have another variable witha name that conflicts with one of these then it takes precedence..PPNutmeg occasionally checks to see if itis getting close to running out of space, and warns the user if thisis the case. (This is more likely to be useful with the \s-2SPICE\s+2front end.).PPC-shell type quoting with "" and '', and backquote substitution maybe used. Within single quotes, no further substitution (likehistory substitution) is done, and within double quotes, the wordsare kept together but further substitution is done. Any text betweenbackquotes is replaced by the result of executing the text as a commandto the shell..PPTenex-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 listof the commands or possible arguments is printed. (If it is aloneon 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 <space> ^D..PPThe values of variables may be used in commands by writing \fB$varname\fRwhere 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 aline of input which is read from the terminal when the variableis 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 theexpression \fI$foo[low-high]\fR represents a range of elements. Eitherthe upper index or the lower may be left out, and the reverse of a list maybe obtained with \fI$foo[len-0]\fR. Also, the notation \fI$?foo\fR evaluatesto 1 if the variable \fIfoo\fR is defined, 0 otherwise, and \fI$#foo\fRevaluates to the number of elements in \fIfoo\fR if it is a list, 1 if itis a number or string, and 0 if it is a boolean variable..PPHistory substitutions, similar to C-shell history substitutions, arealso available \- see the C-shell manual page for all of the details..PPThe characters ~, {, and } have the same effects as they do in theC-Shell, i.e., home directory and alternative expansion. It ispossible to use the wildcard characters *, ?, [, and ] also,but only if you \fBunset noglob\fR first. This makes them ratheruseless for typing algebraic expressions, so you should \fBset noglob\fRagain after you are done with wildcard expansion. Note that thepattern \fB[^abc]\fR will match all characters \fIexcept\fB a, b, \fRand\fB c.\fR.PPIO redirection is available \- the symbols \fB>, >>, >&, >>&, \fRand\fB <\fRhave the same effects as in the C-shell..PPYou may type multiple commands on one line, seperated by semicolons..PPIf 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\fRbefore you start \fBnutmeg\fR. The \fB-m\fR option and the \fBmfbcap\fRvariable no longer work..SH "VMS NOTES"\fBNutmeg\fR can be run under VAX/VMS. Some features like command, etccompletion, expansion of *, ?, and [], backquote substitution, theshell command, and so forth do not work. (In fact command completiononly works on 4.2 or 4.3 BSD.) .PP\fBNutmeg\fR will look for start-upcommands in the file \fIspice.rc\fR in the current directory..PPThe standard suffix for rawspice files in VMS is ".raw"..PPYou will have to respond to the \fI-more-\fR prompt during plot with acarriage return instead of any key as you can do on UNIX..SH "SEE ALSO"sconvert(1), spice(1), mfb(3), writedata(3).SH AUTHORWayne Christopher (faustus@cad.berkeley.edu).SH BUGS.PPThe label entry facilities are very primitive \- after all, \fBnutmeg\fR isn'ta graphics editor (yet). You must be careful to type very slowly whenentering labels -- \fBnutmeg\fR checks the \fBX\fR event queue onceevery second, and can get very confused if characters arrive faster thanthat..PPIf you redefine colors after creating a plot window with X, and thencause the window to be redrawn, it will not to the right thing..PPWhen defining aliases like.IP\fIalias pdb plot db( '!:1' - '!:2' )\fR.PPyou must be careful to quote the argument list substitutions in thismanner. If you quote the whole argument it might not work properly..PPIn a user-defined function, the arguments cannot be part of a name thatuses the \fIplot.vec\fR syntax. I.e,.IP\fIdefine poke(duck) cos(tran1.duck).PPwon't do the right thing..PPIf you type \fBplot all all\fR, or otherwise use a wildcard reference forone plot twice in a command, bad things will happen..PPThe \fBasciiplot\fR command doesn't deal with log scales or the \fBdelta\fRkeywords..PPThere are probably some features that \fBnutmeg\fR doesn't have yet..SH CAVEATSOften the names of terminals recognised by \fBMFB\fR are differentfrom those in /etc/termcap. Thus you may have to reset your terminaltype with the command.IP\fBset term = termname\fR.PPwhere \fBtermname\fR is the name in the \fBmfbcap\fR file..PPThe \fBhardcopy\fR command is useless on VMS and other systems withoutthe \fBplot\fR command, unless the user has a program that understands\fIplot(5)\fR format.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -