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

ID 683846
Date 12/13/2021
Public

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

Document Table of Contents

8.2.3. Emulating Applications with a Channel That Reads or Writes to an I/O Channel

The Intel® FPGA SDK for OpenCL™ Emulator emulates kernel-to-kernel channels. It does not support the emulation of I/O channels that interface with input or output features of your FPGA board.
To emulate applications with a channel that reads or writes to an I/O channel, perform the following:
  1. Modify your kernel to add a read or write channel that replaces the I/O channel.
  2. Make the source code that uses the read or write channel conditional.
However, it is possible to emulate unmodified kernel code using the following procedures:
  • For input I/O channels
    1. Store input data to be transferred to the channel in a file with a name matching the io attribute in the channel declaration. Consider the following example:
      channel ulong4 inchannel __attribute__((io("eth0_in")));
    2. Create a file named eth0_in.
    3. Store the test input data in the eth0_in file.
  • For output I/O channels

    Output data is automatically written into a file with name equal to the channel io attribute.