next up previous contents index
Next: The ac Command Up: WRspice Commands Previous: The xeditor Command   Contents   Index

Simulation Control Commands

The commands described in this section initiate, control, and monitor WRspice simulations. One can monitor the progress of a run in two ways, in addition to the percentage complete that is printed in the Tool Control window. First, the iplot command can be used to plot one or more variables as the simulation is progressing. To plot v(1), for example, one would type, before the run is started, ``iplot v(1)''. During the run, v(1) will be plotted on screen, with the plot rescaled as necessary. Second, one can print variables. For example, the trace command can be used, by typing ``trace time'' before the run starts, to cause the time value to be printed at each output point during transient analysis.

The iplot and trace commands are examples of what are called ``runops''. Other runops include the stop and measure commands. A runop remains in effect until deleted with the delete command, and the runops in effect can be listed with the status command. The runops can also be listed, deleted, or made inactive with the Trace tool from the Tools menu in the Tool Control window. All runops are available as commands, which apply to any circuit while in force. Some runops can be specified from within the WRspice input file, in which case the runop applies when simulating that file only. The table below lists the runops that are presently available.

Command Input Keyword
save .save
trace -
iplot -
measure .measure
stop .stop

The run can be paused at any time by typing Ctrl-C in the controlling text window. The run can be resumed with the resume command, or reset with the reset command.

It is possible to transparently execute simulations on a remote machine while in WRspice, if the remote machine has a wrspiced daemon running. It is also possible to run simulations asynchronously on the present machine. These jobs are not available for use with the iplot command, however. The jobs command can be used to monitor their status.

Many of these commands operate on the ``current circuit'' which by default is the last circuit entered into WRspice explicitly with the source command, or implicitly by typing the file name. The setcirc command can be used to change the current circuit. The Circuits button in the Tools menu also allows setting of the current circuit.

When a circuit file is read, any references to shell variables are expanded to their definitions. Shell variables are referenced as $name, where name has been set with the set command or in the .options line. This expansion occurs only when the file is sourced, or the reset command is given, so that if the variable is changed, the circuit must be sourced or reset to make the change evident in the circuit. If a variable is set in the shell and also in the .options line, the value from the shell is used.

Simulation Commands
ac Perform ac analysis
alter Change circuit parameter
alterf Dump alter list to Monte Carlo output file
aspice Initiate asynchronous run
cache Manipulate subcircuit/model cache
check Initiate range analysis
dc Initiate dc analysis
delete Delete watchpoint
destroy Delete plot
devcnt Print device counts
devload Load device module
devls List available devices
devmod Change device model levels
disto Initiate distortion analysis
dump Print circuit matrix
findlower Find lower edge of operating range
findrange Find edges of operating range
findupper Find upper edge of operating range
free Delete circuits and/or plots
jobs Check asynchronous jobs
loop Alias for sweep command
mctrial Run a Monte Carlo trial
measure Set up a measurement
noise Initiate noise analysis
op Compute operating point
pz Initiate pole-zero analysis
reset Reset simulator
resume Resume run in progress
rhost Identify remote SPICE host
rspice Initiate remote SPICE run
run Initiate simulation
save List vectors to save during run
sens Initiate sensitivity analysis
setcirc Set current circuit
show List parameters
state Print circuit state
status Print trace status
step Advance simulator
stop Specify stop condition
sweep Perform analysis over parameter range
tf Initiate transfer function analysis
trace Set trace
tran Initiate transient analysis
vastep Advance Verilog simulator
where Print nonconvergence information

next up previous contents index
Next: The ac Command Up: WRspice Commands Previous: The xeditor Command   Contents   Index
Stephen R. Whiteley 2022-09-18