efabless / caravel_user_project

https://caravel-user-project.readthedocs.io
Apache License 2.0
184 stars 329 forks source link

make setup failing with gf180mcuC pdk #179

Closed proppy closed 2 years ago

proppy commented 2 years ago

The make setup step seems to current failes with PDK=gf180mcuC:

(env) caravel_user_project šŸ™ mkdir dependencies
(env) caravel_user_project šŸŠ export OPENLANE_ROOT=$(pwd)/dependencies/openlane_src
(env) caravel_user_project šŸŠ export PDK_ROOT=$(pwd)/dependencies/pdks
(env) caravel_user_project šŸ™ export PDK=gf180mcuC
(env) caravel_user_project šŸ” make setup
if [ -d "/home/proppy/src/github.com/efabless/caravel_user_project/caravel" ]; then\
        echo "Deleting exisiting /home/proppy/src/github.com/efabless/caravel_user_project/caravel" && \
        rm -rf /home/proppy/src/github.com/efabless/caravel_user_project/caravel && sleep 2;\
fi
Deleting exisiting /home/proppy/src/github.com/efabless/caravel_user_project/caravel
echo "Installing caravel.."
Installing caravel..
git clone -b gfmpw-0a https://github.com/efabless/caravel-gf180mcu /home/proppy/src/github.com/efabless/caravel_user_project/caravel --depth=1
Cloning into '/home/proppy/src/github.com/efabless/caravel_user_project/caravel'...
remote: Enumerating objects: 447, done.
remote: Counting objects: 100% (447/447), done.
remote: Compressing objects: 100% (312/312), done.
remote: Total 447 (delta 125), reused 442 (delta 125), pack-reused 0
Receiving objects: 100% (447/447), 46.20 MiB | 15.52 MiB/s, done.
Resolving deltas: 100% (125/125), done.
Note: switching to '05d367596469d864cf17b895ca890e2719bbb649'.

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/proppy/src/github.com/efabless/caravel_user_project/caravel && make -f /home/proppy/src/github.com/efabless/caravel_user_project/caravel/Makefile check-env
make[1]: Entering directory '/home/proppy/src/github.com/efabless/caravel_user_project'
make[1]: Nothing to be done for 'check-env'.
make[1]: Leaving directory '/home/proppy/src/github.com/efabless/caravel_user_project'
export CARAVEL_ROOT=/home/proppy/src/github.com/efabless/caravel_user_project/caravel && make -f /home/proppy/src/github.com/efabless/caravel_user_project/caravel/Makefile install_mcw
make[1]: Entering directory '/home/proppy/src/github.com/efabless/caravel_user_project'
if [ -d "/home/proppy/src/github.com/efabless/caravel_user_project/mgmt_core_wrapper" ]; then \
        echo "Deleting exisiting /home/proppy/src/github.com/efabless/caravel_user_project/mgmt_core_wrapper" && \
        rm -rf /home/proppy/src/github.com/efabless/caravel_user_project/mgmt_core_wrapper && sleep 2;\
fi
Deleting exisiting /home/proppy/src/github.com/efabless/caravel_user_project/mgmt_core_wrapper
Installing mcw-litex-vexriscv..
Cloning into '/home/proppy/src/github.com/efabless/caravel_user_project/mgmt_core_wrapper'...
remote: Enumerating objects: 180, done.
remote: Counting objects: 100% (180/180), done.
remote: Compressing objects: 100% (129/129), done.
remote: Total 180 (delta 44), reused 176 (delta 44), pack-reused 0
Receiving objects: 100% (180/180), 33.08 MiB | 15.82 MiB/s, done.
Resolving deltas: 100% (44/44), done.
make[1]: Leaving directory '/home/proppy/src/github.com/efabless/caravel_user_project'
cd openlane && make openlane
make[1]: Entering directory '/home/proppy/src/github.com/efabless/caravel_user_project/openlane'
if [ -d "/home/proppy/src/github.com/efabless/caravel_user_project/dependencies/openlane_src" ]; then\
        echo "Deleting exisiting /home/proppy/src/github.com/efabless/caravel_user_project/dependencies/openlane_src" && \
        rm -rf /home/proppy/src/github.com/efabless/caravel_user_project/dependencies/openlane_src && sleep 2; \
        fi
git clone https://github.com/The-OpenROAD-Project/OpenLane -b 2022.10.20 --depth=1 /home/proppy/src/github.com/efabless/caravel_user_project/dependencies/openlane_src && \
        cd /home/proppy/src/github.com/efabless/caravel_user_project/dependencies/openlane_src && \
        export OPENLANE_IMAGE_NAME=efabless/openlane:2022.10.20 && \
        export IMAGE_NAME=efabless/openlane:2022.10.20 && \
        make pull-openlane
Cloning into '/home/proppy/src/github.com/efabless/caravel_user_project/dependencies/openlane_src'...
remote: Enumerating objects: 502, done.
remote: Counting objects: 100% (502/502), done.
remote: Compressing objects: 100% (419/419), done.
remote: Total 502 (delta 76), reused 294 (delta 35), pack-reused 0
Receiving objects: 100% (502/502), 3.02 MiB | 8.46 MiB/s, done.
Resolving deltas: 100% (76/76), done.
Note: switching to 'daae2154590cf20e0c20b77e3fc02b6526ad09af'.

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/proppy/src/github.com/efabless/caravel_user_project/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:69: warning: undefined variable 'STD_CELL_LIBRARY'
2022.10.20: Pulling from efabless/openlane
Digest: sha256:5fa3052e5f1c106a36a7667eb567fd848fee06e6400707deefc915e3ab5aeb58
Status: Image is up to date for efabless/openlane:2022.10.20
docker.io/efabless/openlane:2022.10.20
make[2]: Leaving directory '/home/proppy/src/github.com/efabless/caravel_user_project/dependencies/openlane_src'
make[1]: Leaving directory '/home/proppy/src/github.com/efabless/caravel_user_project/openlane'
export CARAVEL_ROOT=/home/proppy/src/github.com/efabless/caravel_user_project/caravel && make -f /home/proppy/src/github.com/efabless/caravel_user_project/caravel/Makefile pdk-with-volare
make[1]: Entering directory '/home/proppy/src/github.com/efabless/caravel_user_project'
python3 -m pip install --upgrade volare
Collecting volare
  Using cached volare-0.4.1-py3-none-any.whl (25 kB)
Collecting click<9,>=8.0.0
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting pyyaml~=5.4.0
  Using cached PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl (630 kB)
Collecting rich~=10.16.0
  Using cached rich-10.16.2-py3-none-any.whl (214 kB)
Collecting pcpp~=1.30
  Using cached pcpp-1.30-py2.py3-none-any.whl (91 kB)
Collecting click-default-group~=1.2.2
  Using cached click_default_group-1.2.2-py3-none-any.whl
Collecting requests<3,>=2.27.0
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Collecting commonmark<0.10.0,>=0.9.0
  Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Collecting colorama<0.5.0,>=0.4.0
  Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting pygments<3.0.0,>=2.6.0
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Installing collected packages: urllib3, pygments, idna, commonmark, colorama, click, charset-normalizer, certifi, rich, requests, pyyaml, pcpp, click-default-group, volare
Successfully installed certifi-2022.9.24 charset-normalizer-2.1.1 click-8.1.3 click-default-group-1.2.2 colorama-0.4.6 commonmark-0.9.1 idna-3.4 pcpp-1.30 pygments-2.13.0 pyyaml-5.4.1 requests-2.28.1 rich-10.16.2 urllib3-1.26.12 volare-0.4.1
Version 0059588eebfc704681dc2368bd1d33d96281d10f not found either locally or remotely.
Version 0059588eebfc704681dc2368bd1d33d96281d10f not found either locally or remotely.
Try volare build 0059588eebfc704681dc2368bd1d33d96281d10f.
make[1]: *** [/home/proppy/src/github.com/efabless/caravel_user_project/caravel/Makefile:1267: pdk-with-volare] Error 1
make[1]: Leaving directory '/home/proppy/src/github.com/efabless/caravel_user_project'
make: *** [Makefile:84: pdk-with-volare] Error 2

I believe this is is due to https://github.com/efabless/volare/releases and https://github.com/efabless/volare/releases?page=2 not contained any gf180mcu- release for the 0059588eebfc704681dc2368bd1d33d96281d10f commit.

See:

(env) caravel_user_project šŸŠ volare ls-remote
Pre-built sky130 PDK versions                                                                                                                                                                         
ā”œā”€ā”€ 0059588eebfc704681dc2368bd1d33d96281d10f (2022.10.22)                                                                                                                                             
ā”œā”€ā”€ a56526bfe45971322526978132b059d43ddd3a02 (2022.10.19)                                                                                                                                             
ā”œā”€ā”€ de752ec0ba4da0ecb1fbcd309eeec4993d88f5bc (2022.10.09)                                                                                                                                             
ā”œā”€ā”€ d7c3a52fba997de2bfc15c375a052215528216ac (2022.10.01)                                                                                                                                             
ā”œā”€ā”€ f6e269f48d542b306e08e8f5a3577ec244aa44aa (2022.09.29)                                                                                                                                             
ā”œā”€ā”€ 41e2da101560ea1b890dd9f34f6b5adec5016eea (2022.09.23)                                                                                                                                             
ā”œā”€ā”€ 120b0bd69c745825a0b8b76f364043a1cd08bb6a (2022.09.22)                                                                                                                                             
ā”œā”€ā”€ 8f6aff1881e5feae49acb6d5be53c4acc91bb235 (2022.09.21)                                                                                                                                             
ā”œā”€ā”€ 82d61e2c9c265c0f0e994233cd2d024c90adb45f (2022.09.16)                                                                                                                                             
ā”œā”€ā”€ fa87f8f4bbcc7255b6f0c0fb506960f531ae2392 (2022.09.06)                                                                                                                                             
ā”œā”€ā”€ 6d1673c46e5c420f08c0af3c8f9f759d2ab8bb40 (2022.09.06)                                                                                                                                             
ā”œā”€ā”€ 44a43c23c81b45b8e774ae7a84899a5a778b6b0b (2022.08.16)                                                                                                                                             
ā”œā”€ā”€ e8294524e5f67c533c5d0c3afa0bcc5b2a5fa066 (2022.07.29)                                                                                                                                             
ā”œā”€ā”€ 41c0908b47130d5675ff8484255b43f66463a7d6 (2022.04.14)                                                                                                                                             
ā”œā”€ā”€ 660c6bdc8715dc7b3db95a1ce85392bbf2a2b195 (2022.04.08)                                                                                                                                             
ā”œā”€ā”€ 5890e791e37699239abedfd2a67e55162e25cd94 (2022.04.06)                                                                                                                                             
ā”œā”€ā”€ 8fe7f760ece2bb49b1c310e60243f0558977dae5 (2022.04.06)                                                                                                                                             
ā””ā”€ā”€ 7519dfb04400f224f140749cda44ee7de6f5e095 (2022.02.10)                                                                                                                                             
(env) caravel_user_project šŸ” volare ls-remote --pdk gf180
Pre-built gf180 PDK versions  

The only currently published version as of date is the following pre-release: https://github.com/efabless/volare/releases/tag/gf180mcu-120b0bd69c745825a0b8b76f364043a1cd08bb6a

And looking at the volare source code there doesn't seems to be any alternative way to "list" the remote PDK other than fetching them from the GitHub release API endpoint: https://github.com/efabless/volare/blob/main/volare/common.py#L90

Updating the Makefile to match this (as in https://github.com/efabless/caravel_user_project/pull/175) workaround the issue and allow to complete the hardening flow (see https://github.com/efabless/caravel_user_project/pull/175#issuecomment-1301803114).

jeffdi commented 2 years ago

The issue with the missing prebuilt pdk has been addressed. See below...

$ volare ls-remote --pdk gf180mcu Pre-built gf180mcu PDK versions
ā”œā”€ā”€ PRE-RELEASE 0059588eebfc704681dc2368bd1d33d96281d10f (2022.10.22) (enabled)
ā””ā”€ā”€ PRE-RELEASE 120b0bd69c745825a0b8b76f364043a1cd08bb6a (2022.09.22)
$

jeffdi commented 2 years ago

https://github.com/efabless/volare/releases/tag/sky130-0059588eebfc704681dc2368bd1d33d96281d10f

proppy commented 2 years ago

https://github.com/efabless/volare/releases/tag/sky130-0059588eebfc704681dc2368bd1d33d96281d10f

you mean https://github.com/efabless/volare/releases/tag/gf180mcu-0059588eebfc704681dc2368bd1d33d96281d10f ?