Monday, 2020-04-20

*** tpb has joined #litex00:00
*** Degi_ has joined #litex00:14
*** Degi has quit IRC00:17
*** Degi_ is now known as Degi00:17
*** HoloIRCUser has joined #litex01:43
*** HoloIRCUser1 has quit IRC01:46
*** Skip has quit IRC02:07
*** HoloIRCUser1 has joined #litex04:14
*** HoloIRCUser has quit IRC04:17
_florent_zyp: not sure we have numbers for LiteScope over Wishbone Bridge, but it's indeed a bit slow and there is a bottleneck that needs to be investigated. I could have a look, but using Etherbone will indeed be a lot faster.05:26
*** HoloIRCUser has joined #litex06:47
*** HoloIRCUser1 has quit IRC06:50
*** HoloIRCUser1 has joined #litex07:23
*** HoloIRCUser has quit IRC07:25
*** futarisIRCcloud has quit IRC08:02
*** FFY00 has quit IRC08:31
*** FFY00 has joined #litex08:31
*** FFY00 has quit IRC08:34
*** FFY00 has joined #litex08:35
*** CarlFK has quit IRC08:41
*** FFY00 has quit IRC10:08
*** CarlFK has joined #litex10:08
*** FFY00 has joined #litex10:11
*** CarlFK has quit IRC13:33
*** Skip has joined #litex14:02
*** HoloIRCUser has joined #litex17:15
*** HoloIRCUser1 has quit IRC17:18
*** key2 has quit IRC17:29
*** key2 has joined #litex17:30
john_k[m]trying to write my first module, and running into issues with tests - I'm trying to use the write() funciton of CSRStorage from my test, like `yield dut.bitbang.write(value)` but it's erroring out with "ValueError: ('Invalid simulator exec/eval request', <generator object CSRStorage.write at 0x7f7bb3186f90>)". Documentation for write suggests that it's meant to be used in simulation18:01
somlo_florent_: turns out, I don't have to worry about padding after all :) https://github.com/torvalds/linux/blob/master/drivers/spi/spi.c#L346618:11
tpbTitle: linux/spi.c at master · torvalds/linux · GitHub (at github.com)18:11
*** HoloIRCUser1 has joined #litex18:14
*** Skip has quit IRC18:14
*** CarlFK has joined #litex18:15
*** Skip has joined #litex18:16
*** HoloIRCUser has quit IRC18:18
*** gojimmypi has quit IRC18:45
*** Skip has quit IRC18:47
_florent_john_k[m]: your issue is probably that you have to use "yield from" and not "yield"19:04
john_k[m]florent: thanks will try that19:05
john_k[m]magic, many thanks19:06
*** FFY00 has quit IRC20:08
*** FFY00 has joined #litex20:09
*** CarlFK has quit IRC20:10
somlo_florent_: do you know if anyone (successfully) uses 16 or 32 bpw with SPI and Linux?20:26
somloI built LiteX with SPI data width 16 for the sdcard, and 1. the bios doesn't work anymore for booting (which is to be expected, as it's hardcoded for 8)20:27
somlobut 2. all the transfers linux tries to initiate are still only 8 bits, even though (via DT) I told the driver that the max. bpw is now 1620:27
somloand the result is that "it doesn't work" in Linux either (at least because I suspect LiteX is trying to send 16 bits, but linux only expects 8 at a time in the driver (it can't do mixed 8-bit MOSI with 16bit MISO)20:29
somloso I'm wondering if at this point it's realistic to expect it to work with 16 or 32 bits (whenever this happens, it tends to be because I missed something :)20:30
somlo_florent_: I guess the "impedance mismatch" comes from Linux assuming that a max-bpw allows falling back to a lower bpw value (e.g., if we support *up to* 16 we can *still* do 8-bit-at-a-time transmissions)21:04
somloand I somehow don't think that's how litespi works if one selects a data width greater than 8 for SPIMaster (https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/spi.py#L20)21:05
tpbTitle: litex/spi.py at master · enjoy-digital/litex · GitHub (at github.com)21:05
somlo... unless there's a way to tell the gateware that a given transfer is less than data_width, via the control register...21:15
_florent_somlo: yes you can program the length for each transfer21:18
_florent_with the length field: https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/spi.py#L12921:19
tpbTitle: litex/spi.py at master · enjoy-digital/litex · GitHub (at github.com)21:19
*** FFY00 has quit IRC21:20
*** FFY00 has joined #litex21:21
somloI wanted to test 16bit transfers, but that looks like it won't happen: https://github.com/torvalds/linux/blob/master/drivers/mmc/host/mmc_spi.c#L130521:25
tpbTitle: linux/mmc_spi.c at master · torvalds/linux · GitHub (at github.com)21:25
somlobut at least I can ensure the driver can handle fallback to lower bpw than the max. width of the gateware (which wasn't in the original linux-on-litex-vexriscv driver)21:25
somlohmmm... so I'm writing `8` to the MSB of the control register before starting each individual transfer (on a 16-bit wide litespi gateware), but no luck...21:47
somloalso, if I start with the working 8bit driver and data width, and only change 8 -> 16 here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L115621:48
tpbTitle: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)21:48
somlo... but leave the DT node set to 8bit max-bpw, it *should* work (since the driver will set the upper half of the control bit to 8), but still doesn't21:49
*** CarlFK has joined #litex22:03
*** spacekookie has quit IRC23:08
*** spacekookie has joined #litex23:08
*** CarlFK has quit IRC23:30

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