XDMA transfer fails when writing to BRAM, Peek/Poke also not functional

0

Hello all,

I've built a design where I planned to test XDMA functionality, as well as Peek/Poke functionality.
Here is the image of the design:
https://imgur.com/Mx4HVDq
Address map:
https://imgur.com/Bmg87S6
F1 IP settings:
https://imgur.com/G5WPoFH
AFI: afi-0a8ee3b4101930666, AGFI: agfi-08d6f213d9161b558
dmesg log after fpga-load-local-image {AGFI} call: https://pastebin.com/L3eRq5Nd

Here is the code and output I tried to use for testing XDMA.
https://pastebin.com/XVnpVZA6
Here is the code and output I tried to use for testing Peek/Poke
https://pastebin.com/T8eRQEhS
None of these two produce any dmesg output.

Few questions:

  1. Any reason why I'm not successful in read/write over XDMA to BRAM (DDR operations are successful)?
  2. Why is Peek/Poke failing?
  3. Should I be able to use Peek/Poke over PCIS interface (not in the same time when using PCIS for XDMA), or should I use OCL instead?

EDIT: To correct myself, I shouldn't even be able to write to BRAM via XDMA on this design, but I observed that on a design that is same like this one, just without OCL enabled.
EDIT 2: I discovered that I need SUDO to be able to attach execute fpga_pci_attach. Is there any way to work around that, and not use SUDO? Anyway, now peek/poke is functional. Still, question of writing to BRAM element via XDMA persists.

Edited by: jelicicm on May 18, 2021 6:48 AM

asked 3 years ago275 views
4 Answers
0

Hi,

Please see our answers below:

  1. Any reason why I'm not successful in read/write over XDMA to BRAM (DDR operations are successful)?
    AWS From your design/addr space, I see that DDR is on PCIS-BAR and BRAM Controllers are on OCL interface. Please note that OCL is 32-bit AXI-Lite Interface, and PCIS is 512-bit AXI4 Interface. Please ensure AXI Interconnect supports both. The XDMA (DMA Engine) is mapped to transfer data through PCIS Interface, therefore you see data transfers to DDR but not to BRAM. Please connect/define address space for BRAM in the PCIS range and it should work.

  2. Why is Peek/Poke failing?
    AWS Did you try using the PCIe APIs provided by AWS? Useful links below:
    -- https://github.com/aws/aws-fpga/blob/master/sdk/userspace/fpga_libs/fpga_pci/fpga_pci.c#L337
    -- https://github.com/aws/aws-fpga/blob/master/hdk/cl/examples/cl_dram_dma/software/runtime/test_dram_dma.c#L324

  3. Should I be able to use Peek/Poke over PCIS interface (not in the same time when using PCIS for XDMA), or should I use OCL instead?
    AWS Yes, you should be able to use peek/poke access to PCIS (even when XDMA is in operation). Please note, that these two are queued internally and can impact latency when both are active.

  4. Please refer to the following information for non-root access to FPGA
    https://github.com/aws/aws-fpga/tree/master/sdk#using-fpga-as-non-root-user

Please reach us if you need any additional details.

Thanks!
Chakra

Edited by: awschakra on May 18, 2021 11:31 AM

AWS
answered 3 years ago
0

Hello Chakra,

thank you very much for your answers! I figured out I was stupid when setting up address map and therefore my reads/writes were failing.

Can I please ask you one more thing:

Please note that OCL is 32-bit AXI-Lite Interface, and PCIS is 512-bit AXI4 Interface. Please ensure AXI Interconnect supports both.  

Can you explain further on how to "ensure" this? I set "register slice" option for every slave and master interface to "Auto". Also, Fifo Depth for each interface is set to 32. Should I do anything else, or should this be enough?

answered 3 years ago
0

Hello Chakra,

thank you very much for your answers! I figured out I was stupid when setting up address map and therefore my reads/writes were failing.

Can I please ask you one more thing:

Please note that OCL is 32-bit AXI-Lite Interface, and PCIS is 512-bit AXI4 Interface. Please ensure AXI Interconnect supports both.  

Can you explain further on how to "ensure" this? I set "register slice" option for every slave and master interface to "Auto". Also, Fifo Depth for each interface is set to 32. Should I do anything else, or should this be enough?

answered 3 years ago
0

Hello,

Apologies for delayed relayed response on this post.

Since you are connecting OCL and PCIS bus to the interconnect, I would make sure that the AXI Crossbar/Interconnect IP handles two masters with different AXI protocols -- AXI-Lite for OCL, and AXI4 for PCIS.

Please let us know if you need any additional details.

Thanks!
Chakra

AWS
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions