cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vconst89
Adventurer
Adventurer
252 Views
Registered: ‎09-10-2020

XDMA Driver Latency Windows

Hi,

XDMA Driver works pretty quick in Linux, Read/Write latency of single transaction is bellow 25us

Now I'm evaluating the XDMA driver for Windows and latency is way higher

Found 1 Xdma device.
Starting single XDMA Card-to-Host transfer of 4 KB.
XDMA Card-to-Host transfer has finished after 130 us.
Starting single XDMA Host-to-Card transfer for 4 KB.
XDMA Host-to-Card transfer has finished after 70 us.

 

Here's the example soruce code

/* transfer data from FPGA Card to Host PC using SGDMA engine */
	printf("Starting single XDMA Card-to-Host transfer of %u KB.\n", xdma.buffer_size / ONE_KB);
	timer_start(&timer);
	
	if (!ReadFile(xdma.c2h0, (LPVOID)xdma.buffer, xdma.buffer_size, (LPDWORD)&num_bytes_read, NULL)) {
		fprintf(stderr, "ReadFile from device %s failed: %d", xdma.c2h0_path, GetLastError());
	}
	elapsed = timer_elapsed_us(&timer);
	printf("XDMA Card-to-Host transfer has finished after %lld us.\n", elapsed);

	/* transfer data from Host PC to FPGA Card using SGDMA engine */
	printf("Starting single XDMA Host-to-Card transfer for %u KB.\n", xdma.buffer_size / ONE_KB);
	timer_start(&timer);
	if (!WriteFile(xdma.h2c0, (LPVOID)xdma.buffer, xdma.buffer_size, (LPDWORD)&num_bytes_read, NULL)) {
		fprintf(stderr, "WriteFile from device %s failed: %d\n", xdma.h2c0_path, GetLastError());
	}
	elapsed = timer_elapsed_us(&timer);
	printf("XDMA Host-to-Card transfer has finished after %lld us.\n", elapsed);

 

What can be the reason for poor performance? 

0 Kudos
0 Replies