Friday, 2021-07-23

*** tpb <[email protected]> has joined #litex00:00
*** chiefwigms <[email protected]> has quit IRC (Quit: Client closed)01:10
*** Degi_ <[email protected]> has joined #litex01:35
*** Degi <[email protected]> has quit IRC (Ping timeout: 245 seconds)01:37
*** Degi_ is now known as Degi01:37
tntHi. I'm looking at linux.config in linux-on-litex-vexriscv and I see CONFIG_SMP is y ?  Is that expected for a single cpu riscv setup ?06:46
shoragantnt, litex supports generating multicore vexriscv06:51
*** C-Man <[email protected]> has quit IRC (Ping timeout: 258 seconds)06:58
FindeSMP doesn't mean there necessarily are multiple cores, just that they're supported06:58
tntyeah, I just wasn't sure if the CSR (or alike) used to even detect multiple cores would be supported in a single core vex.07:02
*** joseng <[email protected]> has joined #litex07:31
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)08:05
*** TMM_ <[email protected]> has joined #litex08:05
*** C-Man <[email protected]> has joined #litex08:43
tntSomewhat related question : Anychance of running linux on rv32 without atomics ?09:06
gatecattnt: I don't recommend this but I have done it... https://github.com/daveshah1/litex-linux-riscv/commit/a9819e66989207b09205311459340472dcf3519c09:24
gatecatdoing the emulation in M-mode would be cleaner09:24
tntgatecat: Oh nice, thanks !  09:32
tntATM I'm just trying to get things vaguely doing something ... but DCache is too large and AFAICT Vex doesn't support AMO without DCache.09:33
leonsI've been working on getting LiteX to work on some FPGA board, and unfortunately I'm again at the point where I have issues with DRAM and no clue really on how to diagnose these.09:42
leonsLogs and definitions: https://gist.github.com/lschuermann/9a748ad2d8904d5a4bf9361f4b37485d09:42
leonsWeirdly enough, my DRAM memory seems to work but the memtest is still "KO"09:42
tnt"best: m2, b04 delays: -"  sounds bad to me09:44
tntlooks like one of the group failed training09:44
leonstnt: Ah, right, I see that now. I should probably check the constraints then, right? Is there any signal to watch out for specifically?09:47
tntDQS maybe.09:49
tntbut really I think a wrong DQ would also cause it so .09:49
gatecatyeah09:49
gatecatDQS, DQ and DM09:50
gatecatfor m02, the third group09:50
*** pftbest <pftbest!~pftbest@2a01:4f8:c17:6afc::1:2> has quit IRC (Read error: Connection reset by peer)10:22
*** pftbest <pftbest!~pftbest@2a01:4f8:c17:6afc::1:2> has joined #litex10:22
leonsWoah cool, the second DRAM module works perfectly! Will check the constraints of the first now.10:45
leonsIt's really tedious so I've been whipping up a small python script to translate the MIG XML files to LiteX constraints :)10:45
leonsWith at least one of my DRAM modules running, I'm reaching speeds of approx. 30MiB/s write and 26MiB/s read. The reference of my FPGA board claims that the DRAM can run at 800MHz and my board features a 233.3MHz clock signal to be used by the MIG. Does LiteDRAM support running the memory at higher speeds, through an external clock?12:07
_florent_leons: The speed reported by the BIOS is the speed seen by the CPU (with the CPU/Wishbone being the bottleneck)12:12
leonsflorent: Ah, right, I suspected that already12:14
_florent_if you want to test with a hardware generator/check, you can enable the BIST module by setting with_bist=True in add_sdram12:14
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L122512:14
_florent_you'll then have a sdram_bist command available in the BIOS12:14
_florent_the issue with your first DRAM could be related to a missing INTERNAL_VREF or DCI_CASCADE property12:17
_florent_ex: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/digilent_genesys2.py#L16212:17
_florent_https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/xilinx_kc705.py#L55412:17
_florent_make sure to apply/user the ones you'll find in the MIG12:18
_florent_apply/use12:21
leonsAh, thanks. I can confirm that works, unfortunately getting a ton of errors which I suppose isn't expected :)13:03
*** chiefwigms <[email protected]> has joined #litex14:07
leons_florent_: I'm afraid I think the MIG generates for both INTERNAL_VREF and DCI_CASCADE the value 0, which is not translated into a constraint14:39
*** chiefwigms <[email protected]> has quit IRC (Quit: Client closed)15:28
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)15:41
*** TMM_ <[email protected]> has joined #litex15:41
Melkhiorleons: there were discussions about DRAM speed in Litex here: https://github.com/litex-hub/linux-on-litex-vexriscv/issues/22915:57
MelkhiorOne Vexriscv can't saturate anywhere near DDR3 bandwidth, even using native interface (i.e. not going through Wishbone)15:58
MelkhiorI've seen 100+ MB/s with 4 cores using 1 (shared by 4 cores) or 2 (shared by 2 cores each) FPUs on the 'normal' STREAM benchmark (which is using FP64)15:59
MelkhiorAnd even 170+ MB/s using hand-tuned assembly in the critical loop16:00
MelkhiorThat's with a 100 MHz sysclk and a 16-bits device (400 MHz DDR3)16:01
*** geertu <[email protected]> has quit IRC (Quit: Changing server)16:05
*** geertu <[email protected]> has joined #litex16:08
*** futarisIRCcloud <[email protected]> has quit IRC (Quit: Connection closed for inactivity)16:14
*** geertu <[email protected]> has quit IRC (Ping timeout: 252 seconds)16:22
leonsMelkhior: thanks for the pointer! I'm still pretty new to this stuff...17:07
leonsEventually I'd like to access the memory in hardware anyways, but for now it's a good first milestone to get the memory working at all :)17:07
leonsWith AXI lite I'm getting about 600MiB/s in both directions, which isn't too bad but nowhere near the theoretical limit17:08
leons(That's in hardware of course, with `sdram_bist`)17:09
Melkhiorleons: that's already pretty impressive!17:11
leonsMelkhior: But with a 64-bit 800MHz DDR317:11
Melkhiorleons: whoa that's a big memory for a FPGA17:11
leonsYeah, the FPGA is pretty OP, 2x4GB and Virtex7 690T. Not mine, of course :)17:12
MelkhiorThat's not-so-old laptop territory already...17:12
MelkhiorHehe, yes I also have a 'big' one but it's for work only :-)17:13
MelkhiorFun stuff can make do with an Artix-717:14
leonsAbsolutely.17:14
leons_florent_: Is a basic SoC with UART, LEDs, Buttons and one of the SO-DIMMs sufficient for an initial upstream already or should I try to get both memories and the Ethernet working first?17:15
leonsI'm also thinking about trying to wire a MIG-generated memory up to the AXI lite bus, just to find out whether my hardware is borked or I'm doing something wrong with LiteDRAM (probably the latter)17:16
*** geertu <[email protected]> has joined #litex19:31
*** pftbest <pftbest!~pftbest@2a01:4f8:c17:6afc::1:2> has quit IRC (Remote host closed the connection)19:36
*** pftbest <pftbest!~pftbest@2a01:4f8:c17:6afc::1:2> has joined #litex19:56
*** pftbest <pftbest!~pftbest@2a01:4f8:c17:6afc::1:2> has quit IRC (Remote host closed the connection)22:30
*** analognoise <[email protected]> has quit IRC (Quit: Leaving)22:30
*** pftbest <pftbest!~pftbest@2a01:4f8:c17:6afc::1:2> has joined #litex22:46
*** ewen <[email protected]> has joined #litex23:04
*** pftbest <pftbest!~pftbest@2a01:4f8:c17:6afc::1:2> has quit IRC (Quit: Leaving...)23:17
*** ewen <[email protected]> has quit IRC (Ping timeout: 255 seconds)23:44

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