I was reading through this post /sys/class/fpga-bridge empty? and I have a slightly different issue… but maybe related? I am using a Cyclone V Dev Kit with Angstrom 2015.12 and kernel 4.1.33-ltsi. Also, I’m using the opencl.rbf instead of the standard soc_system.rbf shipped with the GSRD as I am working towards using opencl.
I can successfully insert the aclsoc_drv
But then I try to run a program, how about the vector_add example I am missing the required fpga_bridge files
Initializing OpenCL
Platform: Intel(R) FPGA SDK for OpenCL(TM)
Using 1 device(s)
c5soc : Cyclone V SoC Development Kit
Using AOCX: vector_add.aocx
Reprogramming device [0] with handle 1
sh: /sys/class/fpga-bridge/fpga2hps/enable: No such file or directory
sh: /sys/class/fpga-bridge/hps2fpga/enable: No such file or directory
sh: /sys/class/fpga-bridge/lwhps2fpga/enable: No such file or directory
Couldn't open FPGA status from /sys/class/fpga/fpga0/status!
sh: /sys/class/fpga-bridge/fpga2hps/enable: No such file or directory
sh: /sys/class/fpga-bridge/hps2fpga/enable: No such file or directory
sh: /sys/class/fpga-bridge/lwhps2fpga/enable: No such file or directory
mmd program_device: Board reprogram failed
MMD FATAL: acl_pcie.cpp:47: can't find handle -1 -- aborting
host_intel: acl_pcie.cpp:47: ACL_PCIE_DEVICE* get_pcie_device(int): Assertion `0' failed.
It looks like the bridges are registered properly on boot:
root@cyclone5:~# dmesg | grep fpga
[ 2.133638] fpga_manager fpga0: Altera SOCFPGA FPGA Manager registered
[ 2.140708] altera_hps2fpga_bridge sopc@0:fpgabridge@0: fpga bridge [hps2fpga] registered
[ 2.149080] altera_hps2fpga_bridge sopc@0:fpgabridge@1: fpga bridge [lwhps2fpga] registered
[ 2.180212] altera_hps2fpga_bridge sopc@0:fpgabridge@2: fpga bridge [fpga2hps] registered
[ 2.188772] altera_fpga2sdram_bridge sopc@0:fpgabridge@3: fpga bridge [fpga2sdram] registered
[ 2.197279] altera_fpga2sdram_bridge sopc@0:fpgabridge@3: driver initialized with handoff 000001ff
In my case the fpga_bridge
folder is not empty and the bridges all have an appropriate entry for name
:
root@cyclone5:~# ls /sys/class/fpga_bridge
br0 br1 br2 br3
root@cyclone5:~# ls /sys/class/fpga_bridge/br0
device name of_node power state subsystem uevent
Maybe these just need to be renamed? but I cannot just rename them live (not permitted), probably in a device table somewhere? Any ideas?