Thursday, 2020-06-25

*** tpb has joined #yosys00:00
tedxis this IRC channel or /r/yosys the better place for yosys newbie questions?00:27
*** jfcaron has quit IRC01:37
ZipCPUtedx: Both should work01:46
ZipCPUBoth daveshah and I try to monitor the /r/yosys reddit for newbie questions to make certain they get answers01:46
ZipCPUThis channel works as well, as long as you are willing to wait across timezones for an answer to your question01:47
ZipCPUI will admit that ... without anyone asking questions in /r/yosys, I've stopped checking as often as I used to01:47
cr1901_modernwhitequark: https://github.com/YosysHQ/nextpnr/pull/459#issuecomment-64916523601:51
tpbTitle: CMake: rewrite chipdb handling from ground up by whitequark · Pull Request #459 · YosysHQ/nextpnr · GitHub (at github.com)01:51
*** cr1901_modern has quit IRC01:52
*** Degi has quit IRC02:02
*** Degi has joined #yosys02:05
az0recr1901_modern: I see. No worries lol02:08
*** cr1901_modern has joined #yosys02:10
*** Cerpin has quit IRC02:13
*** Cerpin has joined #yosys04:02
*** rektide has quit IRC04:11
*** m4ssi has joined #yosys04:42
*** emeb_mac has quit IRC06:10
*** citypw has joined #yosys06:53
*** jhol` has joined #yosys07:07
*** jhol has quit IRC07:10
*** filt3r has quit IRC07:10
*** filt3r has joined #yosys07:15
*** FFY00 has quit IRC07:17
*** citypw has quit IRC07:23
*** citypw has joined #yosys07:36
*** dys has quit IRC07:38
*** FFY00 has joined #yosys08:13
*** Asu has joined #yosys08:27
*** mkru has joined #yosys08:29
*** dys has joined #yosys08:44
*** adjtm_ has joined #yosys09:09
*** adjtm has quit IRC09:11
*** kraiskil has joined #yosys09:22
*** kraiskil has quit IRC09:38
*** kraiskil has joined #yosys09:44
*** m4ssi has quit IRC11:29
*** anishathalye has quit IRC12:20
whitequarkdaveshah: poke re: #45912:55
whitequarki think it's generally ready to merge, what remains is small tweaks to cmake discovery code12:55
whitequarkand i have most of the next PR12:55
whitequarkyou know what's funny? making nextpnr resilient to missing chipdbs actually involved *removing* code moreso than *adding*12:56
daveshahso do you want me to review and merge and then do another PR, or just review for now?12:56
*** kraiskil has quit IRC12:59
whitequarkformer12:59
*** jakobwenzel1 has joined #yosys13:32
*** mkru has quit IRC13:39
*** Asu has quit IRC13:45
*** Asu has joined #yosys13:45
somlowhitequark, daveshah: after latest force-push (3f450ed and a9224bf), build still works for me in fedora14:06
somlo(re. nextpnr PR 459)14:06
whitequarkcool14:08
*** jakobwenzel1 has quit IRC14:27
*** Cerpin has quit IRC14:33
*** Cerpin has joined #yosys14:34
daveshahmerged!14:40
whitequarksweet!14:40
whitequarki'm almost done with the embedding improvements14:40
*** X-Scale` has joined #yosys14:41
*** X-Scale has quit IRC14:42
*** X-Scale` is now known as X-Scale14:42
*** mecrisp has joined #yosys14:59
*** emeb has joined #yosys15:47
*** maartenBE has quit IRC16:07
*** maartenBE has joined #yosys16:10
*** citypw has quit IRC16:23
az0reSo, whitequark, I find myself once again wanting access to `statdata_t` in a different context.16:29
az0reI thought it was a one-off but maybe this is a sign...16:30
az0reCan you remind me what we determined was bad about breaking it out from the `stat` private namespace?  And IIRC we did a little brainstorming; do you have any idea for making a Cell/Module `statdata_t`-like interface available for internal Yosys stuff?16:33
az0reOh, right, the point was about the cell costs, how not all costs are created equal (e.g. logic area vs. memories used), and how config files are the way to go.16:36
az0reSo is there actually an objection to breaking out `statdata_t` and adding a `CellCosts::unit_gate_cost()`?  I agree it's not the ideal way to go in the long run but it's a minor albeit useful change now.16:38
whitequarkaz0re: yes, there is; I don't think breaking out the existing code in `stat` is acceptable at all16:40
az0reFrankly I could just iterate over `module->cells()` directly and calculate my own stats, but it seems that the above way is more elegant--that's what it's designed to do, even if the design is currently not so great.16:40
whitequarkI would rather have bad code contained in a bunch of passes on its own than have it gain more users over time16:41
whitequarkif we explicitly take a step to expose some code to all Yosys passes we should first make sure that code is actually good16:41
whitequarkI'd be 100% fine with you doing your own stats for now and migrating that over to shared infrastructure for cell costs later16:42
az0reIt's not really a big deal either way, but doesn't that ease the maintenance burden?  It gives one nice target to improve instead of a bunch of different bits strewn about here and there16:42
whitequarknope16:42
whitequarkif you have a bad API that's used by multiple passes you have to change all of those passes in lockstep when improving that API16:43
whitequarkif the passes are just doing the bad thing in a self-contained way you can do it one by one16:43
az0reTrue16:44
az0reIn any case, right now there obviously aren't any other users, and my use case is very simple, so while it's unnecessary code I wouldn't exactly call it "bad code" anyway16:44
whitequark"bad" is a poor choice of word on my part16:45
az0reSo, fine, I can calculate my own stats16:45
whitequarktoo strong16:45
az0reNo, it's a fine word16:45
az0reI get it16:45
whitequarkright, okay16:45
az0reCode that we would rather not exist16:45
Sarayansuboptimal? too specialized for generalizing the use?16:45
az0reSomething like that16:46
sorear.oO( the role of gene duplication in evolution )16:48
whitequarkheh16:50
whitequarkdaveshah: any comment on the general approach? name bikeshed? https://github.com/YosysHQ/nextpnr/pull/460/files16:52
tpbTitle: [WIP] Simplify and improve chipdb embedding/loading by whitequark · Pull Request #460 · YosysHQ/nextpnr · GitHub (at github.com)16:52
daveshahLooks good, and a nice cleanup too17:01
whitequarkcool, let me finish the *nix embed part17:03
whitequarkwhat i have in mind right now is a global static map populated with individual chipdb files by linking them in17:03
whitequarkany objections?17:03
whitequarkan alternative would be to generate a get_chipdb function in cmake or something17:04
whitequarkI don't really have an opinion one way or another17:04
daveshahThe global static map seems good17:05
whitequark'kay, thanks17:05
whitequarkthis is the last thing needed for yowasp to be functionally complete...17:05
daveshahGreat!17:08
cr1901_modernwhitequark: Is this a typo? https://github.com/YosysHQ/nextpnr/blob/master/ecp5/family.cmake#L4017:19
tpbTitle: nextpnr/family.cmake at master · YosysHQ/nextpnr · GitHub (at github.com)17:19
whitequarkoops17:19
cr1901_modern(the ICE40_CHIPDB part in ecp5)17:19
cr1901_modernI'm not sure what that line is doing anyway, tbh... {ICE40, ECP5}_CHIPDB is a directory, correct? And add_library wants source files?17:32
whitequarkit's there so that add_library() doesn't choke if there are no actual sources to build17:33
whitequarksuch as with external chipdb17:33
whitequarkit's a bit of a hack, but i'm not sure if there's a better way. it was there before my refactor, too17:33
whitequarkthere is one subtle benefit17:33
whitequarkif you specify -DICE40_CHIPDB and that dir doesn't exist, this will break in a nicer way17:33
whitequarkdaveshah: when the chipdb is not present, should the corresponding option disappear, or should it return an error at runtime, or something else?17:41
whitequarkI'm leaning towards the former, it makes it more clear which chips are available from --help text17:41
whitequarkbut you could argue it's confusing17:41
daveshahYeah, the former is probably best17:42
cr1901_modernAre there recent chipdbs available anywhere? I could've sworn there was some daily CI set up for them17:42
whitequarkI could also mark them as (disabled) or (chipdb missing) but leave them present17:43
whitequarkin --help text17:43
whitequarkhm, it's kind of obnoxious to do that in c++...17:44
SarayanWhat would you two recommend for a big chip description for nextpnr like the cyclone v?  If I manage to create a small-ish program that generates the lists, should I use the program at compile time to generate the data, at runtime to generate the data in memory then use it, or generate on the fly with the costs that represents?17:44
whitequarklet's go with a simple choice for now17:44
cr1901_modernwhitequark: Just to be explicit, if you _are_ building your own chipdbs as part of the nextpnr build, then "{ICE40,ECP5}_CHIPDB" and "${family}/chipdb" will be the same directory, correct?17:44
*** kraiskil has joined #yosys17:44
whitequarkyes17:44
cr1901_modernOkay, I think I got a grasp on everything now17:45
daveshahSarayan: ideally, you use a data structure that can be iterated over without ever fully flattenin17:46
daveshahthis is unfortunately non-trivial to design, and I haven't ever really succeeded17:46
Sarayandave: since you're going to go over everything at least once anyway, isn't it better to flatten?17:46
cr1901_modernIf add_library doesn't see any valid .cpp files, it won't add them to the "chipdb-${family}" library17:46
whitequarkyeah17:46
daveshahSarayan: no because of cache17:46
SarayanI mean more than once, things like bitlists for firmware generation should be used only once17:47
whitequarkdaveshah: okay, that's ready for review17:48
SarayanOk, I'll see if I manage to make generators in the first place :-)17:48
*** dys has quit IRC17:56
cr1901_modernhttps://github.com/YosysHQ/nextpnr/blob/master/ecp5/resource/chipdb.rc#L5 Introducing the ECP 88K, including a state-of-the-art RISC CPU from Motorola on die :D17:58
tpbTitle: nextpnr/chipdb.rc at master · YosysHQ/nextpnr · GitHub (at github.com)17:58
whitequarkouch17:58
cr1901_modern(I have no idea why this didn't break when I was building)17:59
whitequarktnt: I think your icestorm patch breaks nextpnr master...18:14
whitequark--up5k --test fails, and all designs just hang in placement18:14
daveshahThis one https://github.com/YosysHQ/icestorm/pull/257/files ?18:16
tpbTitle: icebox: Add support for the bit 1 of SHIFTREG_DIV_MODE by smunaut · Pull Request #257 · YosysHQ/icestorm · GitHub (at github.com)18:16
whitequarkI think so yeah18:17
daveshahHuh18:17
whitequarkthe corresponding patch in nextpnr went in 23 days ago18:17
whitequarkand it looked ok on today's meeting18:17
whitequarkno idea why it breaks18:17
daveshahMe neither18:18
daveshahI will have a look now18:18
whitequarkdaveshah: huh I think I'm wrong18:24
whitequarkit seems to fail integrity check even with that commit reverted18:24
daveshahHmm, for me integrity check passes and some simple designs seem to work18:25
*** jfcaron_ has joined #yosys18:26
whitequarkweird18:26
whitequarkERROR: Assert `usedz.empty()' failed in /home/whitequark/Projects/nextpnr/common/archcheck.cc:112.18:26
whitequarkthis is how it fails for me18:26
daveshahMaybe this is a determinism issue18:27
whitequarkanything I can do to help with this?18:27
daveshahOh, fails for me for up5k too18:27
whitequarkyeah it's up5k specifically18:27
daveshahI don't know if it ever worked, tbh18:28
whitequarkhm, u4k broken too18:28
whitequarkI'm pretty sure pnr for up5k used to work for me18:28
whitequarkwith glasgow18:28
daveshahYeah the pnr may well be a different issue18:28
daveshahHmm18:28
*** kmehall_ has quit IRC18:29
*** kmehall has joined #yosys18:29
tntwhitequark: huh ... "works for me" ...18:30
tntI mean I obviously built plenty of up5k bitstream after that patch.18:31
whitequarktnt: yeah it's unrelated to your patch18:31
whitequarksorry for the noise18:31
whitequarkjust a coincidence18:31
daveshahCan you post the failing json/pcf ?18:33
whitequarkpicorv32.json from ice40/picorv32..sh18:33
daveshahYeah that won't work it has too many IOs18:34
whitequarknextpnr-ice40 --up5k --json picorv32.json hangs forever18:34
whitequarkoh18:34
daveshahIt should timeout eventually18:34
whitequarkok that's uh18:34
daveshahbut IO are a special case so maybe I forgot to consider that18:34
whitequarkthat's kinda silly18:34
whitequarkI totally thought it's a bug...18:34
daveshahHang on, I think it is just the IO placer that's broken18:34
daveshahIt doesn't get tested much as 99% of stuff uses constrained pins18:34
daveshahI have worked out what the check issue is too, it is to do with locations with no bel at z=018:35
whitequarkright18:35
daveshahOK, pushed a fix for the IO issue18:43
daveshahThe archcheck fix will be more involved18:43
whitequarkfix works, thank you!18:44
*** futarisIRCcloud has quit IRC18:54
*** dys has joined #yosys19:04
lambdawell, this is one way of modeling transparency ;) https://github.com/YosysHQ/yosys/blob/master/backends/firrtl/firrtl.cc#L87619:07
tpbTitle: yosys/firrtl.cc at master · YosysHQ/yosys · GitHub (at github.com)19:07
whitequarkouch19:11
*** az0re has quit IRC19:17
*** indy has quit IRC19:19
*** kraiskil has quit IRC20:06
*** indy has joined #yosys20:09
*** m4ssi has joined #yosys20:32
*** emeb_mac has joined #yosys20:38
*** kraiskil has joined #yosys20:38
*** jfcaron_ has quit IRC20:45
*** tedx has quit IRC20:59
*** kraiskil has quit IRC21:05
*** jakobwenzel has quit IRC21:28
*** mirage335 has quit IRC21:29
*** mirage335 has joined #yosys21:46
*** m4ssi has quit IRC22:33
*** az0re has joined #yosys23:27
*** Asu has quit IRC23:28
*** emeb has quit IRC23:30
mithroI just got a nice email from Xilinx -- "The request for the Xilinx Unisim Library to be published as open source has been hosted on GitHub with the Apache 2.0 license here: https://github.com/Xilinx/XilinxUnisimLibrary -- The repo is marked as ‘archived’, but it obviously can be forked for further development by the community. "23:53
tpbTitle: GitHub - Xilinx/XilinxUnisimLibrary (at github.com)23:53
cr1901_modernSo this is like an inverse-RapidWright?23:57

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