Saturday, 2023-10-07

*** tpb <[email protected]> has joined #yosys00:00
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has quit IRC (Remote host closed the connection)00:39
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has joined #yosys00:40
*** jn <jn!~quassel@user/jn/x-3390946> has quit IRC (Ping timeout: 240 seconds)02:51
*** jn <jn!~quassel@2a0a-a541-4bf8-0-20d-b9ff-fe49-15fc.ipv6dyn.netcologne.de> has joined #yosys02:51
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Remote host closed the connection)12:28
*** ec <ec!~ec@gateway/tor-sasl/ec> has joined #yosys12:28
*** lexano <[email protected]> has joined #yosys13:00
Myrl-sakiHow do I directly use $alu in my code?14:19
loftyMyrl-saki: you don't.14:23
loftyOkay, sure, you can instantiate it as \$alu, but saying "I need to instantiate a Yosys cell" outside of Yosys itself is a pretty strong X/Y problem14:24
loftyThe job of `alumacc` is to lower things to $alu cells as needed to make them fast14:24
Myrl-sakiYep, that's true. I'm pretty sure this can be unified into a single ALU but I can't seem to make Yosys do it.14:25
Myrl-sakihttps://github.com/adrianparvino/furv/blob/main/au.v14:25
tntWhat's the target fpga ?14:25
loftyMyrl-saki: no, that can't be turned into a single ALU.14:26
Myrl-saki(Just to clarify, `unsigned_compare` should be `'x` there, in hindsight.14:26
Myrl-sakiFor the '0 cases.14:26
Myrl-sakitnt: Right now I'm targeting Gowin/Tang Nano 9k.14:27
Myrl-sakiOkay, so I was able to skip the `and` gate by using the 'x. 14:28
Myrl-sakiAh.14:29
Myrl-sakiI think I understand what you mean by can't be a single ALU now.14:29
Myrl-sakiHm14:29
lofty...I think I also just noticed a flaw in `synth_gowin` which does not help14:30
Myrl-sakiI'm guessing that there's parameters which `show` doesn't show.14:31
Myrl-sakihttps://i.imgur.com/RNtvUvn.png14:31
Myrl-sakiThis is what it generates when I use `$signed(ra) < $signed(rb)` instead.14:32
Myrl-sakiWhich makes me think that maybe Yosys could merge them, because I can just replace `1` with `mode`, because it's only valid when `mode` is 1.14:32
loftyIf you run `write_verilog` in a shell when stepping through commands you can get a reasonable idea of what Yosys is thinking14:33
Myrl-sakiOohh thanks. I think it's really just the signedness difference. Hmm.14:35
Myrl-saki`if (node->is_signed == is_signed && node->invert_b && node->c == State::S1)`14:40
Myrl-sakiI wonder if this is actually required.14:40
Myrl-sakiI mean, it's also not trivial to just change the checks.14:40
loftyEasiest way to answer that is to remove it and then run the Yosys test suite14:41
Myrl-sakiThanks. I'll do that. It'd be nice to make a PR if I figure this out.14:43
Myrl-sakiYay. :)16:07
Myrl-sakiI don't think there are tests in place to catch this yet. How do I name the test? https://github.com/YosysHQ/yosys/pull/399116:16
Myrl-sakiOkay there for sure aren't tests, because turns out something's wrong with this. :(16:27
Myrl-sakiHow it looks now. :) https://i.imgur.com/e4C8qbs.png17:12
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)17:27
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has joined #yosys17:27
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)17:51
*** chaoticryptidz <chaoticryptidz!~quassel@static.62.145.21.65.clients.your-server.de> has joined #yosys17:52
*** notgull <notgull!~notgull@2600:1f14:8f4:3100:e2a2:c920:847d:d23> has quit IRC (Ping timeout: 255 seconds)18:28
*** notgull <notgull!~notgull@2600:1f14:8f4:3100:e2a2:c920:847d:d23> has joined #yosys18:36
*** nonchip <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)22:18
*** nonchip <[email protected]> has joined #yosys22:18

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