- •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
Producing Customized Netlists
More Powerful Approach: Using Fully Customized Netlisting Procedures
The full-custom use model builds on the capability described in the previous section, expanding beyond resetting the value of fields to completely rewriting the netlisting procedures. The major difference in the fully customized approach, is that the helper netlisting functions are used much more extensively to fine tune the operation of the netlister. This is the most powerful form of custom netlisting procedures because it allows you to add new components, ports, or wires as necessary. While taking advantage of this flexibility, you must account for the various environment variables and format the netlist accordingly. And, of course, you must ensure that the resulting netlist is syntactically correct.
Much of the information you need for full-blown custom netlisting is described earlier in the chapter, including the SKILL operators used to access and change the fields in the data objects and the mechanism for overriding the default netlisting procedures. Detailed information about the data objects can be found in “DataObjects Supported for Netlisting” on page 327.
Examples: Problems Addressed by Customized Netlists
The flexibility of customized netlisting procedures lends itself to addressing a wide range of problems. The extended examples in the following sections illustrate how various problems can be resolved by using netlisting procedures.
■Example: Adjusting Parameter Values to Account for Number of Fingers on page 314
■Example: Using Symbols that Represent Verilog Test Code on page 318
■Example: Using CDF Instance Parameters to Define Inherited Connections on page 322
Example: Adjusting Parameter Values to Account for Number of Fingers
The basic problem addressed in this example is the need to pass the number of fingers on a mosfet to the simulator so that the narrow width effect can be accounted for during simulation.
The netlist has two nmos transistors with the same width and multiplier but the M0 instance has 10 fingers, while theM1 instance has 1 finger. The same models are used for both preand post-layout so the scaling needed to adjust for the differing numbers of fingers cannot be done in the models; it must be done during netlisting.
April 2004 |
314 |
Product Version 5.3 |
Virtuoso AMS Environment User Guide
Producing Customized Netlists
The number of fingers for each instance is specified as a user property in the Edit Object
Properties form. For instance, the form for instance M0 looks like this.
April 2004 |
315 |
Product Version 5.3 |
Virtuoso AMS Environment User Guide
Producing Customized Netlists
The parameters that must be scaled are w, as, ad, ps, pd and m. For the approach taken in this example to work, these parameters have to appear in the instParameters field of the ams Simulation Information.
Notice, however, that the fingers property does not appear in the instParameters list.
There is no need for it there because, although it is used as data for the netlist, it does not appear in the netlist.
The netlisting procedure looks at each parameter. If the current parameter is w, as, ad, ps, pd, or m then the parameter is scaled, either by dividing by the number of fingers or by multiplying by the number of fingers. After the new parameter values are set, the netlisting procedure calls the default instance parameter printing function, amsPrintInstanceParameters, to finish the work.
;;=======================================================================
;;A custom netlist procedure to compute instance parameters based
;;on number of fingers on the instance
;;=======================================================================
(defun myPrintInstanceParameters (formatterId cvId instanceId)
;;Modify the parameters for "nmos" in a customized way -
;;based on number of fingers.
;;
(if (instanceId->masterName == "nmos") then
;;We want to change the value of parameters w, as, ad, ps, pd and m
;;depending upon the value of property <fingers>.
;;A few notes regarding the simInfo:
;;
;;Please make sure that w, as, ad, ps, pd and m are in the
;;instParameters section of ams simInfo. Otherwise, amsdirect does
;;not pick them up for writing to the netlist.
;;
;;Please note that, "fingerwidth" should NOT be an instParameter, as
;;it is not required to be printed as a parameter on the instance.
;;Because it is not in the include list, amsdirect does not pick
April 2004 |
316 |
Product Version 5.3 |
Virtuoso AMS Environment User Guide
Producing Customized Netlists
;;it up. But it is there on the instance as a normal CDBA
;;property. Grab it from the instance.
numfingers = instanceId->id->fingers
(if (numfingers != nil) then
;;Go through the list of parameters for nmos and modify
;;the value for the following parameters:
;;w, as, ad, ps, pd, m.
;;
(foreach param instanceId->parameters
(if ((param->name |
== "w") |
|| |
|
(param->name |
== "as") |
|| |
|
(param->name |
== "ad") |
|| |
|
(param->name |
== |
"ps") |
|| |
(param->name |
== |
"pd") |
) then |
param->value = strcat(param->value "/" numfingers)
); if
(if (param->name == "m") then
param->value = strcat(param->value "*" numfingers) ); if
);foreach
);if
); if
/* Call the default instance parameters print function */ amsPrintInstanceParameters(formatterId cvId instanceId)
); defun
;;=======================================================================
;;Set up area
;;=======================================================================
netlisterId = amsGetNetlister() formatterId = netlisterId->vlog
;; Override the printing of instance parameters netlist procedure formatterId->instanceParametersProc = ’myPrintInstanceParameters
Running this netlist procedure results in a netlist that includes the following instantiation statements.
nmos #(.ps(1.268u), .as(2.04E-12), .l(130.0n), .pd(12.68u), .ad(2.04E-12),
.w(6u), .m(2))
(* integer library_binding = "analogLib"; integer passed_mfactor = "m"; *)
M1 ( out_y, net20, cds_globals.„nd! , •ulk_n_gnd! );
nmos #(.ps(11.6u/10), .as(1.32E-12/10), .l(130.0n), .pd(9.8u/10), .ad(1.14E-12/10 ),
.w(6u/10), .m(2*10))
(* integer library_binding = "analogLib"; integer passed_mfactor = "m"; *)
M0 ( net20, net9, cds_globals.„nd! , •ulk_n_gnd! );
Notice how in the second instantiation (for M0) the values for ps, as, pd, ad, and w are divided by 10, while the value for m is multiplied by 10.
April 2004 |
317 |
Product Version 5.3 |