Thursday, 2020-03-19

*** tpb has joined #litex00:00
*** CarlFK has quit IRC00:02
*** futarisIRCcloud has joined #litex00:36
xobsIf someone is bored and is looking for a project to help with litex: https://interrupt.memfault.com/blog/code-size-deltas01:40
tpbTitle: Tracking Firmware Code Size | InterruptTracking Firmware Code Size (at interrupt.memfault.com)01:40
*** Degi_ has joined #litex02:17
*** Degi has quit IRC02:21
*** Degi_ is now known as Degi02:21
*** _whitelogger has quit IRC03:54
*** _whitelogger has joined #litex03:56
*** gregdavill has quit IRC04:45
*** gregdavill has joined #litex05:10
*** _whitelogger has quit IRC05:21
*** _whitelogger has joined #litex05:23
*** _whitelogger has quit IRC05:57
*** _whitelogger has joined #litex05:59
*** CarlFK has joined #litex06:19
*** CarlFK has quit IRC06:51
*** _whitelogger has quit IRC07:45
*** _whitelogger has joined #litex07:47
*** _florent_ has quit IRC08:08
*** daveshah has quit IRC08:08
*** pdp7 has quit IRC08:09
*** _florent_ has joined #litex08:09
*** daveshah has joined #litex08:09
*** pdp7 has joined #litex08:10
*** futarisIRCcloud has quit IRC09:15
lambda_florent_: sorry, didn't have any time to follow up with the litedram interface yesterday. so do I understand correctly that wdata_ready is only ever asserted after (cmd_ready & cmd_valid)? so for a write, I can assert cmd_valid until cmd_ready, then assert wdata_valid until wdata_ready?09:31
*** _whitelogger has quit IRC10:12
*** _whitelogger has joined #litex10:14
*** futarisIRCcloud has joined #litex11:03
pdp7anyone know if the ECP5 with LiteDRAM uses hard IP for SDRAM interface?11:17
gregdavillpdp7: It's all soft IP doing the heavy lifting. The only hard IP is the I/O registers (DQS and DLL blocks).11:45
daveshahFor SDRAM there are no ecp5 specific primitives used at all11:58
*** gregdavill has quit IRC12:05
pdp7thanks daveshah and greg12:08
*** _whitelogger has quit IRC13:50
*** _whitelogger_ has joined #litex13:53
somlo_florent_: I saw you applied a bunch of spi-mode sdcard patches, including an spi-mode set of pins for the nexys4ddr; there's no gatware-side changes that I could see, so I'm wondering how I'd go about using the sdcard slot on the nexys4ddr in spi mode with the new software driver?15:52
somlo(not that that's going to help me with the trellisboard, just being curious :)15:53
sajattack[m]hey _florent_ glad you got sdcard booting merged, just noticed the sd card pins are under _mister_sdram_module_io. Maybe a quick patch to just rename it _mister_io or something is in order?16:49
sajattack[m]somlo: I believe it's a bios change16:50
somlosajattack[m]: there's this: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/bios/main.c#L39817:08
tpbTitle: litex/main.c at master · enjoy-digital/litex · GitHub (at github.com)17:08
somlowhich presumes something generates "CSR_SPISDCARD_BASE" in include/generated/csr.h17:09
somloand so far I couldn't find where that happens :)17:09
*** dasdgw42 has joined #litex17:40
pdp7anyo think it is feasible to modify the litex-hub/fpga_101 tutorial to use the ice40 Fomu instead of Nexys4DDR?17:50
awygledaveshah: we're actually using the DLL and DQS blocks now? what about for e.g. DDR2?18:49
daveshahOnly for DDR318:49
daveshahDDR2 isn't supported for ECP5 atm18:49
daveshahBut for DDR3 the DDRDLL, DQSBUF and DQS I/O/T DDR primitives are all used18:50
*** CarlFK has joined #litex18:57
awyglei see18:59
awygleare those likely to be necessary for DDR2?19:00
daveshahYes, probably19:00
daveshahI don't think DDR2 should involve masses of changes19:01
daveshahBut I don't know of any boards with it that could be used for testing19:01
* awygle has a board with it that needs testing19:01
awygleidk what any of those primitives actually do tho. was hoping to do it with just the DDR and/or SERDES primitives.19:02
daveshahThe problem with the non DQS primitives is you can't do both 4:1 input and output at the same time19:03
daveshahJust using the DDR primitives as 2:1 would work fine at lower rates though19:03
awygleyou're saying you can't have an ISERDES and OSERDES on the same pin?19:03
daveshahYou mean IDDRX2F and ODDRX2F? No that's not officially allowed19:04
daveshahI don't know whether that's a hardware limitation or just a Diamond limitation19:04
awyglehm. weird.19:05
awygleis that in the docs somewhere or just diamond will yell at you?19:08
sajattack[m]somlo: maybe this commit is useful to you https://github.com/litex-hub/linux-on-litex-vexriscv/commit/2d232e9cb1932d0add2926fe8afb1b15f1993fb119:09
tpbTitle: make/soc_linux: add SPI SDCard support and enable it on Nexys4DDR/De1… · litex-hub/linux-on-litex-vexriscv@2d232e9 · GitHub (at github.com)19:09
somlosajattack[m]: ah, that's the part I was wondering about, thanks!19:19
sajattack[m]_florent_:  would it make sense to either have the sdclk command effect spi sd cards or add another one19:39
_florent_somlo: the SDCard in SPI mode is using the SPIMaster of LiteX. That's not replacing the current work with LiteSDCard, but that's convenient for minimal SDCard support with very low resource usage.20:29
sajattack[m]ok20:30
_florent_sajattack[m]: for now the clock is not configurable with the SPIMaster, but i'll work on that20:30
sajattack[m]thanks20:30
_florent_sajattack[m]: ah, for the sdclk command, was it the argument when building linux-on-litex-vexriscv or the command from the BIOS?20:31
sajattack[m]yeah the command in the bios, I was looking at it thinking maybe I could use it with the spisd and then realized it was different20:32
sajattack[m]but it seems my particular sdcard only works at 400khz anyways20:33
_florent_that's the default setting here: https://github.com/litex-hub/linux-on-litex-vexriscv/blob/master/soc_linux.py#L11920:33
tpbTitle: linux-on-litex-vexriscv/soc_linux.py at master · litex-hub/linux-on-litex-vexriscv · GitHub (at github.com)20:33
sajattack[m]yeah20:33
sajattack[m]I was messing with that and it only works at 40020:34
_florent_with the SDCard i tested, 16MHz was fine20:34
sajattack[m]I tried 25MHz and 4MHz20:34
pdp7_florent_: has anyone ever talked about doing an ASIC with Linux-on-LiteX-VexRiscv?20:36
_florent_the plan is to add dynamic clock divider to the SPIMaster and do the initialization at 400KHz, get the maximum support freq from the initialization, and reconfigure the divider20:36
sajattack[m]col20:37
sajattack[m]*cool20:37
somlo_florent_: I assume that SPI-mode SDCard is only supported on a very specific subset of Xilinx boards (I think it's even mentioned in the nexys4ddr manual that it's used internally to load bitstream off the sdcard as an option)20:38
somloand so unless one's board is specifically wired for it, it's not available -- just so I don't waste time thinking about it in regards to the trellisboard :)20:39
daveshahNo, no special wiring is needed for it20:39
daveshahIt's the same pins but with different functions20:40
_florent_pdp7: that would be great to create an ASIC,  but for a first one it should be something very simple with simple clocking, so maybe something similar to the SoC we are using on boards with SDRAM.20:41
somlodaveshah: so it *should* work on the trellisboard, if we add the right pads to the platform file?20:43
pdp7Yes, that is thought.  I met Staf, chips4makers, recently.  He is doing 350nm tapeout in July. He asked me about possibility of RV Linux as he saw me talking about the HaD badge20:43
daveshahYeah20:43
pdp7Staf thinks the VexRiscV with SDRAM would be doable20:43
_florent_somlo: SPI-mode for SDCard the kind of simple and minimal mode. It uses 1 wire for the datas instead of the 4.20:43
_florent_somlo: i also tested it on ULX3S today, so it will work on the Trellisboard :)20:44
pdp7But he is not familiar with it or LiteX.  So basically he could help with the tape out (his project is retro 6502) but needs people interested in working on this Linux chip which would go on the water too20:44
somlook, I have to try it out now20:44
pdp7Basically, as long as there is nothing special about Linux-on-LiteX-VexRiscv, like hard FPGA IP, Staf thinks it is possible.  I'm very much a newbie so I thought I would raise the to see if there is interest20:45
_florent_pdp7: what is difficult when creating an ASIC are the clocking/IOs/Analog/Memories. If you have a design that is fully synchronous (the case of the Linux-on-LiteX-Vexriscv SoC with SDRAM), with synchronous memories and simple IOs, it should not be too complicated.20:48
pdp7That is good to hear20:49
daveshahI suspect you'd have to reduce the cache size a bit to get it to fit into Staf's constraints21:05
daveshahSRAM is comparatively expensive in ASICs compared to FPGAs21:06
daveshahBut it would be a cool project!21:06
*** rohitksingh has joined #litex21:33
*** rohitksingh has quit IRC21:35
*** rohitksingh has joined #litex21:35
*** rohitksingh_ has joined #litex21:59
*** rohitksingh_ has quit IRC21:59
pdp7_florent_ Staf wasn't sure if posting on litex-linux mailing list was appropriate so I thought I'd ping irc first22:03
pdp7sounds like it is reasonable idea22:03
pdp7I'm wondering how the emulator would work22:22
pdp7in ASIC context22:22
daveshahProbably not something you'd want burnt into ROM forever22:30
daveshahMore like just load it from SPI flash like everything else imo22:30
pdp7good iea22:32
pdp7*idea22:32
daveshahIf the pressure on area was really high some kind of SPI XIP might be an option too but that would carry a performance cost22:33
pdp7thanks for the insight, do you know of an RV system that is doing SPI XIP?23:00
daveshahpicosoc does23:03
daveshahI think LiteX supports it too23:03
somloha, it's fat16 only... gotta reformat my sdcard...23:59

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