|
||
label - destination of a
goto
|
|
Format: | label word |
Example: | n = 0
label top n = n + 1 if n > 5 goto done end print n goto top label done echo all done |
If a statement of the form
goto word is encountered, control is transferred to this point, otherwise
no operation is performed. see also goto. |
|
|
let
- generating vectors
|
|
Format: | [let] vector = vector or vector expression |
Example: | let sp =
sqrt(v(8)/(v(9)-v(10))) x = 2*2 |
Usage: | let
test = exp(v(8)*v(9))/((470/@d3[id])-1) view tran test |
Let produces a new
vector from an existing vector or vector expression. All vectors on the
right hand side of the equation must have been created prior to the occurrence
of the let command. Hence, the let command must be placed after the analysis
control statement that creates the vectors used in the let statement. This
new vector can then be used in place of the original expression or vector
for any command in the ICL. The Usage example above can be entered into
the Script window. The next time a simulation is run, test will be displayed
in real time. The vectors v(8), v(9), and @d3[id] must have been saved in
a previous simulation. Unlet removes a
vector. |
|
Note: | As in the BASIC language, let statements (let n = n + 1) work without the let keyword (i.e. n = n + 1). |
linearize - format transient vector
data
|
|
Format: | linearize [vector] |
Example: | linearize v(8) |
Usage: | let
test = exp(v(8)*v(9))/((470/@d3[id])-1) view tran test |
Linearize replaces all the named vectors, with new vectors that are interpolated onto a linear time scale as specified by the .TRAN TSTEP, TSTART, and TSTOP values. A new plot is made to hold the results. If no vectors are listed, all vectors are linearized. This command is essential for indexing into a vector. If the vector is not linearized time points will not be evenly spaced and there will be no way to find a particular point in time. Once linearized, all time points will be in TSTEP increments. |
|
Note: | Linearize should not be used during a simulation, only after a simulation is complete. |
IntuScope Only: Syntax is as following in IntuScope5: | |
Format: | linearize points [vector] |
Example: | linearize 1000 v(8) |
Since
scope, in general, can't access the TRAN parameters, you must explicitly
specify the number of points. |
listing - print the input netlist
|
|
Format: | listing [logical] [physical] [deck] [expand] |
Example: | listing p |
Produces a printed copy of the input netlist. If the logical argument is given all continuation lines are collapsed into one line. If the physical argument is given all input lines are printed as they appear. The deck argument will echo the input verbatim, except for case. If expand is present, the print out will appear with all subcircuits expanded. All options except "deck" produce line numbers. With no argument, the "logical" option is selected. The first letter of the options is all that is required. |
|
load - loads plots from a file
|
|
Format: | load filename [plot [vec1 vec2 ...]] |
Example: | load rule.plt load rule.plt constants load constants.plt constants q e h k pi load %icapsdir%in\const.plt constants |
Loads plots previously saved in a file using the write command. The second argument specifies a plot to save the loaded vectors, otherwise a new plow will be made. The following arguments specify the vectors that are to be loaded. In the third example; q, e, h, k and pi are loaded into the constants plot. The constants plot is a special plot that is initialized when IntuScope is started. It is always searched for unresolved vectors. The filename can have an environment variable specified between % characters. The system environment is searched first, if nothing is present then the user environment is searched. see the set command to establish a user environment. |
|
loadaccumulator - loads accumulator
with single-element vector
|
|
Format: | loadaccumulator vecName [textID] |
Example: | loadaccumulator average(current) mean |
Loads the accumulator with a single-element vector. The result is loaded into the accumulator window of both the status bar and the cursor bar in IntuScope 5. The example illustrates the script used for the average measurement that is invoked by pressing "a" |
|
IntuScope only. |
makelabel - adds a label
to the active trace
|
|
Format: | makelabel function [textstring] |
Example: | makelabel mean "average" |
Creates a label by applying the function to the active trace, and adding any text. See also movelabel, setlabel and setlabeltype. |
|
IntuScope only. |
makesmithplot
|
|
Format: | makesmithplot <source vector type> |
Example: | makesmithplot |
Adds a Smith plot to the current graph document, if the document already contains a trace derived from a complex vector. |
|
IntuScope only. |
maxscale- returns maximum scale
value
|
|
Format: | maxscale |
Returns the maximum scale value of the given plotted vector. If the vector doesn't exist, or has not been plotted by Scope, an error message is displayed. |
|
IntuScope only. |
minscale-
returns minimum scale value
|
|
Format: | minscale |
Returns the minimum scale value of the given plotted vector. If the vector doesn't exist, or has not been plotted by Scope, an error message is displayed. |
|
IntuScope only. |
movecursorleft - move a cursor
to a value, backward along the default scale
|
|
Format: | movecursorleft cursor# vector value |
Example: | movecursorleft(1 v(3) 2.51)
moveCursorLeft(1 v(3) mean(v(3)) |
Positions a cursor at a vectors data value. The cursor is positioned on the default (x-axis) scale and its value is interpolated to correspond to the value of the vector argument. The vector is an array that is scanned from the largest index toward the smallest until the vector value is intersected. If the value is not found, the cursor will be positioned on the first data point. |
|
|
movecursorright - move a cursor
to a value, forward along the default scale
|
|
Format: | movecursorright cursor# vector value |
Example: |
movecursorright(1 v(3) 2.51) |
Positions a cursor at a vectors data value. The cursor is positioned on the default (x-axis) scale and its value is interpolated to correspond to the value of the vector argument. The vector is an array that is scanned from the smallest index toward the largest until the vector value is intersected. If the value is not found, the cursor will be positioned on the last data point. |
|
|
movelabel - changes the coordinates
of a label
|
|
Format: | movelabel xPos yPos |
Example: |
movelabel 200 300 |
Moves most recent label to (x,y) in 0.1% of window size (lower-left label to upper-left window). See also makelabel, setlabel and setlabeltype. |
|
IntuScope only |
msgbox - put up a message box
|
|
Format: | msgbox "text" |
Example: |
msgbox "this will appear in the message box" |
Use this command to display a text in a message box while running a series of ICL commands. |
nameplot - changes a plot name
|
|
Format: | nameplot newtype [newname] |
Example: | nameplot ref
nameplot rule rule |
Changes the name of the current plot. Use setplot with no arguments to see the names of the plots that you can access. The optional newname is used by load to make the typename that accesses the plot in setplot. |
|
|
newplot - creates a new plot with
a default scale [optional copy]
|
|
Format: | newplot name vector [vector] |
Example: | newplot temp default newplot temp default tran2.default |
Creates a new plot using the first argument for its name. It is given the scale from the vector. The default keyword can be used to refer to the scale of a plot without knowing its name. The optional third argument identifies a source plot from which all vectors are copied. The scales of the 2 plots are combined and the entire set of vectors in the new plot are interpolated to fit the new scale. Re-scaling using the newplot command or the copy command is necessary before performing mathematical operations between data in different plots. See nextvector to see how to iterate through all plot vectors. |
|
Applicable for IntuScope 5 only: | |
In addition
to the two and three argument version used by SPICE, IntuScope 5 also allows
zero or one arguments outlined below. |
|
newplot (no argument)
|
nextparam - enumerates parameter
that have tolerances
|
|
Format: | nextparam [param] |
Example: | nextparam nextparam param |
The special global vector, param, holds a reference to the parameter which is used as the argument for alterparam, unalterparam, getparam, tolerance and printparam. If no argument, param starts with the first parameter that has a tolerance. If the param argument is given, it will place the next reference in param or null if there are no more references. The global vector param can be saved in a plot using a let command; for example paramvec = param. Then paramvec can then be used later to reset the current param using setparam. |
|
noise - Small-Signal Noise Analysis
|
|
Format: | noise V(output [,ref])
source_reference_designation [DEC] [LIN] [OCT] + number_of_points Starting_freq Ending_freq [ptspersummary] |
Example: | noise V(5) VIN dec 10 1kHZ 100MgHz noise V(5,3) V1 oct 8 1.0 1.0E6 1 |
Special Requirement: The noise analysis requires at least one voltage or current source in the circuit to have the AC magval (magnitude value) stimulus. For example: V1 1 0 AC 1. It is strongly advised that the AC magnitude be made equal to 1, since the analysis is linear and not affected by source amplitude. See IsSpice4 Help for more information. |
|
nopoints - remove set points
|
|
Format: | nopoints [all] [analysis_type plot_name] |
Example: | nopoints all nopoints tran vmine |
Removes reference points previously placed on one or more graphs by the points command. |
|
op - Operating Point
|
|
Format: | op |
Example: | op |
Summary: The inclusion of this line in an
input file will force IsSpice4 to determine the quiescent DC operating
point of the circuit with inductors shorted and capacitors opened. An
operating point is automatically calculated prior to a transient analysis
to determine the transient initial conditions, and prior to an AC, noise,
or distortion analysis to determine the linearized, small-signal models
for nonlinear devices. If a transient analysis is run with the UIC option,
no DC operating point will be performed unless an AC analysis is run. |
|
plot - plots the named vector
|
|
Format: | plot yVector [xVector] |
Example: | plot
v(1) plot v(1) v(2) |
Plots the specified y-axis
vector, against the specified x-axis vector. If no x-axis vector is specified,
the default scale vector is used instead. In most cases the default is either
time or frequency. If its x-axis is compatible, the new trace is added to
the active plot. If not, a new plot is automatically created for it. If
the x-axes are compatible, but not identical, both the existing and new
traces are interpolated to produce a common x axis for all traces in the
plot. |
|
IntuScope only. | |
plotf - plots and fomats the vectors
name
|
|
Format: | plotf
vector formatString [[[[argument1] argument2] argument3]argument4] |
Example: | alias previous v(6) result = mag(v(6)) plotf result mag(%s) previous |
Result: | The vector name is evaluated as "mag(v(6))", and this name replaces "result" as the vector name when it is plotted. |
Plots the named vector in
the active plot. If the default vector is not identical to that of the plot,
it is interpolated along with the vectors of the plot, to provide a new
common scale, as is done by the copy command. The argument "formatString"
can be any text string containing from 0 to 4 instances of the place holder
"%s". If it contains spaces, it must enclosed in quotation marks.
The arguments "argument1" through "argument4" can be
vector names, alias names, or any other text strings. The new vector name
is formatted using the C-language "sprintf" function, so that
place holders are replaced by their correspond arguments. In the case of
arguments which are alias names, the place holder is replaced by the string
for which the alias was constructed. If there are more place holders than
arguments, the extra place holders themselves appear in the resulting name.
If there are more arguments than place holders, they are ignored. This command
is used to produce unique names in the calculator scripts |
|
IntuScope only. | |
plotref - plots the named vectors
as a reference trace
|
|
Format: | plotref yVector xVector |
Example: | compose level values 90 54 54
60 60 setunits level volts compose frequency values 10k+j(0) 500k+j(0) 5meg+j(0) 5.01meg+j(0) 10meg+j(0) setunits frequency hertz plotref level frequency |
Plots the specified y-axis vector against the x-axis vector in the current plot, as a reference trace, it the x-axis has the same name and units as that of the plot. If they are not the same, an error message is displayed, and no action is taken. As a reference trace, its vectors need not have the same number of data points as the existing traces in the plot, and they are not interpolated, as they would be by the "plot" command. However, no mathematical operations may be performed using the vecors of the resulting trace. Any desired comparisons between it and the other traces in the plot must be made visually, or manually, using the cursors. |
|
IntuScope only. |
poly - prints the best polynomial
|
|
Format: | poly vector order |
Example: | previous = current poly current 5 print rms(previous-current) |
Result: | The vector name is evaluated as "mag(v(6))", and this name replaces "result" as the vector name when it is plotted. |
Calculates polynomial coefficients
for best fit to the specified vector. The results are shown in the output
window and the result is plotted. Be aware that high order polynomials may
result in numerical overflow or underflow if the x-axis contains very large
or very small values. The example also print the rms error that is minimized
using polynomial regression. |
|
IntuScope plots the result. | |
points - place data points on
the screen
|
|
Format: | points analysis_type plot_name x1 y1 ... |
Example: | points tran2 v(1) 0 0.05 45n 0.05 50n 1.5 100n 1.5 |
Places static points on the
graph window of the specified waveform. The points are described in the
familiar IsSpice4 PWL format. To change the displayed points you must remove
the point set with the nopoints command and set
the new points with a new points command. |
print - data output
|
|
Format: | print [line] [all] [vectors] [vector expressions] |
Example: | print mean(@r1[p]) print v(8) @d1[id] v(10)[5] |
The arguments can
be any vector or vector expression. If used in a control block then the
output will be placed in the output file. If used in the Script, Expression,
or Command windows, the output will be sent to the Output window. Note:
This print does not produce IntuScope compatible output data. If the keyword line is given then the vectors are printed horizontally. The x-axis vector, normally time or frequency, is not output in this case unless specifically stated. If the keyword all is given then all currently saved vectors for the active analysis are printed. Transient Note: When printing a vector, the output will consist of interpolated data with respect to the specifications on the .TRAN line (TSTEP increments). To print non-interpolated data use printvector. The linearize function may be used to obtain the equivalent output. |
|
IntuScope 5 uses the printvector format, it does not automatically linearize the vector. |
printcursors - prints the cursors
for the current plot
|
|
Format: | printcursors |
Example: | printCursors |
Print the cursor data for cursors in the current plot. | |
printevent - digital node events
|
|
Format: | printevent nodename |
Example: | printevent 1 3 out_node |
Print digital events for a digital node. | |
printname - prints a vectors name
|
|
Format: | printname vector |
Example: |
nv = nextvector(null)
|
Prints the full vector name
in the output window. The above example enumerates all vectors except the
current vector that have length that's not equal to1. This technique is
used in script templates to print the name and then some information about
the vector; for example, the rise time. Note: To print with a new line (line feed) see printstatus below. |
|
printplot- print the name of a
plot
|
|
Format: | printplot vec |
Example: |
printplot pl. default |
Print plot name in which the vector belongs. | |
printstatus - print to .err file
and status window
|
|
Format: | printstatus vec |
Example: |
printstatus -t "some text"
|
Prints an".err" file to the status window to inform the user of the state of a script. The following options change the interpretation of value: | |
-t the text value is echoed -tn the text is echoed without line feed -p prints the name of the parameter (paramvec index) -l prints the plot name in which the vector belongs -v prints the vector value -vn prints the vector value without line feed -n prints the vector name |
|
printtext - place formatted text
in the output file
|
|
Format: | printtext [-n | -u | -nu | -un] text string |
Example: | set colwidth=20
printtext vector value |
Places the text given on the
left into the output file for the given simulation. Text is left justified.
Each column width is specified by colwidth and ends with a new line unless
the -n option is used. The -u option makes the text upper case. |
|
printtol - print parameter tolerance
|
|
Format: | printtol paramvec |
Example: | printtol param |
Prints the tolerance of a
parameter, formatted in scientific notation with in columns set in the "colwidth" variable. |
|
printunits - prints a vectors
units in the output window
|
|
Format: | printunits vector |
Example: | printunits v(3) |
Prints a vectors units in the output window. See also setunits. | |
Intuscope only. | |
printval - print a vector value
|
|
Format: | printval vec |
Example: | nv=nextvector(null)
printval nv |
Prints the value of the vector nv. | |
printvector - data output
|
|
Format: | printvector [vectors] [vector expressions] |
Example: | printvector mean(@r1[p])
printvector v(8) @d1[id] v(10)[5] |
Prints the vector without
the linearization performed by print. For vectors of
unit length, it uses the spice formatted printout. The data precision can
be set using spicedigits = num. |
|
In IntuScope, this is accessed using the print command. | |
pwl - print a piece-wise-linear
table in the output window
|
|
Format: | pwl vector resolution |
Example: | _resolution = pk_pk(current)*.005
pwl current _resolution echo print _resolution |
In IntuScope, this is accessed using the print command. | |
pz -
Pole-Zero Analysis
|
|
Format: | pz N1 N2 N3 N4 cur [pol]
[zer] [pz] pz N1 N2 N3 N4 vol [pol] [zer] [pz] |
Example: | pz 4 0 5 0 VOL PZ
pz 1 0 3 0 CUR POL pz 2 3 5 4 VOL ZER |
The pole-zero analysis
computes the poles and/or zeros of the small-signal AC transfer function
from any input to any output. Refer to the IsSpice4 help for more information. |
quit - terminate
a simulation
|
|
Format: | quit |
Terminates the simulation at the point the quit command is encountered. |
removesmithplot
|
|
Format: | removesmithplot |
Example: | removesmithplot |
Removes any existing Smith plot from the current graph document. | |
IntuScope 5 only. |
rename - renames
specified vector
|
|
Format: | rename oldVecName newVecName |
Example: | rename v(1) vin |
Renames the specified vector, which must be in the currently active plot. | |
IntuScope 5 only. |
repeat - control
loop
|
|
Format: | repeat [number]
commands end |
Example: | save all allcur
function rms(vec) sqrt(mean(vec*vec)) view tran v(8) repeat 10 tran 1n 100n print @l1[inductance] rms(i(v2)) mean(v(8)) alter @l1[inductance]=@l1[inductance]-5m end |
resume - continue
a simulation
|
|
Format: | resume |
Resumes the simulation
after a stop command. The delete command must be issued to remove the breakpoint
that caused the simulation to stop. |
rotate - rotates a vector (right)
by the points specified
|
|
Format: | rotate vector points |
Example: | _width = default[length(default)-1]
_width=_width - default[0] _width=_width * .25 result = pulse(_width) rotate result 2*_width plot result |
Rotates a vector
in a linearly scaled plot to the right by the specified number of points.
The example builds a pulse with a 25% duty ratio and rotates it one half
cycle. Rotate only works with linearly scaled plots. See linearize. |
|
runs - run
a script from a file
|
|
Format: | runs filespec |
Example: | runs %icapsdir%in\myscript |
Runs a script
that was previously saved. filespec can have an environment variable specified
between % characters. The system environment is searched first, if nothing
is present then the user environment is searched. see the set command to establish a user environment. |
|
rusage - output
resource information
|
|||||||||||||||||||||||||||||||||||||||||||
Format: | rusage resource [all] | ||||||||||||||||||||||||||||||||||||||||||
Example: | rusage time | ||||||||||||||||||||||||||||||||||||||||||
Prints the status
of the resource listed as the argument or the time resource if no arguments
are given. The resource argument can be any of the resources listed in the
following table. Multiple resources can be requested by placing them on
the same line. |
|||||||||||||||||||||||||||||||||||||||||||
|
save - save
a vector
|
|
Format: | save [vectors] [all] [allcur] [allpow] |
Example: |
save all allcur allpow |
Vectors must be
identified before performing a simulation using the save command. These "saved" vectors will be available in the plots made for each analysis.
The save command is global; that is, the same vector list will be saved
for all subsequent analyses. The all, allcur and allpwow options are discouraged,
see IsSpice4 documentation for more information. Save vectors are accumulated
if more than one save command is present. |
sendplot -
send a plot to IntuScope
|
|
Format: | sendplot
[yname = val] vecy [[xname = val] vecx] + [scale ymin ymax] [graph number] + [Gtype typename] |
Example: |
sendplot v(3)
v(4) |
Sends the named vector(s) to IntuScope for display.
If only one vector is given the default scale for its plot is used as
the x axis. If two vectors are given the second is used as the x axis. Any string given to the left of the "="
will be used as the label name for the vector. |
- This symbol indicates that the script command is also used in IntuScope 5.
More