Tuesday, 2020-05-19

*** tpb has joined #litex00:00
*** oter has joined #litex00:42
*** oter_ has joined #litex00:42
oter_I'm trying to read the main_ram region from custom logic - Q: is the best way to do that by getting the wb slave signals from `soc.bus.slaves.get('main_ram')` and drive those, or should I use some other way to access the ram's wb slave? I'm worried that I need to do `crossbar.get_port(...)` on the ram (or cache) directly to avoid contention and that would be a little daunting ... Could find an example to template off of, unfortunately. Q:01:09
oter_ any pointers to example of direct L2 cache, or main_ram access from custom logic?01:09
CarlFKbunnie: p4 boots fine until I plug an  netv2, then this: https://matrix.org/_matrix/media/r0/download/matrix.org/pwdjcZallCIAMlpgDQAwPGhn01:36
CarlFKbut it was working a day ago.. maybe because I switched to ubuntu, but im not sure it has booted that yet01:36
CarlFKhuh.  boot pi, then plug in netv2, pi is fine.01:43
CarlFKswell.  boots debian fine, ubuntu.. wonky hardly gets out the door02:29
*** Degi has quit IRC03:16
*** Degi has joined #litex03:17
*** CarlFK has quit IRC04:47
*** CarlFK has joined #litex04:51
*** _whitelogger has quit IRC05:45
*** peeps has quit IRC05:47
*** _whitelogger has joined #litex05:47
*** peepsalot has joined #litex05:58
*** proteusguy has quit IRC06:12
*** proteusguy has joined #litex06:24
zypoter_, what are you trying to achieve?06:44
oter_Hi zyp, I have a module that reads/writes to UDP packets (based on LiteEthTTYRX/TX, not via CPU) and would like to access the DDR3 RAM on my versa_ecp5 board (again, not via code on the CPU). Ideally reading/writing 32 bit RAM values. Love that I can peek and poke via the wishbone-tool and use the LiteScope for debugging; but for the main task, I'm mostly trying to build a eth-connected accelerator and use the Lite* parts w/o code on the07:07
oter_ CPU (i.e. I love the UDP stack in HW!).07:07
oter_zyp, some of my access patterns are random access and for others I might be able to use the litedram DMA frontend.07:08
oter_Had great fun and learnt a lot following and adapting examples and diving deep using the LiteScope - ergo trying the same for main_ram access now.07:09
zypah, for litedram I believe you should be able to add another port that you can access07:12
_florent_oter_: for what you are trying to achieve you have two possibilities: 1) connect a module as a Wishbone master to the main bus of the SoC and make your UDP module do wishbone access to the main ram07:16
_florent_2) request a specific port to the DRAM controller with crossbar.get_port(...)07:16
_florent_If you are familiar with Wishbone, 1) should not be too complicated but for high perf it will not work since wishbone is slow and the main bus will be shared with the others peripherals07:17
zypif you want wishbone, can't you just use LiteDRAMWishbone2Native with option 2?07:18
_florent_for 2) once you request your port, you can create a DMA around it07:19
oter_OK, got it. Thanks to both of you! _florent_, I'll probably try (2) with the DMA frontend and fall back to (1) if I get stuck and learn as I go. Btw. great platform, so much fun to learn!07:19
_florent_with: https://github.com/enjoy-digital/litedram/blob/master/litedram/frontend/dma.py#L1907:19
tpbTitle: litedram/dma.py at master · enjoy-digital/litedram · GitHub (at github.com)07:19
_florent_or https://github.com/enjoy-digital/litedram/blob/master/litedram/frontend/dma.py#L14707:19
tpbTitle: litedram/dma.py at master · enjoy-digital/litedram · GitHub (at github.com)07:19
oter_tpd _lorent_ do I need to reach inside the DMA reader/write to poke into the _base/_length and _start signals (wrapped with the CSRs for the CPU/wb access) to setup the copying into/from the FIFOs?  If so, I guess, I can just reach inside those CSR .output signals?07:22
_florent_zyp: you can use LiteDRAMWishbone2Native too, but for low perf, it's easier to just connect to the main bus of the SoC07:22
*** pdp7 has quit IRC07:24
zypyeah, I just figured if you have a wishbone master, it'd give you a bit extra performance without a lot of extra work07:25
_florent_oter_: the DMA can be operated in 2 modes: without CSR, the user provide the address/data stream from the logic, with CSR the address stream is programmed by the CPU and automatically generated, the user logic only handles the data stream07:25
*** guan has quit IRC07:26
*** pdp7 has joined #litex07:27
*** guan has joined #litex07:28
oter__florent_ I see. For the "without CSR" mode, I'll just not call the add_csr and then drive it all via the sink of the reader (address record) or writer (address/data record), respectively, correct?07:30
_florent_oter_: exactly07:31
oter_awesome! I'll try that tomorrow (time for bed for me, here on the US West coast). This navigation help is gold! Thanks a ton07:32
_florent_oter_: if you need examples, you can probably look at frontend/fifo that is using both writer and reader: https://github.com/enjoy-digital/litedram/blob/master/litedram/frontend/fifo.py07:32
tpbTitle: litedram/fifo.py at master · enjoy-digital/litedram · GitHub (at github.com)07:32
oter_roger that _florent_ and tpb!07:33
sajattack[m]tpb is a bot07:34
oter_oh :-)07:34
*** futarisIRCcloud has quit IRC07:48
xobsHey, is anyone around to help me troubleshoot a Conda install? I'm trying to get the Valentyusb test suite working, but Conda is being difficult.09:12
xobsI just installed miniconda, but whenever I try to use it it just says "CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/current_repodata.json>`09:12
*** futarisIRCcloud has joined #litex09:56
*** _whitelogger has quit IRC13:00
*** _whitelogger has joined #litex13:02
*** Skip has joined #litex14:01
*** kgugala has joined #litex14:08
*** kgugala_ has quit IRC14:08
CarlFKxobs: still having trouble ?14:27
futarisIRCcloudhttps://twitter.com/shenki/status/1262738635356430342?s=1914:28
xobsYeah, I ended up giving up on it.14:28
xobsCarlFK: I did just download iverilog from the symbiflow conda repo, but I couldn't use sigrok-cli from there because it links against python3.7m.so and Ubuntu 20.04 ships python3.8. So I rebuilt sigrok from scratch.14:33
CarlFKI thought conda had it's own python binary14:35
xobsI think that's why it works when you use it with Conda. But conda couldn't update or install anything.15:08
somlo_florent_: somewhere in the last 24 hours I started getting "undefined reference to `busy_wait`" errors while building the (64-bit, Rocket) bios15:40
somloprobably something about the `-I` path in some makefile -- busywait is defined in `litex/soc/software/libbase/system.c`, and declared in `system.h` which is now replicated inside each CPU specific directory15:41
somlo_florent_: bisect says it's commit b4b84def (although I'm not seeing an obvious reason for e.g. libliteeth/udp.c to complain about an undefined reference to busy_wait following that particular patch)15:50
somlook, I think I entered some sort of git twilight-zone -- I tried to `git revert b4b84def -n`, then build (successfully made it past the place it crapped out earlier); then `git revert --abort`, and now the build works fine while everything is back to the way it was when it crashed (for dubious values of "everything"). I even nuked the whole litex repo, cloned it, fetched, sync-ed up with upstream, everything works fine now :)16:14
somlo_florent_: so, in conclusion, nevermind, latest git upstream is building fine, no idea why it wasn't, or why it is again, maybe I should just take a day off or something :D16:17
CarlFKsomlo: I don't suppose you are good at building https://github.com/timvideos/HDMI2USB-litex-firmware16:24
tpbTitle: GitHub - timvideos/HDMI2USB-litex-firmware: A version of the HDMI2USB firmware based around LiteX tools produced by @Enjoy-Digital (based on misoc+migen created by @M-Labs) (at github.com)16:24
CarlFKI am not, and I burn up hours trying, so I don't.  but there is a stupid off-by-1 error or something that is making me grumpy16:24
CarlFKhttps://github.com/timvideos/HDMI2USB-litex-firmware16:26
tpbTitle: GitHub - timvideos/HDMI2USB-litex-firmware: A version of the HDMI2USB firmware based around LiteX tools produced by @Enjoy-Digital (based on misoc+migen created by @M-Labs) (at github.com)16:26
somloCarlFK: never tried building h2u -- I've only worked with "stock" upstream litex so far16:33
somloand only used sdcard and ethernet peripherals -- text-mode serial uart console only, no usb, graphics, pci, or anything "fancy" like that :)16:35
CarlFKah well, I'll dig up a 2018 build that worked good enough16:39
CarlFKtrying to use this device to debug a ubuntu+pi+netv2 bugaboo16:39
somlo_florent_: re commit b4b84def -- I missed the change of build directory (from ./soc_basesoc_trellisboard to ./build/trellisboard/) which might explain the weirdness I was observing (and mistakenly blaming on git)16:53
somlonow that I'm cleaning ./build/trellisboard before rebuilding, I'm back to getting a compile error for the bios (libliteeth/udp.c thinks busy_wait is an undefined reference)16:54
_florent_somlo: not sure i tested with rocket, i'm going to try17:12
_florent_somlo: can you give me the command you are executing?17:14
somlorm -rf build/trellisboard; litex-boards/litex_boards/targets/trellisboard.py --yosys-nowidelut --csr-csv ./csr_trellisboard.csv --sys-clk-freq 60e6 --with-ethernet --with-spi-sdcard --csr-data-width 32 --cpu-type rocket --cpu-variant linuxq --build17:15
somloreverting b4b84def fixes it for me, although I completely fail to see why :)17:20
*** kgugala has quit IRC17:56
*** kgugala has joined #litex17:57
*** kgugala_ has joined #litex17:58
*** kgugala has quit IRC18:01
*** Skip has quit IRC18:06
*** kgugala has joined #litex18:52
*** kgugala_ has quit IRC18:54
somlo_florent_: it's a LD (not CC) error, so I'm guessing software/libbase/system.c isn't getting compiled (or linked) into bios.elf for some reason20:03
somloso there's a build/trellisboard/software/libbase/system.o, and it does contain a busy_wait function (checked with objdump)20:05
somloso I wonder if it's somehow not getting linked20:05
somlo_florent_: oh, I think I fixed it, it's really dumb, but apparently the order in which things are linked on the linker command line matters: https://pastebin.com/98DvHGkP20:17
tpbTitle: [Diff] diff --git a/litex/soc/software/bios/Makefile b/litex/soc/software/bios/Makefile - Pastebin.com (at pastebin.com)20:17
daveshahyeah, dependencies need to come after the things that use them, iirc20:18
somlosending PR :)20:18
somlohttps://github.com/enjoy-digital/litex/pull/53120:24
tpbTitle: software/bios: fix link order to avoid undefined symbol errors by gsomlo · Pull Request #531 · enjoy-digital/litex · GitHub (at github.com)20:24
*** darren099 has joined #litex21:54
benhIs Treillisboard something one can buy ? I'd like something ECP5 based for my work on Microwatt to complement my Arty22:05
*** darren099 has quit IRC22:13
*** CarlFK has quit IRC23:45

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