Product Documentation
Design Data Translators Reference
Product Version IC23.1, November 2023

4


Netlist Import Using Spice In

This chapter covers the following:

Introduction to Spice In

Spice In imports CDL, HSpice, Spectre, and SPICE netlists into the OpenAccess database by generating either Virtuoso Schematic or Virtuoso Netlist views. It also creates Virtuoso Symbol views wherever required.

The figure below shows the types of netlists that can be imported using Spice In and the types of output views generated.

The term Spice In this chapter is used to refer to the SPICE2 and SPICE3 dialects of the SPICE language. The Simulation Program with Integrated Circuit Emphasis (SPICE) language was developed at the University of California, Berkeley, and is used by many EDA vendors to simulate all types of circuits.

The Spice In examples are present at the following location: <install_dir>/tools/dfII/samples/Spice In. For more information on examples of Spice In, refer the readme.txt file present at the above mentioned location.

Features of Spice In

General Features

Spice/Spectre

Flows Using Spice In

Spice In aids you in a number of design and simulation flows, such as:

The following figure shows the flows that use Spice In.

Licensing in Spice In

Spice In searches for the following licenses in the specified order and checks out one of them:

If the ASG option is enabled, then licenses of Virtuoso® Schematic Editor L and Virtuoso® Layout Suite L are not referred.
By default, the ASG option is disabled in the GUI mode. You can enable the ASG option by using the .cdsenv setting: * envSetVal("spiceIn" "asgMode" 'boolean t) However, in the Spice In command line the ASG option is enabled by default. The -noasg argument can be used to run Spice In without ASG.

Spice In searches for the following licenses in the specified order and checks out one of them:

For more information about the Virtuoso Layout Suite GXL, see the Virtuoso Layout Suite GXL Reference.

For more information about the Virtuoso Layout Suite EXL, see the Virtuoso Layout Suite EXL User Guide.

For more information about the Virtuoso Layout Suite EAD, see the Virtuoso Electrically Aware Design Flow Guide.

Affects of Control Commands during Import

There are various control commands, such as *.scale, which have an affect during import of cdl netlist.

*.scale Command

Based on the above conditions the parameter values are expanded as:

C1 a b 20n M=2 $[CX]                           * 2e-08 , 2
D1 c d DI AREA=10n PJ=5p M=9                   * 1e-08, 5e-12, 9
Q1 c a d nz M=11 $EA=17f $L=9n $w=8p           * 11, 1.7e-14, 9e-09, 8e-12 
R1 d a 10M M=4 $.MODEL=rx $w=19p $L=11n         * 1e+07, 4, 1.9e-11, 1.1e-08         
M1 d c a b px W=15n L=17f M=2                   * 1.5e-08, 1.7e-14, 2 
J1 a b c nx W=5p L=10f                          * 5e-12, 1e-14
.END

Using Spice In

Spice In can be run using either the GUI or the command line interface. The following figure depicts the inputs and outputs of Spice In.

Running Spice In from GUI

Use the Spice In GUI to specify the inputs and the desired outputs for the design import. The following sections explain how to launch and use the GUI.

Launching the Spice In GUI

Spice In can be launched from Virtuoso® Design Environment workbenches: virtuoso and layout.

To launch the Spice In GUI, perform the following steps:

  1. Open the CIW of the aforementioned Virtuoso workbenches.
  2. Select File — Import — Spice. The Spice In form is displayed.

Working with the Spice In GUI

You can use the Spice In GUI to load an existing parameter file as well as modify a parameter file. A parameter file, written in SKILL® language, is a list of parameters specified as name-value pairs. The parameter file is used to save values for the various fields in the form, thereby allowing the values used in one session to be reused in another session. For more information about the parameter file, see Creating a Spice In Parameter File and Mapping Parameter File Options with the Spice In GUI Options.

Loading a Parameter File

You can load an existing parameter file, by using the Load button at the bottom of the Spice In form as shown in the figure.

To load a parameter file, perform the following steps:

  1. Click Load.
    The Load SpiceIn Parameter File window is displayed.
  2. Browse to the location where the parameter file is located.
  3. Select the parameter file and click Open. By default, the parameter file is displayed as spiceIn.params.
    The values of the fields on all the tabs of the Virtuoso Spice In form are updated with the values from the parameter file. However, if any errors or warnings are displayed in CIW, correct them before proceeding further.
    In addition to the option name-value pairs, the Spice In parameter file contains the name of the Schematic Generation options parameter file. Therefore, when you click the Load button on the Input tab, the values of the fields in the Schematic Generation tab are updated from the Schematic Generation parameter file.

Saving an Option to a Parameter File

You can also save the values in various fields in GUI form to a parameter file. To save the values, perform the following steps:

  1. Specify values for one or more GUI fields, and set the options as desired.
  2. Click Save. The Save SpiceIn Parameters window is displayed.
  3. Specify the name of a file in which you want to save the GUI settings. Spice In creates the file if it does not exist in your current working directory.
  4. Click Save.
    The values of the GUI fields for which the default values have been updated are saved to the specified parameter file. The Schematic Generation parameters are saved in a separate file schOpts_<filename>.

The other options in the Spice In GUI form are grouped into the following tabs:

Input Tab

The following sections explain the tasks you can achieve using the options on the Input tab.

Specifying the Netlist File

In the Netlist File field, specify the netlist you want to import. This is a mandatory field.

If the netlist file is not located in the current working directory, you can either manually specify the absolute or relative path of the file or search for the file by using the Ellipses (...) button.

    1. Click the Ellipses (...) button. The Netlist File window appears.
    2. Browse to the location where the netlist file is located.
    3. Select the netlist file and click either Open or Apply.
      This would close the Netlist File window and the name of the netlist file along with its absolute path appears in the Netlist File field.

Specifying the Language of the Netlist File

Select the appropriate Netlist Language option to specify the language of the netlist. You can select from the options CDL, HSpice, Spectre, and SPICE.

Default Value: Spectre

Specifying the Top Cell

Top Cell specifies the name of the top cell of the design hierarchy to be imported. The top cell concept for a CDL netlist is different from that for HSpice, Spectre, and SPICE netlists.

If top cell is given a name which is a sub-circuit in the netlist, an error message will be displayed and import will abort.

Importing the Sub Circuits List

Import sub circuits list is a list of sub-circuits that needs to be completely imported along with their hierarchy. The sub-circuit list is separated by a white space. For example: amplifier control vsource.

Specifying the Reference Libraries

In the Reference Library List field, specify all the reference libraries. The names of reference libraries should be separated by blank spaces. Ensure that the specified reference library names are defined in the cds.lib file. This is a mandatory field.

During the netlist import, Spice In searches the specified libraries sequentially for the master cellview definitions for primitive devices. Incase of CDL, the sub-circuits with box definition (box elements), the master will be searched in the given reference libraries.

The criteria for match is:

If no matching criteria is met and the search fails, Spice In will abort.

Triggering CDF parameters callback

When the Trigger CDF parameters callback check box on the Input tab is selected, CDF parameters callback is triggered to update the derived or dependent parameters immediately after the Spice In import is complete. If the cellviews are already imported, the callbacks are triggered for the list of cellviews that is to be overwritten in the current Spice In run. Callbacks are triggered for both the netlist and schematic views.

The Trigger CDF parameters callback checkbox is selected by default.

Callbacks are not triggered in batch mode. Additionally, CDF Callbacks are not triggered for data types cyclic, radio, and button due to CDBA limitation.

Specifying the Input for Device Information

In the frame Look for Device Information in on the Input tab, select an option to specify the location where Spice In should search for the device information, termOrder in this case. The termOrder exists in CDF Simulation Information and is different for different simulators. In contrast to the analog PDKs, such as the analogLib from Cadence, where every master cell has CDF, digital PDKs do not have any CDF associated with the master cells. In the case of digital PDKs, therefore, Spice In reads the terminal order through the termOrder construct of the device-map file. For more information about the termOrder, see Handling Terminal Order for Sub-Circuits.

So, in the Look for Device Information in frame, you can also select the Device Mapping File option. Spice In, accordingly, reads termOrder from a device-map file. The termOrder specified in the device mapping file will have precedence over siminfo.

Specifying the Master Cell for Ground Node

The net 0 represents the ground node. Spice In creates connections between all occurrences of net 0 and a ground node instance. For creating the connection, Spice In first creates an instance of the ground node master cell at the sub-circuit level. Next, it connects a net 0 with the ground node instance, and proceeds to connect all occurrences of net 0 in a sub-circuit to the ground node instance.

Consider the following instance definition:

In the above definition, the nets net5 and 0 are connected to the two terminals of the resistor R0. Net 0 is the ground node. At the sub-circuit level, Spice In creates an instance of the ground node master cell. It then connects the net 0 to the ground node instance.

To create an instance of the ground node, Spice In requires the name of the master cell of the ground node. You can update this value in the Master Cell for Ground Node field. Spice In searches for this master cell in the reference libraries.

Default value: gnd

Specifying Merge BusBits

Bus Delimiter

Specifies the delimiter for the netlist before import, choose either angular <> or square [] delimiters. If you specify an incorrect delimiter, it leads to schematics with scalar bits. The Spice In Parameter for this option is busDelimiter. Valid values are squarebracket and angularbracket. The default is <>.

Bus Format

Specifies the bus format while merging the bus bits given in the cell definition.

Output Tab

The following sections explain the tasks you can achieve using the options on the Output tab.

Specifying the Log File

In the Log File field, specify the name of the log file that Spice In would use for storing progress, error, warning, and information messages. Alternatively. click the ellipses (...) button to search for the log file. All the parameter values that you specify at the time of importing a netlist are also recorded in the log file. The log file also contains messages regarding the device-map feature.

Default value: spiceIn.log

Specifying the Output Library

In the Output Library field, specify the name of the library to which the netlist file should be imported. Alternatively, click the ellipses (...) button to search for an already existing library to which you want to import the netlist file. If the library does not exist, Spice In will create a new library in the current working directory. Spice In creates the output OpenAccess 2.2 cellviews in the specified output library. This is a mandatory field.

Specifying the Processing of Technology File

The Process Technology File option allows you to decide whether you want to create a technology file during the Spice In translation. If you deselect this option, no tech.db is created during translation.

Default Value: Selected

Specifying the Output View Information

Specifying the Output for Device Information

Spice In saves information for parameters and termOrder of each sub-circuit in the CDF Simulation Information at the base-cell level. Since different Simulation Information sections exist for different simulators, Spice In requires the name of the simulator for which you want to save the termOrder.

In the Save Device Simulation Information in CDF for frame on the Output tab, select a simulator — ams, auCdl, hspiceD, and spectre — for which Spice In should save the device information (termOrder) for the sub-circuits defined in the input netlist. For more information about the termOrder, see Handling Terminal Order for Sub-Circuits.

Default value: spectre

Creating Default Model Names for Primitives

The Create Default Model Name for Primitives enables you to specify whether Spice In should automatically add default model names for primitive devices, such as capacitor, resistor, and inductor that have no model name.

Default Value: Selected

Schematic Generation Tab

For descriptions of the options in the Schematic Generation tab, refer to the Schematic Generation Options section in the Connectivity-to-Schematic User Guide.

The Generate Top Cell Symbol option is available only on the Schematic Generation tab of the Virtuoso Spice In form. Select this option to generate the symbol of the top cell during schematic generation.
The Analog Schematic Generation option is deselected by default. Also, the Analog Schematic Generation tab page will be deselected.

Device Map Tab

The various columns in the Device Mapping Details table are described below.

Field

Description

DevToMap

The primitive devices that need to be mapped to a user-defined master cell name. This field cannot be empty.

MappedTo

The name of the user-defined master cell name to which the corresponding primitive device is mapped. This field cannot be empty.

PropMatch

Specifies the device properties to match while mapping primitive devices to library cells.

TermOrder

Specifies the terminal order to use.

Inherited Terminals

Specifies the inherited terminals. For example, VDD  [@VDD:%:VDD!]

PropMap

Specifies the properties to map.

AddProp

Specifies the properties to be added.

Device mapping is supported only for primitive cell in Spice In.

The following section describes the task you can perform using the Device Map tab.

Working with Device Map Files

You can create, open, and save device map files by using the File button on the right-top corner as shown in the graphic.

The following table describes the various options available on clicking the File button.

Option

Description

New

Initializes the Device Mapping Details table and enables you to create a file.

Open

Opens an existing file.

Save

Saves current file.

Save As

Saves current file with a new name.

Editing the Device Mapping Details

You can use the Add/Edit section to create, modify, and delete rows in the Device Mapping Details table. After editing the device mapping details, click the File -> Save button before running Spice In.

To create a row, select one of the entries in the Device Mapping Details section and then click the Add Above or the Add Below button. The Add/Edit section is enabled.

Specify the device to map, device mapped to, device property to match, and the device term order in the Device to Map, Device Mapped to, PropMatch (Device Property to Match), and Term Order fields, respectively and then, click the Commit button.

The new row is displayed in the Device Mapping Details table.

To modify an existing row, select the row in the Device Mapping Details table, modify any of the properties in the Add/Edit section, and then click the Commit button to accept or the Discard button to cancel the changes.

To delete a row, select the row in the Device Mapping Details table and then click the Delete button.

You can use the << and the >> buttons to traverse through the rows in the Device Mapping Details table. When you click either of the buttons, the values in the Device to Map, Device Mapped to, Device Property to Match, and Device Term Order fields get populated for the selected row.

If you have specified a device mapping file on Device Map tab page but not enabled device mapping option on the Input tab page an error message will be displayed asking whether or not you want to enable the device mapping feature.
To link the device map file with Spice In, you must save the file onto the disk and select the Device Mapping File option in the Input tabbed page.

Overwrite Cells Tab

The Overwrite Cells tab enables you to selectively retain cellviews in a netlist that you have already imported in the design. You can also selectively overwrite cellviews that you have imported. The Overwrite list box is populated with the cellviews in the output library specified in the Output tab. You can use the Refresh button to explicitly refresh the list with the cellviews in the current output library.

You must refresh after each import run.

When Overwrite Cellviews is selected, symbol gets recreated if the existing symbol view is no longer in use. Symbol gets overwritten for CDL netlist import in the following conditions:

Additionally, when Overwrite Cellviews is enabled and there is a mismatch in the pin direction of the subcircuit definition and existing symbol, then the pin direction of the symbol view is updated.

You can perform the following tasks using the Overwrite Cells tab.

Analog Schematic Generation Tab

For description of the options in the Analog Schematic Generation tab, refer to the Analog Schematic Generation options section in the Connectivity-to-Schematic User Guide.

Once you select the Analog Schematic Generation option in the Schematic Generation tab the Analog Schematic Generation tab page will be deselected.

After you add values in the required fields, you need to click the OK button to start the import process. Once you click the OK button, the progress bar is displayed.

To cancel the import process, you can either click the Cancel Import button or the close button.

After you cancel the import process, the Spice In aborted dialog box is displayed.

Customizing the Spice In Environment

To customize the default values of the fields in the Spice In form, do the following:

  1. Copy the CDS environment file (.cdsenv) from the following location to your current working directory:
    install_dir/tools/dfII/etc/tools/spiceIn/
    For more information about the .cdsenv file, see Chapter 9, “Specifying Environment Settings”, in the Virtuoso Studio Design Environment User Guide.
    A sample Spice In .cdsenv file is shown below.
  2. Update the file based on your requirements and save it.
    The following table shows the default Spice In .cdsenv variables and the corresponding GUI options.
    Spice In .cdsenv Variables GUI Option

    topCell

    Top Cell

    logFile

    Log File

    language

    Netlist Language

    simName

    This variable corresponds to one of the following options of

    • spice
    • auCdl
    • hspiceD
    • spectre

    The default value of this variable is spectre.

    The value for the variable simName cannot be NULL.

    outputSimName

    Save Device Simulation Information in CDF for

    outputViewName

    Output View Name

    outputViewType

    Output View Type

    masterCellForGnd

    Master Cell for Ground Node

  3. Restart Spice In to load the changed settings.

Running Spice In

  1. Start the Spice In GUI. (see Launching the Spice In GUI)
  2. Specify the required input information in the Input and Device Map tabs to import your netlist. You can customize the output schematic using the options on the Schematic Generation tab. (see Working with the Spice In GUI)
  3. Click OK or Apply. Spice In begins the import.
    Based on whether the execution is successful or not, the Spice In succeeded! or the Spice In failed! dialog box comes up.
  4. Click Yes to view the log file.
    The <logfile> window appears.
    You can go through this file to view the progress of Spice In as well as the intermediate and final outputs generated by Spice In.

Running Spice In from Command Line

You can run Spice In from the command line by using the command spiceIn and specifying a parameter file name. The parameter file must contain the mandatory import parameter options (netlistFile, outputLib, and refLibList) and their values. Specify the parameter file using the param option. For more information about the parameter file, see Creating a Spice In Parameter File and Mapping Parameter File Options with the Spice In GUI Options.

Use the following syntax for running the spiceIn command:

Syntax
spiceIn -param <paramFileName>

The other options that can be used with the spiceIn command are listed below.

-help

Displays the descriptions of the command-line options.

-V or -version

Provides Cadence release version.

-W

Provides Cadence release subversion.

-param paramFile or -p paramFile

  

Takes SKILL parameter file as input.

-netlistFile netlistFile

  

File to be imported.

-outputLib outputLibraryName

  

Output library for imported data.

-language language

Netlist language.

-reflibList reflibList

  

List of reference libraries (in double quotes if multiple libraries).

-devmapFile devMapFile

  

Device mapping to be used.

-noAsg

Do not use Analog Schematic Generation.

The parameter values specified in command line override the values in the parameter file.
The spiceIn command options V, W, and version are case-sensitive. The remaining commands are NOT case sensitive.

Inherited Connections Supported

Inherited connections enables you to selectively override global signals within your design originated in the Virtuoso® Schematic Editor. To have this override information available to other Cadence® tools across the design flow, the information is communicated to the software by means of net expressions and a class of properties called netSet properties.

Initially, while importing a spice family netlist in OA database using Spice In, user typically needs symbol views of primitive devices to have exact number of terminals as used on the instance line, failing which the graphical view is not created successfully.

However, now Spice In will be able to use the primitive devices symbol views with lesser number for IO terminals to create graphical views from a textual netlist without breaking the connectivity information.

There should be inherited terminals (nets with net expressions) only on primitive device views. If there are inherited net expressions at any hierarchical cellview level, the solution will not work.
User will be able to write the required information in the device mapping file, which will be used by Spice In to identify the net expression used in the primitive device.

Functional Description

The Cadence Netlister generated netlist tries to resolve inherited connection by providing extra terminals at sub-circuit interface level. This extra terminal set is a union of net expressions in the cellview and net expressions defined on the instance masters of the instances used in the cellview. The generated netlist does not have any marking between the two classes of extra terminals.

Importing Sub-Circuit Terminals

Spice In iterates over all the extra terminals at the sub-circuit interface. Therefore, all extra terminals (ihn*) will be imported as schematic terminals too.

Importing Instance Connections

The instance connection in the netlist may have extra connection representing net expression used in the switch view during netlisting. The textual netlist will not have any information about the switch view used during netlisting. Therefore, Spice In will search for inherited terminal in the following order:

To process these extra terminals Spice In will look up the master in the device mapping file supplied by the user to identity the name of net expression used in the switch view. If such information is found in device mapping file, the instance will be created in the schematic with connections depending on how the sub-circuit terminals are created in the schematic.

Creating Extra Sub-circuit Terminals

If the sub-circuit is imported with extra terminal, Spice In has the flexibility of not creating netSet on hierarchical instances because there are explicit terminals to pass down the value from top to bottom. However, in this case Spice In will create netSet on all primitive devices found in the netlist.

Scenario

There can be situations where the primitive device using capacitor with a symbol having two terminals and the switch view having three terminals with one terminal, BULK that has a netExpression, [bulk:%:gnd!]

The generated netlist is:

.subckt bottom A B inh_bulk ## this is the extra terminal

C0 A B vdd! cap

C1 A B inh_bulk cap

C2 A B A cap

.ends

The generated netlist is:

.subckt middle A B inh_bulk

Xbot0 A B vdd!

Xbot1 A B inh_bulk

Xbot2 A B B

.ends

The generated netlist is:

Xmid0 A B gnd! middle

Default value (gnd!) automatically created in netlist

Xmid1 A B vdd! middle

Xmid2 A B A middle

Now, if you import the complete netlist in a new Spice In then there can be two schematics with extra terminals.

The netlist generated after netlisting the above scenario is:

.subckt bottom A B inh_bulk

C0 A B vdd! cap

C1 A B inh_bulk cap

C1 A B A

.ends

.subckt middle A B inh_bulk

Xbot0 A B vdd! bottom

Xbot1 A B inh_bulk bottom

Xbot2 A B B bottom

.ends

//loose instances

Xmid0 A B gnd! middle

Xmid1 A B vdd! middle

Xmid2 A B A middle

Creating a Spice In Parameter File

The Spice In parameter file, written in SKILL language, is a Disembodied Property List (DPL) of parameters specified as name-value pairs. These values are required to import the netlist file. The various parameters map to different fields in the GUI. The parameter file is used both to populate the fields in the GUI and also to save values from the GUI. You can create a Spice In parameter file in the following ways:

You can use any of the above methods to create a Schematic Generation parameter file.

It is mandatory to specify the following parameters and their values in the parameter file:

Spice In does not support the following legacy (5141 based CDL In) parameter file options:

To convert these CDLIn parameter file options to a Spice In readable parameter file, run the cdl2spcTmpl.pl script. The cdl2spcTmpl.pl script converts the above CDLIn parameter file options to the following Spice In parameter options. For more information, type cdl2spcTmpl.pl -h on the command line. The new mapping is as follows:

Sample Spice In Parameter File

The option names in the parameter file are case-insensitive when running through command line. However, when loading the option names in parameter file using the GUI, the option names are case sensitive.

Mapping Parameter File Options with the Spice In GUI Options

The following table provides a list of all the Spice In parameter file options and their corresponding Spice In GUI options.

Parameter File Spice In GUI Option
Parameter Name Valid Values Default Value

language

cdl, hspice, spectre, spice

spectre

Netlist Language

netlistFile

Netlist File

topCell

’top’

Top Cell

outputLib

Output Library

refLibList

Reference Library List

logFile

spiceIn.log

Log File

outputViewType

netlist, schematic

schematic

Output View Type

importSubList

"" (all subckts in netlist)

Import Sub-circuits List

outputViewName

netlist, schematic

- netlist
(outputViewType = "netlist")
- schematic
(outputViewType = "schematic")

Output View Name

devMapFile

Device-Map File

simName

ams, aucdl, hspiced, spectre

spectre

Simulation Information Section in CDF

Note: This GUI option is grayed out for this release. This is a known issue and will be taken up in the next release.

outputSimName

ams, auCdl, hspiced, spectre

spectre

Save Device Simulation Information in CDF for

masterCellForGnd

gnd

Master Cell for Ground Node

overwriteCells

all, none, selected

none

Overwrite Cells Tab

overwriteCellsList

Overwrite Cells Tab

conn2schArgs

Schematic Generation Tab

+PLACE_ONLY

Full Place and Route

NOSQUARE

Generate Square Schematics

MIN_CROSSOVERS

Minimize Crossovers

FAST_LABELS

Optimize Wire Label Locations

+NOXTRSCH

Extract Schematics

VERBOSE

Verbose

ASG

Enhanced Schematic Generation

conn2schParamFile

No equivalent option in the GUI

Used to specify a schematic generation parameter file that contains the schematic generation parameters and their values

paramCaseValue

lower

If paramCase value is set to lower, then it will change the parameter to lower case. However, if this option is not specified in the parameter file, then it will take to default param case.

Creating a Device-Map File

A device-map file is a list of mapping between model names and master cells. The model name is present in the definition of an instance in the input netlist.

The tool uses the following model names for different devices:

Spice In needs the master cell name of an instance to create the instance in the schematic. You can specify the device-map file name in the Device Map form or in the parameter file by using the ‘devMapFile option.spice 24 Spice-24 Spice 24 spice-24

The Spice In device-map file includes six constructs — devSelect, termOrder, propMatch, inhTerms, propMap, and addProp. These are further explained in the sections below.

The devSelect Construct

This construct is used for specifying the device maps in a device-map file. It allows you to replace the name of the master cell of an instance with the user-defined master cell name.

Syntax
 devSelect := <primitiveDeviceName> <userDefinedMasterCellName>

where,

primitiveDeviceName

Master cell of an instance as specified in the input netlist file.

userDefinedMasterCellName

Master cell name that you want Spice In to use for that instance. This master cell is likely present in any of the reference libraries (user’s PDKs).

There should be a whitespace character on either side of the construct separator (:=). Spice In is case-insensitive to construct names. Therefore, devSelect may be written as DevSeLect or with any other case variation.

Example 1

In the following example, trnmos is mapped to nmos4 and trpnp to pmos4.

Example 2

If no device-mapping is used, Spice In assumes the master cell name to be the same as the model name used in the instance definition. It then uses this master cell name to search for its symbol view in the specified reference libraries.

Consider the following instance definition:

In this instance definition, resistor is the model name for the instance R0. If no device-mapping is used, it can be deduced that the master cell for R0 is also resistor. In that case, Spice In searches for the symbol view of the master cell resistor in the reference libraries.

The termorder Construct

The device-map file allows another construct definition, that of the termOrder. In the case of digital PDKs, CDF is not present at the cell level. In that case, you can specify the names and order of the terminals at the master-cell level through the termOrder construct of device map.

Syntax
 termOrder := <list of terminals separated by a whitespace character>

The propMatch Construct

Each specified property name must be followed by the property value. The property names must exist in the specified primitive devices. Also, the values of each specified property must match else mapping will not be done for the device. Spice In supports all valid properties of an instance while matching.

The propMatch construct is used in both Spice and CDL context to match on basis of properties to different library cells.

Example:

Consider two voltage devices in a SPICE netlist with different types:

V0 M N PULSE DC=1.0

V1 A B SIN DC=1.0

To map each type to a different cell, you need to create device mapping as follows:

devSelect := vsource vpulse

propMatch := type pulse

and

devSelect := vsource vsin

propMatch := type sine

Example:

Consider the following CDL netlist:

.SUBCKT spiceprob A B C D

M1 A B C D NM1 w=3m

M2 A B C D NM2

M3 A B C D NM3 w=1 l=2

.ENDS

To map each type to a different cell, you need to create device mapping as follows:

devSelect := nfet nmos4

propMatch := subtype NM2

The CDL property, subtype is an internal property that was considered during spice import.

devSelect := nfet nmos4

propMatch := l 2

devSelect := nfet nmos

propMatch := w 0.003

The inhTerms Construct

This construct is used for specifying the inherited terminals in the device-map file.

Syntax
 inhTerms := <terminal name> [<NetExp>]

Example:

inhTerms := B [@bulk_n:%:gnd!]

The propMap Construct

This construct is used if properties of the mapped device are different from the primitive device.

Syntax
 propMap := <list of properties to map>

Example:

If the primitive device, pfet has properties w and l and the corresponding property in the mapped device, pmos is width and length, then the propMap syntax is as follows:

propMap := w width l length

If both user-defined propmapping (device map propmapping) and cdfPropmapping is given then priority is given to user-defined propmapping.

For example, if in cdfPropmapping w may be mapped to width and in device map file, w is mapped to wid, then while creating a netlist, wid property will be created.

If you do not want to create a property or overwrite an existing property, then you can map this property to another property by using the propMap construct in device mapping file.

The addProp Construct

This construct is used to specify additional properties and their values if the mapped device has user-defined string properties. Both property name and property value must be specified. While adding properties, propmapping is not considered.

The property value is of string type.

Syntax
 addProp := <list of additional properties to map>

Example:

If the primitive device, pfet has anadditional property Name and the corresponding property value is Pm01, then the addProp syntax will be as follows:

addProp := Name Pm01

Handling Parameters

This section explains how Spice In handles global and sub-circuit level parameters.

Global Parameters

Global parameters are defined at the beginning of a netlist and outside the sub-circuit definitions. It is optional to provide a value to a global parameter. The keywords .PARAM and parameters are used to define a global parameter in HSpice and Spectre netlists, respectively.

Spice In imports global parameters as design variables at the top-cell level. It creates the property designVarList at the top-cell level. The value of designVarList is a list of property name-value pairs. When you open ADE from VSE, the design variables can be viewed in ADE. You can change the values of the design variables and do pre-processing before the simulation. This feature of Spice In provides a stronger integration channel between VSE and ADE.

The example of amplifier mentioned previously, consider the following snippet of the Spectre netlist:

This netlist contains the global parameters CAP and RES with the default value of .8p and 100ohms, respectively. When Spice In imports this netlist, CAP and RES are created as design variables on ampTest, which is the top cell. The following figure of ADE-L opened from VSE shows that the design variable along with its value has been imported.

Global parameters are defined usually at the top of netlist using .PARAM control statement. The global parameters are added to each sub-circuit that uses the global parameters in its instance line. These global parameters are stored as CDF properties at base level and the default values are assigned as given in the netlist. The data type of these properties is also determined from the netlist.

For example, consider the following snippet of a CDL netlist

After importing, the CDF for sub-circuit TEST will be p1(default value 10p), p2(default value10u) and g2(default value 20u).

g2 is appearing in the CDF of TEST because its a global parameter and is used at instance M0.

Sub-Circuit Level Parameters

Sub-circuit level parameters are defined at the sub-circuit level. It is optional to provide a value to a sub-circuit level parameter. Just like global parameters, the keywords .PARAM and parameters are used to define a local parameter in HSpice and Spectre netlists, respectively. In case of CDL these parameters are specified after then IO pin declaration at SUBCKT statement.

Spice In imports sub-circuit level parameters as CDF Component Parameters at the base-cell level for that sub-circuit. The default value assigned to a sub-circuit level parameter is saved as the default value of the corresponding CDF Component Parameter.

Consider the following sub-circuit definition used in the illustrative netlist:

The sub-circuit amplifier has the sub-circuit level parameter my_res and my_cap. No default value is assigned to my_res. However, my_cap has a default value of 100f.The following figure shows the CDF Component Parameter after Spice In runs on the given netlist.

Handling Terminal Order for Sub-Circuits

This section explains how Spice In uses CDF Simulation Information for creating net-terminal connections.

The termOrder provides the following information:

Spice In needs to read termOrder to establish connections between the nets of an instance and the terminals of the master cell of the instance.

Source of the Terminal Order Information

In analog PDKs, such as the analogLib from Cadence, every master cell has CDF. CDF comprises of two parts — Component Parameters and Simulation Information. The termOrder exists in the Simulation Information, as shown in the figure below.

A separate CDF Simulation Information section exists for each simulator, such as ams, auCdl, hspiceD, and spectre, and therefore, the termOrder is different for every simulator.

Creation of Terminal Order

While importing an input netlist, Spice In does the following:

  1. Creates the base cell CDF for each cell
  2. Imports any sub-circuit level parameters as the base cell CDF Component Parameters
  3. Saves the names and order of the terminals as termOrder in the CDF Simulation Information for the specified simulator

You select a simulator in the Save Device Simulation Information in CDF for frame on the Import tab or specify a simulator name for the parameter outputSimName in the parameter file. Spice In creates the termOrder in the CDF Simulation Information section for the specified simulator. The device-map file also provides a construct for specifying the termOrder. For more information, see Creating a Device-Map File.

Consider the following sub-circuit definition from the netlist:

In this scenario, assume that the simulator for which the device information is to be saved is specified as spectre. Therefore, Spice In saves the termOrder of the sub-circuit amplifier in the CDF Simulation Information for spectre.

The following figure shows the creation of this termOrder for spectre:

For information about Spice In SKILL functions, see the Design Data Translator’s SKILL Reference.


Return to top
 ⠀
X