Intel® FPGA SDK for OpenCL™ Standard Edition: Programming Guide

ID 683342
Date 4/22/2019
Public
Document Table of Contents

12.3.1. Hardware for Kernel Interface

The Intel® FPGA SDK for OpenCL™ Offline Compiler generates hardware around the kernel pipeline. For some OpenCL™ applications, these interface hardware components are not necessary.

Hardware around the kernel pipeline is necessary for functions such as the following:

  • Dispatching IDs for work-items and work-groups
  • Communicating with the host regarding kernel arguments and work-group sizes

Intel® FPGA SDK for OpenCL™ Offline Compiler-Generated Interface Hardware around a Kernel Pipeline illustrates the hardware that the offline compiler generates when it compiles the following kernel:

__kernel void my_kernel(global int* arg)
{
    …
    int sum = 0;
    for(unsigned i = 0; i < n; i++)
    {
        if(sum < m) sum += val;
    }
    *arg = sum;
    …
}
Figure 18.  Intel® FPGA SDK for OpenCL™ Offline Compiler-Generated Interface Hardware around a Kernel Pipeline