Skip to content

DRC in deep mode highlights erroneous width violation with text #1011

@dansharkey

Description

@dansharkey

There is an issue with DRC checks where a "text" object will cause a violation of a width check if it is over the top of a cell when DRC is run in "deep"/hierarchical mode. I have written a short macro which generates a layout which suffers from the problem, along with a DRC script which highlights the issue.

Macro to create layout which exhibits the issue:

# save this script to "generate.rb" and run it with "klayout -r generate.rb -b"
layout = RBA::Layout::new

# database unit 1nm:
layout.dbu = 0.001

# create a top cell
top = layout.cell(layout.add_cell("TOP"))
# create a subcell
subcell = layout.cell(layout.add_cell("Subcell"))

# create a layer: layer number 1, datatype 0
layer = layout.insert_layer(RBA::LayerInfo::new(1, 0))

# create one rectangle with lower-left coordinates at 0,0
# and width of 1um and height of 1um (coordinates are in
# database units)
subcell.shapes(layer).insert(RBA::Box::new(0, 0, 1000, 1000))

top.shapes(layer).insert(RBA::Text::new("Test Text",0,0))

top.insert(RBA::CellInstArray::new(subcell.cell_index, RBA::Trans::new(0,0)))

# write to x.oas
layout.write("x.oas")

DRC script to reproduce issue:

deep

layer = input(1)
layer.width(0.5.micron).output(100,0)

KLayout version tested: 0.27.7 & 0.27.8
OS: Windows 10 64-bit
2022-01-12 r428d0fe8c

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions