Skip to content

Commit

Permalink
Stepwise sizing: had to rename options
Browse files Browse the repository at this point in the history
"inside" and "outside" was already taken. Now it is called
"size_inside" and "size_outside".
  • Loading branch information
Matthias Koefferlein committed Jul 2, 2024
1 parent 68530f0 commit 264f1e0
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 50 deletions.
8 changes: 4 additions & 4 deletions scripts/drc_lvs_doc/create_drc_samples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -939,10 +939,10 @@ def produce(s1, s2)

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"
run_demo gen, "input1.sized(1.um, steps(1), size_inside(input2))", "drc_sized_inside1.png"
run_demo gen, "input1.sized(2.um, steps(2), size_inside(input2))", "drc_sized_inside2.png"
run_demo gen, "input1.sized(3.um, steps(3), size_inside(input2))", "drc_sized_inside3.png"
run_demo gen, "input1.sized(10.um, steps(10), size_inside(input2))", "drc_sized_inside4.png"

class Gen
def produce(s1, s2)
Expand Down
34 changes: 17 additions & 17 deletions src/doc/doc/about/drc_ref_layer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3056,11 +3056,11 @@ The following images shows the effect of some rectangle filter modes:
<p>Usage:</p>
<ul>
<li><tt>layer.size(d [, mode])</tt></li>
<li><tt>layer.size(d, inside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.size(d, outside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.size(d, size_inside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.size(d, size_outside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.size(dx, dy [, mode])</tt></li>
<li><tt>layer.size(dx, dy, inside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.size(dx, dy, outside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.size(dx, dy, size_inside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.size(dx, dy, size_outside(l) [, steps(n)] [, mode])</tt></li>
</ul>
<p>
See <a href="#sized">sized</a> for a description of the options.
Expand All @@ -3071,12 +3071,12 @@ it is called on. The input layer is returned and available for further processin
<keyword name="sized"/>
<p>Usage:</p>
<ul>
<li><tt>layer.sized(d [, mode] [, inside(l) [, steps(n)]])</tt></li>
<li><tt>layer.sized(d, inside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.sized(d, outside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.sized(d [, mode] [, size_inside(l) [, steps(n)]])</tt></li>
<li><tt>layer.sized(d, size_inside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.sized(d, size_outside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.sized(dx, dy [, mode])</tt></li>
<li><tt>layer.sized(dx, dy, inside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.sized(dx, dy, outside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.sized(dx, dy, size_inside(l) [, steps(n)] [, mode])</tt></li>
<li><tt>layer.sized(dx, dy, size_outside(l) [, steps(n)] [, mode])</tt></li>
</ul>
<p>
This method requires a polygon layer. It will apply a bias per edge of the polygons
Expand Down Expand Up @@ -3128,32 +3128,32 @@ The following images show the effect of various forms of the "sized" method:
</tr>
</table>
</p><p>
The "inside" option and the "steps" option implement incremental size. Incremental
The "size_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.
shape is confined to the "size_inside" layer by means of a boolean "AND" operation.
</p><p>
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
be close to a well tap. By using the well layer as the "size_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.
</p><p>
"inside" and "steps" can be used with positive sizing values only.
"size_inside" and "steps" can be used with positive sizing values only.
A steps value of 0 will not execute any sizing at all.
</p><p>
"outside" acts like "inside", but instead of confining the sized region to the
"size_outside" acts like "size_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".
</p><p>
An example for the "inside" option is this:
An example for the "size_inside" option is this:
</p><p>
<pre>
ntap.sized(30.um, inside(nwell), steps(100))
ntap.sized(30.um, size_inside(nwell), steps(100))
</pre>
</p><p>
The effect of the "inside" option is shown here:
The effect of the "size_inside" option is shown here:
</p><p>
<table>
<tr>
Expand Down
8 changes: 8 additions & 0 deletions src/doc/doc/about/drc_ref_netter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ the netter object.
<p>Usage:</p>
<ul>
<li><tt>name(layer, name)</tt></li>
<li><tt>name(layer, name, layer_number, datatype_number)</tt></li>
<li><tt>name(layer, name, layer_info)</tt></li>
</ul>
<p>
Layer names are listed in the LayoutToNetlist (L2N) or LVS database. They
Expand Down Expand Up @@ -455,6 +457,12 @@ first time.
</p><p>
<a href="#name">name</a> can only be used once on a layer and the layer names must be
unique (not taken by another layer).
</p><p>
The layer/datatype or LayerInfo specification is optional and will
be used to configure the internal layout. This information is also
persisted inside database files. Specifying a layer/datatype information
is useful, if a layer is not an original layer, but is to be restored
to an actual layout layer later.
</p>
<a name="name_prefix"/><h2>"name_prefix" - Specifies the name prefix for auto-generated layer names</h2>
<keyword name="name_prefix"/>
Expand Down
Binary file modified src/doc/doc/images/drc_sized_inside1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/doc/doc/images/drc_sized_inside2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/doc/doc/images/drc_sized_inside3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/doc/doc/images/drc_sized_inside4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/drc/drc/built-in-macros/_drc_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ def steps(arg)
DRCSizingSteps::new(arg)
end

def inside(arg)
def size_inside(arg)
DRCSizingInside::new(arg)
end

def outside(arg)
def size_outside(arg)
DRCSizingOutside::new(arg)
end

Expand Down
34 changes: 17 additions & 17 deletions src/drc/drc/built-in-macros/_drc_layer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4678,12 +4678,12 @@ def rotate(a)
# %DRC%
# @name sized
# @brief Polygon sizing (per-edge biasing)
# @synopsis layer.sized(d [, mode] [, inside(l) [, steps(n)]])
# @synopsis layer.sized(d, inside(l) [, steps(n)] [, mode])
# @synopsis layer.sized(d, outside(l) [, steps(n)] [, mode])
# @synopsis layer.sized(d [, mode] [, size_inside(l) [, steps(n)]])
# @synopsis layer.sized(d, size_inside(l) [, steps(n)] [, mode])
# @synopsis layer.sized(d, size_outside(l) [, steps(n)] [, mode])
# @synopsis layer.sized(dx, dy [, mode])
# @synopsis layer.sized(dx, dy, inside(l) [, steps(n)] [, mode])
# @synopsis layer.sized(dx, dy, outside(l) [, steps(n)] [, mode])
# @synopsis layer.sized(dx, dy, size_inside(l) [, steps(n)] [, mode])
# @synopsis layer.sized(dx, dy, size_outside(l) [, steps(n)] [, mode])
#
# 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.
Expand Down Expand Up @@ -4734,32 +4734,32 @@ def rotate(a)
# @/tr
# @/table
#
# The "inside" option and the "steps" option implement incremental size. Incremental
# The "size_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.
# shape is confined to the "size_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
# be close to a well tap. By using the well layer as the "size_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.
# "size_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
# "size_outside" acts like "size_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:
# An example for the "size_inside" option is this:
#
# @code
# ntap.sized(30.um, inside(nwell), steps(100))
# ntap.sized(30.um, size_inside(nwell), steps(100))
# @/code
#
# The effect of the "inside" option is shown here:
# The effect of the "size_inside" option is shown here:
#
# @table
# @tr
Expand All @@ -4777,11 +4777,11 @@ def rotate(a)
# @name size
# @brief Polygon sizing (per-edge biasing, modifies the layer)
# @synopsis layer.size(d [, mode])
# @synopsis layer.size(d, inside(l) [, steps(n)] [, mode])
# @synopsis layer.size(d, outside(l) [, steps(n)] [, mode])
# @synopsis layer.size(d, size_inside(l) [, steps(n)] [, mode])
# @synopsis layer.size(d, size_outside(l) [, steps(n)] [, mode])
# @synopsis layer.size(dx, dy [, mode])
# @synopsis layer.size(dx, dy, inside(l) [, steps(n)] [, mode])
# @synopsis layer.size(dx, dy, outside(l) [, steps(n)] [, mode])
# @synopsis layer.size(dx, dy, size_inside(l) [, steps(n)] [, mode])
# @synopsis layer.size(dx, dy, size_outside(l) [, steps(n)] [, mode])
#
# See \sized for a description of the options.
# The size method basically does the same but modifies the layer
Expand Down
20 changes: 10 additions & 10 deletions testdata/drc/drcSimpleTests_130.drc
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ l2 = input(2, 0)
l1.output(1, 0)
l2.output(2, 0)

l1.sized(0.0, steps(50), inside(l2)).output(100, 0)
l1.sized(20.0, steps(0), inside(l2)).output(101, 0)
l1.sized(0.0, steps(50), size_inside(l2)).output(100, 0)
l1.sized(20.0, steps(0), size_inside(l2)).output(101, 0)

l1.sized(20.0, steps(50), inside(l2)).output(110, 0)
l1.sized(50.0, steps(50), outside(l2)).output(111, 0)
l1.sized(20.0, steps(50), size_inside(l2)).output(110, 0)
l1.sized(50.0, steps(50), size_outside(l2)).output(111, 0)

l1d = l1.dup
l1d.size(20.0, steps(50), inside(l2))
l1d.size(20.0, steps(50), size_inside(l2))
l1d.output(120, 0)

l1d = l1.dup
l1d.size(50.0, steps(50), outside(l2))
l1d.size(50.0, steps(50), size_outside(l2))
l1d.output(121, 0)

l1.sized(10.0, 20.0, steps(50), inside(l2)).output(130, 0)
l1.sized(25.0, 50.0, steps(50), outside(l2)).output(131, 0)
l1.sized(10.0, 20.0, steps(50), size_inside(l2)).output(130, 0)
l1.sized(25.0, 50.0, steps(50), size_outside(l2)).output(131, 0)

error = nil
begin
l2.sized(-1.0, steps(50), outside(l2))
l2.sized(-1.0, steps(50), size_outside(l2))
rescue
error = true
end
Expand All @@ -41,7 +41,7 @@ end

error = nil
begin
l2.sized(-1.0, 2.0, steps(50), outside(l2))
l2.sized(-1.0, 2.0, steps(50), size_outside(l2))
rescue
error = true
end
Expand Down

0 comments on commit 264f1e0

Please sign in to comment.