simif_hspice
-
Upload
m1cr0sp1ce -
Category
Documents
-
view
217 -
download
0
Transcript of simif_hspice
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 1/86
Discovery AMS Simulation
Interface Guide for HSPICE
Version Z-2007.03, March 2007
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 2/86
ii Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Copyright Notice and Proprietary InformationCopyright © 2007 Synopsys, Inc. All rights reserved. This software and documentation contain confidential and proprietaryinformation that is the property of Synopsys, Inc. The software and documentation are furnished under a license agreement andmay be used or copied only in accordance with the terms of the license agreement. No part of the software and documentation maybe reproduced, transmitted, or translated, in any form or by any means, electronic, mechanical, manual, optical, or otherwise, withoutprior written permission of Synopsys, Inc., or as expressly provided by the license agreement.
Right to Copy DocumentationThe license agreement with Synopsys permits licensee to make copies of the documentation for its internal use only.Each copy shall include all copyrights, trademarks, service marks, and proprietary rights notices, if any. Licensee mustassign sequential numbers to all copies. These copies shall contain the following legend on the cover page:
“This document is duplicated with the permission of Synopsys, Inc., for the exclusive use of__________________________________________ and its employees. This is copy number __________.”
Destination Control StatementAll technical data contained in this publication is subject to the export control laws of the United States of America.Disclosure to nationals of other countries contrary to United States law is prohibited. It is the reader’s responsibility todetermine the applicable regulations and to comply with them.
DisclaimerSYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITHREGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Registered Trademarks (®)Synopsys, AMPS, Cadabra, CATS, CRITIC, CSim, Design Compiler, DesignPower, DesignWare, EPIC, Formality, HSIM,
HSPICE, iN-Phase, in-Sync, Leda, MAST, ModelTools, NanoSim, OpenVera, PathMill, Photolynx, Physical Compiler,PrimeTime, SiVL, SNUG, SolvNet, System Compiler, TetraMAX, VCS, Vera, and YIELDirector are registered trademarksof Synopsys, Inc.
Trademarks (™)AFGen, Apollo, Astro, Astro-Rail, Astro-Xtalk, Aurora, AvanWaves, Columbia, Columbia-CE, Cosmos,CosmosEnterprise, CosmosLE, CosmosScope, CosmosSE, DC Expert, DC Professional, DC Ultra, Design Analyzer,Design Vision, DesignerHDL, Direct Silicon Access, Discovery, Encore, Galaxy, HANEX, HDL Compiler, Hercules,
Hierarchical Optimization Technology, HSIMplus, HSPICE-Link, iN-Tandem, i-Virtual Stepper, Jupiter, Jupiter-DP,JupiterXT, JupiterXT-ASIC, Liberty, Libra-Passport, Library Compiler, Magellan, Mars, Mars-Xtalk, Milkyway,ModelSource, Module Compiler, Planet, Planet-PL, Polaris, Power Compiler, Raphael, Raphael-NES, Saturn, Scirocco,Scirocco-i, Star-RCXT, Star-SimXT, Taurus, TSUPREM-4, VCS Express, VCSi, VHDL Compiler, VirSim, and VMC aretrademarks of Synopsys, Inc.
Service Marks (SM)MAP-in, SVP Café, and TAP-in are service marks of Synopsys, Inc.
SystemC is a trademark of the Open SystemC Initiative and is used under license.ARM and AMBA are registered trademarks of ARM Limited.Saber is a registered trademark of SabreMark Limited Partnership and is used under license.All other product or company names may be trademarks of their respective owners.
Printed in the U.S.A.
Discovery AMS Simulation Interface Guide for HSPICE, Z-2007.03
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 3/86
iii
Contents
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
The HSPICE Documentation Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
1. Introduction to the Discovery AMS Simulation Interface. . . . . . . . . . . . . . 1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
HSPICE Simulation Interface Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Licenses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Supported Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Summary of Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Requirements: Discovery AMS SimIF Integration with Virtuoso Schematic Editor 5
Installing the SimIF-Cadence Virtuoso Schematic Editor Interface . . . . . . . . . 5
Setting up your Discovery AMS SimIF Environment . . . . . . . . . . . . . . . . . . . . 6
Setting Up Tests Using Absolute Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Customizing the SimIF Defaults. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Using the discoveryAMSArtistSaveDir Skill Variable . . . . . . . . . . . . . . . . 8
Using the discoveryAMSModelLibraryList Skill Variable . . . . . . . . . . . . . 8
Using the discoveryAMSScale Skill Variable . . . . . . . . . . . . . . . . . . . . . . 9
2. Setting up Your Cadence Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Contents of this Section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Invoking the Command Interpreter Window. . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Loading Designs with the Library Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Using the Hierarchy Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Using the Virtuoso Schematic Editing Window . . . . . . . . . . . . . . . . . . . . . . . . 19
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 4/86
iv
Contents
3. Simulating with HSPICE Using SimIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Contents of this Section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Invoking SimIF from Cadence Virtuoso Schematic Editor . . . . . . . . . . . . . . . 23Creating a Testbench in SimIF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Setting Up the Netlist and Stimulus Options . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Specifying a Model Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Specifying Design Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Specifying Analog Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Setting Up an HSPICE Simulation and Analysis . . . . . . . . . . . . . . . . . . . . . . . 29
Setting Up for Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4. Running a Simulation in the Discovery AMS SimIF . . . . . . . . . . . . . . . . . . 41
Contents of this Section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Starting a Simulation in SimIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Netlisting Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Simulation Run Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Setting Up Local or Remote Simulations in SimIF. . . . . . . . . . . . . . . . . . . . . . 44
Netlisting and Running. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Viewing the Netlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Using CosmosScope to Analyze Simulation Results. . . . . . . . . . . . . . . . . . . . 50
Back-Annotate DC Operating Point and Device Bias Condition . . . . . . . . . . . 53
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
A. Writing Custom Netlist Procedures for the Discovery AMS Netlister. . . . 57
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Understanding Custom Netlist Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Understanding the CDF simInfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Discovery AMS Netlister Custom Netlist Procedure Rules . . . . . . . . . . . . . . . 60Discovery AMS Netlister Custom Netlist Procedure Example . . . . . . . . . . . . . 61
Discovery AMS APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
discoveryAMSGetInstName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
discoveryAMSGetPortNetListStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 5/86
v
Contents
discoveryAMSGetModelName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
discoveryAMSGetInstPropListStr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
discoveryAMSGetNamedInstPropListStr . . . . . . . . . . . . . . . . . . . . . . . . . 68
discoveryAMSGetQuotedInstPropListStr. . . . . . . . . . . . . . . . . . . . . . . . . 70discoveryAMSGetOrderedParamStr . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 7/86
Discovery AMS Simulation Interface Guide for HSPICE vZ-2007.03
About This Manual
The Discovery AMS Simulation Interface (SimIF) feature is integrated with theCadence Virtuoso Schematic Editor. This integration provides a link betweenthe Cadence Schematic and the Synopsys simulation flow. This manualdescribes this flow.
Audience
Users of this feature should be very familiar with HSPICE, and have some
background with the Cadence environment.
The HSPICE Documentation Set
This manual is a part of the HSPICE documentation set, which includes thefollowing manuals:
Manual Description
HSPICE Simulation andAnalysis User Guide
Describes how to use HSPICE to simulate andanalyze your circuit designs. This is the main HSPICEuser guide.
HSPICE Signal IntegrityGuide
Describes how to use HSPICE to maintain signalintegrity in your chip design.
HSPICE ApplicationsManual
Provides application examples and additional HSPICEuser information.
HSPICE and RFCommand Reference
Provides reference information for HSPICE andHSPICE RF commands and options.
HSPICE Elements andDevice Models Manual
Describes standard models you can use whensimulating your circuit designs in HSPICE, includingpassive devices, diodes, JFET and MESFET devices,and BJT devices.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 8/86
vi Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
About This ManualThe HSPICE Documentation Set
Searching Across the HSPICE Documentation Set
You can access the PDF format documentation from your install directory forthe current release by entering -docs on the terminal command line when theHSPICE tool is open.
Synopsys includes an index with your HSPICE documentation that lets yousearch the entire HSPICE documentation set for a particular topic or keyword.In a single operation, you can instantly generate a list of hits that are hyper-linked to the occurrences of your search term. For information on how toperform searches across multiple PDF documents, see the HSPICE releasenotes (available on SolvNet at http://solvnet.synopsys.com/ReleaseNotes) orthe Adobe Reader online help.
Note:
To use this feature, the HSPICE documentation files, the Index directory,and the index.pdx file must reside in the same directory. (This is the defaultinstallation for Synopsys documentation.) Also, Adobe Acrobat must beinvoked as a standalone application rather than as a plug-in to your webbrowser.
You can also invoke HSPICE and HSPICE RF command help by entering-help on your terminal command line when the HSPICE tool is open. Thisopens a browser-based help system for fast navigation to commands andoptions used in HSPICE and the HSPICE RF flow.
HSPICE MOSFET
Models Manual
Describes standard MOSFET models you can use
when simulating your circuit designs in HSPICE.
HSPICE RF User Guide Describes a special set of analysis and designcapabilities added to HSPICE to support RF and high-speed circuit design.
AMS DiscoverySimulation InterfaceGuide for HSPICE
Describes use of the Simulation Interface with otherEDA tools for HSPICE.
AvanWaves User Guide Describes the AvanWaves tool, which you can use todisplay waveforms generated during HSPICE circuit
design simulation.
Manual Description
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 9/86
Discovery AMS Simulation Interface Guide for HSPICE viiZ-2007.03
About This ManualRelated Publications
Related Publications
For additional information about <Product Name>, see
■ The documentation installed with the <Product Name> software andavailable through the <Product Name> Help menu
■ The <Product Name> Release Notes, available on SolvNet (see AccessingSolvNet on page viii)
■ Documentation on the Web, which provides HTML and PDF documents andis available through SolvNet at http://solvnet.synopsys.com
You might also want to refer to the documentation for the following relatedSynopsys products:
■ HSPICE
■ NanoSim
■ HSIM
Conventions
The following conventions are used in Synopsys documentation.
Convention Description
Courier Indicates command syntax.
Italic Indicates a user-defined value, such as object_name.
Bold Indicates user input—text you type verbatim—in syntax andexamples.
[ ] Denotes optional parameters, such as:
write_file [-f filename]
... Indicates that parameters can be repeated as many timesas necessary:
pin1 pin2 ... pinN
| Indicates a choice among alternatives, such as
low | medium | high
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 10/86
viii Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
About This ManualCustomer Support
Customer Support
Customer support is available through SolvNet online customer support andthrough contacting the Synopsys Technical Support Center.
Accessing SolvNet
SolvNet includes an electronic knowledge base of technical articles andanswers to frequently asked questions about Synopsys tools. SolvNet alsogives you access to a wide range of Synopsys online services, which includedownloading software, viewing Documentation on the Web, and entering a callto the Support Center.
To access SolvNet:
1. Go to the SolvNet Web page at http://solvnet.synopsys.com.
2. If prompted, enter your user name and password. (If you do not have aSynopsys user name and password, follow the instructions to register withSolvNet.)
If you need help using SolvNet, click SolvNet Help in the Support Resourcessection.
\ Indicates a continuation of a command line.
/ Indicates levels of directory structure.
Edit > Copy Indicates a path to a menu command, such as opening theEdit menu and choosing Copy.
Control-c Indicates a keyboard combination, such as holding downthe Control key and pressing c.
Convention Description
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 11/86
Discovery AMS Simulation Interface Guide for HSPICE ixZ-2007.03
About This ManualCustomer Support
Contacting the Synopsys Technical Support Center
If you have problems, questions, or suggestions, you can contact the Synopsys
Technical Support Center in the following ways:■ Open a call to your local support center from the Web by going to
http://solvnet.synopsys.com (Synopsys user name and password required),then clicking “Enter a Call to the Support Center.”
■ Send an e-mail message to your local support center.
• E-mail [email protected] from within North America.
• Find other local support center e-mail addresses athttp://www.synopsys.com/support/support_ctr.
■ Telephone your local support center.
• Call (800) 245-8005 from within the continental United States.
• Call (650) 584-4200 from Canada.
• Find other local support center telephone numbers athttp://www.synopsys.com/support/support_ctr.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 12/86
x Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
About This ManualCustomer Support
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 13/86
Discovery AMS Simulation Interface Guide for HSPICE 1Z-2007.03
1
1Introduction to the Discovery AMS Simulation Interface
The Discovery AMS Simulation Interface is integrated with the Cadence®Virtuoso® Schematic Editor. This integration provides a link between theCadence schematic and the Synopsys simulation flow, enabling you to simulatepure analog (transistor) and mixed-signal designs from the same environment.You can run NanoSim, NanoSim-VCS (NS-VCS), and HSPICE within the
Cadence Design Environment.
Overview
The Discovery AMS Simulation Interface (SimIF) enables you to setup andsimulate multiple tests/designs. You can run multiple tests/designs locally orremotely on a load-share system, such as the SUN GRID cluster technology orLSF (load sharing facility).
The simulation is run inside the SimIF, which is launched from the Virtuoso
Schematic Editor window. The integration has its own netlister, the DiscoveryAMS netlister. The netlister supports the HSPICE and SPECTRE netlistformats. The netlister is invoked from SimIF.
The SimIF integration with the Virtuoso® Schematic Editor flow is shown inFigure 1.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 14/86
2 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceOverview
Figure 1 Discovery AMS (SimIF) Cadence Virtuoso Schematic Editor Flow
You do not need to add any special views to use the Discovery AMSintegration. The Discovery AMS netlister can use either the hspiceS orhspiceD view to generate an HSPICE netlist file. The netlister uses thespectre view to generate the Spectre netlist file. A Cadence OASIS license isnot required when running this interface.
The Discovery AMS SimIF integration only supports the analog library that
Cadence bundles with their software. If you have customized the Cadenceanalog library (or have your own version of the analog library) you must updateyour custom netlist route for Discovery AMS.
This chapter contains the following topics:
■ HSPICE Simulation Interface Requirements
■ Summary of Features
■ Requirements: Discovery AMS SimIF Integration with Virtuoso SchematicEditor
■ Installing the SimIF-Cadence Virtuoso Schematic Editor Interface
■ Setting up your Discovery AMS SimIF Environment
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 15/86
Discovery AMS Simulation Interface Guide for HSPICE 3Z-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceHSPICE Simulation Interface Requirements
HSPICE Simulation Interface Requirements
The Discovery AMS SimIF integration with the Virtuoso Schematic Editor
requires the following product release versions:■ SimIF 2006.06-SP1 (or later)
■ HSPICE 2006.09 (or later)
■ CosmosScope 2006.06-SP1 (or later)
■ Virtuoso Schematic Editor version IC4.46 (or later)
NOTE: Linux 3.0 only works with IC5.141
Licenses
You must have the following product licenses: Synopsys HSPICE, SimIF,CosmosScope, and Cadence Virtuoso Schematic Editor.
■ HSPICE
■ SimIF
■ CosmosScope
■ Cadence Virtuoso Schematic Editor
Supported PlatformsThe following platforms are supported:
■ 32-bit platform
SUNOS 5.9, HP, Linux Red Hat RHEL v3
■ 64-bit platform
SUNOS 5.9, HP, Linux Red Hat RHEL v3
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 16/86
4 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceSummary of Features
Summary of Features
For a summary of the currently supported and unsupported features for the
Discovery AMS Simulation Interface Integration, see Table 1.Table 1 Summary of HSPICE Features for SimIF
Supported Features Unsupported Features
HSPICE netlist Spectre netlist
Verilog-A netlist*
SimIF supports sessions management
- Simulate multiple tests/designs
simultaneously
Cadence Schematic & config view
Cross-probe between SimIF and VirtuosoSchematic Editor
■ Save node voltages from schematic■ Save terminal currents from schematic■ Save nodal capacitance from schematic■ Save power consumption from schematic■ Cross-probe between SimIF interactive
mode and schematic
Back annotation of DC operating points andDC element bias conditions
Back annotation of transient analysisresults
CosmosScope waveform viewer
Cross-probe between CosmosScope andVirtuoso Schematic Editor
Save and Load SimIF states
- Accepts the Cadence Virtuoso AnalogDesign Environment (ADE) states
Customizing Cadence defaults using .cdsinitfile**
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 17/86
Discovery AMS Simulation Interface Guide for HSPICE 5Z-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceRequirements: Discovery AMS SimIF Integration with Virtuoso Schematic Editor
Note:
* If you have Verilog-A in your design, it is specified in the Spectre netlist withan ahdl_include statement, and it is specified in the HSPICE netlist file
with an .hdl statement.** You can customize your SimIF default settings using the .cdsinit file.
Requirements: Discovery AMS SimIF Integration with VirtuosoSchematic Editor
To use the Discovery AMS SimIF integration with the Virtuoso SchematicEditor, you must satisfy the following requirements:
1. An hspiceS or hspiceD view in your Cadence libraries. The Discovery
AMS netlister can use either the hspiceS or hspiceD view to generate anHSPICE netlist file.
2. A Cadence schematic or config view for your design.
3. Set the path for CosmosScope (2006.03 release). If you have not set thepath to CosmosScope, you will get the following warning message whenDiscovery AMS is invoked, as shown in Figure 2.
Figure 2 CosmosScope warning message
Installing the SimIF-Cadence Virtuoso Schematic Editor Interface
Before installing the SimIF code, make sure you have the appropriate HSPICE,
SimIF, CosmosScope, and Cadence software versions, licenses, andenvironment settings.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 18/86
6 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceSetting up your Discovery AMS SimIF Environment
To install the SimIF, follow this procedure:
1. Install the Discovery AMS SimIF release
2. Add the following lines to your Cadence .cdsinit file:
load(strcat(getShellEnvVar("SNPS_SIMIF")
"/interfaces/simif/virtuoso/discoveryAMS.al"))
3. Install the latest HSPICE release
4. Install the latest CosmosScope release.
Setting up your Discovery AMS SimIF Environment
To set up your SimIF environment, follow this procedure:
1. Source the Discovery AMS Simulation Interface CSHRC file. The CSHRCfile is located under the SimIF installation directory (install_directory / CSHRC_simif)
For example:source /home/synopsys/Y-2006.06-SP1/CSHRC_simif
The .cshrc file sets the path for the Discovery AMS skill code.
Here is a sample of what the CSHRC_simif file contains:
setenv SNPS_SIMIF /home/synopsys/Y-2006.06-SP1set path = (${SNPS_SIMIF}/bin $path)
2. Set the CosmosScope path.
For example:
set path = (/home/synopsys/Cscope_2006.06-SP1/sparcOS5/ ai_bin $path)
3. Set the Cadence environment path.
For example:
setenv CDSHOME /home/cadence/IC5141setenv CDS_INST_DIR $CDSHOMEsetenv CDS_HOME $CDSHOME
set path=($path $CDSHOME/tools/bin $CDSHOME/tools/dfII/bin)
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 19/86
Discovery AMS Simulation Interface Guide for HSPICE 7Z-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceSetting Up Tests Using Absolute Paths
Setting Up Tests Using Absolute Paths
If you specify your files as absolute paths, SimIF saves them as relative paths
with respect to the test directory. If you move the project to a different location,then these relative paths are resolved with respect to the test directory in thenew location. However, in the files created by SimIF these absolute paths arewritten as relative with respect to the run directory where the simulation wouldbe run.
Example:
Original netlist path: /remote/misc16/user3/projects/netlist/mynetlist.sp
Netlist as specified in SimIF: /remote/misc16/user3/projects/netlist/mynetlist.sp
Assuming the project and test directories are: /remote/misc16/user3/projects/my_projectand
/remote/misc16/user3/projects/my_project/my_testthe netlist file would be stored as: ../../netlist/mynetlist.spIf you move the directory /remote/misc16/user3/projects (which holds bothnetlists and the project) to a different location, then the paths are resolvedcorrectly.
Example run script when absolute paths are used:cd /remote/misc16/user3/projects/netlisthspice -i ./mynetlist.sp
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 20/86
8 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceCustomizing the SimIF Defaults
Customizing the SimIF Defaults
You can customize the Discovery AMS SimIF default settings by including Skill
variables in your .cdsinit files. The Skill variables listed in Table 2 can beused to set the default path to the state directory, model libraries, Verilog librarydirectories, and Verilog library files.
Using the discoveryAMSArtistSaveDir Skill Variable
By default, the SimIF state files are stored in your home directory,~user/.artist_states. You can change the default location for the statefiles by setting the discoveryAMSArtistSaveDir skill variable in your
.cdsinit file.In Example 1, the discoveryAMSArtistSaveDir skill variable is used to setthe state directory to /home/user/projects/artist_states.
Example 1 Setting the default location for the state directory
discoveryAMSArtistSaveDir="/home/user/projects/artist_states"
The discoveryAMSArtistSaveDir skill variable is a string type. Refer tothe Cadence Skill Reference Guide for more information on the skill variabletype string.
Using the discoveryAMSModelLibraryList Skill Variable
You can add the SimIF discoveryAMSModelLibraryList skill variable toyour .cdsinit file to set the default path to the process model library file(s) for
Table 2 Discovery AMS-supported .cdsinit variables
Skill Variable VariableType
Purpose
discoveryAMSArtistSaveDir string Default value for state directory
discoveryAMSModelLibraryList list Model library and corner names
discoveryAMSScale string For setting the command .optionscale=<value> in HSPICE netlistformat
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 21/86
Discovery AMS Simulation Interface Guide for HSPICE 9Z-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceCustomizing the SimIF Defaults
your design. The discoveryAMSModelLibraryList skill variable enablesyou to set the path to multiple model library file(s).
In Example 2, two models files, cmos90nm.spi (tt corner) and bjt.spi are in
the directory /home/projects/Models/HSPICE. Set the skill variable asshown.
Example 2 Setting the default path to the process model libraries
discoveryAMSModelLibraryList='(("/home/projects/Models/HSPICE/cmos90nm.spi" "tt")("/home/projects/Models/HSPICE/bjt.spi"))
Once you have set the path to the model file in the .cdsinit file, the modelfiles field is automatically populated when you create a test in the SimIF.
The discoveryAMSModelLibraryList skill variable is a list-type variable.Refer to the Cadence Skill Reference Guide for more information on the skill
variable type list.
Using the discoveryAMSScale Skill Variable
You can add the SimIF discoveryAMSScale skill variable to your .cdsinit file to or setting the command .option scale=<value> in HSPICE netlist formatfor your HSPICE simulation.
In Example 3, the discoveryAMSScale skill variable enables you to set thedefault geometric scale.
Example 3 Setting the default geometric scale (option SCALE)
discoveryAMSScale = "1u"
Refer to the Cadence Skill Reference Guide for more information on the skillvariable type string.
Refer to the Cadence Skill Reference Guide for more information on the skillvariable type string.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 22/86
10 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 1: Introduction to the Discovery AMS Simulation InterfaceCustomizing the SimIF Defaults
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 23/86
Discovery AMS Simulation Interface Guide for HSPICE 11Z-2007.03
2
2Setting up Your Cadence Environment
This chapter describes the usage and flow of the HSPICE Simulation Interface(SimIF) with the Cadence® Virtuoso® Schematic Editor. You will learn how toprepare Cadence schematic capture environment for HSPICE simulation.
Contents of this Section
There are several steps you must initially take before setting up theenvironment for a HSPICE simulation. In this chapter, the following topics aredescribed:
■ Invoking the Command Interpreter Window
■ Loading Designs with the Library Manager
■ Using the Hierarchy Editor
■ Using the Virtuoso Schematic Editing Window
Invoking the Command Interpreter Window
To get started, invoke the Cadence design environment by entering icms oricfb at the UNIX command prompt.
The Command Interpreter Window (CIW) displays as shown in Figure 3. TheCIW is the main control window in the Cadence environment. You can bring upthe Library Manager, Schematic Editor, Hierarchy Editor, or enter CadenceSKILL commands in the CIW. The CIW also displays a running history of the
commands used.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 24/86
12 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 2: Setting up Your Cadence EnvironmentLoading Designs with the Library Manager
Figure 3 Command Interpreter Window (CIW)
Loading Designs with the Library Manager
This section explains how to load your design (library, cell, and view) using theLibrary Manager.
The Library Manager is used to graphically display the contents of libraries. Youcan use the Library Manager to create cells and views, and to edit or read a
design. The Library Manager lists the library names that are set in thecds.lib file. The cds.lib file contains path to the libraries used in thedesign, including the libraries provided by Cadence, such as the analogLib andbasic libraries. For further clarification, the following are definitions of a library,cell, and view:
■ A library is a flat collection of cells. The library contains all the different viewsassociated with each of the cells
■ A cell is a logical component in your library. It can contain other cells, or canbe transistor-level block. For example, it can be a building block such as aVCO or charge pump.
■ A view is a particular representation of a cell such as a symbol, schematic,config, or layout.
To access the Library Manager, choose Tools > Library Manager from theCIW menu bar, as shown in Figure 4.
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 25/86
Discovery AMS Simulation Interface Guide for HSPICE 13Z-2007.03
Chapter 2: Setting up Your Cadence EnvironmentLoading Designs with the Library Manager
Figure 4 Choosing the Library Manager
To select a library, click on a file name that appears in the Library pane. Forexample, in Figure 5 on page 14, clicking on ClockGen in the Library panedisplays the library cells. Clicking on the ClockTop cell displays the availableviews. For ClockTop, the configBottomUp view is selected. Double-clicking theconfigBottomUp view to open. Note that configTopDown is the config viewname that the designer has chosen for this view.
Tools > Library Manager © 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 26/86
14 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 2: Setting up Your Cadence EnvironmentLoading Designs with the Library Manager
Figure 5 Library Manager dialog box
Opening the configBottomUp view invokes a dialog box, shown in Figure 6.
Figure 6 Open Configuration or Top CellView dialog box
The dialog box in Figure 6 enables you to open the Hierarchy Editor (HED) toconfigure your design for simulation or a schematic of the pre-definedconfiguration. Since you want to configure the design for simulation, open the
Library file name Cell name View name
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 27/86
Discovery AMS Simulation Interface Guide for HSPICE 15Z-2007.03
Chapter 2: Setting up Your Cadence EnvironmentUsing the Hierarchy Editor
Hierarchy Editor (HED). To do this, click the yes radio button for configurationediting and the no radio button for top cell view editing.
The Cadence Hierarchy Editor (HED) dialog box displays for the ClockTop
cell, as shown in Figure 7.
Figure 7 Cadence Hierarchy Editor dialog box
Using the Hierarchy Editor
The Hierarchy Editor (HED) enables you to review the design hierarchy. TheHED lets you configure the design using the Table view or the Tree view. The
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 28/86
16 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 2: Setting up Your Cadence EnvironmentUsing the Hierarchy Editor
Table view provides a list of all the cells in the design in a table format. TheTree view shows the instance tree for the design.
In Figure 8, the Table view of the HED is selected. The Table view lists all cells
used to configure the design using cell-based partitioning (configuring allinstances of the cell in the design). To check that you are in the HED Tableview, select the View menu and make sure that Table is selected.
Figure 8 Selecting the Table view in the Hierarchy Editor
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 29/86
Discovery AMS Simulation Interface Guide for HSPICE 17Z-2007.03
Chapter 2: Setting up Your Cadence EnvironmentUsing the Hierarchy Editor
Now, the information you must enter in the Global Bindings section of the HEDis described. This input controls how the HED and netlister traverses the viewsin your design:
■
Switch View list — listing of library cell views in the design. The netlisteruses the switch view list to search for cell views. A switch view list containsuser-defined cell view names. The cell view names are specified when theview for that cell is created.
For example, if you want to create a Verilog-A view for the divider circuitinside a PLL, you name this view veriloga. You must then include this inthe switch view list for the PLL design. The cell views can include hspiceD,verilog, behavorial, functional, veriloga, and schematic views. The order of the cell views in the list is important for the netlister.
■ Stop view list - listing of the cell views that signal the netlister to stop and
create a statement in the netlist file. For example, the stop view list containshspiceD spice veriloga. As the netlister scans your design and findsa view that is on the switch view list, if the selected view is on the stop list, itstops and creates a netlist statement for that instance and does not descendany further into the hierarchy.
Note:
If you want to generate a netlist file for your design, you must have aspectre view in both the View list and the Stop list.
If you want to generate an HSPICE netlist file for your design, you must haveeither an hspiceD or hspiceS view in both the View list and the Stop list.
If you want to override the view that is used, you can specify the view in the CellBindings section of the HED.
For this example, in Figure 9, the following views are chosen:
■ veriloga view for the ClockTop adc cell
■ veriloga view for the ClockTop dac cell
■ All the remaining cells in the design are represented using a schematic view(transistors).
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 30/86
18 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 2: Setting up Your Cadence EnvironmentUsing the Hierarchy Editor
Figure 9 PLL_DESIGN Config View in the Cadence Hierarchy Editor
To save your configuration, click on the save icon (indicated in Figure 9), then
click on the update icon .
These two icons save your configuration and update the schematic with your
settings. If you wish to visually verify your configuration, see the followingsection, Using the Virtuoso Schematic Editing Window.
view for dac cell view for adc cell
switchview
stopview
save icon open button
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 31/86
Discovery AMS Simulation Interface Guide for HSPICE 19Z-2007.03
Chapter 2: Setting up Your Cadence EnvironmentUsing the Virtuoso Schematic Editing Window
Using the Virtuoso Schematic Editing Window
This section describes how to open different cell views to verify configuration
settings from the HED. After saving your configuration from the HED, you canview your settings graphically in the schematic.
To do this, click the Open button in the HED window to open the schematic(see Figure 9). The Virtuoso Schematic Editor displays, as shown in Figure 10.Notice that there is a new menu, DiscoveryAMS, in the Virtuoso SchematicVirtuoso menu bar.
Figure 10 Virtuoso Schematic Editing Dialog
You can verify your configuration settings by descending into each cell. You cando this for each cell in your design, if you wish.
Discovery
AMS
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 32/86
20 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 2: Setting up Your Cadence EnvironmentUsing the Virtuoso Schematic Editing Window
Select the cell you want to verify in the schematic window—a highlighted whitebox appears. Choose Design > Hierarchy > Descend Edit from the menu barto descend into the cell. See Figure 11 for an example of the ADC cell.
Figure 11 Descending into the ADC cell
Descend into the view by clicking on the OK button in the Descend dialog box,as shown in Figure 12.
Figure 12 Descend dialog box
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 33/86
Discovery AMS Simulation Interface Guide for HSPICE 21Z-2007.03
Chapter 2: Setting up Your Cadence EnvironmentUsing the Virtuoso Schematic Editing Window
The view you have selected in the HED appears. For this example, theveriloga view for the ADC cell displays, as shown in Figure 13. The Verilog-Afile for the ADC is stored inside the Cadence database.
Figure 13 Verilog-A view for the ADC cell
Close the text editor window once you are done reviewing the Verilog-A file.
Repeat the steps above to verify any further cells. Once you are done verifyingyour configuration, you are ready to invoke the SimIF.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 34/86
22 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 2: Setting up Your Cadence EnvironmentUsing the Virtuoso Schematic Editing Window
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 35/86
Discovery AMS Simulation Interface Guide for HSPICE 23Z-2007.03
3
3Simulating with HSPICE Using SimIF
This chapter describes the steps for setting up HSPICE simulation runs usingthe Discovery AMS Simulation Interface. The procedures described are generalin nature to make them applicable to all users.
Contents of this Section
The Discovery AMS Simulation Interface (SimIF) is a tool that allows circuitdesigners to netlist a Cadence® Virtuoso® Schematic Editor transistor-levelschematic for HSPICE. It also provides a central simulation environment to setup single and multiple testbenches and to manage saved simulation sessions.The following topics are covered:
■ Invoking SimIF from Cadence Virtuoso Schematic Editor
■ Creating a Testbench in SimIF
■ Setting Up the Netlist and Stimulus Options■ Setting Up an HSPICE Simulation and Analysis
Invoking SimIF from Cadence Virtuoso Schematic Editor
To invoke SimIF from the Cadence Virtuoso Schematic Editor, you must open aschematic in the Cadence Virtuoso Schematic Editor’s configuration view (seeFigure 14 on page 24). For additional information, see Chapter 2, Setting upYour Cadence Environment).
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 36/86
24 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFCreating a Testbench in SimIF
Figure 14 Cadence Virtuoso Schematic Editor
Creating a Testbench in SimIF
In the configuration view, choose DiscoveryAMS > Simulation Interface.
This invokes SimIF and the DiscoveryAMS Simulation Interface – Create test,Project form opens. See Figure 15.
© 2006, Cadence Design Systems, Inc. All rights reserved worldwide. Printed with permission.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 37/86
Discovery AMS Simulation Interface Guide for HSPICE 25Z-2007.03
Chapter 3: Simulating with HSPICE Using SimIFCreating a Testbench in SimIF
Figure 15 SimIF Create test Project dialog box
The Project form prompts you to enter a project name and location in theappropriate text box. A directory will be created with the name you enter in the
Project Name text box to store your simulation data (netlist and results). Theproject location is the directory path where the directory is created. The defaultproject location is the directory where you invoked the Cadence environment.
Note that If this is not your first time invoking SimIF on the current schematic, itremembers your previous settings. The second and subsequent time youinvoke SimIF on a design, the entries you made in the previous session will beshown.
Click Next to continue with the testbench creation process. The Test formappears. See Figure 16.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 38/86
26 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFCreating a Testbench in SimIF
Figure 16 SimIF Create test Test dialog box
In the Simulation flow list, notice that Virtuoso Schematic Driven has beenselected. This indicates that the SimIF flow is from the Cadence Virtuoso
Analog Design Environment (ADE). Also, notice that in the Design group, theLibrary, Cell, and View text boxes have been populated with the selecteddesign.
In the Simulation Details group, from the Simulator list, select HSPICE. Thecurrently available choices are NanoSim, NanoSim-VCS, HSPICE, andHSPICE RF. HSPICE and HSPICE RF only support the HSPICE netlist format;therefore, your design library must have either hspiceD or hspiceS views.
Click Finish to invoke the Discovery AMS Simulation Interface GUI. SeeFigure 17 on page 27.
Cadence Virtuoso Schematic Driven
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 39/86
Discovery AMS Simulation Interface Guide for HSPICE 27Z-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up the Netlist and Stimulus Options
Figure 17 Discovery AMS Simulation Interface window
Setting Up the Netlist and Stimulus Options
The Netlist and Stimulus section is a tabbed interface containing panels inwhich you can specify and modify inputs to your simulation.
Specifying a Model Library
In the Model Setup tabbed panel Model library group Model Files column, enterthe path to your model files. In the Corner Name column, select the name of theprocess corner you want to use for the simulation from the list. Repeat thisprocess for each model file. See Figure 17.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 40/86
28 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up the Netlist and Stimulus Options
Specifying Design Variables
Click the Design Variables tab to display the panel. See Figure 18.
Figure 18 Design Variables panel
In the Design Variables tabbed panel Design Variables group Parameters andParameters Values columns, enter your parameters and corresponding values.Repeat this process for each design variable. To load design variables definedin the schematic for a design, click Copy From Cellview.
Specifying Analog Options
Click the Analog Options tab to display the panel. See Figure 19.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 41/86
Discovery AMS Simulation Interface Guide for HSPICE 29Z-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Figure 19 Analog Options panel
In the Analog Options Component Options Scale field, enter the devicegeometry scale. In the Temperature Options Tnom text box, enter the nominaltemperature
Setting Up an HSPICE Simulation and Analysis
In the project tree, click HSPICE Setup to update the right panel tabbedinterface. See Figure 20.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 42/86
30 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Figure 20 Analysis panel
These panels are used to setup simulation analysis in HSPICE.
Setting Up for Analysis
Data entered through the Analysis panel supplies setup information to thesupported HSPICE analyses. The Analysis Settings tree explorer is on the leftside of the panel, and the corresponding operating point analysis settings formis on the right side of the panel. See Figure 21.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 43/86
Discovery AMS Simulation Interface Guide for HSPICE 31Z-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Figure 21 Analysis settings
Selecting a particular analysis in Analysis Settings tree automatically updatesthe operating point analysis settings form. Multiple analyses can be saved. Forsome analyses, a previously defined analysis will be used for simulation. Youcan also disable and enable any analysis by clicking its check box. A moredetailed description of each analysis type can be found in the HSPICE andHSPICE RF Command Reference .
The HSPICE/HSPICE RF document set is provided in PDF format and is fullysearchable through Adobe Acrobat Reader. See the HSPICE Release Notesfor full details.
Setting Up Schematic Waveform Cross-Probing
Click the Waveform tab to display the panel. See Figure 22.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 44/86
32 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Figure 22 Waveform settings
Cross-probing in SimIF lets you select the signals you want to plot from aschematic design and then view their representative waveform. The SimIF GUIhas built-in interfaces for the CosmosScope and AvanWaves waveformviewers. CosmosScope is your only choice when using the Cadence VirtuosoSchematic Editor.
To cross-probe, in the Probe nodes group,
1. Depending on the type of output you want, click Voltage/Current, Power, orCapacitance. This brings the schematic window forward.
2. Navigate in the schematic view window to select the outputs and press the
Enter key to confirm and populate the Node Names box.3. In the List column, click the check box for each signal you want printed in the
output listing file after the simulation completes.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 45/86
Discovery AMS Simulation Interface Guide for HSPICE 33Z-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
If you want to sort the signals that you have selected, right-click the NodeNames column head, and select Sort from the menu.
Setting Up Post-Processing AnalysisClick the PostProc tab to display the panel. See Figure 23.
Figure 23 Measure settings
The PostProc (post-processing) panel is used to set up the .MEASURE .STIMULUS, and .BIASCHK statements.
The Post Processing tree explorer is on the left side of the panel, and thecorresponding settings form for each statement is on the right side of the panel.Selecting a particular statement in the Post Processing tree explorerautomatically updates the settings in the form. Multiple analyses can be saved.For some analyses, last defined settings will be used for simulation. You can
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 46/86
34 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
also disable and enable any statement by clicking Disable. A detaileddescription of each statement can be found in the HSPICE CommandReference Manual.
Setting Up Initial Conditions
Click the Convergence tab to display the panel. See Figure 24.
Figure 24 Convergence settings
You can graphically select signals to which you want to apply the initialconditions. First, in the Initial conditions group, from the Command list select
whether to use the .IC or .NODESET command for the initial conditionstatement. From the Node list or navigator, select a circuit node name orbranch current or interest. With the navigator, you can locate your node usingthe schematic view window or type the node name directly in the field. Enter theinitial condition in the Value column.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 47/86
Discovery AMS Simulation Interface Guide for HSPICE 35Z-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Setting HSPICE Options
Click the Options tab to display the panel. See Figure 25.
Figure 25 HSPICE Options Analysis settings
You use this panel to specify options for your simulation. If you want to changethe numerical algorithm HSPICE uses during simulation, click the Analysis taband select the appropriate options.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 48/86
36 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Choosing an HSPICE Version for Simulation
Click the Run tab to display the panel. See Figure 26.
Figure 26 Run options settings
Use the Run panel to select the particular version of HSPICE you want to usefor simulation. You can set up different versions of HSPICE other than thedefault version. To add multiple versions of HSPICE in SimIF, click Edit todisplay the Discovery AMS Simulation Interface – Preferences dialog box. SeeFigure 27.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 49/86
Discovery AMS Simulation Interface Guide for HSPICE 37Z-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Figure 27 Simulation Setup Preferences dialog box
In the Simulator list, notice that HSPICE has been selected. To add a newversion of HSPICE to the list shown in the HSPICE version window, click Add todisplay the HSPICE Version Settings dialog box. See Figure 28.
Figure 28 HSPICE Version Settings dialog box
In the HSPICE version text box, enter the HSPICE version number, and then
use the HSPICE installation path navigator to select that version. Click OK toconfirm your choice. The new version is added to the list. Click OK to close thepreferences dialog box.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 50/86
38 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
HSPICE also lets you to choose whether you want to use 32 bit version ofHSPICE or 64 bit. To choose 64 bit, select the checkbox in the Run OptionsPreference dialog (Figure 29).
Figure 29 Preferences dialog to select 64- bit
Saving/Loading Virtuoso Analog Design Environment States
You can save your simulation setups to a Virtuoso® Analog DesignEnvironment state file. Once saved to a state file, you can reload it for futureuse.
To save a state file, in the RunOptions panel, either click Save State, or chooseSimulation > Save State. The Discovery AMS Simulation Interface – Save Statein Cadence Analog Design Env dialog box opens. See Figure 30.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 51/86
Discovery AMS Simulation Interface Guide for HSPICE 39Z-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Figure 30 SimIF Save State in Cadence Analog Design Env dialog box
To restore previously saved simulation environment settings (including theVirtuoso ADE states), either click Load State or choose Simulation > LoadState. The Discovery AMS Simulation Interface – Load State from CadenceAnalog Design Environment dialog box opens. See Figure 31 on page 40.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 52/86
40 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 3: Simulating with HSPICE Using SimIFSetting Up an HSPICE Simulation and Analysis
Figure 31 SimIF Load State in Cadence Analog Design Environment dialog
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 53/86
Discovery AMS Simulation Interface Guide for HSPICE 41Z-2007.03
4
4Running a Simulation in the Discovery AMS SimIF
This chapter describes the steps required for netlisting, running local or remotesimulations, and viewing your simulation results.
Contents of this Section
This chapter contains the following topics:
■ Starting a Simulation in SimIF
■ Netlisting Settings
■ Simulation Run Settings
■ Setting Up Local or Remote Simulations in SimIF
■ Netlisting and Running
■ Viewing the Netlist
■ Using CosmosScope to Analyze Simulation Results
■ Conclusion
Starting a Simulation in SimIF
After you have finished setting up your design, you are now ready to generatethe netlist and run the simulation for your circuit. Click Run in SimIF to invokethe Run window.
The Run window lets you select the tests you want to simulate, and displays therun time updates.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 54/86
42 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFNetlisting Settings
The Run window consists of three panes:
■ Project tree
■ Current project (containing the tests available for the selected project)
■ Current test (containing run time updates)
The Project tree pane lets you select a project from the available ones inyour project tree, and it displays the tests for each project. The CurrentProject pane displays the tests available for the project in spreadsheet formand enables you to configure the tests to be simulated. See Figure 32.
Figure 32 Run window in SimIF
Netlisting Settings
The default value for the Netlister column in the Current project paneis Create. You can choose the netlister to create, recreate the netlist fromscratch, or not run by selecting the value from the Netlister column. Click onthe entry in the spreadsheet to activate the menu, as shown in Figure 33 on
Run Options
Run
Stop
Waveform
Annotate
SimulationFiles
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 55/86
Discovery AMS Simulation Interface Guide for HSPICE 43Z-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFSimulation Run Settings
page 43. The Netlister > Create command incrementally netlists the portion ofyour design that has changed or been updated. It is faster than full hierarchicalre-netlisting (Netlister > ReCreate) because only the schematics that havechanged since the previously generated netlist are re-netlisted.
Figure 33 Netlisting options
Simulation Run Settings
For the Simulation column, Run is the default setting for a HSPICE orNanoSim simulation. You can change this by clicking on the entry under theSimulation column, as shown in Figure 34.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 56/86
44 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFSetting Up Local or Remote Simulations in SimIF
Figure 34 SimIF run options for HSPICE
Setting Up Local or Remote Simulations in SimIF
The simulation can be run on a local machine or on a Load-Sharing systemsuch as LSF or GRID. In the Mode column, you can select the mode to be usedfor running the simulation, as shown in Figure 35. For this example thesimulation is run locally.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 57/86
Discovery AMS Simulation Interface Guide for HSPICE 45Z-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFSetting Up Local or Remote Simulations in SimIF
Figure 35 Simulation mode control
To run a remote simulation, additional setup is required in SimIF. Make sureLSF or GRID is enabled for your site before setting the options. In SimIF, clickthe Run Options button. The Run Options Preferences dialog box opens, asshown in Figure 36. This Preferences dialog box enables you to set up thesimulation to run on either LSF or GRID. Specify your LSF or GRID options anduse the template provided to set up the simulator installation directory and yourlicense file. Uncomment each statement that is required.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 58/86
46 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFNetlisting and Running
Figure 36 Run Options Preferences dialog box
Netlisting and Running
Once you have completed selecting simulation run options, you can netlist andsimulate your design. Multiple tests can be run simultaneously in SimIF.
To run a test, check the box next to the test name in the Test column. Click theRun button to begin, as shown in Figure 32. When you click the Run button,the check box next to the test name is unchecked, the test selected isautomatically highlighted in blue, and the Status column displays thesimulation that is currently running, as shown in Figure 37.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 59/86
Discovery AMS Simulation Interface Guide for HSPICE 47Z-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFViewing the Netlist
Figure 37 Simulation Run screen for SimIF
The Current test pane displays the run time updates of your simulation.Notice that the Status column in the Run window provides you with acontinuous status of the netlisting and simulation. The Log, Errors, andWarnings tabs contain pertinent information about the simulation.
If you want to stop a simulation run, check the box next to the test name in theTest column and click the Stop button.
Viewing the Netlist
Click on the Simulation Files button, as shown in Figure 32, invokes theSimulation Files dialog box. The screen contains the netlist file and runscriptfile generated by SimIF for the test. See Figure 38.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 60/86
48 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFViewing the Netlist
Figure 38 Simulation files dialog box
SimIF will generate an analog netlist file for a design. The analog netlist file isthe complete simulation deck.
As shown in Figure 38, it contains:
■ schematic connectivity at the top of the netlist
■ the model library statements
■ analysis statements
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 61/86
Discovery AMS Simulation Interface Guide for HSPICE 49Z-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFViewing the Netlist
■ output statements
■ and control options at the bottom of the netlist
Figure 39 Simulation complete
After your simulation completes, CosmosScope automatically loads theselected signals in the Waveform tabbed panel, shown in Figure 22 onpage 32. The simulation results are displayed in CosmosScope, as shown inFigure 40 on page 50.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 62/86
50 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFUsing CosmosScope to Analyze Simulation Results
Figure 40 CosmosScope
The CosmosScope waveform viewer enables you to visually analyze your
results.
Using CosmosScope to Analyze Simulation Results
The CosmosScope waveform viewer enables you to determine whether yourdesign meets specification: For example, was the rise time fast enough andwas the overshoot too high?
CosmosScope is fully graphical and interactive. Measurement results areannotated directly onto the waveform diagram.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 63/86
Discovery AMS Simulation Interface Guide for HSPICE 51Z-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFUsing CosmosScope to Analyze Simulation Results
View your simulation results by doing the following:
■ Click the Waveform button and choose Select on Schematic from themenu in SimIF to invoke the schematic window, as shown in Figure 41.
Figure 41 Selecting a signal from the schematic to plot in SimIF
■ Select the schematic signals to be viewed in CosmosScope.
■ Click the Enter (or Return) button—on your keyboard—when you havefinished selecting the signals in the schematic. CosmosScope displays theselected signals, as shown Figure 42 on page 52.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 64/86
52 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFUsing CosmosScope to Analyze Simulation Results
Figure 42 CosmosScope
The menu bar and icon toolbars are called out in Figure 43 on page 53.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 65/86
Discovery AMS Simulation Interface Guide for HSPICE 53Z-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFBack-Annotate DC Operating Point and Device Bias Condition
Figure 43 CosmosScope Menu Bar and Tool Icons
Back-Annotate DC Operating Point and Device Bias Condition
After the simulation completes, click the Annotate button and select betweenDC Operating Points or Bias Conditions (See Figure 44 on page 53) to invokethe Back Annotation (BA) interface window.
Figure 44 Annotate option pulldown menu
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 66/86
54 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFBack-Annotate DC Operating Point and Device Bias Condition
The Back Annotation interface window (Figure 45) Initial Conditions tabprovides you with a selectable list of .ic files in the Source File field. Click toselect operating point file(s) to annotate. You can annotate multiple operatingpoints to the schematic directly. Click Apply to annotate circuit node operatingpoints. Click Ok to annotate circuit node operating points and close the BackAnnotation window.
Figure 45 Back Annotation, Initial Conditions
The BA interface window (Figure 46 on page 55) Bias tab allows your toannotate DC bias conditions to each individual or type of elements to theschematic window. The interface window displays a Source file field that lists
bias condition files (multiple file BA of bias conditions is supported, just likeinitial conditions) which you can select with the left mouse button. TheElements explorer in the lower left pane allows you to select an individualdevice type for annotation. The lower right pane displays a list of element
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 67/86
Discovery AMS Simulation Interface Guide for HSPICE 55Z-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFBack-Annotate DC Operating Point and Device Bias Condition
properties that can be annotated; also multiple properties can be selected withthe left mouse button.
Figure 46 Bias Condition Interface tab
The Bias pane also allows you to select individual devices for annotation. Clickthe Selected “element type” only checkbox to activate individual elementselection. To select, within a field:
1. Click the button at the end of the field. This brings the schematic windowforward.
2. Navigate in the schematic view window to select the elements and press the
Enter key to confirm and populate the elements row.You can also choose between annotate only the current hierarchy level orannotate traverse through all the hierarchy levels. To specify this preference,from the Discovery AMS Simulation Interface - Preferences dialog box, click
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 68/86
56 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Chapter 4: Running a Simulation in the Discovery AMS SimIFConclusion
Cadence Virtuoso Integration Category. See Figure 47 on page 56. The defaultpreference is Full hierarchy back annotation.
Figure 47 Back Annotation preferences
Conclusion
The Discovery AMS Simulation Interface (SimIF) is tightly integrated into theCadence Virtuoso environment. This integration allows you to cross-probebetween SimIF and Virtuoso schematics, which enables you to set up yourdesign for simulation. These capabilities enable an easy setup of your analogdesign for simulation.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 69/86
Discovery AMS Simulation Interface Guide for HSPICE 57Z-2007.03
A
AWriting Custom Netlist Procedures for the Discovery AMSNetlister
This appendix describes how to write custom netlist procedures for theDiscovery AMS netlister.
Overview
This appendix contains the following topics:
■ Understanding Custom Netlist Procedures
■ Understanding the CDF simInfo
■ Discovery AMS Netlister Custom Netlist Procedure Rules
■ Discovery AMS Netlister Custom Netlist Procedure Example
■ Discovery AMS APIs
Understanding Custom Netlist Procedures
A custom netlist procedure is a SKILL procedure used for netlisting acomponent that could be either an analog primitive or a cell from a library. Forthe components from Component Description Format (CDF)-based libraries,the SKILL procedure name is specified in the netlistProcedure field in theSimulation Information (simInfo) section of the CDF.
For example, the hspiceD and spectre Analog Design Environment
netlisters call the netlist procedures hspiceDCompPrim_vsin andspectreSrcPrim, respectively, for netlisting the primitive vsin from theanalogLib library. These procedure names are specified in thenetlistProcedure fields for the hspiceD and spectre simInfo sections,
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 70/86
58 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterUnderstanding the CDF simInfo
respectively, of the CDF.Example 4 is a sample of the printed vsin CDFinformation in text format:
Example 4
/**********************************************/ LIBRARY = "analogLib" CELL = "vsin"/**********************************************/let( ( libId cellId cdfId ) unless( cellId = ddGetObj( LIBRARY CELL ) error( "Could not get cell %s." CELL ) ) when( cdfId = cdfGetBaseCellCDF( cellId ) cdfDeleteCDF( cdfId ) ) cdfId = cdfCreateBaseCellCDF( cellId ) cdfId->simInfo->hspiceD = '( nil netlistProcedure hspiceDCompPrim_vsin instParameters (dc acm acp vo va freq td theta phi) termOrder (PLUS MINUS) propMapping (nil dc vdc acp acPhase phi phase) namePrefix "V" . . . . ) cdfId->simInfo->spectre = '( nil namePrefix "" netlistProcedure spectreSrcPrim otherParameters (fundname fundname2 . . .) instParameters (dc mag phase …)
termOrder (PLUS MINUS) propMapping (nil dc vdc mag acm . . .) . . . . ) . . . .)
Understanding the CDF simInfo
The simInfo sections of each component inside the libraries contain sufficientinformation required for netlisting and running simulations, using each
supported netlister/simulator. The Discovery AMS netlister in SimIF uses theexisting simInfo of other netlisters/simulators, instead of requiring its own for thecomponents from the CDF-based libraries.
Your first step for running a NanoSim, NanoSim-VCS, or HSPICE simulation inSimIF is to create a test. In the Create Test dialog box that displays, you specify
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 71/86
Discovery AMS Simulation Interface Guide for HSPICE 59Z-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterUnderstanding the CDF simInfo
the following information: Simulator, Test Name, Netlist Format, and SimInfo.For HSPICE simulations, the available netlist format is hspice.
The corresponding SimInfo to use pull-down menu enables the following
simInfo usage for the Discovery AMS netlister:■ Choosing spectre as the netlist format results in spectre simInfo usage.
■ Choosing hspice as the netlist format results in hspiceD or hspiceS simInfo usage.
Note:
You specify the variables at the time you create a test in SimIF. Whenyou select hspice as the netlist format, you are presented with twosimInfo choices: hspiceS or hspiceD.
See Table 3 for an overview of your choices:
The Discovery AMS netlister can use all the values from the CDF simInfo of
other netlisters/simulators, except the netlistProcedure field. The customnetlist procedures specified in the netlistProcedure field of the CDFsimInfo of netlisters/simulators are normally implemented using OASIS direct-interface functions and variables; these functions and variables are meant to beused only in the Analog Design Environment. But, the Discovery AMS netlister
Table 3 SimInfo to use options from Create test dialog box
Simulator Netlist Format SimInfo to use
NanoSim spectre spectre (only)
hspice ■ hspiceD or■ hspiceS
NanoSim-VCS spectre spectre (only)
hspice ■ hspiceD or ■ hspiceS
HSPICE hspice ■ hspiceD or ■ hspiceS
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 72/86
60 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS Netlister Custom Netlist Procedure Rules
is based on OSS, and calling those procedures from the Discovery AMSnetlister will not be executed successfully. Therefore, you must write anequivalent netlist procedure for the Discovery AMS netlister for each netlistprocedure written for the other netlister/simulator.
Discovery AMS Netlister Custom Netlist Procedure Rules
You must adhere to the following rules while writing the custom netlistprocedure for the Discovery AMS netlister:
■ The name of the custom netlist procedure for the Discovery AMS netlisterprefixes the discoveryAMS string with the name of the custom netlistprocedure in the simInfo that was selected, specified at the time of creatingthe test (for netlisting). For example, if ansSpectreSrcPrim_csrc is the
netlist procedure for a given primitive in the spectre CDF simInfo fornetlisting in an Analog Design Environment spectre netlister, you must writea new discoveryAMSansSpectreSrcPrim_csrc custom netlistprocedure to netlist the same primitive in spectre format using theDiscovery AMS netlister.
■ The custom netlist procedure requires a single argument to hold the CDFobject for the netlisted instance. This argument is passed by the DiscoveryAMS netlister and can be used inside the custom netlist procedureimplementation.
■ The custom netlist procedure can either return the entire instance statement
or write directly using the hnlPrintString(...) function. For improvedSimIF netlister performance with layout views, it is recommended that youreturn the entire instance statement from the custom netlist procedure. UsehnlPrintString(...) instead of returning the entire instance statementwhen the length of the instance statement exceeds the maximum stringlength (8191 characters imposed by SKILL).
■ The custom netlist procedure should be implemented using the OSSnetlister functions and variables starting with the prefix hnl. It should notuse any direct-interface functions and variables starting with the prefix nl.
The Discovery AMS netlister provides custom netlist procedures with the
proper names for most of the analog primitives shipped in the CadenceanalogLib and basic libraries. For example, hspiceDCompPrim is the netlistprocedure specified in the hspiceD CDF simInfo for voltage and currentsources from the Cadence analogLib library. To netlist these analogprimitives, the Discovery AMS netlister has implemented a netlist procedure
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 73/86
Discovery AMS Simulation Interface Guide for HSPICE 61Z-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS Netlister Custom Netlist Procedure Example
with the name discoveryAMShspiceDCompPrim. If a design contains a cellor primitive other than the standard shipped in the Cadence libraries, and theprimitive contains custom netlist procedures in the simInfo that are planned fornetlisting in the Discovery AMS netlister, you must write a custom netlistprocedure(s) for the Discovery AMS netlister.
Discovery AMS Netlister Custom Netlist Procedure Example
In Example 5, the Discovery AMS netlister is implemented for the followingcustom netlist procedures discoveryAMSspectreSVCPrim anddiscoveryAMSanshspiceSSrcPrim_vsin:
Example 5
discoveryAMSIfNoProcedure ( discoveryAMSspectreSVCPrim(object) ; ; netlistProcedure for device "analogLib/zvcvs,zvccs,svcvs,svccs"spectre CDF simInfo, ;
prog((cdf param paramValue strResult excludeParamsList strTmp)
strResult = ""
; instance name strResult = strcat(strResult discoveryAMSGetInstName())
; port nets strResult = strcat(strResult " " discoveryAMSGetPortNetListStr("(" ")" " " ))
; model/component/cell name strResult = strcat(strResult " " discoveryAMSGetModelName())
; ordinary parameters excludeParamsList = list( "spec" "order" "probe" "[ab][0-9]+" "[zp][0-9]+[ri]") strResult = strcat(strResult " "
discoveryAMSGetInstPropListStr(excludeParamsList "“list("none")))
cdf = cdfGetInstCDF(object) param = discoveryAMSFindParamByName(cdf "spec") paramValue = param~>value
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 74/86
62 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS Netlister Custom Netlist Procedure Example
;pole when( paramValue == "pole-zero" strResult = strcat(strResult " " discoveryAMSGetOrderedParamStr(object "order" "poles" list("p%dr")
list("p%di"))) strResult = strcat(strResult " " discoveryAMSGetOrderedParamStr(object "order" "zeroes" list("z%dr")list("z%di"))) )
;polynomial when( paramValue == "polynomial" strResult = strcat(strResult " " discoveryAMSGetOrderedParamStr(object "order" "numer" list("a%d") nil 0)) strResult = strcat(strResult " " discoveryAMSGetOrderedParamStr(object "order" "denom" list("b%d") nil 0)) ) ;probe param = discoveryAMSFindParamByName(cdf "probe") paramValue = param~>value when( paramValue != nil && paramValue != "" sprintf( strTmp "probe=%s" paramValue ) strResult = strcat(strResult " " strTmp) ) return(strResult)
));discoveryAMSspectreSVCPrim
discoveryAMSIfNoProcedure(discoveryAMSanshspiceSSrcPrim_vsin(object) prog((cdf strResult strTmp param bOffset bAmplitude bFrequencybTd bTheta bPhase) ; ; netlistProcedure for device "analogLib/vsin" hspiceS CDF simInfo, ;
strResult = ""
; instance name strResult= strcat(strResult discoveryAMSGetInstName())
; port nets strResult = strcat(strResult " " discoveryAMSGetPortNetListStr())
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 75/86
Discovery AMS Simulation Interface Guide for HSPICE 63Z-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS Netlister Custom Netlist Procedure Example
; instance parameters - dc acm acp vo va freq td theta phi m ; DC current strResult = strcat( strResultdiscoveryAMSGetNamedInstPropListStr( list( "dc" )
nil nil list( "DC" ) ) )
; AC magnitude strTmp = discoveryAMSGetNamedInstPropListStr( list( "acm" ) nilnil list( "AC" ) ) cdf = cdfGetInstCDF( object ) when( strTmp strResult = strcat( strResult strTmp ) param = discoveryAMSFindParamByName( cdf "acp" t ) when( param && !discoveryAMSInvalidValue( param->value ) strResult = strcat( strResult " " param->value ) ) )
;SIN strResult = strcat( strResult " SIN " ) bOffset = discoveryAMSParamHasValue(cdf "vo") bAmplitude = discoveryAMSParamHasValue(cdf "va") bFrequency = discoveryAMSParamHasValue(cdf "freq") bTd = discoveryAMSParamHasValue(cdf "td") bTheta = discoveryAMSParamHasValue(cdf "theta") bPhase = discoveryAMSParamHasValue(cdf "phi") if(bPhase || bTheta || bTd then
strResult=strcat( strResult " "discoveryAMSGetNamedInstPropListStr( list( "vo""va" "freq") t t ) ) else if(bFrequency then strResult = strcat( strResult " "
discoveryAMSGetNamedInstPropListStr(list( "vo" "va" "freq") t t ) ) else if( bAmplitude then strResult = strcat( strResult " "
discoveryAMSGetNamedInstPropListStr(
list( "vo" "va" ) t t ) ) strResult = strcat( strResult " " discoveryAMSGetNamedInstPropListStr(list( "freq") t nil ) ) else strResult=strcat( strResult " "
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 76/86
64 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
discoveryAMSGetNamedInstPropListStr(list( "vo" "va" "freq") t nil ) ) );bAmplitude );bFrequency
) ; current source parameters if(bPhase then strResult = strcat( strResult " "
discoveryAMSGetNamedInstPropListStr( list(list("td" "0.0") list("theta" "0.0") list("phi" "0.0")) t t ) ) else if(bTheta then strResult = strcat( strResult " "
discoveryAMSGetNamedInstPropListStr(list( list("td" "0.0")
list("theta" "0.0") ) t t ) ) strResult = strcat( strResult " "
discoveryAMSGetNamedInstPropListStr(list( "phi") t nil ) ) else strResult = strcat( strResult " "
discoveryAMSGetNamedInstPropListStr( list("td" "theta" "phi") t nil ) ) ) ) return( strResult )
)
);discoveryAMSanshspiceSSrcPrim_vsin
Discovery AMS APIs
The Discovery AMS netlister provides several public APIs that can be usedwhile writing a custom netlist procedure for the Discovery AMS netlister.Table 4 contains the API names for generating the values for different parts ofan instance statement. You can see the usage of some of these APIs inExample 5.
Table 4 Discovery AMS netlister APIs
Instance Statement Sections Discovery AMS API
Instance name discoveryAMSGetInstName
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 77/86
Discovery AMS Simulation Interface Guide for HSPICE 65Z-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
discoveryAMSGetInstName
Syntax
discoveryAMSGetInstName()
Description
Returns the mapped name of the netlisted instance.
Arguments
None
Value Returned
Returns the mapped name of the current instance.
discoveryAMSGetPortNetListStr
Syntax
discoveryAMSGetPortNetListStr(@optional (begStr nil) (endStr nil)(sepStr " ") (refPortOrder nil))
Description
Returns a string of port nets for the current instance separated by sepStr.Result is prefixed with begStr, if it is specified. Result is appended with
endStr, if it is specified.
External connectivity discoveryAMSGetPortNetListStr
Model name discoveryAMSGetModelName
Parameter statement ■ discoveryAMSGetInstPropListStr■ discoveryAMSGetNamedInstPropListStr■ discoveryAMSGetQuotedInstPropListStr■ discoveryAMSGetOrderedParamStr
Table 4 Discovery AMS netlister APIs
Instance Statement Sections Discovery AMS API
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 78/86
66 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
Arguments
Example
The following function call connects the nets to the ports. Use the "(" characters at the beginning of the net and the ")" characters at the end of thenet. Use space (" ") as the delimiter for the net.
Example 6
discoveryAMSGetPortNetListStr( "(" ")" " " )
Note:
This API returns the nets connected to the ports in the order specified in thetermOrder (or refTermOrder) field of the CDF simInfo of the specifiednetlister/simulator. For example, the termOrder field of the spectre CDFsimInfo is used for netlisting in the spectre netlist format. This API does notwork correctly if the number of ports on the current instance does not matchthe number of ports specified in termOrder (or refTermOrder) for all thecells other than the pCells. For pCells, only the nets connected to the portsspecified in the termOrder field are returned.
Value Returned
Returns the connectivity string for the current cell.
Argument Description
begStr Prefix for the string of nets
endStr Postfix for the string of nets
sepStr String to be used between the nets
RefPortOrder Whether to use refTermOrder or termOrder property in the CDF simInfo for accessing theconnectivity information
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 79/86
Discovery AMS Simulation Interface Guide for HSPICE 67Z-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
discoveryAMSGetModelName
Syntax
discoveryAMSGetModelName(@optional ( requiresModel nil ))
Description
Returns the value of the parameter model, if it exists in the CDF (either in theinstParameters or otherParameters property in the CDF simInfo);otherwise, returns the value of the componentName property in the CDFsimInfo; otherwise, the value of the moduleName property in the CDF simInfo;otherwise, the cell name. If requiresModel is t, then errors-out if theparameter model is not detected.
Arguments
requiresModel - Whether model name is required from the parameternamed model only
Value Returned
Returns the model name for the current instance.
Note:
Use the SKILL expression hnlCurrentInst~>cellName to get the cellname—instead of the model name—in your netlist procedure.
discoveryAMSGetInstPropListStr
Syntax
discoveryAMSGetInstPropListStr(@optional (exclExprList nil)(sepStr " ") (validValueList nil))
Description
Returns instance parameters specified in the instParameters andotherParameters property in the CDF simInfo that have a value, excludingthose parameters matching any of the regular expressions on the exclude list.Returns a concatenated string in the name=value format separated bysepStr. Optional validValueList has an invalid values exception list. For
example, if list( "none" ) is specified, and a parameter has value none,property=none is returned, instead of excluding it.
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 80/86
68 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
Arguments
Example
Call this function to get all the parameters of the current instance—other thanthe parameters fundname fundname2 noisefile FNpairs F1 F2N0 and N1 in the name=value format. Refer to Example 6:
Example 7
exList = list( "fundname" "fundname2" "noisefile" "FNpairs""[FN][0-1]+")discoveryAMSGetInstPropListStr(exList))
Note:
Use this API if you want to get the values of the CDF parameters specifiedin the instParameters and otherParameters property in the CDFsimInfo. This API writes the results in the name=value format, where name is the parameter name recognized by the simulator.
Value ReturnedReturns the parameter statement for the current instance in the name=value format.
discoveryAMSGetNamedInstPropListStr
Syntax
discoveryAMSGetNamedInstPropListStr( paramNameList @optional (valueOnly nil ) ( required nil ) ( mapNameList nil )( sepStr " " ) ( open "" ) ( close "" ))
DescriptionReturns specific instance parameter values in a concatenated string ofname=value pairs in the same order as the parameter name strings inparamNameList. If valueOnly is t, only the parameter value is written,instead of name=value. If t is required, an error is reported if the parameter is
Argument Description
exclExprList List of parameter names to be excluded
sepStr Delimiter string between each parameter
validValueList List of invalid values exception list
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 81/86
Discovery AMS Simulation Interface Guide for HSPICE 69Z-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
missing or has an invalid value. If mapNameList is not nil, it should be a listof name strings with the same number of members as paramNameList, sothe parameter names are replaced with these names in the name=value pairs.If sepStr is not nil, it is used between parameters. If open is not nil, it isprefixed before value. If close is not nil, it is appended after value.
Arguments
Example
Call this function to get the parameters area pj wp lp wm lm l w of the
current instance in the name=value format:Example 8
unmappedList = list( "area" "pj" "wp" "lp" "wm" "lm" "l" "w" ) mappedList = list( "AREA" "PJ" "WP" "LP" "WM" "LM" "L" "W" ) discoveryAMSGetNamedInstPropListStr( unmappedList nil nilmappedList)
Note:
Use this API if you want to get the values for the specific parameters. ThisAPI does not use the simInfo field, so you must provide themapNameList if the CDF parameter names specified in paramNameList
is not recognizable by the simulator.Value Returned
Returns the parameter statement for the current instance in eithername=value or value only format for the given parameter list.
Argument Description
paramNameList List of CDF parameter names
valueOnly Use value only or name=value
required Whether parameters must be found
mapNameList List of names recognized by simulator
sepStr Delimiter string between each parameter
open Prefix string for the value
close Postfix string for the value
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 82/86
70 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
discoveryAMSGetQuotedInstPropListStr
Syntax
discoveryAMSGetQuotedPropListStr(object propList)
Description
Returns the parameters of any object as a concatenated string ofname="value" format. Note that this function returns values in double quotes.Usually this is used for parameters that take values with spaces between likefile names.
Arguments
Example
Call this function to get the parameter statement of the current instance for theparameters "fundname" "fundname2" "noisefile" in thename="value" format. Refer to Example 8:
Example 9
quotedList = list( "fundname" "fundname2" "noisefile" )discoveryAMSGetQuotedPropListStr(hnlCurrentInst
quotedList)
Note:
The CDF parameter names specified in the propList should be presenteither in the instParameters or otherParameters property in the CDFsimInfo.
Value Returned
Returns the parameters in name="value" format.
Argument Description
object db object usually hnlCurrentInst
propList List of CDF parameter names whose valuesmust be printed in name="value" format
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 83/86
Discovery AMS Simulation Interface Guide for HSPICE 71Z-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
discoveryAMSGetOrderedParamStr
Syntax
discoveryAMSGetOrderedParamStr(object nParamName vectorNamexParamList @optional (yParamList nil) (startN 1) (sepStr " "))
Description
Returns properties such as the waveform in the string formatvectorName=[<x1> <y1> <x2> <y2> ...<xn> <yn>]
Arguments
ExamplediscoveryAMSGetOrderedParamStr(hnlCurrentInst "tvpairs""wave" list("t%d") list("v%d") 1 " ") returns wave=[0.0 0.01.0 3.0 2.0 0.0] when the tvpairs property is defined as 3 and t1=0.0,v1=0.0, t2=1.0, v2=3.0, t3=2.0, v3=0.0.
If startN1 was specified as 0, output would start with t0 and v0, instead oft1 and v1.
Value Returned
Returns the parameters in the name="value" format.
Argument Description
nParamName Number of pairs
vectorName Name of the vector
xParamList Prefix for the xvector
yParamList Prefix for the yvector
startN Starting index
sepStr Delimiter between each set
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 84/86
72 Discovery AMS Simulation Interface Guide for HSPICEZ-2007.03
Appendix A: Writing Custom Netlist Procedures for the Discovery AMS NetlisterDiscovery AMS APIs
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 85/86
73
Index
Aabsolute paths 7Analog Artist, loading states 38analog options, setting 28
Bback annotation, DC operating points 53back annotation, device bias condition 54back annotation, full or current hierarchy 56
CCDF-based libraries 58Command Interpreter Window 11convergence tab 34CosmosScope waveform viewer 50custom netlist procedure 57
DDC operating points, back annotation 53design variables, setting 28device bias condition, back annotation 54
Ffeature summary 4flow, SimIF tool 2
HHierarchy Editor 14, 15HSPICE
options 35setup 29
version 36
Iinitial conditions 34installation procedure 5
LLibrary Manager 12licenses 3loading designs 12local settings 44
Mmodel library, specifying 27
Nnetlist and stimulus options 27netlist settings 42netlist, viewing 47netlister rules, custom netlist 60netlisting 46netlisting and simulating design 46
Ooverview 1
Ppaths, absolute 7platforms supported 3post-processing analysis 33product licenses 3
Rremote settings 44requirements, software 3run settings 43runscript file
47
Sschematic editor 23selecting HSPICE version 36setting analog options 28
7/22/2019 simif_hspice
http://slidepdf.com/reader/full/simifhspice 86/86
IndexT
setting design variables 28setting HSPICE options 35setting up HSPICE simulation and analysis 29setting up post-processing analysis 33
setting up schematic waveform cross-probing 31settting initial conditions 34SimIF
environment setup 5, 6invoking from Cadence Virtuoso 23requirements 4, 5running a simulation 41simulations, local and remote 44testbenches 24
SimIF flow 2simInfo sections 58simulation run settings 43
SKILL procedure, netlisting a component
57
software requirements 3supported platforms 3
Ttable view, listing all cells 16test run 46
Vviewing netlist 47Virtuoso Schematic Editor 19
Wwaveform cross-probing 31
waveform viewer 50