The following functions relate to the design rule checking subsystem.
This function sets the limits used in design rule checking. Each argument, if negative, will cause the related value to be unchanged by the function call. For the first three arguments, the value ``0'' is interpreted as ``no limit''.
This function always returns 1. Out-of-range arguments are set to the maximum permissible values.
This function fills the array, which must have size 4 or larger, with the current DRC limit values. These are, in order,
[0] | The batch error count limit. |
[1] | The interactive object count limit. |
[2] | The interactive time limit in milliseconds. |
[3] | A flag which indicates interactive DRC is skipped for subcells. |
The return value is always 1. The function fails if the array argument is bad.
0 or negative | One error is reported per object. |
1 | One error of each type is reported per object. |
2 or larger | All errors are reported. |
This function always succeeds, and the previous level (0, 1, 2) is returned.
0 | One error is reported per object. |
1 | One error of each type is reported per object. |
2 | All errors are reported. |
This function always succeeds.
The array argument is an array of size 4 or larger, or 0 can be passed for this argument. If an array is passed, it represents a rectangular area where checking is performed, and the values are in microns in order L,B,R,T. If 0 is passed, the entire area of the current cell is checked.
The second argument can be a file handle opened with the Open function for writing, or the name of a file to open, or an empty string, or a null string or (equivalently) the scalar 0. This sets the destination for error recording. If the argument is null or 0, a file will be created in the current directory using the name template ``drcerror.log.cellname'', where cellname is the current cell. If an empty string is passed (give "" as the argument), output will go to the error log, and appear in the pop-up which appears on-screen. If a string is given, it is taken as a file name to open.
The function returns an integer, either the number of errors found or -1 on error. If -1 is returned, an error message is probably available from the GetError function.
If the given cellname is null or 0 is passed, the default cell for the named CHD is assumed.
The checking is performed on the areas of a grid, and only the cells needed to render the grid area are read into memory temporarily. The gridsize argument gives the size of this grid, in microns. If 0 is passed, no grid is used, and the entire layout will be read into memory, as in the normal case. If a negative value is passed, the value associated with the DrcPartitionSize variable is used. The chosen grid size should be small enough to avoid page swapping, but too-small of a grid will lengthen checking time (larger is better in this regard). The user can experiment to find a reasonable value for their designs. A good starting value might be 400.0 microns.
The array argument is an array of size 4 or larger, or 0 can be passed for this argument. If an array is passed, it represents a rectangular area where checking is performed, and the values are in microns in order L,B,R,T. If 0 is passed, the entire area of the cellname is checked.
The file_handle_or_name argument can be a file handle opened with the Open function for writing, or the name of a file to open, or an empty or null string or the scalar 0. This sets the destination for error recording. If the argument is null, empty or 0, a file will be created in the current directory using the name template ``drcerror.log.cellname'', where cellname is the top-level cell being checked. If a string is given, it is taken as a file name to open. There is no provision for sending output to the on-screen error logger, unlike in the DRCcheckArea function.
If the boolean argument flatten is true, the geometry will be flattened as it is read into memory. This will make life simpler and faster for the DRC evaluation functions, at the expense of (probably) much larger memory use. The user can experiment to find if this option provides any speed benefit.
The function returns an integer, either the number of errors found or -1 on error. If -1 is returned, an error message is probably available from the GetError function.
The first three arguments specify an existing design rule. The rule is defined on the layer named in the first argument (a string). The type of rule is given as a string in the second argument. This is the name of an ``edge'' rule, which uses test regions constructed along edges to evaluate the rule. Valid names are the user-defined rules and
MinEdgeLength
MaxWidth
MinWidth
MinSpace
MinSpaceTo
MinSpaceFrom
MinOverlap
MinNoOverlap
The third argument is an integer index which specifies the rule to choose if there is more than one of the named type assigned to the layer. The index is zero based, and indicates the position of the rule when listed in the window of the Design Rule Editor panel from the Edit Rules button in the DRC Menu, relative to and counting only rules of the same type. The is also the order as first seen by Xic, as read from the technology file or created interactively.
The fourth argument is a ``zoidlist'' as is taken by many of the functions that deal with layer expressions and trapezoid lists, as explained for those functions (see F.7.1). If the value passed is a scalar 0, then geometry is obtained from the full hierarchy of the current cell. In this case, the created test areas will be identical to those created during a DRC run. It may be instructive to create a visible layer from this result, to see where testing is being performed.
If the argument instead passes trapezoids, the result will be creation of the test regions as if the passed trapezoids were features on the layer or Region associated with the rule. The actual features on the layer are ignored.
The function will fail and halt execution if the first three arguments do not indicate an existing design rule definition.
The first argument is a ``zoidlist'' as expected by other functions that accept this argument type (see F.7.1). Unlike for DRCzList, this argument can not be zero or null.
The second argument is a string providing a target layer expression. This may be scalar 0 or null. The inside and outside arguments are strings providing layer expressions that will select which parts of an edge will be used for test area generation. The inside is the area inside the figure at the edge, and outside is just outside of the figure along the edge. Either can be null or scalar 0.
The incode and outcode are integer values 0-2 which indicate how the inside and outside expressions are to be interpreted with regard to defining the ``active'' part of the edge. The values have the following interpretations:
0 Don't care, the value expression is ignored. 1 The active parts of the edge are where the expression is clear. 2 The active parts of the edge are where the expression is dark.
The dimen is the width of the test area, in microns. It must be a positive real number.
If all goes well, a trapezoid list reprseenting the effective test areas is returned.