Hello both,
Thank you very much for putting in effort and giving your time for my problem. and sorry for me not being clear much.
moreover this scanning is only 5 Hz (mistakenly I write 500Hz in previous post) but my actual triggering frequency is 1KHz or 500Hz Hence with fast trigger the shifting is quite greater than
What I actually meant was, that our actual system scanning and hence triggering speed is 500Hz or 1Khz, but for testing purpose I drop down scanning speed to to 5Hz just to verify that is it really
the problem of writing into the file in PC that consumes time. (and I still think with 5Hz it is same although the result is far better than 1KHz).
Are you trying to tell us the sampling triggers occur at 500Hz or 1kHz intervals and the scanning (i.e. reading the FIFO) by the host SW is done at 5Hz intervals?
Your confusion was completely correct since I think I phrased it wrong and messed it up. Hope now it is clear that by scanning and triggering speed I mean the same, just for test case I scan at 5Hz, later we have to do at 1KHz.
We are actually scanning the area using Laser with triggering frequency. This scanning is same as raster scanning actually. Then Ultrasonic sensor(PZT sensor) will sense the energy caused by laser impinging, which ultimately will generate a movie for X*Y area scanning.
Hence we cannot afford to lose data points at even each impinging point. Each impinging interval(trigger or scan interval) is (for testing only) 1KHz in actual system, which is veeery veeery fast I think.
Regardless of the terminology. I think that if you are reading a FIFO and writing the results to a file your system won't be fast enough unless the amount of data is very small and/or the intervals between captures is increased significantly. As we know little about how your SW works I can only assume it's not using DMA or a driver that directly accesses the host's disk drive routines. That would be the highest performing method of capturing data. You could improve that even more by adding a SSD to your system for the data capture.
Our software reads in data through PCIe using DMA (PCIe speed for virtex 5 based board (as the manufacturer said) is 100MHz as they designed in Xilinx core generator).
ads_ee, thank you for your idea of ping-pong buffer I have started looking into it and am surely going to look if it works for fast scanning speed.
Thank you both again for putting in effort.
Bests,
Shan