Monday, 2021-02-15

*** tpb has joined #symbiflow00:00
umarcor|2cr1901_modern: thanks! See https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-ghdl/PKGBUILD#L80, the current version of *-gcc-ada is 10.2.000:12
umarcor|2cr1901_modern: those segfaults you got, where them on MSYS2 or on Ubuntu 16.04?00:13
umarcor|2cr1901_modern: you need to disable synthesis features if you want to build GHDL on Ubuntu 16.04. Synthesis requires GNAT >=8.00:14
umarcor|2alternatively, you might try with AdaCore's GNAT.00:16
cr1901_modernumarcor|2: Got the segfaults on MSYS2. I can't build at all on Ubuntu. I could try w/ Adacore's GNAT, but it looks like it might interfere w/ the libc I already have installed on my system?00:37
umarcor|2cr1901_modern: the segfaults should be fixed. GHDL is now tested on MINGW32/MINGW64 and all the test suites are executed.00:38
umarcor|2cr1901_modern: WRT to AdaCore's GNAT, it should not conflict. You just get it, extract it, and add it to the PATH for building GHDL. If you generate an static build, then you don't need it.00:39
cr1901_modernOh, I can link GHDL to the system libc (I assume GNAT's runtime transitively depends on it) even on Ubuntu 16.04?00:40
cr1901_modernAnyways, that's fine00:40
umarcor|2alternatively, just use the containers from hdl/containers. There you have latest GHDL, optionally together with Yosys (and ghdl-yosys-plugin).00:40
cr1901_modernWould prefer not to setup a container for various reasons. I can live w/ a static build.00:41
cr1901_modernAlso, ignore my libc q... it doesn't make sense00:41
cr1901_modernThe main reason I need GHDL is to start playing with j-core00:42
cr1901_modernAIUI, one of the reasons GHDL got yosys integration was that the j-core project requested it00:42
umarcor|2Currently, the only build we do with AdaCore's GNAT is the one on macOS: https://github.com/ghdl/ghdl/blob/master/scripts/macosx/install-ada.sh and https://github.com/ghdl/ghdl/blob/master/.github/workflows/Test.yml#L18400:43
umarcor|2there were requests for synthesis with GHDL for many years, almost since it was created. the readme had some bold statements about it because of that.00:44
umarcor|2I believe the main driving factor was being able to use open source optimisation algorithms without implementing them in GHDL. That is, Yosys itself.00:46
umarcor|2similarly for VHDL-AMS, GHDL has complete support for parsing/analysis, but there is not continuous solver.00:47
cr1901_modernhmmm00:47
umarcor|2nevertheless, j-core, together with LEON, is one of Tristan preferred projects for testing, together with some other retroarcade projects.00:48
umarcor|2all those do typically contain valid (LRM compliant) VHDL code, so the bugs/missing features are to be fixed in GHDL. other projects have design issues which are misleading.00:49
cr1901_modernHe seems to be pretty receptive to feedback and fixing/adding stuff00:50
umarcor|2he is. he is astonishing fast and responsive.00:51
umarcor|2if you find some bug/issue, just provide a reproducible MWE or a link to a repo and he will fix it before you can even understand what's going on.00:51
cr1901_modernHah00:52
umarcor|2most of us understand problems post-morten XD00:52
umarcor|2we are lately thingking whether we can do anything in the VHDL community for finding some funding so he can devote some time to GHDL "officially"00:53
umarcor|2he works at CERN now, so it might be possible to handle it through his employer, similarly to KiCAD00:54
umarcor|2apart from the synthesis features, GHDL is the canonical implementation of the VHDL language00:56
cr1901_modernahh hmmm00:56
cr1901_modernI don't know VHDL or Ada... all my code for my current project (MachXO2 RE) is either Verilog or nmigen00:56
cr1901_modernI'm sure VHDL works fine for MachXO2 in principle, but I don't have the ability to test rn00:57
cr1901_modern(I guess I'll pull and try again tonight)00:57
umarcor|2VHDL and Ada are very annoying for dynamic/prototyping design, but very robust for critical applications. they are frustrating for users willing to do things too fast.00:58
umarcor|2anyway, it should work for any target where you can use Verilog + Yosys already. In fact, you can do mixed-language synthesis with GHDL + Yosys. No need to use Verilog only or VHDL only.00:58
umarcor|2I contributed some examples to the fomu-workshop, based on makefiles.00:59
umarcor|2you should be able to pick those and change very few things for targeting the MachXO200:59
umarcor|2you have the same blink example in Verilog only, VHDL only, and all four possible combinations between them.01:00
cr1901_modernI'll take a look once symbiflow pnr is working- that is a bit overdue on my end (especially since nextpnr is now working)01:01
umarcor|2let me know if you have any issue with adapting the VHDL to the MachXO2. I guess that the components/modules (RGBA, PLL) might be different.01:01
umarcor|2with "symbiflow pnr" you mean VTR?01:01
cr1901_modernyes01:01
cr1901_modernLattice has VHDL primitive instantiations in its manual for MachXO2... only one I have working right now (besides the minimum to, you know, actually route signals) is OSCH01:02
umarcor|2VTR is the next tool in my list for hdl/containers and MSYS2, after I add iverilog and cocotb to containers.01:02
umarcor|2we asked Lattice about those primitives some months ago through twitter and linkedin. we didn't get any feedback :(01:03
cr1901_modernOooooh, okay I think I know what you're referring to...01:04
umarcor|2I would like to add them to hdl/constraints.01:04
cr1901_modernLattice deliberately doesn't give out the instantiations for some of the primitives01:05
cr1901_modernyou have to use a GUI tool to generate them01:05
cr1901_modernI have a script that generates like 50 different instantiations of e.g. the PLL or EFB primitives to figure out how to instantiate them01:05
umarcor|2yes. but even the ones that are available in Verilog and VHDL are not "open source".01:05
cr1901_modernMaking sim models for those are out of scope for me for now (though if mithro wants them, then I'll have to think about it lol)01:06
umarcor|2then, simulation models are also missing. I think that all of them are available in verilog, but we got multiple reports about simulation.01:06
umarcor|2note that mixed-language simulation with open source tools is possible but contrived01:07
cr1901_modernThe simulation primitives exist, I'm guessing they're encrypted. There's probably a crack for them, but I don't know it if there are. Also, I would get in trouble if I used it01:07
umarcor|2https://github.com/ghdl/ghdl/issues/711#issuecomment-44276197001:08
umarcor|2that's from 2018, related to ECP5, dunno if it changed since then (i don't think so)01:09
*** FFY00 has quit IRC01:16
cr1901_modernumarcor|2: Checked out master, this is what I get with "make test" http://ix.io/2PsB01:54
umarcor|2cr1901_modern: mcode backend does not work on 64 bits01:55
umarcor|2on windows 64 bits01:55
cr1901_modernwhat are my options?01:55
cr1901_modern(i.e. compile with different flags so the test suite passes?)01:56
umarcor|2I suggest LLVM on MINGW64, or mcode but on MINGW3201:56
umarcor|2In fact, if you are on MSYS2, do not build it. Just install it with pacman.01:56
umarcor|2pacman -S mingw-w64-x86_64-ghdl-llvm01:57
umarcor|2or01:57
umarcor|2pacman -S mingw-w64-i686-ghdl-mcode01:57
umarcor|2you can then call/use it from cmd/powershell01:57
cr1901_modernWell, I want to build it (in case I want to send patches upstream). I already have llvm installed from msys01:57
cr1901_modern2*01:57
* cr1901_modern takes a look at the PKGBUILD01:57
umarcor|2Then, let me find the recipe for you01:57
cr1901_modernor you can find it for me :P01:58
umarcor|2https://github.com/ghdl/ghdl/tree/master/scripts01:58
umarcor|2build deps: https://github.com/ghdl/ghdl/blob/master/.github/workflows/Test.yml#L226-L22801:58
umarcor|2build cmds: https://github.com/ghdl/ghdl/blob/master/.github/workflows/Test.yml#L242-L24301:59
umarcor|2alternatively, the recipe in MSYS2's repos will build both packages at the same time, but it will use a fixed version: https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-ghdl02:00
umarcor|2dependencies other than the toolchain are automatically installed by makepkg-mingw02:01
umarcor|2when the build is finished, you get a *.zst package, but the content is also available in subdir pkg. You can set envvar GHDL or GHDL_PREFIX for executing the testsuite in-place, without installing the package.02:02
cr1901_modernahhh cool02:02
cr1901_modernanyways apparently I need to pass --with-llvm-config to the configure script02:03
umarcor|2--with-llvm-config and --prefix and --enable-libghdl and --enable-synth02:04
cr1901_modernwait... does the test suite unconditionally try to test mcode backend, even on windows 64 bit?02:04
umarcor|2If you want to do synthesis, libghdl is required. ghdl-yosys-plugin (Yosys) depends on the shared lib, not on the CLI entrypoint.02:05
umarcor|2the testsuite does not try to test any specific version of GHDL. it uses the ghdl found through the PATH or the one you tell it through GHDL.02:05
cr1901_modernls02:06
cr1901_modernwhoops02:06
umarcor|2so, yes, if you execute the testsuite it will try regardless of the version/backend of GHDL02:06
umarcor|2in fact, the testsuite script accepts a list of names, because there are 6 different suites: https://github.com/ghdl/ghdl/tree/master/testsuite02:07
umarcor|2you might want to start with 'testsuite.sh sanity gna snyth'02:08
cr1901_modernhttp://ix.io/2PsI Oops02:08
cr1901_modern>mcode code generator02:08
umarcor|2remove config.status02:08
umarcor|2I bet you don't have a clean repo, and configure is not reconfiguring02:09
cr1901_modernYea something like that. Not a big deal, just thought it was funny02:09
umarcor|2I try to always build tools in a subdir, for preserving a clean root.02:10
cr1901_modernOh this is a dedicated build dir02:11
cr1901_modernI just didn't follow your directions properly lol02:11
umarcor|2it's not necessary. Tristan builds it in the root typically. But I try to pick the packager's hat.02:14
cr1901_modern undefined reference to `__gnat_last_chance_handler'02:15
cr1901_modernthat's a new error... progress :D02:15
cr1901_modernumarcor|2: Ever seen that one?02:18
umarcor|2hmmm02:18
cr1901_modernHmmm I forgot the -static flags... let's see if that helps02:19
umarcor|2when is it producing that error?02:19
cr1901_modern"make test"02:19
umarcor|2yes, the static should fix it02:20
*** FFY00 has joined #symbiflow02:22
cr1901_modernDoing a clean build w/ the static flags... if that doesn't work, I guess I'll file an issue02:23
cr1901_modernOkay, clean build w/ static flags fixed it02:26
cr1901_modernumarcor|2: Just for the record: "../ghdl/configure --prefix=/mingw64 --enable-libghdl --with-llvm-config" also works. But it needs to be a clean build. Looks like I was mixing the mcode and llvm build02:30
umarcor|2thanks for clarifying02:31
umarcor|2are you going to build Yosys with ghdl-yosys-plugin then?02:31
cr1901_modernyes, that's the next step02:32
cr1901_modernAfter I confirm that all works, I'm going to upgrade MSYS. And that should probably be the rest of my night :)02:32
umarcor|2that's slightly tricky because Yosys does not support dynamic modules on windows, you need to build the plugin as an embedded frontend02:33
cr1901_modern? Yosys supports plugins via libdl last I checked02:33
umarcor|2I suggest following the recipe in MSYS2's repo. let me find it for you02:33
cr1901_modernthey just don't work well02:33
cr1901_modernlmao02:33
umarcor|2https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-yosys/PKGBUILD02:34
umarcor|2note this patch in GHDL's recipe: https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-ghdl/PKGBUILD#L6402:34
umarcor|2the Yosys recipe depends on that libghdl.link being fixed02:34
* cr1901_modern takes this time to download the fomu samples so he has something to play with02:36
cr1901_modernhttps://github.com/im-tomu/fomu-workshop/blob/master/vhdl/sb_ice40_components.vhd Oh. I see what you mean now.02:38
cr1901_modernUhhh, yea I'll supply VHDL components once the Verilog ones are finalized02:38
cr1901_modern(for MachXO2)02:38
umarcor|2Yes. Just as a general remainder: most of the things I talk about are rather simple, almost stupid, compared to the complexity of other projects/tasks. That's because I focus on the obvious issues for experienced users but hard to understand for newcomers.02:40
cr1901_modernWell, before tonight I didn't have a working VHDL toolchain. Thanks to you, I do now.02:41
cr1901_modernI'm guessing over time I can work my way up to making integration w/ yosys more seamless02:41
cr1901_modernesp on Windoze02:41
umarcor|2That's the role I took in the community :D It's reassuring to see it works :D02:41
umarcor|2I'll be glad to help with testing on Win/MSYS2, and with packaging/upstreaming any additional tools you might come up with.02:42
*** citypw has joined #symbiflow02:43
cr1901_modernI have used a plugin w/ yosys before on Windoze. I'm going to see if I can remember how to do it before going the other route02:43
umarcor|2There is nextpnr-ice40 only for now. nextpnr-ecp5 works on 64 bits, but has issues for being built on 32 bits only. All other targets are to be added yet.02:43
cr1901_modernBuild the bbas on another machine and rsync them (with compression _on_) to your build machine02:44
umarcor|2Let me find the issues/discussions about plugins on Windows. I was told that, not something I found.02:44
cr1901_modernthis is what I do02:44
umarcor|2that works for "me" and "you", but not in MSYS2's CI02:44
umarcor|2the solution is to launch a 64 bit shell from the 32 bit build job, because the machine is 64 bit indeed02:45
umarcor|2but bbas are built with python, and there is a conflict between python dlls when doing that ugly call02:45
umarcor|2https://github.com/msys2/MINGW-packages/pull/756802:45
umarcor|2WRT Yosys plugins on Win: https://github.com/YosysHQ/fpga-toolchain/issues/58 and https://github.com/YosysHQ/fpga-toolchain/issues/4#issuecomment-62280805802:47
umarcor|2See also https://github.com/YosysHQ/yosys/issues/147702:48
cr1901_modernOkay yea, I can't seem to build even the sample plugin. If worst comes to worst I'll compile it into yosys, but would rather play around a bit tonight02:52
cr1901_modernBesides, it gives me an excuse to hold off upgrading :P02:52
umarcor|2That sounds as some interesting plan!02:55
umarcor|2In fact, the only reason for ghdl-yosys-plugin to support being built as part of Yosys is because of Windows. Otherwise, we would only support using it as a shared lib.02:56
cr1901_modernumarcor|2: Ack. I'm going to be concentrating for a while, since this is stuff I haven't dealt w/ in a while lol03:02
cr1901_modernbut I'll see what I can do03:02
umarcor|2I'll quit for today. Just ping me if I can help ;)03:03
cr1901_modernwill do03:03
*** join_subline has joined #symbiflow03:12
*** ym has joined #symbiflow03:15
*** Degi_ has joined #symbiflow03:48
*** Degi has quit IRC03:49
*** Degi_ is now known as Degi03:49
*** ym has quit IRC04:25
*** craigo has joined #symbiflow04:40
*** citypw has quit IRC04:53
cr1901_modernumarcor|2: So after playing w/ this for 2 hours and creating some samples, I've concluded that kvide's approach is the correct thing to do.05:02
*** futarisIRCcloud has joined #symbiflow05:18
*** cr1901_modern has quit IRC05:19
*** yeti has quit IRC05:21
*** yeti has joined #symbiflow05:23
*** yeti has quit IRC05:25
*** yeti has joined #symbiflow05:26
*** cr1901_modern has joined #symbiflow05:44
*** FFY00 has quit IRC06:41
*** citypw has joined #symbiflow06:43
*** infinite_recursi has joined #symbiflow06:56
*** ByteLawd has joined #symbiflow07:14
*** futarisIRCcloud has quit IRC07:28
*** hansfbaier has joined #symbiflow08:51
*** citypw has quit IRC10:21
*** citypw has joined #symbiflow10:33
*** hansfbaier has quit IRC10:43
*** hansfbaier has joined #symbiflow10:45
*** craigo has quit IRC11:04
*** Amrit_Raj has joined #symbiflow11:13
*** Amrit_Raj has quit IRC11:14
*** hansfbaier has quit IRC13:39
*** citypw has quit IRC13:45
*** infinite_recursi has joined #symbiflow13:58
*** citypw has joined #symbiflow13:59
infinite_recursiThere's following code in olimex demo files13:59
infinite_recursiassign vga_clk = clk_div[1];// 25Mhz clock = 100Mhz divided by 2-bit counter13:59
infinite_recursiHow does this work? Shouldn't this be 50Mhz?13:59
infinite_recursireg[1:0]clk_div14:00
infinite_recursiIf the signal is going from 2 bit to 1 bit or from 4 counts to 2 counts, clock should be halved right?!14:01
*** FFY00 has joined #symbiflow14:03
*** infinite_recursi has quit IRC14:16
*** ym has joined #symbiflow14:27
*** infinite_recursi has joined #symbiflow15:36
*** infinite_recursi has quit IRC15:58
*** futarisIRCcloud has joined #symbiflow16:13
-_whitenotifier-5- [python-fpga-interchange] ajelinski opened issue #19: Problems with rapidyaml requirement - https://git.io/JtXRk16:14
litghostDennisC: There are not currently Mac OS packages, so the errors you are running into are not suprising16:25
*** citypw has quit IRC16:58
nickoelitghost: But can't coanda build them if no binaries are available?17:30
litghostconda-build exists, but it isn't something that conda will do17:30
nickoebruh, how do I make a simple counter in migen that runs at a lower rate than the syclock?18:36
*** ym has quit IRC18:58
nickoehmm, this is not the way to do it.. https://dpaste.com/GD4RULQ8E19:02
tpbTitle: dpaste: GD4RULQ8E (at dpaste.com)19:02
nickoeOk, I got some working. Now I wonder how I can a constane be a register value instead.19:41
nickoeright..   .storage19:42
*** maartenBE has quit IRC19:46
*** maartenBE has joined #symbiflow19:48
nickoeor maybe not..19:49
*** Jay_jayjay has joined #symbiflow21:23
*** Jay_jayjay has quit IRC22:11
*** Jay_jayjay has joined #symbiflow22:40
*** Jay_jayjay has quit IRC23:17
*** flying_turtle has left #symbiflow23:24

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