clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
jwhitmore has quit [Remote host closed the connection]
develonepi3 has quit [Ping timeout: 240 seconds]
pie__ has quit [Ping timeout: 240 seconds]
develonepi3 has joined #yosys
dxld has quit [Quit: Bye]
dxld has joined #yosys
pie_ has joined #yosys
promach_ has joined #yosys
m_w has quit [Quit: leaving]
m_w has joined #yosys
<promach_> Can SymbiYosys support wildcard files selection yet ?
<promach_> and does Yosys support any automated bug insertion (mutation) methodology ?
emeb_mac has joined #yosys
dxld has quit [Quit: Bye]
dxld has joined #yosys
dxld has quit [Quit: Bye]
dxld has joined #yosys
develonepi3 has quit [Remote host closed the connection]
sklv has quit [Remote host closed the connection]
sklv has joined #yosys
pie_ has quit [Ping timeout: 264 seconds]
ZipCPU has joined #yosys
gyroninja has joined #yosys
<gyroninja> Hi, I'm having trouble synthesizing a design I've made. It removes all the cells during optimization leaving me with 0 cells total in the end. This is likely me to either using yosys wrong or verilog wrong as I'm a newbie at both. I've created a small test program which exhibits the behaviour I'm talking about: https://hastebin.com/tiwiwiqagi.v If I use use verilator to simulate the design, it seems to work
<gyroninja> fine (the data output is toggled).
dys has joined #yosys
sklv has quit [Ping timeout: 250 seconds]
<gyroninja> I've also tried on both version 0.7 and the latest from git
<ravenexp> data is not a reg
xerpi has joined #yosys
<ravenexp> you can't parallel assign a value to a wire
<gyroninja> thanks
<ZipCPU> You might also wish to look into the "show" command. It works great on small designs to illustrate a logic flaw, but ... can be difficult to use with really large designs.
ZipCPU has quit [Ping timeout: 245 seconds]
emeb_mac has quit [Quit: Leaving.]
leviathan has joined #yosys
AlexDani` is now known as AlexDaniel
ZipCPU has joined #yosys
jwhitmore has joined #yosys
sklv has joined #yosys
quigonjinn has joined #yosys
dys has quit [Ping timeout: 264 seconds]
dys has joined #yosys
m_t has joined #yosys
xerpi has quit [Quit: Leaving]
indy has quit [Ping timeout: 260 seconds]
indy_ has joined #yosys
pie_ has joined #yosys
promach_ has quit [Ping timeout: 264 seconds]
promach_ has joined #yosys
digshadow has quit [Ping timeout: 248 seconds]
digshadow has joined #yosys
m_t has quit [Quit: Leaving]
leviathan has quit [Remote host closed the connection]
dxld has quit [Quit: Bye]
leviathan has joined #yosys
dxld has joined #yosys
digshadow has quit [Read error: Connection reset by peer]
digshadow1 has joined #yosys
emeb_mac has joined #yosys
digshadow1 has quit [Ping timeout: 264 seconds]
emeb_mac has quit [Quit: Leaving.]
<promach_> Why do I have this error https://paste.ubuntu.com/p/vDM57Qgsmt/ when I try the code at http://www.clifford.at/papers/2017/smtbmc-sby/slides.pdf#page=25 ? note that I have installed avy
<tpb> Title: Ubuntu Pastebin (at paste.ubuntu.com)
<daveshah> promach_: what happens when you type just avy at the shell?
dxld has quit [Quit: Bye]
dxld has joined #yosys
<promach_> daveshah: it seems like I did not install it properly
<promach_> let me do the installation of extavy again tomorrow
* promach_ needs to leave now
promach_ has quit [Quit: WeeChat 2.1]
digshadow has joined #yosys
ZipCPU has quit [Ping timeout: 260 seconds]
eduardo has joined #yosys
ZipCPU has joined #yosys
pie_ has quit [Ping timeout: 256 seconds]
digshadow has quit [Quit: Leaving.]
pie_ has joined #yosys
dxld has quit [Quit: Bye]
dxld has joined #yosys
leviathan has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
indy_ has quit [Ping timeout: 248 seconds]
indy has joined #yosys
<gyroninja> After messing around with it for a while, I still haven't been able to figure out what I did wrong. I tried declaring my output as reg and switching = and <= around, but it didn't help. I did notice that if it seems to work fine if I use an if statement / conditional operator to set my output instead of from an array. https://hastebin.com/erohufariv.v <- Is my broken code that doesn't generate any cells. If
<gyroninja> you uncomment the commented line and comment the one below it, it seems to work.
indy has quit [Ping timeout: 264 seconds]
indy_ has joined #yosys
sklv has quit [Remote host closed the connection]
sklv has joined #yosys
<gyroninja> Also here's the BLIF files that both outputed https://hastebin.com/teyigasoba
indy_ has quit [Quit: ZNC - http://znc.sourceforge.net]
digshadow has joined #yosys
digshadow has quit [Client Quit]
digshadow has joined #yosys
quigonjinn has quit [Ping timeout: 240 seconds]
digshadow has quit [Ping timeout: 264 seconds]
<ZipCPU> gyroninja: Start at the top again ... what are you tring to do?
<ZipCPU> *trying
<ZipCPU> Looking over your code, I noticed you declared an array of one element: reg [0:0] array[2];
<ZipCPU> Did you mean to do that, or were you trying to do: reg [0:0] array [0:1]; ... an array of two elements?
<ZipCPU> Also, as a matter of general practice, most synthesizers don't recognize arrays from block RAM elements if anything else is with them within their always statements.
<ZipCPU> Hence, I think you wanted: always @(posedge clock) data <= array[index]; always @(posedge clock) index <= !index;
<ZipCPU> I just implemented a multiply algorithm to implement https://en.wikipedia.org/wiki/Binary_multiplier#More_advanced_approach:_signed_integers
<tpb> Title: Binary multiplier - Wikipedia (at en.wikipedia.org)
<ZipCPU> A very strange algorithm to debug. I think I misread the description incorrectly several times over.
* ZipCPU now has it working through an exhaustive simulation via verilator.
<gyroninja> ZipCPU: I want to essentially look up a value from the array
<gyroninja> and assign it to the output
<ZipCPU> Yeah, you have your array declared incorrectly.
<gyroninja> Isn't it an array of 2 elements though?
<gyroninja> of 1 bit each
<ZipCPU> Not if you declare it as: reg [0:0] array [2];
<ZipCPU> You need to declare an array of two one-bit elements as: reg [0:0] array [0:1];
<gyroninja> Doing it the way I've been doing it works fine with Verilator
<gyroninja> but yet doing it your way makes it generate cells
<gyroninja> and fixes the problem
<ZipCPU> Ahm ... I doubt it was really working with Verilator.
<gyroninja> It was though
<ZipCPU> If you dig into code like that, you'll often find Verilator reading from unallocated memory
<ZipCPU> Where it gets really bad is when you try to write to that memory, and then overwrite something on your stack or something
<gyroninja> Well something to point out is that it at least recognized it as an array
<ZipCPU> Absolutely! You told it that it was an array of one element.
<gyroninja> If I tried to assign into an element beyond the second element it would warn me and not compile
<ZipCPU> Then, you initialized two elements that weren't in the array.
<gyroninja> If I declare it with [2] and try to assign to array[2] the warning I get from verilator is: "%Warning-SELRANGE: test.v:13: Selection index out of range: 2 outside 1:0"
<gyroninja> Notice how it seems to be interpreting the 2 as 1:0 for me
<ZipCPU> Fascinating.
<ZipCPU> Not quite what I was expecting--what does the C++ generated code look like? Should be easy enough to interpret.
<ZipCPU> Check out lines 73-83 of Vtest.cpp for discussion
<ZipCPU> That's what's implementing this logic ... if I've read it right (and I'm trying to read quickly)
<gyroninja> okay
<ZipCPU> The index is anded with one to create the new index, but it is also referencing the array like that as you suggested.
<ZipCPU> Looks like that might be a bug in Verilator.
<ZipCPU> Verilator *should've* taken the index, subtracted two from it, anded it with 0, and then used the result to look up the array value
<gyroninja> I'm not following
<gyroninja> If you anded it with 0 wouldn't it always be 0?
ZipCPU has quit [Ping timeout: 268 seconds]
SpaceCoaster has quit [Quit: ZNC 1.6.5+deb1 - http://znc.in]
<gyroninja> It seems to be valid syntax regardless
<gyroninja> I checked the BNF and it seemed to check out
SpaceCoaster has joined #yosys
AlexDani` has joined #yosys
AlexDaniel has quit [Ping timeout: 245 seconds]
AlexDani` is now known as AlexDaniel
dys has quit [Ping timeout: 264 seconds]
pie_ has quit [Ping timeout: 265 seconds]
pie_ has joined #yosys
jwhitmore has quit [Ping timeout: 264 seconds]
emeb_mac has joined #yosys
_whitelogger has joined #yosys
tpb has quit [Remote host closed the connection]
tpb has joined #yosys