Wednesday, 2020-02-12

*** tpb has joined #litex00:00
*** CarlFK has joined #litex00:28
*** freemint has quit IRC00:48
*** rohitksingh has quit IRC01:15
*** rohitksingh has joined #litex01:17
*** rohitksingh has quit IRC01:23
*** rohitksingh has joined #litex01:26
*** CarlFK has quit IRC03:46
*** CarlFK has joined #litex07:53
*** rohitksingh has quit IRC08:43
*** rohitksingh has joined #litex09:00
*** rohitksingh has quit IRC09:03
*** rohitksingh has joined #litex09:05
*** rohitksingh has quit IRC09:06
*** rohitksingh has joined #litex09:07
*** rohitksingh has quit IRC09:14
*** rohitksingh has joined #litex09:16
*** rohitksingh has quit IRC09:19
*** rohitksingh has joined #litex09:20
*** rohitksingh has quit IRC09:24
*** rohitksingh has joined #litex09:26
*** rohitksingh has quit IRC09:26
*** rohitksingh has joined #litex09:29
*** rohitksingh has quit IRC09:39
*** freemint has joined #litex11:47
*** freemint has quit IRC12:23
*** freemint has joined #litex12:24
*** freemint has quit IRC13:14
*** freemint has joined #litex15:24
acathlaI have a new Versa Development Kit but with an ECP5 not the ECP5-5G configured by default everywhere in litex-boards, etc.15:42
acathlaWhat's the best way to add support for that board?15:42
acathlahttp://www.latticesemi.com/Products/DevelopmentBoardsAndKits/ECP5VersaDevelopmentKit.aspx15:43
tpbTitle: ECP5 Versa Development Kit - Lattice Semiconductor (at www.latticesemi.com)15:43
somloacathla: https://github.com/enjoy-digital/litex/blob/master/litex/boards/platforms/versa_ecp5.py#L22215:46
tpbTitle: litex/versa_ecp5.py at master · enjoy-digital/litex · GitHub (at github.com)15:46
somloalso line 265 in the same file15:46
somloI guess that stuff comes from https://github.com/enjoy-digital/litex/blob/master/litex/build/lattice/trellis.py15:47
tpbTitle: litex/trellis.py at master · enjoy-digital/litex · GitHub (at github.com)15:47
somloyours is probably this one: https://github.com/enjoy-digital/litex/blob/master/litex/build/lattice/trellis.py#L10115:47
tpbTitle: litex/trellis.py at master · enjoy-digital/litex · GitHub (at github.com)15:47
somlodaveshah would know more, though15:48
acathlaYes it works by changing a line15:48
acathlaI was looking for a better way15:50
somlomaybe adding a parameter to versa_ecp5.py that optionally picks the non-5g architecture?15:51
somlos/parameter/command-line option/15:51
_florent_acathla: you could do something like: https://github.com/enjoy-digital/litex/blob/master/litex/boards/platforms/netv2.py#L190 or https://github.com/enjoy-digital/litex/blob/master/litex/boards/platforms/ulx3s.py#L7416:01
tpbTitle: litex/netv2.py at master · enjoy-digital/litex · GitHub (at github.com)16:01
somlo_florent_: somewhere between 21d38701 and 4a15c3e2 I lost the ability to build LiteX + Rocket for (any) FPGAs (trellisboard and nexys4ddr hang after displaying "__   _" (the top of 'L' and 'i' of the bootsplash logo)16:06
somlostill works in the simulator, so that's not useful to troubleshoot :)16:06
somlofirst problem is we need an "from litedram.frontend.axi      import LiteDRAMAXI2Native" in soc/integration/soc.py for the direct point-to-point rocket <-> litedram path16:08
somlobut that's just to compile the bitstream, which then hangs16:08
somlotried to bisect, but I keep landing on commits that won't build for other reasons, so for now I'm stuck...16:08
acathla_florent_, perfect. Should I create a pull-request?16:35
daveshahsomlo: may or may not be relevant, I had that problem when doing some VexRiscv debugging a while ago and it was interrupt related in the end16:37
*** freemint has quit IRC16:40
*** freemint has joined #litex16:41
somlodaveshah: interrupts is what I suspect as well -- I almost wish the simulator had been broken too, that way debugging would have been much faster :)16:47
somloprobably going to start removing anything with an IRQ that isn't also present on the simulator (probably LiteETH), and see if that influences the outcome in any way...16:48
somlodaveshah: also, with the new soc.py, rocket on ecp5_versa is back to 101% slice utilization... So I'm only able to try things on the trellisboard and the nexys4ddr (with vivado)16:50
*** freemint has quit IRC17:03
_florent_somlo: sorry for that, i can help finding what is going on. For the resource usage, the only change i can think of is the L2 Cache when i change the  default behavior to use FullMemoryWE by default, you can try to set to false here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L90417:10
tpbTitle: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)17:10
_florent_somlo: for the functional regression, in the log, can you check that all Bus Regions are what you expect? (origin, size, mode, cached?)17:11
_florent_acathla: yes sure a PR is welcome17:11
_florent_somlo: while doing this, i indeed tested regression with Rocket only in simulation. Last time i had a similar issue, it was caused by a CSR mapping issue.17:13
somlo_florent_: thanks for the tips, I'll keep digging. Do you want the soc/integration/soc.py  "from litedram.frontend.axi      import LiteDRAMAXI2Native" as a PR, or would you rather just add it in directly?17:16
_florent_somlo: that's fine, i'll add it, thanks17:16
somlo(I'm using direct point-to-point AXI between Rocket and LiteDRAM, so I need that extra import)17:16
acathlaI've got an error when programming the Versa board :Error: tdo check error at line 1117:17
acathlaError:     READ = 0x222408617:17
acathlaError:     WANT = 0x4111204317:17
acathlaThe example of prjtrellis still works fine with this error (Hello, World, etc on the LED), but that's all. OpenOCD too old?17:18
_florent_acathla: strange, seems shifted by 1 bit17:19
_florent_somlo: i pushed the fix17:19
_florent_somlo: are you running the simulation with direct point-to-point?17:19
_florent_somlo: btw, it's now possible to simulate with any type of memory (--sdram-module) and any data width (--sdram-data-width), so even if the simulation does not default to point-to-point, you should be able to test it17:21
somlo_florent_: I didn't simulate with any memory, so no to your first question17:23
somloI did try the wishbone converter option (different litedram port width than rocket's axi port), which forces the wishbone conversion, got the same results17:24
somlo_florent_: like daveshah mentioned, the fact that I get three or four putchars before things hang *feels* like an IRQ problem17:24
somloso I'm going to try turning off LiteETH when building bitstream next, to see if that makes a difference17:25
somloit's the only thing with an IRQ that's not in the default simulator config that I can think of :)17:25
_florent_somlo: i already add a similar issue with a cached/uncached CSR mapping issue (IIRC CSR was mapped to a cached region)17:26
somlook, so I need to make sure that in my case no CSRs are mapped above 0x80000000 (which is Rocket's cached region, routed through its mem_axi port)17:27
_florent_somlo: we have the current mapping in Rocket:17:28
_florent_https://www.irccloud.com/pastebin/QIsOp3Kf/17:28
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)17:28
_florent_for others CPU, we are putting rom and sram in a cached region17:28
somloright, rocket overrides the mem_map property, and everything (rom, sram, csr) is accessed uncached via the mmio-axi port that's converted to wishbone and ends up as the wishbone bus master17:29
somlo0x80000000 and above goes through rocket's internal L1 cache, and out via the mem-axi port17:30
somloand looking through csr.csv for my latest nexys4ddr build, all CSRs are below 0x80000000, where they *shold* be -- so accessing CSRs through the cache doesn't seem to be my issue17:32
*** freemint has joined #litex18:26
somlo_florent_, daveshah: so I tried "litex/litex/tools/litex_sim.py --csr-data-width 32 --with-ethernet --cpu-type rocket" from a freshly cloned repo (still bisecting inside my main one :) )19:15
somloand it still works19:15
somlowas hoping the ethernet thing will trigger the bug I saw on the fpga, but no :)19:16
_florent_somlo: FYI i tried a build on Arty and reproduced your issue19:16
somlo_florent_: thanks for the confirmation, and sorry to be the bearer of bad news :)19:17
somloI had to skip a couple of commits during bisect, still hoping to narrow down the list of things to look at for clues (not sure that'll end up being useful, but since I started it I'll take it as far as I can)...19:18
_florent_that's better to know it now than later :), i could do more tests tomorrow, if you bisect it more closely, please post here the commits, i'll try to understand19:19
somlowill do, and thanks again!19:20
*** rohitksingh has joined #litex19:36
*** rohitksingh has quit IRC19:54
_florent_somlo: i found a regression on CSR alignment with Rocket (it was set to 32 instead of 64), i'm building a SoC on Arty with the fix20:15
somlo_florent_: for better or worse, bisect blames commit 29bbe4c0 :)20:15
somlonot sure if that's consistent with what you found, and I just got that information 5 seconds ago, so I haven't looked inside yet :)20:16
somlo"add add_csr_bridge method" ring a bell ?20:16
_florent_at least it's related to CSR :)20:17
somlothat's encouraging, yeah20:18
*** freemint has quit IRC20:19
*** freemint has joined #litex20:22
*** freemint has quit IRC20:27
_florent_https://github.com/enjoy-digital/litex/commit/5b34f4cd34b6f827f7d0c2d3c97560b99873d8b2 works on Arty :)20:28
tpbTitle: soc/add_cpu: use cpu.data_width as CSR alignment, fix regression on R… · enjoy-digital/litex@5b34f4c · GitHub (at github.com)20:28
somlobuilding on trellisboard now...20:30
somlo_florent_: while I'm waiting for the build, I dug around, and it was actually commit 84b5df78 that removed the line "csr_alignment = self.cpu.data_width" from soc_core.py20:41
somlowhich is where we used to adjust alignment, specifically for rocket at that time20:42
somloso I guess if I have to "git bisect skip", I may end up randomly blaming the wrong commit for whatever upsets me at that moment :)20:43
somlothe more interesting question to me is, why was this working in simulation ? :)20:49
somlo_florent_: \o/21:08
somloit now hangs during Linux boot when attempting to initialize the LiteETH driver, but that probably means I have to redo the driver initialization to account for whatever changes occurred in LiteETH over the last few days21:09
somloeither way, thanks for catching the alignment thing!21:09
*** freemint has joined #litex21:37
*** rohitksingh has joined #litex21:51
*** freemint has quit IRC22:11
*** freemint has joined #litex22:29
*** rohitksingh has quit IRC22:42
*** rohitksingh has joined #litex22:53
*** rohitksingh has quit IRC23:11
*** rohitksingh has joined #litex23:26
*** freemint has quit IRC23:31
*** rohitksingh has quit IRC23:32

Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!