Hi Kevin,
thanks for testing and proposing a work around. Unfortunatelly it helps for half of the problem only. The buffer depth limitation can be addressed this way.
However, as soon as we had implemented the changes we run into trouble again seeing this error massage sporadically:
terminate called after throwing an instance of 'sycl::_V1::runtime_error'
what(): Native API failed. Native API returns: -999 (Unknown PI error) -999 (Unknown PI error)
Aborted (core dumped)
Digging into the issue we found that the non-blocking pipe read causes the error as soon as an empty pipe is accessed to read.
To reproduce just generate e.g. 9 write samples and try to read 10.
With the print modification from below the output should look like this:
Running on device: Intel(R) FPGA Emulation Device
Input: 0 9
Input Done!
try read: 0 Output: 0 0 success: 1
try read: 1 Output: 1 1 success: 1
try read: 2 Output: 2 2 success: 1
try read: 3 Output: 3 3 success: 1
try read: 4 Output: 4 4 success: 1
try read: 5 Output: 5 5 success: 1
try read: 6 Output: 6 6 success: 1
try read: 7 Output: 7 7 success: 1
try read: 8 Output: 8 8 success: 1
try read: 9 terminate called after throwing an instance of 'sycl::_V1::runtime_error'
what(): Native API failed. Native API returns: -999 (Unknown PI error) -999 (Unknown PI error)
Aborted (core dumped)
while (!read_success){
std::cerr << "try read: " << i << "\t ";
out_beat = OutPixelPipe::read(*(out_args->q), read_success);
std::cerr << "Output: " << i << "\t " << out_beat.data << "\tsuccess: " << (int)read_success << "\t " << std::endl;
}
Remember my second post here where some odd behaviour was reported for the non-blocking write command too.
Thanks for your help!
Ric.