next up previous contents index
Next: Geometry Measurement Up: Geometry Creation and Management Previous: Other Property Management Functions   Contents   Index

Design Rule Checking

The following functions relate to the design rule checking subsystem.

(int) DRCstate(state)
This function sets the interactive DRC state, and returns the existing state. If the argument is 0, interactive DRC is turned off. If nonzero, interactive DRC is turned on. If greater than 1, error messages will not pop up. The return value is the present state, which is a value of 0-2, similarly interpreted.

(int) DRCsetLimits(batch_cnt, intr_cnt, intr_time, skip_cells)
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''.

batch_cnt
This sets the maximum number of errors to record in batch-mode error checking. When this number is reached, the checking is aborted. Values 0 - 100000 are accepted.
intr_cnt
This sets the maximum number of objects tested in interactive DRC. The testing aborts when this count is reached. Values of 0 - 100000 are accepted.
intr_time
This sets the maximum time allowed for interactive DRC testing. The value given is in milliseconds, and values of 0 - 30000 are accepted.
skip_cells
If nonzero, testing of newly placed, moved, or copied subcells is skipped in interactive DRC. If zero, subcells will be tested. This can be a lengthly operation.

This function always returns 1. Out-of-range arguments are set to the maximum permissible values.

(int) DRCgetLimits(array)
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.

(int) DRCsetLevel(level)
This function sets the DRC error recording level to the argument. The argument is interpreted as follows:

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.

(int) DRCgetLevel()
This function returns the current error reporting level for design rule checking. Possible values are

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.

(int) DRCcheckArea(left, bottom, right, top, file_handle)
This function performs DRC over the rectangular area designated by the first four arguments. The file_handle is a value returned from the Open function, or 0. If a file handle is passed, output is recorded in the file. If 0 is passed, output goes to the error logger which appears on-screen. The number of errors detected is returned.

(int) DRCcheckObjects(file_handle)
This function checks each selected object for design rule violations. The file_handle argument is a file descriptor returned from the Open function, or 0. If a file descriptor is passed, output goes to that file, otherwise output goes to the on-screen error logger. This function returns the number of errors found.

(expr_handle) DRCregisterExpr(expr)
This function creates and tags a parse tree from the string argument, which is a layer expression, for later use, and returns a handle to the expression. This avoids the overhead of parsing the expression on each function call. The returned value is used by other functions (currently just the two below).

(int) DRCtestBox(left, bottom, right, top, expr_handle)
This function tests a rectangular area specified by the first four arguments for regions where a layer expression is true. The expr_handle argument is the handle of a layer expression returned by DRCregisterExpr. The returned value is 0 if the expression is nowhere true, 1 if the expression is true somewhere but not everywhere, and 2 if the expression is true everywhere in the test region.

(int) DRCtestPoly(num, points, expr_handle)
This function tests a polygon area for regions where a layer expression is true. The first argument is the number of points in the polygon. The second argument is the name of an array variable containing the polygon data. The polygon data are stored sequentially as x,y pairs, and the last point must be the same coordinate as the first. The length of the vector must be at least two times the value passed for the first argument. The expr_handle argument is the handle of a layer expression returned by DRCregisterExpr. The returned value is 0 if the expression is nowhere true, 1 if the expression is true somewhere but not everywhere, and 2 if the expression is true everywhere in the test region.


next up previous contents index
Next: Geometry Measurement Up: Geometry Creation and Management Previous: Other Property Management Functions   Contents   Index
Stephen R. Whiteley 2006-10-23