nextpnr-mistral defaulted to UNCOMPRESSED RBFs (--compress-rbf opted in
to compression). An uncompressed bitstream configures the device (the
socfpga FPGA manager reports 'operating'), but on the FPGA-manager load
path it leaves user IO non-functional — verified on a DE10-Nano/MiSTer:
an uncompressed single-LED design stays dark, the byte-identical
compressed encoding lights it. Quartus also emits compressed.
OPT_B already tracked the compression choice in-tree (the compressed
branch set the same OPT_B value Quartus uses), so this is purely a
default flip: read a new 'uncompressed_rbf' opt-out instead of a
'compress_rbf' opt-in. --compress-rbf is kept as a deprecated no-op;
--uncompressed-rbf restores the old behaviour for debugging.
Verified: regenerating a design with no flags now produces bytes
identical to a bitstream confirmed working on silicon.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
POSIX allows any `int` value to be returned but specifies that only
the low 8 bits are available in some contexts:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/_exit.html
For reasons that aren't entirely clear, WASI requires the value to be
in range [0;126), and this is enforced with an assertion at runtime
level in Wasmtime. This should probably be fixed in Wasmtime but until
it is done there doesn't seem to be any harm in returning `125` instead
of `-1`. This also removes any discrepancy due to truncation.
* generic: Fix Python path not including the examples/ directory in the example
It seems that at some point, the embedded Python stopped including the
directory that nextpnr-generic was executed in inside of its sys.path.
This likely happened by de3d5be8 specifying an explicit argv to
the interpreter init function.
* generic: Improve the example for K != 4
Configuring K < 4 used to result in "dangling" inputs to the cells being
generated (those are just not driven by anything in the resulting Verilog/JSON).
Configuring K > 4 used to result in an assertion crash in cells.cc.
The ctx.setLutK call fixes both cases.
Define open_(o|i)fstream_and_log_error in log.h to:
- quote 'filename'
- add error cause to easier troubleshoot
- use existing consistent string style
- easily allows OS specific message
Introduce it when file are opened and add it where error message
was missing.
* gatemate: removing recursion in GateMateImpl::reassign_bridges
* gatemate: improving comments in GateMateImpl:reassign_bridges
* gatemate: making naming more consistent, adding comments about the need for recursion removal