Monday, 2021-01-25

*** tpb has joined #litex00:00
*** _florent_ has quit IRC00:17
*** sorear_ has joined #litex00:18
*** davidlattimore has quit IRC00:18
*** sorear has quit IRC00:18
*** sorear_ is now known as sorear00:18
*** futarisIRCcloud has quit IRC00:19
*** davidlattimore has joined #litex00:19
*** futarisIRCcloud has joined #litex00:20
*** _florent_ has joined #litex00:20
*** lf has quit IRC00:45
*** lf has joined #litex00:46
*** lkcl has quit IRC01:56
*** lkcl has joined #litex02:09
*** lkcl has quit IRC02:35
*** lkcl has joined #litex02:49
*** Bertl is now known as Bertl_zZ03:05
futarisIRCcloudlitex mentioned in Microwatt grows up at lca 2021. https://lca2021.linux.org.au/schedule/presentation/61/03:32
tpbTitle: linux.conf.au 2021 | Presentation: Microwatt grows up (at lca2021.linux.org.au)03:32
*** Degi_ has joined #litex03:49
*** Degi has quit IRC03:50
*** Degi_ is now known as Degi03:50
*** andrewb1999 has quit IRC04:05
*** andrewb1999 has joined #litex04:05
*** lkcl has quit IRC04:26
*** andrewb1999 has quit IRC04:30
*** lkcl has joined #litex04:58
*** lkcl has quit IRC05:16
*** lkcl has joined #litex05:30
*** indy has quit IRC06:45
*** _whitelogger has quit IRC06:51
*** _whitelogger has joined #litex06:53
*** lkcl has quit IRC07:04
*** lkcl has joined #litex07:16
*** indy has joined #litex08:45
*** hansfbaier has joined #litex09:01
*** lkcl has quit IRC10:13
_florent_futarisIRCcloud: Thanks, time flies!10:23
*** lkcl has joined #litex10:25
*** Bertl_zZ is now known as Bertl10:40
*** hansfbaier has quit IRC10:59
*** Zguig has joined #litex12:12
*** indy has quit IRC12:18
*** _franck_ has quit IRC12:18
*** _franck_ has joined #litex12:19
*** indy has joined #litex12:22
cr1901_modern_florent_: Wanna feel old? You've been running your company for as long as I've known how to use FPGAs (minus one year- I learned in early 2010)13:26
daveshahI started playing with FPGAs in 2015...13:32
zypI started playing with FPGAs in 2007, but I never progressed much from there, so I'm still a novice :)13:34
geertudaveshah: You used a very impressive learning curve ;-)13:34
cr1901_moderndaveshah: I fell out of love w/ them in 2012, but fell back "in love" with them in 2015. So that would be a 3 year gap where I didn't touch them lol13:35
*** feldim2425 has quit IRC13:45
*** feldim2425 has joined #litex13:50
*** Melkhior has joined #litex14:46
MelkhiorHello, I'm trying to get linux-on-rocket-litex to work on my board, but the memory fails (bus errors:  0/256 addr errors: 8192/8192  data errors: 524288/524288). A similar configuration with VexRiscV works fine. However VexRiscV is running at 100 MHz,with the memory at 800 MT/s. Rocket is running at 50 MHz with the memory at only 400 MT/s. Could14:51
Melkhiorthat be the reason ?14:51
*** andrewb1999 has joined #litex14:52
Melkhior(Artix 7, 35K, SoC barely fit but passes timing at 50 MHz, yet to try higher clock)14:52
daveshahYes, there have been problems with running litedram at reduced clocks in the past14:53
daveshahI thought they had been fixed but evidently not. Can you see if a 50MHz VexRiscv also fails?14:53
MelkhiorThanks. Any way to run the memory at more than 4x the CPU clock ?14:54
daveshahNot sure, I don't think it would be possible without some big changes but _florent_ is the one to comment there14:54
MelkhiorIIRC, never tried a slower VexRiscV. Will try to find the time to test that, it would help narrow the issue.14:55
daveshahyeah14:55
*** Melkhior has quit IRC15:16
*** Zguig has quit IRC15:17
*** Melkhior has joined #litex15:43
MelkhiorWith rocket at 66 MHz (and at 75 MHz but some minor negative slack so might not be relevant) memory fails as well.15:49
MelkhiorWith VexRiscV at 66 MHz memory fails as well15:49
MelkhiorGuess the board requires a fast controller15:49
MelkhiorSynthesizing VR5 @ 80 MHz now ...15:49
MelkhiorSorry @ 75 MHz as well, PLL failed for 80 MHz15:50
daveshahThis is really something that should be fixeable in litedram, we managed to make lower frequencies work successfully for ECP5 in the end15:51
daveshahunfortunately, it's also beyond my experience to suggest how to fix it...15:51
MelkhiorVexRiscV should let me figure out what's the 'minimum' speed15:53
MelkhiorI wanted to try Rocket but it's far from critical15:54
MelkhiorI have a lowly Artix 7 35K -1, Rocket might work on a bigger/higher speed grade FPGA15:56
MelkhiorWith VexRiscV at 75 MHz memory fails as well, no surprise15:57
MelkhiorThanks for the help15:57
felix__florent_: congrats!15:59
_florent_Melkhior: We are not able to do a proper write leveling on Artix7 due to the lack of ODELAYE2 (that are present on Kintex7 and Ultrascale), we are using a shifted sys4x_dqs to compensate: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/arty.py#L47, that's possible some manual adjustments will be required on it to run at a frequency lower than 75MHz on Arty16:03
_florent_Melkhior: but it seems I was running the bench on Arty between a 60MHz clock and 150MHz clock, so 66 and 75 should pass: https://github.com/enjoy-digital/litedram/blob/master/bench/arty.py#L159-L16016:05
MelkhiorWith VexRiscV at 82.67 Mhz memory works fine...16:06
Melkhior_florent_ Thanks.. but to be honest I don't understand what it means:-)  (OLDELAYE2 is mentioned in https://www.xilinx.com/support/documentation/user_guides/ug471_7Series_SelectIO.pdf I'll have to look at that)16:06
_florent_felix_: thanks16:06
Melkhior_florent_ Similar FPGA, different board (and memory device) https://www.ztex.de/usb-fpga-2/usb-fpga-2.13.e.html (version 2.13a in my case) with MT41J128M1616:08
tpbTitle: USB-FPGA Module 2.13: FPGA Board with Artix 7, EZ-USB FX2 and DDR3 SDRAM. (at www.ztex.de)16:08
_florent_Melkhior: ah, you are not testing on Arty?16:08
MelkhiorNo, the Ztex board + my SBus carrier to supply the micro-sd card slot16:09
MelkhiorDo you think I should upstream my platforms/targets for them ?16:10
_florent_we could if it's not too specific16:14
_florent_Melkhior: I just tested 75MHz on Arty, it's passing, going to test 60MHz16:16
Melkhiorstandalone ZTex is commercially available, but has no peripherals so I have the LEDs for the debug board ; my carrier is OSHW but I doubt anyone will build one :-)16:16
Melkhioris there some simple procedure for that test I could try?16:17
Melkhiorneed to fix bench/arty.py to create bench/ztex.py for a start I guess16:21
_florent_Melkhior: yes you can do some tests, can you copy/paste these magic commands?:16:22
_florent_https://www.irccloud.com/pastebin/m00G0X9C/16:22
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)16:22
_florent_in the BIOS16:22
_florent_if working, I'll explain :)16:22
andrewb1999_florent_: Related question, are you using the arty design that uses an S7PLL or an S7MMCM?  I have been using S7PLL as symbiflow doesn't fully support MMCM yet but I have noticed less stable DRAM even with vivado.16:23
Melkhior... at some specific speed or any will do ? (I have a 82.67 MHz loaded)16:23
MelkhiorI have S7MMCM in my targets/*ztex.py, using Vivado16:26
_florent_Melkhior: test it at a speed that is was not working, ex 60 or 75MHz16:27
MelkhiorOK, will have to regenerate the bitstream to test16:27
Melkhiorwill report16:27
Melkhiorthanks for the help !16:28
_florent_Melkhior: can you also share the results of the calibration when testing? This can be useful to understand16:30
Melkhiorsure, will do16:30
_florent_andrewb1999: I'm testing with the LiteX-Boards Arty target: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/arty.py#L4216:31
andrewb1999_florent_: Ah ok, so you are using the S7PLL version.  Good to know.16:32
_florent_andrewb1999: no sure I tested much with a MMCM, I know there are still things to investigate with Symbiflow: https://github.com/enjoy-digital/litex/issues/75116:32
_florent_andrewb1999: in case you have troubles with the LiteDRAM on Arty with Vivado, please fill an issue on LiteX (with the logs of the calibration), I'll have a look16:35
andrewb1999_florent_: Will do that when I have a chance.16:37
Melkhior_florent_ With a 60 MHz VexRiscV, your magic commands make things work17:13
MelkhiorSwitching SDRAM to software control.17:13
MelkhiorWrite latency calibration:17:13
Melkhiorm0:0 m1:017:13
MelkhiorRead leveling:17:13
Melkhior  m0, b0: |00000000000000000000000000000000| delays: -17:13
Melkhior  m0, b1: |11111111111111111111110000000000| delays: 11+-1117:13
Melkhior  m0, b2: |00000000000000000000000011111111| delays: 28+-0417:13
Melkhior  m0, b3: |00000000000000000000000000000000| delays: -17:13
Melkhior  m0, b4: |00000000000000000000000000000000| delays: -17:13
Melkhior  m0, b5: |00000000000000000000000000000000| delays: -17:13
Melkhior  m0, b6: |00000000000000000000000000000000| delays: -17:13
Melkhior  m0, b7: |00000000000000000000000000000000| delays: -17:13
Melkhior  best: m0, b01 delays: 11+-1117:13
Melkhior  m1, b0: |00000000000000000000000000000000| delays: -17:13
Melkhior  m1, b1: |11111111111111111111111000000000| delays: 11+-1117:13
Melkhior  m1, b2: |00000000000000000000000111111111| delays: 28+-0417:13
Melkhior  m1, b3: |00000000000000000000000000000000| delays: -17:13
somloMelkhior: ok, so now does that same trick work with Rocket? :) Sorry, don't have an Arty board to try for myself...17:21
Melkhioron it :-)17:21
Melkhiorit works, but Rocket won't boot the VexRiscV kernel ;-)17:22
somlotry the boot.bin for nexys4ddr (https://github.com/litex-hub/linux-on-litex-rocket/issues/1)17:23
somloit will probably hang if you don't have a sdcard or ethernet or if they're at different MMIO addresses than the hard-coded DTB in that blob17:24
somlobut at least the kernel should hopefully start booting, which should be good to know...17:24
*** Zguig has joined #litex17:25
Zguighttps://freenode.irclog.whitequark.org is down... :(17:28
somlo_florent_: Happy 10-year Anniversary! :) :)17:28
_florent_Melkhior: ok thanks for the test. So for now you could patch https://github.com/enjoy-digital/litedram/blob/master/litedram/init.py#L119 and use cl  = phy_settings.cl + 117:29
_florent_Melkhior: I'll try to look at it soon17:29
_florent_somlo: thanks! I'm feeling old with this... (even if "only" 35 :))17:36
*** Zguig has quit IRC17:44
somloexperience has taught me that 35 is *not* old ;)17:44
Melkhiorsomlo I had compiled my own boot.bin, but it doesn't work; not sure if it fails to load or fails to run:17:44
Melkhiorlitex> sdcardboot17:44
MelkhiorBooting from SDCard in SD-Mode...17:44
MelkhiorBooting from boot.json...17:44
Melkhiorboot.json file not found.17:44
MelkhiorBooting from boot.bin...17:44
MelkhiorCopying boot.bin to 0x80000000 (15701872 bytes)...17:44
Melkhior[17:44
Melkhior... and then nothing.17:45
Melkhiorwill have to try with yours to compare. DTS is the same than nexys4ddr, with twice the ram and no ethernet. Not sure if I fixed that properly...17:46
somlosounds like the path from sdcard -> dram (dma into rocket, and axi point-to-point to litedram back out of rocket)17:50
*** Zguig has joined #litex17:50
*** kgugala has joined #litex17:51
somloso it's probably a question of what command line you used. Also, depending on the native width of litedram on the Arty, you should pick the `linux | linuxd | linuxq` variant (64 vs. 128 vs. 256 bit native litedram width)17:52
MelkhiorSame result with your boot.bin17:52
_florent_somlo: yes it seems the DMA from LiteSDCard is not able to access the DRAM17:52
*** cr1901_modern has quit IRC17:52
somloMelkhior: right, so it doesn't matter what's in DT or the kernel, this is a bios level problem17:53
*** Zguig9 has joined #litex17:53
somloMelkhior: by "command line" earlier I meant the command to build your (rocket) bitstream for the Arty17:53
MelkhiorIt's still not an arty:-)  I used this:17:54
Melkhiorlitex-boards/litex_boards/targets/sbustoztex.py --build --cpu-type rocket --cpu-variant linuxd --sys-clk-freq 60e6 --with-sdcard --integrated-rom-size 0x1000017:54
somlo_florent_: do you happen to remember off the top of your head what the native litedram width is on the Arty ?17:54
*** kgugala_ has quit IRC17:54
MelkhiorI'm not sure I have 128 bits, I should try linux as well17:54
somlooh, ok, not an arty board, I somehow assumed that from the context, might have misread it17:55
_florent_somlo: that's 128-bit on Arty yes17:55
somloand yeah, 128bit is linuxd17:55
MelkhiorI can try 'linux' as well just in case, I'm pretty sure it's not linuxq17:56
Melkhiormmmm, the board has just the one chip, shouldn't that be 64 bits ?17:56
Melkhior_florent_ the +1 solves the problem for me, now w/ Rocket it passes memtest and then goes straight to the boot failure, no need for the magic commands, thanks17:57
_florent_Melkhior: ok good, I'll adjust this17:58
Melkhiorsynthesizing with "linux" instead of "linuxd" to see if I'm 64 and not 128 bits on that board17:58
Melkhior... how is that set up for VexRiscV ? I don't remember telling it either of those ...17:59
_florent_Melkhior: if your board has a 16-bit DDR3, the native width of the controller will be128-bit17:59
Melkhiorso it's 128-bit I think, as the documentation says to use 16-bit in Xilinx MIG17:59
_florent_Melkhior: for VexRiscv we are generating the VexRiscv cluster automatically from the dram width18:00
*** cr1901_modern has joined #litex18:01
*** Zguig has quit IRC18:02
Melkhioroh that's right, now I remember: the width even appear in the Verilog filename when using SMP in my setup, it was 128 (Ldw128)18:02
Melkhiorso definitely linuxd18:02
*** kgugala has quit IRC18:04
Melkhiorso the failure is elsewhere...18:04
somlook, so with Rocket there's a special DMA bus, on which the sdcard gateware has master mode, and the Rocket has a slave port18:04
*** kgugala has joined #litex18:04
somloRocket will then route those requests through its own internal "backplane" and out over the mem_axi port that's hooked point-to-point to LiteDRAM18:04
somlothat path is broken somehow for you18:05
MelkhiorOK, thanks for the explanations (and the help!)18:05
MelkhiorCould I have broken that from a wrong DTS ? That's the only part that is really new (the board platform/targets are identical with VexRiscV, the whole SoC is straight from GitHub)18:06
somloMelkhior: nope, the DTS comes into play only once boot.bin has been transfered into RAM, and execution transferred to it18:07
Melkhior(I'm guessing no as you seemed to think the nexys4ddr boot.bin should load...)18:07
MelkhiorOK18:07
Zguig9Hi guys, I have a few questions again. I'm working on flashspi and board ECPIX5. I had first an issue with specific clock pin as described here: https://github.com/YosysHQ/prjtrellis/issues/15818:07
Zguig9I finished by just removing the associated core clk pinout and have this finally:18:07
MelkhiorThen I don't know what I broke :-/18:07
Zguig9    # SPIFlash18:07
Zguig9    ("spiflash", 0,18:07
Zguig9        Subsignal("cs_n", Pins("AA2")),18:08
Zguig9        Subsignal("mosi", Pins("AE2")),18:08
Zguig9        Subsignal("miso", Pins("AD2")),18:08
Zguig9        Subsignal("wp", Pins("AF2")),18:08
Zguig9        Subsignal("hold", Pins("AE1")),18:08
Zguig9        IOStandard("LVCMOS33")18:08
Zguig9    ),18:08
Zguig9    ("spiflash4x", 0,18:08
Zguig9        Subsignal("cs_n", Pins("AA2")),18:08
Zguig9        Subsignal("dq", Pins("AE2", "AD2", "AF2", "AE1")),18:08
Zguig9        IOStandard("LVCMOS33")18:08
somloyou're firmly stuck somewhere in the LiteX bios (litex/soc/software/liblitesdcard/litesdcard.c)18:08
somloMelkhior: not clear it was *you* who broke anything, it's just that nobody has ever tried Rocket+Litex on your board, and there's "unknown unknowns" to deal with whenever something like that happens :)18:09
MelkhiorI could have a very marginal microsd-card; I designed the carrier board with the microsd-card slot - and whike it works fine with Litex/VexRiscV in SD-mode, it mostly fails in SPI mode. And I've yet to succeed to use the microsd-card in my own design for the board's "primary" purpose in my SPARCstation.18:12
MelkhiorRocket is in SD-mode so is in a configuration that can work hardware-wise, but there might still be issue if litesdcard is used a bit differently in Litex/Rocket vs LItex/VExRiscV ...18:13
Melkhioras you said - 'there's "unknown unknowns" to deal with' :-)18:13
Melkhioranyway thanks everyone for the help :-)18:14
Melkhiorlast question - does the Rocket BIOS support serialboot ?18:14
Melkhiorwith lxterm18:14
Melkhiorthat would bypass the problem18:14
somloMaybe spi-mode sdcard will work with Rocket ? Just throwing things at the wall at this point, but I got nothing else :)18:14
_florent_Melkhior: maybe you could do more testing with the sdcard_xy commands of the BIOS first18:15
_florent_try to init/read/write a data block18:15
somlo(I got both spi- and native litesdcard going on the nexys4ddr, so "theoretically" they both should work)18:15
somloand yeah, what _florent_ said18:15
Melkhior_florent_ for some reason I can't interrupt the boot process; the BIOS initialize the memory then goes straight to load boot.bin, can't stop it (I could re-break the memory controller that stops it ;-)  )18:17
MelkhiorI'll rename the boot.bin18:18
_florent_also, it seems the BIOS is able to copy SDCard blocks from the SDCard to the SRAM (since able to find boot.bin and the size), but not to DRAM18:18
_florent_Melkhior: pressing EST or Q during during the boot should interrupt it18:19
_florent_ESC18:19
Melkhiordidn't manage to interupt even with q, but then I've a weird setup (I'm using a beaglebone white and some jumper cables as a serial console... )18:20
Melkhioranyway - I can read block all right, and the first is OK (i've seen it so many times trying to fix my design I know exactly what bytes are non-zero by now... sigh ... )18:21
somlo_florent_: if copying sdcard -> SRAM works on *Rocket*, then DMA routing through Rocket's backplane is OK, and we're talking the ability to send bits to LiteDRAM over the AXI dedicated link that's the problem18:22
Melkhiorseems serialboot would work, but at 115200 sending 15+ MiB is going to be long...18:26
MelkhiorCan I just pass '--uart-baudrate 1000000' to match LInux/VexRiscV default of a 1MBit/s serial port ?18:27
MelkhiorLet's try and see :-)18:27
Melkhioranyway getting late thanks a lot for all the help :-)18:29
*** Zguig9 has quit IRC18:42
*** Melkhior has quit IRC18:42
*** Melkhior has joined #litex18:44
MelkhiorTo finish - my boot.bin did load through serialboot, I get 'liftoff', the kernel starts and eventually stops after:18:48
Melkhior...18:48
Melkhior[    1.131849] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)18:48
Melkhior[    2.025180] loop: module loaded18:48
Melkhior[    2.200884] libphy: Fixed MDIO Bus: probed18:48
Melkhior[    2.226014] litex-mmc 12005800.mmc: Requested clk_freq=12500000: set to 12500000 via div=418:48
Melkhior[    2.265655] NET: Registered protocol family 1018:48
Melkhior[    2.280328] Segment Routing with IPv618:48
Melkhior[    2.281909] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver18:48
Melkhior[    2.293616] NET: Registered protocol family 1718:48
MelkhiorI don't have Ethernet on that board (commented out in the DTS), could be that or could be the sdcard again18:49
Melkhiorto be continued :-)18:49
*** Melkhior has quit IRC19:08
geertuOops, Melkhior is gone19:12
geertuBut a hang there may be due to the wrong L1_CACHE_SHIFT19:13
*** cr1901_modern has quit IRC19:27
*** cr1901_modern has joined #litex19:27
*** Bertl is now known as Bertl_oO19:32
*** kgugala_ has joined #litex19:42
*** kgugala has quit IRC19:45
*** kgugala_ has quit IRC19:56
*** kgugala has joined #litex19:56
*** andrewb1999 has quit IRC20:07
*** Melkhior has joined #litex20:08
Melkhiorgeertu Thanks for the tip, I'll have to investigate that20:08
Melkhiorgood night, depending on the timezone :-)20:09
*** chgavilana has joined #litex20:13
acathlaHow can I connect a litex_server to a litex_sim ? Through ethernet only? I added --with-analyzer to use litescope_cli.20:19
_florent_acathla: yes litex_sim --with-etherbone --with-analyzer20:48
_florent_litex_server --udp --udp-ip=192.168.1.5120:48
acathlano uart simulation usable?20:48
acathlaok20:48
_florent_litescope_cll20:48
_florent_not yet in simulation (except the console)20:49
acathlahum, should it answer to ping?20:52
acathla_florent_, I've got a tieout20:52
acathlatimeout20:52
acathlaof, my mistake20:53
acathlaanswer to me: yes it answers to ping, and to litex_server if you wait a few seconds20:55
*** key2 has quit IRC21:36
*** key2 has joined #litex21:37
*** sorear has quit IRC21:38
*** sorear has joined #litex21:39
*** Melkhior has quit IRC21:58
*** chgavilana10 has joined #litex22:28
*** chgavilana10 has quit IRC23:42

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