-
Get the de1soc_sharedonly hardware tamplate for terasic's BSP. Rename it to
de1soc_sharedonly_io -
Modify the name to
de1soc_sharedonly_ioin board_spec.xml file -
File ->Open project in Quartus,browse to top.qpf file and ->open
-
Tools->Qsys, open the system.qsys file
-
Double click the “acl_iface [acl_iface_system.qsys]” in Hierarchy Table
-
Search the PIO in the IP catalog table, and double click the PIO component
-
Set the parameter of PIO.With,Direction,bit-operate,interrupt and Edge capture. For output only,
-
Rename
pio_0toled_pio, and connect theled_piotopipe_stage_host_ctrl. clk and reset are the same as pipe_stage_host_ctrl, led_pio'ss1connect to pipe_stage_host_ctrl'sm0.double click theDouble-click-toof led_pio inExportto export the external_connection Port. And set an valid address. Save without generating HDL -
Double click the
system [system.qsys]in Hierarchy Table , Then doube click the led_pio's Export to export theacl_iface_led_pio_external_connectionandGenerate HDL -
Get the port description in file
de1soc_sharedonly_io/system/system_inst.v, and add it tothe_systemin top.v.acl_iface_led_pio_external_connection_export (<connected-to-acl_iface_led_pio_external_connection_export>)
-
Add
ledrandhex0output in top.v and connect to led_pio port. Remove thefpga_led_outputpins. -
Remove
fpga_led_outputand add theledrandhex0set_location in top.qsf -
set acl_iface_region form
LL_ENABLED OFFtoLL_ENABLED ONin top.qsf
set_global_assignment -name LL_ENABLED ON -section_id acl_iface_region
- Git clone the linux-socfpga
git clone -b socfpga-opencl_3.18 --depth=10 https://github.com/thinkoco/linux-socfpga.git
cd linux-socfpga
-
Modify the device tree source file(
linux-socfpga/arch/arm/boot/dts/socfpga_cyclone5_de1soc_x2go.dts),update socfpga.dtb
make socfpga_cyclone5_de1soc_x2go.dtb
- Build opencl kernel
aoc device/camera_sobel.cl -o bin/camera_sobel.aocx --board de1soc_sharedonly_io -v --report
- Generate hps_0.h
sopc-create-header-files ./system.sopcinfo --single hps_0.h --module acl_iface_hps
-
code in de1soc_sw_io, and build it on PC
-
aocl program and run host
aocl program /dev/acl0 cemera_sobel.aocx
./led_pio













