Tuesday, 2023-10-10

*** tpb <[email protected]> has joined #yosys00:00
*** ppisati <[email protected]> has quit IRC (Ping timeout: 240 seconds)00:27
*** ppisati <ppisati!~flag@2a01:e11:1403:8620:77cc:a896:e38d:a902> has joined #yosys00:39
*** ppisati <ppisati!~flag@2a01:e11:1403:8620:77cc:a896:e38d:a902> has quit IRC (Ping timeout: 240 seconds)01:34
*** ppisati <ppisati!~flag@2a01:e11:1403:8620:77cc:a896:e38d:a902> has joined #yosys02:06
*** ppisati <ppisati!~flag@2a01:e11:1403:8620:77cc:a896:e38d:a902> has quit IRC (Ping timeout: 252 seconds)02:14
*** ppisati <[email protected]> has joined #yosys02:14
*** ppisati <[email protected]> has quit IRC (Ping timeout: 240 seconds)02:41
*** nelgau <[email protected]> has quit IRC (Read error: Connection reset by peer)02:49
*** nelgau <[email protected]> has joined #yosys02:50
*** ppisati <ppisati!~flag@2a01:e11:1403:8620:77cc:a896:e38d:a902> has joined #yosys02:53
*** killjoy <[email protected]> has joined #yosys03:19
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has quit IRC (Quit: Connection reset by peep)04:12
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has joined #yosys04:14
cr1901I don't have code to share immediately right now, but I found a load-bearing comment that when altered changes yosys' synth_ice40 LUT usage from 860 LUTs to 808 LUTs. Uhhh...04:32
loftycr1901: amazing04:36
loftywhich one? :p04:36
cr1901Not in yosys, in my design (generated from Amaranth). I would expect comments to uhhh... not change the synthesis results that much.04:38
cr1901Must be a next-gen optimization04:38
*** FabM <FabM!~FabM@2a03:d604:103:600:2e60:8c7c:e8fb:7990> has joined #yosys04:41
cr1901Is there a way to change yosys' PRNG seed? Only thing I can think of, unless somehow "attribute enum_values" are special (seems like yosys and Amaranth just emit them, not use them)04:52
cr1901This is tomorrow me's problem04:52
*** dormito <dormito!~dormito@user/dormito> has quit IRC (Ping timeout: 258 seconds)05:05
*** dormito <dormito!~dormito@user/dormito> has joined #yosys05:07
*** bjorkint0sh <bjorkint0sh!~bjork@2600:1700:5400:c80:807c:66aa:6ee4:8752> has joined #yosys05:10
*** bjorkintosh <bjorkintosh!~bjork@user/bjorkintosh> has quit IRC (Ping timeout: 240 seconds)05:12
*** bjorkint0sh <bjorkint0sh!~bjork@2600:1700:5400:c80:807c:66aa:6ee4:8752> has quit IRC (Ping timeout: 258 seconds)05:46
*** bjorkint0sh <bjorkint0sh!~bjork@2600:1700:5400:c80:807c:66aa:6ee4:8752> has joined #yosys05:54
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Remote host closed the connection)06:00
*** ec <ec!~ec@gateway/tor-sasl/ec> has joined #yosys06:00
*** cr1901_ <cr1901_!~cr1901@2601:8d:8600:226:71ce:38b:2a6d:bae7> has joined #yosys08:30
*** cr1901 <cr1901!~cr1901@2601:8d:8600:226:b44c:943b:9ebb:7478> has quit IRC (Ping timeout: 260 seconds)08:31
*** bjorkint0sh <bjorkint0sh!~bjork@2600:1700:5400:c80:807c:66aa:6ee4:8752> has quit IRC (Ping timeout: 248 seconds)09:01
*** unkraut <[email protected]> has quit IRC (Remote host closed the connection)09:13
*** unkraut <[email protected]> has joined #yosys09:15
Myrl-saki`always @*` vs `assign` doesn't seem to always have the same behavior.09:59
Myrl-sakiHeck, `if (p) begin q; r; end` is sometimes different as `if (p) q; if (p) r;`09:59
Myrl-sakiWhat's the reason for this?09:59
loftyWhat do you mean by "same behaviour"?10:00
Myrl-sakiRight, that was a bit vague lol sorry. I mean that it doesn't have the same resource usage.10:00
loftyWell, you do have to consider that Yosys is chaotic; small changes in the source code can have pretty big changes elsewhere10:01
loftyDue to things like hashing and such10:01
*** arogora <[email protected]> has joined #yosys10:03
Myrl-sakiAhh thanks. And yeah, I see. So from the PoV of Yosys (as a graph? or RTL?), they're basically the same, but the order that things get applied differ, thus resulting in different resource usage?10:03
loftyYeah10:04
*** killjoy <killjoy!~nameless@user/killjoy> has quit IRC (Ping timeout: 252 seconds)10:04
*** arogora is now known as killjoy10:04
loftyA big factor in this is, for example, that Yosys carries source code information around10:04
loftyLike where a cell was defined10:04
Myrl-sakiYeah, I see now. Even changing the order of the assigns change the behavior lol10:06
Myrl-sakiErr, not behavior.10:06
*** bjorkintosh <bjorkintosh!~bjork@2600:1700:5400:c80:807c:66aa:6ee4:8752> has joined #yosys10:18
Myrl-sakiThis is not exactly related, but I feel like I'm getting a very huge "told you so" moment since my shifter is actually the critical path right now. :x10:20
Myrl-sakiNow I'm curious how much the order matters!10:24
Myrl-sakiWild, I think changing the order worked.10:33
*** xiretza[cis] <xiretza[cis]!xiretzaxir@2a01:4f8:c012:5b7:0:1:0:88> has joined #yosys10:41
xiretza[cis]for some definition of "worked"10:41
Myrl-sakiHm, why does it say the critical path is slower, but the frequnecy can be higher?10:57
*** dys <dys!~dys@user/dys> has quit IRC (Remote host closed the connection)11:01
loftyYou're going to have to provide more information than that :p11:04
Myrl-sakihttps://gist.github.com/adrianparvino/9e176cedf748cd88c78863843105521f11:07
loftyit...doesn't say the critical path is slower?11:08
loftyit says it's faster11:09
loftyoptimized: Info: 8.6 ns logic, 12.6 ns routing11:09
loftyunoptimized: Info: 9.4 ns logic, 13.4 ns routing11:09
Myrl-sakiOH. The calculation is based on posedge -> posedge. What does 'posedge sysclk' -> <async> say?11:11
Myrl-sakiLike, what does it erm, mean?11:11
loftyThose refer to timings outside of clock domains, like, to GPIO11:11
*** cr1901_ is now known as cr190115:02
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)18:24
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has joined #yosys18:25
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)18:52
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has joined #yosys18:53
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 272 seconds)19:21
*** tlwoerner_ <[email protected]> has joined #yosys19:23
*** tlwoerner <[email protected]> has quit IRC (Ping timeout: 260 seconds)19:23
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)19:42
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has joined #yosys19:43
*** tlwoerner_ <[email protected]> has quit IRC (Ping timeout: 260 seconds)20:25
*** tlwoerner <[email protected]> has joined #yosys21:37
Myrl-sakiI might have found something weird.22:10
*** Myrl-saki <Myrl-saki!~root@user/Miyu-saki> has left #yosys (WeeChat 4.0.2)22:10
*** Myrl-saki <Myrl-saki!~root@user/Miyu-saki> has joined #yosys22:10
Myrl-sakiSigh, what's wrong with Weechat.22:10
Myrl-saki   log("meow %d", A.chunks()[0].wire->name.index_);22:10
Myrl-saki   sig_alu[RTLIL::SigSig(A, B)].insert(alunode);22:10
Myrl-sakiIf I load any file before it, I get this.22:11
*** Myrl-saki <Myrl-saki!~root@user/Miyu-saki> has quit IRC (Quit: WeeChat 4.0.2)22:11
*** Myrl-saki <Myrl-saki!~root@user/Miyu-saki> has joined #yosys22:11
Myrl-sakimeow 713  creating $alu model for $macc $sub$au.v:20$86.22:11
Myrl-sakimeow 712  creating $alu model for $lt$au.v:22$88 ($lt): 2 new $alu22:11
Myrl-sakiDespite it being connected to the same wire.22:12
Myrl-sakiAh, there's the yosys_xtrace option22:15
Myrl-sakiAh, found why. It's simpler than that.22:17
*** nonchip <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)22:18
*** nonchip <[email protected]> has joined #yosys22:18
Myrl-sakiThis line only sometimes runs.    if (!subtract_b && B < A && GetSize(B)) {22:19
Myrl-sakiSo22:22
Myrl-sakiI think the point is canonicalization?22:22
Myrl-sakiHm, I don't think I know enough to make judgment. >_<22:24
Myrl-sakiWhat's happening is that this converts `a + b` to `b + a` sometimes, which hinders unification with `a - b`.22:25
Myrl-sakiThere's the obvious "just remove this canonicalization" but I'm pretty sure that hinders other optimizations.22:26
Myrl-saki(Also, that's not actually the problem, even.)22:27
Myrl-sakiWell that's fun.22:39
Myrl-sakiI understand the problem now.22:39
Myrl-sakiTurns out that cmp also has this canonicalization.22:39
Myrl-sakiThe problem is then that cmps can swap, but subtracts cannot.22:40
*** tpb <[email protected]> has joined #yosys22:52
Myrl-sakiOkay, I think I'm happy with this. :)22:54
Myrl-sakiAh.23:02
Myrl-sakiI found a failing test.23:03
Myrl-sakiThough, I think this is supposedly unobservable behavior.23:04
Myrl-sakiFWIW, now that I think about it, I don't have to remove the initial swap.23:10
Myrl-sakiBecause cmp now just acts as if sig_alu is an order-independent dictionary.23:11
Myrl-sakiWhat's the `GetSize(B)` check there for?23:17
Myrl-sakihttps://github.com/YosysHQ/yosys/commit/b34ca151853aa2b5052afd56269a53079e17429d23:21
Myrl-sakiAh23:21

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