CDF User Guide
CDF User Guide
Guide
Product Version 5.1.41
December 2005
1990-2005 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 800.862.4522.
Open SystemC, Open SystemC Initiative, OSCI, SystemC, and SystemC Initiative are trademarks or
registered trademarks of Open SystemC Initiative, Inc. in the United States and other countries and are
used with permission.
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.
Component Description Format User Guide
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Typographic and Syntax Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Syntax Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1
What Is CDF? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
A Typical Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Levels of CDF Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
CDF Worksheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2
CDF Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
CIW CDF Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
CDF Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Scale Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
cdfEditScaleFactors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
SKILL CDF Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Saving User-Level CDF Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Using SKILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Complex Pole Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Using the CDF Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
NFET Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Using the CDF Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Using SKILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3
Defining Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Component Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Edit CDF Parameter Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Attributes and Parameter Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Editing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Using the CDF Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Using SKILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Passing Parameters in a Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
pPar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
iPar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
atPar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
dotPar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Inherited Parameters in Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Parameterized Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Complex Pole Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Using the Edit CDF Parameter Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
NFET Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Adding New Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Setting Sample Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Completing Parameter Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4
Modifying Simulation Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Edit Simulation Information Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Simulator Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Editing Simulator Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Using the CDF Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Using SKILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Complex Pole Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
NFET Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5
Specifying Label Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Interpreted Labels Information Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Library Label Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Cell Label Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Creating Labels Using the CDF Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
The Edit Component Display Options Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Creating Labels in the Schematic Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Creating Labels with SKILL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Complex Pole Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
NFET Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6
Other CDF Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Other Information Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Setting Up Fields and Prompts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Adjusting Button Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Adjusting Field Heights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Adjusting Field Widths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Adjusting Prompt Widths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Initialization Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Postprocessing Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
7
Writing Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Loading Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
NFET Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
mosLayout Callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
pcMOSw Callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
pcMOSl Callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
8
CDF SKILL Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
CDF SKILL Function Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Cell and Library Data IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Data Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
CDF SKILL Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
Create Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
cdfCreateBaseLibCDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
cdfCreateUserLibCDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
cdfCreateBaseCellCDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
cdfCreateUserCellCDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
cdfCreateParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Saving Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Dumping and Editing Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Deleting Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Copying, Finding, and Updating Data and Parameters . . . . . . . . . . . . . . . . . . . . . . 149
cdfCopyCDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
cdfCopyParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Setting Scale Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
cdfGetUnitScaleFactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
cdfSetUnitScaleFactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Other SKILL Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
cdfParseFloatString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
cdfFormatFloatString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
cdfSyncInstParamValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
cdfUpdateInstSingleParam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Invoking the CDF Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
9
Verifying CDF Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Testing the Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Test Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Virtuoso XL Layout Editor Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
LVS Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Making Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Finishing the NFET Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Varying the Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Changing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
A
Advice and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
B
Accessing Subcircuit Simulation Data . . . . . . . . . . . . . . . . . . . . . . . . 173
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Accessing Subcircuit Port Currents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Accessing Subcircuit Model Parameter and
Operating Point Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Accessing Schematic Primitive Model and
Operating Point Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Editing a CDF Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Writable Cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Sample CDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Subcircuit Simulation Data for Socket Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Accessing Subcircuit Port Currents for Socket Simulation . . . . . . . . . . . . . . . . . . . . 182
Sample CDF for spectreS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
C
NBSIM Transistor CDF SKILL Description . . . . . . . . . . . . . . . . . . . 185
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Preface
This Component Description Format User Guide assumes that you are a computer-aided
design librarian or a circuit designer and that you are familiar with designing and developing
electronic components with Cadence® design and simulation software.
Related Documents
Component Description Format (CDF) descriptions are often used with other Cadence
products during the design process. The following give you more information about the use
of CDF descriptions.
■ Virtuoso Parameterized Cell Reference describes using CDF parameters with
parameterized cells.
■ Composer: Design Entry User Guide describes the Edit Component Display Options
form and label specifications.
■ Analog Expression Language Reference Manual describes the analog expression
language syntax frequently used in CDF descriptions.
Typographic Conventions
Boxes and arrows in a sequence like the ones below show you the order in which you select
a command from a menu.
Syntax Conventions
This list describes the syntax conventions used for the SKILL functions specified in this
manual.
… Three dots (...) indicate that you can repeat the previous
argument. If you use them with brackets, you can specify zero
or more arguments. If they are used without brackets, you must
specify at least one argument, but you can specify more.
argument...: specify at least one, but more are possible
[argument]...: you can specify zero or more
If a command line or SKILL expression is too long to fit inside the paragraph margins of this
document, the remainder of the expression is put on the next line, indented. For example:
?callback "cdfgData->pName1->value = cdfgData->pName2->value")
When writing the code, you should always put a backslash (\) at the end of any line that
continues on to the next line.
Data Types
Data Types by Type
1
What Is CDF?
■ Overview on page 14
■ A Typical Application on page 14
■ Levels of CDF Data on page 17
■ CDF Worksheet on page 19
Overview
The Component Description Format (CDF) describes the parameters and the attributes of
parameters of individual components and libraries of components. The CDF lets you create
and describe your own components. A CDF description assigns parameters and parameter
attributes to libraries and cells for many purposes:
■ Assigning parameter names and values
■ Allocating units and default values
■ Checking that values lie within specified ranges
■ Dynamically changing how parameters are displayed depending on predefined
conditions
■ Executing a SKILL callback function whenever certain information is changed
Note: Callbacks are called only from the Add Component and Edit Properties forms. As
a consequence, many problems are associated with callbacks and their use is
discouraged.
A Typical Application
The CDF encompasses all levels of components, including discrete and full-custom
components, and all cellviews of components. For example, the resistor cell res can take on
two forms: an ideal resistor or a thin film resistor. If you want an ideal resistor, you specify the
value of resistance desired. If you want a thin-film resistor, which models discontinuities as
well as skin and substrate effects, you specify the length and width of the resistor and the
resistivity of the material in which the resistor body is built.
To determine what parameters the resistor needs, follow the decision tree in the following
figure:
ideal
resistance
resistor
type
width
thin film
length
sheet sheet
rho
resistivity
type
bulk
rho
bulk
height
This pattern of resistor parameters illustrates how you can construct a CDF description for
this resistor that lets you automatically switch between different choices.
To create a complete CDF for this resistor, you create eight parameters.
The first parameter is the radio button field, resistorType. It is always displayed and editable
and has only two values, ideal and thin_film.
The second parameter, resistance, uses a cdfgData variable expression to test the value of
resistorType. If resistorType = ideal, then resistance is displayed and editable. If
resistorType = thin_film, then resistance is not available. resistance has a floating-point
numerical value.
The third, fourth, and fifth parameters behave in the opposite manner from resistance.
Through another cdfgData expression for each parameter, width, length, and resistType
become active if resistorType = thin_film, and they become unavailable if resistorType =
ideal. The width and length parameters have floating-point numerical values. The
resistType parameter is a string with only two values, sheet and bulk.
The last three parameters, srho, brho, and height, have floating-point numerical values.
srho becomes active when resistType = sheet, while brho and height become active when
resistType = bulk.
Additionally, you can use CDF to display prompts that spell out the complete name of each
variable (bulk rho instead of brho), and you can also set the CDF of this resistor to accept
expressions (such as those in the Analog Expression Language [AEL] for the values of these
parameters.
When a designer accesses this resistor through the Add Component, Create Instance, or
Edit Properties command, the form prompts the designer for the necessary values. The
form changes based on the values entered.
The CDF description of the resistance parameters for this resistor is stored in the following
SKILL code.
libId = ddGetObj("base")
cellId = ddGetObj(libId "res")
cdfDataId = cdfCreateBaseCellCDF(cellId)
cdfParamId = cdfCreateParam(cdfDataId
?name "resistorType"
?type "radio"
?prompt "Type:"
?defValue "ideal"
?choices list("ideal" "thin film")
?callback "myModelTypeCB()")
cdfParamId = cdfCreateParam(cdfDataId
?name "resistance"
?type "float"
?prompt "Resistance:"
?defValue 100.0
?callback "myResCB()")
cdfParamId = cdfCreateParam(cdfDataId
?name "width"
?type "float"
?prompt "Width:"
?defValue 20e-6
?callback "myWidthCB()")
cdfParamId = cdfCreateParam(cdfDataId
?name "length"
?type "float"
?prompt "Length:"
?defValue 100e-6
?callback "myLengthCB()")
cdfParamId = cdfCreateParam(cdfDataId
?name "resistType"
?type "radio"
?prompt "Resistivity Type:"
?defValue "sheet"
?choices list("sheet" "bulk")
?use "cdfgData->modelType->value ==\"thin film\""
?callback "myResTypeCB()")
cdfParamId = cdfCreateParam(cdfDataId
?name "srho"
?type "float"
?prompt "Sheet Rho:"
?defValue 25.0
?use "cdfgData->modelType->value == \"thin
film\" && cdfgData->resType->value == \"sheet\""
?callback "mySheetRhoCB()")
cdfParamId = cdfCreateParam(cdfDataId
?name "brho"
?type "float"
?prompt "Bulk Rho:"
?defValue 25e-10
?use "cdfgData->modelType->value == \"thin
film\" && cdfgData->resType->value == \"bulk\""
?callback "myBulkRhoCB()")
cdfParamId = cdfCreateParam(cdfDataId
?name "height"
?type "float"
?prompt "Height:"
?defValue 25e-10
?use "cdfgData->modelType->value == \"thin
film\" && cdfgData->resType->value == dq\"bulk\""
?callback "myHeightCB()")
Librarians usually create and maintain the CDF descriptions for components. Library users
see the effects of the descriptions as they use components from the library. However, you
might want to override parts of the default description. For example, you might want to specify
your own default values for CDF parameters. So that you can override the description,
Cadence defines the following description levels:
■ The base-level CDF is the description that is permanently attached to a cell or library.
When the system reads in a cell or library, any base-level CDF attached to it is also read.
The creator of a base-level CDF must have write permission on the object to which the
description is being attached.
■ The user-level CDF is a user-specific overlay description on top of the base-level CDF
for a cell or a library (although the base level does not have to exist). The system never
saves a user-level CDF, so you must save it to a file and reload this level on startup. You
do not need write permission to attach user-level CDF information to an object.
■ The effective-level CDF is an overlay of a user-level CDF description on top of a
corresponding base-level CDF description.
Note: Because user-level CDF is specific to a user and not a library or cell, simulation results
can be different for different users. The use of user-level CDF is therefore discouraged.
“Overlay” means “effectively replaces.” A user cell value of 10,000 ohms for the resistor
parameter r takes the place of any base- or library-level value for r. Each level of CDF is
optional. You can create cell-level CDFs without having library-level CDFs, and you can
create user-level CDFs without having base-level CDFs.
Both libraries and cells can have base- and user-level CDF descriptions. The effective-library
CDF is the overlay of the user-library CDF on top of the base-library CDF. The effective cell-
level CDF is the overlay of the user cell CDF on top of the base cell CDF, overlaid on top of
the effective library-level CDF. Finally, the effective instance CDF is the effective cell-level
CDF with instance-specific information added to the CDF description. The following figure
shows the relationship between CDF levels and the Cadence database.
CDF Worksheet
Before you start to build a component, you need to decide how you intend to use it, in which
applications, and with what requirements. Before you create the cell and CDF, you need to
determine the following:
1. What applications will you use?
❑ Design Entry
❑ Simulation
❑ Layout
❑ Design Checking
This user guide illustrates each task with examples based on two components. In the first
example, you examine the CDF of the functional block description of a complex pole. This
component uses a macro model and is set up for simulation under Cadence spectre and
SpectreS. This example illustrates parameter passing in hierarchical designs.
In the second example, you create the CDF for a BICMOS NFET from the CDF information
for another component. The NFET is specified as a parameterized cell (pcell) that can be
simulated with Analog LVS. This example illustrates some of the consequences of specifying
particular values for a component CDF description.
For example, the answers to the set of questions for the BICMOS NFET cell would be as
follows:
❑ The number of gates is a function of width. If the width exceeds 120, the layout
changes to have two gates (a bend with connections).
❑ If a designer selects the alternate large layout, the width and length are updated to
reflect the value.
❑ Length and width of each two parameters: one a string for simulation and one a
floating-point number for the pcell. You should not have to enter both and they
should be synchronized.
❑ The model parameters are dependent on the physical parameters. For example, you
might calculate a value for the drain diffusion area and a value for the source
diffusion area based on the physical parameters.
6. How do you want the user interface to appear? Are there parameters that you want to be
hidden from designers? Are there parameters that you want the designers to see but not
edit? What parameters should appear at the top of the list?
❑ If a designer selects the alternate large size layout, the width and length cannot be
edited because there is only one large size device.
❑ The bends parameter is not visible to a designer because it is not under the
designer’s control.
❑ The pcell length and width are not visible to a designer. You want the designer to
specify the width and length only once so that the forms show only the string version.
❑ Because drain and source diffusion areas are calculated, they should not be
editable.
❑ Show width and length and the layout choice at the top of the forms because those
are the parameters that designers must frequently edit.
2
CDF Commands
Copy lets you copy CDF information from one cell or library to another.
Scale Factors lets you set scaling factors for displaying CDF parameters.
Edit
Creates or edits CDF data for a library or cell. With this command, you can
■ Add component parameters
■ Delete component parameters
■ Modify attributes of component parameters
■ Rearrange the display order of component parameters
■ Modify simulation information for all available simulators
■ Modify interpreted label information for schematic annotation
■ Modify special CDF properties that define CDF-generated forms, such as the Add
Component form
You can select CDF data for a cell or library on the Edit Component CDF form. Once you
make a CDF selection, this form modifies itself and expands to include any existing CDF
information. After you enter or modify information, you can redisplay the form by pressing the
Tab key or by moving the cursor out of the form.
CDF Selection
■ Cell lets you edit CDF data for a cell. (The default value.)
■ Library lets you edit CDF data for a library.
■ CDF Type lets you choose a CDF level of Base, User, or Effective.
❑ Base mode writes information to the library or cell when you click Apply, so you must
have write privileges to the library and cell.
❑ User mode writes data to the user-level CDF when you click Apply. The editor does
not store data permanently in the library or cell, so you do not need write privileges.
Note: Because user-level CDF is specific to a user and not a library or cell, simulation
results can be different for different users. The use of user-level CDF is therefore
discouraged.
❑ Effective mode, in contrast to user mode, writes information to the user-level CDF
only when the new information differs from base-level CDF information. The editor
does not store data permanently in the library or cell, so you do not need write
privileges.
■ Library Name is the name of the library whose CDF data you want to edit.
■ Cell Name is the name of the cell whose CDF data you want to edit.
CDF Editor
You can use the CDF editor to create, view, or edit a CDF description. The Edit Component
CDF form gives you access to all portions of cell and library CDF descriptions. It consists of
a header for identifying the library or cell CDF description and four subsections for details
about parameters, simulation information, interpreted labels, and other information.
Header
Component Parameters
Simulation Information
Other Information
The following sections in this chapter describe the fields and buttons in the header.
Subsequent chapters describe each of the four subsections.
After you enter a CDF cell or library description name, the Edit Component CDF form
expands to look like the following figure.
Most of the form is cut off by the size of the window. Stretch the CDF Editor window to expose
the entire form, or scroll down to examine each section of the form. The more parameters a
component has, the longer the form. Often, you cannot display the entire form at once, even
on a large monitor. The following chapter sections scroll down the form and show each form
section by itself.
Form Header
File Name is the name of a file that you can create where you can store all the current editor
field values. You can store the CDF description of a cell, including User or Effective levels,
for future use by the CDF editor. You can type in the name of the file or click File Name Select
to choose a name.
Load loads the CDF information in the file in the File Name field. The Edit Component CDF
form redisplays to show the new information. The editor does not save CDF data to the cell
or library until you click OK or Apply.
Save saves the contents of the CDF editor to the file name in the File Name field.
File Name Select displays a list of file names if you enter a directory name in the File Name
field. You can select a filename from the list by clicking on the name, then clicking OK. The
name appears in the File Name field.
Change Directory redisplays the filename list to show the contents of the directory you
chose with File Name Select.
Component Parameters
You use the Component Parameters section of the Edit Component CDF form to modify
component parameters. The editor displays parameter names and the default attribute values
for any existing component parameters.
You can change the default value of parameters directly on the form by typing a value into the
appropriate parameter field. You need to press the Tab key at the end of a value. You can
also add, delete, and rearrange parameters and edit their attributes.
Name lets you choose Name or Prompt to view either the name or the prompt of the
parameter for the fields in this section. The form redisplays to show the value you selected.
Add displays the Add CDF Parameter form for adding a new parameter to the component.
Edit displays Edit CDF Parameter form for editing parameter attributes.
Move displays the Move CDF Parameter form, which lets you move a parameter relative to
other parameters in the Component Parameters section of the Edit Component CDF form.
Select To Delete lets you delete the parameter from the CDF. Click on the button to the right
of the parameter you want to delete. There is no undo.
Simulation Information
The Simulation Information section of the form lets you edit simulation information for
simulators registered in the software.
The value at the right of each simulator name is a list of the names of the terminals
(connection points) of the component.
The Interpreted Labels Information section of the Edit Component CDF form lets you edit
interpreted label information in the CDF description. Chapter 5 describes the options for
interpreted labels.
Other Information
The Other Information section of the Edit Component CDF form lets you edit CDF property
fields that are not in any of the previous categories. Chapter 6 describes the options for other
information.
Copy
Copies CDF data from one library or cell to a new library or cell.
CDF Type is the type of CDF to copy. You can specify either a base-level or a user-level CDF
description as the source CDF type. You cannot specify the effective-level CDF description
as the source or the destination.
Library Name is the name of the library whose CDF data you want to copy.
Cell Name is the name of the cell whose CDF data you want to copy.
CDF Type is the type of destination CDF. You can specify either a base-level or a user-level
CDF description as the destination CDF type. You cannot use effective-level CDF as a
destination CDF type.
Library Name is the name of a library or a library that contains a cell into which you want to
copy a CDF description.
Cell Name is the name of the cell into which you want to copy a CDF description.
Caution
You cannot copy cell CDF data back to the same cell, and you cannot copy
a level of CDF data if it has not been created yet. In both cases, the
system issues an error message.
If you copy a cell (component) or library to another cell or library, the CDF data might not be
copied. The transfer of CDF data occurs only if the target cell or library never existed and is
created in the copy operation. If, however, the target cell or library already exists, or you copy
only a cellview (a view of the component), the CDF data of the target cell (or library) remains
unchanged. Use the Copy CDF command to avoid this problem.
Delete
CDF Type to Delete lets you choose the type of CDF to delete.
Library Name is the name of either a library whose CDF description you want to delete or
a library that contains a cell whose CDF description you want to delete.
Cell Name is the name of the cell whose CDF description you want to delete.
Scale Factors
Displays the Units Scaling Factors form, which you can use to set scaling factors for
displaying CDF parameters. These abbreviations are used on the form:
f femto (one quadrillionth)
p pico (one trillionth)
n nano (one billionth)
u micro (one millionth)
m milli (one thousandth)
c centi (one hundredth)
k kilo (one thousand)
M mega (one million)
G giga (one billion)
When a scaling factor is set to a value other than the input value, the output string is rounded
based on the following standards:
■ If the input value is an integer, no rounding will occur.
Input: 1497Output: 1.497K
■ If the number of decimal digits of the output value is greater than12, the output value will
be rounded to maintain no more than12 decimal digits.
Input: 1234.12345678901234 Output: 1.234123456789K
Input: 123456.7890123456 Output: 123.456789012346K
Input: 123.4567890123456 Output: 123.456789012346
■ If the number of decimal digits of the input value is12 or less, the number of decimal digits
in the output will be maintained unless it exceeds12.
Input: 1497.5 Output: 1.4975K
Input: 1497.56789 Output: 1.49756789K
Input: 123.12345678987 Output: 1.231234567899K
■ Trailing decimal zeros will be truncated to the number of decimal zeros in the input.
Input: 120000.0 Output: 120.0K
Input: 11000000.00 Output: 11.00M
The following two entries are common to every field on the Units Scaling Factors form:
auto automatically scales to the most efficient
representation
none uses value as entered, without modifying it
capacitance fF femtofarad
pF picofarad
nF nanofarad
uF microfarad
mF millifarad
F farad
Length (Metric) has a cyclic field for choosing how to show length.
t_unitName t_scaleFactor Description
lengthMetric uM micrometer
mM millimeter
cM centimeter
M meter
SKILL Function
You can use the following Cadence SKILL language commands to set scale factors.
cdfGetUnitScaleFactor( t_unitName) => t_scaleFactor
cdfSetUnitScaleFactor( t_unitName t_scaleFactor) => t / nil
You can use abbreviations listed earlier instead of specifying the complete scale factor. For
example, to change the scale factor for resistance to MOhms, enter:
cdfSetUnitScaleFactor("resistance" "M")
You can also set the t_scaleFactor to auto or none using the
cdfGetUnitScaleFactor SKILL command. In SKILL expressions only, you can use the
following ISO1000 standard units in scale factors.
To display the Units Scaling Factors form and edit the scale factors, use the following SKILL
function.
cdfEditScaleFactors
cdfEditScaleFactors()
=> t / nil
Displays the Units Scaling Factors form which can be used to set scaling factors for displaying
CDF parameters.
To view the SKILL for a CDF description, use the cdfDump function.
cdfDump(
"libName"
filename
?cellName "cellName"
?level {’base | ’user}
?edit b_edit
)
If you specify the libName only, cdfDump writes only the library CDF data to the file
specified in filename. The other arguments are optional. You must always specify a
libName and a filename.
The ?cellName argument dumps the CDF description from that cell.
With the ?level argument, you can choose base- or user-level CDF. The default is base.
The ?edit option lets you automatically load the dump file into a temporary editor window.
The default is nil.
You can specify a text editor by adding a line to your .cdsinit file. The following example
uses the vi editor.
editor = "xterm -g 80x35+30+30 -e vi"
If you have write permission for a cell, you can reload the CDF description with the following
command in the Command Interpreter Window (CIW):
load("filename")
If you have the skillDev software, you can get a list of all the available CDF functions by typing
the following command in the CIW:
listFunctions("cdf")
If you want to change the CDF description of a component but do not have the appropriate
permissions, you can copy the cell to one of your own libraries. Copying a cell to a new cell
also copies its CDF description, which you can then edit. Alternatively, you can change the
user-level CDF description.
To create a CDF description for a new cell, you can first dump the CDF description from a
similar cell, change the cell or library name, then load the file as described in this section. If
the library and cell you specified exist, a new CDF description is created.
If you are using the Edit Component CDF form in the Cadence Analog Design Environment,
you can save any CDF description that you are working on with the File Name field and its
associated buttons.
Use to save
user-level CDF
information
1. Use File Name Select and Change Directory to enter the name of the file where you
want to save the CDF data, and click Save.
2. To retrieve this CDF information, open the Edit Component CDF form again.
3. Type the name of the library, cell, and CDF Type (User).
4. Type the filename in the File Name field, and click Load.
Using SKILL
If you are using SKILL, use adcDump to save the user-level CDF data and load to restore it.
1. Type the following SKILL command:
cdfDump("lib_name" "filename" ?cellName "cell_name"
?level ’user ?edit t)
The load command reads the information in the file to determine which library, cell, and
level of CDF description to access. It then executes the SKILL functions contained in the file,
replacing the saved user-level data in the correct library and cell.
Make sure that your cds.lib file includes the definition of this library.
The library and cell names are automatically entered in the form fields. After a moment,
the form expands and the CDF description for the complexPole1 component appears
in the form.
Form header
Component
Parameters
section
4. Using the scroll bar at the right, move down the form.
You should see a header and four subsections, each with information specific to the
complex pole cell.
Using the header, you can save the current CDF descriptions to a named file or load
another CDF description onto the named cell from a file. This is useful if you want to see
the results of changing certain CDF properties. You can store the alternatives in different
files and load them as required. You can also save the CDF data from one cell and then
load (transfer) it onto another cell.
At the end of the next chapter you examine the Component Parameters section in detail.
NFET Example
In the complex pole example, you examine an existing CDF description. In the NFET
example, you create a new cell and a new CDF description.
Library Manager
A copy of nbsim appears in the bicmos library under the cell name of nfet.
If you have already made a new NFET part by creating a symbol or a schematic, you still
need to copy over the CDF description.
6. In the CIW, choose Tools–>CDF–>Copy.
The Copy Component CDF form opens.
7. Type the analogLib library and the nbsim cell in the CDF Source Information section.
8. Type the name of your destination library (bicmos) and the cell name (nfet) in the CDF
Destination Information section.
Press the Tab key at the end of each entry.
9. Click Apply.
You can look at the CDF description of nfet using the Edit Component CDF form, as you did
in the complex pole example in this chapter.
In the next chapter, you will change some of the parameter attributes to make nfet a different
part from nbsim.
Using SKILL
The following SKILL function copies the base-level CDF description of nbsim in analogLib
to nfet in bicmos.
cdfCopyCDF( dest_cell "baseCellData" srcCDF )
This is possible only after you have performed these assignments, in order:
source_cell = ddGetObj( "analogLib" "nbsim" )
srcCDF = cdfGetBaseCellCDF( source_cell )
dest_cell = ddGetObj( "bicmos" "nfet" )
if( destCDF = cdfGetBaseCellCDF(dest_cell) then
cdsDeleteCDF( destCDF )
)
If the destCDF already has a CDF description of the specified type, a warning message will
be displayed in the CIW indicating that the Base/User CDF already exists. In this case, the
CDF copy function will not be performed.
Refer to Appendix C, “NBSIM Transistor CDF SKILL Description,” for an example of the SKILL
CDF description of the nbsim cell.
3
Defining Parameters
■ Overview on page 52
■ Component Parameters on page 53
■ Editing Parameters on page 60
■ Passing Parameters in a Design on page 63
■ Parameterized Cells on page 65
■ Complex Pole Example on page 66
■ NFET Example on page 68
Overview
This chapter describes how to create cell parameters and set parameter attributes.
Each cell has a set of one or more parameters that describe the function of the cell. At any
one time, a parameter has one value and a set of attributes. Unlike the value, attributes
impose features and limitations on the parameters themselves, independent of their values.
For example, the Boolean attribute means that a parameter can have only one of two values.
A float attribute requires that the value of the parameter be a floating-point number.
Another attribute can determine whether the parameter value is displayed on a form or in the
schematic.
Cell
parameter
parameter
parameter
parameter value
attribute
attribute
attribute
When a cell is instantiated into a design, the parameters of that cell become properties.
You can set up a hierarchy of CDF descriptions, one overriding the other, because you might
want to override specific attributes of some parameters. For example, if you define the xyz
parameter on a base-level CDF, you can define the same xyz parameter on the corresponding
user-level CDF. Because the user-level description overlays the base-level description, the
user-level attributes override the base-level attributes. However, certain parameter attributes,
such as the parameter name, cannot be overridden.
Note: Because user-level CDF is specific to a user and not a library or cell, simulation results
can be different for different users. The use of user-level CDF is therefore discouraged.
Component Parameters
The Component Parameters section of the Edit Component CDF form lists all of the
parameters defined for the selected CDF description. (Refer to Chapter 2 to learn how to
select libraries and cells.) Use the scroll bar on the right side of the form to view more
parameters. If a parameter has a default value, it is displayed in the form field next to the
parameter name.
Default
values
Parameter names
Name lets you choose whether to display the name of the parameter or the prompt for the
parameter on this form. Switching to Prompt redisplays the parameter information by prompt,
rather than by parameter name. This is useful if you become familiar with parameters from
their details in other forms that use the prompt rather than the name.
Select To Delete lets you delete the parameter from the CDF. Click on the button to the right
of the parameter you want to delete. The only way you can undo a deletion is to cancel all of
your edits.
Add displays the Add CDF Parameter form, which lets you add parameters to a CDF
description. You can place the new parameters in whatever order you like relative to the
existing parameters. The Add After Parameter field lets you specify where you want the new
parameter inserted. This cyclic field contains the names of all existing component
parameters.
The Add CDF Parameter form has fields for setting all attributes available to a CDF
parameter. When creating a new parameter, you can leave some fields blank. This does not
affect the overall CDF.
After you set the attributes you want, click on Apply to insert the new parameter as the first
parameter or after an existing parameter.
Edit displays the Edit CDF Parameter form, which lets you change the value and format of a
parameter.
The form has fields for modifying all attributes available to a CDF parameter. You can select
a parameter to modify with Choose Parameter. When you select a parameter from the cyclic
field, the form redisplays to show the attributes for that parameter. When you change the
name of a parameter, you replace the first parameter with a second parameter.
After you change the attributes of one parameter, click Apply before you change the attributes
of another parameter.
Move lets you change the sequence of existing parameters. You can move a parameter
relative to other parameters in the Component Parameters section of the Edit Component
CDF form:
Commands that use CDF data display CDF parameters in the same order as the CDF editor.
To avoid unnecessary scrolling, place frequently used parameters at the top.
Note: The CDF description does not change until you click Apply or OK on the Edit
Component CDF form. Clicking Apply or OK on a subform updates the Edit Component CDF
form, not the CDF.
The following figure shows the attribute list for the string parameter bn.
paramType is the data type of the parameter. You need to specify paramType for every
parameter. Valid data types are string, int (integer), float (floating-point number), radio
(radio button), cyclic (cyclic field), boolean, button, and netSet.
If parseAsNumber is yes, the system converts the string to a floating-point number, converts
the floating-point number to the most efficient notation for execution, and reconverts the
floating-point number into a string.
If parseAsNumber is no (the default) or don’t use, the system does no conversion. Use this
setting if the parameter to be defined is a literal that contains numeric characters, such as the
name of a file or a model.
units determines the unit suffix and scale factor to use when displaying the parameter value.
Use this attribute only with string type parameters where the response to parseAsNumber
is yes. (This specification has no effect if you set it for other parameter types.)
The units attribute must be one of the following: resistance, capacitance, inductance,
conductance, time, frequency, power, powerDB, lengthMetric, lengthEnglish, angle, voltage,
current, or temperature.
storeDefault specifies whether the parameter default value is saved as a property of the
instance. All tools based on the Cadence Analog Design software use the CDF description
to find default values if there is no property on an instance.
If set to no (the default) or don’t use, a property is not saved on the instance when the
parameter value is the default. Also, if the default value of the parameter changes, all
instances that use the default automatically get the new default value. (To see the change in
an open window you must choose Window – Redraw from the Cadence menu.)
If set to yes and the parameter value is set to the same value as the default, a property is
saved on the instance. If you are a user of the Open Simulation Software (OSS), and you used
to set this attribute to yes because you could only netlist using instance properties, you can
now set it to no because OSS users now have the option of using CDF. One disadvantage of
this attribute is that if the default value of a parameter changes, the instances that use the
default do not automatically change to the new default.
name is the parameter name. All parameters must have a name defined, and parameter
names cannot begin with a number. Sometimes this name is dictated by the application that
uses the parameter.
prompt is a string used as the prompt for the value of this parameter on the Add Component
form. If you do not specify a prompt, the parameter name is used. Because parameter names
are not always clear (r, ad, m, and so forth), you can use this field to create a more meaningful
prompt (such as resistance, diffusion area, multiplier, and so forth).
choices is a list of selections for a cyclic or radio data type. This attribute does not apply to
other types of parameters.
If each selection is a single word, you can separate the selections with spaces. If any
selection is a group of words, you must separate each selection with a comma (,). (When
using commas, do not leave extra spaces between selections because these spaces become
part of the selection value.)
Notice that there is no blank between the number 1 and the comma, or between the comma
and the c in choice.
defValue is the default for the parameter. Most parameters must have a default defined. The
default value depends on the data type for this parameter. Parameter values can be long
mathematical expressions with variables and functions of other parameters.
use determines if the parameter is to be used. Often, you can enter Cadence SKILL
language expression that evaluates to t or nil in this field to determine if this parameter is
applicable. When the field evaluates to nil, the system never displays the parameter. When it
evaluates to non-nil (the default), then based on the value of display, the system will display
the parameter.
display determines if this parameter is displayed in forms that display CDF parameters, such
as the Edit Properties form or the Add Component form. You must enter t, nil, or a SKILL
expression that evaluates to t or nil in this field to determine if this parameter is to be
displayed. If the field evaluates to non-nil (the default), the parameter is displayed. If the field
evaluates to nil, the parameter is not displayed.
dontSave determines if the parameter value is to be saved on the instance. This attribute is
for programming use only. Typically, you should set this field to nil and not use it. If the field
evaluates to nil (the default), the parameter value is saved as a property on the instance. If
the field evaluates to non-nil, the parameter value is not saved as a property on the instance.
Caution
The dontSave attribute overrides the storeDefault setting. If storeDefault
is yes and dontSave is yes, not even the default property is saved.
editable determines if this parameter can be edited in forms that display CDF parameters,
such as the Edit Properties form or the Add Component form. Often, you can enter a SKILL
expression that evaluates to t or nil in this field to determine if the parameter is editable. If the
field evaluates to non-nil (the default), the parameter is editable. If the field evaluates to nil,
the parameter is not editable. (If not editable, the parameter is dimmed so that you can see
the value but you cannot edit it.)
callback specifies a SKILL routine to be executed whenever the value of the parameter
changes. The value of this optional field must be a string. Your entry can be the entire
function to be executed or a call to a function that is defined elsewhere. If you do not enter
anything in this field, the system assumes that there is no callback.
Note: The CDF parameter callback is primarily a GUI based callback. GUI based callbacks
occur when you modify the values in the parameter form fields. A GUI based callback is active
when the CDF parameters are displayed in the Add Instance form or the Edit Object
Properties form when you use the Create Instance or Edit Properties commands. For more
information on callbacks, refer to Chapter 7, “Overview on page 116,”.
The following table shows the attributes that are required (req), optional (opt), and unused for
each data type. The use attribute is for programming use only (prog). You should set the
dontSave attribute to the default value nil for all parameter types.
Editing Parameters
All the parameter attributes descriptions in the previous section apply whether you are using
SKILL or the CDF editor. The following sections describe how you edit parameters using
either method.
The settings for the selected parameter are displayed as shown in the following figure.
Using SKILL
You can use SKILL functions to create and modify parameters and their attributes. The
following SKILL functions create the parameters for the sample CDF description represented
here by the variable cdfDataId.
The following functions define the sample parameter width with a callback from the
parameter w:
cdfParamId = cdfCreateParam(cdfDataId
?type "string"
?parseAsNumber "yes"
?units "lengthMetric"
?parseAsCEL "yes"
?storeDefault "no"
?name "w"
?prompt "width"
?defValue 7u
?display "artParameterInToolDisplay(’w)"
?editable "cdfgData->maskLayoutViewName->..."
?callback "pcMOSw( )")
The following SKILL functions define the parameters bend and bendt:
cdfParamId = cdfCreateParam(cdfDataId
?type boolean
?name "bend"
?prompt "PCell add bend?"
?defValue nil
?display nil)
cdfParamId = cdfCreateParam(cdfDataId
?type float
?name "bendt"
?prompt "PCell add bend?"
?defValue 0.0
?display nil)
You can use these inherited parameter value functions to pass parameters in a design. If you
change the value of one parameter, you also change every other parameter whose value is
defined by an expression that includes a Par function of the parameter that you changed.
Different Par functions can be used in the same expression.
You can define variables by expressions that use any combination of pPar, iPar, atPar, and
dotPar. Those functions can reference other variables that are defined by expressions that
include one of the Par functions. This chain can continue indefinitely. Circular references
generate errors.
pPar
pPar("x") lets you reference the value of parameter x from the parent instance of the
component.
When Analog Expression Language (AEL) evaluates this expression, it searches the parent
instance for the value of slewRate and substitutes it into the expression. If it cannot find
slewRate on the parent instance, AEL searches the parent cell’s effective CDF for a value
for slewRate.
Top-level schematic instances with parameters defined by expressions using pPar follow a
special procedure. The netlister first searches the property list of the top-level schematic for
a value for the referenced parameter. If it cannot find it, it searches the top-level cell’s effective
cell CDF for a default value for the parameter. This value can also be defined with an
expression, but that expression can only include the iPar and dotPar functions.
iPar
iPar("x") lets you reference the value of a parameter on the current instance.
Suppose the parameter i12 of a component is defined as a function of its input noise current,
n:
i12 = V1/r12 + iPar("n")
The AEL evaluates this expression by searching the current instance for the value of n, which
it substitutes into the expression. If the current instance does not have the parameter n, AEL
uses the cell’s effective CDF value as a default value for n. Changing the value of n does not
have an effect unless you change the value of n on this specific instance.
Caution
Use the iPar function when the value of a parameter depends on the value
of another parameter on the current instance but ensure that these
parameters are not dependant on each other. For example, if you use the
cap symbol and specify the length as iPar("w") and width as iPar(“l”) you
will get a segmentation fault error as this results in infinite recursion.
atPar
The use of atPar is discouraged. Use pPar instead. atPar searches the entire design
hierarchy, looking at the parent, grandparent, and great-grandparent of the instance, and so
on, until it finds the original value. Using atPar with hierarchical netlisting causes an error for
socket interfaces such as spectreS.
If atPar cannot find the parameter value anywhere in the design hierarchy, it then searches
the current instance master, which is typically the simulation primitive for the device in a
library. If that fails, atPar checks the global block for your simulator (nlpglobals).
dotPar
The use of dotPar is discouraged. It is not supported in several netlist situations.
When trying to evaluate a parameter on a primitive at the bottom level of a design hierarchy,
dotPar behaves like iPar. If a property on a component or functional block higher up in the
design hierarchy uses dotPar("x") in its definition, dotPar goes down to the bottom of the
design hierarchy, searching for x on the leaf instance or primitive currently being output to the
netlist.
At the top level of a design, dotPar searches the top-level cellview rather than the instance.
For example, in a transistor with the length parameter L, L is defined by a callback. Normally,
changes in the value of the width parameter W trigger the L callback. The expression for this
is
cdfgData -> L -> value = cdfgData -> W -> value
If you change the value of test_width, the callback that defines L is not triggered, and the
value of L becomes out of date.
Parameterized Cells
Although parameterized cells (pcells) provide great design flexibility, they also have unique
requirements for their CDF descriptions. These requirements include the following.
■ The default value for CDF parameters that are directly mapped to pcell stretch
parameters must be the same as the minimum value of the pcell parameter.
If the CDF default value is larger than the minimum pcell stretch parameter value, when
you place a pcell with a parameter value less than the CDF default value, the pcell
shrinks to the minimum pcell stretch value.
■ In layout, pcells do not understand string variables. All variables must be floating-point
numbers if you are using stretch parameters.
■ In a schematic, the system places pcell symbols according to string variables because
it must understand expressions (using the Analog Expression Language). Variables are
most likely to be strings to allow scaling units (nanometers, micrometers, and so on).
The second and third items might appear to conflict, but you can use one of the two methods
to simultaneously support the requirements of layout and schematics.
■ Create two CDF parameters. One is a string variable for the schematic instantiation of
the pcell symbol. The other is a floating -point number variable for the pcell layout view.
You must maintain both variables.
■ Create a callback for the floating point parameter based on the value of the string
parameter. The user enters the string value and both values are set.
The Component Parameters section lists all component parameters. For complexPole1,
these are sigma, wn, and macro.
The first field, Choose Parameter, is a cyclic field whose choices are the parameters
listed in the main form. The remaining fields give the current values and types of CDF
attributes attached to the parameter specified in the Choose Parameter cyclic field. The
parameter sigma has a paramType equal to string. The parseAsNumber and
parseAsCEL attributes are set to yes (true). The parameter name is set to sigma.
The prompt used in the Edit Object Properties and Add Component forms is Sigma.
When you are done, you see the parameter name Sigma, but the system keeps track of
the parameter by its real name, sigma. The default value of sigma is -5, so every instance
of the complexPole1 in a schematic has this value initially.
The first two parameters, sigma and wn, are component specific. The third parameter,
macro, identifies the file that contains the macro (subcircuit) definition. The default value
of macro is the f_cmplxP1 file. Because macro is a CDF parameter, you can change its
value to point to another file. This lets you create your own macros and reference them
from the CDF editor. Editing at this level changes all instances of complexPole1. To
change complexPole1 in a particular design, use the Edit Properties command in the
schematic editor.
2. Cancel the Edit CDF Parameter form to return to the Edit Component CDF form. (You
have not modified anything.)
If you want to make changes to the complex pole CDF description, copy the cell to a new
library that you have write access to.
The complex pole example continues at the end of the next chapter, where you examine the
options available for CDF simulation information.
NFET Example
This section shows you how to use the CDF editor to set up parameters and their attributes
for the NFET cell. You should have the Edit Component CDF form open for the NFET cell
created in Chapter 2.
Parameter Description
maskLayoutViewName Cyclic field that distinguishes between two layout views
width Floating-point number that defines the width of the gate
length Floating-point number that defines the length of the gate
bend Boolean to control conditional inclusion of shapes for bend
bendt Boolean to help stretch shapes correctly when bend occurs
diffD Boolean to control conditional inclusion of shapes for
diffusion drain contact versus metal drain contact
3. In the Add After Parameter field, add the new parameter to the parameter list after the
parameter m.
4. Specify the parameter type as cyclic and enter the other attributes shown in the sample
form, pressing the Tab key at the end of each field.
5. When you are done entering all the selections, click Apply so that your entries take
effect.
10. In the editable field, make the parameter not editable by typing
cdfgData->maskLayoutViewName->value ==
cdfgData->maskLayoutViewName->defValue
The expression in the editable field of parameter w controls the designer’s ability to change
this parameter. This expression evaluates to nil if the attribute maskLayoutViewName is not
the same as its default value. In other words, if the designer selects the layout.pwr view
name, this parameter is not editable.
The expression in the display field of parameter w (copied as part of the w parameter from
the analogLib library) controls the display of parameters when the user uses the Edit –
Properties – Tool Filter command. The expression evaluates to t if this parameter is
associated with the tool selected.
You can expand the display attribute expression. For example, to turn off the display of w
whenever the maskLayoutViewName is layout.pwr (instead of making it uneditable), you
can use the following:
artParameterInToolDisplay(’w) &&
(cdfgData->maskLayoutViewName->value ==
cdfgData->maskLayoutViewName->defValue)
layout.pwr, there is no reason to ask about the drain connection. The same is true if you
are using a bend.
You are ready to set the simulation options in the NFET CDF description, which are described
in the next chapter.
4
Modifying Simulation Information
■ Overview on page 78
■ Edit Simulation Information Form on page 78
■ Editing Simulator Options on page 86
■ Complex Pole Example on page 88
■ NFET Example on page 90
Overview
Before you can simulate a component, you must enter information required by each of the
simulators you intend to use. The Simulation Information section of the Edit Component CDF
form lists the simulators associated with a CDF description.
The value in the field to the right of the simulator name indicates that the component CDF has
simulation information for that simulator. The value is the default value of the terminal order
attribute, a list of the names of the terminals (connection points) of this component. You can
modify this value for each simulator on the form to accommodate the different requirements
of each simulator.
You must click on Edit to display the Edit Simulation Information form. Use this form to enter
detailed information for each simulator.
Each simulator requires a unique set of information. Not every field described in this section
appears for each simulator. Only those fields that are appropriate for the simulator you select
are displayed. You can modify each of the fields in this form.
Choose Simulator is a cyclic field that lets you select the simulator to modify. When you
select a new value, the form redisplays to show attributes for that simulator. After you change
the attributes of one simulator, click on Apply before you change the attributes of another
simulator.
netlistProcedure is the name of the netlist procedure to use. Procedures that come with the
system are defined in tools/dfII/etc/context. You can also define your own procedures.
For the spectre interface, the netlister chooses a default netlist procedure if none is specified.
For socket interfaces, a netlist procedure must be specified.
The netlist procedures for spectre that are supplied by Cadence start with spectre. All
Cadence-supplied netlist procedures for socket interfaces start with ans, followed by an
abbreviation of the simulator name. The abbreviations used are: Cdl, Hpmns, Libra4, Lvs,
Spectre, SpectreS and Spice. Using SpectreS as an example, use
■ ansSpectreSCompPrim for elements (components without an associated model)
■ ansSpectreSDevPrim for devices with models
■ ansSpectreSSrcPrim for all voltage and current sources
ansSpectreSCompPrim prints out the name of the component and its terminals.
ansSpectreSDevPrim prints out the name of the component, its terminals, and the model
name. ansSpectreSSrcPrim calls a generic routine to print out the sources.
Note: The netlist procedure name can be defined as either a symbol (without quotation
marks) or a string (with quotation marks). For example, ansSpectreSDevPrim (symbol) or
"ansSpectreSDevPrim" (string).
enumParameters are parameters of SPICE and Spectre primitives, where the values of the
parameters are enumerations. The parameter names must be names recognized by the
targeted simulator.
For details see Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the Cadence
AMS Environment User Guide.
referenceParameters are parameters that have instance names as their values. The
parameter names must be names recognized by the targeted simulator.
For details see the Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the
Cadence AMS Environment User Guide.
stringParameters are parameters that are treated as strings when they are written to the
netlist. The parameter names must be names recognized by the targeted simulator.
For details see the Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the
Cadence AMS Environment User Guide.
arrayParameters are parameters that must be written to the netlist as arrays. The parameter
names must be names recognized by the targeted simulator.
For details see the Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the
Cadence AMS Environment User Guide.
For details see the Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the
Cadence AMS Enviroment User Guide.
For socket interfaces, these are parameters not yet defined in modelArguments,
macroArguments, or instParameters. Typical values are macro, model, and bn. (The
parameter names you list must reflect the property mapping you specify in the propMapping
field.) If you use a tool filter, parameters that are not used by the tool are not displayed. Any
field you specify in otherParameters, however, is displayed regardless of the tool filter (with
the artParameterInToolDisplay function).
For details see the Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the
Cadence AMS Enviroment User Guide.
instParameters a list of simulator names of parameters that you want to include with this
device in the netlist. (The parameter names you list must reflect the property mapping you
specify in the propMapping field.)
For details see Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the Cadence
AMS Environment User Guide.
Some simulators require that a property have a different name or different capitalization from
the parameter name in the parameter definition. For LVS (Layout Versus Schematic), this
depends on the parameter names used in the LVS rules in your technology file. For example,
the capacitor parameter might be c, and the LVS rules can refer to the property C. You can
set the propMapping field to map the value of c to C so that the parameters listed with each
instance are C.
modelArguments is a list of the cell CDF parameter names that are to be passed as
arguments to the cell model. This entry is not used by the spectre interface. (The parameter
names you list must reflect the property mapping you specify in the propMapping field.) The
order of the names defines the corresponding substitution pattern in the file; for example, &1
&2 &3. The first element of the list (&1) should not be considered part of the parameter list.
It is replaced by the model name when the list is read by the simulator. The
modelArguments list is also used with Spectre® SKILL-based models.
macroArguments is a list of the cell CDF parameter names that are passed as arguments
to the cell macro. This entry is not used by the spectre interface. The order of the names
defines the corresponding substitution pattern in the file; for example, &1 &2 &3. The first
element of the list (&1) should not be considered part of the parameter list. It is replaced by
the macro name when the list is read by the simulator.
When using a function like pPar(prop), prop has to be in the macroArguments field when
passing parameters down the hierarchy.
componentName is the type of component you are creating, such as BJT, JFET, and
MOSFET.
For the spectre interface, if the "model" parameter ("Model Name") has a value, that value is
used as the name of the model in the netlist. Otherwise, the value of this entry is used as the
name of the model. If neither the model parameter nor the componentName entry has a
value, the name of the cell is used as the name of the model.
For details see Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the Cadence
AMS Environment User Guide.
When you are using auLVS and auCDL, component names can be anything. For other
simulators, you must use lowercase component names similar to those used in analogLib.
This is critical for SPICE types of netlists.
termOrder is a list of terminals that define the net order for your component. The nets are
considered those nets connecting the terminals in the order given in this list.
For details see Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the Cadence
AMS Environment User Guide.
You can also use programmable nodes to define the net order. The use of programmable
nodes is discouraged in releases 4.4.3 and later. Instead, use inherited connections. You can
use the conversion tools to convert your designs. Programmable nodes are not supported by
spectre.
To do this, you need to define a bulk node property (usually bn). The following entry is an
example of termOrder input:
PLUS MINUS progn(bn)
This indicates that the third net, progn, is defined by the bulk node property instead of by a
connection to a pin. The property bn must have a default value when using LVS.
Note: You can set a net name to a global net (such as gnd! or vdd!), to one of the instance
pins (such as PLUS or MINUS), or to a net name, as long as the net, pin, or name exists in
the cellview. You can assign a net name to bn. (This is called parameterizing the bulk node.)
You can also set a net name to any other net. If the netlisting is flat, the net name must be
fully qualified, identifying all levels of hierarchy in the design. If the netlisting is hierarchical,
the net name does not need be fully qualified if it is a local net name on the same page.
Caution
You must escape invalid characters while specifying termOrder using
symbols to make them valid symbols in SKILL. All symbols must be
preceded by the backslash (\) as used in the following code:
cdfId = cdfCreateBaseCellCDF( cellId )
.
.
.
cdfId->simInfo->spectre = ’(nil
otherParameters (model)
instParameters (w l as ad ps pd nrd nrs ld ls m trise region)
termOrder ( a\<0\> a\<1\> )
termMapping (nil D \:d G \:g S \:s B \:b )
)
deviceTerminals lets you define the terminal names to be listed in the device definition line.
If you leave this field blank, the terminals listed use the same names as those in the
termOrder field. Used by auLVS only.
The entries in this field are usually different from those in the termOrder field when you have
a programmable node (the bulk node). For example, if you used progn(bn) in the termOrder
field for the three-terminal capacitor, you might see the following entry in deviceTerminals:
PLUS MINUS BULK
termMapping is used when the simulator has different names for the component terminals
than the cell schematic. It is set up as a disembodied property list. Therefore, the first entry
in the list is nil. This is followed by a set of name-value pairs, where the first name is the
terminal name on the symbol and the second name is its corresponding terminal name used
by the simulator for the device.
For example, in the nbsim cell in analogLib, the terminals names D, G, and S are specified
in uppercase. Although uppercase terminal names are appropriate for SPICE, the Spectre
simulator expects the terminal names d, g, and s in lowercase. Therefore, in the SKILL
version, to map between the two sets of terminal names for the Spectre simulator, you can
enter the following code in the simInfo field:
termMapping(nil D \:d G \:g S \:s B \:b)
Note: Make sure all non-alphanumeric characters are preceded by a backslash (\).
This is important when you use backannotation because the simulator saves the results
under the terminal name that it recognizes.
propMapping lets you enter your own CDF parameter names in place of the names
recognized by the simulator. You can define different name mappings for each simulator. A
single parameter can be identified a different way for each simulator.
For details see Appendix B, "Updating Legacy SimInfo for Analog Primitives" in the Cadence
AMS Environment User Guide.
This format represents a disembodied property list, so the first element is always nil.
The LVS propMapping list is nil C c. The CDF parameter name is c, but under the LVS rules,
it must be C. In another simulator, the same CDF parameter value might be referred to as F.
In this case, the propMapping list for this simulator is nil F c. A third simulator might refer to
this value as cap, making its propMapping list nil cap c.
permuteRule, used only in auLVS, lets you indicate the permutability of the pins, that is,
whether pins can be swapped or if they must be fixed. For example, the capacitor in the
propMapping definition shows that the PLUS and MINUS terminals are permutable.
namePrefix lets you enter a prefix for defining the instance in the netlist. This is not used by
the spectre interface. Typically, this is the first letter of your component. The netlister takes
this prefix (R, for example), and the name of your component (12, for example), and forms the
name (R12).
current lets you save the simulation and definition of the current plot set. This is not used by
the spectre interface. The only choices for this field are port or nil. If you do not specify a
choice, no currents are saved. You can choose to save or plot the current for the port of a
device or through a component. For SPICE-based simulators, you cannot save currents on
specific ports. Currents can be saved only on the component (for example, resistors). The
Spectre simulator lets you save currents on specific ports. For devices (for example, an npn
transistor), you probably want to save currents on a port.
Typically, only the positive port current of a component current is written to the simulation PSF
file, and the Cadence Analog Design software calculates the negative port by taking the
negative of the positive port. To use this feature to extract component currents, you must set
the termMapping field as follows:
termMapping =
(nil PLUS \:p MINUS "(FUNCTION minus(root(\"PLUS\")))")
opParamExprList lets you define the terminal names to be listed in the device definition
line. If you leave this field blank, the terminals listed use the same names as those in the
termOrder field. Used by auLVS only.
Simulator Options
The following table lists six simulators and the options that apply to them.
Cadence
Option Spectre SpectreS auLVS AMS
SPICE
netlistProcedure Yes Yes Yes Yes No
otherParameters Yes Yes No Yes Yes
instParameters Yes Yes Yes Yes Yes
enumParameters No No No No Yes
modelArguments No Yes No Yes No
macroArguments No Yes No Yes No
componentName Yes Yes Yes Yes Yes
termOrder Yes Yes Yes Yes Yes
deviceTerminals No No Yes No No
termMapping Yes Yes No Yes No
propMapping Yes Yes Yes Yes Yes
excludeParameters No No No No Yes
extraTerminals No No No No Yes
isPrimitive No No No No Yes
permuteRule No No Yes No No
namePrefix No Yes Yes Yes No
current No Yes No Yes No
arrayParameters No No No No Yes
stringParameters Yes No No No Yes
referenceParameters No No No No Yes
opParamExprList Yes Yes No Yes No
Using SKILL
You can use the SKILL variable cdfId and the right arrow (->) operator to specify simulator
options. Enter the options for each simulator as elements of a disembodied property list.
The following SKILL expression sets the options for the Spectre (spectre) simulator:
cdfId = cdfCreateBaseCellCDF( cellId )
.
.
.
cdfId->simInfo->spectre = ’(nil
otherParameters (model)
instParameters (w l as ad ps pd nrd nrs ld ls m trise region)
termOrder ( D G S B )
termMapping (nil D \:d G \:g S \:s B \:b )
)
The following SKILL expression sets the options for the Analog LVS (auLvs) simulator, given
a definition for cellId:
cdfId = cdfCreateBaseCellCDF( cellId )
.
.
.
cdfId->simInfo->auLvs = ’(nil
netlistProcedure ansLvsCompPrim
instParameters (m l v)
componentName n0bsim
termOrder (D G S progn(bn))
deviceTerminals (D G S B)
propMapping (nil L l W w)
permuteRule "(p D S)"
namePrefix "Q")
The following SKILL expression sets the options for the Spectre (spectreS) simulator:
cdfId = cdfCreateBaseCellCDF( cellId )
.
.
.
cdfId->simInfo->spectre = ’(nil
netlistProcedure ansSpectreDevPrim
otherParameters (bn model)
instParameters (w l as ad ps pd nrd nrs ld ls m trise)
componentName bsim1
namePrefix "S"
current port)
The following SKILL expression sets the options for the Cadence SPICE (cdsSpice)
simulator:
cdfId = cdfCreateBaseCellCDF( cellId )
.
.
.
cdfId->simInfo->cdsSpice = ’(nil
netlistProcedure ansSpiceDevPrim
The form displays all of the fields applicable to spectre. However, not all fields are
required by different netlist procedures.
The other important fields are termOrder and instParameters. The termOrder field is an
ordered list of the terminals as named on the symbol. The netlister uses this list. The order is
important, especially if the component is defined by a subcircuit: the order in termOrder maps
to the node numbers specified in the first line of the subcircuit.
Because complexPole1 uses a macro model (subcircuit definition) to define its operation,
the CDF parameter model must have a value in the Component Parameters section for
spectre. If you are using a schematic to describe the component, the model information is
unnecessary.
For the spectre interface, the instParameters field determines the names of the parameters
of all types of components, primitives, subcircuits, model cards, and Verilog®-A modules. The
subcircuit definition for f_cmplxP1 is
subckt f_cmplxP1 (1 2)
parameters sigma wn
E1 3 0 1 0 1E-6 (??)
R1 (4 5) resistor r=1
L1 (3 4) inductor l=(1/(-2*sigma))
C1 (5 0) capacitor c=(-2*(sigma))/((wn*wn)+(sigma*sigma))
ends
The socket interfaces use the macro parameter instead of the model parameter. In order to
avoid duplicate information, the value of the model parameter is set to iPar("macro"), and the
model parameter is not displayed.
This model, and others used by the functional block library, are in the following file:
your_install_dir/tools/dfII/etc/cdslib/artist/spectre/functional.scs
For socket interfaces, the macroArguments field determines the names and order of
parameters that are passed down through the design hierarchy. Again, the order is
particularly important in the case of macro models. The first parameter in the list is assigned
to the variable &2 in the subcircuit description, the second to &3, and so forth. In this example,
complexPole1 is defined by a macro model and the parameters sigma and wn on the symbol
instance are passed to the model file f_cmplxP1 as &2 and &3.
This model, and others used by the functional block library, are in the following directory:
your_install_dir/tools/dfII/etc/cdslib/artist/cdsSpice/functional
There are several other fields in the Edit Simulation Information form. The simInfo parameters
vary depending upon whether the component is a model or a macro for socket interfaces.
For the spectre interface, the fields are the same for models and macros. A model is a
component that references a model statement in the netlist. A macro is a component
described by a subcircuit. For example, complexPole1 is a macro, but a diode could be a
model. You determine whether a component is treated as a model or a macro by selecting
the appropriate netlist procedure: ansSpiceDevPrim or ansSpiceSubcktCall. Once you have
selected either model or macro, you can assign the appropriate fields in the Simulation
Information section. If you set the type to macro, the macroArguments field must contain the
arguments to assign to &2, &3, and so on in the subcircuit. Similarly, if the type is model, the
modelArguments field must contain the ordered list of arguments to pass to the model
statement.
NFET Example
Before proceeding with this example, open the Edit Component CDF form and set it to edit
the nfet cell in the bicmos library. Scroll down to the Simulation Information section.
For this NFET example, the next step in CDF development is to select simulator options for
the new component. Because you copied the CDF description for the NFET component from
analogLib, there are six simulators with their options already defined, including auLvs,
cdsSpice, and spectre.
For the Analog-Microwave LVS (auLvs) simulator, you need to define three parameters in the
parameter section of the CDF description, m, l, and w. For the NFET example, these
parameters were copied from the analogLib nbsim cell.
You also need parameters for the spectre and spectreS interfaces but these are already
defined in the original CDF that was copied.
The Spectre simulator options are similar to the Cadence SPICE options, but the Spectre
simulator does not require property mapping.
5
Specifying Label Information
You can set the default label display options in the Interpreted Label Information section of
the Edit Component CDF form. The Interpreted Labels Information section contains different
fields, depending on whether you are editing the CDF description of a library or of a
component.
Scroll down the Edit Component CDF form and look at the Interpreted Labels Information
section. Library label information differs from cell label information. The display that you see
depends on whether you are viewing a library CDF form or of a cell CDF form.
You can specify a value of not set for any field. This means that the parameter is deleted from
or not added to the base-level library CDF.
paramEvaluate selects a method for displaying parameter values. (These different methods
of display are necessary because a parameter value can be a constant, a design variable, an
expression using constants or design variables, or a value or expression inherited from the
hierarchy.)
■ not set specifies that you want no setting for this field.
■ literal displays the literal parameter value as entered.
■ suffixes converts suffixes in the parameter value to numerical values. For example, 1K
becomes 1000.
■ globals evaluates global design variables in expressions. For example, if the value is
Rin*100 and Rin is 5, the label displays 5 * 100.
■ inheritance evaluates inherited parameters in expressions. For example, if the value is
pPar(Rin)*100 and the parent instance has a parameter Rin set to 10, the label displays
10 * 100.
■ full performs complete numeric evaluation of the expression and displays the result. For
example, if the value is Rin*10 and Rin is 5, it displays 50. If the value is pPar(Rin)*100
and the parent instance has a parameter Rin set to 10, it displays 1000.
paramSimType selects the simulation type for the operating point result that you want to
annotate. The choices are not set, DC, or transient. This field is for operating point
parameters only.
termSimType selects the simulation type for the result that you want to annotate. The valid
choices are not set, DC, or transient. This field is used only when termDisplayMode is
either voltage or current.
instNameType selects the type of instance name. The valid choices are
not set, schematic, or simulation. This field is used only when the instDisplayMode is
instName.
If a parameter name in these lists is preceded by a minus sign (-), the parameter value is
displayed but the parameter name is not. Using the minus sign is the same as setting the
Display Value Only option in the Label Display form.
If there is no minus sign before the parameter name and the value is the default, the display
has the format parameter name : value. If there is no minus sign before the parameter
name and the value is not the default, the display has the format parameterName = value.
Each label set in the following list is limited to the number of cdsParam labels on the cell.
Each section shown below is displayed when you click on the corresponding Select Label
button.
these sections
appear.
When you change the display of information in the Edit Component Display Options form, the
display of ilLabels (labels generated automatically during automatic symbol generation) and
interpreted labels is affected. ilLabels are usually defined on symbols and are displayed
when you place the symbol in a schematic. For example, the following figure shows the
symbol for a capacitor from analogLib:
The cdsTerm( ) labels (usually placed on the layer annotate drawing8) display information
about the pin or about the nets attached to the pin. These labels must be of the form
cdsTerm(pinName). In the Edit Component Display Options form, you use the Terminal
Labels settings to control the cdsTerm labels.
If pinName contains special characters, you must quote or escape them properly.
The cdsName( ) labels (usually placed on the layer annotate drawing7) display information
about the cell name or the instance name. In the Edit Component Display Options form, you
use the Instance Labels settings to control the cdsName label.
The cdsParam( ) labels (usually placed on the layer annotate drawing) display information
about parameter values or backannotated parameter values. Three labels are usually
generated during automatic symbol generation, but you can define additional labels. The only
requirement for the parameter labels is that they are sequential, starting with 1 if they are
numbers. In the Edit Component Display Options form, you use the Parameter Labels
settings to control the cdsParam labels.
Note: cdsParam( ) can also take parameter names. Therefore, as cdsParam(n), you can
use cdsParam(s_paramName), for example, cdsParam(’pm), where pm is a parameter
name. You must declare the parameter names in the paramLabelSet field of the Edit
Component CDF form. The cdsParam points to those parameters in an orderly manner. If you
change the order of those parameters, the displayed values will be changed.
In the Edit Component Display Options form, there are three cyclic fields for parameter name
labels. If you add a fourth parameter label to your cell, a fourth cyclic field appears on the Edit
Component Display Options form. The syntax for the fourth parameter label is cdsParam(4).
If you choose the library option in the Apply To field in the Edit Component Display Options
form, the display information is written to the library user-level CDF. If you choose the cell
option, the display information is written to the cell user-level CDF. If you choose the instance
option, the display information is saved as properties on that instance. Only the instance label
display is saved when you close the library because user-level CDF data applies only while
the library is open. (It is not written to the database or saved when you exit the Cadence®
software.) To keep this library and cell CDF information, copy it into a library or base CDF
description that is permanently saved.
When you place a component in the schematic editor, the Add Component form shows the
parameters associated with this component. No CDF properties (labels) appear unless you
assign parameter values other than the default values. If you want to see the value of any
parameter displayed in the design window, you can toggle the display setting for that
parameter to make it visible.
The following SKILL expressions set label CDF specifications at the library level:
■ paramDisplayMode setting
libId = ddGetObj("analogLib")
cdfId = cdfCreateBaseLibCDF(libId)
cdfId->paramDisplayMode = “parameter”
■ paramEvaluate setting
cdfId->paramEvaluate = "t nil nil nil nil"
For the paramEvaluate option list, the first entry applies to literal, the second to suffixes,
the third to globals, the fourth to inheritance, and the fifth to full.
■ paramSimType setting
cdfId->paramSimType = "DC"
■ termDisplayMode setting
cdfId->termDisplayMode = "netName"
■ termSimType setting
cdfId->termSimType = "DC"
■ netNameType setting
cdfId->netNameType = "schematic"
■ instDisplayMode setting
cdfId->instDisplayMode = "instName"
■ instNameType setting
cdfId->instNameType = "schematic"
The following expressions set label CDF specifications at the cell level:
■ paramLabelSet setting
cell = ddGetObj(libId "NFET")
cdfId = cdfCreateBaseCellCDF(cell)
cdfId->paramLabelSet = "-model l w"
■ opPointLabelSet setting
cdfId->opPointLabelSet = "id vgs vds"
■ modelLabelSet setting
cdfId->modelLabelSet = "vfb phi eta"
The following figure shows the Interpreted Labels Information section of the Edit Component
CDF form for complexPole1.
1. Look at the complexPole1 symbol in the Symbol Editor. (Open the complexPole1
design, specifying the symbol cellview.)
cdsName()
COMPLEX
cdsTerm(in) POLE 1 cdsTerm(out)
in out
param(1)
param(2)
param(3)
X3
COMPLEX
POLE 1
in out
sigma:-5
wn:6283.1853
The two default parameter values from the Component Parameters section and the instance
name are set to be displayed (with paramDisplayMode and instDisplayMode). However,
termName is set to netName, and the component is by itself, not connected to any nets.
There are no net names to display on the terminals (in and out).
NFET Example
The NFET symbol in the following figure shows the effect of setting paramDisplayMode to
parameter and paramLabelSet to -model l w. Three parameters, model, l, and w, are
displayed. There is no parameter name displayed with bmemne (the model name) because
a minus (-) symbol precedes the parameter name model in paramLabelSet.
The default values from the CDF description are displayed for the l and w parameters, as
shown by the format of parameter name : value (l:3u and w:7u). In addition,
Try changing the fields to different settings and then view the results.
You can use labels in any view. For example, you can set up a layout with labels so that you
can see instance and parameter information when you place an instance:
c = 128f
w = 20
cdsParam(1) l = 20
cdsParam(2)
cdsParam(3)
I1
cdsName()
This can be especially useful when you build the ivpcell used in layout extraction. In this way,
when you look at the extracted layout, you see the instance found and the parameters
measured.
Note: These labels do not pick up hierarchical information, so cdsName will only show the
current name, not the hierarchical name.
6
Other CDF Information
The first four fields let you control the size of parameters on an instantiation form (such as the
Add Component or Edit Properties forms). These fields do not affect the display in the Edit
Component CDF form.
The last two fields let you apply procedures to the CDF. These procedures are performed
when you instantiate the component or when you change the component’s parameters.
buttonFieldWidth lets you specify the width of a button on the instantiation form. The
default width is 350 pixels.
fieldHeight lets you specify the height of a field on the instantiation form. The default height
is 35 pixels.
fieldWidth lets you specify the width of a field on the instantiation form. The default width is
350 pixels.
promptWidth lets you specify the width of the prompt on the instantiation form. The default
width is 175 pixels.
formInitProc lets you specify an optional procedure (a Cadence® SKILL language routine
that you provide) that executes automatically when the component is placed on an
instantiation form.
doneProc lets you specify an optional procedure (a SKILL routine that you provide) that
executes after you change any parameter on the instantiation form.
Form with default fieldHeight (35 pixels) Form with fieldHeight set at 70 pixels
Add Component Add Component
Default fields
Tall fields
Initialization Procedure
The formInitProc field in the Other Information section of the Edit Component CDF form lets
you enter the name of an optional procedure for preprocessing CDF data. The procedure
executes when the contents of the CDF are displayed on a form, such as the Add Component
form or the Edit Properties form. The procedure takes a single argument, cdfDataId, which
is the database object that represents the CDF description for the component being loaded
into the form. You enter only the function name (with no parentheses) in the formInitProc
field.
In the NFET example, you might enter an initialization procedure to reset all NFET
parameters to their defaults each time the component is displayed on a form. (This is only an
example. It is not practical to reset parameters to their default values every time you return to
the Edit Properties form.)
Enter the procedure name, setDefaults, in the formInitProc field. This procedure takes only
one argument, cdfDataId, which is used to point to the parameters and values of the
associated component.
You can create the SKILL procedure with a standard editor. You must load the file in order for
the initialization procedure to be called and run. (See “Loading Callbacks” on page 117 for
details about loading or attaching a SKILL procedure.)
procedure(setDefaults(cdfDataId)
;used as formInitProc to set all nfet values to the
;default values as form is entered
cdfDataId->w->value = cdfDataId->w->defValue
cdfDataId->width->value = cdfDataId->width->defValue
cdfDataId->l->value = cdfDataId->l->defValue
cdfDataId->length->value=cdfDataId->length->defValue
)
An initialization procedure runs every time the form is updated. The procedure runs when you
change a value on the component (a callback), and when you point to a new component.
You can also enter the following SKILL expression to set the formInitProc property when you
create the cell CDF:
cdfId = cdfCreateBaseCellCDF( cellId )
.
.
.
cdfId->formInitProc = "setDefaults"
Postprocessing Procedure
The doneProc field in the Other Information section of the Edit Component CDF form lets
you enter the name of an optional procedure to be executed after you change a parameter on
a component instance. You execute the procedure when you click on Apply on the Edit
Properties form or when you place an instance of the component using the Add Component
form.
For the NFET example, a doneProc procedure might recalculate the simulation parameters
every time the instance changes. Enter the procedure name in the doneProc field. In the
following example, the procedure name is calcSimParams. This procedure takes a single
argument, cellId, that identifies the cell of the instance that was modified. Throughout the
procedure, cdfgData, the global variable for CDF information, accesses the CDF
information.
You can create the SKILL procedure with a standard editor. You must load this file in order for
the procedure to be called and run. (See “Loading Callbacks” on page 117 for details about
loading or attaching a SKILL procedure.)
procedure(calcSimParams(cellId)
cdfgData = cdfGetInstCDF(cellId)
tmp=cdfParseFloatString(cdfgData->w->value)
cdfgData->ad->value=sprintf(s "%g" (tmp * 7.0 * 1e-6))
cdfgData->as->value=sprintf(s "%g" (tmp * 7.0 * 1e-6))
cdfgData->pd->value=sprintf(s "%g" ((tmp + 7e-6) * 2))
cdfgData->ps->value=sprintf(s "%g" ((tmp + 7e-6) * 2))
)
You can also enter the following SKILL expression to set a postprocessing procedure when
you create the cell CDF:
cdfId = cdfCreateBaseCellCDF( cellId )
...
cdfId->doneProc = “calcSimParams”
7
Writing Callbacks
Overview
A callback procedure is a Cadence® SKILL language expression that is evaluated when a
parameter value changes. Using callbacks is a powerful way to control relationships between
parameters and the restrictions on the parameter itself.
Note: Cadence advises you to have sufficient knowledge of callback procedures before
using them.
Callbacks can be GUI based or database based. GUI based callbacks occur when you modify
the values in the parameter form fields. Database based callbacks occur when the parameter
value is modified via a database action. The CDF parameter callback is primarily a GUI based
callback. A GUI based callback is active when the CDF parameters are displayed in the Add
Instance form or the Edit Object Properties form when you use the Create Instance or Edit
Properties commands.
Note: The CDF parameter callback is invoked only when you use the Create Instance or the
Edit Properties commands. If you modify the parameter values through other commands then
the CDF parameter callback is not invoked.
You can enter a callback as a SKILL expression that you type directly in the callback field of
the parameter section of the Edit Component CDF form. You can also enter a callback by
using the ?callback keyword as an argument to the cdfCreateParam function:
cdfParamId = cdfCreateParam(cdfDataId
?type "string"
?parseAsNumber "yes"
?units "lengthMetric"
?parseAsCEL "yes"
?storeDefault "no"
?name "pName2"
?prompt "width"
?defValue 7u
?display "artParameterInToolDisplay(’w)"
?editable "cdfgData->maskLayoutViewName->..."
?callback "cdfgData->pName1->value =
cdfgData->pName2->value")
In this example, the callback on parameter pName2 sets the value of parameter pName1 to
the new value when the value of pName2 changes.
?display "artParameterInToolDisplay(’w)"
?editable "cdfgData->maskLayoutViewName->..."
?callback "myFunc( )")
In the second example, the callback on parameter pName2 calls the function myFunc( )
when the value of pName2 changes.
When using callbacks, always use the global variable cdfgData to access information about
parameter values and default values.
To get the default value for a parameter, type the following expression:
cdfgData->paramName->defValue
To get the current value for a parameter, type the following expression:
cdfgData->paramName->value
Loading Callbacks
Once you define the SKILL callback procedures, you need to load the files. From the
Command Interpreter Window in your .cdsinit file, type
load("path/callbacks.il")
You must make sure that the callbacks are loaded before you use the library and that the
callback files are archived whenever you archive the library.
As an alternative, you can attach a callback file to a library. You attach callback files to a library
by including a libInit.il file in that library. libInit.il is a text file that contains calls
to load other SKILL files or contexts in the library or to initialize autoload properties.
You must always use the file name libInit.il or libInit.ils. You can have one
such file in each library. The following example is the contents of a libInit.il file in a
microwave library:
load( ddGetObj( "microwave" nil nil "libraProcs" )~>path )
load( ddGetObj( "microwave" nil nil "hpmnsProcs" )~>path )
load( ddGetObj( "microwave" nil nil "mharmProcs" )~>path )
load( ddGetObj( "microwave" nil nil "callbacks" )~>path )
If you attach the file to the library, the file is automatically loaded whenever the library is
opened. This guarantees that the functions are defined. In addition, when you archive your
library, the CDF callback functions are automatically archived.
NFET Example
To understand how to use callbacks, look at the NFET CDF description. The following
callback functions are specified for the NFET component:
■ mosLayout( ) on parameter maskLayoutViewName
■ pcMOSw( ) on parameter w
■ pcMOSl( ) on parameter l
mosLayout Callback
In the NFET CDF description, when you select the layout.pwr option of the
maskLayoutViewName parameter, the values of the other parameters are constant. You
can use the mosLayout callback procedure to set these values automatically whenever the
maskLayoutViewName is layout.pwr. As the following example shows, whenever the value
of maskLayoutViewName changes, the callback checks the value of
maskLayoutViewName and, if the value is layout.pwr, sets the parameter values:
procedure( mosLayout( )
if((cdfgData->maskLayoutViewName->value ==
cdfgData->maskLayoutViewName->defValue)
then ; It is layout. Use defaults.
cdfgData->w->value=cdfgData->w->defValue
cdfgData->width->value=cdfgData->width->defValue
cdfgData->l->value=cdfgData->l->defValue
cdfgData->length->value=cdfgData->length->defValue
cdfgData->bend->value=cdfgData->bend->defValue
cdfgData->bendt->value=cdfgData->bendt->defValue
cdfgData->ad->value=cdfgData->ad->defValue
cdfgData->as->value=cdfgData->as->defValue
cdfgData->pd->value=cdfgData->pd->defValue
cdfgData->ps->value=cdfgData->ps->defValue
cdfgData->diffD->value=cdfgData->diffD->defValue
else ; It is layout.pwr. Use known values.
cdfgData->w->value="880u"
cdfgData->width->value=880
cdfgData->l->value="12u"
cdfgData->length->value=12
cdfgData->bend->value=cdfgData->bend->defValue
cdfgData->bendt->value=cdfgData->bendt->defValue
cdfgData->ad->value="6.16e-09"
cdfgData->as->value="6.16e-09"
cdfgData->pd->value="0.001774"
cdfgData->ps->value="0.001774"
cdfgData->diffD->value=nil
)
)
pcMOSw Callback
The pcMOSw callback is similar to the pcMOSl callback. pcMOSw checks the input, sets
the width parameter, determines if there should be a bend, and calculates some of the
simulation parameters:
procedure( pcMOSw( )
prog(()
if( (cdfgData->maskLayoutViewName->value ==
cdfgData->maskLayoutViewName->defValue)
; Do this only if maskLayoutViewName is
; layout. Otherwise, mosLayout sets it.
then
tmp = evalstring(cdfgData->w->value)
if( (tmp && (typep(tmp)!=’flonum))
then
artError("Width value must be a floating
point number. Set to default." )
cdfgData->w->value = cdfgData->w->defValue
cdfgData->width->value =
cdfgData->width->defValue
cdfgData->bend->value =
cdfgData->bend->defValue
cdfgData->bendt->value =
cdfgData->bendt->defValue
cdfgData->ad->value = cdfgData->ad->defValue
cdfgData->as->value = cdfgData->as->defValue
cdfgData->pd->value = cdfgData->pd->defValue
cdfgData->ps->value = cdfgData->ps->defValue
return(nil)
)
tmp = ( tmp / 1e-6 )
if( (tmp < cdfgData->width->defValue)
then
artError("Width value is less than
minimum (7u). Set to default." )
cdfgData->w->value = cdfgData->w->defValue
cdfgData->width->value =
cdfgData->width->defValue
cdfgData->bend->value =
cdfgData->bend->defValue
cdfgData->bendt->value =
cdfgData->bendt->defValue
cdfgData->ad->value = cdfgData->ad->defValue
cdfgData->as->value = cdfgData->as->defValue
cdfgData->pd->value = cdfgData->pd->defValue
cdfgData->ps->value = cdfgData->ps->defValue
return(nil)
)
if( (tmp > 240 )
then
artError("Width value is greater than
maximum (240u). Set to default." )
cdfgData->w->value = cdfgData->w->defValue
cdfgData->width->value =
cdfgData->width->defValue
cdfgData->bend->value =
cdfgData->bend->defValue
cdfgData->bendt->value =
cdfgData->bendt->defValue
cdfgData->ad->value = cdfgData->ad->defValue
cdfgData->as->value = cdfgData->as->defValue
cdfgData->pd->value = cdfgData->pd->defValue
cdfgData->ps->value = cdfgData->ps->defValue
return(nil)
)
if( (tmp <= 240 )
then
cdfgData->maskLayoutViewName->value =
cdfgData->maskLayoutViewName->defValue
grid = round(tmp/0.5)
newwidth = grid*0.50
if( (newwidth != tmp)
then
artError("Width is set to nearest value
on 0.50 micron pitch.")
cdfgData->w->value =
sprintf(s "%g" (newwidth * 1e-6))
)
if( (tmp > 120) ;criteria for setting bend here
then
cdfgData->width->value = tmp/2
cdfgData->bend->value = t
cdfgData->bendt->value = 1
cdfgData->diffD->value = nil
else
cdfgData->width->value = tmp
cdfgData->bend->value =
cdfgData->bend->defValue
cdfgData->bendt->value =
cdfgData->bendt->defValue
)
)
cdfgData->ad->value =
sprintf(s "%g" (tmp * 7.0 * 1e-12))
cdfgData->as->value =
sprintf(s "%g" (tmp * 7.0 * 1e-12))
cdfgData->pd->value =
sprintf(s "%g" ((tmp + 7.0) * 2e-6))
cdfgData->ps->value =
sprintf(s "%g" ((tmp + 7.0) * 2e-6))
)
)
)
pcMOSl Callback
When the length and width parameters for the NFET CDF description were created, the l
and w parameters already existed for one of the simulators. Instead of prompting the user
twice for the same information, callbacks attached to the l and w parameters can update the
length and width parameters automatically.
The pcMOSl callback runs whenever the value of l changes. The callback verifies that the
maskLayoutViewName parameter value is layout. (For the other option, layout.pwr, the
parameter values are controlled by the mosLayout callback, shown in the previous section.)
The callback then checks the new value against the minimum value, the maximum value, and
the grid. If the value is not valid, the callback resets the lengths to the default value. If the value
is valid, the callback sets the length parameter value. The following example shows this
process:
procedure( pcMOSl( )
prog(()
if((cdfgData->maskLayoutViewName->value ==
cdfgData->maskLayoutViewName->defValue)
; Do this only if maskLayoutViewName is
; layout. Otherwise, mosLayout sets it.
then
; Convert input string to float.
tmp = evalstring(cdfgData->l->value)
if( (tmp && (typep(tmp)!=’flonum))
then
artError("Length value must be a floating point
number. Set to default." )
; artError will send message to CIW
cdfgData->l->value = cdfgData->l->defValue
cdfgData->length->value =
cdfgData->length->defValue
return(nil)
)
tmp = ( tmp / 1e-6 ) ; Convert to user units.
if( (tmp < 3.0)
then
artError("Length is less than minimum (3u).
Set it to default." )
cdfgData->l->value = cdfgData->l->defValue
cdfgData->length->value =
cdfgData->length->defValue
return(nil)
)
if( (tmp > 15.0 )
then
artError("Length value is greater than
maximum (15u). Set it to default." )
cdfgData->l->value=cdfgData->l->defValue
cdfgData->length->value =
cdfgData->length->defValue
return(nil)
)
; The following checks the value against
; the grid and fixes it if necessary.
grid = round(tmp/0.5)
newlength = grid*0.50
if( (newlength != tmp)
then
or("Length is set to nearest value
on 0.50 micron pitch.")
cdfgData->l->value = sprintf(s "%g"
(newlength * 1e-6))
)
; Set the pcell param value.
cdfgData->length->value = tmp
)
)
)
8
CDF SKILL Summary
Overview
Short examples in the previous chapters describe how to use the Cadence® SKILL language
for specific operations. This chapter:
■ Covers all CDF SKILL functions in general
■ Describes each type of element in a CDF SKILL function
■ Summarizes all the CDF SKILL functions
When you use these SKILL functions, you can perform all the same operations that you do
when you fill in form fields and apply them. However, unlike filling out forms, with SKILL you
can create routines to perform the same operation on many components at once, automating
your handling of CDF descriptions.
When creating the variable for the object ID of a cell, you must specify both the library name
and the cell name:
test_cell = ddGetObj("analogLib" "schottky")
or
test_cell = ddGetObj(mylib "schottky")
You must then use mylib when a SKILL function requires a d_id or d_libId, and test_cell
when a SKILL function requires a d_id or d_cellId.
You can use this data ID to access information about the description by using the right arrow
( -> or ~>) operator. For example
test_cell -> name
returns the ID
"schottky"
Data Objects
CDF descriptions are represented by cdfDataId objects, which are SKILL objects that you can
manipulate like other SKILL database objects. Just like data IDs, you assign the cdfDataId
of a particular CDF description to a variable that you create. The most common variable name
is cdfDataId. To create a new CDF data object for a new CDF description, use this type of
ID assignment:
newCellId = cdfCreateUserCellCDF(test_cell)
cdf:25092160
newCellId->type
"userCellData"
To access an existing CDF data object for an existing CDF description, use this type of ID
assignment:
baseCell = cdfGetBaseCellCDF(test_cell)
baseCell->dataFile->value
"bjt"
Although you can add any information to a cdfDataId, the object has specific fields to hold the
information that it maintains. These fields are described in the following section.
id
The database object (cell ID or library ID) to which the cdfDataId is attached. This field is not
editable.
type
parameters
doneProc
An optional procedure name (a string) that is evaluated after any change to a parameter on
a component instance. You can use doneProc for post-processing. The procedure must take
a single argument: the instance that has been modified.
formInitProc
An optional procedure name. If specified, the procedure is executed when the contents of the
CDF are displayed on a form. The default value is nil. This field is editable.
This procedure runs when you use the Add Component and Edit Properties commands. You
can use the procedure for preprocessing CDF data. This procedure must take a single
argument, the cdfDataId being added to the form.
Note: When you modify a parameter field value using the formInitProc, the Edit Properties
Object command for the schematic application is not aware of the modification and does not
update the changes made with formInitProc. You can avoid this problem by setting the
variable cdfgForm->cdfModified to the value t.
Displaying Parameters
Parameters
CDF parameters are represented by cdfParamId objects, which are SKILL objects that you
can manipulate like other SKILL database objects. You can use a cdfParamId to access
information about a parameter by using the right arrow ( ->) operator. Although you can add
any information to a cdfParamId, the object has fields to hold information that it maintains.
In addition to getting the cdfParamIds through the parameters field of a cdfDataId, you can
also access a parameter by specifying:
cdfDataId->paramName
paramName is the name of the parameter. However, you must not create any user-defined
properties on a cdfDataId that conflict with the name of a parameter on the cdfDataId.
use
Specifies whether to use this parameter. The use attribute is context-specific and is evaluated
when necessary. In this field, you can specify parameters that you are not using because of
the value of other parameters, or because of the function you are using. The use field must
be a string.
■ If the field evaluates to non-nil, the system uses the parameter.
■ If a value for the field exists, the system ignores the value.
■ If the field evaluates to nil, the system does not use the parameter.
■ If you do not specify this field, t is assumed, so the system always uses the field.
The “Global Variables” section describes several global variables for constructing the use
expression.
paramType
The quotation marks are required. CDF checks that the parameter value matches the type
specified. You must specify this field.
Note: Use the netSet type to store inherited connections in CDF. Inherited connections allow
you to selectively override global signals in designs created in Virtuoso Schematic Editor. The
override information is communicated through net expressions and netSet properties. For
more information on netSet properties refer to Inherited Connections Flow Guide and
Virtuoso Schematic Composer User Guide.
defValue
value
prompt
Prompt that appears on a form field when an application asks for the value of this parameter.
The value for this field must be a string. You must specify this field.
choices
Possible values (a list of strings) of a cyclic or radio type parameter. Do not use this field for
other types of parameters.
units
Unit type of the parameter. You often modify parameters that represent resistance,
capacitance, length, time, power, and so forth, and expect to see the parameter value scaled
to appropriate units (for example, pF, uM, dBm). Valid values for this field include the
following strings:
"resistance"
"capacitance"
"inductance"
"conductance"
"time"
"frequency"
"power"
"powerDB"
"lengthMetric"
"lengthEnglish"
"angle"
"voltage"
"current"
"temperature"
The quotation marks are required. This field determines the unit’s suffix and scale factor to
use when displaying the parameter value. For example, by setting a parameter’s units field to
capacitance, the parameter value is displayed as 5 pF instead of 5e-12.
editable
Specifies whether a parameter is for display only. If set to nil, the field specifies a displayed
parameter that you cannot change. (Other parameters’ callbacks can change the parameter.)
Use this field only on int, float, and string type fields.
The editable field must be a string. This field is evaluated when necessary.
■ If the field evaluates to non-nil, the parameter is editable.
■ If the field evaluates to nil, the parameter is grayed out when displayed as a form field.
■ If you do not specify the field, t is assumed, meaning that the field is editable.
callback
SKILL code to be executed whenever the value of a parameter changes. Using callback, you
can cause any parameter’s value to affect any other parameter’s value. The value of this field
must be a string.
The “Global Variables” section describes several global variables you can use in the callback
field.
parseAsNumber
String type parameter whose value can evaluate to a floating-point number. These types of
parameters often occur for circuit level simulators that allow component parameters to be
either numbers or expressions containing variables.
If you specify this field, the system parses the value of the parameter to check if the value is
a number.
■ If the value is a number, the system converts the string to a floating point number,
converts the string to the most efficient notation (taking into account any units field
specified), then reconverts the number into a string.
■ If the parameter value is not a number, the system does no conversion.
For example, if the parameter value is the string 5.4e-12 and the parameter value has a units
field of capacitance (that is, the suffix is F), the parameter value is converted to the string 5.4p
before being displayed. If, however, the parameter value is c1, no conversion takes place.
dontSave
Specifies that the parameter cannot be stored in any instance that corresponds to the
component.
The dontSave field must be a string. The system evaluates the field as necessary. If the field
evaluates to non-nil, the parameter is not stored. If you do not specify the field, nil is assumed
and the parameter value is stored.
parseAsCEL
If set to yes, the associated CDF parameter is processed as a CDF Expression Language
(CEL) expression. The parameter must be a string. If the expression resolves to a numeric
value (the usual case), the parseAsNumber flag should also be set to yes.
storeDefault
Specifies whether the parameter default value is saved as a property of the instance. All tools
based on the Cadence Analog Design Environment software use the CDF to find default
values if no property exists on an instance.
If set to no (the default) or don’t use, a property is not saved on the instance when the
parameter value is the default. Also, if the default value of the parameter changes, all
instances that use the default automatically get the new default value. (To see the change in
an open window, you must select Window – Redraw from the Cadence menu.)
If set to yes and the parameter value is set to the same value as the default, a property is
saved on the instance. One disadvantage of this attribute is that if the default value of a
parameter changes, the instances that use the default do not automatically change to the new
default. If you are a user of the Open Simulation Software (OSS) system, and you used to set
this attribute to yes because you could only netlist using instance properties, you can now set
it to no because OSS users now have the option of using CDF.
display
Determines if this parameter is displayed in forms that display CDF parameters, such as the
Edit Properties form or the Add Component form. You must enter t, nil, or a SKILL
expression that evaluates to t or nil in this field to determine if this parameter is to be
displayed. If the field evaluates to non-nil (the default), the parameter is displayed. If the
field evaluates to nil, the parameter is not displayed.
Example
You can use the cdfDataId baseCell from the previous example to examine the parameters
in the base-level cell CDF description of the Schottky transistor in the analog library. For
example, that cell has a parameter m. You can access information about m in the following
manner:
baseCell->m->prompt
"Multiplier"
baseCell->m->editable
nil
baseCell->m->display
"artParameterInToolDisplay(’m)"
baseCell->m->paramType
"string"
Expressions
CEL (CDF Expression Language) is another name for the Analog Expression Language
(AEL) that works with CDF parameters. For information on AEL, refer to the AEL Reference
Manual. With AEL you can express a value as a mathematical expression instead of a single,
fixed value. In such an expression, symbolic names such as sheetResistivity can refer to
values that are computed and set on one of the following:
■ CDF parameter on the same design component
■ CDF parameter on the parent design component
Global Variables
CDF parameter values interact with each other, and one parameter’s value can affect the
existence of another. This feature is implemented primarily through the use and callback
fields of the parameters section. The following global variables, which you can access, are
set whenever parameter fields are evaluated.
cdfgData
CDF data for the component in use. Use the value field to get the current value of any
parameter in the CDF description.
■ For creating an instance, set the field to the last value you used when you created a
component of this type.
■ For editing, set the field to the value for the component you are editing.
For example, you might set the use field for the resistance parameter to
"cdfgData->resType->value == \"ideal\""
implying that the resistance parameter should be used only if the resistor type is set to ideal.
(== is an equality test, not an assignment.)
If you use this setting, in the future you should be able to use the property list editor to edit
the parameter values directly without going through the form.
cdfgForm
Form on which the CDF data is displayed, if there is one. You can modify data stored in
cdfgData in the CDF form initProc, or by modifying the cdfgForm fields with a callback
function. When doing this, set the Boolean variable cdfgForm -> cdfModified to t.
gLabelsNumNotation
Displays the cdsTerm and cdsParam values in different notations, such as scientific or
engineering. The syntax of gLabelsNumNotation is as follows:
gLabelsNumNotation = ‘suffix
The default value displays the labels according to the existing setting. For example, the
nmos symbol shows the engineering notation, 300e-3 for w, by default.
To set the number of signif digits, use the aelPushSignifDigits function as follows:
aelPushSignifDigits(10)
Create Functions
You can create base and user CDF descriptions for libraries and cells using the following
functions.
cdfCreateBaseLibCDF
cdfCreateBaseLibCDF(
libId
[?doneProc t_doneProc]
[?formInitProc t_formInitProc]
[?fieldWidth x_fieldWidth]
[?fieldHeight x_fieldHeight]
[?buttonFieldWidth x_buttonFieldWidth]
[?promptWidth x_promptWidth]
)
=> cdfDataId / nil
Description
Creates the Base Library CDF that is applied to all the devices in the library.
You must open the library in write mode. The base-level CDF description must not already
exist for the library. The CDF description is created with no parameters or simModels.
Arguments
x_fieldHeight Lets you specify the height of a field on the instantiation form.
The default height is 35 pixels.
x_buttonFieldWidth Lets you specify the width of a button on the instantiation form.
The default width is 350 pixels.
x_promptWidth Lets you specify the width of the prompt on the instantiation
form. The default width is 175 pixels.
cdfCreateUserLibCDF
cdfCreateUserLibCDF(
libId
[?doneProc t_doneProc]
[?formInitProc t_formInitProc]
[?fieldWidth x_fieldWidth]
[?fieldHeight x_fieldHeight]
[?buttonFieldWidth x_buttonFieldWidth]
[?promptWidth x_promptWidth]
)
=> cdfDataId / nil
Description
Creates the user-level library CDF that is applied to all the devices in the library. The user-
level CDF can override entries in the base-level CDF. Therefore, a combination of the base-
level CDF and the user-level CDF becomes the effective CDF.
The user-level CDF description must not already exist for the library. The CDF description is
created with no parameters or simulation models.
Arguments
x_fieldHeight Lets you specify the height of a field on the instantiation form.
The default height is 35 pixels.
x_buttonFieldWidth Lets you specify the width of a button on the instantiation form.
The default width is 350 pixels.
x_promptWidth Lets you specify the width of the prompt on the instantiation
form. The default width is 175 pixels.
cdfCreateBaseCellCDF
cdfCreateBaseCellCDF(
cellId
[?doneProc t_doneProc]
[?formInitProc t_formInitProc]
[?fieldWidth x_fieldWidth]
[?fieldHeight x_fieldHeight]
[?buttonFieldWidth x_buttonFieldWidth]
[?promptWidth x_promptWidth]
)
=> cdfDataId / nil
Description
You must open the cell in write mode. The base-level CDF description must not already exist
for the cell. The CDF description is created with no parameters or simulation models.
Arguments
x_buttonFieldWidth Lets you specify the width of a button on the instantiation form.
The default width is 350 pixels.
x_promptWidth Lets you specify the width of the prompt on the instantiation
form. The default width is 175 pixels.
cdfCreateUserCellCDF
cdfCreateUserCellCDF(
cellId
[?doneProc t_doneProc]
[?formInitProc t_formInitProc]
[?fieldWidth x_fieldWidth]
[?fieldHeight x_fieldHeight]
[?buttonFieldWidth x_buttonFieldWidth]
[?promptWidth x_promptWidth]
)
=> cdfDataId / nil
Description
The user-level CDF description must not already exist for the cell. The CDF description is
created with no parameters or simulation models.
Arguments
x_promptWidth Lets you specify the width of the prompt on the instantiation
form. The default width is 175 pixels.
cdfCreateParam
cdfCreateParam(g_cdfDataId ?name t_name ?type t_type [?defValue g_defValue]
[?units t_units]
[?parseAsNumber t_parseAsNumber]
[?choices l_choices]
[?prompt t_prompt]
[?use t_use]
[?display t_display]
[?editable t_editable]
[?dontSave t_dontSave]
[?callback t_callback]
[?storeDefault t_storeDefault])
[?parseAsCEL t_parseAsCEL]
)
=> cdfDataId / nil
Description
Creates a parameter on the specified cdfDataId with the specified attributes. The only
attributes that are always required are the parameter’s name and type. If this parameter
description is not overriding an existing base-level parameter definition, you must also specify
the defValue. The specified parameter must not already exist on the specified CDF
description.
Note: You cannot override a parameter’s type. Also, CDF checks that the effective parameter
due to any overrides is consistent and valid.
Example
cdfParamId = cdfCreateParam(cdfDataId
?name "resistorType"
?type "radio"
?prompt "Type:"
?defValue "ideal"
?choices list("ideal" "thin film")
?callback "myModelTypeCB()")
Queries
You can query existing CDF descriptions using the following functions. To use the returned
value, you must assign it to a variable that you create.
cdfGetBaseLibCDF
cdfGetBaseLibCDF(d_libId
)
=> cdfDataId / nil
Returns the base-level CDF description attached to a library. If one is not defined, it returns
nil.
cdfGetUserLibCDF
cdfGetUserLibCDF(d_libId
)
=> cdfDataId / nil
Returns the user-level CDF description attached to a library. If one is not defined, it returns
nil.
cdfGetLibCDF
cdfGetLibCDF(d_libId
)
=> cdfDataId / nil
Returns the effective CDF description attached to a library. If neither a base- nor user-level
CDF description is defined, it returns nil. The resulting CDF description represents the
overlay of the user-level CDF on the base-level CDF.
cdfGetBaseCellCDF
cdfGetBaseCellCDF(d_cellId
)
=> cdfDataId / nil
Returns the base-level CDF description attached to a cell. If one is not defined, it returns nil.
cdfGetUserCellCDF
cdfGetUserCellCDF(d_cellId
)
=> cdfDataId / nil
Returns the user-level CDF description attached to a cell. If one is not defined, it returns nil.
cdfGetCellCDF
cdfGetCellCDF(d_cellId
)
=> cdfDataId / nil
Returns the effective CDF description attached to a cell. If neither a base- nor user-level CDF
description is defined for the cell or its library, it returns nil. The resulting CDF description
represents the overlay of the user-level cell CDF on the base-level cell CDF on the user-level
library CDF on the base-level library CDF.
cdfGetInstCDF
cdfGetInstCDF(d_instId
)
=> cdfDataId / nil
The difference between the instance’s effective CDF description and the cell’s effective CDF
description is that the values of any CDF parameter takes into account the values of the
parameters stored on the instance.
Saving Descriptions
You can save CDF descriptions using the cdfSaveCDF function. If this CDF description
already exists, the new description is written over the old one.
cdfSaveCDF
cdfSaveCDF(g_cdfDataId
)
=> t / nil
The CDF description is then read in every time you open the cell of the library to which the
description is attached. You can save only base-level CDF descriptions. You must have write
permission on the object to which the CDF description is attached to execute this function.
Caution
While editing dump files remember to escape invalid characters while
specifying termOrder using symbols. All symbols must be preceded by
the backslash (\) to make them valid symbols in SKILL.
cdfDump
cdfDump(t_libName t_fileName
[?cellName t_cellName]
[?level s_level]
[?edit b_edit]
)
=> t / nil
Dumps the CDF description for t_libName and t_cellName into t_fileName. If
t_cellName is not specified, then only the library CDF description is dumped.
t_fileName is created in the current working directory or the directory specified with the
filename. s_level is either ‘base or ‘user, with ‘base as the default value. If b_edit
is t, a text editor window is automatically opened on t_fileName. The default is no editor.
Example
cdfDump( "nmos" "tr.mod" ?cellName "pnp" ?level ‘base
?edit t)
cdfDumpAll
cdfDumpAll(t_libName t_fileName
[?level s_level]
[?edit b_edit]
)
=> t / nil
Dumps the CDF description for t_libName and all its cells into t_fileName. s_level
is either ‘base or ‘user, with ‘base as the default value. t_fileName is created in the
current working directory or the directory specified with the filename. If b_edit is t, a text
editor window is automatically opened on t_fileName. The default is no editor.
Example
cdfDumpAll("asic" "lib.mod" ?level ’base ?edit t)
Deleting Descriptions
You can delete a CDF description or its parameters using the following functions.
cdfDeleteCDF
cdfDeleteCDF(g_cdfDataId
)
=> t / nil
If the CDF description has been saved, the saved versions are also deleted. If this is a base-
level CDF description, you must have write permission on the object to which the CDF
description is attached.
cdfDeleteParam
cdfDeleteParam(g_cdfParamId
)
=> t / nil
If the CDF parameter is attached to a base-level CDF description, you must have write
permission on the object to which the CDF description is attached.
CDF checks that no invalid parameter descriptions would result from deleting the specified
parameter before it actually deletes it. This would occur if you tried to delete a base-level
parameter and a user-level parameter is defined that only partially overrides the base-level
description.
cdfCopyCDF
cdfCopyCDF(d_id t_dataType g_dataId
)
=> g_cdfDataId / nil
Copies CDF data onto the specified ID, creating a new dataId of the specified type.
The ID must be either a library or a cell, and it must not already have a CDF description of
the specified type. The data type must be one of the following:
"baseLibData"
"userLibData"
"baseCellData"
"userCellData"
Neither the old nor the new dataId can be effective objects.
Arguments
Value Returned
cdfCopyParam
cdfCopyParam(g_dataId g_paramId
)
=> g_paramId / nil
dataId must not already have a parameter with the same name. The parameter and the
dataId must not be effective objects.
cdfFindParamByName
cdfFindParamByName(g_cdfDataId t_name
)
=> g_paramId / nil
Returns the parameter ID for the specified parameter name on the specified CDF description,
if it exists. If not, it returns nil.
cdfUpdateInstParam
cdfUpdateInstParam(
d_instId
)
=> t / nil
Stores the CDF parameters specified in the effective cell CDF of the instance master onto the
specified instance. When the Id given is not for an instance or the instance master does not
have CDF definition, it returns nil.
aedCopyCDF
aedCopyCDF(
)
=> t / nil
aedDeleteCDF
aedDeleteCDF(
)
=> t / nil
cdfGetUnitScaleFactor
cdfGetUnitScaleFactor(
t_unitName
)
=> t_scaleFactor
Description
Arguments
t_unitName The unit name for which you want to display the scale factor.
Value Returned
t_scaleFactor The current scale factor for the specified unit name.
Example
cdfSetUnitScaleFactor
cdfSetUnitScaleFactor(
t_unitName
t_scaleFactor
)
=> t / nil
Description
Arguments
t_unitName The unit name for which you want to set the scale factor.
t_scaleFactor The scale factor for the specified unit name.
Example
cdfParseFloatString
cdfParseFloatString(
t_string
)
=> nil / d_value / t_string
Description
This function uses the standard strtod (string to double) function to parse the input string.
When the input string contains trailing non-numerical characters, the fragment of the string is
compared against a supported set of scale factor designators.
Value Returned
d_value (a float value) when the input string can be parsed as a float value with or
without a valid scale factor, as shown below:
cdfParseFloatString("1.0") => 1.0
cdfParseFloatString("1.0u") => 1e-06
the given string when the input string does not contain a valid numerical
representation for a float value. For example, the input string
starting with a non-digit character as shown below:
cdfParseFloatString("abcd") => "abcd"
cdfFormatFloatString
cdfFormatFloatString(
t_string
t_scaleFactor
)
=> nil / t_val
Description
This function formats the input string into a value representation, if possible. It formats the
input string using the input scale factor, re-converts the value to a string, and then returns the
formatted string value. If the input string cannot be converted, the input string is returned with
no change to it.
Arguments
Value Returned
Example
cdfFormatFloatString("123.4" "m") => "123400.0m"
cdfFormatFloatString("10000" "M") => "0.01M"
cdfSyncInstParamValue
cdfSyncInstParamValue(
d_instId1
d_instId2
)
=> t / nil
Description
This function generates all the CDF parameters for the first instance (instId1 ) and updates the
second instance (instId2 ) with the same values. Both the instances must share the same cell.
cdfUpdateInstSingleParam
cdfUpdateInstSingleParam(
d_instId
t_paramName
)
=> t / nil
Description
This function copies the specified parameter’s (t_paramName ) effective value to the specified
instance (d_instId ).
aedEditCDF
aedEditCDF(
[?libName t_libraryName
[?cellName t_cellName]
[?cdfType t_cdfType]
)
=> g_dataId / nil
Description
Opens the CDF Editor to the library, cell, and CDF type specified by libraryName,
cellName, and cdfType.
libraryName and cellName must be strings referring to an existing library or cell, and
cdfType must be ‘effective’, ‘base’, or ‘user’.
9
Verifying CDF Operation
Test Procedure
1. Open an empty schematic and place instances of your symbol.
2. As you place the instances, use different parameter values.
Check the Add Component form for confirmation that your parameter definitions and
callbacks are working. Look for the following indications:
❑ Parameters have the units you expected.
❑ Parameters have the defaults you expected.
❑ The correct parameters are at the top of the list of parameters. You should not have
to keep scrolling down the form to edit important parameters.
❑ Parameters that are supposed to become noneditable do so when expected.
❑ Parameters that are not supposed to be displayed are not displayed as expected.
❑ Do your callbacks get called? First check. Do they stacktrace because you forgot to
load them?
❑ Parameters whose values depend on other parameters update as you expect.
❑ Are your callbacks doing the range checking you set up?
❑ Can you enter bad parameter values?
3. After you place the instances, use Edit Properties (in the schematic editor) to look at the
actual properties stored on the instances.
Look for the following:
❑ Are you saving the default values?
❑ Are nondisplayed parameters being set as you expected? If they are not displayed,
it is hard to know that they worked.
4. Draw a minimal schematic and go to the simulator you will be using. Generate a netlist
to make sure that your component netlists as you expect.
5. Once you are satisfied with the schematic and simulation results, go to an empty layout
and repeat the CDF tests to see the effect on your layout.
LVS Procedure
If you are using Layout Versus Schematic (LVS),
1. Create a simple schematic and layout with very few instances.
2. Run extraction and LVS.
3. Make sure the LVS netlist is correct.
This also gives you a chance to check out the LVS rules in a controlled experiment using
just one device.
Making Changes
If you find a problem or change the design, follow these guidelines:
■ If problems occur during testing, fix the views or CDF and retest.
■ If the problem or change occurs after you have placed multiple instances of the
component, consider the following:
❑ You might need to change just the user interface, such as the order of the
parameters or which parameters are displayed in the form or label display. When you
make a change, it is inherited by all existing instances.
❑ If you change the default value of a parameter with the attribute storeDefault = no,
it is inherited by all existing instances. (Use the Window – Redraw command to see
the changes reflected in the current window.)
❑ If you change the default value of a parameter with storeDefault = yes, changing
the default value does not update the existing instance, because the value was
saved as a property on each instance.
❑ If you change a callback that sets the value of one parameter based on an equation
involving another parameter, changing the default value does not update the existing
instances. You must also trigger the callback again, for each instance.
In the last two cases, you can update existing instances using the Cadence Analog
Design Environment – Design Variables – Update command. This command
updates the default values and triggers all of the callbacks of all of the instances in the
current window. The Update command has the following limitations:
❑ The update works only on the open cell.
❑ The update does not traverse the design hierarchy.
❑ There is no guaranteed order of running the callbacks, so you need to make sure
that your callbacks work well together.
The NFET looks like the following with different parameter combinations:
In addition, you need the fixed layout for the power applications. This might be stored under
view layout.pwr, have a gate width of 880 micrometers and length of 12 micrometers, and
look like this:
Changing Parameters
Now try to use the NFET in a design.
Add Component
No default
values
When you first use the Add Component form, some fields are dimmed.
The first time you open the Add Component form for your component, it shows all default
values. Some default values are not defined. At this point, you might want to go back to the
CDF editor and add the appropriate default values.
Notice, however, that you cannot enter values in the fields with dim names. If you use the CDF
description to set a parameter to be displayed, but not editable, the parameter field is not
editable on the Add Component form.
The type of layout is cyclic, as you specified. The width and length are prompted for only
once, as a string with units of length.
As you place instances of the NFET, you never change the value for the bulk node connection.
Therefore, you might use the CDF editor to move that parameter down in the list of
parameters until it is below other parameters that you do change.
1. Change the Type of Layout cyclic button. The Add Component form updates as follows:
Add Component
Alternate layout
You can see the form modify itself to show the new fields, indicating that the callbacks
are working.
At this point you still cannot see if the pcell parameters are being set properly.
2. Use the Edit – Properties – Object command on a few examples to verify the operation
of the pcell parameters in the CDF description.
3. Using the Edit Object Properties form, create an instance with width set to 30u, length
set to 10u, the default layout, and a drain diffusion pin.
The CDF Parameter fields in the Edit Object Properties form should look like this:
These values indicate that the callbacks used to generate pcell parameter values
worked correctly. If you have a different result, check the callbacks in the CDF
description.
4. Create an instance of the NFET with width set to 130u, length set to 3u (default), the
default layout, and no drain diffusion pin (required).
The Edit Object Properties form should look like the following:
A
Advice and Warnings
This section answers frequently asked questions not already covered, and warns you about
common mistakes.
■ Library CDF versus Cell CDF
A cell inherits all definitions from the library CDF. If there are changes in the cell CDF, the
changes override the library CDF at the cell level. It is important to be aware of what is
in the library CDF of any cell you work on.
■ CDF level differences
Remember that only the base-level CDF is saved to disk. The user-level CDF is used
only for one session and cannot be saved. If you have a base and user CDF, the effective
CDF is everything from the base CDF updated with anything new from the user CDF. In
the CDF editor, you can “edit” the effective CDF. In reality, the effective CDF is just there
to give you a way to look at the total CDF for a component. There is nothing to edit in an
effective CDF, so changing the effective CDF in the CDF editor does nothing.
■ Update
The update function under Cadence Analog Design Environment– Design
Variables – Update in the schematic editor updates only what is in the current window
and for only one level of hierarchy.
■ Parameter values and callbacks
If you use iPar, pPar, atPar, dotPar, or the old notation ({}) to inherit the value of a
parameter, as the real value changes, the callbacks associated with that parameter are
NOT triggered. So, be aware of that when determining which parameters inherit values.
Similarly, if you assign a design variable as a parameter value, the setting of the design
variable does not trigger callbacks.
■ Units
The units you can use in the CDF are limited to those offered in the CDF editor. There
are no user-defined units.
■ Range checking
CDF provides no automatic range checking. You must use callbacks to do that.
■ Pcell default values
There is no system mechanism to ensure that your pcell defaults and CDF defaults are
synchronized, so you must manage this.
■ Callback files
If you define your callbacks in a separate file (not self-contained in the CDF or attached
to the library), you must remember to archive that file whenever you archive your library.
■ Callback limitation
You can control parameter values with callbacks, but you cannot affect anything in the
simulation information section.
■ Boolean properties
Be careful of using the CDF “Boolean.” It is defined as t or nil. If you add a property to
an instance using the Add button in the Edit Properties form you will see that the system
models that kind of Boolean as TRUE or FALSE. There are some applications that
depend on that. For example, the property lvsIgnore used in DLE and LVS must be
TRUE or FALSE. So, if you want to add it to your CDF, instead of making it a CDF
Boolean type, make it a cyclic type and set its choices to TRUE and FALSE.
■ Triggering callbacks
Callbacks are triggered whenever a change is made to the parameter value, even if the
change is caused by loading a default value. You need to ensure that default values do
not violate any relationships that you are trying to enforce.
Use callbacks to establish dependencies between parameters whose values are
numeric constants.
Avoid using callbacks on parameters whose values are expressions. Such values require
update evaluations and can quickly become out of date. If you do choose to use
callbacks of this type, you will need to run a hierarchical evaluator that will walk the entire
design to trigger all CDF callbacks whenever the value of the parameter is changed.
Note, too, that a hierarchical evaluator will not be reliable with pPar() parameters.
■ Layout extraction, properties, and callbacks
When you run layout extraction to find devices in the layout, you can also measure the
sizes of the devices. When you save that information, it is stored as a property on the
symbol (auLvs or an ivpcell) that is placed in the extracted layout. For example, when
extraction finds an NFET, it places the cell nfet auLvs at the location of the recognition
shape. That instance has the connectivity that was found and has the properties for the
measured values saved, probably the length and width. Setting those measured
parameters by extraction does not trigger any callbacks on those parameters. This is
especially important to remember if you are doing parasitic resimulation, because you
need all parameters necessary for simulation to be set in the extracted layout. You cannot
rely on the callbacks; you must redo the calculations in the extraction rules.
■ LVS case sensitivity
Remember the property mapping example for LVS. Even though CDF might use
lowercase parameter names, LVS expects capital letters. If you do not enter this mapping
properly, the parameters are not netlisted correctly and in LVS this most likely means that
size comparisons are not made at all.
■ The Virtuoso® layout editor now accesses and uses CDF parameters.
■ Property value replacement and callbacks
Using Edit – Search – Replace to find a property and change its value across a set of
instances does not trigger callbacks associated with the parameter. The Cadence
Analog Design Environment – Design Variables – Update command triggers the
callbacks associated with each variable, but you cannot control the order in which the
callbacks are executed.
In addition, if you use the default value for a parameter, and set storeDefault to no, there
is no property for Edit – Search – Replace to find. However, changing the default value
does change it.
■ Numerical value format
Be careful about entering blanks when entering values in a form or defining values or
default values. In the CDF, “ 12” does not equal 12; nor does
“12 ”. “12 u” does not equal “12u”. This can cause errors.
■ The dontSave parameter attribute
Do not use the dontSave parameter attribute unless you are absolutely sure you need
to. It can lead to very strange results, especially when callbacks are used. The only thing
that dontSave does for you is save the space used to store the property value on a
parameter that you think is not very useful. One example is when you use the parameter
resType on a resistor to trigger callbacks to set up the rest of the parameters based on
the resistor type. Once that is done, you do not think the value of resType needs to be
saved. The problems occur when you edit the parameters on existing instances and the
values do not match.
■ Reserved words
There are words that are reserved and cannot be used as net, component, property, or
parameter names. Do not use any of the following:
B
Accessing Subcircuit Simulation Data
Overview
This appendix describes how to access simulation data from primitive subcircuits and
schematics when you use the spectre interface. The same information for socket simulator
interfaces is described in “Subcircuit Simulation Data for Socket Simulation” on page 181. By
modifying the Component Description Format (CDF) description of components in a design,
you can annotate and plot subcircuit port currents, primitive model parameters, and operating
point parameters. You can apply the techniques described here to any simulation primitive,
not just subcircuits. These techniques allow you to annotate derived parameters on the
schematic.
The first section describes how to modify a CDF description to obtain subcircuit port currents.
The second section describes how to obtain the derived model parameters and operating
point information. The third section describes how to obtain model parameters and operating
point information from schematics below the level of the component in question. The last
section reviews one method of editing a CDF description.
Note: Unless otherwise specified, the information in this appendix is for the spectre
simulator. Other simulators may require a variation on the syntaxes detailed here.
The subcircuit examples use this simplified operational amplifier model. You can find this in
the file
your_install_dir/tools/dfII/samples/artist/models/spectre/vcvsOpampModels.scs
subckt opamp (plus minus output)
parameters inputCap=500e-15
C1 (plus minus) capacitor c=inputCap
E1 (aout 0 plus minus) vcvs gain=1e6
R3 (aout output) r100m
R4 (plus minus) r10M
ends
model r100m resistor r=100e-3
model r10M resistor r=10e6
The subcircuit is represented at the next higher level in the design hierarchy by a symbol, with
pins INplus, INminus, and OUTPUT. The instance I16 in the cellview vcvsOpampTest
schematic in the library aExamples references the cellview.
If you update the CDF, you must generate a new netlist in order for the enhancements
described here to work.
INplus +
OUTPUT
INminus -
symbol
The required simInfo is best illustrated by example. To provide access to the currents entering
through the plus, minus, and output ports of the operational amplifier model for spectre, add
the following Cadence® SKILL language lines to the text of the spectre Simulation Information
section of the operational amplifier CDF description, using the symbol pin names INplus,
INminus, and OUTPUT:
termMapping ( nil plus \:1 minus \:2 output \:3)
The termMapping property value is a disembodied property list (DPL), which provides
information to the data access code on how to obtain data for the relevant terminal. This
information is also used by the simulator interface to generate appropriate save statements.
The first term of the termMapping entry should always be nil. Note that spectre requires the
order number of the terminal for subcircuits, not the name. So instead of ":plus", ":1" is
required.
The termMapping property describes that the schematic terminal INplus is mapped to plus,
and INminus is mapped to minus, and OUTPUT is mapped to the simulator name output. The
colon character (:) is the Spectre simulator’s instance-terminal delimiter.
To save currents, use the Save Options form on the simulation window, or use the Outputs
– To Be Saved command. You can select the individual terminals on the I16 instance in the
vcvsOpampTest schematic cellview. During simulation, only the currents you specify are
saved.
After simulation, you can access this information from the calculator or by using the label
display mechanism. This method differs from the one used in the previous example in that
you must fully specify the required functions. This is demonstrated in the following example.
In this example, three additional operating point parameters are resistors: rin (input
resistance), rout (output resistance), and gain. Add the following lines to the spectre
Simulation Information section of the operational amplifier CDF description:
opParamExprList (
("rin" "OP(mappedRoot(\".R4\") \"res\")")
("rout" "OP(mappedRoot(\".R3\") \"res\")")
("gain" "1e6")
)
The opParamExprList property is a list of pairs. The first element of each pair is the name of
the new property, and the second element is the expression that must be evaluated to
compute the new property. OP is the operating parameter function, which takes an instance
name and an associated parameter as arguments. The second argument res is the
resistance parameter for that component. The first argument, mappedRoot(\".R4\"), is
the expression for the name of the instance.
The mappedRoot() function takes the string ( \".R4\" ) and prepends the simulator
instance name of the current instance. The dot character (.) is the spectre subcircuit
delimiter. Since the property value is a string, substrings (such as ".R4") must be escaped
(\".R4\").
The root() function prepends the schematic name (rather than simulator name) of the device
instance in question. The root() function also adds a slash (the schematic delimiter) before
its argument.
The other two functions provided, inst() and mappedInst(), do not take arguments and
return the schematic and simulator instance names, respectively.
The following table shows the difference between the four functions.
The SKILL function strcat is the standard SKILL string concatenate function.
Given an instance of the subcircuit with the name I16 and the simulator instance name of
I16, the expressions in the example would evaluate as follows:
mappedRoot(\".R4\") -> "I16.R4"
root(\"inplus\") -> "I16/inplus"
Similarly, you can add transient operating point information and model parameters if you
replace opParamExprList with optParamExprList and modelParamExprList respectively.
Also replace OP with OPT and MP as follows:
OP(instance_name parameter)
OPT(instance_name parameter)
MP(instance_name parameter)
In the same way, you can add parameters to cells that are similar to the ones you find in
analogLib. The following addition to a resistor CDF description adds a conductance
property:
opParamExprList (
("cond" "1.0/OP(inst() \"res\")")
)
You can define your own functions to perform computations. Consider the following example
which adds the xyz parameter:
opParamExprList (
("xyz" "userFun(inst())")
)
When the xyz operating point property is accessed, the function userFun() is called with
the schematic name of the instance in question. The userFunc() should return an integer
if the operation is successful. If userFunc() does not return an integer, then the parameter
is not displayed. Some more examples of user defined functions are as follows.
opParamExprList (
("avgcurrent" "averageCurrent(root('PLUS'))")
("pwr" "instPwr(inst())")
)
defun( instPwr ( instName )
(let (i v)
i = OP(instName "i")
v = OP(instName "v")
(when (and i v) i * v )
)
defun( averageCurrent (instTerm)
(let (i)
i = IT( instTerm)
(when i average(i))
)
While using a user a user defined function with opParamExprList ensure that the function
is defined, otherwise it causes an error. This process can aid debugging.
The expression you use to define a given property can be arbitrary, but if the expression
evaluates incorrectly or the current is not saved, the system generates an error. This can be
slow down the simulation if there are many instances of the device on a schematic attempting
to display this property. For example, you might add the following avecurrent property to
a resistor to compute the average transient current through the resistor:
opParamExprList (
("avecurrent" "average(IT(root(\"PLUS\")))")
)
If you did not save the current, then the IT() function returns nil, and the average()
function complains about a nil argument. To prevent this, add logic to the expression as in
this example:
opParamExprList (
("avecurrent" "let(((i IT(root(\"PLUS\"))))
(and i average(i)))")
)
If you did not save the current, this expression prevents the system from flagging errors.
You can use standard SKILL functions like let in these expressions. IT and average are
private, internal SKILL functions that are not documented for any other use.
For example, the instance I19 in the cellview vcvsOpampTest is a schematic of the same
subcircuit. On the next higher level is another schematic, where the sample schematic is
represented by a symbol.
outres=3K
inplus
OP52 output
Level 1
plus
+ R3
R4 E1
- aout output
minus C1
Level 2
By putting a particular statement in the model or operating point expression list of the CDF
simInfo section of OP52, you can define new parameters such as inres and outres, base
them on primitive values one level down, such as R4 and R3, and display their values on
OP52.
To create the two parameters in the example, include these statements in the simInfo section
of OP52 for each simulator that you are using:
opParamExprList(
("inres" "OP(root(\"R4\") \"res\")")
("outres" "OP(root(\"R3\") \"res\")")
)
In this example, inres and outres are parameter names that you define. They derive their
values from the res parameter on primitives R4 and R3, respectively. Note that for
schematics you use the root function.
To display the information produced by these CDF description entries, make sure that you
have created enough labels for your component and that those labels are set to display model
or operating point values. For model data, use modelParamExprList and the MP function.
Note: CDF data is not view specific, so do not reference parameters in views that are not
netlisted because of their position in the view switch list.
To refer to primitive data several design levels below the component where you want the data
displayed, you need to include all the instance names from each level.
c_in =1p 1
I10
2
E157
c = 1p 3
C13
For this example, use the following statement in the CDF description of I10 to display the
capacitance on C13 as the input capacitance of I10.
opParamExprList (
("cin" "OP(root(\"E157/C13\") \"c\"))
)
Writable Cells
To modify a cell CDF description for which you have write access
1. In the CIW, type
cdfDump( "lib" "full_path/filename" ?cellName "cell" ?edit ’t ?level ’base)
Sample CDF
The aExamples library demonstrates several different methods of parameter display.
The following is a sample CDF for several of the schematics in the aExamples library.
Spectre examples are given:
■ opamp (macro model)
cdfId->simInfo->spectre = '( nil
propMapping nil
instParameters nil
otherParameters (model)
netlistProcedure nil
termMapping ( nil IN\plus ":1" IN\minus ":2" OUTPUT ":3")
termOrder ("INplus" "INminus" "OUTPUT")
componentName opamp
opParamExprList (("rin" "OP(mappedRoot(".R4") "res")") ("rout"
"OP(mappedRoot(".R3") "res")") ("gain" "1e6"))
)
The subcircuit examples use this simplified operational amplifier model. You can find this
model in the file
your_install_dir/tools/dfII/samples/artist/models/spectreS vcvsOpampMacro.s.
.SUBCKT &1 plus minus output
C1 plus minus 500e-15
E1 aout 0 plus minus 1e6
R3 aout output 100e-3
R4 plus minus 10e6
.ENDS &1
The noPortDelimiter property indicates that the terminal (port) map should not have the port
delimiter (a netlister property) prepended.
The current property indicates to the view selection code that port currents can be obtained
for this device. The value does not have to be port, but it must not be nil or component.
■ vcvsOpamp
cdfId->simInfo->spectreS = ’( nil
namePrefix "X"
termOrder ("INplus" "INminus" "OUTPUT")
componentName "subcircuit"
macroArguments nil
netlistProcedure ansSpiceSubcktCall
opParamExprList (("inres" "OP(root("R2") "res")") ("outres"
"OP(root("R3") "res")"))
)
■ vcvs2LevelOpamp
cdfId->simInfo->spectreS = ’( nil
namePrefix "X"
termOrder ("in_minus" "in_plus" "out_again")
componentName "subcircuit"
macroArguments nil
netlistProcedure ansSpiceSubcktCall
opParamExprList (("cin" "OP(root("I0/C0") "cap")") ("rin"
"OP(root("I0/R2") "res")"))
)
C
NBSIM Transistor CDF SKILL Description
Dumping the CDF description of the nbsim cell in the analogLib library produces the
following:
/****************************************************/
LIBRARY = "analogLib"
CELL = "nbsim"
/****************************************************/
let( ( libId cellId cdfId )
unless( cellId = ddGetObj( LIBRARY CELL )
error( "Could not get cell %s." CELL )
)
when( cdfId = cdfGetBaseCellCDF( cellId )
cdfDeleteCDF( cdfId )
)
cdfId = cdfCreateBaseCellCDF( cellId )
;;; Parameters
cdfCreateParam( cdfId
?name "model"
?prompt "Model name"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('model)"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "bn"
?prompt "Bulk node connection"
?defValue "S"
?type "string"
?display "artParameterInToolDisplay('bn)"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "m"
?prompt "Multiplier"
?defValue "1"
?type "string"
?display "artParameterInToolDisplay('m)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "w"
?prompt "Width"
?units "lengthMetric"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('w)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "l"
?prompt "Length"
?units "lengthMetric"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('l)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "ad"
?prompt "Drain diffusion area"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('ad)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "as"
?prompt "Source diffusion area"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('as)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "pd"
?prompt "Drain diffusion periphery"
?units "lengthMetric"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('pd)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "ps"
?prompt "Source diffusion periphery"
?units "lengthMetric"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('ps)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "nrd"
?prompt "Drain diffusion res squares"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('nrd)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "nrs"
?prompt "Source diffusion res squares"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('nrs)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "ld"
?prompt "Drain diffusion length"
?units "lengthMetric"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('ld)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "ls"
?prompt "Source diffusion length"
?units "lengthMetric"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('ls)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "off"
?prompt "Device initially off"
?type "boolean"
?display "artParameterInToolDisplay('off)"
)
cdfCreateParam( cdfId
?name "Vds"
?prompt "Drain source initial voltage"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('Vds)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "Vgs"
?prompt "Gate source initial voltage"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('Vgs)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "Vbs"
?prompt "Bulk source initial voltage"
?units "voltage"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('Vbs)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "trise"
?prompt "Temp rise from ambient"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('trise)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "region"
?prompt "Estimated operating region"
?defValue "triode"
?choices '("off" "triode" "sat" "subth")
?type "cyclic"
?display "artParameterInToolDisplay('region)"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "rdc"
?prompt "Additional drain resistance"
?units "current"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('rdc)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "rsc"
?prompt "Additional source resistance"
?units "current"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('rsc)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "dtemp"
?prompt "Temperature difference"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('dtemp)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
cdfCreateParam( cdfId
?name "geo"
?prompt "Source/drain selector"
?defValue ""
?type "string"
?display "artParameterInToolDisplay('geo)"
?parseAsNumber "yes"
?parseAsCEL "yes"
)
;;; Simulator Information
cdfId->simInfo = list( nil )
cdfId->simInfo->auCdl = '( nil
netlistProcedure ansCdlCompPrim
instParameters (m L W)
componentName nbsim
termOrder (D G S progn(bn))
propMapping (nil L l W w)
namePrefix "M"
modelName "NM"
)
cdfId->simInfo->auLvs = '( nil
propMapping nil
netlistProcedure ansLvsCompPrim
instParameters (m l w)
componentName nbsim
termOrder (D G S progn(bn))
deviceTerminals "D G S B"
permuteRule "(p D S)"
namePrefix "Q"
)
cdfId->simInfo->cdsSpice = '( nil
netlistProcedure ansSpiceDevPrim
instParameters (m w l ad as pd ps nrd nrs ld ls off vds vgs vbs)
otherParameters (model bn)
componentName bsim
termOrder (D G S progn(bn))
propMapping (nil vds Vds vgs Vgs vbs Vbs)
namePrefix "S"
current port
dcSens t
acSens t
)
cdfId->simInfo->hspiceS = '( nil
netlistProcedure ansSpiceDevPrim
instParameters (l w ad as pd ps nrd nrs rdc rsc off Vds Vgs Vbs dtemp
geo m)
otherParameters (bn model)
componentName hnmos
termOrder (D G S progn(bn))
propMapping (nil vds Vds vgs Vgs vbs Vbs)
namePrefix "M"
current port
dcSens t
acSens t
)
Glossary
AEL
Analog Expression Language. A syntax for expressions that allows the rapid evaluation
of those expressions. AEL lets you express values as mathematical expressions instead
of single, fixed values. Refer to the Analog Expression Language Reference
Manual.
auCdl
Analog and Microwave CDL. The analog and microwave version of CDL, which originally
only ran on digital designs.
auLvs
Analog and Microwave LVS. The analog and microwave version of LVS, which originally
only ran on digital designs.
base level
The fundamental representation of a cell or library CDF description. Base level and user
level are combined to produce the effective level, with user-level values overriding base-
level values. Only the base level is permanently stored to the system disk.
callback procedure
A procedure triggered by a change in a parameter in a CDF description. Callbacks can
be SKILL procedures, expressions, or functions entered directly into the Edit Component
Parameter form, or they can be calls to procedures located elsewhere.
CDF
Component Description Format. A system for dynamically changing and storing
parameters and displaying information for components and sets of components for
different versions (levels) of designs.
CDL
Circuit Description Language. CDL is a subset of SPICE used by Dracula®, with
extensions that allow for such things as global signals and empty cells.
CEL
CDF Expression Language. Another name for AEL.
cell
The Cadence software representation of a design element (or component).
CIW
Command Interpreter Window. The primary user interface for launching Cadence
software. The CDF editor starts from the Tools menu in the CIW. You can enter SKILL
commands in the CIW command line.
component
A fundamental unit within a system that encapsulates behavior and/or structure (also
known as an element). A cell, with cellviews and associated CDF.
cyclic field
A type of form field that displays only one value, but reveals a sliding menu when you
select the field.
effective level
A masked sum of all the CDF values for a cell or library.
form field
The empty rectangle on a form where you type in values and names.
hpmns
MNS™ microwave design simulator from Hewlett-Packard.
interpreted labels
Displayed component values which change with each instance or change as the
component parameters change.
instance parameters
Those parameters used in a module description that change with each instantiation of
that module. These parameters are defined in the first section of a module, the module
interface declarations, and are specified each time a module is called in a netlist instance
statement.
libra
Libra®. A microwave design simulator from EESof.
LVS
Layout Versus Schematic. A Dracula verification tool that confirms that your layout
matches your original schematic.
mharm
Microwave Harmonica®. A microwave design simulator from Compact Software.
model
A named instance with a unique group of parameters specifying the behavior of one
particular version of a component. You can use models to instantiate components with
parametric specifications different than those in the original component definition.
model parameter
Those parameters in a module description that remain the same with each instantiation
of the original module, but which are designed to be changed when the module is called
by a model. These parameters are defined in the second section of a module, the global
module scope declarations, and they are specified each time a module is called in a
model instance statement.
nil
No value (an absence of value) or a false value.
parameter
A characteristic of a component.
parameter attributes
A characteristic of a parameter.
parse
The system evaluation of CDF information. Values can be parsed in absolute terms or
according to a predefined system.
pcell
A parameterized cell. You can change a set of cells by changing one parameter.
prompt
The title or words to the left of the form field or button that tell you the name or nature of
the parameter or other value that you enter at that place in the form.
property
A piece of information about an instance or object in a design.
radio button
An entry on a form that behaves as a push button does. You click on the button to turn
the function on (the symbol turns black) and off (the symbol turns white).
radio field
A set of interlinked radio buttons in a single form field associated with one parameter.
Typically, only one button can be on at any one time.
SKILL
A proprietary Cadence programming language based on over 1,200 functions. Each
function follows a standard SKILL syntax and acts on a particular data type or data
object.
SKILL command
When SKILL functions or expressions are used alone or entered into the CIW command
line, they are often called SKILL commands.
SKILL expression
An equation where a data object is set equal to a SKILL function. AEL expressions can
be used to express individual values in a SKILL function.
SKILL function
The fundamental element in the SKILL language. An operation to be performed (usually
specific to Cadence software), usually followed by the items or data objects that the
operation is to be performed on.
SKILL procedure
A short program or “script” or routine made up of multiple SKILL expressions and
functions.
SKILL routine
A program made up of multiple SKILL expressions and functions.
T
A non-nil or true value. Used in Boolean values.
user level
A temporary level of cell or library CDF information that overrides base-level information,
but is lost at the end of each design session unless you take specific actions to save it.
VLE
Virtuoso Layout Editor. Cadence’s integrated circuit layout editor that supports IC cell
layout design down to the polygon level.
watscad
WATSCAD™. A switched capacitor design simulator from the University of Waterloo.
Index
Symbols B
, . . . in syntax 10 base-level CDF information 26, 169, 191
. . . in syntax 10 Boolean parameter 74
[ ] in syntax 10 Boolean type 170
brackets in syntax 10
Browse button 37
A bulk nodes 82, 83
buttonFieldWidth field 109
adcDump function 45
Add CDF Parameter form 31, 70, 71
Add After Parameter field 54, 70 C
callback field 70, 71
paramType field 70 Cadence SPICE 175
prompt field 70 callback procedures. See callbacks
Add Component form 67, 164 callbacks 65, 72, 132
adding parameters 31, 53, 70, 177 definition files 170
adjusting inherited parameters 65
button field width 109 triggering 169, 170, 171
field height 110 use 118
field width 111 capacitance (scale factor), setting 39
prompt field width 112 CDF 14, 191
aedCopyCDF function 150 description levels 26
aedDeleteCDF function 150 descriptions
aedEditCDF function 156 attaching to components 17
AEL 9, 63, 65, 134, 191 attaching to libraries 17
algebraic expressions 63 base-level 17
Analog and Microwave CDL 191 overriding 17
Analog and Microwave LVS 191 user-level 18
archiving callback procedures 117 relationship to Cadence database 19
artParameterInToolDisplay function 73, SKILL functions 126 to 150
185 CDF Editor 25 to 34
atPar function 63, 64, 169 CDF Expression Language. See CEL
attaching callback procedures 117 CDF types 26
attaching files to libraries 118 cdfCopyCDF function 50, 149
attribute lists 56 cdfCopyParam function 149
attributes 54 cdfCreateBaseCellCDF function 87, 140
auCdl language 191 cdfCreateBaseLibCDF function 138
auLvs simulator 191 cdfCreateParam function 62, 116, 142,
automatic range checking 170 185
automatic symbol generation 99, 100 cdfCreateUserCellCDF function 128, 141
average function 178 cdfCreateUserLibCDF function 139
cdfDataId objects 127
cdfDeleteCDF function 148, 185
cdfDeleteParam function 148
cdfDump function 43, 146
K N
keywords 10, 171 net sequence 82
netlist procedures 90
netNameType attribute 96, 102
L netSet 131
NFET example 20, 46, 68, 90, 104, 118,
layout extraction 170 160
length (scale factor), setting 40 nil value 170, 194
let function 178 non-CDF libraries 19
libra simulator 193 noPortDelimiter property 182
library CDF descriptions 26 numeric evaluation 95
library CDF versus cell CDF 169
library IDs 128
Library Manager 47 O
library name selection 26
library-level label information 94 OP function 176
listFunctions function 44 operating point parameters 174 to 179
literal characters 10 operational amplifier
literal evaluation 95 CDF description 176
literal parameter values 95 model 174, 175, 182
load function 44, 45 opParamExprList 176
loading opParamExprList property 176
callback procedures 117 user defined function 177
CDF descriptions from a file 30 opPointLabelSet attribute 97, 102
functions 117 optional parameter attributes 59
LVS tool 193 optParamExprList 176
lvsIgnore property 170 other CDF information 28
Other Information section
buttonFieldWidth field 108
M doneProc field 108, 113
fieldHeight field 108, 110
macro models 89, 90 fieldWidth field 108, 111
macros 67, 90 formInitProc field 108, 112
mappedInst function 176, 177 promptWidth field 108, 112
mappedRoot function 176, 177 overlay 18
maskLayoutViewName parameter 69, 70,
118
menu commands, selection conventions 9 P
mharm simulator 193
model parameters 22, 176, 193 paramDisplayMode attribute 94, 102, 104
accessing 174 parameterized cells 9, 20, 65, 194
modelLabelSet attribute 97, 98, 103 parameterizing the bulk node 82
modelParamExprList 176, 177 parameters 52, 158, 194
models 90, 193 adding 31, 53, 70
mosLayout callback procedure 118, 119 attributes 31, 52, 54, 194
Move CDF Parameter form 31 Boolean 74
moving parameters 31 changing names 55
MP function 177 choices 131
component 66
W
watscad (WATSCAD) simulator 196
write privileges 26