01-24-2017 11:09 PM
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?
01-24-2017 11:30 PM
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.
02-01-2017 04:58 AM
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.
02-01-2017 05:01 AM
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.
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?