diff --git a/scripts/create_drc_samples.rb b/scripts/create_drc_samples.rb index 196c6bf19..15de2e5ed 100644 --- a/scripts/create_drc_samples.rb +++ b/scripts/create_drc_samples.rb @@ -240,6 +240,116 @@ gen = Gen::new run_demo gen, "input1.separation(input2, 1.2, euclidian)", "drc_separation1.png" +class Gen + def produce(s1, s2) + pts = [ + RBA::Point::new(1000, 0), + RBA::Point::new(1000, 6000), + RBA::Point::new(2000, 6000), + RBA::Point::new(2000, 0), + ]; + s2.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(5000, 2000), + RBA::Point::new(5000, 4000), + RBA::Point::new(6000, 4000), + RBA::Point::new(6000, 2000), + ]; + s2.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(3000, 0), + RBA::Point::new(3000, 6000), + RBA::Point::new(4000, 6000), + RBA::Point::new(4000, 0) + ]; + s1.insert(RBA::Polygon::new(pts)) + end +end + +gen = Gen::new + +run_demo gen, "input1.sep(input2, 1.2, projection)", "drc_separation2.png" +run_demo gen, "input1.sep(input2, 1.2, projection, not_opposite)", "drc_separation3.png" +run_demo gen, "input1.sep(input2, 1.2, projection, only_opposite)", "drc_separation4.png" + +class Gen + def produce(s1, s2) + pts = [ + RBA::Point::new(0, 3000), + RBA::Point::new(0, 4000), + RBA::Point::new(1000, 4000), + RBA::Point::new(1000, 3000) + ] + s2.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(3000, 3000), + RBA::Point::new(3000, 4000), + RBA::Point::new(4000, 4000), + RBA::Point::new(4000, 3000) + ] + s2.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(6000, 3000), + RBA::Point::new(6000, 4000), + RBA::Point::new(7000, 4000), + RBA::Point::new(7000, 3000) + ] + s2.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(4500, 1500), + RBA::Point::new(4500, 2500), + RBA::Point::new(5500, 2500), + RBA::Point::new(5500, 1500) + ] + s2.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(1500, 3000), + RBA::Point::new(1500, 4000), + RBA::Point::new(2500, 4000), + RBA::Point::new(2500, 3000) + ] + s1.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(3000, 4500), + RBA::Point::new(3000, 5500), + RBA::Point::new(4000, 5500), + RBA::Point::new(4000, 4500) + ] + s1.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(3000, 1500), + RBA::Point::new(3000, 2500), + RBA::Point::new(4000, 2500), + RBA::Point::new(4000, 1500) + ] + s1.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(4500, 3000), + RBA::Point::new(4500, 4000), + RBA::Point::new(5500, 4000), + RBA::Point::new(5500, 3000) + ] + s1.insert(RBA::Polygon::new(pts)) + end +end + +gen = Gen::new + +run_demo gen, "input1.sep(input2, 1.0, projection)", "drc_separation5.png" +run_demo gen, "input1.sep(input2, 1.0, projection,\n" + + " one_side_allowed)", "drc_separation6.png" +run_demo gen, "input1.sep(input2, 1.0, projection,\n" + + " two_sides_allowed)", "drc_separation7.png" +run_demo gen, "input1.sep(input2, 1.0, projection,\n" + + " two_opposite_sides_allowed)", "drc_separation8.png" +run_demo gen, "input1.sep(input2, 1.0, projection,\n" + + " two_connected_sides_allowed)", "drc_separation9.png" +run_demo gen, "input1.sep(input2, 1.0, projection,\n" + + " three_sides_allowed)", "drc_separation10.png" +run_demo gen, "input1.sep(input2, 1.0, projection,\n" + + " one_side_allowed,\n" + + " two_opposite_sides_allowed)", "drc_separation11.png" + # ... class Gen diff --git a/src/db/db/dbEdgePairRelations.h b/src/db/db/dbEdgePairRelations.h index a2d26b461..b7e0dece3 100644 --- a/src/db/db/dbEdgePairRelations.h +++ b/src/db/db/dbEdgePairRelations.h @@ -257,9 +257,9 @@ private: // Internal methods exposed for testing purposes -DB_PUBLIC bool projected_near_part_of_edge (bool include_zero, db::Coord d, const db::Edge &e, const db::Edge &g, db::Edge *output); -DB_PUBLIC bool square_near_part_of_edge (bool include_zero, db::Coord d, const db::Edge &e, const db::Edge &g, db::Edge *output); -DB_PUBLIC bool euclidian_near_part_of_edge (bool include_zero, db::Coord d, const db::Edge &e, const db::Edge &g, db::Edge *output); +DB_PUBLIC bool projected_near_part_of_edge (bool include_zero, db::coord_traits::distance_type d, const db::Edge &e, const db::Edge &g, db::Edge *output); +DB_PUBLIC bool square_near_part_of_edge (bool include_zero, db::coord_traits::distance_type d, const db::Edge &e, const db::Edge &g, db::Edge *output); +DB_PUBLIC bool euclidian_near_part_of_edge (bool include_zero, db::coord_traits::distance_type d, const db::Edge &e, const db::Edge &g, db::Edge *output); DB_PUBLIC db::Edge::distance_type edge_projection (const db::Edge &a, const db::Edge &b); } diff --git a/src/db/db/dbRegionLocalOperations.cc b/src/db/db/dbRegionLocalOperations.cc index 584ef8da1..e2998637e 100644 --- a/src/db/db/dbRegionLocalOperations.cc +++ b/src/db/db/dbRegionLocalOperations.cc @@ -352,9 +352,11 @@ check_local_operation::compute_local (db::Layout *layout, const shape_in uint32_t p4 = p32 & 0xf; p32 >>= 4; - for (unsigned int r = 0; r < 4 && ! can_be_waived; ++r) { - can_be_waived = (error_pattern == p4); - p4 = ((p4 << 1) & 0xf) | ((p4 & 0x8) >> 3); + if (p4 > 0) { + for (unsigned int r = 0; r < 4 && ! can_be_waived; ++r) { + can_be_waived = (error_pattern == p4); + p4 = ((p4 << 1) & 0xf) | ((p4 & 0x8) >> 3); + } } } diff --git a/src/db/db/dbRegionLocalOperations.h b/src/db/db/dbRegionLocalOperations.h index 95cefa485..6fc454f3f 100644 --- a/src/db/db/dbRegionLocalOperations.h +++ b/src/db/db/dbRegionLocalOperations.h @@ -39,7 +39,9 @@ namespace db * of groups of 4 bits each specifying an allowed pattern. Rotation is implicit, so it's just * required to give on incarnation. * - * For example: 0x1953 would be one- or two-sided. + * For example: 0x153 would be one- or two-sided. + * + * The bitmaps are choosen such that they can be or-combined. */ enum RectFilter { @@ -56,27 +58,27 @@ enum RectFilter /** * @brief Allow errors on two sides (not specified which) */ - TwoSidesAllowed = 0x953, + TwoSidesAllowed = 0x530, /** * @brief Allow errors on two sides ("L" configuration) */ - TwoConnectedSidesAllowed = 0x3, + TwoConnectedSidesAllowed = 0x30, /** * @brief Allow errors on two opposite sides */ - TwoOppositeSidesAllowed = 0x5, + TwoOppositeSidesAllowed = 0x500, /** * @brief Allow errors on three sides */ - ThreeSidesAllowed = 0x7, + ThreeSidesAllowed = 0x7000, /** * @brief Allow errors when on all sides */ - FourSidesAllowed = 0xf + FourSidesAllowed = 0xf0000 }; /** diff --git a/src/db/db/gsiDeclDbRegion.cc b/src/db/db/gsiDeclDbRegion.cc index 68e9ad177..07eb2fd27 100644 --- a/src/db/db/gsiDeclDbRegion.cc +++ b/src/db/db/gsiDeclDbRegion.cc @@ -2510,6 +2510,9 @@ gsi::EnumIn decl_Region_Metrics ("db", "Metrics", "This enum has been introduced in version 0.27." ); +// Inject the Region::Metrics declarations into Region: +gsi::ClassExt inject_Metrics_in_parent (decl_Region_Metrics.defs ()); + gsi::EnumIn decl_Region_RectFilter ("db", "RectFilter", gsi::enum_const ("NoRectFilter", db::RectFilter::NoSideAllowed, "@brief Specifies no filtering" @@ -2537,6 +2540,8 @@ gsi::EnumIn decl_Region_RectFilter ("db", "RectFilte "This enum has been introduced in version 0.27." ); +// Inject the Region::RectFilter declarations into Region: +gsi::ClassExt inject_RectFilter_in_parent (decl_Region_RectFilter.defs ()); gsi::EnumIn decl_Region_OppositeFilter ("db", "OppositeFilter", gsi::enum_const ("NoOppositeFilter", db::OppositeFilter::NoOppositeFilter, @@ -2553,5 +2558,8 @@ gsi::EnumIn decl_Region_OppositeFilter ("db", "O "This enum has been introduced in version 0.27." ); +// Inject the Region::OppositeFilter declarations into Region: +gsi::ClassExt inject_OppositeFilter_in_parent (decl_Region_OppositeFilter.defs ()); + } diff --git a/src/drc/drc/built-in-macros/_drc_engine.rb b/src/drc/drc/built-in-macros/_drc_engine.rb index bcacad3f0..58f39e071 100644 --- a/src/drc/drc/built-in-macros/_drc_engine.rb +++ b/src/drc/drc/built-in-macros/_drc_engine.rb @@ -115,6 +115,38 @@ module DRC DRCMetrics::new(RBA::Region::Projection) end + def not_opposite + DRCOppositeErrorFilter::new(RBA::Region::NotOpposite) + end + + def only_opposite + DRCOppositeErrorFilter::new(RBA::Region::OnlyOpposite) + end + + def one_side_allowed + DRCRectangleErrorFilter::new(RBA::Region::OneSideAllowed) + end + + def two_sides_allowed + DRCRectangleErrorFilter::new(RBA::Region::TwoSidesAllowed) + end + + def two_connected_sides_allowed + DRCRectangleErrorFilter::new(RBA::Region::TwoConnectedSidesAllowed) + end + + def two_opposite_sides_allowed + DRCRectangleErrorFilter::new(RBA::Region::TwoOppositeSidesAllowed) + end + + def three_sides_allowed + DRCRectangleErrorFilter::new(RBA::Region::ThreeSidesAllowed) + end + + def four_sides_allowed + DRCRectangleErrorFilter::new(RBA::Region::FourSidesAllowed) + end + def pattern(p) DRCPattern::new(true, p) end diff --git a/src/drc/drc/built-in-macros/_drc_layer.rb b/src/drc/drc/built-in-macros/_drc_layer.rb index 4fd5e452a..b54ef5689 100644 --- a/src/drc/drc/built-in-macros/_drc_layer.rb +++ b/src/drc/drc/built-in-macros/_drc_layer.rb @@ -2609,8 +2609,8 @@ CODE # method will only report space violations to other polygons. \separation is a two-layer # space check where space is checked against polygons of another layer. # - # The options available are the same than for the \width method. Like for the \width - # method, merged semantics applies. + # Like for the \width method, merged semantics applies. + # # Distance values can be given as floating-point values (in micron) or integer values (in # database units). To explicitly specify the unit, use the unit denominators. # @@ -2621,17 +2621,21 @@ CODE # @td @img(/images/drc_space1.png) @/td # @/tr # @/table + # # %DRC% # @name isolated # @brief An isolation check # @synopsis layer.isolated(value [, options]) + # @synopsis layer.iso(value [, options]) # # See \space for a description of this method. # In contrast to \space, this # method is available for polygon layers only, since only on such layers # different polygons can be identified. # + # "iso" is the short form of this method. + # # The following image shows the effect of the isolated check: # # @table @@ -2648,7 +2652,8 @@ CODE # See \space for a description of this method. # In contrast to \space, this # method is available for polygon layers only, since only on such layers - # different polygons can be identified. + # different polygons can be identified. Also, opposite and rectangle error + # filtering is not available for this method. # # The following image shows the effect of the notch check: # @@ -2662,12 +2667,15 @@ CODE # @name separation # @brief A two-layer spacing check # @synopsis layer.separation(other_layer, value [, options]) + # @synopsis layer.sep(other_layer, value [, options]) # # This method performs a two-layer spacing check. Like \space, this method # can be applied to edge or polygon layers. Locations where edges of the layer # are closer than the specified distance to the other layer are reported # as edge pair error markers. - # + # + # "sep" is the short form of this method. + # # In contrast to the \space and related methods, locations where both # layers touch are also reported. More specifically, the case of zero spacing # will also trigger an error while for \space it will not. @@ -2684,6 +2692,72 @@ CODE # @td @img(/images/drc_separation1.png) @/td # @/tr # @/table + # + # The options for the separation check are those available for the \width or \space + # method plus opposite and rectangle error filtering. + # + # Opposite error filtering will waive errors that are on opposite sides of the original + # figure. The inverse is selection of errors only when there is an error present on + # the opposite side of the original figure. Opposite error waiving or selection is achieved + # through these options inside the DRC function call: + # + # @ul + # @li @b not_opposite @/b will waive opposite errors @/li + # @li @b only_opposite @/b will select errors only if there is an opposite one @/li + # @/ul + # + # These modes imply partial waiving or selection if "opposite" only applies to a section + # of an error. + # + # The following images shows the effect of these options: + # + # @table + # @tr + # @td @img(/images/drc_separation2.png) @/td + # @/tr + # @tr + # @td @img(/images/drc_separation3.png) @/td + # @td @img(/images/drc_separation4.png) @/td + # @/tr + # @/table + # + # Rectangle error filtering allows waiving errors based on how they cover the + # sides of an original rectangular figure. This selection only applies to errors + # covering the full edge of the rectangle. Errors covering parts of the rectangle + # edges are not considered in this scheme. + # + # The rectangle filter option is enabled by these modes: + # + # @ul + # @li @b one_side_allowed @/b will waive errors when they appear on one side of the rectangle only @/li + # @li @b two_sides_allowed @/b will waive errors when they appear on two sides of the rectangle @/li + # @li @b two_connected_sides_allowed @/b will waive errors when they appear on two connected sides of the rectangle ("L" configuration) @/li + # @li @b two_opposite_sides_allowed @/b will waive errors when they appear on two opposite sides of the rectangle @/li + # @li @b three_sides_allowed @/b will waive errors when they appear on three sides of the rectangle @/li + # @li @b four_sides_allowed @/b will waive errors when they appear on four sides of the rectangle @/li + # @/ul + # + # Multiple of these options can be given, which will make errors waived if one of these conditions is met. + # + # The following images shows the effect of some rectangle filter modes: + # + # @table + # @tr + # @td @img(/images/drc_separation5.png) @/td + # @/tr + # @tr + # @td @img(/images/drc_separation6.png) @/td + # @td @img(/images/drc_separation7.png) @/td + # @/tr + # @tr + # @td @img(/images/drc_separation8.png) @/td + # @td @img(/images/drc_separation9.png) @/td + # @/tr + # @tr + # @td @img(/images/drc_separation10.png) @/td + # @td @img(/images/drc_separation11.png) @/td + # @/tr + # @/table # %DRC% # @name overlap @@ -2697,6 +2771,8 @@ CODE # such locations form an overlap with a value of 0. Locations, where both regions # do not overlap or touch will not be reported. Such regions can be detected # with \outside or by a boolean "not". + # + # The options are the same as for \separation. # # Formally, the overlap method is a two-layer width check. In contrast to the single- # layer width method (\width), the zero value also triggers an error and separate @@ -2725,6 +2801,7 @@ CODE # @name enclosing # @brief An enclosing check # @synopsis layer.enclosing(other_layer, value [, options]) + # @synopsis layer.enc(other_layer, value [, options]) # # This method checks whether layer encloses (is bigger than) other_layer by the # given dimension. Locations, where this is not the case will be reported in form @@ -2734,6 +2811,10 @@ CODE # extends outside layer will not be reported as errors. Such regions can be detected # by \not_inside or a boolean "not" operation. # + # "enc" is the short form of this method. + # + # The options are the same as for \separation. + # # The enclosing method can be applied to both edge or polygon layers. On edge layers # the orientation of the edges matters and only edges looking into the same direction # are checked. @@ -2752,20 +2833,26 @@ CODE # @/tr # @/table - %w(width space overlap enclosing separation).each do |f| + %w(width space overlap enclosing separation isolated notch).each do |f| eval <<"CODE" def #{f}(*args) - requires_edges_or_region("#{f}") + if :#{f} == :width || :#{f} == :space || :#{f} == :overlap || :#{f} == :enclosing || :#{f} == :separation + requires_edges_or_region("#{f}") + else + requires_region("#{f}") + end value = nil - metrics = nil + metrics = RBA::Region::Euclidian minp = nil maxp = nil alim = nil whole_edges = false other = nil shielded = nil + opposite_filter = RBA::Region::NoOppositeFilter + rect_filter = RBA::Region::NoRectFilter n = 1 args.each do |a| @@ -2773,6 +2860,10 @@ CODE metrics = a.value elsif a.is_a?(DRCWholeEdges) whole_edges = a.value + elsif a.is_a?(DRCOppositeErrorFilter) + opposite_filter = a.value + elsif a.is_a?(DRCRectangleErrorFilter) + rect_filter = RBA::Region::RectFilter::new(a.value.to_i | rect_filter.to_i) elsif a.is_a?(DRCAngleLimit) alim = a.value elsif a.is_a?(DRCLayer) @@ -2796,24 +2887,35 @@ CODE end args = [ value, whole_edges, metrics, alim, minp, maxp ] - if shielded != nil - if self.data.is_a?(RBA::Region) - args << shielded - else - raise("#{f}: shielding can only be used for polygon layers") + + if self.data.is_a?(RBA::Region) + args << shielded + if :#{f} != :width && :#{f} != :notch + args << opposite_filter + args << rect_filter + elsif opposite_filter != RBA::Region::NoOppositeFilter + raise("#{f}: an opposite error filter cannot be used with this check") + elsif rect_filter != RBA::Region::NoRectFilter + raise("#{f}: a rectangle error filter cannot be used with this check") end + elsif shielded != nil + raise("#{f}: shielding can only be used for polygon layers") + elsif opposite_filter != RBA::Region::NoOppositeFilter + raise("#{f}: an opposite error filter can only be used for polygon layers") + elsif rect_filter != RBA::Region::NoRectFilter + raise("#{f}: a rectangle error filter can only be used for polygon layers") end border = (metrics == RBA::Region::Square ? value * 1.5 : value) - if "#{f}" == "width" || "#{f}" == "space" || "#{f}" == "notch" || "#{f}" == "isolated" + if :#{f} == :width || :#{f} == :space || :#{f} == :notch || :#{f} == :isolated if other - raise("No other layer must be specified for single-layer checks (i.e. width)") + raise("No other layer must be specified for a single-layer check (here: #{f})") end DRCLayer::new(@engine, @engine._tcmd(self.data, border, RBA::EdgePairs, :#{f}_check, *args)) else if !other - raise("The other layer must be specified for two-layer checks (i.e. overlap)") + raise("The other layer must be specified for a two-layer check (here: #{f})") end requires_same_type(other, "#{f}") DRCLayer::new(@engine, @engine._tcmd(self.data, border, RBA::EdgePairs, :#{f}_check, other.data, *args)) @@ -2823,64 +2925,6 @@ CODE CODE end - %w(isolated notch).each do |f| - eval <<"CODE" - def #{f}(*args) - - requires_region("#{f}") - - value = nil - metrics = nil - minp = nil - maxp = nil - alim = nil - whole_edges = false - other = nil - - n = 1 - args.each do |a| - if a.is_a?(DRCMetrics) - metrics = a.value - elsif a.is_a?(DRCWholeEdges) - whole_edges = a.value - elsif a.is_a?(DRCAngleLimit) - alim = a.value - elsif a.is_a?(DRCLayer) - other = a - elsif a.is_a?(DRCProjectionLimits) - minp = @engine._prep_value(a.min) - maxp = @engine._prep_value(a.max) - elsif a.is_a?(Float) || a.is_a?(1.class) - value && raise("Value already specified") - value = @engine._prep_value(a) - else - raise("#{f}: Parameter #" + n.to_s + " does not have an expected type") - end - n += 1 - end - - if !value - raise("A check value must be specified") - end - - border = (metrics == RBA::Region::Square ? value * 1.5 : value) - - if "#{f}" == "width" || "#{f}" == "space" || "#{f}" == "notch" || "#{f}" == "isolated" - if other - raise("#{f}: No other layer must be specified for single-layer checks (i.e. width)") - end - DRCLayer::new(@engine, @engine._tcmd(self.data, border, RBA::EdgePairs, :#{f}_check, value, whole_edges, metrics, alim, minp, maxp)) - else - if !other - raise("#{f}: The other layer must be specified for two-layer checks (i.e. overlap)") - end - DRCLayer::new(@engine, @engine._tcmd(self.data, border, RBA::EdgePairs, :#{f}_check, other.data, value, whole_edges, metrics, alim, minp, maxp)) - end - - end -CODE - end - # %DRC% # @name scaled # @brief Scales a layer diff --git a/src/drc/drc/built-in-macros/_drc_tags.rb b/src/drc/drc/built-in-macros/_drc_tags.rb index 30f460f2f..eaf58624b 100644 --- a/src/drc/drc/built-in-macros/_drc_tags.rb +++ b/src/drc/drc/built-in-macros/_drc_tags.rb @@ -72,6 +72,24 @@ module DRC end end + # A wrapper for a rectangle error filter mode + # The purpose of this wrapper is to identify the error filter mode + class DRCRectangleErrorFilter + attr_accessor :value + def initialize(v) + self.value = v + end + end + + # A wrapper for a opposite error filter mode + # The purpose of this wrapper is to identify the error filter mode + class DRCOppositeErrorFilter + attr_accessor :value + def initialize(v) + self.value = v + end + end + # A wrapper for a glob-pattern style text selection for # some DRC functions. The purpose of this class # is to identify the value by the class. diff --git a/src/lay/lay/doc/about/drc_ref_global.xml b/src/lay/lay/doc/about/drc_ref_global.xml index 6f80c8b5a..38cc38445 100644 --- a/src/lay/lay/doc/about/drc_ref_global.xml +++ b/src/lay/lay/doc/about/drc_ref_global.xml @@ -422,6 +422,7 @@ Disables tiling mode. Tiling mode can be enabled again with til

Usage:

  • info(message)
  • +
  • info(message, indent)

Prints the message to the log window in verbose mode. @@ -520,6 +521,7 @@ For further methods on the source object see Source.

Usage:

  • log(message)
  • +
  • log(message, indent)

Prints the message to the log window. diff --git a/src/lay/lay/doc/about/drc_ref_layer.xml b/src/lay/lay/doc/about/drc_ref_layer.xml index 192e50857..08d96c467 100644 --- a/src/lay/lay/doc/about/drc_ref_layer.xml +++ b/src/lay/lay/doc/about/drc_ref_layer.xml @@ -357,6 +357,7 @@ See enclosing for a description of that method

Usage:

  • layer.enclosing(other_layer, value [, options])
  • +
  • layer.enc(other_layer, value [, options])

This method checks whether layer encloses (is bigger than) other_layer by the @@ -367,6 +368,10 @@ such locations form an enclosure with a distance of 0. Locations, where other_la extends outside layer will not be reported as errors. Such regions can be detected by not_inside or a boolean "not" operation.

+"enc" is the short form of this method. +

+The options are the same as for separation. +

The enclosing method can be applied to both edge or polygon layers. On edge layers the orientation of the edges matters and only edges looking into the same direction are checked. @@ -915,6 +920,7 @@ See isolated for a description of that method

Usage:

  • layer.isolated(value [, options])
  • +
  • layer.iso(value [, options])

See space for a description of this method. @@ -922,6 +928,8 @@ In contrast to space, this method is available for polygon layers only, since only on such layers different polygons can be identified.

+"iso" is the short form of this method. +

The following image shows the effect of the isolated check:

@@ -1281,7 +1289,8 @@ is select_not_overlapping. See space for a description of this method. In contrast to space, this method is available for polygon layers only, since only on such layers -different polygons can be identified. +different polygons can be identified. Also, opposite and rectangle error +filtering is not available for this method.

The following image shows the effect of the notch check:

@@ -1417,6 +1426,8 @@ such locations form an overlap with a value of 0. Locations, where both regions do not overlap or touch will not be reported. Such regions can be detected with outside or by a boolean "not".

+The options are the same as for separation. +

Formally, the overlap method is a two-layer width check. In contrast to the single- layer width method (width), the zero value also triggers an error and separate polygons are checked against each other, while for the single-layer width, only @@ -1880,6 +1891,7 @@ See separation for a description of that method

Usage:

  • layer.separation(other_layer, value [, options])
  • +
  • layer.sep(other_layer, value [, options])

This method performs a two-layer spacing check. Like space, this method @@ -1887,6 +1899,8 @@ can be applied to edge or polygon layers. Locations where edges of the layer are closer than the specified distance to the other layer are reported as edge pair error markers.

+"sep" is the short form of this method. +

In contrast to the space and related methods, locations where both layers touch are also reported. More specifically, the case of zero spacing will also trigger an error while for space it will not. @@ -1903,6 +1917,72 @@ The following image shows the effect of the separation check (input1: red, input

+

+The options for the separation check are those available for the width or space +method plus opposite and rectangle error filtering. +

+Opposite error filtering will waive errors that are on opposite sides of the original +figure. The inverse is selection of errors only when there is an error present on +the opposite side of the original figure. Opposite error waiving or selection is achieved +through these options inside the DRC function call: +

+

    +
  • not_opposite will waive opposite errors
  • +
  • only_opposite will select errors only if there is an opposite one
  • +
+

+These modes imply partial waiving or selection if "opposite" only applies to a section +of an error. +

+The following images shows the effect of these options: +

+ + + + + + + + +
+

+Rectangle error filtering allows waiving errors based on how they cover the +sides of an original rectangular figure. This selection only applies to errors +covering the full edge of the rectangle. Errors covering parts of the rectangle +edges are not considered in this scheme. +

+The rectangle filter option is enabled by these modes: +

+

    +
  • one_side_allowed will waive errors when they appear on one side of the rectangle only
  • +
  • two_sides_allowed will waive errors when they appear on two sides of the rectangle
  • +
  • two_connected_sides_allowed will waive errors when they appear on two connected sides of the rectangle ("L" configuration)
  • +
  • two_opposite_sides_allowed will waive errors when they appear on two opposite sides of the rectangle
  • +
  • three_sides_allowed will waive errors when they appear on three sides of the rectangle
  • +
  • four_sides_allowed will waive errors when they appear on four sides of the rectangle
  • +
+

+Multiple of these options can be given, which will make errors waived if one of these conditions is met. +

+The following images shows the effect of some rectangle filter modes: +

+ + + + + + + + + + + + + + + + +

"size" - Polygon sizing (per-edge biasing, modifies the layer)

@@ -2037,8 +2117,8 @@ The
notch method is similar, but will only report self-spac method will only report space violations to other polygons. separation is a two-layer space check where space is checked against polygons of another layer.

-The options available are the same than for the width method. Like for the width -method, merged semantics applies. +Like for the width method, merged semantics applies. +

Distance values can be given as floating-point values (in micron) or integer values (in database units). To explicitly specify the unit, use the unit denominators.

diff --git a/src/lay/lay/doc/images/drc_separation10.png b/src/lay/lay/doc/images/drc_separation10.png new file mode 100644 index 000000000..041e66910 Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation10.png differ diff --git a/src/lay/lay/doc/images/drc_separation11.png b/src/lay/lay/doc/images/drc_separation11.png new file mode 100644 index 000000000..bfa3d688f Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation11.png differ diff --git a/src/lay/lay/doc/images/drc_separation2.png b/src/lay/lay/doc/images/drc_separation2.png new file mode 100644 index 000000000..9859e8e4b Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation2.png differ diff --git a/src/lay/lay/doc/images/drc_separation3.png b/src/lay/lay/doc/images/drc_separation3.png new file mode 100644 index 000000000..cfdd7f26b Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation3.png differ diff --git a/src/lay/lay/doc/images/drc_separation4.png b/src/lay/lay/doc/images/drc_separation4.png new file mode 100644 index 000000000..7c3d58d68 Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation4.png differ diff --git a/src/lay/lay/doc/images/drc_separation5.png b/src/lay/lay/doc/images/drc_separation5.png new file mode 100644 index 000000000..7087dfe60 Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation5.png differ diff --git a/src/lay/lay/doc/images/drc_separation6.png b/src/lay/lay/doc/images/drc_separation6.png new file mode 100644 index 000000000..dfa38c475 Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation6.png differ diff --git a/src/lay/lay/doc/images/drc_separation7.png b/src/lay/lay/doc/images/drc_separation7.png new file mode 100644 index 000000000..95006d6af Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation7.png differ diff --git a/src/lay/lay/doc/images/drc_separation8.png b/src/lay/lay/doc/images/drc_separation8.png new file mode 100644 index 000000000..1dc539958 Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation8.png differ diff --git a/src/lay/lay/doc/images/drc_separation9.png b/src/lay/lay/doc/images/drc_separation9.png new file mode 100644 index 000000000..a6da75eaa Binary files /dev/null and b/src/lay/lay/doc/images/drc_separation9.png differ diff --git a/src/lay/lay/layDRCLVSHelpResources.qrc b/src/lay/lay/layDRCLVSHelpResources.qrc index 41787d419..402d5d600 100644 --- a/src/lay/lay/layDRCLVSHelpResources.qrc +++ b/src/lay/lay/layDRCLVSHelpResources.qrc @@ -8,6 +8,16 @@ doc/images/drc_space2.png doc/images/drc_space3.png doc/images/drc_separation1.png + doc/images/drc_separation2.png + doc/images/drc_separation3.png + doc/images/drc_separation4.png + doc/images/drc_separation5.png + doc/images/drc_separation6.png + doc/images/drc_separation7.png + doc/images/drc_separation8.png + doc/images/drc_separation9.png + doc/images/drc_separation10.png + doc/images/drc_separation11.png doc/images/drc_raw1.png doc/images/drc_raw2.png doc/images/drc_raw3.png