Implemented rectangle and opposite filters for DRC functions.
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<db::Coord>::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<db::Coord>::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<db::Coord>::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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -352,9 +352,11 @@ check_local_operation<TS, TI>::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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2510,6 +2510,9 @@ gsi::EnumIn<db::Region, db::metrics_type> decl_Region_Metrics ("db", "Metrics",
|
|||
"This enum has been introduced in version 0.27."
|
||||
);
|
||||
|
||||
// Inject the Region::Metrics declarations into Region:
|
||||
gsi::ClassExt<db::Region> inject_Metrics_in_parent (decl_Region_Metrics.defs ());
|
||||
|
||||
gsi::EnumIn<db::Region, db::RectFilter> decl_Region_RectFilter ("db", "RectFilter",
|
||||
gsi::enum_const ("NoRectFilter", db::RectFilter::NoSideAllowed,
|
||||
"@brief Specifies no filtering"
|
||||
|
|
@ -2537,6 +2540,8 @@ gsi::EnumIn<db::Region, db::RectFilter> decl_Region_RectFilter ("db", "RectFilte
|
|||
"This enum has been introduced in version 0.27."
|
||||
);
|
||||
|
||||
// Inject the Region::RectFilter declarations into Region:
|
||||
gsi::ClassExt<db::Region> inject_RectFilter_in_parent (decl_Region_RectFilter.defs ());
|
||||
|
||||
gsi::EnumIn<db::Region, db::OppositeFilter> decl_Region_OppositeFilter ("db", "OppositeFilter",
|
||||
gsi::enum_const ("NoOppositeFilter", db::OppositeFilter::NoOppositeFilter,
|
||||
|
|
@ -2553,5 +2558,8 @@ gsi::EnumIn<db::Region, db::OppositeFilter> decl_Region_OppositeFilter ("db", "O
|
|||
"This enum has been introduced in version 0.27."
|
||||
);
|
||||
|
||||
// Inject the Region::OppositeFilter declarations into Region:
|
||||
gsi::ClassExt<db::Region> inject_OppositeFilter_in_parent (decl_Region_OppositeFilter.defs ());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -422,6 +422,7 @@ Disables tiling mode. Tiling mode can be enabled again with <a href="#tiles">til
|
|||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>info(message)</tt></li>
|
||||
<li><tt>info(message, indent)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
Prints the message to the log window in verbose mode.
|
||||
|
|
@ -520,6 +521,7 @@ For further methods on the source object see <a href="#Source">Source</a>.
|
|||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>log(message)</tt></li>
|
||||
<li><tt>log(message, indent)</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
Prints the message to the log window.
|
||||
|
|
|
|||
|
|
@ -357,6 +357,7 @@ See <a href="#enclosing">enclosing</a> for a description of that method
|
|||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>layer.enclosing(other_layer, value [, options])</tt></li>
|
||||
<li><tt>layer.enc(other_layer, value [, options])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
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 <a href="#not_inside">not_inside</a> or a boolean "not" operation.
|
||||
</p><p>
|
||||
"enc" is the short form of this method.
|
||||
</p><p>
|
||||
The options are the same as for <a href="#separation">separation</a>.
|
||||
</p><p>
|
||||
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 <a href="#isolated">isolated</a> for a description of that method
|
|||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>layer.isolated(value [, options])</tt></li>
|
||||
<li><tt>layer.iso(value [, options])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
See <a href="#space">space</a> for a description of this method.
|
||||
|
|
@ -922,6 +928,8 @@ In contrast to <a href="#space">space</a>, this
|
|||
method is available for polygon layers only, since only on such layers
|
||||
different polygons can be identified.
|
||||
</p><p>
|
||||
"iso" is the short form of this method.
|
||||
</p><p>
|
||||
The following image shows the effect of the isolated check:
|
||||
</p><p>
|
||||
<table>
|
||||
|
|
@ -1281,7 +1289,8 @@ is <a href="#select_not_overlapping">select_not_overlapping</a>.
|
|||
See <a href="#space">space</a> for a description of this method.
|
||||
In contrast to <a href="#space">space</a>, 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.
|
||||
</p><p>
|
||||
The following image shows the effect of the notch check:
|
||||
</p><p>
|
||||
|
|
@ -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 <a href="#outside">outside</a> or by a boolean "not".
|
||||
</p><p>
|
||||
The options are the same as for <a href="#separation">separation</a>.
|
||||
</p><p>
|
||||
Formally, the overlap method is a two-layer width check. In contrast to the single-
|
||||
layer width method (<a href="#width">width</a>), 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 <a href="#separation">separation</a> for a description of that method
|
|||
<p>Usage:</p>
|
||||
<ul>
|
||||
<li><tt>layer.separation(other_layer, value [, options])</tt></li>
|
||||
<li><tt>layer.sep(other_layer, value [, options])</tt></li>
|
||||
</ul>
|
||||
<p>
|
||||
This method performs a two-layer spacing check. Like <a href="#space">space</a>, 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.
|
||||
</p><p>
|
||||
"sep" is the short form of this method.
|
||||
</p><p>
|
||||
In contrast to the <a href="#space">space</a> 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 <a href="#space">space</a> it will not.
|
||||
|
|
@ -1903,6 +1917,72 @@ The following image shows the effect of the separation check (input1: red, input
|
|||
<td><img src="/images/drc_separation1.png"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p><p>
|
||||
The options for the separation check are those available for the <a href="#width">width</a> or <a href="#space">space</a>
|
||||
method plus opposite and rectangle error filtering.
|
||||
</p><p>
|
||||
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:
|
||||
</p><p>
|
||||
<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>
|
||||
</p><p>
|
||||
These modes imply partial waiving or selection if "opposite" only applies to a section
|
||||
of an error.
|
||||
</p><p>
|
||||
The following images shows the effect of these options:
|
||||
</p><p>
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="/images/drc_separation2.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="/images/drc_separation3.png"/></td>
|
||||
<td><img src="/images/drc_separation4.png"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
The rectangle filter option is enabled by these modes:
|
||||
</p><p>
|
||||
<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>
|
||||
</p><p>
|
||||
Multiple of these options can be given, which will make errors waived if one of these conditions is met.
|
||||
</p><p>
|
||||
The following images shows the effect of some rectangle filter modes:
|
||||
</p><p>
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="/images/drc_separation5.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="/images/drc_separation6.png"/></td>
|
||||
<td><img src="/images/drc_separation7.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="/images/drc_separation8.png"/></td>
|
||||
<td><img src="/images/drc_separation9.png"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="/images/drc_separation10.png"/></td>
|
||||
<td><img src="/images/drc_separation11.png"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
<a name="size"/><h2>"size" - Polygon sizing (per-edge biasing, modifies the layer)</h2>
|
||||
<keyword name="size"/>
|
||||
|
|
@ -2037,8 +2117,8 @@ The <a href="#notch">notch</a> method is similar, but will only report self-spac
|
|||
method will only report space violations to other polygons. <a href="#separation">separation</a> is a two-layer
|
||||
space check where space is checked against polygons of another layer.
|
||||
</p><p>
|
||||
The options available are the same than for the <a href="#width">width</a> method. Like for the <a href="#width">width</a>
|
||||
method, merged semantics applies.
|
||||
Like for the <a href="#width">width</a> method, merged semantics applies.
|
||||
</p><p>
|
||||
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.
|
||||
</p><p>
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
|
@ -8,6 +8,16 @@
|
|||
<file alias="drc_space2.png">doc/images/drc_space2.png</file>
|
||||
<file alias="drc_space3.png">doc/images/drc_space3.png</file>
|
||||
<file alias="drc_separation1.png">doc/images/drc_separation1.png</file>
|
||||
<file alias="drc_separation2.png">doc/images/drc_separation2.png</file>
|
||||
<file alias="drc_separation3.png">doc/images/drc_separation3.png</file>
|
||||
<file alias="drc_separation4.png">doc/images/drc_separation4.png</file>
|
||||
<file alias="drc_separation5.png">doc/images/drc_separation5.png</file>
|
||||
<file alias="drc_separation6.png">doc/images/drc_separation6.png</file>
|
||||
<file alias="drc_separation7.png">doc/images/drc_separation7.png</file>
|
||||
<file alias="drc_separation8.png">doc/images/drc_separation8.png</file>
|
||||
<file alias="drc_separation9.png">doc/images/drc_separation9.png</file>
|
||||
<file alias="drc_separation10.png">doc/images/drc_separation10.png</file>
|
||||
<file alias="drc_separation11.png">doc/images/drc_separation11.png</file>
|
||||
<file alias="drc_raw1.png">doc/images/drc_raw1.png</file>
|
||||
<file alias="drc_raw2.png">doc/images/drc_raw2.png</file>
|
||||
<file alias="drc_raw3.png">doc/images/drc_raw3.png</file>
|
||||
|
|
|
|||