Wednesday, 2020-06-17

*** tpb has joined #yosys00:00
*** FFY00 has quit IRC01:03
*** FFY00 has joined #yosys01:05
*** craigo has quit IRC01:11
*** futarisIRCcloud has joined #yosys01:20
*** _whitelogger has quit IRC01:57
*** _whitelogger has joined #yosys01:59
*** Degi has quit IRC02:18
*** Degi has joined #yosys02:19
*** mithro has joined #yosys02:36
*** citypw has joined #yosys03:56
az0reSo, how negatively do people feel about bringing in Boost dependencies?04:23
az0reI am working on adding a `partition` command to Yosys, to split a (for now, flattened) techmapped module into multiple submodules with roughly balanced amounts of logic in each partition, with an objective to minimize the number of cut edges.  In other words, it's an implementation of balanced hypergraph partitioning.04:25
az0reThis is an NP-complete problem, but thankfully there are good heuristics for it.04:25
az0reThere are AFAIK only two reasonable libraries that could be included in Yosys: KaHIP ( https://github.com/KaHIP/KaHIP ) and minipart2 ( https://github.com/Coloquinte/minipart2 )04:27
tpbTitle: GitHub - KaHIP/KaHIP: The graph partitioning framework KaHIP -- Karlsruhe High Quality Partitioning. (at github.com)04:27
az0reThese are both MIT licensed04:27
az0reHowever, including minipart2 in Yosys would bring in some Boost dependencies, and including KaHIP would bring in Scons and an old version (!) of OpenMPI04:28
az0reSo neither is particularly ideal...  Guidance would be appreciated04:28
whitequarkaz0re: very negatively05:31
whitequarkcross-compiling Boost is a nightmare and if I have any say over this at all I would never agree on having it in Yosys05:32
whitequarkit was bad enough in nextpnr05:32
whitequark(in fact I would like to rip it out of nextpnr if possible)05:32
az0reIs the best option to rely on an external executable, then?  Of course, then the command only works if the other program is installed05:52
sorear"minimizing the number of cut edges" is an oversimplification of the objective (we care a lot about timing, too, and depending on exactly what you're doing it may be possible to multiplex)05:52
sorearand I question whether a library that _only_ minimizes the number of cut edges, is useful at all?05:53
az0reOh sure, it's not the only objective05:53
soreardoesn't make sense to spend a huge amount of effort on a precise solution of an approximate problem05:53
az0reAnd you can specify vertex and edge costs05:54
az0re> doesn't make sense to spend a huge amount of effort on a precise solution of an approximate problem05:54
az0re?05:54
az0reNeither try to give a precise solution05:54
az0reI am not sure exactly where you're coming from, BTW.  I am not talking about using this for mapping, if that's what you're thinking.05:56
whitequarkI would personally consider reimplementing the algorithms but usually I work on things I know will be directly useful05:56
whitequarkthis seems to be more of an experimental project, right?05:56
az0reNot really05:56
sorearI only know what you said above <I am working on adding a `partition` command to Yosys, to split a (for now, flattened) techmapped module into multiple submodules with roughly balanced amounts of logic in each partition, with an objective to minimize the number of cut edges. >05:56
sorearif pushed to guess I would say this is for SLRs, but it could be anything05:57
whitequarkwhat's the intended domain of the project?05:57
whitequarki.e. who will be using it?05:57
az0reI intend to scale GLIFT optimization by partitioning05:57
whitequarkglift is based on SMT solvers, right?05:58
az0reAnd for this, classic cut-minimized partitioning is probably ideal05:58
whitequarks/based on/uses/05:58
az0reYes05:58
whitequarkso you're already relying on an external tool for those05:58
az0reYes05:58
az0reHowever, the command is more general than just my particular application05:59
whitequarkwell, if it would be a part of some core synthesis or simulation flow, I would personally try to get it as seamless as possible, up to and including reimplementing the algorithms05:59
whitequarkbut if it's a part of a single flow that requires SMT solvers, then an external tool is fine06:00
whitequarkthat's my logic.06:00
az0reI'm fine with calling an external program for my application06:00
az0reBut like you say, it is not the ideal implementation06:00
az0reAnd it's a general command that may be useful to expose directly06:01
whitequarkokay, I can raise that question on a meeting tomorrow06:02
az0reAnyway I feel like KaHIP is also a no-go06:03
az0reIt specifically requires an old version of OpenMPI... like, what?06:03
az0reCool, thanks06:03
daveshahI am actually working on an open source permissive hypergraph partitioner for nextpnr06:29
daveshahHopefully in a month or two this will be a viable option for Yosys, too06:29
daveshahFunnily enough I went through a similar evaluation process a couple of weeks ago06:30
az0reHah, funny06:38
az0reWhat's the state?  I'd be interested in using it if it's already working06:39
az0re(Even if it's not ready for merging to Yosys yet)06:39
az0reAlso, FWIW, I can't seem to get KaHIP to work, but hMETIS and minipart2 work fine06:39
daveshahIt's not quite working yet but maybe next week I will have something at that point06:40
az0reCool beans06:41
az0reIt takes a regular .hgr file?06:41
daveshahNo, not yet, I was mostly interested in deeply embedding in nextpnr06:42
az0reI see06:43
az0reA shitty spec is available at http://glaros.dtc.umn.edu/gkhome/fetch/sw/hmetis/manual.pdf06:43
daveshahThanks!06:43
az0reNonono, thanks to you :)06:43
az0reActually, probably the code is more obvious: https://gist.github.com/boqwxp/28e5ad04fa0ec0ef84ddd8062f84efc7/raw/ef31b2312ffb7140e512aac84fd596539a40e954/gistfile1.txt06:46
az0reAt least for weighted-node non-weighted-edge hypergraphs06:46
az0reBut anyway it's not complicated06:47
daveshahYep, I already have a debug dump format that happens to be pretty similar already06:48
*** emeb_mac has quit IRC07:01
*** jakobwenzel has joined #yosys07:47
*** Xark has quit IRC08:11
*** Xark has joined #yosys08:14
*** kraiskil has joined #yosys08:58
*** Asu has joined #yosys09:10
*** X-Scale` has joined #yosys10:27
*** X-Scale has quit IRC10:28
*** X-Scale` is now known as X-Scale10:28
*** N2TOH has quit IRC11:05
*** N2TOH has joined #yosys11:06
*** hitomi2500 has joined #yosys12:30
hitomi2500is it normal for Yosys to yield almost 4 times more LUTs than non-free alternative? Gowin tech, 550 LUTs in native tools and 1800 in Yosys12:39
hitomi2500or maybe something is wrong with my verilog?12:40
daveshahVery possible12:44
daveshahRAM mapping issues could be the cause, or just something wrong with the Gowin rules12:45
Loftyhitomi2500: Take a look at my gowin_abc9 branch12:46
LoftyYou can get notable improvements in delay/area from it12:49
hitomi2500Ok, thanks, i'll try that12:50
Lofty(make sure to pass `-abc9` to `synth_gowin` with that)12:51
*** jfcaron has joined #yosys13:26
hitomi2500Alas, no luck with gowin_abc9, the result is a bit different, but overall usage is almost the same.13:49
LoftyHow about using `-abc9 -nowidelut`?14:02
LoftyABC is very ambitious with using wide LUTs for performance14:03
Loftyhitomi2500: ^14:03
maartenBEThe .editorconfig of yosys doesn't set tab_width. Is it 4?14:04
LoftymaartenBE: user preference14:06
hitomi2500Indeed, -nowidelut works a bit better, but still not much. It seems i'm missing something else here.14:08
Loftyhitomi2500: can you copy/paste your Yosys output log?14:13
Lofty(to a pastebin)14:14
LoftyWondering if something is not being inferred properly14:14
lambdamaartenBE: what does tab width have to do with aligning comments in #2164?14:14
maartenBEWhen using hard tabs to align them, they might not align if your tab width is 8 vs mine is 814:16
maartenBE*mine is 414:16
hitomi2500It's more than a pastebin's limit of 512K14:16
lambdamaartenBE: why not? where would you want to put those comments?14:17
nengelCodingReadme does say that tabs are 8 spaces but I certainly don't listen to it (way too many levels of nesting in yosys for that)14:17
hitomi2500There are some strange errors about bram port's clock being incompatible. Maybe it's because i use single port RAM?14:18
hitomi2500https://pastebin.com/N0WtmKfy14:18
tpbTitle: 5.8. Executing MEMORY_BRAM pass (mapping $mem cells to block memories). Process - Pastebin.com (at pastebin.com)14:18
maartenBEOh, I didn't see the CodingReadme.14:18
mwkmaartenBE: whatever the tab width is, the field values will start at the same horizontal positions, so you can use spaces to align the commends14:19
mwkcomments14:19
maartenBEIn there, spaces are used to align comments14:19
lambdamaartenBE: tabs can't be used for alignment (for obvious reasons), that's what spaces are for - tabs are only for indentation so that anyone can make their nesting as tight or wide as they want14:19
mwkthat or just don't bother and use a single space everywhere14:19
mwkeither way, you're overthinking it14:19
maartenBElines 86-92 in there14:19
*** josi has quit IRC14:40
*** josi has joined #yosys14:41
Loftyhitomi2500: that's the problem; you can't use single port RAMs in Yosys14:44
LoftyThey won't infer14:44
daveshahThey will infer, just to dual port RAMs14:44
LoftyHmm14:45
daveshahBut the exact pattern may be wrong14:45
hitomi2500They do infer, at least what's the stats say. I will convert them to dualport anyway, just to check the difference.14:46
*** dys has joined #yosys14:58
maartenBEI can reproduce my cxxrtl issue of yesterday: see https://github.com/YosysHQ/yosys/issues/216615:00
tpbTitle: cxxrtl backend generates non-working c++ sources when NDEBUG=1 · Issue #2166 · YosysHQ/yosys · GitHub (at github.com)15:00
maartenBEdropping ENABLE_DEBUG makes it work again15:00
maartenBEaargh, dropping ENABLE_NDEBUG15:01
daveshahInteresting, I wonder if something is wrapped in an assert or something15:04
Loftycc whitequark15:08
*** az0re has quit IRC16:11
*** maartenBE has quit IRC16:33
*** maartenBE has joined #yosys16:39
*** hitomi2500 has quit IRC16:40
*** citypw has quit IRC16:54
*** az0re has joined #yosys17:04
*** emeb has joined #yosys17:10
lambdaI think I heard there was a dev meeting today - any news about the memory redesign? :)17:29
*** indy has quit IRC17:41
*** jakobwenzel has quit IRC18:34
*** bwidawsk is now known as thehardway18:52
*** _whitelogger has quit IRC20:00
*** _whitelogger has joined #yosys20:02
*** X-Scale` has joined #yosys20:11
*** ronyrus_ has joined #yosys20:14
*** ZirconiumX has joined #yosys20:14
*** Ekho- has joined #yosys20:14
az0reSo what's the official way to select a module programmatically?20:18
*** X-Scale has quit IRC20:18
*** Lofty has quit IRC20:18
*** qu1j0t3 has quit IRC20:18
*** sensille has quit IRC20:18
*** Kamilion has quit IRC20:18
*** Ekho has quit IRC20:18
*** daddesio has quit IRC20:18
*** thardin has quit IRC20:18
*** ronyrus has quit IRC20:18
*** X-Scale` is now known as X-Scale20:18
*** Ekho- is now known as Ekho20:19
az0reI see Design::select(), but it's not clear what type T2 is supposed to be or what "member" should be to select the whole module20:20
az0reShould I just do it manually, like `design->selection_stack.back().select(module);`?20:21
*** ZirconiumX is now known as Lofty20:22
az0reOr should I add a `Design::select(T1 *module)` to go along with the existing `Design::select(T1 *module, T2 *member)`?20:24
*** qu1j0t3 has joined #yosys20:25
az0reYeah OK I understand now, that existing Design::select() exclusively for module members.20:27
*** y2kbugger has quit IRC20:34
*** esden has quit IRC20:35
*** elms has quit IRC20:36
*** thoughtpolice has quit IRC20:36
*** esden has joined #yosys20:38
*** ovf has quit IRC20:40
*** tannewt has quit IRC20:41
*** y2kbugger has joined #yosys20:42
*** y2kbugger has quit IRC20:47
*** esden has quit IRC20:48
*** y2kbugger has joined #yosys20:52
*** Kamilion has joined #yosys20:52
*** kraiskil has quit IRC20:56
*** Asu has quit IRC21:18
*** Asu has joined #yosys21:19
*** y2kbugger has quit IRC21:24
*** tannewt has joined #yosys21:35
*** Asuu has joined #yosys21:35
*** esden has joined #yosys21:36
*** Asu has quit IRC21:36
*** ovf has joined #yosys21:37
*** y2kbugger has joined #yosys21:39
*** Asuu has quit IRC21:54
*** FFY00 has quit IRC21:56
*** FFY00 has joined #yosys21:56
*** elms has joined #yosys22:06
*** jfcaron has quit IRC22:07
*** thoughtpolice has joined #yosys22:13
whitequarkadding an overload for selecting a module seems fine22:44
*** emeb has quit IRC23:25
*** emeb_mac has joined #yosys23:28

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