*** tpb <[email protected]> has joined #yosys | 00:00 | |
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Remote host closed the connection) | 02:06 | |
*** ec <ec!~ec@gateway/tor-sasl/ec> has joined #yosys | 02:06 | |
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has quit IRC (Remote host closed the connection) | 03:08 | |
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has joined #yosys | 03:08 | |
*** peeps <peeps!~peepsalot@openscad/peepsalot> has joined #yosys | 04:27 | |
*** DX-MON <[email protected]> has quit IRC (Quit: I'm not disconnecting, you're disconnecting!) | 04:27 | |
*** DX-MON <[email protected]> has joined #yosys | 04:28 | |
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has quit IRC (Read error: Connection reset by peer) | 04:29 | |
*** FL4SHK <[email protected]> has quit IRC (Ping timeout: 252 seconds) | 04:30 | |
*** FL4SHK <[email protected]> has joined #yosys | 04:31 | |
*** peeps is now known as peeps[zen] | 04:44 | |
*** bpye <bpye!~bpye@user/bpye> has quit IRC (Ping timeout: 256 seconds) | 06:12 | |
*** bpye <bpye!~bpye@user/bpye> has joined #yosys | 06:15 | |
*** FabM <FabM!~FabM@2a03:d604:103:600:2e60:8c7c:e8fb:7990> has joined #yosys | 07:47 | |
*** lexano <[email protected]> has quit IRC (Ping timeout: 255 seconds) | 08:17 | |
*** lexano <[email protected]> has joined #yosys | 08:30 | |
*** lexano <[email protected]> has quit IRC (Remote host closed the connection) | 12:23 | |
*** lexano <[email protected]> has joined #yosys | 12:39 | |
cr1901 | I abc9 supposed to be strictly better (number of LUTs) than abc? I have a design where it's strictly worse (to be released soon). Is that worth a bug report? Idk how to minimize it tho. | 13:15 |
---|---|---|
cr1901 | I don't feel like adding "-noabc9" because I don't want to pin to "the yosys 3 commits ago or newer as of this writing" as a dep, but... | 13:16 |
cr1901 | s/better/smaller/ s/worse/larger/ (better/worse is subjective. Smaller is what I want) | 13:29 |
tnt | cr1901: It's definitely not strictly better for me either. | 13:30 |
tnt | What's the target btw ? | 13:31 |
cr1901 | ICE40HX1K | 13:31 |
tnt | Ok, so default type is good. Because a downside of abc9 is needing to specify `-device xxx` (default is hx) for it to select the right timing. | 13:32 |
cr1901 | This may just be something I need to live with. I made a refactor, and abc got larger after the refactor, and abc9 got smaller with the refactor | 13:41 |
cr1901 | (both "after refactors" are larger than "abc before refactor" tho) | 13:42 |
lofty | Yeah, please file it | 15:27 |
lofty | cr1901: ^ | 15:28 |
lofty | tnt: I'm not sure it's a downside when the alternative is ABC's "what's a timing" | 15:29 |
cr1901 | Will do once the project's public (should be soon...). I may choose a non-HEAD commit b/c refactors change the degree that abc9 is larger than abc (but it's pretty consistent) | 15:30 |
lofty | If nothing else, YosysHQ are looking for benchmark designs to compare things on | 15:31 |
lofty | But having an "ABC9 performs worse here" benchmark means I can experiment with things | 15:32 |
cr1901 | Well try this: http://gopher.wdj-consulting.com:70/paste/d50ff075-d091-4bb9-b677-8cfa2bfbbb09.txt 1082 LUTs w/ synth_ice40, 1041 LUTs w/ -noabc9 | 15:41 |
cr1901 | ~4% increase in size | 15:42 |
cr1901 | 1227 ICESTORM_LCs w/ -noabc9, 1252 LCs w/ just plain 'synth_ice40' | 15:44 |
lofty | cr1901: I'm going to need a .pcf file too; nextpnr won't pack the SB_GB_IO otherwise | 16:06 |
cr1901 | lofty: http://gopher.wdj-consulting.com:70/paste/2fb4e3a5-97b7-4c58-a069-b16dfd36bc0e.txt | 16:14 |
lofty | cr1901: I get different numbers, but ABC9 is indeed bigger | 16:15 |
lofty | It does seem to have a higher Fmax though | 16:16 |
lofty | let's do some runs and compare. | 16:16 |
lofty | cr1901: just to confirm, it's cd_sync_clk12_0__i which is the clock to check, right? | 16:18 |
cr1901 | no, you want to check cpu_clk | 16:19 |
lofty | there is no `cpu_clk`. | 16:19 |
cr1901 | Ooo you mean in the PCF. then yes | 16:20 |
lofty | I mean in the nextpnr output :p | 16:20 |
lofty | because to me this looks like a classical case of "ABC9 found a higher Fmax solution with less timing slack available" | 16:20 |
cr1901 | Yes, there's only one clock in the design (aside from a reset_less POR domain which uses the same clock) | 16:21 |
cr1901 | And okay, but I don't want a higher Fmax if it means that I lose room for expansion | 16:21 |
lofty | do you want the good news or the bad news? | 16:25 |
lofty | cr1901: ^ | 16:27 |
cr1901 | bad mews | 16:27 |
cr1901 | typo intended I guess | 16:27 |
lofty | the invocation to get ABC9 to do better than ABC is a little unwieldy involving some dark arts | 16:28 |
lofty | yosys -p "scratchpad -set abc9.D 83333; scratchpad -copy abc9.script.flow3 abc9.script; synth_ice40 -abc9 -dff -json abc9-delaytarget.ice40.json" -f verilog testcase.v | 16:29 |
lofty | results in a netlist using 11 fewer ICESTORM_LCs than ABC | 16:29 |
cr1901 | I don't want this design to fit into hx1k on a technicality either. So if it involves poking abc9 internals or a horrific command line invocation, I will live w/ the size diff | 16:29 |
cr1901 | hmmmm | 16:30 |
lofty | in english this is: "target a network delay of 83333 ps AKA 12 MHz; optimise as much as possible; pass DFFs to ABC9 so it can optimise through them" | 16:30 |
lofty | sort of the -O3 of ABC9 | 16:31 |
cr1901 | Well, I guess it's worth adding that for the sake of a demo/proof of concept | 16:33 |
cr1901 | I'd rather see something like ISE's optimize "SPEED", "BALANCED", "AREA" options | 16:34 |
cr1901 | I'm not sure I've ever used scratchpad | 16:35 |
lofty | cr1901: that'd be nice, but Yosys itself is not timing-driven, only ABC9 is | 16:36 |
lofty | so I think it'd be a bit misleading | 16:36 |
cr1901 | What is the scratchpad, and why does it "magically" affect how the synthesis/abc9 script runs? | 16:43 |
cr1901 | Lemme guess... passes are allowed to set their own internal vars | 16:43 |
cr1901 | and scratchpad is the escape-hatch to mess w/ those vars | 16:43 |
lofty | cr1901: pretty much; normally the only way to fiddle with a pass' behaviour is via its command line, which gets set in stone inside the `synth_xxx` command | 16:52 |
lofty | so to let a user override behaviour without editing the source and recompiling, some passes - like `abc9` - accept configuration through the scratchpad | 16:52 |
cr1901 | Well abc9.D and abc9.script are documented as part of the command-line params. But I can't find docs on abc9.script.flow3 (other than "it exists and is set by default") | 16:57 |
cr1901 | (presumably -D and -script command-line params would override the scratchpad? But since synth_ice40 doesn't set those, abc9 defers to the scratchpad to get default values instead?) | 16:59 |
lofty | cr1901: But I can't find docs on abc9.script.flow3 <-- map the design directly, remember it, do light synthesis, map the design, remember it, do heavy synthesis, map the design, remember it, pick out the best parts of all the mappings | 17:09 |
lofty | but basically, it's just a copy of what the ABC `&flow3` command does, more or less | 17:09 |
lofty | cr1901: But since synth_ice40 doesn't set those <-- yeah, it looks in the scratchpad for a fallback value | 17:11 |
cr1901 | I'd like to note that neither abc9.D nor abc.script have a default values (yosys -p 'scratchpad get ...") | 17:12 |
cr1901 | So it must fallback to a default default (sic) value :P | 17:12 |
lofty | abc9.D does not have a default value; if you don't specify it it does not get passed to ABC9 | 17:13 |
lofty | ...so ABC9 pretends you set it to 1. | 17:13 |
lofty | (with the difference that ABC9 will not issue a warning if it cannot meet the target set by abc9.D) | 17:13 |
cr1901 | I guess my question is "what is the priority of the abc9 command for looking to fill the "script" and "D" vars, given that you can pass them either as command-line params to "abc9" pass or set them as part of the scratchpad (or do neither!) | 17:15 |
cr1901 | ?* | 17:15 |
lofty | as for abc9.script, if it's not set, it gets copied from abc9.script.default | 17:15 |
cr1901 | >abc9.script.default <-- okay that _is_ set | 17:16 |
lofty | there is even | 17:16 |
lofty | abc9.script.default.area and abc9.script.default.fast | 17:16 |
lofty | :p | 17:16 |
lofty | cr1901: judging by the following comment in the `abc9` pass source code | 17:17 |
lofty | \// get arguments from scratchpad first, then override by command arguments | 17:17 |
*** ZipCPU <[email protected]> has quit IRC (Ping timeout: 260 seconds) | 17:19 | |
cr1901 | In other words, unless you clear abc9.script.default, you can't have abc9.script unset. But abc9.D can be unset without problems. | 17:19 |
cr1901 | unless you clear abc9.script.default <-- probably shouldn't do that | 17:19 |
lofty | Yosys seems surprisingly resilient to having abc9.script.default cleared | 17:21 |
lofty | > ERROR: scratchpad entry "abc9.script.default" is a global constant | 17:21 |
cr1901 | I feel like a lot of this should be documented, but not sure where | 17:22 |
cr1901 | (_outside of the source code_) | 17:22 |
*** ZipCPU <[email protected]> has joined #yosys | 17:57 | |
*** ZipCPU <[email protected]> has quit IRC (Ping timeout: 255 seconds) | 18:21 | |
*** ZipCPU <[email protected]> has joined #yosys | 18:29 | |
*** nelgau <[email protected]> has quit IRC (Ping timeout: 260 seconds) | 18:36 | |
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 256 seconds) | 20:03 | |
*** nelgau <[email protected]> has joined #yosys | 21:14 | |
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has quit IRC (Quit: WeeChat 3.5) | 21:26 | |
cr1901 | lofty: Honestly, even the -dff option alone is doing wonders without destroying timing | 21:55 |
lofty | cr1901: I usually find that -dff makes timing slightly worse, but does help with area. when I don't get a complaint about it exposing an existing bug in the design, anyway | 22:05 |
cr1901 | Yea, it also took out a worrying number of FFs as well. But the design still works on my board, so... it's probably nothing | 22:10 |
cr1901 | (like 30 FFs were removed by adding -dff) | 22:11 |
lofty | Have a little bit of faith in Alan to write correct code :p | 22:14 |
cr1901 | Fiiiine :D | 22:23 |
*** nonchip <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) | 23:20 | |
*** nonchip <[email protected]> has joined #yosys | 23:20 | |
*** ec <ec!~ec@gateway/tor-sasl/ec> has quit IRC (Ping timeout: 240 seconds) | 23:30 | |
*** ec <ec!~ec@gateway/tor-sasl/ec> has joined #yosys | 23:32 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!