From c160f7f43fdc6eb597678ffe5138d8cb4de0931d Mon Sep 17 00:00:00 2001
From: Matthias Koefferlein
+DRC expression objects represent abstract recipes for the Layer#drc universal DRC function.
+For example, when using a universal DRC expression like this:
+
+
+out = in.drc(width < 2.0)
+
+
+"width < 2.0" forms a DRC expression object. DRC expression objects have methods which +manipulate or evaluate the results of this expression. In addition, DRC expressions have a +result type, which is either polygon, edge or edge pair. The result type is defined by the +expression generating it. In the example above, "width < 2.0" is a DRC width check which +renders edge pairs. To obtain polygons from these edge pairs, use the "polygons" method: +
+
+out = in.drc((width < 2.0).polygons) ++
+The following documentation will list the methods available for DRC expression objects. +
+Usage:
++This operator will evaluate the expression after. If this expression renders +an empty result, the operator will return the primary shape. Otherwise it will +return an empty result. +
+This operator can be used together with predicates such a "rectangles" to +invert their meaning. For example, this code selects all primary shapes which +are not rectangles: +
+
+out = in.drc(! rectangles) +out = in.drc(! primary.rectangles) # equivalent ++ +
Usage:
++The & operator will compute the boolean AND between the results +of two expressions. The expression types need to be edge or polygon. +
+The following example computes the partial edges where width is less than +0.3 micrometers and space is less than 0.2 micrometers: +
+
+out = in.drc((width < 0.3).edges & (space < 0.2).edges) ++ +
Usage:
++The + operator will join the results of two expressions. +
+Usage:
++The - operator will compute the difference between the results +of two expressions. The NOT operation is defined for polygons, +edges and polygons subtracted from edges (first argument edge, +second argument polygon). +
+The following example will produce edge markers where the +width of is less then 0.3 micron but not inside polygons on +the "waive" layer: +
+
+out = in.drc((width < 0.3).edges - secondary(waive)) ++ +
Usage:
++The ^ operator will compute the XOR (symmetric difference) between the results +of two expressions. The XOR operation is defined for polygons and edges. +Both expressions must be of the same type. +
+Usage:
++This operation selects edges by their angle, measured against the horizontal +axis in the mathematical sense. +
+For this measurement edges are considered without their direction and straight lines. +A horizontal edge has an angle of zero degree. A vertical one has +an angle of 90 degee. The angle range is from -90 (exclusive) to 90 degree (inclusive). +
+If the input shapes are not polygons or edge pairs, they are converted to edges +before the angle test is made. +
+For example, the following code selects all edges from the primary shape which are 45 degree +(up) or 135 degree (down). The "+" will join the results: +
+
+out = in.drc((angle == 45) + (angle == 135)) +out = in.drc((primary.angle == 45) + (primary.angle == 135)) # equivalent ++
+Note that angle checks usually imply the need to rotation variant formation as cells which +are placed unrotated and rotated by 90 degree cannot be considered identical. This imposes +a performance penalty in hierarchical mode. If possible, consider using DRC#rectilinear for +example to detect shapes with non-manhattan geometry instead of using angle checks. +
+The "angle" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.angle". +
+Usage:
++This operation is used in conditions to select shapes based on their area. +It is applicable on polygon expressions. The result will be the input +polygons if the area condition is met. +
+See Layer#drc for more details about comparison specs. +
+The following example will select all polygons with an area less than 2.0 square micrometers: +
+
+out = in.drc(area < 2.0) +out = in.drc(primary.area < 2.0) # equivalent ++
+The area method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.area". +
+Usage:
++This operation acts similar to DRC#bbox_min, but takes the height of the shape's +bounding box. In general, it's more advisable to use DRC#bbox_min or DRC#bbox_max +because bbox_height implies a certain orientation. This can imply variant formation in +hierarchical contexts: cells rotated by 90 degree have to be treated differently from +ones not rotated. This usually results in a larger computation effort and larger result files. +
+The "bbox_height" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.bbox_height". +
+Usage:
++This operation acts similar to DRC#bbox_min, but takes the larger dimension of the shape's +bounding box. +
+The "bbox_max" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.bbox_max". +
+Usage:
++This operation is used in conditions to select shapes based on smaller dimension of their bounding boxes. +It is applicable on polygon expressions. The result will be the input +polygons if the bounding box condition is met. +
+See Layer#drc for more details about comparison specs. +
+The following example will select all polygons whose bounding box smaller dimension is larger +than 200 nm: +
+
+out = in.drc(bbox_min > 200.nm) +out = in.drc(primary.bbox_min > 200.nm) # equivalent ++
+The "bbox_min" method is available as a plain function or as a method on DRC# expressions. +The plain function is equivalent to "primary.bbox_min". +
+Usage:
++This operation acts similar to DRC#bbox_min, but takes the width of the shape's +bounding box. In general, it's more advisable to use DRC#bbox_min or DRC#bbox_max +because bbox_width implies a certain orientation. This can imply variant formation in +hierarchical contexts: cells rotated by 90 degree have to be treated differently from +ones not rotated. This usually results in a larger computation effort and larger result files. +
+The "bbox_width" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.bbox_width". +
+Usage:
++This method acts on edge expressions and delivers a specific part of each edge. +See layer#centers for details about this functionality. +
+Usage:
++This operation acts on polygons and selects the corners of the polygons. +It can be put into a condition to select corners by their angles. The angle of +a corner is positive for a turn to the left if walking a polygon counterclockwise +and negative for the turn to the right. Angles take values between -180 and 180 degree. +
+When using "as_dots" for the argument, the operation will return single-point edges at +the selected corners. With "as_boxes" (the default), small (2x2 DBU) rectangles will be +produced at each selected corner. +
+The following example selects all corners: +
+
+out = in.drc(corners) +out = in.drc(primary.corners) # equivalent ++
+The following example selects all inner corners: +
+
+out = in.drc(corners < 0) +out = in.drc(primary.corners < 0) # equivalent ++
+The "corners" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.corners". +
+Usage:
++This operation is used in conditions to select expression results based on their +count. "count" is used as a method on a expression. It will evaluate the expression locally +and return the original result if the shape count in the result is matching the condition. +
+See Layer#drc for more details about comparison specs. +
+Note that the expression is evaluated locally: for each primary shape, the expression is +evaluated and the count of the resulting edge, edge pair or polygon set is taken. +As the primary input will always have a single item (the local shape), using "count" on +primary does not really make sense. It can be used on derived expressions however. +
+The following example selects triangles: +
+
+out = in.drc(if_any(corners.count == 3)) ++
+Note "if_any" which selects the primary shape if the argument evaluates to a non-empty +result. Without "if_any" three corners are returned for each triangle. +
+Usage:
++Polygons will be separated into edges forming their contours. Edge pairs will be +decomposed into individual edges. +
+Contrary most other operations, "edges" does not have a plain function equivalent +as this is reserved for the function generating an edges layer. +To generate the edges of the primary shapes, use "primary" explicit as the source +for the edges: +
+
+out = in.drc(primary.edges) ++ +
Usage:
++This method acts on edge expressions and delivers a specific part of each edge. +See layer#end_segments for details about this functionality. +
+Usage:
++This method acts on edge expressions. +It will create a polygon for each edge +tracing the edge with certain offsets to the edge. "o" is the offset applied to the +outer side of the edge, "i" is the offset applied to the inner side of the edge. +"b" is the offset applied at the beginning and "e" is the offset applied at the end. +
+Usage:
++This method acts on edge expressions. Polygons are generated for +each edge describing the edge drawn with a certain width extending into +the "inside" (the right side when looking from start to end). +This method is basically equivalent to the extended method: +"extended(0, 0, 0, dist)". +A version extending to the outside is extended_out. +
+Usage:
++This method acts on edge expressions. Polygons are generated for +each edge describing the edge drawn with a certain width extending into +the "outside" (the left side when looking from start to end). +This method is basically equivalent to the extended method: +"extended(0, 0, dist, 0)". +A version extending to the inside is extended_in. +
+Usage:
++The extent_refs operation acts on polygons and has the same effect than Layer#extent_refs. +It takes the same arguments. It is available as a method on DRC expressions or +as plain function, in which case it acts on the primary shapes. +
+Usage:
++This method provides the same functionality as Layer#extents and takes the same +arguments. It returns the bounding boxes of the input objects. It acts on edge +edge pair and polygon expressions. +
+The "extents" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.extents". +
+Usage:
++This method acts on edge pair expressions and returns the first edges of the +edge pairs delivered by the expression. +
+Usage:
++This operation can be used as a plain function in which case it acts on primary +shapes or can be used as method on another DRC expression. +The following example selects all holes with an area larger than 2 square micrometers: +
+
+out = in.drc(holes.area > 2.um) +out = in.drc(primary.holes.area > 2.um) # equivalent ++ +
Usage:
++The hulls are the outer contours of the input polygons. By selecting hulls only, +all holes will be closed. +
+This operation can be used as a plain function in which case it acts on primary +shapes or can be used as method on another DRC expression. +The following example closes all holes: +
+
+out = in.drc(hulls) +out = in.drc(primary.hulls) # equivalent ++ +
Usage:
++This operation will select those edges which are meeting the length +criterion. Non-edge shapes (polygons, edge pairs) will be converted to edges before. +
+For example, this code selects all edges from the primary shape which are longer or +equal than 1 micrometer: +
+
+out = in.drc(length >= 1.um) +out = in.drc(primary.length >= 1.um) # equivalent ++
+The "length" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.length". +
+Usage:
++This operation will act on polygons. Without a min_count argument, the merged +polygons will be returned. +
+With a min_count argument, the result will include only those parts where more +than the given number of polygons overlap. As the primary input is merged already, +it will always contribute as one. +
+The "merged" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.merged". +
+Usage:
++The middle operation acts on polygons and has the same effect than Layer#middle. +It takes the same arguments. It is available as a method on DRC expressions or +as plain function, in which case it acts on the primary shapes. +
+Usage:
++Non-orientable polygons are for example "8"-shape polygons. Such polygons are +usually considered harmful as their definition of covered area is depending on the +wrap count rule in place. +
+This operation can be used as a plain function in which case it acts on primary +shapes or can be used as method on another DRC expression. +
+Usage:
++This operation is used in conditions to select shapes based on their perimeter. +It is applicable on polygon expressions. The result will be the input +polygons if the perimeter condition is met. +
+See Layer#drc for more details about comparison specs. +
+The following example will select all polygons with a perimeter less than 10 micrometers: +
+
+out = in.drc(perimeter < 10.0) +out = in.drc(primary.perimeter < 10.0) # equivalent ++
+The perimeter method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.perimeter". +
+Usage:
++Generates polygons from the input shapes. Polygons stay polygons. Edges and edge pairs +are converted to polygons. For this, the enlargement parameter will specify the +edge thickness or augmentation applied to edge pairs. With the default enlargement +of zero edges will not be converted to valid polygons and degenerated edge pairs +will not become valid polygons as well. +
+Contrary most other operations, "polygons" does not have a plain function equivalent +as this is reserved for the function generating a polygon layer. +
+This method is useful for generating polygons from DRC violation markers as shown in +the following example: +
+
+out = in.drc((width < 0.5.um).polygons) ++ +
Usage:
++This operation can be used as a plain function in which case it acts on primary +shapes or can be used as method on another DRC expression. +The following example selects all rectangles: +
+
+out = in.drc(rectangles) +out = in.drc(primary.rectangles) # equivalent ++ +
Usage:
++Rectilinear polygons only have vertical and horizontal edges. Such polygons are also +called manhattan polygons. +
+This operation can be used as a plain function in which case it acts on primary +shapes or can be used as method on another DRC expression. +The following example selects all manhattan polygons: +
+
+out = in.drc(rectilinear) +out = in.drc(primary.rectilinear) # equivalent ++ +
Usage:
++This operation acts on polygons and applies corner rounding the the given inner +and outer corner radius and the number of points n per full circle. See Layer#rounded_corners for more details. +
+The "rounded_corners" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.rounded_corners". +
+Usage:
++This method acts on edge pair expressions and returns the second edges of the +edge pairs delivered by the expression. +
+Usage:
++This method provides the same functionality as Layer#sized and takes the same +arguments. It acts on polygon expressions. +
+The "sized" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.sized". +
+Usage:
++This operation acts on polygons and applies polygon smoothing with the tolerance d. See Layer#smoothed for more details. +
+The "smoothed" method is available as a plain function or as a method on DRC expressions. +The plain function is equivalent to "primary.smoothed". +
+Usage:
++This method acts on edge expressions and delivers a specific part of each edge. +See layer#start_segments for details about this functionality. +
+Usage:
++The | operator will compute the boolean OR between the results of +two expressions. '+' is basically a synonym. Both expressions +must render the same type. +
+ diff --git a/src/lay/lay/doc/about/drc_ref_global.xml b/src/lay/lay/doc/about/drc_ref_global.xml index 38cc38445..9d9bd3cb5 100644 --- a/src/lay/lay/doc/about/drc_ref_global.xml +++ b/src/lay/lay/doc/about/drc_ref_global.xml @@ -7,11 +7,6 @@-Some functions are available on global level and can be used without any object. -Most of them are convenience functions that basically act on some default object -or provide function-like alternatives for the methods. -
See Netter#antenna_check for a description of that function.
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.area" (see Layer#area). Without a layer +argument, "area" represents an area filter for primary shapes in +DRC expressions (see Layer#drc and DRC#area for more details). +
+Usage:
++This method creates a universal DRC expression (see Layer#drc) to select primary shapes whose +bounding box height satisfies the condition. Conditions may be written as arithmetic comparisons +against numeric values. For example, "bbox_height < 2.0" will select all primary shapes whose +bounding box height is less than 2 micrometers. See Layer#drc for more details about comparison +specs. Plain "bbox_min" is equivalent to "primary.bbox_min" - i.e. it is used on the primary +shape. Also see DRC#bbox_min. +
+Usage:
++See Layer#drc, bbox_max and DRC#bbox_max for more details. +
+Usage:
++See Layer#drc, bbox_min and DRC#bbox_min for more details. +
+Usage:
++See Layer#drc, bbox_height and DRC#bbox_height for more details. +
Usage:
@@ -85,6 +134,32 @@ The area_cap argument is the capacitance in Farad per square micrometer. SeeUsage:
++This function provides a conditional selector for the "drc" function. +It is used this way: +
+
+out = in.drc(case(c1, r1, c2, r2, ..., cn, rn) +out = in.drc(case(c1, r1, c2, r2, ..., cn, rn, rdef) ++
+This function will evaluate c1 which is a universal DRC expression (see Layer#drc). +If the result is not empty, "case" will evaluate and return r1. Otherwise it +will continue with c2 and the result of this expression is not empty it will +return r2. Otherwise it will continue with c3/r3 etc. +
+If an odd number of arguments is given, the last expression is evaluated if +none of the conditions c1..cn gives a non-empty result. +
+As a requirement, the result types of all r1..rn expressions and the rdef +needs to be the same - i.e. all need to render polygons or edges or edge pairs. +
Usage:
@@ -251,6 +326,50 @@ See Netter#connect_globalSee Netter#connect_implicit for a description of that function.
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.corners" (see Layer#corners). Without a layer +argument, "corners" represents the corner generator/filter in primary shapes for +DRC expressions (see Layer#drc and DRC#corners for more details). +
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.covering" (see Layer#covering). +
+Without a layer argument, this method represents the selector of primary shapes +which entirely cover shapes from the other layer. This version can be put into +a condition indicating how many shapes of the other layer need to be covered. +Use this variant within DRC expressions (also see Layer#drc). +
+For example, the following statement selects all input shapes which entirely +cover shapes from the "other" layer: +
+
+out = in.drc(covering(other)) ++
+This example selects all input shapes which entire cover shapes from +the other layer and there are more than two shapes from "other" inside +primary shapes: +
+
+out = in.drc(covering(other) > 2) ++
Usage:
@@ -380,6 +499,49 @@ See Source#edge_pairs for a dSee Source#edges for a description of that function.
+Usage:
++"enc" is the short form for enclosing. +
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.enclosing" (see Layer#enclosing). +
+The version without the first layer is intended for use within DRC expressions +together with the Layer#drc method. In this case, this function needs to be +put into a condition to specify the check constraints. The other options +of Layer#enclosing (e.g. metrics, projection constraints, angle limits etc.) +apply to this version too. +
+The conditions may involve an upper and lower limit. The following examples +illustrate the use of this function with conditions: +
+
+out = in.drc(enclosing(other) < 0.2.um) +out = in.drc(enclosing(other) <= 0.2.um) +out = in.drc(enclosing(other) > 0.2.um) +out = in.drc(enclosing(other) >= 0.2.um) +out = in.drc(enclosing(other) == 0.2.um) +out = in.drc(0.1.um <= enclosing(other) < 0.2.um) ++
+The result of the enclosing check are edge pairs forming the violation +markers. With a lower limit, these markers are formed by two, identical but opposite edges attached to +the primary shape. Without a lower limit, the first edge of the marker is attached to the +primary shape while the second edge is attached to the shape of the "other" layer. +
Usage:
@@ -398,6 +560,32 @@ Similar to log, but the message is printed formatted as an erSee Source#extent for a description of that function.
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.extent_refs" (see Layer#extent_refs). Without a layer +argument, "extent_refs" represents the partial extents extractor on primary shapes within +DRC expressions (see Layer#drc and DRC#extent_refs for more details). +
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.extents" (see Layer#extents). Without a layer +argument, "extents" represents the extents generator on primary shapes within +DRC expressions (see Layer#drc and DRC#extents for more details). +
Usage:
@@ -417,6 +605,95 @@ See Netter#extract_devicesDisables tiling mode. Tiling mode can be enabled again with tiles later.
+Usage:
++The primary input of the universal DRC function is the layer the Layer#drc function +is called on. This operation represents all "other" primary polygons while +primary represents the current polygon. +
+This feature opens new options for processing layouts beyond the +abilities of the classical DRC concept. For classic DRC, intra-layer interactions +are always symmetric: a polygon cannot be considered separated from it's neighbors +on the same layer. +
+The following example computes every part of the input which is closer than +0.5 micrometers to other (disconnected) polygons on the same layer: +
+
+out = in.drc(primary & foreign.sized(0.5.um)) ++ +
Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.holes" (see Layer#hulls). Without a layer +argument, "holes" represents a hole extractor for primary shapes in +DRC expressions (see Layer#drc and DRC#hulls for more details). +
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.hulls" (see Layer#hulls). Without a layer +argument, "hulls" represents a hull contour extractor for primary shapes in +DRC expressions (see Layer#drc and DRC#hulls for more details). +
+Usage:
++This function will evaluate the conditions c1 to cn and return the +current primary shape if all conditions render a non-empty result. +The following example selects all shapes which are rectangles and +whose area is larger than 0.5 square micrometers: +
+
+out = in.drc(if_all(area > 0.5, rectangle)) ++
+The condition expressions may be of any type (edges, edge pairs and polygons). +
+Usage:
++This function will evaluate the conditions c1 to cn and return the +current primary shape if at least one condition renders a non-empty result. +See if_all for an example how to use the if_... functions. +
+Usage:
++This function will evaluate the conditions c1 to cn and return the +current primary shape if all conditions renders an empty result. +See if_all for an example how to use the if_... functions. +
Usage:
@@ -440,6 +717,33 @@ See Source#input for a description polygons and labels. See polygons and labels for more specific versions of this method. +Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.inside" (see Layer#inside). +
+Without a layer argument, this method represents the selector of primary shapes +which are entirely inside shapes from the other layer. +Use this variant within DRC expressions (also see Layer#drc). +
+Usage:
++See covering for a description of the use cases for this function. +When using "interacting", shapes are selected when the interact (overlap, touch) +shapes from the other layer. +
Usage:
@@ -452,6 +756,15 @@ this method.Usage:
++"iso" is the short form for isolated. +
Usage:
@@ -589,6 +902,19 @@ Set the value to zero to disable splitting by vertex count.See also max_area_ratio for the other option affecting polygon splitting.
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.middle" (see Layer#middle). Without a layer +argument, "middle" represents the bounding box center marker generator on primary shapes within +DRC expressions (see Layer#drc and DRC#middle for more details). +
Usage:
@@ -640,6 +966,30 @@ See Netter for more detailsResets the tile borders - see tile_borders for a description of tile borders.
+Usage:
++Provides a intra-polygon space check for polygons from the primary layer. Like width this +function provides a single-layer check. See there for details how to use this function. +
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.odd_polygons" (see Layer#odd_polygons). Without a layer +argument, "odd_polygons" represents an odd polygon filter for primary shapes in +DRC expressions (see Layer#drc and DRC#odd_polygons for more details). +
Usage:
@@ -660,6 +1010,44 @@ This method switches output to the specified cell, but does not change the target layout nor does it switch the output channel to layout if is report database. +Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.outside" (see Layer#outside). +
+Without a layer argument, this method represents the selector of primary shapes +which are entirely outside shapes from the other layer. +Use this variant within DRC expressions (also see Layer#drc). +
+Usage:
++Provides an overlap check (primary layer vs. another layer). Like enclosing this +function provides a two-layer check. See there for details how to use this function. +
+Usage:
++See covering for a description of the use cases for this function. +When using "overlapping", shapes are selected when the overlap +shapes from the other layer. +
Usage:
@@ -685,6 +1073,19 @@ x.insert(polygon([ p(0, 0), p(16.0, 0), p(8.0, 8.0) ])) This function creates a path object. The arguments are the same than for theUsage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.perimeter" (see Layer#perimeter). Without a layer +argument, "perimeter" represents a perimeter filter for primary shapes in +DRC expressions (see Layer#drc and DRC#perimeter for more details). +
Usage:
@@ -716,6 +1117,42 @@ A similar method which creates a hierarchical layer in deep mode isSee Source#polygons for a description of that function.
+Usage:
++The primary input of the universal DRC function is the layer the Layer#drc function +is called on. +
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.rectangles" (see Layer#rectangles). Without a layer +argument, "rectangles" represents the rectangles filter for primary shapes in +DRC expressions (see Layer#drc and DRC#rectangles for more details). +
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.rectilinear" (see Layer#rectilinear). Without a layer +argument, "rectilinear" represents the rectilinear polygons filter for primary shapes in +DRC expressions (see Layer#drc and DRC#rectilinear for more details). +
Usage:
@@ -785,6 +1222,36 @@ The sheet_rho value is the sheet resistance in ohms/square. SeeUsage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.rounded_corners" (see Layer#rounded_corners). Without a layer +argument, "rounded_corners" represents the corner rounding algorithm on primary shapes within +DRC expressions (see Layer#drc and DRC#rounded_corners for more details). +
+Usage:
++To supply additional input for the universal DRC expressions (see Layer#drc), use +"secondary" with a layer argument. This example provides a boolean AND +between l1 and l2: +
+
+l1 = layer(1, 0) +l2 = layer(2, 0) +out = l1.drc(primary & secondary(l2)) ++
Usage:
@@ -794,6 +1261,26 @@ about this extractor.See Source#select for a description of that function.
+Usage:
++"sep" is the short form for separation. +
+Usage:
++Provides a separation check (primary layer vs. another layer). Like enclosing this +function provides a two-layer check. See there for details how to use this function. +
Usage:
@@ -803,6 +1290,34 @@ See Source#select for a descriptiThis function is equivalent to "verbose(false)" (see verbose)
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.sized" (see Layer#sized). Without a layer +argument, "sized" represents the polygon sizer on primary shapes within +DRC expressions (see Layer#drc and DRC#sized for more details). +
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.smoothed" (see Layer#smoothed). Without a layer +argument, "smoothed" represents the polygon smoother on primary shapes within +DRC expressions (see Layer#drc and DRC#smoothed for more details). +
Usage:
@@ -815,7 +1330,7 @@ This function replaces the default source layout by the specified file. If this function is not used, the currently active layout is used as input.-layout is a similar method which specifies a additional input layout. +layout is a similar method which specifies an additional input layout.
"what" specifies what input to use. "what" be either
@@ -840,6 +1355,17 @@ l2 = layout("second_layout.gds")
For further methods on the source object see Source.
+Usage:
++Provides a space check on the primary layer. Like width this +function provides a single-layer check. See there for details how to use this function. +
Usage:
@@ -963,6 +1489,40 @@ In verbose mode, more output is generated in the log fileIn verbose mode, more output is generated in the log file
+Usage:
++This function can be used with a layer argument in which case it +is equivalent to "layer.width" (see Layer#width). +
+The version without a layer is intended for use within DRC expressions +together with the Layer#drc method. In this case, this function needs to be +put into a condition to specify the check constraints. The other options +of Layer#width (e.g. metrics, projection constraints, angle limits etc.) +apply to this version too. +
+The conditions may involve an upper and lower limit. The following examples +illustrate the use of this function with conditions: +
+
+out = in.drc(width < 0.2.um) +out = in.drc(width <= 0.2.um) +out = in.drc(width > 0.2.um) +out = in.drc(width >= 0.2.um) +out = in.drc(width == 0.2.um) +out = in.drc(0.1.um <= width < 0.2.um) ++
+The result of the width check are edge pairs forming the violation +markers. With a lower limit, these markers are formed by two, identical but opposite edges attached to +the primary shape. Without a lower limit, both edges are attached to different sides of the primary +shape. +
Usage:
diff --git a/src/lay/lay/doc/about/drc_ref_layer.xml b/src/lay/lay/doc/about/drc_ref_layer.xml index f596d3391..bb69973b0 100644 --- a/src/lay/lay/doc/about/drc_ref_layer.xml +++ b/src/lay/lay/doc/about/drc_ref_layer.xml @@ -7,9 +7,6 @@-The layer object represents a collection of polygons, edges or edge pairs. -
Usage:
++This method implement the universal DRC which offers enhanced abilities, +improved performance in some applications and better readability. +
+The key concept for this method are DRC expressions. DRC expressions +are formed by using predefined keywords like "width", operators like "&" +and method to build an abstract definition of the operations to perform +within the DRC. +
+When the DRC function is executed, it will basically visit all shapes +from the input layer (the one, the "drc" method is called on), collect +the neighbor shapes from all involved other inputs and run the requested +operations on each cluster. Currently, "drc" is only available for polygon +layers. +
+The nature of the "drc" operation is that of the loop over all (merged) input +polygons. Within the operation executed on each shape, it's possible to make +decisions such as "if the shape has an area larger than something, apply this +operation" etc. This can be achieved with conventional DRC functions too, +but involves potentially complex and heavy operations such as booleans, interact +etc. For this reason, the "drc" function may provide a performance benefit. +
+In addition, within the loop, a single shape from the input layer is presented to +execution engine which runs the operations. +This allows using operations such as "size" without having to consider +neigbor polygons growing into the area of the initial shape. In this sense, +the "drc" function allows seeing the layer as individual polygons rather than +a global "sea of polygons". This enables new applications which are otherwise +difficult to implement. +
+An important concept in the context of "drc" expressions is the "primary". +This expression represents a single primary shape. "Secondaries" are shapes +from other inputs. Primary shapes guide the operation - secondaries without +primaries are not seen. The "drc" operation will look for secondaries within +a certain distance which is determined from the operations within the +expression to execute. The secondaries collected in this step will not be +merged, so the secondary polygons may be partial. This is important when +using measurement operations like "area" on secondary polygons. +
+Here is an example for a generic DRC operation which performs a width +check for less than 0.5.um on the primary shapes. +
+
+out = in.drc(width < 0.5.um) ++
+Another example computes a boolean AND between two layers before selecting +the result polygons with an area larger than 1 square micrometer: +
+
+other = ... another layer .. +out = in.drc((primary & other).area > 1.0) ++
+This example demonstrates how the "drc" operation can improve performance: as the +boolean operation is computed locally and the result is discarded when no longer required, +less shapes need to be stored hence reducing the memory overhead and CPU time required +to manage these shapes. +
+For more details about the expression see the DRC class documentation. +
Usage:
@@ -2482,7 +2546,12 @@ Shielding is enabled by default, but can be switched off with the "transparent"When called on an edge layer, the method selects edges by their angle, measured against the horizontal axis in the mathematical sense. -The first version selects +
+For this measurement edges are considered without their direction and straight lines. +A horizontal edge has an angle of zero degree. A vertical one has +an angle of 90 degee. The angle range is from -90 (exclusive) to 90 degree (inclusive). +
+The first version of this method selects
edges with a angle larger or equal to min and less than max (but not equal).
The second version selects edges with exactly the given angle. The third
version is identical to the first one.
diff --git a/src/lay/lay/doc/about/index.xml b/src/lay/lay/doc/about/index.xml
index 948703245..f5c93bbe2 100644
--- a/src/lay/lay/doc/about/index.xml
+++ b/src/lay/lay/doc/about/index.xml
@@ -30,13 +30,7 @@