Manuals >Reference >SPECTRE Simulator
Print version of this Book (PDF file)
prevnext

Piped and Non-Piped SPECTRE Simulations

The following sections describe the differences in piped and non-piped simulations for the various SPECTRE simulators. Each section also describes the argument syntax required to invoke each of the template simulators. This information is needed when writing the user translation module, since these are the arguments supplied by IC-CAP when it calls the translation module. For information on the translation module and adding a simulator, refer to the section "Adding a Simulator" in the User's Guide.

There are 3 methods you can use to link to the SPECTRE simulator interface:

    • Use template SPECTRE, SPECTRE443, or SPECTRE442 with CANNOT_PIPE.
    • Use template SPECTRE, SPECTRE443, or SPECTRE442 with CAN_PIPE.
    • Use template SPICE3 and the Open Simulator Interface spectre3.c.


Note


The methods using SPECTRE or SPECTRE442/443 offer significant speed enhancements with some minor features that will not work properly. Be sure to read the following sections describing their limitations.



Note


The method using SPICE3 is fully supported, but offers the slowest speed. It is not recommended, except when methods using SPECTRE or SPECTRE442/443 do not work, or are unavailable.


Using SPECTRE Simulator Templates with CANNOT_PIPE

If you specify the template SPECTRE, SPECTRE442 or SPECTRE443, you can greatly speed up your simulations. This template will use the SPECTRE alter command to simulate multiple bias steps in 1 simulation. This improves many multi-sweep simulations such as an S-parameter setup with 2 sweeps. Using the Open Simulator Interface method, each of these bias steps would require a separate simulation.

The one known limitation with this method is that parameter sweeps will not work properly with certain parameters that are declared in a subcircuit at the Circuit page level when a Test circuit is being used. Parameters that are declared with an "=" sign will work even under this configuration, but parameters that are declared without an "=" sign will not work. In the following example, parameter sweeps will work for IS, but not for R1.

Circuit Page:

 subckt CIRC 1=A 2=C
R1 1 2 50
Q1 1 2 1 2 NPN 
model NPN BJT IS=10e-15
.ENDS

Test Circuit:

 subckt CIRC2 1=A 2=C
XTEST 1 2 CIRC
.ENDS 

Using SPECTRE Simulator Templates with CAN_PIPE

IC-CAP may not work properly with parameters defined using $mpar() in #echo lines. If using such a circuit, Agilent Technologies does not recommend using CAN_PIPE. Use CANNOT_PIPE instead.

Specifying CAN_PIPE with SPECTRE, SPECTRE442 or SPECTRE443 templates will use a mode that will allow the simulator to stay up for multiple simulations of the same setup as long as the only thing changing are parameters. This is what happens during an optimization which has all targets within 1 setup. This mode is not officially supported by Cadence, so use the link at your own risk. Our testing has shown it to provide significant performance improvements.

Limitations of this method include:

    • This mode has the same limitation described in the previous section.
    • If a Test circuit is used, this mode offers no performance enhancement.
    • This mode does not work with remote hosts.

Using Template SPICE3 and the Open Simulator Interface spectre3.c


Note


Using Template SPICE3 requires more processing time than the other SPECTRE templates. Using Template SPICE3 is not recommended, except when methods using SPECTRE, SPECTRE442, or SPECTRE443 are unavailable.


Using IC-CAP's Open Simulator Interface, a C-language Translation Module is provided that makes SPECTRE simulation capability available in IC-CAP. This module and instructions for performing SPECTRE simulations in IC-CAP are described here. For general information on the Open Simulator Interface, refer to the section "Adding a Simulator" in the User's Guide.

The IC-CAP/SPECTRE link uses UCB SPICE3 as the template simulator. When performing a SPECTRE simulation in IC-CAP, IC-CAP behaves as if it is performing a SPICE3 simulation. Therefore it generates an input deck in SPICE3 format, calls the simulator and reads back a binary raw data file in SPICE3 format. Through the Open Simulator Interface, the call to the simulator is actually calling the executable version of the C-language Translation Module, spectre3.c. This executable, called spectre3, translates the SPICE3 input deck to a SPECTRE input format, calls SPECTRE to perform the simulation, then translates the SPECTRE format binary raw data file to SPICE3 format which is read by IC-CAP. The source code file spectre3.c is located in the $ICCAP_ROOT/src directory.


Note


When using SPECTRE, the CDS_LICENSE_DIR environment variable must be set. This variable contains the directory path for the license file required by the SPECTRE simulator. Refer to the SPECTRE Reference Manual for detailed procedures on installing the SPECTRE simulator.



Note


SPECTRE does not support a secondary sweep in the DC specification. For DC simulations, set the System Variable MAX_DC_SWEEPS to 1 so that IC-CAP generates a separate input deck for every point in the secondary sweep, if it exists.



Note


If you set the SPECTRE variable SPECTRE_DEFAULTS in your system startup file, for example, the .profile file, do not use the -E option. Use the following syntax:

 SPECTRE_DEFAULTS   +l %C.r.out -f psfascii

To set up SPECTRE simulation capability in IC-CAP:

  1   Add the spectre simulator to the usersimulators file in the directory $ICCAP_ROOT/iccap/lib, as shown next.

spectre spice3 /<your path>/spectre3
"<host_machine_name>" CANNOT_PIPE

  2   The host_machine_name is the host computer for the SPECTRE simulations. This name can be left blank ("") if SPECTRE and IC-CAP are running on the same computer. Since SPECTRE does not have the ability to perform piped simulations in IC-CAP, the CANNOT_PIPE flag must always be set, as shown in the above example.

  3   Make the following change to the spectre3.c program to customize it for your environment:
     In the main routine, specify the full pathname of the actual SPECTRE simulator on your system.

  4   Compile the translation module using the following command:

cc -o spectre3 spectre3.c -lm 

  5   Move the executable file, spectre3 to a permanent location such as $ICCAP_ROOT/bin. The location must match the path specified in the usersimulators file.

  6   In IC-CAP, set the SIMULATOR variable to spectre or specify spectre with the Select Simulator command in the IC-CAP Tools Menu.

The following files are generated in your home directory when running SPECTRE simulations in IC-CAP:

    • spectre.cki - SPECTRE format circuit description deck file translated from the SPICE3 circuit description deck.
    • spectre.raw - SPECTRE formatted binary raw data output file generated by a SPECTRE simulation.
    • spectre.log - Output print file generated by a SPECTRE simulation.

spectre.raw and spectre.log are automatically removed from your home directory after the simulation is completed in IC-CAP.


Note


Some of the new models implemented in SPECTRE use slightly different syntax for the model statement than they would for SPICE3. This difference will not be accounted for by the translator; you must change the model statement in the Circuit Description folder before simulating. The following examples show how the model statement would read for the MM9 and BSIM3 models:

 model <name> mos902 type=n <parameters>
model <name> bsim3 type=n <parameters>


prevnext