I was trying to follow up on some comments about how
this function could be used to make "asserted" objects
by "text tagging" a shape. But I can't find any mention of
this function in the DRC manual sections of the online

Now most of my interest has been in the context of
connectivity (replace complex "recognition logic" by
simple text-assertion logic) but I would employ it for
device-specific rules (and checking for un-asserted
devices) in DRC if I were able.

1) Is this function available to DRC scripts?
2) Where would I find documentation or examples?


  • Hi Jim,

    sorry, I went into the future already. I'm upgrading the DRC engine currently. "with_text" is a new enhancement as the DRC engine is going to support text layers as native objects.

    So far, texts are kind of "hidden" objects inside "normal" input layers. They can be extracted from original layers and turned into small, dot-like shapes which can be used in "interacting", like this:

    l1 = input(1, 0)
    l2 = input(2, 0)
    l2_a_labels = l2.texts("A")
    l1_with_a_labels = l1.interacting(l2_a_labels)
    l1_with_a_labels.output(100, 0)

    which gives (layer 100 is the bold-edged shape):

    It's worth noting that "texts" can only operate on original, unmodified layers. The documentation for "texts" is here: https://www.klayout.de/doc-qt5/about/drc_ref_layer.html#k_108

    Best regards,


Sign In or Register to comment.