Hi, I am using the pre-packaged docker container p...
# klayout
a
Hi, I am using the pre-packaged docker container provided by Herald Pret's lab (iic-osic-tools). Using Sky130A PDK, I am unable to instantiate any pcells in klayout. Instead, I am only seeing a large list of passives, BJTs, and RF devices with fixed sizes. What I did was create a new directory named libraries, and then: ln -s $PDKPATH/libs.ref/sky130_fd_pr/gds/sky130_fd_pr.gds ./.klayout/libraries Does anyone know how can I get a list of pcells using that flow?
l
Hi! Did you click on "Instance" at the top and select a cell from there? Maybe this helps you: https://codeberg.org/mole99/klayout-sky130-inverter
a
Hi @Leo Moser, thanks for your reply! When I click on instance, I get a dropdown list for the 2 gds's I linked, namely sky130_fd_pr and sky130_fd_sc_hd for the primitives and standard cells, respectively. The _pr list contains the same long list of devices, and none of them can be configured as a pcell. I looked at the link you sent me, and I think both gdsfactory and conda were not installed in the docker container (although the link here says that gdsfactory should be present https://github.com/iic-jku/iic-osic-tools?tab=readme-ov-file ) I installed pydantic and gdsfactory, but I am still seeing the same instances.
l
Hi @Ahmed Aboulsaad, it seems that the library is not correctly loaded. Did you get any errors in the terminal? I have attached a screenshot of what it should look like under Instance. Did you set KLAYOUT_HOME to point to the KLayout technology files? You can see how this is done in the Makefile: https://codeberg.org/mole99/klayout-sky130-inverter/src/branch/main/Makefile Also, I don't think you can install the packages via conda as KLayout looks for them in the system-wide installation and I think conda creates a virtual environment.
a
Hi @Leo Moser, thank you very much!! It works now! So I had to do a couple of things to solve this, and I am not sure if that's the best approach: 1- I installed pydantic 1.10 and gdsfactory 6.33.0 inside the docker container (iic-osic-tools) from https://codeberg.org/mole99/klayout-sky130-inverter 2- Attempted to run klayout from the path: /$PDK_ROOT/$PDK/libs.tech/klayout but it gives an error (second image) because the header file had to be removed based on your instructions. However, the .lym file is read only (1st image). 3- To solve this, I created a .klayout directory under an arbitrary design path: /foss/designs/.klayout and I copied the contents of /$PDK_ROOT/$PDK/libs.tech/klayout/pymacros into /foss/designs/.klayout/pymacros and then removed the header lines 4- Finally I ran klayout using KLAYOUT_HOME=/foss/designs/.klayout klayout -e and now I am able to load the pcells. Thank you very much ๐Ÿ™‚ I've been debugging this issue for days. I am not sure if that's the correct workaround, but it seems to be working!
l
Awesome! That's great to hear ๐Ÿ˜ƒ๏ธ So at first it failed because the KLayout technology files in the PDK are read-only, did I get that right? Maybe you could file an issue at IIC-OSIC-TOOLS to improve support for KLayout PCells regarding installing pydantic and gdsfactory in the docker container by default. I am looking at fixing up the technology files here: https://github.com/efabless/sky130_klayout_pdk so that fewer workarounds are required.
a
Thank you ๐Ÿ™‚ yup, that's correct. All the files in the $PDK dir. were read only. I will go ahead an post an issue. I read some discussions about that link you mentioned, and I think it should be working. I tried to mix and match by adding some files from this link to the docker but it didn't work. Probably it's because of the gdsfactory configuration issue.
๐Ÿ‘ 1