Hello, I’m having trouble installing open_pdks via...
# open_pdks
c
Hello, I’m having trouble installing open_pdks via the canonical flow documented here: http://opencircuitdesign.com/open_pdks/index.html
Copy code
git clone <git://opencircuitdesign.com/open_pdks>
cd open_pdks
./configure --enable-sky130-pdk --enable-sram-sky130
make
This yields the following error message (after ~10 minutes of error-free messages):
Copy code
for file in config.tcl <http://tracks.info|tracks.info> no_synth.cells drc_exclude.cells tribuff_map.v latch_map.v mux2_map.v mux4_map.v fa_map.v rca_map.v csa_map.v ; do \
	    ../common/preproc.py -quiet -DTECHNAME=sky130A -DREVISION=1.0.487-0-g1e22da2 -DMETAL5 -DMIM -DREDISTRIBUTION -DSTAGING_PATH=/Users/colinww/foss/pdks/sky130/open_pdks/sky130 -DMAGIC_CURRENT=libs.tech/magic openlane/sky130_fd_sc_hvl/$file \
		/Users/colinww/foss/pdks/sky130/open_pdks/sky130/sky130A/libs.tech/openlane/sky130_fd_sc_hvl/$file ; \
	done
../common/preproc.py -quiet -DTECHNAME=sky130B -DREVISION=1.0.487-0-g1e22da2 -DMETAL5 -DMIM -DREDISTRIBUTION -DRERAM -DSTAGING_PATH=/Users/colinww/foss/pdks/sky130/open_pdks/sky130 -DMAGIC_CURRENT=libs.tech/magic openlane/sky130_osu_sc_t18/config.tcl \
		/Users/colinww/foss/pdks/sky130/open_pdks/sky130/sky130B/libs.tech/openlane/sky130_osu_sc_t18/config.tcl
../common/preproc.py -quiet -DTECHNAME=sky130B -DREVISION=1.0.487-0-g1e22da2 -DMETAL5 -DMIM -DREDISTRIBUTION -DRERAM -DSTAGING_PATH=/Users/colinww/foss/pdks/sky130/open_pdks/sky130 -DMAGIC_CURRENT=libs.tech/magic openlane/sky130_osu_sc_t18/tracks.info \
		/Users/colinww/foss/pdks/sky130/open_pdks/sky130/sky130B/libs.tech/openlane/sky130_osu_sc_t18/tracks.info
make[2]: *** wait: No child processes.  Stop.
make[1]: *** [all-B] Error 2
make[1]: *** Waiting for unfinished jobs....
../common/preproc.py -quiet -DTECHNAME=sky130A -DREVISION=1.0.487-0-g1e22da2 -DMETAL5 -DMIM -DREDISTRIBUTION -DSTAGING_PATH=/Users/colinww/foss/pdks/sky130/open_pdks/sky130 -DMAGIC_CURRENT=libs.tech/magic openlane/sky130_osu_sc_t18/config.tcl \
		/Users/colinww/foss/pdks/sky130/open_pdks/sky130/sky130A/libs.tech/openlane/sky130_osu_sc_t18/config.tcl
../common/preproc.py -quiet -DTECHNAME=sky130A -DREVISION=1.0.487-0-g1e22da2 -DMETAL5 -DMIM -DREDISTRIBUTION -DSTAGING_PATH=/Users/colinww/foss/pdks/sky130/open_pdks/sky130 -DMAGIC_CURRENT=libs.tech/magic openlane/sky130_osu_sc_t18/tracks.info \
		/Users/colinww/foss/pdks/sky130/open_pdks/sky130/sky130A/libs.tech/openlane/sky130_osu_sc_t18/tracks.info
make[2]: *** wait: No child processes.  Stop.
make[1]: *** [all-A] Error 2
make: *** [tech-sky130] Error 2
Since this flow seems to use python, here is the version:
Copy code
colinww@air-colin open_pdks % python3 --version
Python 3.9.12
Any suggestions? Thank you!
s
@Colin Weltin-Wu before building
open_pdks
install an up to date
magic
version, just in case you did not have a very recent magic install. (git://opencircuitdesign.com/magic)
Copy code
git clone <git://opencircuitdesign.com/magic> magic_git
cd magic_git
./configure
make
sudo make install
c
Hi Stefan, I had already built magic and installed it to default location
/usr/local/bin/magic
. I have just confirmed it can be launched from the terminal in which I am compiling the PDK. Is it possible my magic install is somehow broken? I can open it, interact with the TCL interpreter, play with menus etc but I don’t have any actual layouts to play with.
s
@Colin Weltin-Wu I mentioned
magic
because to successfully instal open_pdks you need to have a recent installation of magic. The open_pdk build uses
magic
to generate various pdk files and netlists. If the build of open_pdks still fails there is some other problem.
c
Are there any debug build options to get more visibility into the failure? I browsed the Makefile but didn’t see anything obvious.
t
I don't recall ever seeing the "wait: No child processes" message before. It makes me wonder if the error is coming from "make" itself. Try removing the
-j$(nproc)
from the top-level Makefile line 132. That will at least force everything to a single thread which will make the output a bit more readable. You can also try just the first part of the build by itself to see if there's any difference in behavior; do
cd sky130 ; make tools-A
.
c
In the makefile
sky130/Makefile
Line 1234,
Copy code
if test "x${KLAYOUT_PATH}" != "x" ; then \
		cp -p ${KLAYOUT_PATH}/sky130_tech/tech/sky130/lvs/* ${KLAYOUT_STAGING_$*}/lvs/ ; \
		cp -rp ${KLAYOUT_PATH}/sky130_tech/tech/sky130/pymacros/* ${KLAYOUT_STAGING_$*}/pymacros/ ; \
		cp ${KLAYOUT_PATH}/sky130_tech/tech/sky130/${TECH}.lyp ${KLAYOUT_STAGING_$*}/tech/${SKY130$*}.lyp ; \
		cp ${KLAYOUT_PATH}/sky130_tech/tech/sky130/${TECH}.lyt ${KLAYOUT_STAGING_$*}/tech/${SKY130$*}.lyt ; \
		cp ${KLAYOUT_PATH}/sky130_tech/tech/sky130/${TECH}.map ${KLAYOUT_STAGING_$*}/tech/${SKY130$*}.map ; \
		${SED} -i "s/sky130.lyp/${SKY130$*}.lyp/g" ${KLAYOUT_STAGING_$*}/tech/${SKY130$*}.lyt ; \
	fi
Has two errors. This line fails:
Copy code
cp -p ${KLAYOUT_PATH}/sky130_tech/tech/sky130/lvs/* ${KLAYOUT_STAGING_$*}/lvs/ ; \
Because lvs/* is a directory, so I fixed it to
cp -rp
and it continues. The last line fails (sed) as follows:
colinww@air-colin sky130 % /usr/bin/sed -i "s/sky130.lyp/sky130A.lyp/g" /Users/colinww/foss/pdks/sky130/open_pdks/sky130/sky130A/libs.tech/klayout/tech/sky130A.lyt ;
sed: 1: “/Users/colinww/foss/pdk ...“: command c expects \ followed by text I executed the command in the terminal as constructed during the make variable substitution, and I get the same error message as I get when running make.
t
@Colin Weltin-Wu: What OS are you doing this on? I've seen issues come up before using
sed
with different operating systems having slightly different syntax. My gut feeling is that your version of
sed
requires a value passed to
-i
and so is taking the script to be the value of
-i
and the filename to be the script. Can you get a manual page for
sed
on your system? Mine has
Copy code
-i[SUFFIX], --in-place[=SUFFIX]

              edit files in place (makes backup if SUFFIX supplied)
which indicates that
SUFFIX
is optional, therefore
-i
by itself is a standalone argument. A fix which would work for all systems is not to use the
sed
"edit-in-place" but output to a temporary file, then overwrite the original file with the modified one. for
cp -p
, my system ignores the subdirectories but does not force a halt to the build.