07-09-2014 10:19 AM
Hello/Bonjour
I try to pass some data trought DMA FIFO but I have a problem of synchronisation.
I hope to read on rt 0 as 1 data, 1 as 2nd etc..
Any idea?
J'essai de paser des données (0,1,2,3..6,7) depuis un FPGA vers un RT mais je n'arrive pas à lire les données dans un orde fixe genre, le 0 en 1er puis le 1 etc..
Une idée de ce qui cloche dans mon code?
BR/Merci
Solved! Go to Solution.
07-09-2014 10:26 AM
Any Idea about what?
It looks like you have FPGA code writing to the FIFO, and PC code to read from the FIFO.
What is your question?
07-09-2014 11:01 AM
The question as far I understand is that the numbers 0,1,2 and 3 are missing.
I would suggest you to log the data and check, I believe you are getting all the data but the indicator shows the data after 5718 iteration. Also instead of writing only 8 data write 100 data (iteration value in the FPGA) so that atleast you don't have any confusion seeing in the indicator.
07-09-2014 11:06 AM
OK.. if you look data of front panel of RT vi,
you can see Data[0]=4 Data[1]=5 etc..
So i would like to have Data[0]=0 and Data[1]=1 and Data[8]=0 etc
did you need more precision ?
07-09-2014 11:10 AM
Can you do what I have suggested and show the result?
07-09-2014 11:13 AM
Found!
I read 100 element and write 8 by 8 element, 100 is not a multiple of 8.
read 80 element work
07-09-2014 11:27 AM
P@Anand wrote:
The question as far I understand is that the numbers 0,1,2 and 3 are missing.
I would suggest you to log the data and check, I believe you are getting all the data but the indicator shows the data after 5718 iteration. Also instead of writing only 8 data write 100 data (iteration value in the FPGA) so that atleast you don't have any confusion seeing in the indicator.
P@anand hit the problem on the head.
You are sending batches of 8 elements at a time. You are reading 100 elements at a time. 100 is not divisible by 8. So in one iteration, the first 4 elements of the hundred grabbed will be 0, 1, 2, 3. The next iteration, it will start 4, 5, 6, 7. 100 elements will only give you 12.5 batches of 8 elements per iteration.
Try making your number of elements to read a value divisible by 8.