Visible to Intel only — GUID: ewa1400077091594
Ixiasoft
2.1. Initializing Your Custom Platform
2.2. Removing Unused Hardware
2.3. Integrating Your Custom Platform with the Intel® FPGA SDK for OpenCL™
2.4. Setting up the Software Development Environment
2.5. Building the Software in Your Custom Platform
2.6. Establishing Host Communication
2.7. Connecting the Memory
2.8. Integrating an OpenCL Kernel
2.9. Programming Your FPGA Quickly Using CvP
2.10. Guaranteeing Timing Closure
2.11. Troubleshooting
3.1. Host-FPGA Communication over PCIe
3.2. DDR3 as Global Memory for OpenCL Applications
3.3. QDRII as Heterogeneous Memory for OpenCL Applications
3.4. Host Connection to OpenCL Kernels
3.5. Implementation of UDP Cores as OpenCL Channels
3.6. FPGA System Design
3.7. Guaranteed Timing Closure
3.8. Addition of Timing Constraints
3.9. Connection to the Intel® FPGA SDK for OpenCL™
3.10. FPGA Programming Flow
3.11. Host-to-Device MMD Software Implementation
3.12. OpenCL Utilities Implementation
3.13. Stratix V Network Reference Platform Implementation Considerations
Visible to Intel only — GUID: ewa1400077091594
Ixiasoft
2.3. Integrating Your Custom Platform with the Intel® FPGA SDK for OpenCL™
After you modify your Intel® Quartus® Prime design files, integrate your Custom Platform with the Intel® FPGA SDK for OpenCL™ .
- Update the <your_custom_platform_name>/hardware/<board_name>/board_spec.xml file by removing the QDR and Ethernet channels from it. Ensure that there is at least one global memory interface, and all the global memory interfaces correspond to the exported interfaces from the board.qsys Platform Designer (Standard) system file.
QDR section of the Stratix® V Network Reference Platform's board_spec.xml file:
<!-- QDRII --> <global_mem name="QDR" max_bandwidth="17600" interleaved_bytes="8" config_addr="0x100"> <interface name="board" type="slave" width="64" maxburst="1" address="0x200000000" size="0x1000000" latency="150" addpipe="1"> <port name="kernel_qdr0_r" direction="r"/> <port name="kernel_qdr0_w" direction="w"/> </interface> <interface name="board" type="slave" width="64" maxburst="1" address="0x201000000" size="0x1000000" latency="150" addpipe="1"> <port name="kernel_qdr1_r" direction="r"/> <port name="kernel_qdr1_w" direction="w"/> </interface> <interface name="board" type="slave" width="64" maxburst="1" address="0x202000000" size="0x1000000" latency="150" addpipe="1"> <port name="kernel_qdr2_r" direction="r"/> <port name="kernel_qdr2_w" direction="w"/> </interface> <interface name="board" type="slave" width="64" maxburst="1" address="0x203000000" size="0x1000000" latency="150" addpipe="1"> <port name="kernel_qdr3_r" direction="r"/> <port name="kernel_qdr3_w" direction="w"/> </interface> </global_mem>
Ethernet channels section of the s5_net board_spec.xml file:<channels> <interface name="udp_0" port="udp0_out" type="streamsource" width="256" chan_id="eth0_in"/> <interface name="udp_0" port="udp0_in" type="streamsink" width="256" chan_id="eth0_out"/> <interface name="udp_0" port="udp1_out" type="streamsource" width="256" chan_id="eth1_in"/> <interface name="udp_0" port="udp1_in" type="streamsink" width="256" chan_id="eth1_out"/> </channels>
- In the <your_custom_platform_name>/hardware/<board_name>/scripts directory, modify the post_flow.tcl file to not call the create_fpga_bin.tcl file. You can do so by commenting out the line of code containing the command call_script_as_function scripts/create_fpga_bin.tcl.
# Generate fpga.bin used for reprogramming post_message "Generating fpga.bin" if {[catch { call_script_as_function scripts/create_fpga_bin.tcl $revision_name.sof $revision_name.core.rbf $revision_name.periph_hash $revision_name } res]} { post_message -type error "Error in create_fpga_bin.tcl! $res" exit 2 }
- Set the environment variable ACL_QSH_COMPILE_CMD to quartus_sh --flow compile top -c base.
Setting this environment variable instructs the SDK to compile the base revision corresponding to the base.qsf file in the <your_custom_platform_name>/hardware/<board_name> directory of your Custom Platform.
- Perform the steps outlined in the INTELFPGAOCLSDKROOT/board/custom_platform_toolkit/tests/README.txt file to compile the INTELFPGAOCLSDKROOT/board/custom_platform_toolkit/tests/boardtest/boardtest.cl OpenCL kernel source file.
The environment variable INTELFPGAOCLSDKROOT points to the location of the SDK installation.The hardware compilation stage will fail because of the absence of the fpga.bin file. However, the Intel® Quartus® Prime compilation should complete successfully and produce a boardtest.aoco Intel® FPGA SDK for OpenCL™ Offline Compiler object file.
- If compilation fails because of timing failures, fix the errors, or compile INTELFPGAOCLSDKROOT/board/custom_platform_toolkit/tests/boardtest.cl with different seeds by including the -seed=<N> option in the aoc command (for example, aoc -seed=2 boardtest.cl).