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
Not on the FPGA, the host. You have to completely turn off the host machine, and then turn it back on (reboot is not enough).
- Altera_Forum
Honored Contributor
After I programed FPGA via JTAC, PCI-E test sof file, there are two circumstance.
1. if I just restart the computer(host machine), FPGA test are passed. they working well as starting guide 2. If I turn off the computer(host machine, FPGA test aren't passed. they doesn't working. I don't know that why it is important. If I turn off the host machine,the FPGA power are off, it is supplied the power by the computer. Although I didn't program in FPGA flash, it doesn't work. That is narmal. I don't know why you mention this test. - Altera_Forum
Honored Contributor
You should also program the on-board flash with the sof file you get from the BSP so that when the FPGA is powered off and then powered on, it automatically get programmed by that image.
If everything is working after a reboot, then that is great; no need to do anything else. :) - Altera_Forum
Honored Contributor
Many Thanks. HRZ
I don't have the flash program. It is old board. So I can't flash the new progrem. :'( Why the Kernel module aren't install? I think that diagnose is to run the precompiled program. So if flash image are dameged, the diagnose command is not working. Is it possible? And one more question, Is it need to check the diagnose command for OpenCL? If I don't check this diagnose command, Don't I use the FPGA for OpenCL? - Altera_Forum
Honored Contributor
You don't need to run the diagnose script to use OpenCL, but if the diagnose script does not find your FPGA, any OpenCL code you write will not find your FPGA either. There isn't anything else I can think of.
- Altera_Forum
Honored Contributor
Mnay Thanks. Well.. I will try one more time and than if I fail, I give up. I want to check the process.
1, The FPGA connect PCI-E in Host PC then turn on. 2, Set the path for OpenCL 3, install the FPGA driver 4, command diagnostic -> failed This is my process. Is it standard procedure? Arranging my procedure, I have a one more question. If I command "aoc --list-board", two board are listed, xpressgx5lp_a4 and xpressgx5lp_a7. Does host CPU select the board automatically or select the board manually? - Altera_Forum
Honored Contributor
This is how I do it:
1. Install the FPGA in a PCI-E slot in the host machine and then turn the machine on. 2. Program the FPGA and the on-board flash with the sof file provided by the manufacturer using JTAG, and set the FPGA to boot from the flash. 3. Turn off the host machine completely and turn it back on. 4. Set the environmental variable path for OpenCL in bashrc. 5. Install the FPGA driver (aocl install). 6. Run diagnose command (aocl diagnose). For the two boards listed, you have to choose the correct one manually for compiling OpenCL kernels. Your command will be "aoc --board *board_variant*". For diagnose, this doesn't matter. - Altera_Forum
Honored Contributor
Many Thanks. HRZ
I did all of thing I could do, but I fail. So this is last question I think. My FPGA board have PCIE 3.0 x8 slot and my computer have PCIE 1.0 x16 slot. Is it possible to connect board with computer ? I know PCIE slot are possible to low rank compatiblilty. But in the reference manual at xpressGX5lp, my FPGA board, that comment as follows. "The PCI Express male connector enables access to Endpoint PCI Express components as a x1, x4, or x8 PCI Express 2.0/3.0 Link." Does the computer recognize the FPGA? If you need the reference manual, I will send you. - Altera_Forum
Honored Contributor
The FPGA board is certainly physically compatible with your motherboard, but Altera's PCI-E core works at PCI-E 2.0 8x, while your motherboard only supports PCI-E 1.0. In the normal case, the PCI-E core should automatically switch to PCI-E 1.0, but I am not really sure if that would happen in this case.
- Altera_Forum
Honored Contributor
Many Thanks, I found many data of OpenCL PCI-E compatability, but there aren't compatability about PCI-E. But the FPGA are compatible with PCI-E Gen 1/2/3.
In the process of finding the data, I have some error about diagnostic. The FPGA test imege, i did, isn't for OpneCL imege. It means that it is just test imege to verify connecting FPGA with motherboard. So, I think, if I success to load the flash memorry, the "diagnostic command" doesn't working. That is my think. :) And I have one more thing I don't understand. Why the message, "failed clGetDeviceIDs.", are shown? The diagnostic use the FPGA OpenCL image in flash memorry. But the image is nothing in flash. (because I don't touched the board since I bought) I guess the process is that the driver in CPU request the FPGA ID, but the FPGA flash image is none, So driver fialed to get the FPGA ID. But It is just my think. Is it right? And one more thing. I don't have flash driver to program flash memory. So I don't program OpenCL imege in Flash memory, But in the altera OpenCL starting guide, many OpenCL imege using the flash memory. That means if I don't have the flash driver, I don't use the OpenCL. Is it right?