Thursday, 2020-08-13

*** tpb has joined #litex00:00
*** CarlFK has quit IRC00:13
*** Degi has quit IRC00:24
*** Degi has joined #litex00:28
*** jaseg has quit IRC00:32
*** HoloIRCUser has joined #litex00:33
*** jaseg has joined #litex00:34
*** HoloIRCUser has quit IRC00:34
*** HoloIRCUser has joined #litex00:34
*** HoloIRCUser1 has quit IRC00:36
futarisIRCcloudhttps://hackaday.com/2020/08/12/degrees-of-freedom-booting-arm-processors/00:47
tpbTitle: Degrees Of Freedom: Booting ARM Processors | Hackaday (at hackaday.com)00:47
*** HoloIRCUser1 has joined #litex01:03
*** HoloIRCUser2 has joined #litex01:04
*** HoloIRCUser1 has quit IRC01:04
*** HoloIRCUser has quit IRC01:07
*** mescobar has joined #litex01:55
*** jaseg has quit IRC02:11
*** jaseg has joined #litex02:12
mescobarIf I wanted to access CSR register map through JTAG, can I use the Xilinx JTAG hw transactions? Or should I resort to OpenOCD?02:43
*** MyGreenBalloon has joined #litex03:45
*** _whitelogger has quit IRC04:00
*** _whitelogger has joined #litex04:02
*** MyGreenBalloon has quit IRC04:22
*** kgugala__ has joined #litex04:59
*** kgugala_ has quit IRC05:01
*** mescobar has quit IRC06:04
*** HoloIRCUser has joined #litex06:52
*** HoloIRCUser2 has quit IRC06:54
*** kgugala has joined #litex07:07
*** kgugala__ has quit IRC07:09
*** kgugala_ has joined #litex07:52
*** kgugala has quit IRC07:55
*** kgugala_ has quit IRC08:04
*** kgugala has joined #litex08:04
*** CarlFK has joined #litex09:03
*** anand has joined #litex09:36
*** anand is now known as Guest4403609:36
Guest44036Hi, I am facing an error while trying to run the simulation09:44
Guest44036OSError: Unable to find any of the cross compilation toolchains:                                                                                                                                                   - lm32-elf09:44
Guest44036the list of cross compilation toolchains differ according to the cpu i choose09:45
Guest44036How can I fix this? Any help would be appreciated, Thanks :)09:45
zypinstall the required toolchain :)09:45
Guest44036I tried that, still fails09:51
zypwhich cpu are you trying and which toolchain did you install?09:52
Guest44036lm32 or vexriscv for that matter. It ran the first time, but my project is to add a new cpu along wth the existing ones. After some local changes, it started giving this error09:53
zypyou need to be more specific, lm32 and vexriscv requires different toolchains09:54
zypthe gcc_triple parameter to the CPU class tells litex what toolchain to use to build the litex bios09:58
zypso if you're adding a new CPU, you'll want to set it to something suitable09:58
zyp(and also have it installed)09:58
*** _whitelogger has quit IRC10:03
Guest44036okay i will try, thanks a lot10:04
*** _whitelogger has joined #litex10:05
daveshahawygle: I haven't had much luck above 100MHz system/200MHz memory/400Mbps DDR10:43
daveshahI think that is partly due to the control CPU though, and also the magic latency numbers not being tuned right above that10:43
scientesrisc-v also has MANY options11:14
scientesand you need to make sure that you get it right i your cpu doesn't have multiplication for example11:14
scientes(the compilers also don't really support the bit manip extensions yet, but that too)11:15
daveshahFor the LiteX BIOS it shouldn't matter as LiteX provides a minimal standard library and compiler_rt11:23
daveshahEven a riscv64 gcc can still build 32-bit rv32i code, it just doesn't necessarily have a standard library available11:23
scientesclang can build all targets that from the same binary...11:24
scientesand if you use zig to drive clang then it also can cross-compile musl for you and compiler-rt11:24
daveshahYes, someone should probably add the LiteX glue to use that as an option11:25
scientes(this is a well known deficiency of GCC that is difficult to fix)11:26
scientesoh wow, libgcc really does have multiplication implemented as addition in a loop11:30
scientes*addition and shifts11:30
daveshahLiteX uses LLVM compiler-rt already11:32
lkclh11:33
lkclhi all11:33
lkclanyone any clues why would nextpnr-ecp5 fail routing of sys_clk2x ?11:34
lkcldoes its thing, gets down to only 175 routes left to do, then wark11:35
daveshahPossibly because of edge clock promotion issues11:35
daveshahCan you run with --debug --verbose and post the last few output lines?11:35
lkclsure... ah... that means restarting one of those 10-15 min long runs... :)11:36
lkclargh, this time it succeeded11:37
lkclhey i got the time down from 45ns routing latency to 22ns yippee11:38
lkcldaveshah: it appears that nextpnr-ecp5 is non-deterministic in its routing.  i can *maybe* catch it "in the act" (some time)11:48
daveshahShouldn't be11:48
lkclwhat do i need to run with --debug --verbose?11:48
daveshahnextpnr11:48
lkclok.  litex outputs the command (full parameters) to be run, to stdout?  or is there a way to modify the versa_ecp5.py build script to pass those options?11:49
daveshahnot sure11:49
lkclor am i doing "find litex -name "nextpnr"" ? :)11:49
daveshahincidentally, nextpnr should print checksums of the design at various points so you can see which step is actually being nondeterministic11:49
lkclahh interesting11:50
lkcl"litex/build/lattice/trellis.py"11:51
* lkcl modified _build_template... started...11:52
daveshahyou can also try and capture the json files from two different runs to see if something nondeterminstic is going on in Yosys or LiteX11:53
lkclgood idea11:53
lkcloh.11:53
lkcli remember: raptor engineering found a bug in yosys.  must remember to update.11:54
lkclit was quite recent11:54
* lkcl hmmm yosys git logs don't show anything though 11:55
*** Guest44036 has quit IRC11:57
lkcldaveshah: annoying.  succeeded again12:00
lkclnonreproducible.12:01
daveshahweird, it's not something I've seen either12:01
lkclit happened on the microwatt build as well12:02
daveshahwhat board? versa12:02
lkclyes - versa ecp5 (LFE5UM)12:02
daveshahI see, I will try and see if I can trigger it at some point12:02
lkclabout the DDR3: i managed to get up to 44mhz so far12:03
lkcl24.2ns routing latency12:03
lkclif say 40mhz DDR3 initialisation worked, we'd be operational (without needing to mess with a separate PLL)12:05
lkcldaveshah: would you be able to help with either of those? (donations from NLNet available)12:08
daveshahYes, I'm a bit backlogged but I will see what I can do12:09
daveshahnot so sure about the DDR3 init but the eclk bug is probably an easy fix once it can be reliably triggered12:09
lkclrunning DDR3 off of a 2nd PLL would be the "nicer" solution, as other projects could benefit from being able to run...12:09
lkcldaveshah: ok cool12:09
daveshah_florent_  (or perhaps one of the Antmicro people) would probably be the better person for big litedram changes12:10
lkcldaveshah: yeahh florent's on holiday at the moment12:10
daveshahlkcl: this patch makes 40MHz system clock work, it should be possible to make other rates work tweaking the magic number more12:42
daveshahhttps://www.irccloud.com/pastebin/RBPjfZ4h/12:42
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)12:42
daveshaha better patch would be to auto-calibrate it as part of DDR training :)12:42
lkcldaveshah: ah ha!12:43
lkclsigh yes :)12:43
daveshah30MHz works too with that patch12:43
daveshahunfortunately, haven't triggered the other bug yet (or seen any non-deterministic behaviour using the same JSON, for that matter)]12:44
lkclwill see how it goes @ 30mhz12:46
lkclnope, fail.12:53
lkcltrying 40mhz12:53
lkclhmm, max freq says 33 mhz so will try 3212:54
daveshahyou might also need to try other values of that latency adder value12:55
lkcldaveshah: yes was just thinking that12:55
lkcldaveshah: i'm starting to wonder if there's something introduced in the version of litedram that's not the same as what i have.13:26
lkclwhat git revision of litedram are you using?13:26
daveshah198bcbab676e2b4065e5b6a7dc8a7733bae8315a13:26
lkcli am on commit 198bcbab676e2b4065e5b6a7dc8a7733bae8315a13:26
lkclhmmm13:26
daveshahsnap13:26
daveshahsorry if it's a dumb question but are you sure your litedram change is actually being picked up (e.g. litedram isn't pip installed somewhere or something)13:27
lkclcurrently building with "read_latency  = 2 + cl_sys_latency + 2 + log2_int(4//nphases),"13:27
lkclgood question13:27
daveshahasking because I've made that mistake before :)13:27
daveshahthat seems like too low13:27
daveshahI would expect the correct value to be between 3 and 613:27
daveshah+ 3 and + 613:27
lkcltried +4 +3 +2  will give +6 a go13:29
*** m4ssi has joined #litex13:35
lkclhmm best to try with picorv3213:40
lkclnope - not with picorv32 @ 30mhz, not any values - 0-7.14:02
daveshahdoes 40mhz work with any value?14:03
lkcl1 sec14:04
lkclbtw one odd thing, the software test:14:04
lkclbest: m0, b02 delays: 04+-0114:04
lkclbest: m1, b00 delays: 00+-0014:04
lkcl40mhz no.14:09
lkcl60mhz yes14:09
lkcl60 mhz software-test m1, b00: |11100000| delays: 01+-0114:09
daveshahand you are sure that the change is actually having an effect at all?14:10
lkclyes, i can see "really bad settings equals total garbage"14:10
daveshahI see14:10
lkclvs "reasonable settings at least gets 8/256 bus errors"14:10
daveshahprobably a board-to-board difference then14:10
lkcl48 mhz fail14:11
daveshahparticularly as you are using a non-5G board, at 1.1V vs 1.2V the internal timings might be a bit different14:11
lkcli hate those14:11
daveshahI remember back when debugging lower frequency issues (55MHz in that case) there was a difference between different boards14:12
daveshahNot sure what other magic numbers would help, though14:12
lkclwell, i have a target routing latency to reach, of 16 ns14:13
lkclback-calculated from 60mhz14:13
daveshahyou need to add logic delay, too14:13
daveshahalthough for ECP5 most delay is in the routing, so a typical 60MHz design might be 12ns routing and 4ns logic or so14:14
lkclcurrently Info: 6.1 ns logic, 21.7 ns routing14:15
lkclwhich is 37mhz14:15
lkclooo got it down to 23ns14:53
*** indy has quit IRC15:04
*** kgugala_ has joined #litex15:18
*** kgugala has quit IRC15:20
*** FFY00 has quit IRC15:26
*** FFY00 has joined #litex15:27
*** kgugala_ has quit IRC15:33
*** kgugala has joined #litex15:34
awygledaveshah: thanks! good to know16:57
*** m4ssi has quit IRC16:59
daveshahawygle: if you are interested, I think the way to make it faster would be to do a soft 4:8 serialisation so most of the logic could run at 100MHz for 800Mbps data rate17:14
daveshahsadly the cross-clock constraint support in nextpnr is probably not yet good enough for such a design to work 100% reliably17:14
awygleYeah I'm doing a design without a cpu which has a CDC to the close-to-the-chip part of the design17:29
awygleShould handle 800Mbps/pin, or more if the i/o buffers were better17:30
awygleI was a bit worried about the multiple clock constraints, what should I know about that?17:32
daveshahnextpnr prints the max and min delay between clock domains, but it doesn't support constraining or optimising for this17:33
awygleSo to be clear, multiple constraints work fine _within_ domains, but the cross clock constraints are not supported?17:33
awygleI.E. It's the CDC FIFO that would be failing?17:34
daveshahYep17:36
daveshahIf you design is conservative and follows usual CDC best practice then it will probably work17:36
*** kgugala has quit IRC17:38
*** kgugala_ has joined #litex17:47
awygleok, cool. the nmigen async fifos seem pretty good, so should be relatively safe17:52
*** SpaceCoaster has quit IRC18:54
*** SpaceCoaster has joined #litex18:55
*** m4ssi has joined #litex23:11
*** lf_ has quit IRC23:11
*** lf has joined #litex23:11
*** m4ssi has quit IRC23:20
*** lkcl has quit IRC23:32
*** lkcl has joined #litex23:35

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