Applying back pressure

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

   

  I have a system where a user mode application sends data through a driver to the FX3, which then sends data to an FPGA via the GPIF2 bus. The FPGA can buffer data but it consumes exactly 100MB/s. The FPGA is capable of pulling data out of the FX3 when it needs it, however I'm uncertain how/when I should send data to the FX3.

   

  In case the driver sends too much data, the FPGA buffers will get filled up, then so will the FX3's buffers. What happens at that point if the driver attempts to send any more BULK OUTs? Is there anything that can be done to make BULK OUTs not be transmitted if there is no room left in the FX3's buffers?

0 Likes
2 Replies
Anonymous
Not applicable

Hi,

   

 

   

If FX3 endpoint buffers are completely filled with data and then if host sends some more data, endpoint responds with a NAK. Host retries the OUT transaction with the same data. This data will be accepted by endpoint whenever the data in endpoint buffer is read by the GPIF II.

   

This NAKing process continues forever unless the host application or device driver cancel the transfer by timeout.

   

 

   

Thanks,

   

Sai Krishna.

0 Likes
Anonymous
Not applicable

 This is not the behavior I'm seeing. It appears almost as if there is no back pressure from the device except for it becoming non-responsive. If the FX3 has 50 buffers, and I try to send enough OUT URBs to fill up 70 buffers the first 50 buffers are sent 8 at a time and are ACKed immediately. After the FX3 buffers are filled Linux stops calling my write callback handler (meaning it might not be receiving any ACK or NAK from the device) even after the FX3 buffers are being consumed by the GPIF interface.

   

Shouldn't Linux be notified by the FX3 when the FX3 goes from haveing 50 out of 50 buffers full to only 49 out of 50 being full?

   

If this process isn't automatic how do I enable it on the FX3?

0 Likes