mirror of https://github.com/KLayout/klayout.git
Documentation updates
This commit is contained in:
parent
37d62f97e1
commit
c160f7f43f
|
|
@ -127,6 +127,14 @@ class Scope < DocItem
|
|||
@items = {}
|
||||
end
|
||||
|
||||
def merge(other)
|
||||
if !self.brief
|
||||
self.brief = other.brief
|
||||
self.doc = other.doc
|
||||
self.synopsis = other.synopsis
|
||||
end
|
||||
end
|
||||
|
||||
def add_doc_item(mod, block)
|
||||
item = DocItem::new(mod, block)
|
||||
@items[item.name] = item
|
||||
|
|
@ -136,7 +144,7 @@ class Scope < DocItem
|
|||
|
||||
def produce_doc
|
||||
|
||||
doc = <<HEAD
|
||||
doc = <<HEAD
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "klayout_doc.dtd">
|
||||
|
||||
|
|
@ -197,8 +205,14 @@ class Collector
|
|||
|
||||
# is a scope block
|
||||
@scopes ||= {}
|
||||
@current_scope = Scope::new(@mod, block)
|
||||
@scopes[@current_scope.name] = @current_scope
|
||||
scope = Scope::new(@mod, block)
|
||||
if ! @scopes[scope.name]
|
||||
@current_scope = scope
|
||||
@scopes[scope.name] = scope
|
||||
else
|
||||
@current_scope = @scopes[scope.name]
|
||||
@current_scope.merge(scope)
|
||||
end
|
||||
|
||||
else
|
||||
@current_scope && @current_scope.add_doc_item(@mod, block)
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ CODE
|
|||
# It is applicable on polygon expressions. The result will be the input
|
||||
# polygons if the area condition is met.
|
||||
#
|
||||
# See \drc for more details about comparison specs.
|
||||
# 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:
|
||||
#
|
||||
|
|
@ -184,7 +184,7 @@ CODE
|
|||
# out = in.drc(primary.area < 2.0) # equivalent
|
||||
# @/code
|
||||
#
|
||||
# The area method is available as a plain function or as a method on \DRC expressions.
|
||||
# The area method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.area".
|
||||
|
||||
def area
|
||||
|
|
@ -200,7 +200,7 @@ CODE
|
|||
# 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 \drc for more details about comparison specs.
|
||||
# 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.
|
||||
|
|
@ -229,7 +229,7 @@ CODE
|
|||
# It is applicable on polygon expressions. The result will be the input
|
||||
# polygons if the perimeter condition is met.
|
||||
#
|
||||
# See \drc for more details about comparison specs.
|
||||
# See \Layer#drc for more details about comparison specs.
|
||||
#
|
||||
# The following example will select all polygons with a perimeter less than 10 micrometers:
|
||||
#
|
||||
|
|
@ -238,7 +238,7 @@ CODE
|
|||
# out = in.drc(primary.perimeter < 10.0) # equivalent
|
||||
# @/code
|
||||
#
|
||||
# The perimeter method is available as a plain function or as a method on \DRC expressions.
|
||||
# The perimeter method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.perimeter".
|
||||
|
||||
def perimeter
|
||||
|
|
@ -254,7 +254,7 @@ CODE
|
|||
# It is applicable on polygon expressions. The result will be the input
|
||||
# polygons if the bounding box condition is met.
|
||||
#
|
||||
# See \drc for more details about comparison specs.
|
||||
# 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:
|
||||
|
|
@ -264,7 +264,7 @@ CODE
|
|||
# out = in.drc(primary.bbox_min > 200.nm) # equivalent
|
||||
# @/code
|
||||
#
|
||||
# The "bbox_min" method is available as a plain function or as a method on \DRC expressions.
|
||||
# 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".
|
||||
|
||||
def bbox_min
|
||||
|
|
@ -279,7 +279,7 @@ CODE
|
|||
# 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 "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".
|
||||
|
||||
def bbox_max
|
||||
|
|
@ -297,7 +297,7 @@ CODE
|
|||
# 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 "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".
|
||||
|
||||
def bbox_width
|
||||
|
|
@ -315,7 +315,7 @@ CODE
|
|||
# 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 "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".
|
||||
|
||||
def bbox_height
|
||||
|
|
@ -338,7 +338,7 @@ CODE
|
|||
# out = in.drc(primary.length >= 1.um) # equivalent
|
||||
# @/code
|
||||
#
|
||||
# The "length" method is available as a plain function or as a method on \DRC expressions.
|
||||
# The "length" method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.length".
|
||||
|
||||
def length
|
||||
|
|
@ -373,7 +373,7 @@ CODE
|
|||
# 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 "angle" method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.angle".
|
||||
|
||||
def angle
|
||||
|
|
@ -388,7 +388,7 @@ CODE
|
|||
# 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 "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".
|
||||
|
||||
def rounded_corners(inner, outer, n)
|
||||
|
|
@ -405,7 +405,7 @@ CODE
|
|||
#
|
||||
# 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 "smoothed" method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.smoothed".
|
||||
|
||||
def smoothed(d)
|
||||
|
|
@ -444,7 +444,7 @@ CODE
|
|||
# out = in.drc(primary.corners < 0) # equivalent
|
||||
# @/code
|
||||
#
|
||||
# The "corners" method is available as a plain function or as a method on \DRC expressions.
|
||||
# The "corners" method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.corners".
|
||||
|
||||
def corners(as_dots = DRCAsDots::new(false))
|
||||
|
|
@ -464,7 +464,7 @@ CODE
|
|||
# @synopsis expression.middle([ options ])
|
||||
#
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
# %DRC%
|
||||
|
|
@ -473,7 +473,7 @@ CODE
|
|||
# @synopsis expression.extent_refs([ options ])
|
||||
#
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
%w(middle extent_refs).each do |f|
|
||||
|
|
@ -677,7 +677,7 @@ CODE
|
|||
# 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 "merged" method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.merged".
|
||||
|
||||
def merged(*args)
|
||||
|
|
@ -710,7 +710,7 @@ CODE
|
|||
# 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 "sized" method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.sized".
|
||||
|
||||
def sized(*args)
|
||||
|
|
@ -757,7 +757,7 @@ CODE
|
|||
# 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 "extents" method is available as a plain function or as a method on \DRC# expressions.
|
||||
# The plain function is equivalent to "primary.extents".
|
||||
|
||||
def extents(e = 0)
|
||||
|
|
|
|||
|
|
@ -2,11 +2,15 @@
|
|||
|
||||
module DRC
|
||||
|
||||
# %DRC%
|
||||
# @scope
|
||||
# @name Layer
|
||||
|
||||
class DRCLayer
|
||||
|
||||
# %DRC%
|
||||
# @name drc
|
||||
# @brief Provides a generic DRC function for use with \DRC expressions
|
||||
# @brief Provides a generic DRC function for use with \DRC# expressions
|
||||
# @synopsis layer.drc(expression)
|
||||
#
|
||||
# This method implement the universal DRC which offers enhanced abilities,
|
||||
|
|
@ -55,19 +59,19 @@ module DRC
|
|||
# @/code
|
||||
#
|
||||
# Another example computes a boolean AND between two layers before selecting
|
||||
# the ones with an area larger than 1 square micrometer:
|
||||
# the result polygons with an area larger than 1 square micrometer:
|
||||
#
|
||||
# @code
|
||||
# other = ... another layer ..
|
||||
# out = in.drc((primary & other).area > 1.0)
|
||||
# @/code
|
||||
#
|
||||
# The last example shows how the "drc" operation can improve performance: as the
|
||||
# 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.
|
||||
# For more details about the expression see the \DRC# class documentation.
|
||||
|
||||
def drc(op)
|
||||
@engine._context("drc") do
|
||||
|
|
@ -79,6 +83,10 @@ module DRC
|
|||
|
||||
end
|
||||
|
||||
# %DRC%
|
||||
# @scope
|
||||
# @name global
|
||||
|
||||
class DRCEngine
|
||||
|
||||
# %DRC%
|
||||
|
|
@ -94,7 +102,7 @@ module DRC
|
|||
# out = in.drc(case(c1, r1, c2, r2, ..., cn, rn, rdef)
|
||||
# @/code
|
||||
#
|
||||
# This function will evaluate c1 which is a universal DRC expression (see \drc).
|
||||
# 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.
|
||||
|
|
@ -139,7 +147,7 @@ module DRC
|
|||
# @brief Provides secondary input for the "drc" universal DRC function
|
||||
# @synopsis secondary(layer)
|
||||
#
|
||||
# To supply additional input for the universal DRC expressions (see \drc), use
|
||||
# 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:
|
||||
#
|
||||
|
|
@ -168,7 +176,7 @@ module DRC
|
|||
# @brief Represents the primary input of the universal DRC function
|
||||
# @synopsis primary
|
||||
#
|
||||
# The primary input of the universal DRC function is the layer the \drc function
|
||||
# The primary input of the universal DRC function is the layer the \Layer#drc function
|
||||
# is called on.
|
||||
|
||||
def primary
|
||||
|
|
@ -182,7 +190,7 @@ module DRC
|
|||
# @brief Represents all other polygons from primary except the current one
|
||||
# @synopsis foreign
|
||||
#
|
||||
# The primary input of the universal DRC function is the layer the \drc function
|
||||
# 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.
|
||||
#
|
||||
|
|
@ -218,7 +226,7 @@ module DRC
|
|||
# out = in.drc(if_all(area > 0.5, rectangle))
|
||||
# @/code
|
||||
#
|
||||
# The condition expressions can be of any type (edges, edge pairs and polygons).
|
||||
# The condition expressions may be of any type (edges, edge pairs and polygons).
|
||||
|
||||
# %DRC%
|
||||
# @name if_any
|
||||
|
|
@ -270,10 +278,10 @@ CODE
|
|||
# @brief Selects primary shapes based on their bounding box height
|
||||
# @synopsis bbox_height (in condition)
|
||||
#
|
||||
# This method creates a universal DRC expression (see \drc) to select primary shapes whose
|
||||
# bounding box height satisfies the condition. Conditions can be written as arithmetic comparisons
|
||||
# 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 \drc for more details about comparison
|
||||
# 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.
|
||||
|
||||
|
|
@ -282,21 +290,21 @@ CODE
|
|||
# @brief Selects primary shapes based on their bounding box width
|
||||
# @synopsis bbox_max (in condition)
|
||||
#
|
||||
# See \drc, \bbox_height and \DRC#bbox_height for more details.
|
||||
# See \Layer#drc, \bbox_height and \DRC#bbox_height for more details.
|
||||
|
||||
# %DRC%
|
||||
# @name bbox_max
|
||||
# @brief Selects primary shapes based on their bounding box height or width, whichever is larger
|
||||
# @synopsis bbox_max (in condition)
|
||||
#
|
||||
# See \drc, \bbox_max and \DRC#bbox_max for more details.
|
||||
# See \Layer#drc, \bbox_max and \DRC#bbox_max for more details.
|
||||
|
||||
# %DRC%
|
||||
# @name bbox_min
|
||||
# @brief Selects primary shapes based on their bounding box height or width, whichever is smaller
|
||||
# @synopsis bbox_max (in condition)
|
||||
#
|
||||
# See \drc, \bbox_min and \DRC#bbox_min for more details.
|
||||
# See \Layer#drc, \bbox_min and \DRC#bbox_min for more details.
|
||||
|
||||
%w(
|
||||
bbox_height
|
||||
|
|
@ -322,7 +330,7 @@ CODE
|
|||
# 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 \drc and \DRC#area for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#area for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name hulls
|
||||
|
|
@ -333,7 +341,7 @@ CODE
|
|||
# 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 \drc and \DRC#hulls for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#hulls for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name holes
|
||||
|
|
@ -344,7 +352,7 @@ CODE
|
|||
# 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 \drc and \DRC#hulls for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#hulls for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name odd_polygons
|
||||
|
|
@ -355,7 +363,7 @@ CODE
|
|||
# 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 \drc and \DRC#odd_polygons for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#odd_polygons for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name perimeter
|
||||
|
|
@ -366,7 +374,7 @@ CODE
|
|||
# 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 \drc and \DRC#perimeter for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#perimeter for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name rectangles
|
||||
|
|
@ -377,7 +385,7 @@ CODE
|
|||
# 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 \drc and \DRC#rectangles for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#rectangles for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name rectilinear
|
||||
|
|
@ -388,7 +396,7 @@ CODE
|
|||
# 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 \drc and \DRC#rectilinear for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#rectilinear for more details).
|
||||
|
||||
%w(
|
||||
area
|
||||
|
|
@ -416,7 +424,7 @@ CODE
|
|||
# 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 \drc and \DRC#corners for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#corners for more details).
|
||||
|
||||
def _cop_corners(as_dots = DRCAsDots::new(false))
|
||||
# NOTE: this method is a fallback for the respective global ones which route to DRCLayer or here.
|
||||
|
|
@ -432,7 +440,7 @@ CODE
|
|||
# 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 \drc and \DRC#extent_refs for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#extent_refs for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name extents
|
||||
|
|
@ -443,7 +451,7 @@ CODE
|
|||
# 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 \drc and \DRC#extents for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#extents for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name middle
|
||||
|
|
@ -454,7 +462,7 @@ CODE
|
|||
# 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 \drc and \DRC#middle for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#middle for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name rounded_corners
|
||||
|
|
@ -465,7 +473,7 @@ CODE
|
|||
# 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 \drc and \DRC#rounded_corners for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#rounded_corners for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name sized
|
||||
|
|
@ -478,7 +486,7 @@ CODE
|
|||
# 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 \drc and \DRC#sized for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#sized for more details).
|
||||
|
||||
# %DRC%
|
||||
# @name smoothed
|
||||
|
|
@ -489,7 +497,7 @@ CODE
|
|||
# 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 \drc and \DRC#smoothed for more details).
|
||||
# \DRC# expressions (see \Layer#drc and \DRC#smoothed for more details).
|
||||
|
||||
%w(
|
||||
extent_refs
|
||||
|
|
@ -519,7 +527,7 @@ CODE
|
|||
# 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 \drc).
|
||||
# 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:
|
||||
|
|
@ -567,7 +575,7 @@ CODE
|
|||
#
|
||||
# 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 \drc).
|
||||
# Use this variant within \DRC# expressions (also see \Layer#drc).
|
||||
|
||||
# %DRC%
|
||||
# @name outside
|
||||
|
|
@ -580,7 +588,7 @@ CODE
|
|||
#
|
||||
# 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 \drc).
|
||||
# Use this variant within \DRC# expressions (also see \Layer#drc).
|
||||
|
||||
%w(
|
||||
covering
|
||||
|
|
@ -606,13 +614,13 @@ CODE
|
|||
# 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 \drc method. In this case, this function needs to be
|
||||
# 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 can involve an upper and lower limit. The following examples
|
||||
# The conditions may involve an upper and lower limit. The following examples
|
||||
# illustrate the use of this function with conditions:
|
||||
#
|
||||
# @code
|
||||
|
|
@ -656,13 +664,13 @@ CODE
|
|||
# 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 it intended for use within \DRC expressions
|
||||
# together with the \drc method. In this case, this function needs to be
|
||||
# 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 can involve an upper and lower limit. The following examples
|
||||
# The conditions may involve an upper and lower limit. The following examples
|
||||
# illustrate the use of this function with conditions:
|
||||
#
|
||||
# @code
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<title>DRC Reference</title>
|
||||
<keyword name="DRC Reference"/>
|
||||
<topics>
|
||||
<topic href="/about/drc_ref_drc.xml"/>
|
||||
<topic href="/about/drc_ref_layer.xml"/>
|
||||
<topic href="/about/drc_ref_netter.xml"/>
|
||||
<topic href="/about/drc_ref_source.xml"/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,664 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "klayout_doc.dtd">
|
||||
|
||||
<!-- generated by /home/matthias/klayout/master/scripts/extract_doc.rb -->
|
||||
<!-- DO NOT EDIT! -->
|
||||
|
||||
<doc>
|
||||
<title>DRC Reference: DRC expressions</title>
|
||||
<keyword name="DRC"/>
|
||||
<p>
|
||||
DRC expression objects represent abstract recipes for the <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> universal DRC function.
|
||||
For example, when using a universal DRC expression like this:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(width < 2.0)
|
||||
</pre>
|
||||
</p><p>
|
||||
"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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc((width < 2.0).polygons)
|
||||
</pre>
|
||||
</p><p>
|
||||
The following documentation will list the methods available for DRC expression objects.
|
||||
</p>
|
||||
<h2-index/>
|
||||
<a name="!"/><h2>"!" - Logical not</h2>
|
||||
<keyword name="!"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>! expression</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p><p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(! rectangles)
|
||||
out = in.drc(! primary.rectangles) # equivalent
|
||||
</pre>
|
||||
</p>
|
||||
<a name="&"/><h2>"&" - Boolean AND between the results of two expressions</h2>
|
||||
<keyword name="&"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression & expression</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
The & operator will compute the boolean AND between the results
|
||||
of two expressions. The expression types need to be edge or polygon.
|
||||
</p><p>
|
||||
The following example computes the partial edges where width is less than
|
||||
0.3 micrometers and space is less than 0.2 micrometers:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc((width < 0.3).edges & (space < 0.2).edges)
|
||||
</pre>
|
||||
</p>
|
||||
<a name="+"/><h2>"+" - Boolean OR between the results of two expressions</h2>
|
||||
<keyword name="+"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression + expression</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
The + operator will join the results of two expressions.
|
||||
</p>
|
||||
<a name="-"/><h2>"-" - Boolean NOT between the results of two expressions</h2>
|
||||
<keyword name="-"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression - expression</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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).
|
||||
</p><p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc((width < 0.3).edges - secondary(waive))
|
||||
</pre>
|
||||
</p>
|
||||
<a name="^"/><h2>"^" - Boolean XOR between the results of two expressions</h2>
|
||||
<keyword name="^"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression - expression</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<a name="angle"/><h2>"angle" - Selects edges based on their angle</h2>
|
||||
<keyword name="angle"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.angle (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This operation selects edges by their angle, measured against the horizontal
|
||||
axis in the mathematical sense.
|
||||
</p><p>
|
||||
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).
|
||||
</p><p>
|
||||
If the input shapes are not polygons or edge pairs, they are converted to edges
|
||||
before the angle test is made.
|
||||
</p><p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc((angle == 45) + (angle == 135))
|
||||
out = in.drc((primary.angle == 45) + (primary.angle == 135)) # equivalent
|
||||
</pre>
|
||||
</p><p>
|
||||
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 <a href="/about/drc_ref_drc.xml#rectilinear">DRC#rectilinear</a> for
|
||||
example to detect shapes with non-manhattan geometry instead of using angle checks.
|
||||
</p><p>
|
||||
The "angle" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.angle".
|
||||
</p>
|
||||
<a name="area"/><h2>"area" - Selects the primary shape if the area is meeting the condition</h2>
|
||||
<keyword name="area"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.area (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p><p>
|
||||
See <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> for more details about comparison specs.
|
||||
</p><p>
|
||||
The following example will select all polygons with an area less than 2.0 square micrometers:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(area < 2.0)
|
||||
out = in.drc(primary.area < 2.0) # equivalent
|
||||
</pre>
|
||||
</p><p>
|
||||
The area method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.area".
|
||||
</p>
|
||||
<a name="bbox_height"/><h2>"bbox_height" - Selects the primary shape if its bounding box height is meeting the condition</h2>
|
||||
<keyword name="bbox_height"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.bbox_height (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This operation acts similar to <a href="/about/drc_ref_drc.xml#bbox_min">DRC#bbox_min</a>, but takes the height of the shape's
|
||||
bounding box. In general, it's more advisable to use <a href="/about/drc_ref_drc.xml#bbox_min">DRC#bbox_min</a> or <a href="/about/drc_ref_drc.xml#bbox_max">DRC#bbox_max</a>
|
||||
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.
|
||||
</p><p>
|
||||
The "bbox_height" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.bbox_height".
|
||||
</p>
|
||||
<a name="bbox_max"/><h2>"bbox_max" - Selects the primary shape if its bounding box larger dimension is meeting the condition</h2>
|
||||
<keyword name="bbox_max"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.bbox_max (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This operation acts similar to <a href="/about/drc_ref_drc.xml#bbox_min">DRC#bbox_min</a>, but takes the larger dimension of the shape's
|
||||
bounding box.
|
||||
</p><p>
|
||||
The "bbox_max" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.bbox_max".
|
||||
</p>
|
||||
<a name="bbox_min"/><h2>"bbox_min" - Selects the primary shape if its bounding box smaller dimension is meeting the condition</h2>
|
||||
<keyword name="bbox_min"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.bbox_min (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p><p>
|
||||
See <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> for more details about comparison specs.
|
||||
</p><p>
|
||||
The following example will select all polygons whose bounding box smaller dimension is larger
|
||||
than 200 nm:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(bbox_min > 200.nm)
|
||||
out = in.drc(primary.bbox_min > 200.nm) # equivalent
|
||||
</pre>
|
||||
</p><p>
|
||||
The "bbox_min" method is available as a plain function or as a method on <a href="/about/drc_ref_drc#.xml">DRC#</a> expressions.
|
||||
The plain function is equivalent to "primary.bbox_min".
|
||||
</p>
|
||||
<a name="bbox_width"/><h2>"bbox_width" - Selects the primary shape if its bounding box width is meeting the condition</h2>
|
||||
<keyword name="bbox_width"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.bbox_width (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This operation acts similar to <a href="/about/drc_ref_drc.xml#bbox_min">DRC#bbox_min</a>, but takes the width of the shape's
|
||||
bounding box. In general, it's more advisable to use <a href="/about/drc_ref_drc.xml#bbox_min">DRC#bbox_min</a> or <a href="/about/drc_ref_drc.xml#bbox_max">DRC#bbox_max</a>
|
||||
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.
|
||||
</p><p>
|
||||
The "bbox_width" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.bbox_width".
|
||||
</p>
|
||||
<a name="centers"/><h2>"centers" - Returns the part at the center of each edge of the input</h2>
|
||||
<keyword name="centers"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.centers(length)</tt></li>
|
||||
<li><tt>expression.end_segments(length, fraction)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method acts on edge expressions and delivers a specific part of each edge.
|
||||
See <a href="/about/drc_ref_layer.xml#centers">layer#centers</a> for details about this functionality.
|
||||
</p>
|
||||
<a name="corners (in condition)"/><h2>"corners (in condition)" - Applies smoothing</h2>
|
||||
<keyword name="corners (in condition)"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.corners</tt></li>
|
||||
<li><tt>expression.corners(as_dots)</tt></li>
|
||||
<li><tt>expression.corners(as_boxes)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
The following example selects all corners:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(corners)
|
||||
out = in.drc(primary.corners) # equivalent
|
||||
</pre>
|
||||
</p><p>
|
||||
The following example selects all inner corners:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(corners < 0)
|
||||
out = in.drc(primary.corners < 0) # equivalent
|
||||
</pre>
|
||||
</p><p>
|
||||
The "corners" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.corners".
|
||||
</p>
|
||||
<a name="count"/><h2>"count" - Selects a expression result based on the number of (local) shapes</h2>
|
||||
<keyword name="count"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.count (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p><p>
|
||||
See <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> for more details about comparison specs.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
The following example selects triangles:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(if_any(corners.count == 3))
|
||||
</pre>
|
||||
</p><p>
|
||||
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.
|
||||
</p>
|
||||
<a name="edges"/><h2>"edges" - Converts the input shapes into edges</h2>
|
||||
<keyword name="edges"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.edges</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
Polygons will be separated into edges forming their contours. Edge pairs will be
|
||||
decomposed into individual edges.
|
||||
</p><p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(primary.edges)
|
||||
</pre>
|
||||
</p>
|
||||
<a name="end_segments"/><h2>"end_segments" - Returns the part at the end of each edge of the input</h2>
|
||||
<keyword name="end_segments"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.end_segments(length)</tt></li>
|
||||
<li><tt>expression.end_segments(length, fraction)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method acts on edge expressions and delivers a specific part of each edge.
|
||||
See <a href="/about/drc_ref_layer.xml#end_segments">layer#end_segments</a> for details about this functionality.
|
||||
</p>
|
||||
<a name="extended"/><h2>"extended" - Returns polygons describing an area along the edges of the input</h2>
|
||||
<keyword name="extended"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.extended([:begin => b,] [:end => e,] [:out => o,] [:in => i], [:joined => true])</tt></li>
|
||||
<li><tt>expression.extended(b, e, o, i)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<a name="extended_in"/><h2>"extended_in" - Returns polygons describing an area along the edges of the input</h2>
|
||||
<keyword name="extended_in"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.extended_in(d)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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 <a href="#extended">extended</a> method:
|
||||
"extended(0, 0, 0, dist)".
|
||||
A version extending to the outside is <a href="#extended_out">extended_out</a>.
|
||||
</p>
|
||||
<a name="extended_out"/><h2>"extended_out" - Returns polygons describing an area along the edges of the input</h2>
|
||||
<keyword name="extended_out"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.extended_out(d)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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 <a href="#extended">extended</a> method:
|
||||
"extended(0, 0, dist, 0)".
|
||||
A version extending to the inside is <a href="#extended_in">extended_in</a>.
|
||||
</p>
|
||||
<a name="extent_refs"/><h2>"extent_refs" - Returns partial references to the boundings boxes of the polygons</h2>
|
||||
<keyword name="extent_refs"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.extent_refs([ options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
The extent_refs operation acts on polygons and has the same effect than <a href="/about/drc_ref_layer.xml#extent_refs">Layer#extent_refs</a>.
|
||||
It takes the same arguments. It is available as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions or
|
||||
as plain function, in which case it acts on the primary shapes.
|
||||
</p>
|
||||
<a name="extents"/><h2>"extents" - Returns the bounding box of each input object</h2>
|
||||
<keyword name="extents"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.extents([ enlargement ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method provides the same functionality as <a href="/about/drc_ref_layer.xml#extents">Layer#extents</a> and takes the same
|
||||
arguments. It returns the bounding boxes of the input objects. It acts on edge
|
||||
edge pair and polygon expressions.
|
||||
</p><p>
|
||||
The "extents" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.extents".
|
||||
</p>
|
||||
<a name="first_edges"/><h2>"first_edges" - Returns the first edges of edge pairs</h2>
|
||||
<keyword name="first_edges"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.extents([ enlargement ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method acts on edge pair expressions and returns the first edges of the
|
||||
edge pairs delivered by the expression.
|
||||
</p>
|
||||
<a name="holes"/><h2>"holes" - Selects all holes from the input polygons</h2>
|
||||
<keyword name="holes"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.holes</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(holes.area > 2.um)
|
||||
out = in.drc(primary.holes.area > 2.um) # equivalent
|
||||
</pre>
|
||||
</p>
|
||||
<a name="hulls"/><h2>"hulls" - Selects all hulls from the input polygons</h2>
|
||||
<keyword name="hulls"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.hulls</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
The hulls are the outer contours of the input polygons. By selecting hulls only,
|
||||
all holes will be closed.
|
||||
</p><p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(hulls)
|
||||
out = in.drc(primary.hulls) # equivalent
|
||||
</pre>
|
||||
</p>
|
||||
<a name="length"/><h2>"length" - Selects edges based on their length</h2>
|
||||
<keyword name="length"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.length (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This operation will select those edges which are meeting the length
|
||||
criterion. Non-edge shapes (polygons, edge pairs) will be converted to edges before.
|
||||
</p><p>
|
||||
For example, this code selects all edges from the primary shape which are longer or
|
||||
equal than 1 micrometer:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(length >= 1.um)
|
||||
out = in.drc(primary.length >= 1.um) # equivalent
|
||||
</pre>
|
||||
</p><p>
|
||||
The "length" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.length".
|
||||
</p>
|
||||
<a name="merged"/><h2>"merged" - Returns the merged input polygons, optionally selecting multi-overlap</h2>
|
||||
<keyword name="merged"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.merged</tt></li>
|
||||
<li><tt>expression.merged(min_count)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This operation will act on polygons. Without a min_count argument, the merged
|
||||
polygons will be returned.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
The "merged" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.merged".
|
||||
</p>
|
||||
<a name="middle"/><h2>"middle" - Returns the centers of polygon bounding boxes</h2>
|
||||
<keyword name="middle"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.middle([ options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
The middle operation acts on polygons and has the same effect than <a href="/about/drc_ref_layer.xml#middle">Layer#middle</a>.
|
||||
It takes the same arguments. It is available as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions or
|
||||
as plain function, in which case it acts on the primary shapes.
|
||||
</p>
|
||||
<a name="odd_polygons"/><h2>"odd_polygons" - Selects all polygons which are non-orientable</h2>
|
||||
<keyword name="odd_polygons"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.odd_polygons</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p><p>
|
||||
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.
|
||||
</p>
|
||||
<a name="perimeter"/><h2>"perimeter" - Selects the primary shape if the perimeter is meeting the condition</h2>
|
||||
<keyword name="perimeter"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.perimeter (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p><p>
|
||||
See <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> for more details about comparison specs.
|
||||
</p><p>
|
||||
The following example will select all polygons with a perimeter less than 10 micrometers:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(perimeter < 10.0)
|
||||
out = in.drc(primary.perimeter < 10.0) # equivalent
|
||||
</pre>
|
||||
</p><p>
|
||||
The perimeter method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.perimeter".
|
||||
</p>
|
||||
<a name="polygons"/><h2>"polygons" - Converts the input shapes into polygons</h2>
|
||||
<keyword name="polygons"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.polygons([ enlargement ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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.
|
||||
</p><p>
|
||||
Contrary most other operations, "polygons" does not have a plain function equivalent
|
||||
as this is reserved for the function generating a polygon layer.
|
||||
</p><p>
|
||||
This method is useful for generating polygons from DRC violation markers as shown in
|
||||
the following example:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc((width < 0.5.um).polygons)
|
||||
</pre>
|
||||
</p>
|
||||
<a name="rectangles"/><h2>"rectangles" - Selects all polygons which are rectangles</h2>
|
||||
<keyword name="rectangles"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.rectangles</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(rectangles)
|
||||
out = in.drc(primary.rectangles) # equivalent
|
||||
</pre>
|
||||
</p>
|
||||
<a name="rectilinear"/><h2>"rectilinear" - Selects all polygons which are rectilinear</h2>
|
||||
<keyword name="rectilinear"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.rectilinear</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
Rectilinear polygons only have vertical and horizontal edges. Such polygons are also
|
||||
called manhattan polygons.
|
||||
</p><p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(rectilinear)
|
||||
out = in.drc(primary.rectilinear) # equivalent
|
||||
</pre>
|
||||
</p>
|
||||
<a name="rounded_corners"/><h2>"rounded_corners" - Applies corner rounding</h2>
|
||||
<keyword name="rounded_corners"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.rounded_corners(inner, outer, n)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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 <a href="/about/drc_ref_layer.xml#rounded_corners">Layer#rounded_corners</a> for more details.
|
||||
</p><p>
|
||||
The "rounded_corners" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.rounded_corners".
|
||||
</p>
|
||||
<a name="second_edges"/><h2>"second_edges" - Returns the second edges of edge pairs</h2>
|
||||
<keyword name="second_edges"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.extents([ enlargement ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method acts on edge pair expressions and returns the second edges of the
|
||||
edge pairs delivered by the expression.
|
||||
</p>
|
||||
<a name="sized"/><h2>"sized" - Returns the sized version of the input</h2>
|
||||
<keyword name="sized"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.sized(d [, mode])</tt></li>
|
||||
<li><tt>expression.sized(dx, dy [, mode]))</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method provides the same functionality as <a href="/about/drc_ref_layer.xml#sized">Layer#sized</a> and takes the same
|
||||
arguments. It acts on polygon expressions.
|
||||
</p><p>
|
||||
The "sized" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.sized".
|
||||
</p>
|
||||
<a name="smoothed"/><h2>"smoothed" - Applies smoothing</h2>
|
||||
<keyword name="smoothed"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.smoothed(d)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This operation acts on polygons and applies polygon smoothing with the tolerance d. See <a href="/about/drc_ref_layer.xml#smoothed">Layer#smoothed</a> for more details.
|
||||
</p><p>
|
||||
The "smoothed" method is available as a plain function or as a method on <a href="/about/drc_ref_drc.xml">DRC</a> expressions.
|
||||
The plain function is equivalent to "primary.smoothed".
|
||||
</p>
|
||||
<a name="start_segments"/><h2>"start_segments" - Returns the part at the beginning of each edge of the input</h2>
|
||||
<keyword name="start_segments"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression.start_segments(length)</tt></li>
|
||||
<li><tt>expression.start_segments(length, fraction)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method acts on edge expressions and delivers a specific part of each edge.
|
||||
See <a href="/about/drc_ref_layer.xml#start_segments">layer#start_segments</a> for details about this functionality.
|
||||
</p>
|
||||
<a name="|"/><h2>"|" - Boolean OR between the results of two expressions</h2>
|
||||
<keyword name="|"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>expression | expression</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
The | operator will compute the boolean OR between the results of
|
||||
two expressions. '+' is basically a synonym. Both expressions
|
||||
must render the same type.
|
||||
</p>
|
||||
</doc>
|
||||
|
|
@ -7,11 +7,6 @@
|
|||
<doc>
|
||||
<title>DRC Reference: Global Functions</title>
|
||||
<keyword name="global"/>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<h2-index/>
|
||||
<a name="antenna_check"/><h2>"antenna_check" - Performs an antenna check</h2>
|
||||
<keyword name="antenna_check"/>
|
||||
|
|
@ -22,6 +17,60 @@ or provide function-like alternatives for the methods.
|
|||
<p>
|
||||
See <a href="/about/drc_ref_netter.xml#antenna_check">Netter#antenna_check</a> for a description of that function.
|
||||
</p>
|
||||
<a name="area"/><h2>"area" - Selects the primary shape if the area is meeting the condition</h2>
|
||||
<keyword name="area"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>area (in condition)</tt></li>
|
||||
<li><tt>area(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.area" (see <a href="/about/drc_ref_layer.xml#area">Layer#area</a>). Without a layer
|
||||
argument, "area" represents an area filter for primary shapes in
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#area">DRC#area</a> for more details).
|
||||
</p>
|
||||
<a name="bbox_height"/><h2>"bbox_height" - Selects primary shapes based on their bounding box height</h2>
|
||||
<keyword name="bbox_height"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>bbox_height (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method creates a universal DRC expression (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>) 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 <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> 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 <a href="/about/drc_ref_drc.xml#bbox_min">DRC#bbox_min</a>.
|
||||
</p>
|
||||
<a name="bbox_max"/><h2>"bbox_max" - Selects primary shapes based on their bounding box height or width, whichever is larger</h2>
|
||||
<keyword name="bbox_max"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>bbox_max (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
See <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>, <a href="#bbox_max">bbox_max</a> and <a href="/about/drc_ref_drc.xml#bbox_max">DRC#bbox_max</a> for more details.
|
||||
</p>
|
||||
<a name="bbox_min"/><h2>"bbox_min" - Selects primary shapes based on their bounding box height or width, whichever is smaller</h2>
|
||||
<keyword name="bbox_min"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>bbox_max (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
See <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>, <a href="#bbox_min">bbox_min</a> and <a href="/about/drc_ref_drc.xml#bbox_min">DRC#bbox_min</a> for more details.
|
||||
</p>
|
||||
<a name="bbox_width"/><h2>"bbox_width" - Selects primary shapes based on their bounding box width</h2>
|
||||
<keyword name="bbox_width"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>bbox_max (in condition)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
See <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>, <a href="#bbox_height">bbox_height</a> and <a href="/about/drc_ref_drc.xml#bbox_height">DRC#bbox_height</a> for more details.
|
||||
</p>
|
||||
<a name="bjt3"/><h2>"bjt3" - Supplies the BJT3 transistor extractor class</h2>
|
||||
<keyword name="bjt3"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -85,6 +134,32 @@ The area_cap argument is the capacitance in Farad per square micrometer.
|
|||
See <class_doc href="DeviceExtractorCapacitorWithBulk">DeviceExtractorCapacitorWithBulk</class_doc> for more details
|
||||
about this extractor.
|
||||
</p>
|
||||
<a name="case"/><h2>"case" - A conditional selector for the "drc" universal DRC function</h2>
|
||||
<keyword name="case"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>case(...)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function provides a conditional selector for the "drc" function.
|
||||
It is used this way:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(case(c1, r1, c2, r2, ..., cn, rn)
|
||||
out = in.drc(case(c1, r1, c2, r2, ..., cn, rn, rdef)
|
||||
</pre>
|
||||
</p><p>
|
||||
This function will evaluate c1 which is a universal DRC expression (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>).
|
||||
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.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
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.
|
||||
</p>
|
||||
<a name="cell"/><h2>"cell" - Selects a cell for input on the default source</h2>
|
||||
<keyword name="cell"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -251,6 +326,50 @@ See <a href="/about/drc_ref_netter.xml#connect_global">Netter#connect_global</a>
|
|||
<p>
|
||||
See <a href="/about/drc_ref_netter.xml#connect_implicit">Netter#connect_implicit</a> for a description of that function.
|
||||
</p>
|
||||
<a name="corners"/><h2>"corners" - Selects all polygons which are rectilinear</h2>
|
||||
<keyword name="corners"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>corners (in condition)</tt></li>
|
||||
<li><tt>corners(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.corners" (see <a href="/about/drc_ref_layer.xml#corners">Layer#corners</a>). Without a layer
|
||||
argument, "corners" represents the corner generator/filter in primary shapes for
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#corners">DRC#corners</a> for more details).
|
||||
</p>
|
||||
<a name="covering"/><h2>"covering" - Selects shapes entirely covering other shapes</h2>
|
||||
<keyword name="covering"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>covering(other) (in conditions)</tt></li>
|
||||
<li><tt>covering(layer, other [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.covering" (see <a href="/about/drc_ref_layer.xml#covering">Layer#covering</a>).
|
||||
</p><p>
|
||||
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 <a href="/about/drc_ref_drc.xml">DRC</a> expressions (also see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>).
|
||||
</p><p>
|
||||
For example, the following statement selects all input shapes which entirely
|
||||
cover shapes from the "other" layer:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(covering(other))
|
||||
</pre>
|
||||
</p><p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(covering(other) > 2)
|
||||
</pre>
|
||||
</p>
|
||||
<a name="dbu"/><h2>"dbu" - Gets or sets the database unit to use</h2>
|
||||
<keyword name="dbu"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -380,6 +499,49 @@ See <a href="/about/drc_ref_source.xml#edge_pairs">Source#edge_pairs</a> for a d
|
|||
<p>
|
||||
See <a href="/about/drc_ref_source.xml#edges">Source#edges</a> for a description of that function.
|
||||
</p>
|
||||
<a name="enc"/><h2>"enc" - Synonym for "enclosing"</h2>
|
||||
<keyword name="enc"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>enc(...)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
"enc" is the short form for <a href="#enclosing">enclosing</a>.
|
||||
</p>
|
||||
<a name="enclosing"/><h2>"enclosing" - Performs an enclosing check</h2>
|
||||
<keyword name="enclosing"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>enclosing(other [, options ]) (in conditions)</tt></li>
|
||||
<li><tt>enclosing(layer, other [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.enclosing" (see <a href="/about/drc_ref_layer.xml#enclosing">Layer#enclosing</a>).
|
||||
</p><p>
|
||||
The version without the first layer is intended for use within <a href="/about/drc_ref_drc.xml">DRC</a> expressions
|
||||
together with the <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> method. In this case, this function needs to be
|
||||
put into a condition to specify the check constraints. The other options
|
||||
of <a href="/about/drc_ref_layer.xml#enclosing">Layer#enclosing</a> (e.g. metrics, projection constraints, angle limits etc.)
|
||||
apply to this version too.
|
||||
</p><p>
|
||||
The conditions may involve an upper and lower limit. The following examples
|
||||
illustrate the use of this function with conditions:
|
||||
</p><p>
|
||||
<pre>
|
||||
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)
|
||||
</pre>
|
||||
</p><p>
|
||||
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.
|
||||
</p>
|
||||
<a name="error"/><h2>"error" - Prints an error</h2>
|
||||
<keyword name="error"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -398,6 +560,32 @@ Similar to <a href="#log">log</a>, but the message is printed formatted as an er
|
|||
<p>
|
||||
See <a href="/about/drc_ref_source.xml#extent">Source#extent</a> for a description of that function.
|
||||
</p>
|
||||
<a name="extent_refs"/><h2>"extent_refs" - Returns partial references to the boundings boxes of the polygons</h2>
|
||||
<keyword name="extent_refs"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>extent_refs([ options ])</tt></li>
|
||||
<li><tt>extent_refs(layer, [ options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.extent_refs" (see <a href="/about/drc_ref_layer.xml#extent_refs">Layer#extent_refs</a>). Without a layer
|
||||
argument, "extent_refs" represents the partial extents extractor on primary shapes within
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#extent_refs">DRC#extent_refs</a> for more details).
|
||||
</p>
|
||||
<a name="extents"/><h2>"extents" - Returns the bounding box of each input object</h2>
|
||||
<keyword name="extents"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>extents([ enlargement ])</tt></li>
|
||||
<li><tt>extents(layer, [ enlargement ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.extents" (see <a href="/about/drc_ref_layer.xml#extents">Layer#extents</a>). Without a layer
|
||||
argument, "extents" represents the extents generator on primary shapes within
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#extents">DRC#extents</a> for more details).
|
||||
</p>
|
||||
<a name="extract_devices"/><h2>"extract_devices" - Extracts devices for a given device extractor and device layer selection</h2>
|
||||
<keyword name="extract_devices"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -417,6 +605,95 @@ See <a href="/about/drc_ref_netter.xml#extract_devices">Netter#extract_devices</
|
|||
<p>
|
||||
Disables tiling mode. Tiling mode can be enabled again with <a href="#tiles">tiles</a> later.
|
||||
</p>
|
||||
<a name="foreign"/><h2>"foreign" - Represents all other polygons from primary except the current one</h2>
|
||||
<keyword name="foreign"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>foreign</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
The primary input of the universal DRC function is the layer the <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> function
|
||||
is called on. This operation represents all "other" primary polygons while
|
||||
<a href="#primary">primary</a> represents the current polygon.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
The following example computes every part of the input which is closer than
|
||||
0.5 micrometers to other (disconnected) polygons on the same layer:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(primary & foreign.sized(0.5.um))
|
||||
</pre>
|
||||
</p>
|
||||
<a name="holes"/><h2>"holes" - Selects all holes from the input polygons</h2>
|
||||
<keyword name="holes"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>holes</tt></li>
|
||||
<li><tt>holes(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.holes" (see <a href="/about/drc_ref_layer.xml#hulls">Layer#hulls</a>). Without a layer
|
||||
argument, "holes" represents a hole extractor for primary shapes in
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#hulls">DRC#hulls</a> for more details).
|
||||
</p>
|
||||
<a name="hulls"/><h2>"hulls" - Selects all hulls from the input polygons</h2>
|
||||
<keyword name="hulls"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>hulls</tt></li>
|
||||
<li><tt>hulls(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.hulls" (see <a href="/about/drc_ref_layer.xml#hulls">Layer#hulls</a>). Without a layer
|
||||
argument, "hulls" represents a hull contour extractor for primary shapes in
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#hulls">DRC#hulls</a> for more details).
|
||||
</p>
|
||||
<a name="if_all"/><h2>"if_all" - Evaluates to the primary shape when all condition expression results are non-empty</h2>
|
||||
<keyword name="if_all"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>if_all(c1, ... cn)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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:
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(if_all(area > 0.5, rectangle))
|
||||
</pre>
|
||||
</p><p>
|
||||
The condition expressions may be of any type (edges, edge pairs and polygons).
|
||||
</p>
|
||||
<a name="if_any"/><h2>"if_any" - Evaluates to the primary shape when any condition expression results is non-empty</h2>
|
||||
<keyword name="if_any"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>if_any(c1, ... cn)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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 <a href="#if_all">if_all</a> for an example how to use the if_... functions.
|
||||
</p>
|
||||
<a name="if_none"/><h2>"if_none" - Evaluates to the primary shape when all of the condition expression results are empty</h2>
|
||||
<keyword name="if_none"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>if_none(c1, ... cn)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function will evaluate the conditions c1 to cn and return the
|
||||
current primary shape if all conditions renders an empty result.
|
||||
See <a href="#if_all">if_all</a> for an example how to use the if_... functions.
|
||||
</p>
|
||||
<a name="info"/><h2>"info" - Outputs as message to the logger window</h2>
|
||||
<keyword name="info"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -440,6 +717,33 @@ See <a href="/about/drc_ref_source.xml#input">Source#input</a> for a description
|
|||
polygons and labels. See <a href="#polygons">polygons</a> and <a href="#labels">labels</a> for more specific versions of
|
||||
this method.
|
||||
</p>
|
||||
<a name="inside"/><h2>"inside" - Selects shapes entirely inside other shapes</h2>
|
||||
<keyword name="inside"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>inside(other)</tt></li>
|
||||
<li><tt>inside(layer, other)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.inside" (see <a href="/about/drc_ref_layer.xml#inside">Layer#inside</a>).
|
||||
</p><p>
|
||||
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 <a href="/about/drc_ref_drc.xml">DRC</a> expressions (also see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>).
|
||||
</p>
|
||||
<a name="interacting"/><h2>"interacting" - Selects shapes interacting with other shapes</h2>
|
||||
<keyword name="interacting"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>interacting(other) (in conditions)</tt></li>
|
||||
<li><tt>interacting(layer, other [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
See <a href="#covering">covering</a> 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.
|
||||
</p>
|
||||
<a name="is_deep?"/><h2>"is_deep?" - Returns true, if in deep mode</h2>
|
||||
<keyword name="is_deep?"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -452,6 +756,15 @@ this method.
|
|||
<ul>
|
||||
<li><tt>is_tiled?</tt></li>
|
||||
</ul>
|
||||
<a name="iso"/><h2>"iso" - Synonym for "isolated"</h2>
|
||||
<keyword name="iso"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>iso(...)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
"iso" is the short form for <a href="#isolated">isolated</a>.
|
||||
</p>
|
||||
<a name="l2n_data"/><h2>"l2n_data" - Gets the internal <class_doc href="LayoutToNetlist">LayoutToNetlist</class_doc> object for the default <a href="#Netter">Netter</a></h2>
|
||||
<keyword name="l2n_data"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -589,6 +902,19 @@ Set the value to zero to disable splitting by vertex count.
|
|||
</p><p>
|
||||
See also <a href="#max_area_ratio">max_area_ratio</a> for the other option affecting polygon splitting.
|
||||
</p>
|
||||
<a name="middle"/><h2>"middle" - Returns the centers of polygon bounding boxes</h2>
|
||||
<keyword name="middle"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>middle([ options ])</tt></li>
|
||||
<li><tt>middle(layer, [ options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.middle" (see <a href="/about/drc_ref_layer.xml#middle">Layer#middle</a>). Without a layer
|
||||
argument, "middle" represents the bounding box center marker generator on primary shapes within
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#middle">DRC#middle</a> for more details).
|
||||
</p>
|
||||
<a name="mos3"/><h2>"mos3" - Supplies the MOS3 transistor extractor class</h2>
|
||||
<keyword name="mos3"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -640,6 +966,30 @@ See <a href="/about/drc_ref_netter.xml">Netter</a> for more details
|
|||
<p>
|
||||
Resets the tile borders - see <a href="#tile_borders">tile_borders</a> for a description of tile borders.
|
||||
</p>
|
||||
<a name="notch"/><h2>"notch" - Performs a notch (intra-polygon space) check</h2>
|
||||
<keyword name="notch"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>notch([ options ]) (in conditions)</tt></li>
|
||||
<li><tt>notch(layer [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
Provides a intra-polygon space check for polygons from the primary layer. Like <a href="#width">width</a> this
|
||||
function provides a single-layer check. See there for details how to use this function.
|
||||
</p>
|
||||
<a name="odd_polygons"/><h2>"odd_polygons" - Selects all polygons which are non-orientable</h2>
|
||||
<keyword name="odd_polygons"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>odd_polygons</tt></li>
|
||||
<li><tt>odd_polygons(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.odd_polygons" (see <a href="/about/drc_ref_layer.xml#odd_polygons">Layer#odd_polygons</a>). Without a layer
|
||||
argument, "odd_polygons" represents an odd polygon filter for primary shapes in
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#odd_polygons">DRC#odd_polygons</a> for more details).
|
||||
</p>
|
||||
<a name="output"/><h2>"output" - Outputs a layer to the report database or output layout</h2>
|
||||
<keyword name="output"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -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.
|
||||
</p>
|
||||
<a name="outside"/><h2>"outside" - Selects shapes entirely outside other shapes</h2>
|
||||
<keyword name="outside"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>outside(other)</tt></li>
|
||||
<li><tt>outside(layer, other)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.outside" (see <a href="/about/drc_ref_layer.xml#outside">Layer#outside</a>).
|
||||
</p><p>
|
||||
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 <a href="/about/drc_ref_drc.xml">DRC</a> expressions (also see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>).
|
||||
</p>
|
||||
<a name="overlap"/><h2>"overlap" - Performs an overlap check</h2>
|
||||
<keyword name="overlap"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>overlap(other [, options ]) (in conditions)</tt></li>
|
||||
<li><tt>overlap(layer, other [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
Provides an overlap check (primary layer vs. another layer). Like <a href="#enclosing">enclosing</a> this
|
||||
function provides a two-layer check. See there for details how to use this function.
|
||||
</p>
|
||||
<a name="overlapping"/><h2>"overlapping" - Selects shapes overlapping with other shapes</h2>
|
||||
<keyword name="overlapping"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>overlapping(other) (in conditions)</tt></li>
|
||||
<li><tt>overlapping(layer, other [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
See <a href="#covering">covering</a> for a description of the use cases for this function.
|
||||
When using "overlapping", shapes are selected when the overlap
|
||||
shapes from the other layer.
|
||||
</p>
|
||||
<a name="p"/><h2>"p" - Creates a point object</h2>
|
||||
<keyword name="p"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -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 the
|
||||
<class_doc href="DPath">DPath</class_doc> constructors.
|
||||
</p>
|
||||
<a name="perimeter"/><h2>"perimeter" - Selects the primary shape if the perimeter is meeting the condition</h2>
|
||||
<keyword name="perimeter"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>perimeter (in condition)</tt></li>
|
||||
<li><tt>perimeter(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.perimeter" (see <a href="/about/drc_ref_layer.xml#perimeter">Layer#perimeter</a>). Without a layer
|
||||
argument, "perimeter" represents a perimeter filter for primary shapes in
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#perimeter">DRC#perimeter</a> for more details).
|
||||
</p>
|
||||
<a name="polygon"/><h2>"polygon" - Creates a polygon object</h2>
|
||||
<keyword name="polygon"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -716,6 +1117,42 @@ A similar method which creates a hierarchical layer in deep mode is
|
|||
<p>
|
||||
See <a href="/about/drc_ref_source.xml#polygons">Source#polygons</a> for a description of that function.
|
||||
</p>
|
||||
<a name="primary"/><h2>"primary" - Represents the primary input of the universal DRC function</h2>
|
||||
<keyword name="primary"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>primary</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
The primary input of the universal DRC function is the layer the <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> function
|
||||
is called on.
|
||||
</p>
|
||||
<a name="rectangles"/><h2>"rectangles" - Selects all polygons which are rectangles</h2>
|
||||
<keyword name="rectangles"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>rectangles</tt></li>
|
||||
<li><tt>rectangles(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.rectangles" (see <a href="/about/drc_ref_layer.xml#rectangles">Layer#rectangles</a>). Without a layer
|
||||
argument, "rectangles" represents the rectangles filter for primary shapes in
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#rectangles">DRC#rectangles</a> for more details).
|
||||
</p>
|
||||
<a name="rectilinear"/><h2>"rectilinear" - Selects all polygons which are rectilinear</h2>
|
||||
<keyword name="rectilinear"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>rectilinear</tt></li>
|
||||
<li><tt>rectilinear(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.rectilinear" (see <a href="/about/drc_ref_layer.xml#rectilinear">Layer#rectilinear</a>). Without a layer
|
||||
argument, "rectilinear" represents the rectilinear polygons filter for primary shapes in
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#rectilinear">DRC#rectilinear</a> for more details).
|
||||
</p>
|
||||
<a name="report"/><h2>"report" - Specifies a report database for output</h2>
|
||||
<keyword name="report"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -785,6 +1222,36 @@ The sheet_rho value is the sheet resistance in ohms/square.
|
|||
See <class_doc href="DeviceExtractorResistorWithBulk">DeviceExtractorResistorWithBulk</class_doc> for more details
|
||||
about this extractor.
|
||||
</p>
|
||||
<a name="rounded_corners"/><h2>"rounded_corners" - Applies corner rounding</h2>
|
||||
<keyword name="rounded_corners"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>rounded_corners(inner, outer, n)</tt></li>
|
||||
<li><tt>rounded_corners(layer, inner, outer, n)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.rounded_corners" (see <a href="/about/drc_ref_layer.xml#rounded_corners">Layer#rounded_corners</a>). Without a layer
|
||||
argument, "rounded_corners" represents the corner rounding algorithm on primary shapes within
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#rounded_corners">DRC#rounded_corners</a> for more details).
|
||||
</p>
|
||||
<a name="secondary"/><h2>"secondary" - Provides secondary input for the "drc" universal DRC function</h2>
|
||||
<keyword name="secondary"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>secondary(layer)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
To supply additional input for the universal DRC expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a>), use
|
||||
"secondary" with a layer argument. This example provides a boolean AND
|
||||
between l1 and l2:
|
||||
</p><p>
|
||||
<pre>
|
||||
l1 = layer(1, 0)
|
||||
l2 = layer(2, 0)
|
||||
out = l1.drc(primary & secondary(l2))
|
||||
</pre>
|
||||
</p>
|
||||
<a name="select"/><h2>"select" - Specifies cell filters on the default source</h2>
|
||||
<keyword name="select"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -794,6 +1261,26 @@ about this extractor.
|
|||
<p>
|
||||
See <a href="/about/drc_ref_source.xml#select">Source#select</a> for a description of that function.
|
||||
</p>
|
||||
<a name="sep"/><h2>"sep" - Synonym for "separation"</h2>
|
||||
<keyword name="sep"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>sep(...)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
"sep" is the short form for <a href="#separation">separation</a>.
|
||||
</p>
|
||||
<a name="separation"/><h2>"separation" - Performs a separation check</h2>
|
||||
<keyword name="separation"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>separation(other [, options ]) (in conditions)</tt></li>
|
||||
<li><tt>separation(layer, other [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
Provides a separation check (primary layer vs. another layer). Like <a href="#enclosing">enclosing</a> this
|
||||
function provides a two-layer check. See there for details how to use this function.
|
||||
</p>
|
||||
<a name="silent"/><h2>"silent" - Resets verbose mode</h2>
|
||||
<keyword name="silent"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -803,6 +1290,34 @@ See <a href="/about/drc_ref_source.xml#select">Source#select</a> for a descripti
|
|||
<p>
|
||||
This function is equivalent to "verbose(false)" (see <a href="#verbose">verbose</a>)
|
||||
</p>
|
||||
<a name="sized"/><h2>"sized" - Returns the sized version of the input</h2>
|
||||
<keyword name="sized"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>sized(d [, mode])</tt></li>
|
||||
<li><tt>sized(dx, dy [, mode]))</tt></li>
|
||||
<li><tt>sized(layer, d [, mode])</tt></li>
|
||||
<li><tt>sized(layer, dx, dy [, mode]))</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.sized" (see <a href="/about/drc_ref_layer.xml#sized">Layer#sized</a>). Without a layer
|
||||
argument, "sized" represents the polygon sizer on primary shapes within
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#sized">DRC#sized</a> for more details).
|
||||
</p>
|
||||
<a name="smoothed"/><h2>"smoothed" - Applies smoothing</h2>
|
||||
<keyword name="smoothed"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>smoothed(d)</tt></li>
|
||||
<li><tt>smoothed(layer, d)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.smoothed" (see <a href="/about/drc_ref_layer.xml#smoothed">Layer#smoothed</a>). Without a layer
|
||||
argument, "smoothed" represents the polygon smoother on primary shapes within
|
||||
<a href="/about/drc_ref_drc.xml">DRC</a> expressions (see <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> and <a href="/about/drc_ref_drc.xml#smoothed">DRC#smoothed</a> for more details).
|
||||
</p>
|
||||
<a name="source"/><h2>"source" - Specifies a source layout</h2>
|
||||
<keyword name="source"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -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.
|
||||
</p><p>
|
||||
<a href="#layout">layout</a> is a similar method which specifies <i>a additional </i>input layout.
|
||||
<a href="#layout">layout</a> is a similar method which specifies <i>an additional </i>input layout.
|
||||
</p><p>
|
||||
"what" specifies what input to use. "what" be either
|
||||
</p><p>
|
||||
|
|
@ -840,6 +1355,17 @@ l2 = layout("second_layout.gds")
|
|||
</p><p>
|
||||
For further methods on the source object see <a href="#Source">Source</a>.
|
||||
</p>
|
||||
<a name="space"/><h2>"space" - Performs a space check</h2>
|
||||
<keyword name="space"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>space([ options ]) (in conditions)</tt></li>
|
||||
<li><tt>space(layer [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
Provides a space check on the primary layer. Like <a href="#width">width</a> this
|
||||
function provides a single-layer check. See there for details how to use this function.
|
||||
</p>
|
||||
<a name="target"/><h2>"target" - Specify the target layout</h2>
|
||||
<keyword name="target"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -963,6 +1489,40 @@ In verbose mode, more output is generated in the log file
|
|||
<p>
|
||||
In verbose mode, more output is generated in the log file
|
||||
</p>
|
||||
<a name="width"/><h2>"width" - Performs a width check</h2>
|
||||
<keyword name="width"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>width([ options ]) (in conditions)</tt></li>
|
||||
<li><tt>width(layer [, options ])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This function can be used with a layer argument in which case it
|
||||
is equivalent to "layer.width" (see <a href="/about/drc_ref_layer.xml#width">Layer#width</a>).
|
||||
</p><p>
|
||||
The version without a layer is intended for use within <a href="/about/drc_ref_drc.xml">DRC</a> expressions
|
||||
together with the <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> method. In this case, this function needs to be
|
||||
put into a condition to specify the check constraints. The other options
|
||||
of <a href="/about/drc_ref_layer.xml#width">Layer#width</a> (e.g. metrics, projection constraints, angle limits etc.)
|
||||
apply to this version too.
|
||||
</p><p>
|
||||
The conditions may involve an upper and lower limit. The following examples
|
||||
illustrate the use of this function with conditions:
|
||||
</p><p>
|
||||
<pre>
|
||||
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)
|
||||
</pre>
|
||||
</p><p>
|
||||
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.
|
||||
</p>
|
||||
<a name="write_spice"/><h2>"write_spice" - Defines SPICE output format (with options)</h2>
|
||||
<keyword name="write_spice"/>
|
||||
<p>Usage:</p>
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@
|
|||
<doc>
|
||||
<title>DRC Reference: Layer Object</title>
|
||||
<keyword name="Layer"/>
|
||||
<p>
|
||||
The layer object represents a collection of polygons, edges or edge pairs.
|
||||
</p>
|
||||
<h2-index/>
|
||||
<a name="&"/><h2>"&" - Boolean AND operation</h2>
|
||||
<keyword name="&"/>
|
||||
|
|
@ -323,6 +320,73 @@ representing the underlying RBA object for the data.
|
|||
Access to these objects is provided to support low-level iteration and manipulation
|
||||
of the layer's data.
|
||||
</p>
|
||||
<a name="drc"/><h2>"drc" - Provides a generic DRC function for use with <a href="/about/drc_ref_drc.xml">DRC</a> expressions</h2>
|
||||
<keyword name="drc"/>
|
||||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>layer.drc(expression)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method implement the universal DRC which offers enhanced abilities,
|
||||
improved performance in some applications and better readability.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
Here is an example for a generic DRC operation which performs a width
|
||||
check for less than 0.5.um on the primary shapes.
|
||||
</p><p>
|
||||
<pre>
|
||||
out = in.drc(width < 0.5.um)
|
||||
</pre>
|
||||
</p><p>
|
||||
Another example computes a boolean AND between two layers before selecting
|
||||
the result polygons with an area larger than 1 square micrometer:
|
||||
</p><p>
|
||||
<pre>
|
||||
other = ... another layer ..
|
||||
out = in.drc((primary & other).area > 1.0)
|
||||
</pre>
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
For more details about the expression see the <a href="/about/drc_ref_drc.xml">DRC</a> class documentation.
|
||||
</p>
|
||||
<a name="dup"/><h2>"dup" - Duplicates a layer</h2>
|
||||
<keyword name="dup"/>
|
||||
<p>Usage:</p>
|
||||
|
|
@ -2482,7 +2546,12 @@ Shielding is enabled by default, but can be switched off with the "transparent"
|
|||
<p>
|
||||
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
|
||||
</p><p>
|
||||
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).
|
||||
</p><p>
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -30,13 +30,7 @@
|
|||
<topic href="/about/custom_queries.xml"/>
|
||||
<topic href="/about/rba_notation.xml"/>
|
||||
<topic href="/about/drc_ref.xml"/>
|
||||
<topic href="/about/drc_ref_layer.xml"/>
|
||||
<topic href="/about/drc_ref_netter.xml"/>
|
||||
<topic href="/about/drc_ref_source.xml"/>
|
||||
<topic href="/about/drc_ref_global.xml"/>
|
||||
<topic href="/about/lvs_ref.xml"/>
|
||||
<topic href="/about/lvs_ref_netter.xml"/>
|
||||
<topic href="/about/lvs_ref_global.xml"/>
|
||||
<!-- TODO: more -->
|
||||
</topics>
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
<file alias="technology_manager.xml">doc/about/technology_manager.xml</file>
|
||||
<file alias="custom_queries.xml">doc/about/custom_queries.xml</file>
|
||||
<file alias="drc_ref.xml">doc/about/drc_ref.xml</file>
|
||||
<file alias="drc_ref_drc.xml">doc/about/drc_ref_drc.xml</file>
|
||||
<file alias="drc_ref_layer.xml">doc/about/drc_ref_layer.xml</file>
|
||||
<file alias="drc_ref_source.xml">doc/about/drc_ref_source.xml</file>
|
||||
<file alias="drc_ref_global.xml">doc/about/drc_ref_global.xml</file>
|
||||
|
|
|
|||
Loading…
Reference in New Issue