Product Documentation
Spectre Circuit Simulator Reference
Product Version 23.1, September 2023

Spectre Command-Line Options

The spectre command takes the following syntax at the command line:

spectre options inputfile

If no options are specified, the Spectre® circuit simulator saves the .print file in the current working directory, and saves the .measure and .mt0 files in the .raw subdirectory of the netlist directory.

The Spectre circuit simulator reads default values for all the command line arguments marked with a dagger (†) from the UNIX environment variable %S_DEFAULTS.

Command option Description

-help

Lists the Spectre command options and their descriptions. In addition, lists the available components, analyses, and design checks. You can use -h as an abbreviation of -help.

-help name

Displays help information for the specified component or analysis name. If name is all, the help information for all components and analyses is displayed. You can use -h as an abbreviation of -help.

-helpsort name

Displays the help information for the specified component or analysis name and sorts all the parameters alphabetically. You can use -hs as an abbreviation of -helpsort.

-helpfull name

Displays detailed information for the specified component or analysis name, including parameter types and range limits. You can use -hf as an abbreviation of
-helpfull.

-helpsortfull name

Displays detailed information for the specified component or analysis name, including parameter types and range limits. In addition, it sorts all parameters by name. You can use -hsf as an abbreviation of -helpsortfull.

-param

Ignores the file containing the suggested parameter range limits. You can use -p as an abbreviation of -param.

+param file

Reads the specified file for suggested parameter range limits. You can use +p as an abbreviation of +param.

+paramdefault file

Reads the default values of the parameters from the specified file and applies them. However, if same parameters are specified in the netlist, their values override the default values in the specified file. This option can be set multiple times. Each line in the parameter file should contain three entries: primitive name, parameter name, and value. For example:

tran start 2e-3

The primitive name is limited to analyses primitives, which includes the options analysis. The value should be a constant. Expressions are not allowed.

=paramdefault file

Reads the specified file and ignores all previously specified files. Refer to +paramedefault for details.

-paramdefault

Disables the reading of any parameter defaults that have been specified.

-log

Displays the log information on the standard output (shell) only and does not copy it to a log file. You can use -l as an abbreviation of -log.

+log file

Displays the log information on the standard output (shell) and copies it to the specified log file. You can use +l as an abbreviation of +log.

=log file

Sends the log informaion to the specified file only and does not display it on the standard output (shell). You can use =l as an abbreviation of =log.

-raw raw

Saves the simulation results in the specified file or directory named raw. In raw, %C, which is specified in the directory or file name is replaced by a circuit name. You can use -r as an abbreviation of -raw.

-format fmt

Generates raw data in the format fmt. You can use -f as an abbreviation of -format. Possible values for fmt are nutbin, nutascii, psfbin, psfascii, psfbinf, psfxl, sst2, fsdb, fsdb5, wdf, uwi, and tr0ascii.

+rtsf

Enables the fast waveform viewing mode for psf output. You can use this option only if you have specified the -f psfbin, -f psfbinf or -f psfxl format options.

-outdir path

Changes the default location of Spectre output files. It does not change the location of raw directory if explicitly specified with the -raw option, and of files that contain slashes in the name.

-uwifmt name

Specifies a user defined output format. To specify multiple formats use : as a delimiter. This option is valid only when waveform format is defined as uwi using the
-format option.

-uwilib lib

Absolute path to the user-defined output format library. This option is used together with -uwifmt. Use : to specify more than one library.

+checkpoint

Turns on the checkpoint capability. You can use +cp as an abbreviation of +checkpoint.

-checkpoint

Turns off the checkpoint capability. You can use
-cp as an abbreviation of -checkpoint.

+savestate

Turns on the savestate capability. You may use +ss as an abbreviation of +savestate.

-savestate

Turns off the savestate capability. You may use
-ss as an abbreviation of -savestate.

-recover

Does not restart the simulation, even if a checkpoint file exists. You can use -rec as an abbreviation of -recover.

+recover[=filename]

Restarts the simulation from a checkpoint or savestate file. Savestate file will be used if both files exist. You can use +rec[=filename] as an abbreviation of +recover[=filename].

-cols N

Sets screen width (in characters) to N. This is needed only if the simulator cannot determine screen width automatically, and if default value of 80 is not acceptable. Spectre cannot determine screen width if output is redirected to a file or a pipe. You can use -c as an abbreviation of -cols.

Spectre cannot determine the screen width if the output is redirected to a file or a pipe.

-colslog N

Sets the log-file width based on the number of characters specified. The default is 80 characters.

-%X

In quoted strings within the netlist, replaces %X with nothing where X is any uppercase or lowercase letter.

+%Xstring

In quoted strings within the netlist, replaces %X with string, where X is an uppercase or lowercase letter. You can modify the string by using the :x operators.

Example: +%KmyFile.txt, if the netlist contains file=../models/%K, the file path is expanded to ../models/myFile.txt.

+error

Prints error messages.

-error

Does not print error messages.

+varedefnerror

Prints error messages if Verilog-A modules are redefined.

+warn

Prints warning messages on the screen.

-warn

Does not print warning messages on the screen.

-maxwarns N

Maximum number of times a particular type of warning message will be issued per analysis. You may use -maxw as an abbreviation of -maxwarns.

-maxnotes N

Maximum number of times a particular type of notice message will be issued per analysis. You can use -maxn as an abbreviation of -maxnotes.

-maxwarnstolog N

Maximum number of times a particular type of warning message will be printed to log file per analysis. You can use -maxwtl as an abbreviation of -maxwarnstolog.

-maxnotestolog N

Maximum number of times a particular type of notice message will be printed to log file per analysis. You may use -maxntl as an abbreviation of -maxnotestolog.

+note

Prints notices on the screen.

-note

Does not print notices on screen.

+info

Prints informational messages.

-info

Does not print informational messages.

-debug

Does not print debugging messages.

+debug

Prints debugging messages.

-timer

Turn off all timers.

+timer

Turn on all timers.

+diagnose

Enables diagnostic mode that provides debugging information to help you resolve simulation issues related to performance or convergence.

+diagnose_minstep=1e-12

Prints debugging information if the step size is less than the specified value, while running transient analysis in diagnostic mode.

+transteps

Prints all transient steps in diagnostic mode.

+diagnose_top=N

Prints top N (N>=2) signals that limit step size or cause convergence failures in diagnostic mode.

+diagnose_fpe

Identify devices that cause floating point exceptions and print the bias voltages of the devices during dc and transient analyses in diagnostic mode. This option enforces single thread simulation.

+detect_negcap

Identify negative capacitance when convergence difficulty happens during transient analysis in diagnostic mode.

+fix_bad_pivot

Reorder matrix when a bad pivot is detected during matrix factorization in transient analysis.

-slave <cmd>

Starts the attached simulator using the command cmd.

-slvhost <hostname>

Runs the attached simulator on machine hostname. Defaults to local machine.

-V

Prints version information.

-W

Prints subversion information.

-cmiversion

Prints CMI version information.

-cmiconfig file

Reads the specified file for information to modify the existing CMI configuration.

-alias <name>

Gives name to the license manager as the name of the simulator invoked.

-E

Runs the C preprocessor on an input file. In SPICE mode, the first line in the file must be a comment.

-D<x>

Defines string x and runs the C preprocessor.

-D<x=y>

Defines string x to be y and runs the C preprocessor.

-U<x>

Clears string x and runs the C preprocessor.

-I<dir>

Runs the C preprocessor and searches the directory dir for include files.

+sensdata <file>

Sends the sensitivity analyses data to file.

+multithread

Enables the multithreading capability. Spectre automatically detects the number of processors and selects the proper number of threads to use. (See note on the options help page about using multithreading). +mt can be used as an abbreviation of +multithread.

+multithread=N

Enables the multithreading capability. N is the specified number of threads. A maximum of 64 threads are allowed. +mt can be used as an abbreviation of +multithread.

-multithread

Disables the multithreading capability. By default, multithreading is disabled for Spectre. However, it is enabled for Spectre APS. -mt can be used as an abbreviation of -multithread.

+mtmode <value>

Selects the multithreading mode. Possible values are passive and active.

-processor

Sets the CPU affinity of a process similar to Linux taskset command. It specifies a numerical list of processors that may contain multiple items, separated by comma, for example, -processor 0-3,5,7. Specification of numerical value out of range for current system results in the process termination with Invalid argument error message. You can use -proc as an abbreviation of -processor.

-interactive

Runs Spectre in the non-interactive mode, that is, process the input file and then return. You can use -inter as an abbreviation of -interactive.

+interactive

Runs Spectre in the interactive mode based on the type specified. You can use +inter as an abbreviation of +interactive.

+interactive=type

Runs in the interactive mode of the type specified. You can use +inter as an abbreviation of +interactive. Possible values for type are skill or mpsc.

+mpssession=sessionName

Specifies the sessionName for running an interactive session using multiprocess SKILL (MPS). This option must be specified when using the +interactive=mpsc setting.

+mpshost=sessionHost

Specifies the name of the sessionHost that will be used for an interactive session using MPS.

-64

Runs the 64-bit Spectre binary.

-32

Runs the 32-bit Spectre binary.

-mdlcontrol

Ignores the MDL control file. You can use -mdl as an abbreviation of -mdlcontrol.

+mdlcontrol

Runs Spectre with the default MDL control file. You can use
+mdl as an abbreviation of +mdlcontrol.

+mdlcontrole

Runs Spectre with the default MDL control file. You can use
+mdle as an abbreviation of +mdlcontrole.

=mdlcontrol file

Specifies the location of the MDL control file. You can use =mdl as an abbreviation of =mdlcontrol.

=mdlcontrole file

Specifies the location of the MDL control file. You can use =mdle as an abbreviation of =mdlcontrole.

-checklimitfile file

Writes assert violations to file. In file, %C is replaced by the circuit name. You can use -cl as an abbreviation of -checklimitfile.

-dochecklimit

Disables the checklimit capability. You can use
-docl as an abbreviation of -dochecklimit.

+dochecklimit

Enables the checklimit capability. You can use +docl as an abbreviation of +dochecklimit.

-dynchecks

Disables the dynchecks capability.

+lqtimeout value

Specifies the duration (in seconds) for which Spectre should wait to retrieve a license. When set to 0, Spectre waits until license is available. You can use +lqt as an abbreviation of +lqtimeout.

+lqsleep value

Specifies the wait duration between two attempts made by Spectre to check out a license when queuing. Setting the value to a positive number overrides the default wait duration of 30 seconds. You can use +lqs as an abbreviation of +lqsleep.

+lqmmtoken

Enables queuing for the token license capability. When specified, Spectre registers the token request with the license server and waits for authorization. In addition, Spectre ignores all non-token licenses during the wait time since only token licenses are queued.

+lsuspend

Enables the license suspend/resume capability. When Spectre receives SIGTSTP it checks in all the licenses before it gets suspended. The licenses are checked out again when SIGCONT is received.  You may use +lsusp as an abbreviation of +lsuspend.

+lmode value

Checks out the licenses according to the specified value during initialization phase. Possible values are <num> and RF. <num> is a numeric value greater than 1, which specifies the number of token licenses to be checked out together. For example, to run Spectre APS with the multi-core option, specify +lmode 4. RF checks out the required licenses for the RF functionality. This value is case insensitive. If a simulation requires more licenses than the value specified using +lmode, the additional licenses are checked out after the initialization phase.

+lorder value

Specifies the license check out order. Values are case insensitive. Possible values are:

PRODUCT: Spectre attempts to check out the product+options combination licenses only.

MMSIM: Spectre attempts to check out Virtuoso_Multi_Mode_Simulation (Spectre MMSIM) tokens only.

PRODUCT:MMSIM: Spectre attempts to check out the product licenses first and then Spectre MMSIM tokens.

MMSIM:PRODUCT: Spectre attempts to check out the Spectre MMSIM tokens first and then product licenses.

Default is PRODUCT:MMSIM.

-ahdlcom value

Starting with MMSIM15.1, support for the -ahdlcom option has been removed.

-va,define MACRO[=value]

Defines a macro with higher priority than the one defined in Verilog-A files.

-rf_ahdl_functionality

Specifies the value for AHDL functionality in RF analysis. Possible values are 141 and 151. Default value is 151.

-ahdllint[=value]

Enables Verilog-A linter check. Possible values are no, warn, static, error, and force. The default value is warn. This option is not available in Spectre base. It is availabe only in Spectre APS and Spectre XPS.

-ahdllint_maxwarn[=value]

Specifies the maximum number of Verilog-A linter warning messages to be reported by the simulator for each message ID. The default value is 5.

-ahdllint_summary_maxentries[=value]

Specifies the maximum number of messages to display in dynamic linter summary. The default value is 25.

-ahdllint_warn_id=value

Specifies a message ID and applies the -ahdllint_maxwarn option only to the specified ID. This option should always be used with the ahdllint_maxwarn option and should be directly specified after it at the command line, otherwise, the option will be ignored.

-ahdllint_log <file>

Specifies the file name to which the Verilog-A linter messages need to be written. By default, the Verilog-A linter messages are written to the output log file.

-ahdllibdir path

Redirects the library files generated by AHDL to the specified path. If both -ahdllibddir and -outdir options are specified, the library files generated by AHDL are stored under the path specified by the -ahdllibdir option and other output files are stored in the path specified by the -outdir option.

-ahdlsourceramp

Disables source ramping for Verilog-A models. Source ramping of Verilog-A models is enabled by default because it helps with convergence for most designs. However, in certain corner cases, the default behavior could lead to convergence difficulties, which can be avoided by using this option.

-ahdlshipdbdir=sharing_path

Specifies the sharing directory for Verilog-A library compilation. If this option is specified, the simulator will search for reusable library in the sharing_path. If library is found, reuse it, otherwise, compile a new library in the local directory.

-ahdlshipdbmode=read_only or create_or_update

Indicates whether to create or update the library under sharing_path specified by -ahdlshipdbdir. Possible values are read_only and create_or_update. read_only is the default behavior for -ahdlshipdbdir appearing alone. create_or_update will copy the newly-built library in local directory to sharing_path if no any library already or if the library is outdated.

+errpreset=value

Selects a predetermined collection of parameter settings. Possible values are liberal, moderate, and conservative.

+aps

Enables Spectre APS mode.

+aps=value

Enables Spectre APS mode and overrides the errpreset value in all transient analyses to apply the specified value. Possible values are liberal, moderate, or conservative.

++aps

Enables ++aps mode. Unlike the +aps mode, the ++aps mode uses a different time-step control algorithm as compared to Spectre. This results in improved performance, while satisfying error tolerances and constraints.

++aps=value

Enables the ++aps mode and overrides the errpreset value in all transient analyses to apply the specified value. Possible values are liberal, moderate, or conservative.

+preset=value

Enables Spectre X. The most accurate mode is cx, and the highest performing mode is vx. Possible values are cx, ax, mx, lx, vx.

+postlpreset=value

Defines parasitic optimization in Spectre X. If not set, Spectre X enables parasitic optimization if post-layout content is detected. If set, parasitic optimization is enforced. The most accurate parasitic optimization is cx, and the highest performing parasitic optimization is vx. Parasitic optimization can be disabled with off. Possible values are off, cx, ax, mx, lx, vx.

-preset_override

Spectre X by default ignores solver options defined in the netlist. The option -preset_override forces Spectre X to honor solver options defined in the netlist. The option can also be used to honor individual solver options: -preset_override=reltol,method.

+xdp=value

Enables Spectre X distributed, multi-processing simulation. Supports RSH/SSH in manual mode: +xdp=rsh|ssh +hosts="host1:1 host2:3". In farm mode, +xdp needs to be set and the job distribution system controls the host/core usage.

+hosts “<hostname>: number of processes

Defines the machine specifications that will be used for distributed processing. This option must be used when you specify the rsh or ssh values with the +xdp option. The format of the machine specification is the same for both rsh and ssh. Each machine specification, which can be separated by the space delimiter contains the name of the machine and number of cores to be used on the machine in the following format: "host_name:number_of_processes".

For example:
+hosts "hostA:4 hostB:4".

This setting specifies that four processes will be used on both hostA and hostB for performing the simulation.

+ms

Enables Spectre MS mode.

+xps

Enables the Spectre XPS mode.

+xps=s[value]

Enables Spectre XPS SPICE accuracy mode. The optional value is the speed setting.

+speed=value

The simulation group speed setting. The lower number means conservative setting.

+query=value

Queries the recommended number of threads or licenses required to run simulation on the current computer or on another computer with similar configuration.

Possible values are:

  • "mtinfo: prints the number of threads required to run the simulation
  • "meminfo: prints an estimate of the memory that will be required to run the simulation
  • "all: prints the recommended number of threads, the memory usage estimate, and all possible license combinations for the design used in simulation
  • "alllic: prints all possible license combinations for the design used for simulation
  • "tokenlic: prints the number of MMSIM tokens required. This is the default value.

+liclog

Writes the license check-in and check-out information in the log file.

+disk_check [=value]

Suspend the simulation when available disk storage is less than N bytes. Here, N is the value specified using the optional [=value] of +disk_check or netlist option disk_check_thresh. For example, +disk_check=1e10.

-clearcache

Clears the Spectre cache directory /home/<username>/.cadence/mmsim. You can use -cc as an abbreviation for -clearcache.

-disableCPP

Disable CPP preprocesses in situations where Spectre implicitly calls CPP, such as -I and -D. However, if -E is specified, -disableCPP has no effect.

+dcopt[=value]

Speeds up the simulation in Spectre and Spectre APS for post-layout circuits that consist of a large number of parasitic resistors and capacitors, which require significant time in DC simulation. This option can also be used to solve the non-convergence issues in DC simulations of any other circuit.

In some cases, the DC solution obtained using the dcopt may not be as accurate as the true DC solution.

+lite

Enables a lightweight simulation session where most or all of the computationally intensive features (device check asserts, info analysis, current probing, power probing, instance preservation, and so on) are disabled. By default, ++aps is used as the simulation engine. This can be a useful tool in isolating the computational time used by simulation engine during a simulation performance debugging.

+config <file>

Enables the user to append all Spectre commands defined in file to the netlist. file may contain one or more Spectre netlist lines. Multiple +config on the same Spectre command line are supported. They are incrementally processed.

=config <file>

Enables the user to append all Spectre commands defined in file to the netlist. All +config statements on the same Spectre command line are ignored.

-config

Disable all +config statements on the same Spectre command line. Disables all preceding =config statements on the same Spectre command line.

+pre_config <file>

Enables the user to prepend all Spectre commands defined in <file> to the netlist. <file> may contain one or more Spectre netlist lines. Multiple +pre_config on the same Spectre command line are supported. They are incrementally processed.

+top <value>

When specified with a subcircuit name, all elements, models, and so on will be exposed to the top level and the subcircuit will not exist anymore. As a result, instantiation from this subcircuit will be illegal. Instances inside the subcircuit will automatically connect to the instance at the top level if they connect to the same node.

-hpc

Disables the hpc option.

If you do not specify an input file, the Spectre simulator reads from standard input. When +/- pairs of spectre command options are available, the default is the first value given in the previous list. For further information about the percent code options, +% and -%, see Chapter 15, “Managing Files”, in the Spectre Classic Simulator, Spectre APS, Spectre X, and Spectre XPS User Guide.

Default Values

The Spectre simulator reads default values for all the command line arguments marked with a dagger (†) from the UNIX environment variable %S_DEFAULTS. The name of the simulator as called replaces %S. Typically, this name is spectre, and the Spectre simulator looks for spectre_DEFAULTS. However, the name can be different if you move the executable to a file with a different name or if you call the Spectre simulator through a symbolic or hard link with a different name. This feature lets you set different default values for each name you use to call the Spectre simulator.

If the variable %S_DEFAULTS does not exist, SPECTRE_DEFAULTS is used instead. The command line arguments always override any specifications from the options statement in the circuit file. The options statement specifications, in turn, override any specifications in the environment variable.

Default Parameter Values

Many Spectre parameters have default values, and sometimes you will need to know them so you can determine whether they are acceptable for your simulation. You can find the default values for component, analysis, and control statement parameters by consulting the documentation for the statement in Spectre online help (spectre -h). Values given for parameters in the online help are the default values.

The following examples show some defaults for different types of parameters from the Spectre online help:

Parameter Description

nf=1.0

Forward emission coefficient.

etchc

Narrowing due to etching for capacitances.

homotopy=all

Method used when no convergence occurs on initial attempt of DC analysis. You can specify methods and their orders by specifying a vector setting such as homotopy=[source ptran gmin]. Possible values are none, gmin, source, dptran, ptran, and all.

Related Topics

Description of Spectre Predefined Percent Codes

Customizing Percent Codes

Creating Filenames from Parts of Input Filenames


Return to top
 ⠀
X