by support »
Hello,
The *_open signal indicates that the file is open on the host side. So indeed, if the host program closes the file before the data is consumed on the FPGA, it is lost. In most applications, this doesn't happen, partly because the data is usually consumed way faster than the host's pace of doing things, but more importantly: There is usually no reason for the host to close the file until the entire saga is over.
So the point is: Open the file when the program starts, and close it before it exists. This allows the program to write some data, go on doing other things, and then write some more.
Only if you need the program to quit as soon as possible, let it wait for an indication that the FPGA is done (possibly through a Xillybus pipe in the other direction). The fact that the data has been sent doesn't drop the *_open signal -- only the closing of the file.
I hope this clarified the rationale.
Regards,
Eli
Hello,
The *_open signal indicates that the file is open on the host side. So indeed, if the host program closes the file before the data is consumed on the FPGA, it is lost. In most applications, this doesn't happen, partly because the data is usually consumed way faster than the host's pace of doing things, but more importantly: There is usually no reason for the host to close the file until the entire saga is over.
So the point is: Open the file when the program starts, and close it before it exists. This allows the program to write some data, go on doing other things, and then write some more.
Only if you need the program to quit as soon as possible, let it wait for an indication that the FPGA is done (possibly through a Xillybus pipe in the other direction). The fact that the data has been sent doesn't drop the *_open signal -- only the closing of the file.
I hope this clarified the rationale.
Regards,
Eli