Checking Edge Separation

Hi!
I am trying to measure the enclosure distance of a well region of a gate (in the length direction specifically). I isolated my gate down to its sides and not its ends so that I can check its separation to the side of the well. However, I am getting only a separation check from the end points. What would be the correct way to go about checking parallel edge separation? Or even just an enclosure check on specific sides of a shape?
Thanks!

GATE_SIDES = GATE.edges.not(OXIDE.edges)
violation = NWELL.edges.separation(GATE_SIDES, 1.0.um, projection) 

Comments

  • For anyone else that needs a similar solution, I ended up doing something more like:

    violation = ((((NWELL.and(OXIDE)).not(GATE)).interacting(GATE, 1, 1)).edges.and(OXIDE.edges)).with_length(0.001.um, 0.999.um)
    

    This seems to be a viable solution for what I needed, but if there are any improvements to be made I would love to hear them! I needed the random interacting statement in order to ignore oxide between two gates.

  • Hi @stockstephanie,

    You need to use "enclosing", not "separation".

    Here is an example:

    And this is my script:

    report("discussion 2875")
    
    poly = input(1, 0)
    active = input(2, 0)
    nwell = input(3, 0)
    
    gate = poly & active
    
    gate_sides = gate.edges.not(active.edges)
    violation = nwell.edges.enclosing(gate_sides, 1.0.um, projection) 
    
    violation.output("nwell not enclosing gate by >= 1µm")
    

    The explanation is this: edges are not just thin lines, they also have a direction. If you look from start to end, the left side of the edge is "outside", the right side is "inside" (edges run along the polygons in clockwise direction).

    When you use a DRC function on edges, their relative orientation gives the relation: edges facing each other with the "inside" side fulfil the "width" relation, edges facing each other with the "outside" side fulfil the "separation", "space" or "notch" relation. In your case, the edges stem from an enclosing relation, hence the enclosing check still applies.

    I hope this explanation makes sense.

    Matthias

  • That works so much better! Thanks, that helps a ton : )

Sign In or Register to comment.