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
263 stars 85 forks source link

Following instructions fails with magic exit code -9 #119

Closed armleo closed 2 years ago

armleo commented 3 years ago

Hello,

Following instructions fails with magic exit code -9 Multiple lines spamming "No label found with index ." in log It blew my log file to about 50GB so I cant copy and paste it here.

I really wanted to try to use this to design custom PLL, but it does not work. Any suggestions? OS: Ubuntu 20.04 LTS. Magic: magic-8.3.122 Everything else latest stable

Steps to reproduce:

cd
mkdir skywater
cd skywater
git clone https://github.com/google/skywater-pdk
cd skywater-pdk
git submodule init libraries/sky130_fd_io/latest
git submodule init libraries/sky130_fd_pr/latest
git submodule init libraries/sky130_fd_sc_hd/latest
git submodule init libraries/sky130_fd_sc_hdll/latest
git submodule init libraries/sky130_fd_sc_hs/latest
git submodule init libraries/sky130_fd_sc_ms/latest
git submodule init libraries/sky130_fd_sc_ls/latest
git submodule init libraries/sky130_fd_sc_lp/latest
git submodule init libraries/sky130_fd_sc_hvl/latest
git submodule update
make -j$(nproc) timing 

cd ~/skywater/
git clone --branch 1.0.142 git://opencircuitdesign.com/open_pdks
cd open_pdks
./configure --enable-sky130-pdk=$HOME/skywater/skywater-pdk/libraries --with-sky130-local-path=$HOME/skywater/pdk/skywater130 --enable-xschem-sky130
cd sky130
make -j$(nproc) # <---------------- fails here
sudo make install
cd ~/skywater

Currently trying same without -j option for make

Thanks, Armleo

RTimothyEdwards commented 3 years ago

I'm looking into it now. I have not done a full build for a while, and there have been a few changes to the libraries. I have seen the "No label found" issue before but since it didn't seem to affect the output (and wasn't generating messages to the tune of 50GB) I did not give it high priority. I can fix that issue but I need to see if there is a deeper underlying problem.

armleo commented 3 years ago

Hello,

Left it for a night, build both with -j and without in separate VMs with clean installs of ubuntu with all the packages as specified above. It kinda not failed or at least it said that it didn't fail, but it might have failed anyway. I don't know how to verify if everything is compiled correctly.

I assume that the build originally failed when I reported it because it basically ran out of available space of 20GB.

The log contains magic exit code -9 and "No label found with index ." and it's 10.7 GB in size, no way I can upload that much. I Will try to remove all "No label found with index ." in hope that it will reduce the size, but GREPing is extremely slow.

Tried opening some xschem projects, assuming that it would install all symbols. Any way to verify this? If I open xschem it fails with scripts/sky130_ something something .tcl not found. I checked the folder it's there but the xschemrc is not the one in git and it does not behave the same way as xschemrc from git. (Specifically, some variables are not set as in xschemrc from git).

I will try to report it on Github of xschem_sky130, later today.

Thanks, Arman

RTimothyEdwards commented 3 years ago

Don't worry about upload the log. I can confirm the excessive output from magic; I am only starting the build but it has run up to 100MB of output, most of which is the "No label found" error. Any errors you have with xschem startup are most likely to come from open_pdks, not from xschem.

RTimothyEdwards commented 3 years ago

I have made an update to magic (master branch at opencircuitdesign.com ; the github repository mirror will be updated overnight tonight) that lets the error messages be suppressed so they won't show up in the output log. I only got an output log size of about 133MB from a full install; however, the vast majority of that was the error messages from the "readspice" script in magic. If you can re-run with the updated version of magic and let me know what the output looks like, I'm unsure what else might be wrong, since you were getting a much larger log file output than I got.

armleo commented 3 years ago

Doing it right now

armleo commented 3 years ago

Hello,

One more question: Is there any pre-built versions of open-pdks for sky130? Building it takes many hours.

Any recomendations on how to make a pre-built package for ubuntu or arch?

Thanks, Arman

RTimothyEdwards commented 3 years ago

@armleo : All the bits and pieces are still such moving targets that I don't recommend creating a pre-built version, because it will become out of date almost instantly.

The longest part of the build is the "make timing" on the skywater-pdk. The open_pdks build itself takes maybe half an hour at most, even if all the libraries are installed and enabled. What I do is to download skywater-pdk separately and do "make timing" and then leave it, and configure open_pdks with "--enable-sky130-pdk=" so that it just picks up those files and does not try to re-do a full build of the PDK. But the built skywater-pdk files also take up a lot of disk space. One solution for that is to pre-build the skywater-pdk with only one or two of the standard cell libraries, say HD (area optimized) and HS (speed optimized). That considerably cuts down on the build time. You can also disable the build of the SRAM macro in open_pdks, depending on whether or not you want the SRAM macro (eventually, the full public release of OpenRAM with sky130 gets published and I'll remove the macro build from open_pdks).

armleo commented 3 years ago

Timing takes like on hour, it's open_pdks are taking like many many hours

timing time 17m for minimal: git submodule init libraries/sky130_fd_io/latest git submodule init libraries/sky130_fd_pr/latest git submodule init libraries/sky130_fd_sc_hs/latest ... make -j4

Anyway, will try your suggestions, thanks!

armleo commented 3 years ago

Looks like if i disable sram macro cell it will build in couple of minuts, but with it, it takes really long time and spams the messages. Currently openlane contains different version for magic, so I am unable to test it with latest magic.

RTimothyEdwards commented 3 years ago

Maybe I should disable the SRAM by default, at least for now.