Wednesday, 2020-06-10

*** tpb has joined #yosys00:00
*** BinaryLust has joined #yosys00:17
*** peepsalot has quit IRC00:46
*** peepsalot has joined #yosys00:47
*** emeb has quit IRC01:03
*** strongsaxophone has quit IRC01:57
*** citypw has joined #yosys02:22
*** futarisIRCcloud has quit IRC02:23
*** Degi has quit IRC02:31
*** Degi has joined #yosys02:33
*** az0re has quit IRC03:24
*** futarisIRCcloud has joined #yosys03:52
*** vidbina has joined #yosys04:27
*** peepsalot has quit IRC05:05
*** peepsalot has joined #yosys05:24
*** smkz has quit IRC05:28
*** smkz has joined #yosys05:31
*** smkz has quit IRC05:33
*** smkz has joined #yosys05:37
*** dys has joined #yosys05:41
*** corecode_ is now known as corecode05:47
*** dys has quit IRC06:14
*** rrika has quit IRC06:17
*** rrika has joined #yosys06:18
*** dys has joined #yosys06:21
*** vidbina has quit IRC06:25
*** emeb_mac has quit IRC06:37
*** dys has quit IRC06:38
*** az0re has joined #yosys06:46
*** indy has joined #yosys06:49
*** jakobwenzel has joined #yosys06:52
*** vidbina has joined #yosys07:31
*** dys has joined #yosys08:04
*** Asu has joined #yosys08:09
*** kraiskil has joined #yosys08:46
*** vidbina has quit IRC09:00
*** tlwoerner has quit IRC10:13
*** craigo has joined #yosys10:54
*** dys has quit IRC11:13
*** BinaryLust has quit IRC11:20
*** anuejn_ is now known as anuejn11:22
*** kraiskil has quit IRC11:52
*** tlwoerner has joined #yosys11:58
*** kraiskil has joined #yosys12:04
*** mirage335 has quit IRC12:11
*** mirage335 has joined #yosys12:17
*** jeanthom has joined #yosys12:27
*** futarisIRCcloud has quit IRC12:43
*** citypw has quit IRC12:44
*** smkz has quit IRC12:58
*** FFY00 has quit IRC13:01
*** promach3 has quit IRC13:01
*** rjo has quit IRC13:01
*** FFY00 has joined #yosys13:03
*** smkz has joined #yosys13:09
*** az0re has quit IRC13:28
*** vidbina has joined #yosys13:38
*** futarisIRCcloud has joined #yosys14:08
*** jfcaron has joined #yosys14:28
*** jfcaron has joined #yosys14:28
*** kraiskil has quit IRC14:31
*** emeb has joined #yosys14:41
*** kraiskil has joined #yosys14:46
daveshahross_s: https://github.com/YosysHQ/nextpnr/pull/454 should fix the global routing issue on the nextpnr side now14:48
tpbTitle: ecp5: Fix placement of DCCs to guarantee routeability by daveshah1 · Pull Request #454 · YosysHQ/nextpnr · GitHub (at github.com)14:48
*** vidbina has quit IRC15:07
*** llee454 has joined #yosys15:20
llee454Good morning. Is anyone free to answer a question I have about using Yosys to generate BLIF files for arachne-pnr? I'm getting the following error from arachne: "kami32.blif:11: fatal error: invalid .names entry: both gates must be 1 here"15:21
daveshahHow are you generating the BLIF?15:25
llee454I used the interactive shell to enter the following sequence of commands: read_verilog "kami32.v"; hierarchy -check -top _design; proc; memory; techmap; abc; write_blif "kami.blif"15:26
llee454Also thanks for offering to help.15:27
daveshahyou need to use synth_ice4015:27
daveshaharachne-pnr doesn't support generic primitives, it places and routes for iCE40 so needs the iCE40 specific primitives15:28
llee454I see.15:28
daveshahspecifically "synth_ice40 -blif out.blif"15:28
daveshahwhich gives some extra arguments to write_blif to make it arachne-pnr compatibke15:28
daveshah*compatible15:28
llee454Thanks daveshah I'm going to try this now.15:29
*** craigo has quit IRC15:46
*** kraiskil has quit IRC15:52
*** az0re has joined #yosys17:27
llee454daveshah, I tried to run "synth_ice40," but ran out of RAM during the peepopt pass. I then copied the commands listed here (http://www.clifford.at/yosys/cmd_synth_ice40.html) into a script file, commented out the peepopt pass, and ran the script. This generated a blif file. But, arachne-pnr returned the following error message for it:17:29
llee454"kami32.blif:88146: fatal error: unknown model `$__ICE40_CARRY_WRAPPER'" Any ideas?17:29
tpbTitle: Yosys Open SYnthesis Suite :: Command Reference :: synth_ice40 (at www.clifford.at)17:29
daveshahThere shouldn't be $__ICE40_CARRY_WRAPPERs in the output but this is possibly an issue with whiteboxes17:30
daveshahThe running out of RAM issue is probably more serious, assuming your system has a reasonable amount of free RAM17:30
mwkhmmm, peepopt...17:30
llee454The exact commands I used were: https://hastebin.com/payemikuqa.cs17:30
tpbTitle: hastebin (at hastebin.com)17:30
daveshahthe `only if relut` comment might be out of date, try re-enabling ice40_unlut17:31
llee454yosys was consuming 14GB when it died running peepopt. Is this normal for a large design?17:31
llee454ok17:31
daveshahnot for any design that fits on an iCE40 or ECP517:32
daveshah(for perspective, a Rocket design that maxes out a Versa peaks at around 1GB)17:32
whitequarkdo you maybe have a RAM that got legalized into FFs?17:33
ZipCPUOr some multiplies that didn't get placed into DSPs?17:33
llee454rerunning with "ice40_unlut; opt_lut -dlogic SB_CARRY:I0=1:I1=2:CI=3"17:33
tntYeah, non-inferred bram would be my guess.17:34
ZipCPUIt might also help to run on the yosys on the various components of your design.  Chances are there's one component that's using way too many resources17:34
ZipCPUJust doing that component would likely fit in memory17:34
llee454I see.17:34
daveshahIf other commands run fine, then it isn't a design problem but a peepopt problem17:34
llee454I will try to run yosys on the various components and see how much RAM it consumes.17:34
llee454daveshah the other commands appear to run fine.17:35
mwkllee454: I'd be interested in having a look at that design17:40
*** kraiskil has joined #yosys17:46
llee454The documentation for the synth_ice40 pass is out of date. The documentation says that the pass calls ice40_unlut, but ice40_unlut no longer exists. There is a pass named "ice40_wrapcarry" however. The shell documentation says that this pass accepts a flag named "-unwrap," which looks like it might resolve the error returned by Arachne. I'm17:46
llee454recommenting out the ice40_unlut pass and adding a call to wrapcarry.17:46
llee454@mwk sure. One moment.17:46
mwkllee454: FWIW for a current list of commands executed by the pass, you can always run yosys -p 'help synth_ice40'17:47
mwkthis applies to most yosys script passes17:47
llee454@mwk thanks. I see that this includes a call to unwrap. I will use that and comment out peepopt.17:48
mwk... would be nice to know which of the three peepopt sub-passes causes the problem17:48
mwkbut uh, seems we don't even have a way at the moment to execute a subset of thoser17:49
ross_sdaveshah: thanks for following up, I just re-broke my design and verified that it failed to route on my current version / succeeds to route on nextpnr master, so patch seems good!17:50
daveshahThanks for testing!17:51
llee454@mwk https://github.com/llee454/RiscvSpecFormal/blob/temp/verilog-models/kami32.v17:56
tpbTitle: RiscvSpecFormal/kami32.v at temp · llee454/RiscvSpecFormal · GitHub (at github.com)17:56
llee454@mwk note: that the verilog is generated by compiling a model written in Kami. The Kami model is divided into a set of files in the ProcKami directory. Somewhat confusingly both verilog and Kami use the same file extension - ".v"17:57
mwkhmm17:59
mwkhow do I trigger the issue? "yosys -p synth_ice40 kami32.v"?17:59
*** Nazara has quit IRC18:00
mwkpeepopt seems to work just fine for me18:00
mwkotoh, it gets stuck soon afterwards in the `share` pass and ate 16GB of memory so far18:01
*** Nazara has joined #yosys18:03
mwkyeah, OOM-killed in share at 27GB memory usage18:03
mwkpeepopt worked just fine though, and semi-instantly as well18:03
llee454@mwk Yes. I just noticed that I misattributed the point of failure.18:04
llee454@mwk apparently it was the share pass that consumed the excess memory.18:04
tntThe RAM have resets.18:05
tntAlthough removing it doesn't really help either.18:06
whitequarkwhat if you mark the RAM as (*ram_block*)?18:07
llee454@tnt I thought that the hierarchy pass strips out the two memory devices.18:07
tntllee454: mmm maybe, I didn't try the full synth, I figured if it was in the verilog, it'd be used ...18:08
llee454I see. I'll try removing them explicitly if my current run fails.18:09
tntSo the top level is _design and not _system ?18:09
tntdid you select that as the top level ?18:09
mwk... what exactly emitted this thing?18:10
llee454@tnt yes. I only care about _design right now. My goal was just to confirm that the build system would work and that the processor core would fit.18:10
mwkbecause uh I'm not convinced it's actually valid verilog18:10
mwkyosys emits craploads of lines like "kami32.v:58620: Warning: Identifier `\tmp$818.valid' is implicitly declared."18:11
llee454@mwk './doGenerate.sh --verilog-sim --xlen 32' This command compiles the Kami code and generates System Verilog. Then I used sv2v to convert the System Verilog into Verilog. The kami32.v file is the result of this build process.18:11
mwkand, indeed, I have no idea what that is supposed to be — a bitfield of tmp$818 perhaps? but tmp$818 is just a plain 34-bit wire...18:12
mwk... well, then it seems that sv2v is emitting bullshit18:12
mwklooks like a not-quite-converted SV structure to me18:12
mwkI mean, the OOM in `share` is still worrying and I'll try to investigate it, but it seems you have bigger problems18:13
llee454@mwk hmm. Do you know of a better utility for converting System Verilog to Verilog? Yosys's System Verilog frontend chocked on the arrays in the original file.18:13
mwknot really18:13
tntAlthough really to answer you question ... pretty sure it won't fit in any ice40 :p18:14
daveshahyeah the 7.9MB kind of gives that away already18:14
tnt:)18:14
llee454@daveshah what size range would the Verilog file have to fit in to be viable?18:15
llee454Also are there plans to expand support for System Verilog arrays?18:15
daveshahthere's no exact range, it's just a feeling18:15
llee454I might be willing to help add that support. What would be involved?18:15
tntWhere does that verilog even comes from ?18:17
llee454Well for what it's worth, I got arachne to report a new error: https://hastebin.com/ibovulopeg.rb18:18
tpbTitle: hastebin (at hastebin.com)18:18
daveshahmaps to 17k LUT4s at the end with share commented out so it's over 2x too big for an ice40 anyway18:18
daveshahthat's because you have more pins than the device has18:18
daveshahbut the number of logic cells/LUTs is a bigger problem18:18
tntLCs          22737 / 768018:19
tntlol18:19
llee454I used: https://hastebin.com/usohaforen.cs, where I just commented out the share pass (as well as other passes controlled by flags).18:19
tpbTitle: hastebin (at hastebin.com)18:19
tntBRAMs        0 / 3218:19
tntThat's worrying.18:20
tntsv2v probably screwed up inferrence.18:20
llee454I see.18:20
llee454Well, the only reason I used sv2v was because Yosys couldn't handle the arrays in my system verilog file. Perhaps it would be wiser for me to add support for arrays. Can anyone tell me (at a high level of abstraction) what this would entail?18:22
tntwhat kind of array ?18:22
mwkhmm18:23
mwkhow old is your yosys, anyway?18:23
tntalso did yo uuse the -sv flag18:23
llee454Yosys 0.9+2406 (git sha1 9a2cf5e3, clang 6.0.0-1ubuntu2 -fPIC -Os)18:23
llee454I just tried the -sv flag. No luck: https://hastebin.com/ilevekigag.coffeescript18:25
tpbTitle: hastebin (at hastebin.com)18:25
tntcan you show ystem.sv ?18:25
llee454The error is on line 5: https://hastebin.com/yovevekoqe.md18:27
tpbTitle: hastebin (at hastebin.com)18:27
mwkso... not an array, just a multi-dimensional wire18:28
tntAh yeah, arrays in ports, yeah that's not going to work.18:28
llee454Is there anything I can do to add support? Is there a conversion I can apply to the Verilog file to work with Yosys?18:29
tntyeah you can flatten it ... change it to a [31:0]18:29
tnt(obviously you need to change it everywhere it's used ...)18:30
llee454Thanks18:30
llee454I assume that I need to do the same for packed structs?18:31
llee454Yosys doesn't appear to like line 7 either.18:32
tntAll of that is in the "System" which you don't care about so maybe focus on fixing "Design" ...18:35
llee454Thanks to everyone who offered me assistance. I'm going to revise the Kami compiler/design to avoid outputing packed structs and multidimensional wires. Hopefully that will result in parsable System Verilog code (even if the design remains too large to fit in an ice40 board).18:38
*** llee454 has quit IRC18:46
*** futarisIRCcloud has quit IRC19:07
*** kraiskil has quit IRC19:45
*** kraiskil has joined #yosys19:48
*** jakobwenzel has quit IRC20:08
*** emeb_mac has joined #yosys20:37
*** jfcaron has quit IRC21:08
*** jeanthom has quit IRC21:20
*** Asu has quit IRC21:32
*** futarisIRCcloud has joined #yosys21:41
*** az0re has quit IRC21:51
*** az0re has joined #yosys22:07
*** kraiskil has quit IRC22:18
*** tlwoerner has quit IRC22:37
*** X-Scale` has joined #yosys23:36
*** X-Scale has quit IRC23:37
*** X-Scale` is now known as X-Scale23:37

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!