-
Notifications
You must be signed in to change notification settings - Fork 492
Open
Description
Hello everyone,
I’m currently encountering some issues when using XDMA in stream mode.
On the FPGA side, I use an AXIS stream generator module, which continuously produces 16,384 bytes of data through the valid and ready handshake, and asserts tlast for the last beat.
On the host side, my test program is as follows:
int main() {
int status = 0;
char rx_buf[1024*1024] = {0};
int c2h0 = open("/dev/xdma0_c2h_0", O_RDWR | O_TRUNC);
if (c2h0 < 0){
fprintf(stderr, "unable to open device %s.\n", "/dev/xdma0_c2h_0");
status = -1;
}
for (size_t i = 0; i < 10000; i++)
{
int count = read(c2h0, rx_buf, 512*1024);
printf("actual recv size :%d\r\n", count);
}
close(c2h0);
return 0;
}As expected, I should be able to receive a fixed-length data block each time.
However, in reality, the read function does not return a fixed length each time.
actual recv size :15408
actual recv size :13168
actual recv size :16960
actual recv size :14640
actual recv size :12672
actual recv size :11776
actual recv size :44112
actual recv size :11472
actual recv size :14656
actual recv size :12400
actual recv size :12832
actual recv size :12976
actual recv size :17248
actual recv size :13664
actual recv size :13424
actual recv size :11376
actual recv size :44208
actual recv size :11440Metadata
Metadata
Assignees
Labels
No labels