KLayout / klayout

KLayout Main Sources
http://www.klayout.org
GNU General Public License v3.0
754 stars 196 forks source link

Normalize zero dimension when generating regular array instance #1098

Closed klayoutmatthias closed 1 year ago

klayoutmatthias commented 2 years ago

For test case and discussion see here: https://github.com/KLayout/klayout/issues/1096

The attached layout does not load properly when the library is not present.

klayoutmatthias commented 2 years ago

First analysis: the problem is likely cause by saving, not by reading. The test data linked above is already broken.

The PDK is taken from here: https://github.com/mabrains/sky130_klayout_pdk

Problem: while the layout loads properly with the library installed, it does not save properly. On GDS it gives broken hierarchy with additional top cells and on OASIS wrong layout.

klayoutmatthias commented 2 years ago

Changed title: the problem is cause by the Skywater device generator lib which creates arrays with a zero dimension of bmax (maybe amax too). This will screw up the DRC engine and stream writers. The script API should not allow generating such instances or normalize the dimensions to be at least 1.