YosysHQ / apicula

Project Apicula 🐝: bitstream documentation for Gowin FPGAs
MIT License
482 stars 66 forks source link

Missing Apycula file when compiling nextpnr_gowin #187

Closed philiprbrenan closed 1 year ago

philiprbrenan commented 1 year ago

I am trying to compile nextpnr-gowin after installing apycula using this github action:

https://github.com/philiprbrenan/nextPnr/actions/runs/5565472535/jobs/10165851576

The compilation process terminates with the following message concerning an apycula file:

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/dist-packages/apycula/GW2A-18.pickle'

Please tell me how to obtain this file?

yrabbit commented 1 year ago

This file should be in the apicula 0.8.2a1 release. The non-standard way is to download gw2a-18-chipdb from artifacts. https://github.com/YosysHQ/apicula/actions/runs/5311060550#artifacts

mulianov commented 1 year ago

This leads to [ 1%] Generating chipdb/chipdb-GW2A-18.bba [ 3%] Built target bbasm Traceback (most recent call last): File "/home/user/.local/venv/bin/gowin_bba", line 8, in sys.exit(main()) ^^^^^^ File "/home/user/.local/venv/lib/python3.11/site-packages/apycula/gowin_bba.py", line 258, in main db = pickle.load(f) ^^^^^^^^^^^^^^ _pickle.UnpicklingError: invalid load key, '\x1f'.

nextpnr version is commit 54b2045726fc3fe77857c05c81a5ab77e98ba851 (HEAD -> master, origin/master, origin/HEAD)

Is there any known to work combination of versions for GW2A?

yrabbit commented 1 year ago

apicula 0.8.2a1 release + nextpnr master.

mulianov commented 1 year ago

@yrabbit In message above there is the result of such combination - "_pickle.UnpicklingError: invalid load key, '\x1f'."

yrabbit commented 1 year ago

This error message indicates that there is an attempt to open the chip base zip file in the usual way as an unpackaged file.

You can see for yourself. shot-0

nextpnr uses gowin_bba from apicula installed on your computer, and if it is 0.8.2a1, it is very unlikely that it uses unpackaged database loading.

And you can find all gowin_bba.py on your computer and check that it is version 0.8.2a1 by looking at line 258.

https://github.com/YosysHQ/apicula/blob/87131a1f997eebe1d9a6b4fc2f55a211eeeb962f/apycula/gowin_bba.py#L258