RTimothyEdwards / open_pdks

PDK installer for open-source EDA tools and toolchains. Distributed with setups for the SkyWater 130nm and Global Foundries 180nm open processes.
http://opencircuitdesign.com/open_pdks
Apache License 2.0
280 stars 85 forks source link

incorrect path to klayout gf180mcu tech files for interactive usage #346

Open proppy opened 1 year ago

proppy commented 1 year ago

per https://www.klayout.de/doc/about/technology_manager.html#:~:text=The%20technology%20folder%20may%20have%20subfolders%20to%20hold%20library%20files%2C%20macros%2C%20DRC%20runsets%2C%20LEF%20files%20and%20other%20pieces%20of%20the%20technology%20package

Except for the default technology, technologies are kept in technology folders in KLayout's application path. They are read from subfolders from the "tech" directories. The technology definition itself is held in a file with extension ".lyt". The technology folder may have subfolders to hold library files, macros, DRC runsets, LEF files and other pieces of the technology package.

it seems that klayout expect the following directory hierarchy to enable interactive usage:

tech/
tech/pdkname.lyt
tech/pdkname.lyp
tech/pymacros/pdkname.lym # for autoload
tech/pymacros/cells # as of current lym file
tech/drc
tech/lvs

However https://github.com/RTimothyEdwards/open_pdks/blob/master/sky130/Makefile.in#L1008-L1012 and https://github.com/RTimothyEdwards/open_pdks/blob/master/gf180mcu/Makefile.in#L660-L669 currently stage things differently:

tech/
tech/pdkname.lyt
tech/pdkname.lyp
tech/pdkname.lym # doesn't autoload
pymacros/cells # not relative to lym
drc # override default base tech
lvs # override default base tech

It would be nice to re-organize those to follow klayout convention without breaking OpenLane and other tools expectation about the current layout (maybe a transition release with symlinks would be nice?)

RTimothyEdwards commented 1 year ago

@kareefardi : Can you please check how making this structural change to the directories in klayout affects the running of openlane?

proppy commented 1 year ago

@RTimothyEdwards looking at the OpenLane code it seems that it does relies exclusively on KLAYOUT_TECH to resolve the tech files from klayout (assuming tcl forward its $::env to python invocation when not setting --tech-file explicitly): https://github.com/The-OpenROAD-Project/OpenLane/blob/ce916510de89a037889e06ab16c00c4101f77d2f/scripts/tcl_commands/klayout.tcl#L38 https://github.com/The-OpenROAD-Project/OpenLane/blob/09e2095f9335981ec02c58b2f4d06f089448ed9e/scripts/klayout/open_design.py#L37-L38 https://github.com/The-OpenROAD-Project/OpenLane/blob/d8e399d55dfaac13048c84987ecf71f2086c5175/scripts/klayout/screenshot_layout.py#L36-L37 https://github.com/The-OpenROAD-Project/OpenLane/blob/ce916510de89a037889e06ab16c00c4101f77d2f/scripts/klayout/stream_out.py#L74-L75