Saturday, 2022-04-09

*** tpb <[email protected]> has joined #litex00:00
*** Guest94 <[email protected]> has joined #litex00:51
*** Guest94 is now known as triode00:53
*** triode is now known as subthreshold00:53
subthresholdHello and hope everyone is doing well! I have a couple of questions regarding the LPDDR4 DRAM model in the LiteDRAM repo.00:57
*** Degi <[email protected]> has quit IRC (Ping timeout: 248 seconds)00:57
subthresholdI would like to be able to use the Verilog generated by the toolchain in simulations with other PHYs.00:58
*** Degi <[email protected]> has joined #litex00:59
subthresholdHowever, currently I am having issues extracting this. I have instantiated an isolated LPDDR4Sim and have given it "pads          = LPDDR4SimulationPads()" in a barebone main function, and am using the convert function to emit verilog.01:01
subthresholdHowever, the inputs and outputs ports are missing/ incorrect and I suspect this is because of a lack of proper source-sink connection? Is there a recommened way for doing this.01:02
subthresholdThanks!01:02
*** Emantor <[email protected]> has quit IRC (Quit: ZNC - http://znc.in)01:20
*** subthreshold <[email protected]> has quit IRC (Ping timeout: 250 seconds)01:21
*** Emantor <[email protected]> has joined #litex01:22
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)02:04
*** TMM_ <[email protected]> has joined #litex02:04
*** Guest63 <[email protected]> has joined #litex02:09
*** nelgau_ <[email protected]> has joined #litex04:13
*** nelgau <[email protected]> has quit IRC (Ping timeout: 256 seconds)04:15
*** pavelow <[email protected]> has quit IRC (Quit: No Ping reply in 180 seconds.)06:08
*** pavelow <[email protected]> has joined #litex06:08
_florent_Hi subthreshold (if you read the logs), the PHYs have a DFI interface, but the generator to extract only the core would need to be written. This could probably be based on the LiteDRAM generator https://github.com/enjoy-digital/litedram/blob/master/litedram/gen.py and a fake PHY that would just expose the DFI interface. This would be at least a few hours to a few days of work, so I can only give direction on this. In the long term 06:30
_florent_it would also be nice to be able to use Xilinx's MIG PHYs (or Intel PHY) with LiteDRAM, but I'm waiting for an opportinity to do this (need on a project).06:30
*** Guest94 <[email protected]> has joined #litex06:45
*** Guest63 is now known as subthreshold06:48
subthresholdHi Florent, thanks for the guidance on this! So if I am understanding correctly, essentially i would need to sort of wrap the LPDDR4 DRAM model within a generator similar to the one you linked.06:51
subthresholdAlso, I am having a bit of trouble understanding (and perhaps this is arising from unfamiliarity with migen) why a barebones initialization of the LPDDR4 Model yields incorrect (or strange) ports. What is the underlying mechanism needed to generate these ports correctly?06:53
subthresholdIn a more concrete way, coming from a Verilog, if I declared input/outputs they would show up at the synthesized top-level.06:54
_florent_To do what you want, you could create a fake LPDDR4 with just the DFI interface and expose it as IOs (ie use the top part of S7LPDDR4PHY and replace the IOs primitives with exposition of DFI interfaces)06:55
_florent_or start from the model and do the same: https://github.com/enjoy-digital/litedram/blob/master/litedram/phy/model.py06:56
_florent_Here in LiteDRAM generator, you first have to create the IOs in the Sim platform06:57
subthresholdThanks - i will do some legwork on my side and see how it pans!07:02
*** Guest94 <[email protected]> has quit IRC (Ping timeout: 250 seconds)07:03
subthresholdHi Florent, I went to take a look at your links and I think I have a slightly different target in mind. In the system chain here:07:31
subthresholdMC --> LPDDR4 -->  // CUT //  LPDDR4 DRAM DEVICE07:31
subthresholdI would like to be able to utilize the LPDDR4 Device model as a standalone in another testbench. In essence, I'07:31
subthresholdd07:31
subthresholdlike to be able to expose the device ports (CKE, CA, DQ, DQS, etc.).  I'm actually trying to remove anything upstream (including the DFI interface) as I need to generate verilog representing the device alone for use in a standalone testbench outside the LiteX ecosystem07:34
subthresholdI just realized I made a typo in that tool chain word art. MC --> LPDDR4 PHY -->  // CUT //  LPDDR4 DRAM DEVICE07:35
*** Guest94 <[email protected]> has joined #litex08:07
*** Guest94 <[email protected]> has quit IRC (Ping timeout: 250 seconds)08:18
_florent_subthreshold: ok sorry, I see now. So you would need to create a generator for LPDDR4Sim.09:12
_florent_subthreshold: you could use the LiteSDCard generator as a basis (easier to follow than LiteDRAM generator): https://github.com/enjoy-digital/litesdcard/blob/master/litesdcard/gen.py09:12
_florent_subthreshold: replace the SDCard pads with the LPDDR4 pads09:12
_florent_https://github.com/enjoy-digital/litedram/blob/master/litedram/phy/lpddr4/simphy.py#L16-L2809:13
_florent_Then integrate the LPDDR4Sim in replacement of the SDCard core.09:13
_florent_And see here for the LPDDR4Sim parameters: https://github.com/enjoy-digital/litedram/blob/master/litedram/phy/lpddr4/simphy.py#L39-L4309:14
_florent_https://github.com/enjoy-digital/litedram/blob/master/litedram/phy/lpddr4/sim.py#L41-L5509:14
_florent_Sorry I was just passing by, I have to go09:14
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has quit IRC (Read error: Connection reset by peer)16:13
*** toshywoshy <toshywoshy!~toshywosh@ptr-377wf33o3bnthuddmycb.18120a2.ip6.access.telenet.be> has joined #litex16:14
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)17:33
*** TMM_ <[email protected]> has joined #litex17:33
*** Guest94 <[email protected]> has joined #litex20:50
Guest94Hi Florent (subthreshold here)! Thanks for guidance on that. I've more or less managed to do what you mentioned!20:51
Guest94However, one element that is difficult is:20:52
Guest94How we handle the tristate IO.20:52
Guest94For example, in the pads declaration there is: SimPad("dq", databits, io=True),20:53
Guest94converting to verilog, it turns this into: output reg [15:0] lpddr4simulationpads,20:53
Guest94and internally within the module it creates:20:54
Guest94reg [15:0] lpddr4simulationpads_dq_o = 16'd0;20:54
Guest94reg [15:0] lpddr4simulationpads_dq_i;20:54
Guest94reg lpddr4simulationpads_dq_oe = 1'd0;20:54
Guest94I've tried searching for an attribute in the generator code where I can find where SimPad is transformed into output, input and OE but currently unsuccessful21:12
Guest94Just a quick update: was able to scape the dq_i, dq_oe, dq_o from the vars of the instantiation of  LPDDR4SimulationPads() itself. Not sure if this is recommended but it appears to be working.22:17
*** Guest63 <Guest63!~Guest63@2607:f140:400:a019:3079:94c4:9d1:25a0> has joined #litex23:06
Guest63Hi, I have done the setup up to the point that I wanna do a simulation. The issue I have right now is with the riscv elf binaries. I don't think it's seeing them in my path variable even though I added it to the $PATH. I have an m1 mac, and those riscv elf files are compiled for x86, so I thought that was the issue!23:11
tpw_ruleserm, macos does not use ELF23:12
Guest63ok, but that's not the point, I mean what is the alternative here23:19
tpw_ruleswell it's unclear to me what you've done. what files did you download?23:19
*** Guest63 <Guest63!~Guest63@2607:f140:400:a019:3079:94c4:9d1:25a0> has quit IRC (Quit: Client closed)23:24
*** Guest94 <[email protected]> has quit IRC (Ping timeout: 250 seconds)23:28
*** Guest63 <Guest63!~Guest63@2607:f140:400:a019:3079:94c4:9d1:25a0> has joined #litex23:28
*** Guest63 <Guest63!~Guest63@2607:f140:400:a019:3079:94c4:9d1:25a0> has quit IRC (Client Quit)23:28
*** _franck_ <[email protected]> has quit IRC (Quit: Ping timeout (120 seconds))23:58
*** _franck_ <[email protected]> has joined #litex23:58

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