Monday, 2020-08-17

*** tpb has joined #yosys00:00
*** Degi has quit IRC00:16
*** az0re has quit IRC00:17
*** Degi has joined #yosys00:20
*** emeb has quit IRC00:27
*** kristianpaul has quit IRC00:53
*** kristianpaul has joined #yosys00:53
*** cr1901_modern has quit IRC01:06
*** cr1901_modern has joined #yosys01:23
*** az0re has joined #yosys01:37
*** X-Scale` has joined #yosys01:43
*** X-Scale has quit IRC01:44
*** X-Scale` is now known as X-Scale01:44
*** citypw has joined #yosys02:33
*** kristianpaul has quit IRC03:11
*** anticw has quit IRC03:14
*** xtro has joined #yosys03:22
*** anticw has joined #yosys03:31
*** kristianpaul has joined #yosys03:35
*** kristianpaul has quit IRC03:42
*** kristianpaul has joined #yosys03:44
*** maartenBE has quit IRC04:05
*** kristianpaul has quit IRC04:05
*** maartenBE has joined #yosys04:11
*** kristianpaul has joined #yosys04:12
*** kristianpaul has quit IRC04:20
*** ayazar1 has joined #yosys05:21
*** kristianpaul has joined #yosys05:28
*** kristianpaul has quit IRC05:33
*** kristianpaul has joined #yosys05:37
*** emeb_mac has quit IRC05:59
*** jordigw has joined #yosys06:44
*** kraiskil has joined #yosys07:08
*** jakobwenzel has joined #yosys07:10
*** ayazar1 has quit IRC07:25
*** Asu has joined #yosys07:37
*** xtro has quit IRC07:47
*** flaviusb has joined #yosys07:48
*** proteusguy has quit IRC08:35
*** proteusguy has joined #yosys08:48
*** proteusguy has quit IRC09:03
pepijndevosHow well does Yosys support division?09:07
*** sorear has quit IRC09:10
*** svenn has quit IRC09:10
*** svenn has joined #yosys09:13
*** sorear has joined #yosys09:15
*** proteusguy has joined #yosys09:16
*** Asuu has joined #yosys09:26
*** Asu has quit IRC09:30
daveshahMy experience is that anything other than a power of two ends up with a massive circuit09:31
daveshahSometimes abc9 does clean things up a bit09:31
pepijndevosdaveshah, yea I guess that is to be expected. But from what I read some synthesis tools outright don't support anything other than powers of two, or maybe constants only or stuff like that.09:45
daveshahYosys will bravely try and synthesis any divide09:46
pepijndevosCool09:46
pepijndevosMaybe in the end I will implement a sequential division if it turns out to be too unreasonable.09:46
LoftyIt'll also attempt combinational modulus too, I think09:47
daveshahYep09:47
daveshahI suspect there are much better combinational algorithms than the one Yosys uses09:48
daveshahBut I haven't looked into it in detail09:48
daveshahEven if you do want single cycle divide, often it needs to be pipelined so you wouldn't infer it anyway09:48
pepijndevosJust because it's so unwieldy it drives fmax down the drain?09:50
LoftyPretty much09:51
pepijndevosHm, pipelining only gets you more throughput, not more latency, right...09:52
pepijndevos(compared to normal clocked)09:53
Loftypepijndevos: for the specific path, latency generally goes up. But because your division is no longer part of the critical path, effective latency everywhere else goes down :P09:55
pepijndevosI mean latency in "number of clock cycles to complete calculation" not in the timing sense, but yea09:56
*** DaKnig has quit IRC10:26
*** DaKnig has joined #yosys10:27
*** Asuu has quit IRC10:52
*** Asu has joined #yosys11:00
*** kraiskil has quit IRC11:19
*** kraiskil has joined #yosys11:27
*** kraiskil has quit IRC11:34
*** indy has quit IRC12:18
*** indy has joined #yosys12:24
* promach3 uploaded an image: image.png (280KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/CaEWbKsdHnqMAgupUfLMoAqw/image.png >13:12
promach3For https://github.com/promach/noc/blob/development/spidergon_node.v#L475 , why formal verification failed for this BMC basecase assert() ?13:12
tpbTitle: noc/spidergon_node.v at development · promach/noc · GitHub (at github.com)13:12
*** Asu has quit IRC13:21
*** Asu has joined #yosys13:25
*** emeb has joined #yosys15:08
*** xtro has joined #yosys15:59
*** philtor has joined #yosys16:24
*** emeb has quit IRC16:35
*** emeb has joined #yosys16:38
*** emeb has quit IRC16:46
*** emeb has joined #yosys16:46
*** citypw has quit IRC17:02
Forty-Botis there a way to indicate "don't care" in combinatorial logic?18:01
Forty-Bote.g. this stackoverflow question https://stackoverflow.com/questions/29451175/how-can-i-assign-a-dont-care-value-to-an-output-in-a-combinational-module-in18:01
tpbTitle: How can I assign a "dont care" value to an output in a combinational module in Verilog - Stack Overflow (at stackoverflow.com)18:01
Forty-Botone answer is for quartus, however when I try the same thing in yosys the "don't cares" get interpreted as zeros18:02
mwkjust use x bits, they are supported18:12
mwk(yosys might miss some optimization opportunities though)18:13
Forty-Botok, so for that example, bit 0 synthesizes as an and gate18:19
Forty-Botbut since it is don't-care, it should synthesize as a constant 118:20
Forty-Botwhich to me means that the Xs are interpreted as 0s and not "don't care"s18:20
mwklook18:20
mwk"don't care" means that synthesis can pick any bit it wants18:20
mwkit picked 0 in this case, this is not an error18:20
Forty-Botright, and I want it to pick a bit which minimizes the amount of area18:21
Forty-Botinstead of picking any bit it wants18:21
mwkyeah, it seems yosys has no optimization pass that'd be able to figure this out18:25
Forty-Bot:l18:25
*** emeb_mac has joined #yosys18:28
mwkit is an interesting case though18:29
mwkI think whitequark had a draft pass (opt_match?) that would solve it nicely18:29
whitequarkyes18:30
whitequarkand i actually know how to properly put it into yosys now18:30
whitequarklike, in a way that would get it merged and nicely intregrated with the existing passes, rather than a total rewrite of proc i initially planned (which is unnecessary anyway, at least for the reasons i wanted it)18:31
mwkdo you want it as an extra opt pass, or an extra proc pass?18:31
whitequarkextra proc pass18:32
mwkhuh.18:32
whitequarkeither that or mmm18:32
whitequarki think it would actually be a new mode for proc_mux18:32
mwkright, proc_mux replacement18:32
whitequarkthe idea is to ditch everything i wrote for proc_match except for the, well, match-related parts18:33
whitequarkall the stuff i did for mux insertion was really clever... clever enough i never figured out how to make it work18:33
whitequarkand tbh18:33
whitequarkit's possible that with better column order selection the rest of yosys will cope just fine18:33
whitequarkpossibly not but i don't want to prematurely rewrite it18:33
mwk(I might have a refactor of proc incoming for unrelated reasons though — better async reset support)18:33
mwk(the main idea being that proc_dff / proc_dlatch should run *before* proc_mux and be merged with proc_arst, to remove some current weirdness with async resets in DFFs and support resets in dlatches)18:35
whitequarkuh, that might actually break nmigen18:36
whitequarki'm not saying you shouldn't18:36
mwkhuh, why?18:36
whitequarki'm saying you might18:36
whitequarkwait18:36
whitequarknevermind, i misremembered18:36
whitequark(because nmigen uses proc_arst;proc_dff, but i misremembered that it just uses proc_arst alone)18:36
mwkoh, you're actually using proc_* subpasses on their own, without the proc wrapper?18:37
whitequarkyes18:37
mwk... okay, that has a good chance of breaking18:37
whitequarkyes18:38
whitequarkthe reason i do that is because i want write_verilog to get a netlist it can actually process18:38
whitequarkbut i don't want processes to be bitblasted away18:38
whitequarktbh18:38
whitequarkif there was a `proc -nomux` it's likely i could just use that18:39
mwkhmmmm, that sounds good18:39
Forty-Botso is there any other approach to doing this other than hand-optimization?18:42
Forty-Botespecially with much bigger cases18:42
mwknot really, this is the obvious pattern18:43
mwkwe just need more optimization power18:43
Forty-Botoof18:43
whitequarkmwk: https://github.com/nmigen/nmigen/issues/47918:43
tpbTitle: Add `proc -nomux` to Yosys and migrate to it · Issue #479 · nmigen/nmigen · GitHub (at github.com)18:44
whitequarkForty-Bot: people sometimes automate it18:44
Forty-Botyeah, I was reading https://static.docs.arm.com/arp0009/a/Verilog_X_Bugs.pdf and in section 7.2 they say to just shove it through an optimizer18:44
Forty-Botthough apprently espresso has not been updated since 200818:45
mwk... heh18:52
mwkof course skipping proc_mux breaks latches18:53
whitequarkthat might be why i don't run proc_dlatch18:54
mwkyeah, I suppose you don't care about them anyway18:54
Forty-Botok, so is it possible to get yosys to enumerate the inputs/outputs of a design in a truth table, or would I need to write that myself?18:59
mwkthere's the eval pass, but I'm not sure that's what you have in mind19:01
Forty-Bote.g. anything close to what this thing inputs http://users.ece.utexas.edu/~patt/06s.382N/tutorial/espresso_manual.html19:01
tpbTitle: EE 382N - Espresso Manual (at users.ece.utexas.edu)19:01
*** Asuu has joined #yosys19:25
*** Asu has quit IRC19:29
LoftyWay too late, but Forty-Bot, you should really consider using ABC.21:11
Forty-Bothow would I do that?21:11
LoftyYosys bundles it as yosys-abc21:11
Forty-BotI tried playing around with the options, but "undef" values in the blif seemed to get removed even with an empty script21:12
LoftyWell, I can't remember what the Yosys ABC pass does, but I think it dumps to AIGER21:13
LoftyWhich doesn't support DC21:13
Forty-Botby default it reads/writes blif in yosys21:13
LoftyABC9 goes through XAIGER, I know that much21:13
Forty-Botanyway, what do you suggest I look into for optimizing dontcares?21:14
Lofty...ABC.21:14
Forty-Botyes, and ABC has something like 100 commands21:15
LoftyDon't use the Yosys internal pass21:15
LoftyGrab abc.rc from https://github.com/berkeley-abc/abc/blob/master/abc.rc21:15
tpbTitle: abc/abc.rc at master · berkeley-abc/abc · GitHub (at github.com)21:15
LoftyThen run resyn2 a bunch of times, as I understand it21:16
Forty-Bothaha21:16
LoftyMost (&if is a sad exception) commands have -h for help21:17
Forty-Botthanks for the tip21:18
LoftyI think ABC might read DCs separately21:18
LoftyBLIF is a mostly theoretically interchangeable format21:20
LoftyAnd I think this proves it quite well :P21:20
*** emeb_mac has quit IRC21:23
*** emeb_mac has joined #yosys21:26
*** Asuu has quit IRC21:45
*** Asu has joined #yosys21:45
*** Asu has quit IRC21:49
*** emeb_mac has quit IRC21:52
*** emeb_mac has joined #yosys21:53
*** kristianpaul has quit IRC22:56
*** kristianpaul has joined #yosys22:57
*** lf_ has quit IRC23:06
*** lf has joined #yosys23:06
*** bzztploink has quit IRC23:24
*** bzztploink has joined #yosys23:29
*** bzztploink has quit IRC23:29
*** bzztploink has joined #yosys23:35
*** emeb has quit IRC23:55

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