Could anyone give some advice about caravel on IIC...
# general
a
Could anyone give some advice about caravel on IIC-OSIC-TOOLS (docker-container)? I've been using IIC-OSIC TOOLS (non-docker version) and it works well. Now I'm trying docker-version of IIC-OSIC-TOOLS, but I'm stuck at setup. When I try the flow of caravel_user_project, 'make setup' fails with errors below. % cd caravel_user_project % mkdir dependencies % export OPENLANE_ROOT=$(pwd)/dependencies/openlane_src % export PDK_ROOT=$(pwd)/dependencies/pdks % export PDK=sky130B % make test (snip) make[2]: Entering directory '/foss/designs/caravel_user_project/dependencies/openlane_src' Makefile23 warning: undefined variable 'DOCKER_SWAP' Makefile26 warning: undefined variable 'DOCKER_MEMORY' Makefile42 warning: undefined variable 'ROUTING_CORES' /bin/sh: 1: docker: Permission denied make[2]: * [Makefile114 pull-openlane] Error 127 make[2]: Leaving directory '/foss/designs/caravel_user_project/dependencies/openlane_src' make[1]: * [Makefile84 openlane] Error 2 make[1]: Leaving directory '/foss/designs/caravel_user_project/openlane' make: * [Makefile181 openlane] Error 2 I also tried without changing environmental variables (means, OPENLANE_ROOT=/foss/tools/openlane and PDK_TOOR=/foss/pdks), but 'make setup' also stopped due to permission errors in openlane. Other tools, e.g. xschem, klayout, magic, are working, so I think docker-container was installed correctly. OS is Windows 11 and Docker desktop is v.4.17.1.
m
@Akira Tsuchiya I think I remember having a problem when
OPENLANE_ROOT
and
PDK_ROOT
were sub-directories of
caravel_user_project
. Can you try this?
Copy code
% mkdir openlane_test
% cd openlane_test
% mkdir dependencies
% export OPENLANE_ROOT=$PWD/dependencies/openlane_src
% export PDK_ROOT=$PWD/dependencies/pdks
% export PDK=sky130B
% git clone <https://github.com/fabless/caravel_user_project> -b mpw-9a
% cd caravel_user_project
% make setup
a
note that you cant run docker inside docker. I am not sure it is relevant to your issue, but it might be the reason
👍 1
a
@Mitch Bailey Thank you for your reply. That stopped at the same error... Stopped at docker, so maybe @Arman Avetisyan’s comment is correct. I thought there is a way to use OpenLane because IIC-OSIC-TOOLS lists OpenLane on the available tools. Do I need some tricks, like docker-in-docker or docker-outside-of-docker?
m
From the
caravel_user_project
directory, the Makefile targets are setup to be run outside of docker and call docker, as needed. If you want to run Openlane directly, you could try
make mount
in the openlane directory and then
cd
to the design directory (you might need to add mount points), and then run
flow.tcl
(the openlane script).
m
In the image,
OpenLane
is installed local without using
Docker
. Presumably the executed makefile tries to install a docker-based OL environment parallel to the available environment, and/or it wants to touch files in the /foss/tools path (no root permission by default, therefore it fails). Anyways.. after cloning, can you try cd'ing to
<cloning-path>/caravel_user_project/openlane
and execute
flow.tcl -design user_project_example -tag foo -overwrite
? I just tried that and the flow finishes
a
Thank you for comments. @Manuel M ‘s way works! I was stuck to complete
make user_proj_example
and running
flow.tcl
has slipped my head… Many thanks
a
I have the same issue and I couldn't find flow.tcl
Does anyone know how should I run make setup? I have the same issue
m
@Amirhossein zanjani Do you need to use
IIC-OSIC-TOOLS
? If not and you’re using *nix, this should work.
Copy code
git clone -b <tag> <https://github.com/efabless/caravel_user_project> --depth=1
cd caravel_user_project
make setup
where
<tag>
is
gfmpw-1c
for gf180 or
mpw-9f
for sky130. You might want to check your environment variables. These will override the
Makefile
defaults and may cause problems. Try `unset`ing and see if it makes a difference.
Copy code
env | grep ROOT
env | grep COMMIT
env | grep TAG
a
@Mitch Bailey firstly thank you very much for you help, really appreciate it. I tried it but I got the same error: rm: cannot remove '/foss/tools/openlane/2023.10/CONTRIBUTING.md': Permission denied make[1]: * [Makefile89 openlane] Error 1 make[1]: Leaving directory '/foss/designs/caravel/openlane' make: * [Makefile202 openlane] Error 2
also by running make pdk I get this: export CARAVEL_ROOT=/foss/designs/caravel/caravel && export MPW_TAG=mpw-9f && make -f /foss/designs/caravel/caravel/Makefile pdk make[1]: Entering directory '/foss/designs/caravel' if [ -d "/foss/pdks/skywater-pdk" ]; then\ echo "Deleting existing /foss/pdks/skywater-pdk" && \ rm -rf /foss/pdks/skywater-pdk && sleep 2;\ fi git clone https://github.com/google/skywater-pdk.git /foss/pdks/skywater-pdk fatal: could not create work tree dir '/foss/pdks/skywater-pdk': Permission denied make[1]: * [/foss/designs/caravel/caravel/Makefile1300 skywater-pdk] Error 128 make[1]: Leaving directory '/foss/designs/caravel' make: * [Makefile95 pdk] Error 2
m
Looks like you might have done something as
sudo
and installed as
root
. Are you installing for multiple users or just yourself?
a
It is just for me
m
Then I suggest deleting the
OPENLANE_ROOT
and
PDK_ROOT
directories and reinstalling in a place where you don’t need root permission.
🙏 1