by support »
Hello,
Not only do I have a clue, but the clue is documented in the Xillybus host application programming guide for Linux or Windows, section 6.1, "Seekable streams", saying:
For streams which are accessed as 16-bit or 32-bit words in the FPGA, the address given to lseek() must be a multiple of 2 or 4, respectively. The address presented to
the application logic in the FPGA is maintained at all times as the stream’s I/O position (initially as given to lseek() ) divided by 2 or 4, respectively.
I suppose that you ran memwrite without modifying it. As such, it writes one byte. The word granularity is 4 bytes. Since the write didn't reach a four-byte boundary, nothing was written. So please update memwrite to work with 4-byte words, both regarding the seeks and the amount of data it writes. And it will work like a charm.
Regards,
Eli
Hello,
Not only do I have a clue, but the clue is documented in the Xillybus host application programming guide for Linux or Windows, section 6.1, "Seekable streams", saying:
[quote]For streams which are accessed as 16-bit or 32-bit words in the FPGA, the address given to lseek() must be a multiple of 2 or 4, respectively. The address presented to
the application logic in the FPGA is maintained at all times as the stream’s I/O position (initially as given to lseek() ) divided by 2 or 4, respectively.[/quote]
I suppose that you ran memwrite without modifying it. As such, it writes one byte. The word granularity is 4 bytes. Since the write didn't reach a four-byte boundary, nothing was written. So please update memwrite to work with 4-byte words, both regarding the seeks and the amount of data it writes. And it will work like a charm.
Regards,
Eli