Wednesday, 2020-02-26

*** tpb has joined #litex00:00
xobsacathla: only if you want to contribute!  Or make changes to it.  There are precompiled binaries in the `releases` section.00:39
*** rohitksingh has quit IRC01:34
*** CarlFK has quit IRC01:40
*** rohitksingh has joined #litex02:06
*** litex-questions has joined #litex03:52
litex-questionsHi, I have what I think are two quick CSR related questions.Is there a way to add CSR03:53
litex-questions1. Is there a way to add a CSR from the top-level module?03:53
litex-questions2. Is there a way to add CSRs from grandchildren of the top-level module?03:54
litex-questionsto be more precise, is there a way to add CSRStatus register for the top-level module (say the SoC). And for the second question, is there a way to add_csr from a submodule's submodule.03:56
*** CarlFK has joined #litex03:56
*** rohitksingh has quit IRC04:45
*** rohitksingh has joined #litex04:46
*** oter has joined #litex06:10
*** oter has quit IRC06:15
_florent_Hi litex-questions, for 1)currently, it's not possible to have the CSR directly in the top-level module, you can create a simple Module, AutoCSR in your top level, add it to the design:06:24
_florent_https://www.irccloud.com/pastebin/H37x3hvX/06:24
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)06:24
litex-questionsThanks _florent_06:26
_florent_For 2), it would be done like this:06:26
_florent_https://www.irccloud.com/pastebin/wBZAUEwK/06:27
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)06:27
_florent_but i would not recommend it since it will not be flexible since you need to know the name of the top_level module in the submodule06:28
litex-questionsYea, I basically did the same for both the cases. Was wondering if there was an easier way06:28
litex-questionsIf feels like chaining AutoCSRs is something that would be cool06:29
litex-questionsand useful06:30
_florent_It's already the case, but not in the top-level06:30
_florent_add_csr is only required for the module directly instantiated in the top-level06:31
litex-questionsso you are saying, if a top-level's submodule's submodule has an AutoCSR then it automatically gets added, when I call add_csr in the top module just for the top-module's submodule?06:32
_florent_yes exactly06:32
litex-questionsAnd what if the top-level's submodule is NOT an AutoCSR?06:32
_florent_For the auto-chaining to work, all Modules if the chain needs to be an AutoCSR06:35
litex-questionsmakes sense. Thanks _florent_06:35
awygleam i right that CSRs get converted into memory locations on whatever concrete bus the SoC ultimately uses?06:58
_florent_awygle: not sure it if answer the question, but the CSRs are collected and connected to a CSR Bus that is bridged/mapped to the main SoC bus07:13
awygleinteresting. can you say more about the "CSR Bus"? is that a custom litex bus protocol?07:13
_florent_That's a very simple bus, a bit similar to APB with limited control signals where reads/writes are expected to be done in 1 cycle. This has been introduced in Milkymist, then reused in MiSoC. The CSR bus in LiteX reusing the CSR Bus from MiSoC, we just made it more generic (to support various data width), added some controls signals (to know when the register is accessed in read) + CSR Fields to ease defining the07:21
_florent_mapping of the registers, describe it and allow automatic documentation.07:21
awyglei see07:26
awyglethank you for the information07:26
*** m4ssi has joined #litex07:46
*** CarlFK has quit IRC08:39
*** m4ssi has quit IRC08:43
*** m4ssi has joined #litex08:45
*** massi_ has joined #litex08:50
*** m4ssi has quit IRC08:50
*** massi_ has quit IRC08:54
*** m4ssi has joined #litex08:54
*** m4ssi has quit IRC08:58
*** m4ssi has joined #litex08:58
*** rohitksingh has quit IRC10:04
*** _whitelogger has quit IRC10:16
*** _whitelogger has joined #litex10:19
*** _whitelogger has quit IRC16:14
*** _whitelogger has joined #litex16:19
*** m4ssi has quit IRC17:20
*** rohitksingh has joined #litex19:14
sajattack[m]I've asked about ps/2 keyboard suggestions a couple times and haven't got any feedback, anyone have ideas on how best to go about implementing something like that?19:52
sajattack[m]my thoughts so far are to share the uart bus but I don't really know how practical that is19:53
sajattack[m]for a half-decent mister core I need video, sdcard and keyboard. I got video, sdcard is in progress it sounds like, and now I gotta figure out keyboard20:02
*** CarlFK has joined #litex20:26
_florent_sajattack[m]: you could  reuse a PS2 core and connect it to the UART RX20:28
_florent_it seems there was a  PS2 core in Milkymist: https://github.com/tmatsuya/milkymist-ml401/blob/master/cores/ps2/rtl/ps2.v20:28
tpbTitle: milkymist-ml401/ps2.v at master · tmatsuya/milkymist-ml401 · GitHub (at github.com)20:28
sajattack[m]ok cool20:30
john_k[m]sajattack: are you writing a mister core in litex?20:32
sajattack[m]I'm trying to get linux-on-litex running on mister20:32
john_k[m]Ahh cool20:32
_florent_You could create a wrapper around a PS2 core and add a source as a stream.Endpoint (valid/ready/data)20:32
_florent_this way, it will be very easy to connect to the UART20:33
sajattack[m]yeah that's kind of what I was thinking20:33
sajattack[m]_florent_: there are many ps2 cores out there, any reason you pointed out that one?20:33
_florent_sajattack[m]: another PS2 core could probably be used, i just pointed this one since Milkymist's code is minimal and working well20:39
sajattack[m]ok, and you suggest I wrap a verilog one, rather than write one in migen?20:41
_florent_sajattack[m]: you can write one in migen, that was just to use as a reference since i'm not aware of PS2 code in migen20:43
sajattack[m]ok20:43
*** rohitksingh has quit IRC21:03
sajattack[m]I'm pretty new to migen but I'm gonna try21:13
sajattack[m]first dumb question, is a signal more like a pin, wire, or reg?21:14
_florent_sajattack[m]: you can find useful information here: https://github.com/m-labs/migen/blob/master/migen/fhdl/structure.py#L30521:19
tpbTitle: migen/structure.py at master · m-labs/migen · GitHub (at github.com)21:19
sajattack[m]so it's like wire and reg combined, eh?21:21
_florent_yes21:21
sajattack[m]what's closest to `input`?21:22
sajattack[m]also signal?21:27
*** rohitksingh has joined #litex21:36
*** rohitksingh has quit IRC22:47
*** _whitelogger has quit IRC23:43
*** _whitelogger has joined #litex23:46

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