RFC: LiteX CSR accessor methods

17 views
Skip to first unread message

Gabriel Somlo

unread,
Jan 10, 2020, 8:54:02 PM1/10/20
to linux...@googlegroups.com
Hi,

For the last several weeks I've been working on understanding
and documenting LiteX CSRs, both from an HDL implementation
perspective (https://github.com/enjoy-digital/litex/issues/314),
but mainly from a software programmer's point of view:

https://github.com/enjoy-digital/litex/pull/324

Since recently LiteX has started supporting CSR (sub)registers
of up to 32 bit data width, I wanted to make sure we have methods
to access them that work regardless of csr_data_width or address
space alignment (32 or 64 bits, matching the CPU native word size).

Ultimately, I'm hoping to see a Linux "litex-soc" bus driver that
provides similar register access functions to actual device drivers
like LiteETH, LiteSDCard, etc.

But first, I'd like to push a reference design into the LiteX BIOS
itself, in the form of PR 314 as linked above.

I just learned about this mailing list's existence (thanks @mithro!)
and figured it would be a great place to join the conversation :)

TIA for any feedback!

Best,
--Gabriel

PS. I'm interested in LiteX as an environment for hosting a
64-bit Rocket CPU on which to run Linux. I have busybox running in
an unmodified upstream Linux kernel (modulo the out-of-tree LiteETH
driver), and would like to stick with an upstream-first policy as
much as possible: http://www.contrib.andrew.cmu.edu/~somlo/BTCP/
Reply all
Reply to author
Forward
0 new messages