DE5a-Net OpenCL
www.terasic.com
March 29, 2017
28
Note:
For DE5a-Net to negotiate with the host PC at Gen 3 as the link speed, it is strongly
recommended that users set the PCIe speed at Gen 3 in the BIOS on the host PC.
If your PC support
PCIe Gen3x8, but detected is incorrect, you can modify the PCIe settings in the BIOS, and reboot.
Test „aocl program‟ Command
Check whether the
hello_world
OpenCL image, which is CvP enabled, configures the FPGA
successfully
when
DE5a-Net
is power on. In the Linux terminal, type “
cd
/root/intelFPGA_pro/16.1/hld/board/de5a_net_e1/tests/hello_world/bin”
to go to hello_world
project folder, then type “
aocl program aclde5a_net_e10 hello_world.aocx
”
to configure the FPGA
with
hello_world.aocx
OpenCL image. If the programming message displays “Program succeed”
as shown in
Figure 3-10
, it means the
hello_world
OpenCL image is programmed into the flash
correctly and CvP works well.
Figure 3-10 „aocl program aclde5a_net0 hello_world.aocx” use CvP
3
3
.
.
6
6
C
C
o
o
m
m
p
p
i
i
l
l
e
e
a
a
n
n
d
d
T
T
e
e
s
s
t
t
O
O
p
p
e
e
n
n
C
C
L
L
P
P
r
r
o
o
j
j
e
e
c
c
t
t
This section will show how to compile and run the OpenCL kernel and OpenCL Host Program for
the vector_add example project. Developers can use the same procedures to compile and test other
OpenCL examples (included in the kit) for DE5a-Net.
Compile OpenCL Kernel
In the terminal, type “
cd /root/intelFPGA_pro/16.1/hld/board/de5a_net_e1/tests/vector_add”
to go
to
vector_add
project folder, then type
“
aoc device/vector_add.cl -o bin/vector_add.aocx --board
de5a_net_e1 --report”
to compile the OpenCL kernel. It will takes about one hour for compiling.
After that, the OpenCL image file
vector_add
.aocx is generated.
Figure 3-11
is the screen shot
when OpenCL kernel is compiled successfully. For required parameters to compile vector_add.cl,