Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
723 Discussions

aocl_mmd_read() and aocl_mmd_write() for memory movement

kmzaja
Beginner
1,472 Views

Hello,

I am using Intel's oneAPI with my Agilex FPGA accelerator. I need help with something on a lower level of abstraction w.r.t libraries being used in oneAPI.

I need to use MMD API calls for accessing my AFU kernel and the local memory on FPGA. I have been able to access my AFU kernel but I am struggling with accessing the local memory (DDR in this case). Unfortunately, I could not find example codes of MMD APIs and oneAPIs documentation also does not contains much information on this.

Whenever I am trying to read/write into my local memory using MMD APIs, I either get alignment error or segmentation fault. For accessing DDR4, is there a specific buffer/array to use for reading/writing? For example, I am using malloc to create read/write buffers. Is there some other function to use for this.
Also, for my BSP, UVM is disabled. So maybe I cannot use the aocl_mmfd_shared_alloc function call from MMD API.

Thank you in advance and I can share more details if/when required.


Few details:
OS: AlmaLinux
Board: Bittware Agliex7 FPGA board
BSP: OFS based



0 Kudos
3 Replies
Jessica_Intel
Employee
1,340 Views

Hi @kmzaja,

 

The best way to get started with using oneAPI for FPGAs is by trying out the tutorials at https://github.com/oneapi-src/oneAPI-samples/tree/release/2025.0. Also, please refer to the documentation here: https://www.intel.com/content/www/us/en/docs/oneapi-fpga-add-on/developer-guide/2025-0/fpga-handbook.html

 

I am curious why you need a lower level of abstraction? Have you tried using the sycl::malloc_shared API as shown in this tutorial? https://github.com/oneapi-src/oneAPI-samples/blob/50a579b3367af653816f73f3b2e4a459baead771/DirectProgramming/C%2B%2BSYCL_FPGA/Tutorials/GettingStarted/fpga_template/src/fpga_template.cpp#L67

 

Best regards,

Jessica

 

0 Kudos
BoonBengT_Altera
Moderator
1,248 Views

Hi @kmzaja,


Greetings, just checking in to see if there is any further doubts in regards to this matter.

Hope your doubts have been clarified.


Best Wishes

BB


0 Kudos
BoonBengT_Altera
Moderator
1,186 Views

Hi @kmzaja,


Greetings, as we do not receive any further clarification/updates on the matter, hence would assume challenge are overcome. 


Please login to ‘ https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions. For new queries, please feel free to open a new thread and we will be right with you. Pleasure having you here.


Best Wishes

BB


0 Kudos
Reply