January 27, 2023, 12:25am
My FPGA module is XEM-7305.
I have a design in which there are two data streams coming to FPGA. Let’s call them Stream Odd and Stream Even. For each of them, the data rate is about 12 megabytes per second.
I have Stream Odd writing into FIFO One and Stream Even writing into separate FIFO Two.
I tie FIFO One to block-throttled pipe using port 0xB0 and FIFO Two to BT pipe using port 0xB1.
So far so good. I can read from host pipe 0xB0, and data is OK. Separately from that, I can read from host pipe 0xB1.
In read operation, I use block size of 8192 and transfer size of 1 megabyte.
Now, can I read both at the same time?
Naïve implementation (two threads, one reading one port and the other reading other port) transfers a little bit of data (on both ports) and then stalls (on both ports) with eventual timeout.
January 27, 2023, 4:07am
You cannot have two concurrent BT PipeOut transactions occurring at the same time on a single device. A transaction, i.e
ReadFromBlockPipeOut(), is required to complete fully before another transaction can start.
Please see here for some guidance: Section 7
okSupport’s comment at the following is quite helpful:
Absolutely. Multithreading is encouraged!! The FrontPanel Application itself is multithreaded. Our EVB100X okCameraApp is also multithreaded to read camera data and display in separate threads. Otherwise, the GUI message queue would make things very uncomfortable for the user.
But as you mention, you need to mutex the access to each device. You can have multiple devices open in multiple threads and accessed simultaneously. But accesses to any one particular device must not overla…