- •Contents
- •Preface
- •Related Documents
- •Typographic and Syntax Conventions
- •Creating HDL Modules for CDBA Cellviews
- •Creating HDL Data as You Save CDBA Cellviews
- •Creating HDL Data from Pre-existing CDBA Cellviews
- •Quick-Start Tutorial
- •The Circuit
- •AMS Designer Tools
- •Setting Up the Tutorial
- •Running from a Script
- •Running within the AMS Environment
- •Opening the Command Interpreter Window
- •Netlisting and Compiling
- •Elaborating and Simulating the Design
- •Summary
- •Setting Up the AMS Environment
- •Overview
- •The hdl.var File
- •The ams.env Files
- •AMS Designer Supports Design Management
- •Specifying the Text Editor to Use
- •Specifying Fonts for the Cadence Hierarchy Editor
- •Preparing to Use AMS Designer from the Hierarchy Editor
- •Netlisting
- •Netlisting Modes Supported by the AMS Netlister
- •Automatic Netlisting of a Cellview
- •Netlist Updating and Netlisting of Entire Designs
- •Netlisting from the UNIX Command Line
- •Library Netlisting
- •Netlisting of Cells in Response to Changes in CDF
- •Preparing Existing Analog Primitive Libraries for Netlisting
- •Specifying the Behavior of the Netlister and Compilers
- •Opening the AMS Options Windows
- •Setting Netlister Options from the Hierarchy Editor
- •Opening the CIW AMS Options Window
- •Setting Compiler Options
- •Viewing the AMS Netlister Log
- •Understanding the Output from the AMS Netlister
- •How Inherited Connections Are Netlisted
- •Inherited Signal Connections
- •Inherited Terminal Connections
- •Instance Values for Inherited Connections
- •Third-Party Tools and Other Cadence Tools
- •How Aliased Signals Are Netlisted
- •How m-factors (Multiplicity Factors) Are Netlisted
- •How Iterated Instances Are Netlisted
- •Passing Model Names as Parameters
- •Effect of the modelname, model, and modelName Parameters
- •Handling of the model* and componentName Parameters
- •Precedence of the model* and componentName Parameters
- •Specifying Parameters to be Excluded from Netlisting
- •Ignoring Parameters for Entire Libraries
- •Example: Specifying Parameters to Ignore
- •Ensuring that Floating Point Parameters Netlist Correctly
- •Working with Schematic Designs
- •Setting Schematic Rules Checker Options for AMS Designer
- •Creating Cellviews Using the AMS Environment
- •Preparing a Library
- •Creating the Symbol View
- •Using Blocks
- •Descend Edit
- •Inherited Connections
- •Global Signals in the Schematic Editor
- •Inherited Connections in a Hierarchy
- •How Net Expressions Evaluate
- •Net and Pin Properties
- •groundSensitivity and supplySensitivity Properties
- •Making Connect Modules Sensitive to Inherited Connection Values
- •Using External Text Designs
- •Overview of Steps for Using External Text Designs
- •Bringing Modules into a Cadence Library
- •Specifying the Working Library
- •Compiling into Libraries
- •Compiling into Temporary Libraries
- •Listing Compiled Modules
- •Using Text Blocks in Schematics
- •Using Modules Located in a Cadence Library
- •Preparing for Simulation
- •Using Analog Primitives
- •Using SPICE and Spectre Netlists and Subcircuits
- •Preparing to Use SPICE and Spectre Netlists and Subcircuits
- •Placing SPICE and Spectre Netlists and Subcircuits in a Schematic
- •Using Test Fixtures
- •Creating and Using a Textual Test Fixture
- •Creating a Textual Test Fixture
- •Using a Test Fixture
- •Example: Creating and Using a Test Fixture
- •Using Design Configurations
- •Ensuring HDL Design Unit Information Is Current
- •Preparing a Design for Simulation
- •Overview of AMS Design Prep
- •What AMS Design Prep Does to Prepare a Design for Simulation
- •When to Use AMS Design Prep
- •Specifying the Behavior of AMS Design Prep
- •Setting Options for Global Design Data
- •Specifying Global Signals
- •Specifying Design Variables
- •Specifying Model Files to Use During Elaboration
- •Running AMS Design Prep
- •The cds_globals Module
- •Global Signals
- •Design Variables
- •Setting Elaborator Options
- •Setting Simulator Options
- •Setting Waveform Selection Options
- •Creating Probes
- •Selecting Instances from the Virtuoso Schematic Editing Window
- •Selecting Buses
- •Selecting Instances from the Scope Navigator
- •Copying and Pasting Within Tables
- •Elaborating and Simulating
- •Viewing Messages
- •Plotting Waveforms After Simulation Ends
- •Starting the SimVision Waveform Viewer
- •Plotting Waveforms Selected on a Schematic (Direct Plot)
- •Using the amsdesigner Command
- •Examples
- •Producing Customized Netlists
- •Producing Customized Netlists
- •Identifying the Sections of a Netlist
- •Using ams.env Variables to Customize Netlists
- •Using Netlisting Procedures to Customize Netlists
- •Examples: Problems Addressed by Customized Netlists
- •Example: Adjusting Parameter Values to Account for Number of Fingers
- •Example: Using Symbols that Represent Verilog Test Code
- •Data Objects Supported for Netlisting
- •Netlister Object
- •Formatter Object
- •Cellview Object
- •Parameter Object
- •Instance Object
- •SKILL Functions Supported for Netlisting
- •Default Netlisting Procedures
- •Netlisting Helper Functions
- •Variables for ams.env Files
- •How AMS Designer Determines the Set of Variables
- •Why AMS Designer Uses ams.env Files, Not .cdsenv Files
- •List of ams.env Variables
- •Detailed Descriptions of ams.env Variables
- •aliasInstFormat
- •allowDeviantBuses
- •allowNameCollisions
- •allowSparseBuses
- •allowUndefParams
- •amsCompMode
- •amsDefinitionViews
- •amsEligibleViewTypes
- •amsExcludeParams
- •amsExpScalingFactor
- •amsLSB_MSB
- •amsMaxErrors
- •amsScalarInstances
- •amsVerbose
- •analogControlFile
- •bindCdsAliasLib
- •bindCdsAliasView
- •cdsGlobalsLib
- •cdsGlobalsView
- •checkAndNetlist
- •checkOnly
- •checktasks
- •compileAsAMS
- •compileExcludeLibs
- •compileMode
- •connectRulesCell
- •connectRulesCell2
- •connectRulesLib
- •connectRulesView
- •detailedDisciplineRes
- •discipline
- •excludeViewNames
- •hdlVarFile
- •headerText
- •ieee1364
- •ifdefLanguageExtensions
- •incdir
- •includeFiles
- •includeInstCdfParams
- •initFile
- •instClashFormat
- •iterInstExpFormat
- •language
- •lexpragma
- •logFileAction
- •logFileName
- •macro
- •maxErrors
- •messages
- •modifyParamScope
- •ncelabAccess
- •ncelabAnnoSimtime
- •ncelabArguments
- •ncelabCoverage
- •ncelabDelayMode
- •ncelabDelayType through ncelabMessages
- •ncelabMixEsc
- •ncelabModelFilePaths
- •ncelabNeverwarn through ncelabVipdelay
- •ncsimArguments
- •ncsimEpulseNoMsg through ncsimExtassertmsg
- •ncsimGUI
- •ncsimLoadvpi through ncsimStatus
- •ncsimTcl
- •ncsimUnbuffered through ncsimUseAddArgs
- •ncvhdlArguments
- •ncvlogArguments
- •ncvlogUseAddArgs
- •netClashFormat
- •netlistAfterCdfChange
- •netlistMode
- •netlistUDFAsMacro
- •neverwarn
- •noline
- •nomempack
- •nopragmawarn
- •nostdout
- •nowarn
- •paramDefVals
- •paramGlobalDefVal
- •pragma
- •processViewNames
- •prohibitCompile
- •runNcelab
- •runNcsim
- •scaddlglblopts
- •scaddltranopts
- •scale
- •scalem
- •scannotate
- •scapprox
- •scaudit
- •sccheckstmt
- •sccmin
- •sccompatible
- •scdebug
- •scdiagnose
- •scdigits
- •scerror
- •scerrpreset
- •scfastbreak
- •scgmin
- •scgmincheck
- •schomotopy
- •sciabstol
- •scic
- •scicstmt
- •scignshorts
- •scinfo
- •scinventory
- •sclimit
- •sclteratio
- •scmacromod
- •scmaxiters
- •scmaxnotes
- •scmaxrsd
- •scmaxstep
- •scmaxwarn
- •scmethod
- •scmodelevaltype
- •scmosvres
- •scnarrate
- •scnotation
- •scnote
- •scopptcheck
- •scpivabs
- •scpivotdc
- •scpivrel
- •scquantities
- •screadic
- •screadns
- •screlref
- •screltol
- •scrforce
- •scscale
- •scscalem
- •scscftimestamp
- •scscfusefileflag
- •scskipcount
- •scskipdc
- •scskipstart
- •scskipstop
- •scspeed
- •scstats
- •scstep
- •scstop
- •scstrobedelay
- •scstrobeperiod
- •sctemp
- •sctempeffects
- •sctitle
- •sctnom
- •sctopcheck
- •sctransave
- •scusemodeleval
- •scvabstol
- •scwarn
- •scwrite
- •simRunDirLoc
- •simVisScriptFile
- •status
- •templateFile
- •templateScript
- •timescale
- •update
- •use5xForVHDL
- •useDefparam
- •useNcelabNowarn
- •useNcelabSdfCmdFile
- •useNcsimNowarn
- •useNowarn
- •useScaddlglblopts
- •useScaddltranopts
- •useScic
- •useScreadic
- •useScreadns
- •useScwrite
- •useSimVisScriptFile
- •useProcessViewNamesOnly
- •verboseUpdate
- •vlogGroundSigs
- •vloglinedebug
- •vlogSupply0Sigs
- •vlogSupply1Sigs
- •wfDefaultDatabase
- •wfDefInstCSaveAll
- •wfDefInstCSaveLvl
- •wfDefInstSaveCurrents
- •wfDefInstSaveVoltages
- •wfDefInstVSaveAll
- •wfDefInstVSaveLvl
- •wfDefInstVSaveObjects
- •Updating Legacy SimInfo for Analog Primitives
- •The ams Fields
- •Special Handling of model, modelName, modelname, and componentName
- •Converting an Existing Analog Primitive Library
- •Designing for Virtuoso AMS Compliance
- •Terminals
- •Buses
- •Component Description Format
- •Parameters
- •Using Inherited Parameters
- •Using Cell Parameters
- •Parameterized Cells
- •VHDL-AMS Component Declarations
- •Properties
- •Properties to Avoid Completely
- •Avoid the portOrder Property Unless Required by Special Circumstances
- •Properties to Use Only in AMS Compatibility Mode
- •Properties That Have No Special Meaning in the AMS Environment
- •Properties Fully Supported by the AMS Environment
- •SKILL Functions
- •amsCheckCV
- •amsIsPresent
- •amsNetlist
- •amsProcessCellViews
- •amsUIOptionsForm
- •amsUIRunNetlisterForm
- •ddsCvtAMSTranslateCell
- •ddsCvtAMSTranslateLib
- •ddsCvtToolBoxAMS
- •vmsUpdateCellViews
- •Customization Variables
- •schHdlNotCreateDB
- •schHdlUseVamsForVerilog
- •vmsAnalysisType
- •vmsCreateMissingMasters
- •vmsNcvlogExecutable
- •vmsPortProcessing
- •vmsRunningInUI
- •vmsTemplateScript
- •vmsVerboseMsgLevel
- •Compiling Cadence-Provided Libraries
- •Purpose of the amsLibCompile Tool
- •Running the amsLibCompile Tool Manually
- •Example
Virtuoso AMS Environment User Guide
Preparing a Design for Simulation
If access permissions are set so that AMS Design Prep cannot write to the cds_globals module, the following user interfaces are affected:
User interface |
Effect of having a non-writable cds_globals |
AMS Global Signals, reached by choosing AMS – Global Signals.
AMS Design Variables, reached by choosing AMS – Design
Variables.
AMS Design Prep, reached by choosing AMS – Design Prep.
Buttons specific to this window become nonfunctional. You cannot add, remove, or change information.
Buttons specific to this window become nonfunctional. You cannot add, remove, or change information.
A message appears informing you that the cds_globals module cannot be updated with information during this run.
Note these restrictions:
■AMS Design Prep cannot write the cds_globals information to a TMP file.
■The creation and updating of the cds_globals module is not subject to design management (DM) control, even when access to other objects in the design is controlled by a DM tool.
If the cds_globals module cannot be created or is not writable, you can specify a different location for the information. Choose AMS – Options – Global Design Data and enter a writable location in the Global Design Data Module pane.
The cds_globals Module
For some designs, such as those that combine HDL and CDBA cellviews, you need to understand the kinds of information placed in the cds_globals module, and what it means.
Do not change the name of the cds_globals module because it is automatically specified for simulation. (If your design contains no design variables or global signals, AMS Design Prep creates the cds_globals module as an empty module.)
Normally, the cds_globals module is written to the file
configLibName/cds_globals/configCellName_configView/verilog.vams
(However, you can change the location of the file. For more information, see“SettingOptions for Global Design Data” on page 211.)
April 2004 |
226 |
Product Version 5.3 |
Virtuoso AMS Environment User Guide
Preparing a Design for Simulation
For example, consider the following cds_globals module, which is located in a file named amsLib/cds_globals/top_config/verilog.vams. Notice the declarations of the global signals and the dynamicparam declaration of the design variable. For more information, see “Global Signals” on page 228 and“Design ariables”V on page 229.
//Verilog-AMS cds_globals module for top-level cell:
//amslib/top.
//Generated by AMS Design Prep.
//Cadence Design Systems, Inc.
‘include "disciplines.vams"
module cds_globals;
//Global Signals electrical \vdd! ; electrical \vss! ; electrical \gnd! ; ground \gnd! ;
//Design Variables dynamicparam real idc = 20u;
endmodule
It is not necessary for the discipline of every signal in the cds_globals module to be defined. As elsewhere in the design, the otherwise undefined disciplines are determined by the discipline resolution method that you use. For more information, see the “Discipline Resolution Methods” section in the “Mixed-Signal Aspects of Verilog-AMS” chapter, of the
Cadence Verilog-AMS Language Reference.
Creating Your Own cds_globals Module
You can create your own cds_globals module, overwriting the cds_globals module automatically created by AMS Design Prep. A cds_globals module created in this way is not overwritten by AMS Design Prep.
You might want to hand-create this module when
■You want a single or common module that is used by many designs instead of creating a cds_globals module for each configuration, which is what AMS Design Prep normally does. By creating a common module, you can avoid cluttering your library with cellviews that contain the same information.
■You want to declare global signals or design variables that are used in HDL cellviews but are not used in the schematic cellviews of your design.
Although Cadence does not recommend it, it is even possible to create many cds_globals modules, though each must be uniquely named. The AMS Designer flow only supports a single cds_globals module so if you have more than that, the modules must be added in the Additional arguments field of theElaborator pane in the AMS Options window.
April 2004 |
227 |
Product Version 5.3 |
Virtuoso AMS Environment User Guide
Preparing a Design for Simulation
Global Signals
A global signal is a signal that is available everywhere in the design hierarchy. AMS Design
Prep collects the global signals from each CDBA cellview of the design and stores the collected information in the cds_globals module. AMS Design Prep also provides a user interface that allows you to examine, change, and add to the global signals in your design.
For information on using the user interface, see “Specifying Global Signals” on page 213.
Unless you disable the automatic generation of the cds_globals module, AMS Design Prep regenerates the global signal information whenever global signals are added to or removed from the design.
Using Global Signals in Verilog (Digital) and Verilog-AMS HDL Modules
AMS Design Prep does not collect global signals from HDL cellviews. Consequently, if you want global signals in your Verilog (digital) and Verilog-AMS HDL cellviews—VHDL-AMS design units do not support using global signals—to interconnect with global signals in the netlists translated from schematic cellviews, you must use global signals from the cds_globals module in your Verilog (digital) and Verilog-AMS HDL cellviews. You do this by using out-of-module references to the global signals.
For example, consider the following cds_globals module produced by AMS Design Prep.
//Verilog-AMS netlist generated by the AMS netlister
//Cadence Design Systems, Inc.
‘include "disciplines.vams" ‘include "constants.vams"
module cds_globals;
//Global Signals electrical \vdd! ; electrical \vss! ; electrical \gnd! ; ground \gnd! ; wire signal1; ground signal2;
//Design Variables
dynamicparam real idc = 20u;
endmodule
You can refer to these global signals from within a Verilog-AMS module, for example, by using a hierarchical name such as cds_globals.signal1.
There are some complications produced by the fact that not all characters that are legal in CDBA modules are legal in Verilog-AMS modules. For example, a net name of vdd!, though legal in CDBA modules, is not allowed in Verilog-AMS and must be escaped. That is why, in the previous module, all of the signals defined with theelectrical discipline are escaped.
April 2004 |
228 |
Product Version 5.3 |
Virtuoso AMS Environment User Guide
Preparing a Design for Simulation
You must use the escaped names if you want to refer to these nets from within an HDL module. For example, you use a hierarchical name of "cds_globals.\vdd! " to refer to a net that in the CDBA module is simply vdd! (Note the space that terminates the escaped name).
The Default Global Signal of an Inherited Signal Expression
AMS Design Prep treats the default global signal of an inherited signal expression as a regular global signal in CDBA. The signal is also stored in the cds_globals module.
Design Variables
A design variable is a global variable that is available everywhere in the design hierarchy. AMS Design Prep collects the design variables found in each CDBA cellview of the design and declares them as dynamic parameters in the cds_globals module. AMS Design Prep also provides a user interface that allows you to examine, change, and add to the design variables in your design. For information on using the user interface, see “SpecifyingDesign Variables” on page 216.
Note: The VHDL-AMS language does not support out-of-module references, so you cannot set design variables within VHDL-AMS design units, nor can you, from within a VHDL-AMS design unit, directly access design variables used in other modules or design units.
A design variable can be referenced in the values of instance properties or AEL expressions.
(Note, however, that AMS Design Prep does not find design variables that are used in NLP expressions.) When converted to Verilog-AMS, a design variable can be referenced in the value of an expression via an out-of-module reference. For example, assume that sheetRes is a design variable declared in the cds_globals module with an expression such as
dynamicparam real sheetRes = 1.3 ;
Then you can refer to that value in a Verilog-AMS module with a statement such as
#(.r(cds_globals.sheetRes * area))
April 2004 |
229 |
Product Version 5.3 |
Virtuoso AMS Environment User Guide
Preparing a Design for Simulation
April 2004 |
230 |
Product Version 5.3 |
Virtuoso AMS Environment User Guide
11
Elaborating, Simulating, and Plotting
Results
This chapter contains the following sections:
■Specifying the Behavior of the Elaborator, Simulator, and Waveform Viewer on page 232
■Creating Probes on page 277
■Elaborating and Simulating on page 286
■Viewing Messages on page 289
■Plotting Waveforms After Simulation Ends on page 290
April 2004 |
231 |
Product Version 5.3 |