C
Using Design Rules in ROD Functions
You might want to use design rules defined in your technology file 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 file more directly by using the techGetTechFile, techGetSpacingRule, or another technology file function.
Using Design Rules for Default Values
When you do not specify values for the keyword arguments listed below, the system automatically assigns a default, as described in the “Arguments” section for the ROD function:
n_width n_length n_spaceX n_spaceY n_enclosure
The default is often the value of a design rule from the technology file. Using the rodCreateRect function as an example, when you do not specify a value for n_length, the system assigns the value specified for n_width. If you specified neither n_length nor n_width, the system looks in the technology file associated with your cellview for the minimum width rule for the specified layer, using the standard name minWidth, and assigns its value to both n_length and n_width.
In this case, you do not have to specify the technology file ID or the technology file name. As long as minWidth for the layer is defined in the technology file for your library, the system can find it automatically using the cellview ID.
The names for variables representing design rules are user defined; however, assigning standard names, such as minWidth, maxWidth, minSpacing, and maxSpacing, is a good practice. If your design rules do not have standard names, you must access your design rules using a technology file function, such as techGetSpacingRule.
Accessing Design Rules with techGetSpacingRule
You can access design rules from your technology file with the techGetSpacingRule function. You must specify the technology file ID, layer name, and the name of the design rule. You can get the technology file ID with the techGetTechFile function, which requires the cellview ID or library ID.
For example, say you want to access the minimum design rule for the metal1 layer, and the name of your minimum width rule is minWidth. You can access minWidth in one of the ways shown below.
tfId = techGetTechFile( d_cellViewId )
techGetSpacingRule( tfId
"minWidth"
"metal1"
)
- To get value of the technology file 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 defined for the metal1 layer or the technology file does not exist.
For more information about technology file design rules, see “Physical Rules SKILL Functions” in the Technology File and Display Resource File SKILL Reference Manual.
Return to top