*** tpb has joined #litex | 00:00 | |
*** Degi_ has joined #litex | 00:14 | |
*** Degi has quit IRC | 00:17 | |
*** Degi_ is now known as Degi | 00:17 | |
*** HoloIRCUser has joined #litex | 01:43 | |
*** HoloIRCUser1 has quit IRC | 01:46 | |
*** Skip has quit IRC | 02:07 | |
*** HoloIRCUser1 has joined #litex | 04:14 | |
*** HoloIRCUser has quit IRC | 04: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 #litex | 06:47 | |
*** HoloIRCUser1 has quit IRC | 06:50 | |
*** HoloIRCUser1 has joined #litex | 07:23 | |
*** HoloIRCUser has quit IRC | 07:25 | |
*** futarisIRCcloud has quit IRC | 08:02 | |
*** FFY00 has quit IRC | 08:31 | |
*** FFY00 has joined #litex | 08:31 | |
*** FFY00 has quit IRC | 08:34 | |
*** FFY00 has joined #litex | 08:35 | |
*** CarlFK has quit IRC | 08:41 | |
*** FFY00 has quit IRC | 10:08 | |
*** CarlFK has joined #litex | 10:08 | |
*** FFY00 has joined #litex | 10:11 | |
*** CarlFK has quit IRC | 13:33 | |
*** Skip has joined #litex | 14:02 | |
*** HoloIRCUser has joined #litex | 17:15 | |
*** HoloIRCUser1 has quit IRC | 17:18 | |
*** key2 has quit IRC | 17:29 | |
*** key2 has joined #litex | 17: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 simulation | 18: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#L3466 | 18:11 |
tpb | Title: linux/spi.c at master · torvalds/linux · GitHub (at github.com) | 18:11 |
*** HoloIRCUser1 has joined #litex | 18:14 | |
*** Skip has quit IRC | 18:14 | |
*** CarlFK has joined #litex | 18:15 | |
*** Skip has joined #litex | 18:16 | |
*** HoloIRCUser has quit IRC | 18:18 | |
*** gojimmypi has quit IRC | 18:45 | |
*** Skip has quit IRC | 18: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 that | 19:05 |
john_k[m] | magic, many thanks | 19:06 |
*** FFY00 has quit IRC | 20:08 | |
*** FFY00 has joined #litex | 20:09 | |
*** CarlFK has quit IRC | 20:10 | |
somlo | _florent_: do you know if anyone (successfully) uses 16 or 32 bpw with SPI and Linux? | 20:26 |
somlo | I 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 |
somlo | but 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 16 | 20:27 |
somlo | and 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 |
somlo | so 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 |
somlo | and 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 |
tpb | Title: 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 transfer | 21:18 |
_florent_ | with the length field: https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/spi.py#L129 | 21:19 |
tpb | Title: litex/spi.py at master · enjoy-digital/litex · GitHub (at github.com) | 21:19 |
*** FFY00 has quit IRC | 21:20 | |
*** FFY00 has joined #litex | 21:21 | |
somlo | I 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#L1305 | 21:25 |
tpb | Title: linux/mmc_spi.c at master · torvalds/linux · GitHub (at github.com) | 21:25 |
somlo | but 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 |
somlo | hmmm... 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 |
somlo | also, 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#L1156 | 21:48 |
tpb | Title: 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't | 21:49 |
*** CarlFK has joined #litex | 22:03 | |
*** spacekookie has quit IRC | 23:08 | |
*** spacekookie has joined #litex | 23:08 | |
*** CarlFK has quit IRC | 23:30 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!