01-24-2017 11:09 PM
Hello,
I want see the data that a kernel reads from global memory. To do this, i simply have a loop that prints the elements of the matrix that is read from memory (it's a matrix of floats). The CPU emulation works fine, but when i execute the kernel in the fpga, it seems like it ignores the printf, there's no output, but the kernel executes without errors (with bad results, that's why i want the printf). ¿What's happening?
Thanks
01-24-2017 11:21 PM
How many elements are your trying to print? Can you attach your host code and kernel?
01-24-2017 11:30 PM
Hi,
You can try Hardware Emulation flow. You will see the same behaviour as on fpga (bad results) but with printf statements. It will be quick to iterate using this flow.
Thanks,
Sahil
02-01-2017 04:58 AM
Hello,
I don't have the code at this moment, but it's very similar to the kernel I attached to the other reply I made to you in post "FPGA compilation not working like cpu simulation", but without pipes, only a single kernel.
I only put 3 loops, printing matrix Asub after reading it from global memory, Bsub also after reading it from global memory and acc after multiplying, before writing to global memory. The matrix size was 128*128, but every work-item only multiplied blocks of 32*32 elements, so it was 32*32*3 prints, maybe too much.
Thanks,
Juan Miguel
02-01-2017 05:01 AM
Hi,
I tried hardware emulation many times, but it doesn't work. When it's creating the program (clCreateProgramWIthBinary) it gives the next error:
simulate_sysemulation.sh: line 4: 172819 Segmentation fault (core dumped) "$@"
And the simulation freezes, forcing me to cancel execution.
Thanks,
Juan Miguel
09-15-2019 05:41 PM
I am facing similar odd behavior with hardware emulation. In hardware emulation, I get weird reprints of the same value and odd jumps in the count.
I'm trying to print the address in a Bram block and the data(integer) at that location. 4096 print outs.
Additionally, it works in software emulation, but not hardware emulation. Could this really be cause by the printf statement? If so, how can the hardware emulation be debugged?