Cypress技术william hill官网
直播中

王竹

7年用户 228经验值
私信 关注
[问答]

如何将数据发送到FX3

你好,
我有一个系统,其中用户模式应用程序通过驱动程序将数据发送到FX3,然后通过GPIF2总线将数据发送到FPGA。FPGA可以缓冲数据,但它正好消耗100Mb/s。FPGA能够在需要时从FX3中取出数据,但是我不确定如何/何时将数据发送到FX3。
在司机发送太多数据的情况下,FPGA缓冲器会被填满,FX3的缓冲器也会被填满。如果驾驶员试图发送更多的大容量,在那一点会发生什么?如果FX3的缓冲区中没有剩余空间,有什么办法可以使散装输出不被发送吗?

以上来自于百度翻译


     以下为原文
  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?

回帖(2)

h1654155275.5814

2019-6-10 06:45:31
你好,
如果FX3端点缓冲器完全填充了数据,那么如果主机发送更多数据,端点用NACK进行响应。主机用相同的数据重试出事务。每当GPIF II读取端点缓冲区中的数据时,该数据将被端点接受。
除非主机应用程序或设备驱动程序通过超时取消传输,否则NACK进程将永远持续下去。
谢谢,
Sai Krishna。

以上来自于百度翻译


     以下为原文
  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.
举报

王竹

2019-6-10 07:03:33
这不是我看到的行为。它看起来几乎好像没有背压来自设备,除非它变得不响应。如果FX3有50个缓冲器,并且我尝试发送足够的OUTURBS来填充70个缓冲器,则前50个缓冲器每次发送8个,并立即被攻击。在FX3缓冲区被填充之后,Linux停止调用我的写回调处理程序(意味着它可能不会从设备接收任何ACK或NAK),即使在FX3缓冲区被GPIF接口消耗掉之后。
当FX3从50个缓冲区中满50个到50个满49个时,不应该被FX3通知吗?
如果这个过程不是自动的,我怎么才能在FX3上启用它呢?

以上来自于百度翻译


     以下为原文
   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?
举报

更多回帖

发帖
×
20
完善资料,
赚取积分