<tnt>
So huh ... even the "good" sim doesn't look all that good when compared with behavioral (like using all source .v) : https://i.imgur.com/KKlVH6b.png
<tnt>
At least "latched_store" is present so at least the cpu doesn't seem to mind.
<tnt>
FWIW, I've confirmed on hw with a logic analyzer that the working/non-working case look indeed like the sim results above.
FabM has joined #yosys
<tnt>
So, the difference between behavioral & "good" seem to be solved by using a more recent yosys to pre-build pcpi_mul block. (I had used the first failing revision previously). Confirmed both in sim and on real hw.
<tnt>
(summary, now behavioral = synth good and synth bad = missing latched_store)
<tnt>
You synth mini_dut_wrap_bad you get the output optimized to 1'b0 (which is wrong). You synth mini_dut_wrap_good, you get the correct logic.
<gatecat>
nice, good work!
<tnt>
Tx. Creating an issue now with required file / Makefile to reproduce easily.
Martoni42 has joined #yosys
FabM has quit [Read error: Connection reset by peer]
<tnt>
Note that the commit I pointed to earlier (new DFF OPT pass) has nothing to do with it ... it just made better DFF optimization and realized the two FF were the same and so used the same one for both signals, triggering this bug.
<tnt>
I'm going to go with OPT_MUXTREE ... this looks suspicious "Replacing known input bits on port B of cell $flatten\dut_I.$procmux$427: { \pcpi_wr 1'0 } -> 2'00"
<gatecat>
yeah
<mwk>
oh joy
<mwk>
okay, good
<mwk>
I was looking for an excuse to replace opt_muxtree with something much more powerful
<mwk>
ohhh wait, it involves parallel_case
<mwk>
... parallel_case with one input 0, that shouldn't matter
<tnt>
yeah, and if you remove that '0' input ... it works.