Thursday, 2020-07-02

*** tpb has joined #litex00:00
*** lf has quit IRC00:01
*** lf has joined #litex00:01
*** gregdavill has quit IRC01:07
*** kgugala has joined #litex01:10
*** kgugala_ has joined #litex01:47
*** Degi has quit IRC01:48
*** kgugala has quit IRC01:50
*** Degi has joined #litex01:50
*** jaseg has quit IRC02:12
*** jaseg has joined #litex02:14
*** tcal has quit IRC03:17
*** tcal has joined #litex03:30
*** atommann has joined #litex03:31
*** atommann has joined #litex03:50
*** atommann has quit IRC03:56
*** atommann has joined #litex04:11
benh_florent_: so I grabbed one of those Acorn CLE-215+, gosh that fan noise is annoying ! :-)04:23
benh_florent_: I'll get the jtag sorted and will probably use it for playing with Microwatt+LiteX... do you guys have SW to put on  the host side of the PCIe ?04:23
benhI want to take out that fan but that means I also want to monitor the temperature :)04:24
benhdo you know of a way to figure out if it's a speed grade 2 or 3 other than removing the heatsink ?04:25
*** kgugala has joined #litex05:10
futarisIRCcloudAlmost all the CLE-215+ are speed grade 2. If you want speed grade 3, the CLE-101 might be...  I don't think anyone has checked those.05:11
*** kgugala_ has quit IRC05:12
*** st-gourichon-fid has joined #litex05:30
_florent_benh: there is a simple driver to access simple periperals and operate the DMA06:34
_florent_benh: you can get the driver and generate the header for it by adding --driver argument to the target06:36
_florent_https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/acorn_cle_215.py#L806:36
tpbTitle: litex-boards/acorn_cle_215.py at master · litex-hub/litex-boards · GitHub (at github.com)06:36
_florent_benh: i just created two issues for things that should be easy for a software person :):06:37
_florent_https://github.com/enjoy-digital/litepcie/issues/3406:37
tpbTitle: Allow MMAP access to BAR0 without loading kernel driver · Issue #34 · enjoy-digital/litepcie · GitHub (at github.com)06:37
_florent_https://github.com/enjoy-digital/litepcie/issues/3506:37
tpbTitle: Create /dev/ttyX device on Host to access crossover UART when kernel driver is loaded · Issue #35 · enjoy-digital/litepcie · GitHub (at github.com)06:37
_florent_I haven't really looked at it yet, but that could ease using targets with PCIe06:38
_florent_aslo created: https://github.com/enjoy-digital/litepcie/issues/3606:41
tpbTitle: Check PCIe bus rescan after loading bitstream. · Issue #36 · enjoy-digital/litepcie · GitHub (at github.com)06:41
*** kgugala has quit IRC06:42
*** kgugala has joined #litex06:42
atommannHi _florent_, I tried to boot from a SDCard but failed.06:45
_florent_atommann: so you just tested the default kc705 support in linux-litex-vexriscv?06:46
atommannI just read the discussion between pdp7 and somlo (IRC log on 2020-03-27), seems that some specific type of SD card must be used.06:47
atommannYes, I didn't use the pre-built binaries. I used the generated files.06:48
atommannDo I need to use some special recipes?06:49
_florent_atommann: we currently only support SDCard >= version 2.006:49
_florent_atommann: can you share your bitstream, i have a kc705 near me and could test06:49
atommannOK. soon I'll email it to you.06:51
_florent_ok thanks06:51
atommannsent07:05
atommannOh, I guess the problem is my SD card is below version 2.0.07:08
atommannNow I go out to grab an adapter to try the "HC" ones.07:09
*** kgugala_ has joined #litex07:13
*** kgugala has quit IRC07:15
_florent_atommann: thanks for your bistream, i tested it with 2 SDCard and it was working. There are still probably corner cases we need to catch with SDCard boot, so it's possible if you have issues with SDCards that should be supported (>=version2.0), please fill an issue.07:31
*** scanakci has quit IRC07:46
benh_florent_: heh ok... I was looking at acorn*.py and couldn't quite figure out how the uart is hooked up ... I'll dig again tonight or tomorrow08:01
benhI assume you have two uarts register sets, one litex "core" side and one pcie side with fifos in between ?08:02
_florent_benh: yes exactly, that's what is done when using the crossover uart, we create 2 UARTs: one for the CPU, one for us and both are interconnected08:28
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/uart.py#L381-L39708:29
tpbTitle: litex/uart.py at master · enjoy-digital/litex · GitHub (at github.com)08:29
jasegHey there, I'm having some trouble getting the etherbone bridge to work on nexys video (xc7a200t w/ RGMMII GbE). I got TFTP bootloading to work with no trouble at all.08:44
jasegWhen the host probes the device over UDP the device only sometimes responds. This response always looks garbled: The UDP packet's headers look alright but the content is some random byte repeated (like 00 00 00 00 or 4f 4f 4f 4f ) and there is always 8 more bytes in the packet than idicated in the UDP header.08:45
jasegIs there some tutorial/doc on etherbone w/ RGMII? I've only been able to find some code examples but I'm still a bit unclear on e.g. what clocking the phy/udp/etherbone cores expect.08:46
jasegI'm using the liteeth/litex master branches and the spinalhdl openocd fork as described in https://github.com/timvideos/litex-buildenv/wiki/Debugging08:47
tpbTitle: Debugging · timvideos/litex-buildenv Wiki · GitHub (at github.com)08:47
_florent_jaseg: are you able to ping the board correctly?08:51
jaseg_florent_: yes, it responds to pings but the ICMP echo replies contain only null bytes and also contain 8 extra bytes at the end08:55
_florent_jaseg: also with the default integration, you need to use a sys_clk > 125MHz for the etherbone bridge to work at 1Gbps08:55
_florent_jaseg: if you clock is below that, you can set clock_domain to "sys" here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L118008:57
tpbTitle: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)08:57
_florent_sorry i should add some assertions on that and improve integration08:58
*** TMM has joined #litex08:58
TMMhi08:58
TMMfutarisIRCcloud: I made it! :)08:59
_florent_TMM: hi09:02
atommannHi _florent_, I went to get a 4G SDHC card and it just boots! so cool.09:03
atommannAnd it's pretty fast.09:05
_florent_atommann: great, it's still using SPI-mode on the KC705, but i'm working on SD-mode that will increase speed a bit :): https://twitter.com/enjoy_digital/status/127612449764981965009:05
atommann_florent_, Do you think the "wifi-SD card idea" is doable?09:07
jaseg_florent_: that seems to be the problem. So if I instantiate it with add_etherbone(phy=..., clock_domain='sys') it should work with only a 100Mhz sys clock? In that case, where do the 125MHz come from? Is that derived from the RGMII's clock or do I have to supply it from the system PLL?09:07
atommannbut netboot is also convenient while testing Linux driver and other stuff.09:08
*** atommann has quit IRC09:11
_florent_jaseg: when setting clock_domain="sys", the ethcore will run in eth_tx clock domain (so at 125MHz) and the clock domain crossing will be done in the Etherbone core09:11
*** atommann has joined #litex09:11
jaseg_florent_: that was the problem, it's working now. Thank you for the help!09:13
_florent_jaseg: great!09:14
_florent_i will improve this to avoid this problem09:15
_florent_atommann: wifi SD cards  could probably work yes, but i never tested such cards09:16
_florent_atommann: but netboot will probably be easier/faster09:16
atommannOK. I'll buy a card and try out.09:17
_florent_wifi SD cards would be interesting with boards that don't have Ethernet09:17
_florent_with FT254 FIFO we also have interesting upload speed (600KB/s)09:18
_florent_with a UART baudrate of 3Mbauds it's 250KB/s09:19
_florent_with ValentyUSB it's around 160KB/s09:19
_florent_so that's already acceptable for the size of the binaries we currently have09:19
TMMOh, this looks like an interesting project!09:21
zyphow come ValentyUSB is so slow?09:22
TMMHas anyone had any luck symbiflow and litex?09:22
_florent_zyp: haven't really looked, i just used it09:24
_florent_TMM: the arty target can be build with symbiflow09:25
_florent_build/built09:25
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/boards/targets/arty.py09:25
tpbTitle: litex/arty.py at master · enjoy-digital/litex · GitHub (at github.com)09:25
_florent_./arty.py --toolchain=symbiflow --build09:26
_florent_you can find more info here: https://github.com/enjoy-digital/litex/blob/master/litex/boards/targets/arty.py09:26
tpbTitle: litex/arty.py at master · enjoy-digital/litex · GitHub (at github.com)09:26
_florent_and here: https://github.com/enjoy-digital/litex/issues/55409:26
tpbTitle: improve Symbiflow/Arty support · Issue #554 · enjoy-digital/litex · GitHub (at github.com)09:26
TMM_florent_: ah, cool!09:28
TMM_florent_: I know next to nothing about fpgas though, is the arty board a good starting point?09:31
_florent_TMM: yes that's really a nice board, probably the one i use the most09:34
TMM_florent_: not that it is immediately very important for my project, but what kind of risc-v speeds can be achieved on that board?09:35
_florent_we run the CPU at 100MHz generally, but 125MHz also works09:40
_florent_jaseg: i just removed the clock_domain parameter from add_etherbone and made the ethcore always run in eth_tx clock domain: https://github.com/enjoy-digital/litex/commit/23a95bea1d40b35708be7237ef580ac18b9e5b9f09:41
tpbTitle: integration/soc/etherbone: always run ethcore in eth_tx clock domain … · enjoy-digital/litex@23a95be · GitHub (at github.com)09:41
TMM100MHz is enough for my purposes. :)09:41
TMMBasically my goal is to build a computer from chips, I've done it before with 8bit micros. I've built some 6502 and z80 computers and some weird multi-processor things. I want to build something now that could theoretically be at least a little useful. My original plan was to use 68k processors but those aren't really available anymore. I've also looked into some power chips. Someone suggested I look at risc-v but the asics for sale are all highly09:45
TMMintegrated SoCs which I don't really want. Plopping a single chip on a board doesn't really seem very challenging as a project. So I was thinking maybe prototyping a cpu and some peripherals in an fpga then, en later designing a board with several of those fpgas on it, some dram slots and headers etc.09:45
TMMDoes that sound like something that could at least in theory work? The alternative would be I guess to buy some NXP power cores and build a board. There's not a lot else out there now that's not a soc with integrated everything09:45
TMMI think integrated dram controllers and pcie is ok. The alternative would probably be some power cpus with a not-really-optional northbridge which is effectively the same anyway09:46
_florent_interesting, LiteX could provide you a good framework for that to integrate the different cores in different FPGAs (SoCs) and make them communicate09:50
jaseg_florent_: thanks, that sounds like a good solution.09:56
zypTMM, the problem is that once you plop down a fpga for the cpu, it gets kinda hard to justify doing stuff outside the fpga that would be easier to just put in the fpga next to the cpu09:56
TMMzyp: that's probably true, maybe if I set my goals to be higher than can fit on a single fpga? I want to make a computer that's a bit more like an Amiga than say a PC, that is I want to have a bunch of kind of specialized 'chips' to do things rather than have a lot of 'raw cpu' power. (There's no need for this computer to be particularly practical, I want it to be fun to use and program)10:00
zypanything that can fit in two fpgas can also fit in one larger fpga :)10:01
zypup until the fpgas don't get larger, but you've run out of money well before then10:02
TMMright, but I guess a constraint may be that symbiflow won't support the very biggest ones? :)10:03
zypI don't think you need a particularly big FPGA to fit the full feature set of an Amiga10:04
*** atommann has quit IRC10:04
*** atommann has joined #litex10:05
atommannHi _florent_, how can I mount the SD card? (can not see the /dev/sd* device)10:08
TMMzyp: well, the goal isn't to make an amiga clone but I understand your point. It's probable that the stuff I'm actually able to design will fit in a moderately sized fpga by itself10:09
daveshahNo idea how Litex does it but do you have a /dev/mmcblk* device?10:09
daveshahThat is what Linux uses for real SD/MMC ports10:09
atommannno, can't see any /dev/mmc* device.10:10
benhfutarisIRCcloud: ok. is there a way to check other than removing the heatsink ?10:23
_florent_atommann: sorry we need to update the kernel build in linux-on-litex-vexriscv to enable SD/MMC in Linux: https://github.com/litex-hub/linux-on-litex-vexriscv/issues/13910:25
tpbTitle: Kernel panic when enabling spisdcard · Issue #139 · litex-hub/linux-on-litex-vexriscv · GitHub (at github.com)10:25
_florent_probably just a configuration issue, but i haven't been able to look at it yet10:26
atommannThanks.10:29
benhTMM: there are enough Amiga clones out there already :-)10:47
benhI bought a minimig  board a few years back ... in order to turn it into a Mac+ :-) That was my first real experience tackling fpgas (verilog back then)10:47
somloatommann: if you're using spi-mode sdcard, this kernel: https://github.com/litex-hub/linux/tree/litex-rocket-rebase works for me, with this DT setting: https://github.com/gsomlo/riscv-pk/blob/gls-litex-devel/machine/litex_rocket.dts#L11010:53
tpbTitle: GitHub - litex-hub/linux at litex-rocket-rebase (at github.com)10:53
somlo(kernel should be backward-compatible with 32-bit CPUs like vexriscv, even though it says "rocket" :)10:54
*** ambro718 has joined #litex10:55
somlofor proper SD-mode (litesdcard), I still have to replicate _forent_'s latest update on twitter, before trying the antmicro litex_mmc driver (and tweaking it until it works in linux)10:57
atommannHi somlo, thanks, I'll try.10:58
somlo_florent_, what was the trellisboard command line you used to build the bitstream for that litesdcard boot demo on twitter?11:07
atommannThe "wifi sd card method" is not possible, I asked two suppliers, they only supports one-way transferring.11:48
*** CarlFK has quit IRC11:49
somloatommann: having never heard of a "wifi sd card" before today, I had to look it up :) Appears to be a thing that acts as a regular SD card (over the SD card pins), but also allows being *read* over wifi (even while mounted as an SD card)11:55
somloI guess the part where it's read-only over wifi is what makes it unhelpful as a workaround for the lack of other networking options on, e.g., an fpga dev board11:56
atommannThese wifi sd cards are designed for old cameras.12:01
atommannI am checking if Toshiba FlashAir cards support upload function.12:02
futarisIRCcloudwifi sd cards are generally an ARM system that also supports a sd device.12:04
futarisIRCcloudbenh: from the thread on eevblog, it seems that you can't find speed grade from inside the FPGA.12:05
atommannit's possible with FlashAir, people use it with 3D printers.12:10
atommannhttps://blog.prusaprinters.org/easy-wireless-printing-with-flashair-sd-cards_8603/12:10
tpbTitle: How to set up wireless printing with Toshiba FlashAir SD cards - Prusa Printers (at blog.prusaprinters.org)12:10
futarisIRCcloudFT245 gives reasonable speed considering USB Full-Speed is only 12Mbps12:12
*** CarlFK has joined #litex12:12
pdp7atommann:12:54
pdp7oops12:54
pdp7atommann: i have tried recently but i want to12:55
pdp7i bought a 4GB and 8Gb, 16GB and 64GB12:55
pdp7i hope one will work :)12:55
pdp7_florent_: is there a list of suggested cards to buy?12:55
pdp7i just grabbed some one from amazon.de but in the hopes one would work12:55
somloatommann, pdp7, _florent_: litesdcard *used* to be picky about which cards it would work with a while back (when pdp7 and I had that conversation). Then, around the time of commit 5cc7a988, I was able to use all my cards with both spi-mode and litesdcard12:59
atommannThanks for this message.13:01
somloeven *more* recent changes to litesdcard broke it completely for me (on all models of sd card, whether they used to work with the old version or not) but afaik _florent_ isn't done updating litesdcard yet, so I assume all (most) recent sdcards will end up working OK :)13:01
atommannIt's good to know :)13:03
somloatommann: as of right now, spi-mode is rock solid, but the linux spi-mmc driver adds a LOT of overhead, so it's much slower in linux than on bare-metal13:04
*** kgugala has joined #litex13:10
*** kgugala has quit IRC13:11
*** kgugala has joined #litex13:12
*** kgugala_ has quit IRC13:13
*** kgugala has quit IRC13:20
*** kgugala has joined #litex13:20
pdp7thanks13:27
*** Skip has joined #litex13:42
_florent_somlo: i'm testing LiteSDCard with https://github.com/litex-hub/linux-on-litex-vexriscv14:18
tpbTitle: GitHub - litex-hub/linux-on-litex-vexriscv: Linux on LiteX-VexRiscv (at github.com)14:18
_florent_./make.py --board=trellisboard --build --load14:19
*** peepsalot has quit IRC14:23
*** peepsalot has joined #litex14:25
somlo_florent_: oh, I'll have to figure out how to extract a "standard" litex build command from that14:29
somloone obvious candidate for what's different from what I've been doing is probably the csr-data-width... Let me try with 8, see if I can get something wiggling that way14:30
*** tcal has quit IRC15:08
*** tcal_ has joined #litex15:08
*** Swimming1ode has joined #litex15:09
*** tcal_ has quit IRC15:12
*** y2kbugger_ has joined #litex15:14
*** SwimmingCode has quit IRC15:14
*** keesj has quit IRC15:14
*** Degi has quit IRC15:14
*** y2kbugger has quit IRC15:14
*** y2kbugger_ is now known as y2kbugger15:14
*** captain_morgan0 has joined #litex15:14
*** captain_morgan has quit IRC15:15
*** captain_morgan0 is now known as captain_morgan15:15
*** Degi has joined #litex15:15
*** npcomp has quit IRC15:15
*** npcomp has joined #litex15:16
*** keesj has joined #litex15:19
_florent_somlo: i could sent you the next bitstream i test if you want, just to see if you reproduce my results with your different sdcards15:21
*** _whitelogger has quit IRC15:29
*** _whitelogger has joined #litex15:34
somlo_florent_:ok, please do that, thanks! -- btw, I built linux-on-litex-vexriscv bitstreams for both trellisboard and nexys4ddr but when I push it to the board with openocd (I skipped the "--load" part), I get garbage on the terminal15:58
somlois the linux-on-litex-vexriscv using a different terminal baud rate (i.e., not 115200)?16:02
_florent_somlo: the baudrate is 100000016:15
somlooh, with that baud rate I can boot the nexys4ddr bitstream and load a boot.bin blob (it's the wrong blob, since it's a rocket bbl+kernel payload, but load it I can)16:17
somlonow, I need to figure out what else is different (besides the baud rate) between a bitstream built within linux-on-litex-vexriscv and a "proper" upstream-litex one16:18
_florent_somlo: i will also look at this, i'm using linux-on-litex-vexriscv because it's convenient to see if the images are loaded correctly (linux booting), but the default targets should also work16:23
*** atommann has quit IRC16:30
_florent_somlo: --csr-data-width=32 makes the default target work16:35
somlo_florent_: I've been using --csr-data-width=32 all along (unsuccessfully). What's the full command line you used for the default target?16:42
_florent_./trellisboard.py --with-sdcard --integrated-rom-size=0x10000  --csr-data-width=32 --build --load16:43
somlothanks, trying that now...16:46
somlo_florent_ -- I'll have to dig into it a bit more systematically, since for me, using that command (without the --load part, which I'm doing manually via openocd), it still hangs18:25
somloprobably some weird thing I'm doing wrong, but looks like I will have to figure it out the "maximum effort" route :D18:26
*** scanakci has joined #litex19:05
*** Skip has quit IRC19:15
TMMI think I'm going to go the FPGA route, I think it'll be fun to implement some custom instructions for my little machine, and it seems that that should all be at least achievable with litex :)19:58
TMMI'll see how I'm going to fashion a 'computer' out of it later I suppose. Building the OS and monitor thing I was planning to do is probably going to be the hard part19:59
somloTMM: LiteX is (in its most general form) a 'computer' -- you get a wishbone bus, with a choice of CPUs as the master, and a choice of peripherals (ethernet, sdcard, uart, etc, etc.) as slaves. It's possible to use some of the peripherals as standalone IP blocks, or to connect a new CPU to drive the "computer", or to connect additional (non-LiteX) IP blocks to the wishbone bus20:17
somloso if you bring your own CPU, you'll get a LiteX computer with a new cpu model (in addition to what's already supported)20:18
somlooh, and AXI is also supported in addition to WB, so if your CPU or peripherals already have an AXI interface and no WB, you can connect them as well20:19
TMMNice21:23
*** npcomp has quit IRC21:38
*** npcomp has joined #litex21:55
*** kgugala has quit IRC23:28
*** kgugala has joined #litex23:39
*** kgugala has quit IRC23:58

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