Wednesday, 2019-08-14

*** tpb has joined #yosys00:00
*** emeb has quit IRC00:07
*** emeb_mac has joined #yosys00:28
*** _whitelogger has quit IRC01:42
*** _whitelogger has joined #yosys01:44
*** indy has quit IRC02:15
*** indy has joined #yosys02:20
*** jakobwenzel has quit IRC02:58
*** jakobwenzel has joined #yosys02:58
*** PyroPeter has quit IRC03:13
*** alexhw has quit IRC03:18
*** _whitelogger has quit IRC03:18
*** show has quit IRC03:20
*** alexhw has joined #yosys03:21
*** PyroPeter has joined #yosys03:26
*** citypw has joined #yosys03:27
*** show has joined #yosys03:31
*** _whitelogger has joined #yosys04:35
*** citypw has quit IRC04: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 #yosys05:13
*** citypw has joined #yosys05:53
corecodethey don't have any?06:33
corecodesimple answer :)06:33
*** citypw has quit IRC06:50
*** emeb_mac has quit IRC07:06
*** dys has joined #yosys07:24
*** cr1901_modern has quit IRC08:00
pepijndevosAnyone wants to play a game of "why did the compiler delete my code?" haha08:54
tntsure :)08:56
pepijndevostnt, there you go https://paste.ubuntu.com/p/xZFtMnMdsm/08:58
tpbTitle: Ubuntu Pastebin (at paste.ubuntu.com)08:58
pepijndevosThe problem is the input to the assert statement gets optimized to 1'108:58
pepijndevos(note the initial value on the dff)08:58
pepijndevos($auto$ghdl.cc:290:import_module$4)08:59
tntwtf is this ?09:00
mwkRTLIL I suppose09:01
pepijndevosoriginal source: https://github.com/ghdl/ghdl/blob/master/testsuite/synth/psl01/hello.vhdl09:01
tpbTitle: ghdl/hello.vhdl at master · ghdl/ghdl · GitHub (at github.com)09:01
pepijndevosBut you'd have to do some... experimental things to get the RTLIL09:01
pepijndevosyou 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
pepijndevosyea, sure, this code was written to test that it parses correctly, not that it's a meaningful fromal verification hehe09:05
tnthow am I supposed to feed that to yosys ? because it chokes on it here ...09:10
mwktnt: read_ilang09:11
mwkpepijndevos: 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
mwkif you assume val < 2, proving "val /= 5 or rst == '1'" is rather easy09:12
pepijndevosohhhh, is that what's happening?? Let me try without the assume09:13
pepijndevosmwk, nope, the assert still gets optimized away09:14
pepijndevosI'm now trying to find where in `prep` it happens...09:14
pepijndevosI see what's going on...09:18
tntWell, 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 debugging09:19
tntand 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 IRC09:20
pepijndevosoh wow09:22
pepijndevosI'm 100% sure this is a logic bug on the GHDL side... just not sure what the *correct* logic would be.09:24
pepijndevosSo 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 109:25
pepijndevosI 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 IRC09:46
*** jakobwenzel has quit IRC10:32
*** cr1901_modern has joined #yosys10:33
*** jakobwenzel has joined #yosys10:33
*** adjtm_ has joined #yosys10:34
*** cr1901_modern has quit IRC12:10
*** maikmerten has joined #yosys12:28
*** rrika has quit IRC12:33
*** rrika has joined #yosys12:39
*** adjtm_ has quit IRC13:01
*** cr1901_modern has joined #yosys13:14
*** adjtm_ has joined #yosys13:28
*** pie_ has joined #yosys13:31
*** m4ssi has joined #yosys14:09
*** emeb has joined #yosys14:23
*** citypw has joined #yosys14:58
*** m4ssi has quit IRC15:43
*** dramforever has joined #yosys15:48
*** dramforever has quit IRC17:11
*** citypw has quit IRC17:14
*** maikmerten has quit IRC17:22
*** dys has quit IRC17:24
*** dys has joined #yosys17:35
*** adjtm_ has quit IRC17:57
*** dramforever has joined #yosys17:58
*** s_frit has quit IRC19:02
*** s_frit has joined #yosys19:02
*** dys has quit IRC20:11
*** adamgreig has quit IRC20:22
*** adamgreig has joined #yosys20:23
*** Jybz has quit IRC20:34
*** dys has joined #yosys20:39
*** adamgreig has quit IRC20:40
*** adamgreig has joined #yosys20:45
*** emeb_mac has joined #yosys21:07

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!