Need help with proximity DRC script

I wrote a DRC script to detect long thin tips that are too close to a large rectangle (all in same layer).
The script works, except when the long thin tip is flush with edge of the large rectangle.
Could anyone suggest how I could fix it ?

My testcase OAS file
https://drive.google.com/file/d/1Wb-l3iPrUiOoUkO8hr79U1qYd7geGtse/view?usp=sharing
The error is flagged on the left side top thin tip but not the one on the right side, nor the ones at the bottom.
I would like to flag all 4 thin tips as errors.

My script

report("my_drc_script")

# definitions
myrects    = polygons(1, 0)
width_thin = 0.05.um
min_spc    = 0.18.um


# select edges : horizontal and vertical
edges_hori = myrects.edges.with_angle(0)
edges_vert = myrects.edges.with_angle(90)


# rulecheck
set_a      = edges_hori.with_length(width_thin)
set_b      = set_a.sep(edges_vert, min_spc, angle_limit(181))


# report
set_b.output("Proximity error", "Separation < 0.18um")

Comments

  • @wimbur the angle_limit(181) does not do what you intend. The problem is that with the tip edge facing away from the vertical edge, the relationship is no longer "separation". It is "enclosure" then.

    Hence you can detect forward plus backward "space" violations using this scheme:

    set_b      = set_a.sep(edges_vert, min_spc, angle_limit(91))
    set_c      = set_a.enc(edges_vert, min_spc, angle_limit(91))
    
    # report
    (set_b + set_c).output("Proximity error", "Separation < 0.18um")
    

    I have used an angle limit of 91 because that is sufficient to capture the vertical vs. horizontal case.

    Matthias

  • Hi @Matthias,
    I have tried it out and it works.
    Much appreciated, thank you very much.

Sign In or Register to comment.