Wednesday, 2019-12-18

*** tpb has joined #litex00:00
*** _whitelogger has quit IRC00:24
*** _whitelogger has joined #litex00:27
*** rohitksingh has joined #litex00:36
*** scanakci has quit IRC05:04
*** CarlFK has joined #litex07:08
*** m4ssi has joined #litex08:07
keesjand i would read writew as write word (e.g. something that is dependent on the architecture but still I would in current days expect it to be at least 32 bits10:46
*** rohitksingh has quit IRC12:24
somlo_florent_: ok, then I'll go with csr_wr_u8, csr_wr_u16, etc.13:10
somloAnother silly question: is it ever worth dealing with cases where CSR_ALIGNMENT != sizeof(unsigned long) ?13:12
somloand by that I mean is there any reason to expect or support 64-bit CSR alignment on a 32-bit CPU?13:12
somloI'd vote "No" to keep things simple, but then I don't know what I don't know :)13:12
somlokeesj: https://en.wikipedia.org/wiki/Word_(computer_architecture)13:18
somlobut yeah, "word" is an overloaded term, I've heard it used as "xlen is the cpu word size, typically 32 or 64 bits"13:20
*** xobs has quit IRC13:23
*** synaption[m] has quit IRC13:24
*** bunnie[m] has quit IRC13:24
*** john_k[m] has quit IRC13:24
*** nrossi has quit IRC13:24
*** nrossi has joined #litex14:53
*** john_k[m] has joined #litex15:09
*** xobs has joined #litex15:09
*** bunnie[m] has joined #litex15:09
*** synaption[m] has joined #litex15:09
*** synaption[m] has quit IRC15:47
*** xobs has quit IRC15:47
*** nrossi has quit IRC15:47
*** bunnie[m] has quit IRC15:47
*** john_k[m] has quit IRC15:47
*** nrossi has joined #litex15:57
*** john_k[m] has joined #litex16:19
*** xobs has joined #litex16:19
*** synaption[m] has joined #litex16:19
*** bunnie[m] has joined #litex16:19
*** m4ssi has quit IRC16:21
_florent_somlo: for the CSR alignment,  i don't see usecases for that so also vote no :)17:25
_florent_somlo: great if you do the renaming on the csr functions17:26
somlo_florent_: I'm testing a patch, if it works will post a PR shortly17:26
somlo_florent_: I'd like the new litex/soc/software/include/hw/common.h to look something like this: https://pastebin.com/T5LgGxrS :)17:28
tpbTitle: [C] #ifndef __HW_COMMON_H #define __HW_COMMON_H #include /* To ove - Pastebin.com (at pastebin.com)17:28
_florent_that seems fine, thanks. Maybe just update line 7 with new csr_rd/wr names17:33
somlooh, yeah, will do :)17:34
somloI'm also working on the observation that, in practice, CSR subregisters are stored in native CPU endianness, but I can't pinpoint where in the migen code that's actually happening, so I'd like some help finding that out... Also, would be nice if I could figure out what exactly happens if there's no CPU specified -- what endianness would CSR subregister slices have then ?17:36
_florent_somlo: i'll have a look, sorry for not having done that yet17:42
somlo_florent_: thanks! if we end up updating common.h, I want to point at it for the CSR.md documentation's "software programmer's API" section, and this is the last bit of mystery I'm aware of (there's probably mysterious things I don't know about, but that's a whole different problem altogether :D )17:45
_florent_:) i'll try to find the explanation later today or tomorrow17:49
_florent_somlo: can you explain what you mean with "CSR subregisters are stored in native CPU endianness"? If i have csr_data_width=8, and a CSR of 32-bits, is it the order of the 4 subregisters, or the location of the 8-bit of the subregister in the 32-bit data?18:24
somlo_florent_: "CSR subregisters are stored in native cpu endianness" only has meaning for csr_data_width 16, 32, or 6418:43
somloi.e. if more than just one byte is stored in an aligned subregister18:44
somlo_florent_: https://github.com/litex-hub/linux-on-litex-vexriscv/pull/60#issuecomment-56331368318:45
tpbTitle: RFC: update liteeth driver to automatically calculate hwreg offsets by gsomlo · Pull Request #60 · litex-hub/linux-on-litex-vexriscv · GitHub (at github.com)18:45
somlolook at the table of results there, and for the difference between e.g. vexriscv and mor1kx at csr_data_width 16 or 3218:46
_florent_ok thanks18:46
somlo*across* subregisters, the lesser bits are stored at lesser addressed subregisters (big-endian *like*)18:47
somlobut I'm wondering *within* a subregister that's wider than 818:47
somlo_florent_: but actually even when csr_data_width is 8, a memory dump of a 32-bit aligned subregister on vexriscv is "ab 00 00 00" and on mor1kx the same one is "00 00 00 ab"19:13
somloso it *appears* subregisters are stored in native CPU endianness within their aligned xlen-sized "container"19:13
*** john_k[m] has left #litex19:48
*** john_k[m] has quit IRC19:48
*** rohitksingh has joined #litex20:01
*** rohitksingh has quit IRC20:12
*** rohitksingh has joined #litex20:13
*** rohitksingh has quit IRC20:33
*** CarlFK has quit IRC21:02
*** rohitksingh has joined #litex21:12
*** rohitksingh has quit IRC21:55
*** rohitksingh has joined #litex23:47

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!