Wednesday, 2020-07-01

*** tpb has joined #litex00:00
*** lf has quit IRC00:01
*** lf has joined #litex00:01
somlo_florent_: turns out "identifier" doesn't work on 64bit (I think I knew that and was planning to investigate, but I forgot)00:02
somloso with 6fe4994f booting with Rocket hangs after "Liftoff!"00:02
somloI'm done for today ($DAYJOB wearing me out :) ) but hopefully I can make some time to dig into it tomorrow00:03
*** gregdavill has joined #litex00:05
*** Degi has quit IRC01:51
*** Degi has joined #litex01:53
*** proteusguy has quit IRC02:04
*** jaseg has quit IRC02:13
*** jaseg has joined #litex02:15
scanakci@_florent_, somlo: After I upgraded my LiteX version to the latest (and LiteDRAM as well), I also get fails in memtest when running BlackParrot on Genesys. I was using a LiteX version older than a month before upgrading to the most recent version (https://github.com/enjoy-digital/litex/commit/c136113a9b71cbcbdf525aaad38acb012f4a12f3). I do not remember which version of LiteDRAM I was using but most probably02:53
scanakci(https://github.com/enjoy-digital/litedram/commit/fe478382e16ff3592e07774580c96bde0dc82da3).02:53
tpbTitle: Merge pull request #506 from scanakci/blackparrot_litex · enjoy-digital/litex@c136113 · GitHub (at github.com)02:53
tpbTitle: litedram_gen: expose a Bus Slave port instead of a CSR port. · enjoy-digital/litedram@fe47838 · GitHub (at github.com)02:53
scanakciSimulating using an SDRAM module works fine (i.e. memtest pass, and some random memory writes/reads that I perform also works fine) I used this exact command (./litex_sim.py --cpu-type blackparrot --cpu-variant standard --csr-data-width=32 --sdram-module MT41J256M16 --with-sdram)02:57
*** SwimmingCode has joined #litex03:12
*** gregdavill has quit IRC03:54
benh_florent_: the user I mentioned with issues on genesys reported that litex with vexriscv on genesys also fails the memory test04:17
*** _franck_5 has joined #litex05:07
*** _franck_ has quit IRC05:10
*** _franck_5 is now known as _franck_05:10
*** FFY00 has quit IRC05:47
*** st-gourichon-fid has joined #litex05:57
*** st-gourichon-fid has quit IRC06:16
*** SwimmingCode has quit IRC06:18
_florent_benh, scanakci: i will do more test on the Genesys2, it you could provide me logs of the initialization, verilog sources and/or bitstream to test, that could help.06:24
_florent_somlo: that's strange the added identifier is preventing your from booting, even if not working, the issue is probably that adding the identifier has moved your CSRs. (the LiteX targets use dynamic CSR allocation, but it's possible to use fixed CSRs in your design if your Linux dts is generated manually).06:28
benh_florent_: i asked him to file an issue06:29
_florent_benh: ok thanks06:29
_florent_somlo: it seems the identifier is also working fine on 64-bit: https://hastebin.com/urijowizeg.js06:45
tpbTitle: hastebin (at hastebin.com)06:45
_florent_somlo: it could be related to the recent change we did on CSR/Wishbone DownConverter06:45
_florent_somlo: BTW, with https://github.com/enjoy-digital/litex/pull/580, the compile time with verilator is a lot faster (~5x) which is convenient for simulating Rocket since needs to be compiled with O3 to have decent simulation speed06:47
*** SwimmingCode has joined #litex06:48
SwimmingCodeQuestion: if I wanted to go about adding multiple UARTs/SPI/I2C instances, how would this be done within the Lite-X framework?06:49
SwimmingCodeAs far as I can tell, with the exception of the Timer and perhaps the memory modules, everything assumes it's the only instance of that piece of hardware06:50
SwimmingCodeI've made it to the point of getting the migen to instantiate the modules, but then the generated interface code doesn't compile since the main system doesn't know anything about instanced methods06:51
_florent_the identifier is also working fine with Microwatt: https://hastebin.com/iduhahowal.js06:51
tpbTitle: hastebin (at hastebin.com)06:51
_florent_benh: BTW, #580 is also interesting to speed up simulation with Microwatt + GHDL with litex_sim06:52
_florent_SwimmingCode: the BIOS indeed handles generally only one instance, but there is no restriction to add several instances to your SoC and handle it with a runtime software06:55
_florent_SwimmingCode: from what i understand, you are not able to generate the SoC? Could you provide the errors you have?06:55
SwimmingCodeIt's more that when instancing the peripherals, they should be logically grouped or numbered: i.e. uart0, uart1, uart2 or uart[3]06:57
SwimmingCodeif the module's registers can be grouped as well, then the driver can trivially convert from an index vale into the hardware addresses06:58
SwimmingCodemucking down below in the codebase, I convinced it to generate a instanced name for the uart SoC.submodule06:59
_florent_but it also depends the kind of system you want to build07:00
SwimmingCodeexample error output:07:00
SwimmingCode/home/dciliske/litex/litex/litex/soc/software/libbase/uart.c:48:4: warning: implicit declaration of function 'uart_rxtx_write'; did you mean 'uart0_rxtx_write'? [-Wimplicit-function-declaration]07:00
SwimmingCode   48 |    uart_rxtx_write(tx_buf[tx_consume]);07:00
SwimmingCode      |    ^~~~~~~~~~~~~~~07:01
SwimmingCode      |    uart0_rxtx_write07:01
SwimmingCode/home/dciliske/litex/litex/litex/soc/software/libbase/uart.c: In function 'uart_write':07:01
SwimmingCode/home/dciliske/litex/litex/litex/soc/software/libbase/uart.c:87:31: error: 'UART_INTERRUPT' undeclared (first use in this function); did you mean 'UART0_INTERRUPT'?07:01
SwimmingCode   87 |  irq_setmask(oldmask & ~(1 << UART_INTERRUPT));07:01
SwimmingCode      |                               ^~~~~~~~~~~~~~07:01
SwimmingCode      |                               UART0_INTERRUPT07:01
SwimmingCodeI'm fairly green with FPGAs, but my goal is to build a peripheral IC for adding essentially arbitrary numbers of low bandwidth peripherals to a main SoC07:02
_florent_the default LiteX targets and BIOS only provide  1 instance of each peripheral and let user add others instances and handle them with runtime software07:03
SwimmingCodecan I inquire as to why they are treated differently?07:03
_florent_because depending the system, you don't necessarily want to handle the multiple peripherals in a similar way07:04
benh_florent_: ah nice, thanks07:04
SwimmingCodehmm... true07:04
SwimmingCodeI'm coming at this from the land of rtoses, so perhaps my perspective here is a little different than most07:05
_florent_for example, if you have a SoC with CPU + ROM + RAM + 2 UARTs, only one of these UART will be used for the console07:05
SwimmingCodesure07:05
SwimmingCodebut if I want to build a system that interfaces through standard file descriptors, they'll be treated the same07:06
SwimmingCodeeven if I'm *not* there's good odds that I'll want some sort of read8/write8/readn/writen/etc.07:08
SwimmingCodeand this same basic procedure will be repeated multiple times07:08
SwimmingCode:/ sorry, I didn't mean to be complaining07:09
_florent_SwimmingCode: but i see your points, just that LiteX keeps things simple in the default targets/BIOS07:09
SwimmingCodeso, question then: how am I expected to build out my more complex system?07:10
SwimmingCodedo I add a Target to litex-boards?07:10
SwimmingCodeor do I extract the guts of SoC and SoC-core and fork?07:11
SwimmingCodeor something else?07:11
_florent_you can start from a target in litex-board07:11
SwimmingCodeok, that's where I'm at now07:11
_florent_and you can add your peripherals to the SoC, but not sure the add_ methods of LiteXSoC will allow you to easily add multiple instances of the same peripheral07:13
SwimmingCodewell, I can confirm that at least for `add_uart` it doesn't.07:14
_florent_currently, you'll have to copy the code from add_uart: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L985-L100007:17
tpbTitle: litex/soc.py at master · enjoy-digital/litex · GitHub (at github.com)07:17
_florent_and rename your uart to uart1 , 2, 3 for example07:17
_florent_in the future, we could allow add_method to support multiple instances, but for now it's not the case07:18
SwimmingCodeyeah, that's about where I was headed, I just know what it's like to write the software to handle this and it's less than ideal07:23
SwimmingCodewell, thanks for at least pointing me in a direction07:24
_florent_SwimmingCode: i would be happy to see if we can improve this if this does not break things for previous designs, enabling multiple instances with add_uart would not be too complicated, you would still have uart0, uart1, uart2, etc.. submodules07:27
SwimmingCodedoes migen/litex have the ability to group instances of a peripheral or is it just based on the order of declaration?07:32
_florent_You could create a submodule with multiple instances, but each instances would still have its own CSRs07:35
*** kgugala_ has joined #litex07:56
*** kgugala__ has joined #litex07:59
*** kgugala has quit IRC08:00
*** kgugala_ has quit IRC08:01
*** kgugala has joined #litex08:08
*** kgugala__ has quit IRC08:08
*** kgugala_ has joined #litex08:10
*** kgugala has quit IRC08:14
*** indy has joined #litex08:49
*** st-gourichon-fid has joined #litex08:57
*** gregdavill has joined #litex09:21
somlo_florent_: I have to get in the habit of checking for shifting CSRs every time something seems to "break" :)09:39
somloor maybe work on a building DTB into the bios automatically :)09:40
*** proteusguy has joined #litex09:52
*** _whitelogger has quit IRC10:21
*** _whitelogger has joined #litex10:23
*** scanakci has quit IRC11:05
*** FFY00 has joined #litex12:16
*** trabucayre has joined #litex12:51
st-gourichon-fidHi all! Here using LiteX, design similar to FOMU, with an external more powerful CPU.  FPGA becomes dedicated to I/O and real-time tasks.  FOMU's VexRISCV softcore is FPGA-friendly, fully OSS workflow, yet still big.  32bit CPU not needed for such an I/O chip.  OpenCores lists smaller CPU softcores.  Would be fun to use e.g. A-Z80 which seems faithful to the battle-tested Z80, which I happen to know well.  Also, we only13:05
st-gourichon-fiduse Linux here, and so far only FLOSS.  Any recommandation for a CPU that would play well with LiteX inside an ICE40?13:05
zypyou could try serv if small and slow is suitable for your needs13:09
st-gourichon-fidhttps://www.librecores.org/olofk/serv ?13:10
tpbTitle: SERV - the SErial RISC-V CPU @ LibreCores: SERV - The SErial RISC-V CPU (at www.librecores.org)13:10
zypyes, it's already supported by litex13:10
st-gourichon-fidbit-serial CPU... that reminds me of the Saturn CPU of the HP-48. 64bit registers, 4bit hardware bus.  Kind of intermediate.13:12
* st-gourichon-fid browses http://fpga-guru.com/files/supercn.pdf13:13
st-gourichon-fidIt might be enough.13:20
* st-gourichon-fid watches https://diode.zone/videos/watch/0230a518-e207-4cf6-b5e2-69cc0941101313:20
*** gregdavill has quit IRC13:38
st-gourichon-fidOkay, the TinyFPGA Bx with its ICE40 has a Core Score of 16, which means it can host 16 RISC-V SERV processors.  Continuing video for information about speed.  Thanks zyp for the hint.13:51
*** kgugala has joined #litex13:53
*** kgugala_ has quit IRC13:55
st-gourichon-fidNo real hint about speed, but since SERV can power an I/O chip providing video interface for IR cameras used by mainstream FLIR company, it may be good enough for an I/O chip like ours.13:56
st-gourichon-fidIncluding booting the main CPU as we discussed yesterday.13:56
zypI'd expect it to perform at about 1/32 of a non-serial rv32 implementation13:56
*** kgugala_ has joined #litex14:02
st-gourichon-fidzyp, even when writing one byte, say, to drive a UARTbone?14:03
zypyeah?14:04
zypwell, idk14:04
zypwhy not just test it with a real world usecase? litex already supports it, so if you already have a suitable platform, you just have to pass --cpu-type serv14:05
zypI ran some tests on a cle-215 a couple of weeks ago, with both rocket and serv: https://paste.jvnv.net/view/WFsom https://paste.jvnv.net/view/LewaN14:06
tpbTitle: JVnV Pastebin View paste – Untitled (at paste.jvnv.net)14:06
*** kgugala has quit IRC14:06
zypand the difference in memtest speed is on the order of 40x14:06
zypbut then again the rocket is rv6414:07
*** FFY00 has quit IRC14:21
*** atommann6 has joined #litex15:15
atommann6Hi, I have a quick question: Does KC705 supports booting from a SDCard? I want to give it a try.15:16
*** atommann6 has quit IRC15:26
*** FFY00 has joined #litex15:45
*** FFY00 has quit IRC15:46
*** FFY00 has joined #litex15:47
*** FFY00 has quit IRC15:48
_florent_atommann6: (if you read the logs) yes, it has been added and tested15:49
*** FFY00 has joined #litex15:50
*** atommann91 has joined #litex15:58
atommann91_florent_ Thank you. I see your message in the log. My Internet connection is not stable.15:59
atommann91I' thinking if I use a Wi-Fi enabled SDCard, that will be convenient to update the files.16:05
*** atommann91 has quit IRC16:11
somlo_florent_: what board are you using with the latest litesdcard changes? With nexys4ddr (and rocket), it hangs for me at "booting from sdcard in sd-mode / booting from boot.json...", with no fall-through to netboot or the bios command line16:42
*** FFY00 has quit IRC16:44
*** FFY00 has joined #litex16:45
*** Skip has joined #litex16:59
*** scanakci has joined #litex17:07
*** daddesio has quit IRC17:15
*** zyp has quit IRC17:15
*** zyp has joined #litex17:18
*** Degi has quit IRC17:18
*** daddesio has joined #litex17:18
*** Degi has joined #litex17:25
*** zyp has quit IRC17:26
*** kgugala_ has quit IRC17:26
*** jordigw has quit IRC17:26
*** acathla has quit IRC17:26
*** somlo has quit IRC17:26
*** zyp has joined #litex17:29
*** kgugala_ has joined #litex17:29
*** jordigw has joined #litex17:29
*** acathla has joined #litex17:29
*** somlo has joined #litex17:29
scanakci_florent_: sure. Does an email work for you?17:42
st-gourichon-fidzyp thanks for your reply about SERV and byte-size writes. We will probably try.18:10
*** tcal has joined #litex18:20
*** kgugala has joined #litex18:44
*** kgugala_ has quit IRC18:46
*** kgugala has quit IRC18:56
*** kgugala has joined #litex18:56
*** Skip has quit IRC19:01
_florent_somlo: i'll continue working on it tomorrow but upstream was working with litex_sim --with-sdcard and on trellisboard with 16MHz clock19:09
_florent_scanakci: yes sure19:11
*** sajattack[m] has quit IRC19:45
*** disasm[m] has quit IRC19:45
*** nrossi has quit IRC19:45
*** disasm[m] has joined #litex19:47
*** nrossi has joined #litex19:47
*** sajattack[m] has joined #litex19:50
*** tcal has quit IRC20:02
*** tcal has joined #litex20:16
somlo_florent_: hangs for me on trellisboard the same way as on nexys4ddr -- maybe it's a 32-vs-64-bit thing...20:24
tcal...also, are there any examples of accessing the Litex timer (or other performance information) from the user side in Zephyr?20:35
somlo_florent_: doesn't seem to be a 32-vs-64-bit thing, at least not on nexys4ddr20:42
_florent_somlo: ok thanks, there are still some changes i want to do, once done i'll do more tests on various boards/configurations20:47
somloin an unrelated train of thought, i wonder how many fpu-enabled rocket cores I can cram in on a genesys2 board... apparently it's getting delivered tomorrow, so I'll have to find out :)21:08
*** st-gourichon-fid has quit IRC21:09
*** Skip has joined #litex21:26
*** CarlFK has quit IRC22:04
*** Skip has quit IRC22:11
*** CarlFK has joined #litex22:16
*** gregdavill has joined #litex22:22
*** gregdavill has quit IRC22:36
*** tcal is now known as tcal-x23:06
*** tcal-x is now known as tcal23:08
*** gregdavill has joined #litex23:39
*** kgugala has quit IRC23:41

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