Thursday, 2022-04-07

*** tpb <[email protected]> has joined #litex00:00
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has joined #litex00:39
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has quit IRC (Ping timeout: 260 seconds)00:40
*** Degi_ <[email protected]> has joined #litex01:00
*** Degi <[email protected]> has quit IRC (Ping timeout: 272 seconds)01:01
*** Degi_ is now known as Degi01:01
tnt_florent_: A couple of random question when digging in litedram and litepcie :07:54
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.07:56
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).07:57
*** cr1901_ <cr1901_!~cr1901@2601:8d:8600:911:d8c8:bf0c:2650:c47e> has joined #litex08:53
_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.08:56
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:d4a9:3ad0:fd2b:5df9> has quit IRC (Ping timeout: 260 seconds)08:57
_florent_tnt: regarding LitePCIe, the DMA status and IRQ are updated/generated when the request has been accepted by the LitePCIe Endpoint08:58
_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.09:00
tntMmm ok, so I have a race condition there :/09:02
_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)10:25
tntIs 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.10:40
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)10:40
tntAlso, 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.10:47
_florent_tnt: I just added some comments with https://github.com/enjoy-digital/litepcie/commit/2f8c1a29c5c8bdc352fb60e2b72981c91543ae06.11:49
_florent_tnt: The parameters are constant during the packet duration (that needs to be delimited by setting first/last)11:50
_florent_tnt: These parameters are used to create the header in the case of a request/or extracted from the completion11:50
_florent_tnt: By the Packetizer/Depacketizer modules11:51
tntOk, 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 ?11:54
_florent_The completion is already reordered in the lower layers11:58
tntOh, that it really nice. Makes things way easier for me then :)11:58
_florent_https://github.com/enjoy-digital/litepcie/blob/master/litepcie/tlp/controller.py#L88-L10711:58
_florent_Regarding the user_id, it's here to be able to delimit the DMA Reader packet (and create one packet per DMA descriptor)12:00
_florent_This is optional is you don't need this12:01
tntI 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.12:02
_florent_I'm ok adding modes if by default we keep the current behavior12:03
tntyeah of course, I completely understand that changing the default behavior would be a maintenance nightmare.12:04
_florent_If you think the changes would be limited, free free to explore this and we'll probably manage to integrate this mode.12:09
_florent_Regarding writes, since they are posted you'll probably not be able to improve things a lot.12:10
_florent_Regarding reads, you could use the user_id to only update the DMA status when the Read has effectively been done.12:11
tntOh you don't get completion tlp on writes ?12:19
tntI need to read up on pcie ordering12:19
*** davebee <davebee!~davebee@cpc138570-newt42-2-0-cust29.19-3.cable.virginm.net> has joined #litex12:57
*** dave_ <[email protected]> has joined #litex13:13
*** davebee <davebee!~davebee@cpc138570-newt42-2-0-cust29.19-3.cable.virginm.net> has quit IRC (Quit: Client closed)13:13
*** dave_ <[email protected]> has quit IRC (Client Quit)13:13
*** davebee <[email protected]> has joined #litex13:15
davebeeI'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.13:17
_florent_tnt: the writes are posted in PCIe yes. 13:19
davebeeBeing able to set an include path would be a good start.13:21
_florent_davebee: This is not yet supported, but you could probably reused what is done for the BIOS libraries13:22
_florent_https://github.com/enjoy-digital/litex/blob/master/litex/soc/integration/builder.py#L121-L12713:22
_florent_sorry I have to go13:23
davebeethanks. It would be seful to be able to add files and entry points to them n the bios.13:24
*** FabM <FabM!~FabM@2a03:d604:103:600:f3e:3e6c:372d:a535> has joined #litex14:19
*** cr1901_ is now known as cr190114:35
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.15:06
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.15:30
*** davebee <[email protected]> has quit IRC (Quit: Leaving)16:52
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Quit: Leaving)19:12
*** zjason <[email protected]> has quit IRC (Read error: Connection reset by peer)21:28
*** zjason <[email protected]> has joined #litex21:31
*** nelgau_ <[email protected]> has joined #litex22:23
*** nelgau__ <[email protected]> has joined #litex22:25
*** nelgau <[email protected]> has quit IRC (Ping timeout: 246 seconds)22:25
*** nelgau_ <[email protected]> has quit IRC (Ping timeout: 268 seconds)22:28

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