clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
az0re has quit [Remote host closed the connection]
citypw has joined #yosys
az0re has joined #yosys
emeb has quit [Quit: Leaving.]
emeb_mac has quit [Ping timeout: 272 seconds]
Degi has quit [Ping timeout: 256 seconds]
emeb_mac has joined #yosys
Degi has joined #yosys
m4ssi has joined #yosys
mwk has quit [Ping timeout: 244 seconds]
m4ssi has quit [Remote host closed the connection]
sjkelly1 has quit [Remote host closed the connection]
emeb_mac has quit [Quit: Leaving.]
xtro has quit [Ping timeout: 256 seconds]
mwk has joined #yosys
craigo has quit [Ping timeout: 256 seconds]
jakobwenzel1 has joined #yosys
kraiskil has joined #yosys
craigo has joined #yosys
Asu has joined #yosys
kraiskil has quit [Ping timeout: 258 seconds]
kraiskil has joined #yosys
u0m3 has quit [Remote host closed the connection]
u0m3 has joined #yosys
u0m3 has quit [Remote host closed the connection]
u0m3 has joined #yosys
u0m3 has quit [Remote host closed the connection]
kraiskil has quit [Ping timeout: 240 seconds]
u0m3 has joined #yosys
kraiskil has joined #yosys
kraiskil has quit [Ping timeout: 240 seconds]
citypw has quit [Ping timeout: 240 seconds]
citypw has joined #yosys
craigo has quit [Ping timeout: 240 seconds]
kraiskil has joined #yosys
X-Scale has quit [Ping timeout: 240 seconds]
X-Scale` has joined #yosys
kraiskil has quit [Ping timeout: 256 seconds]
kraiskil has joined #yosys
lambda has quit [Ping timeout: 256 seconds]
lambda has joined #yosys
emeb_mac has joined #yosys
az0re has quit [Remote host closed the connection]
kraiskil has quit [Ping timeout: 246 seconds]
xtro has joined #yosys
kraiskil has joined #yosys
citypw has quit [Ping timeout: 240 seconds]
jakobwenzel1 has quit [Remote host closed the connection]
GenTooMan has quit [Ping timeout: 260 seconds]
matthuszagh has joined #yosys
N2TOH has joined #yosys
<matthuszagh> Hello. I'm attempting to synthesize a xilinx 7-series design with yosys. However, the synth_xilinx command gives the error "Conflicting initialization values for \i". In the verilog file it complains about, I declare `integer i;` once, and then use it several times for different for loops. Some of these loops initialize `i` with `i=0` and some initialize it with `i=1`. Is this what yosys is complaining about?
<Lofty> I think you want `genvar i`, not `integer i`
<matthuszagh> Lofty: ah, ok. I thought genvar was only for generate blocks, is that incorrect?
<Lofty> In Verilog (2005?) `for` at the top level of a module == `generate for`
<Lofty> In other words: you already have a generate block
N2TOH__ has quit [Ping timeout: 260 seconds]
<matthuszagh> Oh good to know, thanks. I will try genvar then
<Lofty> Yosys is generally a bit stricter to the standard than other compilers
<Lofty> But its error messages are...not the best
<matthuszagh> Hm now I'm getting "Left hand side of 1st expression of generate for-loop is not a register!"
<matthuszagh> for
<matthuszagh>
<matthuszagh> reg signed [INPUT_WIDTH-1:0] shift_reg [0:M-2];
<matthuszagh> initial for (i=0; i<M-1; i=i+1) shift_reg[i] = {INPUT_WIDTH{1'b0}};
<matthuszagh> genvar i;
<matthuszagh> It should be though. I only use `shift_reg` in clocked always blocks
<Lofty> I checked the standard; yes, it should be `genvar`.
<matthuszagh> Lofty: thanks for checking that. Mind pointing me to the page?
<matthuszagh> trying to get better at going straight to the standard for this sort of stuff, but still a bit inefficient at reading it/finding things
<Lofty> matthuszagh: IEEE 1364-2005 page 183: "The loop index variable shall be declared in a genvar declaration prior to its use in a loop generate scheme."
<Lofty> Are you using `i` in multiple loops?
<matthuszagh> terrific, thanks
<matthuszagh> yes
<Lofty> No nested loops with `i` as the same variable, right?
<Lofty> (the standard forbids that)
<matthuszagh> Correct, they're separate.
<Lofty> What happens if you run Verilator on your code?
<Lofty> (as in, `verilator --lint-only -Wall`
<Lofty> )
<matthuszagh> good question, lemme try
<matthuszagh> Genvar not legal in non-generate for (IEEE 1800-2017 27.4)
<matthuszagh> Suggest move for loop upwards to generate-level scope
<matthuszagh> initial for (i=0; i<M-1; i=i+1) shift_reg[i] = {INPUT_WIDTH{1'b0}};
<matthuszagh> then also
<matthuszagh> Genvar not legal in non-generate for
<Lofty> Verilator's using a much later standard than Yosys there :P
<matthuszagh> there's no way to set the standard to 2005 is there?
<Lofty> verilator --language 1364-2005
<Lofty> That matches what Yosys (presently) supports
<matthuszagh> great
<matthuszagh> ok basically the same errors
pointfree has quit []
<matthuszagh> so it sounds like i have to write generate explicitly?
pointfree has joined #yosys
<Lofty> Probably; I'll admit to not being a language lawyer
<matthuszagh> no worries, i'll try that out
qu1j0t3 has left #yosys ["WeeChat 0.4.3"]
<matthuszagh> also strangely, the language verilator flag doesn't seem to be doing much for me
<matthuszagh> it still complains about 1800-2017 issues
<Lofty> Maybe the error messages are hardcoded there
evil_chuck has joined #yosys
GenTooMan has joined #yosys
kraiskil has quit [Ping timeout: 256 seconds]
<matthuszagh> I noticed in the yosys manual (2.2.5) it says for loops are supported in always blocks and in generate statements at the module level
<matthuszagh> this doesn't say anything about initial blocks
<matthuszagh> also, the arrays and memories section (2.2.6) uses integer rather than genvar for the for-loop index
Asu has quit [Read error: Connection reset by peer]
Asu has joined #yosys
Asu has quit [Remote host closed the connection]
Asu has joined #yosys
Asu has quit [Client Quit]
Asu has joined #yosys
Asu has quit [Quit: Konversation terminated!]
Asu has joined #yosys
Asu has quit [Read error: Connection reset by peer]
Asuu has joined #yosys
evil_chuck has quit [Remote host closed the connection]
xtro has quit [Quit: Lost terminal]
Asuu has quit [Quit: Konversation terminated!]
<matthuszagh> Does every memory assignment/initialization for loop need its own `integer`? I get an error for conflicting initialization values unless I do this.
AdamHorden has joined #yosys
craigo has joined #yosys
xtro has joined #yosys
maartenBE has quit [Ping timeout: 240 seconds]
maartenBE has joined #yosys
craigo has quit [Ping timeout: 240 seconds]
matthuszagh has quit [Remote host closed the connection]
craigo has joined #yosys