It looks like you're new here. If you want to get involved, click one of these buttons!
So this is in OpenLane on iHP SG32G2
KLayout is used to take the DEF from OpenRoad and stream a GDS out.
If the DEF includes a bunch of macros. And those macros have in them the same subcells (say ... a standard cell library for instance because they're a bunch of module hardened independently). Then in the final GDS each of those standard cell will have all polygons duplicated as many times as there are submodule.
Given we combine hundreds of designs together, that ends up with a lot of polygons.
Is there a way to deal with that better ?
Comments
Hi @tnt,
I think this topic has been addressed a number of times already.
How to you do the streamout exactly?
There are different strategies for resolving cell conflicts (this is what you have here) and unfortunately in a general context, all of them are needed. When one reads DEF into a Layout object, you can specify an options object (LoadLayoutOptions). It has an attribute called "cell_conflict_resolution" where you can specify how such conflicts are resolved.
The possible values are documented here: https://www.klayout.de/doc-qt5/code/class_LoadLayoutOptions++CellConflictResolution.html
The default is "AddToCell" which renders the behavior you observe here.
Matthias
@Matthias Thank you, that pointed me in the right direction.
I'm sorry if that was asked before, I did search around but obviously didn't hit the right keywords to find the answer ...
FYI the streamout script used by OpenLane2 is : https://github.com/efabless/openlane2/blob/main/openlane/scripts/klayout/stream_out.py#L93
As a side note an option that would "RenameCell" if different but "SkipNewCell" if it's the same would be great
Have a look at strm2gds/oas, they should be doing "the right thing" by default
Hi @tnt,
I agree with the "RenameCell" if different, but the definition of "different" is non-trivial as is the check. That is not something you want to integrate into a stream reader.
In general, to be on the safe side, use "RenameCell". If you know what you're doing, use "SkipNewCell". "AddToCell" is needed if you use hollow cells ("ghost cells") on one side and want to fill them with content of other cells.
Matthias