From a582eabc22b9cda2b5aaee7fad7624c782aa0b88 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 28 May 2023 21:57:40 +0200 Subject: [PATCH] DRC: doc updates --- src/doc/doc/about/drc_ref_global.xml | 45 ++++++++++ src/doc/doc/about/drc_ref_layer.xml | 20 +++++ src/doc/doc/manual/drc_runsets.xml | 130 +++++++++++++++++---------- 3 files changed, 148 insertions(+), 47 deletions(-) diff --git a/src/doc/doc/about/drc_ref_global.xml b/src/doc/doc/about/drc_ref_global.xml index 91fa1a06e..3deac6889 100644 --- a/src/doc/doc/about/drc_ref_global.xml +++ b/src/doc/doc/about/drc_ref_global.xml @@ -1182,6 +1182,36 @@ See Netter#netlist for a descrip

See Netter for more details

+

"new_report" - Creates a new report database object for use in "output"

+ +

Usage:

+
    +
  • new_report(description [, filename [, cellname ] ])
  • +
+

+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. +

+Arguments are the same than for report. +

+See Layer#output for details about this feature. +

+

"new_target" - Creates a new layout target object for use in "output"

+ +

Usage:

+
    +
  • new_target(what [, cellname])
  • +
+

+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. +

+Arguments are the same than for target. +

+See Layer#output for details about this feature. +

"no_borders" - Reset the tile borders

Usage:

@@ -1413,6 +1443,21 @@ See
Source#polygons for a descr The primary input of the universal DRC function is the layer the Layer#drc function is called on.

+

"profile" - Profiles the script and provides a runtime + memory statistics

+ +

Usage:

+
    +
  • profile
  • +
  • profile(n)
  • +
+

+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. +

"props_copy" - Specifies "copy properties" on operations supporting user properties constraints

diff --git a/src/doc/doc/about/drc_ref_layer.xml b/src/doc/doc/about/drc_ref_layer.xml index 4dbd218fa..6efff2012 100644 --- a/src/doc/doc/about/drc_ref_layer.xml +++ b/src/doc/doc/about/drc_ref_layer.xml @@ -2217,6 +2217,26 @@ a single LayerInfo object.

See report and target on how to configure output to a target layout or report database. +

+See also new_target and new_report 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. +

+Example: +

+

+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")
+

"outside" - Selects edges or polygons of self which are outside edges or polygons from the other layer

diff --git a/src/doc/doc/manual/drc_runsets.xml b/src/doc/doc/manual/drc_runsets.xml index 971bf9b79..7642c4c16 100644 --- a/src/doc/doc/manual/drc_runsets.xml +++ b/src/doc/doc/manual/drc_runsets.xml @@ -185,7 +185,7 @@ l.output("OUT") l.output(17, 0, "OUT")

- Output can be sent to other layouts using the "target" function: + Output can be sent to other layouts using the target function:

@@ -196,7 +196,7 @@ target("@2")
 target("out.gds", "OUT_TOP")

- Output can also be sent to a report database: + Output can also be sent to a report database using the report function:

@@ -234,6 +234,38 @@ l.output("check1", "The first check")
unpredictable.

+

+ It is possible to open "side" reports and targets and send layers to these + outputs without closing the default output. +

+ +

+ To open a "side report", use new_report + 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: +

+ +
+# 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")
+ +

+ In the same way, "side targets" can be opened using new_target. + Such side targets open a way to write certain layers to other layout files. + This is very handy for debugging: +

+ +
+# 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)
+

Dimension specifications

@@ -710,12 +742,12 @@ overlaps = layer.size(0.2).raw.merged(2)

-  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)
+# 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)

The following two images show the effect of raw and clean mode: @@ -792,20 +824,18 @@ overlaps = layer.size(0.2).raw.merged(2)

-  ...
-  drc_w = input(1, 0).width(0.2)
-  ...
-  
+... +drc_w = input(1, 0).width(0.2) +...

can be written as:

-  ...
-  drc_w = input(1, 0).drc(width < 0.2)
-  ...
-  
+... +drc_w = input(1, 0).drc(width < 0.2) +...

The drc method is the "universal DRC" method. @@ -845,12 +875,11 @@ overlaps = layer.size(0.2).raw.merged(2)

-  ...
-  l1 = input(1, 0)
-  l2 = input(2, 0)
-  drc_sep = l1.drc(separation(l2) <= 0.5)
-  ...
-  
+... +l1 = input(1, 0) +l2 = input(2, 0) +drc_sep = l1.drc(separation(l2) <= 0.5) +...

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)

-  ...
-  drc_w = input(1, 0).drc(width(projection) < 0.2)
-  ...
-  
+... +drc_w = input(1, 0).drc(width(projection) < 0.2) +...

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)

-  ...
-  drc_ws = input(1, 0).drc((width < 0.2) & (space < 0.3))
-  ...
-  
+... +drc_ws = input(1, 0).drc((width < 0.2) & (space < 0.3)) +...

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)

-  ...
-  drc_ws1 = input(1, 0).width(0.2).edges
-  drc_ws2 = input(1, 0).space(0.3).edges
-  drc_ws = drc_ws1 & drc_ws2
-  ...
-  
+... +drc_ws1 = input(1, 0).width(0.2).edges +drc_ws2 = input(1, 0).space(0.3).edges +drc_ws = drc_ws1 & drc_ws2 +...

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)

-  ...
-  drc_w = input(1, 0).width(0.2)
-  log("Number of width violations: #{drc_w.data.size}")
-  ...
-  
+... +drc_w = input(1, 0).width(0.2) +log("Number of width violations: #{drc_w.data.size}") +...

The error function can be used to output error messages @@ -946,11 +971,23 @@ overlaps = layer.size(0.2).raw.merged(2)

-  log_file("drc_log.txt")
-  verbose(true)
-  info("This message will be sent to the log file")
-  ...
-  
+log_file("drc_log.txt") +verbose(true) +info("This message will be sent to the log file") +... + +

+ The profile 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. +

+ +
+# enables profiling
+profile
+...

The tiling option

@@ -1003,8 +1040,7 @@ threads(4) # Disable tiling flat -... non-tiled operations ... - +... non-tiled operations ...

Some operations implicitly specify a tile border. If the tile border is known (see length example above), explicit borders