Tuesday, 2021-10-12

*** tpb <[email protected]> has joined #litex00:00
*** NotHet <[email protected]> has joined #litex00:17
*** lexano <lexano!~lexano@cpe00e06722f0e4-cm98524a70e35e.cpe.net.cable.rogers.com> has joined #litex00:24
*** lexano <lexano!~lexano@cpe00e06722f0e4-cm98524a70e35e.cpe.net.cable.rogers.com> has quit IRC (Remote host closed the connection)00:56
*** linear_cannon <[email protected]> has quit IRC (Quit: linear_cannon)01:37
*** linear_cannon <[email protected]> has joined #litex01:49
*** Degi_ <[email protected]> has joined #litex02:51
*** Degi <[email protected]> has quit IRC (Ping timeout: 252 seconds)02:53
*** Degi_ is now known as Degi02:53
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has quit IRC (Quit: Connection reset by peep)03:43
*** NotHet <[email protected]> has quit IRC (Ping timeout: 250 seconds)03:47
*** NotHet <[email protected]> has joined #litex03:55
*** NotHet <[email protected]> has quit IRC (Client Quit)03:55
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has joined #litex04:01
*** Guest7846 <[email protected]> has joined #litex04:13
Guest7846ERROR:SoCBusHandler:Region overlap between ethmac and csr:04:19
Guest7846ERROR:SoCBusHandler:Origin: 0x00000000, Size: 0x00002000, Mode: RW, Cached: False Linker: False04:19
Guest7846ERROR:SoCBusHandler:Origin: 0x00000000, Size: 0x00010000, Mode: RW, Cached: False Linker: False04:19
Guest7846Sorry .. Have any of you seen this error for cpu-type set to None?04:20
Guest7846This has just started to happen after I pulled the latest from Litex04:20
*** andresmanelli <andresmanelli!~andresman@2a01:cb19:8c36:4900:3822:311c:ffc8:8d2> has joined #litex06:08
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has quit IRC (*.net *.split)06:34
*** linear_cannon <[email protected]> has quit IRC (*.net *.split)06:34
*** zjason <[email protected]> has quit IRC (*.net *.split)06:34
*** shorne <[email protected]> has quit IRC (*.net *.split)06:34
*** tpw_rules <[email protected]> has quit IRC (*.net *.split)06:34
*** awordnot <awordnot!~awordnot@user/awordnot> has quit IRC (*.net *.split)06:34
*** RaYmAn <[email protected]> has quit IRC (*.net *.split)06:34
*** andresmanelli <andresmanelli!~andresman@2a01:cb19:8c36:4900:3822:311c:ffc8:8d2> has quit IRC (Ping timeout: 268 seconds)06:39
*** andresmanelli <[email protected]> has joined #litex06:47
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has joined #litex06:56
*** linear_cannon <[email protected]> has joined #litex06:56
*** zjason <[email protected]> has joined #litex06:56
*** shorne <[email protected]> has joined #litex06:56
*** tpw_rules <[email protected]> has joined #litex06:56
*** awordnot <awordnot!~awordnot@user/awordnot> has joined #litex06:56
*** RaYmAn <[email protected]> has joined #litex06:56
*** FabM <[email protected]> has joined #litex07:03
_florent_tnt: Great for the DDR4, I can double check the PCIe if you want.07:04
_florent_Guest7846: I just pushed a workaround for --cpu-type --with-ethernet with: https://github.com/enjoy-digital/litex/commit/a489dadfbc2a63cd6db48db6d0112f4a1845dff307:04
_florent_--cpu-type=None07:05
_florent_this case is a bit particular, I should spend some time improving it07:05
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)07:12
*** TMM_ <[email protected]> has joined #litex07:12
tnt_florent_: Yeah that'd be nice. I updated the platform/target files at https://people.osmocom.org/~tnt/stuff/adi/  07:18
tpbTitle: Index of /~tnt/stuff/adi/ (at people.osmocom.org)07:18
tntAlso using this over litepcie (I rebased it on top of master) https://github.com/ylm/litepcie/commit/c707b300d6c4aab366b0bd583f437b355c486e2707:19
_florent_tnt: to test it, you loaded the bitstream and did a reboot of the machine or just a PCIe rescan?07:26
tnt_florent_: I reloaded the bitstream, typed 'reboot' (which I guess is warm reboot, it's remote so can't do off/on cycle) and then looked in lspci when it was back up.07:29
tntHowever I'm not 100% sure there isn't something more fundamental wrong somewhere because I was never able to use the pcie clock as system clock ...07:29
_florent_tnt: A reboot of the machine with the bitstream loaded is fine, so yes this could be related to the clock07:31
_florent_tnt: is there an example design/bitstream with PCIe for this hardware? if so, this could be worth loading it and just see if you get something in lspci, just to verify the hardware07:39
_florent_hardware/setup07:40
tnt_florent_: couldn't find one :/  The ADI bitstream doesn't have it AFAICT.07:42
_florent_tnt: otherwise the LitePCIe integration seems fine07:52
tntCan you probe anything from the bios prompt ? Link state / attempts / ... whatever ?07:57
*** indy <[email protected]> has quit IRC (Remote host closed the connection)07:58
*** indy <[email protected]> has joined #litex07:59
_florent_there are some status registers: https://github.com/enjoy-digital/litepcie/blob/master/litepcie/phy/usppciephy.py#L27-L3208:12
_florent_but the support is not integrated in the BIOS, so you'll have to do manual mem_read08:13
_florent_the reason is that on most of the PCIe designs I use, there are no CPU :)08:13
tntHehe, yeah.08:21
tntI wonder if my issue could stem from the fact lanes 0-3 are on Quad 225 but the ref clock comes in on Quad 22408:22
_florent_It's possible to use a reference clock from another Quad, so if the design compiles fine it should be OK08:30
tntyeah, but that's the thing ... the commit above sets the options to use Quad 224 which is where the clock is but not the data lanes.08:37
_florent_tnt: can you check the final IO report to see if the Clock pins are still the one from the .xdc?08:41
tntI'll rebuild and double check the io report.08:43
*** ilia__s2 <[email protected]> has joined #litex09:10
*** ilia__s <[email protected]> has quit IRC (Ping timeout: 260 seconds)09:14
*** ilia__s2 is now known as ilia__s09:14
tntOk, so .. the clk signals was at the right place but the data was in quad 224 too which is wrong. I change the 224 to 225 in the .xci of litepcie and now io report shows clk in 224 and data in 225 which is good.09:30
tntThere was however some timing error in sys_clk ?!? (not sure why those appeared).09:31
tntTried the bitstream anyway and it did something ! ... not what I was hoping however : machine never rebooted.09:31
_florent_arf... Doing PCIe bringup on a remote machine is not the easiest path...09:34
leonsflorent: still debugging my SFP issue. can you confirm there's no extra steps required compared to getting a DAC working? 🙂10:23
DerekKozel[m]It's a big pain. Our student project has been 100% remote. I think we'd have proposed something a bit different if that had been obvious at the start.10:23
leonsOkay that's good to know. Yeah, I've inverted the tx_disable polarity already accidentally haha10:23
leonsMy other device does see power, but no carrier10:23
leonsDo you have any good idea on how to debug a missing/incorrect carrier? Maybe use an IBERT on another FPGA to see what's going on?10:23
tntPlot twist: The machine isn't crashed ... the network just isn't working. And lspci shows Xilinx device 9034.10:40
tntnew pcie devices ... enp4s0 became enp5s0 ...10:48
tntLnkSta:Speed 8GT/s (ok), Width x4 (ok)10:59
mntmnare the speedgrade_timings in litedram automatically selected? i mean, based on sth like (sys_clk_freq, "1:2")11:08
mntmn(or "1:4")11:08
mntmnhi _florent_ btw... i am quite comfortable with building my own bitfiles now11:09
mntmnalso i get the feeling that the factor "1:2" vs "1:4" is ignored when instantiating a ddr module11:12
_florent_tnt: Good :)11:14
_florent_so now you could  generate the drivers with: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/sqrl_acorn.py#L197-L19811:15
mntmnyeah when i set the sys_freq to 200mhz and the memory module's rate to "1:2" i still get > 32-bit @ 1600MT/s (CL-11 CWL-8)11:15
mntmnbut i would expect 800MT/s11:16
_florent_tnt: and test it with: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/sqrl_acorn.py#L13-L2411:16
tnt_florent_: yup, looking at the sw side now :)  Tx for the pointers.11:16
_florent_tnt: otherwise, if you are planning to use the DDR4 as I/Q sample buffers, I worked on DRAM based FIFOs last week that could be useful for this:11:21
_florent_https://twitter.com/enjoy_digital/status/144641165121384449611:21
_florent_This was not developed for SDR, but I'll problaby also use it on SDR designs in the future11:22
_florent_leons: You could eventually use LiteICLink to debug your SFP issue11:24
_florent_this will allow you to run PRBS tests between 2 FPGAs or between 2 SFP ports11:25
tnt_florent_: yeah, I saw that tweet and thought "Oh that's good timing, I might need that :D"11:25
_florent_leons: ex : https://twitter.com/enjoy_digital/status/133201236328182169811:26
_florent_leons: you would just need to adapt one of the LiteICLink test target: ex https://github.com/enjoy-digital/liteiclink/blob/master/bench/serdes/kcu105.py11:27
_florent_leons: and then use test_prbs.py: https://github.com/enjoy-digital/liteiclink/blob/master/bench/serdes/test_prbs.py11:28
_florent_mntmn: Hi, passing the speedgrade to the DRAM module is just useful to use the compute the internal timings, the speed shown in the BIOS is computed differently11:32
mntmnahh ok11:32
mntmn_florent_: what's a recommended way to include my locally changed litex board/target when building linux-on-litex-vexriscv? PYTHONPATH? (i.e. i want to be able to make changes to the board definition/config on the fly)11:37
_florent_mntmn: if litex-boards is installed in develop mode, you can directly modify the platform/target11:38
*** andresmanelli <[email protected]> has quit IRC (Read error: Connection reset by peer)11:38
_florent_mntmn: otherwise, you can copy the files locally and modify the import in linux-on-litex-vexriscv's make.py11:39
mntmn_florent_: ok, thanks11:51
tnt_florent_: https://pastebin.com/8HNCA1vC12:05
tpbTitle: root@ubuntu:/home/user/driver/user# ./litepcie_util infoFPGA identification: - Pastebin.com (at pastebin.com)12:05
*** stfn <[email protected]> has joined #litex12:07
stfndoes anyone know if it's possible to write to the NVCM of iCE40 using open source tools?12:09
tntIt's not.12:10
tntThere has been some work and some stuff documented but there isn't an end-to-end tested flow for that.12:10
stfnwould it be hard to reverse engineer?12:10
tntI think it's pretty much "known" ... but you'll probably still destroy a few parts working out the details and implementing it ...12:11
tntand ATM given stock ... I don't have a single part to waste12:11
leons_florent_: That looks indeed very interesting, thanks for the pointers!12:11
stfnI'll order 100 iCE40 they are dirt cheap12:12
stfnthen just change them out on a dev board if it doesn't work out :)12:14
tnt_florent_: I seem to have an endianness issue ...12:33
tntlitepcie_readl(fd, CSR_IDENTIFIER_MEM_BASE + 4*i) >> 2412:33
tntI had to add the `>> 24' to get the correct value.12:33
tntI'm assuming the dma_test has the same problem hence why it's not doing too well.12:34
*** stfn <[email protected]> has quit IRC (Ping timeout: 265 seconds)12:37
_florent_tnt: strange, can you verify that csr_data_width is set to 32 and that the data-width of your PHY matches the one in your target?13:11
tnt_florent_: I added assert self.csr_data_width == 32 and it sent through, so csr_data_width seems OK.  USPPCIEPHY is instanciated with data_width = 128   and litepcie/phy/xilinx_usp_gen3_x4/pcie_usp.xci MODELPARAM_VALUE.AXI4_DATA_WIDTH=128 if that's what you're asking.13:15
_florent_tnt: ok, this seems fine, is there anything specific with the Host?13:17
tntNo, it's a box standard PC. https://www.gigabyte.com/Motherboard/B560M-AORUS-ELITE-rev-10/  mother board with a i7-1170013:18
tpbTitle: B560M AORUS ELITE (rev. 1.0) Key Features | Motherboard - GIGABYTE Global (at www.gigabyte.com)13:18
tntboard is plugged in the x16 slot normally used for GPU.13:18
_florent_tnt: the issue is probably this: https://github.com/enjoy-digital/litepcie/blob/master/examples/xcu1525.py#L7613:33
*** lexano <lexano!~lexano@cpe00e06722f0e4-cm98524a70e35e.cpe.net.cable.rogers.com> has joined #litex13:33
_florent_tnt: the endianness does not seems to be configured correctly in LiteX-Boards for PCIe/Ultrascale13:34
_florent_I'm going to fix that13:35
tntyeah, atm I just do self.add_pcie(phy=self.pcie_phy, ndmas=1)13:35
*** Guest48 <[email protected]> has joined #litex13:35
tnt(since it's just a simple target for litex-board for now)13:35
_florent_if you want to test while I'm doing that, you can force endianness to "little" here: https://github.com/enjoy-digital/litepcie/blob/master/examples/xcu1525.py#L7613:35
_florent_sorry wrong ling13:36
_florent_link13:36
_florent_here: https://github.com/enjoy-digital/litepcie/blob/master/litepcie/core/endpoint.py#L1813:36
tntOk, trying that.13:37
_florent_tnt: This should be fixed with https://github.com/enjoy-digital/litepcie/commit/b428fd533103f055fe5fa176ce54578311b38b1e and https://github.com/enjoy-digital/litex/commit/5e3e78f7604ede526a6946b6ff4e601018f4fb4513:47
tnt_florent_: yeah, info returns the right string now and dma_test shows things :)  ( https://pastebin.com/YKdwAP9j   I assume the error on the first line is normal while bootstrapping )13:52
tpbTitle: $ ./litepcie_util dma_testDMA_SPEED(Gbps) TX_BUFFERS RX_BUFFERS DIFF ERRORS - Pastebin.com (at pastebin.com)13:52
_florent_tnt: yes, this looks fine now, good13:53
tnt\o/  13:53
tntI'll do a bit of cleanup but then I guess next step is going to be adding I2C / SPI cores so I can talk to the various chips on the board that need configuring. And then JESD.13:54
tntCan the memory training be run from the host through PCIe btw ?13:54
tnt(I mean, I know it theorically can. Just not sure if it's supported / if there are examples)13:55
_florent_if could be yes, but it's not supported currently14:00
_florent_For your system, I would probably use LitePCIe and LiteDRAM as standalone cores (with 2 instances of LiteDRAM, each with its CPU) and re-integrate this in a LiteX SoC14:01
_florent_This would use a bit more resources, but resources for the extra-CPUs, but resources almost come for free on these large devices14:02
_florent_this would simplify the top level SoC14:03
tntHow so ?14:06
tntI mean really I only need the CPU for the calibratio n... here it's nice for peek/poke through uart and see how stuff is running, but in the end, I don't even need the cpu to have access to the RAM (have it memory mapped).14:07
_florent_With LiteDRAM/LitePCIe, you can generate standalone core with litedram/litepcie_gen  and .yml configuration files14:11
_florent_ex for LiteDRAM: https://github.com/enjoy-digital/litedram/blob/master/examples/xcu1525.yml14:12
_florent_ex for LitePCIe: https://github.com/enjoy-digital/litepcie/blob/master/examples/kcu105.yml14:13
tntAh by "how so" I meant more "why do you think it's necessary / would help".14:13
_florent_With LiteDRAM, you can also disable the CPU and expose a Wishbone interface instead to do the calibration: https://github.com/enjoy-digital/litedram/blob/master/examples/xcu1525.yml#L1014:14
_florent_setting cpu to None14:14
_florent_that's what is used by the Microwatt team for example to avoid the extra CPU14:15
_florent_When the design becomes complex, using the standalone cores can help since increase decoupling (the main SoC is "just" integrating a PCIe core, 2 DRAM cores, a JESD cores with clear interfaces + extra peripherals/modules)14:17
_florent_but each developer will probably have different preferences on this14:19
_florent_For the extra-cpus, that's what is done heavily in Intel/Xilinx design embedding lots of soft cores CPU in IPs14:20
tntYeah, I think I'll have to see for myself when I start hitting something to have a better understanding.14:20
tntRight, I saw MIG is embedding a while microblaze ...14:20
tnt-while+whole14:20
_florent_I'm not saying we should do the same :) but with LiteX we can choose which CPU is the best for each usage, so for LiteDRAM, you could use a small CPU: serv or VexRiscv Minimal14:20
tntyup, SERV is what I was thinking :)14:21
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)14:43
*** TMM_ <[email protected]> has joined #litex14:43
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 245 seconds)15:28
Guest7846Hi All, I have been seeing this error since the latest pull from Litex: "ERROR:SoCBusHandler:Region overlap between ethmac and csr:"16:12
Guest7846Any idea what could be happening there?16:12
Guest7846I have looked around soc.py, but nothing seems obvious16:13
Guest7846INFO:SoCBusHandler:main_ram Region added at Origin: 0x40000000, Size: 0x40000000, Mode: RW, Cached: True Linker: False.16:14
Guest7846INFO:SoCBusHandler:main_ram added as Bus Slave.16:14
Guest7846INFO:SoCBusHandler:Allocating IO Region of size 0x00002000...16:14
Guest7846INFO:SoCBusHandler:ethmac Region allocated at Origin: 0x00000000, Size: 0x00002000, Mode: RW, Cached: False Linker: False.16:14
Guest7846INFO:SoCBusHandler:ethmac added as Bus Slave.16:14
Guest7846Looks like ethmac of kc705 is getting added at 0x000000.. for some reason16:15
_florent_Guest7846: This should be fixed with https://github.com/enjoy-digital/litex/commit/a489dadfbc2a63cd6db48db6d0112f4a1845dff316:31
_florent_Guest7846: If not, can you provide the command?16:31
leonsflorent: after many days of trying to get the optical SFP+ path working, the cause is finally identified: the SFP+ module was broken.16:45
leonsI would’ve never expected the literally only non-custom designed/programmed part of my project to be the culprit16:46
mntmn_florent_: got linux running. 16:47
_florent_leons: That's good you got it working, you probably learn new things during the process so the time was probably not completely lost... (at least that the way I try to see things when such things happen to me :))16:53
_florent_mntmn: That's great! If you want a faster boot, you should be able to netboot (with the images on the tftp server at 192.168.1.100 by default) or boot from the SDCard16:54
leonsThat’s certainly true. For one I learned that my devboard is a horrible piece of hardware and I did get to read through some specs in the process :)16:54
mntmn_florent_: ah good hint! i will set up netboot16:54
mntmnfunny that my computer with tftp has this ip already...16:54
_florent_mntmn: For the SDCard boot, I think last time we tried together the SDCard was probably not formated correctly16:55
_florent_or maybe you could try with another16:55
mntmn_florent_: ok i will try to add some debug statements to the sdcard loader16:55
mntmn_florent_: the sdcard works in linux16:55
mntmn(on the same device)16:55
_florent_the process is the same: copy the images to the SDCard and it should boot16:55
*** kgugala <[email protected]> has joined #litex16:58
mithro_florent_ / kgugala: There was a student from Princeton that was porting https://parallel.princeton.edu/papers/micro19-gao.pdf to work with LiteDRAM -- any idea what happened with that?16:59
kgugalahaven't heard from him for a while17:00
_florent_mithro: I also don't know, but IIRC Finde here could maybe have more info17:01
Findeit was Fei himself who was porting it17:06
Findeyou can contact him directly to ask17:06
Findeafaik he had something working but I don't remember the details17:06
*** lexano <lexano!~lexano@cpe00e06722f0e4-cm98524a70e35e.cpe.net.cable.rogers.com> has quit IRC (Remote host closed the connection)17:10
*** lexano <lexano!~lexano@cpe00e06722f0e4-cm98524a70e35e.cpe.net.cable.rogers.com> has joined #litex17:21
tntHow was pcie_support.v generated btw ? I can't see it in the output products of vivado when creating the  IP.18:42
_florent_tnt: it's one of the top level file  with some custom logic to translate the "new" protocol used by Xilinx on AXI-stream to standardized TLPs (that LitePCIe was already supporting)20:27
_florent_tnt: the main differences between 7-Series PCIe PHY and Ultrascale are:20:27
_florent_- different protocols on the AXI streams.20:28
_florent_- Separate streams for requests/completions on Ultrascale.20:29
*** lexano <lexano!~lexano@cpe00e06722f0e4-cm98524a70e35e.cpe.net.cable.rogers.com> has quit IRC (Remote host closed the connection)20:45
*** lexano <lexano!~lexano@cpe00e06722f0e4-cm98524a70e35e.cpe.net.cable.rogers.com> has joined #litex21:25
*** zjason` <zjason`[email protected]> has joined #litex21:49
*** Guest48 <[email protected]> has quit IRC (Ping timeout: 256 seconds)21:49
*** zjason <[email protected]> has quit IRC (Ping timeout: 252 seconds)21:51
*** andresmanelli <andresmanelli!~andresman@2a01:cb19:8c36:4900:3822:311c:ffc8:8d2> has joined #litex22:19
*** andresmanelli <andresmanelli!~andresman@2a01:cb19:8c36:4900:3822:311c:ffc8:8d2> has quit IRC ()22:26
*** Guest4888 <[email protected]> has joined #litex23:40
*** mc6808 <[email protected]> has joined #litex23:43
mc6808I'm having issues with litescope recently: I can do an immediate capture but if I try to use a trigger litescope_cli dies on an empty ethernet packet litex/litex/tools/remote/etherbone.py", line 306, in decode23:47
mc6808    header = list(ba[:etherbone_packet_header.length])23:47
mc6808TypeError: 'int' object is not subscriptable23:47
mc6808Anyone else have an experience like this? A few months ago litescope was extremely reliable for me but this started happening occasionally and now triggering is unusable. 23:48
mc6808FYI Not sure if this is just me for some reason? I'm using a ecpix5 board and there are some litescope timing warnings.23:49
mc6808Warning: Max frequency for clock '$glbnet$eth_clocks_rx$TRELLIS_IO_IN': 106.77 MHz (FAIL at 125.00 MHz)23:50

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