Building the System
Compilation of an application for execution on a Xilinx enabled OpenCL device through the SDAccel development environment is performed by selecting the compilation target. This step goes beyond compilation of host and kernel code and is also responsible for the generation of custom compute units for all of the binary containers in the solution.
Figure: Active Build Configuration
With the application project opened, you can specify the compilation target from the Project Editor window. Select Active build configuration to specify the compilation target. The choices are as follows:
- Emulation-SW: This compiles the project for use in software emulation. Kernel code can be debugged on the processor, with the host application, in the software emulation flow.
- Emulation-HW: This compiles the project for use in hardware emulation. This emulation flow invokes the hardware simulator to test the functionality of the logic that is executed on the FPGA compute fabric.
- System: Also called the "build system flow", this compiles the kernel into the FPGA hardware.
- Perform software emulation (sw_emu) to confirm the functionality.
- Perform hardware emulation (hw_emu) to create custom hardware and review the performance of the kernel.
- Perform a build of the hardware hwsystem to implement the custom hardware.
As described in the Compilation Flow, you can also specify the compilation target from a Makefile, or from the command-line with the following command:
xocc --target sw_emu|hw_emu|hw ...
The compilation method used is dependent on the selected kernel compilation target. The xocc --target option invokes different flows for kernels targeted at a processor and kernels targeted at the FPGA fabric.