Tuesday, 2020-09-22

*** tpb has joined #litex00:00
futarisIRCcloudhttps://resources.aldec.com/acton/media/23474/risc-v-design--verification-with-fpga-hardware-in-the-loop-eu01:57
tpbTitle: RISC-V Design & Verification with FPGA Hardware In The Loop (EU) (at resources.aldec.com)01:57
*** jaseg has quit IRC02:46
*** jaseg has joined #litex02:48
*** Degi has quit IRC03:03
*** Degi has joined #litex03:04
*** kgugala_ has joined #litex04:59
*** kgugala has quit IRC05:00
*** CarlFK has quit IRC05:13
*** peepsalot has quit IRC06:19
*** peepsalot has joined #litex06:20
*** TMM has quit IRC06:30
*** TMM has joined #litex06:30
_florent_Hi06:41
_florent_dkozel: it's possible to use Chipscope on LiteX design, but you'll have to use the generated names in the verilog. On LiteX designs, it's generally easier to use LiteScope, but in some specific cases i'm also using Chipscope06:44
_florent_somlo: nice for the litescard driver, are both reads and writes working?06:45
*** kgugala_ has quit IRC07:06
*** kgugala has joined #litex07:06
*** _franck_ has quit IRC07:21
acathlaWhat's the best way to build my own C code against a litex design? It builds a bios in build/software folder but Makefiles are somewhere else in litex.09:44
sajattack[m]good example here https://github.com/icebreaker-fpga/icebreaker-litex-examples/tree/master/c-riscv-blink09:48
tpbTitle: icebreaker-litex-examples/c-riscv-blink at master · icebreaker-fpga/icebreaker-litex-examples · GitHub (at github.com)09:48
acathlasajattack[m], so I just manually copy the files I need? Or make links.10:03
sajattack[m]I'm not really sure how the code was generated, ask esden10:10
sajattack[m]the makefile should work10:12
lkcl_florent_: you may be interested to know, the creation of an ASIC-compatible "platform" is working well10:59
lkclhttps://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/litex/florent/ls180soc.py;hb=HEAD#l2910:59
tpbTitle: git.libre-soc.org Git - soc.git/blob - src/soc/litex/florent/ls180soc.py (at git.libre-soc.org)10:59
lkclhttps://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/litex/florent/libresoc/ls180.py;hb=HEAD10:59
tpbTitle: git.libre-soc.org Git - soc.git/blob - src/soc/litex/florent/libresoc/ls180.py (at git.libre-soc.org)10:59
lkclthe only major "pain" was (after taking ulx3s.py) to work out how to do "build", and i had to have a right-old dig into litex for a few hours and eventually worked it out11:00
lkcloverride GenericPlatform and cut/paste the verilog build code from LatticePlatform, that did the trick11:01
lkclahh it is ok to add a 3rd bus (in this case a JTAG master) to periph_buses, right?11:15
lkclself.periph_buses = [ibus, dbus]11:15
lkclin this case11:15
lkclself.periph_buses = [ibus, dbus, wishbone_bus]11:15
*** _whitelogger has quit IRC11:33
*** _whitelogger has joined #litex11:35
_florent_lkcl: nice, what you are trying to do is very similar to the core generators except that you have to create your own ASICPlatform11:37
_florent_you can maybe find inspiration in:11:38
_florent_https://github.com/enjoy-digital/litepcie/blob/master/litepcie/gen.py11:38
tpbTitle: litepcie/gen.py at master · enjoy-digital/litepcie · GitHub (at github.com)11:38
lkclah appreciatd11:38
_florent_https://github.com/enjoy-digital/litedram/blob/master/litedram/gen.py11:38
tpbTitle: litedram/gen.py at master · enjoy-digital/litedram · GitHub (at github.com)11:38
_florent_https://github.com/enjoy-digital/liteeth/blob/master/liteeth/gen.py11:38
tpbTitle: liteeth/gen.py at master · enjoy-digital/liteeth · GitHub (at github.com)11:38
_florent_otherwise, for self.periph_buses, all the buses of the list will be connected yes11:39
lkclahh goood11:39
_florent_(and adapted in width and standard if necessary)11:40
lkcli was expecting that to work, i did however wonder if it would try to do something unexpected if there weren't 2 entries in the list11:40
lkclokaay.  excellent11:40
_florent_the SoC builder is logging these informations while building the SoC, so you can see which peripheral is added, if it's eventually adapted, etc...11:41
lkclas i'm adding JTAG - *real* JTAG (thanks to staf Chips4Makers for creating a full TAP FSM)11:42
lkclis there a way to connect those 4 pins to openocd in sim.py?11:42
_florent_not yet no, but that could indeed be useful11:43
lkcli'd like to actually connect openocd to the simulation and e.g. single-step it, upload to memory and so on11:43
lkclthe most logical / simplest route would be a network port11:43
_florent_acathla: you can find a minimal firmware in https://github.com/litex-hub/fpga_101/tree/master/lab00411:43
tpbTitle: fpga_101/lab004 at master · litex-hub/fpga_101 · GitHub (at github.com)11:43
lkclhmmm although openocd can run as a server... http://openocd.org/doc/html/Server-Configuration.html11:45
tpbTitle: OpenOCD Users Guide: Server Configuration (at openocd.org)11:45
lkclhmmm11:45
lkcl_florent_, if i have a suite of pins how do i get at the subpins12:13
lkclplatform.request("jtag").request("tms")?12:13
lkclor platform.request("jtag.tms")?12:14
_florent_jtagpads = platform.request("jtag")12:14
_florent_then jtagpads.tms12:14
lkclahh excellent thank you12:14
lkcl        self.comb += self.cpu.jtag_tdi.eq(jtagpads.tdi)12:15
lkcl        self.comb += jtagpads.tdo.eq(self.cpu.jtag_tdo)12:15
lkclthat look reasonable?12:15
lkclseems to be DoingTheRightThing(tm) in the resultant verilog (hurrah)12:17
lkclhow the hell am i going to test this?? :)12:19
lkcllike... ok maybe i could write a migen JTAG FSM12:20
lkclhowever there must be a way to "chain" the JTAG internally to a Versa ECP5 JTAG port12:20
daveshahThere is the JTAGG primitive that lets you access the fabric from the JTAG port using some custom instructions12:21
daveshahIts not documented but a few people have used it successfully in the past12:21
lkcldaveshah: ah! did they happen to put some code somewhere in a public repository, do you know?12:22
daveshahYeah, just trying to find it12:22
daveshahhttps://github.com/emard/ulx3s-misc/blob/27338b0081b3b441f2fa77769350fa777bd3bcf9/examples/jtag_slave/hdl/top/top_jtagg_slave.v12:23
tpbTitle: ulx3s-misc/top_jtagg_slave.v at 27338b0081b3b441f2fa77769350fa777bd3bcf9 · emard/ulx3s-misc · GitHub (at github.com)12:23
lkclstaaar, whew.  i wonder if it's similar to Xilinx BSCANE2 or something?12:23
lkclah ha!12:23
daveshahhttps://github.com/Spritetm/hadbadge2019_fpgasoc/blob/4ae8277c45e17e316bb4d46ce625c1507506cd36/soc/top_fpga.v12:23
tpbTitle: hadbadge2019_fpgasoc/top_fpga.v at 4ae8277c45e17e316bb4d46ce625c1507506cd36 · Spritetm/hadbadge2019_fpgasoc · GitHub (at github.com)12:23
lkclokaay.  so "not quite actual jtag" but "more like how Xilinx BSCANE2 works"12:26
lkclstill, thank you - it's something i could use to run on the ECP5.12:27
lkclhaha of course i could just shove a USB JTAG adapter onto 4 spare pins.... :)12:41
daveshahI've done that in the past tbh12:58
somlo_florent_: writes work too; but there's something weird going on, like some sort of intensive internal polling -- the "computer" becomes really slow and unresponsive once the litex_mmc driver successfully finds and intializes the card13:13
somlobut I'm still happy -- fixing something that already kinda works is better than a brick doing *nothing* :)13:14
somloalso, back when I used spi-mode sdcard, the kernel was polling for the presence of the card, and could tell when it was inserted/ejected -- that's not (yet) working with litesdcard, and might have something to do with the slowness13:16
lkcl_florent_: ah ha! https://github.com/lowRISC/opentitan/tree/master/hw/dv/dpi/jtagdpi13:44
tpbTitle: opentitan/hw/dv/dpi/jtagdpi at master · lowRISC/opentitan · GitHub (at github.com)13:44
lkclaw fer goodness sake13:52
lkclhttps://github.com/enjoy-digital/litex/tree/master/litex/build/sim/core/modules/jtagremote13:52
lkcllol13:52
tpbTitle: litex/litex/build/sim/core/modules/jtagremote at master · enjoy-digital/litex · GitHub (at github.com)13:52
lkcl_florent_: that's exactly what i need :)13:52
* lkcl facepalm13:52
lkclthis will be hilarious if it works.14:02
lkclhow is "configurations" specified for litex modules?14:02
lkclext_module_s ext_mod14:02
lkclthere must be some sort of config file created which contains "serial2tcp" config data (the port number)14:04
lkcland so on14:04
lkclahh JSON files :)14:05
lkclSimConfig14:05
lkclSimConfig.add_module() - "args" i assume.  so can set port=9999 (or whatever is needed for openocd)14:07
somlolkcl: just out of curiosity, are you doing a latex asic with the google skywater pdk thing, or is this something unrelated?14:10
somlos/latex/litex/ :D14:10
somlomuscle memory is still a thing, apparently, after all these years :)14:10
lkclsomlo, :)  i have workds where i do that14:11
* lkcl just accidentally did it lol14:11
lkclalliance / coriolis2.14:12
lkclwith help and collaboration of Staf Verhaegen, from Chips4Makers14:12
lkclhe is handling the NDAs with https://europractice-ic.com/14:12
tpbTitle: EUROPRACTICE | IC Service (at europractice-ic.com)14:12
somlolkcl: cool, thanks14:13
somlochip fabrication is a thing I know nothing about, but feel an obligation to learn about14:13
lkclyeah, very! with NLnet sponsorship paying for the MPW we can "experiment" and learn without having to pay EUR 18,00014:14
somlomy uni has a 4-5 semester course sequence in the ECE dept (free to staff/employees who can convince the prof to let them enroll)14:14
lkclsomlo: yes.  things are definitely stepping up a gear14:14
lkclnice!14:14
somlobut then covid happened, and I don't feel like taking in-person classes for another while :)14:14
lkclsomlo: get plenty of morning sunlight, and when you can't, get some pharmaceutical-grade 50,000 AU Vitamin D14:15
lkcland if you do get it for god's sake order and absolutely insist to the people that are looking after you to provide you with micro-aerosolised doses of the steroids used for treating asthma.14:16
lkclgetting there14:36
lkcl build/sim/core/sim.c  Could not find interface jtag with index 014:37
lkclnow i have to call... platform.extensions... something?14:37
lkcli've seen this somewhere in spi_sdcard14:37
lkcldang!14:41
lkclthat worked.  had to remember to actually request the jtag platform and connect up the pins just like for the LS180 ASIC14:42
lkclholy s***! Info : JTAG tap: auto0.tap tap/device found: 0x000018ff (mfg: 0x47f (<invalid>), part: 0x0001, ver: 0x0)14:44
lkclthat's just stunning.14:45
*** CarlFK has joined #litex15:01
st-gourichon-fidHi all, including _florent_ . We are concerned about building software without manually copying csr.h and the like.  We are aware about linker.ld and cousins.16:43
st-gourichon-fidWe now have a working design with SERV, can run lxterm. From your link https://github.com/litex-hub/fpga_101/blob/master/lab004/firmware/Makefile we can compile the software.16:43
tpbTitle: fpga_101/Makefile at master · litex-hub/fpga_101 · GitHub (at github.com)16:43
st-gourichon-fidGenerated files for a design include output_format.ld and regions.ld which is good. We are comparing the various existing linker.ld to figure out.16:44
st-gourichon-fidTL;DR: Is https://github.com/litex-hub/fpga_101/blob/master/lab004/firmware/linker.ld suitable to compile on "any" design based on your gist https://gist.github.com/enjoy-digital/82ed88b77ef0b1e3e91b0592e44eaa14 or are there caveat?16:45
tpbTitle: fpga_101/linker.ld at master · litex-hub/fpga_101 · GitHub (at github.com)16:45
st-gourichon-fidMmh, code does not compile because irq_setie not defined. Is it normal that https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/cpu/serv/irq.h is empty?16:57
tpbTitle: litex/irq.h at master · enjoy-digital/litex · GitHub (at github.com)16:57
*** kgugala has quit IRC18:24
*** kgugala has joined #litex18:29
*** _franck_ has joined #litex18:41
esdenacathla: sajattack[m] the code for the C example is generated by litex. These are the same headers as the ones used for the bios. I just copy them out from the litex build directory. I thought I described it in one of the README files... You will need to copy the headers out of litex every time you change anything regarding CSRs.19:30
esdenrust example is much more clever, it uses the generated svd, and on the fly generates the necessary glue definitions for you.19:32
*** st-gourichon-fid has quit IRC19:51
*** st-gourichon-fid has joined #litex20:13
sajattack[m]yeah I'm more familiar with how the rust side works20:28
*** st-gourichon-fid has quit IRC20:29
*** st-gourichon-fid has joined #litex20:29
*** st-gourichon-fid has quit IRC20:32
*** st-gourichon-fid has joined #litex20:33
*** st-gourichon-fid has quit IRC20:46
*** st-gourichon-fid has joined #litex20:48
*** esden has quit IRC22:04
*** daveshah has quit IRC22:04
*** daveshah has joined #litex22:04
*** futarisIRCcloud has quit IRC22:04
*** esden has joined #litex22:05
*** futarisIRCcloud has joined #litex22:06
*** CarlFK has quit IRC22:56
*** lf_ has quit IRC23:23
*** lf has joined #litex23:24

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