Open cr1901 opened 2 months ago
(this reply is mostly me thinking out loud, in the hopes that if I get distracted I can come back to this and not have to redo too much work)
So, the quirky bit of the testcase here is that you have two wires: \outp__payload
and \outp__payload[0]
.
Inside the AIGER parser there is a little section of code which assumes that if it has encountered a wire before, it is the least significant bit of a wide wire, and renames it accordingly:
except here it renames \outp__payload
to \outp__payload[0]
, which is a wire that already exists, and so Yosys asserts.
Fix ideas:
\outp__payload[0]
is an alias of \outp__payload
, so it's actually okay to use it here, I think. But how do I detect that? SigMap
?opt_clean -purge
, which resolves the aliasing and the problem goes away in both testcases.Temporary workaround: Something like yosys -p "synth_ice40 -run :coarse; opt_clean -purge; synth_ice40 -run coarse:" input.v
Version
Yosys 0.40+25 (git sha1 171577f90, sccache x86_64-w64-mingw32-g++ 13.2.0 -Os)
On which OS did this happen?
Windows
Reproduction Steps
Save this file as
bad.rtlil
:Run
yosys -f rtlil -p synth_ice40 bad.rtlil
Expected Behavior
_
bad.rtlil
is a testcase generated byyosys -p 'hierarchy; bugpoint -command "synth_ice40"; write_rtlil bad.rtlil' b2tob1000.v
_. I expectyosys
to successfully synthesize theb2tob1000.v
and get to thestats
pass without crashing. I provideb2tob1000.v
here.Actual Behavior
When I run either
bad.rtlil
(see Reproduction Steps) orb2tob1000.v
(yosys -p synth_ice40 b2tob1000.v
), I instead get a crash similar to the following:This is independent of OS.
Additional Context
For the
b2tob1000.v
case, I have locally bisected the bug to commit 8e470add4d1.