1998-2008 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 Cadences trademarks, contact the corporate legal department at the address shown above or call 1-800-862-4522. All other trademarks are the property of their respective holders. Restricted Print Permission: This publication is protected by copyright and any unauthorized use of this publication may violate copyright, trademark, and other laws. Except as specied in this permission statement, this publication may not be copied, reproduced, modied, 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 modied 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 condential information of Cadence or its licensors, and is supplied subject to, and may be used only by Cadences 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.
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Licensing in ROD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related Documents for ROD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation, Environment, and Infrastructure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technology Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Virtuoso Relative Object Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Virtuoso Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SKILL Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typographic and Syntax Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Keyword-Value Pair Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 11 12 12 12 12 13 14
September 2008
Results of Stretching a Handle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Displaying Pcell Stretch Handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Multipart Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Connectivity for Multipart Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 System-Dened Handles for Multipart Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Multipart Rectangles as ROD Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Creating a Multipart Rectangle from Other Objects . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Editing Multipart Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Multipart Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Types of Subparts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Master Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Offset Subpaths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Enclosure Subpaths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Sets of Subrectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Ends of Paths and Subrectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Keeping Subrectangles Out of the Corners of Subrectangle Subpaths . . . . . . . . . . . 85 Making Paths Choppable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Connectivity for Multipart Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 System-Dened Handles for Multipart Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Multipart Paths as ROD Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Creating a Path from Other Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Editing Multipart Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Creating Objects from Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Creating a Rectangle from Another Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Creating a Polygon from Another Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Creating a Path from Another Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Maintaining Connections for ROD Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Preserving Maintained Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
. . . . . . . . . . . . . . . . . . 113
About ROD Objects and ROD Object IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Getting the ROD Object ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Getting the ROD Object ID Interactively . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
September 2008
Storing the ROD Object ID as a Variable (Avoid) . . . . . . . . . . . . . . . . . . . . . . . . . . . Checking Whether an Object Is a ROD Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . Accessing ROD Object Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examples of Using ~> to Display Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting System-Dened Handle Values with a Script . . . . . . . . . . . . . . . . . . . . . . . Getting User-Dened Handle Names with a Script . . . . . . . . . . . . . . . . . . . . . . . . .
September 2008
rodAssignHandleToParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Displaying Parameter Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . User-Dened Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodCreateHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Handles Using rodCreateHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodCreatePath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ROD Connectivity Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Offset Subpath Arguments (l_offsetSubpathArgs) . . . . . . . . . . . . . . . . . . . . . . . . . . Enclosure Subpath Arguments (l_encSubpathArgs) . . . . . . . . . . . . . . . . . . . . . . . . Subrectangle Arguments (l_subrectArgs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Self-Intersecting Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Self-Abutting Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Arguments as nil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Formatting List-of-Lists Arguments for Subparts . . . . . . . . . . . . . . . . . . . . . . . . . . . How the System Follows to Create Subrectangles . . . . . . . . . . . . . . . . . . . . . . . . . Subrectangles in the Corners of Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Disconnecting Shapes in a Multipart Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Making a Former MPP Part into a ROD Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Paths with rodCreatePath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodCreatePolygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
154 154 154 161 161 165 175 175 176 176 176 177 177 180 181 182 187 187 192 194 196 203 203 203 204 204 205 208 209 210 210 212 212 214 217
September 2008
rodCreateRect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ROD Connectivity Arguments for Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subrectangle Arguments (l_subrectArgs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Objects Using rodCreateRect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Named Rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Multipart Rectangle with Rows/Columns of Master Rectangles . . . . . . . Filling Bounding Boxes with Master Rectangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Rectangles on a Terminal and Net . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Rectangular Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodDeleteHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodFillBBoxWithRects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodGetHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodGetNamedShapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodGetObj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using rodGetObj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodIsFigNameUnused . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
218 219 220 229 229 234 239 251 251 253 254 257 258 259 259 259 259 260 260 262 265 267 267 267 267 268 268 268 268 269 269 269 270 271 275 275
September 2008
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodIsHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodIsObj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodNameShape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Naming Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodPointX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodPointY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodSubPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodUnAlign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unaligning All Zero-Level Shapes in a Cellview . . . . . . . . . . . . . . . . . . . . . . . . . . . . rodUnNameShape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value Returned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
275 276 277 277 277 277 278 278 278 278 280 280 280 281 282 284 284 284 284 285 285 285 285 286 286 286 286 287 287 287 287 287 289 289 289 289
September 2008
Unnaming All Named Shapes in a Cellview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solutions to Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solutions for rodAlign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solutions for rodCreateHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solutions for rodCreatePath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solutions for rodCreateRect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solutions for rodGetObj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solutions for rodNameShape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 309
Using Design Rules for Default Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 Accessing Design Rules with techGetSpacingRule . . . . . . . . . . . . . . . . . . . . . . . . . 310
September 2008
E How Virtuoso Layout Editor Works with ROD Objects . . . . . . 315 F Code Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Using ROD to Create Multipart Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Stretchable Pcells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Contact Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Guard Ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Shielded Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating a Transistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting the Resistance for a ROD Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getRodPathLength Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . createResHandle Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stretchable MOS Transistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code for simplemos Transistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code for contcov User-Dened Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code for myStretch User-Dened Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 321 322 324 325 328 329 332 333 334 335 336 340 341
G Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Warnings in the CIW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Template templateName is replacing an existing template by the same name . . . . Creating instance forces unname of ROD object . . . . . . . . . . . . . . . . . . . . . . . . . . . ROD object ID changes after Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dialog Box Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why is a dialog box asking about saving the technology le? . . . . . . . . . . . . . . . . . 343 343 344 344 345 345
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
September 2008
10
Preface
Virtuoso relative object design (ROD) is a set of high-level functions for dening simple to complex layout objects and their relationships to each other, without the need to use low-level Cadence SKILL language functions. This user guide is aimed at CAD engineers and assumes that you are familiar with the development and design of integrated circuits, Virtuoso Layout Suite L editor, and SKILL programming. This user guide also assumes that you are familiar with the creation of parametrized cells using SKILL or the graphical user interface.
Licensing in ROD
For information on licensing in the Virtuoso design environment, see the Virtuoso Software Licensing and Configuration Guide .
For information on installing Cadence products, see the Cadence Installation Guide . For information on the Virtuoso design environment, see the Virtuoso Design Environment User Guide . For information on library structure, the library denitions le, and name mapping for data shared by multiple Cadence tools, see the Cadence Application Infrastructure User Guide . For information about callback procedures used when creating SKILL pcells, refer to Component Description Format User Guide .
September 2008
11
Technology Information
I
For information on how to create and maintain a technology le and display resource le, see the Virtuoso Technology Data User Guide and the Virtuoso Technology Data ASCII Files Reference . For information on how to access the technology le using SKILL functions, see the Virtuoso Technology Data SKILL Reference .
For whats new, refer to the Virtuoso Relative Object Design Whats New For outstanding Cadence Change Requests (CCRs), refer to the Virtuoso Relative Object Design Known Problems and Solutions .
Virtuoso Tools
I
For information about how to perform design tasks with the Virtuoso Layout Suite L editor, refer to the Virtuoso Layout Suite L User Guide. For information about how to perform design tasks with the Virtuoso Layout Suite XL editor, refer to the Virtuoso Layout Suite XL User Guide. For information about parameterized cell SKILL functions, refer to the Virtuoso Layout Suite SKILL Reference. To create parameterized cells with the graphic user interface or low-level SKILL functions, refer to the Virtuoso Parameterized Cell Reference . For examples of pcells, refer to the Sample Parameterized Cells Installation and Reference.
SKILL Documents
I
Virtuoso Design Environment SKILL Reference . Cadence SKILL Language User Guide Cadence SKILL Language Reference Cadence SKILL Development Reference Cadence SKILL Development Help
12 Product Version 6.1.3
September 2008
Virtuoso Technology Data SKILL Reference Virtuoso Layout Suite SKILL Reference Virtuoso Schematic Editor SKILL Reference Cadence User Interface SKILL Reference Cadence Interprocess Communication SKILL Reference
variables
z_argument...
.text
[ ]
{ }
|
September 2008
Virtuoso Relative Object Design User Guide Preface => Precedes the values returned by a Cadence SKILL language function. Separates the possible values that can be returned by a Cadence SKILL language function.
The keyword (?name, ?type, and so on) is the name of the argument. You must type it preceded by a question mark ( ? ); follow the keyword with a space and the value or expression you want to assign to the argument. For example:
rodCreateHandle( ?name ?type ?value ?rodObj "floatHandle" "float" 3.3 rodObj
In the example above, the keyword ?rodObj is set to the value represented by R_rodObj .
September 2008
14
September 2008
15
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Introduction
Virtuoso relative object design (ROD) is a set of high-level functions for dening simple to complex layout objects and their relationships to each other, without the need to use low-level Cadence SKILL language functions. ROD lets you create objects and dene their relationships at a high level of abstraction, so you can concentrate on your design objectives. ROD automatically handles the intricacies of traversing the design hierarchy and simplies the calculations required to create and align geometries. Generally, with a single ROD function call, you can accomplish a task that otherwise would require several lower-level SKILL function calls. For example, creating a pin required a series of low-level SKILL function calls, but with ROD, you use a single function to create a shape and designate it as a pin. You can create entities such as guard rings, contact arrays, and transistors with one function call. You can also create an object from an existing object just by specifying the size of the new object. ROD functions allow you to
I I I I I I I I
Create hierarchical parameterized cells easily Name rectangles, polygons, paths, lines, dots, labels, and text display objects Access objects by name through all levels of hierarchy Access points and other information stored on objects through all levels of hierarchy Align ROD objects to each other or to specic coordinates Assign handles to pcell parameters for interactive stretching Create multipart rectangles and multipart paths Create objects from other objects
For a complete description of the ROD functions, see Appendix 3, Using Relative Object Design Functions.
September 2008
16
Virtuoso Relative Object Design User Guide Relative Object Design Concepts In general, use ROD functions only when you want to:
I I I I I
Specify persistent relationships between objects Create complex multi-part objects, such as guard rings Access the object from a different level of hierarchy Stretch handles on parameterized cells to change the value of parameters Create a new object from an existing object
When you want to create a simple shape, such as a rectangle or simple one-part path, and you do not intend to relate the shape to another object, use the dbCreate function. The dbCreate functions do not have to store the additional information required for ROD objects, and therefore, run a little more quickly and use less memory. This is also true for other ROD functions, such as rodAlign (versus dbAlign). Use rodAlign only if you need the alignment to persist.
September 2008
17
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Major advantages for using ROD to create pcells are:
I
You can base the pcell parameters on rules from your technology le, making the pcells tolerant of changes to your technology You can assign point handles to pcell parameters that let you update the parameters interactively by stretching the pcell in the Virtuoso layout editor
Before you use ROD functions in pcells, see the safety rules for creating SKILL pcells in Creating Pcells Using SKILL in the Virtuoso Parameterized Cell Reference . For examples of pcells, see the Sample Parameterized Cells Installation and Reference .
Named Objects
You can assign a name to a zero-level object (an ordinary database shape, such as a rectangle or polygon) either by naming an existing object with the rodNameShape function or by using a RODcreate function to create an object. You can also name a shape when you create it with the Virtuoso layout editor. You can access information through hierarchy about named objects, such as instances and named shapes.
Hierarchical Name
To access information about a named shape or instance through hierarchy, use its hierarchical name and the top-level cellview ID. A hierarchical name consists of the names of the instances through which you need to descend to reach the desired named shape or instance. The following gure shows the hierarchy in a layout cellview containing the named shape polyRect. Its hierarchical name is INV1/ptr1/polyRect.
Y INV1 of inverter ptr1 of pTran polyRect
September 2008
18
Virtuoso Relative Object Design User Guide Relative Object Design Concepts When you name an existing database shape using the ROD naming function, the function creates ROD information associated with the shape. This information is stored in a ROD object and is identied by a unique ROD object ID. The information contained in a ROD object includes its name and database ID. When you create a new shape with a ROD creation function, the function creates a named database shape and a ROD object.
System-Dened Handles
The system automatically denes the following types of handles for most ROD objects:
I I I I
Bounding box point handles Bounding box width and length handles Segment point handles Segment length handles
ROD dots, labels, and text display objects are dened by a single point, so all of their point handles evaluate to their origin point and their length and width handles evaluate to zero.
September 2008
19
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Note: For multipart paths, the system also provides the handle mppBBox, which contains a list of the lower-left and upper-right coordinates of the bounding box around the whole multipart path. The following table summarizes the types of handles and the ROD object(s) to which they apply. Table 1-1 System-Dened Handles for ROD Objects Type of Handle Bounding Box Point Handles Bounding Box Width and Length Handles mppBBox Segment Point Handles Segment Length Handles Applies to... All ROD objects except dots, labels, and text display objects All ROD objects except dots, labels, and text display objects ROD multipart paths ROD rectangles, polygons, and paths ROD rectangles, polygons, and paths
Bounding Box Point Handles There are nine system-dened point handles associated with the bounding box around every ROD object:
I I I
One at each corner One in the center of each edge One in the center of the bounding box
The system automatically names and calculates values for bounding box point handles. Names indicate the position of the handle, as shown for a polygon in the following gure.
September 2008
20
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-1 Bounding Box Point Handles for a Polygon
upperCenter upperLeft
X
centerCenter
X upperRight
centerLeft
X centerRight
lowerLeft
X
lowerCenter
X lowerRight
You can abbreviate boundingcR box point handle names as follows: upperLeft or uL lowerLeft upperCenter upperRight centerLeft centerRight or or or or uC uR cL cR lowerCenter lowerRight centerCenter
or or or or
lL lC lR cC
Bounding Box Width and Length Handles The system provides oating-point handles named width and length for the width and length of the bounding box for a named object, where width is the horizontal measurement and length is the vertical measurement. Note: For a rectangle, the bounding box has the same width and length as its shape.
length
width
September 2008
21
Virtuoso Relative Object Design User Guide Relative Object Design Concepts For a polygon, the system calculates values for the width and length handles associated with the bounding box, as shown below. Figure 1-2 Bounding Box Width and Length Handles for a Polygon
length
width
For a single-part path, the system calculates values for the width and length handles associated with the bounding box, as shown below. Figure 1-3 Bounding Box Width and Length Handles for a Single-Part Path
length
width
For a multipart path, when the system calculates values for the width and length handles, it always uses the width and length of the bounding box around the master path .
September 2008
22
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-4 Bounding Box Width and Length Handles for a Multipart Path
Subpath length
For multipart paths, there is one additional handle: mppBBox. The mppBBox handle contains a list of the lower-left and upper-right coordinates of the bounding box around the whole multipart path .
September 2008
23
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-5 Bounding Box mppBBox Handle for the Whole Multipart Path
About Segments of Rectangles, Polygons, and Paths For rectangles, polygons, and paths that are ROD objects, the system assigns several point handles to each segment of the object. You can use these segment point handle names to reference points on the boundary of the object. For relative object design, a segment of a rectangle or polygon is dened as an edge, or nite line between two points, partially forming the boundary of the object. For example, a six-sided polygon has six segments (six edges).
September 2008
24
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-6 Segments of a Polygon
segment
segment
segment
segment
segment
segment
For paths, segments include the width of the path and both edges. For example, the following path has four segments. Figure 1-7 Segments of a Path
segment
segment segment
segment
The system assigns a name to each segment of the object, using the prex segment followed by a number: segmentn , where n begins at zero and is the segment number. For ROD rectangles, segments are always numbered as if they were dened in a clockwise direction, starting in the lower-left corner.
September 2008
25
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-8 Numbering the Segments of a Rectangle
segment 1
segment 0
segment 2
X
segment 3 The starting point is always in the lower-left corner for rectangles.
For ROD polygons, the system numbers segments in the direction in which the polygon was created, starting with the rst point dened. The six-sided polygon below was created in a clockwise direction. Figure 1-9 Numbering the Segments of a Polygon
segment 2
segment 1
segment 3
segment 0
segment 4
Starting point
segment 5
September 2008
26
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Note: If you create a polygon with the Virtuoso layout editor and then assign a name to it using the rodNameShape function, the system numbers segments starting with the rst point you dened when you created the polygon. The segments of the path below were created in a clockwise direction. Figure 1-10 Numbering the Segments of a Path
Starting point
segment 3
segment 0 segment 2
segment 1
Segment Point Handles for Polygons and Rectangles For rectangles and polygons, the system calculates the following point handles:
I
For each segment, three point handles: one at the beginning, middle, and end of the segment. Their names are: startn , midn , and endn , where n is the segment number. The endn handle for a segment and the startn handle for the next segment share the same point. For the last segment, the three handles described above, plus three more handles: startLast, midLast, and endLast.
The six-sided polygon in the following gure was created starting in the upper-left corner of the highest segment, with the segments dened clockwise.
September 2008
27
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-11 Segment Point Handles for a Polygon
Starting point start0, end5, endLast mid0
Segments of a polygon
end0, start1
X X
X X X
X X
mid2
end1, start2
The starting point of the rst segment is also the ending point of the sixth segment, so the value of the start0 point handle is the same as the value of the end5 point handle. The system calculates values for three additional point handles for the last segment of the polygon, which in this case is the sixth segment. The illustration shows three system-dened segment point handlesstart0, end5, and endLastfor the same point. For rectangles, the system always uses the lower-left corner as the starting point and denes segments in a clockwise direction. Figure 1-12 Segment Point Handles for a Rectangle
mid1
end0, start1
end1, start2
X
mid0
X X mid2
X X X
mid3, midLast
September 2008
28
Virtuoso Relative Object Design User Guide Relative Object Design Concepts For rectangle, the lower left corner is always its starting point, so when you rotate a rectangle, the handle values change. Segment Point Handles for Paths When naming segment point handles for paths, the system takes into account the direction of the path. The names of handles on the left in relation to the direction of the path contain the word Left , and the names of handles on the right contain the word Right . For example, if the single segment below was a road, and you were driving on it in the direction shown, then the handles on the top edge of the segment are named Left segment handles and handles on the bottom edge of the segment are named Right segment handles. Figure 1-13 Segment Point Handles for a Single-Segment Path
X
mid0 start0
X X X
midRight0
X X end0 X
endRight0
X X
startRight0
The point handle names for a multisegment path are shown below.
September 2008
29
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-14 Segment Point Handles for a Multisegment Path
midLeft2, midLeftLast
endLeft2, endLeftLast
X
endLeft0, startLeft1 midLeft1 startLeft0 midLeft0
X X start2,
startLast end1, mid2, midLast
X X X endLast X X
endRight2, endRightLast end2,
midRight2, midRightLast
X
start0
X X
mid0
X mid1
X X midRight1
X X
X end0,
start1
X
midRight0
X
endRight0, startRight1
startRight0
For paths, the system calculates the values of two additional point handles: startCenter0 and endCenterLast. For paths with the end type flush, the startCenter0 and endCenterLast handles have the same values as the start0 and endLast handles. However, for paths with the layer extending beyond the centerline, which have an end type of variable, offset, or octagon, the startCenter0 and endCenterLast handles have different values than the start0 and endLast handles, as shown in the following gure.
September 2008
30
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-15 Point Handles for Extended-Type Paths
X
endLast startCenter0
X X
endRight2, endRightLast
startLeft0
X
start0 endCenterLast
X X
startRight0
For paths with an end type of flush, offset, or variable, segment point handles are on the path boundary or path centerline. However, for paths with the end type octagon, some segment point handles at the path ends and where path segments join are actually outside the path boundary. For example, for the following path, the startLeft0, startRight0, endRight0, startRight1, endLeft1, endLeftLast, endRight1, and endRightLast segment point handles are located outside of the path itself.
September 2008
31
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-16 Segment Point Handles for Paths with Octagonal Ends
X X X
end0, start1
startLeft0
start0
X
startCenter0
X X X
endRight0, startRight1
XX X
startRight0
Segment Length Handles The system provides one segment length handle for each segment for objects that have segments. For paths, the system provides a length handle for the centerline of each segment, excluding extensions, if any. Note: For multipart paths, the system denes handles based on the points of the master path only, with the exception of the mppBBox handle. The system names length handles lengthn , where n is the segment number. The handle for the length of the rst segment is length0. The system increases n by 1 for each additional segment, in the direction in which the object was created. (Rectangles are always created in a clockwise direction, starting in the lower-left corner.) The system also provides the handle lengthLast for the last segment.
September 2008
32
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-17 Segment Length Handles for a Rectangle
length1 The starting point is always in the lower-left corner for rectangles.
length0
length2
X
length3, lengthLast
For rectangle, the lower left corner is always its starting point, so when you rotate a rectangle, the handle values change. The six-sided polygon in the following gure was created starting in the upper-left corner of the highest segment, with the segments dened clockwise. Figure 1-18 Segment Length Handles for a Polygon
X
length5, lengthLast length4
length1
length3 length2
Note: If you create a polygon with the Virtuoso layout editor and then assign a name to it using the rodNameShape function, the system numbers segments starting with the rst point you dened when you created the polygon. For a path, the system computes values for segment length handles along the path centerline. The names of segment length handles for a four-segment path are shown next.
September 2008
33
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-19 Segment Length Handles for a Multisegment Path
Direction of path
Accessing the Path Width The system does not automatically compute the value for the width of a ROD path. (The width handle measures the width of the bounding box around a path.) However, you can access the path width by using the ROD object ID and the ROD attribute for the database ID of the object (dbId) with the database access operator (~>). For a multipart path, for example, the following statement returns the width of the master path:
rodId~>dbId~>width
Why Are There Multiple Handles for the Same Point? In some cases, the system provides more than one handle for the same point. Although multiple handles for the same point might seem redundant, they provide you with exibility. For example, if you do not know the number of segments an object has, you can refer to points on the last segment by using point handle names containing the word Last. For example, for an eight-sided polygon created in a clockwise direction, with the starting point in the upper-right corner, the segments are numbered segment 0 through segment 7.
September 2008
34
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Figure 1-20 Multiple Handle Names for the Same Point
mid6, midLast
X
segment 7
X
Starting point
segment 6 segment 0
segment 1
User-Dened Handles
You can dene your own handles to store points, calculations, and other information. When you dene a new handle, you specify the name (or let it default) and assign a value. The values of user-dened handles are stored in the database. The information stored can have any of the following data types: point Boolean string integer oating-point number SKILL expression
If you let the name of your new handle default, the system assigns a name unique within the cellview, as follows: handle0, handle1, handle2, etc. For example, if a layout cellview contains two ROD objects, and you create one user-dened handle for each object without specifying handle names, the system assigns the name handle0 to the handle on the rst object and handle1 to the handle on the second object. If you create a handle without specifying a name, you can nd out what the system named the new handle. For a code example showing how to do this, see Problem 3-6 Querying a System-Assigned Handle Name on page 179.
September 2008 35 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Aligning Objects
You can specify the position of one named object in relation to another named object with the rodAlign function. This is called relative alignment . To align two named objects, identify the object you want to align (aligned object ) and the object or point you want to align it to (reference object or reference point ). Usually, you align objects by specifying a point handle on each object. You can also specify the distance between the two objects in the direction of the X axis, the Y axis, or both. The alignment between two objects is preserved when you manipulate either object and when you save and close the layout cellview. For example, when you move a reference object, the aligned object moves with it. An alignment can involve any named geometry at any level of hierarchy and any design rule that is dened in your technology le. For example, you can align a point handle on object B to a point handle on object A (the reference object) and specify the distance between them as equal to the minimum design rule for the layer in your technology le. When you move object A, object B also moves, and vice versa.
Align B with A A Point handle on object B is aligned to point handle on object A.
Reference object
Aligned object
September 2008
36
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Or you might want to align the centerLeft point handle on the object named D in the instance nTrans2 to the centerRight point handle on the reference object, B in the instance nTrans1.
nTrans1 Separation nTrans2
A BX
XD
Reference object
Aligned object
A layout cellview is opened in edit mode Either object involved in an alignment is edited in any way (moved, rotated, stretched, etc.), at any level of the hierarchy You reload your technology le
When you open a cellview in edit mode, the system automatically calculates and applies all alignments assigned to the ROD objects in the cellview. Caution When you open a cellview in read-only mode, the system cannot apply alignments. If the cellview contains aligned ROD objects, you might not be seeing the most current version of the design data. If you want the system to display a message in the command interpreter window (CIW) warning that ROD alignments might not be current, turn on the ROD environment variable readCellviewWarningOn by setting it equal to t.
September 2008
37
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
polyRect
polyRect
The hierarchical name for the shape polyRect in instance IA1 of AAA, where instance IA1 is in the instance IB1 of BBB, is
IB1/IA1/polyRect
For detailed examples showing how to access objects through hierarchy, see Using rodGetObj on page 271.
September 2008
38
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
pcell
A pcell with stretch handles is called a stretchable pcell . Assigning stretch handles to pcell parameters lets you graphically change the value of those parameters for pcell instances after you place them. You do this by selecting one or more handles and using the Stretch command. You are not actually stretching objects within the pcell or stretching the pcell itself. Instead, you are graphically updating the value of the parameters associated with the selected handles. Graphically stretching a pcell instance has the same result as editing its parameters using the Edit Properties form. Note: You cannot undo stretching a pcell instance. For more information about point handles, see Handles on ROD Objects on page 19. You specify the direction in which a handle stretches as either X or Y. For example, if you have a pcell containing a single rectangle and want to stretch the width of the rectangle, you could assign the centerRight point handle to the width parameter of the pcell and specify a
September 2008
39
Virtuoso Relative Object Design User Guide Relative Object Design Concepts stretch direction of X. This lets you change the value of the width parameter by stretching the centerRight point handle horizontally.
centerRight point handle pcell pcell
When you assign a handle to a parameter, you can dene your own function to calculate the value of the pcell parameter to which you are assigning the handle. The system passes the increment or decrement resulting from stretching the assigned handle(s) to the user-dened function as input and uses the value returned by the function to replace the value of the parameter.
Start the Stretch command and select one or more stretch handles. Note: If you have trouble selecting stretch handles, try turning off the Gravity On option on the Layout Editor Options form.
When you rst select a stretch handle (or more than one stretch handle) for which there is display information specied, such as a parameter name and value, the system shows the information next to the upper-right corner of the pcell. As you move the cursor, the system does the following, in the sequence in which the handle-to-parameter assignments are specied in the pcell code and according to the frequency specied for regenerating the pcell:
When there are no user-dened functions associated with the handles, the system applies the increment or decrement directly to the value of the parameters.
September 2008
40
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
When there are user-dened functions, the system sends the increment or decrement to the user-dened functions, executes the functions, and replaces the value of the parameters with the values returned by the functions. Displays an outline of the regenerated pcell and updates the information displayed, if any.
The steps of this process repeat until you complete the stretch. For a owchart of the process, see Figure 1-21 on page 41. Figure 1-21 Flowchart for the Stretchable Pcell Process
September 2008
41
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Assigning Handles
To make a pcell stretchable, in your pcell code, you can assign
I I I I
One point handle to one parameter Multiple point handles to one parameter One point handle to multiple parameters Three point handles at once by specifying an edge
To assign handles to parameters, use the rodAssignHandleToParameter function. In each rodAssignHandleToParameter statement, you can assign one or more point handles to one parameter and specify one stretch direction (X or Y). To assign a handle to multiple parameters, you must write multiple rodAssignHandleToParameter statements for the pcell. Assigning Multiple Handles to One Parameter You can assign more than one handle to one parameter. For example, if you assign the upperRight, centerRight, and lowerRight point handles to the width parameter of a pcell that contains only a rectangle and specify a stretch direction of X, then you can change the value of the width parameter by stretching any or all of the three point handles horizontally.
pcell
pcell
Assigning One Handle to Multiple Parameters You can assign one handle to two or more parameters. When you stretch the handle, the stretch might affect more than one of the associated parameters. For example, if you want to use one handle to stretch an object in the direction of both the X and Y axes, you assign the same handle to two parameters by writing two rodAssignHandleToParameter statements. In one statement, you assign the handle to
September 2008
42
Virtuoso Relative Object Design User Guide Relative Object Design Concepts the rst parameter with a stretch direction of X, and in the other statement, you assign the same handle to a second parameter with a stretch direction of Y. The following example shows a pcell containing only a rectangle. You could assign the upperRight point handle to the width parameter with a stretch direction of X, and assign the upperRight point handle again to the length parameter with a stretch direction of Y. Then you can change the value of the width parameter by stretching the upperRight point handle horizontally as shown in a previous example and change the value of the length parameter by stretching the upperRight point handle vertically. Assigning the same handle to two different parameters requires two separate rodAssignHandleToParameter statements.
pcell
width
width
You can also change the value of both the width and length parameters by stretching the upperRight point handle at any other angle.
width
Assigning Handles by Specifying Bounding Box Edges You can assign three bounding box point handles for a ROD object to a pcell parameter at once by specifying the name of the bounding box edge. Specifying an edge automatically assigns all three point handles on the edge to the same parameter. For example, for a
September 2008 43 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Relative Object Design Concepts rectangle that is a pcell, the bounding box edges you can specify are upperEdge, lowerEdge, leftEdge, rightEdge. When you specify upperEdge, you simultaneously specify the three point handles on the bounding box: upperLeft, upperCenter, and upperRight.
upperCenter upperLeft pcell upperRight
updatePCellIncrement A oating-point layout editor environment variable specifying how often the system updates pcell parameters and regenerates the pcell during a stretch operation. The default is at every grid snap, as dened by the technology le variable mfgGridResolution. If you want to vary the update frequency for different handle-to-parameter assignments within the same pcell, you can specify the f_updateIncrement argument for the rodAssignHandleToParameter statement for each handle-to-parameter assignment. The value of the f_updateIncrement argument overrides the value of the layout editor environment variable updatePCellIncrement.
displayStretchHandles A Boolean graphic editor and layout editor environment variable specifying whether stretch handles are displayed in layout cellviews. The default is t, which displays stretch handles. stretchHandlesLayer A string graphic editor environment variable specifying the layer on which stretch handles are displayed. The default is the y0 layer and drawing purpose. constraintAssistedMode A Boolean Virtuoso XL Layout Editor environment variable that controls the Constraint Assisted Mode . When it is turned on, you might not be able to edit stretchable pcells by stretching their handles. You can turn off Constraint Assisted Mode on the Layout XL
September 2008
44
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Options form or by setting the XL environment variable constraintAssistedMode to nil. For a description of how to set graphic editor and layout editor environment variables, see Environment Variable Functions in the Custom Layout SKILL Functions Reference . For a description of the XL environment variables, see Setting Environment Variables in the Virtuoso XL Layout Editor User Guide .
Where the stretch handle is located Whether stretching the handle affects the instance boundary Whether the origin point of the instance is allowed to move How the stretch direction and stretch type are specied The data type of the parameter to which the handle is assigned Whether the parameter value is computed by a user-dened function Whether the instance is rotated The settings of the environment variable that inuence stretchable pcells How often the system regenerates the pcell
Results of Specifying the Stretch Type The stretch type determines whether the parameter is increased or decreased in relation to the stretch direction. The stretch type can be either relative or absolute .
September 2008
45
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
I I
For a stretch type of relative , the stretch is in relation to the center of the pcell. For a stretch type of absolute , the stretch is in relation to the X or Y axis.
The results of a stretch often depend on whether or not the origin point of the pcell instance can move. The origin point is usually the lower-left corner. For handles in some locations, the results of a stretch are the same for both stretch types, whether the origin point can move or not. In the following examples, the pcell contains a single rectangle, so handles on the bounding box of the rectangle are also on the boundary of the instance. There are no user-dened functions. In the example below, the centerRight point handle of a rectangle is assigned to the width parameter of the pcell with the stretch direction X. The width parameter controls the width of the rectangle.
width Y pcell Origin point 0:0 X centerRight stretch handle
For this sample pcell, stretching to the right always increases width no matter what the stretch type is and whether or not the origin point can move, because the handle is located in the middle of the right edge. Conversely, stretching to the left always decreases width for this pcell.
width Y
width
pcell
pcell
0:0
X 0:0
September 2008
46
Virtuoso Relative Object Design User Guide Relative Object Design Concepts However, for handles in most locations, the results of stretching are different for each stretch type and when the instance origin point can move or not move. Note: Dening the origin point of a pcell instance as movable is most useful when the stretch type is relative and the location of the stretch handle coincides with and affects the bounding box of the pcell instance.
Results for the Relative Stretch Type
For a stretch type of relative , stretching a handle away from the center of its ROD object increments the associated pcell parameter, while stretching towards the center of the ROD object decrements the associated pcell parameter. A stretch away from the center makes the object larger and a stretch towards the center makes the object smaller. The results of stretching a handle might vary depending on whether the instance origin point can move during a stretch. In the example below, the centerLeft point handle on the rectangle is assigned to the width parameter of the instance, with a stretch direction of X. The pcell contains only the rectangle.
September 2008
47
Virtuoso Relative Object Design User Guide Relative Object Design Concepts When you stretch the centerLeft handle to the left (away from the center of the pcell), the width parameter is incremented, so the width of the rectangle and instance gets larger.
Relative stretch away from center and origin point can move Relative stretch away from center and origin point cannot move
pcell
pcell
0:0
0:0
In both cases, the width of the rectangle and instance gets larger. However, if the instance origin point cannot move, the width of the rectangle and instance expands to the right. For a relative stretch, when you stretch the centerLeft handle to the right (towards from the center of the pcell), the width parameter is decremented, so the width of the rectangle and instance gets smaller.
pcell
pcell
0:0
0:0
In both cases, the width of the rectangle and instance gets smaller. However, if the instance origin point cannot move, the width of the rectangle and instance shrinks from the right.
Results for the Absolute Stretch Type
For a stretch type of absolute , stretching in a positive direction in relation to the X or Y axis increments the associated pcell parameter, while stretching in a negative direction decrements the associated pcell parameter.
September 2008
48
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The results of stretching a handle might vary depending on whether the origin point can move during a stretch. In the example below, the lowerCenter point handle is assigned to the length parameter of a rectangle that comprises a pcell. The stretch direction is specied as Y.
Y pcell Origin point 0:0 X lowerCenter stretch handle length
For an absolute stretch, when the stretch handle is on the bottom of the object and you stretch upward (in a positive direction along the Y axis), the length parameter is incremented, so the object gets larger. How the rectangle expands depends on whether the origin point can move.
pcell length
pcell
length
0:0
0:0
When the origin can move, the edge on which the handle is located can move also, which allows the handle to move during the stretch. An absolute stretch of the lowerCenter point handle upward along the Y axis increases the length parameter, making the rectangle and instance larger by moving the edge on which the handle is located.
September 2008
49
Virtuoso Relative Object Design User Guide Relative Object Design Concepts When the origin cannot move, the edge on which the handle is located cannot move either, which prevents the handle from moving during the stretch. An absolute stretch of the lowerCenter point handle upward along the Y axis increases the length parameter, making the rectangle and instance larger by moving the edge opposite from where the handle is located. For an absolute stretch, when the handle is on the bottom of the object and you stretch downward (in a negative direction along the Y axis), the length parameter is decremented, so the object gets smaller. How the rectangle shrinks depends on whether the origin point can move.
0:0
0:0
In both cases, the length of the rectangle and instance get smaller. When the origin can move, an absolute stretch of the lowerCenter point handle downward along the Y axis decrements the length parameter by moving the lower edge of the rectangle. However, when the origin cannot move, an absolute stretch decrements the length parameter by moving the edge opposite from where the handle is located. Results of Stretching Multiple Handles When you select more two or more handles to stretch at the same time, the system processes each handle in the sequence in which the handle-to-parameter assignments appear in the pcell code. The results depend partly on how the handles affect pcell parameters.
I
When the selected handles are assigned to the same parameter and affect that parameter in the same way, the system applies only the change to the parameter from the handle that appears rst in the handle-to-parameter assignments in the pcell code; the system ignores the results of stretching the other handles.
September 2008
50
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
I
When the selected handles are assigned to the same parameter but affect the same parameter in different ways, the system applies the change from each handle to that same parameter, cumulatively. When the selected handles affect different parameters, the system applies the change from each handle to each parameter individually.
In the following example, the pcell contains a single rectangle. There are no user-dened functions for the handles.
width Y Pcell contains one rectangle. pcell
0:0
The three point handles, upperRight, centerRight, and lowerRight, are all assigned to the width parameter of the pcell with the stretch direction of X. The width parameter controls the width of the rectangle.
Y width
pcell
0:0
September 2008
51
Virtuoso Relative Object Design User Guide Relative Object Design Concepts When you stretch by +3 along the X axis, all three point handles affect the width parameter in the same way, so stretching all three handles gets the same result as stretching only one or two of the handles.
width Y
pcell
Change is +3 in X.
0:0
Stretching Multiple Handles on the Same Point When there are multiple stretch handles on the same point, and you select that point (or one of the handles on it), all stretch handles on the point are selected. Results of Dragging a Handle During a Stretch As you move the cursor during a stretch operation, the system displays an outline of the instance and shows how it is changing. If you want to see an outline of each individual object in the pcell and the pcell boundary, you can turn on the Drag Enable property for the object layers. You can set this property by choosing the Technology File Edit Layers command in the Command Interpreter Window. Replace CDFs with User-Dened Functions In this release, stretching a pcell does not execute CDFs associated with the pcell parameters. For now, you should use user-dened functions to perform tasks formerly performed by CDFs. For more information about user-dened functions, see User-Dened Functions on page 165 and the Sl_userFunction argument description for the rodAssignHandleToParameter function.
September 2008
52
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Example of Stretching a Sample MOS Transistor The following pcell contains a MOS transistor with two contact arrays.
You can stretch the MOS transistor in a negative direction towards the Y axis to reduce the number of contacts in the array from two to one, using the Virtuoso layout editor Stretch command. 1. Choose Edit Stretch . 2. Select the upperCenter stretch handle on the left contact array using an area-selection box. Note: If you have trouble selecting the stretch handle, try turning off the Gravity On option on the Layout Editor Options form. 3. To enter the reference point, click on the upperCenter stretch handle on the left contact array. The following information appears to the right of the pcell: leftcov = 1 As you move the cursor down, the information changes to leftcov = 0.25
September 2008
53
Virtuoso Relative Object Design User Guide Relative Object Design Concepts 4. To enter the new location, click above the bottom transistor.
leftcov = 0.25
Click here.
5. Exit the Stretch command by pressing Escape. The MOS transistor pcell instance now looks like this:
September 2008
54
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Multipart Rectangles
A multipart rectangle (MPR) is a single object composed of multiple parts on the same or on different layers. The parts consist of one or more named master rectangles and one or more arrays of unnamed subrectangles . Each named master rectangle is a separate object with ROD attributes, created at level zero in the hierarchy. Each unnamed subrectangle is an ordinary database shape with no ROD attributes, created at level zero in the hierarchy. You create MPRs with the rodCreateRect function. For example, you might create a single master rectangle with a two-dimensional array containing four subrectangles,
One master rectangle
Four subrectangles
a single master rectangle overlapped by rows and columns of subrectangles (a twodimensional array),
Master rectangle
September 2008
55
Virtuoso Relative Object Design User Guide Relative Object Design Concepts one master rectangle with two one-dimensional arrays containing ve subrectangles each,
One master rectangle First array of subrectangles
or six master rectangles and a two-dimensional array containing four subrectangles. The array of subrectangles repeats for each master rectangle (you dene the array once).
Master rectangles
Master rectangles
September 2008
56
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
September 2008
57
Virtuoso Relative Object Design User Guide Relative Object Design Concepts When you modify a multipart rectangle with the layout editor, changes to a master rectangle also affect all of its associated subrectangles; you cannot edit or copy an array of subrectangles or individual subrectangles. Stretching Multipart Rectangles You can stretch the edges and/or corners of a master rectangle of a multipart rectangle in the same way you stretch regular rectangles, by clicking on an edge or vertex, then clicking in a new location. The system regenerates the arrays of subrectangles associated with the stretched master rectangle, changing the number of subrectangles in each array; the shape of the subrectangles does not change. You cannot stretch a master rectangle separately from its subrectangles, nor can you stretch subrectangles separately from their master rectangle. The way that subrectangles regenerate depends on how the multipart rectangle was dened with the rodCreateRect function. For information about dening multipart rectangles, see rodCreateRect on page 218.
September 2008
58
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Multipart Paths
A multipart path (MPP) is a single ROD object consisting of one or more parts at level zero in the hierarchy on the same or on different layers. You can create one-part paths, simple multipart paths, or complex multipart paths such as guard rings, transistors, buses, and shielded paths. This section provides an overview of multipart path concepts. You can create MPPs in the ways listed below. This section provides an overview of multipart path concepts.
I
With the Virtuoso layout editor Create Multipart Path command For information about using the Create Multipart Path command, see Creating and Editing Multipart Paths in the Virtuoso Layout Suite L User Guide .
I I I
For guard rings, with the Quick Cell graphical user interface With the SKILL function rodCreatePath on page 180 By editing the ASCII version of your technology le For information about editing your technology le, see multipartPathTemplates in the Virtuoso Technology File Data: ASCII Files Reference Manual .
You create a ROD path by specifying a point list for the master path or by specifying one or more named objects as a source for the points of the master path. A multipart path consists of a single master path and one or more subparts . The master path is an ordinary path; however, it is the dening part of a multipart path; all subparts are based on the master path. The subparts can be any combination of offset subpaths, enclosure subpaths, and sets of subrectangles.
Types of Subparts
I
An offset subpath is a path that is coincident with an edge of the master path, overlapping the master path, or separated from the master path. An enclosure subpath is a path with its centerline on the centerline of the master path and is usually narrower or wider than the master path. The system calculates its width using the width of the master path and a positive or negative enclosure value. A set of subrectangles consists of one or more subrectangles that are coincident with an edge of the master path, overlapping the master path, or separated from the master path
September 2008
59
Virtuoso Relative Object Design User Guide Relative Object Design Concepts You can create any number of subparts. All subparts exist in relation to and depend on the master path. A subrectangle in a set of subrectangles is not an individual shape; it is part of that specic set of subrectangles. You cannot select or edit individual subrectangles. For example, the multipart path shown below has one subpath and one set of subrectangles. Both the subpath and the set of subrectangles are offset from the master path.
One set of subrectangles One subpath
Master path
Master Paths
You create the master path for a multipart path by specifying a list of points (point list). To control where the master path appears in relation to the point list, you can specify justification and an offset .
I I
Offset species the distance between the master path and the points in the point list. Justification species whether to offset the centerline, left edge, or right edge of the master path from the point list.
left offsets the left edge of the master path from the point list. right offsets the right edge of the master path from the point list. center offsets the centerline of the master path from the point list.
Both offset and justication are relative to the direction of the master path. The direction of the master path is determined by the sequence in which you specify its points.
September 2008
60
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Position of Master Path in Cellview The location of the master path in a layout cellview window in relation to the points in the point list depends on whether the offset value is positive or negative and on the direction of each segment in the point list, as shown in Table 1-2. Table 1-2 Position of Master Path in Relation to Point List Direction of Point List Segment Positive along X axis Negative along X axis Positive along Y axis Negative along Y axis Positive Offset Above Below Left Right Negative Offset Below Above Right Left
Examples of Offsetting the Master Path The following examples show offset master paths.
Master Path with Positive Offset, Left Justication
When the offset is positive with left justication, the left edge of the master path is offset from the point list, creating a master path on the left side of the point list.
Direction of master path Y Left edge of master path is offset from point list.
0:0
September 2008
61
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Master Path with Positive Offset, Right Justication
When the offset is positive with right justication, the right edge of the master path is offset from the point list, creating a master path on the left side of the point list.
Direction of master path Y Right edge of master path is offset from point list.
0:0
When the offset is positive with center justication, the centerline of the master path is offset to the left of the point list, in relation to the direction of the point list.
0:0
September 2008
62
Virtuoso Relative Object Design User Guide Relative Object Design Concepts When you specify a negative value for offset, the system offsets the master path to the right of the point list, using the left edge, right edge, or centerline of the master path, as specied by the justication.
Master Path with Negative Offset and Center Justication
When the offset is negative with center justication, the centerline of the master path is offset to the right of the point list, in relation to the direction of the point list.
0:0
Offset Subpaths
You can create an offset subpath that is coincident with an edge of the master path, on the left or right side of the master path, or overlapping the master path. You can specify the width of an offset subpath or let it default to the minWidth rule for the subpath layer from the technology le. Offset subpaths inherit the same type of end as specied for the master path. You determine where to create an offset subpath in relation to the master path by specifying the separation and justification . Both separation and justication are relative to the direction of the master path. The direction of the master path is determined by the sequence in which you specify its points.
I
Separation species the distance between the offset subpath and the master path.
September 2008
63
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
I
left separates the right edge of the subpath from the left edge of the master path. right separates the left edge of the subpath from the right edge of the master path. center separates the centerline of the subpath from the centerline of the master path. center justication for subpaths follows the same rules as center justication for offset master paths.
Specifying Separation and Justication The location of an offset subpath in relation to the master path depends on the values of separation and justication, in relation to the direction of the master path. To create a subpath
I
With its centerline on the master path centerline, specify center justication with zero separation Coincident with the left or right edge of the master path, specify left or right justication, respectively, and let separation default to zero With its centerline separated from the master path centerline, specify center justication with a positive or negative separation To the left or right of the master path, specify left or right justication, respectively, with a positive separation Overlapping the left or right edge of the master path, specify left or right justication, respectively, with a small negative separation
For a summary of how to specify separation and justication for offset subpaths, see Table 1-3 on page 64. Table 1-3 Position of Offset Subpath in Relation to Master Path Separation Zero Center Justication Subpath centerline on master path centerline Subpath centerline on left side of master path centerline
64
Left Justication Left edge of master path coincident with right edge of subpath Left edge of master path on right side of right edge of subpath
Right Justication Right edge of master path coincident with left edge of subpath Right edge of master path on left side of left edge of subpath
Product Version 6.1.3
Positive number
September 2008
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Table 1-3 Position of Offset Subpath in Relation to Master Path, continued Separation Negative number Center Justication Left Justication Right Justication Right edge of master path on right side of left edge of subpath
Subpath centerline Left edge of master on right side master path on left side of path centerline right edge of subpath
Examples of Offset Subpaths The following examples show offset subpaths in relation to a master path.
September 2008
65
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Zero Separation for Offset Subpaths
When the separation value is zero (0), the offset subpath centerline is on the master path centerline, or the subpath is coincident with an edge of the master path, depending on the justication, as shown below:
Y Center justication Master path
Subpath 0:0 X
Subpath X
When the separation value is positive, the offset subpath is on the left or right side of the master path, depending on the justication. For example, both Subpath A and Subpath B have positive separations.
I
Subpath A has left justication, so the left edge the master path is separated from the right edge of Subpath A.
66 Product Version 6.1.3
September 2008
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
I
Subpath B has right justication, so the right edge of the master path is separated from the left edge of Subpath B.
Y Left justication
Master path
Right justication
Subpath A
Subpath B
0:0
September 2008
67
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The following example shows a small, positive separation value with center justication, creating a subpath that overlaps the left edge of the master path. The subpath centerline is offset from the master path centerline.
Subpath has a small positive separation with center justication.
0:0
When the separation value is negative, the offset subpath either overlaps the master path or is created on the side of the master path opposite the side specied by justication, relative to the direction of the master path.
September 2008
68
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The examples below show both small and large negative separation values with left justication. The left edge of the master path is separated from the right edge of the offset subpath.
Offset subpaths have a negative separation with left justication. Left justication Master path Master path Subpath
September 2008
69
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The examples below show both small and large negative separation values with right justication. The right edge of the master path is separated from the left edge of the offset subpath.
Offset subpaths have a negative separation with right justication.
September 2008
70
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The following example shows a small, negative separation with center justication, creating an offset subpath overlapping the right side of the master path. The subpath centerline is offset from the master path centerline.
Subpath has a small negative separation with center justication. Center justication Y Master path Subpath
0:0
Enclosure Subpaths
You create an enclosure subpath with its centerline on the centerline of the master path and its width calculated using the width of the master path plus a positive or negative enclosure value. The enclosure determines by how much the subpath is enclosed by the master path or by how much the master path is enclosed by the subpath. You can specify the enclosure for the subpath or let it default to the minEnclosure rule from the technology le for the master path layer to the subpath layer. minEnclosure denes the minimum enclosure for the master path layer in relation to the subpath layer. Enclosure subpaths inherit the same type of ends as specied for the master path. To dene enclosure for the ends of the subpath, you can specify offsets or let the system default to the value of the n_enclosure argument.
September 2008
71
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Examples of Enclosure Subpaths To calculate the width of an enclosure subpath, the system subtracts two times the enclosure value from the width of the master path: Width of Enclosure Subpath = Width of Master Path - (2 * Enclosure Value) Therefore, a positive enclosure value creates a subpath that is narrower than the master path, and a negative enclosure value creates a subpath that is wider than the master path. The centerlines are always coincident. The following examples show enclosure subpaths with positive and negative enclosure values.
Subpath width from positive enclosure value Master path Subpath Subpath width from negative enclosure value Subpath Master path
0:0
0:0
The following example shows a master path with a width of 1.0 and an enclosure subpath with the enclosure value of a positive 0.2. Both ends of the subpath are offset by a negative 0.4.
September 2008
72
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Therefore, the master path encloses the subpath by 0.2 on each side, making the width of subpath 0.6. The end of the master path encloses the subpath by a negative 0.4.
Master path
Enclosure = +0.2
Sets of Subrectangles
You can create a set of subrectangles in relation to the centerline of any master path. The set can contain one or more subrectangles. You can specify the width and length of the subrectangles or let them default to the minWidth rule for the subrectangle layer from the technology le. You can offset the centerline of the subrectangles from the master path centerline, and you can offset the edge of the rst and last subrectangles from the ends of the master path. You can also specify the offset of the rst and last subrectangle in a segment. The system places subrectangles on grid. You can create connectivity for a set of subrectangles. When you specify that a set of subrectangles is a pin, each rectangle in the set becomes a pin. In the layout editor, a set of subrectangles is treated as a single shape. You cannot edit or select individual subrectangles. Although a set of subrectangles is treated as a single shape, you can get a list of the database IDs for the individual subrectangles in the set by using the ROD object ID for the multipart path with the database access operator (~>) and the attribute name subShapes. If you use the database ID to change connectivity information (such as terminal name) for one or more individual subrectangles, your change is applied to the individual subrectangles immediately, and propagated to all of the subrectangles in the set of subrectangles when the MPP is
September 2008
73
Virtuoso Relative Object Design User Guide Relative Object Design Concepts modied in any way (such as moved). For more information, see Accessing ROD Object Attributes on page 118. Note: The system creates subrectangles only for orthogonal path segments (segments parallel or perpendicular to an axis). The system does not create or regenerate subrectangles in nonorthogonal segments. Specifying Separation and Justication The location of a set of subrectangles in relation to the master path depends on the values of separation and justication, in relation to the direction of the master path, just as it does for offset subpaths. The system places subrectangles on grid, as close to the specied separation as possible. To create a set of subrectangles
I
With the center of the width of the subrectangles on the master path centerline, specify center justication with zero separation Coincident with the left or right edge of the master path, specify left or right justication, respectively, and let separation default to zero With the center of the width of the subrectangles separated from the master path centerline, specify center justication with a positive or negative separation To the left or right of the master path, specify left or right justication, respectively, with a positive separation Overlapping the left or right edge of the master path, specify left or right justication, respectively, with a negative separation
For a summary of how to specify separation and justication for sets of subrectangles, see Table 1-4 on page 74. Table 1-4 Position of Subrectangles in Relation to Master Path Separation Zero Center Justication Center of width of subrectangles on master path centerline Center of width of subrectangles on left side of master path centerline Left Justication Left edge of master path coincident with right edge of subrectangles Left edge of master path on right side of right edge of subrectangles
74
Right Justication Right edge of master path coincident with left edge of subrectangles Right edge of master path on left side of left edge of subrectangles
Positive number
September 2008
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Table 1-4 Position of Subrectangles in Relation to Master Path Separation Negative number Center Justication Center of width of subrectangles on right side of master path centerline Left Justication Left edge of master path on left side of right edge of subrectangles Right Justication Right edge of master path on right side of left edge of subrectangles
When you specify connectivity for a set of subrectangles, the connectivity applies to all rectangles in the set. Similarly, when you specify that a set of subrectangles is a pin, all rectangles in the set become pins. For a detailed description of how the system creates subrectangles, see How the System Follows to Create Subrectangles on page 205. Examples of Sets of Subrectangles The following examples show sets of subrectangles in relation to a master path.
September 2008
75
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Zero Separation for a Set of Subrectangles
When the separation value is zero (0), the centerline of the subrectangles is on the master path centerline or the subrectangles are coincident with an edge of the master path, depending on the justication, as shown below:
Subrectangles
Subrectangles
0:0
0:0
When the separation value is positive, the subrectangles overlap the master path or are on the left or right side of the master path, depending on the size of the separation value and on the justication. For example, both Subrectangles A and Subrectangles B have positive separations.
September 2008
76
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
I
Subrectangles A has left justication, so the left edge of the master path is separated from the right edge of Subrectangles A. Subrectangles B has right justication, so the right edge of the master path is separated from the left edge of Subrectangles B.
Left justication
Master path
Right justication
Subrectangles A
Subrectangles B X
0:0
September 2008
77
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The following example shows subrectangles that overlap the left edge of the master path, created with a small, positive separation value and center justication. The subpath centerline is on the left side of the master path centerline.
Subrectangles have a small positive separation with center justication. Center justication Subrectangles Master path
0:0
When the separation value is negative, the set of subrectangles either overlaps the master path or is created on the side of the master path opposite the side specied by justication, relative to the direction of the master path.
September 2008
78
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The examples below show both small and large negative separation values with left justication. The left edge of the master path is separated from the right edge of the set of subrectangles.
Subrectangles have a negative separation with left justication.
Large negative separation from left edge of master path. Master path
Subrectangles
Master path
Subrectangles
Direction of paths
0:0
0:0
September 2008
79
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The following example shows subrectangles that overlap the right edge of the master path, created with a small, negative separation and center justication. The master path centerline is separated from the subrectangle centerline.
Subrectangles have a small negative separation with center justication. Master path
Subrectangles
0:0
September 2008
80
Virtuoso Relative Object Design User Guide Relative Object Design Concepts path, use the n_beginExt and n_endExt arguments, with the master path S_endType argument set to variable.
X
Starting end extension n_beginExt
All subparts inherit the end extensions of the master path. Offsetting the Ends of Subpaths and Subrectangles You can create a subpath or set of subrectangles that is longer or shorter than the master path. You do this by specifying the n_beginOffset and n_endOffset arguments to offset the ends of the subpath or subrectangle from the ends of the master path. With or without an offset, subpaths and subrectangles are generated starting at the rst edge of the master path. If you do not specify offsets, the system creates the ends as follows:
I
For offset subpaths and sets of subrectangles, the end offsets default to zero, so their ends are coincident with the ends of the master path. For enclosure subpaths
If you specify only n_beginOffset , n_endOffset defaults to n_beginOffset ; if you specify only n_endOffset , n_beginOffset defaults to n_endOffset . If you do not specify an offset but do specify an enclosure, the offsets default to the negative of the enclosure. If you specify neither an offset nor an enclosure, the system subtracts the value of the minEnclosure rule (from the technology le for master path layer to subpath layer) from the ends of the master path to calculate the offset for the ends of the
September 2008
81
Virtuoso Relative Object Design User Guide Relative Object Design Concepts enclosure subpath. If the minEnclosure rule is not dened in the technology le, the system reports an error. Examples of Ends of Subpaths and Subrectangles When offsets of the ends are positive, the subpath extends beyond the master path. When negative, the master path extends beyond the subpath.
Subpath
Subpath
Master path X
Master path X
0:0
0:0
In the following examples of sets of subrectangles, the rectangles are 1 unit wide and 2 units long, spaced 1 unit apart.
n_space argument = 1, so rectangles are 1 unit apart.
n_length argument = 2
n_width argument = 1
September 2008
82
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
Positive Offsets for Ends of Subrectangles
This example shows small positive offsets for the ends of a set of subrectangles.
Set of subrectangles extends 1 unit past master path end. Master path 0:0 X Direction of master path
This example shows larger positive offsets for the ends of a set of subrectangles.
Set of subrectangles extends 4 units past master path end. Master path 0:0 Direction of master path X
September 2008
83
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The following example shows positive offset values for the ends of a set of rectangles when the master path has extended ends.
Master path 0:0 Direction of master path X n_endOffset = +4, so set of subrectangles extends 4 units past master path ends.
This example shows negative offsets for the ends of a set of subrectangles.
There is not enough space for another rectangle with -1 end offset. Master path 0:0 Direction of master path X
September 2008
84
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
September 2008
85
Virtuoso Relative Object Design User Guide Relative Object Design Concepts For a detailed description of ROD objects and ROD object IDs, see About ROD Objects and ROD Object IDs on page 114.
Chopping a multipart path affects all choppable parts of the multipart path. Stretching a segment of a multipart path stretches the segment subpaths and, for orthogonal segments, regenerates subrectangles. The number of subrectangles in a subpath changes; the shape of the subrectangles does not change.
When you edit a multipart path that has subrectangles, the system regenerates all subrectangles that occur in orthogonal segments (segments parallel or perpendicular to an axis). The system does not generate or regenerate subrectangles in nonorthogonal segments. Chopping Multipart Paths You can dene one or more parts of a multipart path as choppable.
I
When you dene the master path as choppable, then all of its subpaths and subrectangles must be choppable also. When you dene the master path is not choppable, you can dene each subpath or set of subrectangles as choppable or not choppable.
86 Product Version 6.1.3
September 2008
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
I
If the master path is choppable, you can chop the whole multipart path into two or more separate multipart paths by chopping all the way through the master path at 90 degrees. If the master path is not choppable, you can chop all subparts that are specied as choppable by chopping all the way through the master path at 90 degrees. All choppable subparts are chopped where you chop over the master path.
Master path is not choppable, but subparts are choppable. Master path is choppable; therefore all subparts are choppable.
When you chop a choppable master path, the system assigns the name of the original multipart path to the rst new multipart path, where rst is relative to the direction of the master path. The system assigns unique names to the other new multipart paths, starting with path0, path1, and so on, as shown below.
pathA
path0
September 2008
87
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Note: If you want to chop and rotate an MPP, rotate the MPP rst, then chop it. Avoid rotating a chopped MPP as the chop holes might not rotate correctly. Chopping Multipart Paths That Have Alignments When you chop through the (choppable) master path of a multipart path, alignments to other objects are lost. The following example shows what happens to an aligned object after cutting away a section of a choppable master path named pathA.
Direction of master path
X X
rect1
When you use the cutter to chop out part of the master path like this,
X X
rect1
September 2008
88
Virtuoso Relative Object Design User Guide Relative Object Design Concepts the result is two new, shorter multipart paths, neither of which are aligned to rect1.
rect1
The system keeps the name pathA with the rst new multipart path and assigns a unique name in the format of pathn to the second new multipart path. For more information about how the layout editor Chop command affects multipart paths, see How Chopping Affects Multipart Paths in the Virtuoso Layout Suite L User Guide . Stretching Multipart Paths You can stretch the ends, segments, and/or corners of a multipart path in the same way you stretch single-part paths; however, the master path and its subparts stretch together. You cannot stretch the master path separately from its subparts, nor can you stretch subparts separately from the master path.
September 2008
89
Virtuoso Relative Object Design User Guide Relative Object Design Concepts In the example below, when you stretch the bottom segment downward, all parts of the multipart path stretch together. The system regenerates subrectangles to ll the orthogonal segments affected by the stretch.
Before stretching After stretching
You can select and stretch the chopped ends of subpaths. When the multipart path contains sets of subrectangles, the system regenerates subrectangles along orthogonal segments only. For more information about stretching multipart paths, see Stretching Multipart Paths in the Virtuoso Layout Suite L User Guide .
September 2008
90
Virtuoso Relative Object Design User Guide Relative Object Design Concepts uses a positive size to generate an new, larger rectangle, and a negative size to generate a new, smaller rectangle.
Size is positive
Size is negative
Generated rectangle
When the source is more than one object, you specify the difference between a bounding box around all of the objects and the size of the generated object. If you specify a negative size that is too small for generating a new object, the system reports an error. For example, when the source object is a path and you specify a negative size, its absolute value cannot be equal to or greater than half of the width of the source path. If the source path has a width of 4, you cannot generate a new path by specifying a size of -2. Applying -2 to the perimeter of the source path would produce a path with a width that is less than or equal to zero. Note: In the current release, no relationship exists between a generated object and its source object(s) after the generated object is created.
September 2008
91
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Creating a Rectangle from a Rectangle When the source object is a rectangle,
Source
0:0
and you specify the size as +3, the system generates a new, larger rectangle. When you specify the size as -3, the system generates a new, smaller rectangle.
Generated ROD rectangle Y Source Source Generated ROD rectangle
Size = +3 Y
Size is +3 X
Size is -3 0:0 X
0:0
September 2008
92
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Creating a Rectangle from a Polygon When the source object is a polygon,
Source ROD polygon Y
0:0
and you specify the size as +3, the system computes a bounding box around the polygon and generates a new rectangle that is larger than the bounding box. When you specify the size as -3, the system generates a new rectangle that is smaller than the bounding box.
Generated ROD rectangle Y Size is +3 Y Size is -3 Generated ROD rectangle
0:0
0:0
September 2008
93
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Creating a Rectangle from a Path When the source object is a path,
Source ROD path Y
0:0
and you specify the size as +3, the system computes a bounding box for the path and generates a new rectangle that is larger than the bounding box. When the size is -3, the system generates a rectangle that is smaller than the bounding box.
0:0
0:0
September 2008
94
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Creating a Rectangle from Multiple Objects When there are several source objects,
Source named objects Y
0:0
and you specify the size as +3, the system computes a bounding box around all of the objects and generates a new rectangle that is larger than the bounding box. When you specify the size as -3, the system generates a rectangle that is smaller than the bounding box.
Generated ROD rectangle Y Size = +3 Y Generated ROD rectangle Size = -3
0:0
0:0
September 2008
95
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Creating a Polygon from a Rectangle When the source object is a rectangle,
0:0
and you specify the size as +3, the system generates a new polygon that is larger than the bounding box. When you specify the size as -3, the system generates a new polygon that is smaller than the bounding box.
Generated ROD polygon Y Source Source Generated ROD polygon
Size = +3 Y
Size = +3 X
Size = -3 0:0 X
0:0
September 2008
96
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Creating a Polygon from a Polygon When the source object is a polygon,
0:0
and you specify the size as +2, the system generates a new, larger polygon. When you specify the size as -2, the system generates two new, smaller polygons that are not connected, because -2 is smaller than the narrowest part of the source polygon.
Size = -2
0:0
0:0
September 2008
97
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Creating a Polygon from a Path When the source object is a path,
Y Source ROD path
0:0
and you specify the size as +3, the system generates a new polygon that is larger than the path.
Y Size is +3.
0:0
September 2008
98
Virtuoso Relative Object Design User Guide Relative Object Design Concepts When you specify the size as -2, the system generates a new polygon that is smaller than the path.
Y Size is -2.
0:0
Creating a Polygon from Multiple Objects When there are several source objects,
Y
0:0
September 2008
99
Virtuoso Relative Object Design User Guide Relative Object Design Concepts and specify the size as +2, the system computes a bounding box around all of the objects and generates a new polygon that is larger than the bounding box. When you specify the size as -2, the system generates a new polygon that is smaller than the bounding box.
0:0
0:0
Computes the point list for the new path by applying the size as the distance between the centerline of the generated master path and
For a single source object, the perimeter of the source object. For multiple source objects, the bounding box around all of the source objects.
If you specify a negative size that is too small for generating a new path, the system reports an error. For example, when the source object is a path, the absolute value of a negative size cannot be greater than or equal to half of the width of the source path.
I
Starts the path at the point closest to the starting point of the source object. For rectangles, instances, and multiple source objects, the generated path always starts relative to the lower-left corner of the bounding box around the source object(s). Creates the direction of the new path as follows:
100 Product Version 6.1.3
September 2008
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
When the source object is a single rectangle, instance, or path, in a clockwise direction. When there are multiple source objects, in a clockwise direction. When the source object is a polygon, in the direction in which the polygon was created. For example, when the source polygon was created in a counter-clockwise direction, the system creates the path in a counter-clockwise direction.
Note: The system does not allow you to create self-intersecting master paths. If the master path you are creating would be self-intersecting, the path is not created, and a warning message is displayed in the CIW. The same is true for subpaths. The following sections show examples of creating paths from a variety of shapes. Creating a Path from a Rectangle When the source object is a rectangle,
Y
Source rectangle
0:0
September 2008
101
Virtuoso Relative Object Design User Guide Relative Object Design Concepts and you specify the size as +2, the system generates a new, larger path. When you specify the size as -2, the system generates a new, smaller path.
Generated path Y Size is +2. Y Size is -2. Generated path
Source rectangle
0:0
0:0
0:0
September 2008
102
Virtuoso Relative Object Design User Guide Relative Object Design Concepts and you specify the size as -1, the system generates a new path inside the perimeter of the polygon.
Y
0:0
Here is a close up of the bottom left side of the polygon and new path:
Generated path
Size is -1.
September 2008
103
Virtuoso Relative Object Design User Guide Relative Object Design Concepts When you specify a small enough size, in this case -5, the system generates a new path only inside the perimeter of the right side of this polygon.
Source ROD polygon Y Generated path
0:0
When you specify the size as +2, the system generates a new path outside the perimeter of the polygon.
Y Generated path
0:0
September 2008
104
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Here is a close up of the bottom right corner of the polygon and new path:
Source ROD polygon
Generated path
Size is +2.
Creating a Path from a Path When the source object is a path with a width of 3,
Source ROD path Y Width = 3
0:0
September 2008
105
Virtuoso Relative Object Design User Guide Relative Object Design Concepts and you specify the size as +4, the system generates a new path that is larger than the source path.
Y Generated path Size is +4.
0:0
Using the source path with a width of 3 from the previous example, the system would not create a path with a size of -1.5 because the absolute value of -1.5 is greater than or equal to half of the width of the source path. The system cannot create a path unless its width is greater than zero.
September 2008
106
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Here is an example of specifying a negative size to generate a new path from an existing path. When the source path has a width of 6,
Source ROD path Y Width = 6
0:0
and you specify the size as -2, the system generates a new path that is smaller than the source path.
Generated path Y
Size is -2.
0:0
September 2008
107
Virtuoso Relative Object Design User Guide Relative Object Design Concepts Creating a Path from Multiple Objects When you specify multiple source objects,
Y
0:0
the generated path forms a ring with the centerline of the master path offset from the bounding box by the size you specify. By default, the path has four segments. The new path is longer or shorter depending on whether you specify a positive or negative size.
Generated path
0:0
0:0
Connectivity
When you use a ROD function to create a shape, such as a rectangle or path, you can specify connectivity for the shape by associating it with a specic terminal and net. You can also make the shape into a pin.
September 2008
108
Virtuoso Relative Object Design User Guide Relative Object Design Concepts To specify connectivity for an object, you must use the ROD connectivity arguments . You can do this within a rodCreate function, such as rodCreateRect, by specifying values for the terminal name, terminal I/O type, and pin connectivity arguments. For a multipart path, you can create connectivity for any or all parts of the multipart path: the master path, subpaths and/or subrectangles. When you make the master path into a pin, the whole master path becomes a pin; when you make a subpath into a pin, the whole subpath becomes a pin; and when you make a set of subrectangles into a pin, each rectangle in the set becomes a pin. When you create a repeated object with connectivity, the connectivity applies to all objects in the repeat set. For a description of the connectivity arguments, see ROD Connectivity Arguments for Rectangles on page 229. To look at the connectivity for ROD objects, you can use the Edit Properties form. For information about this form, see Editing and Dening Properties in the Virtuoso Layout Suite L User Guide . Note: To see terminal names for pins in a layout window, the display setting for pin names must be turned on. For information about how to change the display of pin names, see Displaying Pin Names in a Layout Window on page 311.
September 2008
109
Virtuoso Relative Object Design User Guide Relative Object Design Concepts The following example shows the results of moving an object with the Maintain Connections option on, both when the object has an alignment and when it does not. In the example, there are two instances, each containing a pin, with a ROD (named) path connecting the pins.
Instances IA and IB before the move. Pins Y
When objects do not have ROD alignments and the Maintain Connections option is on, moving instance IB causes the ROD path connecting the two pins to stretch, as shown below.
No ROD alignments. Y Instance IB moved to the right
When objects do have a ROD alignment, and the Maintain Connections option is on, moving instance IB causes the whole ROD path to move, as shown below. The aligned path
September 2008
110
Virtuoso Relative Object Design User Guide Relative Object Design Concepts does not stretch, so moving instance IB breaks the electrical connection between the two pins.
Pin in instance IB is aligned to ROD path. Y Instance IB moved to the right
Instance IA 0:0
Instance IB X
September 2008
111
Virtuoso Relative Object Design User Guide Relative Object Design Concepts
September 2008
112
2
Accessing Information about ROD Objects
This chapter describes Virtuoso relative object design (ROD) objects, ROD object IDs, ROD object attributes, and how to access ROD object attributes. The topics covered are About ROD Objects and ROD Object IDs on page 114 Accessing ROD Object Attributes on page 118
September 2008
113
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects
September 2008
114
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects
For a named shape, or instance, type the rodGetObj function using as input either the database ID of the object or both the hierarchical name of the object and the top-level layout cellview ID:
rodId = rodGetObj( dbId )
or
rodId = rodGetObj( "hierarchical_name " cellview_ID )
where dbId is the database ID, hierarchical_name is the hierarchical name of the object, and cellview_ID is the cellview ID. When you want the cellview ID (the database ID for the cellview) for the current open cellview, you can use the deGetCellView function without any arguments. For example, you can get the names of all attributes for the named shape polyRect, where polyRect is in instance ptr1 and ptr1 is in instance INV1, by typing the following statements in the CIW:
cvId = deGetCellView() rodId = rodGetObj( "INV1/ptr1/polyRect" cvId )
where the statement cvId = deGetCellView() returns the cellview ID for the active cellview.
To get the ROD object ID for a cellview, use an empty string ("") for the hierarchical name:
rodId = rodGetObj( "" cvId )
2. Select one object in the layout cellview window. 3. Get the database ID of the selected object and set it equal to the variable dbId by typing in the CIW
dbId = car(geGetSelectedSet(cvId))
September 2008
115
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects where the SKILL list operator car returns the rst item in the list; in this case, the only item. 4. Get the ROD object ID of the selected object by typing in the CIW
rodId = rodGetObj(dbId)
Getting the ROD Object ID for Multiple Objects 1. Get the cellview ID for the active cellview window by typing in the CIW
cvId = deGetCellView()
2. Select two or more objects in the layout cellview window. 3. Set a variable equal to a list of the database IDs of the selected objects by typing in the CIW
dbIdList = geGetSelectedSet(cvId)
To get the ROD object ID for a specic object in the list, use the SKILL list operators, such as car and cdr.
For more information about the effect of Undo and Redo on ROD object IDs, see Appendix G, ROD object ID changes after Undo.
September 2008
116
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects
Test for equivalency with the internal name of the ROD object data type (rodObj) by typing
if( type( variable_name ) == rodObj then ... ) ; end if
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects Note: If you edit an object identied by variable_name and then undo the edit, the system no longer associates variable_name with the object. Therefore, further references to variable_name result in nil or rod:invalid. For more information see ROD object ID changes after Undo on page 344. Checking in a Program To verify whether an input parameter to a procedure you write contains a ROD object ID, you can test to see if the data type is R, the data type for ROD objects. The following sample procedure tests parameter_name to see if the data type is R:
procedure(printObjType( parameter_name "R" ) printf("ROD object type is: %L" parameter_name ~>dbId~>objType) ) ; end procedure
When the data type for parameter_name is R, the procedure prints the type of ROD object, such as inst, rect, polygon, or path, as shown below:
ROD object type is: "rect"
When the data type for parameter_name is not R, the procedure returns an error message similar to the following:
*Error* printObjType: argument #1 should be rodObj (type template = "R") db:21218404
For information about basic Cadence SKILL language functions, including list operators, refer to the SKILL Language Reference Manual .
The name of an attribute to get the value of that attribute One question mark (?) to get a list of the names of all attributes Two question marks (??) to get the names and values of all attributes
September 2008
118
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects The following table shows the information you can access with the ROD object ID and the database access operator (~>). Table 2-1 Using ~> to Access Information about ROD Objects Attribute, Handle, or ? ~>? ~>?? ~>align ~>chopHoles Value Returned List of names for all ROD object attributes. List of the names and values for all attributes. Alignment information for the ROD object. List of lists, where each list contains the coordinates of a chop hole in a MPP; nil where there are no chop holes in the MPP. ID of the top-level cellview containing the ROD object. Database ID of the ROD object at the lowest level. For multipart paths, dbId identies the master path. Hierarchical name for the ROD object. For shapes with segments (rectangles, polygons, and paths), the number of segments in the shape. For multipart paths, the ROD object ID identies the master path. Use ~>subShapes to list the database IDs for all subshapes (subpaths and subrectangles) associated with a multipart path. The list includes one database ID for each individual subrectangle. List of the names of all system-dened handles for the ROD object. Transform information for the ROD object, converted to the coordinate system of the top-most cellview. Transform information is a list of the rotation, magnication, and offset. List of the names of all user-dened handles for the ROD object. Value of the specied handle.
~>systemHandleNames ~>transform
For information about how to get the ROD object ID, see Getting the ROD Object ID on page 114.
September 2008
119
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects Note: When you use the ROD object ID to access a point handle for a named object, the system automatically transforms (converts) the coordinates of the point up through the hierarchy into the coordinate system of the top-most cellview containing the object. The values of system-dened handles are calculated on demand, when you reference them.
Instance I1
rect0 polyRect
0:0
September 2008
120
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects
((rodObj:2585108 "cR" rodObj:2585114 "cL" -10.0 0.0 ) )
The text above means the centerRight (cR) handle on I1/I2/polyRect (rodObj:2585108) is aligned to the centerLeft (cL) handle on rect0 (rodObj:2585114), with a separation of -10.0 along the X axis and no separation along the Y axis. Example 2: Attribute Names To display all attribute names for a ROD object, get its ROD object ID and type in the CIW:
rodId~>?
where the variable rodId contains the ROD object ID. The system displays a list of attribute names similar to the following list:
(name cvId dbId transform align numSegments userHandleNames systemHandleNames )
Note: The attribute numSegments appears in the list only for shapes with segments: rectangles, polygons, and paths. Example 3: Attribute Names and Values To display all attribute names and values for any ROD object (a named shape, instance, or cellview), get its ROD object ID and type in the CIW:
rodId~>??
where the variable rodId contains the ROD object ID. If you do not want to use variables and the object is in the current open cellview, the following statement gets the same result:
rodGetObj( "hierarchical_name " deGetCellView() )~>??
Example 4: Value of One Attribute To get the value for a particular attribute, use the attribute name instead of a question mark:
rodId~>attribute_name
For example, to display the value of the system-dened handle for the point in the center of the bounding box around a ROD object, type
rodId~>centerCenter
September 2008
121
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects Example 5: Names of User-Dened Handles To display the names of all user-dened handles for an object, type in the CIW:
rodGetObj( "hierarchical_name " cellview_ID )~>userHandleNames
For example, assume the following four-segment, single-layer path named path2 is in the active cellview window, and that it has several user-dened handles.
Y
X
segment 0
Starting point
segment 1
path2
segment 2 segment 3
X 0:0
You can use the deGetCellView function (without any arguments) to get the database ID for the current open cellview. For this example, you would type:
cvId = deGetCellView() userHandNames = rodGetObj( "path2" cvId )~>userHandleNames
September 2008
122
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects Example 6: Names of System-Dened Handles To display the names of all system-dened handles for an object, type in the CIW:
rodGetObj( "hierarchical_name " cellview_ID )~>systemHandleNames
For more information about using rodGetObj, see rodGetObj on page 269. For example, assume the following two-segment, single-layer path named path1 is in the active cellview window.
Y
X
segment 0
Starting point
path1
segment 1 X 0:0
You can use the deGetCellView function (without any arguments) to get the database ID for the current open cellview. For this example, you would type:
cvId = deGetCellView() sysHandNames = rodGetObj( "path1" cvId )~>systemHandleNames
The system displays the following information for path1 in the CIW:
("width" "length" "lowerLeft" "lowerCenter" "lowerRight" "centerLeft" "centerCenter" "centerRight" "upperLeft" "upperCenter" "upperRight" "length0" "start0" "startCenter0" "startLeft0" "startRight0" "mid0" "midLeft0" "midRight0" "end0" "endLeft0" "endRight0""length1" "start1" "startLeft1" startRight1" "mid1" "midLeft1""midRight1" "end1" "endLeft1" "endRight1" "lengthLast" "startLast""startLeftLast" "startRightLast" "midLast" "midLeftLast" "midRightLast" "endLast" "endCenterLast" "endLeftLast" "endRightLast" "mmpBBox" "chopHoles" )
Example 7: Names and Values of Attributes To display the names and values for all attributes of an object, type in the CIW:
rodGetObj( "hierarchical_name " cellview_ID )~>??
September 2008
123
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects Using the same example, assume the following four-segment, single-layer path named path2 is in the active cellview window.
Y
X
segment 0
Starting point
segment 1
path2
segment 2 segment 3
X 0:0
You can use the deGetCellView function (without any arguments) to get the database ID for the current open cellview. For this example, you would type:
cvId = deGetCellView() rodGetObj( "path2" cvId )~>??
The system displays information in the CIW that looks like this:
("rodObj:17653796" name "path2" cvId db:16324652 dbId db:16325104 transform ((0.0 0.0) "R0" 1.0) align nil numSegments 4 userHandleNames ("stringHandle" "intHandle" "floatHandle" "trueHandle" "falseHandle" "ILExprHandle" "pointHandle" ) systemHandleNames ("width" "length" "lowerLeft" "lowerCenter" "lowerRight" "centerLeft" "centerCenter" "centerRight" "upperLeft" "upperCenter" "upperRight" "length0" "start0" "startCenter0" "startLeft0" "startRight0" "mid0" "midLeft0" "midRight0" "end0" "endLeft0" "endRight0" "length1" "start1" "startLeft1" "startRight1" "mid1" "midLeft1" "midRight1" "end1" "endLeft1" "endRight1" "length2" "start2" "startLeft2" "startRight2" "mid2" "midLeft2" "midRight2" "end2" "endLeft2" "endRight2" "length3" "start3" "startLeft3" "startRight3" "mid3" "midLeft3" "midRight3" "end3"
September 2008 124 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects
"endLeft3" "endRight3" "lengthLast" "startLast" "startLeftLast" "startRightLast" "midLast" "midLeftLast" "midRightLast" "endLast" "endCenterLast" "endLeftLast" "endRightLast" "mppBBox" ) )
segment 0 path1
segment 1 X 0:0
September 2008
125
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects Solution 2-4 Getting Values of System-Dened Handles for a Path First, you need to load the rodPrintSystemHandleValues procedure into your system. You can access the rodPrintSystemHandleValues.il le from the samples/ROD/ skill directory in your Cadence hierarchy or create the procedure yourself and load your le. 1. Access the rodPrintSystemHandleValues procedure in one of the following ways:
To create the procedure yourself, use a text editor to open a new le named rodPrintSystemHandleValues.il and type or copy the following statements:
; rodPrintSystemHandleValues.il procedure( rodPrintSystemHandleValues(rodObj) prog(( handleValue handleList) handleList = rodObj~>systemHandleNames if(handleList then printf( "System handle names and values for %L (%L):\n" rodObj~>name rodObj ) ; end of printf foreach( handle handleList handleValue = rodGetHandle(rodObj handle) printf("%L %L\n" handle handleValue) ) ; end of foreach else printf("%L has no system-defined handles.\n" rodObj ) ; end of printf ) ; end of if ) ; end of prog t ; procedure always returns t ) ; end of procedure
To load the rodPrintSystemHandleValues.il le you created, type the following in the CIW:
load "your_path /rodPrintSystemHandleValues.il"
The rodPrintSystemHandleValues procedure requires the ROD object ID as input, so next you get the ROD object ID. 2. Get the ROD object ID for a selected object in the active cellview window by typing the following statements in the CIW:
cv = deGetCellView() rodId = rodGetObj( "hierarchical_object_name " cv )
September 2008
126
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects where the rst statement gets the cellview ID for the active cellview and hierarchical_object_name is the name of your selected ROD object. For example:
rodId = rodGetObj( "path1" cv )
3. Run your rodPrintSystemHandleValues procedure by typing the following statement in the CIW:
rodPrintSystemHandleValues(rodId)
In the CIW, the system displays a list of all handle names and their values. For example, for path1, the system displays the following information in the CIW:
rodPrintSystemHandleValues(rodId) System handle names and values for "path1" (rodObj:29057048) "width" 21.0 "length" 11.0 "lowerLeft" (2.7 1.4) "lowerCenter" (13.2 1.4) "lowerRight" (23.7 1.4) "centerLeft" (2.7 6.9) "centerCenter" (13.2 6.9) "centerRight" (23.7 6.9) "upperLeft" (2.7 12.4) "upperCenter" (13.2 12.4) "upperRight" (23.7 12.4) "length0" (20.0) "start0" (2.7 2.4) "startCenter0" (2.7 2.4) "startLeft0" (2.7 3.4) "startRight0" (2.7 1.4) "mid0" (12.7 2.4) "midLeft0" (12.2 3.4) "midRight0" (13.2 1.4) "end0" (22.7 2.4) "endLeft0" (21.7 3.4) "endRight0" (23.7 1.4) "length1" 10.0 "start1" (22.7 2.4) "startLeft1" (21.7 3.4) "startRight1" (23.7 1.4) "mid1" (22.7 7.4) "midLeft1" (21.7 7.9) "midRight1" (23.7 6.9) "end1" (22.7 12.4) "endLeft1" (21.7 12.4) "endRight1" (23.7 12.4) "lengthLast" 10.0 "startLast" (22.7 2.4) "startLeftLast" (21.7 3.4) "startRightLast" (23.7 1.4) "midLast" (22.7 7.4) "midLeftLast" (21.7 7.9) "midRightLast" (23.7 6.9) "endLast" (22.7 12.4) "endCenterLast" (22.7 12.4) "endLeftLast" (21.7 12.4) "endRightLast" (23.7 12.4)
September 2008 127 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects
"mppBBox" (((2.7 1.4) (23.7 12.4))) t
X
segment 0
Starting point
segment 1
path2
segment 2 segment 3
X 0:0
September 2008
128
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects Solution 2-5 Getting Values of User-Dened Handles for a Path 1. Access and load the rodPrintUserHandleValues procedure in one of the following ways:
To create the procedure yourself, use a text editor to open a new le named rodPrintUserHandleValues.il and type or copy the following statements:
; rodPrintUserHandleValues.il procedure( rodPrintUserHandleValues(rodObj) prog((handle handleValue handleList) handleList = rodObj~>userHandleNames if(handleList then printf( "User handle names and values for %L (%L):\n" rodObj~>name rodObj ) ; end printf foreach(handle handleList handleValue = rodGetHandle(rodObj handle) printf("%L %L\n" handle handleValue) ) ; end foreach else printf("%L has no user-defined handles.\n" rodObj) ) ; end if ) ; end of prog t ; procedure always returns t ) ; end of procedure
To load the rodPrintUserHandleValues procedure you created, type the following statements in the CIW:
load "your_path /rodPrintUserHandleValues.il"
The rodPrintUserHandleValues procedure requires the ROD object ID as input, so next you get the ROD object ID. 2. Get the ROD object ID for a selected object in the active cellview window by typing the following statements in the CIW:
cv = deGetCellView() rodId = rodGetObj( "hierarchical_object_name " cv )
where the rst statement gets the cellview ID for the active cellview and hierarchical_object_name is the name of your selected ROD object. For example:
rodId = rodGetObj( "path2" cv )
September 2008
129
Virtuoso Relative Object Design User Guide Accessing Information about ROD Objects 3. Run your rodPrintUserHandleValues procedure by typing the following statements in the CIW:
rodPrintUserHandleValues(rodId)
In the CIW, the system displays a list of all user-dened handle names and their values. For example, for path2, the system displays the following information in the CIW:
rodPrintUserHandleValues(rodId) User handle names and values for "path2" (rodObj:29057048) "stringHandle" "aaa" "intHandle" 311 "floatHandle" 3.3 "trueHandle" t "falseHandle" nil "ILExprHandle" 1.8 "pointHandle" (6.6 7.7) t
September 2008
130
3
Using Relative Object Design Functions
This chapter contains information you need to know before using the Virtuoso relative object design (ROD) functions and describes the ROD functions and how to use them. The functions are listed in alphabetical order. Editing ROD Objects with the Virtuoso Layout Editor on page 132 Data Types for SKILL Function Arguments on page 133 Using Variables in ROD Functions on page 134 Maximum String Length for ROD Function Arguments on page 135 Using Special Characters in Names on page 136 rodAddMPPChopHole on page 137 rodAddPoints on page 140 rodAddToX on page 141 rodAddToY on page 142 rodAlign on page 143 rodAssignHandleToParameter on page 154 rodCheck on page 175 rodCreateHandle on page 176 rodCreatePath on page 180 rodCreatePolygon on page 212 rodCreateRect on page 218
September 2008
131
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions rodDeleteHandle on page 259 rodFillBBoxWithRects on page 260 rodGetHandle on page 267 rodGetNamedShapes on page 268 rodGetObj on page 269 rodIsFigNameUnused on page 275 rodIsHandle on page 277 rodIsObj on page 278 rodNameShape on page 280 rodPointX on page 284 rodPointY on page 285 rodSubPoints on page 286 rodUnAlign on page 287 rodUnNameShape on page 289 Solutions to Problems on page 290
September 2008
132
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
gdmspecListIlUserType gdm spec list defstruct rodObj symbol defstruct relative object design (ROD) object symbol
September 2008
133
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Data Types by Type, continued Prex Internal Name S t u U v w x y & stringSymbol string function funobj hdbpath wtype integer binary pointer Data Type symbol or character string character string (text) function object, either the name of a function (symbol) or a lambda function body (list) function object window type integer number binary function pointer type
Data Type g for General The data type for ROD function arguments that require a Boolean value is specied as g. However, the ROD function veries that the value is t or nil; for Boolean ROD arguments, values other than t or nil are not valid. Data Type S and Symbols You can specify arguments with the data type S as either a character string or symbol. For a character string, enclose the characters in quotation marks (""). For a symbol, precede the characters by a single quotation mark ('). On the keyboard, the single quotation mark is usually located below the double quotation mark. ROD converts symbols to character strings. The S_name argument must contain at least one character. For example, to indicate that the characters poly1 are a string, you can type either of the following: "poly1" or 'poly1 For more information, see Data Types in the SKILL Language User Guide .
pcCellView
134 Product Version 6.1.3
September 2008
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions An internal variable automatically created by the pcDefinePCell function. pcCellView contains the database ID of the cellview you are creating. Within the body of your pcell code, use the pcCellView variable as the cellview identier for which you create objects. For an example, see Solution 3-4 Aligning Objects at Different Levels in the Hierarchy on page 291. In SKILL expressions (ILExpr) for ROD arguments, use the rodCellView variable rather than pcCellView.
I
tcCellView An internal variable automatically created by the tcCreateCDSDeviceClass function. tcCellView contains the database ID of the cellview you are creating. Within the body of your pcell code, use the tcCellView variable as the cellview identier for which you create objects. In SKILL expressions (ILExpr) for ROD arguments, use the rodCellView variable rather than pcCellView.
rodCellView When used in a SKILL expression (ILExpr) for a ROD argument, such as when specifying the n_xSep and n_ySep arguments for rodCreatePath, rodCellView contains the database ID of the current cellview. Using rodCellView allows you to reference rules in your technology le so that your code will work in different technologies. For example, you can create alignments at the zero-level in your hierarchy, and the system automatically updates the alignments when you make changes to technology le rules that affect them. You can use rodCellView inside or outside of pcells.
Paths, rectangles, or polygons when you create them Objects using the rodNameShape function User-dened handles
If you specify a name using a symbol, use no more than 255 characters in the symbol name. Any symbol name longer than 255 characters results in an error.
September 2008
135
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
September 2008
136
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodAddMPPChopHole
rodAddMPPChopHole( R_rodObj l_pts ) ; end of rodAddMPPChopHole => t | nil
Description
Adds a chop hole to all choppable parts of a ROD multipart path. To dene a chop hole, you specify a list of points on the centerline of the master path. The results depend on whether the master path is choppable or not.
Master path is not choppable, but subparts are choppable. Master path is choppable; therefore all subparts are choppable.
September 2008
137
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions To add a chop hole to a segment of a multipart path, you must specify two points on the same segment. If you specify only one point on a segment, the system ignores the point.
Specify two points on a segment Y To get this result: Y
X 0:0
X X 0:0 X
To add a chop hole that includes a vertex (the intersection of two segments), you must include the vertex point in your list.
Specify points including the vertex Y To get this result: Y
For more information about how chop holes affect multipart paths, see Creating Paths with rodCreatePath on page 210.
September 2008
138
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Arguments
R_rodObj ROD object ID associated with the multipart path. Default: none List of two or more points on the centerline of the master path specifying where to create a chop hole. The chop hole affects choppable parts only. You are required to specify at least two points. The system discards duplicate and collinear points but does not consider them an error. Use one of the following formats: list( x :y x :y ... ) or list( list(x y ) list(x y ) ... ) Default: none
l_pts
Value Returned
t nil The multipart path was chopped successfully. An error occurred and the multipart path was not chopped.
September 2008
139
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodAddPoints
rodAddPoints( l_point1 l_point2 ) ;end rodAddPoints => l_point | nil
Description
Adds two points together and returns the resulting point as l_point .
Arguments
l_point1 A set of coordinates in one of the following formats: x :y or list(x y ) Default: none A set of points in one of the following formats: x :y or list(x y ) Default: none
l_point2
Value Returned
l_point nil The point that results from adding l_point1 and l_point2 . No points were added due to an error.
September 2008
140
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodAddToX
rodAddToX( l_point n_num ) ;end rodAddToX => l_point | nil
Description
Adds a number to the X coordinate of l_point and returns the resulting point as l_point .
Arguments
l_point A set of coordinates in one of the following formats: x :y or list(x y ) Default: none Signed integer or oating-point number. Default: none
n_num
Value Returned
l_point The point resulting from adding n_num to the X coordinate of l_point . No number was added due to an error.
nil
September 2008
141
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodAddToY
rodAddToY( l_point n_num ) ;end rodAddToY => l_point | nil
Description
Adds a number to the Y coordinate of l_point and returns the resulting point as l_point .
Arguments
l_point A set of coordinates in one of the following formats: x :y or list(x y ) Default: none Signed integer or oating-point number. Default: none
n_num
Value Returned
l_point The point resulting from adding n_num to the Y coordinate of l_point . No number was added due to an error.
nil
September 2008
142
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodAlign
rodAlign( ?alignObj [?alignHandle [?refObj [?refHandle [?refPoint [?maintain [?xSep [?ySep ) ; end rodAlign => R_rodObj | nil R_alignObj S_alignHandle ] R_refObj ] S_refHandle ] l_refPoint ] g_maintain ] txf_xSep ] txf_ySep ]
Description
Aligns a named object by a point handle on that object to a specic point or to a point handle on a reference object. You can align objects that are at different levels of hierarchy as long as both objects are in the same top-level layout cellview. You can specify positive or negative separation between alignment points in the direction of both the X and Y axes, either as absolute distances or with Cadence SKILL language expressions. The system applies the offset from the reference point or reference object to the object to be aligned. When you align an object to a point, the system creates a user-dened handle for the point with the system-assigned name handlen , where n is a number that makes the handle name unique in the cellview. For information about user-dened handle, see User-Dened Handles on page 35. You can also use the rodAlign function to quickly arrange objects in relation to each other by temporarily aligning them. When the g_maintain argument is set to nil, alignments are no longer maintained after the function is executed. For an overview about aligning objects, see Aligning Objects on page 36. The following examples illustrate aligning ROD objects. Figure 3-1 on page 144 shows the object polyRect before and after it is aligned to the reference point 0:0.
September 2008
143
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Figure 3-1 Aligning a Rectangle to a Point
Before alignment Y Y Reference point is 0:0. polyRect After alignment
polyRect X X
0:0
0:0
Figure 3-2 on page 144 shows the objects polyRect and rect0 both before and after polyRect is aligned to rect0. After alignment, the centerLeft handle of polyRect is aligned to the centerRight handle of rect0, with a positive separation along the X axis. The object polyRect is on the right side of rect0 because the system applies the offset from the reference object rect0 to the aligned object polyRect. Figure 3-2 Aligning Two Rectangles with Positive Separation
Y Before alignment Y After alignment Positive offset from reference object polyRect polyRect
rect0
rect0
Reference object X
Figure 3-3 on page 145 shows instance I1 and the rectangle rect0. Instance I1 contains instance I2, which contains the object polyRect.
September 2008
144
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Figure 3-3 Aligning an Instance and Rectangle Across Hierarchy
Before alignment Y Instance I1
Instance I2
rect0
0:0
The hierarchical name for polyRect is I1/I2/polyRect. Figure 3-4 on page 146 shows instance I1 and rect0 after alignment across hierarchy. rect0 is the reference object. The centerRight handle of I1/I2/polyRect is aligned to the centerLeft handle of rect0, with a -10 separation in the direction of the X axis. Because the offset is negative along the X axis, the aligned object I1/I2/polyRect is on the left side of the reference object rect0. Subsequently, if you move rect0, instance I1 and everything in it moves with rect0, maintaining the correct alignment; also, if you move instance I1, rect0 moves with it.
September 2008
145
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Figure 3-4 Instance and Rectangle After Alignment
Negative offset from reference object.
Instance I1 Y
Instance I2
Reference object
rect0 polyRect
Note: For information about how the Virtuoso layout editor Maintain Connections option works for aligned objects, see Maintaining Connections for ROD Objects on page 109. Querying an Object for Alignments You can query any named object to see what the object is aligned to. When you query a hierarchical object, the system displays all top-level alignments for the object. To see the alignments for an object, you can use the Virtuoso layout editor Edit Properties command (the ROD section) or type commands in the CIW, as shown in the examples below. As shown in the example, I1/I2/polyRect is aligned to rect0. To query rect0 in Figure 3-4 on page 146 for alignments, type the following in the CIW:
cvId = deGetCellView() rodGetObj( "rect0" cvId )~>align
September 2008
146
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions The text above states that the centerRight (cR) handle on I1/I2/polyRect (rodObj:2585108) is aligned to the centerLeft (cL) handle on rect0 (rodObj:2585114), with a separation of -10.0 along the X axis and no separation along the Y axis. Moving Aligned Objects When you move a ROD object that is aligned to one or more ROD objects, the aligned objects move also. When you move a ROD object that is aligned to a reference point, the system changes the value of the reference point handle to keep the point in the same relationship with the object.
Arguments
R_alignObj ROD object ID associated with the object you want to align. Use with S_alignHandle to specify a point on R_alignObj to use for alignment. The object you want to align must exist in the same top-level cellview as the reference object or reference point. Default: none Character string or symbol specifying the name of the handle to use as the alignment point on R_alignObj . Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. Default: centerCenter ROD object ID associated with the object to be used as a reference for the alignment. The reference object must exist in the same top-level cellview as the object specied by R_alignObj . If you do not specify l_refPoint , this argument is required. If you also specify l_refPoint , the value of l_refPoint overrides the values of R_refObj and S_refHandle . Default: none Character string or symbol specifying the name of the handle on the reference object to which you want to align R_alignObj . If you also specify l_refPoint , it overrides the value of R_refObj and S_refHandle . Default: centerCenter
S_alignHandle
R_refObj
S_refHandle
September 2008
147
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions l_refPoint A list of two coordinates specifying the point to which you want to align R_alignObj . Use one of the following formats: x :y or list( x y ) If you do not specify S_refHandle , R_refObj , or l_refPoint , then l_refPoint defaults to 0:0. If you specify l_refPoint and also specify R_refObj (with or without specifying S_refHandle ), the value of l_refPoint overrides the values of R_refObj and S_refHandle . Default: 0:0 A Boolean value specifying whether or not to maintain an alignment after it is created. The value must be t or nil. When set to t, moving one of two aligned objects moves the other with it. When set to nil, moving one of two aligned objects does not move the other object. You can use the nil setting to create temporary alignments for the purpose of arranging objects in relation to each other. These alignments are no longer in effect after the rodAlign function completes execution. Default: t txf_xSep An integer, oating-point number, or Cadence SKILL language expression specifying the vector distance in the direction of the X axis from either the reference point handle S_refHandle on R_refObj or the reference point l_refPoint to the alignment point handle S_alignHandle on R_alignObj . The value can be positive or negative or a SKILL expression that evaluates to a positive or negative number. SKILL expressions are reevaluated whenever the design is opened, the technology le is updated, or one of the aligned objects is moved or modied. Default: 0 An integer, oating-point number, or Cadence SKILL language expression specifying the distance along the Y axis from either the reference point handle S_refHandle on R_refObj or the reference point l_refPoint to the alignment point handle S_alignHandle on R_alignObj . The value can be positive or negative or a Cadence SKILL language expression that
g_maintain
txf_ySep
September 2008
148
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions evaluates to a positive or negative number. SKILL expressions are reevaluated whenever the design is opened, the technology le is updated, or one of the aligned objects is moved or modied. Default: 0
Value Returned
R_rodObj ROD object ID for the ROD object information associated with R_alignObj . An error occurred and no objects were aligned.
nil
Problem 3-1 Aligning an Object to a Point on page 150 Problem 3-2 Aligning Two Rectangles at the Same Level of Hierarchy on page 151 Problem 3-3 Moving an Object with rodAlign on page 151 Problem 3-4 Aligning Objects at Different Levels in the Hierarchy on page 152
For an example showing a guard ring created using rodAlign, see Code Examples on page 321.
September 2008
149
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Problem 3-1 Aligning an Object to a Point Inside of a pcell, align the lower left corner of the object named Boundary to the reference point 15:10.
Before alignment Y Y Boundary After alignment
Boundary
X X
15:10
15:10
X 0:0 0:0
September 2008
150
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Problem 3-2 Aligning Two Rectangles at the Same Level of Hierarchy Align the center of the rectangle named polyRect to the center of the rectangle named activeRect so that their centers are coincident. The two rectangles are at the same level in the design hierarchy.
Before alignment Y polyRect Y After alignment
polyRect
X
activeRect X 0:0 0:0
X
activeRect X
Solution 3-2 Aligning Two Rectangles at the Same Level of Hierarchy on page 291. Problem 3-3 Moving an Object with rodAlign Use the rodAlign function to move the object named boundary so that its lowerCenter handle has a positive offset along the Y axis from the upperLeft handle of the reference
September 2008
151
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions object activeRect. Specify the arguments so that no alignment persists after the rodAlign function completes.
Before alignment Y Y After alignment
X
boundary boundary
activeRect X
Solution 3-3 Moving an Object with rodAlign on page 291. Problem 3-4 Aligning Objects at Different Levels in the Hierarchy In a pcell, there are two objects named rect0 on the metal1 layer in different instances. Align the centerRight point handle on rect0 in the instance nTran1 to the centerLeft point handle of the reference object rect0 in the instance nTran2. Specify a negative separation along the X axis between the point handles as the minimum spacing rule from the technology le for the metal1 layer. Because this rodAlign statement occurs within a pcell, you can use the pcell variable pcCellView for the cellview ID.
September 2008
152
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions To access the technology le, use the techGetTechFile function to get the technology le ID and set it equal to the variable tfId. The techGetTechFile function requires the cellview ID or library ID as input.
Pcell before alignment Y Instance nTran2
rect0
Instance nTran1
rect0
X
X
0:0
rect0
rect0
Solution 3-4 Aligning Objects at Different Levels in the Hierarchy on page 291.
September 2008
153
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodAssignHandleToParameter
rodAssignHandleToParameter( ?parameter ?rodObj ?handleName [?displayName [?displayExpression [?stretchDir [?stretchType [?moveOrigin [?updateIncrement [?userData [?userFunction S_parameter R_rodObj Sl_handleName S_displayName ] S_displayExpression ] S_stretchDir ] S_stretchType ] g_moveOrigin ] f_updateIncrement ] g_userData ] Sl_userFunction ]
Description
Assigns one or more user- or system-dened point handles on a ROD object within a SKILLbased parameterized cell (pcell) to a single pcell parameter, so you can change the value of the parameter by graphically stretching the handle(s). Stretching a handle has the same effect as changing the value of the associated parameter for the pcell instance using the Edit Properties form. You cannot stretch handles on the pcell master. All rodAssignHandleToParameter statements must occur within the body-of-code section of a SKILL-based pcell. For an overview of stretchable pcells, see Stretchable Parameterized Cells on page 39.
Arguments
S_parameter Character string or symbol specifying the name of the pcell parameter to which you want to assign one or more point handles. The data type of the pcell parameter must be an integer or oating-point number, unless you also specify the Sl_userFunction argument. This argument is required. If you do not specify this argument or the parameter does not exist in the parameter declaration section of the pcell code, the function reports an error. Valid Values: any parameter associated with the pcell Default: none ROD object ID identifying the object in a pcell that has the point handles you want to assign to a parameter. This argument is required. If you do not specify this argument or the specied
154 Product Version 6.1.3
R_rodObj
September 2008
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions ROD object ID is not valid, the function reports an error. Default: none Sl_handleName Character string or symbol specifying the name of a single useror system-dened point handle or a list of character strings or symbols specifying the names of one or more point handles. You can specify any point handles that are associated with the object specied by R_rodObj . This argument is required. If you do not specify this argument or a specied handle is not a point handle for the specied object, the function reports an error. Default: none S_displayName Character string or symbol specifying any text that you want the system to display next to the pcell while you stretch it, such as the name of a parameter or an expression. For example, the following are valid values: "length", length, "length + 2", and "My Handle". If you also specify S_displayExpression , the system displays both its value as is, without evaluating it, and the result of evaluating the S_displayExpression argument, separated by the string " = ", in the following format:
displayName = displayExpression_evaluation_result The following examples show what the system displays when you specify both display arguments: S_display Name "length" "length" S_display Expr "length * 2" "width + 3" displayExpr Evals To 10 16
If you do not specify S_displayExpression , the system treats S_displayName as an expression and evaluates it dynamically as you stretch the pcell. The system displays both
September 2008
155
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions the string or symbol and the result of the evaluation, separated by the string " = ", in the following format:
displayName = displayName_evaluation_result If S_displayName does not evaluate successfully, the system displays Eval not successful in the layout cellview instead of a value. If no value is specied for S_displayName , nothing is displayed for it. For more information about specifying this argument, see Displaying Parameter Information on page 161. Default: none S_displayExpression Character string or symbol specifying an expression, such as a parameter name or equation. For example, the following are valid values: "width", width, and "width + 2". The system evaluates the value of this argument dynamically as you stretch the pcell and displays the result next to the pcell. When you specify this argument but do not specify the S_displayName argument, the system displays the result of the evaluation in the following format:
result_of_evaluation For example, for the expression "width", where width equals 12, the system displays 12.0; for the expression "width + 2", the system displays 14.0. If you also specify S_displayName , the system displays both the value of S_displayName , without evaluating it, and the result of evaluating the S_displayExpression argument, separated by the string " = ", in the format:
string_or_symbol = displayExpression_evaluation_result
September 2008
156
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions For more information about specifying this argument, see Displaying Parameter Information on page 161. Default: none S_stretchDir Character string or symbol specifying the axis along which you want the pcell to stretch. Although you can stretch the pcell in any direction, the system computes the change to S_parameter only in the direction of the axis specied by this argument; the system updates the associated pcell parameter with a change in the direction of either the X or Y axis. Valid Values: x, X, y, or Y Default: x Character string or symbol specifying whether the stretch is relative to the position of the handle or to the center of the pcell. When the value is absolute, the stretch is relative to the handle; when the value is relative, the stretch is relative to the center of the pcell. For an absolute stretch, an upward stretch away from the position of the handle (in a positive direction along the axis) is an increment; a downward stretch away from the position of the handle (in a negative direction along the axis) is a decrement. For a relative stretch, a stretch is away from the center of the pcell is an increment; a stretch towards the center of the pcell is a decrement. For examples showing relative vs. absolute, see Results of Stretching a Handle on page 45. Valid Values: relative or absolute Default: relative g_moveOrigin Boolean value specifying whether the system can move the origin point of an instance during the stretch of a handle on the instance or on an object in the instance. When the value is t, the origin point can move during a stretch; when the value is nil, the origin point cannot move during a stretch. Specifying t is most useful when S_stretchType is set to relative and the location of the stretch handle coincides with and affects the bounding box of the pcell instance.
S_stretchType
September 2008
157
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions When the origin point can move, the edges of the instance adjacent to the origin point can move also, which allows handles on those edges to move in the direction of the stretch.
Relative stretch towards center, origin point can move Absolute positive stretch, origin point can move
pcell
pcell length
0:0
0:0
pcell
pcell
length
0:0
0:0
When the origin cannot move, the edges of the instance adjacent to the origin point cannot move either, which prevents handles on those edges from moving in the direction of the stretch. For more examples, see Results of Stretching a Handle on page 45. Valid Values: t, nil Default: nil f_updateIncrement Floating-point number specifying how often the system updates the pcell parameter (S_parameter ) and regenerates the pcell during a stretch operation. If you specify a negative number, the system uses the default. The default is the value of the layout
September 2008
158
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions editor environment variable udpatePcellIncrement. If you specify f_updateIncrement , its value overrides the value of updatePCellIncrement. Default: value of the layout editor environment variable udpatePcellIncrement g_userData User data of any data type. The system evaluates the data and includes the result as part of the r_defstruct structure that is passed to Sl_userFunction as input. This argument lets you pass the values of variables and constants dened in your pcell code to a user-dened function. For example, you can pass the values of design rules, such as minSpacing and minWidth.
Sl_userFunction String, symbol, or lambda function specifying a user-dened function. A lambda function lets you dene a function without using a function name. The purpose of user-dened functions is to calculate new values for pcell parameters. Do not use userdened functions for other purposes, such as to create shapes. User-dened functions are executed interactively while the pcell is stretched; therefore, a user-dened function cannot depend on pcell arguments. As input to the user-dened function, the system passes a defstruct that is predened by the ROD software. A defstruct is a named SKILL structure containing a collection of one or more slots for variables. For more information about defstructs, see the defstruct function in the SKILL Language Reference . In this syntax, the defstruct is referred to as r_defstruct . Replace defstruct with your own name, for example, myDefstruct. This destruct contains the following predened variable slots: t_handleName Text specifying the name of the handle currently being stretched. n_increment An integer or oating-point number specifying the increment or decrement as a result of stretching t_handleName . d_origInstId Database ID of the original instance being stretched.
September 2008
159
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions g_parameters Lets you set the value of a pcell parameter, using the following construct: myDefstruct->parameters->parameter_name = parameter_value where parameter_value must evaluate to the same data type as parameter_name . The g_parameters variable is write-only; it is not preloaded with parameter names and values. After the user-dened function completes, the system looks at g_parameters within the predened defstruct, and if any parameters were set, the system uses those values as the new parameter values. g_paramVal Current value of the pcell parameter named S_parameter ; the value can have any data type. R_rodObj ROD object ID identifying the original object whose handle is being stretched. S_stretchDir String or symbol specifying the stretch direction for the current handle being stretched (t_handleName ). d_stretchMaster Interim database ID of the most recent pcell submaster in virtual memory. g_userData Result of the evaluation of the g_userData argument by the system, when user data is specied. The system replaces the value of Sl_parameter with the value returned. If the value for Sl_parameter is also set using the myDefstruct->parameters-> construct, the construct value overrides the value returned by the user-dened function. User-dened functions must return a value with the same data type as S_parameter, and the value assigned by a myDefstruct->parameters-> construct must have the same data type as the parameter. If a value does not have the same data type as its parameter, the system issues a warning
September 2008
160
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions and assigns zero or a null value to the parameter; the evaluation of the pcell could fail. For more information about the ROD predened destruct, see The r_defstruct Structure on page 168. For more information about user-dened functions, see User-Dened Functions on page 165. Default: none
Value Returned
t nil Handles were successfully assigned to the pcell parameter. An error occurred and no handle was assigned.
width 0:0 X
Depending on the information you want to display, specify the arguments as follows:
I
To display
displayName = displayName_evaluation_result
September 2008
161
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions specify only the S_displayName argument. The system displays its contents as an unevaluated text string on the left and the result of evaluating the S_displayName argument on the right, separated by the string " = ". The following examples show what the system displays when you specify only the S_displayName argument: S_displayName length "length * 2" "onOffSwitch" "M" Name Evals To 10 20 t evaluation fails What You See length = 10 length * 2 = 20 onOffSwitch = t M = Eval not successful
To display
displayExpression_evaluation_result
specify only the S_displayExpression argument. You can use any pcell parameter in the expression. The system evaluates the expression and displays the result. For example, if S_displayExpression contains the expression width + 3, and the variable width is currently equal to 5.0, the system displays the following: 8.0
I
To display
displayName = displayExpression_evaluation_result
specify both the S_displayName and S_displayExpression arguments. The system displays the contents of S_displayName as an unevaluated text string on the left and the result of evaluating S_displayExpression on the right, separated by the string " = ". The following examples show what the system displays when you specify both display arguments: displayExpr Evals To 10 16
September 2008
162
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Examples of Display Information In the following example, the pcell contains only a rectangle, with handles assigned to the three pcell parameters: capacitance, width, and length. The pcell code contains three rodAssignHandleToParameter statements:
I
One rodAssignHandleToParameter statement assigns the upperRight handle to the capacitance parameter. A second rodAssignHandleToParameter statement assigns the lowerRight handle to the width parameter. A third rodAssignHandleToParameter statement assigns the lowerRight handle to the length parameter. In each statement, the information to be displayed is specied as follows:
width upperRight handle is assigned to capacitance. pcell
length
For the capacitance parameter, S_displayName is cap and S_displayExpression is the expression
width*length/capCoeff
For the width parameter, S_displayName is width and S_displayExpression is not specied. For the length parameter, S_displayName is length and S_displayExpression is not specied.
September 2008
163
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions When you select the upperRight handle, you see the following information displayed:
cap = 15
pcell
When you select the lowerRight handle, you see the following information displayed:
width = 6.5 length = 4.0 pcell
For a table showing examples of how to specify the display arguments, see Table 3-2 on page 164. The following table shows the results of specifying one or both of the S_display arguments. Table 3-2 Examples of Specifying the Display Arguments S_displayName length "length * 2" "onOffSwitch" "My Handle" "length"
September 2008 164
S_display Expression
What You See length = 10 length * 2 = 20 onOffSwitch = t My Handle = Eval not successful 10
Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Table 3-2 Examples of Specifying the Display Arguments, continued S_displayName S_display Expression "length * 2" "onOffSwitch" "myHandle" "length" "length" "On-Off Switch" "My Handle" "length * 2" "width + 3" "onOffSwitch" "myHandle" Evaluates To 20 t evaluation fails 20 16 t evaluation fails What You See 20 t Eval not successful length = 20 length = 16 On-Off Switch = t My Handle = Eval not successful
User-Dened Functions
When you assign a handle to a parameter, you can dene your own function (Sl_userFunction ) to calculate the value of the pcell parameter (S_parameter ) to which you are assigning the handle. These functions are executed when the pcell is stretched; they cannot depend on pcell parameters. Note: A user-dened function should be used only to calculate a new value for a pcell parameter. Do not use user-dened functions for other purposes, such as creating objects. Information Passed to a User-Dened Function As input to user-dened functions, the ROD software passes a predened, user-named defstruct (r_defstruct ). For a description of the contents of the defstruct, see the Sl_userFunction argument description. Specifying Values for Parameters Using the -> Operator Within a user-dened function, you can use the following construct to set the value for any pcell parameter:
myDefstruct->parameters->parameter_name = parameter_value
where myDefstruct is your name for the defstruct and parameter_value must be the same data type or evaluate to the same data type as parameter_name . For example,
September 2008 165 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
myDefstruct->parameters->width = 6.0
The system stores all such constructs in the place-holder variable g_parameters within the r_defstruct structure. Note: The g_parameters variable is not preloaded with parameters and their values. What the System Does The system executes the user-dened function, which calculates and returns a new value for S_parameter. After the user-dened function completes, the system looks at the variable g_parameters within the r_defstruct structure and, if values were set for any parameters, uses those values as the new values for the parameters. Note: If you set the value for S_parameter using the myDefstruct->parameters-> construct, the system uses the value assigned by the construct rather than the value returned by the user-dened function. Loading User-Dened Functions When there are user-dened functions specied, the system calls them at each drag increment during the stretch and when you complete the stretch operation. You need to make sure that user-dened functions are loaded into the system before the system needs them. User-dened functions must be loaded prior to dragging a stretch handle belonging to a pcell. The safest way to make sure that user-dened functions are always available when needed is to attach them to your library. Then the system automatically loads them when the library is opened. Follow the steps below to attach a source le for a user-dened function to a library: 1. Place the source le within the library directory. 2. Create a le named libInit.il in the library directory. The system automatically loads the libInit.il le when the library is opened. 3. Within the libInit.il le, write a load statement like this:
load( strcat( ddGetObjReadPath( ddGetObj( "libName " )) "/filename .il" ) ; end strcat ) ; end load
September 2008
166
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Note: Avoid using graphical SKILL functions such as hiSetBindKey in your libInit.il le; doing so will result in an error. For more information see What to Avoid in the libInit.il File in the Virtuoso Parameterized Cell Reference . Lambda Functions Using a lambda function lets you dene a function without a name, in the form of a list. This is useful for writing temporary or local functions. The syntax for a lambda function is
lambda( (l_formalArguments ) g_expr1 ...) => U_result ) ) ; end lambda
Arguments lambda The rst element in the list is the word lambda. It identies the following arguments as belonging to an unnamed function. The second element in the list is a list of one or more variable names. The remaining elements in the list are SKILL expressions that are evaluated when the lambda function is called.
l_formalArguments
g_expr1 ...
For example, the following lambda function denes an unnamed function capable of computing the length of the diagonal side of a right-angled triangle:
lambda( (x y) (sqrt (x*x + y*y))
When x = 3 and y = 4, the value returned is 5.0. You do not need to precede a lambda function with a single quotation mark. For more information about lambda functions, see Basic Concepts in Chapter 3 of the SKILL Language User Guide and lambda in Chapter 1 of the SKILL Language Reference .
September 2008
167
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions The r_defstruct Structure r_defstruct is a user-named structure that is predened by the ROD software to contain a series of slots for specic variables. A defstruct behaves just like a disembodied property list. The system passes the defstruct as input to user-dened functions dened within the rodAssignHandleToParameter function. For more information about defstructs, see defstruct in the SKILL Language Reference . You can access the value of the variables in the r_defstruct structure by using the name you assigned to the defstruct, the structure access operator ( ->) and the name of the variable. For example, to access the value of the variable R_rodObj , type the following:
myDefstruct->rodObj
The following user-dened function adds the value of n_increment to g_paramVal , prints the current values of the myDefstruct variable slots, veries that the return value is not less than zero, and returns the new value of g_paramVal .
procedure( exampleUserFunction(myDefstruct) let(((returnVal myDefstruct->paramVal + myDefstruct->increment)) ;; print all parameter values: printf("myDefstruct->handleName = %s\n", myDefstruct->handleName) printf("myDefstruct->increment = %f\n", myDefstruct->increment) printf("myDefstruct->origInstId = %L\n", myDefstruct->origInstId) printf("myDefstruct->parameter = %s\n", myDefstruct->parameter) printf("myDefstruct->paramVal = %L\n", myDefstruct->paramVal) printf("myDefstruct->rodObj = %L\n", myDefstruct->rodObj) printf("myDefstruct->stretchDir = %s\n", myDefstruct->stretchDir) printf("myDefstruct->stretchMaster = %L\n\n", myDefstruct->stretchMaster) if( (returnVal <= 0.000001) progn(warn("returnVal for parameter %s must be > 0\n" myDefstruct->parameter) returnVal = .1 ) ; end of progn ) ; end if returnVal ) ; end of let ) ; end or procedure
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
myDefstruct->parameter = length myDefstruct->paramVal = 1.0 myDefstruct->rodObj = rodObj:66969624 myDefstruct->stretchDir = y myDefstruct->stretchMaster = db:67195948
Example 2
The following example shows how to specify the g_userData argument and the g_parameters element of the r_defstruct structure for user-dened functions. In the example, a capacitor has a xed capacitance parameter (cap) and variable width and length parameters. As length is stretched, the system automatically adjusts width to maintain the xed capacitance value; the converse is also true. The gure below shows what the capacitor looks like before and after stretching the leftCenter handle to increase width. The system decreases length to keep the capacitance constant.
Before stretching After stretching
To make the pcell process independent, design rules such as minSpacing were retrieved from the technology le and passed to the user-dened function with the optional g_userData argument. In the code below, each section does the following:
September 2008
169
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
I
Section 1 is the part of the pcell code that gets the technology le ID and uses it to retrieve the technology rules used in the input to the user-dened function in Section 3. Section 2 is the part of the pcell code that assigns the leftCenter and rightCenter handles to the width parameter. Section 3 is a user-dened function that is called from within the pcell, but which is not part of the pcell code. The procedure updates length when width is stretched. The g_userData argument passes technology rule values to the user-dened function.
As a SKILL pcell author, you can write a process-independent pcell by using design rules from your technology le, such as minSpacing and minEnclosure. The g_userData parameter lets you pass values for constants and variables, such as the values of technology rules, directly to your user-dened function.
;; SECTION 1: Pcell code that gets minimum values from technology file tfId = techGetTechFile( pcCellView ) capCoeff = techGetParam( tfId "capCoeff" ) ;layer1 and layer2 are top and bottom layers for capacitor lay1Ovia = techGetOrderedSpacingRule( tfId "minEnclosure" layer1 "cont") lay2Ovia = techGetOrderedSpacingRule( tfId "minEnclosure" layer2 "cont" ) viaW = techGetSpacingRule( tfId "minWidth""cont" ) grid = techGetMfgGridResolution( tfId ) minCap = techGetParam( tfId "minCap" ) ;; SECTION 2: Pcell code that assigns handles to parameters rodAssignHandleToParameter( ?parameter "width" ?rodObj cnt ?displayName "width" ?handleName list("leftCenter" "rightCenter") ?stretchType "absolute" ?stretchDir "x" ?userData list(list(capCoeff lay1Ovia lay2Ovia viaW grid minCap )) ?userFunction "myfunc" ) ; end rodAssignHandleToParameter ;; SECTION 3:User-defined function called from within pcell. ;; The procedure updates the length when width is changed by ;; the stretch operation. procedure(myfunc(myDefstruct)) let((returnVal mylist capCoeff lay1Ovia lay2Ovia viaW grid minCap) returnVal = myDefstruct->paramVal + myDefstruct->increment mylist = car(myDefstruct->userData) capCoeff = nth(0 mylist) lay1Ovia = nth(1 mylist) lay2Ovia = nth(2 mylist) viaW = nth(3 mylist) grid = nth(4 mylist) minCap = nth(5 mylist) cap = (myDefstruct->stretchMaster)~>parameters~>cap if(lay1Ovia > lay2Ovia then minCapWidth = (2 * lay1Ovia + viaW) else
September 2008 170 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
minCapWidth = (2 * lay2Ovia + viaW) ) ; end if ;; Calculate the current length length = spcRound((cap/capCoeff/returnVal) grid) when(length < minCapWidth progn(warn("returnVal for parameter %s must be > minCapWidth %L\n" "length" minCapWidth)) length = minCapWidth returnVal = spcRound((cap/capCoeff/length) grid) ) ; end when ;; Reset the length so the capacitance value remains fixed. myDefstruct->parameters->length = length returnVal ) ; end let ) ; end procedure
For more information about structures, see Defstructs in Chapter 4 of the SKILL Language User Guide and the defstruct function in Chapter 1 of the SKILL Language Reference .
Example 3
The following example shows a MOS transistor pcell with stretch handles on the source and drain contact arrays. The MOS transistor pcell calls two user-dened functions.
The MOS transistor pcell parameters are specied as follows: Parameter Name w l leftcov Default Value 1.3 0.25 1.0 Parameter Description Width of gate Length of gate Left contact coverage
September 2008
171
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Parameter Description Right contact coverage Position of left contacts Position of right contacts
The contact arrays are aligned to the gate. For example, when leftPos equals top, the upperLeft point handle of the gate is aligned to the upperRight point handle of the left contact array, with an offset along both the X and Y axes. The stretch handles are assigned as follows:
I
To make the source contacts stretchable, the upperCenter and lowerCenter point handles on the source contact array are assigned to the pcell parameter leftcov with the stretch type relative and the stretch direction Y. To make the drain contacts stretchable, the upperCenter and lowerCenter point handles on the drain contact array are assigned to the pcell parameter rightcov with the stretch type relative and the stretch direction Y.
upperCenter point handle for source contacts upperCenter point handle for drain contacts
Two user-dened functions control the number of contacts generated and whether they are aligned to the top or bottom of the diffusion:
I
The user-dened function contcov sets a range for the contacts from a 100% coverage to the minimum contact width for the layer from the technology le. The user-dened function myStretch identies the handle currently being stretched. It determines whether the contacts are aligned to the top or bottom of the diffusion.
September 2008
172
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions To look at the code for the pcell and the user-dened functions, see Stretchable MOS Transistor on page 335.
Example 4: Stretching the Sample MOS Transistor
You can stretch the MOS transistor shown in Example 3 on page 171 in a negative direction towards the Y axis to reduce the number of contacts in the array to one, using the Virtuoso layout editor Stretch command. 1. Choose Edit Stretch . 2. Select the upperCenter stretch handle on the left contact array using an area-selection box. 3. To specify the reference point, click on the upperCenter stretch handle on the left contact array. Notice that the following information appears to the right of the pcell:
leftcov = 1
Click here.
Note: If you have trouble selecting the stretch handle, try turning off the Gravity On option on the Layout Editor Options form.
September 2008
173
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions The MOS transistor pcell instance now looks like this:
September 2008
174
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodCheck
rodCheck( d_cvID [ g_createMarkers ] ) ; end of rodCheck => Rl_rodObj
Description
Searches the specied cellview for multipart paths (MPPs) for which the geometry does not match the denition information, and returns a list of the ROD object IDs. The MPPs found by this function include those that have lost their subshape denition information. By default, this function places warning markers over the potentially affected MPPs. (If you do not want to see warning markers, set the g_createMarkers argument to nil.) Although subparts with missing denition information are still visible graphically, their denitions have been deleted from the database. Editing an affected MPP causes an immediate loss of the subpart graphics. Arguments d_cvID Database ID for the cellview you want to search. Default: none Boolean value indicating whether or not to create warning markers for the potentially affected MPPs found by the rodCheck function. The value must be t or nil. Valid Values: t, nil Default: t
g_createMarkers
Value Returned Rl_rodObj ROD object ID or list of ROD object IDs that identies the multipart paths for which the geometry does not match the denition information.
September 2008
175
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodCreateHandle
rodCreateHandle( [?name ?type ?value ?rodObj ) ; end rodCreateHandle => t | nil S_name ] S_type g_value R_rodObj
Description
Creates a user-dened handle for any ROD object (named shape, instance, or cellview); the object must be at level zero in the hierarchy. For example, you can create a handle for polyRect or for instance I1, but not for I1/polyRect. To create a handle for a cellview, you must rst get the ROD object ID for the cellview with the rodGetObj function. After you create a handle, you can access it through hierarchy using the rodGetHandle function and the database access operator (~>). The rodGetHandle function automatically transforms (converts) the coordinates of the ROD object into the coordinate system of the top-most cellview.
Arguments
S_name Character string or symbol specifying a unique name for the new handle. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. Do not use existing user- or system-dened handle names. For example, you can assign the name myPoint, but not centerCenter. If you do not assign a name, then the system assigns a name unique within the cellview, as follows: handle0, handle1, handle2, etc. Valid Values: any character string or symbol except existing useror system-dened handle names Default: unique name assigned by the system S_type Character string or symbol specifying the type of data stored at the handle. The type can be Boolean, oating point, integer, point, string, or a Cadence SKILL language expression. This
176 Product Version 6.1.3
September 2008
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions argument is required. Valid Values: boolean, float, int, point, string, ILExpr Default: none g_value Value assigned to the handle. The value must evaluate to match the data type dened by S_type . When S_type is Boolean, the value must be t or nil. When S_type is string, the value must be either a character string or a symbol. This argument is required. Valid Values: a value that matches the data type specied by S_type ; when S_type is Boolean, t or nil. Default: none ROD object ID associated with the object for which you want to create a user-dened handle. This argument is required. Default: none
R_rodObj
Value Returned
t nil Handle created successfully. An error occurred and no handle was created.
Problem 3-5a Creating a Point Handle for a Cellview on page 178 Problem 3-5b Querying a Point Handle for a Cellview on page 179 Problem 3-6 Querying a System-Assigned Handle Name on page 179
You identify the object for which you want to create a handle by using its hierarchical name. To create a handle for a cellview, you must supply the ROD object ID for the cellview. You might want to use information from your technology le for the values of some arguments. For example, for the n_width argument, you can use the value of the design rule for minimum width.
September 2008
177
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions You can access design rules in several ways. The problems in this section access design rules by using defaults, and by including techGetTechFile and techGetSpacingRule statements, when needed. For more detailed information about accessing design rules, see Using Design Rules in ROD Functions on page 309. For a code example showing how to use rodCreateHandle to compute the resistance of a ROD path, see Getting the Resistance for a ROD Path on page 332. Problem 3-5a Creating a Point Handle for a Cellview Create a point handle named originAAA for the origin of layout cellview AAA in the library cellLib.
cellview AAA Y Lower left corner of polyRect is at 2:2. polyRect 2:2 0:0
X
X
September 2008
178
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Problem 3-5b Querying a Point Handle for a Cellview Find the value of the point handle named originAAA, which is the origin of layout cellview AAA. Instance IA1 of cellview AAA is within cellview BBB, offset from the origin of cellview BBB by 3 units in the direction of the X and Y axes.
Y cellview BBB Lower left corner of IA1 is at 3:3, and lower left corner of polyRect is at 5:5.
IA1 of AAA
X
X
0:0
Solution 3-5b Querying a Point Handle for a Cellview on page 293. Problem 3-6 Querying a System-Assigned Handle Name When you create a handle without specifying a name, the system assigns a name. For the layout cellview myCell in the library cellLib, nd the system-assigned name for the last handle you created without a name. Solution 3-6 Querying a System-Assigned Handle Name on page 293.
September 2008
179
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodCreatePath
rodCreatePath( [?name ?layer [?width [?pts [?justification [?offset [?endType [?beginExt [?endExt [?choppable [?cvId [?fromObj [?size [?startHandle [?endHandle [?prop S_name ] txl_layer n_width ] l_pts ] S_justification ] n_offset ] S_endType ] n_beginExt ] n_endExt ] g_choppable ] d_cvId ] Rl_fromObj ] txf_size ] l_startHandle ] l_endHandle ] l_prop ]
[ROD Connectivity Arguments ] l_offsetSubpathArgs...] [?offsetSubPath [?encSubPath l_encSubpathArgs...] [?subRect l_subrectArgs...] ) ; end rodCreatePath => R_rodObj | nil ; ROD Connectivity Arguments [?netName S_netName ] [?termName S_termName ] [?termIOType S_termIOType ] [?pin g_pin ] [?pinAccessDir tl_pinAccessDir ] [?pinLabel g_pinLabel ] [?pinLabelHeight n_pinLabelHeight ] [?pinLabelLayer txl_pinLabelLayer ] [?pinLabelFont S_pinLabelFont ] [?pinLabelDrafting g_pinLabelDrafting ] [?pinLabelOrient S_pinLabelOrient ] [?pinLabelOffsetPoint l_pinLabelOffsetPoint ] [?pinLabelJust S_pinLabelJust ] [?pinLabelRefHandle S_pinLabelRefHandle ] ; end of ROD Connectivity Arguments ;l_offsetSubpathArgs Offset Subpath Arguments list( list( ?layer txl_layer [?width n_width ] [?sep n_sep ] [?justification S_justification ] [?beginOffset n_beginOffset ] [?endOffset n_endOffset ] [?choppable g_choppable ] [?prop l_prop ] ;Repeat ROD Connectivity Arguments here ) ;End of first offset subpath list ... ) ;End of offset subpath lists
September 2008 180 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
;End of l_offsetSubpathArgs ;l_encSubpathArgs Enclosure Subpath Arguments list( list( ?layer txl_layer [?enclosure n_enclosure ] [?beginOffset n_beginOffset ] [?endOffset n_endOffset ] [?choppable g_choppable ] [?prop l_prop ] ;Repeat ROD Connectivity Arguments here ) ;End of first enclosure subpath list ... ) ;End of enclosure subpath lists ;End of l_encSubpathArgs ;l_subrectArgs Subrectangle Arguments list( list( ?layer txl_layer [?width n_width ] [?length n_length ] [?gap S_gap ] [?sep n_sep ] [?justification S_justification ] [?beginOffset n_beginOffset ] [?endOffset n_endOffset ] [?beginSegOffset n_beginSegOffset ] [?endSegOffset n_endSegOffset ] [?space n_space ] [?choppable g_choppable ] [?prop l_prop ] ;Repeat ROD Connectivity Arguments here [?diagonal g_diagonalSubRect ] ) ;End of first subrectangle list ... ) ;End of subrectangle lists ;End of l_subrectArgs
Description
Creates a path consisting of one or more parts at level zero in the hierarchy on the same or on different layers from a list of points or from one or more existing objects. A path consisting of multiple parts is called a multipart path . You can use the rodCreatePath function to create one-part paths, simple multipart paths, or complex multipart paths such as guard rings, transistors, buses, and shielded paths. You can assign one or more property names and values to a multipart path. A multipart path consists of a single master path and one or more subparts . The master path is an ordinary path; however, it is the dening part of a multipart path; all subparts are based on the master path. You can assign a property name and value, or a list of property names and values, to the master path and/or to each subpart. The subparts can be any or all of the following: offset subpaths, enclosure subpaths, and sets of subrectangles.
September 2008 181 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions You can create any number of subparts. All subparts exist in relation to and depend on the master path. A subrectangle in a set of subrectangles is not an individual shape; it is part of that specic set of subrectangles. In the Virtuoso layout editor, you cannot select or edit an individual subrectangle. Subrectangles are created on grid. Note: Although you cannot select an individual subrectangle, it is possible to obtain the database ID for an individual subrectangle. If you use the database ID to change connectivity information (such as terminal name) for one or more individual subrectangles, your change is applied to the individual subrectangles immediately, and propagated to all of the subrectangles in the set of subrectangles when the MPP is modied in any way (such as moved). For a detailed overview of multipart paths, see Multipart Paths on page 59. You can also create MPPs and save them as templates in your technology le by using the graphical user interface or by editing the ASCII version of your technology le. For information about using the graphical user interface, see Creating and Editing Multipart Paths in the Virtuoso Layout Suite L User Guide . For information about editing your technology le, see multiPartPathtcCreatreTemplates in the Technology File and Display Resource File ASCII Syntax Reference Manual . The following topics are discussed in this section, following the argument descriptions:
I I I I I
Creating Self-Intersecting Paths on page 203 Specifying Arguments as nil on page 203 Formatting List-of-Lists Arguments for Subparts on page 204 How the System Follows to Create Subrectangles on page 205 Disconnecting Shapes in a Multipart Path on page 209
Arguments
Master Path Arguments S_name Character string or symbol specifying the name for the master path. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. The name must be unique for the cellview. If you do not specify a name, the system assigns a unique name, consisting of the
September 2008 182 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions prex path, followed by a number. For example, for the rst master path in a cellview for which you do not specify a name, the system assigns the name path0, if unique; for the second, path1, and so on. Default: pathn txl_layer Text string, integer, or list specifying the layer or layer-purpose pair for the master path, such as ?layer "metal1" ?layer 45 ?layer list("metal1" "drawing") Enclose string values in quotation marks. Do not use a symbol. For lists, use the following format: list( layer purpose ) Examples of layer-purpose pairs: ?layer list("metal1" "drawing") ?layer list(45 252) ?layer list(45 "drawing") ?layer list("metal1" 252) You are required to specify a layer. Default Purpose: drawing n_width Positive integer or oating-point number specifying the width of the master path. If you do not specify the width, the system uses the minWidth rule for the master path layer from the technology le. If the minWidth rule is not dened in the technology le, the rodCreatePath function reports an error. Default: the minWidth rule for the master path layer from the technology le List of points dening the centerline of the master path. Specify a point for the start and end of the rst segment, and specify a point for the end of subsequent segments. You must specify at least two noncoincident points. You cannot create selfintersecting master paths. You are required to specify a list of points. The system discards duplicate and collinear points before creating the path but does not consider them an error. Use one of the following formats: list( x :y x :y ... )
l_pts
September 2008
183
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions or list( list(x y ) list(x y ) ... ) You must specify either l_pts or Rl_fromObj . If you specify both, the system ignores the l_pts argument. Default: none S_justification Character string or symbol specifying the part of the master path to offset from the point list: centerline, left edge, or right edge. Justication is relative to the direction of the path. Valid Values: center, left, right Default: center Signed integer or oating-point number specifying the distance by which the master path edge or centerline, depending on S_justification , is offset from the point list specied by the l_pts argument. A positive value creates the master path to the left of the point list; a negative value creates the master path to the right of the point list. For a detailed description about offsetting the master path, see Master Paths on page 60. Default: 0 Character string or symbol specifying the type of ends of the master path. Valid Values: flush, offset, octagon, variable Default: flush Zero or positive integer or oating-point number specifying the distance by which the starting end of the master path extends beyond or retracts from its rst point. This argument is ignored unless S_endType is set to variable. Default: 0 Zero or positive integer or oating-point number specifying the distance by which the ending end of the master path extends beyond or retracts from its last point. This argument is ignored unless S_endType is set to variable. Default: 0 Boolean value indicating whether or not a ROD path can be chopped. The value must be t or nil. When a path has subparts and the master path is choppable, all subpaths and sets of subrectangles must be choppable also. When a path has
n_offset
S_endType
n_beginExt
n_endExt
g_choppable
September 2008
184
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions subparts and the master path is not choppable, each subpath and/or set of subrectangles can be choppable or not. Default: t d_cvId Database ID for the cellview in which you are creating a ROD path. If rodCreatePath occurs in the body of a pcDefinePCell function or tcCreateCDSDeviceClass function call, the default value is pcCellView or tcCellView, respectively; otherwise, this argument is required. Default: none ROD object ID or list of ROD object IDs identifying a named object or list of named objects that you want to use as a source for creating a new ROD path. The source objects can be instances, rectangles, polygons, paths, lines, dots, labels, and/or text-display objects. You must specify either the Rl_fromObj argument or the l_pts argument. If you specify both, the system ignores the l_pts argument. Default: none A signed integer, oating-point number, or Cadence SKILL language expression specifying the distance between a bounding box around the source object (Rl_fromObj ) and the centerline of the generated master path. When the source is more than one object, txf_size species the distance between a bounding box around all of the objects and the centerline of the master path. By default, the generated path has four segments and forms a ring. A positive number creates a path that is longer than the circumference of the bounding box; a negative number creates a path that is shorter than the circumference of the bounding box. When you specify a SKILL expression, it must evaluate to a positive or negative integer or oating-point number. SKILL expressions are evaluated only when the new path is created. If you specify a source object (Rl_fromObj ) but do not specify txf_size , then txf_size defaults to 0.0. If you specify txf_size , you must also specify Rl_fromObj , or the system reports an error. Default: 0.0
Rl_fromObj
txf_size
September 2008
185
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions l_origin Single point or list of coordinates specifying the starting point for the generated path, in one of the following formats: x :y or list(x y ) Default: 0:0
S_startHandle Character string or symbol specifying the starting point for the generated path, such as startn , where n is the segment number. Valid Values: startn , midn , endn , startLast, midLast, endLast Default: start0 S_endHandle Character string or symbol specifying the ending point for the generated path, such as startn , where n is the segment number. Valid Values: startn , midn , endn , startLast, midLast, endLast Default: start0 A list or lists of lists, where each list contains the name of a property and its value. When the property name is a string, enclose it in quotes. For a description of the valid data types, see the About the Add Property Form in the Virtuoso Layout Suite L User Guide . For Boolean properties, the value must be t or nil. For example, you would specify a single Boolean property as follows: ?prop list("myProp" t) and a list of properties as follows: ?prop list( list("myProp1" propValue1) list("myProp2" propValue2) ... list("myPropN" propValueN) )
l_prop
September 2008
186
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions For a more detailed description about specifying lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. Default: nil l_offsetSubpath A list containing one or more lists, each of which species the arguments for one offset subpath. The subpath is created in relationship to the master path. For information about how to specify lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. A list containing one or more lists, each of which species the arguments for one enclosure subpath. The enclosure subpath is created in relationship to the centerline of the master path. For information about how to specify lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. A list containing one or more lists, each of which species the arguments for one set of unnamed subrectangles. The set of subrectangles is created in relationship to the centerline of the master path. For information about how to specify lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204.
l_encSubPath
l_subRect
Value Returned
R_rodObj The ROD object ID for the single layer or multipart ROD path that was created. No path was created due to an error.
nil
September 2008
187
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions S_termName Character string or symbol specifying the name of the terminal and net with which you want to associate the shape. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. If the terminal and/or net does not exist, the system creates it, using the name specied by S_termName . If you specify both S_termName and S_netName , their values must be the same. If a terminal with the specied name already exists, the net it belongs to must have the same name. If the net name does not match the terminal name, the function reports an error. To associate the shape with a terminal and net, this argument is required. If you do not want to specify this argument, omit it or specify its value as nil. Default: nil S_termIOType Character string or symbol specifying the direction type (I/O type) for the terminal. If S_termName is not specied, the S_termIOType argument is ignored. If a terminal with the name specied by S_termName already exists, it must have the same direction type as specied by S_termIOType ; if the direction type is not the same, the function reports an error. Valid Values: input, output, inputOutput, switch, jumper Default: inputOutput Boolean value indicating whether or not to make the shape into a pin. The value must be t or nil. When you specify g_pin , you must also specify a value other than nil for S_netName and/or S_termName ; if you do not, all connectivity arguments are ignored but no error is reported. If you do not want to specify this argument, omit it or specify its value as nil. When the value is nil, the shape created is not a pin and all other arguments containing the word pin are ignored. Valid Values: t, nil Default: nil Text string or list specifying the access direction(s) for the pin. Enclose string values in quotation marks. Do not use a symbol. An example of a list is list( "top" "bottom" ) Valid Values: top, bottom, left, right, any, none, or a list
g_pin
tl_pinAccessDir
September 2008
188
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions containing any of these values Default: any g_pinLabel Boolean value indicating whether or not to add a text display object for the pin, where the text is the contents of the S_termName argument. The value must be t or nil. When the value is t, the system creates a text display object as a ROD object and aligns it to the pin using the values you specify for the other pin label arguments. When the value is nil, no label is created and all other arguments containing the characters pinLabel are ignored. Valid Values: t, nil Default: nil Positive integer or oating-point number specifying the vertical height of the pin text-display label in user units. Default: 1 Text string, integer, or list specifying the layer or layer-purpose pair for the pin text-display label, such as ?pinLabelLayer "metal1" ?pinLabelLayer 45 ?pinLabelLayer list("metal1" "drawing") Enclose string values in quotation marks. Do not use a symbol. For lists, use the following format: list(layer purpose ) Examples of layer-purpose pairs: ?pinLabelLayer list("metal1" "drawing") ?pinLabelLayer list(45 252) ?pinLabelLayer list(45 "drawing") ?pinLabelLayer list("metal1" 252) When you specify only the layer, the purpose defaults to the purpose dened by l_layer. When you specify neither layer nor purpose, both layer and purpose default to the values dened by l_layer. Default: layer specied by l_layer ; purpose specied by l_layer S_pinLabelFont Character string or symbol specifying the name of the font for the pin text-display label.
n_pinLabelHeight
txl_pinLabelLayer
September 2008
189
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Valid Values: euroStyle, gothic, math, roman, script, stick, swedish Default: stick g_pinLabelDrafting Boolean value indicating whether or not to allow rotation of the pin text-display label by more than 90 degrees. The value must be t or nil. You can set or change label rotation with the S_pinLabelOrient argument or in the layout editor. When the value is t, the label can rotate less than or equal to 90 degrees. When the value is nil, the label can rotate more than 90 degrees. Valid Values: t, nil Default: t S_pinLabelOrient Character string or symbol specifying the orientation of the pin text-display label. Valid Values: 0 90 180 270 MY MYR90 MX MXR90 Default: R0 l_pinLabelOffsetPoint Lists one set of coordinates specifying the X and Y offset of the origin of the pin text-display label from a point handle on the shape. The label origin is specied by S_pinLabelJust , and the shape point handle is specied by S_pinLabelRefHandle . For example, to create a label for the path path1, offset from the endLeftLast point handle by 2 units in the direction of the X
September 2008 190 Product Version 6.1.3
R0 R90 R180 R270 sideways sideways & 90 upsideDown sideways & 270
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions axis and 0 units in the direction of the Y axis, specify 2:0.
S_pinLabelJust equals centerLeft S_pinLabelRefHandle equals endLeftLast
X InOut0
Use one of the following formats: x :y or list(x y ) or any expression that evaluates to a list of two numbers. Default: 0:0 S_pinLabelJust Character string or symbol specifying the origin point for the textdisplay label. Valid Values: upperLeft or uL lowerLeft or lL upperCenter or uC lowerCenter or lC upperRight or uR lowerRight or lR centerLeft or cL centerCenter or cC centerRight or cR Default: centerCenter
S_pinLabelRefHandle Character string or symbol specifying the point handle on the shape from which you want to offset the origin point of the textdisplay label. You can specify the name of any bounding box or segment point handle. For a detailed description of systemSeptember 2008 191 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions dened point handles, see System-Dened Handles on page 19. Valid Values for bounding box point handles: upperLeft or uL lowerLeft or upperCenter or uC lowerCenter or upperRight or uR lowerRight or centerLeft or cL centerCenter or cC centerRight or cR
lL lC lR
Valid Values for segment point handles for all ROD shapes: start0 mid0 end0 startLast midLast endLast startn midn endn Valid Values for segment point handles for ROD paths: start0 mid0 end0 startLast midLast endLast startn midn endn startLeft0 midLeft0 endLeft0 startLeftLast midLeftLast endLeftLast startLeftn midLeftn endLeftn startRight0 midRight0 endRight0 startRightLast midRightLast endRightLast startRightn midRightn endRightn Default: the bounding box point handle centerCenter
September 2008
192
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions n_width Positive integer or oating-point number specifying the width of the offset subpath. If you do not specify the width, the system uses the minWidth rule for the offset subpath layer from the technology le. If the minWidth rule is not dened in the technology le, rodCreatePath reports an error. Default: minWidth for the offset subpath layer from the technology le Signed integer or oating-point number specifying the separation between the centerline or an edge of the subpath and the centerline or an edge of the master path, depending on the value of S_justification . Default: 0 Character string or symbol specifying from which part of the master path to separate the subpath, in relation to the direction of the master path. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. When left, the right edge of the subpath is separated from the left edge of the master path. When right, the left edge of the subpath is separated from the right edge of the master path. When center, the centerline of the subpath is separated from the centerline of the master path. Valid Values: center, left, right Default: center n_beginOffset Signed integer or oating-point number specifying the starting edge of the subpath in relation to the starting edge of the master path. A positive number extends the end of the subpath beyond the end of the master path; a negative number retracts the end of the subpath from the end of the master path. Default: n_endOffset if specied; otherwise 0 Signed integer or oating-point number specifying the ending edge of the subpath in relation to the ending edge of the master path. A positive number extends the end of the subpath beyond the end of the master path; a negative number retracts the end of the subpath from the end of the master path. Default: n_beginOffset if specied; otherwise 0
n_sep
S_justification
n_endOffset
September 2008
193
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions g_choppable Boolean value indicating whether or not the subpath can be chopped. The value must be t or nil. When the master path is choppable, all subpaths must be choppable. When the master path is not choppable, each subpath can be choppable or not. Default: t A list or lists of lists, where each list contains the name of a property and its value. When the property name is a string, enclose it in quotes. For a description of the valid data types, see the About the Add Property Form in the Virtuoso Layout Suite L User Guide . For Boolean properties, the value must be t or nil. For example, you would specify a single Boolean property as follows: ?prop list("myProp" t) and a list of properties as follows: ?prop list( list("myProp1" propValue1) list("myProp2" propValue2) ... list("myPropN" propValueN) ) For a more detailed description about specifying lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. Default: nil
l_prop
September 2008
194
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions txl_layer. You are required to specify a layer. Default Purpose: drawing n_enclosure Signed integer or oating-point number specifying the enclosure of the subpath in relation to the master path. The system computes the width of an enclosure subpath as follows:
width = (n_width of master path) - (2 * n_enclosure ) If you do not specify this argument, the system uses the minEnclosure rule from the technology le for master path layer to subpath layer; if the minEnclosure rule is not dened in the technology le, rodCreatePath reports an error. Default: minEnclosure rule from the technology le for master path layer to subpath layer n_beginOffset Signed integer or oating-point number specifying the starting edge of the subpath in relation to the starting edge of the master path. A positive number extends the end of the subpath beyond the end of the master path; a negative number retracts the end of the subpath from the end of the master path. Default: n_endOffset if specied; otherwise the negative of n_enclosure Signed integer or oating-point number specifying the ending edge of the subpath in relation to the ending edge of the master path. A positive number extends the end of the subpath beyond the end of the master path; a negative number retracts the end of the subpath from the end of the master path. Default: n_beginOffset if specied; otherwise the negative of n_enclosure Boolean value indicating whether or not the subpath can be chopped. The value must be t or nil. When the master path is choppable, all subpaths must be choppable. When the master path is not choppable, each subpath can be choppable or not. Default: t A list or lists of lists, where each list contains the name of a property and its value. When the property name is a string, enclose it in quotes. For a description of the valid data types, see
n_endOffset
g_choppable
l_prop
September 2008
195
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions the About the Add Property Form in the Virtuoso Layout Suite L User Guide . For Boolean properties, the value must be t or nil. For example, you would specify a single Boolean property as follows: ?prop list("myProp" t) and a list of properties as follows: ?prop list( list("myProp1" propValue1) list("myProp2" propValue2) ... list("myPropN" propValueN) ) For a more detailed description about specifying lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. Default: nil
September 2008
196
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions n_width Positive integer or oating-point number specifying the width of the rectangle(s), where the width is parallel to the width of the master path.
Width of subrectangles
If not specied, the system uses n_length ; if neither is specied, the system uses the minWidth rule for the subrectangle layer from the technology le. If the minWidth rule is not dened in the technology le, rodCreatePath returns nil to indicate an error. Default: n_length if specied; otherwise minWidth for the subrectangle layer from the technology le n_length Positive integer or oating-point number specifying the length of the subrectangle(s), where the length is parallel to the master path centerline.
Length of subrectangles
If not specied, the system uses n_width ; if neither is specied, the system uses the minWidth rule for the
September 2008 197 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions subrectangle layer from the technology le. If the minWidth rule is not dened in the technology le, rodCreatePath returns nil to indicate an error. Default: n_width if specied; otherwise, minWidth for the subrectangle layer from the technology le S_gap Character string or symbol specifying the method the system uses to place subrectangles within each segment. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. The system always uses the value of n_space for minimum space between subrectangles and calculates the maximum number of rectangles that t in the segment, allowing for the space needed by n_beginOffset and n_endOffset . When the value of S_gap is distribute, the system distributes the space around subrectangles as evenly as possible, in multiples of the grid space specied by mfgGridResolution. Any remaining space is left after the last subrectangle in the segment.
Note: When the value of S_gap is distribute and there is only one subrectangle, the value of the distributeSingleSubRect environment variable determines where the single subrectangle is placed. When nil, which is the default, the subrectangle is offset as specied by n_beginOffset and n_endOffset . When t, the
September 2008 198 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions subrectangle is centered (but placed on grid), and n_beginOffset and n_endOffset are ignored. When the value of S_gap is minimum, the system places subrectangles n_space apart until there is no space for another rectangle, then leaves the excess space after the last subrectangle in the segment.
Valid Values: distribute, minimum Default: distribute n_sep Signed integer or oating-point number specifying the separation between the centerline or an edge of the subrectangles and the centerline or an edge of the master path, depending on the value of S_justification . The system places subrectangles on grid, as close to the specied separation as possible. Default: 0 Character string or symbol specifying from which part of the master path to separate the subrectangles, in relation to the direction of the master path. When left, the right edge of the subrectangles is separated from the left edge of the master path. When right, the left edge of the subrectangles is separated from the right edge of the master path. When center, the centerline of the subrectangles is separated from the centerline of the master path. Valid Values: center, left, right Default: center
S_justification
September 2008
199
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions n_beginOffset Signed integer or oating-point number specifying the offset of the edge of the rst subrectangle from the starting edge of the master path. A positive number extends the beginning of the subrectangles beyond the beginning of the master path; a negative number retracts the beginning of the subrectangles from the beginning of the master path. Default: n_endOffset if specied; otherwise 0 Signed integer or oating-point number specifying the offset of the edge of the last subrectangle from the ending edge of the master path. A positive number extends the end of the subrectangles beyond the end of the master path; a negative number retracts the end of the subrectangles from the end of the master path. Default: n_beginOffset if specied; otherwise 0 Positive, signed integer or oating-point number that, together with the other offset arguments, lets you control whether there is a subrectangle in the corner of a segment. Species the offset of the rst subrectangle in a segment measured from the edge of the master path. Does not apply to the rst segment; the position of the rst subrectangle in the rst segment is determined by the value of the n_beginOffset argument.
Segment 2
n_endOffset
n_beginSegOffset
n_beginSegOffset
Segment 1
If the segment begins before the full distance specied by n_beginSegOffset , then n_beginSegOffset is not applied, and a subrectangle could be placed at the corner of the subrectangle path. When applying offset specications, the system will not create a spacing error; if the rst subrectangle in a segment would be too close to the last subrectangle in the previous segment, the system discards the last subrectangle in
September 2008 200 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions the previous segment. This could result in more space at the corner than desired. Default: 0.0 n_endSegOffset Positive, signed integer or oating-point number that, together with the other offset arguments, lets you control whether there is a subrectangle in the corner of a segment. Species the offset of the last subrectangle in a segment from the edge of the master path. Does not apply to the last segment; the position of the last subrectangle in the last segment is determined by the value of the n_endOffset argument.
Segment 2
n_endSegOffset
Segment 1
If the segment ends before the full distance specied by n_endSegOffset , then n_endSegOffset is not applied, and a subrectangle could be placed at the corner of the subrectangle path. Default: 0.0 n_space Positive integer or oating-point number specifying the distance between the edges of adjoining rectangles. If not specied, the system uses the minSpacing rule for the subrectangle layer from the technology le. If the minSpacing rule is not dened in the technology le, rodCreatePath returns nil to indicate an error. Default: minSpacing for the subrectangle layer from the technology le Boolean value indicating whether or not the subrectangle(s) can be chopped. The value must be t or nil. When the master path is choppable, all subrectangles must be choppable. When the master path is not choppable, each set of subrectangles can be
g_choppable
September 2008
201
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions choppable or not. Default: t l_prop A list or lists of lists, where each list contains the name of a property and its value. When the property name is a string, enclose it in quotes. For a description of the valid data types, see the About the Add Property Form in the Virtuoso Layout Suite L User Guide . For Boolean properties, the value must be t or nil. For example, you would specify a single Boolean property as follows: ?prop list("myProp" t) and a list of properties as follows: ?prop list( list("myProp1" propValue1) list("myProp2" propValue2) ... list("myPropN" propValueN) ) For a more detailed description about specifying lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. Default: nil ?diagonal g_diagonalSubRect Optional keyword-value pair argument specifying whether to create subrectangles on diagonal portions of the path. When dened, this argument must appear at the end of the subrectangle argument list, after any list specifying connectivity, immediately prior to the closing parentheses. Setting this argument to t works only when diagonal path segments are 45 degrees and all subrectangles on the path are square. When specied, you must type the keyword, followed by t or nil. For example, type: ?diagonal t Default: nil
September 2008
202
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
For Boolean arguments, nil is a valid value, and the system uses it as such. The rodCreatePath Boolean arguments are: g_choppable g_pinLabel g_pin g_pinLabelDrafting
For non-Boolean arguments, specifying nil causes the system to use the default as it is dened in this document for that argument. Specifying nil is equivalent to not specifying a value for the argument. For the following Connectivity arguments, the default value is nil: S_netName S_termName g_pin
When you specify any of the arguments listed above as nil, it is equivalent to not specifying a value for the argument.
September 2008
203
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Specifying Pins
When you specify the g_pin argument, you must also specify the S_netName and/or S_termName argument with a value other than nil. If you specify g_pin but do not specify S_netName and/or S_termName with a value other than nil, the system ignores all connectivity arguments but does not report an error.
. . .
An example showing values for an enclosure subpath within a rodCreatePath function specication might look like this:
poly1EndOffset = -0.4 tfId = = techGetTechFile( pcCellView ) ?encSubPath list( list( ?layer "metal2" ?enclosure techGetParam( tfId "m1m2enc" ) ?beginOffset -.4 ?choppable nil
September 2008 204 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
) ; end of 1st enclosure subpath list( ?layer "poly1" ?enclosure .1 ?beginOffset 0 ?endOffset poly1EndOffset ?choppable nil ) ; end 2nd enclosure subpath ) ; end of 2nd enclosure subpath
2. For the rst path segment, offsets the edge of the rst subrectangle from the starting edge of the master path by the distance specied in n_beginOffset .
n_beginOffset = 2.0
September 2008
205
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions 3. Uses the value of n_space to compute the maximum number of subrectangles that t on grid in the segment, and the value of S_gap to determine what to do with excess space, as follows:
When S_gap equals distribute (the default), distributes the space as evenly as possible, in multiples of the grid space specied by mfgGridResolution.
When S_gap equals minimum, places subrectangles n_space apart until there is no space for another rectangle, then leaves the excess space after the last subrectangle in the segment.
September 2008
206
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Positions the rst subrectangle on the vertex of the subrectangle centerline with half its width towards the beginning of the segment.
Subrectangle vertex
One-half width
Repeats step 3.
5. For the last path segment, the system offsets the edge of the last subrectangle from the ending edge of the master path by the distance specied in n_endOffset . For the remaining subrectangles in the last segment, the system repeats step 3.
n_endOffset = 1.0
September 2008
207
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Segment 1
There are several reasons that you might want to keep subrectangles out of the corners of your subrectangle subpaths. For example, when you specify multiple subrectangle subpaths, placing rectangles in the corners of segments might cause individual subrectangles to be out of alignment vertically or horizontally with the subrectangles in the other subrectangle subpaths. If you do not want subrectangles in the corners of segments, you can keep them out by specifying the n_beginSegOffset and n_endSegOffset arguments. The system measures the n_beginSegOffset and n_endSegOffset values from the edge of the master path, as shown below.
Segment 2
Segment 2
Segment 1
September 2008
208
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions When specifying the segment offset arguments, keep in mind:
I
The n_beginSegOffset value does not apply to the rst segment; the position of the rst subrectangle in the rst segment is determined by the value of the n_beginOffset argument. The n_endSegOffset value does not apply to the last segment; the position of the last subrectangle in the last segment is determined by the value of the n_endOffset argument. The segment offset arguments work in combination with the n_beginOffset and n_endOffset arguments. If the segment begins before the full distance specied by the n_beginSegOffset argument, then n_beginSegOffset is not applied, and a subrectangle could be placed at the corner of the subrectangle subpath. If the segment ends before the full distance specied by the n_endOffset argument, then n_endOffset is not applied, and a subrectangle could be placed at the corner of the subrectangle subpath. When applying the offset options, the system will not create a spacing error. If the rst subrectangle in a subrectangle subpath segment would be too close to the last subrectangle in the previous segment, the system discards the last subrectangle in the previous segment.
When you specify the offset options, you need to check the results to make sure the corners are as desired. If they are not, you should change the values of the offset arguments and try again.
To change all of the shapes in a multipart path into separate, unrelated shapes, remove the name of the multipart path using the rodUnNameShape function.
Now the master path is a separate, unnamed path; each subpath is a separate, unnamed path; and each rectangle is a separate, unnamed shape. None of them is a ROD object, and there is no relationship between them.
September 2008
209
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
To make a shape into a ROD object, assign a unique name to the shape using the rodNameShape function. Each shape to which you assign a name is now a separate, unique ROD object.
Problem 3-7 Create a Master Path with an Offset Subpath to the Right on page 210
For additional code examples, including computing the resistance for a ROD path, see Code Examples on page 321. Problem 3-7 Create a Master Path with an Offset Subpath to the Right When you create an offset subpath, you determine its location by specifying its separation from the master path (n_sep ) and its justication (S_justification ). Assume that you are in a pcell. Create a three-segment master path on the nwell layer as shown in the following illustration, with the width equal to 0.6, end type flush, and the centerline on the following points: 2:2, 8:2, 8:6, 10:6. Make the master path choppable and name it p1. In the same statement, create an offset subpath 1.0 units to the right of the master path on the metal2 layer, with a width of 0.8. Let the offset of the subpath ends default to zero. You can also let the cellview ID (d_cvId ) default to the pcell variable pcCellView, because your statement is executed inside a pcell.
September 2008
210
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions The master path and offset subpath look something like this:
Y Direction of master path
Master path
Offset subpath
0:0
Solution 3-7 Create a Multipart Path with an Offset Subpath on the Right on page 293
September 2008
211
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodCreatePolygon
rodCreatePolygon( [?name ?layer [?pts [?cvId [?fromObj [?size [?prop S_name ] txl_layer l_pts ] d_cvId ] Rl_fromObj ] txf_size ] l_prop ]
; ROD Connectivity Arguments for Polygons [?netName S_netName ] [?termName S_termName ] [?termIOType S_termIOType ] [?pin g_pin ] [?pinAccessDir tl_pinAccessDir ] [?pinLabel g_pinLabel ] [?pinLabelHeight n_pinLabelHeight ] [?pinLabelLayer txl_pinLabelLayer ] [?pinLabelFont S_pinLabelFont ] [?pinLabelDrafting g_pinLabelDrafting ] [?pinLabelOrient S_pinLabelOrient ] [?pinLabelOffsetPoint l_pinLabelOffsetPoint ] [?pinLabelJust S_pinLabelJust ] [?pinLabelRefHandle S_pinLabelRefHandle ] ) ; end rodCreatePolygon => R_rodObj | nil
Description
Creates one polygon from a list of points or from one or more named objects. Also creates a ROD object containing information associated with the polygon, including its name and database ID. The associated ROD object is identied by a ROD object ID. The polygon is created at level zero in the hierarchy. You can assign a property name and value, or a list of property names and values, to the polygon. You can specify connectivity for the polygon by associating it with a specic terminal and net. You can also make the polygon into a pin.
September 2008
212
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions When you specify two or more existing named objects as the source for creating a polygon, as shown in the example below,
Source named objects Y
0:0
the system creates a four-sided, rectangular polygon based on a bounding box around all of the object(s). The new rectangular polygon is larger or smaller than the bounding box, depending on whether you specify a positive or negative size.
Generated ROD polygon txf_size is positive. Generated ROD polygon txf_size is negative.
0:0
0:0
Note: In the current release, no relationship exists between a generated polygon and its source object(s) after the new polygon is created.
September 2008
213
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions For a detailed overview of creating polygons from other objects, see Creating a Polygon from Another Object on page 95.
Arguments
S_name Character string or symbol specifying the name for the polygon. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark (). ROD converts symbols to character strings. The name must be unique for the cellview. When you do not specify a name, the system assigns a unique name, consisting of the prex polygon, followed by a number. For example, for the rst unnamed polygon in a cellview, the system assigns the name polygon0, if unique; for the second, polygon1, and so on. Default: polygonn txl_layer Text string, integer, or list specifying the layer or layer-purpose pair for the polygon, such as ?layer "metal1" ?layer 45 ?layer list("metal1" "drawing") Enclose string values in quotation marks. Do not use a symbol. For lists, use the following format: list( layer purpose ) Examples of layer-purpose pairs: ?layer list("metal1" "drawing") ?layer list(45 252) ?layer list(45 "drawing") ?layer list("metal1" 252) You are required to specify a layer. Default Purpose: drawing l_pts List of points dening the edges of the polygon. Specify a point for the beginning and end of the rst edge and the end of subsequent edges. The system creates a closed shape by connecting the rst and last points in the list. You cannot create a polygon with self-intersecting edges.
September 2008
214
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions The system discards duplicate points and excess collinear points without considering them errors. However, you must specify at least three noncoincident, noncollinear points. Coincident points have the same coordinate values. Collinear points are on the same line. If you specify more than two points on the same line, the system uses only the rst and last points specied. An example of excess collinear points is 0:10, 0:20, and 0:30, where the system discards 0:20. Use one of the following formats: list( x :y x :y ... ) or list( list(x y ) list(x y ) ... ) You must specify either l_pts or Rl_fromObj . If you specify both, the system ignores the l_pts argument. Default: none d_cvId Database ID for the cellview in which you are creating a ROD polygon. If the rodCreatePolygon statement occurs in the body of a pcDefinePCell function or tcCreateCDSDeviceClass function call, the default value is pcCellView or tcCellView, respectively; otherwise, this argument is required. Default: none ROD object ID or list of ROD object IDs identifying a named object or list of named objects that you want to use as a source for creating a new ROD polygon. The source objects can be instances, rectangles, polygons, paths, lines, dots, labels, and/or text-display objects. You must specify either the Rl_fromObj argument or the l_pts argument. If you specify both, the system ignores the l_pts argument. Default: none A signed integer, oating-point number, or Cadence SKILL language expression specifying the difference between the size of the source object (Rl_fromObj ) and the size of the generated polygon. When the source is more than one object, txf_size species the difference between a bounding box around all of the objects and the size of the generated polygon.
Rl_fromObj
txf_size
September 2008
215
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions A positive number creates a polygon that is larger than the source object(s); a negative number creates a polygon that is smaller than the source object(s). When you specify a SKILL expression, it must evaluate to a positive or negative integer or oating-point number. SKILL expressions are evaluated only when the new polygon is created. If you specify a source object (Rl_fromObj ) but do not specify txf_size , then txf_size defaults to 0.0. If you specify txf_size , you must also specify Rl_fromObj , or the system issues a warning message and the function fails. Default: 0.0 l_prop A list or lists of lists, where each list contains the name of a property and its value. When the property name is a string, enclose it in quotes. For a description of the valid data types, see the About the Add Property Form in the Virtuoso Layout Suite L User Guide . For Boolean properties, the value must be t or nil. For example, you would specify a single Boolean property as follows: ?prop list("myProp" t) and a list of properties as follows: ?prop list( list("myProp1" propValue1) list("myProp2" propValue2) ... list("myPropN" propValueN) ) For a more detailed description about specifying lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. Default: nil ROD Connectivity Arguments for Polygons The connectivity arguments for polygons are the same as the connectivity arguments for rectangles. See ROD Connectivity Arguments for Rectangles on page 229.
September 2008
216
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Value Returned
R_rodObj nil The ROD object ID for the polygon that was created. No polygon was created due to an error.
September 2008
217
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodCreateRect
rodCreateRect( [?name ?layer [?width [?length [?origin [?bBox [?elementsX [?elementsY [?spaceX [?spaceY [?cvId [?fillBBox [?fromObj [?size [?prop [?returnBoolean S_name ] txl_layer n_width ] n_length ] l_origin ] l_bBox ] x_elementsX ] x_elementsY ] n_spaceX ] n_spaceY ] d_cvId ] l_fillBBox ] Rl_fromObj ] txf_size ] l_prop ] g_returnBoolean ]
[ROD Connectivity Arguments ] [?subRectArray l_subrectArgs...] ) ; end of rodCreateRect => R_rodObj | t | nil ; ROD Connectivity Arguments for Rectangles [?netName S_netName ] [?termName S_termName] [?termIOType S_termIOType ] [?pin g_pin ] [?pinAccessDir tl_pinAccessDir ] [?pinLabel g_pinLabel ] [?pinLabelHeight n_pinLabelHeight ] [?pinLabelLayer txl_pinLabelLayer ] [?pinLabelFont S_pinLabelFont ] [?pinLabelDrafting g_pinLabelDrafting ] [?pinLabelOrient S_pinLabelOrient ] [?pinLabelOffsetPoint l_pinLabelOffsetPoint ] [?pinLabelJust S_pinLabelJust ] [?pinLabelRefHandle S_pinLabelRefHandle ] ;l_subrectArgs Subrectangle Arguments list( list( ?layer [?width [?length [?gap [?lowerLeftOffsetX
September 2008
218
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
[?lowerLeftOffsetY n_lowerLeftOffsetY ] [?upperRightOffsetX n_upperRightOffsetX ] [?upperRightOffsetY n_upperRightOffsetY ] [?spaceX n_spaceX ] [?spaceY n_spaceY ] [?prop l_prop ] ;Repeat ROD Connectivity Arguments here ) ;End of first subrectangle list ... ) ;End of all subrectangle lists ;End of l_subrectArgs
Description
Creates a single named rectangle, one or more rows and/or columns of named rectangles, or lls a bounding box with named rectangles, where each rectangle has ROD attributes. You create these named rectangles with the arguments S_name through g_returnBoolean . Each named rectangle is a separate object, created at level zero in the hierarchy. You can also create multipart rectangles by specifying one or more arrays of unnamed subrectangles for each named rectangle, where each unnamed subrectangle is an ordinary database shape, with no ROD attributes, created at level zero in the hierarchy. The named rectangles in a multipart rectangle are referred to as master rectangles . You can assign a property name and value (or a list of property names and values) to named rectangles and/or to any set of unnamed subrectangles. You can specify connectivity to associate named rectangles with the same terminal and net and to turn named rectangles into pins on a specied terminal and net. You can also specify connectivity for each set of unnamed subrectangles to associate it with a terminal and net and turn each subrectangle into a pin. Although a set of unnamed subrectangles is treated as a single shape, you can get a list of the database IDs for the individual subrectangles in the set by using the ROD object ID for the multipart path with the database access operator (~>) and the attribute name subShapes. For more information, see Accessing ROD Object Attributes on page 118. Note: When you want to create a single unnamed rectangle that is a regular database shape and has no ROD attributes, use the dbCreateRect function, documented in the Cadence Design Framework II SKILL Functions Reference . When you want to create a one- or two-dimensional array of unnamed rectangles that have no ROD attributes, use the rodFillBBoxWithRects function. Regular database shapes require less overhead, resulting in faster performance.
September 2008
219
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Arguments
S_name Character string or symbol specifying the name for the rectangle you want to create. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. The name must be unique for the cellview. If you do not assign a name, the system assigns a unique name, consisting of the prex rect, followed by a number. For example, for the rst unnamed rectangle in the cellview, the system assigns the name rect0; for the second rect1, and so on. Single row or column of rectangles : When you create a single row or column of rectangles, the system uses your specied name (or rectn if you did not specify a name) as a base and adds the sufx .n , where n starts at 1 and is increased by 1 for each rectangle in the row or column. For example, if you create a row of three rectangles (rectangles in the direction of the X axis) and assign the name polyRect, the system names the three rectangles polyRect.1, polyRect.2, and polyRect.3.
Y polyRect.1 polyRect.2 polyRect.3
September 2008
220
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions If you create a column of three rectangles (rectangles in the direction of the Y axis) and you do not assign a name, the system names the three rectangles rect0.1, rect0.2, and rect0.3.
Y rect0.3
rect0.2
rect0.1
Multiple rows and columns of rectangles : When you create multiple rows and columns of rectangles, the system uses your specied name as a base and adds the sufx .x.y, where .x.y is the number of the row and column. For example, if you specify three rows and four columns, the system names the rectangles as follows:
Y myName.1.3 or rect0.1.3 myName.4.3 or rect0.4.3
myName.1.1 or rect0.1.1 X
Default: rectn , rectn.n , rectn.x.y txl_layer Text string, integer, or list specifying the layer or layer-purpose pair for the rectangle(s), such as ?layer "metal1" ?layer 45 ?layer list("metal1" "drawing") Enclose string values in quotation marks. Do not use a symbol. For lists, use the following format: list( layer purpose )
September 2008 221 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Examples of layer-purpose pairs are ?layer list("metal1" "drawing") ?layer list(45 252) ?layer list(45 "drawing") ?layer list("metal1" 252) You are required to specify a layer. Default Purpose: drawing n_width Positive integer or oating-point number specifying the horizontal measurement of the rectangle, in user units.
n_width
The value of l_bBox overrides the value of n_width when you specify both. If you specify neither n_width nor l_bBox , the system uses the value of n_length . If you do not specify n_length , the system uses the value for minWidth, the minimum width rule for the specied layer, from your technology le. If you specify none of these and minWidth is not available, the function reports an error. Default: n_length if specied; otherwise the minimum width rule for the specied layer from your technology le n_length Positive integer or oating-point number specifying the vertical measurement of the rectangle, in user units.
n_length
The value of l_bBox overrides the value of n_length when you specify both. If you specify neither n_length nor l_bBox ,
September 2008
222
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions the system uses the value of n_width . If you do not specify n_width , the system uses the value for minWidth, the minimum width rule for the specied layer, from your technology le. If you specify none of these and minWidth is not available, the function reports an error. Default: n_width if specied; otherwise the minimum width rule for the specied layer from your technology le l_origin Single point or list of coordinates specifying the lower left corner of the rst rectangle; use one of the following formats: x :y or list(x y ) The value of l_bBox overrides the value of l_origin when you specify both. Default: 0:0 List of two points specifying opposite corners of a bounding box for the size of the rectangle. You can start the box in any corner. The system determines the location of the rst rectangle by using the difference between the coordinates for the specied opposite corners. Use one of the following formats: list( x :y x :y ) or list( list(x y ) list(x y )) Example 1 starts in the bounding box in the lower-left corner. list(3:3 30:15) or list( list(3 3) list(30 15))
Y 30:15
l_bBox
X
3:3 0:0 X
September 2008
223
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions list(3:15 30:3) or list( list(3 15) list(30 3))
Y 3:15
X
30:3
X
0:0 X
When you specify a rectangle size with l_bBox , the value of l_bBox overrides the values of n_width , n_length , and l_origin . Default: none x_elementsX Positive integer specifying the number of rectangles to create in a row parallel to the X axis. If you also specify l_fillBBox , x_elementsX species the maximum number of rectangles to create in the direction of the X axis. Default: 1 Positive integer specifying the number of rectangles to create in a column parallel to the Y axis. If you also specify l_fillBBox , x_elementsY species the maximum number of rectangles to create in the direction of the Y axis. Default: 1 Positive integer or oating-point number specifying the distance between the edges of rectangles in the direction of the X axis. This argument is ignored when a row contains only one rectangle.
Y n_spaceX
x_elementsY
n_spaceX
September 2008
224
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions If you do not specify n_spaceX , the system uses the value of n_spaceY. If you specify neither, the system uses the value for minSpacing, the minimum spacing rule for the specied layer, from your technology le. If you specied neither of these and minSpacing is not available, the function reports an error. Default: n_spaceY if specied; otherwise the minimum spacing rule for the specied layer from your technology le n_spaceY Positive integer or oating-point number specifying the distance between the edges of rectangles in the direction of the Y axis. This argument is ignored when a row contains only one rectangle.
Y
n_spaceY
If you do not specify n_spaceY, the system uses the value of n_spaceX . If you specify neither, the system uses the value of minSpacing, the minimum spacing rule for the specied layer, from your technology le. If you specied neither of these and minSpacing is not available, the function reports an error. Default: n_spaceX if specied; otherwise the minimum spacing rule for the specied layer from your technology le d_cvId Database ID for the cellview in which you are creating a rectangle. Default: pcCellView or tcCellView when a rodCreateRect statement occurs in the body of a pcDefinePCell function or tcCreateCDSDeviceClass function call, respectively; nil if no cellview ID is specied or found List of two points dening opposite corners of a bounding box to ll with rectangles, referred to as a fill-bounding box . The rst point species any corner and the second point species the opposite corner. Use one of the following formats:
l_fillBBox
September 2008
225
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions list( x :y x :y ) or list( list(x y ) list(x y )) You can specify the maximum number of rectangles the system creates in the ll-bounding box with x_elementsX and x_elementsY. If the number specied exceeds the space available in the ll-bounding box, the system creates only the number of rectangles that t. You can specify the distance between rectangles in the llbounding box with n_spaceX and n_spaceY. When you use l_bBox argument with l_fillBBox , the system uses the l_bBox coordinates only to compute the size of the rectangles . The system always places the rst rectangle in the lower-left corner of the fill-bounding box. For example, the following argument values dene a 14-by-10 llbounding box with its lower-left corner at 2:2:
?llBBox list( 2:2 16:12 ) ?bBox list( 0:0 4:2 ) ?spaceX 1.0 ?spaceY 2.0 The coordinates of the rst rectangle (0:0 4:2) are used to compute the size of the rectangles, not the location of the rst rectangle.
September 2008
226
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions The size of the rectangles is 4 units wide by 2 units long. The rectangles are spaced 1 unit apart in the direction of the X axis and 2 units apart in the direction of the Y axis.
Y 16:12
6:4
X X
2:2 X
The ll-bounding box is shown by a dashed line because no actual bounding box is created. Default: nil Rl_fromObj ROD object ID or list of ROD object IDs identifying a named object or list of named objects that you want to use as a source for creating a new named rectangle. The source objects can be instances, rectangles, polygons, paths, lines, dots, labels, and/or text-display objects. When you specify Rl_fromObj , the value of the Rl_fromObj argument overrides other arguments that directly or indirectly specied coordinates for the generated rectangle: n_width , n_length , l_origin , and l_bBox . Default: none A signed integer, oating-point number, or Cadence SKILL language expression specifying the difference between the size of the source object (Rl_fromObj ) and the size of the generated rectangle. When the source is more than one object, txf_size species the difference between a bounding box around all of the objects and the size of the generated rectangle. A positive number creates a rectangle that is larger than the source objects; a negative number creates a rectangle that is smaller than the source objects. When you specify a SKILL expression, it must evaluate to a positive or negative integer or oating-point number. SKILL expressions are evaluated only when the new rectangle is created.
September 2008 227 Product Version 6.1.3
txf_size
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions If you specify a source object (Rl_fromObj ) but do not specify txf_size , then txf_size defaults to 0.0. If you specify txf_size , you must also specify Rl_fromObj , or the system issues a warning message and the function fails. Default: 0.0 l_prop A list or lists of lists, where each list contains the name of a property and its value. When the property name is a string, enclose it in quotes. For a description of the valid data types, see the About the Add Property Form in the Virtuoso Layout Suite L User Guide . For Boolean properties, the value must be t or nil. For example, you would specify a single Boolean property as follows: ?prop list("myProp" t) and a list of properties as follows: ?prop list( list("myProp1" propValue1) list("myProp2" propValue2) ... list("myPropN" propValueN) ) For a more detailed description about specifying lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. Default: nil g_returnBoolean Boolean value indicating whether or not the rodCreateRect function returns a Boolean value or ROD object IDs. The value must be t or nil. When g_returnBoolean is t, the function returns t or nil. When g_returnBoolean is nil, the function returns a single ROD object ID or a list of ROD object IDs. When you are creating multiple rectangles, the rodCreateRect function executes much more quickly if g_returnBoolean is set to t, so when you do not need a list of ROD object IDs, set this argument to t. Default: nil A list containing one or more lists, each of which species the arguments for one set of unnamed subrectangles. Each list creates a set of unnamed subrectangles for each master
l_subRectArray
September 2008
228
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions rectangle in the multipart rectangle; each set of subrectangles is created in relationship to the lower-left corner of each master rectangle. For information about how to specify lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204.
Value Returned
The values returned by the rodCreateRect function is determined by how you specify the g_returnBoolean argument. When g_returnBoolean is set to t, the function returns t or nil. When g_returnBoolean is set to nil, the function returns a ROD object ID or list of ROD object IDs. When g_returnBoolean is set to nil and more than one rectangle is created, rodCreateRect returns a list of ROD object IDs with the upper right rectangle listed rst and the lower left rectangle listed last. For example,
("xxx.6.6" "xxx.5.6" "xxx.4.6" "xxx.3.6" "xxx.2.6" "xxx.1.6" "xxx.6.5" "xxx.5.5" "xxx.4.5" "xxx.3.5" "xxx.2.5" "xxx.1.5" "xxx.6.4" "xxx.6.3" "xxx.6.2" "xxx.6.1" "xxx.5.4" "xxx.5.3" "xxx.5.2" "xxx.5.1" "xxx.4.4" "xxx.4.3" "xxx.4.2" "xxx.4.1" "xxx.3.4" "xxx.3.3" "xxx.3.2" "xxx.3.1" "xxx.2.4" "xxx.2.3" "xxx.2.2" "xxx.2.1" "xxx.1.4" "xxx.1.3" "xxx.1.2" "xxx.1.1")
R_rodObj
ROD object ID or a list of ROD object IDs in descending sequence for ROD object information associated with the new rectangle or multiple new rectangles. Rectangles were created successfully. An error occurred, and no rectangles were created.
t nil
S_termName
September 2008
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions strings. If the terminal and net does not exist, the system creates them, naming them S_termName . If you specify both S_termName and S_netName , their names must be the same. If a terminal with the specied name already exists, the net it belongs to must have the same name. If the net name does not match the terminal name, the function reports an error. To associate the shape with a terminal and net, this argument is required. Default: none S_termIOType Character string or symbol specifying the direction type (I/O type) for the terminal. If S_termName is not specied, S_termIOType is ignored. If a terminal with the name specied by S_termName already exists, it must have the same direction type as specied by S_termIOType ; if the direction type is not the same, the function reports an error. Valid Values: input, output, inputOutput, switch, jumper Default: inputOutput Boolean value indicating whether or not to make the shape into a pin. The value must be t or nil. When you specify g_pin , you must also specify S_netName and S_termName ; if you do not, all connectivity arguments are ignored but no error is reported. When the value is t, the shape created is a pin. When the value is nil, the shape created is not a pin, and all other arguments containing the word pin are ignored. Valid Values: t, nil Default: nil Text string or list specifying the access directions for the pin. Enclose string values in quotation marks. Do not use a symbol. An example of a list is list( "top" "bottom" ) Valid Values: top, bottom, left right, any, none, or a list containing any of these values Default: any Boolean value indicating whether or not to add a text-display label for the pin. The value must be t or nil. When the value is t, the system creates a text-display label attached to the pin. The text is the contents the of the S_termName argument.
g_pin
tl_pinAccessDir
g_pinLabel
September 2008
230
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Valid Values: t, nil Default: nil n_pinLabelHeight Integer or oating-point number specifying the vertical height of the pin text-display label in user units. Default: 1 Text string, integer, or list specifying the layer or layer-purpose pair for the pin text-display label, such as ?pinLabelLayer "metal1" ?pinLabelLayer 45 ?pinLabelLayer list("metal1" "drawing") Enclose string values in quotation marks. Do not use a symbol. For lists, use the following format: list(layer purpose ) Examples of layer-purpose pairs are ?pinLabelLayer list("metal1" "drawing") ?pinLabelLayer list(45 252) ?pinLabelLayer list(45 "drawing") ?pinLabelLayer list("metal1" 252) When only the layer is specied, the purpose defaults to the purpose dened by l_layer. When neither layer nor purpose is specied, both layer and purpose default to the values dened by l_layer. Default: layer specied by l_layer ; purpose specied by l_layer S_pinLabelFont Character string or symbol specifying the name of the font for the pin text-display label. Valid Values: euroStyle, gothic, math, roman, script, stick, swedish Default: stick
txl_pinLabelLayer
g_pinLabelDrafting Boolean value indicating whether or not to rotate the pin textdisplay label more than 90 degrees. The value must be t or nil. When the value is t, the label can rotate 90 degrees or less. When the value is nil, the label can rotate 90 degrees or more. Valid Values: t, nil Default: t
September 2008
231
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions S_pinLabelOrient Character string or symbol specifying the orientation of the pin text-display label. Valid Values: 0 R0 MY sideways 90 R90 MYR90 sideways&90 180 R180 MX upsideDown 270 R270 MXR90 sideways&270 Default: R0
l_pinLabelOffsetPoint Single set of coordinates specifying the X and Y offset of the origin of the pin text-display label from a point handle on the rectangle. The label origin is specied by S_pinLabelJust , and the rectangle point handle is specied by S_pinLabelRefHandle . For example, to create a label on the rectangle polyRect, offset from the segment point handle mid2 by 2 units in the direction of the X axis and 0 units in the direction of the Y axis, specify 2:0.
S_pinLabelRefHandle equals mid2.
InOut0 polyRect
X
S_pinLabelJust equals lowerLeft.
Use one of the following formats: x :y or list(x y ) or any expression that evaluates to a list containing two numbers. Default: 0:0 S_pinLabelJust Character string or symbol specifying the origin point of the label. You must specify both words; do not abbreviate them.
232 Product Version 6.1.3
September 2008
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Valid Values: upperLeft lowerLeft upperCenter lowerCenter upperRight lowerRight centerLeft centerCenter centerRight Default: centerCenter S_pinLabelRefHandle Character string or symbol specifying the point handle on the rectangle with which you want to associate the origin point of the text-display label. You can specify the name of any bounding box or segment point handle. Bounding box point handle names: To specify a point handle on the bounding box of a rectangle, use either the two-word handle name or its two-character abbreviation, as shown in valid values. For example, you can use uL for upperLeft. Valid Values for bounding box point handles: upperLeft or uL lowerLeft or lL upperCenter or uC lowerCenter or lC upperRight or uR lowerRight or lR centerLeft or cL centerCenter or cC centerRight or cR Segment point handle names: To specify a point handle on a segment of a rectangle, use the system-dened name for the handle. Each segment has three system-dened point handles, named startn , midn , and endn , where n is the segment number, starting at zero. The last segment also has the following point handles: startLast, midLast, and endLast. The system numbers segments clockwise, starting with the lower-left corner as zero, no matter how the rectangle was created. For a complete description of system-dened point handles, see System-Dened Handles on page 19. Valid Values: start0, mid0, end0; start1, mid1, end1; start2, mid2, end2; startLast, midLast, endLast Default: the bounding box point handle centerCenter
September 2008
233
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
n_width
If not specied, the system uses n_length ; if neither is specied, the system uses the minWidth rule for the subrectangle layer from the technology le. If the minWidth rule is not dened in the technology le, rodCreateRect returns nil to indicate an error. Default: n_length if specied; otherwise minWidth for the subrectangle layer from the technology le n_length Positive integer or oating-point number specifying the vertical measurement of the subrectangle(s) in user units.
n_length
September 2008
234
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions If not specied, the system uses n_width ; if neither is specied, the system uses the minWidth rule for the subrectangle layer from the technology le. If the minWidth rule is not dened in the technology le, rodCreateRect returns nil to indicate an error. Default: n_width if specied; otherwise, minWidth for the subrectangle layer from the technology le S_gap Character string or symbol specifying the method the system uses to place subrectangles within each master rectangle. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. The system automatically calculates the maximum number of rectangles that t in the master rectangle, allowing for the space needed by the offset arguments, and using the value of the n_spaceX and n_spaceY arguments to determine the minimum space between subrectangles. When the value of S_gap is distribute, which is the default, the system distributes the space around subrectangles as evenly as possible, in multiples of the grid space specied by mfgGridResolution. Any remaining space is divided evenly and placed to the right and/or above each subrectangle. The following example shows excess space along the X axis.
Master rectangle
n_spaceY
n_spaceX
For distribute, excess space in the X direction is divided and placed to the right of each subrectangle. X
0:0
September 2008
235
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Note: When the value of S_gap is distribute and there is only one subrectangle, the system centers the subrectangle in the master rectangle, on grid. When the value of S_gap is minimum, the system places subrectangles n_spaceX and n_spaceY apart until there is no space for another subrectangle, then places all of the excess space to the right and/or above the rows/columns of subrectangles. The following example shows excess space along the X axis.
Master rectangle
n_spaceY For minimum, all excess space in the X direction is placed to the right of the rows of subrectangles.
n_spaceX 0:0 X
Valid Values: distribute, minimum Default: distribute n_lowerLeftOffsetX Signed integer or oating-point number specifying the offset along the X axis of the left edge of the lower-left subrectangle from the left edge of the master rectangle. A positive number
September 2008
236
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions starts the subrectangles to the right; a negative number starts the subrectangles outside the master rectangle.
Y Y
Default: 0 n_lowerLeftOffsetY Signed integer or oating-point number specifying the offset along the Y axis of the bottom edge of the lower-left subrectangle from the bottom edge of the master rectangle. A positive number starts the subrectangles above the bottom edge of the master rectangle; a negative number starts the subrectangles outside the master rectangle.
Y Y
n_upperRightOffsetX Signed integer or oating-point number specifying the offset along the X axis of the right edge of the upper-right subrectangle from the right edge of the master rectangle. A positive number
September 2008
237
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions starts the subrectangles outside of the master rectangle; a negative number starts the subrectangles to the left of the right edge of the master rectangle.
Y Y
upperRightX is +1.0
upperRightX is -1.0
0:0
0:0
n_upperRightOffsetY Signed integer or oating-point number specifying the offset along the Y axis of the top edge of the upper-right subrectangle from the top edge of the master rectangle. A positive number starts the subrectangles outside of the master rectangle; a negative number starts the subrectangles below the top edge of the master rectangle.
Y upperRightY is +2.0 Y upperRightY is -2.0
0:0
0:0
n_spaceX
Positive integer or oating-point number specifying the distance between the edges of subrectangles in the direction of the X axis. If not specied, the system uses the minSpacing rule for the subrectangle layer from the technology le. If the minSpacing rule is not dened in the technology le, rodCreateRect returns nil to indicate an error.
September 2008
238
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Default: minSpacing for the subrectangle layer from the technology le n_spaceY Positive integer or oating-point number specifying the distance between the edges of subrectangles in the direction of the Y axis. If not specied, the system uses the minSpacing rule for the subrectangle layer from the technology le. If the minSpacing rule is not dened in the technology le, rodCreateRect returns nil to indicate an error. Default: minSpacing for the subrectangle layer from the technology le
Examples
Example 1: Creating a Single Rectangle Note: When you want to create a rectangle that is a regular, unnamed database shape, use the dbCreateRect function instead of the rodCreateRect function; using dbCreateRect produces less overhead, resulting in faster performance. You can create a single named rectangle, with ROD attributes, as shown below:
n_length
n_width
September 2008
239
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Example 2: Creating Rows and Columns of Named Rectangles To create rows and columns of rectangles that are regular, unnamed database shapes, see Filling a Bounding Box with Rectangles on page 261. You can create rows and columns of named rectangles that have ROD attributes, as shown below:
Y
0:0
September 2008
240
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Example 3: Filling a Bounding Box with Named Rectangles To ll a bounding box with rectangles that are regular, unnamed database shapes, see Filling a Bounding Box with Rectangles on page 261. You can ll a bounding box with named rectangles that have ROD attributes, as shown below:
Y
10:8
1:1.5 0:0 X
with code similar to the following (the rst rectangle is always in the lower-left corner of the bounding box):
rodCreateRect( ?layer ?fillBBox ?spaceX ?returnBoolean ) "metal1" list( 1:1.5 10:5 ) 0.5 t
September 2008
241
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Example 4: Creating a Multipart Rectangle You can create a multipart rectangle consisting of a single master rectangle filled with unnamed subrectangles as shown below:
Y Master rectangle Upper-right offset in Y defaults to zero. 24:17 Excess space in Y is 2.0
Space in X is 3.3
Excess space in X equals 5.4, and is distributed between rectangles. 0:0 Lower-left offset in X is 3.3 Lower-left offset in Y is 3.0 X
with code similar to the following. In this example, S_gap is not specied; it defaults to distribute, causing the excess space to be placed between the subrectangles.
cvId = deGetCellView() rodCreateRect( ?layer ?width ?length ?origin ?elementsX ?elementsY ?cvId ?subRectArray list( list(
September 2008
242
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
?spaceY 3 ) ;End first subrectangle list ) ;End of all subrectangle lists ) ; end rodCreateRect
To place excess space to the right or above the subrectangles, you can specify the S_gap argument as minimum, as shown below.
Master rectangle
Space in Y is 3.0
0:0 Lower-left offset in X is 3.3 cvId = deGetCellView() rodCreateRect( ?layer ?width ?length ?origin ?elementsX ?elementsY ?cvId ?subRectArray list(
September 2008
243
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
list( ?layer "metal2" ?width 3 ?length 3 ?gap "minimum" ?lowerLeftOffsetX 3.3 ?lowerLeftOffsetY 3 ?upperRightOffsetX -6 ?spaceX 3.3 ?spaceY 3 ) ;End first subrectangle list ) ;End of all subrectangle lists ) ; end rodCreateRect
Example 5: Creating a Multipart Rectangle with Overlapping Subrectangles You can create a multipart rectangle with overlapping unnamed subrectangles, as shown below:
Y 14:14
X
0:0 X 2:2
with code similar to the following;, where the lower-left offset arguments are less than zero and the upper-right offset arguments are greater than zero:
cvId = deGetCellView() rodCreateRect( ?layer ?width ?length ?origin ?elementsX ?elementsY ?cvId ?subRectArray list( list(
?layer
September 2008 244
"metal2"
Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
?width 1 ?length 1 ?lowerLeftOffsetX -2 ?lowerLeftOffsetY -2 ?upperRightOffsetX 2 ?upperRightOffsetY 2 ?spaceX 1 ?spaceY 1 ) ;End first subrectangle list ) ;End of all subrectangle lists ) ; end rodCreateRect
Example 6: Creating a Ground Rail and Contacts You can create a ground rail with contacts, as shown below:
Y Master rectangle for power rail on metal1 layer First set of subrectangles on the pdiff layer
where with code similar to the following, you specify a named rectangle for the metal layer, a set of unnamed subrectangles on the p-diffusion layer, and a second set of unnamed subrectangles on the contact layer:
rodCreateRect( ?layer "metal1" ?width 10 ?length 2 ?origin list( 0 0 ) ?elementsX 1 ?elementsY 1 ?cvId cvId ?subRectArray list( list( ?layer ?width ?length ?gap
September 2008 245
"pdiff" 1 1 "minimum"
Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
?lowerLeftOffsetX 0.5 ?lowerLeftOffsetY 0.5 ) ;End of first subrectangle list list( ?layer "cont" ?width 0.5 ?length 0.5 ?gap "minimum" ?lowerLeftOffsetX 0.75 ?lowerLeftOffsetY 0.75 ?spaceX 1.5 ?spaceY 1.5 ) ;End of second subrectangle list ) ;End of all subrectangle lists ) ; end rodCreateRect
In this example, specifying the space arguments for the subrectangles is not necessary; the software uses the default values for the n_spaceX and n_spaceY arguments to create the number of contacts that t. However, if you want to an amount of space between contacts that is different than the default when the power rail is stretched, you do need to specify the space arguments. Example 7: Stretching a Multipart Rectangle The following examples include stretching the master rectangle of a multipart rectangle in the direction of the Y axis. To make the subrectangles regenerate correctly, specifying n_spaceY is necessary. The space arguments default to the minimum spacing (minSpacing) dened for the subrectangle layers in the technology le, which, in this case, does not produce the desired result. When you stretch a master rectangle using the Virtuoso Layout Editor Edit Stretch command, the system regenerates all sets of unnamed subrectangles. For example, stretching the master rectangle specied in the last example to the right, as shown below:
Y Stretching the master rectangle to the right.
0:0
makes the power rail longer, adding more contacts horizontally, like this:
September 2008
246
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
0:0
0:0
September 2008
247
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions makes the power rail wider, adding more rows of contacts vertically, like this:
Y
0:0
September 2008
248
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Example 8: Creating Multiple Master Rectangles Filled with Subrectangles For a multipart rectangle, you can create rows and columns of master rectangles and ll them with unnamed subrectangles, as shown below:
Y
0:0
?layer "metal2" ?width 1 ?length 0.75 ?lowerLeftOffsetX 0.5 ?lowerLeftOffsetY 0.5 ?upperRightOffsetX -0.5 ?upperRightOffsetY -0.5 ?spaceX 0.5 ?spaceY 0.5 ) ;End first subrectangle list ) ;End of all subrectangle lists ) ; end rodCreateRect
September 2008 249 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Example 9: Creating a Rectangle from Other Objects You can specify the coordinates of a named rectangle with the n_width , n_length , and l_origin arguments or with the l_bBox argument. Optionally, you can use the Rl_fromObj argument to specify one or more named objects from which to generate a named rectangle. When you specify two or more named objects as the source for creating a rectangle, as shown in the example below,
Source named objects Y
0:0
the system creates the rectangle based on a bounding box around the objects. The new rectangle is larger or smaller than the bounding box, depending on whether you specify a positive or negative size.
Generated ROD rectangle txf_size is positive. Generated ROD rectangle txf_size is negative.
0:0
0:0
Note: After a new rectangle is generated, no relationship exists between the generated rectangle and its source objects.
September 2008
250
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions For a detailed overview of creating rectangles from other objects, see Creating a Rectangle from Another Object on page 91.
Problem 3-8 Create One Rectangle with n_width and n_length on page 252 Problem 3-9 Create One Rectangle with l_bBox on page 252 Problem 3-10 Create a Multipart Rectangle with One Row/Column of Master Rectangles on page 253 Problem 3-11 Create a Multipart Rectangle with Multiple Rows/Columns of Master Rectangles on page 254 Problem 3-12 Fill a Bounding Box with Master Rectangles on page 255
When using rodCreateRect, you might want to use information from your technology le for the values of some arguments. For example, for the n_width argument, you can use the value of the design rule for minimum width. You can access design rules in several ways. The problems in this section access design rules by using defaults and by including techGetTechFile and techGetSpacingRule statements, when needed. For more detailed information about accessing design rules, see Using Design Rules in ROD Functions on page 309.
September 2008
251
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Problem 3-8 Create One Rectangle with n_width and n_length Assume that you are in a pcell, and create a rectangle named minMetal on the metal1 layer. Set the width equal to 3. Set the length equal to twice the minimum width. Use the techGetTechFile function to get the technology le ID, and set it equal to the variable tfId . Let the cellview ID (d_cvId ) default to the pcell variable pcCellView, because your statement is executed inside of a pcell.
Y Length is twice minWidth
X 0:0 Width is 3.
Solution 3-8 Create One Rectangle with n_width and n_length on page 294 Problem 3-9 Create One Rectangle with l_bBox Create a single rectangle similar to the way it was created for Problem 3-8 Create One Rectangle with n_width and n_length on page 252, but this time, use l_bBox to specify its size and location. Make the rectangle 6 wide by 3 long, with its origin point at the coordinates 2:2.
Y 8:5 Width is 6.
X
Length is 3.
X
2:2 X 0:0
September 2008
252
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
September 2008
253
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Problem 3-11 Create a Multipart Rectangle with Multiple Rows/Columns of Master Rectangles Inside a pcell, create rows and columns of master rectangles using polyRect as the base for the name, with ve along the X axis and four along the Y axis, using the layer-purpose pair poly and drawing. Set the origin of the rst rectangle to the coordinates 3:6. For the X axis, make the distance between the edges of rectangles equal to three greater than the minimum spacing for the poly layer. For the Y axis, make the distance between rectangles equal to six greater than the minimum spacing for the poly layer. This time, you need the technology le ID. The rectangles form rows and columns that looks like this:
Y polyRect.1.4 Minimum width for poly
X
3:6 0:0 polyRect.5.1 X
Solution 3-11 Create Multiple Rows and Columns of Rectangles on page 295
September 2008
254
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions repeat in the direction of the X and/or Y axis. The system creates rectangles starting in the lower left corner of the ll-bounding box. The system gives each rectangle a unique name, using the value of the S_name argument as a base, then adding a sufx for the row and column number, with periods in front of the row and column numbers. For example, if you specify polyRect as the base for the name, the system names the rectangle in the lower-left corner of the ll-bounding box polyRect.1.1. The system creates all rectangles at level zero in the hierarchy, so no additional hierarchy is created. Also, no bounding box is created. To specify the maximum number of rectangles along each axis, use the x_elementsX and x_elementsY arguments. To specify spacing between rectangles, use the n_spaceX and n_spaceY arguments. When you specify both spacing and number of elements, the system creates as many rectangles as t inside the bounding box without exceeding the numbers specied by the x_elements arguments. Problem 3-12 Fill a Bounding Box with Master Rectangles In a pcell, dene an 18-by-10 bounding box on the poly layer, offset from the coordinates 0:0 by 2 user units in both directions. Fill the box with master rectangles using polyRect as the base for the name and the minimum width for the poly layer. Make the distance between rectangles along the X and Y axes equal to 2.0 units. Let the cellview ID default to the variable pcCellView, because the statement is inside of a pcell. The ll-bounding box and rectangles look like this:
Y
polyRect.1.3
20:12
X
polyRect.5.3
polyRect.5.1
X
2:2 0:0 X
September 2008
255
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Problem 3-13 Partially Fill a Bounding Box with Master Rectangles On the metal1 layer in a pcell, ll a bounding box that is 18 units wide and 10 units long with master rectangles. Do not dene an offset for the ll-bounding box. Set the layer purpose to drawing. Fill the box with a maximum of 3 rectangles in the direction of the X axis and 2 rectangles in the direction of the Y axis. Specify the size of the rectangles as 2 units wide by 2 units long using the bounding box argument l_bBox . Set the distance between rectangles along the Y axis to the minimum design rule in the technology le for the metal1 layer. Make the distance between rectangles along the X axis twice as large as the spacing along the Y axis. The rectangles do not fill the bounding box. Let the cellview ID default to the variable pcCellView, because the statement is inside of a pcell.
Y
rect0.1.2
18:10 rect0.3.2
rect0.3.1
X
0:0
Solution 3-13 Partially Fill a Bounding Box with Rectangles on page 296 Problem 3-14 Overll a Bounding Box with Master Rectangles Fill an 18-by-10 bounding box with master rectangles on the metal1 layer, with no offset. Make the rectangles as wide and long as the minimum width for the metal1 layer. Specify a maximum of six rectangles in the direction of the X axis and four rectangles in the direction of the Y axis.
September 2008
256
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Set the distance between rectangles along the X axis to 2.5 and along the Y axis to 2.0. Let the cellview ID default to the pcell variable pcCellView. The bounding box and rectangles look like this:
Y
18:10
X
0:0
Solution 3-15 Create a Single Rectangle on a Terminal and Net on page 297
September 2008 257 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Looking at Properties You can look at the properties for ROD objects with the Virtuoso layout editor Edit Properties command.
X
IN0 trans1 minwidth
0:0
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodDeleteHandle
rodDeleteHandle( R_rodObj S_name ) ; end rodDeleteHandle => t | nil
Description
Deletes a user-dened handle. You provide the ROD object ID and handle name.
Arguments
R_rodObj ROD object ID for the named object for which you want to delete a handle. This argument is required. Character string or symbol specifying the name of the handle to delete. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. You cannot delete a system-dened handle. This argument is required. Valid Values: the name of any existing user-dened handle Default: none
S_name
Value Returned
t nil The handle was deleted successfully. An error occurred and no handle is deleted.
September 2008
259
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodFillBBoxWithRects
rodFillBBoxWithRects( ?cvId d_cvId ?layer txl_layer ?fillBBox l_fillBBox [?width n_width ] [?length n_length ] [?gap S_gap ] [?spaceX n_spaceX ] [?spaceY n_spaceY ] [?prop l_prop ] [?returnBoolean g_returnBoolean ] ) ; end rodFillBBoxWithRects => d_dbId | t | nil
Description
Fills a bounding box with rectangles, as many as t within the bounding box you specify. The rectangles are ordinary unnamed shapes, identied by database IDs; the rectangles have no ROD attributes. You can assign a property name and value, or a list of property names and values, to the set of rectangles. The property or list of properties apply to every rectangle in the bounding box. You specify the return value of the function to be Boolean or a list of the database IDs for the rectangles. When you want to create a one- or two-dimensional array of rectangles, and the rectangles do not need to be ROD objects, use this function instead of rodCreateRect because regular database shapes require less overhead, contributing to faster performance.
September 2008
260
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Figure 3-5 Filling a Bounding Box with Rectangles You can ll a bounding box with rectangles as shown below simply by dening the lower-left and upper-right points of the bounding box. Notice where the system places any excess space.
Y 12:6 Excess space equals 0.3.
n_spaceY is set to 0.7. 0:0 X Lower-left corner is at 1:1 cvId = deGetCellView() dbIdList = rodFillBBoxWithRects( ?cvId cvId ?layer "metal1" ?fillBBox list( 1:1 12:6 ) ?width 2.0 ?length 1.0 ?spaceX 0.7 ?spaceY 0.7 ?returnBoolean nil ) ; end rodFillBBoxWithRects
In the example above, the S_gap argument is not specied, so it defaults to distribute, causing excess space to be placed between the subrectangles. Therefore, the actual space between rectangles along the Y axis is 0.3 more than the minimum of 0.7 specied by the n_spaceY argument. The example code returns the variable dbIdList, which contains a list of 12 database IDs.
September 2008
261
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Figure 3-6 Filling a Bounding Box with Rectangles with Minimum Gaps You can ll the same bounding box specied above, but with the S_gap argument set to minimum, to create the rectangles shown below.
12:6 Y Excess space is placed above and to the right.
0:0 X Lower-left corner is at 1:1 cvId = deGetCellView() rc = rodFillBBoxWithRects( ?cvId cvId ?layer "metal1" ?fillBBox list( 1:1 12:6 ) ?width 2.0 ?length 1.0 ?gap "minimum" ?spaceX 0.7 ?spaceY 0.7 ?returnBoolean t ) ; end rodFillBBoxWithRects
The S_gap argument was set to minimum, so the system spaced the rectangles apart using the values of n_spaceX and n_spaceY, and placed the remaining space above and to the right of the rectangles.The example code returns the variable rc, which is set to t.
Arguments
d_cvId Database ID for the cellview in which you are creating rectangles. Valid Values: valid cellview ID Default: nil Text string, integer, or list specifying the layer or layer-purpose pair for the rectangle(s), such as
262 Product Version 6.1.3
txl_layer
September 2008
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions ?layer "metal1" ?layer 45 ?layer list("metal1" "drawing") Enclose string values in quotation marks. Use one of the formats dened for the argument txl_layer. You are required to specify a layer. Default Purpose: drawing l_fillBBox List of two points dening opposite corners of a bounding box to ll with rectangles. Valid Values: list of two points Default: nil Positive integer or oating-point number specifying the horizontal measurement of the rectangle(s) in user units. If not specied, the system uses n_length ; if neither is specied, the system uses the minWidth rule for the rectangle layer from the technology le. If the minWidth rule is not dened in the technology le, rodFillBBoxWithRects returns nil to indicate an error. Default: n_length if specied; otherwise minWidth for the rectangle layer from the technology le n_length Positive integer or oating-point number specifying the vertical measurement of the rectangle(s) in user units. If not specied, the system uses n_width ; if neither is specied, the system uses the minWidth rule for the rectangle layer from the technology le. If the minWidth rule is not dened in the technology le, rodFillBBoxWithRects returns nil to indicate an error. Default: n_width if specied; otherwise, minWidth for the rectangle layer from the technology le S_gap Character string or symbol specifying the method the system uses to place rectangles within the bounding box. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings.
n_width
September 2008
263
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions The system always uses the value of n_spaceX and n_spaceY for minimum space between rectangles and calculates the maximum number of rectangles that t in the bounding box. When the value of S_gap is distribute, the system distributes the space around rectangles as evenly as possible, in multiples of the grid space specied by mfgGridResolution. Any remaining space is placed to the right of the rows of rectangles and/or above the columns of rectangles. Note: When the value of S_gap is distribute and there is only room for one rectangle, the system centers the rectangle in the bounding box, on grid. When the value of S_gap is minimum, the system places rectangles n_spaceX and n_spaceY apart until there is no space for another rectangle, then places andy remaining space to the right of the rows of rectangles and/or above the columns of rectangles. Valid Values: distribute, minimum Default: distribute n_spaceX Positive integer or oating-point number specifying the distance between the edges of rectangles in the direction of the X axis. If not specied, the system uses the minSpacing rule for the rectangle layer from the technology le. If the minSpacing rule is not dened in the technology le, rodFillBBoxWithRects returns nil to indicate an error. Default: minSpacing for the rectangle layer from the technology le Positive integer or oating-point number specifying the distance between the edges of rectangles in the direction of the Y axis. If not specied, the system uses the minSpacing rule for the rectangle layer from the technology le. If the minSpacing rule is not dened in the technology le, rodFillBBoxWithRects returns nil to indicate an error. Default: minSpacing for the rectangle layer from the technology le
n_spaceY
September 2008
264
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions l_prop A list or lists of lists, where each list contains the name of a property and its value. When the property name is a string, enclose it in quotes. For a description of the valid data types, see the About the Add Property Form in the Virtuoso Layout Suite L User Guide . For Boolean properties, the value must be t or nil. For example, you would specify a single Boolean property as follows: ?prop list("myProp" t) and a list of properties as follows: ?prop list( list("myProp1" propValue1) list("myProp2" propValue2) ... list("myPropN" propValueN) ) For a more detailed description about specifying lists of lists, see Formatting List-of-Lists Arguments for Subparts on page 204. Default: nil g_returnBoolean Boolean value indicating whether or not the rodFillBBoxWithRects function returns a Boolean value or list of database object IDs. (This functions does not return a ROD object ID). The value of the g_returnBoolean argument must be t or nil. When g_returnBoolean is t, the function returns t or nil. When g_returnBoolean is nil, the function returns a list of database object IDs. When you are creating multiple rectangles, this function executes much more quickly if g_returnBoolean is set to t, so when you do not need the database object IDs, set this argument to t. Default: nil
Value Returned
The value returned by the rodFillBBoxWithRects function is determined by how you specify the g_returnBoolean argument. When g_returnBoolean is set to t, the function returns t or nil. When g_returnBoolean is set to nil, the function returns a database ID or list of database IDs. (This function does not return ROD object IDs.) When g_returnBoolean is set to nil and more than one rectangle is created,
September 2008
265
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions rodFillBBoxWithRects returns a list of database IDs with the upper right rectangle listed rst and the lower left rectangle listed last. The numbers in the illustration below show the sequence in which the database IDs of the rectangles would be returned.
Y 10 7 4 1
11
12 0:0
3 X
d_dbId
Database object ID or list of database object IDs (not the ROD object ID) for the rectangles created to ll the bounding box, in descending sequence. Rectangles were created successfully. An error occurred, and no rectangles were created.
t nil
September 2008
266
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodGetHandle
rodGetHandle( R_rodObj S_name ) ; end rodGetHandle => g_handleValue | nil
Description
Returns the value of a system- or user-dened handle. You specify the handle name and the ROD object ID for the object with which the handle is associated. For Boolean handles, the value can be either t or nil. When the value is nil, rodGetHandle returns an ambiguous result: nil could mean that the handle was not found or that the value of the handle is nil. To avoid ambiguity for Boolean handles, verify that the handle exists with the rodIsHandle function before you try to access it.
Arguments
R_rodObj S_name ROD object ID for the object with which the handle is associated. Character string or symbol specifying the name of the handle whose value is returned. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings.
Value Returned
g_handleValue The value of the handle. The values of point handles are fully transformed into the coordinate system of the top-level cellview. nil No handle was found, or, if the handle is Boolean, the handle value is equal to nil.
September 2008
267
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodGetNamedShapes
rodGetNamedShapes( d_cvId ) ; end rodGetNamedShapes => list( R_rodObj ... ) | nil
Description
Returns a list of the ROD object IDs for all named shapes (rectangles, polygons, and paths) at level zero in the hierarchy within the specied cellview that are ROD objects. This function looks only at the top level of hierarchy and does not return the ROD object ID for instances or cellviews.
Arguments
d_cvId Database ID for the cellview in which you want to identify named shapes that are ROD objects. If the rodGetNamedShapes statement occurs in the body of a pcDefinePCell function or tcCreateCDSDeviceClass function call, the default value is pcCellView or tcCellView, respectively; otherwise, this argument is required. Default: none
Value Returned
list( R_rodObj ... ) A list of the ROD object IDs for all named shapes in the specied cellview that are ROD objects. No ROD objects or other named shapes exist in the cellview, or an error occurred.
nil
September 2008
268
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodGetObj
rodGetObj( S_hierarchicalName | d_dbId [d_cellViewId ] ) ; end rodGetObj => R_rodObj | nil
Description
Lets you nd a named object at any level of hierarchy in your cellview. You must specify either the database ID for the object or its hierarchical name. If you specify the hierarchical name, you must also specify the cellview ID. When you specify a cellview ID, it is not necessary to also specify the database ID; however, if you specify both, the cellview ID must be correct for the database ID you specify. If your rodGetObj statement occurs in the code for a pcell (in the body of a pcDefinePCell function or tcCreateCDSDeviceClass function call), specifying the cellview ID is optional; if you do not specify it, the cellview ID defaults to pcCellView or tcCellView, respectively.
Arguments
S_hierarchicalName Character string or symbol specifying an object name, preceded by the names of the instances in the path to the object, separated by the slash character ( / ). If you specify this argument, you must specify the cellview ID as well, unless the statement is in the code for a pcell or device. When you specify a cellview ID, it is not necessary to also specify the database ID; however, if you specify both, the cellview ID must be correct for the database ID you specify. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. For this argument, an empty character string (null) is a valid value.
September 2008
269
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions For example, the hierarchical name for the shape polyRect shown below is mem/pTran/polyRect.
pTran polyRect
mem
An empty string ("") means that there is no named object; the function returns the ROD object ID for the cellview specied by d_cellViewId . Default: none. d_dbId Database ID for the object. If you specify this argument, you do not need to specify a cellview ID. However, if you specify both a database ID and a cellview ID, the cellview ID must be correct for the database ID you specify. ID for the top-level cellview that contains the object specied by the S_hierarchicalName or d_dbId argument. When S_hierarchicalName is specied as an empty string (""), specify the cellview for which you want the ROD object ID. This argument is required when you do not specify d_dbId , unless the rodGetObj statement is in the code for a pcell or device. If you specify this argument, you do not need to specify the database ID. However, if you specify both a database ID and a cellview ID, the cellview ID must be correct for the database ID you specify. Default: pcCellView or tcCellView when the rodGetObj statement occurs in the body of a pcDefinePCell function or tcCreateDeviceClass function call, respectively
d_cellViewId
Value Returned
R_rodObj nil ROD object ID for the object. An error occurred and no object was found.
September 2008
270
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Using rodGetObj
This section presents you with a few problems to solve using the rodGetObj function. To encourage you to think about or solve the problems yourself, the solutions are not presented until the end of this chapter.
I I I
Problem 3-17 Accessing Coordinates without Hierarchy on page 272 Problem 3-18 Accessing Coordinates through One Level of Hierarchy on page 272 Problem 3-19 Accessing Coordinates through Two Levels of Hierarchy on page 273
For more information about the ROD object ID (the value returned by the rodGetObj function), see About ROD Objects and ROD Object IDs on page 114. Note: Although you can access ROD object information about mosaics, in the current release you cannot descend into a mosaic or access anything within a mosaic. Transforming Coordinates through Hierarchy The following problems show how the system transforms a set of coordinates up through the hierarchy to the top-level layout cellview. This information applies to the rodGetObj and rodGetHandle functions and to queries made using the ROD object ID with the database access operator (~>) to access point handles on ROD objects. Note: In hierarchical names, be sure to use the instance name , not the cellview name. To get the ROD object ID for an object, you must provide either the database ID, or both the hierarchical name and cellview ID as input to the rodGetObj function. When the rodGetObj function is within the body of pcell code, you can use one of the following variables for the cellview ID:
I
The pcCellView variable when rodGetObj is in a pcDefinePCell statement. The pcDefinePCell function automatically sets the value of the pcCellView variable to the cellview ID. The tcCellView variable when rodGetObj is in a tcCreateCDSDeviceClass function call. The tcCreateDeviceClass function automatically sets the value of the tcCellView variable to the cellview ID.
For convenience, you might want to assign these internal variables to a variable with a shorter name, for example cv = pcCellView or cv = tcCellView
September 2008 271 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions You can access information about the attributes of ROD objects by using the ROD object ID and the database access operator (~>). For detailed information about how to do so, see Accessing ROD Object Attributes on page 118. Problem 3-17 Accessing Coordinates without Hierarchy The layout cellview AAA contains a shape named polyRect. The lower-left corner of polyRect is 3 units above and 3 units to the right of the coordinates 0:0 on the X and Y axes. The library name is rodTestLib. Assign the cellview ID for layout cellview AAA to the local variable cv and the coordinates of the lower-left corner of polyRect to the local variable point1. What is the value of point1?
Y Cellview AAA
polyRect
X
3:3 0:0 X
Solution 3-17 Accessing Coordinates without Hierarchy on page 298. Problem 3-18 Accessing Coordinates through One Level of Hierarchy The layout cellview BBB contains two instances of layout cellview AAA: IA1 and IA2. Each instance of AAA contains the shape polyRect. Instance IA1 is offset from the coordinates 0:0 by 6 units on the X axis and 3 units on the Y axis. Instance IA2 is offset from 0:0 by 66 units and 3 units, respectively. The origin of shape polyRect is offset from the origin of each instance by 3 units and 3 units.
September 2008
272
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Assign local variables point1 and point2 to the values of the lowerLeft point handles on the shape polyRect in instances IA1 and IA2, respectively. What are the values of point1 and point2?
Y IA1 of AAA
polyRect
polyRect
X
9:6 6:3 0:0
X
69:6 66:3
X
X
Solution 3-18 Accessing Coordinates through One Level of Hierarchy on page 298. Problem 3-19 Accessing Coordinates through Two Levels of Hierarchy The layout cellview CCC contains instance IB1 of layout cellview BBB, and instance IB1 contains instance IA1 of AAA. The named shape polyRect is in instance IA1. Instance IB1 is 3 units above and 6 units to the right of the coordinates 0:0. Instance IA1 is offset from the origin of IB1 by 6 units and 3 units. The shape polyRect is offset from the origin of IA1 by 3 units and 3 units, respectively.
September 2008
273
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Assign the value of the lowerLeft point handle for the shape polyRect to the local variable point1. What is the value of point1?
Y Cellview CCC
IB1 of BBB
IA1 of AAA
polyRect
X
15:9
X
12:6 6:3 0:0
Solution 3-19 Accessing Coordinates through Two Levels of Hierarchy on page 298.
September 2008
274
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodIsFigNameUnused
rodIsFigNameUnused( S_name [d_cvId ] ) ; rodIsFigNameUnused => t | nil
Description
Determines whether the name specied by S_name is a valid name and whether it is already assigned to a ROD object, instance, or mosaic in the cellview specied by d_cvId . A valid name cannot contain hierarchy (indicated by one or more slashes) and cannot be an empty string. You might want to verify whether a name is already assigned before you attempt to assign it to a shape with the rodNameShape function.
Arguments
S_name Character string or symbol specifying the name you want to verify as valid and not assigned to a ROD object, instance, or mosaic in the specied cellview. Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. This argument is required For example, you can type the characters testName as "testName" or as 'testName. Valid Values: any non-empty character string or symbol that does not contain a slash (/) Default: none d_cvId Database ID for the cellview in which you want to verify S_name . If the rodIsFigNameUnused statement occurs in the body of a pcDefinePCell function or tcCreateDeviceClass function call, the default value is pcCellView or tcCellView, respectively; otherwise, this argument is required. Default: none
September 2008
275
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Value Returned
t The name is a valid name and is not assigned to a ROD object, instance, or mosaic in the cellview identied by d_cvId . The name is either already assigned to a ROD object, instance, or mosaic in the cellview identied by d_cvId or is not a valid name.
nil
September 2008
276
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodIsHandle
rodIsHandle( R_rodObj S_name ) ; rodIsHandle => t | nil
Description
Determines whether the name specied for S_name identies a valid system- or userdened handle associated with the object specied by R_rodObj . Use this function prior to the rodGetHandle function when you want to verify that the handle exists before you try to access it.
Arguments
R_rodObj ROD object ID for the named object about which you are inquiring. This argument is required. Default: none Character string or symbol specifying the name you want to verify as the name of a valid system- or user-dened handle for the object identied by R_rodObj . Enclose character strings in quotation marks (""); precede symbols with a single quotation mark ('). ROD converts symbols to character strings. This argument is required. Valid Values: any text string, enclosed in quotation marks Default: none
S_name
Value Returned
t The name is a valid system- or user-dened handle for the object identied by R_rodObj . The name is not a valid system- or user-dened handle for the object identied by R_rodObj .
nil
September 2008
277
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodIsObj
rodIsObj( g_object ) ; rodIsObj => t | nil
Description
Determines whether the object specied for g_object identies a valid ROD object. This function is useful for testing variables and parameters to see if they contain a ROD object ID. For information about what happens to ROD object IDs when you do an Undo in a cellview, see ROD object ID changes after Undo on page 344.
Arguments
g_object Value of any data type. This argument is required. Default: none
Value Returned
t nil Examples The following examples show the results of using rodIsObj in several circumstances.
Example 1
The object is a valid ROD object. The object is not a valid ROD object.
Using rodCreateRect to create a rectangle results in a ROD object, and the function returns the ROD object ID. Assigning the result to the variable rect sets rect equal to the ROD object ID.
rect = rodCreateRect( ?cvId geGetEditCellView() ?layer "metal1" ) => rodObj:19984408
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Example 2
Testing anything other than a valid ROD object ID, such as a number, returns nil:
rodIsObj( 42 ) nil
Example 3
As in Example 1, above, the variable rect contains the ROD object ID for the new rectangle:
rect = rodCreateRect(?cvId cv ?name "r1" ?layer "metal1" ?width 5 ?length 10 ) ; end rodCreateRect => rodObj:23494680
However, if you select the ROD rectangle, move it, and then do an Undo, the variable rect no longer contains a ROD object ID.
rect rod:invalid rodIsObj(rect) nil
For more information about what happens when you do an Undo in a cellview that contains ROD objects, see ROD object ID changes after Undo on page 344.
September 2008
279
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodNameShape
rodNameShape( [?name ?shapeId [?permitRename ) ; rodNameShape => R_rodObj | nil S_name ] d_shapeId g_permitRename ]
Description
Assigns a name to an unnamed database shape or renames a ROD shape. Creates (or updates) a ROD object containing information associated with the shape, including its name and database ID. The associated ROD object is identied by a ROD object ID. Optionally, you can specify whether to rename an existing ROD object. Note: Instances and mosaics are not shapes. You cannot rename an instance or a mosaic with this function. You can refer to a named shape through hierarchy using its hierarchical name. You can also access system-dened handles associated with a named shape and create user-dened handles for a named shape. To assign a name to an unnamed shape, you must identify the shape by its database ID. You can specify a name that is unique within the cellview or let the system generate a name. If you attempt to assign a name to an object that already has a name, and the g_permitRename argument is set to nil, the system displays an error message. You can assign a property name and value, or list of property names and values, to the shape you are naming. For example, you could assign a Boolean property named myProp and a value of t or nil to the shape you are renaming. Before assigning a name, you might want to verify that the string is a valid name and that it has not already been used in the cellview. To do this, use the rodIsFigNameUnused function.
Arguments
S_name Character string or symbol specifying the name you want to assign to the shape. Enclose a character string in quotation marks (""); precede a symbol with a single quotation mark ('). ROD converts symbols to character strings. For example, to name an object polyrect, you can type the name as
September 2008
280
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions "polyrect" or as 'polyrect. The name must be unique for the cellview. The name cannot contain hierarchy, where hierarchy is indicated by one or more slashes. For example, at the lowest level in the hierarchy (zero-level), you can assign the name polyRect. You cannot assign a name with implied hierarchy, such as I1/I2/polyRect. When you do not specify a name, the system determines whether the shape is a rectangle, polygon, path, line, ellipse, donut, dot, label, and/or text-display object and assigns a name indicating the shape. For rectangles, the system assigns rect0 to the rst rectangle you name in the cellview, rect1 to the second, and so on. For polygons, the system assigns polygon0, polygon1, and so on; for paths, pathn . For an ellipse, donut, dot, line, label, and/or text-display object, the system assigns ellipsen , donut n , dotn , linen , labeln , or textn , respectively. For a shape other than these, the system issues a warning message and the function fails. Default: rectn , polygonn , pathn , ellipsen , donut n , dotn , linen , labeln , or textn , as determined by the system d_shapeId Database ID of unnamed shape or database ID of a ROD object (not the ROD object ID; instances and mosaics are not shapes.)This argument is required. A Boolean value specifying whether or not to rename the shape if it already has a name. The value must be t or nil. Default: nil
g_permitRename
Value Returned
R_rodObj ROD object ID for ROD object information associated with the newly named shape. An error occurred and no shape was named.
nil
September 2008
281
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
Naming Shapes
Normally, you create named rectangles and paths using the rodCreateRect, rodCreatePolygon, and rodCreatePath functions, so you do not need to name them. But if you want to assign a name and create ROD object information for a shape that was created with a database function, such as dbCreateRect, dbCreatePolygon, or dbCreatePath, you can do so with the rodNameShape function and the database ID of the shape. The dbCreate functions return the database ID of the newly created shape. If you are working interactively in the Virtuoso layout editor and the CIW and need the database ID for an unnamed shape, follow the steps below. Use variables to hold the value returned by each function. To get the database ID for a shape, do the following: 1. Select the shape in the layout cellview window. 2. To get the cellview ID for a selected shape in the active cellview window, type in the CIW
cv = deGetCellView()
3. To return a list of the database IDs for the selected shapes (in this case, only one shape), type in the CIW:
selset = geGetSelectedSet(cv)
4. To return the rst element in the list (even though there is only one element), type in the CIW:
dbId = car(selset)
Problem 3-20 Naming a Polygon Created by dbCreatePolygon in a Pcell The polygon shown in this problem was created inside a pcell with the dbCreatePolygon function. The dbCreatePolygon function returns the database ID of the new polygon. In this problem, the polygon ID is stored in the variable polyDbId .
September 2008
282
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Verify that the name testName is a valid name and that it has not been used in the cellview. Then assign the name testName to the unnamed polygon. Use a variable to save the value returned by the rodNameShape function.
Y Unnamed polygon
X 0:0
Solution 3-20 Naming a Polygon Created in a Pcell on page 299 Problem 3-21 Naming a Shape Created in the CIW and Layout Window You are working interactively in a layout cellview window and the CIW. You used the layout editor to create the ordinary, unnamed rectangle. Assign the name rectA to the shape, using variables for values returned by functions.
Y
Unnamed shape
X 0:0
Solution 3-21 Naming a Shape Created in the CIW and Layout Window on page 299
September 2008
283
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodPointX
rodPointX( l_point ) ;end rodPointX => n_num | nil
Description
Returns the X coordinate of the point specied by l_point .
Arguments
l_point A set of coordinates in one of the following formats: x :y or list(x y ). Default: none
Value Returned
n_num A signed integer or oating-point number that is the X coordinate of the point specied by l_point . No coordinate was returned due to an error.
nil
September 2008
284
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodPointY
rodPointY( l_point ) ;end rodPointY => n_num | nil
Description
Returns the Y coordinate of the point specied by l_point .
Arguments
l_point A set of coordinates in one of the following formats: x :y or list(x y ). Default: none
Value Returned
n_num A signed integer or oating-point number that is the Y coordinate of the point specied by l_point . No coordinate was returned due to an error.
nil
September 2008
285
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodSubPoints
rodSubPoints( l_point1 l_point2 ) ;end rodSubPoints => l_point | nil
Description
Subtracts l_point2 from l_point1 and returns the resulting point as l_point .
Arguments
l_point1 A set of coordinates in one of the following formats: x :y or list(x y ) Default: none A set of points in one of the following formats: x :y or list(x y ) Default: none
l_point2
Value Returned
l_point The point resulting from subtracting l_point2 from l_point1 . No point was subtracted due to an error.
nil
September 2008
286
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodUnAlign
rodUnAlign( R_rodObj1 [R_rodObj2 ] ) ;end rodUnAlign => t | nil
Description
When you specify only one ROD object ID, removes all alignments for the object specied. When you specify two ROD object IDs, removes only the alignment between the two objects.
Arguments
R_alignObj1 ROD object ID for the rst or only object for which you want to remove alignments. When R_alignObj2 is specied, only the alignments between the two objects are removed. When R_alignObj2 is not specied, all alignments for R_alignObj1 are removed. This argument is required. Default: none ROD object ID for the second object for which you want to remove alignments. When specied, only the alignment between R_alignObj2 and R_alignObj1 are removed. Default: none
R_alignObj2
Value Returned
t nil The alignment constraints were removed successfully. An error occurred and no alignment constraints were removed.
September 2008
287
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions 1. Set the variable cvId equal to the desired cellview ID by using your library name for library and your cell name for cell .
cvId = dbOpenCellViewByType( "library " "cell " "layout" )
September 2008
288
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodUnNameShape
rodUnNameShape( Rl_rodObj ) ; rodUnNameShape => t | nil
Description
Removes the name from a named shape or list of named shapes. The ROD object ID for the shape and all user-dened handles associated with it are deleted. If the object is an instance, the instance keeps its name but all user-dened handles associated with the instance are deleted. Also removes all alignment constraints that reference the shape.
Arguments
Rl_rodObj ROD object ID or list of ROD object IDs that identies the named shape for which you want to remove the name. Default: none
Value Returned
t The name(s) of the shape(s) was removed and all alignment constraints that reference the shape(s) were deleted. An error occurred and no changes were made to the shape(s).
nil
September 2008
289
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
; procedure( ExUnNameAll( cvId ) prog( ( shapelist shape rodId ) ; Get list of all shapes in cellview shapelist = cvId~>shapes if( shapelist then ; For each shape in the cellview,get rodID foreach( shape shapelist rodId = rodGetObj( shape ) ; if it has a rodId (ie., is a ROD object) ; then remove its ROD name if( rodId then rodUnNameShape( rodId ) ) ;end if rodId ) ;end foreach ) ;end if shapelist ) ;end prog ) ;end procedure
Solutions to Problems
Here are solutions to the problems presented in this chapter. Solutions for rodAlign on page 290 Solutions for rodCreateHandle on page 292 Solutions for rodCreatePath on page 293 Solutions for rodCreateRect on page 294 Solutions for rodGetObj on page 298
For the rodGetObj function, you let the cellview ID default to the local variable pcCellView, because the statement is in the body of pcell code.
September 2008 290 Product Version 6.1.3
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions There is no separation between the lowerLeft point handle and the reference point because the txf_xSep and txf_ySep arguments defaulted to zero. You can align a named object directly to a specic point by specifying a value for the reference point argument l_refPoint . When you specify a reference point, you do not have to specify a reference object (R_refObj ) and a reference handle (S_refHandle ). If you specify a reference point and also specify a reference object (with or without specifying a reference handle), the value of the reference point overrides the values for reference object and reference handle. Return to Problem 3-1 Aligning an Object to a Point on page 150. Solution 3-2 Aligning Two Rectangles at the Same Level of Hierarchy
cvId = deGetCellView() rodAlign( ?alignObj ?refObj ) ;end of rodAlign rodGetObj("polyRect" cvId) rodGetObj("activeRect" cvId)
To get the ROD object IDs for polyRect and activeRect using the rodGetObj function, you need the cellview ID. The reference handle arguments (S_refHandle and S_alignHandle ) default to the value centerCenter for both rectangles, so the center of polyRect is aligned to the center of the reference object activeRect. The txf_xSep and txf_ySep arguments default to zero, so the centers of the two rectangles are on the same point. The g_maintain argument defaults to t, so this alignment is maintained. Return to Problem 3-2 Aligning Two Rectangles at the Same Level of Hierarchy on page 151. Solution 3-3 Moving an Object with rodAlign
rodAlign( ?alignObj ?alignHandle ?refObj ?refHandle ?ySep ?maintain ) ;end of rodAlign rodGetObj("boundary") "lowerCenter" rodGetObj("activeRect") "upperLeft" 6.0 nil
When you specify g_maintain as equal to nil, the alignment operation behaves like a move. No alignment information is saved after the rodAlign function completes. Return to Problem 3-3 Moving an Object with rodAlign on page 151. Solution 3-4 Aligning Objects at Different Levels in the Hierarchy
tfId = techGetTechFile( pcCellView )
September 2008
291
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
rodAlign( ?alignObj rodGetObj("nTran1/rect0") ?alignHandle "centerRight" ?refObj rodGetObj("nTran2/rect0") ?refHandle "centerLeft" ?xSep "-techGetSpacingRule(tfId \"minSpacing\" \"metal1\")" ) ;end of rodAlign
The rectangles were specied by their hierarchical names nTran1/rect0 and nTran2/ rect0. Separation along the Y axis defaulted to zero. Separation along the X axis is negative, so the aligned object is moved to the left of the reference object by the distance specied in the minSpacing rule for the metal1 layer. The alignment will be maintained because the g_maintain argument defaulted to t. The techGetSpacingRule expression is enclosed in quotation marks so that whenever the minSpacing rule for the metal1 layer changes in your technology le, the system updates the alignment using the new rule. If you do not enclose the whole expression in double quotations marks, the system evaluates the expression immediately and uses the result from then on. Be sure to include a backslash in front of each double quotation mark within the string to prevent the system from interpreting it as the end of the string. For more detailed information about accessing design rules, see Using Design Rules in ROD Functions on page 309. Return to Problem 3-4 Aligning Objects at Different Levels in the Hierarchy on page 152.
First, you need the ROD object ID for the cellview, and to get it, you need the cellview ID. You can use dbOpenCellViewByType to get the cellview ID. Get the ROD object ID for the cellview with rodGetObj, where the name of the cellview is represented by a null string. Return to Problem 3-5a Creating a Point Handle for a Cellview on page 178.
September 2008
292
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Solution 3-5b Querying a Point Handle for a Cellview
cvId2 = dbOpenCellViewByType( "cellLib" "BBB" "layout" ) rodId = rodGetObj( "IA1" cvId2 ) origin = rodID~>originAAA
or
origin = rodGetObj( "IA1" cvId2 )~>originAAA
First, get the ID for cellview BBB. Then either set a variable equal to the ROD object ID for cellview BBB and query the variable, or perform both actions in a single statement. The value of originAAA in the coordinate system of cellview BBB is 3:3. Return to Problem 3-5b Querying a Point Handle for a Cellview on page 179. Solution 3-6 Querying a System-Assigned Handle Name
cvId = dbOpenCellViewByType( "cellLib" "myCell" "layout" ) rodId = rodGetObj( "" cvId ) rodId~>userHandleNames
You can use the database access operator (~>) and the ROD object ID to query the value of ROD object attributes. The last name assigned by the system to a user-dened handle is at the end of the list of user handle names. Return to Problem 3-6 Querying a System-Assigned Handle Name on page 179.
) ; end rodCreatePath
September 2008
293
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions For both the master path and the offset path, the layer purpose defaults to drawing. The master path is choppable because g_choppable defaults to t. Because S_justification is set to right, the offset subpath appears on the right side of the master path, relative to the direction of the master path. Return to Problem 3-7 Create a Master Path with an Offset Subpath to the Right on page 210.
The layer purpose defaults to drawing. To use minimum width in a calculation, you must refer to the technology le rule for minimum width directly. Do this by using the techGetSpacingRule function with the standard user-dened name for minimum width, minWidth, and the layer name, metal1. Let the origin of the rectangle default to 0:0. Return to Problem 3-8 Create One Rectangle with n_width and n_length on page 252. Solution 3-9 Create One Rectangle with l_bBox
tfId = techGetTechFile( pcCellView ) rodCreateRect( ?name "minMetal" ?bBox list( 2:2 8:5 ) ?layer "metal1" ) ; end of rodCreateRect
The rectangle is 6 by 3 with its origin at 2:2, and the upper-right corner is at 8:5. Return to Problem 3-9 Create One Rectangle with l_bBox on page 252. Solution 3-10 Create a Single Row or Column of Rectangles
rodCreateRect( ?name ?layer "minMetal" "metal1"
September 2008
294
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
?elementsX 9 ) ; end of rodCreateRect
Because the rectangle width and space between rectangles was not specied, the system automatically retrieves the minimum width and minimum design rules for the metal1 layer from your technology le. Return to Problem 3-10 Create a Multipart Rectangle with One Row/Column of Master Rectangles on page 253. Solution 3-11 Create Multiple Rows and Columns of Rectangles
tfId = techGetTechFile( pcCellView ) rodCreateRect( ?name "polyRect" ?layer "poly" ?elementsX 5 ?elementsY 4 ?origin list( 3 6 ) ?spaceX techGetSpacingRule( tfId "minSpacing" "poly" ) + 3 ?spaceY techGetSpacingRule( tfId "minSpacing" "poly" ) + 6 ) ; end of rodCreateRect
For rectangle size, let the system use the minimum width for the poly layer from the technology le for both width and length. Set a local variable equal to the technology le ID. Use the techGetSpacingRule function to get the minimum space between rectangles for the poly layer. Let the cellview ID default to the variable pcCellView, because the statement is executed inside of a pcell. Return to Problem 3-11 Create a Multipart Rectangle with Multiple Rows/Columns of Master Rectangles on page 254. Solution 3-12 Fill a Bounding Box with Rectangles
rodCreateRect( ?name ?layer ?fillBBox ?spaceX ) ; end of rodCreateRect "polyRect" "poly" list( 2:2 20:12 ) 2.0
Let the rectangle width and length default to the minimum design rules in the technology le for the poly layer and the distance between rectangles along the Y axis default to the value of the n_spaceX argument. The layer purpose defaults to drawing. Return to Problem 3-12 Fill a Bounding Box with Master Rectangles on page 255.
September 2008
295
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Solution 3-13 Partially Fill a Bounding Box with Rectangles
tfId = techGetTechFile( pcCellView ) rodCreateRect( ?fillBBox list( 0:0 18:10 ) ?layer list( "metal1" "drawing" ) ?elementsX 3 ?elementsY 2 ?bBox list( list(0 0) list(2 2)) ?spaceY techGetSpacingRule( tfId "minSpacing" "metal1" ) ?spaceX techGetSpacingRule( tfId "minSpacing" "metal1" ) * 2 ) ; end of rodCreateRect
This is the rst time rectangles were created in the cellview, so the names of the rectangles default to rect0.x.y. The system did not use the values for l_bBox to determine the location of the rst rectangle because using the l_fillBBox argument always causes the rst rectangle to be placed in the lower-left corner of the ll-bounding box. Use the techGetSpacingRule function to retrieve the minimum design rule for the metal1 layer. Return to Problem 3-13 Partially Fill a Bounding Box with Master Rectangles on page 256. Solution 3-14 Overll a Bounding Box with Rectangles
rodCreateRect( ?fillBBox list( 0:0 18:10 ) ?layer "metal1" ?elementsX 6 ?elementsY 4 ?spaceX 2.5 ?spaceY 2.0 ) ; end of rodCreateRect
This is the second time rectangles were created in the cellview, so the names of the rectangles default to rect2.x.y. When you use the l_fillBBox argument, the system always places the rst rectangle in the lower-left corner of the ll-bounding box. The width and length of the rectangles defaults to the minimum width for the metal1 layer from the technology le, which is 2.0. The number of rectangles specied with the n_elements arguments, combined with the distance between them, exceeds the space in the ll-bounding box, so the system creates only as many rectangles as fit inside the box . In this case, the system creates four columns and three rows of rectangles. Return to Problem 3-14 Overll a Bounding Box with Master Rectangles on page 256.
September 2008
296
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Solution 3-15 Create a Single Rectangle on a Terminal and Net
rodCreateRect( ?name ?layer ?termName ?termIOType ) ; end of rodCreateRect "termFig" "metal1" "Aout" "output"
The layer purpose defaults to drawing. The origin of the rectangle defaults to 0:0. The rectangle termFig is now associated with the terminal and net Aout. Return to Problem 3-15 Create a Single Named Rectangle on a Terminal and Net on page 257. Solution 3-16 Create a Rectangular Pin
tfId = techGetTechFile( pcCellView ) localMinWidth = techGetSpacingRule( tfId "minWidth" "poly" ) ptUR = rodGetObj( "trans1" )~>upperRight rodCreateRect( ?name ?pin ?termName ?layer ?pinLabel ?bBox "polyPin" t "InOut0" list( "poly" "pin" ) t
rodPointY( ptUR ) - localMinWidth ) ; list for value of lower-left corner ptUR ; value of upper-right corner ; end of bBox list of points ) ; end of rodCreateRect
First, the technology le ID is set equal to the variable tfId, and the local variable localMinWidth is set equal to the minimum width rule from the technology le for the poly layer. Then, the local variable ptUR is set equal to the coordinates of the upper-right corner of the bounding box around the object trans1, using the rodGetObj function. The upperright corner of the pin has the same coordinates. In the rodCreateRect statement, set the g_pin argument to t for true to create a pin. Let the pin access direction default to inputOutput. Set g_pinLabel to t to create a pin textdisplay label. The text of the label is the contents of the S_termName argument, InOut0. The location of the origin of the text-display label defaulted to centerCenter. Next, compute the coordinates for the lower-left corner of the pin bounding box as follows:
I
To compute the X coordinate, use the rodAddToX function to subtract the minimum width for the poly layer from the X coordinate of ptUR.
297 Product Version 6.1.3
September 2008
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions
I
To compute the Y coordinate, use the rodAddToY function to subtract the minimum width for the poly layer from the Y coordinate of ptUR.
For the upper-right corner of the pin bounding box, use the value of the ptUR variable, the same point as the upper-right corner of trans1. Return to Problem 3-16 Create a Rectangular Pin on page 258.
There is no hierarchy in layout cellview AAA. First, you used the database function dbOpenCellViewByType to get the cellview ID for AAA. Then you got the ROD object ID for the object polyRect and used the database access operator (~>) to retrieve the system-dened point handle for the lower-left corner. The lowerLeft point handle is at 3:3, so point1 = 3:3. Return to Problem 3-17 Accessing Coordinates without Hierarchy on page 272. Solution 3-18 Accessing Coordinates through One Level of Hierarchy
cv = dbOpenCellViewByType( "rodTestLib" "BBB" "layout" "maskLayout" "a" ) point1 = rodGetObj( "IA1/polyRect" cv )~>lowerLeft point2 = rodGetObj( "IA2/polyRect" cv )~>lowerLeft
There is one level of hierarchy. The coordinates of the lower-left corner of polyRect are 9:6 for instance IA1 and 69:6 for instance IA2, so point1 = 9:6 and point2 = 69:6. Return to Problem 3-18 Accessing Coordinates through One Level of Hierarchy on page 272. Solution 3-19 Accessing Coordinates through Two Levels of Hierarchy
cv = dbOpenCellViewByType( "rodTestLib" "CCC" "layout" "maskLayout" "a" ) point1 = rodGetObj( "IB1/IA1/polyRect" cv )~>lowerLeft
September 2008
298
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions There are two levels of hierarchy. The coordinates of the lower-left corner of polyRect are 15:9, so point1 = 15:9. Return to Problem 3-19 Accessing Coordinates through Two Levels of Hierarchy on page 273.
To verify whether the name testName has already been used in the cellview, you need the cellview ID. The local variable polyDbId was set equal to the database ID for the polygon when it was created, so you can use polyDbId in your rodNameShape statement. You can specify a name as a character string enclosed in quotation marks or as a symbol preceded by a single quotation mark ('). The rodNameShape function returns the ROD object ID for the shape you named. Return to Problem 3-20 Naming a Polygon Created by dbCreatePolygon in a Pcell on page 282. Solution 3-21 Naming a Shape Created in the CIW and Layout Window
cvId = deGetCellView() selSet = geGetSelectedSet(cvId) dbId = car(selSet) rectRodId = rodNameShape(?name "rectA" ?shapeId dbId)
First, you must select the unnamed shape in the active cellview window by clicking on it. Then, get the cellview ID (cvId) using deGetCellView(). Use cvId with geGetSelectedSet to return a list of the database IDs for all objects in the selected set (in this case, just one object).
September 2008
299
Virtuoso Relative Object Design User Guide Using Relative Object Design Functions Use the variable containing the list of database IDs (selSet) with the car Cadence SKILL language function to get the rst database ID in the list (dbId). Use dbId to identify the shape you want to rename with rodNameShape. Return to Problem 3-21 Naming a Shape Created in the CIW and Layout Window on page 283.
September 2008
300
A
Using Environment Variables with ROD
There are a number of environment variables that inuence how Virtuoso relative object design (ROD) functionality works. The following table describes these environment variables. Table A-1 Environment Variables That Inuence ROD Variable constraintAssistedMode Default t Description Virtuoso XL Layout Editor environment variable that controls Constraint Assisted Mode . When on, you cannot edit stretchable pcells by stretching their handles. To stretch pcell handles, turn it off. You can turn it off on the Layout XL Options form. Boolean graphic and Virtuoso layout editor environment variable that controls whether stretch handles are displayed in layout cellviews. Boolean ROD environment variable that determines where a single subrectangle is placed by the rodCreatePath function when the value of S_gap is distribute. When nil, the subrectangle is offset as specied by n_beginOffset and n_endOffset . When t, the subrectangle is centered (but placed on grid), and n_beginOffset and n_endOffset are ignored.
displayStretchHandles
distributeSingleSubRect
nil
September 2008
301
Virtuoso Relative Object Design User Guide Using Environment Variables with ROD Table A-1 Environment Variables That Inuence ROD, continued Variable permitMPPSelfAbut Default nil Description Boolean ROD environment variable that determines whether you can create self-abutting paths (paths that double back along their own long edges, creating a border point array containing sequential coincident points). When set to the default of nil, you are not allowed to create self-abutting paths; when set to t, you can create self-abutting paths. Boolean ROD environment variable specifying whether alignment between ROD objects is preserved or broken when a ROD object is moved or modied. Boolean ROD environment variable specifying whether, when you open a cellview containing aligned ROD objects in read-only mode, the system displays a warning in the CIW stating that alignments in the design data might not be current. String layout editor environment variable specifying whether rectangles, polygons and/or shape pins are created as ROD objects. You can assign a name to the shape in the Create form or let the system assign a name. Specify one or more of the following valid values: rectangle, polygon, or pin String graphic editor environment variable that controls the layer and purpose for displaying stretch handles. The default is the y0 layer and drawing purpose.
preserveAlignInfoOn
readCellviewWarningOn
nil
rodAutoName
none
stretchHandlesLayer
y0 drawing
September 2008
302
Virtuoso Relative Object Design User Guide Using Environment Variables with ROD Table A-1 Environment Variables That Inuence ROD, continued Variable traceTriggerFunctionsOn Default nil Description Boolean ROD environment variable controls the printing of trace messages for debugging. You might turn on this variable when you encounter a problem that requires customer support. Floating-point layout editor environment variable that controls how often the system updates pcell parameters and regenerates the pcell during a stretch operation. The default is at every grid snap, as dened by the technology le variable mfgGridResolution.
updatePCellIncrement
For a description of how to set graphic editor and layout editor environment variables, see Environment Variable Functions in the Custom Layout SKILL Functions Reference . For a description of the XL environment variables, see Setting Environment Variables in the Virtuoso XL Layout Editor User Guide .
September 2008
303
Virtuoso Relative Object Design User Guide Using Environment Variables with ROD
For example:
envGetVal( "rod" "preserveAlignInfoOn" )
2. If the variables are not dened in your ~/.cdsenv le, the system looks for the systemdened default settings in the following le:
your_install_dir /etc/tools/rod/.cdsenv
In the CIW, set the value of the variable with the following statement:
envSetVal("rod" "variable_name " data_type value )
where variable_name is the name of the variable. The backwards tick mark ( ) in front of data_type is necessary. It tells the system not to interpret the value of the argument, but to use it literally, as a data type. For example:
envSetVal("rod" "preserveAlignInfoOn" boolean nil)
September 2008
304
Virtuoso Relative Object Design User Guide Using Environment Variables with ROD Changing Settings for Environment Variables in ~/.cdsenv You can add ROD environment variables to the .cdsenv le in your home directory by typing them or by copying them from the .cdsenv le in the samples directory in your Cadence hierarchy. Note: Do not copy lines from the rod/.cdsenv le to the .cdsenv le in your home directory. The le formats are slightly different, so the lines that result from copying do not work. The ROD environment variable settings should look like this in your ~/.cdsenv le:
rod rod preserveAlignInfoOn traceTriggerFunctionsOn boolean boolean value value
where value is equal to t or nil. If you do not have a .cdsenv le in your home directory, you can copy the .cdsenv le from the samples directory in your local Cadence hierarchy to your home directory and modify it. Copying Variables from the Samples Directory to ~/.cdsenv To copy ROD environment variables from the samples directory to the ~/.cdsenv le in your home directory, do the following: 1. In one window, open your ~/.cdsenv le. 2. In another window, open your_install_dir /dfII/samples/.cdsenv where your_install_dir is the path to your Cadence hierarchy. 3. In the samples/.cdsenv le, search for rod and then for the variable name, such as preserveAlignInfoOn. 4. Copy the setting for the ROD environment variable and paste it into the .cdsenv le in your home directory. 5. If desired, change the setting. 6. Save your ~/.cdsenv le. 7. To use the settings in future sessions, save the settings with Save Defaults on the Options menu in the CIW.
September 2008
305
Virtuoso Relative Object Design User Guide Using Environment Variables with ROD
September 2008
306
B
Accessing the Cellview ID
You do not need to supply the cellview ID as an argument when you execute a Virtuoso relative object design (ROD function within the body of a pcDefinePCell statement or within the body of a tcCreateCDSDeviceClass function call. The cellview ID defaults to the local variable pcCellView or tcCellView, respectively. You need to specify the cellview ID when you execute a ROD function in the command interpreter window (CIW). You can get the cellview ID from the active cellview window or from the database, without opening a cellview window.
To get the cellview ID for the cellview in the active open cellview window, type the following:
cvId = deGetCellView()
To get the cellview ID without opening a cellview window, type the following:
cvId = dbOpenCellViewByType( "myLib " "myCell " "layout" "w" )
where myLib is your library name, myCell is your cellview name, layout is the view type, and r sets the mode to read-only. The cellview will be opened only in the database, not in a window. For more information on the dbOpenCellViewByType command, see Data Access in the Cadence Design Framework II SKILL Functions Reference .
September 2008
307
September 2008
308
C
Using Design Rules in ROD Functions
You might want to use design rules dened in your technology le as the values of some arguments of Virtuoso relative object design (ROD) functions. You can let the value of an argument such as n_width default to a design rule, or you can access your technology le more directly by using the techGetTechFile, techGetSpacingRule, or another technology le function.
September 2008
309
Virtuoso Relative Object Design User Guide Using Design Rules in ROD Functions
To get value of the technology le ID and store it in a variable, type the following:
tfId = techGetTechFile( d_cellViewId ) techGetSpacingRule( tfId "minWidth" "metal1" )
To get value of the technology le ID without storing it in a variable, combine both functions in one statement, as follows:
techGetSpacingRule( techGetTechFile( d_cellViewId ) "minWidth" "metal1" )
If the techGetSpacingRule function returns nil, either minWidth is not dened for the metal1 layer or the technology le does not exist. For more information about technology le design rules, see Physical Rules SKILL Functions in the Technology File and Display Resource File SKILL Reference Manual .
September 2008
310
D
Displaying Pin Names in a Layout Window
To see terminal names for pins in a layout window, the display setting for pin names must be turned on. You can turn on the display of pin names for just the duration of your editing session, or you can change the default.
I
To temporarily turn on Pin Names display, use the Display Options form in a layout window and then apply the changes, but do not save them. To change the default for the display of pin names, either edit your local .cdsenv le or turn on Pin Names option in the Display Options form and save the changes.
displayPinNames boolean t
September 2008
311
Virtuoso Relative Object Design User Guide Displaying Pin Names in a Layout Window The Display Options form appears. 2. In the Display Options form, make sure the Pin Names option is on.
Pin Names option is on.
You can apply your settings to just the current editing session or save them to the current cellview or as a le. 3. Apply or save your Display Option settings by doing one of the following:
To apply your settings to the current editing session only, click on OK in the Display Options form. When you save display settings to a cellview, the settings are automatically applied when you reopen the cellview.
To save your settings with the cellview, turn on Cellview and click on Save To; then click on OK .
1. Turn on Cellview.
When you save to your ~/.cdsenv le (the default le), the settings automatically load when the layout editor starts.
September 2008
312
Virtuoso Relative Object Design User Guide Displaying Pin Names in a Layout Window
To save your settings in your ~/.cdsenv le, turn on File and click on Save To, then click on OK .
To save in ~/.cdsenv le, turn on the File option.
September 2008
313
Virtuoso Relative Object Design User Guide Displaying Pin Names in a Layout Window
September 2008
314
E
How Virtuoso Layout Editor Works with ROD Objects
The following tables summarize the level of support for how Virtuoso Layout L commands work on relative object design (ROD) objects in the current release. Using commands that are not fully supported for ROD objects could cause the objects to lose the ROD information associated with them, changing the objects into ordinary shapes. Table E-1 Virtuoso Layout Editor Creation Commands Create Command Rectangle... r Polygon... P Path... p Multipart Path... Degree of ROD Support Create and name new rectangles as ROD objects using the Create Rectangle form. Create and name new polygons as ROD objects using the Create Polygon form. Create and name paths as ROD objects using the Create Path form. Create and name new multipart paths as ROD objects using the Create Multipart Path form. This form lets you choose a template from your technology le, load templates from an ASCII le, and save form values as a template in your technology le (if you have write permission) or in an ASCII le. You cannot create a label as a ROD object. However, you can make an existing label a ROD object by assigning it a name with the rodNameShape function. An instance is automatically a ROD object because it has a unique name. The ROD object name is the same as the instance name. Create and name new pins as ROD objects using the Create Pin Shape form.
Label... l
Instance... i
Pin... ^p
September 2008
315
Virtuoso Relative Object Design User Guide How Virtuoso Layout Editor Works with ROD Objects Table E-1 Virtuoso Layout Editor Creation Commands, continued Pins From Labels... You cannot create a pin from a label as a ROD object. However, you can make an existing pin a ROD object by assigning it a name with the rodNameShape function. Circles are supported as ROD objects. However, there is no user interface for naming a circle; use the rodNameShape function. Ellipses are supported as ROD objects. However, there is no user interface for naming an ellipse; use the rodNameShape function. An ellipse ROD object has only bounding box handles. Donuts are supported as ROD objects. However, there is no user interface for naming a donut; use the rodNameShape function. A donut ROD object has only bounding box handles. You cannot create a shape using a layer generation operation as a ROD object. However, you can make a generated shape a ROD object by assigning it a name with the rodNameShape function.
Circle Ellipse
Donut
Layer Generation...
Table E-2 Virtuoso Layout Editor Editing Commands Edit Command Undo u Redo U Degree of ROD Support The Undo command fully supports ROD objects. The Redo command fully supports ROD objects.
September 2008
316
Virtuoso Relative Object Design User Guide How Virtuoso Layout Editor Works with ROD Objects Table E-2 Virtuoso Layout Editor Editing Commands, continued Move m Moving ROD objects is supported as follows:
I
You can move a ROD object within the same cellview or to another cellview. Within the same cellview, moving a ROD object that has other objects aligned to it causes the aligned objects to move as well. When you move a ROD object between cellviews, and the ROD object is aligned to another ROD object(s), the system preserves alignment only when the aligned ROD object(s) is also in the selected set; otherwise the alignment is broken. Avoid rotating aligned ROD objects during a move because the aligned handle names are not updated after the move, so the results might not be what you want.
Copy c
You can copy a ROD object within the same cellview or to another cellview. The system automatically assigns unique names to the copies. Alignments between ROD objects in the selected set result in alignments between the corresponding copy objects. Alignments to objects not in the selected set are ignored. You can copy a whole multipart path (MPP) or a whole multipart rectangle (MPR), but not an individual subpart of an MPP or MPR.
I I
Stretch s Reshape R
The Stretch command fully supports ROD objects, including stretchable parameterized cells (pcells). Except for multipart paths and multipart rectangles, all reshapable ROD objects remain ROD objects after a Reshape operation. When you reshape any ROD object, all alignments to that object are deleted.
September 2008
317
Virtuoso Relative Object Design User Guide How Virtuoso Layout Editor Works with ROD Objects Table E-2 Virtuoso Layout Editor Editing Commands, continued Delete del The Delete command fully supports ROD objects. When you delete using the Net Interconnect option, all ROD objects on the selected net are deleted, except for pins. For multipart paths (MPP) and multipart rectangles (MPR), when the master path or master rectangle is on the selected net, the MPP or MPR and all subparts are deleted; otherwise, no part of the MPP or MPR is deleted. When you delete a segment of an MPP with the Path Segment option, the remaining segments of the MPP become two separate multipart paths, each with its own name. Properties... q You can use the Edit Properties command for ROD objects to:
I
View system-dened and user-dened handle names and handle values View alignments for the selected ROD object Modify the X and Y separation between the selected ROD object and other ROD objects.
I I
You can search for any ROD object by name, including rectangles, paths, polygons, and text display objects. Merge is not supported for ROD objects. When ROD objects are merged, the resulting shape is not a ROD object. The Select All command fully supports ROD objects. The Deselect All command fully supports ROD objects. The Make Cell command fully supports ROD objects.
September 2008
318
Virtuoso Relative Object Design User Guide How Virtuoso Layout Editor Works with ROD Objects Table E-2 Virtuoso Layout Editor Editing Commands, continued Flatten The Flatten command fully supports ROD objects. To preserve the attributes of ROD objects (such as object name, alignments, multipart path subparts, and master rectangles in multipart rectangles), turn on the Preserve ROD Objects button in the Flatten form. When this option is off, ROD objects become ordinary unnamed objects, the subparts of multipart paths become ordinary paths and rectangles, and the master rectangles in multipart rectangles become ordinary, unnamed rectangles. The system assigns the attened object a name based on the hierarchical name of the ROD object by replacing slashes with dashes. For example, when you atten the ROD object I1/I4/ rect3, the resulting object is named I1-I4-rect3. Chop Most shapes lose ROD attributes when they are chopped. For multipart paths, the effect of a chop depends on what parts are choppable and how you chop them. For details, see Chopping Multipart Paths on page 86. When you chop the master rectangle of a multipart rectangle, all subrectangles are deleted and the shapes resulting from chopping the master rectangle are regular, unnamed database shapes. When you chop any ROD object, all alignments to that object are deleted. Modify Corner... The Modify Corner command supports ROD polygons and ROD rectangles, except for master rectangles that are a part of a multipart rectangle. The Size command supports ROD objects. However, when you size a multipart path (MPP), the master path becomes a ROD polygon and inherits its name from the original MPP; all subparts become ordinary, unnamed database shapes. When you size any ROD object, all alignments to that object are deleted. Split ^s Except for ellipses, circles, donuts, multipart paths, and multipart rectangles, ROD objects remain ROD objects after a split operation. When you split any ROD object, all alignments to that object are deleted.
September 2008 319 Product Version 6.1.3
Size...
Virtuoso Relative Object Design User Guide How Virtuoso Layout Editor Works with ROD Objects Table E-2 Virtuoso Layout Editor Editing Commands, continued Attach/Detach v Convert To Polygon The Attach/Detach commands fully support ROD objects. The Convert To Polygon command fully supports ROD objects, except for rectangles and multipart rectangles. The Convert To Polygon command has no affect on rectangles and multipart rectangles. When you convert a multipart path, the polygon resulting from the master path is a ROD object and takes the name of the multipart path. Subparts, if any, become unnamed, ordinary database shapes (paths and rectangles). Subparts are not converted to polygons. When you convert any ROD object (except rectangles and multipart rectangles) to a polygon, all alignments to the converted object are deleted. Move Origin Rotate... O The Move Origin command fully supports ROD objects. With the exception of multipart rectangles the Rotate command supports the rotation of ROD objects, unless there are alignments. Avoid rotating aligned ROD objects because aligned handle names are not updated after the rotation, so the results might not be what you want. For multipart rectangles with subrectangles offset from the master rectangle corners, avoid rotation unless the offsets are all equal. The Rotate command does not rotate these offsets. Do not rotate chopped multipart paths as the chop holes might not rotate correctly. If you want to chop and rotate an MPP, rotate the MPP rst, then chop it. Yank y The Yank command does not support ROD objects. The Yank command copies only the shapes, but not the names of the shapes or the alignments. When you paste, the result is unnamed, unaligned, non-ROD shapes. The Paste command does not support ROD objects. If you yank and paste ROD objects, the result is unnamed, unaligned, non-ROD shapes.
Paste Y
September 2008
320
F
Code Examples
The examples in this appendix show how you might use Virtuoso relative object design (ROD) functions to create some commonly used devices.
September 2008
321
Creating a Bus
;; Create a bus with 7 offset subpaths procedure( bus(cv layer) (let (tfId layerWidth layerSpace) tfId = techGetTechFile(cv) layerWidth = techGetSpacingRule(tfId "minWidth" layer) layerSpace = techGetSpacingRule(tfId "minSpacing" layer) rodCreatePath( ?name "bus" ?layer layer ?pts list(20:-20 40:-20 40:-30 80:-30) ?width layerWidth ?justification "center" ?cvId cv ?offsetSubPath list( list( ?layer layer ?justification "left" ?sep layerSpace ) ;end subpath1 list( ?layer layer ?justification "left" ?sep (layerSpace * 2) + layerWidth ) ;end subpath2 list( ?layer layer ?justification "left" ?sep (layerSpace * 3) + (layerWidth * 2) ) ;end subpath3 list(
September 2008
322
September 2008
323
;; Create a contact array procedure(buildCnts(cv layer1 layer2 layer3 width1 width3 length3 pathpnts terminal pinlabel enc offset chop) ; pinlabel is a boolean that determines whether a label will be ; created let( ( fig ) fig = rodCreatePath( ?cvId cv ?layer layer1 ?width width1 ?pts pathpnts ?encSubPath list( list( ?layer layer2 ?enclosure enc ?choppable chop ?pin t ?termName terminal ?pinLabel pinlabel ?pinLabelHeight length3 ?pinLabelLayer "text" ) ;end enc sublist1 ); end enc list ?subRect list( list( ?layer layer3 ?width width3 ?length length3 ?endOffset offset ) ;end rect sublist1 ) ;end subRect list ) ;end rodCreatePath ) ;end of let ) ;end of procedure
September 2008
324
;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;; ;;
Create guard ring This procedure is an example of how to create a guard ring interactively with the layout editor. The sample code assumes that certain design rules are already defined in your technology file. This code builds three types of guard rings: ndiff, pdiff, and poly. The arguments for this procedure are all optional. If you specify no arguments, the guard ring defaults to ndiff. The system prompts you for coordinates and you draw the guard ring in the current open window. Optionally, you can also specify the type of material and cellview ID, and you can pass in a pointlist.
procedure( buildGuardRing( @optional (type "ndiff") (winId hiGetCurrentWindow()) (pointList nil) ) ;end buildGuardRing prog( ( cvId tfId botLayNumber topLayNumber viaLayNumber viaWidth botOLvia topOLvia botWidth prompt1 prompt2 buildCnts_info ) ;; Check the cellView. Get the techfile ID. if( (cvId = geGetEditCellView(winId)) && cvId->objType == "cellView" then
September 2008 325 Product Version 6.1.3
Use the variable buildCnts_info (define within the buildGuardRing procedure above) to contain the layer and design rule information.
September 2008
326
September 2008
327
;; Create a shielded path procedure( shieldedPath(cv) errset( (let (tfId) rodCreatePath( ?name "shieldedPath" ?layer "metal1" ?pts list(2:-15 2:-5 15:-5 15:-15) ?width .8 ?justification "center" ?cvId cv ?offsetSubPath list( list( ?layer "vapox" ?justification "left" ?sep 1 ?width .4 ) ;end of offset sublist1 list( ?layer "vapox" ?justification "right" ?sep 1 ?width .4 ) ;end of offset sublist2 ) ;end of offset list of lists ) ;end of rodCreatePath ) ; end of let t ) ; end of errset ) ; end of procedure
September 2008
328
Creating a Transistor
;; Create a gate procedure( tran(cv w l name) let((tfId pext pcs pds cw cs m1oc doc grid ptslist tran) tfId = techGetTechFile(cv) pext = techGetSpacingRule(tfId "minExtension" "poly") pcs = techGetSpacingRule(tfId "minSpacing" "poly" "cont") pds = techGetSpacingRule(tfId "minSpacing" "poly" "ndiff") cw = techGetSpacingRule(tfId "minWidth" "cont") cs = techGetSpacingRule(tfId "minSpacing" "cont") m1oc = techGetOrderedSpacingRule(tfId "minEnclosure" "metal1" "cont") doc = techGetOrderedSpacingRule(tfId "minEnclosure" "ndiff" "cont") grid = techGetMfgGridResolution(tfId) ptslist = list(0:0 0:(w + 2 * pext)) tran = rodCreatePath( ?name name ?layer "poly" ?pts ptslist ?width l ?termName "G" ?justification "center" ?cvId cv ?offsetSubPath list( list( ?layer "poly" ?beginOffset 0.0 ?endOffset -(pext + w + pds) ?width l ?pin t ?termName "G" ) ;end of offset sublist1 list(
September 2008 329 Product Version 6.1.3
September 2008
331
getRodPathRes
createResHandle
When you calculate the resistance of a ROD path from within a pcell, you only need to execute the createResHandle procedure once inside the pcell because the geometries in a pcell are recreated every time the pcell is evaluated. When you calculate the resistance of a ROD path from outside a pcell, such as in an open cellview window, you must update the resistance handle (res) by executing the createResHandle procedure in the Command Interpreter Window whenever you make a change to the ROD path, such as stretching or chopping it.
September 2008
332
getRodPathLength Procedure
;; This procedure goes through the list of points in a ROD path ;; and adds the lengths of the segments. Returns the total length. ;; procedure(getRodPathLength(rodId) let( ( (total_length 0) ) ;end variables for let for(i 0 (rodId~>numSegments - 1) total_length = total_length + rodGetHandle(rodId symbolToString(concat("length" i))) ) ;end of for total_length ) ;end of let ) ;end of procedure getRodPathRes Procedure ;; This procedure gets the length and sheet resolution values for ;; a ROD path, then calculates and returns the resistance. ;; Remember to load the procedure getRodPathLength procedure(getRodPathRes(rodId) let(( corner_value sheet_res path_width num_segs num_corners total_length num_squares ) ;; Percentage of a square. Usually, values from 0.5 to 0.65 ;; are used for corner resistance. The rodPcells sample library ;; uses .559 for corner resistance, so that value is used here. ;; Adjust the value of corner_value to suit your needs. corner_value = .559 ;; Get the sheet resistance for the current layer. sheet_res = techGetElectricalRule(techGetTechFile(rodId~>cvId) "sheetRes" rodId~>dbId~>layer) ;; Get path width, number of segments, number of corners, ;; and total path length. path_width = rodId~>dbId~>width num_segs = rodId~>numSegments num_corners = num_segs - 1 total_length = getRodPathLength(rodId) ;; Now compute the number of squares of resistance material ;; and calculate the total resistance value. num_squares = (total_length / path_width) (num_corners * corner_value) ;; Return the resistance value. num_squares * sheet_res ) ;end of let ) ;end of procedure
September 2008
333
createResHandle Procedure
;; This procedure creates or updates the value of a user-defined ;; resistance handle ("res") for a ROD path, and returns the ;; resistance value. ;; procedure(createResHandle(rodId) let((res) when(rodId~>dbId~>objType == "path" && (res = getRodPathRes(rodId)) when((rodHandle = rodGetHandle(rodId "res")) rodDeleteHandle(rodId "res") ) ;end of 2nd when rodCreateHandle( ?rodObj rodId ?name "res" ?type "float" ?value res ) ;end of rodCreateHandle ) ;end of 1st when ) ;end of let ) ;end of procedure
September 2008
334
This is an example of a very simple MOS transistor with stretchable contact arrays and userdened functions.This code might not work with your technology le, but you can modify the code as desired. For more complex MOS code examples, see the Sample Parameterized Cells Installation and Reference . The parameters for the sample mos transistor pcell are specied as follows: Parameter Name w l leftcov rightcov leftPos rightPos Default Value 1.3 0.25 1.0 1.0 "top" "top" Parameter Description Width of gate Length of gate Left contact coverage Right contact coverage Position of left contacts Position of right contacts
To make the source contacts stretchable, the upperCenter and lowerCenter point handles on the source contact array are assigned to the pcell parameter leftcov with the stretch type relative and the stretch direction Y.
September 2008
335
To make the drain contacts stretchable, the upperCenter and lowerCenter point handles on the drain contact array are assigned to the pcell parameter rightcov with the stretch type relative and the stretch direction Y.
upperCenter point handle for source contacts upperCenter point handle for drain contacts
September 2008
336
September 2008
337
; ******** make source contacts stretchable ********* ; The user-defined function "contcov" sets a range for the ; contacts from a 100% coverage to minimum contact width rodAssignHandleToParameter( ?parameter "leftcov" ?rodObj leftCnts ?handleName list("upperCenter" "lowerCenter") ?displayName "leftcov" ?stretchDir "y" ?stretchType "relative" ?userFunction "contcov" ) ; end rodAssignHandleToParameter ; ; ; ; ; ; ; ; ******** set source contact alignment ********* This is an example where rodAssignHandleToParameter is being used to set a parameter value and where no display is required. The userfunction "mystretch" checks which handle is currently being stretched and then returns the location where the contacts should be aligned, either to the top or bottom.
rodAssignHandleToParameter( ?parameter "leftPos" ?rodObj leftCnts ?handleName list("upperCenter" "lowerCenter") ?stretchType "relative" ?userFunction "mystretch" ) ; end rodAssignHandleToParameter case( leftPos ("top" rodAlign( ?refObj ?refHandle ?alignObj ?alignHandle ?xSep ?ySep ) ; end rodAlign ) ; end top ("bottom" rodAlign(
September 2008
338
; ******** draw drain contacts and drain diffusion************* length = ((cntsw + (2*m1oc)) * rightcov/grid)*grid when(length < minLength length = minLength ) ; end when rightCnts = rodCreatePath( ?layer metal1 ?width (2*m1oc)+cw ?pts list(0:0 0:length) ?justification "center" ?subRect list( list( ?layer contact ?length cw ?width cw ?space cs ?endOffset -m1oc )) ; end subrect lists ?termName "D" ?pin t ) ; end rightCnts rodCreatePath rightDiff = rodCreateRect( ?layer diff ?width pcs + cw + doc + l/2 ?length w ) ; end rightDiff rodCreatePath rodAlign( ?refObj gate ?refHandle "cC" ?alignObj rightDiff ?alignHandle "cL" ) ; end rodAlign ; ******** make drain contacts stretchable ********* rodAssignHandleToParameter( ?parameter "rightcov" ?rodObj rightCnts ?handleName list("upperCenter" "lowerCenter") ?displayName "rightcov" ?stretchDir "y" ?stretchType "relative" ?userFunction "contcov" ) ; end rodAssignHandleToParameter ; ******** set drain contact rodAssignHandleToParameter( ?parameter ?rodObj ?handleName
September 2008
September 2008
341
September 2008
342
G
Troubleshooting
This appendix describes problems you might encounter while using ROD functionality and suggests how to solve them. The problems are divided into two categories:
I I
September 2008
343
Virtuoso Relative Object Design User Guide Troubleshooting If you want to change the names of the MPP templates in your ASCII le right away, or you want to be able to save other changes to your technology library on disk without overwriting the original template, you need to: 1. Exit the layout software without saving technology le changes. 2. Edit your ASCII le to change template names. 3. Restart the layout software. 4. Reload your ASCII MPP template le.
If you create an instance using the dbCreateInst function in the CIW and a ROD shape already exists with the same name in the same cellview as the instance you are creating, the warning above appears in the CIW. If you do not do an undo, the system unnames the ROD object, turning it into an ordinary shape without any ROD attributes. Solution: Immediately do an undo. Avoid using dbCreateInst to create instances that have the same name as ROD objects in the same cellview.
September 2008
344
Virtuoso Relative Object Design User Guide Troubleshooting the system responds by creating the rectangle in the cellview and displaying its ROD object ID in the CIW as follows:
rodObj:22032408
If you do an Undo at any time during the same editing session, the system restores the previous version of the cellview. The rect variable no longer points to a valid ROD object. When you test rect after an Undo, the system displays the following:
rect rod:invalid rodIsObj( rect ) nil
If you follow an Undo with a Redo (with the hiRedo function or Edit Redo) , the system restores the cellview. However, the system assigns the rectangle a new ROD object ID, so the rect variable remains invalid, as it still contains the old ROD Object ID.
rect rod:invalid rodIsObj( rect ) nil
Solution: To update the rect variable to the new ROD object ID for the rectangle, use a statement similar to this:
rect = rodGetObj( "myRect" geGetEditCellView() )
Now when you query the variable rect, the system responds with the current ROD object ID, as follows:
rect rodObj:22032420 rodIsObj( rect ) t
Note: The name of a ROD object is persistent, but the ROD object ID might not be. Therefore, rather than storing the ROD object ID in a variable, get it whenever it is needed.
September 2008
345
Virtuoso Relative Object Design User Guide Troubleshooting template le was loaded during your editing session. The ASCII MPP template le could contain templates with unique names, templates with names that match templates existing in your technology le, or both.
I
When the ASCII MPP template le contains templates with unique names, saving changes to your technology le causes the system to add the new templates to the existing templates in your binary technology library on disk. When the ASCII MPP template le contains a template with a name that matches an existing template in the technology le, saving changes to your technology le causes the system to overwrite the matching template with the ASCII version. This might not be what you intended.
Solution: You can verify whether templates loaded from ASCII les produced name conicts by looking for the following message in the CDS.log le:
Template templateName is replacing an existing template by the same name
For information about what to do, see Template templateName is replacing an existing template by the same name on page 343.
September 2008
346
Index
Symbols
.cdsenv file 304 to 305 .il files rodPrintSystemHandleValues.il 125 rodPrintUserHandleValues.il 128 ~> database access operator accessing object attributes 118 point handle 38 attributes accessing names and values 121
B
bounding box point handles 20 to 21 width, length handles 21 to 23 brackets in syntax 13 bus code example 322
A
accessing alignment information with ~> 119 coordinates through hierarchy 38 to 273 handles 19 system-defined 19 with rodGetHandle function 267 MPP chop holes with ~> 119 multipart path bounding box with ~> 23 named objects 18 number of segments with ~> 119 object attribute names and values 121 system-defined handle names with ~> 119 handle values with a procedure 125 user-defined handles values with a procedure 128 align, object attribute 119 aligned objects, how chopping affects ?? to 89 aligning objects 36 separating 38 with rodAlign function 143 unalign object with rodUnAlign function 287 alignment when recalculate? 37 argument definition 159 assign handle to parameter 154
September 2008 347
C
calculating alignment, when 37 CDF callback procedure 52 .cdsenv file 304 to 305 chop hole in multipart path ?? to 89 path with rodAddMPPChopHole function 137 chopHoles, object attribute 119 connectivity in ROD objects 109 multipart paths 85 multipart rectangles 56 constraintAssistedMode environment variable 301 contact array code example 324 conventions syntax 13 coordinate finding X with rodPointX function 284 finding Y with rodPointY function 285 createResHandle procedure 332 cvId, object attribute 119
D
data types defined 133 user-defined handles, for 35 database access operator ~> accessing
object attributes 118 point handle 38 database ID, getting 282 dbId Also see database ID object attribute 119 dbOpenCellViewByType function 307 defstruct 159, 168 deGetCellView function 307 deleting user-defined handle with rodDeleteHandle function 259 description 165 disconnecting shapes of multipart paths 209 Display Options Form 311 displaying pin/terminal names 311 displayStretchHandles environment variable 301 distributeSingleSubRect environment variable 301
E
editing ROD objects, limitations 57, 86, 132 enclosure subpath of multipart path 59 environment variable constraintAssistedMode 301 displayStretchHandles 301 distributeSingleSubRect 301 permitMPPSelfAbut 302 readCellviewWarningOn 302 rodAutoName 302 stretchHandlesLayer 302 environment variables ?? to 305 preserveAlignInfoOn 302 traceTriggerFunctionsOn 303 updatePCellIncrement 303 examples accessing coordinates through hierarchy 272 to 273 system-defined handle values with a procedure 125 user-defined handle names with a procedure 128 Aligning an Object to a Point 150 Aligning Objects at Different Levels in the Hierarchy 152 Aligning Two Rectangles at the Same
September 2008 348
Level of Hierarchy 151 bus 322 contact array 324 Create a Master Path with an Offset Subpath to the Right 210 Create a Rectangular Pin 258 Create a Single Rectangle on a Terminal and Net 257 Create a Single Row or Column of Rectangles 253 Create Multiple Rows and Columns of Rectangles 254 Create One Rectangle with l_bBox 252 Create One Rectangle with n_width and n_length 252 Creating a Point Handle for a Cellview 178 Enclosure Subpaths 72 Fill a Bounding Box with Rectangles 255 length of path, calculating the 332 list of lists for subparts, specifying 204 Moving an Object Using rodAlign 151 Naming a Polygon Created by dbCreatePolygon in a Pcell 282 Naming a Shape Created in the CIW and Layout Window 283 Offset Subpaths 65 offsetting ends of subparts 81 Offsetting the Master Path 61 Overfill a Bounding Box with Rectangles 256 Partially Fill a Bounding Box with Rectangles 256 Querying a Point Handle for a Cellview 179 Querying System-Assigned Handle Name 179 resistance, calculating the 332 Sets of Subrectangles 75 sheet resistance, calculating the 332 shielded path 328 transistor 329 extended-type paths 31, 32
F
files .cdsenv 304 to 305 libInit 166
Product Version 6.1.3
rodPrintSystemHandleValues.il 125 rodPrintUserHandleValues.il 128 fill box with rects 260 functions dbOpenCellViewByType 307 deGetCellView 307 pcDefinePCell 269, 271, 307 rodAddMPPChopHole 137 rodAddPoints 140 rodAddToX 141 rodAddToY 142 rodAlign 143 rodAssignHandleToParameter 154 rodCheck 175 rodCreateHandle 14, 176 rodCreatePath 180 rodCreatePolygon 212 rodCreateRect 218 rodDeleteHandle 259 rodFillBBoxWithRects 260 rodGetHandle 267 rodGetNamedShapes 268 rodGetObj 269 rodIsFigNameUnused 275 rodIsHandle 277 rodIsObj 278 rodNameShape 280 rodPointX 284 rodPointY 285 rodSubPoints 286 rodUnAlign 287 rodUnNameShape 289 tcCreateDeviceClass 269, 271, 307
procedure 128 assign to parameter 154 bounding box point 20 to 21 width, length 21 to 23 creating user-defined with rodCreateHandle function 176 multiple for same point, benefits of 34 segment length 32 names of 27 to ?? point 27 to 31, ?? to 32 system-defined 19 for multipart paths 32 user-defined 35 deleting with rodDeleteHandle function 259 verifying existence with rodIsHandle function 277 hierarchical names 18
I
italics in text 13
K
keyword-value pairs in syntax 14
L
lambda function 159, 167 length handles 21 maximum for string 135 of path, code example 332 segment handles, of 32 libInit file 166 list of lists, specifying for subparts literal characters 13
G
getRodPathLength procedure 332 getRodPathRes procedure 332
H
handles 19 accessing name attribute with ~> 119 ROD object IDs for subshapes with ~> 119 system-defined handle values with a procedure 125 user-defined handle values with a
September 2008 349
204
M
maximum string length 135 monospaced characters in syntax 13 mosaics 316 mosaics, limitations 114
Product Version 6.1.3
MPP. See multipart paths mppBbox, multipart path bounding box handle 23 multipart paths 59, 181 aligned objects, how chopping affects ?? to 89 calculating bounding box 22 chop function 137 chopping ?? to 89 connectivity 85, 109 creating with rodCreatePath function 181 disconnecting shapes, how to 209 length, calculating the total 333 mppBbox bounding box handle 23 resistance, calculating the 332 stretching 89 system-defined handles 32 width, length handles 22 multipart rectangles connectivity 56 stretching 58
59
P
parameterized cell. See pcells paths extended type 31, 32 length calculating the total 333 of segment 32 multipart. See multipart paths resistance, calculating the 332 segment numbers 25, 27 self-abutting 203, 302 self-intersecting 203 width of 34 pcCellView variable 134, 271, 307 pcDefinePCell function 269, 271, 307 pcells, using ROD to create 17 permitSelfMPPAbut environment variable 302 pin names displaying 311 setting 311 point handles 19 bounding box 20 segment 27 polygons creating with rodCreatePolygon 212 length of segment 32 segment numbers 25, 26 preserveAlignInfoOn environment variable 302 procedures rodPrintSystemHandleValues.il 125 rodPrintUserHandleValues.il 128
N
name, object attribute 119 named shapes, getting with rodGetNamedShapes function 268 names 18 accessing for object with ~> 119 hierarchical 18, 271 maximum string length 135 pin/terminal, displaying 311 segment handles, of 27 to 32 setting pin names 311 using special characters 136 naming shapes removing name with rodUnNameShape function 289 with rodNameShape function 280 numSegments, object attribute 119
Q
quote mark, single 134
O
objects getting with rodGetObj function naming 18 stretching multipart rectangles 58
September 2008
269
R
readCellviewWarningOn environment variable 302 recalculating alignment, when 37
350 Product Version 6.1.3
rectangles creating with rodCreateRect 219 in multipart path, sub 59 segment numbers 26 segment point handle names 28 related manuals 11 relative alignment, overview 36 object design, defined 11, 16 repeated object, connectivity 109 resistance code example 332 results of using 52 results of using in stretchable pcells 52 ROD object ID 114 to 116 getting in a cellview 114 getting with rodGetObj function 269 ROD objects 114 accessing attributes 118 to 130 accessing through hierarchy 38 to 298 editing limitations 57, 86, 132 finding with rodGetObj function 269 separating 38 rodAddMPPChopHole function 137 rodAddPoints function 140 rodAddToX function 141 rodAddToY function 142 rodAlign function 143 rodAssignHandleToParameter function 154 rodAutoName environment variable 302 rodCellView variable 135 rodCheck function 175 rodCreateHandle function 176 rodCreatePath function 180 rodCreatePolygon 212 rodCreateRect function 218 rodDeleteHandle function 259 rodFillBBoxWithRects function 260 rodGetHandle function 267 rodGetNamedShapes 268 rodGetObj function 269 rodIsFigNameUnused function 275 rodIsHandle function 277 rodIsObj function 278 rodNameShape function 280 rodPointX function 284 rodPointY function 285 rodPrintSystemHandleValues.il 125 rodPrintUserHandleValues.il 128 rodSubPoints function 286
September 2008 351
S
segment handle names 28 to 32, 33 to 34 length handles 32 numbering ?? to 25, 25 to 27 point handles 27 self-abutting paths 203, 302 self-intersecting paths 203 separating aligned objects 38 setting pin names 311 shapes getting names with rodGetNamedShapes function 268 naming with rodNameShape function 280 removing name with rodUnNameShape function 289 sheet resistance code example 332 shielded path code example 328 single quote mark 134 solutions to problems for rodCreateAlign aligning an object to a point 290 aligning objects at different levels in the hierarchy 291 aligning two rectangles at the same level of hierarchy 291 moving an object 291 rodCreateHandle creating a point handle for a cellview 292 creating a system-assigned handle name 293 querying a point handle for a cellview 293 rodCreatePath create a master path with an offset subpath on the right 293 rodCreateRect Create a Rectangular Pin 297 Create a Single Rectangle on a Terminal and Net 297 Create a Single Row or Column of
Product Version 6.1.3
Rectangles 294 Create Multiple Rows and Columns of Rectangles 295 Create One Rectangle with l_bBox 294 Fill a Bounding Box with Rectangles 295 Overfill a Bounding Box with Rectangles 296 Partially Fill a Bounding Box with Rectangles 296 rodGetObj Accessing Coordinates through One Level of Hierarchy 298 Accessing Coordinates through Two Levels of Hierarchy 298 Accessing Coordinates without Hierarchy 298 rodNameShape Naming a Polygon Created in a Pcell 299 Naming a Polygon Created in the CIW and Layout Window 299 special characters in names 136 stretch process flow, in 41 stretchHandlesLayer environment variable 302 stretching objects multipart rectangles 58 string length, maximum 135 subrectangles of multipart path 59 subShapes, attribute of multipart paths 119 symbol tick mark 134 syntax conventions 13 data types 133 formatting list of lists 204 keyword-value pairs 14 system-defined handles 19 for multipart paths 32 getting with rodGetHandle function 267 values, accessing with procedure 125
September 2008 352
verifying existence with rodIsHandle function 277 systemHandleNames object attribute 119
T
tcCellView variable 135, 271 tcCreateDeviceClass function 269, 271, 307 terminal names, displaying 311 traceTriggerFunctionOn environment variable 303 transform, object attribute 119 transforming coordinates through hierarchy 38 to 298 coordinates when accessing a point handle 120 transistor code example 329
U
unalign objects with rodUnAlign function 287 updatePCellIncrement environment variable 303 user-defined function 41, 52, 159, 165 user-defined handles 19 data types 35 deleting with rodDeleteHandle function 259 getting with rodGetHandle function 267 values, accessing with a procedure 128 verifying existence with rodIsHandle function 277 userHandleNames, object attribute 119
V
variables pcCellView 134, 271, 307 rodCellView 135 tcCellView 135, 271
W
width handles 21 paths, of 34 width handles 21
X
X coordinate, finding with rodPointX function 284
Y
Y coordinate, finding with rodPointY function 285
September 2008
353
September 2008
354