diff --git "a/html/klayout_docs/www.klayout.de/doc-qt5/about/drc_ref_global.html" "b/html/klayout_docs/www.klayout.de/doc-qt5/about/drc_ref_global.html" new file mode 100644--- /dev/null +++ "b/html/klayout_docs/www.klayout.de/doc-qt5/about/drc_ref_global.html" @@ -0,0 +1,1199 @@ + + +
+ + + + + + + + + + + +Usage:
+"angle" represents the edge orientation filter on the primary shape edges in +DRC expressions (see Layer#drc and DRC#angle for more details). In this context, +the operation acts similar to Layer#with_angle. +
Usage:
+See Netter#antenna_check for a description of that function. +
Usage:
+This function can be used with a layer argument. In this case it +is equivalent to "layer.area" (see Layer#area) and returns the total area of the +polygons in the layer. +
+Without a layer argument, "area" represents an area filter for primary shapes in +global expressions (see Layer#drc and DRC#area for more details). +
Usage:
+See Layer#drc, area_ratio and DRC#area_ratio for more details. +
Usage:
+See Layer#drc, bbox_aspect_ratio and DRC#bbox_aspect_ratio 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:
+Use this class with extract_devices to specify extraction of a +bipolar junction transistor +
+See DeviceExtractorBJT3Transistor for more details +about this extractor. +
Usage:
+Use this class with extract_devices to specify extraction of a +bipolar junction transistor with a substrate terminal +
+See DeviceExtractorBJT4Transistor for more details +about this extractor. +
Usage:
+This function creates a box object. The arguments are the same than for the +DBox constructors. +
Usage:
+Use this class with extract_devices to specify extraction of a capacitor. +The area_cap argument is the capacitance in Farad per square micrometer. +
+See DeviceExtractorCapacitor for more details +about this extractor. +
Usage:
+Use this class with extract_devices to specify extraction of a capacitor +with a bulk terminal. +The area_cap argument is the capacitance in Farad per square micrometer. +
+See DeviceExtractorCapacitorWithBulk for more details +about this extractor. +
Usage:
+See Source#cell for a description of that function. +In addition to the functionality described there, the global function will also send the output +to the specified cell. +
+The following code will select cell "MACRO" from the input layout: +
+cell("MACRO")
+# shapes now will be taken from cell "MACRO"
+l1 = input(1, 0)
+Usage:
+Hierarchy cheats can be used in deep mode to shortcut hierarchy evaluation +for certain cells and consider their local configuration only. +Cheats are useful for example when dealing with memory arrays. Often +such arrays are build from unit cells and those often overlap with their +neighbors. Now, if the hierarchical engine encounters such a situation, it +will first analyse all these interactions (which can be expensive) and then +it may come to the conclusion that boundary instances need to be handled +differently than inside instances. This in turn might lead to propagation of +shapes and in an LVS context to device externalisation: because some devices +might have different parameters for boundary cells than for inside cells, the +device instances can no longer be kept inside the unit cell. Specifically for +memory arrays, this is not desired as eventually this leads to flattening +of the whole array. +
+The solution is to cheat: provided the unit cell is fully fledged and neighbors +do not disturb the unit cell's configuration in critical ways, the unit cell +can be treated as being isolated and results are put together in the usual way. +
+Cheats can be applied on layout operations - specifically booleans - and device +extraction operations. Cheats are only effective in deep mode. +
+For booleans, a cheat means that the cheating cell's boolean results are computed +locally and are combined afterwards. A cheat is introduced this way: +
+deep
+
+l1 = input(1, 0)
+l2 = input(2, 0)
+
+# usual booleans
+l1and2 = l1 & l2
+
+# will compute "UNIT_CELL" isolated and everything else in normal hierarchical mode:
+l1minus2 = cheat("UNIT_CELL) { l1 - l2 }
++The cheat block can also be wrapped in do .. end statements and can return multiple +layer objects: +
+deep
+
+l1 = input(1, 0)
+l2 = input(2, 0)
+
+# computes both AND and NOT of l1 and l2 with cheating for "UNIT_CELL"
+l1and2, l1minus2 = cheat("UNIT_CELL) do
+[ l1 & l2, l1 - l2 ]
+end
++(Technically, the cheat code block is a Ruby Proc and cannot create variables +outside its scope. Hence the results of this code block have to be passed +through the "cheat" method). +
+To apply cheats for device extraction, use the following scheme: +
+deep
+
+poly = input(1, 0)
+active = input(2, 0)
+
+sd = active - poly
+gate = active & poly
+
+# device extraction with cheating for "UNIT_CELL":
+cheat("UNIT_CELL") do
+extract_devices(mos3("NMOS"), { "SD" => sd, "G" => gate, "tS" => sd, "tD" => sd, "tG" => poly }
+end
++The argument to the cheat method is a list of cell name pattern (glob-style +pattern). For example: +
+cheat("UNIT_CELL*") { ... }
+cheat("UNIT_CELL1", "UNIT_CELL2") { ... }
+cheat("UNIT_CELL{1,2}") { ... }
++For LVS applications, it's usually sufficient to cheat in the device extraction step. +Cheats have been introduced in version 0.26.1. +
Usage:
+See Netter#clear_connections for a description of that function. +
Usage:
+See Source#clip for a description of that function. +
+The following code will select shapes within a 500x600 micron rectangle (lower left corner at 0,0) +from the input layout. The shapes will be clipped to that rectangle: +
+clip(0.mm, 0.mm, 0.5.mm, 0.6.mm) +# shapes now will be taken from the given rectangle and clipped to it +l1 = input(1, 0) +
+To remove the clip condition, call "clip" without any arguments. +
Usage:
+See Netter#connect for a description of that function. +
Usage:
+See Netter#connect_explicit for a description of that function. +Net names is an array (use square brackets to list the net names). +
Usage:
+See Netter#connect_global for a description of that function. +
Usage:
+See Netter#connect_implicit for a description of that function. +
Usage:
+This function can be used with a layer argument. In this 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 corners for more details). +
+Like the layer-based version, the "corners" operator accepts the +output type option: "as_dots" for dot-like edges, "as_boxes" for +small (2x2 DBU) box markers and "as_edge_pairs" for edge pairs. +The default output type is "as_boxes". +
+The "corners" operator can be put into a condition which means it's +applied to corners meeting a particular angle constraint. +
Usage:
+This operator 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 operator within DRC expressions (also see Layer#drc). If can be used +as method to an expression. See there for more details: covering. +
Usage:
+Without any argument, this method gets the database unit +used inside the DRC engine. +
+With an argument, sets the database unit used internally in the DRC engine. +Without using that method, the database unit is automatically +taken as the database unit of the last input. +A specific database unit can be set in order to optimize +for two layouts (i.e. take the largest common denominator). +When the database unit is set, it must be set at the beginning +of the script and before any operation that uses it. +
Usage:
+In deep mode, the operations will be performed in a hierarchical fashion. +Sometimes this reduces the time and memory required for an operation, but this +will also add some overhead for the hierarchical analysis. +
+"deepness" is a property of layers. Layers created with "input" while in +deep mode carry hierarchy. Operations involving such layers at the only +or the first argument are carried out in hierarchical mode. +
+Hierarchical mode has some more implications, like "merged_semantics" being +implied always. Sometimes cell variants will be created. +
+Deep mode can be cancelled with tiles or flat. +
Usage:
+In deep mode, non-orientable (e.g. "8"-shaped) polygons may not be resolved properly. +By default the interpretation of such polygons is undefined - they may even vanish entirely. +By setting this flag to true, the deep mode layout processor will reject such polygons with +an error. +
Usage:
+See Netter#device_scaling for a description of that function. +
Usage:
+Use this class with extract_devices to specify extraction of a +planar diode +
+See DeviceExtractorDiode for more details +about this extractor. +
Usage:
+Use this class with extract_devices to specify extraction of a +three-terminal DMOS transistor. A DMOS transistor is essentially +the same than a MOS transistor, but source and drain are +separated. +
+See DeviceExtractorMOS3Transistor for more details +about this extractor (strict mode applies for 'dmos3'). +
Usage:
+Use this class with extract_devices to specify extraction of a +four-terminal DMOS transistor. A DMOS transistor is essentially +the same than a MOS transistor, but source and drain are +separated. +
+See DeviceExtractorMOS4Transistor for more details +about this extractor (strict mode applies for 'dmos4'). +
Usage:
+This function creates an edge object. The arguments are the same than for the +DEdge constructors. +
Usage:
+The intention of that method is to create an empty layer which can be +filled with edge objects using Layer#insert. +
Usage:
+See Source#edge_pairs for a description of that function. +
Usage:
+See Source#edges for a description of that function. +
Usage:
+"enc" is the short form for enclosing. +
Usage:
+This check verifies if the polygons of the input layer are enclosed by shapes +of the other input layer by a certain distance. +It has manifold options. See Layer#width for the basic options such +as metrics, projection and angle constraints etc. This check also features +opposite and rectangle filtering. See Layer#separation for details about opposite and +rectangle error filtering. +
+This function is essentially the reverse of enclosing. In case of +"enclosed", the other layer must be bigger than the primary layer. +
+This function can be used in classic mode with a layer argument. In this case it +is equivalent to "layer.enclosed" (see Layer#enclosed). +
+# classic "enclosed" check for < 0.2 um +in = layer(1, 0) +other = layer(2, 0) +errors = enclosed(in, other, 0.2.um) +
+The version without a first layer is intended for use within DRC expressions +together with the "universal DRC" method Layer#drc. In this case, this function needs to be +put into a condition to specify the check constraints. The other options +of Layer#enclosed (e.g. metrics, projection constraints, angle limits etc.) +apply to this version too: +
+# universal DRC "enclosed" check for < 0.2 um +in = layer(1, 0) +other = layer(2, 0) +errors = in.drc(enclosed(other) < 0.2.um) +
+The conditions may involve an upper and lower limit. The following examples +illustrate the use of this function with conditions: +
+out = in.drc(enclosed(other) < 0.2.um) +out = in.drc(enclosed(other) <= 0.2.um) +out = in.drc(enclosed(other) > 0.2.um) +out = in.drc(enclosed(other) >= 0.2.um) +out = in.drc(enclosed(other) == 0.2.um) +out = in.drc(enclosed(other) != 0.2.um) +out = in.drc(0.1.um <= enclosed(other) < 0.2.um) +
+The result of the enclosed check are edges or edge pairs forming the markers. +These markers indicate the presence of the specified condition. +
+With a lower and upper limit, the results are edges marking the positions on the +primary shape where the condition is met. +With a lower limit alone, the results are edge pairs which are formed by two identical, but opposite edges attached to +the primary shape. Without an upper limit only, 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. +
![]() | ![]() |
+When "larger than" constraints are used, this function will produce the edges from the +first layer only. The result will still be edge pairs for consistency, but each edge pair holds one edge from +the original polygon plus a reverse copy of that edge in the second member. Use "first_edges" to extract the +actual edges from the first input (see separation for an example). +
Usage:
+This check verifies if the polygons of the input layer are enclosing the shapes +of the other input layer by a certain distance. +It has manifold options. See Layer#width for the basic options such +as metrics, projection and angle constraints etc. This check also features +opposite and rectangle filtering. See Layer#separation for details about opposite and +rectangle error filtering. +
+This function can be used in classic mode with a layer argument. In this case it +is equivalent to "layer.enclosing" (see Layer#enclosing). +
+# classic "enclosing" check for < 0.2 um +in = layer(1, 0) +other = layer(2, 0) +errors = enclosing(in, other, 0.2.um) +
+The version without a first layer is intended for use within DRC expressions +together with the "universal DRC" method Layer#drc. 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: +
+# universal DRC "enclosing" check for < 0.2 um +in = layer(1, 0) +other = layer(2, 0) +errors = in.drc(enclosing(other) < 0.2.um) +
+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(enclosing(other) != 0.2.um) +out = in.drc(0.1.um <= enclosing(other) < 0.2.um) +
+The result of the enclosing check are edges or edge pairs forming the markers. +These markers indicate the presence of the specified condition. +
+With a lower and upper limit, the results are edges marking the positions on the +primary shape where the condition is met. +With a lower limit alone, the results are edge pairs which are formed by two identical, but opposite edges attached to +the primary shape. Without an upper limit only, 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. +
![]() | ![]() |
+When "larger than" constraints are used, this function will produce the edges from the +first layer only. The result will still be edge pairs for consistency, but each edge pair holds one edge from +the original polygon plus a reverse copy of that edge in the second member. Use "first_edges" to extract the +actual edges from the first input (see separation for an example). +
Usage:
+Similar to log, but the message is printed formatted as an error +
Usage:
+See Source#extent for a description of that function. +
Usage:
+This function can be used with a layer argument. In this 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 extent_refs for more details). +
Usage:
+This function can be used with a layer argument. In this 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 extents for more details). +
Usage:
+See Netter#extract_devices for a description of that function. +
Usage:
+Disables 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 its 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:
+Applies a global transformation to the default source layout. +See Source#global_transform for a description of this feature. +
Usage:
+This function can be used with a layer argument. In this 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 this 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 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, rectangles)) +
+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:
+See Netter#ignore_extraction_errors for a description of that function. +
Usage:
+Prints the message to the log window in verbose mode. +In non-verbose more, nothing is printed but a statement is put into the progress window. +log is a function that always prints a message. +
Usage:
+See Source#input for a description of that function. This method will fetch +polygons and labels. See polygons and labels for more specific versions of +this method. +
Usage:
+This operator represents the selector of primary shapes +which are inside shapes from the other layer. +Use this operator within DRC expressions (also see Layer#drc). If can be used +as method to an expression. See there for more details: inside. +
Usage:
+This operator represents the selector of primary shapes +which interact with 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 operator within DRC expressions (also see Layer#drc). If can be used +as method to an expression. See there for more details: interacting. +
Usage:
Usage:
Usage:
+"iso" is the short form for isolated. +
Usage:
+Provides a intra-polygon space check for polygons. It is similar to +space, but checks inter-polygon space only. "iso" is a synonym for "isolated". +This check has manifold options. See Layer#width for the basic options such +as metrics, projection and angle constraints etc. This check also features +opposite and rectangle filtering. See Layer#separation for details about opposite and +rectangle error filtering. +
+This function can be used in classic mode with a layer argument. In this case it +is equivalent to "layer.isolated" (see Layer#isolated). +
+# classic "isolated" check for space < 1.2 um +in = layer(1, 0) +errors = isolated(in, 1.2.um) +
+The version without a layer is intended for use within DRC expressions +together with the "universal DRC" method Layer#drc. In this case, this function needs to be +put into a condition to specify the check constraints. The other options +of Layer#isolated (e.g. metrics, projection constraints, angle limits etc.) +apply to this version too: +
+# universal DRC "isolated" check for space < 1.2.um +in = layer(1, 0) +errors = in.drc(isolated < 1.2.um) +
+See enclosing for more details about the various ways to specify conditions. +
![]() |
Usage:
+See Netter#l2n_data for a description of that function. +
Usage:
+See Source#labels for a description of that function. +
Usage:
+See Source#layers for a description of that function. +
Usage:
+This function can be used to specify a new layout for input. +It returns an Source object representing that layout. The "input" method +of that object can be used to get input layers for that layout. +
+"what" specifies what input to use. "what" be either +
+Without any arguments the default layout is returned. +
+If a file name is given, a cell name can be specified as the second argument. +If not, the top cell is taken which must be unique in that case. +
+Having specified a layout for input enables to use the input method +for getting input: +
+# XOR between layers 1 or the default input and "second_layout.gds":
+l2 = layout("second_layout.gds")
+(input(1, 0) ^ l2.input(1, 0)).output(100, 0)
++For further methods on the source object see Source. +
Usage:
+This function can be used with a layer argument. In this case it +is equivalent to "layer.length" (see Layer#length). Without a layer +argument, "length" represents the edge length filter on the primary shape edges in +DRC expressions (see Layer#drc and DRC#length for more details). In this context, +the operation acts similar to Layer#with_length. +
Usage:
+Prints the message to the log window. +info is a function that prints a message only if +verbose mode is enabled. +
Usage:
+After using that method, the log output is sent to the +given file instead of the logger window or the terminal. +
Usage:
+The intention of this method is to provide an empty polygon layer based on the +hierarchical scheme selected. This will create a new layer with the hierarchy +of the current layout in deep mode and a flat layer in flat mode. +This method is similar to polygon_layer, but the latter does not create +a hierarchical layer. Hence the layer created by make_layer is suitable +for use in device extraction for example, while the one +delivered by polygon_layer is not. +
+On the other hand, a layer created by the make_layer method is not intended to be +filled with Layer#insert. +
Usage:
+In deep mode, polygons with a bounding box to polygon area ratio bigger than the given number +will be split into smaller chunks to optimize performance (which gets better if the polygon's +bounding boxes do not cover a lot of empty space). +The default threshold is 3.0 which means fairly compact polygons. Use this method with a numeric +argument to set the value and without an argument to get the current maximum area ratio. +Set the value to zero to disable splitting by area ratio. +
+See also max_vertex_count for the other option affecting polygon splitting. +
Usage:
+In deep mode, polygons with more than the given number of vertexes will be split into +smaller chunks to optimize performance (which is better or less complex polygons). +The default threshold is 16 vertexes. Use this method with a vertex count to set the +value and without an argument to get the current maximum vertex count. +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 this 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 middle for more details). +
Usage:
+Use this class with extract_devices to specify extraction of a +three-terminal MOS transistor. +
+See DeviceExtractorMOS3Transistor for more details +about this extractor (non-strict mode applies for 'mos3'). +
Usage:
+Use this class with extract_devices to specify extraction of a +four-terminal MOS transistor. +
+See DeviceExtractorMOS4Transistor for more details +about this extractor (non-strict mode applies for 'mos4'). +
Usage:
+See Netter#name for a description of that function. +
Usage:
+See Netter#name_prefix for a description of that function. +
+The netlist is a Netlist object. If no netlist is extracted +yet, this method will trigger the extraction process. +See Netter#netlist for a description of this function. +
Usage:
+See Netter for more details +
Usage:
+This method creates an independent report object. This object +can be used in "output" to send a layer to a different report than +the default report or target. +
+Arguments are the same than for report. +
+See Layer#output for details about this feature. +
Usage:
+This method creates an independent target object. This object +can be used in "output" to send a layer to a different layout file than +the default report or target. +
+Arguments are the same than for target. +
+See Layer#output for details about this feature. +
Usage:
+Resets the tile borders - see tile_borders for a description of tile borders. +
Usage:
+Provides a intra-polygon space check for polygons. It is similar to +space, but checks intra-polygon space only. +It has manifold options. See Layer#width for the basic options such +as metrics, projection and angle constraints etc. +
+This function can be used in classic mode with a layer argument. In this case it +is equivalent to "layer.notch" (see Layer#notch). +
+# classic "notch" check for space < 1.2 um +in = layer(1, 0) +errors = notch(in, 1.2.um) +
+The version without a layer is intended for use within DRC expressions +together with the "universal DRC" method Layer#drc. In this case, this function needs to be +put into a condition to specify the check constraints. The other options +of Layer#notch (e.g. metrics, projection constraints, angle limits etc.) +apply to this version too: +
+# universal DRC "notch" check for space < 1.2.um +in = layer(1, 0) +errors = in.drc(notch < 1.2.um) +
+See enclosing for more details about the various ways to specify conditions. +
![]() |
Usage:
+This function is equivalent to "layer.output(args)". See Layer#output for details about this function. +
Usage:
+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 operator represents the selector of primary shapes +which are outside shapes from the other layer. +Use this operator within DRC expressions (also see Layer#drc). If can be used +as method to an expression. See there for more details: outside. +
Usage:
+Provides an overlap check (primary layer vs. another layer). +This check has manifold options. See Layer#width for the basic options such +as metrics, projection and angle constraints etc. This check also features +opposite and rectangle filtering. See Layer#separation for details about opposite and +rectangle error filtering. +
+Like other checks, this function is available as a classic DRC function with a layer as the first +argument and as an DRC expression operator for use with Layer#drc. +
+# classic "overlap" check for < 0.2 um +in = layer(1, 0) +other = layer(2, 0) +errors = overlap(in, other, 0.2.um) +
+For use with the "unversal DRC" put the separation expression into the "drc" +function call and use a condition to specify the constraint: +
+# universal DRC "overlap" check for < 0.2 um +in = layer(1, 0) +other = layer(2, 0) +errors = in.drc(overlap(other) < 0.2.um) +
![]() | ![]() |
+When "larger than" constraints are used, this function will produce the edges from the +first layer only. The result will still be edge pairs for consistency, but each edge pair holds one edge from +the original polygon plus a reverse copy of that edge in the second member. Use "first_edges" to extract the +actual edges from the first input (see separation for an example). +
Usage:
+This operator represents the selector of primary shapes +which overlap 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 operator within DRC expressions (also see Layer#drc). If can be used +as method to an expression. See there for more details: overlapping. +
Usage:
+A point is not a valid object by itself, but it is useful for creating +paths for polygons: +
+x = polygon_layer +x.insert(polygon([ p(0, 0), p(16.0, 0), p(8.0, 8.0) ])) +
Usage:
+This function creates a path object. The arguments are the same than for the +DPath constructors. +
Usage:
+This function can be used with a layer argument. In this case it +is equivalent to "layer.perimeter" (see Layer#perimeter) and returns the +total perimeter of all polygons in the layer. +
+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:
+This function creates a polygon object. The arguments are the same than for the +DPolygon constructors. +
Usage:
+The intention of that method is to create an empty layer which can be +filled with polygon-like objects using Layer#insert. +A similar method which creates a hierarchical layer in deep mode is +make_layer. This other layer is better suited for use with device extraction. +
Usage:
+See 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:
+Turns profiling on or off (default). In profiling mode, the +system will collect statistics about rules executed, their execution time +and memory information. The argument specifies how many operations to +print at the end of the run. Without an argument, all operations are +printed. Passing "false" for the argument will disable profiling. This is the +default. +
+This properties constraint does not constrain the operation, but instructs it to +attach the properties from the primary input to the output objects. +
+See also props_ne and props_eq. +
+Some operations such as boolean AND support properties constraints. By giving +a "props_eq" constraint, the operation is performed only on shapes with the same +properties, where "properties" stands for the full set of key/value pairs. +
+Note that you have to enable properties explicitly or generate properties (e.g. +with the DRCLayer#nets method). +
+Example: +
+connect(metal1, via1) +connect(via1, metal2) +... further connect statements + +m1m2_overlap_connected = metal1.nets.and(metal2, props_eq) +
+"props_eq" can be combined with props_copy. In this case, properties +are transferred to the output shapes and can be used in further processing: +
+m1m2_overlap_connected = metal1.nets.and(metal2, props_eq + props_copy) +
+See also props_ne. +
+Some operations such as boolean AND support properties constraints. By giving +a "props_ne" constraint, the operation is performed only on shapes with different +properties, where "properties" stands for the full set of key/value pairs. +
+Note that you have to enable properties explicitly or generate properties (e.g. +with the DRCLayer#nets method). +
+Example: +
+connect(metal1, via1) +connect(via1, metal2) +... further connect statements + +m1m2_overlap_not_connected = metal1.nets.and(metal2, props_ne) +
+"props_ne" can be combined with props_copy. In this case, properties +are transferred to the output shapes and can be used in further processing: +
+m1m2_overlap_connected = metal1.nets.and(metal2, props_ne + props_copy) +
+See also props_eq. +
Usage:
+This function can be used with a layer argument. In this 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 rectangles for more details). +
Usage:
+This function can be used with a layer argument. In this 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 rectilinear for more details). +
Usage:
+See Source#overlapping for a description of that function. +
+The following code will select shapes overlapping a 500x600 micron rectangle (lower left corner at 0,0) +from the input layout. The shapes will not be clipped: +
+region_overlapping(0.mm, 0.mm, 0.5.mm, 0.6.mm) +# shapes will now be the ones overlapping the rectangular region +l1 = input(1, 0) +
+To remove this condition, call "region_overlapping" without any arguments. +
Usage:
+See Source#touching for a description of that function. +
+The following code will select shapes touching a 500x600 micron rectangle (lower left corner at 0,0) +from the input layout. The shapes will not be clipped: +
+region_touch(0.mm, 0.mm, 0.5.mm, 0.6.mm) +# shapes will now be the ones touching the rectangular region +l1 = input(1, 0) +
+To remove this condition, call "region_touch" without any arguments. +
Usage:
+See Layer#drc, relative_height and DRC#relative_height for more details. +
Usage:
+After specifying a report database for output, output method calls are redirected to +the report database. The format of the output calls changes and a category name plus +description can be specified rather than a layer/datatype number of layer name. +See the description of the output method for details. +
+If a filename is given, the report database will be written to the specified file name. +Otherwise it will be shown but not written. +
+If external input is specified with source, +"report" must be called after "source". +
+The cellname specifies the top cell used for the report file. +By default this is the cell name of the default source. If there +is no source layout you'll need to give the cell name in the +third parameter. +
Usage:
+This method applies to runsets creating a netlist through +extraction. Extraction happens when connections and/or device +extractions are made. If this statement is used, the extracted +netlist plus the net and device shapes are turned into a +layout-to-netlist report (L2N database) and shown in the +netlist browser window. If a file name is given, the report +will also be written to the given file. +If a file name is given and "long" is true, a verbose +version of the L2N DB format will be used. +
Usage:
+Use this class with extract_devices to specify extraction of a resistor. +
+The sheet_rho value is the sheet resistance in ohms/square. It is used +to compute the resistance from the geometry. +
+See DeviceExtractorResistor for more details +about this extractor. +
Usage:
+Use this class with extract_devices to specify extraction of a resistor +with a bulk terminal. +The sheet_rho value is the sheet resistance in ohms/square. +
+See DeviceExtractorResistorWithBulk for more details +about this extractor. +
Usage:
+This function can be used with a layer argument. In this 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 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:
+See Source#select for a description of that function. +Using the global version does not create a new source, but +modifies the default source. +
+# Selects only B cell instances below the top cell
+select("-", "+B*")
+l1 = input(1, 0)
+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, but checking the distance rather than the +overlap. +This check has manifold options. See Layer#width for the basic options such +as metrics, projection and angle constraints etc. This check also features +opposite and rectangle filtering. See Layer#separation for details about opposite and +rectangle error filtering. +
+Like enclosing, this function is available as a classic DRC function with a layer as the first +argument and as an DRC expression operator for use with Layer#drc. +
+# classic "separation" check for distance < 0.2 um +in = layer(1, 0) +other = layer(2, 0) +errors = separation(in, other, 0.2.um) +
+For use with the "universal DRC" put the separation expression into the "drc" +function call and use a condition to specify the constraint: +
+# universal DRC "separation" check for distance < 0.2 um +in = layer(1, 0) +other = layer(2, 0) +errors = in.drc(separation(other) < 0.2.um) +
enclosing explains the constraints and how the +work in generating error markers. +
![]() |
+When "larger than" constraints are used, this function will produce the edges from the +first layer only. The result will still be edge pairs for consistency, but each edge pair holds one edge from +the original polygon plus a reverse copy of that edge in the second member. Use "first_edges" to extract the +actual edges from the first input: +
+l1_edges_without_l2 = l1.drc((separation(l2) >= 1.0).first_edges) +
+The following image shows the effect of such a negative-output separation check: +
![]() |
Usage:
+This function is equivalent to "verbose(false)" (see verbose) +
Usage:
+This function can be used with a layer argument. In this 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 sized for more details). +
Usage:
+This function can be used with a layer argument. In this 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 smoothed for more details). +
Usage:
+A "soft connection" is made between two layers and +is a directional connection (like an ideal diode). +Soft connections allow detecting if nets are connected +via a high-ohmic substrate or diffusion layer (the +"lower" layer). +"b" is the "lower" and "a" the upper layer. +
+See Netter#connect for a more detailed description of that function. +
Usage:
+Like soft_connect, a soft connection is made between +a layer and a global net (e.g. substrate). The global net +is always the "lower" net of the soft connection. +
+See Netter#soft_connect_global for a more detailed +description of that function. +
Usage:
+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 an additional input layout. +
+"what" specifies what input to use. "what" be either +
+Without any arguments the default layout is returned. If a filename is given, a cell name +can be specified as the second argument. If none is specified, the top cell is taken which +must be unique in that case. +
+# XOR between layers 1 of "first_layout.gds" and "second_layout.gds" and sends the results to "xor_layout.gds":
+target("xor_layout.gds")
+source("first_layout.gds")
+l2 = layout("second_layout.gds")
+(input(1, 0) ^ l2.input(1, 0)).output(100, 0)
++For further methods on the source object see Source. +
Usage:
+"space" looks for spacing violations between edges of the same polygon (intra-polygon checks) +and between different polygons (inter-polygon checks). +notch is similar function that provides only intra-polygon space checks. isolated +is the version checking inter-polygon distance only. +The check has manifold options. See Layer#width for the basic options such +as metrics, projection and angle constraints etc. +
+This function can be used in classic mode with a layer argument. In this case it +is equivalent to "layer.space" (see Layer#space). In this mode, "space" is applicable to edge +layers too. +
+# classic "space" check for space < 0.2 um +in = layer(1, 0) +errors = space(in, 0.2.um) +
+The version without a layer is intended for use within DRC expressions +together with the "universal DRC" method Layer#drc. In this case, this function needs to be +put into a condition to specify the check constraints. The other options +of Layer#space (e.g. metrics, projection constraints, angle limits etc.) +apply to this version too: +
+# universal DRC check for space < 0.2.um +in = layer(1, 0) +errors = in.drc(space < 0.2.um) +
+See enclosing for more details about the various ways to specify conditions. +
![]() |
Usage:
+This function can be used with a layer argument. In this case it +is equivalent to "layer.squares" (see Layer#squares). Without a layer +argument, "squares" represents the rectangles filter for primary shapes in +DRC expressions (see Layer#drc and squares for more details). +
Usage:
+This function provides a conditional selector for the "drc" function. +It is used this way: +
+out = in.drc(switch(c1, r1, c2, r2, ..., cn, rn) +out = in.drc(switch(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, "switch" 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:
+This function can be used to specify a target layout for output. +Subsequent calls of "output" will send their results to that target +layout. Using "target" will disable output to a report database. +If any target was specified before, that target will be closed and +a new target will be set up. +
+"what" specifies what input to use. "what" be either +
+Except if the argument is a Cell object, a cellname can be specified +stating the cell name under which the results are saved. If no cellname is +specified, either the current cell or "TOP" is used. +
Usage:
+This method applies to runsets creating a netlist through +extraction. Extraction happens when connections and/or device +extractions are made. If this statement is used, the extracted +netlist is written to the given file. +
+The format parameter specifies the writer to use. You can use nil +to use the standard format or produce a SPICE writer with write_spice. +See write_spice for more details. +
Usage:
+If using threads, tiles are distributed on multiple CPU cores for +parallelization. Still, all tiles must be processed before the +operation proceeds with the next statement. +
+Without an argument, "threads" will return the current number of +threads +
Usage:
+The tile border specifies the distance to which shapes are collected into the +tile. In order words, when processing a tile, shapes within the border distance +participate in the operations. +
+For some operations such as booleans (Layer#and, Layer#or, ...), Layer#size and the DRC functions (Layer#width, Layer#space, ...) +a tile border is automatically established. For other operations such as Layer#with_area +or Layer#edges, the exact distance is unknown, because such operations may have a long range. +In that cases, no border is used. The tile_borders function may be used to specify a minimum border +which is used in that case. That allows taking into account at least shapes within the +given range, although not necessarily all. +
+To reset the tile borders, use no_borders or "tile_borders(nil)". +
Usage:
+Specifies tiling mode. In tiling mode, the DRC operations are evaluated in tiles +with width w and height h. With one argument, square tiles with width and height +t are used. +
+Special care must be taken when using tiling mode, since some operations may not +behave as expected at the borders of the tile. Tiles can be made overlapping by +specifying a tile border dimension with tile_borders. Some operations like sizing, +the DRC functions specify a tile border implicitly. Other operations without a +defined range won't do so and the consequences of tiling mode can be difficult to +predict. +
+In tiling mode, the memory requirements are usually smaller (depending on the +choice of the tile size) and multi-CPU support is enabled (see threads). +To disable tiling mode use flat or deep. +
+Tiling mode will disable deep mode (see deep). +
Usage:
+See Netter#top_level for a description of that function. +
Usage:
+In verbose mode, more output is generated in the log file +
Usage:
+In verbose mode, more output is generated in the log file +
Usage:
+Similar to log, but the message is printed formatted as a warning +
Usage:
+A width check is a check for the distance of edges of the same polygon. +
+This function can be used in classic mode with a layer argument. In this case it +is equivalent to "layer.width" (see Layer#width). +
+# classic "width" check for width < 2 um +in = layer(1, 0) +errors = width(in, 0.2.um) +
+The version without a layer is intended for use within DRC expressions +together with the "universal DRC" method Layer#drc. 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: +
+# universal DRC check for width < 2 um +in = layer(1, 0) +errors = in.drc(width < 0.2.um) +
+The conditions may involve an upper and lower limit. The following examples +illustrate the use of this function with conditions: +
+errors = in.drc(width < 0.2.um) +errors = in.drc(width <= 0.2.um) +errors = in.drc(width > 0.2.um) +errors = in.drc(width >= 0.2.um) +errors = in.drc(width == 0.2.um) +errors = in.drc(width != 0.2.um) +errors = in.drc(0.1.um <= width < 0.2.um) +
![]() | ![]() |
+With a lower and upper limit or with the "equal" condition, the results are edges marking the positions on the +primary shape where the condition is met. +With a lower limit alone, the results are edge pairs which are formed by two identical, but opposite edges attached to +the primary shape. Without an upper limit only, both edges are attached to different sides of the primary +shape. +
![]() | ![]() |
![]() | ![]() |
Usage:
+"with_holes" represents a polygon selector for +DRC expressions selecting polygons of the primary by their number of holes +(see Layer#drc and with_holes for more details). +
Usage:
+Use this option in target_netlist for the format parameter to +specify SPICE format. +"use_net_names" and "with_comments" are boolean parameters indicating +whether to use named nets (numbers if false) and whether to add +information comments such as instance coordinates or pin names. +
+"writer_delegate" allows using a NetlistSpiceWriterDelegate object to +control the actual writing. +