DRC: doc updates

This commit is contained in:
Matthias Koefferlein 2023-05-28 21:57:40 +02:00
parent 2882fa42ee
commit a582eabc22
3 changed files with 148 additions and 47 deletions

View File

@ -1182,6 +1182,36 @@ See <a href="/about/drc_ref_netter.xml#netlist">Netter#netlist</a> for a descrip
<p>
See <a href="/about/drc_ref_netter.xml">Netter</a> for more details
</p>
<a name="new_report"/><h2>"new_report" - Creates a new report database object for use in "output"</h2>
<keyword name="new_report"/>
<p>Usage:</p>
<ul>
<li><tt>new_report(description [, filename [, cellname ] ])</tt></li>
</ul>
<p>
This method creates an independent report object. This object
can be used in "output" to send a layer to a different report than
the default report or target.
</p><p>
Arguments are the same than for <a href="/about/drc_ref_global.xml#report">report</a>.
</p><p>
See <a href="/about/drc_ref_layer.xml#output">Layer#output</a> for details about this feature.
</p>
<a name="new_target"/><h2>"new_target" - Creates a new layout target object for use in "output"</h2>
<keyword name="new_target"/>
<p>Usage:</p>
<ul>
<li><tt>new_target(what [, cellname])</tt></li>
</ul>
<p>
This method creates an independent target object. This object
can be used in "output" to send a layer to a different layout file than
the default report or target.
</p><p>
Arguments are the same than for <a href="/about/drc_ref_global.xml#target">target</a>.
</p><p>
See <a href="/about/drc_ref_layer.xml#output">Layer#output</a> for details about this feature.
</p>
<a name="no_borders"/><h2>"no_borders" - Reset the tile borders</h2>
<keyword name="no_borders"/>
<p>Usage:</p>
@ -1413,6 +1443,21 @@ See <a href="/about/drc_ref_source.xml#polygons">Source#polygons</a> for a descr
The primary input of the universal DRC function is the layer the <a href="/about/drc_ref_layer.xml#drc">Layer#drc</a> function
is called on.
</p>
<a name="profile"/><h2>"profile" - Profiles the script and provides a runtime + memory statistics</h2>
<keyword name="profile"/>
<p>Usage:</p>
<ul>
<li><tt>profile</tt></li>
<li><tt>profile(n)</tt></li>
</ul>
<p>
Turns profiling on or off (default). In profiling mode, the
system will collect statistics about rules executed, their execution time
and memory information. The argument specifies how many operations to
print at the end of the run. Without an argument, all operations are
printed. Passing "false" for the argument will disable profiling. This is the
default.
</p>
<a name="props_copy"/><h2>"props_copy" - Specifies "copy properties" on operations supporting user properties constraints</h2>
<keyword name="props_copy"/>
<p>

View File

@ -2217,6 +2217,26 @@ a single <class_doc href="LayerInfo">LayerInfo</class_doc> object.
</p><p>
See <a href="/about/drc_ref_global.xml#report">report</a> and <a href="/about/drc_ref_global.xml#target">target</a> on how to configure output to a target layout
or report database.
</p><p>
See also <a href="/about/drc_ref_global.xml#new_target">new_target</a> and <a href="/about/drc_ref_global.xml#new_report">new_report</a> on how to create additional
targets for output. This allows saving certain layers to different files than
the standard target or report. To do so, create a new target or report using one
of these functions and pass that object to the corresponding "output" call as
an additional argument.
</p><p>
Example:
</p><p>
<pre>
check1 = ...
check2 = ...
check3 = ...
second_report = new_report("Only for check2", "check2.lyrdb")
check1.output("Check 1")
check2.output("Check 2", second_report)
check3.output("Check 3")
</pre>
</p>
<a name="outside"/><h2>"outside" - Selects edges or polygons of self which are outside edges or polygons from the other layer</h2>
<keyword name="outside"/>

View File

@ -185,7 +185,7 @@ l.output("OUT")
l.output(17, 0, "OUT")</pre>
<p>
Output can be sent to other layouts using the "target" function:
Output can be sent to other layouts using the <a href="/about/drc_ref_global.xml#target">target</a> function:
</p>
<pre>
@ -196,7 +196,7 @@ target("@2")
target("out.gds", "OUT_TOP")</pre>
<p>
Output can also be sent to a report database:
Output can also be sent to a report database using the <a href="/about/drc_ref_global.xml#report">report</a> function:
</p>
<pre>
@ -234,6 +234,38 @@ l.output("check1", "The first check")</pre>
unpredictable.
</p>
<p>
It is possible to open "side" reports and targets and send layers to these
outputs without closing the default output.
</p>
<p>
To open a "side report", use <a href="/about/drc_ref_global.xml#new_report">new_report</a>
in the same way you use "report". Instead of switching the output, this function will return a
new report object that can be included in the argument list of "output"
for the layer that is to be sent to that side report:
</p>
<pre>
# opens a new side report
side_report = new_report("Another report")
...
# Send data from layer l to new category "check1" to the side report
l.output(side_report, "check1", "The first check")</pre>
<p>
In the same way, "side targets" can be opened using <a href="/about/drc_ref_global.xml#new_target">new_target</a>.
Such side targets open a way to write certain layers to other layout files.
This is very handy for debugging:
</p>
<pre>
# opens a new side target for debugging
debug_out = new_target("debug.gds")
...
# Send data from layer l to the debug output, layer 100/0
l.output(debug_out, 100, 0)</pre>
<h2>Dimension specifications</h2>
@ -710,12 +742,12 @@ overlaps = layer.size(0.2).raw.merged(2)</pre>
</p>
<pre>
layer = input(1, 0)
layer.raw.sized(0.1).output(100, 0)
layer = input(1, 0)
layer.raw.sized(0.1).output(100, 0)
# this check will now be done on a raw layer, since the
# previous raw call was putting the layer into raw mode
layer.width(0.2).ouput(101, 0)</pre>
# this check will now be done on a raw layer, since the
# previous raw call was putting the layer into raw mode
layer.width(0.2).ouput(101, 0)</pre>
<p>
The following two images show the effect of raw and clean mode:
@ -792,20 +824,18 @@ overlaps = layer.size(0.2).raw.merged(2)</pre>
</p>
<pre>
...
drc_w = input(1, 0).width(0.2)
...
</pre>
...
drc_w = input(1, 0).width(0.2)
...</pre>
<p>
can be written as:
</p>
<pre>
...
drc_w = input(1, 0).drc(width &lt; 0.2)
...
</pre>
...
drc_w = input(1, 0).drc(width &lt; 0.2)
...</pre>
<p>
The <a href="/about/drc_ref_layer.xml#drc">drc</a> method is the "universal DRC" method.
@ -845,12 +875,11 @@ overlaps = layer.size(0.2).raw.merged(2)</pre>
</p>
<pre>
...
l1 = input(1, 0)
l2 = input(2, 0)
drc_sep = l1.drc(separation(l2) &lt;= 0.5)
...
</pre>
...
l1 = input(1, 0)
l2 = input(2, 0)
drc_sep = l1.drc(separation(l2) &lt;= 0.5)
...</pre>
<p>
Options are also specified together with the measurement and follow the same notation
@ -858,10 +887,9 @@ overlaps = layer.size(0.2).raw.merged(2)</pre>
</p>
<pre>
...
drc_w = input(1, 0).drc(width(projection) &lt; 0.2)
...
</pre>
...
drc_w = input(1, 0).drc(width(projection) &lt; 0.2)
...</pre>
<p>
However, the universal DRC is much more than a convenient way to write checks:
@ -879,10 +907,9 @@ overlaps = layer.size(0.2).raw.merged(2)</pre>
</p>
<pre>
...
drc_ws = input(1, 0).drc((width &lt; 0.2) &amp; (space &lt; 0.3))
...
</pre>
...
drc_ws = input(1, 0).drc((width &lt; 0.2) &amp; (space &lt; 0.3))
...</pre>
<p>
The boolean AND is computed between the edges on the primary shape and returns the
@ -891,12 +918,11 @@ overlaps = layer.size(0.2).raw.merged(2)</pre>
</p>
<pre>
...
drc_ws1 = input(1, 0).width(0.2).edges
drc_ws2 = input(1, 0).space(0.3).edges
drc_ws = drc_ws1 &amp; drc_ws2
...
</pre>
...
drc_ws1 = input(1, 0).width(0.2).edges
drc_ws2 = input(1, 0).space(0.3).edges
drc_ws = drc_ws1 &amp; drc_ws2
...</pre>
<p>
The reason is that performing the boolean computation in the local loop can be
@ -933,11 +959,10 @@ overlaps = layer.size(0.2).raw.merged(2)</pre>
</p>
<pre>
...
drc_w = input(1, 0).width(0.2)
log("Number of width violations: #{drc_w.data.size}")
...
</pre>
...
drc_w = input(1, 0).width(0.2)
log("Number of width violations: #{drc_w.data.size}")
...</pre>
<p>
The <a href="/about/drc_ref_global.xml#error">error</a> function can be used to output error messages
@ -946,11 +971,23 @@ overlaps = layer.size(0.2).raw.merged(2)</pre>
</p>
<pre>
log_file("drc_log.txt")
verbose(true)
info("This message will be sent to the log file")
...
</pre>
log_file("drc_log.txt")
verbose(true)
info("This message will be sent to the log file")
...</pre>
<p>
The <a href="/about/drc_ref_global.xml#profile">profile</a> function will collect profiling
information during the DRC run. At the end of the script, the operations are printed to the log
output, sorted by their CPU time and approximate memory footprint. "profile" can be given a
numerical argument indicating the number of operations to print. Lower-ranking operations are
skipped in that case. By default, all operations are printed.
</p>
<pre>
# enables profiling
profile
...</pre>
<h2>The tiling option</h2>
@ -1003,8 +1040,7 @@ threads(4)
# Disable tiling
flat
... non-tiled operations ...
</pre>
... non-tiled operations ...</pre>
<p>
Some operations implicitly specify a tile border. If the tile border is known (see length example above), explicit borders