XNOR or NXOR option in klayout

The XOR works well in klayout, is there a way to run a XNOR/NXOR operation within klayout? Basically the aim would be to keep only polygons that don't have overlap.

Thanks,

Comments

  • edited November 2022

    I'm afraid, I don't understand ... that is exactly what XOR does: it leaves the parts of polygons which do not overlap.

    Do you mean the inverse of XOR that is not available?

    Background is that all boolean operations produce local results - they will not generate output outside the drawing area - that would create a logical dilemma as this area is not bounded.

    So in the truth table, the row with A=0 and B=0 will always produce "0". Hence all available operations are these:

       A  B   | ZERO | BNOTA | ANOTB | XOR  | AND  | =B   | =A   | OR   |
    ---------------------------------------------------------------------
       0  0   | 0    | 0     | 0     | 0    | 0    | 0    | 0    | 0    |
       0  1   | 0    | 1     | 0     | 1    | 0    | 1    | 0    | 1    |
       1  0   | 0    | 0     | 1     | 1    | 0    | 0    | 1    | 1    |
       1  1   | 0    | 0     | 0     | 0    | 1    | 1    | 1    | 1    |
    

    Apart from the trivial ZERO, "=A" and "=B", all operations are supported in DRC.

    If you need "inversion" you can basically subtract ("NOT") from a huge rectangle, but technically you should avoid that as it will generate huge polygons with many holes.

    Matthias

Sign In or Register to comment.