Cadence Tutorial
Cadence Tutorial
Guide
Product Version 5.1.41
June 2004
1999-2004 Cadence Design Systems, Inc. All rights reserved.
Printed in the United States of America.
Cadence Design Systems, Inc., 555 River Oaks Parkway, San Jose, CA 95134, USA
Trademarks: Trademarks and service marks of Cadence Design Systems, Inc. (Cadence) contained in
this document are attributed to Cadence with the appropriate symbol. For queries regarding Cadence’s
trademarks, contact the corporate legal department at the address shown above or call 1-800-862-4522.
All other trademarks are the property of their respective holders.
Restricted Print Permission: This publication is protected by copyright and any unauthorized use of this
publication may violate copyright, trademark, and other laws. Except as specified in this permission
statement, this publication may not be copied, reproduced, modified, published, uploaded, posted,
transmitted, or distributed in any way, without prior written permission from Cadence. This statement grants
you permission to print one (1) hard copy of this publication subject to the following conditions:
1. The publication may be used solely for personal, informational, and noncommercial purposes;
2. The publication may not be modified in any way;
3. Any copy of the publication or portion thereof must include all original copyright, trademark, and other
proprietary notices and this permission statement; and
4. Cadence reserves the right to revoke this authorization at any time, and any such use shall be
discontinued immediately upon written notice from Cadence.
Disclaimer: Information in this publication is subject to change without notice and does not represent a
commitment on the part of Cadence. The information contained herein is the proprietary and confidential
information of Cadence or its licensors, and is supplied subject to, and may be used only by Cadence’s
customer in accordance with, a written agreement between Cadence and its customer. Except as may be
explicitly set forth in such agreement, Cadence does not make, and expressly disclaims, any
representations or warranties as to the completeness, accuracy or usefulness of the information contained
in this document. Cadence does not warrant that use of such information will not infringe any third party
rights, nor does Cadence assume any liability for damages or costs of any kind that may result from use of
such information.
Restricted Rights: Use, duplication, or disclosure by the Government is subject to restrictions as set forth
in FAR52.227-14 and DFAR252.227-7013 et seq. or its successor.
Virtuoso Advanced Analysis Tools User Guide
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Typographic and Syntax Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1
Corners Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Getting Started with Corners Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
How Corners Analysis Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Opening and Closing the Virtuoso® Analog Corners Analysis Window . . . . . . . . . . . 10
Getting to Know the Virtuoso® Analog Corners Analysis Window . . . . . . . . . . . . . . . . . 12
Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Process and Base Directory Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Corner Definitions Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Performance Measurements Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Split Pane Adjustment Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Status Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Keyboard Navigation and Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Running a Corners Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Defining the Process and Corners for an Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Defining Performance Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Controlling the Corners Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Evaluating Corners Analysis Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Text Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Graphic Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Saving Setup Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Saving Setup Information to the Original Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Saving Setup Information to a Specified File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Saving a Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Using Process, Design, and Modeling Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Creating Process and Design Customization Files . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Using a .cdsinit File to Load PCFs and DCFs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2
Statistical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Getting Started with Statistical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
How Statistical Analysis Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Data Types Generated by the Statistical Analysis Tool . . . . . . . . . . . . . . . . . . . . . . . 76
Opening the Analog Statistical Analysis Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Getting to Know the Analog Statistical Analysis Window . . . . . . . . . . . . . . . . . . . . . . . . . 78
Status Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Analysis Setup Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Outputs Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Edit Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Button Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Running a Statistical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Specifying the Characteristics of a Statistical Analysis . . . . . . . . . . . . . . . . . . . . . . . 86
Selecting Signals and Expressions to Analyze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Defining Correlations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Starting and Stopping the Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Saving Statistical Analysis Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Saving and Restoring a Statistical Analysis Session . . . . . . . . . . . . . . . . . . . . . . . . 101
How the Statistical Analysis Option Uses the Analysis Variation Setting . . . . . . . . . 104
3
Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Getting Started with Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
How Optimization Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Getting Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Opening and Closing the Virtuoso® Analog Circuit Optimization Option Window . . 162
Getting to Know the Virtuoso® Analog Circuit Optimization Option Window . . . . . . . . . 163
Status Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Goals Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Variables Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Tool Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Running an Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Defining Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
Preparing Design Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Controlling the Optimizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Preface
This manual describes how to use the Virtuoso® advanced analysis tools:
■ The Virtuoso® analog statistical analysis option
■ The Virtuoso® analog corners analysis option
■ The Virtuoso® analog optimization analysis option
The guidance here is designed for users who are already familiar with circuit design and
simulation.
Related Documents
The Virtuoso® advanced analysis tools are often used within the Virtuoso® analog design
environment. The following documents give further information.
■ All the analysis tools open from the Virtuoso® Analog Design Environment window. For
information about using that window, see the Virtuoso® Analog Design Environment
User Guide.
■ For information about using the advanced analysis tools in the Open Command
Environment for Analysis (OCEAN) environment, see the OCEAN Reference.
■ For information about Cadence SKILL language procedural interface commands for the
Corners customization files, see the Virtuoso® Analog Design Environment SKILL
Language Reference.
literal Words in nonitalic monospaced type indicate text you must type
exactly as it is presented. These words represent command
(function or routine) or option names or system output.
argument... Words in italic monospaced type indicate text that you must
replace with an appropriate argument or other data, such as a
path. The three dots indicate that you can repeat the argument.
Substitute one or more names or values.
1
Corners Analysis
Corners analysis provides a convenient way to measure circuit performance while simulating
a circuit with sets of parameter values that represent the most extreme variations in a
manufacturing process.
With the Virtuoso ® Analog Corners Analysis option, you can compare the results for each
set of parameter values with the range of acceptable performance values. You can ensure the
largest possible yield of circuits at the end of the manufacturing process by also revising the
circuit, so that all the sets of parameters produce acceptable results.
This chapter explains in detail how you can use the corners analysis option to generate
information about the yields from your circuit designs.
■ “Getting Started with Corners Analysis” on page 9
■ “Getting to Know the Virtuoso® Analog Corners Analysis Window” on page 12
■ “Running a Corners Analysis” on page 20
■ “Evaluating Corners Analysis Results” on page 29
■ “Using Process, Design, and Modeling Files” on page 36
■ “Working through an Extended Example” on page 60
fluctuate randomly around their ideal values. The combined random variation for all the
components results in an uncertain yield for the circuit as a whole.
Corners analysis looks at the performance outcomes generated from the most extreme
variations expected in the process, voltage and temperature values (the corners).
With this information, you can determine whether the circuit performance specifications will
be met, even when the random process variations combine in their most unfavorable
patterns.
You can use Corners in the Virtuoso® Analog Design Environment in one of two ways:
1. By using the Corners user interface
2. By using your own process and design customization files
You will see more about these in subsequent sections of this chapter.
If you have defined a set of customization files to be loaded automatically, the Virtuoso ®
Analog Corners Analysis window appears.
Menu
Process field
Performance
Measurements pane
Status display
Menu
The menu contains the commands needed to prepare for, run and plot the results of a corners
analysis.
For guidance on using the menu selections, see the associated cross-references.
The Base Directory field displays the path that contains the models used in the analysis for
the process being displayed in the process field.
The Process field displays either the name of the current process or None, if no process is
specified. The processes are usually defined in customization files but can also be defined
from the graphical user interface.
If there is no current process, the only active Virtuoso ® Analog Corners Analysis window
menu options are File – Load, File – Close, and Setup – Add Process. These menu
options allow you to either load an existing file that defines a process or to define a new
process.
The information in this pane is usually loaded from process customization files (PCFs) and
design customization files (DCFs) using paths defined in your .cdsinit file. For details
refer to the section Using a .cdsinit File to Load PCFs and DCFs.
To define or revise corners, you modify the information in this pane.
■ Each column characterizes a corner. You can select a column by clicking on the
corresponding button along the top of the pane.
■ You can also physically move the corner columns by dragging them around in the column
header.
■ You can alter the width of columns by grabbing the separation bar and dragging it one
way or the other. There are certain limits (upper and lower) to how big or small you can
make a column. This also differs by column type in the case of the measurement table.
■ Disabled corners are grayed or fuzzed out in the form, while enabled corners are
displayed in normal text.
■ Each row (or variable) begins with a group name or design variable name, followed by
the values to be used in each of the corners.
■ You can select a variable by clicking on the corresponding button along the left side of
the pane. You can drag a selection of variables by clicking and moving the cursor in the
variable header.
■ Editable data in the Corners table looks like normal text, while uneditable data in the
Corners table has a dark gray background. Data loaded from a PCF is non-editable.
■ Uneditable group/variant entries appear as a text field with the value of the field in text.
Editable group/variant entries appear as a drop-down box.
Note: Temperature is a default variable with default value of 27. From release 5.1.41, this is
an editable field.
The items in the Corner Definitions pane are described in the following table:
The information in this pane is usually loaded from design customization files (DCFs) using
the loadDcf command in your .cdsinit file. In addition, any outputs defined in the
Virtuoso ® Analog Design Environment window when you first start the corners analysis
option also appear. You can also load measurements from PCF files. You can also use the
Calculator to get an expression.
Note: You can also use the Add Measurement button to add a measurement.
To specify or change the measurements, you modify the information in this pane. You can
select a measurement by clicking in any of the fields in the measurement pane.
Note: The Cut, Paste and Copy keys work in the table fields. You can use these keys to
copy a measurement expression into another expression, from within the Corners window.
The items in the Performance Measurements pane are described in the following table:
Status Display
The status display shows messages in one of three colors, depending on the type of
message.
The corners analysis tool also writes messages to the corners log file, corners0.log. The
corners analysis tool puts the log file in the directory where you start the Cadence® software.
Tab Moves through table entries from left to right. Wraps to the next row
and at the end jumps back to the top.
Shift-Tab Reverse of Tab.
Arrow keys Moves as expected, does not wrap around at all.
F2 Opens/Closes a cyclic box.
Page Down Scrolls the table down if there is a vertical scroll bar.
Page Up Scrolls the table up if there is a vertical scroll bar.
Home Moves to the first column in the row.
End Moves to the last column in the row.
To tailor the predefined corners to the specific circuits you are working on, you can also load
one or more files containing changes and additions to the basic set of corners. These files
are called design customization files (DCFs). For information on preparing PCFs and DCFs,
see “Creating Process and Design Customization Files” on page 37.
If, after loading the PCFs and DCFs, you find that more changes are necessary, you can use
the graphical user interface to specify new corners or change any editable existing corners.
You can load multiple sets of corners information into the corners analysis option.
■ If you load a file or files that define more than one process, the processes appear in the
Process cyclic field in the Virtuoso ® Analog Corners Analysis window.
■ If you add more than one file (such as a DCF), that modifies a specific process, the
contents of files that are loaded are added to the contents of the existing files.
You can add a process using the procedure described in “Using the Virtuoso® Analog
Corners Analysis Window to Define a Process” on page 57.
There are various ways to load PCFs and DCFs. One such way is through the .cdsinit file.
The .cdsinit file typically specifies the PCFs and DCFs, so usually when you open the
Virtuoso ® Analog Corners Analysis window, it already contains some corner, variable,
and measurement definitions. However, if there are no predefined corners or if you need to
load a different set, you can use the following steps to load PCFs and DCFs from the
graphical user interface. The third way of loading PCFs and DCFs is through an OCEAN
script.
1. Choose File – Load.
If you have made changes in the Virtuoso ® Analog Corners Analysis window, the
Save Changes? dialog box appears.
2. Click either Save or Save As to save the changes. If you do not want to save the
changes made, but want to load the PCFs and DCFs anyway, click Don’t Save. Click
Cancel Load if you want to retain the existing set of PCFs and DCFs.
3. Click on the Look In drop down field to go to the specific directory. You can also navigate
using the iconified buttons located next to the Look In field. Placing the pointer on each
of the buttons displays a tooltip that describes the function of the button, as follows:
Button Function
Up One Level Opens the directory one level above the
active directory.
Home Opens the home directory.
Create New Folder Creates a new directory in the active
directory.
List Shows the names of the files in the directory.
Button Function
Details Shows additional information about the files
such as the file size and the date last saved.
Note: You can double-click a directory folder to descend into that directory.
4. In the Files of Types field, select a type of file from the given list. The list of files is
automatically updated. Default is All Files(*.*).
5. Select the file that you want to load. The name of the file is reflected in the File Name
field. Click on Load button to load the file. Click on Cancel button if you want to cancel
the operation.
If you need to specify additional corners from those loaded in the PCFs and DCFs, you can
create new corners in the graphical user interface. You can either create new corners or copy
existing corners and modify them.
If one of the existing corners is similar to the corner you want to use, you can copy the existing
corner and change the copy to meet your needs
1. Highlight the column for the corner you want to copy.
2. Choose Edit – Corner Definition – Copy Corner. You can also click on the Copy
Corners button.
The Enter Corner Name form is displayed.
3. Enter a name for the new corner.
4. If you do not want to continue, click Cancel Copy Corner. Click OK if you want to
continue. A new column appears at the right side of the Corner Definitions pane of the
Virtuoso ® Analog Corners Analysis window.
5. Fill in the rest of the column as necessary.
Enable Corner
Disable Corner
There are three kinds of variables you can define for a corner: group variables, process
variables and design variables. For information on adding group and process variables, see
“Using the Virtuoso® Analog Corners Analysis Window to Modify Process Model Information”
on page 58. For guidance on adding design variables, see the next section.
1. Choose Edit – Corner Definition – Add Variable. You can also click on the Add
Variable button.
The Enter Variable Name form is displayed.
2. Type a name for the new design variable.
The design variable is added not only to the current process but also to all the other
processes listed in the process cyclic field of the Virtuoso ® Analog Corners Analysis
window.
3. Click OK. If you want to continue. Otherwise, click Cancel Add Variable.
4. (Optional) Select the new variable field in each of the corners, and type the values you
want to use.
You cannot delete corners and variables (rows) added by a PCF. However, if the DCFs load
corners you do not plan to use, you can delete them. You can also delete un-needed rows
added by DCFs or from the Virtuoso ® Analog Corners Analysis window. Deleted corners
and rows disappear from the Corners Definition pane of the Virtuoso ® Analog Corners
Analysis window and their underlying data is erased.Corners added from the Corners UI can
also can be deleted.
Deleting Corners
To delete a corner,
1. Highlight the column for the corner you want to delete.
2. Choose Edit – Corner Definitions – Delete Selected or click Delete.
The highlighted column disappears from the pane.
Deleting Rows
To delete a row,
1. Highlight the row you want to delete.
Note: You can delete only rows defined by a DCF or added by using the Virtuoso ®
Analog Corners Analysis window. You cannot delete rows defined in a PCF.
2. Choose Edit – Corner Definitions – Delete Selected or click Delete.
If the existing measurements do not meet your needs, you can add new measurements or
make and modify copies of the existing measurements. If you have no plans to use a
measurement, you can delete it. You can add or change performance measurements either
before or after you run the analysis. You can also specify measurements through a PCF file.
You can delete any measurement displayed in the Virtuoso ® Analog Corners Analysis
window. A deleted measurement disappears from the Performance Measurements pane, and
the data underlying it is erased. If you delete a measurement and then save the setup, the
deleted measurement is not included in the saved setup.
To delete a measurement,
1. Highlight the row for the measurement you want to delete.
2. Choose Edit – Performance measurement – Delete Measurement, or click Delete
Measurement.
The highlighted measurement disappears from the pane.
To stop a simulation running distributed, use Job Monitor. For more information about Job
Monitor, refer to the Virtuoso Analog Distributed Processing Option User Guide.
Note: The Run button automatically changes between Run/Stop depending on whether a
Corners process is currently running or not.
If you want a different set of outputs from those you chose before running the analysis, you
can make new choices in the Performance Measurements pane and then choose Tools –
Plot or Print Outputs from the menu). In response, the corners analysis option evaluates
the selected measurements and displays new lists or plots.
Text Outputs
For a scalar measurement, a text output looks like this.
Each column in this window displays the value of a scalar measurement for each of the
corners. In this example, bandwidth varies from a low of 130.7 K under the slowslow corner
conditions, to a high of 318.7 K under the fastfast corner conditions.
The first column in this window lists the data points for an analysis. Each subsequent column
lists data for a particular corner. In this example, at a frequency of 758.6 Hz, the phase for the
slowslow corner is -336.1 m and for the fastfast corner is -137.6 m.
Graphic Outputs
There are two kinds of graphic output, a residual plot for scalar data and a family-of-curves
plot for waveform data. A residual plot allows you to easily see whether a scalar measurement
falls within the specified boundaries for all of your corners using a histogram like bar plot. A
residual plot looks like this.
The preceding residual plot, has a specified value of 200 for Target and shows that four of
the corners produce values within specifications. One corner produces a value that does not
lie within the lower boundary of the acceptable range. This result implies that yield for the
manufactured circuit will be less than 100 percent if the circuit is produced in its current form.
For greater yield, the circuit designer might want to redesign the circuit so it performs
acceptably for all the corners.
The set of curves for all the corners, looks like this.
The preceding plot shows how the phase varies as a function of frequency for each one of
the corners.
If the PCFs and DCFs are not writable, the corners analysis option reports an error, and
changes and additions made in the Virtuoso ® Analog Corners Analysis window are not
saved.
If the PCFs and DCFs are writable, the corners analysis option saves changes back to those
files, overwriting the original contents of those files. As a result, any comments you might
have in the PCFs or DCFs are overwritten and lost. The corners analysis option saves any
additions to the DCF loaded last, if possible or to a newly created file called
NewEntries.dcf. This implies that if you add any Corners, Variables or Measurements,
they are added to the last loaded DCF. The NewEntries.dcf file is created when no PCF
and no DCF are loaded.
To avoid overwriting comments and to have the changed setup saved in a single easy-to-
understand location, use File -> Save Setup As, described in the following section.
2. Click on the Look In drop down field to go to the specific directory. You can also navigate
using the iconified buttons located next to the Look In field. Placing the pointer on each
of the buttons displays a tooltip that describes the function of the button, as follows:
Button Function
Up One Level Opens the folder one level above the active
folder.
Home Opens the home directory.
Create New Folder Creates a new folder in the active folder.
List Shows the names of the files in the directory.
Details Shows additional information about the files
such as the file size and the date last saved.
Note: You can double-click a directory folder to descend into that directory.
3. In the Files of Types field, select a type of file from the given list. The list of files is
automatically updated. Default is All Files(*.*).
Select the file where the setup information is to be saved. The name of the file is reflected
in the File Name field.
4. Click Save. Click on the Cancel button if you want to cancel the operation.
Note: If you double-click on a selected file, the information will be directly saved to the
file.
All of the existing corners option information, whether loaded from PCFs, DCFs or
through the corners option graphical user interface, is saved to the file you specify. If
necessary, you can then cut and paste the lines into other PCFs and DCFs.
Saving a Script
The Open Command Environment for Analysis (OCEAN) lets you set up, simulate, and
analyze circuit data. OCEAN is a text-based process you can run from a UNIX shell or from
the Command Interpreter Window (CIW). You can type OCEAN commands in an interactive
session, or you can create scripts containing your commands and load those scripts into
OCEAN.
You can use the Virtuoso ® Analog Corners Analysis window to set up the analysis you
need, and save the setup procedure in an OCEAN script. You can then edit the script to add
simulation or postprocessing commands as needed.
For more information about OCEAN commands and scripts, see the OCEAN Reference.
The Save Script As form appears so you can specify a file for the script.
Day-to-day use of the corners analysis option typically does not involve changing a PCF or
DCF. However, if you are involved in writing or changing these kinds of files, read the following
sections for guidance.
You can use any of the corners option SKILL language PI commands in either the PCFs or
DCFs. However, the commands used to define the process, the corners, and the corner
variables are customarily placed in the PCF. The commands used to specify design variables
and measurements, because they are design specific, are usually placed in the DCF.
Commands Normally in a PCF Commands Normally in a DCF
corAddProcess corAddDesignVar
corSetModelFile corSetDesignVarVal
corAddCorner corSetCornerRunTempVal
corAddGroupAndVariantChoices corAddMeas
corAddModelFileAndSectionChoices corSetMeasExpression
corSetCornerModelFileSection corSetMeasLower
corAddProcessVar corSetMeasUpper
corSetProcessVarVal corSetMeasTarget
corSetCornerGroupVariant corSetMeasGraphicalOn
corSetCornerNomTempVal corSetMeasTextualOn
The corSetModelFile command can be used only with the single model library style.
For more information, including the formal syntax for the commands, see the Virtuoso®
Analog Design Environment SKILL Language Reference.
To debug PCFs and DCFs, consider using OCEAN. The feedback the corners analysis option
provides is limited, but OCEAN provides more detailed feedback that makes it easier to find
and correct errors. For examples of OCEAN scripts that illustrate using PCFs and DCFs, see
the following directory in your installation hierarchy:
your_install_dir/tools/dfII/samples/artist/corners
The process customization file (PCF) adds the name of a new process to the corners analysis
option graphical user interface and defines the basic set of corners. For example, the
following PCF adds the process name P50u, specifies the modeling style as
singleModelLib, and defines three corners: slowslow, nominal, and fastfast.
; Example PCF file for the process P50u.
corAddProcess( "P50u" "~/processes" ’singleModelLib )
corSetModelFile("P50u" "P50uModelFile.scs")
; Prepare to add a process variable to each corner.
corAddProcessVar( "P50u" "EdgeEffect" )
; Now add the corners, specifying the values and choices for each.
corAddCorner( "P50u" "fastfast" )
corSetCornerVarVal( "P50u" "fastfast" "EdgeEffect" "1.18" )
corAddCorner( "P50u" "slowslow" )
corSetCornerVarVal( "P50u" "slowslow" "EdgeEffect" "1.12" )
corAddCorner( "P50u" "nominal" )
corSetCornerVarVal( "P50u" "nominal" "EdgeEffect" "1.15" )
The modeling values for the fastest, typical, and slowest variants are not defined in
the PCF. Instead, they are defined in the modeling file. For example, assume the
P50uModelFile.scs referred to by the P50u PCF contains the following statements.
.LIB slowest
.model npn2 npn tf=120n
.model nmosR nmos tox=120n
.ENDL slowest
.LIB typical
.model npn2 npn tf=100n
.model nmosR nmos tox=100n
.ENDL typical
.LIB fastest
.model npn2 npn tf=80n
.model nmosR nmos tox=80n
.ENDL fastest
Loading P50u PCF, which refers to the P50uModelFile.scs, produces the following
arrangement in the Virtuoso ® Analog Corners Analysis window.
Note: temp is always added with 27 being the default value for all corners.
The DCF adds design-specific variables and measurements to the corners analysis option
graphical user interface that is specified in general by information in a PCF. For example, the
following DCF adds a design variable, sets the run temperature, and adds information to the
Performance Measurements pane:
corAddDesignVar( "vss" )
corSetDesignVarVal( "vss" "" )
corSetCornerVarVal( "P50u" "fastfast" "vss" "70" )
corSetCornerVarVal( "P50u" "slowslow" "vss" "50" )
corSetCornerVarVal( "P50u" "nominal" "vss" "60" )
corSetCornerRunTempVal("P50u" "slowslow" -35)
; You must add the measurement before you define it.
corAddMeas( "bandwidth" )
corSetMeasExpression( "bandwidth" "bandwidth(VF('/vout') 3 'low')" )
corSetMeasLower("bandwidth" "8Mhz")
corSetMeasUpper("bandwidth" "12Mhz")
corSetMeasTarget("bandwidth" "10Mhz")
Loading this DCF along with the P50u PCF described in the previous section changes both
panes in the Virtuoso ® Analog Corners Analysis window. The Corner Definitions pane
looks like this.
Whichever way you choose to load your files, you must make sure PCFs and DCFs refer only
to definitions that have already been loaded. Usually, that means you must load PCFs before
you can define corners or measurements in a DCF.
Starting with IC 5.1.41 release, some changes have been made to the Corners modeling
styles. The single numeric style is the default. For third-party OASIS corner integration, the
single model library and single numeric styles are also supported. To use and define corner
processes, you need to have a valid tool session created before loading PCF files.
Cadence recommends the single model library or multiple model library styles for users
running the Cadence ® Spectre ® Circuit Simulator. For users running the SpectreS
simulator, Cadence recommends the multiple numeric modeling style. The remaining two
modeling styles, single numeric and multiple parametric, should be used with caution.
The following sections illustrate the file structures used by these styles and give examples of
PCFs tailored to each style. For detailed information, see the sections listed below.
■ “Single Model Library Style”
■ “Multiple Model Library Style” on page 48
■ “Single Numeric Style” on page 51
■ “Multiple Numeric Style” on page 52
■ “Multiple Parametric Modeling” on page 54
The following table illustrates the single model library style with an example path, file, and file
contents. If you prefer, you can also use the .LIB syntax for this modeling style. The .LIB
syntax is an hspice modelling syntax that is supported in Spectre.
Single Model Library Style (Native Spectre)
section nom
model npn2 npn tf=100n
model npn9 npn tf=300n
model nmosR nmos tox=100n
model nmos8 nmos tox=300n
endsection
section fastfast
model npn2 npn tf=80n
model npn9 npn tf=380n
model nmosR nmos tox=80n
model nmos8 nmos tox=380n
endsection
endlibrary
The following code illustrates how you can refer to this modeling structure in a PCF.
corAddProcess("fab6" "./CORNERS/fab6/" ’singleModelLib)
corSetModelFile("fab6" "mylibfile.scs")
corAddProcessVar("fab6" "vdc")
corAddCorner("fab6" "slowslow"
?runTemp 20
?nomTemp 27
?vars ’( ("vdc" 2) )
)
The Virtuoso ® Analog Corners Analysis window produced by this PCF looks like this.
Starting with the IC 5.1.41 release, you can specify the same section in a single model library
style with several corners associated with your design. These changes require that you define
the corSetCornerGroupVariant() function as follows:
corSetCornerGroupVariant( <process_Name> <corner_Name> <group_Name> <variant> )
where:
process_Name The existing process you want to use, for example, fab6.
group_Name Any name with which you want to group your variants.
variant The name of the variant you want to specify with different
corners.
The following code illustrates how you can refer to same section or variant within several
corners or groups using the single model library style in a PCF.
corAddProcess("singleModelLib" "./CORNERS/singleModelLib" ’singleModelLib)
corSetModelFile("singleModelLib" "singleModelLib.scs")
corAddProcessVar("singleModelLib" "vdd")
corAddProcessVar("singleModelLib" "vss")
corAddDesignVar( "Cload" )
corAddMeas( "DCgain" )
corSetMeasTarget( "DCgain" 60 )
corSetMeasEnabled( "DCgain" t )
corSetMeasGraphicalOn( "DCgain" t )
corAddMeas( "bandwidth" )
corSetMeasEnabled( "bandwidth" t )
corSetMeasGraphicalOn( "bandwidth" t )
corAddMeas( "gain" )
corSetMeasEnabled( "gain" t )
corSetMeasGraphicalOn( "gain" t )
corAddMeas( "phase" )
corSetMeasEnabled( "phase" t )
corSetMeasGraphicalOn( "phase" t )
The Virtuoso ® Analog Corners Analysis window produced by this PCF looks like this.
This style uses multiple library files, which must be specified by using the
corAddModelFileAndSectionChoices and corAddCorner commands in a PCF or
DCF. In other ways, this style is the same as the single model library style. For example, the
models might be located in the following files:
./CORNERS/fab6/path1/npn.scs
./CORNERS/fab6/path3/nmos.scs
The following table illustrates the multiple model library style. If you prefer, you can also use
the .LIB syntax for this modeling style.
Multiple Model Library Style
section nom
model npn2 bjt tf=100n
model npn8 bjt tf=60n
endsection
section fast
model npn2 bjt tf=80n
model npn8 bjt tf=50n
endsection
endlibrary
./CORNERS/fab6/ nmos.scs library nmos
path3/ section slow
model nmosR mos3 tox=120n
model nmos2 mos3 tox=140n
endsection
section nom
model nmosR mos3 tox=100n
model nmos2 mos3 tox=115n
endsection
section fast
model nmosR mos3 tox=80n
model nmos2 mos3 tox=90n
endsection
endlibrary
The following code illustrates how you can refer to this multiple model library structure in a
PCF.
corAddProcess("fab6" "./CORNERS/fab6/" 'multipleModelLib)
corAddModelFileAndSectionChoices("fab6" "path1/npn.scs"
The Virtuoso ® Analog Corners Analysis window produced by this PCF looks like this.
The following table illustrates the file structure and contents for a model with three corners,
using the single numeric modeling style.
Single Numeric Style
The following code illustrates how you can refer to this modeling structure in a PCF.
corAddProcess("fab6" "./CORNERS/fab6" ’singleNumeric)
corAddCorner("fab6" "allslow"
?runTemp -55
)
corAddCorner("fab6" "allnom"
?runTemp -27
)
corAddCorner("fab6" "allfast"
?runTemp 55
)
The Virtuoso ® Analog Corners Analysis window produced by this PCF looks like this.
The following table illustrates the file structure and contents for the multiple numeric style.
Multiple Numerics
The following code illustrates how you can refer to this modeling structure in a PCF.
corAddProcess("fab6" "./CORNERS/fab6" ’multipleNumeric)
corAddGroupAndVariantChoices("fab6" "npn"
’("slow" "nom" "fast")
)
corAddGroupAndVariantChoices("fab6" "nmos"
’("slow" "nom" "fast")
)
corAddCorner("fab6" "slowslow"
?variants ’(
("npn" "slow")
("nmos" "slow")
)
?nomTemp -55
?vars ’( ("Cload" 260f) )
)
corAddCorner("fab6" "slowfast"
?variants ’(
("npn" "slow")
("nmos" "fast")
)
?nomTemp -55
?vars ’( ("Cload" 200f) )
)
The Virtuoso ® Analog Corners Analysis window produced by this PCF looks like this.
Using the Multiple Numeric Modeling Style with the Spectre Simulator
When you run a multiple numeric modeling style corners analysis with the Spectre simulator,
ensure that the .cdsenv variable includeStyle is set to t.
The following table illustrates the file structure and contents for the multiple parametric
modeling style.
Multiple Parametric Style
The following code illustrates how you can refer to this modeling structure in a PCF.
corAddProcess("fab6" "./CORNERS/fab6" 'multipleParametric)
corAddGroupAndVariantChoices("fab6" "npn2"
'("slow" "nominal" "fast")
)
corAddGroupAndVariantChoices("fab6" "nmos8"
'("slow" "nominal" "fast")
)
corAddGroupAndVariantChoices("fab6" "npn9"
'("slow" "nominal" "fast")
)
corAddGroupAndVariantChoices("fab6" "nmosR"
'("slow" "nominal" "fast")
)
corAddCorner("fab6" "slowslow"
?variants '(
("npn2" "slow")
("nmos8" "slow")
("npn9" "slow")
("nmosR" "slow")
)
?nomTemp -55
)
corAddCorner("fab6" "slowfast"
?variants '(
("npn2" "slow")
("nmos8" "fast")
("npn9" "slow")
("nmosR" "fast")
)
?nomTemp -55
)
The Virtuoso ® Analog Corners Analysis window produced by this PCF looks like this.
Using the Multiple Parametric Modeling Style with the Spectre Simulator
When you run a multiple parametric modeling style corners analysis with the Spectre
simulator, ensure that the .cdsenv variable includeStyle is set to t.
To use a multiple parametric modeling style with a socket simulator, specify the parameter
files in an update.s file. For example, update.s might contain
use npn2.s
use npn9.s
use nmosR.s
use nmos8.s
If you want to be able to override parameter declarations for specific corners, put these use
statements in an init.s file instead of in an update.s file. Because parameters defined in
the corners analysis option are processed after init.s parameters, you can use the corners
analysis option to override the init.s parameters.
Note: Corners is designed such that it does not create a runObjFile in each psf directory
it creates. Therefore, the results browser cannot be used to browse through the directories.
In order to browse individual directories, you can use the Create ROF feature.
2. In the Process Name field, type the name you want to use for the new process.
3. Choose the model style you want to use for the new process.
4. Type the name of the base directory for the model file or files associated with the new
process.
5. If the model style you choose in Step 3 is Single Model Library, type the name of the
associated model file.
6. Type the names of process variables you want to add, separating them with a comma or
white space. (To delete process variables, select the row and click Delete in the
Virtuoso ® Analog Corners Analysis window.)
7. Click OK in the Add Process form to close it.
Using the Virtuoso® Analog Corners Analysis Window to Modify Process Model
Information
This form has two tabs: Process and Group/Variants.Only certain modeling styles allow the
Groups and Variants. You need to make modifications in all tabs before adding or updating
the process. Otherwise, you will have to get back in and update the process again.
1. Choose the Process that you want to change.
2. Choose the Model Style that you want to use for the changed process.
3. Type the name of the Base Directory for the model file or files associated with the
changed process. The form appears with the process base directory.
4. If the model style you choose in Step 3 is Single Model Library, type the name of the
associated model file.
5. Type the names of process variables you want to add, separating them with commas or
spaces. (To delete process variables, select the row and click Delete in the Virtuoso ®
Analog Corners Analysis window.)
6. Click OK in the Update Process/Model Info form to close it.
and start icms. A .cdsinit file and the other files you need to run this example are all
included at that location.
This schematic includes several instances of pmos and nmos transistors. Each of the pmos
transistors is nominally identical. Similarly, each of the nmos transistors is nominally identical.
In reality, however, the attributes of each transistor differ slightly from the attributes of each of
the other transistors. In this example, you explore the extent of the variation and the effect the
variation has on the performance of the circuit.
3. Select the RF_lib library and the foldedCascode cell. Click OK.
4. In the Virtuoso ® Analog Design Environment window, choose Session – Load
State.
The Loading State form appears.
5. Choose Corners from the State Name cyclic field. Click OK.
6. In the Virtuoso ® Analog Design Environment window, choose Outputs – To Be
Plotted – Select On Schematic.
The schematic window appears.
7. Click on the net connected to vout in the right side of the plot, then press the Esc key.
There are other outputs defined in the PCF, but this demonstrates how outputs defined
in the Virtuoso ® Analog Design Environment window are incorporated into the
Virtuoso ® Analog Corners Analysis window.
Modeling Style
This example uses the multiple model library style with the variants for pmos components
defined in one file of the multipleModelLib directory and the variants for nmos
components defined in another file of that same directory.
As implemented in this example, the parameters for the variants are not actually included in
this file, although they could be. This example instead uses include statements to include
the files that contain the actual models.
The ../nmos/typ/nmos.scs file referred to in the nom section, for example, contains
simulator lang=spice
* VTI-derived Level=2 nominal model
.model nmos nmos level=2
+ vto = 0.775
+ tox = 400e-10
+ nsub = 8e+15
+ xj = 0.15U
+ ld = 0.20U
+ u0 = 650
+ ucrit = 0.62e+5
+ uexp = 0.125
+ vmax = 5.1e+4
+ neff = 4.0
+ delta = 1.4
+ rsh = 36
+ cgso = 1.95e-10
+ cgdo = 1.95e-10
+ cj = 195U
+ cjsw = 500P
+ mj = 0.76
+ mjsw = 0.30
+ pb = 0.8
These are the values the simulator uses when you run a corner that has the value of the nmos
variant set to nom. When you run a corner that uses the slow variant for the nmos
components, the simulator uses the values defined in
../nmos/slow/nmos.scs
+ tox = 430e-10
+ nsub = 1.0e+16
+ xj = 0.15U
*+ ld = 0.20U
+ ld = 0.075U
+ u0 = 620
+ ucrit = 0.62e5
+ uexp = 0.125
+ vmax = 5.1e4
+ neff = 4.0
+ delta = 1.4
+ rsh = 38
+ cgso = 2.10e-10
+ cgdo = 2.10e-10
+ cj = 215U
+ cjsw = 540P
+ mj = 0.76
+ mjsw = 0.30
+ pb = 0.8
The other variants for the nmos and pmos components are defined similarly.
"pmosLib.scs" "fast" )
corSetCornerNomTempVal( "multipleModelLib" "fastslow" "27" )
corSetCornerRunTempVal( "multipleModelLib" "fastslow" 27 )
corSetCornerVarVal( "multipleModelLib" "fastslow" "Cload" "200f" )
corSetCornerVarVal( "multipleModelLib" "fastslow" "vss" "-3" )
corSetCornerVarVal( "multipleModelLib" "fastslow" "vdd" "3" )
corAddCorner( "multipleModelLib" "typtyp" )
corSetCornerGroupVariant( "multipleModelLib" "typtyp" "nmosLib.scs"
"nom" )
corSetCornerGroupVariant( "multipleModelLib" "typtyp" "pmosLib.scs"
"nom" )
corSetCornerNomTempVal( "multipleModelLib" "typtyp" 27 )
corSetCornerRunTempVal( "multipleModelLib" "typtyp" 27 )
corSetCornerVarVal( "multipleModelLib" "typtyp" "Cload" "200f" )
corSetCornerVarVal( "multipleModelLib" "typtyp" "vss" "-3" )
corSetCornerVarVal( "multipleModelLib" "typtyp" "vdd" "3" )
corAddCorner( "multipleModelLib" "slowfast" )
corSetCornerGroupVariant( "multipleModelLib" "slowfast"
"nmosLib.scs" "fast" )
corSetCornerGroupVariant( "multipleModelLib" "slowfast"
"pmosLib.scs" "slow" )
corSetCornerNomTempVal( "multipleModelLib" "slowfast" "27" )
corSetCornerRunTempVal( "multipleModelLib" "slowfast" 27 )
corSetCornerVarVal( "multipleModelLib" "slowfast" "Cload" "200f" )
corSetCornerVarVal( "multipleModelLib" "slowfast" "vss" "-3" )
corSetCornerVarVal( "multipleModelLib" "slowfast" "vdd" "3" )
corAddCorner( "multipleModelLib" "fastfast" )
corSetCornerGroupVariant( "multipleModelLib" "fastfast"
"nmosLib.scs" "fast" )
corSetCornerGroupVariant( "multipleModelLib" "fastfast"
"pmosLib.scs" "fast" )
corSetCornerNomTempVal( "multipleModelLib" "fastfast" 27 )
corSetCornerRunTempVal( "multipleModelLib" "fastfast" -55 )
corSetCornerVarVal( "multipleModelLib" "fastfast" "Cload" "160f" )
corSetCornerVarVal( "multipleModelLib" "fastfast" "vss" "-3.3" )
corSetCornerVarVal( "multipleModelLib" "fastfast" "vdd" "3.3" )
corAddMeas( "DCgain" )
corSetMeasExpression( "DCgain" "ymax(db20(VF('/vout')))" )
corSetMeasTarget( "DCgain" 60 )
corSetMeasEnabled( "DCgain" t )
corSetMeasGraphicalOn( "DCgain" t )
corSetMeasTextualOn( "DCgain" nil )
corAddMeas( "bandwidth" )
corSetMeasExpression( "bandwidth" "bandwidth(VF('/vout') 3 'low')" )
corSetMeasEnabled( "bandwidth" t )
corSetMeasGraphicalOn( "bandwidth" t )
corSetMeasTextualOn( "bandwidth" nil )
corAddMeas( "gain" )
corSetMeasExpression( "gain" "dB20(VF('/vout'))" )
corSetMeasEnabled( "gain" t )
corSetMeasGraphicalOn( "gain" t )
corSetMeasTextualOn( "gain" nil )
corAddMeas( "phase" )
corSetMeasExpression( "phase" "phase(VF('/vout'))" )
corSetMeasEnabled( "phase" t )
corSetMeasGraphicalOn( "phase" t )
corSetMeasTextualOn( "phase" nil )
You can load a PCF from the Virtuoso ® Analog Corners Analysis window, but it is often
easier to insert a statement in your .cdsinit file that loads the necessary PCFs
automatically. For example, if you look in the included .cdsinit file, you find the following
statement that loads the multipleModelLib.pcf file:
loadPcf( "~/multipleModelLib.pcf" )
The Virtuoso ® Analog Corners Analysis window, in this example, is defined primarily by
the multipleModelLib.pcf. In addition, the following items affect the appearance of the
window.
■ The run temperature variable temp always appears in the Corner Definitions pane of
the window. By default, it has the value 27. For this example, the
multipleModelLib.pcf sets the value of the run temperature explicitly for each
corner using skill function corSetCornerRunTempVal.
■ Any outputs defined in the Virtuoso ® Analog Design Environment window when you
first start the corners analysis option appear in the Performance Measurements pane.
That is why /vout appears as an expression in the Performance Measurements pane
for this example.
When the Virtuoso ® Analog Corners Analysis window opens, the Corner Definitions
pane looks like this. (The slowslow corner, although not visible in this figure, also appears
in the actual Virtuoso ® Analog Corners Analysis window.)
The measurement that appears in the Performance Measurements pane is defined in the
Outputs pane of the Virtuoso ® Analog Design Environment window and is automatically
copied into the Virtuoso ® Analog Corners Analysis window.
The DCgain measurement produces a scalar value. To facilitate analysis, you want to add a
visual indication of the lowest acceptable value to the graphical output of the corners
simulation. To do that, you need to add the appropriate value to the cells in the Performance
Measurements pane.
To add a Lower value by using the Virtuoso ® Analog Corners Analysis window,
1. Click on the Lower cell for the DCgain measurement.
2. Type the value 55 in the cell.
To add a Upper value by using the Virtuoso® Analog Corners Analysis window,
1. Click on the Upper cell for the DCgain measurement.
2. Type the Value 65 in the cell.
All of the measurements produce graphical outputs if you make no further changes, but it
might be useful to have the textual output too. To add the textual output,
➤ Turn on the Textual button in the Outputs column for each of the measurements.
The phase and gain measurements appear as a family of waveforms in the two subwindows
at the top, with each waveform for each corner. The scalar values, DCgain and bandwidth,
appear as bar charts. It is hard to pick out detail in this combined plot, but you can choose
Window – Subwindows in the Waveform Window to open a dialog box that allows you to
choose which plots you want to look at in more detail.
In this plot, the horizontal line in the middle represents the Target value, 60. The bottom line
represents the Lower value, which you set in the Virtuoso ® Analog Corners Analysis
window. The top line represents the Upper value. All of the corners reach the target value. (In
the actual window, each corner displays in a different color so you can determine which
corner is which.) If DCgain for one or more corners fails to reach the target, you might decide
to use a slightly different manufacturing process or to change your circuit so DCgain is
greater.
The fastfast corner produces the highest gain and the slowslow corner produces the
lowest gain throughout the frequency range. You need to determine whether these possible
outcomes are acceptable in your application.
2
Statistical Analysis
Statistical analysis is a powerful method for estimating parametric yields. The sections in this
chapter explain how you can use the Analog Statistical Analysis option to generate
information about the performance characteristics of the circuits you design.
■ “Getting Started with Statistical Analysis” on page 75
■ “Getting to Know the Analog Statistical Analysis Window” on page 78
■ “Running a Statistical Analysis” on page 85
■ “Analyzing Results” on page 106
■ “Working through an Extended Example” on page 128
To prepare for a statistical analysis, you create a design that includes devices or device
models that are assigned statistically varying parameter values. The shape of each statistical
distribution represents the manufacturing tolerances on a device. During the analysis, the
statistical analysis option performs multiple simulations, with each simulation using different
parameter values for the devices based upon the assigned statistical distributions.
When the simulations finish, you can use the data analysis features of the statistical analysis
option to examine how manufacturing tolerances affect the overall production yield of your
design. If necessary, you can then switch to different components or change the design to
improve the yield.
Scalar Data
For each iteration during a statistical analysis, the simulator evaluates explicit expressions
that reduce to a single scalar number. These numbers are stored in a file which will ultimately
be used for data analysis by the user at post-simulation.
The simulator evaluates these scalar expressions during runtime so as to reduce the amount
of generated psf data. For each successive iteration analysis, the simulator typically deletes
the psf data from the previous iteration.
However, it is possible to keep all of the psf data from all of the iterations (Spectre only; see
next data type).
The majority of the statistical analysis tool UI is focused on processing and displaying scalar
data.
For the Spectre® simulator, the process parameters declared in a statistics block in the netlist
are also included in the resulting scalar data file.
Psf Data
This is the same kind of psf data that the simulator typically generates. Usually, this data only
includes the last iteration.
However, for the Spectre ® simulator, the user has the additional option to save the psf data
for all of the iterations. From this data the user can either plot waveforms or regenerate new
scalar data files. Since this data is psf, the user will have to evaluate expressions against this
data to created these waveforms and statistical data. Specific waveform expressions are not
processed during a statistical analysis, only scalar expressions are.
To start the statistical analysis option within the Virtuoso® analog design environment,
Status display
Menu
Analysis Setup
pane
Outputs pane
Edit fields
Button bar
Status Display
The status display shows messages that indicate what the statistical analysis option is doing.
The messages include the following:
■ Simulate
■ Ready
■ Plotting Results
■ Simulate Distributed
During a simulation, the status display also shows which iteration is running and how many
iterations are left to run.
Note: This feature only works outside of distributed processing mode.
Menu
The menu contains the commands needed to prepare for, run and analyze the results of a
statistical analysis.
For guidance on using the menu choices, see the associated cross references:
Statistical Analysis Menu Choices
For a brief description of the items in the Analysis Setup pane, see the following table. For
more detailed information, see “Specifying the Characteristics of a Statistical Analysis” on
page 86.
Field or Selection Description and Usage
Number of Runs Specify how many simulations to run for this statistical
analysis.
Starting Run # Specify the starting run number.
Analysis Variation Select the type of statistical variation to be used.
Swept Parameter If desired, select temperature or a design variable to
sweep.
Append to Previous Scalar Enable this button to append scalar output data to
Data previously saved scalar data. This feature is not supported
in the distributed processing mode. For the Spectre®
simulator, all of the pertinent UI fields are checked for
compatibility with the existing scalar data set prior to
allowing a Monte Carlo run.
Save Data Between Runs to Enable this button to save the raw output data (the
Allow Family Plots parameter storage format [psf] files) for all the statistical
analysis iterations.
Turn this button off if you want the raw output data to be
deleted before each iteration. In which case, only the psf
data for the last iteration will ultimately be saved. The
ability to append to previous psf data is currently not
supported. This button only appears if you use the
Spectre® simulator.
Outputs Pane
The Analog Statistical Analysis window Outputs pane initially lists the expressions and
signals defined in the Outputs pane of the Virtuoso® Analog Design Environment
window.
The columns in the Outputs pane are described in the following table.
Column Description and Usage
Name A field showing the existing name for the expression or signal.
For expressions that evaluate to a scalar, the final name of the
statistical data set will be of the form name_varval. Where
name is the name on this pane and varval is the particular
swept variable value (if none, defaults to temperature).
Expression/Signal A field showing either an expression or a signal name.
Edit Fields
These fields, located beneath the Outputs pane, are used to add output signals and to add
or modify output expressions.
For more information, see “Working Directly with Expressions and Signals” on page 89.
Button Bar
The buttons at the bottom of the Analog Statistical Analysis window operate on the Outputs
pane and the edit fields.
Button Description and Usage
Add Click to add a signal or expression defined in the edit fields to
the list of signals and expressions.
Delete Click to delete a signal or expression that is highlighted in the
Outputs pane.
Change Click to replace a signal or expression that is highlighted in
the Outputs pane with whatever is in the edit fields.
Clear Click to clear the edit fields and remove any highlighting in the
Outputs pane.
Calculator Click to open the calculator so that you can build a new signal
or expression in the calculator display buffer.
Get Expression Click to fill the Expression/Signal field with the signal or
expression that is currently in the calculator display buffer.
6. (Spectre simulator only) Select the Save Data Between Runs to Allow Family Plots
button if you want to be able to plot graphs showing the variation of entire waveforms or
if you want to evaluate expressions after the analysis finishes.
Be aware that with this option enabled, the amount of data saved during an analysis can
be very large. To reduce disk storage requirements, avoid saving all voltages and
currents. Instead, select only the specific nodes and terminals referenced by your output
expressions.
The statistical analysis option calculates and saves the results of scalar expressions after
every run, whether Save Data Between Runs to Allow Family Plots is selected or
not.
You can use the Outputs pane, edit fields, and button bar to add or delete signals and to add,
delete or change expressions.
Changing an Expression
To change an expression:
1. Highlight the expression in the Outputs pane.
The expression appears in the edit fields.
2. Working in the edit fields, make any necessary changes to the name, expression, and
autoplot values.
3. Click Change.
To avoid typing in an expression and signal names, you can build an expression in the
calculator and then import the finished expression into the Analog Statistical Analysis
window.
1. Click Calculator to open the calculator window.
2. Use the buttons and commands in the calculator window to build the expression you
need. Leave the completed expression in the display buffer of the calculator.
3. In the Analog Statistical Analysis window, click Get Expression.
In order to create effective monte carlo expressions, knowledge of the two basic types of data
access functions is critical:
This type searches for a particular analysis alias or type. The alias or type to be sought
after is hardcoded according to the function name, there is no specific type argument on
these functions. For example, the VF() function will look for a voltage (V) signal in the
first found occurrence of ac data (Frequency), whereas the IT() function will look for a
current (I) in transient data (Time).
Here are examples of VF() expressions that can be declared:
mag(VF("/net2") 1e6) => waveform
value(mag(VF("/net2") 1e6)) => scalar
a. First look for a specific aliased data name in the current results. For example, the
VF() function would first look for psf data aliased to the name ’ac. If found, then this
data is retrieved.
For more information on alias names, see the section titled Data Name Aliasing.
b. If (1) does not find an alias name match, then the function reverts to a data type
wildcard search operation. Instead of looking for a name match, the function will now
search for the first occurrence of any psf data with a type that matches the one
related to the function name. For example, the VF() function will now look for a
voltage (V) signal in the first found occurrence of ac type data.
This type searches for a particular analysis name (or alias). These functions require
that a psf data name (or its alias) be specified. The benefit to these functions is that
there is no ambiguity as to which data set will be retrieved. Here are examples of ac
data expressions that can be declared:
mag(v("/net2" ?result "ac") 1e6) => waveform
value(mag(getData("/net2" ?result ’ac) 1e6)) => scalar
All of the Ocean data access functions are name dependent. The most commonly
used functions are getData(), v() and i().
During the course of using the Statistical Analysis tool, the spectre simulator can create up
to nine distinct data names for each analysis type. The name of data being accessed depends
both on the UI configuration for the statistical analysis run and on when the data is being
accessed (by spectre at runtime or by the UI for post processing/plotting).
As a result, a method to declare a single data name that was the equivalent to the nine above
mentioned data name formats was added. Now, when data is selected/loaded, the data
access code automatically aliases any found version of the nine possible data name formats
to the base name equivalent.
For any currently selected/loaded data the user can see what alias names have been
assigned by typing the following command into the ciw:
setof(ana results() symbolp(ana))
In this example, we know that the "mc1_ac-montecarlo" psf data will be accessed for
either of the following functions:
VF("/net2")
getData("/net2" ?result ’ac)
So long as all functions which are analysis name dependent use the proper alias name, the
proper data will be retrieved throughout all phases of using the Statistical Analysis tool.
Note that this aliasing is tightly tied to the analysis names that the ADE netlister generates. If
the user tries to run a standalone netlist with different names, the aliasing may not work
properly. The same goes for declaring analyses via an include file. The Statistical Analysis UI
is only intended for use directly within the ADE product.
Many of the data access functions have an optional results directory argument. This
argument must not be set for any expression being used in monte carlo. For more information,
see the Creating Monte Carlo Compatible Expressions section.
Most of the calculator buttons produce valid expressions for use in the monte carlo flow (this
does not include the results browser button or tool).
Most of the results browser generated data access expressions must be hand edited in order
to conform to the expression syntax requirements of the monte carlo flow.
Most of the ADE->Results->Direct_Plot forms produce the proper expression syntax (via
the Add to Outputs utility). These forms typically produce ocean expressions, but some still
produce old ael style functions.
Before any function/expression will work properly in the Monte Carlo tool, the following Monte
Carlo Expression Syntax Rules should be followed:
1. Whenever an analysis name argument is required, like for Ocean functions, always use
the proper alias name.
2. Never include the current run directory in an expression. When using the results browser
to capture a data access expression in the calculator, always manually delete the run
directory component of the expression.
For example, the results browser may declare something like this in the calculator:
v( "/net4" ?result "ac-ac" ?resultsDir
"/hm/test/simulation/ampTest/spectre/schematic" )
❑ All of the scalar data points for an expression is either of the two error flag values (-
1.11111e36 and -2.22222e36).
❑ Spectre aborts via the nominal run expression error checker.
Some expressions can require significant evaluation times for the Simulation-
>Check_Expressions and Results->Evaluate_Expressions capabilities of the UI. The bigger
the family of psf data created by spectre, the greater the evaluation times of these two utilities.
The analyses that are mostly affected are tran, sp and the rf ones.
The spectre simulator does not experience this slowdown in performance because it only
operates on a single iteration at any one time. It never processes the entire psf family of
iterations data.
Depending on the scope of psf data generated, the user can get better performance out of an
expression if they simply re-arrange it.
Some functions with complicated internal calculations compound the amount of time required
for evaluation. A prime example is the s-parameter yp() Ocean function. This function
requires performing internal matrix manipulations. As the data sets that yp() operates on grow
linearly, the matrix evaluation time grows exponentially. As a result, it is best to reduce the
data going into the yp() function as opposed to reducing the data coming out of it. For
example, although the following expression is simplistic:
value(yp(sp(1 1 ?result ’sp) sp(1 2 ?result ’sp)
sp(2 1 ?result ’sp) sp(2 2 ?result ’sp)) 1M)
The user will get much better performance if they re-arrange the expression to be:
yp(value(sp(1 1 ?result ’sp) 1M) value(sp(1 2 ?result ’sp) 1M)
value(sp(2 1 ?result ’sp) 1M) value(sp(2 2 ?result ’sp) 1M))
Note: The YP() ael function is doomed to be slow because it does not allow the user to
reduce the dimension of the input s-parameters.
Therefore, it depends on how far the customer wants to go to optimize their expressions. For
transient and s-parameter data, It is highly recommend that they optimize as much as
absolutely possible.
To save all of the node voltages and terminal currents for later use, perform the following,
1. In the Analog Statistical Analysis window, choose Outputs – Save All.
The options displayed in the form depend on the simulator you use.
2. Select appropriate voltages, currents, or both and click OK.
To reduce the amount of disk space required, select the currents and voltages that
appear in your output expressions and consider selecting individual nets or nodes. For
more information about the Save Options form, see the Virtuoso ® Analog Design
Environment User Guide.
Note: Be aware of the following information about cdsSpice simulations:
❑ In cdsSpice simulations, data for terminals in lower-level schematics is not saved
when you use the Save Options form to save all currents. You must explicitly select
After all the desired output expressions are declared, the user should execute the following
utility prior to starting the statistical analysis run:
➤ Simulation -> Check Expressions
This capability is used to both check and classify each expression element in the Outputs
Pane. Each expression is evaluated against the currently selected/loaded psf data. This data
can either be from a previous statistical analysis or from a straight Virtuoso® Analog Design
Environment simulation. The result of each evaluation is assigned to the Data Type field on
the Outputs Pane. The three possible outcomes are:
For any expression entered into the output pane, it is the users responsibility to ensure that
all the pertinent schematic signals contained in all the expressions will be written to the psf
data. The psf data is always used to calculate the scalar values for each iteration run.
In the event that the user will want to produce waveform plots (see the Plotting Families of
Curves and Changing Waveform Expressions at Post-simulation Time sections) or post
generate the scalar data (see the Creating a New mcdata File from Saved Waveform Data
section) then it is a good practice to save any psf schematic signals that will be needed on a
post-simulation basis.
There are two basic ways to declare which schematic signals should be written to psf by the
simulator:
1. Use the ADE->Outputs->To_Be_Saved->Select_On_Schematic menu capability.
This approach allows the user to click directly on the schematic signals they desire.
Note: This approach is best suited when the user wants to limit the amount of disc space
used for psf data.
2. Use the Monte Carlo Outputs->Save_All form. This is the same form as the ADE one.
The options displayed in the form depend on the simulator you use.
Defining Correlations
Often circuit components are correlated. You can model this behavior by defining correlations
in the model files that you use. As described in this section, you can also use the statistical
analysis option to define correlations.
1. To define correlations, choose Simulation – Define Correlations.
The Statistical Device Correlations form appears.
e. Click Add.
3. When you have defined all the correlations, click OK to close the Statistical Device
Correlations form.
The statistical analysis option adds the correlations to the netlist by inserting a new
statistics block after the statistical analysis definition.
Normally, the analysis stops when all the iterations are complete. In addition, analyses that
use the Spectre simulator stop if errors are found during the nominal simulation that the
Spectre simulator performs.
If you want to stop the analysis before all the iterations are complete, choose Simulation –
Stop. In response, the statistical analysis option
1. Completes the current iteration
2. Stops the analysis
3. Saves the simulation results
4. Plots the results for each signal or expression that has Autoplot set
If you follow the usual procedure of specifying the simulation and then specifying the
statistical analysis that you want to use, the statistical analysis option creates the necessary
input files automatically. However, if you want to hand edit the input files, the statistical
analysis option provides a way for you to do that.
➤ From the Analog Statistical Analysis window, choose Simulation – Create Input Files.
The tool creates the mcrun.s and mcparam files.
A session state consists of all the information in the Analog Statistical Analysis window,
including the Analysis Setup and Outputs information.
2. Type the name of the file where you want to save the session state.
3. Click OK.
2. Type the name of the file that contains the saved session state.
3. Click OK.
The values from the saved session state appear in the Analog Statistical Analysis
window.
2. Type the name of the directory and file where you want the script to be saved.
3. Click OK.
The script is saved in the file. For additional information about using the statistical
analysis option with OCEAN, see the OCEAN Reference.
To open a window that contains the history of the statistical analysis simulations,
The simulator updates the Output Log while the simulation runs, so you might find it useful to
have this window open during the simulation.
To end the session and close the Analog Statistical Analysis window,
➤ Choose Session – Quit.
How the Statistical Analysis Option Uses the Analysis Variation Setting
When you run the statistical analysis option from the Virtuoso® Analog Design Environment
window, you use the Analysis Variation cyclic field to select the kinds of variations to be
used during the analysis. However, the connection between the cyclic field choice and how
your models behave is not automatic—you must define your models so that they respond to
the cyclic field choice.
For the Spectre simulator, you use a statistics block to specify model behavior under the
Analysis Variation cyclic field. See the Analysis Statements chapter of the Spectre
Circuit Simulator Reference for more information. The statistics block must be included in
the netlist before the models. For example, you might use a statistics block with the following
contents:
statistics {
process {
The process and mismatch blocks define the variations for the cyclic field choices.
Before the simulator can use the statistics block, you must include the block in the netlist. For
example, assume that you have a single file called statsLib.scs that has three sections:
parameters, statistics, and models. These sections are arranged so that the
definitions all build without errors.
2. Type the complete path to the statsLib.scs file and click Add.
3. Click OK.
Analyzing Results
You can use the procedures described in the following sections to analyze a set of statistical
analysis results. By default, these procedures operate on the data from a just-concluded
statistical analysis, but you can also analyze saved data from earlier runs. The saved data
can take two forms: either you can use the data in a stored output file or, if the statistical
analysis session that you want to analyze had the Save Data Between Runs to Allow
Family Plots button turned on, you can create a new mcdata output file from the saved
waveform data.
2. Select the results that you want to load and click OK.
3. Verify the names of the files containing the statistical analysis data. At runtime, the UI
automatically assigns the name mcparam for the Parameter File and mcdata for the
Data File. As a result, there are few situations where a user should try to stray from these
names. If the names appear to be proper, then click OK. If either of the file names are
blank, then the data is not present and the user should click Cancel.
Whenever new data is selected/loaded into the Monte Carlo UI, the existing Data Filter form
and its settings are destroyed. A new form is recreated based on the new scalar data
information being read in. As a result, any and all settings on the previous Data Filter form
will be lost. Therefore, it is highly recommended that any declarations made on this form be
immediately saved. Especially if one will be running subsequent simulations of selecting or
loading in results.
Whenever new data is selected/loaded into the Monte Carlo UI, the existing Specification
Limits form and its settings are destroyed. A new form is recreated based on the new scalar
data information being read in. As a result, any and all settings on the previous Specification
Limits form will be lost. Therefore, it is highly recommended that any declarations made on
this form be immediately saved. Especially if one will be running subsequent simulations of
selecting/loading in results.
3. Type the name of the settings file that you want to load and click OK.
Plot, Table, or
Description For More Information
Report
Iteration Versus A table showing the value of a “Printing Iteration versus Value
Value parameter at the end of each Tables” on page 114
iteration.
Correlation A table showing the correlation “Printing Correlation Tables” on
coefficients of each parameter with page 116
each of the other parameters.
Histogram A plot showing the number of runs “Plotting Histograms” on
with scalar parameter values that fall page 117
in each range of values.
Family-of-Curves A plot showing the superimposed “Plotting Families of Curves” on
waveforms for all iterations of a page 119
waveform valued expression.
Scatter Plot A plot depicting the relationship “Plotting Scatter Plots” on
between pairs of parameters. page 120
Simple Yield A report showing the individual and “Obtaining Reports on Simple
total yields for all parameters, given Yields” on page 123
the specification limits.
Plot, Table, or
Description For More Information
Report
Conditional Yield A report showing the effect on the “Obtaining Reports on
rest of the outputs of specification Conditional Yields” on
limits on one parameter. page 126
Multiconditional A report showing individual and total “Obtaining Reports on
Yield yields, given that the selected Multiconditional Yields” on
parameters pass the specification page 125
limits test.
The output expression names revealed when viewing statistical results will be slightly different
than that shown on the Outputs Pane of the UI.
This is because each scalar expression could be evaluated across several swept parameter
values (a UI capability), there would be several distinct data sets created. In order to cope
with having many data sets for a single output expression, the generated parameter name for
each of these data sets is comprised of the original expression name and the value of the
swept parameter. Each name will be of the form:
Name_ParamValue
Where Name is the name assigned on the Outputs pane of the UI and ParamValue is the
particular value of the swept parameter used while that data was generated.
If the Swept Parameter on the UI is set to None, then the value for ParamValue is set to the
temperature value.
Note: In Spectre, The parameters declared in a statistics block of the spectre netlist will also
be written to the statistical results. The naming convention for these parameters is the same
as for expressions, where Name is the name of the statistically varied parameter.
For example, the following figure illustrates a sorted run, with the value and run number
for each measurement listed horizontally across the window.
A correlation table shows the correlation coefficients of each parameter with each of the other
parameters. The parameters are sorted from most correlated to least correlated for each
combination of parameters.
2. Specify a minimum correlation value. Pairs of parameters with correlations lower than
this value do not appear in the table.
3. Click OK.
Each row lists the pair of measurements being considered, the mean and standard
deviation of the first measurement, the mean and standard deviation of the second
measurement, and the number of data points included in the calculation.
Plotting Histograms
To plot a histogram,
1. Choose Results – Plot – Histogram.
The Waveform window appears, showing the distribution of parameter values found
during the statistical analysis run. In this example, the curved line is the density estimator
line.
A family-of-curves shows the superimposed waveforms generated during all of the statistical
analysis iterations. This kind of plot illuminates the variability introduced in waveform
variables by process and mismatch variations.
In order to plot such curves, the Save Data Between Runs to Allow Family Plots button
in the Monte Carlo Analysis Setup Pane must be turned on prior to running the simulation.
To plot a family-of-curves,
➤ Choose Results – Plot – Curves.
The Waveform window opens with the overlapping waveforms. Depending on the
number of iterations included, you might or might not be able to read the legend that
identifies each individual waveform.
2. Highlight one parameter in the X-axis list and one in the Y-axis list.
3. Click Add.
4. (Optional) Repeat steps 2 and 3 for other parameter pairs.
5. (Optional) Click Best Fit Line to draw least squares fit lines on each scatter plot.
6. Click OK.
The Waveform window appears with the values for one parameter of each pair on the
vertical axis and the values for the other parameter on the horizontal axis.
The table below gives an example of a yield calculation. The next few sections use this table
to illustrate the different kinds of yield statistics. In this table, pass or fail indicates whether
that sample passed or failed the specification limit for that parameter.
Table 2-1 Yield Calculation Table Example
p1 p2 p3
Individual yield is the percentage of samples that meet the current specification limits for
each individual parameter. For example, if parameter X has 100 samples of which 80 fall
within the specification limits, the individual yield is 80%. Using the values in Table 2-1 on
page 123, the individual yields are as follows: p1, 66%; p2, 33%; and p3, 100%.
Total yield is the percentage of samples that meet the current specification limits for all
parameters. In Table 2-1 on page 123, of the three samples only sample s1 falls within the
specification limits for all parameters. The total yield, therefore, is 33%.
Multiconditional yield is the individual yield when only the samples for the specified
parameters that are within their respective specification limits are used in the yield
calculation. If the parameter fails the specification limit test, that sample is removed from the
yield calculation. In the example table, the multiconditional yield for p1 with sample s3
removed is as follows: p1, 100%; p2, 50%; and p3, 100%.
Conditional yield is the same as the multiconditional yield except the individual yields are
calculated for each parameter separately.
The simple yield report shows the individual and total yields for all parameters given the
specification limits. A summary line shows
■ Total yield
■ Product of the individual yields
■ Total sample size
2. (Optional) Type a percentage to filter out statistics for samples with high yields.
3. Click OK.
The Results Display Window appears.
The multiconditional yield report shows the individual and total yields when the parameters
you select pass the specification limits test. The subset of all data sets that meet these
specifications is determined, and the yield is calculated from only this subset.
The conditional yield report is similar to the multiconditional yield report, except that the yield
is calculated for each parameter separately. This allows you to quickly view the effects of
conditional yield for several parameters in a single command.
Descending into the amplifier shows that it has the following schematic.
This amplifier schematic includes several instances of npn and pnp transistors. Each of the
npn transistors is nominally identical. Similarly, each of the pnp transistors is nominally
identical. In reality, however, the attributes of each transistor differ randomly from the
attributes of each of the other transistors. In the following sections of this example, you
explore the effect that random variation in transistors has on circuit performance.
To follow along with this example, go to a working directory and use a command like the
following to copy all the contents of the monteCarlo directory into the working directory.
Then go to the working directory you created, start icms, and continue with the following
steps.
1. In the CIW, choose Tools – Analog Environment – Simulation to open the Virtuoso ®
Analog Design Environment window.
2. In the Virtuoso ® Analog Design Environment window, choose Setup – Design.
When the Choosing Design form appears, select the aExamples library and the
lowpass cell. Click OK.
At the end of this series of steps, the Virtuoso® Analog Design Environment window
looks like this.
Model File
This example uses a model file called spectreLib.scs, which contains all the parameters,
statistics, and modeling information that are required.
library monteLib
section param
simulator lang=spectre
parameters PiRho=2500 PbRho=200 npnbeta=145.5 pnpbeta=200
parameters rin1=1000 rin2=5000 rout1=1000 rout2=3000
parameters cin=1.7e-08 cloop=1e-09
parameters mmstat=1 initstat=1
function Rpb(l,w)=(PbRho*l/w)
function Rpi(l,w)=(PiRho*l/w)
endsection param
section stats
simulator lang=spectre
statistics {
process {
vary PiRho dist=gauss std=350
vary PbRho dist=gauss std=50
vary npnbeta dist=lnorm std=.9
vary pnpbeta dist=lnorm std=1.1
vary Rin dist=gauss std=150
vary cin dist=gauss std=20p
vary rin2 dist=gauss std=100
vary Cfb dist=gauss std=.58n
vary rout1 dist=gauss std=30
vary rout2 dist=gauss std=50
}
mismatch {
vary PiRho dist=gauss std=19
vary PbRho dist=gauss std=3.75
vary npnbeta dist=gauss std=4
vary pnpbeta dist=gauss std=6
}
}
endsection stats
section models
simulator lang=spectre
inline subckt npn (C B E S)
parameters brvbe=.6
model mynpn bjt type=npn is=5.771e-17 bf=npnbeta nf=0.9895 vaf=201.6
+ ikf=0.01573 ise=8.976e-18 ne=1.179 br=3.204 nr=0.9944
+ var=27.03 ikr=0.0003047 isc=1.505e-13 nc=1.912 rb=8.706
+ irb=0.001509 rbm=5.833 re=111.8 rc=54.97 xtb=1.5 eg=1.11
+ xti=3 cje=1.983e-12 vje=0.4818 mje=0.2486 tf=0.33e-9
+ xtf=4.359 itf=0.01753 ptf=176.2 cjc=1.749e-12 vjc=0.5989
+ mjc=0.3349 xcjc=0.5 tr=400e-9 cjs=1e-12 vjs=0.75
+ mjs=0.33 fc=0.5 bvbe=brvbe bvce=1
npn (C B E S) mynpn
ends npn
Notice the lines in the models section of the model file that define the mynpn model.
parameters brvbe=.6
model mynpn bjt type=npn is=5.771e-17 bf=npnbeta nf=0.9895 vaf=201.6
In particular, notice how the bf parameter is defined as npnbeta. The npnbeta value varies
randomly according to the distributions specified in the statistics block. Consequently,
the value of the bf model parameter also varies. So that mismatch, which is also specified
for this parameter, is effective, the model is defined within an inline subckt block. This allows
each instance of the model to have a slight perturbation.
The statistics block defines how parameters vary during the analysis. In this case, each
parameter has either a Gaussian or a log-normal distribution with a deviation specified by the
std parameter. All the parameters vary when process variation is specified and four of them
vary when mismatch is specified.
This part of this example is used to verify that the ADE setup is correct. Note that the db20
and phase outputs created plots and that the bandwidth and ymax outputs evaluated to
numbers.
In addition, the psf data created by this run will be used later for expression checking on the
Analog Statistical Analysis UI.
4. Click OK.
5. Make sure the Analysis Setup pane is set correctly. It should look like this:
The Analysis Setup form is set to perform 100 iterations of the circuit, using both process and
mismatch variations. Turning on Save Data Between Runs to Allow Family Plots makes
it possible to plot families of curves for the two waveform expressions, phase and db20.
Note: The state loaded contained the identical Outputs Pane expressions as was initially
copied over from the ADE Outputs section. Had the state contained different expressions,
then they would have been merged with any existing expressions. The original bandwidth
output name was changed to bandw_27 by the state. However, the actual expression
formulation remained unchanged.
Any unwanted Outputs pane expressions can be deleted.
Whenever expressions have been added, loaded or changed, it is a good practice to check
them prior to submitting a statistical analysis simulation.
In this example, we will use the ADE simulation data created in a previous step. Invoke
Simulation->Check_Expressions utility of the Analog Statistical Analysis window.
The expression checking utility will automatically verify and assign the proper Data Type field
to each expression. For any expression with an error, the Data Type field will be set to
"ERROR". In this example, there should be no errors.
When the simulation is finished and was completely successful, the ciw will produce the
following information:
simulation completed successfully.
...
Monte Carlo Simulation completed successfully...
Although this example should run clean, additional information concerning simulation
problems is useful to know. When any problems are encountered throughout the course of
running a statistical analysis, both the ciw and simulator output log offer valuable information.
The following three scenarios reflect the most common problems encountered:
1. For situations where a scalar expression could not be evaluated at a particular iteration,
the following error information is produced in the ciw:
When the spectre output log is reviewed, we would see an error similar to:
**** Run Status for Monte Carlo analysis ‘mc1’ ****
Monte Carlo iteration 1 failed.
The two most common reasons for this type of expression evaluation error are:
a. An analysis pertinent to the expression did not simulate. This is typically due to
convergence problems.
b. The data created is not sufficient to satisfy the expression. For example, the phase
at that iteration did not cross the proper threshold needed by the phaseMargin
function.
Note: In this case, monte carlo scalar data was successfully produced. Any iterations
with errors are assigned error flag values (-1.1111e36 or -2.2222e36).
2. For situations where a scalar expression had syntax errors, the following error
information is produced in the ciw:
Problems encountered during simulation.
Use the Simulation->Output Log menu for more information.
...
Monte Carlo Simulation unsuccessful...
When the spectre output log is reviewed, we would see an error similar to:
Error found by spectre during Monte Carlo analysis ‘mc1’.
designParamVals: Error evaluating ocean expression ‘foo=getData("out")’.
Unsuccessfully evaluated export statements (based on return code).
Analysis ‘mc1’ terminated prematurely due to error.
When the spectre output log is reviewed, we would see the error.
For example:
There are several ways to look at scalar data. As described in the previous section, you can
simply list the data. You can also plot the data in the form of histograms and calculate yields
for the data.
To determine which statistically swept parameters had the biggest impact on the output scalar
measurements, perform the following:
1. Choose Results - Print - Correlation...
2. Set the Suppress Printout for Correlations Less Than field to 0.25 and click OK.
From this data we can see that the bandw_27 expression was mostly influenced by the
Cfb_27 parameter, and the ymax_27 expression was mostly influenced by the
npnbeta parameter. We will use this knowledge further along in this example.
Using Histograms
The ymax_27 distribution shows that the ymax_27 value is almost exactly the same for every
iteration. That value is unaffected by the variations introduced into the circuit by the statistical
analysis.
Scatter plots are very useful for verifying dependencies between different statistical data sets.
Our findings in the Printing Correlation Tables section of this document will help guide this
example.
1. Choose Results - Plot - Scatterplot...
2. Select the bandw_27 entry in the X-axis listbox, and the Cfb_27 entry in the Y-axis
listbox. Click the Add button.
3. Select the npnbeta_27 entry in the Y-axis listbox. Click the Add button. The Scatter
Plot form should look as follows:
4. Click the OK button. The following two scatterplots should be added to the Waveform
Window:
From these two plots we can see that the bandw_27 expression is directly dependent on the
Cfb_27 parameter by observing a straight slanted line of points in the plot. Whereas the
npnbeta parameter has little effect on bandw_27 because there is little order in the plotted
points.
Analyzing Yields
To analyze the yield for this circuit, you first need to define the specification limits for the scalar
parameters. For this example, assume that you can tolerate only 1 sigma of variation.
1. Choose Results – Specification Limits.
These results show that only 64 percent of the iterations produced results where both the
bandw_27and ymax_27 were within specification limits.
Two of the outputs in this example, dB20 and phase, are waveform data. Because this
example was simulated with the Spectre simulator and because Save Data Between Runs
to Allow Family Plots was turned on in the Analog Statistical Analysis window, you can
use family-of-curves plots to examine the data.
1. From the Analog Statistical Analysis window, choose Results – Plot– Curves.
The preceding view is not very useful because the detail is too small to see, but if you
turn off the phase subwindow and zoom in on the dB20 curves, you see a plot like this.
This plot shows that in the frequency range of about 400 K to 100 M, the dB20 value is
affected by the statistical analysis variations introduced in the pnp and npn transistors. If
this frequency range is critical, you might need to redesign your circuit so that the
variation is smaller in this range.
Note that it is not necessary to declare any waveform expressions in the Outputs Pane prior
to running a statistical analysis simulation. However, doing so facilitates the waveform
autoplot feature.
Remember, whenever attempting to plot a family of waveforms, make sure the Save Data
Between Runs to Allow Family Plots boolean is on prior to running the statistical analysis.
It is also necessary that all the needed circuit outputs are declared.
The previous plotting example involved zooming into the dB20 curves to see a particular
region. Now lets change the dB20 expression to only include the region of concern by
following these steps:
1. In the Outputs Pane window, select the dB20 entry.
2. Go to the editable expression string field and change the expression to:
sample(dB20(VF("/OUT")) 100K 100M "log" 20)
Note that the dB20 plot now shows the desired region without having to manually zoom
in:
Prior to running a statistical analysis, so long as the Save Data Between Runs to Allow
Family Plots boolean is on it is not necessary to declare any scalar expressions in the
Outputs Pane. However, the performance of the Analog Statistical Analysis tool is at its
optimum when all scalar expressions are declared and checked prior to simulation time.
In this example, we are going to add a new scalar to the statistical data by doing the following
steps:
1. In the Outputs Pane window, select the clear button.
2. In the name field, type in gn_mrgn.
3. In the expression field, type in:
"gainMargin(VF("/OUT"))"
As a result of these actions, the new ph_marg statistical data has been created without the
need to re-simulate. Lets investigate this new data:
b. On the Iteration Verses Value form, note that the gn_mrgn_27 entry now appears
in the listbox. Select the gn_mrgn_27 entry.
c. Set the Output Format to sorted. and click OK. The following table will be printed
to the Results Display Window:
Note that iteration number 59 is an error flag value. If you look at the phase plot created
from a previous section of this example, you will notice that one of the plots does not dip
below -180 degrees. If you put the mouse curser on that single waveform, you can see
the banner of the waveform tool indicating that the waveform is iteration number 59. For
that waveform, the gainMargin() function cannot evaluate properly. The user would have
to use the UI filter capabilities to remove this data point before analyzing this data.
c. Invoke Simulation->Run.
When the simulation completes, you will notice that the autoplotted histograms indicate
a sample set of 200 ("N = 200"). You will also notice that the autoplotted waveforms are
for iterations 101 to 200 when you drag the curser across the waveforms and look at the
banner info.
If you use the Results->Iteration_Verses_Value capability, you will notice that the
iterations are from 1 to 200 (use the unsorted mode).
Note, at this point, attempting to use the Results->Evaluate_Expressions capability
will cause the first 100 iterations to be purged from the scalar data. This is because the
psf data does not contain the first 100 iterations. Whenever scalar iterations data will be
purged, the UI will inform the user prior to purging the data. The user will be able to abort
creating the new scalar data.
This section will not go into showing all the previously demonstrated UI features. Using the
parametric data sets created by a run with the above UI configuration, please return to the
section titled Evaluating Statistical Analysis Results and repeat the same example
through to the end of this document.
3
Optimization
The sections in this chapter explain how you can use the optimizer to help achieve your
design goals.
■ “Getting Started with Optimization” on page 160
■ “Getting to Know the Virtuoso® Analog Circuit Optimization Option Window” on
page 163
■ “Running an Optimization” on page 168
To use the optimizer, you specify initial values for a set of design variables. You also specify
the goals you want the circuit to meet. The optimizer first determines how the values of the
goal expressions vary as a function of changes to the design variables. Then the optimizer
changes the design variables in a manner expected to move the values of the expressions in
the direction of the goals. After the change, the optimizer simulates the circuit to check the
outcome. If stopping criteria are not met, the optimizer iterates through the optimization
process.
The following steps describe, in greater detail, the process that the optimizer follows during
an analysis.
1. The optimizer runs a simulation using the initial values you specify for the design
variables.
This step determines the types and initial values of the goal expressions.
2. The optimizer determines which optimization algorithm to use (unless you specify which
to use).
❑ The LSQ (least square) algorithm is best suited for optimizing measured, noisy,
unconstrained data. For example, this algorithm is appropriate for designing a filter
with an output waveform that matches measured frequency response data.
❑ The CFSQP (C version Feasible Sequential Quadratic Programming) algorithm is
suited for a wide variety of optimization problems, including constrained and
unconstrained, minimizing and maximizing, and sequentially related goals. For
example, this algorithm is appropriate for a low noise amplifier design that has many
goals such as maximizing the gain, minimizing the noise, and maintaining a phase
margin greater than 45 degrees.
3. If the CFSQP algorithm is used, the optimizer runs a simulation to determine whether the
initial values are feasible for the given goals. If the initial values are not feasible, the
optimizer computes new values that are feasible.
4. The optimizer determines how sensitive the goal expressions are to each design
variable.
To determine these sensitivities, the optimizer changes each design variable slightly and
then simulates the design again. This technique is called Finite Difference
Perturbation. In this technique, users generally do not need to select which algorithm
to use for their problem. The optimizer decides which algorithm to use based on the type
of optimization to be done. However, this option provides the ability to force the optimizer
to use a particular algorithm.
5. Using the information on sensitivities, the optimizer calculates a new set of values for the
design variables.
6. The optimizer sets the design variables to the new values and simulates the circuit.
If the values of the goal expressions are not better than they were with the previous
design variable values, the optimizer repeats Step 5.
If the values of the goal expressions are better than they were with the previous design
variable values, the new values become the initial values for the next iteration.
7. If the stopping criteria are not yet met, the optimizer begins the next iteration with Step 4.
Optimization stops when either or both of the following stopping criteria are met:
❑ The values of the design variables change very little or not at all
❑ Further changes to the design variables result in no progress toward the goals
Getting Help
For the most extensive information about using the optimizer, continue reading this
document. To open this document online, choose Help – Contents in the Virtuoso® Analog
Circuit Optimization Option window menu.
For information about the precise product name and version for this tool, choose Help –
About Analog Circuit Optimization.
Status display
Menu
Goals pane
Variables pane
Tool bar
Status Display
The status display shows the current state of the optimizer. For example, the status display
indicates whether the optimizer is simulating, optimizing, or in some other phase of the
analysis.
Menu
The menu contains the commands needed to prepare for, run, and plot the results of an
optimization.
For guidance on using the menu choices, see the cross-references in the following table.
Optimization Menu Selections
Goals Pane
The Goals pane displays information about the currently defined goals.
To define or revise the goals, you use the menu choices and buttons in the Virtuoso® Analog
Circuit Optimization Option window. For a description of the items in the Goals pane, see the
following table.
Item Description and Usage
Name The name associated with the goal.
Direction One of the following: maximize, minimize, match, >=, or <=.
Target If Direction is match, a value or waveform that the optimizer
attempts to match.
If Direction is maximize or minimize, a value or waveform used to
determine how important the goal is.
If Direction is >=, a value or waveform that is the lower bound.
If Direction is <=, a value or waveform that is the upper bound.
Initial The value of the goal expression as calculated from the initial values
of the design variables.
Prev The value of the goal expression as calculated from the values of the
design variables used in the previous iteration.
Current The value of the goal expression as calculated from the current
values of the design variables.
Enabled Either yes or no. yes indicates that the goal is included in the
current optimization; no, that it is not.
Variables Pane
The Variables pane displays information about the current design variables.
To define, revise, or enable the variables, you use the menu choices and buttons in the
Virtuoso® Analog Circuit Optimization Option window. For a description of the items in the
Variables pane, see the following table.
Item Description and Usage
Name The name of the design variable.
Min The minimum value allowed for the variable.
Max The maximum value allowed for the variable.
Initial The initial value of the design variable.
Prev The value of the design variable used in the previous iteration.
Current The value of the design variable used in the current iteration.
Enabled Either yes or no.
yes indicates that the value of the design variable can be changed
in the current optimization; no, that it cannot be.
Tool Bar
The tool bar contains buttons that perform the most important optimization tasks. The buttons
are arranged from top to bottom in the order they are typically used.
Add/Edit Goals
Add/Edit Variables
Delete
Run Optimizer
Stop Optimizer
Plot History
Update Design
Running an Optimization
The following sections describe the major steps involved in setting up and running an
optimization.
■ “Defining Goals” on page 169
■ “Preparing Design Variables” on page 184
■ “Controlling the Optimizer” on page 187
■ “Plotting Results” on page 189
You might be able to skip the first two steps by loading a state you saved in an earlier session.
For more information, see “Loading a Saved Session State” on page 194.
Defining Goals
Before you can run the optimizer on a circuit, you must specify the goals for the analysis. A
goal consists of
■ An expression whose value can be determined by simulation
■ A direction specifying how the value of the expression is to change during optimization
For example, you might define a goal called Bandwidth(3dB) with the expression
bandwidth(VF("/out") 3 "low")
and specify that the value of the expression is to be maximized during optimization.
The following sections describe how to create, edit, delete, enable, and disable goals.
■ “Using Simulation Outputs as Goals” on page 169
■ “Creating a New Goal by Entering It Directly” on page 170
■ “Creating a New Goal by Using the Waveform Calculator” on page 172
■ “Editing a Goal” on page 175
■ “Deleting a Goal” on page 176
■ “Enabling or Disabling a Goal” on page 176
For information about how the optimizer assigns weights to goals or about creating waveform
objects, look also at
■ “Creating Waveform Objects from a List of Values” on page 176
■ “How the Optimizer Uses Target and Acceptable Values” on page 179
The optimizer allows you to use the simulation outputs defined in the Virtuoso® Analog
Design Environment window as goals. This approach is particularly useful for RF analyses
where expressions are often developed for Direct Plot. You can easily add these Direct Plot
expressions to the Virtuoso® Analog Design Environment window Outputs pane, and from
there you can use the following steps to retrieve the expressions for use as optimizer goals.
1. From the Virtuoso® Analog Circuit Optimization Option window, choose Goals –
Retrieve Outputs.
The expressions (but not any signals) defined in the Outputs pane of the Design
Environment window appear in the Goals pane of the Optimization Option window.
Initially, the new goals are not enabled.
Unnamed expressions are given names like G1, G2, G3, and so on.
2. Highlight a goal and choose Goals – Edit.
The Editing Goals window appears.
3. Finish defining the goal by following the instructions in “Editing a Goal” on page 175.
Until you edit a retrieved goal in the Editing Goals window, choosing Goals – Retrieve
Outputs updates the goal to match the existing expression in the Outputs pane of the
Design Environment window. After you edit a retrieved goal, choosing Goals – Retrieve
Outputs has no effect on the goal.
❑ If % within Target is turned on, you can specify a scalar or waveform percentage
in the Acceptable field. A small percentage indicates that the goal is to be heavily
weighted.
If the expression you enter in Step 3 is a scalar expression, the percentage in the
Acceptable field must also be a scalar expression. If the expression you enter in
Step 3 is a waveform, the percentage in the Acceptable field value can be either a
scalar expression or a waveform expression.
By specifying a scalar percentage, you can ensure that the optimization results are
consistent at both very small and very large values of the Target expression. By
specifying a waveform percentage, you can explicitly specify the importance of each
segment of a waveform goal.
How the optimizer uses the Target and Acceptable expressions depends on the
direction you choose. For details, see “How the Optimizer Uses Target and Acceptable
Values” on page 179.
7. If you want to include the goal in the current optimization, be sure Enabled is on.
8. Click OK.
The new goal is added to the Virtuoso® Analog Circuit Optimization Option window.
9. Specify a value for Acceptable. As described in “How the Optimizer Uses Target and
Acceptable Values” on page 179, the optimizer uses the Acceptable value to determine
how important the goal is.
There are two ways to define this value.
❑ First, you can type an expression in the Acceptable field (or click in the Acceptable
field, then click Get Expression to retrieve an expression from the Waveform
Calculator).
If the expression you retrieve in Step 6 is a scalar expression, Acceptable must also
be a scalar expression. If the expression you retrieve is a waveform, Acceptable
can be either a scalar expression or a waveform expression.
A scalar Acceptable expression must meet the following requirements. A waveform
Acceptable expression must meet the following requirements at every point along
the curve.
If you specify
Then the value of the Acceptable expression
Direction as
minimize Must be greater than the value of the Target
expression
maximize Must be less than the value of the Target expression
match Can be any value except the Target expression
In addition, a waveform Acceptable expression must
be everywhere greater than or everywhere less than
the Target expression.
<= Must be greater than the value of the Target
expression
>= Must be less than the value of the Target expression
❑ Second, if % within Target is turned on, you can specify a scalar or waveform
percentage in the Acceptable field. A small percentage indicates that the goal is to
be heavily weighted.
If the expression you retrieve in Step 6 is a scalar expression, the percentage you
enter in the Acceptable Field must also be a scalar expression. If the expression
you retrieve is a waveform, the percentage value can be either a scalar expression
or a waveform expression.
By specifying a scalar percentage, you can ensure that the optimization results are
consistent at both very small and very large values of the Target expression. By
specifying a waveform percentage, you can explicitly specify the importance of each
segment of a waveform goal.
How the optimizer uses the Target and Acceptable values depends on the direction you
choose. For details, see “How the Optimizer Uses Target and Acceptable Values” on
page 179.
10. If you want to include the goal in the current analysis, be sure Enabled is on.
11. Click OK to add the new goal to the Virtuoso® Analog Circuit Optimization Option
window.
Editing a Goal
Except for the title, this form is identical to the Adding Goals form and you use the two
forms in the same way.
Deleting a Goal
When the expression that defines a goal is a waveform, the Target and Acceptable values
you define can also be waveforms. This section describes how you can create a waveform
object from a list of values stored in a file. For information on some of the other ways you can
create a waveform, see the Waveform Calculator User Guide.
This scenario assumes you have a list of X and Y values stored in a file. The X data values
must be monotonically increasing. For example, you might have a file called mydata
containing the following information:
; The information in column 1 is for the X axis.
; The information in column 2 is for the Y axis.
0.5 5
0.6 5.1
1.0 4.8
1.2 4.5
2.0 4.5
2.5 4.7
3.3 4.9
3.9 5.1
4.3 5.2
5.0 5.4
4. In the File Name field, type the filename of the file that contains your data.
5. In the Function Name field, type the name you want the waveform object to have.
6. (Optional) Specify which columns contain the X and Y data. This step is not required if
the X data is in column 1 and the Y data is in column 2.
7. (Optional) Type the number of lines to skip in each column before reading the data. Do
not count comment lines, which begin with a semicolon, and blank lines in the number of
lines to skip.
8. Click OK.
The Table form closes and the wave object appears in the calculator buffer. For example,
filling in the Table form as shown above and clicking OK causes
myWaveObject()
You can use the new waveform object in the optimizer wherever waveforms are valid. For
example, to use myWaveObject() as a target, type the name in the Target field.
The optimizer uses a Target value in two ways: as a goal and as an indication of the weight
(importance) of the goal. The following sections describe each use in more detail.
The first use, as a goal, is most obvious when you specify a Direction of match, >=, or <=.
In these cases, the target is the value the optimizer attempts to reach.
When you specify a The optimizer attempts to make the
Direction of value of the goal expression
match Match the Target value exactly
>= Greater than the Target value
<= Less than the Target value
However, when you specify a Direction of minimize, the optimizer does not stop minimizing
the goal expression when the Target value is reached. In fact, the optimizer makes the goal
expression as small as the optimization stopping criteria allow, even if that means the final
value is much less than the Target. Similarly, when you specify a Direction of maximize, the
optimizer makes the goal expression as large as possible, even if that means the value is
much greater than the Target value.
When you specify The optimizer attempts to make the value of the goal
a Direction of expression
minimize As small as possible, regardless of the Target value
maximize As large as possible, regardless of the Target value
Note: The LSQ algorithm makes no distinction among the directions of match, minimize,
and maximize. In each of these cases, the LSQ algorithm works to match the Target value.
For more information, see the information about the LSQ algorithm in “Changing Optimization
Options” on page 195.
When you set a Direction of minimize or maximize, the second use of the Target value is
most obvious. In these two cases, the Target value, together with the Acceptable value, is
used only to assign a weight to the goal. By contrast, in the match, >=, and <= cases, the
Target value is used both to set a goal and assign a weight.
The optimizer assigns greater weight to a goal that is defined with an Acceptable value set
very close to the Target value. Similarly, if the Target and Acceptable values are waveforms,
the optimizer assigns more weight to points where the Target and Acceptable values are
close together, and less weight to points where the Target and Acceptable values are farther
apart.
In formal terms, the weight assigned to a goal depends on the current value of the goal
expression( f ), the Target value ( T ), and the Acceptable value ( A ).
f –T
weight = --------------
A–T
Because the delay weight is greater than the power weight, the optimizer assigns greater
importance to reducing delay than it does to reducing power. In a tradeoff between the two,
reducing delay comes out ahead.
The next example illustrates how the optimizer determines weights from waveform Target
and Acceptable values. In this example, you match the output of a filter to a particular
waveform. Parts of the range are critical, so you assign a heavy weight to those sections by
defining very similar Target and Acceptable waveforms. The middle section is not critical,
so you assign less weight to that area by defining Target and Acceptable waveforms that
are farther apart.
Gain
Target waveform
Acceptable waveform
Frequency
The final example illustrates how the optimizer determines an Acceptable waveform from a
waveform Target and a waveform % within Target value. In this example, Direction is
specified as >= and the calculated Acceptable waveform is everywhere less than the Target
waveform.
100
Acceptable waveform
10%
Heavily Lightly
5% weighted weighted
% within target waveform
0%
At the left side of the plot, the % within target waveform has the value 1, so the calculated
value of the Acceptable waveform in that region is
100-(0.01 * 100) = 99
At the right side of the plot, the % within target waveform has the value 10, so the calculated
value of the Acceptable waveform in that region is
200-(0.10 * 200) = 180
The following sections describe how to add, edit, delete, enable, and disable design variables.
■ “Adding a Design Variable” on page 184
■ “Editing a Design Variable” on page 185
■ “Deleting a Design Variable” on page 186
■ “Enabling or Disabling a Design Variable” on page 187
To add a design variable to the list of variables in the Virtuoso® Analog Circuit Optimization
Option window,
1. Choose Variables – Add/Edit or click Add/Edit Variables.
To edit one of the design variables listed in the Virtuoso® Analog Circuit Optimization Option
window,
3. In the Initial Value field, type a value to be used as the starting point for optimization.
4. In the Minimum Value field, type a minimum value. The optimizer never sets the variable
to a value lower than this.
5. In the Maximum Value field, type a maximum value. The optimizer never sets the
variable to a value greater than this.
6. If you want to include the variable in the current analysis, be sure Enabled is on.
7. Click OK.
The changes are applied.
To delete one of the design variables listed in the Virtuoso® Analog Circuit Optimization
Option window,
❑ Choose Optimizer – Run n to open the Run for Fixed Number of Iterations form.
As each iteration finishes, the optimizer updates the Prev and Current values displayed in
the Virtuoso® Analog Circuit Optimization Option window.
Be aware that if you load or reload a state, the next optimizer run starts at the beginning of
the optimization. Be aware also that if you change the characteristics of a goal or the number
of enabled goals and then resume the optimization, the optimizer performs another initial
simulation.
You can also click Stop Optimizer to clear the state if an error stops the optimizer before the
normal end of the run.
Plotting Results
The easiest way to track the progress that the optimizer makes toward the goal is to plot the
data as it becomes available at each iteration. When the optimizer achieves acceptable
results, you can update the design to incorporate the optimized variable values.
The following sections explain how to set the plotting options, how to plot the output data, and
how to update your design with the calculated optimal values.
2. If you want to be able to follow the progress of the optimization while the optimizer is
running, turn on Auto Plot After Each Iteration.
If you do not want to follow the progress during the run, you can turn off this button and
plot the results when the run has finished. For more information, see “Plotting Output
Data” on page 192.
3. Select at least one kind of information to be included in the output data plot.
❑ Turn on Design Variables to produce a plot showing how the design variable
values change during the optimization.
❑ Turn on Scalar Goals to produce a plot showing progress toward a scalar goal.
You can also see how the scalar numbers change by looking in the Virtuoso®
Analog Circuit Optimization Option window at the displayed values for Initial, Prev,
and Current.
❑ Turn on Functional Goals to produce a plot, like the example below, showing
progress toward a waveform goal.
If there are too many or too few waveforms displayed in this plot, type the number
you want in the No. of Functional Iterations to Display field.
4. Set the Waveform Window characteristics to the values that work best for you. To make
the plot easier to read, for example, you might enlarge the font size and increase the size
of the window.
5. Click OK.
If the Waveform Window is open, the window changes to reflect the new option settings.
If the Waveform Window is closed, it opens with a new plot drawn in accordance with the
changed option settings.
If Auto Plot After Each Iteration is turned on in the Setting Plotting Options window, the
Waveform Window automatically opens and displays the results of each optimization. If the
results do not appear automatically, you can use the following procedure to plot them when
the optimization ends.
➤ Choose Results – Plot History or click Plot History.
The Waveform Window appears in the format specified by the Setting Plotting Options
window. For more information, see “Setting the Plotting Options” on page 189.
If the plotting options are set so that all the output data is plotted, an output plot might look
like this.
2. In the Save As field, type a name for the state if you do not want to use the default name.
3. Select one of the existing states in the Existing States listbox. As a result, the Save As
field displays the name of the selected state. The substates displayed in the What to
Save section are also enabled or disabled accordingly ( ie, according to the substates in
the selected state). Additionally, you can also enable or disable any of the substates and
click OK to overwrite the existing state. You can also type in a new state name in the
Save As field to save the changes in a new state.
Note: Only the information you save is available for retrieval when you reload the saved
state.
2. From the Library cyclic field, choose the library containing the saved state you want to
load.
3. From the Cell cyclic field, choose the cell containing the saved state you want to load.
4. From the State Name field, choose the state you want to load.
5. Turn on buttons to indicate which information you want to use from the saved state.
6. Click OK.
Saving a Script
The Open Command Environment for Analysis (OCEAN) command language lets you set up,
simulate, and analyze circuit data. OCEAN is a text-based process you can run from a UNIX
shell or from the Command Interpreter Window (CIW). You can type OCEAN commands in
an interactive session, or you can create scripts containing your commands and load those
scripts into OCEAN.
You can use the Corners window to set up the analysis you need, and then save the setup
procedure in a script. You can edit the saved script to add simulation or postprocessing
commands as needed.
For more information about OCEAN commands and scripts, see the OCEAN Reference.
2. To force the optimizer to use a particular algorithm, select either LSQ or CFSQP in the
Algorithm Selection field. If you want the optimizer to choose an appropriate algorithm
automatically, select Auto.
The LSQ algorithm is best suited for a pure curve-fitting problem, and Cadence
recommends that you use it only for a problem of that kind.
For the LSQ algorithm, the match, maximize, and minimize directions are all
equivalent. In each of these cases, the LSQ algorithm works to match the specified
Target value. To use the LSQ algorithm for a maximization or minimization problem, you
must specify a Target value that is large enough or small enough that the result reaches
the maximum or minimum before it reaches the Target value.
When the Algorithm Selection cyclic field is set to Auto, the optimizer uses the CFSQP
algorithm in most cases. The optimizer uses the LSQ algorithm only when both of the
following conditions are true.
❑ The Direction for all the enabled goals is match.
❑ Every enabled goal has a waveform Target.
3. Type values for the Optimizer Control Options you want to change.
❑ The Percentage Finite Difference Perturbation value affects how sensitivities
are determined.
Be aware that some problems are very sensitive to this value and changing it might
cause the algorithm to perform poorly.
Note: It is recommend that user schoose the default value. For advanced users who
have better knowledge of the effect of the step length, the Finite Difference
Perturbation field provides a way to specify the step length that is appropriate.
Caution should be taken in using this; some problems are very sensitive to the step
length used.
❑ The Relative Design Variable Tolerance value affects the LSQ algorithm
stopping criteria. This value has no effect on the CFSQP algorithm.
For example, specifying a value of 0.05 causes the LSQ algorithm to stop when the
relative change in each design variable is smaller than 5 percent.
❑ The Relative Function Value Tolerance also affects the algorithm stopping
criteria.
For example, specifying a value of 0.05 causes the algorithm to stop when the
relative change in each function value is smaller than 5 percent.
Note: The Relative Design Variable Tolerance and Relative Function Value
Tolerance fields are designed in a way such that users can stop the algorithm by
specifying stopping criteria to be used rather than using the default settings. These fields
are entered as absolute numbers. For example, if a user specifies 0.01 in the Relative
Design Variable Tolerance field, that means if the relative change in the design
variables is smaller than 1 percent, the algorithm would stop. Likewise, if 0.01 is specified
in the Relative Function Value Tolerance field, the algorithm will stop when the
relative change in each function value is smaller than 1 percent.
4. Set Warning Message for Long Simulation.
The optimization tool and the Virtuoso® Analog Design Environment are both locked for
the duration of the initial simulation run of the optimization. During that initial run, you
cannot stop the simulation or monitor the progress. If you want to be warned of a
potentially long simulation, leave Warning Message for Long Simulation turned on,
otherwise, turn it off.
5. Click OK.
Notice the two resistors, R0 and R1. These are the components whose values are optimized
during the session.
To follow along with this example, go to a working directory and use a command like the
following to copy all the contents of the optimization directory into the working directory.
tar -cvhf - -C <install_dir>/tools/dfII/samples/artist optimization
| tar -xvf -
Then go to the optimization directory you created, start icms, and continue with the
following steps.
1. In the CIW, choose Tools – Analog Environment – Simulation.
The Virtuoso® Analog Design Environment window appears.
2. Choose Setup – Design.
The Virtuoso® Analog Design Environment window now looks like this.
You run this initial simulation, which does not involve using the optimizer at all, just as you run
other ordinary simulations.
➤ In the Virtuoso® Analog Design Environment window, choose Simulation – Run.
If the Welcome to Spectre window appears, click OK to close it.
A waveform window similar to the one generated earlier appears. These two waveforms
become the targets for the optimization session described in the next section.
In this example, you want to use the optimizer to determine what resistor values will allow you
to match the AC Response waveform while minimizing the noise waveform. The following
sections describe how to specify the goals that correspond to these waveforms.
10. In the calculator, click wave, then go to the Waveform Window and click on the AC
Response waveform.
An expression similar to the following appears in the Calculator display:
mag( VF("/Vout" "/old2/lorenp/simulation/chebyshev/spectre/
schematic-save") )
This expression represents the AC Response waveform.
11. In the Adding Goals window, select the Target field, then click Get Expression to copy
the waveform.
12. Type 5 in the Acceptable field and turn on % within Target.
13. Ensure that Enabled is turned on.
The Adding Goals window now looks like this.
The steps required to define the noise goal are similar to those required for the AC Response
goal.
1. If the Adding Goals window is not open, choose Goals – Add in the Virtuoso® Analog
Circuit Optimization Option window.
2. Type a name for the goal in the Name field.
For this example, type noise.
3. Erase any existing information, then type VN2() in the Expression field.
4. Specify the Target, which for this goal is to be the Noise Response waveform calculated
earlier, as described in “Generating the Targets” on page 200. To specify the waveform,
first open the calculator by clicking Open in the Adding Goals window.
5. Click clst in the calculator to clear the calculator display.
6. In the calculator, click wave, then go to the Waveform Window and click on the Noise
Response waveform.
An expression similar to the following appears in the calculator display:
VN2()
Type the following path in the brackets:
"/old2/lorenp/simulation/chebyshev/spectre/schematic-save"
This expression represents the Noise Response waveform.
7. Return to the Adding Goals window, select the Target field, then click Get Expression
to copy the waveform.
9. Click OK.. The new goal appears in the Virtuoso® Analog Circuit Optimization Option
window.
10. You can return to the calculator window and close it by choosing Window – Close.
In this example, you want to optimize the values of two resistors: res0 and res1. To prepare
for the optimization, you need to set the initial, minimum, and maximum allowed values.
1. In the Virtuoso® Analog Circuit Optimization Option window, choose Variables – Add/
Edit.
The Editing Variables form appears.
3. Click Apply.
The information about the res1 variable appears in the Virtuoso® Analog Circuit
Optimization Option window.
4. In the Editing Variables form, click on res0 and then fill in the other fields as shown.
5. Click OK.
The information about the res0 variable appears in the Virtuoso® Analog Circuit
Optimization Option window.
With the goals and variables defined, the Virtuoso® Analog Circuit Optimization Option
window looks like this.
At this point in the example, you are ready to run the optimization.
➤ In the Virtuoso® Analog Circuit Optimization Option window, choose Optimizer – Run
or click Run Optimizer.
The optimization starts and the status display updates to reflect the current activity.
With the default plotting options, a Waveform Window appears soon after the optimization run
begins and updates after each iteration. When this example optimization ends, the Waveform
Window displays the iteration history of the res0 and res1 variables. It also displays the
changing waveforms for the magVF and noise goals.
You can change the information that displays in the Waveform Window. For example, to look
at the variables in more detail, follow these steps.
1. In the Virtuoso® Analog Circuit Optimization Option window, choose Results – Set Plot
Options.
2. In the Setting Plotting Options window, turn off Display History of Scalar Goals and
Display History of Functional Goals, leaving only the Display History of Variables
selected.
3. Click OK.
During the 13 iterations of this optimization (iteration 0 shows the initial values), the value
of res1 went from the starting value of 2.00 K to the final value of 304.7. This final value
also appears in the Current column of the Variables pane in the Virtuoso® Analog
Circuit Optimization Option window.
The Waveform Window appears or redraws with only the goals showing. For example,
the noise goal looks like this.
The last iteration, I#13, shows that the optimizer was able to lower the noise below the
target throughout the entire frequency range.
The optimized values for the two resistors are displayed in the current column of the
Virtuoso® Analog Circuit Optimization Option window: res1 has an optimized value of 304.7
and res0 has an optimized value of 1.311 K. To use these values in your design, do the
following:
➤ In the Virtuoso® Analog Circuit Optimization Option window, choose Results – Update
Design.
The new values appear in the Design Variables pane of the Virtuoso® Analog Design
Environment window.
Index
Symbols appending scalar output data to saved
data 82
% within Target 172, 174 Autoplot After Each Iteration button
.cdsinit file (optimization) 190, 192
example 68 Autoplot button (Monte Carlo) 89
loading PCFs and DCFs from 15, 20, autoplot field 84
41
B
A Best Fit Line 121
Acceptable values button bar (Monte Carlo) 85
creating waveform objects for 176 buttons
entering an expression for 171, 174 Corners
restrictions on 171, 174 Add Corner 16
setting as percentage of Target 172, Add Measurement 18, 26, 27
174 Add Variable 16
valid 171, 174 Calculator 18, 27
weights, using to assign 180 Copy Corner 16
Add button (Monte Carlo) 85, 89 Delete Measurement 18, 27
Add Corner button (Corners) 16 Delete Row 25
Add Measurement button (Corners) 18, Delete Selected / Delete Corner /
26, 27 Delete Row 16
Add Process dialog box 58 Get Expression 18, 27
Add Variable button (Corners) 16 Plot/Print 29
Add/Edit Goals button (optimization) 170, Run 28
172, 175 Run / Stop 17
Add/Edit Variables button Monte Carlo
(optimization) 184, 186 Add 85, 89
adding Autoplot 89
corners 16 Calculator 85, 90
design variables (optimization) 184 Change 85, 90
variables (Corners) 16, 24 Clear 85
Adding Goals window 202, 203, 205 Delete 85, 90
algorithms Density Estimator 118
automatic selection of 196 Get Expression 85
CFSQP 160 Load 110, 112
choosing manually 196 optimization
LSQ 160 Add/Edit Goals 170, 172, 175
amplifier schematic (Monte Carlo) 129 Add/Edit Variables 184, 186
Analysis Setup pane Autoplot After Each Iteration 190,
description 81 192
Monte Carlo extended example 134 Delete (design variables) 187
Analysis Variation cyclic field (Monte Delete (goals) 176
Carlo) 104 Design Variables 190
analysis variation type, specifying 86 Enabled (goals) 172, 175, 185, 186
File – Close 11
File – Load 21
G
File – Save Ocean Script 35 GAUSS function, used in Monte Carlo 132
File – Save Setup 33 Get Expression button (Corners) 18, 27
File – Save Setup As 33 Get Expression button (Monte Carlo) 85
Filter By data set 109 goals
Filter By point 109 definition 169
filter, Chebychev 198 deleting all 197
filtering, turning off 110 deleting specific 176
folded cascode, schematic 61 editing 175
formats, choosing for output 28 enabling or disabling 176
forms and windows example of specifying 201
Add Process (Corners) 58 saving 193
Adding Goals 170, 173, 202, 203, 205 specifying direction for 171, 173
Conditional Yield 127 specifying expression for 171, 173
Correlation Table 116 specifying for Chebychev filter
Data Filter 109 example 203
Editing Goals 175 specifying name for 173
Editing Variables 185, 186, 205 Goals – Add 170, 172, 201, 204
Histogram 118 Goals – Delete 176
Iteration Versus Value 115 Goals – Disable 176
Load (Corners) 22 Goals – Edit 175
Load Data Filter Values 111 Goals – Enable 176
Load Specification Limits 113 Goals pane 166
Loading State 194 graphical user interface
Monte Carlo Load 102 Corners 12
Monte Carlo Save Ocean Script 103 Monte Carlo 78
Multiconditional Yield 125 optimization 163
Optimization Options 196 groups
Process/Model Info Setup (Corners) 59 deleting 25
Run for Fixed Number of Iterations 188 name, as displayed by Corners 16
Save Changes? (Corners) 21
Save Data Filter Values 110
Save Ocean Script (Corners) 36, 195
Save Results 100
H
Save Specification Limits 112 help
Saving State 193 for optimization 161
ScatterPlot 121 Histogram form 118
Select Results 107 histograms
Setting Plotting Options 190, 210 description 113
Simple Yield 124 for Monte Carlo extended example 138
Specification Limits 111 plotting 117
Virtuoso analog corners analysis 12
Virtuoso analog optimization
analysis 163, 173
Virtuoso analog statistical analysis 78
I
Virtuoso® analog corners analysis 10 individual yield 123
Virtuoso® analog statistical analysis 78 information messages, as displayed by
Waveform 178, 191, 200 Corners 19
frequency response, matching 198 Initial field 166, 167
Functional Goals button 191
X
X and Y values, creating waveforms
from 176
Y
yellow colored messages 19
Yield – Conditional 126
yields
analyzing 141
conditional
description 123
printing report on 126
individual
description 123
printing report of 123
multiconditional
description 123
printing report on 125
simple, printing report on 123
total 123