DRC - Touching edges on the same layer

Hi Matthias,

I'm looking for a way to flag places where two edges of adjacent polygons touch on the same layer.

For example, it should highlight the following two polygons near where they touch along x=1:
poly1=[0 0 1 1;0 1 1 0]
poly2=[1 1 2 2;0 1 1 0]

I'm aware of the two similar tests:
1. overlap within the same layer - different shapes from the same layer overlap.
2. gap detection within the same layer - different shapes from the same layer are separated by a distance smaller than x.

My thinking was to use either of these operations for the touching operation:
1. Bias the input layer up by a small amount using layer_input.sized(+x) and check for overlaps.
2. Bias the input layer down by a small amount using layer_input.sized(-x) and check for gaps.

However, these solutions don't work because the sized operation appears to merge the shapes before biasing. This method would also assume that the gap/overlap of that size isn't present elsewhere in the layout.

Do you have any suggestions? Am I on the right track or would you recommend an entirely different path?

Thanks in advance,
Adam

Comments

  • Hi Adam,

    Have you tried to use the raw mode as described in the documentation for the sized function ?

    Merged semantics applies, i.e. polygons will be merged before the sizing is applied unless the layer was put into raw mode (see raw). On output, the polygons are not merged immediately, so it is possible to detect overlapping regions after a positive sizing using raw and merged with an overlap count, for example:

    layer.sized(300.nm).raw.merged(2)
    

    Regards,

    S

  • Thanks S! I had encountered this but it wasn't working for me. However, I found now that switching the order of sized and raw gives me the expected result. For example,

    layer.sized(300.nm).raw.merged(2).output(...) shows nothing.

    layer.raw.sized(300.nm).merged(2).output(...) shows the expected output, a 600nm region around the point at which the two shapes touch.

    I wonder if my case is somehow set up differently from the example in the documentation. Regardless, this is working now!

    Thanks,
    Adam

  • Hi @14darcia,

    The documentation example targets something else. It targets gap detection, not overlap detection.

    You're basically acting against a very basic principle of GDS: polygons that touch are considered to form a larger area. This is called "merged semantics" and allows drawing larger structures in pieces. "raw" turns off merged semantics.

    "sized" operates in merged semantics, hence the touching edges are removed before "size" is applied. With "raw" before "size", this does not happen and you see the desired results.

    But I think there is something wrong in general in your problem statement. In the GDS world, touching shapes are not considered an issue, rather a certain way of drawing things. So in GDS, your problem should not exists.

    Matthias

  • edited February 18

    Hi @Matthias ,

    Thanks for the insight and concise explanation of the "raw" indicator.

    I understand your concerns over the inherent nature of the question so I'll try to explain my problem a little better. I'm trying to accommodate a case in which touching polygons are not necessarily an error in themselves, but indicate that an error has been made in the layout design process. Aka, the only way in which the polygons are touching is if I've made a design error.

    Actually, what you explain as touching polygons forming a larger area is precisely why this error cannot be flagged further down the line.

    To put it concisely, it's more flagging a design error than a physical layout error. Hope that makes a bit more sense!

    Thanks,
    Adam

  • Hi @14darcia,

    I guess I get your point. I hope the solution is helpful for you.

    I know such problems as "bridging errors", but mostly they are caused when design rules are not good enough to guarantee design integrity during post processing steps. I agree however, that it good to have a sanity check in that case.

    Matthias

Sign In or Register to comment.