Product Documentation
Virtuoso Schematic Editor Spectre and Ultrasim Interface User Guide
Product Version IC23.1, March 2023

1


Virtuoso Schematic Editor Spectre Interface

This chapter describes how to use the Virtuoso® Schematic Editor Spectre® interface. The procedures described in this chapter are deliberately broad and generic. Requirements for your specific design might dictate procedures slightly different from those described here.

This product provides a solution for digital circuit designers to netlist a Virtuoso schematic editor transistor-level schematic for the Spectre circuit simulator. It also provides a batch and scripting solution for automating various tasks. Some of the key features are listed below.

This chapter discusses the following topics:

Starting the Virtuoso Schematic Editor Spectre Interface

To start the Virtuoso® Schematic Editor Spectre® interface,

  1. Start the Cadence software.
  2. From the CIW, do one of the following:
    • Start a new design by choosing File – New....
    • Start an existing design by choosing File – Open....
  3. After correct setup, click the OK button to display the Virtuoso schematic editing window.
  4. Choose Launch – Simulation – Spectre.
    The Spectre menu is added to the menu bar.
    If you have not accessed another design during this session or you have never created a circuit simulator run directory for this design, all but one of the commands in the Spectre menu are grayed out.
  5. Choose Spectre – Initialize.
    The Initialize Environment form appears.
  6. In the Simulation Run Directory field, type the path to the directory where you want to place all of the simulation-related files.
    By default, the files are placed in spectre.run1 in your startup directory.
    If the path defines a new directory, the Initialize Environment form expands:
    You can change the name of the run directory or specify a different design. The Browse button brings up the Library Browser, which automatically fills in the Library Name, Cell Name, and View Name fields when you select a new design.
    spectre is the only choice for Simulator Name. Custom modifications for third-party simulators are possible.
  7. Click OK.

Specifying Input for the Simulation

The Virtuoso schematic editor Spectre interface offers you several ways to provide input to your simulation and to modify that input. Before simulation, you have the option of combining all of these files with the netlist file to create a run file.

After you set up your simulation options, you can specify all the input files for the simulation. The Stimulus menu lists each of these files.

When you select most of these commands, a text editor window opens up, displaying the file. If the editor is empty, you must create the file.

Specifying Input from a Stimulus File

To provide input from a stimulus file to your simulation,

  1. From the schematic editor window, choose Spectre – Stimulus – Edit Stimulus File.
    A text file opens in a text editor window, for example emacs. The file is saved as spectre.inp and is placed in the run directory. You do not have to add source statements if you have included sources in your designs.
    Sources are specified as instance statements in Spectre syntax. See “Spectre Netlists” in the Spectre Circuit Simulator and Accelerated Parallel Simulator User Guide for more information.
  2. If you use the text file, connect the sources to the net names on the schematic.
    Schematic names are mapped to lowercase. If you use circuit simulator syntax, you must use the lowercase form of net names you are connecting to. Connect to global nets such as ground from the stimulus file. Global nets use a ! at the end of the net name and that character must be escaped. In addition, any escaped characters entered in this file must be escaped twice ( gnd\\! ) because one escape is removed during the merging of netlist files. For more information, see Netlisting Overview.
When you add lines to the analysis and options file, the square brackets characters must be escaped: \[ and \]. For example, a sweep function line must like this:
sweep1 sweep param=slope values=\[0.5n 1.0n 1.5n\]

By default, the file should have Spectre circuit simulator syntax. If you use SPICE syntax, the line

simulator lang=spice 

must precede the SPICE syntax.

Specifying Input from a Netlist File

To provide input from a netlist file to your simulation,

The file is called netlist and is located in the run directory. This is not the final netlist: it does not include any of the data from the other stimulus files. If netlisting has occurred, it will contain connectivity information for the associated schematic. If you modify this file, you might have to escape certain characters. Also, the next time you netlist this file, all modifications to this file will be lost.

Specifying Input from a Analyses/Options File

To specify circuit simulator analyses and output options for your simulation,

When you add lines to the analysis and options file, any square bracket characters must be escaped: \[ and \]. For example, a sweep function line must like this:
sweep1 sweep param=slope values=\[0.5n 1.0n 1.5n\]

Specifying Input from a Model Include File

To provide input from a model include file to your simulation,

  1. From the schematic editor window, choose Spectre – Stimulus – Model Include Files.
    The Model Include Files form appears.
  2. Click Add File.
    The File Name (Full Path) field is displayed.
  3. Type the complete path to the model file.
  4. Repeat this process for each model file required.

The files that you specify in this form are placed in include statements in a file called spectre.include in the run directory.

Specifying Input from a Model Include Path

To provide input from a model include path to your simulation,

  1. From the schematic editor window, choose Spectre – Stimulus – Model Include Paths.
    The Model Include Paths form appears.
  2. Enter the path to the files to be used for input into the simulation.
  3. Click the OK button.

Specifying Input from a Design Variable

To provide input from design variables to your simulation,

  1. From the schematic editor window, choose Spectre – Stimulus – Design Variables.
    The Design Variables form appears.
  2. Click Add Variable.
    A text field is added at the bottom of the form.
    A file called spectre.var is created in the run directory.

“Design variables” are global parameters that are used throughout your design. You must define all of the global parameters in this form. If you try to access these parameters in included data in SPICE format (.model), you need to limit your parameters to lowercase. Refer to Parameters for more information.

Specifying Input from a Configuration File

To provide input from a configuration file to your simulation,

The configuration file identifies the files the system uses to create the final run file for the simulation. The file, called control, starts with a default list of files from the run directory. You can add another file by copying the syntax shown and placing that file into the run directory for this design. You can also delete a file.

This is the default file content:

// Default Spectre Simulation run title card.
[?netlist]
[?spectre.include]
[?spectre.inp]
[?spectre.sim]
// End of Netlist

The order listed in this file controls the order in which files are included in the final netlist.

Specifying Input from Other Files

To provide input to your simulation that is not covered by the other files provided,

This is a miscellaneous file. It can have any name, but if it is located outside of the run directory, you must provide the full path to its location.

Netlisting Your Design and Starting Simulations

To netlist your design and start simulations,

  1. From the schematic editor window, choose Spectre – Netlist/Simulate.
    The Netlist and Simulate form appears.
    The Simulation Run Directory field is not editable: It displays the run directory you are working with.
    To change to a different directory,
    1. Click Cancel.
    2. From the schematic editor window, choose Spectre – Initialize.
    3. Do one of the following:
      • Click the Browse button, which opens the Library Browser, and find the library you are working on.
      • In the Library Name, Cell Name, and View Name fields, type the names of the library, cell, and view you are working on.
  2. Verify that the Simulator Name cyclic field is set to spectre.
  3. Turn on the appropriate Run Actions buttons.
    create run file is optional. Refer to Netlisting Overview for details on netlisting and the order of run actions.
  4. (Optional) Set the simulation job to run in the background or foreground of your machine or the remote machine you have selected. Select foreground by turning the Run In Background button off.
    If you run the simulation job in background mode, you can use the Job Priority slider to control the job’s access to the processor. A job with a lower priority number gets run sooner. The system tells you when your simulation has finished by displaying a message box.
    If you run the simulation job in foreground mode, you are locked out of menus until the task is complete; the status is displayed in the CIW.

Showing Outputs

Once you have tried to create a netlist or a run file, or run a simulation, the system produces the following output files, stored in the run directory.

File or Directory Description

si.env

Internal environment file, created during the initialization process, describes design and its netlist; do not edit this file

spectre.inp

Stimulus file for the netlist, which you create prior to simulation

netlist

Netlist file of the design

spectre.sim

Analyses/Option file for the netlist, which you create prior to simulation

spectre.include

File of include statements to model data

spectre.var

File of design variables for the netlist, which you create prior to simulation

control

Netlist configuration file

si.log

Background log file, produced by the simulation process

si.foregnd.log

Foreground log file, produced by the simulation process

si.out

Spectre output log file, produced by the simulation process

si.inp

Final simulation run file, created with all the input files you specified before simulation

si.raw

Spectre simulation results directory, produced by the simulation process

S.F.

Link to si.raw directory

Each simulation run produces a log. You select background and foreground logs with separate commands. These logs list all the details of the operation of this product. Normally you do not need to read these files, but they are helpful for debugging problems.

Displaying Results

The Virtuoso schematic editor Spectre interface includes a waveform display tool suite that includes a waveform window, a calculator, and a results browser. This is the same tool suite available to users in the analog design environment.

The Waveform Tool menu varies according to the executable used to start the software.

For more information refer to the refer to the Virtuoso Visualization and Analysis Tool User Guide.

Name Mapping

To map instance terminals (currents) at device level (nmos, pmos, npn, pnp, etc.), the Virtuoso schematic editor Spectre interface needs to map information from the pins of those primitives in the samples library to the nodes of their models in the Spectre circuit simulator, which are not created by the netlister. If you customize components from the samples library, you need to override the _dcdfTermMapList variable to provide the pin-name–to–model-node name-mapping information for these customized devices. The _dcdfTermMapList variable has the following format:

_dcdfTermMapList=list(list("device_cell_name_1"
 list('("pin_name_1"
"model_node_name_in_Spectre_1")
'("pin_name_2"
"model_node_name_in_Spectre_2")
…))
list("device_cell_name_2" 
list('("pin_name_"
"model_node_name_in_Spectre_1")
'("pin_name_2"
"model_node_name_in_Spectre_2")
…))
)

To view the current value of the _dcdfTermMapList variable,

Use the Results Browser to view the currents saved at subcircuit level.

You can avoid using the Results Browser if you use a current probe (iprobe) to measure the currents between instance terminals at subcircuit level. You can select an instance terminal of iprobe, and the current flowing through the current probe is plotted. If you do not use an iprobe, but select an instance terminal at subcircuit level instead, the voltage signal of the net connected to that instance terminal will be plotted in error.

Checking the Status of Your Simulations

You can use the job monitor to track simulations, even if they are being run remotely. The job monitor identifies the location of the run directory; the day and time the simulation was started; on which computer the simulation is running; whether the simulation is running, has succeeded, or has failed, and what the simulation job priority is.

To track your simulation,

The commands on the job monitor’s Command menu affect only jobs whose check box is on.

Show Run Log displays the run log (just like the Spectre – Output – Show Background Log command) for the most recent simulation job for the same design. If you apply Show Run Log to an earlier simulation job, a dialog box telling you that the log has been overwritten (by the more recent simulation) appears.

Set Priority opens the Set Priority dialog box, which allows you to change the priority of a job, even while it is running.

Kill stops any job whose check box is on.

Suspend suspends any job whose check box is on.

Continue resumes any suspended job whose check box is on.

Remove Entry deletes any line whose check box is on from the job monitor window.

Running a Simulation Remotely

To run simulations on a remote workstation, you must configure the remote host. For remote workstations made by different manufacturers, with different operating systems, additional steps are needed.

The Virtuoso schematic editor Spectre interface can find and use all of the standard files in the local directory and run directory for each design, but special additions, such as include files, require that you provide a path to the location of the file. If you cannot specify a path from the target machine back to the source machine, you must copy the file to the target machine and specify a path local to that machine.

To run a simulation remotely,

  1. Establish an account on the remote workstation.
  2. From the schematic editing window, choose Spectre – Options.
    The Simulation Environment Options form appears.
  3. Turn on Run Simulation Remotely.
  4. In the Simulation Host Name field, type the name of the remote workstation.
  5. Turn on Simulation Host is Different Type if the remote workstation is not the same brand or operating system as the local computer.
    You do not have to do this to simulate on another machine with a different version of the same operating system.
  6. If the remote workstation is a different type, create a .rhosts file in the remote workstation’s home directory and add this line to it:
    source_hostname user_name
  7. Test the remote connect by choosing any file on the local workstation and typing
    rcp some_file remote_workstation:/tmp
    If rcp does not work, edit or disable your .login file and/or your shell file (such as .cshrc) on the remote workstation. Once rcp works, remote simulation should work.
    • If you get an error message similar to
      account disabled
      make sure you have an account on the remote workstation. If you have an active account, your password might have expired.
    • If you get an error message similar to
      login incorrect
      make sure that you have the .rhosts file in your account on the remote workstation and that it has the correct entry as described above.

Return to top
 ⠀
X