Tuesday, 2021-07-27

*** tpb <[email protected]> has joined #litex00:00
*** Degi <[email protected]> has quit IRC (Ping timeout: 265 seconds)01:27
*** Degi <[email protected]> has joined #litex01:31
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)05:09
*** TMM_ <[email protected]> has joined #litex05:10
_florent_cr1901: The cached/uncached regions based on the MSB was from MiSoC, it was a simple way to define cached/uncached regions but not flexible enough and limiting address space to 2GB, so this has been removed: we now define cached/uncached regions explicitly06:20
_florent_cr1901: regarding VexRiscv-SMP/UART_POLLING: I know we started with it since it simplifies bringing up a new core but don't remember if there was a reason so keep it. I'll have a look06:23
_florent_cr1901: That's probably to avoid developing specific IRQ code just for the LiteX BIOS / VexRiscv-SMP: The interrupt controller is different from the non-SMP and already supported by Linux, so we just switched the BIOS to polling mode to avoid extra developments.06:32
*** analognoise <[email protected]> has quit IRC (Remote host closed the connection)07:07
*** michalsieron <[email protected]> has joined #litex07:16
*** Coldberg <[email protected]> has quit IRC (Ping timeout: 255 seconds)09:02
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)12:29
*** TMM_ <[email protected]> has joined #litex12:29
promach[m]for litedram on xilinx platform, does it use any tuneable PLL dynamic phase shift mechanism to achieve DQS centering purpose ?12:42
promach[m]https://www.xilinx.com/support/documentation/user_guides/ug382.pdf#page=6512:42
* promach[m] uploaded an image: (175KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/NqjvKtCaWYBbDDOqvyreYhiW/image.png >12:42
chiefwigmshey _florent_ - ever get a chance to look at ultrascale+ eth?12:48
_florent_chiefwigms: sorry, I'm not able to spend the time required to investigate currently, in case you want to speed this up and want to fund this work, I could maybe ask a colleague to look at it13:15
_florent_promach[m]: On Artix7, we are using a fixed phase shift (for write DQS) and ignoring DQS on read (by centering data window). On Kintex7/Ultrascale(+) we use the ODELAY primitives to configure the write DQS and are also ignoring the DQS on read. 13:24
*** Coldberg <[email protected]> has joined #litex13:59
*** _whitelogger <[email protected]> has quit IRC (Remote host closed the connection)14:45
*** _whitelogger <[email protected]> has joined #litex14:46
DerekKozel[m]_florent_: I'm back doing some packaging and testing with the CLE-215 and the litepcie kernel/user libraries, and I think I've forgotten some of my lessons learned from last time.15:01
DerekKozel[m]The csr.h and soc.h from the latest litex build of the sqrl_acorn target seem reasonable, but the litepcie/software/kernel/Makefile is expecting csr.h and generated/soc.h paths, then fails because it can't find stdint.h, which certainly exists15:06
promach[m]<_florent_ "promach: On Artix7, we are using"> _florent_: what do you exactly mean by **ignoring DQS on read (by centering data window).** ?15:07
promach[m]and what about spartan-6 ?15:07
_florent_promach[m]: I mean we are not sampling the read data directly with DQS but just centering the sampling window with IDELAYs15:23
_florent_DerekKozel[m]: for the15:25
_florent_DerekKozel[m]: sorry, for the  Acorn, the way I'm testing it:15:26
_florent_./sqrl_acorn.py --with-pcie --build --load --driver15:26
*** rom <rom!~rom@2405:4802:9013:d6d0:c0c5:1666:6558:caa6> has joined #litex15:26
_florent_the copy the driver directory to the machine with the Acorn15:26
romhi, I'm currently working with vexriscv-smp, and I'm looking for a way to export the dram bus 15:27
_florent_the/then15:27
_florent_cd kernel15:27
_florent_make15:28
_florent_sudo ./init.sh15:28
DerekKozel[m]Thanks. I'll try that right now.15:28
_florent_you can then do a dmesg and should see the litepcie traces15:28
_florent_once it's ok, go to user directory15:28
_florent_make15:28
DerekKozel[m]I'm building on the machine with the Acorn installed, trying to set it up for a masters student who's going to do a project with it15:28
rombasically, I'm doing a test chip, and we don't have the DRAM IP yet, so I'm trying to export the memory bus (AXI, wishbone, whatever) and connect the test chip to the FPGA to use the FPGA's DRAM IP15:28
_florent_litepcie_util info15:28
_florent_litepcie_util dma_test15:29
_florent_litepcie_util help for the available commands15:29
DerekKozel[m]Thanks15:30
DerekKozel[m]I was missing --driver15:30
_florent_rom: Hi, if you can to use LiteX for this, you could have the LiteX SoC with it's DRAM running on the FPGA and just expose the main bus of the SoC or a LiteDRAM interface15:31
_florent_to expose a Wishbone or AXI-Lite interface, you can look at: https://github.com/enjoy-digital/litex/blob/master/litex/tools/litex_gen.py#L133-L15015:32
rom_florent_: well, basically, we want the LiteX SoC on a chip, but we don't have the DRAM IP for chip fabrication (yet), so we're doing a workaround using FPGA's DRAM IP15:33
_florent_this will work, but will probably be a bit slow compared the the speed that can handle LiteDRAM15:33
romexpose a bus is our last option though15:33
_florent_if you want more speed, you can expose a port from LiteDRAM15:33
_florent_for a Native port: https://github.com/enjoy-digital/litedram/blob/master/litedram/gen.py#L592-L61615:34
_florent_for an AXI port: https://github.com/enjoy-digital/litedram/blob/master/litedram/gen.py#L640-L69315:34
_florent_rom: ah sorry, so you want to have a LiteX SoC and connect it the the vendor's FPGA's DRAM IP?15:35
_florent_so get rid of LiteDRAM if I understand correctly?15:36
rom_florent_ please let me explain more on the matter :D  15:36
_florent_rom: sure15:36
romthe LiteX SoC is a chip (VLSI design), fabricate using TSMC 180nm, which will serve as a test chip15:37
romoriginal plan is for it to use SDRAM15:37
romdue to pandemic (guh...), we can't finish the SDRAM test on time15:37
romso we switch to use DDR15:37
rombut we don't have the IP core for DRAM (in VLSI), so we need to design a LiteX SoC with exposed memory bus, to be used with an external memory controller + PHY (which is our FPGA)15:38
rom"exposed", as in real GPIO pins on the chip15:38
romI hope the explaination is clear enough15:39
romthe use case is... rather unusual though15:39
rom[Chip] <-- AXI/Wishbone --> [DRAM controller on FPGA]15:41
romsomething like this15:41
romand the thing I'm asking is how can I export the AXI/Wishbone/BMB (or whatever) bus, to use my own configuration like that?15:42
rom(btw, I like LiteX, a lot easier to use than other stuffs like Chipyard or Rocketchip)15:43
_florent_rom: ok I see, but exposing a full bus will consume quite a bit of IOs, won't it be an issue? You'll probably want to do some adaptation to it to reduce the number of IOs (ex bidir data)15:43
romif LiteX support the adaption, I'd be more delight to hear it15:43
romotherwise, I think I have around 50 IO? or 100? to work with15:44
promach[m]<_florent_ "promach: I mean we are not sampl"> what about spartan-6 ?15:44
romI'd love to reduce the number of IO down though15:44
_florent_promach[m]: For Spartan6 we were using a fixed bitslip/delay which required manual adjustments by the user. We should update the Spartan6 PHY to make it similar to 7-series (but Spartan6 is a bit old... so not sure it's very useful to spend time improving it)15:48
_florent_rom: The default integration of VexRiscv-SMP in LiteX is tighly coupled to LiteDRAM: each CPU has two direct interface to LiteDRAM (ibus and dbus): 15:51
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/cpu/vexriscv_smp/core.py#L424-L45615:51
_florent_So this  will consume even more IOs for your case15:52
_florent_You will then have to use the Wishbone Memory interface15:52
_florent_which connects VexRiscv-SMP to the main bus of the SoC, and then connects to LiteDRAM through the L2 cache15:53
romoh, access speed doesn't really matter in this case btw15:53
_florent_this is slower, but will be better for your case15:53
romwe just want a proof that it worked as a chip15:53
_florent_to do what you can, you can then configure VexRiscv-SMP to use the Wishbone interface15:55
_florent_and then modify add_sdram here: 15:55
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L1342-L138215:55
_florent_and instead of connecting to the L2 Cache to LiteDRAM, connect it to an exposed interface15:56
_florent_to expose a Wishbone interface, you can use code similar to: https://github.com/enjoy-digital/litex/blob/master/litex/tools/litex_gen.py#L133-L13915:58
promach[m]<_florent_ "promach: For Spartan6 we were us"> what do you exactly mean by **fixed bitslip/delay which required manual adjustments** ?16:01
_florent_On 7-Series/Ultrascale, the adjustment is done automatically by software, on Spartan6 it was not the case and had to be done manually by the user16:02
*** futarisIRCcloud <[email protected]> has quit IRC (Quit: Connection closed for inactivity)16:03
promach[m]<_florent_ "On 7-Series/Ultrascale, the adju"> _florent_: ok, but how **manually** ?16:03
_florent_https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/saanlima_pipistrello.py#L174-L17616:04
promach[m]_florent_: why `rd_bitslip = 1` while `wr_bitslip = 3` ?16:05
rom_florent_: could you elaborate more on the code? I did not get this parts yet16:10
_florent_promach[m]: that's the manual adjustement :) (found by testing on hardware)16:10
_florent_rom: This code is creating a bridge between the main bus of the SoC and LiteDRAM, so that's where you'll  want to deconnect LiteDRAM and instead expose it16:11
promach[m]_florent_: you mean on spartan-6, there is no IDELAY primitive involved during read operation ?16:11
promach[m]because I suppose bitslip is a feature specific to ISERDES2 primitive16:11
_florent_promach[m]: I don't remember exacly why the IDELAY was not used in the Spartan6 PHY (I however remember that Spartan6 IDELAY had limitation, like only capable of storing one transition, so this was maybe the reason)16:13
rom_florent_: thanks, I got the part that it connect LiteDRAM, but didn't quite get how to expose the bus yet16:20
_florent_promach[m]: Also bistlip from Xilinx primitives can be tricky to get working correctly/understand since not well documented. For 7-Series/Ultrascale I moved it to the fabric to simplify things16:21
_florent_rom: that's the second link :)16:22
_florent_rom: with this: https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/soc.py#L1354-L1356 you can create a Wishbone Slave on the main bus16:24
_florent_and you will then have to expose it16:24
_florent_with something like: 16:25
_florent_platform.add_extension(wb_sdram.get_ios("wb"))16:25
_florent_wb_pads = platform.request("wb")16:25
_florent_self.comb += wb_sdram.connect_to_pads(wb_pads, mode="slave")16:26
_florent_(and maybe adapt mode to "master")16:26
promach[m]_florent_: but still `wr_bitslip = 3` is a bit strange to me16:28
rom_florent_: thank you. The explanation is very clear16:29
rom:D16:29
romI'll run along and generate a design to test on my board16:29
promach[m]_florent_: and what do you mean by **storing one transition** ?16:29
_florent_IIRC the delay line was only able to store an edge/transition16:30
rom_florent_: is there any way to generate a litedram controller with the exposed wishbone bus too? For use with this SoC.16:30
_florent_This can be an issue if the period of the input signal is shorter than the delay line16:31
romI'll have to connect the 2 of them manually for testing now16:31
promach[m]<_florent_ "IIRC the delay line was only abl"> I am confused with your sentence16:31
promach[m]<_florent_ "This can be an issue if the peri"> why would this be the case for spartan-6 only ?16:33
_florent_Probably related to a hardware issue, that's also one of the reason to avoid Spartan6 :)16:35
_florent_https://www.xilinx.com/support/answers/38408.html16:35
_florent_7-series is much better16:36
promach[m]_florent_: any reason why you not choose to use PLL dynamic phase shift feature in lieu of IODELAY2 primitive ? 16:41
promach[m]https://www.xilinx.com/support/documentation/user_guides/ug382.pdf#page=6516:41
_florent_On Spartan6 we are using a fixed phase shift for DQS generation16:45
_florent_dynamic add flexibility, but we were doing it manually16:46
_florent_adds16:46
promach[m]_florent_: you could do this manually for write operation, but for read operation, it seems not feasible given that the incoming read DQS and read DQ signals are not really in phase with the FPGA's PLL clock16:47
*** rom <rom!~rom@2405:4802:9013:d6d0:c0c5:1666:6558:caa6> has quit IRC (Quit: Ping timeout (120 seconds))18:15
*** chiefwigms <[email protected]> has quit IRC (Quit: Client closed)19:05
*** rom <rom!~rom@2405:4802:9013:d6d0:c0c5:1666:6558:caa6> has joined #litex19:34
gatecatone of the problems with AXI or Wishbone externally is they are synchronous to one side only21:08
gatecatwhereas for external busses you ideally want source synchronous - ie clocks in either direction21:08
*** michalsieron <[email protected]> has quit IRC (Ping timeout: 268 seconds)22:14
*** pftbest <[email protected]> has joined #litex23:43

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