Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17267 Discussions

Any OpenCL Debugging Tools?

Altera_Forum
Honored Contributor II
1,407 Views

I have one OpenCL code which runs well on CPU/GPU, but fail to run through on FPGA. 

 

Are there any OpenCL Debugging Tools available to read out the inner status over JTAG?  

 

The code: (with initialized global_offset[0] = 0, and global size is 128) 

__kernel void global_atomic_sequential_write(__global int *global_offset, int num_elem) 

const unsigned int global_id = get_global_id(0); 

 

bool DoWork = false;  

while (!DoWork) 

DoWork = atomic_cmpxchg(&global_offset[0], 0, 1) == 0;  

 

 

global_offset[0] = 0;  

}
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
638 Views

At the moment there are no tools but you can use printf to push data back to the host. You'll want to put a guard statement around the printf so that you only get data back from a single work-item (if you don't you'll end up with printf executed by all the work-items and it'll be fairly difficult to decypher).

0 Kudos
Reply