- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Terasic DE10-Nano I've created an OpenCL BSP based on one originally modified from de10_nano_sharedonly. It works fine for programs like hello_world, 'aocl diagnose'. However, for vector_add, it runs successfully for only ONCE. The 2nd call to vector_add will hang on clWaitForEvents().
Using clGetEventInfo() I found that the status of a command sent to command queue by clEnqueueReadBuffer() freezes on CL_QUEUED and never changes. On contract, in the first call to vector_add, that status will become CL_COMPLETE immediately.
I'm wondering if there is any way I can debug why this command queue is stalled? For example, maybe I can probe some signal/bus inside the circuit, or call some API to know the status of the command queue?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, it's not on emulator. This issue occurs on an FPGA board: Terasic DE-10 Nano.
Any comment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try to check your hardware first by https://www.intel.com/content/www/us/en/programmable/documentation/ewa1437420465656.html#ewa1405362471152
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for this suggestion.
That document says I can use "aocl diagnose" to check the hardware.
In my case "aocl diagnose" passed without any problem, as I've mentioned in my original post.
Any other way I can test?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you attached your kernal files and host for me to try it out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK. In the attached vector_add.tgz you can find
- the opencl kernel source: vector_add/device/vecor_add.cl
- the host application source: vector_add/host/src/main.cpp
I got them as part of the OpenCL BSP of DE10-Nano from Terasic.
I guess its original source is the v17.1 Arm32 Linux package (.tar.gz) from:
Please kindly understand that you won't duplicate this symptom on the official DE10-Nano OpenCL BSP from Terasic.
It only happens on the BSP I created.
Anyway, as I said in my original post, the symptom is: the host application will stop on the call to clWaitForEvents() (Line 361) in the second run of this host application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What modification that you have make on the BSP? Do you know how to use signal tap for debugging?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My OpenCL BSP is based on this one: https://github.com/thinkoco/c5soc_opencl, which is originally modified from de10_nano_sharedonly from Terasic.
I modified the Quartus project, the u-boot spl, u-boot, kernel, etc to enable 1920*1080 HDMI output.
Yes, I know how to use SignalTap. Any signal/bus inside the circuit you could kindly suggest me to probe?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually I've contacted the author of c5soc_opencl for this issue, but he has no idea about how to debug this issue, even he had solved many of my issues before.
OK, I'll try to debug in the way you suggest.
Thanks for your kind help. I wish you a wonderful day!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page