Wednesday, 2020-04-15

*** tpb has joined #symbiflow00:00
mithro@daniellimws BTW Where in the world are you located?00:03
*** Degi_ has joined #symbiflow00:24
*** gsmecher has quit IRC00:25
*** Degi has quit IRC00:27
*** Degi_ is now known as Degi00:27
-_whitenotifier-3- [sphinxcontrib-markdown-symlinks] FFY00 opened issue #8: Add release -
mithro@FFY00 - I'm open to the idea of github actions as they seem like a potential future winner01:37
mithro@FFY00 - I'm also somewhat surprised that prjtrellis doesn't have any existing CI on it...01:38
FFY00and yes, there should definitely be a CI :)01:39
FFY00I am not really comfortable with the project so I can't help with that01:40
FFY00but if someone wants to spend the time explaining me, I am open to do it01:41
FFY00mithro, do you want to create a repo to hold the github action? or should I do it and then transfer it to SymbiFlow?01:45
FFY00doesn't really matter much01:45
*** rvalles_ has joined #symbiflow01:59
*** rvalles has quit IRC02:00
daniellimwsmithro: Right, missed out some stuff in the end, but all should be good now. I'm in Singapore. You?02:00
*** futarisIRCcloud has joined #symbiflow02:05
mithrodaniellimws: Cool! I know a few people in Singapore.02:07
-_whitenotifier-3- [prjtrellis] FFY00 opened issue #135: `PREFIX` is not being respected for `LIBDIR` -
mithrodaniellimws: Pondering if we should put a hash better the hashbang and the copyright statement in the Python files..02:09
daniellimwsmithro: between them?02:09
mithro@daniellimws: Currently there is an empty newline02:09
daniellimwsmithro: Yup, should we add? I can't decide, feel that it is makes more sense to separate them since they are different things02:11
mithrodaniellimws: Yeah, I was thinking that too - just trying to figure out what people generally do02:11
mithrodaniellimws: When it's too hard to make a decision yourself, copy someone else :-P02:12
mithro@daniellimws I just discovered that Python might have __copyright__ and __license__ triple quoted strings...02:13
tpbTitle: apache 2.0 - Placement of copyright and license variables within Python source? - Open Source Stack Exchange (at
daniellimwsmithro: Oh if we use that, we don't need to worry about that empty line anymore :P Shall we? Not sure if that's the standard way because I've never seen projects using it02:15
mithrodaniellimws: Yeah, I haven't seen that before either02:16
mithrodaniellimws: And I've been coding in Python since 1.5.1 days...02:16
mithrodaniellimws: I guess we should probably add the file encoding strings after the hashbang in python files too ->
tpbTitle: PEP 263 -- Defining Python Source Code Encodings | (at
mithroSeems like the idea of __copyright__ and __license__ comes from
tpbTitle: Python Coding Guidelines (at
daniellimwsAlmost a decade02:18
tpbTitle: __author__ / __copyright__ / __license__ not widely accepted as modern best practice · Issue #162 · pyscaffold/pyscaffold · GitHub (at
*** citypw has joined #symbiflow02:22
daniellimwsmithro: In the PEP0263 document, "Without encoding comment, Python's parser will assume ASCII text", are we setting the encoding to ascii or utf-8?02:22
mithrodaniellimws: utf-802:24
mithrodaniellimws: Looking at -- the suggested tools are addlicense and autogen -- I wonder what they do regarding that newline...02:24
tpbTitle: Preparing For Release – (at
daniellimwsI can try02:25
mithrodaniellimws: addlicense doesn't seem to have all that great testdata02:26
tpbTitle: addlicense/ at master · google/addlicense · GitHub (at
mithroautogen seems to do this ->
tpbTitle: autogen/bsd3-acme-py-test-prefix.out at master · mbrukman/autogen · GitHub (at
tpbTitle: autogen/bsd3-acme-py-test-suffix.out at master · mbrukman/autogen · GitHub (at
tpbTitle: Publishing package distribution releases using GitHub Actions CI/CD workflows Python Packaging User Guide (at
daniellimwsmithro: Looks like we should have that hash then02:29
FFY00we can trigger that on tag pushes02:31
FFY00unless you want to trigger every time02:32
mithroFor most things, I would trigger every time02:32
mithroFFY00: but following the Python Packaging Authority's suggested tooling + workflow is a good way to make the issue someone else's problem :-P02:33
FFY00your call02:33
FFY00I would push pre-releases every time02:33
FFY00and push releases from time to time02:33
mithroFFY00: Using for our python modules would probably be a good idea too?02:34
tpbTitle: GitHub - pypa/setuptools_scm: the blessed package to manage your versions by scm tags (at
FFY00that makes things more annoying for packagers02:34
FFY00but can be used02:35
FFY00the issue is that the github tarballs don't have enough metadata for setuptools_scm to work02:36
FFY00but that can be easily hacked around02:36
mithroFFY00: And setuptools_scm is likely to be pretty widely used02:36
FFY00eh, not really02:37
FFY00I mean02:37
FFY00it's used by a lot of projects02:37
FFY00but I would say at least 95% of the projects just use setuptools02:38
FFY00totally unrelated02:38
FFY00is there any particular reason you use merge commits02:38
mithroFFY00: As appose to?02:39
tpbTitle: Single-sourcing the package version Python Packaging User Guide (at
FFY00see this git log:
tpbTitle: Commits · libratbag/libratbag · GitHub (at
FFY00you get metadata about the author and committer02:41
FFY00and the history is much cleaner02:41
FFY00but this is just a nitpick02:42
mithroFFY00: There are lots of arguments about which way is better02:42
FFY00I would be happy to br convinced :D02:42
mithroLooks like in the future it maybe
tpbTitle: Using importlib.metadata Python 3.8.2 documentation (at
FFY00I don't think they make sense for most projects02:43
FFY00yes, there are people rewriting the python packaging system02:44
FFY00it is being reworked02:44
FFY00let's hope for the better02:44
FFY00but I think pip is pretty good already02:44
mithroFFY00: The big issue is that rebasing causes commits to change hashes making it very hard to talk about things which end up living in branches for a long time before being merged02:45
FFY00at least it's light years away from package managers from other languages :P02:45
mithroFFY00: Good or bad? I could see both arguments ;-)02:45
FFY00mithro sure, use merge commits for that02:46
mithroI think xobs would have disagreement about that :-)02:46
FFY00but using merge commits by default does not make sense imo02:46
FFY00which package manager would he be defending?02:47
mithroFFY00: He is a fan of rust's02:48
mithrodaniellimws: Yeah, I think my search has determined we want to include the hash for Python files02:49
mithroAnyway, I think I'm going to have some dinner02:51
mithroMight be make after, might not02:51
FFY00my main issue with cargo is that cargo install will rebuild everything02:52
FFY00which is awful02:52
FFY00and rust right now doesn't have a stable ABI, so no shared libraries, which mean it's a vendoring hell02:53
*** Bertl_oO is now known as Bertl_zZ03:12
xobsFFY00: yeah, rust. pip gives me no end of grief. cargo always seems to work.03:16
FFY00because cargo is very opinionated03:17
FFY00and it is still solving an easy problem03:18
FFY00we'll see when rust starts using shared libraries03:18
xobshow do you mean?03:18
FFY00fetchind and static linking every dependency is far easier than managing installed dependencies03:19
FFY00like pip does03:19
FFY00when rust gets a stable abi and people start using shared libraries you will see03:20
xobsI'm not sure I follow.03:20
FFY00shared libraries will be installed to the system03:21
FFY00cargo will not to manage them03:21
FFY00install, manage versions, resolve dependencies, etc.03:21
FFY00right now it is only downloading the sources and compiling a single binary03:22
FFY00which is awful, but there is no alternative due to the lack of abi03:22
FFY00when rust gets a stable abi, everything will start to move torwards dynamic libraries03:23
FFY00*cargo will NEED to manage them03:24
xobsI enjoy the static linking. It's made deploying `wishbone-tool` very easy.03:24
FFY00but it is also very awful03:24
FFY00duplicated code03:24
FFY00this means you waste *a lot* more space03:25
FFY00is bad for security03:25
xobsThe code isn't duplicated, the binary is.  And the binary data is small.03:25
FFY00when some library gets a cve, you have duplicated code in 300 different places03:25
FFY00xobs, duplicated binary code03:26
FFY00take a practical example03:26
FFY00electron apps03:26
FFY00they static build and are huge03:26
FFY00xobs, if static building is so great how come it is not standard practice when distributing C libraries?03:28
FFY00all distributions have guidelines against it03:28
xobsFFY00: most C libraries are distributed as source, which usually gives you the option to build a static library.03:29
FFY00they are distributed as shared libraries by the distributions03:29
FFY00you don't compile your source code together with the libraries03:30
FFY00they ship a shared library + headers03:30
FFY00you use the headers for the definitions and link your object against the shared library03:31
FFY00either way, the time will come when rust gets a stable abi03:31
xobsAs far as I can tell, distributing static binaries is becoming the norm, what with snap packages and flatpak.  Or whatever it's called.  I'm not really a Linux desktop user.03:32
xobsAll I know is "pip install" has about a 50% chance of actually working.03:32
FFY00snap and flatpak are not the norm03:32
FFY00they are alternatives03:32
FFY00the norm is still the distribution package manager03:32
xobsUsually they assume you have various packages already installed, or that you're running Linux, or that you actually have pip installed.03:32
xobsWhereas "cargo install" is usually enough to get stuff done, or to let someone build a package themselves so they can contribute.03:33
FFY00but because some distributions are so awful with updates snap and flatpak were created03:33
xobs"pip install" is usually met with statements like "oh, you're using it wrong".03:33
FFY00to be used as an alternative in those cases03:33
FFY00xobs, cargo install is enough for now, because rust doesn not support doing things currently yet03:34
FFY00*doing things correctly03:35
FFY00this will change03:35
xobsFFY00: I think we have different definitions of "correctly".  The "correct" way has been the source of endless headaches for me.03:35
FFY00that's easy03:36
FFY00not correctly03:36
FFY00it's hard to do things correctly03:36
FFY00expecially when upstreams provide bad tooling03:36
xobsAnd pip is bad tooling.  Apparently it lets you mix `--user` and not `--user`, which results in packages installed to multiple places, which confuses python, which breaks everything, which requires you to reinstall.03:38
xobsBut `pip install` is wrong, you need to use virtualenv, or venv, or easyinstall, or setuptools, or whatever it's called now.  Because otherwise the whole system gets broken.03:39
xobsAssuming you even have pip.  The "embedded" python from doesn't include it.  And neither does the debian install.03:39
xobsSo you need to compile python yourself.03:39
FFY00debian gets broken03:39
xobsOr get it from conda, which modifies your bashrc by default.03:39
xobsAnd conda is a hundred megabytes of extra stuff just for a python interpreter.03:40
FFY00conda is awful03:40
xobsWhich has its own method of managing binaries.03:40
FFY00pip is fine, unless you need outdated dependencies03:40
FFY00if you need that then use venv03:40
xobsAnd then you have to worry about the python abi changing, because that's not stable.03:41
FFY00it is stable03:41
FFY00only changes on major versions03:41
FFY00as expected03:41
xobsYou mean minor versions?03:42
xobsE.g. you can't use a 3.6 python standard library with a 3.5 interpreter.  Or vice-versa.03:42
xobsAlso, the actual stuff that's in the python standard library isn't standard.03:42
xobsFor example, the embedded python doesn't include the url parsing library.03:43
FFY00yes, sorry, minor version03:43
xobsAnd as such, ensure_pip doesn't work.03:43
FFY00embedded python does not implement the full standard03:44
FFY00and I don't thin anyone is claiming that03:44
xobsAnd I don't see the value with e.g. including eight different boost_1.67 dll files with a program I ship.  Very few things will include that particular version of boost.  So I might as well statically link it and use lto to remove stuff that isn't used.03:44
FFY00have that installed on the system03:45
FFY00and don't ship ddls03:45
FFY00that is how things work in linux03:46
FFY00of course on windows there is no such thing03:46
FFY00you need to ship the files03:46
FFY00and then you need a 300gb disk just to have all your programs03:46
FFY00while on linux 60gb is sufficient03:47
FFY00for ane equivalent amount of programs03:47
FFY00also, when there is a cve in boost you need to push an update of your apps03:48
FFY00or people are vunerable03:48
FFY00while on linux you update the system boost\03:48
FFY00instead of updating 200 packages03:48
FFY00same things happens in rust03:49
FFY00since everything is static linked03:49
xobsThe nextpnr binary is 110 MB.  If I were to remove the boost files, it would shrink by 300k.  And I highly doubt a CVE there would affect the actual program.03:49
xobsdynamically linking boost does not help, and just adds headache.03:50
FFY00right, enjoy windows :)03:50
xobsI do!03:51
xobsAnd you enjoy Linux.03:51
xobsI think it's interesting in that the two approaches are rooted in different beliefs, and that's very evident in what we're both arguing for.03:52
xobsThe approach you're advocating is very useful and easy to deal with assuming you have a competent package manager.03:52
FFY00but I agree managing dependencies on windows is a PITA03:52
xobsFor example, nix people really advocate that approach because their package manager is amazing.03:52
FFY00but on linux there is no excuse03:53
xobsWhereas for me, static linking simplifies things.03:53
xobsMac is somewhere in the middle.  Bundled frameworks are a thing, but it's just okay.03:53
xobsStatic linking is the lowest common denominator, and cargo lets you do that well.03:53
xobsSo if you're on a system that has gone all-in on shared modules, then yes, pip and python are great.03:53
xobsIf not, then all the arguments you make fall down, and just result in confusion.03:54
*** az0re has joined #symbiflow03:55
xobsIt's probably due to a cultural failure in how software is installed on Windows.  But that's the environment I have to deal with.03:55
xobsBeing able to host an FPGA workshop and tell everyone, regardless of their platform, to just run this one executable file and they'll be able to interact with a Fomu has been a huge boon.  And I don't know that I'd be able to pull that off if wishbone-tool were written in python.03:56
*** _whitelogger has quit IRC04:33
*** _whitelogger has joined #symbiflow04:35
sf-slack<timo.callahan> @kgugala, I have summarized some comments about the tflite demo.  How do you prefer I send them?  (i) add each item as a new issue on the git repository,   (ii) add them as comments to the issue that I already opened (#11),  (iii) Google doc, or, (iv) e-mail them to you.    Or something else?05:42
*** OmniMancer1 has joined #symbiflow05:49
*** OmniMancer has quit IRC05:52
OmniMancer1I am late to the discussion but note that most of boost is header only libraries so the dynamic/static linking has no effect on updating those, and also that in C++ anything making use of templates will have complications in whether you can just update the shared library06:02
OmniMancer1And Rust's encouragement of generic programming makes use of shared libraries of little value since much code ends up in the dependent binary not in the library and like for C++ complicates the just update the library to get security fixes thing06:06
sf-slack<kgugala> @timo.callahan you can add the comments to existing github issue, or open a new one. If it's something you already solved you can open a PR with the fix06:30
*** kraiskil has joined #symbiflow07:06
*** anuejn_ is now known as anuejn08:22
-_whitenotifier-3- [sphinxcontrib-verilog-diagrams] oharboe opened issue #10: Problems installing the plugin -
*** az0re has quit IRC09:25
*** acomodi has joined #symbiflow09:52
*** Bertl_zZ is now known as Bertl09:58
*** rvalles has joined #symbiflow10:12
*** rvalles_ has quit IRC10:15
daniellimwsmithro: Here the example says "D-Flip flop with combinational logic". Doesn't a d flip flop only have 2 inputs (clock, d) and 1 output (q)? Should I rename it to just "flip flop" without the D in front of it?10:17
*** kraiskil has quit IRC10:26
*** kraiskil has joined #symbiflow10:39
*** bluel has joined #symbiflow11:02
*** bluel has quit IRC11:23
*** Ultrasauce has quit IRC11:27
*** Ultrasauce has joined #symbiflow11:29
*** kuldeep has quit IRC11:42
*** kuldeep has joined #symbiflow11:48
*** kuldeep has quit IRC11:51
*** kuldeep has joined #symbiflow11:51
*** Bertl is now known as Bertl_oO12:17
*** FFY00 has quit IRC12:51
*** FFY00 has joined #symbiflow12:52
*** FFY00 has quit IRC13:04
*** FFY00 has joined #symbiflow13:05
*** OmniMancer1 has quit IRC14:04
*** gsmecher has joined #symbiflow15:05
FFY00mithro, github actions doesn't work for us15:34
mithroFFY00: Oh? That is sad :-(15:34
FFY00it runs actions in containers15:34
ZirconiumXI don't know if anybody here particularly cares, but with synth_intel_alm merged into Yosys master you can now use it to synthesise bits of gateware15:35
ZirconiumXattosoc demo:
FFY00and I need to pass -v /sys/fs/cgroup/systemd/docker:/sys/fs/cgroup/systemd/docker to the docker arguments15:36
FFY00so that we can spawn a systemd container for a clean build15:36
FFY00well, it might work when doing it directly in the github action15:36
FFY00but it doesn't let us define reusable actions15:37
FFY00for some reason all reusable actions run in their own docker container15:37
FFY00building arch packages would be as simple as this:
tpbTitle: build-arch-package/test.yml at master · FFY00/build-arch-package · GitHub (at
sf-slack<timo.callahan> @kgugala I'll work on a PR15:51
*** OmniMancer has joined #symbiflow16:05
sf-slack<timo.callahan> @kgugala although here's one thing that I am not sure about and would like some advice: After running "west init ...",  the command prints out "=== Initialized. Now run "west update" inside /home/tcal/antmicro/litex-vexriscv-tensorflow-lite-demo.".    Is the user supposed to ignore that and instead run what the demo says, "git submodule update --init --recursive" ?   Or is the user supposed to run both update16:06
*** citypw has quit IRC16:20
*** OmniMancer has quit IRC16:46
*** kraiskil has quit IRC16:47
*** kraiskil has joined #symbiflow17:01
*** az0re has joined #symbiflow17:05
sf-slack<kgugala> @timo.callahan you can ignore this step for the LiteX/Vexriscv TF lite demo17:20
sf-slack<kgugala> @timo.callahan what `west updade` does is to fetch third_party HALs17:20
sf-slack<kgugala> we don't need them for LiteX/Vexriscv port17:21
sf-slack<kgugala> and this step takes a lot of time, so we simply skip it :)17:21
sf-slack<timo.callahan> @kgugala thanks!17:22
mithro@ZirconiumX It is my understanding that VtR has a flow which takes vqm?17:35
mithroZirconiumX: It would be interesting to see if you can do Yosys->VPR here17:36
ZirconiumXmithro: Well, I can try17:36
ZirconiumXLast time you mentioned it, you said it was for Cyclone IV though17:36
mithro@ZirconiumX I say a lot of things and don't remember all of them :-P17:39
ZirconiumXThis is running on Cyclone V17:40
ZirconiumXWhich is very different to CIV17:40
mithroZirconiumX: I'm sure the VPR devs would be interested in an architecture model for CV even if it doesn't really match the real hardware17:45
ZirconiumXmithro: I'm fairly confident I can match the hardware; but I've no idea where to begin17:46
ZirconiumXPlus there's only one of me ^.^17:46
tpbTitle: Architecture Modeling Verilog-to-Routing 8.1.0-dev documentation (at
mithroZirconiumX: You might find that VPR has students interested in helping17:50
ZirconiumXmithro: Sure, but I can't pay them17:50
ZirconiumXmithro: I was curious how Odin II did (since the last time I read a paper on it, Yosys destroyed it)17:53
ZirconiumXCrashing when passed no arguments is always a good sign17:53
mithroZirconiumX: ODIN-II is moving towards being a Yosys plugin17:54
ZirconiumXTitan is Stratix IV, so yeah, it would need a brand-new architecture definition17:55
mithroODIN-II is about making good trade offs between putting things into hard logic verse soft logic17:56
mithroParsing code was always just a necessary evil17:57
ZirconiumXMmm. Well, anyway17:59
ZirconiumXYosys produces code of rather variable quality18:02
ZirconiumXAnd it's missing some important baseline features18:02
mithroZirconiumX: We are working on trying to improve that at
tpbTitle: SymbiFlow FPGA Tool Performance (Xilinx Performance) - Google Docs (at
ZirconiumXmithro: Have you seen ?18:09
tpbTitle: GitHub - ZirconiumX/yosys-testrunner: Program for robustly comparing two Yosys versions (at
mithroZirconiumX: nope!18:10
ZirconiumXYou don't need the exact code, but what this does is use a statistical method to determine which of two versions is superior18:10
ZirconiumX(specifically the sequential probability ratio test)18:10
ZirconiumXAnd when using something even as simple as "X produces a greater Fmax than Y" as a hypothesis, it turns out that there's a very high signal-to-noise ratio18:11
ZirconiumXSo you can fairly easily go down to 0.001% false-positive error18:12
ZirconiumX(the point of using SPRT is that you can bound the false-positive rate)18:12
ZirconiumX(and false-negative rate)18:12
ZirconiumXAdditionally the SPRT implemented here is multinomial18:14
ZirconiumXSo it can find the "better" one even when you give it a bunch of criteria to work with18:14
ZirconiumX"which one is faster?"18:14
ZirconiumX"which one produces a better area?"18:15
ZirconiumX*faster to route18:15
*** tmichalak has quit IRC18:18
*** kgugala has quit IRC18:18
*** tmichalak has joined #symbiflow18:19
*** kgugala has joined #symbiflow18:20
mithroZirconiumX: Sure, working on that loop bit to improve the statistics would be interesting -- I'm no expert around that18:22
ZirconiumXmithro: naturally there's a CPU time/error tradeoff18:23
mithroCPU time isn't a huge concern for me -- developer time is much more important18:24
ZirconiumXThe script I wrote is designed to be relatively simple to run and reproducible18:27
-_whitenotifier-3- [sphinxcontrib-verilog-diagrams] mithro opened issue #11: Add Travis CI -
ZirconiumXmithro: <-- this is Yosys versus Quartus on a *very* combinational heavy benchmark18:28
tpbTitle: qvy_chess.txt · GitHub (at
mithro@ZirconiumX those numbers look very close unless I'm mistaken?18:30
-_whitenotifier-3- [sphinxcontrib-verilog-diagrams] mithro opened issue #12: Add better "how to use" documentation -
ZirconiumXmithro: That's what surprised me most; see how Yosys produces *way* more LUTs, but they pack so well that the end result isn't so bad18:31
tpbTitle: Revisions · qvy_chess.txt · GitHub (at
ZirconiumXThis was the result for attosoc18:31
ZirconiumXWhere Yosys does a fair bit worse18:32
ZirconiumXBut since I kinda messed up the numbers, I deleted them (I wasn't using post-PnR numbers but post-synth)18:32
*** tmichalak has quit IRC18:34
*** kgugala has quit IRC18:34
*** tmichalak has joined #symbiflow18:36
*** kgugala has joined #symbiflow18:36
*** nonlinear has quit IRC19:13
*** nonlinear1 has joined #symbiflow19:14
*** az0re has quit IRC19:31
*** kraiskil has quit IRC19:32
*** az0re has joined #symbiflow20:24
*** felix_ has left #symbiflow20:59
*** OmniMancer has joined #symbiflow21:10
*** space_zealot has joined #symbiflow22:00
sf-slack<timo.callahan> @kgugala, I think I need to be given permissions on the Antmicro repo to push my branch (I'm tcal-x).22:36
*** epony has quit IRC23:12
*** epony has joined #symbiflow23:21
FFY00mithro, I just remembered23:35
FFY00msys uses pacman as their package manager23:35
*** gsmecher has quit IRC23:36
FFY00so with just a little more effort we can also provide msys packages23:36
*** epony has joined #symbiflow23:37
FFY00and I was thinking, we could use libalpm (pacman backend) to write a custom package manager that works in the user directory and we can use the same arch packages23:38
FFY00shouldn't be too hard, as it's just a frontend23:39
mithroFFY00: I don't want to be in the position of maintaining a totally separate ecosystem, want to try and reuse existing ecosystems --hence why conda is attractive (as it is already heavily used as part of the scientific computing and ML ecosystems)23:45
tpbTitle: pyalpm/pycman at master · archlinux/pyalpm · GitHub (at
FFY00we would just be maintaining a front end for libalpm with custom handling of paths23:53
FFY00as you can see it's not that much work23:54
FFY00and I don't know where to draw the line of ecosystem23:54
FFY00but I do get your point23:54

Generated by 2.17.2 by Marius Gedminas - find it at!