Tuesday, 2020-10-13

*** tpb has joined #litex00:00
*** Degi has quit IRC02:20
*** Degi has joined #litex02:20
*** TMM has quit IRC03:55
*** TMM has joined #litex03:55
*** benh has quit IRC04:10
*** benh has joined #litex05:00
_florent_sajattack[m]: indeed there is no default serial on the acorn_cle_215, you can use --uart-name=crossover or --uart-name=jtag_uart06:46
_florent_for the CSR, 512-bit should be ok yes but probably not very efficient (in resource and performance)06:50
_florent_st-gourichon-fid: Hi, that's true that we only focused on the gateware side for CSRField, having software support in csr.h for them would be nice. Instead of inject/extract, we could maybe just use write/read but create additional functions for the CSRFields.06:56
_florent_ex: we have a control CSR with an enable Field: csr.h would then have a xy_control_write/read functions and also xy_control_enable_write/read functions?06:58
zyphaving write functions for individual fields is inefficient if you want to set more than one of them at the same time07:00
zypit's better to compose all the changes in a local variable before writing everything at once07:01
_florent_zyp: yes sure, that would just provide an easy way to access the fields when inefficiency is not an issue and this could be based on a generic inject/extract functions (maybe renamed to write_field/read_field? set_field/get_field?) that could also be used by the user for better efficiency.07:32
st-gourichon-fid_florent_, hi and thanks for your comment.07:49
st-gourichon-fidhi zyp too.07:50
st-gourichon-fidSo far I wrote some local code that reflects both your inputs.07:50
st-gourichon-fidReading/writing the whole CSR is already provided by LiteX.  Pondering a rename. Currently mycsrname_myfield_inject, could be mycsrname_set_myfield() mycsrname_write_myfield().  (Same consideration for extract/get/read.)07:53
st-gourichon-fidIt works here for us at the moment.  Makes very shot and readable client code.  Will use it for a moment before offering a PR.07:58
st-gourichon-fidTL;DR: makes fields as easy to use as plain registers.07:59
st-gourichon-fids/very shot/very short/07:59
*** KSmith has quit IRC08:16
st-gourichon-fidUsing CSRFields fails build AttributeError, here's a PR. https://github.com/enjoy-digital/litex/pull/67308:54
tpbTitle: Fix syntax error preventing to use CSRField. by fidergo-stephane-gourichon · Pull Request #673 · enjoy-digital/litex · GitHub (at github.com)08:54
_florent_st-gourichon-fid: thanks, sure when you think you have something that would useful for others, feel free to create PR :), we could discuss the naming in the PR.10:15
_florent_daveshah: ping? (just got your results with Alveo  U250)10:19
daveshahpogn10:19
daveshah*pong10:19
_florent_thanks for the test, i just got the XCU1525 working on my side (but with UDIMM)10:20
_florent_the automatic Clk/Cmd scan still has difficulties in some cases10:21
daveshahthat's useful to know10:21
_florent_maybe you could try to force it with the command from the bios, 2s10:21
_florent_you could  use sdram_force_cmd_delay command with a delay between 0 and 51110:22
_florent_with steps of 50 for example10:23
_florent_and then look at the write leveling data scan10:23
_florent_to try to see a full cycle of ones on each module10:25
_florent_if with this you are not able to get the last 3 modules working correctly, you could try to re-generate the bitstream with cmd_latency set to 0 here: https://github.com/enjoy-digital/litedram/blob/master/litedram/phy/usddrphy.py#L3110:26
tpbTitle: litedram/usddrphy.py at master · enjoy-digital/litedram · GitHub (at github.com)10:26
daveshahno dice on sdram_force_cmd_delay based on a quick test. All I observe is that the first 4 bytes then start failing between 250 and 300, no value seems to make the last 4 work10:26
daveshahthat's a good idea; if that doesn't work I will check the RCD config again10:27
_florent_ah otherwise, before rebuilding a bitstream10:27
_florent_it's now possible to write the MR registers from the bios10:27
daveshahoh nice10:27
_florent_and i've found it to be useful when debugging10:27
_florent_because it easily allow you to see latency related issues (for example by reducing cl/cwl by one cycle)10:28
_florent_i created this tool: https://github.com/enjoy-digital/litedram/blob/master/bench/ddr4_mr_gen.py10:28
tpbTitle: litedram/ddr4_mr_gen.py at master · enjoy-digital/litedram · GitHub (at github.com)10:28
_florent_that generates the commands that can just be copy/paste to the bios10:29
_florent_but that was only for ddr4/udimm10:29
_florent_maybe you could tweak it for udimm10:30
_florent_in your case for example, i would try to change cwl (+-1) and see if it improves the behavior of the last 3 modules10:30
_florent_daveshah: ah just in case, if you use sdram_force_cmd_delay, you then need to do sdram_cal, doing a full reboot with reset this force10:34
daveshahyeah I was doing sdram_cal10:34
daveshahah thanks for the tool10:34
daveshah_florent_: cmd_latency=0 works!10:57
daveshahhttps://www.irccloud.com/pastebin/BVziwS2c/10:57
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)10:57
daveshahsome of the calibration seems a bit dodgy, but memtest ultimately passes10:57
_florent_daveshah: great!10:59
_florent_the write leveling is indeed not optimal11:00
_florent_can you try to use sdram_force_cmd_delay to shift it?11:00
daveshahit shifts it, but I can't find a single value that causes all to pass11:10
_florent_ok, would you mind sharing the logs with various delay?11:17
daveshahI'll get that in 30 mins or so11:22
daveshah_florent_: https://gist.github.com/daveshah1/3d039adf1cc4c81179bf16d28b134fd911:40
tpbTitle: Alveo U250 DDR4 init · GitHub (at gist.github.com)11:40
daveshahthis is 0 to 500 in steps of 5011:40
_florent_thanks, i'm looking at this11:50
_florent_daveshah: the best is around 400 where we see the beginning of the 0 to 1 transition for all modules except m411:57
_florent_daveshah: otherwise you can try to increase the sys_clk_frequency11:58
_florent_this will reduce the side of the ones window and could help11:58
_florent_on the xcu1525 i tested up to 200MHz (i had problem at more, but with the compilation, will look at it)11:59
daveshahhmm, having trouble with the PLL config above 125MHz too12:07
daveshah200MHz fails as do other common freqs inbetween12:07
daveshahah, maybe I need to change the IDELAY reference too12:08
_florent_yes, 400MHz for the idelay_clk_freq was fine with a sys_clk_freq of 200MHz12:21
_florent_but i should change that and use a separate PLL for the idelay clk (that's already done in LiteDRAM generator IIRC)12:22
daveshahnot happy at 200MHz system clk (and changing force_cmd_delay doesn't do much either) unfortunately - perhaps it needs cmd_latency back at 1?12:26
daveshahhttps://www.irccloud.com/pastebin/mIV2rcfS/12:26
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)12:26
_florent_daveshah: ah possible for cmd_latency, but m7 seems to no longer be responding during the write leveling12:31
daveshahI can get a 0/1 transition for m7 by changing force_cmd_delay although it doesn't actually find a delay12:32
daveshahe.g with force_cmd_delay at 100 `m7: |11111111110000000000001110| delay: -`12:33
_florent_ah interesting, now that write latency can be calibrated, the write leveling could probably simplified a bit and just use the last transition12:37
*** krickit has joined #litex14:36
krickitHi everyone,14:36
st-gourichon-fidHi14:37
krickitI have to folder: gateware e software, but I didn't understand how to use them14:50
krickittwo*14:50
daveshahgateware contains the generated Verilog and resultant build products, including the final bitstream14:51
daveshahsoftware contains generated header files; makefiles and software build products14:51
krickityes, i know this difference, but i can't generate bitstream directly because i have to add other circuit in my fpga ed i don't understand how to use software folder in my project.14:53
krickitCan you help me?14:53
daveshahYou can probably ignore the software folder and use the top level verilog in the gateware folder; combined by the memory init files also in the gateware folder that contain the software in a format suitable for readmemh14:55
daveshahpointing your tool to the top level verilog in the gateware and any verilog dependencies (like the CPU verilog source, check the generated tcl or whatever file for a list of these) should be enough14:55
krickitoh thanks. So the memory init files are the "compilation" of software folder14:57
daveshahyeah14:58
krickitthank you so much, now it's all more clear14:59
*** CarlFK has quit IRC16:16
*** CarlFK has joined #litex16:45
*** CarlFK has quit IRC17:55
*** CarlFK has joined #litex18:18
*** CarlFK has quit IRC19:13
*** _franck_5 has joined #litex19:36
*** _franck_ has quit IRC19:36
*** _franck_5 is now known as _franck_19:36
*** KSmith has joined #litex20:12
*** kgugala_ has quit IRC21:30
*** kgugala has joined #litex21:30
*** _franck_ has quit IRC22:04
*** _franck_ has joined #litex22:05
*** krickit has quit IRC22:24
*** feldim2425 has quit IRC22:58
*** feldim2425 has joined #litex22:59
*** awordnot has quit IRC23:21
*** awordnot has joined #litex23:22
*** vup has quit IRC23:25
*** vup has joined #litex23:25
*** lf_ has joined #litex23:50
*** lf has quit IRC23:50

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