Closed Bugbrother closed 4 years ago
I'll look into a fix (a rewrite of the JSON parser is on my TODO list too). In the mean time a workaround should be read_verilog -lib +/ice40/cells_sim.v; read_blif netlist.blif; write_json netlist.json
to make sure it has the iCE40 blackboxes available.
Although nextpnr still cannot import a netlist without port directions (which are lost in the BLIF translation), I don't see this being a particular requirement and the above workaround should solve it anyway. Closing as the new frontend gives an appropriate error rather than a segfault.
When migrating from arachne-pnr to nextpnr, loading a netlist that was converted to JSON, a segfault is triggered at line 624 of
jsonparse.cc
:the
pdir_node
pointer is initialized to NULL at line 598 and and its value modified using:The two conditions not being mutually exclusive, the pointer can remain set to NULL and when checked at line 624, trigger a segfault.
The netlist has been converted from BLIF to JSON using yosys (
read_blif netlist.blif; write_json netlist.json
) and was properly processed by arachne before.Not knowing the internals of the JSON parser, I'm not able to fix the issue myself...