diff --git a/scripts/drc_lvs_doc/create_drc_samples.rb b/scripts/drc_lvs_doc/create_drc_samples.rb index 5594555be..feffbc2ad 100644 --- a/scripts/drc_lvs_doc/create_drc_samples.rb +++ b/scripts/drc_lvs_doc/create_drc_samples.rb @@ -177,6 +177,37 @@ run_demo gen, "input.width(1.2, projection)", "drc_width2.png" run_demo gen, "input.width(1.2, square)", "drc_width3.png" run_demo gen, "input.width(1.2, whole_edges)", "drc_width4.png" +class Gen + def produce(s1, s2) + pts = [ + RBA::Point::new(0, 0), + RBA::Point::new(2000, 0), + RBA::Point::new(2000, 2000), + RBA::Point::new(0, 2000) + ]; + s1.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(2000, 2000), + RBA::Point::new(4000, 2000), + RBA::Point::new(4000, 4000), + RBA::Point::new(2000, 4000) + ]; + s1.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new( 500, 4000), + RBA::Point::new(2500, 4000), + RBA::Point::new(2500, 6000), + RBA::Point::new( 500, 6000) + ]; + s1.insert(RBA::Polygon::new(pts)) + end +end + +gen = Gen::new + +run_demo gen, "input.width(1.0)", "drc_width5.png" +run_demo gen, "input.width(1.0, without_touching)", "drc_width6.png" + class Gen def produce(s1, s2) pts = [ @@ -381,6 +412,45 @@ run_demo gen, "input1.sep(input2, 1.0, projection,\n" + " one_side_allowed,\n" + " two_opposite_sides_allowed)", "drc_separation11.png" +class Gen + def produce(s1, s2) + pts = [ + RBA::Point::new(0, 0), + RBA::Point::new(2000, 0), + RBA::Point::new(2000, 1500), + RBA::Point::new(0, 1500) + ]; + s2.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(2000, 1500), + RBA::Point::new(3500, 1500), + RBA::Point::new(3500, 3500), + RBA::Point::new(2000, 3500) + ]; + s1.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(1000, 3500), + RBA::Point::new(3000, 3500), + RBA::Point::new(3000, 5000), + RBA::Point::new(1000, 5000) + ]; + s2.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(1000, 5500), + RBA::Point::new(3000, 5500), + RBA::Point::new(3000, 7000), + RBA::Point::new(1000, 7000) + ]; + s1.insert(RBA::Polygon::new(pts)) + end +end + +gen = Gen::new + +run_demo gen, "input1.sep(input2, 1.0)", "drc_separation12.png" +run_demo gen, "input1.sep(input2, 1.0, without_touching)", "drc_separation13.png" +run_demo gen, "input1.sep(input2, 1.0, without_coincident)", "drc_separation14.png" + # ... class Gen diff --git a/src/db/db/gsiDeclDbRegion.cc b/src/db/db/gsiDeclDbRegion.cc index 2c33ddb34..5aef1d2fc 100644 --- a/src/db/db/gsiDeclDbRegion.cc +++ b/src/db/db/gsiDeclDbRegion.cc @@ -3270,17 +3270,18 @@ gsi::Enum decl_CollinearMode ("db", "CollinearMode", ) + gsi::enum_const ("AlwaysIncludeCollinear", db::AlwaysIncludeCollinear, "@brief Specifies that check functions should always include collinear edges\n" - "With this specification, the check functions will also check edges which are collinear." + "With this specification, the check functions will also check edges which are collinear (in line). " + "This also checks edges that are not connected - i.e. do not touch." ) + gsi::enum_const ("IncludeCollinearWhenTouch", db::IncludeCollinearWhenTouch, "@brief Specifies that check functions should include collinear edges when they touch\n" "With this specification, the check functions will also check edges which are collinear, but only if they share at least one point. " - "This is the mode that allows checking the 'kissing corner' cases." + "This is the mode that includes checking the 'kissing corner' cases." ) + gsi::enum_const ("IncludeCollinearWhenOverlap", db::IncludeCollinearWhenOverlap, "@brief Specifies that check functions should include collinear edges when they overlap\n" "With this specification, the check functions will also check edges which are collinear, but only if they share more than a single point. " - "This is the mode that allows checking the 'kissing corner' cases." + "This is the mode that excludes the 'kissing corner' cases." ), "@brief This class represents the collinear_mode type for \\Region#width and related checks.\n" "This mode determines how collinear edges are treated in the DRC checks. Formally these edges do neither represent " diff --git a/src/doc/doc/about/drc_ref_layer.xml b/src/doc/doc/about/drc_ref_layer.xml index 2e5e6b2b9..6a349c45b 100644 --- a/src/doc/doc/about/drc_ref_layer.xml +++ b/src/doc/doc/about/drc_ref_layer.xml @@ -2894,7 +2894,45 @@ The following image shows the effect of the separation check (input1: red, input

-

opposite and rectangle error filtering

+

Touching shapes

+

+Like width and space, the separation check also supports the "without_touching" option. +

+This option will turn off errors that arise due to +collinear edges touching in one corner (the "kissing corners" configuration). +By default, such edges will yield an error, as they +form a zero-distance situation. With this option in place, no errors will be reported. +

+The following images illustrate the effect of the "without_touching" option. +The white line at the top of the bottom red shape is actually an edge pair indicating +the zero-distance violation of the separation check: +

+ + + + + +
+

+Another option is "without_coincident" which turns off errors that arise +at coincident edges. Formally such edges represent a zero-distance situation, hence +are flagged by default. Turning off the check in this case can be helpful when +separating a layer into two parts (e.g. thin/wide metal separation) and an error +between touching regions is not desired. +

+The "without_coincident" option is a stronger version of "without_touching" and +makes sense only for two-layer checks. +

+The following images illustrate the effect of the "without_coincident" option: +

+ + + + + +
+

+

Opposite and rectangle error filtering

The options for the separation check are those available for the width or space method plus opposite and rectangle error filtering. @@ -3405,10 +3443,15 @@ each other is more or equal than min and less than max but is more intuitive, as "projecting" is written with a condition, like "projecting < 2.um". Available operators are: "==", "<", "<=", ">" and ">=". Double-bounded ranges are also available, like: "0.5 <= projecting < 2.0". -

  • transparent : performs the check without shielding (polygon layers only)
  • -
  • shielded : performs the check with shielding (polygon layers only)
  • +
  • without_touching : With this option present, touching corners (aka "kissing +corners") will not yield errors. The default is to produce errors in these cases.
  • +
  • without_coincident : With this option present, coincident edges will not yield errors. +This is a stronger version of "without_touching" and makes sense only for two-layer checks +or raw-mode input layers. It is listed here for completeness.
  • +
  • transparent : Performs the check without shielding (polygon layers only)
  • +
  • shielded : Performs the check with shielding (polygon layers only)
  • props_eq , props_ne , props_copy : (only props_copy applies to width check) - -see "Properties constraints" below.
  • +See "Properties constraints" below.

    Note that without the angle_limit, acute corners will always be reported, since two @@ -3509,6 +3552,22 @@ shape's properties to the output too: space_not_connected = metal1_nets.space(0.4.um, props_ne + props_copy) space_connected = metal1_nets.space(0.4.um, props_eq + props_copy) +

    +

    Touching shapes

    +

    +The "without_touching" option will turn off errors that arise due to +the "kissing corner" configuration (or "checkerboard pattern"). Formally +this is a width violation across the diagonal, but when considering this +configuration as disconnected boxes, no error should be reported. +

    +The following images illustrate the effect of the "without_touching" option: +

    + + + + + +

    "with_angle" - Selects edges by their angle

    diff --git a/src/doc/doc/images/drc_separation12.png b/src/doc/doc/images/drc_separation12.png new file mode 100644 index 000000000..70847f791 Binary files /dev/null and b/src/doc/doc/images/drc_separation12.png differ diff --git a/src/doc/doc/images/drc_separation13.png b/src/doc/doc/images/drc_separation13.png new file mode 100644 index 000000000..0a18eac50 Binary files /dev/null and b/src/doc/doc/images/drc_separation13.png differ diff --git a/src/doc/doc/images/drc_separation14.png b/src/doc/doc/images/drc_separation14.png new file mode 100644 index 000000000..e6812a656 Binary files /dev/null and b/src/doc/doc/images/drc_separation14.png differ diff --git a/src/doc/doc/images/drc_width5.png b/src/doc/doc/images/drc_width5.png new file mode 100644 index 000000000..9bb781814 Binary files /dev/null and b/src/doc/doc/images/drc_width5.png differ diff --git a/src/doc/doc/images/drc_width6.png b/src/doc/doc/images/drc_width6.png new file mode 100644 index 000000000..030ec7c39 Binary files /dev/null and b/src/doc/doc/images/drc_width6.png differ diff --git a/src/doc/docDRCLVSResources.qrc b/src/doc/docDRCLVSResources.qrc index e91766fe5..e4449b7ed 100644 --- a/src/doc/docDRCLVSResources.qrc +++ b/src/doc/docDRCLVSResources.qrc @@ -4,6 +4,8 @@ doc/images/drc_width2.png doc/images/drc_width3.png doc/images/drc_width4.png + doc/images/drc_width5.png + doc/images/drc_width6.png doc/images/drc_width1u.png doc/images/drc_width2u.png doc/images/drc_width3u.png @@ -29,6 +31,9 @@ doc/images/drc_separation9.png doc/images/drc_separation10.png doc/images/drc_separation11.png + doc/images/drc_separation12.png + doc/images/drc_separation13.png + doc/images/drc_separation14.png doc/images/drc_raw1.png doc/images/drc_raw2.png doc/images/drc_raw3.png diff --git a/src/drc/drc/built-in-macros/_drc_layer.rb b/src/drc/drc/built-in-macros/_drc_layer.rb index 3fa5c0bf2..bf0af2d20 100644 --- a/src/drc/drc/built-in-macros/_drc_layer.rb +++ b/src/drc/drc/built-in-macros/_drc_layer.rb @@ -3941,7 +3941,9 @@ CODE # By default, such edges will yield an error, as they # form a zero-distance situation. With this option in place, no errors will be reported. # - # The following images illustrate the effect of the "without_touching" option: + # The following images illustrate the effect of the "without_touching" option. + # The white line at the top of the bottom red shape is actually an edge pair indicating + # the zero-distance violation of the separation check: # # @table # @tr @@ -3963,8 +3965,8 @@ CODE # # @table # @tr + # @td @img(/images/drc_separation12.png) @/td # @td @img(/images/drc_separation14.png) @/td - # @td @img(/images/drc_separation15.png) @/td # @/tr # @/table #