Wednesday, 2019-09-25

*** tpb has joined #litex00:00
*** pizzaman has joined #litex00:47
*** pizzaman has quit IRC00:54
*** rohitksingh has joined #litex01:49
*** rohitksingh has quit IRC01:56
*** rohitksingh has joined #litex01:59
*** freeemint has quit IRC02:19
*** rohitksingh has quit IRC03:29
*** rohitksingh has joined #litex03:30
xobsThanks for that, _florent_ .  And because of the `fields` support of CSRs, I can make a non-breaking change to the USB stack and the control bits remain the same: http://rm.fomu.im/usb.html#usb-out-ctrl04:36
tpbTitle: USB LiteX SoC Project documentation (at rm.fomu.im)04:36
xobs(bit 0 used to be "advance the fifo")04:37
*** _whitelogger has quit IRC05:15
*** _whitelogger has joined #litex05:17
xobsIs there any advantage to using a CSRConstant versus a CSRStatus?  Easier to meet timing, lower resource usage, something like that?05:27
xobsI just tried to move from using CSRStatus to CSRConstant, and the resource usage went up slightly.05:29
_florent_xobs: If CSRStatus is connected to a constant value, i would expect logic resource to be very similar between CSRConstant vs CSRStatus, i would need to check why CSRConstant seems to use a bit more resource05:45
xobs_florent_: It's negligible.  Probably just lost in the noise.  But that's nice to know that it should be almost the same.05:46
_florent_xobs: btw, to support we signal on CSRStatus, i had to rework the Wishbone 2 CSR bridge (to be sure read accesses are only valid one cycle) and also made it asynchronous (to reduce latency/simplify the code). I tested on a Xilinx design and it seemed to be fine for resource usage/timings, have you noticed a difference on foboot?05:49
xobs_florent_: I haven't tried it on real hardware yet, but I will try it soon.05:49
*** _whitelogger has quit IRC05:54
*** _whitelogger has joined #litex05:56
*** freeemint has joined #litex06:55
*** freeemint has quit IRC07:01
*** freeemint has joined #litex07:02
*** freeemint has quit IRC07:02
*** freeemint has joined #litex07:03
*** freemint has joined #litex07:04
*** tpb has joined #litex07:42
*** rohitksingh has quit IRC07:58
*** rohitksingh has joined #litex08:05
*** rohitksingh has quit IRC08:26
*** freemint has quit IRC08:33
*** freemint has joined #litex08:33
*** CarlFK has left #litex08:53
keesjI am getting started again (installed the xilinx vivado stuff) and used the setup_litex.py to setup the system. I want to test litesdcard and was able to generate the bit stream. but running ./arty.py load in the examples directory returns [loading]...10:30
keesj/bin/sh: 1: source: not found10:30
keesjand && vivado tcl not found . I think the lines might be bash specific10:30
keesjyes.. if I reconfigure bash as main shell (dpkg-reconfigure dash and select no ) it works10:37
keesj"works" is ERROR: [Labtoolstcl 44-469] There is no current hw_target.10:38
keesj(need to udev I think)10:38
*** freemint has quit IRC10:40
_florent_keesj: yes that's probably related to udev11:56
*** somlo has quit IRC13:07
*** somlo has joined #litex13:12
*** somlo has joined #litex13:21
*** forksand has quit IRC15:49
*** forksand has joined #litex16:04
*** CarlFK has joined #litex16:04
*** freemint has joined #litex16:13
*** Finde has joined #litex16:25
*** cansu has joined #litex16:28
*** freemint has quit IRC17:04
*** rohitksingh has joined #litex18:34
*** freemint has joined #litex18:35
*** rohitksingh has quit IRC18:43
scanakciHi all, I am a 4th-year grad student from Boston University and recently started a project that involves Litex. So far, I had the chance to read a bunch of documents from both litex and litex-buildenv repos and also spent some time to have a basic understanding of code hierarchy in litex.18:44
scanakciI and my collaborator (@cansu) will try to integrate a recent 64-bit RISC-V based CPU (https://github.com/black-parrot/pre-alpha-release) into the Litex environment. The final goal is to have an SoC running Linux as firmware on FPGA.18:44
scanakciAs a first step, we would like to have a minimal version of this SoC and simulate it. I will appreciate if you could give some directions related to this. I have some questions before diving into the project, please bear with me for nonsense or meaningless questions.18:44
scanakciQ1) I can see two options, one is using litex repo and the second is using the litex-buildenv repo. Litex-buildenv seems including more tools in terms of debugging. Should I use litex-buildenv as a beginner in the Litex, or using Litex is more meaningful for any reason?18:44
scanakciQ2) For debugging minimal SoC version, I can see two directions so far. In litex repo, there is litex_sim.py in tools (https://osda.gitlab.io/19/1.1-slides.pdf) and Litex Server, Litex Scope. Another option is using QEMU, Renode from litex-buildenv.18:44
scanakcia. So far, I could not see any documentation related to litex_sim, Litex Server or Litex Scop. Are there documents describing the usage of these tools other than --help? For instance, I tried ./litex_sim.py --output-dir $PWD/simout --cpu-type vexriscv --cpu-variant minimal+debug and ended up having a console with some available commands but I do not know how to go further and what to look for in simout folder. I do not18:44
scanakcihave much experience debugging hardware other than using ISE or similar simulation tools, that may be the reason.18:44
scanakcib. In general, which debugging tool would be a better choice? QEMU, Renode, litex_sim or maybe something else?18:44
tpbTitle: GitHub - black-parrot/pre-alpha-release: Black Parrot is coming soon. (at github.com)18:44
scanakciQ3) By looking at litex GitHub repo, I can see that we need another folder under soc/cores/cpu/ for the new core and write a core.py to describe this core. It also looks like that we need to include HDL source in the verilog folder. Besides these, are there specific folders, files that you would suggest me to look at? Which ones might be potentially changed for integrating a new core?18:44
scanakciSorry for the long message.18:44
*** rohitksingh has joined #litex18:48
somloscanakci: check out https://github.com/enjoy-digital/litex/tree/master/litex/soc/cores/cpu/rocket for existing 64bit RISC-V support (see http://www.contrib.andrew.cmu.edu/~somlo/BTCP for the "runs 64bit linux" part)18:57
tpbTitle: litex/litex/soc/cores/cpu/rocket at master · enjoy-digital/litex · GitHub (at github.com)18:58
somloIt should hopefully not be too hard to replace the rocket-chip with black-parrot for your project18:59
_florent_scanakci: hi and welcome!19:02
_florent_for the documentation, you can look at litex-buildenv wiki, that's where you'll find the more documentation19:02
_florent_it's true that documentation is the strong point of the project (we are trying to improve that), but you can generally find example by looking at the different examples/repositories19:04
_florent_There is also https://github.com/litex-hub/fpga_101 that you could try to look at / do19:05
tpbTitle: GitHub - litex-hub/fpga_101: FPGA 101 lessons/labs (at github.com)19:05
_florent_For the way to integrate your cpu, yes you'll have to create a cpu wrapper similar to the others CPU and the minimal software needed for it (search in software for __rocket__ define for example to understand what is needed for another CPU)19:06
_florent_For the debug, LiteScope is mostly useful for debug on hardware, but for your project you should be able to do almost everything in simulation, so i'm not sure you need it (at least now)19:07
_florent_litex_sim could be a good starting point for you, it uses verilator to simulate the whole SoC and allow you to interact with it at resonnable speed19:09
_florent_this is also possible to generate a .vcd file with it and that's what will probably be very useful for you19:09
_florent_you can enable tracing, but also select when you want to enable it : https://github.com/enjoy-digital/litex/blob/master/litex/tools/litex_sim.py#L204-L20919:10
tpbTitle: litex/litex_sim.py at master · enjoy-digital/litex · GitHub (at github.com)19:10
_florent_So this would easily allow you to simulate the SoC, load the ROM and see how it start behaving19:11
_florent_For example, that's what i used when starting working on https://github.com/litex-hub/linux-on-litex-vexriscv and integrate correctly VexRiscv19:12
tpbTitle: GitHub - litex-hub/linux-on-litex-vexriscv: Linux on LiteX-VexRiscv (at github.com)19:12
_florent_now for litex-buildenv vs litex, litex-buildenv will mostly provide scripts/packages to ease installing things and build software, but if you already have litex installed, you can just use that19:13
_florent_i just saw that black-parrot is in verilog, so litex_sim would work (verilator)19:16
_florent_also for QEMU/Renode, i would say it would be useful if you were doing the opposite: doing your own peripheral connected to a RISC-V CPU. Here that's the CPU you want to debug, the litex_sim approach seems more appropriate19:20
*** rohitksingh has quit IRC19:31
*** rohitksingh has joined #litex19:35
sorearoh neat, forgot there was stuff going on at BU19:42
*** rohitksingh has quit IRC19:52
*** rohitksingh has joined #litex19:55
*** rohitksingh has quit IRC21:00
scanakci_florent_ & somio: thank you so much for the answers!  glad to be here!21:03
*** rohitksingh has joined #litex21:34
*** CarlFK has quit IRC21:37
*** rohitksingh has quit IRC22:32
*** freemint has quit IRC22:58
futarisIRCcloudscanakci: Sounds like a great project. There's generally always someone here that can answer your litex questions, and if you're lucky, they're in the same timezone as you. Otherwise, check the logs in a day or two, https://logs.timvideos.us/%23litex/latest.log.html ...23:04
*** freemint has joined #litex23:17
*** freeemint has joined #litex23:32
*** freemint has quit IRC23:33

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