*** tpb has joined #yosys | 00:00 | |
*** emeb has quit IRC | 00:07 | |
*** emeb_mac has joined #yosys | 00:28 | |
*** _whitelogger has quit IRC | 01:42 | |
*** _whitelogger has joined #yosys | 01:44 | |
*** indy has quit IRC | 02:15 | |
*** indy has joined #yosys | 02:20 | |
*** jakobwenzel has quit IRC | 02:58 | |
*** jakobwenzel has joined #yosys | 02:58 | |
*** PyroPeter has quit IRC | 03:13 | |
*** alexhw has quit IRC | 03:18 | |
*** _whitelogger has quit IRC | 03:18 | |
*** show has quit IRC | 03:20 | |
*** alexhw has joined #yosys | 03:21 | |
*** PyroPeter has joined #yosys | 03:26 | |
*** citypw has joined #yosys | 03:27 | |
*** show has joined #yosys | 03:31 | |
*** _whitelogger has joined #yosys | 04:35 | |
*** citypw has quit IRC | 04:50 | |
pepijndevos[m] | That's an interesting observation. But could be said of simulated hdl too, so I think it's more about semantics. Vhdl doesn't have pointers for example ;) So it seems like you could design a language to be easy to optimise. What's interesting is that they are not functional languages, which have easy to reason about side effects too. | 05:04 |
---|---|---|
*** Jybz has joined #yosys | 05:13 | |
*** citypw has joined #yosys | 05:53 | |
corecode | they don't have any? | 06:33 |
corecode | simple answer :) | 06:33 |
*** citypw has quit IRC | 06:50 | |
*** emeb_mac has quit IRC | 07:06 | |
*** dys has joined #yosys | 07:24 | |
*** cr1901_modern has quit IRC | 08:00 | |
pepijndevos | Anyone wants to play a game of "why did the compiler delete my code?" haha | 08:54 |
tnt | sure :) | 08:56 |
pepijndevos | tnt, there you go https://paste.ubuntu.com/p/xZFtMnMdsm/ | 08:58 |
tpb | Title: Ubuntu Pastebin (at paste.ubuntu.com) | 08:58 |
pepijndevos | The problem is the input to the assert statement gets optimized to 1'1 | 08:58 |
pepijndevos | (note the initial value on the dff) | 08:58 |
pepijndevos | ($auto$ghdl.cc:290:import_module$4) | 08:59 |
tnt | wtf is this ? | 09:00 |
mwk | RTLIL I suppose | 09:01 |
pepijndevos | original source: https://github.com/ghdl/ghdl/blob/master/testsuite/synth/psl01/hello.vhdl | 09:01 |
tpb | Title: ghdl/hello.vhdl at master · ghdl/ghdl · GitHub (at github.com) | 09:01 |
pepijndevos | But you'd have to do some... experimental things to get the RTLIL | 09:01 |
pepijndevos | you can do `yosys -p show the.il` to see what's going on, except it does not show the initial value. | 09:02 |
tnt | "assume always val < 50;" for a 4 bit number that looks redudant. | 09:04 |
pepijndevos | yea, sure, this code was written to test that it parses correctly, not that it's a meaningful fromal verification hehe | 09:05 |
tnt | how am I supposed to feed that to yosys ? because it chokes on it here ... | 09:10 |
mwk | tnt: read_ilang | 09:11 |
mwk | pepijndevos: I might not me reading this RTLIL entirely right, but it seems like "val < 50" was mutated to "val < 2" by chopping the constant 50 to 4 bits? | 09:12 |
mwk | if you assume val < 2, proving "val /= 5 or rst == '1'" is rather easy | 09:12 |
pepijndevos | ohhhh, is that what's happening?? Let me try without the assume | 09:13 |
pepijndevos | mwk, nope, the assert still gets optimized away | 09:14 |
pepijndevos | I'm now trying to find where in `prep` it happens... | 09:14 |
pepijndevos | I see what's going on... | 09:18 |
tnt | Well, dff23 is init to 2'b11 dff23[0] input is wired to ... dff23[0] & 1'b1 so obviously it's always going to stay at 1. | 09:19 |
daveshah | `trace` is always fun for this kind of debugging | 09:19 |
tnt | and if it's at 1 $auto$ghdl.cc:290:import_module$11 is 1 and so is the input to the assert. | 09:20 |
*** adjtm_ has quit IRC | 09:20 | |
pepijndevos | oh wow | 09:22 |
pepijndevos | I'm 100% sure this is a logic bug on the GHDL side... just not sure what the *correct* logic would be. | 09:24 |
pepijndevos | So yea, basically the DFF is just looping on itsel and not connected in any way to the input. And then they get OR'ed together, and since the DFF is just always one, the OR is alway 1 | 09:25 |
pepijndevos | I think the intended logic is something along the lines of "if the input is ok and the previous input was also ok" | 09:25 |
*** pie__ has quit IRC | 09:46 | |
*** jakobwenzel has quit IRC | 10:32 | |
*** cr1901_modern has joined #yosys | 10:33 | |
*** jakobwenzel has joined #yosys | 10:33 | |
*** adjtm_ has joined #yosys | 10:34 | |
*** cr1901_modern has quit IRC | 12:10 | |
*** maikmerten has joined #yosys | 12:28 | |
*** rrika has quit IRC | 12:33 | |
*** rrika has joined #yosys | 12:39 | |
*** adjtm_ has quit IRC | 13:01 | |
*** cr1901_modern has joined #yosys | 13:14 | |
*** adjtm_ has joined #yosys | 13:28 | |
*** pie_ has joined #yosys | 13:31 | |
*** m4ssi has joined #yosys | 14:09 | |
*** emeb has joined #yosys | 14:23 | |
*** citypw has joined #yosys | 14:58 | |
*** m4ssi has quit IRC | 15:43 | |
*** dramforever has joined #yosys | 15:48 | |
*** dramforever has quit IRC | 17:11 | |
*** citypw has quit IRC | 17:14 | |
*** maikmerten has quit IRC | 17:22 | |
*** dys has quit IRC | 17:24 | |
*** dys has joined #yosys | 17:35 | |
*** adjtm_ has quit IRC | 17:57 | |
*** dramforever has joined #yosys | 17:58 | |
*** s_frit has quit IRC | 19:02 | |
*** s_frit has joined #yosys | 19:02 | |
*** dys has quit IRC | 20:11 | |
*** adamgreig has quit IRC | 20:22 | |
*** adamgreig has joined #yosys | 20:23 | |
*** Jybz has quit IRC | 20:34 | |
*** dys has joined #yosys | 20:39 | |
*** adamgreig has quit IRC | 20:40 | |
*** adamgreig has joined #yosys | 20:45 | |
*** emeb_mac has joined #yosys | 21:07 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!