Working with Design Hierarchy
This chapter contains these topics:
About Hierarchical Designs
With the Virtuoso® Layout Editor, you can create a hierarchical design by placing instances of other references to cells inside other cells. The cell at the top includes the whole design. The cells at the bottom contain the smallest parts of the design.
In the design shown below, for example, instances of the ntran and ptran (N- and P-transistor) cells are placed inside the inv (inverter) cell, which is inside the mux2 cell.
The Cadence® software numbers levels of hierarchy from top to bottom, with the top cell having the lowest number. The top cell is the cellview you are currently viewing in a design window, unless you have descended into the hierarchy or are using Edit In Place.
In the above figure, when you view mux2, it is level 0, as shown. When you view the inv cell, it is considered level 1, and the ntran and ptran instances are considered level 2.
Master Cells and Cell Instances
A master cell is any layout cell you have placed in another cell. The placed reference of the cell is called an instance.
For example, the mux2 layout cell contains an instance of the inv layout cell.
If you edit a master cell, all instances of that cell are changed. For example, if you stretch a polygon in the master inv layout cell, the polygon is stretched in all instances of inv.
A Sample Design and Tutorial
The sample design in the Cell Design Tutorial is a hierarchical design. Many of the sample cells used in this document are from the tutorial.
The tutorial libraries are stored in your Cadence software directory, under
your_install_dir/tools/dfII/samples/tutorials/le/cell_design
Checking for Instance Recursion
You can prevent commands such as Create Instance, Make Cell, and Search/Replace from creating an instance of itself in a cell by turning recursion checking on in the Editor Options form.
To automatically check for recursion when placing instances,
From the cellview window menu, choose Options - Layout Editor [
Shift-e].
The Layout Editor Options form appears.
Changing the Master Cell Origin
Place instances by clicking where you want the instance origin. To change how the instances are placed, change the origin of the master cell.
Moving the master cell origin changes the location of all placed instances of that cell. To change the origin of the master cell,
Listing the Hierarchy
Using the Tree Form
The Tree command displays a list showing the hierarchy of cell instances in the current cellview.
Note: The Display Level settings in the Display Options form limit the number of levels reported. This means if Display Level is set to 0 through 3, even though you set Top to bottom on the Tree form, the output will be for levels 0 through 3 only.
Display sets how much of the hierarchy is listed.
Top to bottom lists the entire hierarchy of instances in the cellview.
Current to bottom lists the hierarchy of instances from the current level of hierarchy to the Display Level To field in the Display Options form (stop level).
Top to current lists the hierarchy of instances from the top level to the current level of hierarchy.
Viewing the Results of the Tree Command
To list the hierarchy of instances in the current cellview,
Choose Design - Hierarchy - Tree [
Shift-t].
The Tree form appears.
Set Display to one of the following:
To list the entire hierarchy in the cellview, turn Top to bottom on
To list the hierarchy from the current level of hierarchy to the stop level, turn Current to bottom on
To list the hierarchy from the top level to the current level of hierarchy turn Top to current on
Note: The Display Level settings in the Display Options form limit the number of levels reported by this command.
Tree Window File Menu
The File menu contains commands that let you open, save, search, and close the text window.
Open loads the contents of a text window previously saved with Save As.
Save As saves the data in this window to a text file.
Auto Update On and shaded command names are not used by text windows opened with the Tree command.
Search searches through the text in this window for a text string.
Close Window closes this text window.
Tree Window Cellview Data
The cellview data displays information about the cellview.
The Library, Cell, and View name fields display the cellview whose contents are listed.
Option shows which Display setting you chose in the Tree form.
Stop Level shows how many levels of hierarchy the Display Options form is set to display.
Tree Window Cell Instances
The cell instances information lists the hierarchy of cell instances in this cellview or the instances above or below the edit-in-place cell. The number in parentheses represents how many times that instance appears in the design.
Indents show that instances of the indented cells are inside the instance listed above. For example, ptran is inside the Inv cell.
Listing the Data In Cellviews
Listing the Contents of a Cellview
To display a summary of the contents of this cellview,
Summary File Menu
The File menu lets you manipulate this text window and its contents.
Open loads the contents of a text window previously saved with Save As.
Save As saves the data in this window to a text file.
Auto Update On and shaded command names are not used by text windows opened with the Summary command.
Search searches through the text in this window for a text string.
Close Window closes this text window.
Show Environment
The Show Environment section shows information about the cellview and its edit mode, display levels, and current entry layer (entry layer).
Layer Object Statistics
The Layer Object Statistics section lists the shapes created in the cellview and the layer on which each is present.
Instance Statistics
The Instance Statistics section shows the names of the cell instances and arrays of instances (mosaics) that have been placed in this cellview.
Contact Statistics
The Contact Statistics section shows the names of the contact cells that have been placed in this cellview.
Listing All Selected Objects
To display information about objects,
Show Selected Set File Menu
The File menu lets you manipulate this text window and its contents.
Open loads the contents of a text window you previously saved with Save As.
Save As saves the data in this window to a text file.
Auto Update On and shaded command names are not used by text windows opened with the Show Selected Set command.
Search searches through the text in this window for a text string.
Close Window closes this text window.
Show Selected Set
The Show Selected Set section shows information about the cellview.
Shapes
The Total Shapes Selected section lists the selected objects, their layers, the number of points used to create them, and the coordinates of the bounding box that surrounds each object.
Instances
The Total Instances Selected section lists all selected cell instances, including each instance name, placement orientation, and the coordinates of its origin.
If any arrays of cell instances are selected, they are listed under Total Mosaics Selected.
Editing Instances
Editing a Cell in Place
You can edit the master cell of an instance while viewing the instance in the current cellview. This is called editing in place.
Note: You cannot edit parameterized cells (pcells) in place because the layout of a pcell instance does not necessarily match the layout of the master pcell.
To edit a master cell in place,
Choose Design - Hierarchy - Edit In Place [
x].
If you are editing a managed file, you might be asked if you want to check out the file.
Choose Window - Redraw to see a border outlining the edit-in-place cell.
Choose Design - Hierarchy - Return to stop editing in place.
If you are returning from a managed file, you might be asked if you want to check in the file.
Note: When you are done editing with Edit In Place, and as you return up the hierarchy, each level you pass is accessible in edit mode if you started in a cell that is in edit mode. If a lower-level cell was originally in read-only mode, it will return to read only once you return up the hierarchy. If you have changed anything in a lower cell, you will be prompted to save that master cell.
Fitting the Edit-in-Place Cell in the Window
To fit the contents of the edit-in-place cell into the window,
![]()
Do one of the following:
Press
Control-x.
Click on the Fit Edit icon in the icon menu.
Displaying Only the Edit-in-Place Cell
To set the cellview so that only the cell you are editing in place appears,
The Display Options form appears.
Using the Descend Form
The Descend command lets you descend into an instance, and the Descend form lets you descend into a nonlayout view.
Note: The layout editor does not use the Create New Window When Descending option in the User Preferences form. Selecting or deselecting this option will not affect your work in the layout editor.
About the Descend Form
Prompt For View Name By default, Descend descends into the same view name as the current cellview. If this field is on, the (view name) Descend form appears when you click on an instance. You can choose a different view to open. If there is only one view of the master cell, Descend does not prompt you for a view name.
Descending into an Instance
To edit the master cell for any instance in the current window,
Choose Design - Hierarchy - Descend [
Shift-x].
If you are descending into a managed file, you might be asked if you want to check out the file.
If you selected a parameterized cell (pcell) instance, a dialog box appears. Click OK to close the box and descend into the pcell.
Choose Design - Hierarchy - Return to return to the cell you were editing before you opened the instance.
If you are returning from a managed file, you might be asked if you want to check in the file.
Descending into a Member of an Instance Array
When you want to descend into an instance array, the Descend command lets you choose which member of the array you want to descend into.
About the Select Array Member Form
Row indicates the row the array member is in.
Column indicates the column the array member is in.
Using the Select Array Member Form
To edit a member of an instance array,
Using the (view name) Descend Form
The (view name) Descend form lists all the available master views for the instance you chose.
About the (view name) Descend Form
View Name lets you choose a different view of the master cell to open with the Descend command. For example, you can open a schematic view of an instance rather than its layout view.
Descending into a Nonlayout View of an Instance
To descend into a nonlayout view of an instance,
Choose Design - Hierarchy - Descend
[Shift-x].
The Descend form appears.
If you are descending into a managed file, you might be asked if you want to check out the file.
Click on the instance whose master you want to view.
The Descend View Name form appears listing all the available master views for the instance you chose.
Choose Design - Hierarchy - Return to return to the cell you were editing before you opened the instance.
If you are returning from a managed file, you might be asked if you want to check in the file.
Using Return To Level
The Return To Level command lets you return to a cellview that is higher in the design hierarchy than the cell you are currently viewing.
About the Return To Level Form
The text box lists the levels above the current one in the hierarchy and the cell associated with each level.
Returning to a Different Hierarchy Level
If you have use Edit in Place or Descend, you can return to a higher level in the hierarchy.
To return to a specific level,
Choose Design - Hierarchy Return To Level [
b].
If you are returning from a managed file, you might be asked if you want to check in the file.
Click on a cellview name in the Return To Level form.
Refreshing Memory after Editing
Using the Refresh Cellviews Form
Another user might edit a master cell whose instances appear in the current cellview. You can update the memory of your computer to reflect the results of such edits with the Refresh command.
About the Refresh Cellviews Form
Refresh these cellviews? shows the library, cell, and view name of cells that have been edited since you opened this cellview. You can choose to refresh, in memory, your copies of any of the listed master cells.
All or None lets you choose to update memory for all or none of the listed cellviews.
Refreshing Memory from Other Users' Edits
In the Refresh Cellviews form, set any instances you want to update.
About Parameterized Cells (Pcells)
You can use the layout editor to describe the basic components of your design, such as transistors, and then create parameters that let you change the size, shape, or contents of each cell instance--without changing the master cells. A cell with parameters is called a parameterized cell or pcell.
For example, you can create a master layout for a simple N-transistor, then create parameters to control the length or width of the transistor, the number of gates, and/or the number of contact cuts.
When you place instances of the transistor pcell, you can change values for the parameters in the Create Instance form or the Create Device form. The original master cell is unchanged.
Pcell Design Flow
The following steps outline how you create a pcell.
Setting Parameters When Placing Pcell Instances
To set the parameters of a pcell instance when you place the instance,
The Create Instance form appears.
Changing Parameters for Pcell Instances
To change the parameter values after you have placed an instance of a parameterized cell,
The Edit Properties form appears.
If you want to change the common parameters for a group of instances, set Common on.
Searching for and Replacing Parameters
To search for and replace a parameter value,
Choose Edit - Search [
Shift-s].
The Search form appears.
Choose cell name and type the name of the master pcell in the new fields.
Set the first field to property and type the property name and value you want to replace in the fields that appear after you click Add Criteria.
In the Replace field at the bottom of the form, set the first field to property.
Set the name and type fields and type a value in the data entry field.
Click Replace to replace the top instance in the search stack or Replace All to replace all highlighted instances.
Adding the Pcell Menu to the Layout Editor
To add the Pcell menu to the layout editor,
![]()
From the cellview window menu banner, choose Tools - Pcell. The Pcell menu contains the following commands:
For detailed instructions about how to create graphical pcells, see the Virtuoso Parameterized Cell Reference Manual. For information about how to use relative object design constructs to create SKILL pcells, see the Virtuoso Relative Object Design User Guide.
Stretching Parameterized Cells
A stretchable pcell is a SKILL-based pcell created with one or more stretch handles assigned to one or more of its parameters. A stretch handle is a relative object design (ROD) point handle that is assigned to one or more pcell parameters within the pcell code. On instances, stretch handles are displayed as small diamonds.
To change the value of a parameter,
Click on the stretch handle assigned to the parameter you want to change.
When you select a stretch handle, and the pcell definition contains information to be displayed for that handle, the system displays the information next to the upper-right corner of the pcell. The information is usually the name and value of the parameter to which the handle is assigned. In the example below, the handle is assigned to the
widthparameter of the pcell.
Drag the stretch handle in the direction of the X or Y axis, depending on how the stretch handle is defined in the pcell code.
As you drag a handle, the system displays an outline showing how the pcell is changing. Also, according to the frequency defined for regenerating the pcell, the system updates the associated parameter, regenerates the pcell, and displays the updated information.
Although it might appear that you are stretching the instance or objects within the instance, you are really graphically updating the value of the parameter(s) associated with the selected handle. Graphically stretching a pcell instance has the same result as editing its parameters using the Edit Properties form.
For more information about ROD point handles, see "Handles on ROD Objects" in the Virtuoso Relative Object Design User Guide.
Stretching a Contact Array in a Pcell Instance
The steps below show how to select a stretch handle on a contact array inside the instance of a transistor pcell and stretch it.
For a detailed description of the sample transistor pcell, see "Stretchable MOS Transistor" in the Virtuoso Relative Object Design User Guide.
For more complex MOS code examples, see the Sample Parameterized Cells Installation and Reference.
In this example, you want to make room for routing over the diffusion, so you need to reduce the number of contacts in the right-hand contact array to one by stretching the array. There are two different ways to do this: area selection or point selection. For both methods, you start the Stretch command before selecting a handle. Both selection methods are described below; follow the steps in one of them.
Stretching Using Area Selection
Click the left mouse button and drag to create a selection box around the stretch handle at the top of the right-hand contact array.
Move the cursor to above the bottom contact in the right-hand contact array.
End the stretch by clicking above the lower contact. In the example, click when the display information says
rightcov = 0.25.Stretching Using Point Selection
To make sure that no objects are selected, click in the background, outside of the pcell instance.
Click on the stretch handle at the top of the right-hand contact array.
End the stretch by clicking above the lower contact. In the example, click when the display information says
rightcov = 0.25.
Stretching Multiple Handles
You can select 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 definition. The results of the stretch depend on how the handles affect their associated pcell parameters.
For a description of the results of stretching multiple handles, see "Stretching Multiple Handles" in the Virtuoso Relative Object Design User Guide.
Note: When multiple stretch handles occupy the same point, and you select the point (or one of the handles on it), all stretch handles on the point are selected.
To select and stretch both contact arrays in the sample transistor pcell instance, do the following:
Click the left mouse button and drag to create a selection box around the stretch handles at the top of both contact arrays.
Selecting a Handle Assigned to Multiple Parameters
A stretchable pcell can have a handle that is assigned to two or more different parameters. When you stretch the handle, the results of the stretch can affect all of the associated parameters.
For information on the results of stretching a handle assigned to multiple parameters, see "One Handle Assigned to Multiple Parameters" in the Virtuoso Relative Object Design User Guide.
Setting Environment Variables for Stretchable Pcells
The following environment variables influence what the system does when you stretch a handle:
For information about these environment variables, see "Specifying Environment Variables for Stretchable Pcells" in the Virtuoso Relative Object Design User Guide.
Troubleshooting
If you have trouble seeing, selecting, or stretching handles, see one of the following:
Pcell Stretch Handles Are Not Visible
Difficulty Selecting Pcell Stretch Handles
Difficulty Stretching Pcell Handles
See the Virtuoso Parameterized Cell Reference Manual for complete instructions about how to use pcells.
For support, see http://www.cadence.com/support
or try Cadence's SourceLink service.
Copyright © 2003, Cadence Design Systems, Inc.
All rights reserved.
Legal notices and trademark attributions