*** tpb has joined #yosys | 00:00 | |
*** az0re has quit IRC | 00:00 | |
*** citypw has joined #yosys | 00:57 | |
*** az0re has joined #yosys | 01:06 | |
*** emeb has quit IRC | 01:10 | |
*** emeb_mac has quit IRC | 01:18 | |
*** Degi has quit IRC | 01:18 | |
*** emeb_mac has joined #yosys | 01:19 | |
*** Degi has joined #yosys | 01:19 | |
*** m4ssi has joined #yosys | 04:06 | |
*** mwk has quit IRC | 04:21 | |
*** m4ssi has quit IRC | 04:25 | |
*** sjkelly1 has quit IRC | 05:03 | |
*** emeb_mac has quit IRC | 06:26 | |
*** xtro has quit IRC | 06:36 | |
*** mwk has joined #yosys | 06:40 | |
*** craigo has quit IRC | 07:29 | |
*** jakobwenzel1 has joined #yosys | 08:02 | |
*** kraiskil has joined #yosys | 08:23 | |
*** craigo has joined #yosys | 08:46 | |
*** Asu has joined #yosys | 09:09 | |
*** kraiskil has quit IRC | 09:16 | |
*** kraiskil has joined #yosys | 09:22 | |
*** u0m3 has quit IRC | 10:35 | |
*** u0m3 has joined #yosys | 10:35 | |
*** u0m3 has quit IRC | 10:45 | |
*** u0m3 has joined #yosys | 10:45 | |
*** u0m3 has quit IRC | 11:46 | |
*** kraiskil has quit IRC | 11:51 | |
*** u0m3 has joined #yosys | 11:55 | |
*** kraiskil has joined #yosys | 11:59 | |
*** kraiskil has quit IRC | 12:07 | |
*** citypw has quit IRC | 12:17 | |
*** citypw has joined #yosys | 12:21 | |
*** craigo has quit IRC | 12:29 | |
*** kraiskil has joined #yosys | 12:46 | |
*** X-Scale has quit IRC | 12:53 | |
*** X-Scale` has joined #yosys | 12:57 | |
*** kraiskil has quit IRC | 13:33 | |
*** kraiskil has joined #yosys | 13:59 | |
*** lambda has quit IRC | 14:07 | |
*** lambda has joined #yosys | 14:20 | |
*** emeb_mac has joined #yosys | 14:30 | |
*** az0re has quit IRC | 14:52 | |
*** kraiskil has quit IRC | 15:22 | |
*** xtro has joined #yosys | 15:56 | |
*** kraiskil has joined #yosys | 15:59 | |
*** citypw has quit IRC | 17:16 | |
*** jakobwenzel1 has quit IRC | 17:49 | |
*** GenTooMan has quit IRC | 18:43 | |
*** matthuszagh has joined #yosys | 18:49 | |
*** N2TOH has joined #yosys | 18:52 | |
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? | 18:53 |
---|---|---|
Lofty | I think you want `genvar i`, not `integer i` | 18:53 |
matthuszagh | Lofty: ah, ok. I thought genvar was only for generate blocks, is that incorrect? | 18:54 |
Lofty | In Verilog (2005?) `for` at the top level of a module == `generate for` | 18:54 |
Lofty | In other words: you already have a generate block | 18:55 |
*** N2TOH__ has quit IRC | 18:55 | |
matthuszagh | Oh good to know, thanks. I will try genvar then | 18:55 |
Lofty | Yosys is generally a bit stricter to the standard than other compilers | 18:55 |
Lofty | But its error messages are...not the best | 18:56 |
matthuszagh | Hm now I'm getting "Left hand side of 1st expression of generate for-loop is not a register!" | 18:57 |
matthuszagh | for | 18:57 |
matthuszagh | 18:57 | |
matthuszagh | reg signed [INPUT_WIDTH-1:0] shift_reg [0:M-2]; | 18:57 |
matthuszagh | genvar i; | 18:57 |
matthuszagh | initial for (i=0; i<M-1; i=i+1) shift_reg[i] = {INPUT_WIDTH{1'b0}}; | 18:57 |
matthuszagh | It should be though. I only use `shift_reg` in clocked always blocks | 19:00 |
Lofty | I checked the standard; yes, it should be `genvar`. | 19:00 |
matthuszagh | Lofty: thanks for checking that. Mind pointing me to the page? | 19:00 |
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 | 19:01 |
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." | 19:03 |
Lofty | Are you using `i` in multiple loops? | 19:03 |
matthuszagh | terrific, thanks | 19:04 |
matthuszagh | yes | 19:04 |
Lofty | No nested loops with `i` as the same variable, right? | 19:06 |
Lofty | (the standard forbids that) | 19:06 |
matthuszagh | Correct, they're separate. | 19:06 |
Lofty | What happens if you run Verilator on your code? | 19:07 |
Lofty | (as in, `verilator --lint-only -Wall` | 19:07 |
Lofty | ) | 19:07 |
matthuszagh | good question, lemme try | 19:07 |
matthuszagh | Genvar not legal in non-generate for (IEEE 1800-2017 27.4) | 19:08 |
matthuszagh | Suggest move for loop upwards to generate-level scope | 19:08 |
matthuszagh | initial for (i=0; i<M-1; i=i+1) shift_reg[i] = {INPUT_WIDTH{1'b0}}; | 19:08 |
matthuszagh | then also | 19:08 |
matthuszagh | Genvar not legal in non-generate for | 19:08 |
Lofty | Verilator's using a much later standard than Yosys there :P | 19:08 |
matthuszagh | there's no way to set the standard to 2005 is there? | 19:09 |
Lofty | verilator --language 1364-2005 | 19:10 |
Lofty | That matches what Yosys (presently) supports | 19:10 |
matthuszagh | great | 19:11 |
matthuszagh | ok basically the same errors | 19:11 |
*** pointfree has quit IRC | 19:11 | |
matthuszagh | so it sounds like i have to write generate explicitly? | 19:12 |
*** pointfree has joined #yosys | 19:12 | |
Lofty | Probably; I'll admit to not being a language lawyer | 19:12 |
matthuszagh | no worries, i'll try that out | 19:15 |
*** qu1j0t3 has left #yosys | 19:15 | |
matthuszagh | also strangely, the language verilator flag doesn't seem to be doing much for me | 19:15 |
matthuszagh | it still complains about 1800-2017 issues | 19:16 |
Lofty | Maybe the error messages are hardcoded there | 19:16 |
*** evil_chuck has joined #yosys | 19:32 | |
*** GenTooMan has joined #yosys | 19:42 | |
*** kraiskil has quit IRC | 19:50 | |
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 | 19:59 |
matthuszagh | this doesn't say anything about initial blocks | 19:59 |
matthuszagh | also, the arrays and memories section (2.2.6) uses integer rather than genvar for the for-loop index | 20:00 |
*** Asu has quit IRC | 20:05 | |
*** Asu has joined #yosys | 20:06 | |
*** Asu has quit IRC | 20:40 | |
*** Asu has joined #yosys | 20:41 | |
*** Asu has joined #yosys | 20:41 | |
*** Asu has quit IRC | 21:28 | |
*** Asu has joined #yosys | 21:34 | |
*** Asu has quit IRC | 21:37 | |
*** Asuu has joined #yosys | 21:37 | |
*** evil_chuck has quit IRC | 21:41 | |
*** xtro has quit IRC | 21:43 | |
*** Asuu has quit IRC | 21:57 | |
matthuszagh | Does every memory assignment/initialization for loop need its own `integer`? I get an error for conflicting initialization values unless I do this. | 22:00 |
*** AdamHorden has joined #yosys | 22:05 | |
*** craigo has joined #yosys | 22:07 | |
*** xtro has joined #yosys | 22:48 | |
*** maartenBE has quit IRC | 22:51 | |
*** maartenBE has joined #yosys | 22:58 | |
*** craigo has quit IRC | 23:13 | |
*** matthuszagh has quit IRC | 23:13 | |
*** craigo has joined #yosys | 23:19 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!