ReadFromBTPipeOut timeout?

Hi OK

I use the xem3005, fw 3.1 on the ubuntu linux platform. I use several of your hdl modules (Wire, Trigger and BTPipe) in my fpga implementation. The FPGA interfaces with our own ASICs and I store the replies from the ASICs in a FIFO (generated by the coregen as you recommend) before a fetch the results back to the PC using a BTPipeOut module. My software is written in Java using Eclipse.

The problem is that the amount of data stored in the FIFO might vary and it might be impossible to predict how much data that is located in the FIFO. I use the ready flag is connected to a programmable empty flag in the FIFO and is asserted when there is data available for one transfer.

I want to flush the FIFO and my my approach is to keep asking for data untill the FIFO is empty. This is a problem though, since the API freezes if the ready flag is deasserted - The method call and never timeout’es. I’ve tried to set the timeout value in the API, but it seems that this timeout value is not applied in the ReadFromBTPipeOut method.

From my own experiences with the CY68013A IC I recall that it was possible to ask for “too much” data and simple use the returned length value to figure out how much data was really returned. Is this not possible with FrontPanel?
Do I have to implement a parallel data count functionality?

Thanks in advantage
Jens Frandsen

Jens–

I’m not sure why the timeout feature is not working for you. This should well apply to the ReadFromBTPipeOut method.

However, to avoid using timeouts, you will need to implement a count feature and relay that information using, for example, a WireOut.

Just to clarify the situation. The situation where my code freezes is when the PC ask for data and the ready flag is deasserted. The program waits untill data arrives which is sometimes forever. I would like the ReadFromBlockPipeOut method to timeout if the ready flag was kept deasserted for a long period.

So you say that the ReadFromBlockPipeOut method should do that?

/Jens

I have the same problem!
I read from a BT pipe out using python (linux) and the timeout doesn’t work.
When the board has no data to send the python software stalls and the PC sometime needs to be restarted!

How can I solve the problem?

Is there any new information concerning this topic?

I know it’s an old one, but I currently have a very similar problem on Ubuntu 16.04 using “ReadFromBlockPipeOut” and “ReadFromPipeOut” from the Python API. My application freezes and the function returns error code -1. However, when I run it on Windows, I get error code -2 for “Transfer timed out” instead, suggesting that the timeout doesn’t work correctly under Linux distribution.

Which version of FrontPanel are you using? There was a bug previously that caused Timeout errors in Linux to appear as Failed (-1) errors (everything would still work correctly to my knowledge, just the error reported was incorrect). I believe it should be resolved in the most recent version of FrontPanel (4.5.6), though I may be mistaken.