diff --git a/src/doc/doc/about/drc_ref_global.xml b/src/doc/doc/about/drc_ref_global.xml index be5f57530..27f0d6a35 100644 --- a/src/doc/doc/about/drc_ref_global.xml +++ b/src/doc/doc/about/drc_ref_global.xml @@ -434,6 +434,28 @@ By default the interpretation of such polygons is undefined - they may even vani By setting this flag to true, the deep mode layout processor will reject such polygons with an error.
+Usage:
++The function returns an object describing the current output channel. +This channel object can be used like the channels delivered by +new_target or new_report. +
+These readonly attributes are supported by the channel object: +
+
+Note, that the channel object will be modified when you use output_cell, +target or report calls that change the target. +
Usage:
@@ -1666,6 +1688,9 @@ The cellname specifies the top cell used for the report file. By default this is the cell name of the default source. If there is no source layout you'll need to give the cell name in the third parameter. ++The return value of this method is a channel object of the same +type that new_report will return.
Usage:
@@ -2055,6 +2081,9 @@ a new target will be set up.
Except if the argument is a
+The return value of this method is a channel object of the same +type that new_target will return.
+However, the cell's dimensions can be changed, so that the fill cells can overlap or there is a space between the cells. To change the dimensions use the "dim" method. +This example will use a fill cell footprint of 1x1 micrometers, regardless of the step pitch: +
+
+p = fill_pattern("FILL_CELL")
+p.shape(1, 0, box(0.0, 0.0, 1.0, 1.0))
+p.dim(1.0, 1.0)
+
The following example specifies a fill cell with an active area of -0.5 .. 1.5 in both directions (2 micron width and height). With these dimensions the fill cell's footprint is independent of the @@ -1247,6 +1256,18 @@ p.origin(-0.5, -0.5) p.dim(2.0, 2.0)
+Finally, the fill cell can be given a margin: this is a space around the fill cell which needs +to be inside the fill region. Hence, the margin can be used to implement a distance, the fill +cells (more precisely: their footprints) will maintain to the outside border of the fill region. +The following example implements a margin of 200 nm in horizontal and 250 nm in vertical direction: +
+
+p = fill_pattern("FILL_CELL")
+p.shape(1, 0, box(0.0, 0.0, 1.0, 1.0))
+p.dim(1.0, 1.0)
+p.margin(0.2, 0.25)
+
+With these ingredients will can use the fill function. The first example fills the polygons of "to_fill" with an orthogonal pattern of 1x1 micron rectangles with a pitch of 2 microns:
diff --git a/src/drc/drc/built-in-macros/_drc_engine.rb b/src/drc/drc/built-in-macros/_drc_engine.rb index 15c6356a4..72b48de29 100644 --- a/src/drc/drc/built-in-macros/_drc_engine.rb +++ b/src/drc/drc/built-in-macros/_drc_engine.rb @@ -1579,6 +1579,9 @@ module DRC # By default this is the cell name of the default source. If there # is no source layout you'll need to give the cell name in the # third parameter. + # + # The return value of this method is a channel object of the same + # type that \global#new_report will return. def report(description, filename = nil, cellname = nil) @@ -1592,7 +1595,9 @@ module DRC @def_output = _make_report(description, filename, cellname) end - + + @def_output + end # %DRC% @@ -1713,6 +1718,7 @@ module DRC # %DRC% # @name target # @brief Specify the target layout + # @synopsis target # @synopsis target(what [, cellname]) # This function can be used to specify a target layout for output. # Subsequent calls of "output" will send their results to that target @@ -1733,12 +1739,14 @@ module DRC # Except if the argument is a RBA::Cell object, a cellname can be specified # stating the cell name under which the results are saved. If no cellname is # specified, either the current cell or "TOP" is used. - # + # + # The return value of this method is a channel object of the same + # type that \global#new_target will return. - def target(arg, cellname = nil) + def target(arg = nil, cellname = nil) self._context("target") do - + # finish what we got so far _finish(false) @@ -1747,6 +1755,41 @@ module DRC end + @def_output + + end + + # %DRC% + # @name def_output + # @brief Gets an object describing the default output channel + # @synopsis def_output + # + # The function returns an object describing the current output channel. + # This channel object can be used like the channels delivered by + # \global#new_target or \global#new_report. + # + # These readonly attributes are supported by the channel object: + # + # @ul + # @li "layout": the RBA::Layout object if the output is a layout @/li + # @li "rdb": the RBA::ReportDatabase object if the output is a report @/li + # @li "cell": a RBA::Cell object or RBA::RdbCell object, depending on the type of channel @/li + # @/ul + # + # Note, that the channel object will be modified when you use \global#output_cell, + # \global#target or \global#report calls that change the target. + + def def_output + + self._context("def_output") do + # establish an output channel if none was established so far + if ! @def_output + @def_output = LayoutOutputChannel::new(self, self._output_layout, self._output_cell, nil) + end + end + + @def_output + end # %DRC% diff --git a/src/drc/unit_tests/drcSimpleTests.cc b/src/drc/unit_tests/drcSimpleTests.cc index c618af869..c0850edb1 100644 --- a/src/drc/unit_tests/drcSimpleTests.cc +++ b/src/drc/unit_tests/drcSimpleTests.cc @@ -1993,3 +1993,13 @@ TEST(132d_sensitive_breaking) { run_test (_this, "132", true); } + +TEST(140_target_modification) +{ + run_test (_this, "140", false); +} + +TEST(140d_target_modification) +{ + run_test (_this, "140", true); +} diff --git a/testdata/drc/drcSimpleTests_140.drc b/testdata/drc/drcSimpleTests_140.drc new file mode 100644 index 000000000..488e43151 --- /dev/null +++ b/testdata/drc/drcSimpleTests_140.drc @@ -0,0 +1,25 @@ + +source $drc_test_source +target $drc_test_target + +if $drc_test_deep + deep +end + +l1 = input(1, 0) +l2 = input(2, 0) + +top_cell = def_output.cell + +# Separat 1/0 and 2/0 to two cells L1, L2 + +output_cell("L1") +top_cell.insert(RBA::DCellInstArray::new(def_output.cell, RBA::DTrans::new)) + +l1.output(1, 0) + +output_cell("L2") +top_cell.insert(RBA::DCellInstArray::new(def_output.cell, RBA::DTrans::new)) + +l2.output(2, 0) + diff --git a/testdata/drc/drcSimpleTests_140.gds b/testdata/drc/drcSimpleTests_140.gds new file mode 100644 index 000000000..7bb1f3947 Binary files /dev/null and b/testdata/drc/drcSimpleTests_140.gds differ diff --git a/testdata/drc/drcSimpleTests_au140.gds b/testdata/drc/drcSimpleTests_au140.gds new file mode 100644 index 000000000..d6e76ce3d Binary files /dev/null and b/testdata/drc/drcSimpleTests_au140.gds differ diff --git a/testdata/drc/drcSimpleTests_au140d.gds b/testdata/drc/drcSimpleTests_au140d.gds new file mode 100644 index 000000000..4f9288030 Binary files /dev/null and b/testdata/drc/drcSimpleTests_au140d.gds differ