Visible to Intel only — GUID: ewa1405355910709
Ixiasoft
Visible to Intel only — GUID: ewa1405355910709
Ixiasoft
3.11. Host-to-Device MMD Software Implementation
The source codes of an MMD library that demonstrates good performance are available in the <TOP_DEST_DIR>/source/host/mmd directory. For more information on the MMD API functions, refer to the MMD API Descriptions section of the Intel® FPGA SDK for OpenCL™ Custom Platform Toolkit User Guide.
acl_pcie.cpp
The acl_pcie.cpp file implements the MMD API and provides multiple devices support. This file also handles the PCIe® interrupt. For Linux, the kernel driver uses signal to notify the MMD about an interrupt from the PCIe. For Windows, the MMD use the Jungo WinDriver API to handle the interrupt from PCIe.
In addition, this file includes a signal handler for Ctrl-C event. The MMD needs to capture the Ctrl-C event to ensure that the program does not terminate itself during unsafe operation, such as programming the device or running quartus_pgm.
acl_pcie_device.cpp
The acl_pcie_device.cpp file implements a class to represent a device, and abstracts details to allow easier handling of multiple devices. Examples of the supported operations of the device by this class include write_block, read_block, reprogram, and flash.
During the instantiation of an instant for the device class, the following verifications take place:
- Ensures that the kernel driver is installed and that its version matches the MMD version.
- Ensures that the device with the given name can be found.
- Ensures that the Version ID of the device matches the supported ID in the software.
- Waits for UniPHY IP calibration.
acl_pcie_mm_io.cpp
The acl_pcie_mm_io.cpp file implements a class to allow access to the device as a memory-mapped I/O. It provides access to GLOBAL-MEM, PCIE-CRA, DMA-CSR, DMA-DESCRIPTOR, KERNEL, etc.
acl_pcie_dma_linux.cpp or acl_pcie_dma_windows.cpp
The acl_pcie_dma_linux.cpp or acl_pcie_dma_windows.cpp file implements DMA-related functions. For more information, refer to the SG-DMA section.
acl_pcie_config.cpp
The acl_pcie_config.cpp file implements functions for configuring the device. For more information, refer to the FPGA Programming Flow section.
acl_pcie_flash.cpp
The acl_pcie_flash.cpp file implements Flash-related functions. For more information, refer to the Flash section.
acl_pcie_quickudp.cpp
The acl_pcie_quickudp.cpp file implements UDP-related functions. For more information, refer to the Implementation of UDP Cores as OpenCL Channels section.
acl_pcie_debug.cpp
The acl_pcie_debug.cpp file defines the commonly used debug functions and parameters. It is included by most of the other files.
acl_pcie_timer.cpp
The acl_pcie_timer.cpp file implements a timer module to measure performance.