Wednesday, 2020-01-08

*** tpb has joined #yosys00:00
*** vidbina has joined #yosys00:21
*** vidbina_ has quit IRC00:24
*** vidbina has quit IRC00:40
*** emeb has left #yosys01:05
*** emeb_mac has joined #yosys01:08
*** gromero has quit IRC03:03
*** citypw has joined #yosys03:04
*** X-Scale has quit IRC03:31
*** X-Scale` has joined #yosys03:31
*** X-Scale` is now known as X-Scale03:33
*** X-Scale has quit IRC04:12
*** X-Scale` has joined #yosys04:14
*** X-Scale` is now known as X-Scale04:15
*** citypw has quit IRC04:16
*** dh73 has quit IRC04:54
*** dys has quit IRC04:55
*** citypw has joined #yosys06:15
*** dys has joined #yosys06:56
*** emeb_mac has quit IRC07:01
*** rombik_su has joined #yosys07:27
*** dys has quit IRC08:15
*** dys has joined #yosys08:51
*** citypw has quit IRC09:06
*** citypw has joined #yosys09:08
*** rombik_su has quit IRC09:10
*** vidbina has joined #yosys09:13
*** philtor has quit IRC09:42
*** vidbina has quit IRC09:46
*** vidbina has joined #yosys09:46
lukegoI'd like to meet all'yall open source hardware hackers at FOSDEM. Is there a particularly popular place to stay for this crowd i.e. hotel recommendation?09:58
lukego(I'm meanwhile setting up my dev env... learning to solder, going to make a power supply board, then going to try and put my ECP5 BGA and 10G ethernet PHY BGAs onto a first simple board of some kind...)10:03
*** citypw has quit IRC10:51
corecodewhen/where is fosdem?11:21
lukegoBrussels, 1-2 december. https://fosdem.org/2020/11:23
tpbTitle: FOSDEM 2020 - Home (at fosdem.org)11:23
lukegoI did catch fpgadave's talk about Project Trellis last year but I was mostly hanging out with the software networking crowd beyond that.11:24
tntdefinitely not in december ...11:24
lukegoer, feb :-11:24
finnbI went last year but felt it was a little too busy to actually attend a lot of the talks I wanted to see11:43
tntyou just can't change room ...11:45
tntpick one, go in the morning, leave in the evening.11:45
finnbI think if you're going, it's a lot for the social11:46
finnbI know ticketing it would go against the principles but they either need to get a bigger venue or limit the number of people that can go11:46
finnbThe Trellis talk last year was great :)11:49
*** vidbina has quit IRC11:54
lukegoSoftware networking room was a bit of a disaster last year. Small room with bad A/V. Most of the people in the room couldn't hear the talk and were only there to hold their seat for one of the other talks coming later.12:02
lukegobut that's part of the charm of FOSDEM I suppose :) created a pretty good hallway track12:02
lukegoI suppose also that since nobody has name tags your best bet for finding like-minded people is to loiter around outside relevant devrooms and chat to other people who are interested in the topic but couldn't get a seat :)12:04
*** gromero has joined #yosys13:22
*** X-Scale has quit IRC15:40
*** dh73 has joined #yosys15:43
*** captain_morgan20 has quit IRC16:02
*** X-Scale has joined #yosys16:23
*** emeb has joined #yosys16:50
*** vidbina has joined #yosys17:19
*** Cerpin has quit IRC17:26
*** Cerpin has joined #yosys17:29
*** vidbina has quit IRC17:38
*** dys has quit IRC17:43
*** TheHolyC has quit IRC18:51
*** TheHolyC has joined #yosys18:51
*** vidbina has joined #yosys18:52
*** dys has joined #yosys19:11
ZirconiumXI'm trying to write a Yosys pass, so I may have some dumb-sounding questions because I don't know the codebase very well.19:25
ZirconiumXHow do I check if two cell inputs refer to the same signal?19:37
mwkZirconiumX: just... compare them19:40
* ZirconiumX was assuming that operator== was a comparison by value, not by identity19:40
mwkthough the usual approach is to use SigMap to also consider equivalent two wires that are assigned to each other19:41
daveshahThis is a pass I wrote that has various signal comparisons using sigmap19:41
daveshahhttps://github.com/YosysHQ/yosys/blob/master/techlibs/ecp5/ecp5_gsr.cc19:41
tpbTitle: yosys/ecp5_gsr.cc at master · YosysHQ/yosys · GitHub (at github.com)19:41
daveshahAlthough this is for 1 bit signals19:42
ZirconiumX1-bit is enough for this19:42
mwkZirconiumX: so how it works is, operator== compares by identity (or by value for const signals)19:58
ZirconiumXRight, I see19:59
mwkbut since wires in modules can be assigned to each other (which is represented by module->connections), and you usually want this to be transparent in your passes, the SigMap util is used19:59
mwkyou construct a SigMap from a module, and it maps every SigBit to a "canonical" one from the assigned-to-each-other set19:59
mwkthen to compare two signals, you do sigmap(a) == sigmap(b)19:59
mwkwhere sigmap is your pre-constructed SigMap object19:59
mwkand you have to be careful to not invalidate SigMap before you stop using it20:00
mwk(which is not that hard, as long as you don't add/remove connections)20:00
* mwk feels the whole thing to be a mess, but eh20:01
* mwk would really love the whole thing to be more SSAish and have a single well-defined instantly-accessible driver for every wire20:02
mwkgimme LLVM :320:02
ZirconiumXContext: I'm writing an ALM packing pass. I realise Yosys is the wrong place to put this, but lacking nextpnr support and Quartus stubbornly refusing Yosys output, I'd like some way of obtaining ALM numbers20:03
ZirconiumXPlus this gives me practice for writing Yosys passes, so20:03
ZirconiumXI feel like the most realistic numbers would come from representing the cells as layers of a tree and then trying to pack each layer20:09
mwkuh what?20:11
ZirconiumX...This is going to need a diagram, isn't it?20:12
mwkit could help, yes20:12
ZirconiumXhttps://puu.sh/EXKz0/8537b3a7be.png <-- please suspend your disbelief on the realism of this diagram20:16
mwkI umm20:17
mwkI'm not sure what I'm looking at?20:18
ZirconiumXAn example circuit, say from `show`.20:18
mwkthere'a a LUT3 with 2 inputs?20:19
ZirconiumXNo, the numbers here are reference20:19
ZirconiumXAs in "the third LUT"20:19
mwkahh20:19
mwkalright20:19
*** Jybz has joined #yosys20:20
ZirconiumXNow, LUT3 depends on the output of LUT 1, so you might not be able to fuse LUT 3 into LUT 120:21
ZirconiumXBut you could try to pack LUT 1 and LUT 2 together20:21
mwkwhy not?20:21
mwkI mean, if they are otherwise fusable?20:22
* ZirconiumX sighs and reaches for the output of `show` because apparently this is not realistic enough20:22
ZirconiumXNote the "might not" there20:22
mwkyes, but why does the fact that LUT 3 depends on LUT 1 matter?20:23
mwkI mean, worse case, you'll just have a path straight from ALM output to its own input?20:23
ZirconiumXI thought combinational loops were a bad thing20:24
mwkthey are, but it's not going to be a real combinational loop20:24
ZirconiumXOkay, then clearly I don't know anything here.20:29
*** TheHolyC has quit IRC20:34
*** TheHolyC has joined #yosys20:35
*** dh73 has quit IRC20:42
*** dh73 has joined #yosys20:43
*** emeb_mac has joined #yosys20:49
dh73AFAIK, Quartus/Synplify starts the ALM packing by mapping logic using ALM legal constraints (2 4-input luts, 1 6-output luts, 1 5-input lut + 1 3-input lut, etc), then the Quartus fitter place these instances correctly. I have no deep details honestly, but that's the pattern I've seen.20:54
dh73For instance; ALUT usage by number of inputs20:55
dh73          7 input functions      020:55
dh73          6 input functions      020:55
dh73          5 input functions      020:55
dh73          4 input functions      220:55
dh73          [=3 input functions    120:55
ZirconiumXhttps://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/agilex/ug-ag-lab.pdf20:55
dh73Is packed into 1 ALM (4 input functions      2)20:55
ZirconiumXI sent this paper to mwk, but it's quite useful here too20:55
ZirconiumXI have a rough formula for ALM packing, but I'm looking for generally more realistic numbers.20:57
*** Jybz has quit IRC21:26
*** cznwhale has joined #yosys21:31
cznwhalehello; I am new to yosys - but read the documentation ~80%21:32
cznwhaleis it possible to synthetize a design using only toffoli gates?21:32
cznwhaleand without any classic gates21:33
cznwhale(nand, nor, not)21:33
cznwhale(toffoli gate are universal reverible gates - and they have 3 in/ 3 out)21:33
daveshahcznwhale: Probably not very well. You can synthesise to arbitrary gate libraries with abc and liberty files but that only maps single output gates21:34
daveshahie it would only use the final output of the Toffoli gate and not the "route throughs"21:35
cznwhalecan you point me in some documentation what is a "gate library"?21:36
cznwhaleI tried some experiments21:36
cznwhaleif I remove from the liberty file the nor for example (and leave the not and nand)21:36
cznwhalethe output netlist will corectly contain only not and nand21:36
cznwhalebut if I remove the not21:37
cznwhalean internal error in the abc will pop out21:37
daveshahABC requires a not gate and a buffer in a liberty file21:37
cznwhalebut why this limitation21:37
cznwhale?21:37
cznwhalea NOT is very simple build with a NAND21:38
daveshahThere's no reason, just ABC expecting a typical gate library21:38
daveshahYou could always use techmap afterwards to convert the NOT to a NAND21:38
daveshahie a real world ASIC gate library would always have NOT and buffer cells, and I guess ABC didn't consider more obscure applications21:39
cznwhaleso in fact there is no flexibility in the final netlist21:39
daveshah?21:39
cznwhaleI refer that the liberty file does not alow much things to be variable21:40
cznwhalemaybe only the names of the gates21:40
cznwhalebut not the functions21:40
ZirconiumXYou can go add things beyond the gates21:40
ZirconiumXBut ABC is fairly limited here because this part of ABC was designed for ASIC synthesis.21:41
daveshahcznwhale: you can have a totally variable set of gates21:41
daveshahThere is only one ABC requirement and that is that the set of gates must include not21:41
daveshahThe workaround is to use Yosys techmap to convert that not into whatever you want21:42
cznwhaleand use extensions for my exotic gate functions, right?21:42
daveshahYou don't need to use any extensions21:42
daveshahStandard liberty functions should be fine21:43
cznwhalemaybe I didn't understand right the whole flow21:43
cznwhaleI saw in the example of synth script21:43
cznwhalethat the ABC is called almost the last command21:44
daveshahYes, that's usually the case21:44
cznwhale(actually the last is an "opt")21:44
ZirconiumXYosys is a series of passes. You can call any of these passes in whatever order you want21:44
daveshahThe previous commands tend to be doing higher level (eg word level) transformations21:45
cznwhalebut if I want to have in the final netlist an exotic gate21:45
cznwhaleABC will not handle it21:45
daveshahThen you will probably want techmap after abc to deal with the NOT case21:45
cznwhaleI must put some other final command for yosys to do the replacement21:45
daveshahThat is "techmap"21:46
cznwhaleOK21:46
cznwhalethank you very much!21:46
ZirconiumXABC is limited to single-output gates. Since I worked on targeting 7400-series logic chips, my solution was a post-processing pass that merged single-output gates into a chip21:46
cznwhalethe post-process was your own?21:46
ZirconiumXYep21:46
cznwhaleor a yosys command21:46
cznwhaleok!21:47
ZirconiumXWell, specifically it was pepijndevos' idea; a Python script that operated on the Yosys netlist.21:47
cznwhale:)21:47
*** fsasm has joined #yosys21:53
*** fsasm has quit IRC22:37

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!