It looks like you're new here. If you want to get involved, click one of these buttons!
Hello,
for the device extraction I do make some calculated layers.
`clk1Gate = active.overlapping(metalClk1) # select alle active (mit unveränderte Geometrie) welches metalClk1 überlappen
clk1SD = clk1Gate & poly
clk1Gate = clk1Gate - poly # The result is often but not necessarily always merged.
clk1Gate.merge()
clk1Gate2 = metal & clk1Gate
clk1Gate.output("clk1Gate")
clk1Gate2.output("clk1Gate2")
clk1SD.output("clk1SD") `
Why is clk1Gate2 placed to different layers and not merged?
Klayout 0.29.8
Steffen
Comments
Hi Steffen,
The booleans do not guarantee to merge the inputs by default. For example, a NOT with an empty layer can be shortcut to a copy, if you drop the merge requirement.
On the other hand, KLayout uses "merged semantics" by default - i.e. it will treat shapes as merged when the command requires so (i.e. on "interact"). That happens implicitly, so you don't need to care if the any operation delivers merged shapes or not.
You can enforce merging by using "strict" mode. The way you do so is calling "strict" on a layer. Future operations on such a layer will not use the shortcut:
However, this does not guarantee merging in tiled mode for example - you will always see the tile boundaries.
If you use tiled mode, there is another problem with "overlapping", as this basically has an infinite range. You can choose a large tile border value, so every tile captures "enough" of its neighborhood. Still that does not guarantee you capture all relevant shapes.
Are we talking about tiled mode here?
Matthias
Hi Matthias,
helps, the shapes are merged.
But my initial problem is why are the calculated layers are placed to different levels.
I use the hierarchical mode:
I want to extract a MOS3 device in non-strict mode.
SD: clk1SD is placed to Level SR3
G: clk1Gate or clk1Gate2 is placed to level Register1 Why? Should placed to level SR3 too.(?)
extracting MOS3 does not work. Are the different levels the problem?
Problem solved (after hours) .
There are 2 overlapping poly layers.
the calculated layer (clk1SD) creates 2 polygons at different levels.
therefore the extraction of MOS3 does not work.
So you meant hierarchy levels. You mentioned "different layers".
As a general rule, the hierarchical booleans (AND + NOT + many other operations, with the exception of XOR) use the first layer as the hierarchical guidance - the results will be on the same hierarchy (if possible) as the first layer's shapes.
I understand that you have two polygons in the first layer coming from different hierarchy levels, so the results from the operation will share their nature.
Matthias