klayout icon indicating copy to clipboard operation
klayout copied to clipboard

strmxor optimization for prBoundary layer

Open stefanottili opened this issue 11 months ago • 0 comments

prBoundary layers are common in std cells, ram's/rom's (both bit cells and hierarchy) and in analog block hierarchy. They are a worst case for scanlines, since there are a lot of them and they all touch at all edges.

With tens of million std cells and lot's of bits in ram's/rom's, this can leads to a large memory requirement for strmxor's scanline.

One option is to optimize the scanline memory footprint, which will be beneficial across the board. The other option is to take advantage of "chip or block" prBoundary rectangles.

xor'ing prBoundary layers, one simple check can reduce the number of rectangles inserted in the scanline from several millions down to a couple:

"If there is a rectangle covering the bounding box of a cell, any other polygon/path in or in hierarchies below on this layer is already covered, no need to insert anything else into the scanline or to traverse hierarchy below."

stefanottili avatar Feb 29 '24 22:02 stefanottili