makestuff / libfpgalink

LIB:Library for interacting with an FPGA over USB
https://github.com/makestuff/libfpgalink/wiki/FPGALink
GNU Lesser General Public License v3.0
82 stars 25 forks source link

VHDL: Should not assert pktend when transfer is block-aligned #13

Closed makestuff closed 13 years ago

makestuff commented 13 years ago

Doesn't seem to be documented in the TRM, but it looks like pktend should not be asserted if the transfer is a whole number of 512-byte buffers.

status = flReadRegister(fpgaLink, 1000, 0x02, 512, dataBuf, &error); status = flReadRegister(fpgaLink, 1000, 0x02, 2, dataBuf, &error);

This came up in the UMDKv2 VHDL and I fixed it by having two STATE_END_WRITE states: 1) For transfers where the last block is shorter than 512 bytes -> assert pktend 2) For transfers where the last block is exactly 512 bytes -> do not assert pktend

makestuff commented 13 years ago

https://github.com/makestuff/libfpgalink/commit/ac3abf99ba0d42c12806a1d277290188d24602db