5
The Spectre X Circuit Simulator
Recent technology developments, advanced node adoption, and more than Moore designs have forced analog and custom IC designers to adopt new design practices to benefit from these advancements. These changes have resulted in the need to simulate larger designs with more postlayout parasitics. In addition, many custom IC designs, such as flash memory, MRAM, and sensor arrays now require SPICE-accurate simulations. To meet these demands, a new SPICE engine with much more performance and capacity than the current generation of circuit simulators is needed. Spectre® X is the next generation of the Spectre circuit simulator that addresses the need for a simulator capable of simulating the next generation of analog, mixed-signal, and custom IC designs.
Spectre X includes two major technologies:
-
Enhanced simulation performance and capacity with a simple
+presetuse model -
Highly scalable multi-core simulation with
+mt, and distributed multi-process simulation with+xdp
This chapter discusses the following topics:
- License Requirements for Spectre X
- Using the Spectre X +preset Option
- Migrating from Spectre APS
- Using the Spectre X +xdp Option
- Using GPU with Spectre X
License Requirements for Spectre X
The number of MMSIM token checked out depends on the number of CPU cores, as described below.
- Single core: 3 MMSIM tokens
- 2 – 4 cores: 6 MMSIM tokens
- 5 – 16 cores: 9 MMSIM tokens
- 17 – 64 cores: 12 MMSIM tokens
- 65 – 128 cores: 15 MMSIM tokens
- 129 – 256 cores: 18 MMSIM tokens
- 257 – 512 cores: 21 MMSIM tokens
Using the Spectre X +preset Option
Spectre X provides five high-level +preset options (cx, ax, mx, lx, vx) that allow you to trade off accuracy and performance. These high-level options not only control solver settings, but also enable parasitic optimization after automatically detecting postlayout designs. The cx mode provides the highest accuracy, while the vx mode provides the highest performance.
Spectre X ignores the Spectre APS command-line options +aps, ++aps, +postlayout, +errpreset.
To start a Spectre X simulation, type the following at the command line:
% spectre +preset=mx input.scs
The following provides guidance on the +preset selection options:
| Option Name | When to Use... |
Spectre X +preset uses the same multi-core simulation approach and use model as Spectre APS. By default, 8 cores are used.
% spectre +preset=mx input.scs +mt=4
While postlayout optimization enabled by the +preset settings is sufficient in most cases, there may be designs that require you to adjust, or disable postlayout optimization. You can do this by using the +postlpreset command-line option, which accepts the following values: off, cx, ax, mx, lx, and vx. The +postlpreset command-line option can also be used to enforce postlayout optimization in case Spectre X does not detect the postlayout nature of a design.
% spectre +preset=mx +postlpreset=cx input.scs
By default, Spectre X ignores the user-specified simulation options that trade off performance and accuracy.
-
Transient options:
method,relref,lteratio,maxiters,maxstep -
Netlist options:
reltol,residualtol,vabstol,iabstol,preserve_inst
However, you can use the -preset_override command-line option to tell Spectre X to honor the user-specified simulation options, as shown below.
% spectre +preset=mx -preset_override input.scs
You can also specify the simulation options as a list, separated by a comma, with the -preset_override command-line option to tell Spectre X to selectively honor only those options and ignore the others, as shown below.
% spectre +preset=mx -preset_override=reltol,method input.scs
Dynamically Changing Parameters in Spectre X
You can use steppreset, a high-level solver parameter, to dynamically changed the Spectre X parameters. Possible values for this steppreset are cx, ax, mx, lx and vx.
The following solver options are adjusted with the steppreset change:
| steppreset | dis_lte_relax | fastout | trapversion | reltol | errpreset | method | relref | maxiters | vrefbins | Iteration |
Migrating from Spectre APS
Experienced users of the Spectre APS simulator may have established a preferred set of simulation options for their design styles. The following table provides guidance on which Spectre X mode to use when migrating from Spectre APS to Spectre X:
* The ax preset can in general provide sufficient accuracy in conservative runs. We recommend starting with ax and only use cx if your circuits require it.
** The lx preset may provide sufficient accuracy compared to moderate runs with much better performance, for example PMIC, High Voltage designs.
Using the Spectre X +xdp Option
Spectre X distributed simulation allows more computer cores across multiple computer hosts to further speed up DC and transient run time of large to very large, mainly postlayout circuits. A circuit is considered as large when there are at least 500,000 nodes. It has equivalent convergence and accuracy as Spectre X multi-core simulation. The netlist syntax, device models, analysis setups, and output formats are fully compatible with Spectre X multi-core simulation.
Spectre X distributed simulation supports the following:
-
DC, transient, HB, assert, and output
- alter; instance and model parameter alter including topology change is supported
- sweep; instance and model parameter alter including topology change is supported
-
info (limited support);
what=inst|oppointis not supported - Monte Carlo analysis
- Reliability analysis
-
LSF,SGE,PBS, andrsh(orssh) methods for job distribution. The command-line options+presetand+xdpare required to invoke the distributed mode. If any of these options is missing, simulation is not run in distributed mode.
If an analysis or feature is not supported, Spectre X ignores it with a warning.
You can use the following command to distribute a job locally using rsh across two hosts, hostA and hostB (with each host using 16 cores):
% spectre +preset=mx +mt=16 +xdp=rsh +hosts "hostA:1 hostB:1" /hm/test/input.scs
If you need to use ssh instead of rsh, you must specify the ssh argument with the +xdp option; however, the +hosts argument may remain unchanged.
% spectre +preset=mx +mt=16 +xdp=ssh +hosts "hostA:1 hostB:1" /hm/test/input.scs
In the LSF use model, it is assumed that Spectre X is started using the LSF job submission command or a user-specific wrapper. Spectre X automatically detects this and queries LSF for a list of hosts allocated to the job by LSF and the number of cores allocated on each host. Add the +xdp command-line option only without +mt to ensure that distributed mode is started.
In the following example, the bsub command is used to request a total of 32 cores, on two machines, with 16 cores on each machine. Spectre X automatically uses the allocated cores and machines supplied by LSF.
% bsub -n 32 -q rnd -P myProject -R "OSREL==EE70 && CPUS>=16 span[ptile=16]" spectre +preset=mx +xdp /hm/test/input.scs
If you want to use SGE instead of LSF, you can use the following equivalent command:
% qsub -l nodes=2,ppn=1,tpp=16 -V -cwd "spectre +preset=mx +xdp /hm/test/input.scs
If you want to use PBS instead of LSF, you can use the following equivalent command:
% qsub -l select=2:ncpus=16 -q rnd -P myProject "spectre +preset=mx +xdp /hm/test/input.scs
In the LSF use model, you can use the +ppn option to control the number of processes per host. In the example below, the simulation will run on a total of 32 cores using two hosts, two processes on each host, with each process using eight threads.
% bsub -n 32 -q rnd -P myProject -R "OSREL==EE70 && CPUS>=16 span[ptile=16]" spectre +preset=mx +xdp +ppn=2 /hm/test/input.scs
It is beneficial to use +ppn when you are running distributed HB simulation. It is recommended to set +ppn to the same number of sockets of the machines being used.
Notes on Spectre X Distributed Mode
-
For DC and transient, Spectre X supports a process-based output by default where both master and worker processes simultaneously write the waveform output to individual files, thereby increasing the simulation speed. Currently, the process-based output is supported only in
psf,psfxl, andsst2formats. - It is recommended to use identical machine configurations for all the hosts, and an equal number of cores on each host for performance testing.
- Spectre X distributed mode supports up to 512 cores and can be used to simulate designs containing millions of devices.
-
When running distributed simulation with
ssh, it is required to use password-less mode byssh-keygento generate private and public key. Copy the public key to remote hosts before starting the simulation. -
Spectre APS
+dpis no longer supported. Use Spectre X+xdpinstead.
Using GPU with Spectre X
Spectre X lets you use graphics processing units (GPUs) in addition to CPUs. If there are GPUs available in the setup and you have large designs that have long-running transient analyses, postlayout or advanced node simulations, you can use GPU mode of Spectre X to speed up simulations.
Spectre X with GPU supports all +preset levels in the same way as done without GPU and there is no accuracy change in the results. When using GPUs, better performance is expected at high accuracy modes in the following order: CX > AX > MX > LX.
GPUs work in collaboration with CPUs. A CPU manages the simulation tasks and dispatches the heavy workload to the GPUs.
License Requirements for GPU
For details on the license requirements for GPU, contact Cadence Customer Support.
Use Model
To enable GPU for Spectre X, use the +gpu command-line option along with the +preset option.
spectre … +gpu
When one or more GPUs are available and you want to use any of the available resources, the least loaded GPU device is automatically assigned.
To use a specific GPU device, specify the name of the device in the +gpudev command-line option.
spectre … +gpu +gpudev device-id
spectre … +gpu +gpudev 0
To specify multiple specific GPUs, use a range or list of device IDs.
spectre -64 +preset cx +mt 8 +gpu=2 +gpudev 0,2
spectre -64 +preset cx +mt 8 +gpu=4 +gpudev 0-3
Return to top