Intel® FPGA SDK for OpenCL™ Standard Edition: Custom Platform Toolkit User Guide

ID 683398
Date 5/04/2018
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

2.3.13. aocl_mmd_reprogram

The aocl_mmd_reprogram function is the reprogram operation for the specified device.
The host must guarantee that no other OpenCL™ operations are executing on the device during the reprogram operation. During aocl_mmd_reprogram execution, the kernels are idle and no read, write, or copy operation can occur.

Disable interrupts and reprogram the FPGA with the data from user_data, which has a size specified by the size argument. The host then calls aocl_mmd_set_status_handler and aocl_mmd_set_interrupt_handler again, which enable the interrupts. If events such as interrupts occur during aocl_mmd_reprogram execution, race conditions or data corruption might occur.

Syntax

int aocl_mmd_reprogram( int handle,
                        void* user_data,
                        size_t size );

Function Arguments

  1. handle—A positive int value representing the handle to the board obtained from the aocl_mmd_open() call.

  2. user_data—The void* type binary contents of the fpga.bin file that are created during compilation.

  3. size—The size of user_data in bytes. The size argument is of size_t.

Return Value

If aocl_mmd_reprogram executes successfully, the return value is the pointer value that the host uses to access shared memory.