Friday, 2021-08-27

*** tpb <[email protected]> has joined #litex00:00
*** Degi <[email protected]> has quit IRC (Ping timeout: 250 seconds)00:27
*** Degi <[email protected]> has joined #litex00:27
*** pftbest <[email protected]> has quit IRC (Remote host closed the connection)01:00
*** pftbest <[email protected]> has joined #litex01:03
*** pftbest <[email protected]> has quit IRC (Remote host closed the connection)01:16
*** pftbest <[email protected]> has joined #litex01:17
*** pftbest <[email protected]> has quit IRC (Remote host closed the connection)01:17
*** pftbest <[email protected]> has joined #litex01:17
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)02:02
*** TMM_ <[email protected]> has joined #litex02:02
*** pftbest <[email protected]> has quit IRC (Remote host closed the connection)02:25
*** pftbest <[email protected]> has joined #litex02:37
*** pftbest <[email protected]> has quit IRC (Ping timeout: 252 seconds)02:42
*** pftbest <[email protected]> has joined #litex03:08
*** pftbest <[email protected]> has quit IRC (Ping timeout: 250 seconds)03:13
*** pftbest <[email protected]> has joined #litex03:27
*** pftbest <[email protected]> has quit IRC (Ping timeout: 252 seconds)03:31
*** Guest9630 <[email protected]> has joined #litex04:42
*** ChuckM <[email protected]> has quit IRC (Remote host closed the connection)04:57
*** ChuckM <[email protected]> has joined #litex04:59
*** pftbest <[email protected]> has joined #litex05:14
*** pftbest <[email protected]> has quit IRC (Ping timeout: 240 seconds)05:19
*** Martoni42 <Martoni42!~Martoni@2a03:d604:103:600:2ad2:44ff:fe23:2f72> has joined #litex05:27
*** FabM <FabM!~FabM@2a03:d604:103:600:b200:29d9:988a:fdc1> has joined #litex05:29
*** Martoni42 <Martoni42!~Martoni@2a03:d604:103:600:2ad2:44ff:fe23:2f72> has quit IRC (Ping timeout: 240 seconds)05:31
*** Guest9630 <[email protected]> has quit IRC (Ping timeout: 246 seconds)05:52
*** Guest96 <[email protected]> has joined #litex06:16
*** Guest96 <[email protected]> has quit IRC (Quit: Client closed)06:24
*** pftbest <[email protected]> has joined #litex06:30
*** C-Man <[email protected]> has quit IRC (Ping timeout: 248 seconds)07:26
*** pftbest <[email protected]> has quit IRC (Ping timeout: 248 seconds)07:33
*** pftbest <[email protected]> has joined #litex07:42
*** pftbest <[email protected]> has quit IRC (Ping timeout: 252 seconds)07:47
_florent_tpw_rules: with Vivado 2018.2, make sure the pcie_s7.xci hasn't been updated with your previous attempts with a newer version of Vivado (so just make sure to revert all eventual LitePCIe changes)08:34
*** pftbest <[email protected]> has joined #litex09:48
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has quit IRC (Remote host closed the connection)10:12
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has joined #litex10:12
*** C-Man <[email protected]> has joined #litex10:14
pftbest_florent_: Hello. I am trying to port litex to a new Kintex 7 board, but I have some issue with DDR3. It behaves randomly, sometimes it works and passes memtest but sometimes it fails10:31
pftbestFor example https://dpaste.com/DNERCLY3H.txt10:31
pftbestIn this log first it works fine, then I type reboot and it fails10:32
pftbestCan you give some hint why it may behave this way?10:32
*** shenki <[email protected]> has quit IRC (Ping timeout: 240 seconds)11:45
*** shenki <[email protected]> has joined #litex11:45
*** futarisIRCcloud <[email protected]> has quit IRC (Quit: Connection closed for inactivity)13:39
*** pftbest <[email protected]> has quit IRC (Remote host closed the connection)14:17
*** pftbest <pftbest!~pftbest@2a01:4f8:c17:6afc::1:2> has joined #litex14:18
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)14:53
*** TMM_ <[email protected]> has joined #litex14:53
Melkhiorpftbest: in your second part (where it fails), m2 it picking b03 delays: 07+-0015:15
Melkhiorbut the seventh value on line b03 is a zero15:15
Melkhiorthe pattern looks weird - I think the BIOS code expect the 1 to be contiguous and pick the median between first and last15:15
Melkhiorso with such a pattern of alternating block of 0 and 1 (not-working and working), the BIOS might get confused15:17
pftbesthm, do you know what can cause zeroes to appear here&15:17
Melkhiornormally 0 is when there has been an error, I believe15:17
Melkhiorso it goes a bunch of wrong timings (zeroes), a small number of OK timings (1), then more wrong timings (more 0)15:18
Melkhiorand the BIOS picks the middle of the sequence of 115:18
Melkhiorbut in your case it doesn't do that - no idea why, not an expert 15:18
Melkhiorbut that probably explains why it sometimes work and sometimes not15:19
MelkhiorI would expect the pattern to look more like those in <https://gitmemory.com/issue/enjoy-digital/litex/890/826936087>15:21
tpbTitle: Pull request #884 seems to break nexys video sdram - litex (at gitmemory.com)15:21
Melkhior(even though that's for an issue, the pattern looks OK)15:21
pftbestI see, thanks15:23
MelkhiorMaybe the memory is run too slow ? Kintex 7 are fast (and probably could take DDR4 instead of DDR3)15:24
MelkhiorI had some issue at one point with a too-slow system causing memory issues...15:24
pftbestin my case the memory is on a sodimm module DDR3-106615:24
Melkhiorperhaps try with 125 or 150 MHz sys_clf_freq15:24
Melkhiors/clf/clk/15:24
pftbestSo my options are 100 125 and 13315:25
pftbestbut in my tests it seem to behave worse on higher frequencies15:25
MelkhiorYou have outside constraints ? (Litex should be able to configure any sys_clk_freq)15:25
Melkhior(though sometimes you need multiple PLLs for various clocks if their frequency relationship is weird)15:26
Melkhiorouch15:26
pftbestwell, any frequency from 100 to 133 should work I think, but those 3 I tried so far15:27
pftbest133 is the max because the memory is 106615:27
MelkhiorYou have a L2 in there, could be a source of trouble (including endianess issue in the framebuffer), maybe try without it...15:31
Melkhiorthe L2 forces the use of a Wishbone interface instead of the direct access15:31
Melkhiorshouldn't affect the BIOS 'training', but you never know ...15:32
Melkhiormight be worth a try...15:32
pftbestI tried to set it to 015:32
MelkhiorBeyond that sorry I don't know :-(15:32
pftbestIt didn't help unfortunately15:32
pftbestI can try to modify bios to make it find the longest sequence of 115:33
MelkhiorYes, but that might be a symptom of something else15:33
MelkhiorHopefully _florent_ will have better suggestions15:34
MelkhiorGood luck...15:34
pftbestMelkhior: but it won't help in this case https://dpaste.com/8ZVFACMZD.txt15:35
pftbestwhere I get no 1 at all15:35
pftbestI'm not sure how it can vary so much between reboot15:35
Melkhioryes, no 1 is definitely bad... 15:37
MelkhiorThe lack of 1 after 'Cmd/Clk' is also suspicious15:37
pftbestDo you know what is "Cmd/Clk scan"?15:39
Melkhiorno, don't think my board did that15:40
Melkhiorit's definitely in the BIOS15:41
Melkhiorin sdram_write_leveling15:44
Melkhiormaybe you can try a wider range than 0-16 and see what happens ?15:44
MelkhiorYou can also try to set SDRAM_WRITE_LEVELING_CMD_DELAY_DEBUG, maybe it will suggest something...15:48
MelkhiorSeems your issue is above my skill level, sorry :-(15:48
pftbestMelkhior: I looked at the datasheet for my memory http://88.99.85.67:1337/Screenshot%202021-08-27%20at%2018.48.39.png15:49
pftbestMaybe I have to change CL CWL15:50
pftbestOr try sysclk lower than 10015:50
pftbestbecause with CL-6 CWL-5 it seems 100 is an upper limit15:51
MelkhiorYes you could try 7/6, it the 2.5/3.3 is the min/max cycle time then it's 300->400 Mhz and with 100 Mhz sys_clk, the 4x is at 400 Mhz15:53
Melkhior90 MHz would be in the middle of the range for 6/515:54
pftbestI'll try15:55
Melkhiorcl / cwl are in get_ddr3_phy_init_sequence I think (litedram/litedram/init.py)15:56
Melkhiormmm, weird that you get 6/515:59
*** Melkhior <Melkhior!~Melkhior@2a01:e0a:1b7:12a0:225:90ff:fefb:e717> has left #litex (Leaving)15:59
*** Melkhior <Melkhior!~Melkhior@2a01:e0a:1b7:12a0:225:90ff:fefb:e717> has joined #litex15:59
MelkhiorDefault for 1066 is 7/6 https://github.com/enjoy-digital/litedram/blob/80398a8a15405b6958455bfa3c2beb500a459103/litedram/common.py#L44-L4516:00
Melkhior... but that might be based on the 'live' frequency, not that of the chip16:01
pftbest90MHz 6/5 didn't help: https://dpaste.com/GLAG94UXB.txt16:19
pftbestNow will try to change CL16:19
MelkhiorInterestingly, still loads of 0 for Cmd/Clk, but only 6 taps so something changed16:25
pftbestMelkhior: 6/7 still failed but Cmd has more 1 now https://dpaste.com/HQTFM3VYC.txt16:45
MelkhiorHehe and you went for higher frequency as well16:51
Melkhiorm6 is a complete failure though - nothing worked16:51
MelkhiorI think you should try 7/6 at 100 MHz... but I'm out of my depth here 16:53
MelkhiorGood luck again16:53
pftbestI'll try to find a different memory module, maybe the one I have is weird16:54
MelkhiorWorth a shot if you have other modules handy16:55
pftbestI tried 7/6 @100 and it was the same, so I'll go disassemble my old laptop for some memory16:55
_florent_pftbest: It seems the write DQ-DQS training is not done correctly on sometimes not done correctly on your board17:31
_florent_can you try to force this to False: https://github.com/enjoy-digital/litedram/blob/master/litedram/phy/s7ddrphy.py#L13617:31
pftbest_florent_: I'll try17:32
_florent_otherwise, be sure to configure the correct INTERNAL_VREF or DCI_CASCADE for the DDR3 bank17:34
_florent_ex: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/digilent_genesys2.py#L16217:34
_florent_or https://github.com/litex-hub/litex-boards/blob/master/litex_boards/platforms/xilinx_kc705.py#L55417:34
_florent_If you are adapting from the MIG, be sure to use the same IO constraints17:34
_florent_Is it your own board or a known development board?17:35
pftbestIt is HPC-STLV7325. It has a reference design with MIG which works fine17:36
pftbestI copied kc705 platform and modified the pinouts17:36
_florent_ok, can you share the .xdc for the DDR3/MIG?17:40
pftbestsure17:41
pftbest_florent_: http://88.99.85.67:1337/ddr_xdc.xdc17:45
pftbestand http://88.99.85.67:1337/k7325t_ddr3_1066_golden.xdc17:45
_florent_ok, so DCI_CASCADE constraint is similar to the KC70517:47
pftbestyes, it looks the same, the only difference is DQS pins are DIFF_SSTL15_T_DCI but for kc705 they are DIFF_SSTL1517:50
pftbestI tried both but didn't observe any difference17:51
pftbestAlso VCCAUX_IO is NORMAL in my case17:52
_florent_ok, so you can try to disable the Write DQ/DQS training17:53
_florent_it's a relatively new features and that's possible some corner cases are not handled correctly17:53
pftbest_florent_: I disabled the option but it still fails https://dpaste.com/HCXFQXKVK.txt18:14
pftbest_florent_: Is it ok that "Cmd/Clk scan" is mostly 0 ?18:15
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Quit: Leaving)18:19
pftbest_florent_: I think this is the main issue in my case https://dpaste.com/F2AGR4ULR21:48
tpbTitle: dpaste: F2AGR4ULR (at dpaste.com)21:48
pftbestIt set delay to 0 because there was a glitch at the start21:48
*** rektide <[email protected]> has quit IRC (Quit: leaving)22:15
*** rektide <[email protected]> has joined #litex22:17
*** rektide <[email protected]> has quit IRC (Quit: leaving)22:27
*** rektide <[email protected]> has joined #litex22:29

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