Wednesday, 2019-10-02

*** tpb has joined #litex00:00
cansuhttps://www.irccloud.com/pastebin/0SR8YSKO/00:27
tpbTitle: Snippet | IRCCloud (at www.irccloud.com)00:28
cansua00:34
cansuHi, as @scanakci mentioned, we are trying to integrate Black Parrot CPU  into Litex. Black Parrot will use AXI as bus protocol and I just wanted to be sure that my understanding is correct.  @gsomlo,  In Rocket,  you have adapted Wishbone to AXI and there already exists an interface between those two, right? I assume with some minor modifications, we can make the connection between Black parrot and Wishbone without the00:35
cansuneed of a new shim. I would appreciate if you can correct me if I am wrong. Thanks in advance!00:35
cansuSorry for the typo @somlo00:38
sorearhow much public information on the plans for black parrot are there00:38
scanakciI and Cansu recently started looking into that. Other than github repo, there are short workshop papers, and presentations about it.00:56
scanakcisorear: https://uploads-ssl.webflow.com/5a749b2fa5fde0000189ffc0/5d7feda4e41cc12b268581d2_22POSH%20Washington%20Taylor%20Website.pdf00:57
sorearare you insiders00:57
scanakcicurrently, we are not working on hardware development. My labmates were working on it till some point. We collaborate with University of Washington to add LiteX support.00:59
sorearI’m very curious about what your plans are to become compellingly better than Rocket01:01
somlocansu: start by looking at https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/cpu/rocket/core.py and its relationship to the rocket-chip Verilog module it connects to (e.g., freechips.rocketchip.system.LitexLinuxConfig.v)01:05
tpbTitle: litex/core.py at master · enjoy-digital/litex · GitHub (at github.com)01:05
scanakcisorear: I really do not have much background neither on Rocket nor Blackparrot to answer that.01:06
somloright now, Litex's main system bus is 32-bit wishbone, so rocket's core.py adds a 64bit AXI-to-wishbone, and a 64-to-32bit wishbone down-converter to *both* of Rocket's axi interfaces, before connecting them to the wishbone bus as masters01:07
somlothat's a bit suboptimal, as Rocket does its own internal routing: cached ram accesses over a mem-AXI, and MMIO accesses over a second mmio-AXI interface01:08
somlodoes Black Parrot's verilog interface provide more than one AXI master interface?01:09
somloyou should start by connecting them all to the LiteX 32-bit wishbone as masters, similarly to how Rocket is doing it right now01:10
somloIn the mean time, I'm trying to find the cycles to connect cached RAM directly to LiteDRAM's data via a dedicated, native-AXI link01:10
somloleaving just MMIO accesses via the 64-to-32 axi->wishbone downshifter01:11
somlobut you should not need to do that during your first pass, better to keep things simple until you get something working01:11
cansusomlo: Thanks a lot! Black Parrot’s verilog interface is under development. We will probably have a better idea in the next 2 weeks how their AXI will look like.01:14
somlosorear: w/o being familiar with Black Parrot (or Ariane, for that matter), I like the idea of something written natively in Verilog, whether it beats rocket in performance or not :)01:14
sorearhmm, if there are (a) BU people (b) with significant technical and planning knoledge of BlackParrot around I’d like to get to know them01:14
sorearsomlo: depressing but valid, rip vscale01:15
scanakcisomlo: Thank you so much. I have a separate question than this. Did you simulate Linux on Rocket Core using Litex? I read your blog about FPGA implementation but could not see something similar to linux-on-vexriscv Litex repo.01:16
scanakciI can simulate BIOS using litex_sim using any of the variants. I was curious if went further than BIOS on simulation01:17
somloscanakci: I used the litex built-in (verilator-based) simulator to get rocket all the way into loading the bios01:18
somlolitex/litex/tools/litex_sim.py --with-ethernet --with-sdram --cpu-type rocket --cpu-variant linux01:19
somloI did try to load linux from there (had to pre-load the memory with --ram-init something.bin, waiting for verilator to simulate the ethernet interface was too slow)01:21
scanakciI see. Do you think that it is better for me to switch to FPGA after coming to this point(loading the bios) or booting up the linux in the same simulation environment?01:21
somloand it takes a looong time to actually boot linux on a 64-bit simulated chip, but you do get to see it happen01:21
scanakciI see, thank you. I will probably go on with FPGA once we come to the loading the bios point01:22
somloI'd go as far as making sure I'm seeing the kernel print out things to the console, or at least get the simulator to prove you're executing early boot code, before switching to an fpga01:22
scanakciSure. Currently, where do you store the BIOS in Litex environment?01:23
scanakciis it in SRAM since you launch the simulator wiith that option?01:24
somloI think the bios is always in SRAM, whether simulated or part of an fpga bitstream image01:25
*** freemint has quit IRC01:31
*** CarlFK has quit IRC02:17
*** CarlFK has joined #litex02:21
*** Samreen has joined #litex03:27
*** Samreen has quit IRC03:29
*** rohitksingh has quit IRC04:02
*** rohitksingh has joined #litex04:54
*** futarisIRCcloud has quit IRC05:44
*** CarlFK has quit IRC06:38
*** CarlFK has joined #litex07:44
acathlaOk, I'm lost. What's the best practice with litex? Where do I put my own code, how does it (python) finds it? How compatible an example from litex-buildenv can be with standalone litex?08:22
acathlaI copied a tinyfpga_bx/base.py to litex/litex/boards/targets but it's still using litex from litex-buildenv/third_party/...08:27
_florent_acathla: i can explain you how to do things with standalone litex08:53
_florent_install migen, litex, the core with litex_setup.py:08:54
acathlaI found (again) the sys.path changed, a clean shell helps08:54
_florent_wget https://github.com/enjoy-digital/litex/blob/master/litex_setup.py08:54
tpbTitle: litex/litex_setup.py at master · enjoy-digital/litex · GitHub (at github.com)08:54
_florent_then python3 litex_setup.py init install08:54
acathlaDid that yesterday, it's ok08:54
_florent_ok08:55
acathlaWell, I hope08:55
_florent_so then if you want to create your board design, let's say based on one of the available target in https://github.com/enjoy-digital/litex/tree/master/litex/boards/targets08:55
tpbTitle: litex/litex/boards/targets at master · enjoy-digital/litex · GitHub (at github.com)08:55
_florent_you can just copy it in your project, customize it and just execute it08:56
_florent_when doing that, is it still using litex-buildenv/third_party/?08:57
acathlaI closed the terminal and it's OK now08:58
acathlaWell I have a "NameError: name 'AXIInterface' is not defined" now08:59
_florent_hmm strange, can you give the full message error?09:11
acathlaTraceback (most recent call last):09:12
acathla  File "simple.py", line 13, in <module>09:12
acathla    from litex.soc.integration.soc_core import *09:12
acathla  File "/usr/local/lib/python3.6/dist-packages/litex-0.2.dev0-py3.6.egg/litex/soc/integration/__init__.py", line 2, in <module>09:12
acathla    from litex.soc.integration.soc_sdram import SoCSDRAM09:12
acathla  File "/usr/local/lib/python3.6/dist-packages/litex-0.2.dev0-py3.6.egg/litex/soc/integration/soc_sdram.py", line 9, in <module>09:12
acathla    from litedram.frontend.axi import *09:12
acathla  File "/home/fabien/prog/litex/litedram/litedram/frontend/axi.py", line 28, in <module>09:12
acathla    class LiteDRAMAXIPort(AXIInterface):09:12
acathlaNameError: name 'AXIInterface' is not defined09:12
acathlaEven when doing "python3 simple.py"09:12
_florent_AXI interface should be imported with from litex.soc.interconnect.axi import *09:15
_florent_can you check your /usr/local/lib/python3.6/dist-packages/litex-0.2.dev0-py3.6.egg/litex/soc/interconnect/axi.py?09:16
_florent_for info, here is how Travis is doing install, running the tests: https://github.com/enjoy-digital/litex/blob/master/.travis.yml09:19
tpbTitle: litex/.travis.yml at master · enjoy-digital/litex · GitHub (at github.com)09:19
_florent_and it's executing test_targets: https://github.com/enjoy-digital/litex/blob/master/test/test_targets.py09:19
tpbTitle: litex/test_targets.py at master · enjoy-digital/litex · GitHub (at github.com)09:19
_florent_so i think you have a conflict somewhere between versions09:20
acathlaI removed everything in /usr/local/lib/python3.6/dist-packages/*, I had different versions of migen and... dust09:24
acathlanow I have egg-links, and :   File "simple.py", line 13, in <module>09:24
acathla    from litex.soc.integration.soc_core import *09:24
acathlaModuleNotFoundError: No module named 'litex'09:24
acathla"09:24
_florent_you just removed everything and executed litex_setup.py init install?09:28
_florent_maybe add a sudo before python3 litex_setup.pu init install09:29
acathlaI did. I had to do a sudo python3 setup.py install to add litex09:30
acathlaAnd now I still have the AXI problem :(09:31
*** rohitksingh has quit IRC09:33
*** freemint has joined #litex09:39
acathlaOk, rm -Rfing everything...09:41
_florent_yes that's probably better, then use litex_setup.py script09:43
acathlaOk, I had old litex stuff probably installed by hand (git clone) a long time ago09:51
acathlaEverything seems to be in place. So now, where's the best place to put my migen libs ? in litex-buildenv there is a gateware directory, should I use the "gen" directory?09:58
acathlathere should be a library directory, arduino like (sorry), to easily add third party libs or your own10:00
_florent_in fact, now that it's installed, you just can execute the target in place, so you are free to choose how you want to organize things :)10:12
_florent_for example: create your own library with a setup.py10:13
_florent_or for simple project, just have your custom library files near your target10:13
_florent_or put that in a gateware directory as done in litex-buildenv10:13
*** john_k[m] has quit IRC11:07
*** nrossi has quit IRC11:07
*** xobs has quit IRC11:07
*** synaption[m] has quit IRC11:07
*** xobs has joined #litex11:18
*** nrossi has joined #litex11:39
*** synaption[m] has joined #litex11:39
*** john_k[m] has joined #litex11:39
*** freemint has quit IRC12:19
acathla_florent_, thank you, I progress. Now the vexriscv-lite does not want to be built by yosys :(15:07
_florent_ah, what's the issue? which board are you using?15:08
acathlatinyfpga_bx15:11
acathlaold, but not too old, version of yosys works15:11
_florent_ok, the tinyfpga_bx does not have that much block ram memory, so it's possible you'll have to reduce ROM/SRAM sizes15:15
acathlaYosys from github says : "ERROR: multiple drivers on net 'CO' (carry.CO and $logic_or$/usr/local/bin/../share/yosys/ice40/cells_sim.v:145$1491.Y)"15:21
acathla(version Yosys 0.9+899 )15:22
daveshahYou might need newer nextpnr15:24
daveshahThere have been changes to the JSON format15:24
*** freemint has joined #litex15:46
*** freemint has quit IRC15:56
_florent_acathla:if needed you can find prebuilt toolchain here: https://github.com/im-tomu/fomu-toolchain/releases15:59
tpbTitle: Releases · im-tomu/fomu-toolchain · GitHub (at github.com)15:59
*** freemint has joined #litex16:00
*** forksand has quit IRC16:04
acathla_florent_, it's ok, after a crash because linux cannot handle correctly the lack of memory, everything seems to be built16:06
acathlaLED is still not blinking but, gateware/firmware were built16:13
*** forksand has joined #litex16:19
*** cansu has quit IRC16:37
_florent_acathla: good16:56
*** forksand has quit IRC17:11
*** freemint has quit IRC17:12
*** forksand has joined #litex17:26
somlo\o/ -- my batch of TrellisBoards (https://github.com/daveshah1/TrellisBoard) just got delivered! As soon as I find a set of rubber "feet", it's off to getting litex+rocket running on an 85k ecp5 :)18:06
tpbTitle: GitHub - daveshah1/TrellisBoard: Ultimate ECP5 development board (at github.com)18:06
somlodaveshah: I'm assuming the power supply from the versa should work, not sure about what usb cable I should use for programming and serial console18:07
daveshahMake sure you put a jumper on the USB setting of J15, connect type C (start with type C not 12V)18:07
somlohmm, add "type-c usb cable" to the list of things I need to procure before I can start having some fun... :)18:08
daveshahThis is a simple demo: https://github.com/daveshah1/TrellisBoard/tree/master/gateware/simple18:09
tpbTitle: TrellisBoard/gateware/simple at master · daveshah1/TrellisBoard · GitHub (at github.com)18:09
daveshahAny irl phone or tech shop should sell them18:09
CarlFKanyone with a printer should have one18:11
daveshahThat's type B not C18:16
daveshahAlthough a lot of phones etc these days are C18:16
CarlFKoh right, never mind18:16
somloa bunch of my coworkers have newer mac laptops with usb-c, but all I saw was c-to-c cables or those c-to-(a,dvi,power) dongles18:17
somloI need an honest to goodnes A-to-C cable, gotta go shopping :)18:18
*** rohitksingh has joined #litex18:38
forksandsomlo: i have some notes & issues forming here and am going to set up a wiki about the Trellisboard i had built, fyi:18:45
forksandhttps://code.forksand.com/forksand/fs-TrellisBoard/18:45
forksandIf you have any easy questions let me know. daveshah will have to answer the hard ones. :)18:45
tpbTitle: forksand/fs-TrellisBoard: Ultimate ECP5 Board. Fork Sand fork of https://github.com/daveshah1/TrellisBoard - fs-TrellisBoard - Fork Sand Source Code (at code.forksand.com)18:45
somloforksand: thanks, will check it out!18:53
*** rohitksingh has quit IRC19:30
*** rohitksingh has joined #litex20:00
somlodaveshah: re. yosys PR 1425 & nextpnr PR 337, on the ecp5versa and litex+rocket20:08
somlowith yosys #c7f1368 and nextpnr #927077e I would usually get it to pass 60MHz in about 4-5 attempts (got above 55 on average), with "-abc9 -nowidelut" and the xc7dsp yosys patch applied on top of #c7f136820:08
somloyesterday I updated to yosys #da347b9 and nextpnr #cb8d90b, and only managed three runs this morning before I recompiled them both with PRs 1425 and 337, respectively. About the same area (98% TRELLIS_SLICE) as before, around 55MHz Fmax each run.20:08
somlowith both PRs applied, I'm getting about the same results (after two runs so far -- 98% area, 55-56 MHz Fmax)20:08
somloI'll start my usual loop and see how long until I manage 60MHz, but it's not immediately different at first glance.20:08
somloNot sure what else changed since (#c7f1368, #927077e) that would have any bearing on my results...20:08
daveshahThanks for checking! The reduction might be more in number of BRAMs than in amount of logic, although perhaps not an issue for Rocket20:11
somloI can re-run with vs. without the PRs and look at BRAMs (didn't occur to me to pay attention, since TRELLIS_SLICE is my constraining factor :)20:13
somlodaveshah: so, before the PRs I get 79% DP16KD, after (with) the PRs it goes down to 56%20:32
daveshahNot bad20:33
daveshahGood to see some improvement20:33
somlo30% (ish) reduction in utilization, that's totally worth writing home about :)20:34
somlodaveshah: oh, and quite hilariously, after I backed out of the PRs to get you the "before" numbers on DP16KD, that run went on to finish with a 62.01MHz Fmax :)20:51
somloand just to be sure, I booted linux on it to see if it works (it does)...20:57
*** freemint has joined #litex21:00
*** rohitksingh has quit IRC21:06
*** rohitksingh has joined #litex21:34
scanakciDoes Litex provide L2 cache? For instance, is the L2 in this screenshoot provided by LiteX? https://usercontent.irccloud-cdn.com/file/WwB7kuIS/litex%20example22:41
*** CarlFK has quit IRC23:31
somloscanakci: LiteX does indeed provide a default L2 cache when SDRAM is enabled; start grep-ing for "l2_" from here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc_sdram.py#L2723:51
tpbTitle: litex/soc_sdram.py at master · enjoy-digital/litex · GitHub (at github.com)23:51

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