diff --git a/scripts/drc_lvs_doc/create_drc_samples.rb b/scripts/drc_lvs_doc/create_drc_samples.rb index 2799b88e1..5a9c1c332 100644 --- a/scripts/drc_lvs_doc/create_drc_samples.rb +++ b/scripts/drc_lvs_doc/create_drc_samples.rb @@ -914,6 +914,36 @@ run_demo gen, "input.sized(1.um, octagon_limit)", "drc_sized4.png" run_demo gen, "input.sized(1.um, square_limit)", "drc_sized5.png" run_demo gen, "input.sized(1.um, acute_limit)", "drc_sized6.png" +class Gen + def produce(s1, s2) + pts = [ + RBA::Point::new(1000, 1000), + RBA::Point::new(1000, 2000), + RBA::Point::new(2000, 2000), + RBA::Point::new(2000, 1000) + ]; + s1.insert(RBA::Polygon::new(pts)) + pts = [ + RBA::Point::new(1000, 1000), + RBA::Point::new(1000, 7000), + RBA::Point::new(6000, 7000), + RBA::Point::new(6000, 1000), + RBA::Point::new(5000, 1000), + RBA::Point::new(5000, 6000), + RBA::Point::new(2000, 6000), + RBA::Point::new(2000, 1000) + ]; + s2.insert(RBA::Polygon::new(pts)) + end +end + +gen = Gen::new + +run_demo gen, "input1.sized(1.um, steps(1), inside(input2))", "drc_sized_inside1.png" +run_demo gen, "input1.sized(2.um, steps(2), inside(input2))", "drc_sized_inside2.png" +run_demo gen, "input1.sized(3.um, steps(3), inside(input2))", "drc_sized_inside3.png" +run_demo gen, "input1.sized(10.um, steps(10), inside(input2))", "drc_sized_inside4.png" + class Gen def produce(s1, s2) pts = [ diff --git a/src/doc/doc/about/drc_ref_layer.xml b/src/doc/doc/about/drc_ref_layer.xml index 9dd40b6ca..7b03a95e1 100644 --- a/src/doc/doc/about/drc_ref_layer.xml +++ b/src/doc/doc/about/drc_ref_layer.xml @@ -3056,18 +3056,27 @@ The following images shows the effect of some rectangle filter modes:

Usage:

-See sized. The size method basically does the same but modifies the layer +See sized for a description of the options. +The size method basically does the same but modifies the layer it is called on. The input layer is returned and available for further processing.

"sized" - Polygon sizing (per-edge biasing)

Usage:

This method requires a polygon layer. It will apply a bias per edge of the polygons @@ -3100,6 +3109,30 @@ layer.sized(300.nm).raw.merged(2) Bias 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.

+The "inside" option and the "steps" option implement incremental size. Incremental +size means that the sizing value is applied in n steps. Between the steps, the sized +shape is confined to the "inside" layer by means of a boolean "AND" operation. +

+This scheme is used to implement latch-up rules where a device active region has to +be close to a well tap. By using the well layer as the "inside" layer, the size function +follows the well contours. The steps have to selected such that the per-step size value +is smaller than the minimum space of the well shapes. With that, the sized shapes will +not cross over to neighbor well regions. Specifically, the per-step size has to be less +than about 70% of the minimum space to account for the minimum corner-to-corner case +with Euclidian space measurements. +

+"inside" and "steps" can be used with positive sizing values only. +

+"outside" acts like "inside", but instead of confining the sized region to the +inside of the given layer, it is confined to be outside of that layer. Technically, +a boolean "NOT" is performed instead of a boolean "AND". +

+An example for the "inside" option is this: +

+

+ntap.sized(30.um, inside(nwell), steps(100))
+
+

size is working like sized but modifies the layer it is called on.

The following images show the effect of various forms of the "sized" method: @@ -3118,6 +3151,19 @@ The following images show the effect of various forms of the "sized" method: +

+The effect of the "inside" option is shown here: +

+ + + + + + + + + +

"smoothed" - Smoothes the polygons of the region

diff --git a/src/doc/doc/images/drc_sized_inside1.png b/src/doc/doc/images/drc_sized_inside1.png new file mode 100644 index 000000000..e013d4407 Binary files /dev/null and b/src/doc/doc/images/drc_sized_inside1.png differ diff --git a/src/doc/doc/images/drc_sized_inside2.png b/src/doc/doc/images/drc_sized_inside2.png new file mode 100644 index 000000000..4600f454a Binary files /dev/null and b/src/doc/doc/images/drc_sized_inside2.png differ diff --git a/src/doc/doc/images/drc_sized_inside3.png b/src/doc/doc/images/drc_sized_inside3.png new file mode 100644 index 000000000..d1e5cb5bb Binary files /dev/null and b/src/doc/doc/images/drc_sized_inside3.png differ diff --git a/src/doc/doc/images/drc_sized_inside4.png b/src/doc/doc/images/drc_sized_inside4.png new file mode 100644 index 000000000..d7f82284e Binary files /dev/null and b/src/doc/doc/images/drc_sized_inside4.png differ diff --git a/src/doc/docDRCLVSResources.qrc b/src/doc/docDRCLVSResources.qrc index 905f12d19..8aa37dbed 100644 --- a/src/doc/docDRCLVSResources.qrc +++ b/src/doc/docDRCLVSResources.qrc @@ -125,6 +125,10 @@ doc/images/drc_sized4.png doc/images/drc_sized5.png doc/images/drc_sized6.png + doc/images/drc_sized_inside1.png + doc/images/drc_sized_inside2.png + doc/images/drc_sized_inside3.png + doc/images/drc_sized_inside4.png doc/images/drc_with_angle1.png doc/images/drc_with_angle2.png doc/images/drc_with_angle3.png diff --git a/src/drc/drc/built-in-macros/_drc_layer.rb b/src/drc/drc/built-in-macros/_drc_layer.rb index 71cb01ccb..3887691a6 100644 --- a/src/drc/drc/built-in-macros/_drc_layer.rb +++ b/src/drc/drc/built-in-macros/_drc_layer.rb @@ -4688,6 +4688,8 @@ TP_SCRIPT # This method requires a polygon layer. It will apply a bias per edge of the polygons # and return the biased layer. The layer that this method is called on is not modified. # + # The alternative method \size works like \sized but modifies the layer it is called on. + # # In the single-value form, that bias is applied both in horizontal or vertical direction. # In the two-value form, the horizontal and vertical bias can be specified separately. # @@ -4715,32 +4717,6 @@ TP_SCRIPT # Bias 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. # - # The "inside" option and the "steps" option implement incremental size. Incremental - # size means that the sizing value is applied in n steps. Between the steps, the sized - # shape is confined to the "inside" layer by means of a boolean "AND" operation. - # - # This scheme is used to implement latch-up rules where a device active region has to - # be close to a well tap. By using the well layer as the "inside" layer, the size function - # follows the well contours. The steps have to selected such that the per-step size value - # is smaller than the minimum space of the well shapes. With that, the sized shapes will - # not cross over to neighbor well regions. Specifically, the per-step size has to be less - # than about 70% of the minimum space to account for the minimum corner-to-corner case - # with Euclidian space measurements. - # - # "inside" and "steps" can be used with positive sizing values only. - # - # "outside" acts like "inside", but instead of confining the sized region to the - # inside of the given layer, it is confined to be outside of that layer. Technically, - # a boolean "NOT" is performed instead of a boolean "AND". - # - # An example for the "inside" option is this: - # - # @code - # ntap.sized(30.um, inside(nwell), steps(100)) - # @/code - # - # \size is working like \sized but modifies the layer it is called on. - # # The following images show the effect of various forms of the "sized" method: # # @table @@ -4757,6 +4733,45 @@ TP_SCRIPT # @td @img(/images/drc_sized6.png) @/td # @/tr # @/table + # + # The "inside" option and the "steps" option implement incremental size. Incremental + # size means that the sizing value is applied in n steps. Between the steps, the sized + # shape is confined to the "inside" layer by means of a boolean "AND" operation. + # + # This scheme is used to implement latch-up rules where a device active region has to + # be close to a well tap. By using the well layer as the "inside" layer, the size function + # follows the well contours. The steps have to selected such that the per-step size value + # is smaller than the minimum space of the well shapes. With that, the sized shapes will + # not cross over to neighbor well regions. Specifically, the per-step size has to be less + # than about 70% of the minimum space to account for the minimum corner-to-corner case + # with Euclidian space measurements. + # + # "inside" and "steps" can be used with positive sizing values only. + # A steps value of 0 will not execute any sizing at all. + # + # "outside" acts like "inside", but instead of confining the sized region to the + # inside of the given layer, it is confined to be outside of that layer. Technically, + # a boolean "NOT" is performed instead of a boolean "AND". + # + # An example for the "inside" option is this: + # + # @code + # ntap.sized(30.um, inside(nwell), steps(100)) + # @/code + # + # The effect of the "inside" option is shown here: + # + # @table + # @tr + # @td @img(/images/drc_sized_inside1.png) @/td + # @td @img(/images/drc_sized_inside2.png) @/td + # @/tr + # @tr + # @td @img(/images/drc_sized_inside3.png) @/td + # @td @img(/images/drc_sized_inside4.png) @/td + # @/tr + # @/table + # # %DRC% # @name size