Tuesday, 2021-05-04

*** tpb has joined #litex00:00
*** Degi has quit IRC00:15
*** Degi has joined #litex00:16
*** jon_ has quit IRC00:21
somlojon_: the trellisboard is not available via *retail* -- the idea is you contract with a PCB manufacturer to have the design at https://github.com/gatecat/TrellisBoard custom made, so that's probably not what you want. If you want to stay on the Free/Libre side of things with ECP5, then the lambdaconcept ECPIX5 board (make sure it's the 85k version) is your best bet. They are occasionally sold out, so check back with them every week or two00:25
somlojon_: also, the latest, most up-to-date build instructions are at https://github.com/litex-hub/linux-on-litex-rocket (there should be a link to that on the cmu page, somewhere)00:26
somlooh crap, he quit... :)00:27
*** pftbest_ has joined #litex00:32
*** pftbest has quit IRC00:33
*** jon_ has joined #litex01:22
*** jon_ has quit IRC01:36
*** Bertl is now known as Bertl_zZ04:25
*** TMM has quit IRC04:41
*** TMM has joined #litex04:41
*** Melkhior has joined #litex06:11
nickoeHow can  I make the --load arg to the programmer use the running jtag connection of the litex_server? Having to stop it every time I need to load the bitstream is a bit tedious for me, I assume there is a way to make it use the litex_server.06:26
geertuMelkhior: feel free to complain to the people that removed hardware accelerated console support...06:48
Melkhior@geertu I can already guess the answer... "put up or shut up", and I don't have the time to maintain fbcon...08:53
Melkhiortoo bad, that was the one part of Linux where I had contributed (wrote an accelerated driver waaaaaaaaaay back to get a decent console in PPC Linux for my PowerMac 7500)08:54
Melkhioridly wondering whether you can expose some acceleration feature through fbdev that could be used in X1108:55
Melkhiorfirst I have to finish compiling X11 on my SoC :-)08:56
Melkhior@geertu In the 'weird idea' category ... ever thought if a M68K core (from the numerous recreation project for Atari/Amiga/Mac/...) could be integrated in Litex so we could get some NetBSD/68k with somewhat higher performance than the 'real thing' ? No idea whether any open FPGA softcore supports SMP though, which is kind of useful nowadays.09:04
Melkhior(I'd suggest SPARC but Columbia's ESP soft-SoC supports LEON in SMP already:-)  )09:04
zypSMP as in vexriscv-SMP?09:05
_florent_Melkhior: For the DMA, there is also some WishboneDMA modules that could be  easier to operate: https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/dma.py09:06
_florent_Also you don't need to do everything in the fabric, the DMA have optional CSRs to allow software control09:06
_florent_this way in the SoC you only have to connect the DMAReader.source to the DMAWriter.sink: ex: dma_reader.source.connect(dma_writer.sink)09:07
_florent_you can also provide default values for all or some of the CSRs (useful for example if you are always doing the accesses are fixed addresses, with fixed lengths, etc... ), in this case, the software intervention can be limited to enable th transfer09:09
_florent_This is used for example for in the VideoFramebuffer: https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/video.py#L605-L61309:10
_florent_The software then just has to enable the DMA: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/main.c#L168-L17409:11
Melkhior@zyp yes, as in having multiple cores:09:11
Melkhior(dolbeau)buildroot:~> lscpu09:11
MelkhiorArchitecture:        riscv3209:11
MelkhiorByte Order:          Little Endian09:11
MelkhiorCPU(s):              409:11
MelkhiorOn-line CPU(s) list: 0-309:11
MelkhiorThread(s) per core:  409:11
MelkhiorCore(s) per socket:  109:11
MelkhiorSocket(s):           109:11
MelkhiorL1d cache:           8 KiB09:11
MelkhiorL1i cache:           8 KiB09:11
_florent_Melkhior: BTW, Charles is working on a USB Host core and already got keyboard, mouse and usb stick working, this will be useful for the single board computer case  :)09:16
Melkhior_florent_ Thanks for the pointers; the goal was to be able to do rectangle/copy - write the (x,y) origin point, the (width, height) of the rectangle, and the (x',y') destination point in CSRs and then let the DMAs do the 'copy' (and if there's overlaps it gets complicated) . The address generators would use the CSRs value to generate two streams09:17
Melkhiorof addresses to feed to the two back-to-back DMAs. The driver would then just have to write in the CSRs (+ some 'start bit') when a copy is needed.09:17
MelkhiorMany moons ago it would have enabled the Linux console to have hardware scrolling...09:17
Melkhior_florent_ oh nice; but none of my boards have USB PHYs which is why I went with PS/209:18
MelkhiorOther might in the same case so maybe there's still some value there ?09:18
MelkhiorI ordered myself a splitter cable to see if I can get two PS/2 devices from the same PMod and add mouse support as well, if i ever find a PS/2 mouse09:18
Melkhiorbut indeed USB is probably the best way :-)09:19
_florent_Melkhior: OK I see for the DMA. The easier for that will probably then to use the WishboneDMAWriter/Reader without the CSRs, still connect them together, but have your own logic to generate the addresses/handle the software control09:20
geertuMelkhior: Of course I thought about that ;-) It's a pity the APOLLO CORE 68080 is not FLOSS09:22
zyp_florent_, the other day I did some litescope probing across my nmigen wrapper: https://paste.jvnv.net/view/flGJB09:24
tpbTitle: JVnV Pastebin View paste – Untitled (at paste.jvnv.net)09:24
cr1901_modernThe maintainers of 68k userland have gotten projects like Clang and Boost to compile in QEMU VMs09:24
Melkhior_florent_ As usual the issue will be software:-)09:24
MelkhiorI have a nice hw-accelerated AES-256-GCM in FPGA for my SPARCstation, and no good software support in NetBSD - OpenSSL doesn't use the kernel support for GCM (and is buggy for CTR, different interface), so I'm stuck with CBC (which is disabled by default in SSL); then I discovered SSH support is broken (SSL opens the driver device, then SSH closes09:24
Melkhiorall FD >= 3 ...)09:24
MelkhiorNow the hardware console is gone in Linux...09:24
geertuMelkhior: I used to have an accelerated X server on ATI RAGE II+, using the MMIO region exposed by atyfb09:26
Melkhior@geertu yes it seems most of the FLOSS cores are 68000 only, and you really want 68020+68851 or 68030 minimum09:27
Melkhior@geertu Xorg has become quite bloated, not sure if you can still use only very basic acceleration (and not need a full-fledged GL support:-(  )09:29
Melkhior@_florent_ BTW it's mixed with my other changes, but I will try to clean-up my patch to add cache information in the DTS (so lscpu see the VexRiscv caches as shown above)09:31
Melkhiorcr1901_modern Yes Qemu is often the right answer - pkgsrc on NetBSD/sparc is easier to deal with in emulation than on the real thing, mostly because I/O is much, much faster and you can have more memory09:35
geertuMelkhior: Indeed, the new qemu m68k has 3.2 GiB, my vexriscv on OrangeCrab has only 128 MiB ;-)09:50
Melkhior@geertu have you considered a VCU128 ? plenty of memory and you should be able to fit a lot of cores :-)09:56
Melkhiorhttps://www.xilinx.com/products/boards-and-kits/vcu128.html09:57
Melkhiorit's bit expensive though :->09:57
*** pftbest_ has quit IRC09:58
*** pftbest has joined #litex10:01
geertuMelkhior: Does it have a FLOSS FPGA toolchain?10:04
* geertu hasn't touched the de0nano and Quartus since the advent of Project IceStorm10:05
Melkhiorgeertu probably not... it's UltraScale+ so not even sure it fits in the '7-series' descriptot of project X-Ray10:06
Melkhiorand in any case it's probably not a primary (or secondary or tertiary...) target, $9k boards aren't easy to access...10:07
geertuMelkhior: Would be cool to implement a heterogenous vexriscv + openrisc + microwatt + lean, ... cluster ;-)10:10
geertus/lean/leon/10:10
Melkhior@geertu Not sure an OS would deal with that properly... but it could be fun to try :-)10:13
leonsMelkhior: yeah, SMP would for sure not work haha. But having a coprocessor of a different arch could be really cool (although probably impractical most of the time)10:15
Melkhioryes one could use a extra core as an accelerator for Linux's binfmt_misc10:18
geertuleons: There are plenty of SoCs with CPU cores of different archs10:20
geertuYou cannot run a single Linux OS on them, though.10:21
leonsgeertu: yeah, that's what I was trying to say10:34
_florent_zyp: nice, thanks for your efforts to simplify nMigen cores integration in LiteX, that will be very useful10:37
*** pftbest has quit IRC11:53
*** pftbest has joined #litex11:55
*** Bertl_zZ is now known as Bertl12:14
*** nats` has joined #litex13:00
Melkhior@_florent_ Just saw there was a Linux DRM driver for a "litex,litevideo" device ; but I don't see anything like that in litex_json2dts.py13:07
MelkhiorDo you know what it does? I think only reocnfigure the video output13:09
geertuMelkhior: simple-framebuffer?13:14
Melkhior@geertu you don't need that driver, and indeed in the DTS it's 'compatible ="simple-framebuffer"' (and works fine)13:15
geertuMelkhior: There's also a new simpledrm in the works, using13:16
geertusimple-framebuffer13:16
Melkhiorit seems the driver will only change timings and resolution13:16
Melkhior@geertu Could it use simple-acceleration as well ?13:16
Melkhior'some simple acceleration' I should say13:17
Melkhiorsomething that could give X11 a bit of boost for 'solid' and 'copy' at least...13:17
Melkhiornot that I have the time :-)13:18
Melkhiorthanks for the simpledrm hint, will look at it13:18
geertuMelkhior: https://lore.kernel.org/r/[email protected]13:27
tpbTitle: [PATCH v5 0/9] drm: Support simple-framebuffer devices and firmware fbs - Thomas Zimmermann (at lore.kernel.org)13:27
geertuMelkhior: The DT bindings do not declare anything w.r.t. acceleration ;-)13:27
Melkhior@geertu Thanks!13:34
Melkhior68030 but no MMU yet: https://download.experiment-s.de/Configware/releasenotes.txt13:34
MelkhiorAlso I don't see a license :-(13:34
shoraganMelkhior, on which FPGA do you have your 4 core vexriscv?13:36
*** jon_ has joined #litex13:37
Melkhior@shoraga Artix-7 100T, fit nicely even with full B and K support and a shared FPU for all 4 cores13:37
Melkhior~$90 Qmtech Wukong from aliexpress IIRC13:38
MelkhiorAdding some of P would probably limit to 2-3 cores only and cut down the frequency (my P stuff isn't very good, I just wanted a feel of the extension)13:38
Melkhior| Slice LUTs                 | 46518 |     0 |     63400 | 73.37 |13:39
Melkhior100 MHz with no issue, too slow for Gigabit Ethernet I think so I limit the switch to Fast and it's 100% reliable; micro-sd card running perfectly at 25 MHz (didn't move to the interrupt-enabled version yet)13:40
Melkhior@shoragan sorry for the typo13:40
Melkhiorthe only issue is that 256 MiB is not enough RAM :-)13:41
shoraganMelkhior, nice. I've trying it on a 85k ECP13:41
shoraganIX-5, but the bios only boots in the single core variant13:41
Melkhior... also I'm running with Vivado13:41
Melkhior@shoragan up-to-date linux-on-litex-vesriscv & litex should have no issue with basic SMP (I only added instructions, the SMP stuff is unchanged)13:42
Melkhiorif the cores fit in the FPGA it should run, but you need to double check that everything was built with the same version/configuration: the DTS/DTB, BIOS, OpenSBI, SMP support in Linux, ...13:43
shoragani had to generate _Wm variants: https://github.com/jluebbe/pythondata-cpu-vexriscv_smp/commit/450f42b43b268d241c952599e3b7dfa35c75325a13:44
shoraganso maybe something went wrong there13:44
shoragannot even the BIOS boots13:44
shoraganthe frequency and utilization is fine for the 2 core config13:45
Melkhiormmm, i use native mode not wishbone ; normally the toolchain can generate the appropriate core, but you need "sbt" installed otherwise it fails cryptically13:45
Melkhioris wishbone mode (_Wm) required on your system ?13:46
shoraganMelkhior, i'm not sure. https://github.com/litex-hub/linux-on-litex-vexriscv/commit/83f92358ccb2b49226a43f3e9f8539fe92f85263 sounds like that13:47
Melkhioryes I was looking at the make.py and it defaults to Wishbone on the Versa13:48
shoragani'm try to build it in OE, using meta-hdl. perhaps there's some issue with the toolchain for building the BIOS? but as the single-core variant works fine, i wouldn't think so13:48
Melkhioryou'll have to ask @_florent_ for that, I don't know13:49
Melkhior(the Wishbone stuff I mean)13:49
MelkhiorYes if the single-core variant works then it's likely the toolchain is fine...13:50
MelkhiorAnd if the BIOS fails it's not the DTS or kernel13:50
shoraganyes13:51
MelkhiorSorry I don't know :-(13:51
shoraganthanks anyway :)13:51
_florent_Melkhior: Regarding the litevideo linux driver, it was indeed required with the VideoOutput core from LiteVideo to configure the timings, but it's no longer required with the new simple VideoFramebuffer directly integrated in LiteX (that comes with timings pre-initialized). A driver would only be useful to update/change the timings.13:51
Melkhiorshoragan Maybe you can have a try w/o the wishbone to see if it reaches the BIOS, even if it's not stable enough for e.g. ? it would pinpoint the issue...13:52
Melkhior@_florent_ OK thanks, make sense ; indeed in my config I fix the timings in the 'target' based on the requested resolution13:53
shoraganMelkhior, ok. i thought there would be no chance of that working.13:53
Melkhior@shoragan I don't know either but it migth be worth a shot...13:53
MelkhiorHopefully you can get better help from others... I'm just a (happy) user of the SMP mode13:54
_florent_shoragan: you can indeed try to rebuild by commenting out: https://github.com/litex-hub/linux-on-litex-vexriscv/blob/master/make.py#L37613:54
shoragan_florent_, ok, i'll try that.13:54
_florent_This will remove the L2 cache/Wishbone path and will use direct LiteDRAM interface13:54
shoraganare there other "common" things to look out for if the bios doesn't boot? :)13:55
_florent_We had problems on some ECPIX-5 to use direct LiteDRAM interface so I reverted to Wishbone13:55
shoragan_florent_, which issues did you see that would be fixed with wishbone?13:55
_florent_errors during the DDR3 memtest13:56
shoraganah, ok. so i should see output even if i run into that specific issue?13:56
_florent_related to the use of DM when using direct LiteDRAM interface (with Wishbone, DM are not used)13:57
shoraganDM?13:57
_florent_DM = DDR3 Data Mask13:58
shoraganok13:58
shoragani tried to reduce the sys clock to 25 and 10 MHz, but i didn't see a difference13:59
Melkhior@shoragan I had issue at one point when my clock was too low https://github.com/litex-hub/litex-boards/issues/16614:02
Melkhiorthere has been improvement since in litedram, but you may need the speed to be 'high enough' for the DRAM to work14:03
_florent_shoragan: can you provide the build command you are using? I can try to build on my side and share it with you14:03
shoraganMelkhior, but in that case, you'd still have the initial output from the bios even in the bad case?14:03
Melkhioryes, the BIOS was still working in that case14:03
shoragan_florent_, i'm building using meta-hdl (updated to current litex, yosys, ... repos). basically it should be ./make.py --board ecpix5 --cpu-count 2 --build14:05
shoraganok, so I now have two things to try. build without wishbone and also build without meta-hdl14:07
_florent_shoragan: ok, I'll build it with this command line14:08
shoragan_florent_, do you think the _Wm variants will be needed for longer? then it may be useful to add those to the pythondata package to avoid the need for sbt?14:09
_florent_shoragan: on some boards, the data mask are grounded (ex SDS1104XE + ColorLight I5 IIRC) so this will be kept yes14:11
_florent_shoragan: I could try to add more config to the pythondata package14:11
shoraganthanks, that would also make it easier to use with meta-hdl, as running sbt in yocto doesn't work right at the moment14:12
_florent_shoragan: here is a bitstream I just generated with your command line and with l2_size commented out: https://github.com/litex-hub/linux-on-litex-vexriscv/files/6421906/lambdaconcept_ecpix5_cpu_count_2_litedram_2021_05_04.zip14:51
_florent_it works on my ECPIX-514:51
_florent_sorry I'm not able to generate default version now14:51
shoragan_florent_, yes, that works on mine as well.14:54
shoragan_florent_, this is with the manual change from Wishbone to litedram?14:55
_florent_so you can try to rebuild it and see if it also works with yours, if so, this could be an issue with cpu_count > 1 and the wishbone interface14:55
*** jon_ has quit IRC15:05
*** jon_ has joined #litex15:09
shoragan_florent_, ok. build without the l2_size line works for me15:11
cr1901_modern_florent_: Is there a way to completely override (not just append) to a build script before it's generated? The context is "Microwatt blows up the autonaming pass in yosys, and it probably shouldn't be done for now"15:18
shoragan_florent_, a mem_test 0x40000000 0x20000000 works fine15:20
*** SpaceCoaster has quit IRC15:51
*** SpaceCoaster has joined #litex15:52
*** jon_ has quit IRC16:15
acathlais it normal gdb doesn't stop on breakpoints I put and other strange behaviors on a vexriscv? Is it a minimal implementation of gdb?16:16
acathlaoh, no hardware breakpoints...16:19
tcalacathla: correct; you can rebuild VexRiscv setting the DebugPlugin's `hardwareBreakpointCount` to 2 or greater (don't use 1; there's a known issue that I don't think has been fixed).16:23
*** jon_ has joined #litex16:33
_florent_cr1901_modern: I don't think this is possible currently17:07
nickoeIn the litex_sim.py there is         self.submodules.crg = CRG(platform.request("sys_clk"))17:09
nickoecan I easily simulate the CRG generating different clock frequencies?17:09
*** rj has joined #litex17:27
*** rj has quit IRC17:50
*** rj has joined #litex17:55
*** sorear has quit IRC17:58
*** davidlattimore has quit IRC17:59
*** _florent_ has quit IRC18:01
*** davidlattimore has joined #litex18:01
*** sorear has joined #litex18:02
*** _florent_ has joined #litex18:03
*** rj has quit IRC18:34
*** rj has joined #litex18:37
*** pftbest has quit IRC18:52
*** kgugala_ has joined #litex18:57
*** kgugala has quit IRC19:00
*** kgugala has joined #litex19:10
*** pftbest has joined #litex19:12
*** kgugala_ has quit IRC19:13
*** kgugala_ has joined #litex19:14
*** kgugala has quit IRC19:15
*** kgugala has joined #litex19:15
*** rj has quit IRC19:17
*** pftbest has quit IRC19:17
*** kgugala_ has quit IRC19:18
*** rj has joined #litex19:22
*** kgugala_ has joined #litex19:23
*** kgugala__ has joined #litex19:26
*** kgugala_ has quit IRC19:26
*** kgugala has quit IRC19:27
*** kgugala__ has quit IRC19:37
*** kgugala has joined #litex19:37
*** jon_ has quit IRC19:48
*** pftbest has joined #litex19:54
*** pftbest has quit IRC19:58
*** rj has quit IRC20:02
*** rj has joined #litex20:07
*** pftbest has joined #litex20:13
*** jon_ has joined #litex20:45
*** rj has quit IRC20:46
*** TMM has quit IRC20:50
*** TMM has joined #litex20:50
*** rj has joined #litex20:51
*** rj has quit IRC21:29
*** rj has joined #litex21:33
*** jon_ has quit IRC21:39
*** pftbest has quit IRC22:03
*** pftbest has joined #litex22:13
*** rj has quit IRC22:13
*** rj has joined #litex22:19
*** kgugala has quit IRC22:20
*** jon_ has joined #litex22:32
*** pftbest has quit IRC22:52
*** pftbest has joined #litex22:53
*** jon_ has quit IRC22:54
*** rj has quit IRC22:59
*** rj has joined #litex23:03
*** jon_ has joined #litex23:07
*** lf has quit IRC23:14
*** lf has joined #litex23:14
*** rj has quit IRC23:38
*** rj has joined #litex23:38
*** rj has quit IRC23:43
*** rj has joined #litex23:44
*** pftbest has quit IRC23:44

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