strezh / XPDMA

PCIe DMA Subsystem based on Xilinx XAPP1171
MIT License
45 stars 30 forks source link

Potential DMA bug? #3

Open mateoconlechuga opened 4 years ago

mateoconlechuga commented 4 years ago

I'm not sure if this is intended or if I'm missing something, but this line:

https://github.com/strezh/XPDMA/blob/master/driver/xpdma_driver.c#L337

Only looks like it would work when direction is PCI_DMA_FROMDEVICE, and not PCI_DMA_TODEVICE. This is because on this line:

https://github.com/strezh/XPDMA/blob/master/driver/xpdma_driver.c#L346

srcAddr is moved, but translation is done by the PCIe block. Instead, this address should remain constant at AXI_PCIE_DM_ADDR, unless I'm mistaken.

EDIT: It looks like destAddr has the same problem. I'm definitely missing something.

strezh commented 4 years ago

Thank you for your comment.

I don’t remember how SG in Xilinx exactly works. I need to look at XAPP1171, then I can answer.

sskras commented 1 year ago

@strezh, do you mean something like Xilinx XAPP1171 PCI Express Endpoint-DMA Initiator Subsystem, Application Note ?

strezh commented 1 year ago

Yep