Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- So, I think my printf information stored in the buffer? Becaue in emulator mode,my code result is right, so i think the host code is right? The host code have four queus, every kernel correspond to on queue. --- Quote End --- That is correct. I was under the impression that printf calls are "streamed" over PCI-E. If the calls are stored in a buffer and printed out "after" kernel execution is finished, then printf is not only completely useless for debugging deadlocks, using it can make deadlocks more likely. --- Quote Start --- Second, I have changed the sequence of reading and writing CONV1_BIAS and CONV1_WEIGHTS, and also increaing the depth of channel to 20.Complie is running,I expect I will get right result. --- Quote End --- If your kernel still didn't work, I recommend removing the printfs (since it might cause deadlocks of its own) and also using "mem_fence(CLK_CHANNEL_MEM_FENCE)" to enforce channel ordering in kernels that have multiple channel reads/writes.