TUM-LIS / glip

Generic Logic Interfacing Project
http://glip.io
Other
44 stars 15 forks source link

FX3: Writing 1024 bytes (or a multiple of it) to doesn't reach the device #36

Closed koenenwmn closed 7 years ago

koenenwmn commented 7 years ago

There is currently an issue when performing the loopback test with a multiple of 1024 bytes. For small numbers (< 1024 * 24) nothing gets sent at all. For larger numbers the last 1024 bytes simply don't get sent. In both cases the test stalls forever. When sending 2 bytes more or less (or any other even number of bytes) everything works fine though.

I also noticed two exceptions to that: the test finishes normal if 1024 6, or a multiple of 1024 24 bytes, are sent.

imphil commented 7 years ago

I've done the following debugging to narrow down the problem:

I strongly assume that the FX3 firmware is at fault here. It seems that it doesn't trigger a new "send data from internal FIFOs out to FPGA" action.

@koenenwmn is this someting you can have a look at? Otherwise I'm sure we'll find a workaround on the host side to avoid this scenario by splitting up the transfer.

imphil commented 7 years ago

I've found a rather reasonable fix in our software by sending a zero-length packet if our transmit buffers are empty. With that all transfers work fine.