ChanServ changed the topic of #yosys to: Yosys Open SYnthesis Suite: https://github.com/YosysHQ/yosys/ | Channel logs: https://libera.irclog.whitequark.org/yosys/
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
stroboko1p has joined #yosys
lkcl_ has quit [Ping timeout: 272 seconds]
strobokopp has quit [Ping timeout: 245 seconds]
lkcl_ has joined #yosys
<cr1901> >Info: Running timing-driven placement optimisation...
<cr1901> Is this a new string in nextpnr?
jophish has quit [Ping timeout: 264 seconds]
jryans has quit [Ping timeout: 244 seconds]
promach[m] has quit [Ping timeout: 244 seconds]
emilazy has quit [Ping timeout: 264 seconds]
<tnt> cr1901: huh no ?
<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)
promach[m] has joined #yosys
jophish has joined #yosys
emilazy has joined #yosys
jryans has joined #yosys
lkcl_ has quit [Ping timeout: 252 seconds]
lkcl_ has joined #yosys
<tnt> removing (* parallel_case *) there https://github.com/cliffordwolf/picorv32/blob/master/picorv32.v#L331 fixes the issue. (or rather doesn't exhibit it anymore)
<tpb> <https://x0.no/4uxpu> (at github.com)
<tnt> Boiled it down to a reproducer in 50 lines of verilog ... https://pastebin.com/NijQ0nz1
<tpb> Title: `default_nettype nonemodule mini_dut( input wire pcpi_wr, input - Pastebin.com (at pastebin.com)
<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> mwk: so you're in the clear :p
Martoni42 is now known as FabM
<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.
<gatecat> https://github.com/YosysHQ/yosys/blob/master/passes/opt/opt_muxtree.cc#L375-L376 looks questionable, port_off/port_idx won't be updated for constant inputs, I think
<tpb> <https://x0.no/4uxq9> (at github.com)
<gatecat> don't fully understand its logic though
<mwk> yeah, definitely suspect
<mwk> hm
<mwk> that'd be an easy fix though
<gatecat> mwk: how does https://github.com/YosysHQ/yosys/pull/2825 look ?
<mwk> gatecat: ... just wrote the exact same thing
<gatecat> oops
<mwk> but yeah, looks fine
<mwk> except it may merit a regression test
<mwk> which I'm writing right now
<mwk> gatecat: how about throw in https://gist.github.com/mwkmwkmwk/2a77e94f1194ebfe9822394899c64f63 as tests/opt/bug2824.ys ?
<tpb> <https://x0.no/4uxqb> (at gist.github.com)
<gatecat> sure, do you want to push it to that branch?
<mwk> hmm
<mwk> right, this is just a branch in the main repo, I can check it out and push it, correct?
<gatecat> yeah
<mwk> gatecat: also your PR is missing "Fixes #2824" in the description
<gatecat> updated, thanks
<mwk> I pushed the commit
lkcl_ has quit [Ping timeout: 244 seconds]
lkcl_ has joined #yosys
<mwk> gatecat: i think the PR is ready to merge?
<gatecat> mwk: yep done
<mwk> good :)
<tnt> Damnit, I built yosys last week but the name/email change triggers a full tree rebuild.
<mwk> welp
lkcl_ has quit [Ping timeout: 252 seconds]
<mwk> ... every day spent developing yosys I'm more happy about my decision to get a ryzen last fall
* tnt is on a 6y old i7-4600U laptop
lkcl_ has joined #yosys
lkcl_ has quit [Ping timeout: 244 seconds]
lkcl_ has joined #yosys
<tnt> gatecat / mwk: Just confirmed the fix (on all intermediate testbenches I had and on the actual hardware/project I was originally working on).
<tnt> Thanks !
sm2n has quit [Ping timeout: 245 seconds]
<mwk> great, thanks for the report and diagnosis
<mwk> !
lkcl_ has quit [Ping timeout: 264 seconds]
lkcl_ has joined #yosys
FabM has quit [Quit: Leaving]
Guest43 has joined #yosys
lkcl_ has quit [Ping timeout: 252 seconds]
lkcl_ has joined #yosys
Guest43 has quit [Quit: Client closed]
Guest43 has joined #yosys
mwk_ has joined #yosys
ZipCPU_ has joined #yosys
emilazy has quit [*.net *.split]
GenTooMan has quit [*.net *.split]
jryans has quit [*.net *.split]
cr1901 has quit [*.net *.split]
ZipCPU has quit [*.net *.split]
mwk has quit [*.net *.split]
ZipCPU_ is now known as ZipCPU
GenTooMan has joined #yosys
jryans has joined #yosys
emilazy has joined #yosys
Guest43 has quit [Quit: Client closed]
mwk_ is now known as mwk
cr1901 has joined #yosys
GenTooMan has quit [Quit: Leaving]
GenTooMan has joined #yosys
freemint has joined #yosys
stroboko1p has quit [Ping timeout: 252 seconds]
strobokopp has joined #yosys
strobokopp has quit [Read error: Connection reset by peer]
strobokopp has joined #yosys
sm2n has joined #yosys