Forum Discussion
I have some error to use OpenCL.. please help me.
Hellow guys, I have some problem to use opencl. I am using AOCL and quartus 13.1 version. My probelm is when i command " aocl diagnostic" the error are occcur. the message is belowe that.
aocl diagnostic: Running diagnosticrom /root/altera/13.1/hld/bord/plda/xpressgx5lp/linux64/bin running diagnotic for : acl0 FPGA is in user mode. Enablin bridges Using platform:Altera SDK for OpenCL Failed clGetDeviceIDs. Error code: -1 aocl diagnostic: failed. so I want to fix the problem and to use the board. what is cause and solution of this problem.24 Replies
- Altera_Forum
Honored Contributor
What is your board? Every board has a starting guide that details how you should set up the board for first usage.
Apart from that, the version of Quartus/AOC you are using is ancient; at this point in time, depending on the BSP available to you by the board manufacturer, you should be either using 16.1.2 or 17.0. - Altera_Forum
Honored Contributor
My board is xpressgx5lp of PLDA. They are old board, right. Sadly, I don't have starting guide. I did it alone. Because the PLDA now change direction of their buisiness. So I am not supported by the board vendor.. But I have board BSP package. And README FILE in BSP specify the fact that this board are working with AOCL and Quatus 13.1. Do you recommad using the newest vesion of aocl and quartus?
many thanks. --- Quote Start --- What is your board? Every board has a starting guide that details how you should set up the board for first usage. Apart from that, the version of Quartus/AOC you are using is ancient; at this point in time, depending on the BSP available to you by the board manufacturer, you should be either using 16.1.2 or 17.0. --- Quote End --- - Altera_Forum
Honored Contributor
Ah, well, if you are using an old BSP for an unsupported board, then using a new version of Quartus will just give you more trouble.
Currently the diagnose script cannot find/see your board which means the board is not set up correctly. To get the board up and running, you need two things: 1. A pre-compiled FPGA binary that you should use to program the FPGA through JTAG to enable the PCI-E core. This allows the FPGA to be detected via PCI-E and used with OpenCL. 2. A PCI-E driver that would allow the host to communicate with the FPGA. You should get both of these with the BSP. The first one is straightforward, look for some "sof" file in the BSP, probably top.sof, to program the FPGA using quartus_pgm or Quartus GUI. For the second one, make sure the "AOCL_BOARD_PACKAGE_ROOT" environmental variable is pointing to your BSP, and then run aocl install; this should install the driver if everything is done correctly. Then do a full power cycle on the host machine (a reboot is not enough). You can check the starting guides from other boards to get an idea of the usual steps (Terasic's guides are accessible with a free account on their website); the steps are more or less the same for every board. - Altera_Forum
Honored Contributor
Dear HRZ
Many Thanks for your help. I have done about the first one. Using JTAC, I tested PCIE "sof" file. It is successfull. In second one, I think that is not issue to me. because the "aocl install" command is working well. So I think the problem is driver is already installed but the CPU or mainboard are doesn't recognized the FPGA. In centos 6.4 linux, I insult "lspci" command the bellow are shown. ... 01:00.0 Unassigned class [ff00]: PLDA PCI Express Core Reference Design. ... And in isolation this problem, I have one question. Is it need OpenCL SDK License to work the "daignostic"? - Altera_Forum
Honored Contributor
The diagnose script is an OpenCL program, but the kernel is precompiled and I don't think you need a license for host compilation, which means you shouldn't need a license for it to work.
Can you try lspci -v and see if there are any entries under the one you mentioned above like this?Kernel driver in use: aclpci Kernel modules: aclpci_drv - Altera_Forum
Honored Contributor
Many Thanks. Below is the script when i command "lspci -v". I don't see the Kernel driver and Kernel module you mention.
01:00.0 Unssigned class [ff00]: PLDA PCI Express Core Reference Design (rev 01) Subsystem: PLDA PCI Express Core Reference Design Flags: bus master, fast devesel, latency 0, IRQ 16 Memory at f0100000 (64-bit, prefetchable) Memory at f0104000 (64-bit, prefetchable) Capabilities: [50] MSI: Enable - Count=1/16 Maskable- 64bit+ Capabilities: [78] Power Management version 3 Capabilities: [80] Express Endpoint, MSI 00 Capabilities: [100] Virtual Channel Capabilities: [200] Vendor Specific Information:ID=a000 Rev=0 Len=044 <?> Capabilities: [300]# 19 Kernel driver in use: plda I am confused about opencl. What is diagnose? I think it is just test progrem about OpenCL maked by vecdor. So It doesn't need to compile the kernel. I think, just test FPGA board using the flash memory data not using kernel. But you mention kernel is precompiled. what is mean? If it need to precompile, what is precompile source? I mean that if compile command is "aoc --board <board name> source.cl, what is source.cl? - Altera_Forum
Honored Contributor
Your log says "Kernel driver in use: plda", so it seems the driver is working. Are you sure there is no other line starting with "Kernel modules"?
The diagnose script is an OpenCL program that is provided in precompiled form in the BSP which writes some data to the FPGA board and then reads it back and compares the data to make sure the board is working correctly. You do not need to compile this script manually. - Altera_Forum
Honored Contributor
Many Thank.. other message is none.. when i command "lspci -v", the "Kernel Modules" exist in the other part. No "kernel Modules" in PLDA part. So I read ReadMe file. they wrriten below.
- Compile OpenCL kernels using the --board <board-name> switch; board-name can be xpressgx5lp_a7 or xpressgx5lp_a4 depending on the board you purchased, i.e. "aoc <options> --board xpressgx5lp_a7 myopenclkernel.cl <command line arguments>". - Run "aoc --list-boards" for the list of supported boards - Run "aocl install" once prior to running your first OpenCL executable. Requires sudo priviledges. - Run "aocl diagnostic" to perform self-diagnostic of the board. I have done to set the path and the others. But I didn't do compiling opencl kernel. Because I don't have "myopenclkernel.cl" file. Dose kernel compile is need to work the diagnositc? - Altera_Forum
Honored Contributor
Well, that is a badly written readme. The first step should actually be the last step. What they mean is that you should compile your own kernels using the mentioned command to be able to run them on the FPGA; obviously, this has to be done AFTER setting up the board.
A very crucial step is also missing there: programming the FPGA via JTAG using an existing FPGA image (supplied by the manufacturer) to enable the PCI-E core, and then doing a full power cycle. Have you done a full power cycle on the machine since you programmed it via JTAG? - Altera_Forum
Honored Contributor
I have done to program the FPGA vis JTAC using am existing FPGA image supplied by the manufacturer) to enabel the PCI-E core.
But I don't know what is full power cycle. Although I try to find them, I failed. please tell me what is full power cycle in FPGA ?