From a20bd38f17c68a1bdb544dc5b2b79cfcf7522c19 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Tue, 15 Sep 2020 00:19:47 +0200 Subject: [PATCH] Updated documentation --- src/lay/lay/doc/about/drc_ref_global.xml | 45 +++++++++++++++++++++--- src/lay/lay/doc/about/drc_ref_layer.xml | 32 +++++++++++++++++ 2 files changed, 73 insertions(+), 4 deletions(-) diff --git a/src/lay/lay/doc/about/drc_ref_global.xml b/src/lay/lay/doc/about/drc_ref_global.xml index 5cf550238..76ed7823d 100644 --- a/src/lay/lay/doc/about/drc_ref_global.xml +++ b/src/lay/lay/doc/about/drc_ref_global.xml @@ -255,7 +255,7 @@ See Netter#connect_implicit

Usage:

    -
  • dbu(dbu)
  • +
  • dbu(dbu_value)
  • dbu

@@ -554,6 +554,39 @@ delivered by polygon_layer is not. On the other hand, a layer created by the make_layer method is not intended to be filled with Layer#insert.

+

"max_area_ratio" - Gets or sets the maximum bounding box to polygon area ratio for deep mode fragmentation

+ +

Usage:

+
    +
  • max_area_ratio(ratio)
  • +
  • max_area_ratio
  • +
+

+In deep mode, polygons with a bounding box to polygon area ratio bigger than the given number +will be split into smaller chunks to optimize performance (which gets better if the polygon's +bounding boxes do not cover a lot of empty space). +The default threshold is 3.0 which means fairly compact polygons. Use this method with a numeric +argument to set the value and without an argument to get the current maximum area ratio. +Set the value to zero to disable splitting by area ratio. +

+See also max_vertex_count for the other option affecting polygon splitting. +

+

"max_vertex_count" - Gets or sets the maximum vertex count for deep mode fragmentation

+ +

Usage:

+
    +
  • max_vertex_count(count)
  • +
  • max_vertex_count
  • +
+

+In deep mode, polygons with more than the given number of vertexes will be split into +smaller chunks to optimize performance (which is better or less complex polygons). +The default threshold is 16 vertexes. Use this method with a vertex count to set the +value and without an argument to get the current maximum vertex count. +Set the value to zero to disable splitting by vertex count. +

+See also max_area_ratio for the other option affecting polygon splitting. +

"mos3" - Supplies the MOS3 transistor extractor class

Usage:

@@ -853,18 +886,22 @@ See
write_spice for more details.

Usage:

If using threads, tiles are distributed on multiple CPU cores for parallelization. Still, all tiles must be processed before the -operation proceeds with the next statement. +operation proceeds with the next statement. +

+Without an argument, "threads" will return the current number of +threads

"tile_borders" - Specifies a minimum tile border

Usage:

    -
  • tile_border(b)
  • -
  • tile_border(bx, by)
  • +
  • tile_borders(b)
  • +
  • tile_borders(bx, by)

The tile border specifies the distance to which shapes are collected into the diff --git a/src/lay/lay/doc/about/drc_ref_layer.xml b/src/lay/lay/doc/about/drc_ref_layer.xml index 439fb74bd..fe5f8f27c 100644 --- a/src/lay/lay/doc/about/drc_ref_layer.xml +++ b/src/lay/lay/doc/about/drc_ref_layer.xml @@ -627,6 +627,38 @@ If the layer is a hierarchical layer (an original layer or a derived layer in deep mode), this method will convert it to a flat collection of texts, polygons, edges or edge pairs.

+

"forget" - Cleans up memory for this layer

+ +

Usage:

+
    +
  • forget
  • +
+

+KLayout's DRC engine is imperative. This means, every command is executed immediately +rather than being compiled and executed later. The advantage of this approach is that +it allows decisions to be taken depending on the content of a layer and to code +functions that operate directly on the layer's content. +

+However, one drawback is that the engine cannot decide when a layer is no longer +required - it may still be used later in the script. So a layer's data is not cleaned +up automatically. +

+In order to save memory for DRC scripts intended for bigger layouts, the DRC script +should clean up layers as soon as they are no longer required. The "forget" method +will free the memory used for the layer's information. +

+The recommended approach is: +

+

+l = ... # compute some layer
+...
+# once you're done with l:
+l.forget
+l = nil
+
+

+By setting the layer to nil, it is ensured that it can no longer be accessed. +

"holes" - Selects all polygon holes from the input

Usage: