Product Documentation
HSPICE/SPICE Interface Reference
Product Version IC23.1, June 2023

3


HSPICE Circuit Simulation Interface

This chapter contains the following topics:

Overview

Using the HSPICE interface is similar to using the SPICE interface. Before reading this chapter, which contains information specific to running an HSPICE simulation, read the chapter on the SPICE interface.

Running HSPICE

This section describes the following:

Most of this information is covered in greater detail in the Virtuoso Schematic Editor L and Simulation Environment Help. Here you will find only what is specific to HSPICE.

Creating the Schematic

Create schematics for HSPICE simulation in the same way as any other schematic in the Virtuoso Studio Design Environment. The main difference is that each cell in the schematic (for example, transistors, resistors, capacitors) must have a symbol and an hspice view to be recognized by the HSPICE interface. For a list of the netlisting properties required for the hspice view, see “Primitive Cell Requirements”.

Generating the Run Directory

The first time you run a simulation, select the Initialize command from the Simulation menu to generate a run directory. This run directory is where the control, netlist, and simulation input and output files are kept for the simulation being run. When you want to keep an older simulation instead of overwriting it, you can generate and use multiple simulation run directories. Refer to Simulation Environment Help.

Editing the Control File

When the system initially creates the run directory, it also creates a dummy control file.

Edit this file to include any information that is not in the schematic. Add the psf option on the .options line in the control file. Set psf=1 or psf=2, which tells HSPICE to generate a waveform file in the binary or ASCII PSF format respectively, as required by the simulation environment. You can also specify just the .option keyword in the control file. To disable the PSF and other options in an hspiceD netlist specify just the .option keyword in the control file.

From the IC 6.1.2 release, Cadence does not support the WSF waveform format. Because of this, do not add the sda=2 option in the control file to enable HSPICE to create waveforms in the WSF format.

Edit the hspice.inp file to add stimulus data and edit the hspice.sim file to add simulator commands.

Starting the Analysis Run

With the schematic entered and the control file generated, you are ready to start the simulation. Select the Netlist/Simulate command from the Simulation menu. This command netlists the schematic and starts the simulation; simulation can be run in the background or foreground. Each step in the analysis process is described below.

Generating the Netlist

The simulation environment creates an HSPICE netlist for the desired schematic. This netlist contains the connectivity description in the proper format for HSPICE. See “Formatting Functions” for information about formats. You can generate a flat or a hierarchical netlist. Both have the same information, but their formats are different. You control the type of netlist generated by setting the simNetlistHier simulation environment variable. If this variable is set to t, a hierarchical netlist is created; otherwise, a flat netlist is created by default. Typically, you set this variable in your .simrc file.

Note the following:

Creating the Input File

Once the netlist is generated, the HSPICE interface automatically translates the instance and net names in the control, hspice.inp, hspice.sim, and netlist files to legal names for HSPICE. When the translation completes, these files are assembled to create the HSPICE si.inp input file.

Running the Simulation

When the simulator input file (si.inp) is created, simulation starts. If the simHost variable is set to a different machine, the simulation runs remotely.

For more information about remote simulation, refer to Simulation Environment Help.

Translating the Output

When the simulation is finished, the simulation interface translates net and instance names that were previously translated back to the original user-assigned names. The resulting translated text output is stored in the si.out file.

Viewing the Results

The simulation environment notifies you when analysis is complete so you can view the outputs. Information about the simulation run is recorded in the si.log file when a background simulation is run.

Hierarchical Netlisting

The hierarchical netlister produces a netlist that is easier to read and understand than one that has been flattened. For more information about flat netlisting, refer to Simulation Environment Help. The following are primary features of a hierarchical netlist:

Primitive Cell Requirements

A cell must have both a symbol and an hspice view to be recognized by the HSPICE interface. The hspice view for a cell must contain the same pins that exist in the symbol view for the cell. For netlisting, define the following properties in the hspice view:

Example

The following are the property values for the above netlisting properties in the hspice view of the nmos cell in the sample library:

NLPElementPostamble = nlpExpr("[@NLPElementComment:%\n]
[@NLPnmosElementCard]")
NLPModelPreamble = nlpExpr("[@NLPmosfetModelCard]")
hnlHspiceFormatInst = "hnlHspicePrintNMOSfetElement()"
hnlHspiceParamList = "hnlHspiceMOSfetParamList"
hnlHspiceFormatModel = "hnlHspicePrintMOSfetModel()"

The flat netlister uses expressions defined in the nlpglobals cell to format elements and models. The first two properties, therefore, tell the netlister to format the element and model cards with the NLPnmosElementCard and NLPmosfetModelCard expressions, defined in the hspice view of the nlpglobals cell.

For hierarchical netlisting, the element and model cards are formatted using the procedures defined in the hspice formater. For the nmos transistor, these procedures are called hnlHspicePrintNMOSfetElement and hnlHspicePrintMOSfetModel.


Return to top
 ⠀
X