Thursday, 2020-07-23

*** tpb has joined #yosys00:00
*** craigo has quit IRC00:01
emebOK - just to follow up on this: It was PEBKAC. Ancient version of trellis and nextpnr-ecp5. Using latest everything is fine.00:23
*** emeb has quit IRC00:30
*** az0re has quit IRC00:35
*** peepsalot has quit IRC00:40
*** peepsalot has joined #yosys00:41
*** Degi has quit IRC01:05
*** Degi has joined #yosys01:06
*** az0re has joined #yosys01:43
*** xtro has quit IRC04:23
*** proteusguy has quit IRC04:38
*** citypw has joined #yosys04:43
*** proteusguy has joined #yosys04:51
*** proteusguy has quit IRC05:37
*** proteusguy has joined #yosys05:38
*** craigo has joined #yosys05:41
*** proteusguy has quit IRC05:45
*** bzztploink has quit IRC05:54
*** bzztploink has joined #yosys05:56
*** proteusguy has joined #yosys06:04
*** proteusguy has quit IRC06:15
*** proteusguy has joined #yosys06:18
*** emeb_mac has quit IRC06:29
*** proteusguy has quit IRC07:30
*** jakobwenzel1 has joined #yosys07:40
*** strubi has joined #yosys07:43
*** kraiskil has joined #yosys07:53
*** proteusguy has joined #yosys07:56
*** az0re has quit IRC08:00
*** proteusguy has quit IRC08:01
*** Asu has joined #yosys08:26
*** proteusguy has joined #yosys08:54
*** proteusguy has quit IRC09:14
*** proteusguy has joined #yosys09:26
*** jhol` is now known as jhol09:34
*** proteusguy has quit IRC09:56
*** proteusguy has joined #yosys09:56
*** kraiskil has quit IRC10:38
*** jeanthom has joined #yosys11:13
jeanthomdaveshah, Hi Dave! I have a question regarding diff pairs on ECP5: I'm trying to use the clock diff pair on ECPIX-5 (https://github.com/nmigen/nmigen-boards/blob/master/nmigen_boards/ecpix5.py#L64) but I can't synthesize my design ("ERROR: cannot place differential IO at location PIOB"). According to https://github.com/emard/ulx3s/blob/master/doc/ECP5UM5G-45Pinout.csv H3 and J3 are true/comp of each other so it should be an issue :/11:18
jeanthomDo you know what's going wrong?11:18
tpbTitle: nmigen-boards/ecpix5.py at master · nmigen/nmigen-boards · GitHub (at github.com)11:18
daveshahnextpnr just expects an IO buffer on the positive side11:18
daveshahI think you need to swap H3 and J3, so the positive side comes first11:22
daveshahor are you using CABGA554?11:22
jeanthomyup I'm on CABGA55411:23
daveshahnot sure what's going on, can you upload the il and lpf somewhere11:23
jeanthomdaveshah, https://gist.githubusercontent.com/jeanthom/adc9f66022ed2ebd0e3c712c77583f69/raw/4f67bc8cccd507f2f8b349959f50a8294c1150c5/top.lpf11:32
jeanthomhttps://gist.githubusercontent.com/jeanthom/adc9f66022ed2ebd0e3c712c77583f69/raw/4f67bc8cccd507f2f8b349959f50a8294c1150c5/top.il11:33
daveshahso the problem seems to be a stray ddr3_0__clk__n input is created11:33
daveshahthis conflicts with the proper differential signal ddr3_0__clk__p11:34
daveshahfor ECP5, as only the positive side is needed, ddr3_0__clk__n should not be created as a port11:34
jeanthomdaveshah, thanks a lot! So it seems to be an issue with nmigen, will investigate that.11:37
whitequarkjeanthom: please file an issue, it is easy to fix and I'll fix it11:42
whitequarkor you could also do a PR if you want, look at how ice40 does it11:42
jeanthomwhitequark, https://github.com/nmigen/nmigen/issues/44611:44
tpbTitle: nmigen generates _n signals when using diff pairs causing issues with nextpnr · Issue #446 · nmigen/nmigen · GitHub (at github.com)11:44
jeanthomjfng told me I should work on that fix11:45
*** az0re has joined #yosys12:23
*** m4ssi has joined #yosys12:28
*** X-Scale` has joined #yosys13:14
*** X-Scale has quit IRC13:15
*** X-Scale` is now known as X-Scale13:15
*** m4ssi has quit IRC13:24
*** kraiskil has joined #yosys13:30
*** kraiskil has quit IRC14:17
*** emeb has joined #yosys14:25
*** citypw has quit IRC15:05
*** kraiskil has joined #yosys15:16
*** DaKnig has joined #yosys15:42
DaKnigdoes yosys allow for optimization passes via external programs?15:42
DaKniglike in clang15:42
daveshahyou can write an output file and read the results back in, this is essentially how the yosys-abc interface works15:43
DaKnigas in , you pass a program some kinda internal representation, and it spits out equivalent internal representation that could be further processed15:43
daveshahit is also possible to do similar with ilang and that would be essentially lossless15:43
az0reDaKnig: As daveshah says.  But that can introduce a lot of tedious overhead for parsing etc.  You should consider implementing your optimization pass within Yosys itself (and if it's at all general, consider contributing it upstream).  See the code in `passes/opt/` for some code to crib.15:54
DaKnigthe problem with being part of yosys is that it still needs to depend on the internal working of yosys15:57
DaKnigso requires maintenance15:57
DaKnigwhenever yosys changes15:57
daveshahILANG isn't a stable format either15:58
DaKnigwhile a separate pass allows it to work with future version, if they have the same internal representation15:58
DaKnigthe problem I saw and discussed a few mins ago in #nmigen was that produced verilog has many duplicated signals for no good reasons15:59
DaKnigor signals that are assigned to but never used15:59
daveshahhave a look at opt_clean and opt_merge15:59
whitequarkdaveshah: that won't help sadly15:59
daveshahoh right, because proc16:00
whitequarkno. the problem being discussed is what i've tried to solve with -inline16:00
daveshahah16:00
DaKnigor ones that are only assigned to once, with a simple expression, and used only once just to assign said value to another wire/reg16:00
whitequarkbut to make write_verilog -inline work i'll have to rewrite most of it16:00
daveshahyeah, that's not something a pass working on ILANG could fix aiui16:00
whitequarkyep16:00
DaKnigmy first thought was to somehow manipulate the ast directly16:01
DaKnigcan yosys spit out the ast directly?16:01
daveshahin this context, no16:01
whitequarkthere's no AST16:01
whitequarkwrite_verilog concatenates strings in an extremely ad-hoc way16:01
whitequarkthat's kind of the whole problem here16:02
DaKnigwdym there's no AST? how does it save the structure of the design then?16:02
DaKniglists of statements?16:02
whitequarkyosys does not internally treat the design as Verilog AST or even as a tree16:03
whitequarkit uses a netlist16:03
mwk... well processes are kind of a tree, but that's about it16:03
whitequarkyeah (processes aren't the issue here)16:04
DaKnignetlists can be easily converted into a dependency tree16:04
whitequarksure. the hard part is producing Verilog code (or AST or whatever) that actually roundtrips back to the same netlist16:06
*** jakobwenzel1 has quit IRC16:15
whitequarkDaKnig: anyway, if you really do want to tackle this, i'm very excited to review your PR16:15
whitequarkbecause write_verilog defeated me at least twice16:16
mwk.. FYI me and Lofty were trying to salvage and fix up your inline branch, and it defeated us both as well16:17
whitequarkamazing16:18
LoftyMmhm16:28
DaKnigwhitequark I am now trying to make a proof of concept program in C that would do that16:31
DaKnigread a yosys-produced "ugly" verilog file and output the nicer version16:32
DaKnigit doesnt support *all* of yosys, for example I assume that a signal might only get assigned a simple expression16:32
DaKnigfrom observation that is what happens16:32
DaKnigso no `a <= b+c+d`16:33
DaKnigbut that's good enough. I am solving the specific problem that annoys me, not the whole real problem properly16:33
DaKnigscrew the extra few seconds that this would take (not that this is really gonna take seconds)16:34
whitequarkDaKnig: be careful with Verilog's context-sensitive promotion rules16:49
DaKnigwhitequark: elaborate?16:55
LoftySometimes something is zero extended, sometimes something is sign extended16:56
whitequarkDaKnig: see sections 5.4 and 5.5 in 1364-200516:56
whitequarkthere are a few examples there, too16:57
*** kraiskil has quit IRC16:58
DaKnigcan you send me the standard again? I lost it. I should place it in my "standards" folder to not lose that again...17:02
whitequark9faa1d37425ddafb5b2e76d502d86e3bff9ae54c17:03
whitequarker17:03
whitequarkhttps://cloud.whitequark.org/s/zCyXDfJzzFezQ3X17:03
tpbTitle: whitequarks cloud (at cloud.whitequark.org)17:03
DaKnigah I dont think I care much about this17:08
az0rewhitequark: "yosys does not internally treat the design as Verilog AST or even as a tree"17:08
DaKnigjust copy paste the value as is17:08
az0reThen what does "read_verilog -dump_vlog1" do?17:09
az0reIt definitely does not store an AST, but it does construct one17:09
DaKnigunless there is a difference between inside a process and outside a process, this should not be a problem17:10
DaKnig"if a named signal has the same value as a temp signal , and both have the same type, just replace the temp name with the named signal"17:10
DaKnigaz0re: I asked about the internal representation.17:10
az0reRight, designs are not represented by ASTs, and you should not use the Verilog AST as a sort of portable representation.17:12
az0reBTW, if you're worried about maintenance of an in-tree optimization pass, then upstream it! :)17:12
*** maartenBE has quit IRC17:16
strubiinteresting topic...there's been this LLHD approach on the horizon, but somebody still's got to show those roundtrip capabilities..17:16
strubifor reference: https://arxiv.org/pdf/2004.03494.pdf17:17
whitequarkthere's also circt (https://github.com/circt/circt)17:18
tpbTitle: GitHub - circt/circt: Circuit IR Compilers and Tools (at github.com)17:18
Loftyaz0re: the flowmap and abc9 passes would like a word :P17:19
*** jeanthom has quit IRC17:20
strubiwhitequark, do you have any insight on the Python API roadmap, btw?17:20
*** maartenBE has joined #yosys17:20
whitequarkstrubi: which one?17:21
strubipyosys17:21
whitequarknot in particular17:21
*** kraiskil has joined #yosys17:28
*** xtro has joined #yosys17:38
*** kuldeep has joined #yosys17:58
attieas far as I know the 'roadmap' is that the student that contributed that interface finished his thesis, so it's now just... there18:07
*** kraiskil has quit IRC18:18
strubithat's what i gathered so far, so I was wondering about further maintenance, test suites, all that18:23
attiehe is responsive when we contact him about any issues or PRs about it, but there's no one actively taking care of it18:27
attiea test suite is on the "we would love to have one, but none of us wants to spend the time writing it" list...18:28
strubiIs it a matter of CI or one of providing the full coverage?18:29
attieI don't think there are any tests at all at the moment18:31
attiethere might be some CI issues (I'm not sure if we build with libyosys and pyosys enabled in CI) but those shouldn't be blocking18:32
strubiI haven't seen any in the yosys repos so far. Question if, if you want to see things 'breaking' early (requiring maintenance again)18:35
strubiif = is18:35
attieyes, ideally we would want to know if things are breaking so we can fix them18:37
attieif the api is already bitrotted so much that it would break CI for master we'd either wait to merge the tests or disable them until it's fixed18:38
attiebut right now we're totally in the dark on whether there is any problem with it18:40
strubiwell, so far I'm only using a subset, but there are a few issues, still need to sort them out completely. It's more like nice to have for now.18:41
attieif you do submit issues or PRs, we'd welcome small tests to reproduce the issue to make sure they stay fixed. There's no requirement to be particularly thorough, the tests are definitely at the 'anything is better than nothing' stage...18:48
strubiI might look into spawning off some py.test setups, I've got a fairly large test suite, but for a different 'probe' (assuming pyosys stable/functional)18:50
attieone CI issue that might be relevant is that travis deliberately runs on some rather old gcc and I guess also python versions, because we try to stay compatible with some ancient CentOS releases that are still popular in company environments... so uh, try not to use any language feature that isn't old enough for kindergarten?19:00
strubiWell..darn...I had just migrated all to Python3. That ok?19:00
attieas long as it isn't 3.8 that should be fine :D19:01
whitequarkthat's kinda necessary imo, python2 is EOL19:01
strubiNope, should work on 3.4, too.19:01
strubiWorst case scenario could be dual approach, running one CI test on docker hub19:02
attiepython3 is definitely in middle school at this point19:02
attiewe do have additional CI on our own servers, where we also run yosys-tests19:03
attiewe do occasionally put things there instead of in 'make test' either because it runs a long time, or because it requires extra tools to be installed19:04
*** bwidawsk has quit IRC19:04
attie(e.g. any of the passes that call external solvers are run there, not on travis)19:04
*** bwidawsk has joined #yosys19:04
DaKnigCentOS 7 has python3.619:06
strubiI'm not so familiar with the travis environment yet, is there a PnP docker container to make things compatible with?19:13
az0reLofty: lol :)19:14
attiefor this you wouldn't need to worry about it19:15
attieit just runs the 'make test' target19:15
strubiit would be more about particular py.test setups that work differently in distros19:17
attieI don19:17
attieI don't know py.test, is that included in the standard python libraries?19:17
strubiNo, normally requires a pip call19:17
attieit's not possible to install anything extra in travis, that's a big limitation19:18
strubito install19:18
attieour testcases are just scripts that return 0 if everything is fine19:18
strubiBut the Dockerfile already there could be reused easily to put a test case in an automated docker build19:18
attieit could, but that wouldn't be possible to integrate into our CI19:19
strubiBut you can run travis/docker hub in parallel, if I'm not mistaken19:19
attieare you volunteering to run an additional CI infrastructure for us? :D19:20
strubiWell, I could give it a go19:20
attieonly do it if it's really fun for you. I don't think it would add a lot of usefulness, only a lot of complexity19:22
strubiIf you are auto-building debian packages of yosys somewhere, it's just a YML file to add, more or less19:24
attiewe might be building those already? it's on the todo list at least. but I'm not sure we even enable pyosys in those, and it's not where we want testing to happen19:25
strubiI19:26
strubiI'm not sure if docker hub wouldn't time out on a yosys build, so better have them built elsewhere19:26
attieCI tests are essentially the 'make test' target in yosys, plus (not sure if this is fully passing yet, and it's not public) the yosys-tests repository for more complex tests19:27
attie'make test' is what we look at before we merge, so to avoid breakages that's where we'd want to put tests19:28
strubiother option is to use your pre-made container and install what's needed19:28
strubithat might be not cost too much effort19:29
attieif you're talking about whatever remnants of a docker file are hanging out in the repo, I'm not 100% on that but I think they're just some bitrotted remnants of someone's PR that also never gets tested...19:29
strubiIt appears to be from '19:31
strubi1138-4EB 1138-4EB19:31
strubi1138-4EB'19:31
strubiOops.19:31
strubiwho is active on the GHDL side of things19:31
attieyeah I think some downstream projects wanted it so we merged it to please them, but I don't think we use it19:32
attie(but this was before I joined, don't take my word for it)19:32
strubiactually that docker image gets updated once a week, might use that for a first run.19:32
strubithat downstream project would be the ghdl-yosys-plugin19:34
attieanyway, knock yourself out, but from our side, small self-contained scripts that run for <1m and just return non-zero on error (even just an uncaught exception backtrace) would be preferred19:34
mwkwhatever you do, please it part of `make test`, or it WILL get broken19:36
attiefor example, this testcase runs a python script: https://github.com/YosysHQ/yosys/tree/master/tests/rpc19:37
tpbTitle: yosys/tests/rpc at master · YosysHQ/yosys · GitHub (at github.com)19:37
strubiyap, py.test will integrate fine into Makefile, it's all like in the MyHDL repo, or ghdl-yosys-plugin19:37
strubiso pretty much boilerplate19:37
*** kraiskil has joined #yosys19:57
*** emeb_mac has joined #yosys20:00
*** bwidawsk has quit IRC20:17
*** bwidawsk has joined #yosys20:17
*** Asuu has joined #yosys20:24
*** Asu has quit IRC20:28
*** kraiskil has quit IRC20:54
*** Asuu has quit IRC21:31
*** kraiskil has joined #yosys21:39
*** kraiskil has quit IRC22:55
*** emeb has quit IRC23:16
*** lf_ has quit IRC23:38
*** lf has joined #yosys23:38

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