Monday, 2022-04-25

*** tpb <[email protected]> has joined #yosys00:00
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Quit: Leaving)03:35
*** emeb_mac <[email protected]> has quit IRC (Read error: Connection reset by peer)04:29
*** emeb_mac <[email protected]> has joined #yosys04:29
*** nak <nak!~nak@yosys/nak> has quit IRC (Ping timeout: 240 seconds)04:41
*** nak <nak!~nak@yosys/nak> has joined #yosys04:43
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys04:57
*** nak <nak!~nak@yosys/nak> has quit IRC (Ping timeout: 250 seconds)06:06
*** FabM <FabM!~FabM@2a03:d604:103:600:4923:d8d3:c661:83e3> has joined #yosys06:18
*** bpye <bpye!~bpye@user/bpye> has quit IRC (Ping timeout: 276 seconds)06:18
*** emeb_mac <[email protected]> has quit IRC (Quit: Leaving.)06:31
*** bpye <bpye!~bpye@user/bpye> has joined #yosys06:36
*** bpye <bpye!~bpye@user/bpye> has quit IRC (Ping timeout: 276 seconds)06:46
*** bpye <bpye!~bpye@user/bpye> has joined #yosys06:59
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has quit IRC (Ping timeout: 246 seconds)07:03
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has joined #yosys07:05
*** bpye <bpye!~bpye@user/bpye> has quit IRC (Ping timeout: 276 seconds)07:13
*** bpye <bpye!~bpye@user/bpye> has joined #yosys07:18
*** nak <nak!~nak@yosys/nak> has joined #yosys09:43
*** nak <nak!~nak@yosys/nak> has quit IRC (Ping timeout: 240 seconds)09:55
*** vidbina <vidbina!~vid@2a02:3032:7:fab3:62f8:5254:d1ec:62f0> has joined #yosys10:20
*** nak <nak!~nak@yosys/nak> has joined #yosys12:08
*** nak <nak!~nak@yosys/nak> has quit IRC (Ping timeout: 250 seconds)12:21
*** somlo <[email protected]> has quit IRC (Remote host closed the connection)12:35
*** nak <nak!~nak@yosys/nak> has joined #yosys12:54
*** somlo <[email protected]> has joined #yosys12:55
rowang077[m]Is it somehow possible to setup min/max delays and false paths in yosys or nextpnr? I'm working on a multiclock design and need some timing constraints on an async fifo synchronizer. 14:04
rowang077[m]I can't find anything in the doc14:04
tntnope14:05
rowang077[m]so multiclock is not supported? How do other projects handle this I see litex entire socs. I assume they must have multiple clock domains? 14:06
tntATM it's sort of cross your finger and hope the placer put them close enough.14:06
tntBut there is no cross-clock analysis done at all. 14:06
tntit does _report_ the max delay in the report but you can't constrain it.14:07
rowang077[m]:( I see. That's unfortunate14:07
rowang077[m]Is this something that would be implementable in a few days? I could try my hand at it. 14:08
rowang077[m]I'd wager from scratch would be a lot of work14:08
tntI have no clue whatsoever tbh ... but for someone without good knowledge of how the current code works, I feel like it's a long shot.14:09
tntgatecat would know better for sure14:09
gatecatyeah, even scoping it out would be more than a few days work tbh14:10
gatecatit will be done at some point but with my schedule being somewhat chaotic rn it's hard to help more than that14:11
gatecatunless you happen to have $50k in your back pocket ;)14:12
rowang077[m]haha I wish 14:12
*** adjtm <[email protected]> has quit IRC (Quit: Leaving)14:23
killjoyFrankly, yosys should have kickstarter campaigns for each feature request. The ones that get funded get implemented. :D14:35
tntNot sure about kickstarter, but some official bounty system would be nice. No clue if there'd be enough support to be worth it but ...  (also it's nextpnr for this particular case)14:45
lkclrowang077[m], ls2 (a peripheral fabric i'm developing) has multiple clock domains and uses alex forenchich's async-wishbone15:26
*** nak <nak!~nak@yosys/nak> has quit IRC (Ping timeout: 250 seconds)15:27
lkcltnt: interesting to know that CDC isn't really part of the PnR, that's going to be fun15:28
lkcldoes anyone know how to override a specific techmap?15:28
lkclcurrently i'm compiling nextpnr-xilinx with -nocarrylut due to a limitation of yosys/nextpnr-xilinx/vtr/symbiflow15:29
lkclthere's only room for up to 23-26 CARRY4 blocks within the A7 FPGAs before you have to "cross over" to a different block15:30
lkcltranslation: any add, sub, or cmp that's greater than around 96 bits is guaranteed to fail (in symbiflow/VTR) or to 100% lock up in nextpnr-xilinx15:31
lkclsolution:15:31
lkclin a yosys techmap, instead of creating a naive CARRY4 chain, split the add/sub/cmp into sections of at most 96(ish) bits, with a manual carry-in carry-out bit15:32
lkclthat's context15:32
lkclquestion, therefore:15:32
lkclhow do you override *just one* techmap file of standard techmap commands for a given synth command? (in this case, synth_xilinx)?15:33
lkcli'd greatly prefer not to be running with a fork of yosys.15:33
*** ec <ec!~ec@gateway/tor-sasl/ec> has joined #yosys15:33
lkclah, here we go15:35
lkclhttps://github.com/YosysHQ/yosys/blob/master/techlibs/xilinx/arith_map.v#L6815:35
lkclthat's a naive carry4-chain which is *too long* for A7-35t, 100t (and probably 200t) FPGAs, they can only handle 23-26 CARRY4s.15:37
lkclseveral people have encountered this and are suffering (tolerating) a whopping 30% clock-speed drop by having to use LUT4/6s instead15:37
*** vidbina <vidbina!~vid@2a02:3032:7:fab3:62f8:5254:d1ec:62f0> has quit IRC (Ping timeout: 260 seconds)15:53
*** vidbina <[email protected]> has joined #yosys16:49
jixnot really my area, but is this something that should be handled at the techmap stage? isn't it just creating individual CARRY4 with CI/CO chained, i.e. there would be no difference to splitting the add and manually chaining carry between the split parts?17:38
lkcljix: there's some debate about this.  on the one hand, the _easiest_ way to do it is at the techmap stage18:06
lkclon the other "it's supposed to be the P&R's job"18:07
lkclin between, there's a really *really* nice piece of work by a pair of phd students that actually does an astoundingly awesome job of auto-generating some seriously optimal ASIC techmaps for add/sub/cmp, let me find it...18:08
lkclhere: https://github.com/tdene/synth_opt_adders18:08
lkclnow, it should be pretty obvious from the level of sophistication involved there that trying to teach VTR, nextpnr-ecp5, nextpnr-xilinx etc. etc. etc. how to do that astounding optimisation job is... ah.. not very sane/sensible? :)18:09
lkclsure, you can, but by that point it's the equivalent of running disasm and hand-patching binaries, to try to desperately reconstruct the higher-level concept of the bit-level adders18:10
lkclin order to run the *higher-level* concept of optimising the layouts, with parallel carry-propagation etc. etc. etc.18:11
jixhmm, I guess I'd go with "P&R should at least split long chains and not fail/deadlock, but if you want to do anything more fancy you need to do that before" then18:12
lkclin a word, yes18:12
lkclyou should see the job that symbiflow does of attempting to adjust the naive-long-carry4-chains that yosys throws at it18:12
lkcli mean, it works, but it's done by:18:13
lkcl* exporting to JSON18:13
lkcl* running a python script that searches through the Abstract Syntax Tree looking for patterns involving CARRY418:13
lkcl* performs (in python) JSON DOM Node rewriting (in memory)18:14
lkcl* dumps the JSON file back out18:14
lkcl* calls a yosys script to re-import the JSON and convert it back to BLIF18:14
lkclas you can probably guess, the time taken and the memory usage is astounding18:14
lkcland it has to do that on the *output* of the yosys nextpnr-xilinx techmap, involving (by that point) about 5 or 6 separate and distinct blocks (CARRY4 being one of them)18:15
lkclwhereas if that job was done *by* the yosys techmap for xilinx arithmetic, it would have been done in a few milliseconds of CPU time.18:16
lkcloh and then nextpnr-xilinx has to do the exact same job.18:17
lkclduplicated developer effort, huge amounts of CPU power wasted, vast amounts of memory needed.18:17
lkclor18:17
lkcla simple optimisation of yosys techmaps could be done18:18
lkcljust a thought :)18:19
jixyeah I'm not arguing against improving techmap :)18:21
lkcl:)18:22
lkclhence my question, i'd like to have a go at over-riding the techmaps, but without hard-forking yosys.18:22
lkclin theory i could create an non-built-in command script which duplicates the contents of the synth_xilinx one?18:23
lkclhttp://bygone.clairexen.net/yosys/cmd_synth_xilinx.html18:23
tpbTitle: Yosys Open SYnthesis Suite :: Command Reference :: synth_xilinx (at bygone.clairexen.net)18:23
lkclwhere the "fine" sub-command on that has this:18:24
lkcltechmap -map +/techmap.v [-map +/xilinx/arith_map.v]    (skip if '-nocarry')18:24
lkclthat's the bit i'd like to override, i just don't know how18:24
jixlkcl: I guess you could compile a modified synth_xilinx pass as a loadable plugin? but I haven't looked into plugins besides "debugging" why the plugin test failed when linking with mold 18:24
* lkcl ponders18:25
lkclthere's enough examples, it should be doable from cut/paste18:25
lkclit does seem... how-to-say... somewhat overkill to have to write in c/c++ in order to override something like this18:26
jixI could've used an easy way to selectively override yosys's share files for something completely different18:27
lkclah yeah18:27
lkclgood point18:27
* lkcl wonders if there's a way to hook into that18:27
jixI didn't see one, adding one that replaces the share path completely wouldn't be too hard18:28
jixeven better would be to have a list of search paths IMO, but I haven't looked into whether that can work without changing things all over the place18:28
lkclyehyeh, but... nggggh forks. meh :)18:29
lkcli like that. i mean, it's how python works (sys.path), and LD_LIBRARY_PATH, and etc.18:29
*** vidbina <[email protected]> has quit IRC (Ping timeout: 246 seconds)18:46
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Quit: Leaving)19:51
checkpointguys, has anyone tried synthesizing for GW1NR chips (synth_gowin) ?20:11
*** vidbina <[email protected]> has joined #yosys20:27
*** bpye <bpye!~bpye@user/bpye> has quit IRC (Ping timeout: 276 seconds)20:30
*** emeb_mac <[email protected]> has joined #yosys20:36
*** bpye <bpye!~bpye@user/bpye> has joined #yosys20:39
*** bpye <bpye!~bpye@user/bpye> has quit IRC (Ping timeout: 250 seconds)20:48
*** bpye <bpye!~bpye@user/bpye> has joined #yosys21:02
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Remote host closed the connection)21:02
*** ec <ec!~ec@gateway/tor-sasl/ec> has joined #yosys21:03
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Quit: ec)21:41
*** ec <ec!~ec@gateway/tor-sasl/ec> has joined #yosys21:43
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Client Quit)21:44
*** ec <ec!~ec@gateway/tor-sasl/ec> has joined #yosys21:44
*** indy <[email protected]> has quit IRC (Ping timeout: 240 seconds)22:03
*** indy <[email protected]> has joined #yosys22:07
*** adjtm <[email protected]> has joined #yosys22:36
*** vidbina <[email protected]> has quit IRC (Ping timeout: 240 seconds)23:31
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Ping timeout: 240 seconds)23:41
*** bpye <bpye!~bpye@user/bpye> has quit IRC (Ping timeout: 256 seconds)23:52
*** bpye <bpye!~bpye@user/bpye> has joined #yosys23:57

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