KLayout / klayout

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

sky130A pymacros & gdsfactory #1731

Closed martinjankoehler closed 4 weeks ago

martinjankoehler commented 4 weeks ago

Hi @klayoutmatthias,

encounterd some issues trying to enable sky130A pymacros in edit mode (perhaps not really klayout but rather PDK authors / gdsfactory issues), but perhaps somebody knows a workaround

XML parsing issue

The pymacros do not work, due to comment before the XML declaration: /foss/pdks/sky130A/libs.tech/klayout/pymacros/sky130.lym I guess this issue should really be fixed by the PDK authors, but perhaps klayout could gracefully handle this.

Bildschirmfoto 2024-06-06 um 16 14 05

After fixing this manually by moving up the XML declaration to the top, then I get...

gdsfactory issue

Bildschirmfoto 2024-06-06 um 16 05 10

Are these known issues?

I have those with:

Will try to install an older PIP version of gdsfactory.

martinjankoehler commented 4 weeks ago

OK, seems with gdsfactory 6.34.0 they moved gdsfactory.types to gdsfactory.typings: https://gdsfactory.github.io/gdsfactory/changelog.html#id193

So replacing all the import statements gets it to work.

klayoutmatthias commented 4 weeks ago

Hi Martin,

I am not sure if I can skip the comment - that is eventually Qt's XML parser. Optional I can use expat, but if the XML is not well-formed, this one would error out is well, I assume.

Matthias

klayoutmatthias commented 4 weeks ago

I found this commit: https://github.com/efabless/sky130_klayout_pdk/commit/c49c741c09bf0cb31b9af76aa53f4b9502e0d17a

So apparently the authors are aware of this problem :)

martinjankoehler commented 4 weeks ago

Thanks, I‘ll close this issue.

martinjankoehler commented 4 weeks ago

FYI, I've opened an issue there for the import error: https://github.com/efabless/sky130_klayout_pdk/issues/20 and also have a fix handy: https://github.com/martinjankoehler/sky130_klayout_pdk/tree/gdsfactory-types-fix