clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
emeb_mac has joined #yosys
_whitelogger has joined #yosys
indy has quit [Quit: ZNC - http://znc.sourceforge.net]
indy has joined #yosys
jakobwenzel has quit [Remote host closed the connection]
jakobwenzel has joined #yosys
PyroPeter has quit [Ping timeout: 252 seconds]
_whitelogger has joined #yosys
citypw has quit [Ping timeout: 244 seconds]
<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.
Jybz has joined #yosys
citypw has joined #yosys
<corecode> they don't have any?
<corecode> simple answer :)
citypw has quit [Quit: Leaving]
emeb_mac has quit [Ping timeout: 245 seconds]
dys has joined #yosys
cr1901_modern has quit [Read error: Connection reset by peer]
<pepijndevos> Anyone wants to play a game of "why did the compiler delete my code?" haha
<tnt> sure :)
<pepijndevos> tnt, there you go https://paste.ubuntu.com/p/xZFtMnMdsm/
<tpb> Title: Ubuntu Pastebin (at paste.ubuntu.com)
<pepijndevos> The problem is the input to the assert statement gets optimized to 1'1
<pepijndevos> (note the initial value on the dff)
<pepijndevos> ($auto$ghdl.cc:290:import_module$4)
<tnt> wtf is this ?
<mwk> RTLIL I suppose
<tpb> Title: ghdl/hello.vhdl at master · ghdl/ghdl · GitHub (at github.com)
<pepijndevos> But you'd have to do some... experimental things to get the RTLIL
<pepijndevos> you can do `yosys -p show the.il` to see what's going on, except it does not show the initial value.
<tnt> "assume always val < 50;" for a 4 bit number that looks redudant.
<pepijndevos> yea, sure, this code was written to test that it parses correctly, not that it's a meaningful fromal verification hehe
<tnt> how am I supposed to feed that to yosys ? because it chokes on it here ...
<mwk> tnt: read_ilang
<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?
<mwk> if you assume val < 2, proving "val /= 5 or rst == '1'" is rather easy
<pepijndevos> ohhhh, is that what's happening?? Let me try without the assume
<pepijndevos> mwk, nope, the assert still gets optimized away
<pepijndevos> I'm now trying to find where in `prep` it happens...
<pepijndevos> I see what's going on...
<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.
<daveshah> `trace` is always fun for this kind of debugging
<tnt> and if it's at 1 $auto$ghdl.cc:290:import_module$11 is 1 and so is the input to the assert.
adjtm_ has quit [Ping timeout: 272 seconds]
<pepijndevos> oh wow
<pepijndevos> I'm 100% sure this is a logic bug on the GHDL side... just not sure what the *correct* logic would be.
<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
<pepijndevos> I think the intended logic is something along the lines of "if the input is ok and the previous input was also ok"
pie__ has quit [Ping timeout: 252 seconds]
jakobwenzel has quit [Remote host closed the connection]
cr1901_modern has joined #yosys
jakobwenzel has joined #yosys
adjtm_ has joined #yosys
cr1901_modern has quit [Quit: Leaving.]
maikmerten has joined #yosys
rrika has quit [Ping timeout: 246 seconds]
rrika has joined #yosys
adjtm_ has quit [Ping timeout: 245 seconds]
cr1901_modern has joined #yosys
adjtm_ has joined #yosys
pie_ has joined #yosys
m4ssi has joined #yosys
emeb has joined #yosys
citypw has joined #yosys
m4ssi has quit [Remote host closed the connection]
dramforever has joined #yosys
dramforever has quit [Ping timeout: 264 seconds]
citypw has quit [Ping timeout: 246 seconds]
maikmerten has quit [Remote host closed the connection]
dys has quit [Ping timeout: 250 seconds]
dys has joined #yosys
adjtm_ has quit [Quit: Leaving]
dramforever has joined #yosys
dramforever has quit [Remote host closed the connection]
s_frit has quit [Remote host closed the connection]
s_frit has joined #yosys
dys has quit [Ping timeout: 245 seconds]
adamgreig has quit [Ping timeout: 250 seconds]
adamgreig has joined #yosys
Jybz has quit [Quit: Konversation terminated!]
dys has joined #yosys
adamgreig has quit [Ping timeout: 250 seconds]
adamgreig has joined #yosys
emeb_mac has joined #yosys
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
dys has quit [Ping timeout: 244 seconds]