DMA questions

0

I’m working on optimizing my project, which uses DMA, and have a few questions about best practices on the software side of things as I’m more of an RTL person.

My design is a search engine that compares data provided to the FPGA from the computer against a reference library stored in the DDR. I load GBs of data to the DDR in a single dump on startup but then need to make ~100 4kB writes per second to keep the library updated. The data in each update is written to consecutive DDR addresses but the updates are scattered throughout the DDR address space. My drivers use fpga_dma.h.

Questions:

  1. Is it better practice to open a DMA queue a single time and store the descriptor in my driver library, which would potentially leave the queue open for days, or should I open and close the DMA queue every time I do a write?

  2. I’d like to have the XDMA driver load automatically when the F1 instance is powered up but it’s not doing that after I follow the instructions in the link below. Is it supposed to be persistent? I’m using the FPGA Dev AMI v1.9.1 but am having to follow the full instructions each time so DMA works, maybe because of the XOCL driver conflict as it seems to be coming back each reboot. Very possible I've screwed up something as my unix skills are google/cut/paste.

https://github.com/aws/aws-fpga/blob/master/sdk/linux_kernel_drivers/xdma/xdma_install.md#xdmainstallfail

ljp0101
asked 3 years ago243 views
2 Answers
0

Hello,

While we work on getting you answers for your first question, I can answer your second question about removing XOCL.

Calling rmmod removes it from the kernel but since the module still exists in the /lib/module directories, it will be reloaded on boot.

To remove XOCL completely, you have to remove new XRT version, you need to call the following commands:

 sudo systemctl stop mpd
 sudo yum remove -y xrt xrt-aws

After this, you can install XDMA and XRT/XOCL drivers shouldn't be reloaded on boot.

Thank you for this question. I will also update these instructions in the XDMA install readme.
Please let me know if you need more help on this topic and I'll be happy to help.

-Deep

Edited by: awsdeep on Mar 12, 2021 9:18 AM

Deep_P
answered 3 years ago
0

Super helpful Deep. It would have taken me forever to figure this out on my own!

ljp0101
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