Tuesday, 2020-08-04

*** tpb has joined #litex00:00
*** _whitelogger has quit IRC00:33
*** _whitelogger has joined #litex00:35
*** Degi has quit IRC00:42
*** Degi has joined #litex00:44
*** CarlFK has quit IRC01:54
*** jaseg has quit IRC02:19
*** jaseg has joined #litex02:21
*** MyGreenBalloon has joined #litex04:45
*** kgugala_ has joined #litex04:56
*** kgugala has quit IRC04:59
*** MyGreenBalloon has quit IRC05:52
*** wizzy has quit IRC06:04
*** kgugala_ has quit IRC06:38
*** kgugala has joined #litex06:38
*** m4ssi has joined #litex06:40
*** _whitelogger has quit IRC06:54
*** _whitelogger has joined #litex06:56
*** jeanthom has joined #litex06:57
*** kgugala_ has joined #litex07:07
*** kgugala has quit IRC07:09
*** jeanthom has quit IRC07:42
_florent_somlo: thanks for looking at this, i merged you PR and fix the tests to specify wishbone address width when required08:00
*** simeon[m] has quit IRC09:00
*** jeanthom has joined #litex09:00
*** kgugala_ has quit IRC09:17
*** kgugala has joined #litex09:17
*** jeanthom has quit IRC09:30
pepijndevosWhat do the EV_* registers on UART do? Trying to implement a flush operation.10:05
*** CarlFK has joined #litex10:22
*** kgugala has quit IRC10:26
*** kgugala has joined #litex10:26
somlo_florent_: thanks -- being relatively new to python, I got blindsided by the default parameter value thing, and the overriding theeof :)11:00
_florent_pepijndevos: these registers are related to the interrupts11:17
pepijndevosSo... is there a way to tell if the txqueue is *empty*?11:18
_florent_pepijndevos: looking at https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/libbase/uart.c#L28-L52 should give you some insights11:18
tpbTitle: litex/uart.c at master · enjoy-digital/litex · GitHub (at github.com)11:18
pepijndevoslooking...11:18
_florent_in fact no, you can only know if TX is full, not empty, but that's something we could add if you really need it11:21
pepijndevoshttps://docs.rs/embedded-hal/0.2.4/embedded_hal/serial/trait.Write.html has a flush method, which is basically waiting for tx to be empty, right?11:23
tpbTitle: embedded_hal::serial::Write - Rustembedded-hal 0.2.4 - Docs.rs (at docs.rs)11:23
_florent_pepijndevos: it seems it's now possible :) https://github.com/enjoy-digital/litex/commit/e0f131a317b93f212d3739905aef8a0d603164bf11:51
tpbTitle: cores/uart: add txempty/rxfull CSRs. · enjoy-digital/litex@e0f131a · GitHub (at github.com)11:51
pepijndevos_florent_, haha amazing thank you11:52
somlo_florent_: I got LiteSDCard working fine with rocket on the trellisboard (built-in slot, no pmod) by further lowering SDCARD_CLK_FREQ to 15MHz (admittedly, sys_clk on the trellisboard was 60MHz, rather than 75 like on nexys4ddr)14:51
*** m4ssi has quit IRC16:32
*** FFY00 has quit IRC16:33
*** FFY00 has joined #litex16:33
*** MyGreenBalloon has joined #litex16:41
_florent_somlo: the throttling mechanism should be in place and seems to behave correctly on hardware, could you do a test on your side?17:23
somlo_florent_: will start a build right away, thanks!17:35
somlo_florent_: do we also want to put the sdcard frequency back up to 50MHz?17:36
somlowith the throttling in place, I mean?17:36
_florent_somlo: ah yes, i did that locally but forgot to push17:36
_florent_can you try at 50MHzN17:37
_florent_?17:37
somlowill do17:37
_florent_or at least with a speed that was not working correctly before throttling17:37
somlobuilding (nexys4ddr and trellisboard) with 50...17:38
somlowhile we wait for that, what do you think of https://github.com/enjoy-digital/litex/commit/70eae5cbf9faf9df5832f39cae455087aceed7b7#commitcomment-4118576117:39
tpbTitle: interconnect/wishbone: increase WB address width to 31 · enjoy-digital/litex@70eae5c · GitHub (at github.com)17:39
somloI'd rather not add parameters to each cpu's core.py __init__() method -- it'd be nicer if we could detect the extra address width closer to where the interface is created...17:40
_florent_yes sure, i'm looking at this, i want to revert the default adr_width to 30 and just specify when needed for the dma17:42
somlobasically, the add_slave call here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L848 has the authoritative width information17:43
tpbTitle: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)17:43
somloand it passes it on to the call to add_adapter here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L37717:43
tpbTitle: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)17:43
somloso if we passed the width through that chain and made it available here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L291 maybe we could avoid touching the Interface() defaults in wishbone.py altogether17:44
tpbTitle: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)17:44
somloI want to try that as soon as the sdcard throttling builds are done, see if it's enough to get rocket working with reverted wishbone width changes17:45
_florent_somlo: i reverted the default adr_width to 30 and added this: https://github.com/enjoy-digital/litex/commit/b1008b01642c12c8f9d2253372f027ebd659b9e517:57
tpbTitle: integration/soc: add expection on decoder when full address space is … · enjoy-digital/litex@b1008b0 · GitHub (at github.com)17:57
_florent_i haven't tested on hardware, but i think it should work17:58
_florent_could you try this with Rocket/DMA?17:58
_florent_somlo: possible this will not be enough, if not i'll have a look tomorrow18:07
somlo_florent_: I'll try it on hardware as soon as the other (throttling) build (which is still in progress) completes :)18:08
somlob1008b01 looks a bit cryptic, but will force me to take another tour of the sources to understand it, which is not altogether a bad thing :)18:09
somlo_florent_: got a file read error about 1/3 the way through loading boot.bin from sdcard on the nexys4ddr18:14
*** MyGreenBalloon has quit IRC18:19
pepijndevosdisasm[m], thanks for all the help along the way, I wrote a blog post about my project: http://pepijndevos.nl/2020/08/04/a-rust-hal-for-your-litex-fpga-soc.html18:38
tpbTitle: A Rust HAL for your LiteX FPGA SoC - Wishful Coding (at pepijndevos.nl)18:38
pepijndevosand also thanks to _florent_ :)))18:39
pepijndevosesden you may also find it interesting, I based it loosely on your icebreaker examples, but focused more on implementing HAL traits so you can reuse libraries18:43
disasm[m]I don't really like extensive use of macros in hals for reasons, but this is quite a good experiment :)18:47
levi@pepijndevos Nice writeup! I will be following along that path at some point, as I've got a pile of Spartan 6 boards with gigabit ethernet that I want to do RiscV+Rust on.18:49
somlo_florent_: back down at 25MHz, and with b1008b01, vivado is happy to compile a nexys4ddr bitstream (the reverted wb addr. width enlargement was to stop vivado from erroring out)18:51
somloand the bitstream works OK (at 25MHz liteSDcard clock)18:52
somloso it's just the sdcard clock vs. throttling that's still an issue...18:53
_florent_somlo: ok, that's already good if the DMA works19:19
_florent_somlo: i'll see if i can have another look tomorrow at the throttling mechanism, but otherwise we'll keep 25MHz for now, it does not make that much difference with the size of the binaries we are currently loading19:20
_florent_pepijndevos: nice, thanks for sharing19:26
pepijndevosdisasm[m], all ears to ways to avoid extensive macros in HALs... after some good sleep ;)19:55
pepijndevosEven the STM HAL is basically one giant macro and that's supposed to be a reference19:55
disasm[m]I'll try to make a PR, but in general we need a better approach for other parts too :)19:56
*** CarlFK has quit IRC19:57
disasm[m]pepijndevos: where can I get the `litex-pac` lib?20:04
disasm[m]Nevermind, I made my own21:22
*** trabucayre has quit IRC22:55
*** daddesio has quit IRC22:55
*** mntmn has quit IRC22:55
*** anuejn has quit IRC22:55
*** trabucayre has joined #litex22:57
*** mntmn has joined #litex22:57
*** daddesio has joined #litex22:57
*** anuejn has joined #litex22:57
*** lf has quit IRC23:22
*** lf has joined #litex23:22

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