Wednesday, 2021-05-05

*** tpb has joined #litex00:00
*** rj has quit IRC00:03
*** jon__ has joined #litex00:04
*** pftbest has joined #litex00:05
*** jon_ has quit IRC00:07
*** rj has joined #litex00:08
*** Degi_ has joined #litex00:10
*** pftbest has quit IRC00:10
*** Degi has quit IRC00:13
*** Degi_ is now known as Degi00:13
*** rj has quit IRC00:33
*** rj has joined #litex00:40
*** kgugala has joined #litex00:41
*** jon__ has quit IRC00:42
*** jon_ has joined #litex00:43
*** rj has quit IRC01:05
*** jon_ has quit IRC01:56
*** jon_ has joined #litex01:57
*** boardrunner has joined #litex02:11
boardrunnertrying to get the usb3_pipe example running either on NeTV or Versa, but when I run ./versa_ecp5.py the .v file that is generated can't be synthesized because sys_rst is driven by multiple outputs: ERROR: Net 'bridge_count_TRELLIS_FF_Q_CE[0]' is multiply driven by cell ports FD1S3BX_1.Q and FD1S3BX_5.Q02:18
boardrunnerany ideas what might be happening?02:18
boardrunnerhere are a few more lines when trying to run build_lattice_versa_ecp5.sh to synthesize the design: https://pastebin.com/XLPHzm0a02:21
tpbTitle: 20.51. Executing CHECK pass (checking for obvious problems).Checking module la - Pastebin.com (at pastebin.com)02:21
*** proteusguy has quit IRC03:15
*** boardrunner has quit IRC03:52
*** Bertl is now known as Bertl_zZ04:00
*** boardrunner has joined #litex04:15
*** boardrunner has quit IRC04:18
*** chipdsgr has joined #litex04:18
*** jon_ has quit IRC04:33
*** jon_ has joined #litex04:49
*** jon_ has quit IRC05:37
*** pftbest has joined #litex05:46
*** pftbest has quit IRC05:46
*** pftbest has joined #litex06:07
*** pftbest has quit IRC06:11
*** pftbest has joined #litex06:17
_florent_boardrunner: I just fixed the usb3_pipe build with https://github.com/enjoy-digital/usb3_pipe/commit/d6e27d7d35503b3356b937e477e2a13ff98f546e (was related to the reset now directly integrated in the ECP5PLL wrapper) and also did small simplifications that are now possible with LiteX.07:54
_florent_but this project was an experiment and I would still recommend having a  USB3 analyzer when testing it. The ECP5 port was not very stable but the Artix7/Kintex7 port was able to enumerate correctly and have the link stay up (but not with all computers).07:57
_florent_You can also look at Luna project that used this work as a basis for the USB3 support, there are probably been various improvements but I'm not well aware of them08:03
_florent_there are/there has08:03
chipdsgrdid you use the ECP5-5G dev kit? (wondering if the lack of 5Gbps SERDES could have been the reason for the lack of stability)08:21
*** RaivisR has joined #litex08:26
chipdsgrbtw awesome fast fix :D I'm able to synthesize things now, thanks!08:27
RaivisRgood time of day, I noticed interesting thing, every time I re-build simple design for ecp5, sys_clk max frequency reported is different. no changes to the design itself. is it a known thing?08:29
*** rom16 has joined #litex08:43
rom16hi, I'm currently using Litex to generate SoC for testing on FPGA. I'm looking for a path to move the design from FPGA to ASIC (remove vendor IP, create blackbox, etc). Have anyone ever attempt this before?08:45
chipdsgrrom16: checkout OpenROAD/OpenLane and the skywater project for people experimenting going from RTL to ASIC08:47
rom16we have access to commercial tools so no need for the skywater project. We already have experience going from RTL to ASIC. The problem is the RTL generation from Litex08:48
rom16(thanks for the tips though)08:48
rom16I'm using Litex because Chipyard is a mess. Had one chip taped-out from it and it's just horrible to continue our work with it.08:49
chipdsgroh wow, very cool! out of curiosity what tools did you use to do the layout of that design?08:54
Melkhior@rom16 Would be nice to have an ASIC version of Litex, no idea about seasibility. Assuming you're looking for a RISC-V SoC generator, maybe you can investigate https://www.esp.cs.columbia.edu/ as I think they're targeting ASIC as well08:59
tpbTitle: ESP - open SoC platformESP | ESP - open SoC platform (at www.esp.cs.columbia.edu)08:59
Melkhiors/seasibility/feasibility/09:01
rom16chipdsgr I use the standard industry tools: DC for synthesis, ICC2 for PnR, PT for STA and Calibre for DFM09:02
rom16Melkhior I'm aiming to do it using Litex, probably going to take a month or 2 (it's just a master thesis, not my main job so it's going to take a bit of time)09:03
rom16planned to do the LiteDRAM for Altera parts (Cyclone IV) after the chip too09:04
Melkhior@rom16 a chip during a master thesis ? lucky you :-)09:04
rom16not during, before...09:04
rom16an IoT-oriented MCU with RISC-V core is my final thesis for M.S. (2.5 years from now)09:05
Melkhior@rom16 hehe kids today have all the luck:-)  #oldfart ;-)09:05
rom16@Melkhior I'm not doing all the things alone:D  I have a friend working on the analog portion of the chip for me09:07
Melkhior@rom16 ESP also has accelerators for AI in mind, which might be of interest fo you09:07
chipdsgrhow's it going to talk to the outside world?09:07
chipdsgrany RF?09:07
rom16we don't have any people with experience in RF IC design, so sadly no09:08
rom16I guess we can use a SPI-based external IC09:08
rom16and if we need DRAM, we also don't have any IP for it... so FPGA will have to serve as a medium for it09:09
Melkhior@rom16 So you would have an ASIC with not much external connection except some 'custom' stuff to an FPGA, then the FPGA talks to the outside world?09:15
rom16@Melkhior: I would have an ASIC with some external connection, except for some special connection which need an FPGA to function (DRAM is a PITA to do IP for)09:19
rom16(and some people called RF "black magic")09:19
Melkhior@rom16 OK, nice, hopefully Litex will fit the bill :-)09:19
rom16well, considered that writing python is familiiar and less error-prone than scala (looking at you Chisel!), I think the feasibility is high09:20
rom16I'll come back to this IRC or push something to github when I make some progress09:22
rom16stay tuned!09:22
_florent_rom16: interesting, to create ASIC with LiteX, the path would probably be to create build backend, similar to what we have for the different FPGA vendor, expect that you'll be targeting your ASIC toolchain with its own primitives09:41
_florent_This would already allow building the designs with simple primitives, then you could create specialized wrapped for the PLL, specialized PHYs for LiteDRAM, LiteETH, etc...09:42
_florent_But for simple LiteDRAM PHYs (ex SDRAM), simple LiteETH PHYs (ex MII, RMII), just adding the build backend should be enough since LiteX will be lowering the primitives automatically09:44
_florent_rom16: feel free to ask it you need directions to get started and setup your ASIC flow with LiteX, that was not the primary aim of the project but we see more and more interest for this09:50
rom16_florent_: thanks for the direction. I'm more of a RTL design engineer, so my approach would be almost similar. I'd like to replace the vendor IP with blackbox (only contain input and nothing else) so I'd be integrating the ASIC IP later on if I can.10:08
*** Bertl_zZ is now known as Bertl10:08
rom16and for the top chip IO, it would be similar to the board definition (I think, I haven't take a long look at it yet)10:12
rom16I don't really need the backend, since we already have a very solid backend at work. All I need for now is the synthesizable RTL.10:13
*** RaivisR has quit IRC10:21
*** RaivisR has joined #litex10:21
*** rom16 has quit IRC10:36
*** TMM has quit IRC10:44
*** TMM has joined #litex10:44
*** RaivisR_ has joined #litex11:38
*** RaivisR has quit IRC11:42
*** proteusguy has joined #litex12:14
*** Melkhior has quit IRC12:47
*** Melkhior has joined #litex12:57
somlofor anyone interested in getting Fedora to run on Litex, here's a link with all the gory details (and a qemu vm I used as "source") of what happened so far...  https://github.com/litex-hub/linux-on-litex-rocket/issues/10#issuecomment-82527648513:41
shoragansomlo, when trying to synthetize a rocket core with the code in https://github.com/litex-hub/pythondata-cpu-rocket, it complained that it couldn't find some port. are you using a different source?13:49
shoragan8.4.3. Analyzing design hierarchy..13:49
shoraganERROR: Module `ExampleRocketSystem' referenced in module `lambdaconcept_ecpix5' in cell `ExampleRocketSystem' does not have a port named 'resetctrl_hartIsInReset_0'.13:49
*** rj has joined #litex14:29
*** rj has joined #litex14:30
*** kgugala_ has joined #litex17:31
*** kgugala has quit IRC17:32
*** kgugala has joined #litex17:48
*** kgugala_ has quit IRC17:50
*** TMM has quit IRC18:08
*** TMM has joined #litex18:08
somloshoragan: assuming you have the latest of everything in litex, it might be about the yosys version -- mine is at git commit 26e01a6 (as of March 10 2021 or thereabouts)18:11
nickoeIs there a way to re-use the litex_server --jtag ... instance with the --load option?18:15
nickoefor the target scripts18:15
shoragansomlo, maybe it's related to https://github.com/enjoy-digital/litex/commit/116c2f15494af7cd51af74569f122ee245fd6eb4#diff-e8b2dd6d0203ed0aaf32e33305d3697381d4da6ec3f56dabe8470306e01cb0e9L12418:15
shoraganit's now defined as = Open()18:15
shoragansomlo, i've got yosys d061b0e41a2 and litex fb8f45be7330fd18:19
shoragani'll try with your version18:21
nickoeWhat does this vivado critical warning really mean? I have an Artix7.18:26
nickoeCRITICAL WARNING: [Timing 38-472] The REFCLK pin of IDELAYCTRL IDELAYCTRL is not reached by any clock but IDELAYE2 IDELAYE2_10 has REFCLK_FREQUENCY of 200.000 Mhz (period 5.000 ns). The IDELAYCTRL REFCLK pin frequency must match the IDELAYE2 REFCLK_FREQUENCY property value.18:26
shoragansomlo, even with yosys 26e01a67db, i get the same error. is your litex newer than 116c2f15494?18:26
*** acathla has quit IRC19:26
somloshoragan: I keep my litex sync-ed up with enjoy-digital (and litex-hub) upstream, so it's the newest available19:52
shoragansomlo, hmm. did you regenerate your rocket core?19:53
nickoeHmm, how does one buffer up a couple of words of serial data in a migen fsm?19:58
nickoeTo be consumed at a lower rate.19:58
somloshoragan: it's the rocket core currently in pythondata-cpu-rocket -- I should probably update it from chipsalliance/rocket-chip and see if any new breakage was introduced, but litex should work with the pythondata-cpu-rocket as is20:10
somloshoragan: what board are you building for?20:10
shoragansomlo, ecpix-5 85k20:10
shoraganyour prebuild bitstream works fine20:11
shoraganhmm, then i must be missing something else. i don't see how i'd get that 'resetctrl_hartIsInReset_0' error when using the same pythondata-cpu-rocket and litex20:12
somlohmmm... I just started a build for ecpix5 and am currently at "8.24.*" in yosys20:13
somlograsping at straws here, but maybe explicitly remove your build directory before restarting a build? Sometimes I get weird errors if I don't do that...20:14
shoragansomlo, i see "Warning: Max frequency for clock                   '$glbnet$sdrio_clk': 17.24 MHz (FAIL at 50.00 MHz)" in the log, but i heard that that is unlikely to be critical20:15
shoragansomlo, ok.20:16
*** acathla has joined #litex20:42
*** pftbest has quit IRC20:50
*** pftbest has joined #litex20:50
somlois there an example of how to set up linux (probably on vexriscv) to directly utilize the liteuart? Right now, I'm using "console=hvc0" in bootargs (and grepping through linux-on-lite-vexriscv I find the same thing there), and that essentially traps into machine mode and has the m-mode emulator deal with the UART (BBL in my case)21:18
shoragansomlo, there is drivers/tty/serial/liteuart.c, which binds to the "litex,liteuart" dt compatible. from looking at the source it should register ttyLXU021:28
shoragan(at least that's the way it would work on arm socs ;)21:29
somloshoragan: tried "console=ttyLXU0" in bootargs (have the liteuart compiled in the kernel, and the DTS obviously correct (since BBL uses it too before passing it to linux)21:31
somlobut I get nothing after BBL :(21:32
shoraganif you can boot a different way, it should show up in /proc/tty/drivers21:38
shoraganyou could test it with echo/cat/stty from there21:38
somloI see "liteuart   /dev/ttyLXU   253   0 serial"21:39
shoraganthen you should also have a /dev/ttyLXU021:42
somloif I then "mknod /dev/ttyLXU c 253 0" I can echo things into it and see them show up on the console  :)21:42
shoraganwith mount -t devtmpfs none /dev it should already be there21:42
shoraganso the driver works :)21:43
shoraganyou have CONFIG_SERIAL_LITEUART_CONSOLE=y?21:43
somloyes21:44
somlohm, I should mount devtmpfs in initrd, rather than have a few nodes manually created... Thanks for pointing that out :)21:46
somlo(still not sure why the booting kernel won't use the device if passed in on the kernel command line, but that's orthogonal :)21:46
shoragancheck /proc/cmdline and /proc/console21:47
shoraganto be sure that you don't have any other console (primary) console21:48
somloright now I have "console=hvc0" on the bootargs, and "hvc0 -W- (EC p  ) 229:0" in /proc/consoles; but that's how I got it to output anything at all -- if I set "console=ttyLXU0" in bootargs instead, I get nothing at all21:50
shoraganyou could try using earlycon via sbi, maybe you can see any error messages that way. i don't have any other ideas right now :/21:50
somlofair enough, thanks for the brainstorm :)21:50
shoraganmaybe ttyLXU0 needs a ,115200n8?21:51
shoraganhttps://patchwork.kernel.org/project/linux-riscv/patch/[email protected]/21:52
tpbTitle: [1/3] tty/serial: Add RISC-V SBI earlycon support - Patchwork (at patchwork.kernel.org)21:52
Melkhior@somlo the default command line for linux-on-litex-vexriscv is in the DTS https://github.com/enjoy-digital/litex/blob/bfb90f56251abb0b7164ec3506069591759c2998/litex/tools/litex_json2dts.py#L4921:53
Melkhior(e.g. it's where I replace console=liteuart by fbcon=map:0 to get the graphical console on the framebuffer)21:53
Melkhiorlate here, good night and good luck :-)21:54
somloso it's "console=liteuart" then, not "console=ttyLXU0" ?21:56
somlolet me try that...21:56
somloMelkhior -- thanks, that actually worked!21:59
*** pftbest has quit IRC22:58
*** pftbest has joined #litex23:04
*** lf has quit IRC23:12
*** lf has joined #litex23:13
*** pftbest has quit IRC23:16
*** pftbest has joined #litex23:36
*** pftbest has quit IRC23:41

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