https://open-source-silicon.dev logo
Title
d

Dorin Emil Calbaza

02/22/2023, 12:21 AM
Hello all, I am new to efabless, but I have some experience with ASIC designs, I taped out more than a handful of analog mixed signals designs in various technologies. I am new to setting up an environment using github, python and docker. I ran into a setup issue and I would appreciate some help. These are the steps and the issue I ran into: 0. I use a ubuntu 20.04.5 LTS installed under an Oracle VirtualBox on a Windows 11 operating system. Python command runs as python3 1. I created a new repository based on the caravel_user_project 2. I followed the steps until <make setup> command and verified they ran without errors. the environment variables were set properly 3. I ran the setup command and got some warnings regarding Docker, 4. There are errors regarding permission denied to access Docker daemon Could you hint me as what I am not setting up properly? Below is an excerpt of the terminal window messages: **************************************************************************************** ~/Documents/ASIC_Projects$ cd caravel_tutorial/ ~/Documents/ASIC_Projects/caravel_tutorial$ mkdir dependencies ~/Documents/ASIC_Projects/caravel_tutorial$ export OPENLANE_ROOT=$(pwd)/dependencies/openlane_src ~/Documents/ASIC_Projects/caravel_tutorial$ export PDK_ROOT=$(pwd)/dependencies/pdks ~/Documents/ASIC_Projects/caravel_tutorial$ export PDK=sky130A ~/Documents/ASIC_Projects/caravel_tutorial$ make setup if [ -d "/home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel" ]; then\ echo "Deleting exisiting /home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel" && \ rm -rf /home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel && sleep 2;\ fi echo "Installing caravel-lite.." Installing caravel-lite.. git clone -b mpw-8c https://github.com/efabless/caravel-lite /home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel --depth=1 Cloning into '/home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel'... remote: Enumerating objects: 536, done. remote: Counting objects: 100% (536/536), done. remote: Compressing objects: 100% (383/383), done. remote: Total 536 (delta 164), reused 333 (delta 100), pack-reused 0 Receiving objects: 100% (536/536), 28.28 MiB | 8.75 MiB/s, done. Resolving deltas: 100% (164/164), done. Note: switching to '1e3103fd5ffa56f72e2b38e804c9c7bb2738e32a'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false export CARAVEL_ROOT=/home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel && make -f /home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel/Makefile check-env make[1]: Entering directory '/home/dorin/Documents/ASIC_Projects/caravel_tutorial' make[1]: Nothing to be done for 'check-env'. make[1]: Leaving directory '/home/dorin/Documents/ASIC_Projects/caravel_tutorial' export CARAVEL_ROOT=/home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel && make -f /home/dorin/Documents/ASIC_Projects/caravel_tutorial/caravel/Makefile install_mcw make[1]: Entering directory '/home/dorin/Documents/ASIC_Projects/caravel_tutorial' if [ -d "/home/dorin/Documents/ASIC_Projects/caravel_tutorial/mgmt_core_wrapper" ]; then \ echo "Deleting exisiting /home/dorin/Documents/ASIC_Projects/caravel_tutorial/mgmt_core_wrapper" && \ rm -rf /home/dorin/Documents/ASIC_Projects/caravel_tutorial/mgmt_core_wrapper && sleep 2;\ fi Installing mcw-litex-vexriscv.. Cloning into '/home/dorin/Documents/ASIC_Projects/caravel_tutorial/mgmt_core_wrapper'... remote: Enumerating objects: 866, done. remote: Counting objects: 100% (866/866), done. remote: Compressing objects: 100% (582/582), done. remote: Total 866 (delta 334), reused 659 (delta 271), pack-reused 0 Receiving objects: 100% (866/866), 488.64 MiB | 7.40 MiB/s, done. Resolving deltas: 100% (334/334), done. Note: switching to '453e4cca7d165db005492cd1a93a3a8aed710e2b'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false Updating files: 100% (794/794), done. make[1]: Leaving directory '/home/dorin/Documents/ASIC_Projects/caravel_tutorial' cd openlane && make openlane make[1]: Entering directory '/home/dorin/Documents/ASIC_Projects/caravel_tutorial/openlane' if [ -d "/home/dorin/Documents/ASIC_Projects/caravel_tutorial/dependencies/openlane_src" ]; then\ echo "Deleting exisiting /home/dorin/Documents/ASIC_Projects/caravel_tutorial/dependencies/openlane_src" && \ rm -rf /home/dorin/Documents/ASIC_Projects/caravel_tutorial/dependencies/openlane_src && sleep 2; \ fi git clone https://github.com/The-OpenROAD-Project/OpenLane -b 2023.02.14 --depth=1 /home/dorin/Documents/ASIC_Projects/caravel_tutorial/dependencies/openlane_src && \ cd /home/dorin/Documents/ASIC_Projects/caravel_tutorial/dependencies/openlane_src && \ export OPENLANE_IMAGE_NAME=efabless/openlane:2023.02.14 && \ export IMAGE_NAME=efabless/openlane:2023.02.14 && \ make pull-openlane Cloning into '/home/dorin/Documents/ASIC_Projects/caravel_tutorial/dependencies/openlane_src'... remote: Enumerating objects: 551, done. remote: Counting objects: 100% (551/551), done. remote: Compressing objects: 100% (477/477), done. remote: Total 551 (delta 76), reused 303 (delta 25), pack-reused 0 Receiving objects: 100% (551/551), 10.84 MiB | 8.74 MiB/s, done. Resolving deltas: 100% (76/76), done. Note: switching to '4cd0986b3ae550cdf7a6d0fba4e0657012f635d8'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false make[2]: Entering directory '/home/dorin/Documents/ASIC_Projects/caravel_tutorial/dependencies/openlane_src' Makefile:23: warning: undefined variable 'DOCKER_SWAP' Makefile:26: warning: undefined variable 'DOCKER_MEMORY' Makefile:42: warning: undefined variable 'ROUTING_CORES' Makefile:84: warning: undefined variable 'STD_CELL_LIBRARY' permission denied while trying to connect to the Docker daemon socket at unix😕//var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/create?fromImage=efabless%2Fopenlane&amp;tag=2023.02.14": dial unix /var/run/docker.sock: connect: permission denied make[2]: * [Makefile:114: pull-openlane] Error 1 make[2]: Leaving directory '/home/dorin/Documents/ASIC_Projects/caravel_tutorial/dependencies/openlane_src' make[1]: * [Makefile:84: openlane] Error 2 make[1]: Leaving directory '/home/dorin/Documents/ASIC_Projects/caravel_tutorial/openlane' make: * [Makefile:180: openlane] Error 2
p

Philipp Gühring

02/22/2023, 12:26 AM
Hello and welcome! Are you targeting sky130 or gf180? How much RAM did you allocate to the virtual machine in VirtualBox?
I think DOCKER_SWAP and DOCKER_MEMORY are not needed (at least I didn't need them yet). With ROUTING_CORES you could define how many parallel CPU cores should be used for routing (you might want to increase it if you still have enough RAM left and the processor utilisation isn't too high).
But the STD_CELL_LIBRARY is an interesting option which I would suggest to set now, there you can define which standard cell library should be used.
Regarding the permission errors, I would suggest to try it as root (by using "su" or "sudo"), or you could try to add your username to the "docker" group in /etc/group
d

Dorin Emil Calbaza

02/22/2023, 1:24 AM
Thanks, will ty to add myself to docker group. sudo or su root did not work. As for RAM, standard cells, etc... I just want to get a feel how the tools work: openlane, magic, layout and simulators first, then will try to submit something
I added myself as user in the docker group, deleted the folder and started from git. I get the same warning and errors. I could not find the command that calls the docker daemon.
p

Philipp Gühring

02/22/2023, 7:49 AM
Have you installed docker already?
d

Dorin Emil Calbaza

02/22/2023, 1:10 PM
Yes, I found out that I needed to add myself to the docker group My issues came from a fresh installation of UBUNTU. It has python, but also needs pip. I list below the commands that add docker and pip in ubuntu, as well as what is needed to make them work properly. After that I was able to run make setup without issues.: **************************************************
# Commands to install docker and python pip module in Ubuntu. They are needed!
# docker, install and adding user_name to docker group
sudo apt-get remove docker docker-engine <http://docker.io|docker.io> containerd runc
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli <http://containerd.io|containerd.io> docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker <user_name>
sudo docker run hello-world
# install pip
sudo apt update
sudo apt install python3-pip
sudo usermod -aG docker dorin
python3 -m pip --version
# good time to reset your ubuntu
👍 1