LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FIFO DMA

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 7
(3,404 Views)

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?

0 Kudos
Message 2 of 7
(3,399 Views)

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.

 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 7
(3,381 Views)

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 ?

0 Kudos
Message 4 of 7
(3,378 Views)

Can you do what I have suggested and show the result? 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 7
(3,371 Views)
Solution
Accepted by topic author AFLAMENT

Found!

I read 100 element and write 8 by 8 element, 100 is not a multiple of 8.

read 80 element work

0 Kudos
Message 6 of 7
(3,360 Views)

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.

0 Kudos
Message 7 of 7
(3,349 Views)