Open DavidPowell opened 4 years ago
What's the yowasp-nextpnr-ice40
command line you use?
Ah, sorry, I didn't your comment carefully. That's expected behavior at the moment. Until WASM has support for C++ exceptions, all errors will end up in WASM traps.
The original error is easily worked around, however it seems that yosys/nextpnr often generate C++ exceptions. For example, I ran nmigen's 01_blinky.py
example (which required changing "led"
to "user_led"
) and it failed when writing the blif file. Is this expected behaviour?
Yep. Until WASM gets first-class exceptions I'm afraid that's what's going to happen. I tried to get it a bit better where possible, but the amount of hacks I'm willing to add (and the upstream is willing to accept) is limited...
A note for anyone else finding that WASM traps are constantly generated.
In my previous comment, it seemed that C++ exceptions were generated very frequently, and I found that yowasp-nextpnr was unusable from nmigen. This was due to installing nmigen from pip (right now the pip version is ~5 months old).
Once I updated to the git version of nmigen, and now that YoWASP/yosys#1 is fixed, nmigen's blinky example now runs and uploads fine, rather than crashing during the writing of the blif file.
Ah, interesting! I indeed have not tested with nmigen 0.2. Nmigen 0.3 is going to be released soon, so that should not be a problem anymore after that.
This will be fixed when https://github.com/WebAssembly/wasi-sdk/pull/198 is merged and exception handling support lands in wasmtime.
Thanks for all the hard work making this package available.
I installed only one package with the command
pip install yowasp-nextpnr-ice40-8k
, on Windows 10 x64, Anaconda Python 3.7 (same result for 3.8). It installsyowasp_nextpnr_ice40_8k-0.0.post2625.dev9-py3-none-any.whl
I then run
yowasp-nextpnr-ice40
. It prints out the full list of command line options, then prints out the following error message:where
<my home>
represents my windows home folder.If I run
pip install yowasp-nextpnr-ice40-all
, then the error no longer occurs.