From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using FIFO in communication HOST-FPGA

Hello,

I'm new to RIO programming.

I need to pass some configuration data from host to FPGA and back, I found a method involving FIFOs. I created a very simple program (picture attached) to learn how it works.

The problem is that the program doesn't work. The variable 'wynik' is 2 regardless inputs 'x' and 'y'.

Hope you can help.

Thanks

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

That code doesn't appear to have any obvious problems. There may be some issue with the configuration of the FIFO, which isn't visible in the pictures.

I also would wonder why you're writing 15 values each time on the RT side, but only reading one result. This will lead to problems with buffer overflow at some point (because you'll be adding 14 elements somewhere each iteration).


GCentral
0 Kudos
Message 2 of 3
(1,831 Views)

I'm getting the sense that I've already answered this question before.

 

You need to monitor the "Timeout" output of the FIFO on the FPGA. It will continuously output the last value when the FIFO is empty (it will not automatically return zero).

 

Only write to the following node if "Timeout" is FALSE.

 

Aside from that, we have no way of knowing how youe FIFOs are configured. There's a coercion dot on the right-hand FIFO, so there appears to be a datatype mismatch also.

Message 3 of 3
(1,825 Views)