_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://libera.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
peeps[zen] has joined #litex
peepsalot has quit [Ping timeout: 260 seconds]
Degi_ has joined #litex
Degi has quit [Ping timeout: 272 seconds]
Degi_ is now known as Degi
<tnt> _florent_: A couple of random question when digging in litedram and litepcie :
<tnt> - Is there any way to have dram port priority ? Like I have one port that needs to be "real-time" (i.e. as soon as there is a re-arbitration, it should win), and another that really doesn't matter, what's connected to it can go very fast if it needs to but there is no real time constraint so it should just use whatever bandwidth is left.
<tnt> - In litepcie DMA: When an endpoint accepts a request, does that mean the completion came back ? Or just that it was sent but we have no idea if it was executed yet. (Wondering if the polling of DMA status could "see" a descritor as done while in fact the request might have been sent but not yet executed).
cr1901_ has joined #litex
<_florent_> tnt: Hi, we don't have priority on DRAM ports yet, but I also start having needs for this on some systems, so this would be useful to implement it. We could have low and high priority ports. This should consist of revisiting the arbitration in the crossbar and should not be complicated to add.
cr1901 has quit [Ping timeout: 260 seconds]
<_florent_> tnt: regarding LitePCIe, the DMA status and IRQ are updated/generated when the request has been accepted by the LitePCIe Endpoint
<_florent_> tnt: So a Write TLP still has to be transmitted to the Host and executed, a Read request TLP still has to be transmitted to the Host, executed and completion received by the FPGA.
<tnt> Mmm ok, so I have a race condition there :/
<_florent_> The current DMA is really targeting specific streaming applications and since still used on design I maintain I don't really want to modify the behavior. It would be good to provide a simpler alternative in the future on top of the AXI frontend to do Stream (FPGA) <-> MMAP (Host) and also MMAP (FPGA) <-> MMAP (Host)
<tnt> Is there a description somewhere of the endpoint port interface (or rather the cross bar ports). I see the request_layout / completion_layout but I'm a bit unclear how that works.
<tnt> (because typically I'd expect a header with address/ength/... and then a bunch of data, but here it's all in one layout)
<tnt> Also, the AXI front end also doesn't look like it's waiting for the write completion to send the axi completion. Only waits for all the data to be read in.
<_florent_> tnt: The parameters are constant during the packet duration (that needs to be delimited by setting first/last)
<_florent_> tnt: These parameters are used to create the header in the case of a request/or extracted from the completion
<_florent_> tnt: By the Packetizer/Depacketizer modules
<tnt> Ok, I see. Thanks for the info. I'm assuming completion don't come in order (since pcie itself can re-order), but I'm supposed to use user_id to keep track ?
<_florent_> The completion is already reordered in the lower layers
<tnt> Oh, that it really nice. Makes things way easier for me then :)
<_florent_> Regarding the user_id, it's here to be able to delimit the DMA Reader packet (and create one packet per DMA descriptor)
<_florent_> This is optional is you don't need this
<tnt> I don't think it would be all too hard to modify the existing DMA just a bit to have another operation mode that's what I want while still keeping the existing modes/behaviors.
<_florent_> I'm ok adding modes if by default we keep the current behavior
<tnt> yeah of course, I completely understand that changing the default behavior would be a maintenance nightmare.
<_florent_> If you think the changes would be limited, free free to explore this and we'll probably manage to integrate this mode.
<_florent_> Regarding writes, since they are posted you'll probably not be able to improve things a lot.
<_florent_> Regarding reads, you could use the user_id to only update the DMA status when the Read has effectively been done.
<tnt> Oh you don't get completion tlp on writes ?
<tnt> I need to read up on pcie ordering
davebee has joined #litex
dave_ has joined #litex
davebee has quit [Quit: Client closed]
dave_ has quit [Client Quit]
davebee has joined #litex
<davebee> I'm trying to add my own SPI Flash boot to the BIOS. How can I add .c and .h files to the build, without having to modify the Litex source? I have working code, but I want to be able to load my own library into the bios code.
<_florent_> tnt: the writes are posted in PCIe yes.
<davebee> Being able to set an include path would be a good start.
<_florent_> davebee: This is not yet supported, but you could probably reused what is done for the BIOS libraries
<_florent_> sorry I have to go
<davebee> thanks. It would be seful to be able to add files and entry points to them n the bios.
FabM has joined #litex
FabM has joined #litex
cr1901_ is now known as cr1901
<tnt> _florent_: So AFAIU the completion issued from reading the status register wouldn't be able to "pass over" the posted writes, so as long as the status regs are only updated once the write has actually been posted, there is no race.
<davebee> _florent_: the add_software_package() add_software_library() does build the library. That is very useful. I want to be able to share the library between my boot loader and app code. This is very helpful.
davebee has quit [Quit: Leaving]
FabM has quit [Quit: Leaving]
zjason has quit [Read error: Connection reset by peer]
zjason has joined #litex
nelgau_ has joined #litex
nelgau__ has joined #litex
nelgau has quit [Ping timeout: 246 seconds]
nelgau_ has quit [Ping timeout: 268 seconds]