Failed to burn an image onto Innova-2 Flex FPGA

I think it works now. Thanks for your help.

notooth@192:~$ lspci | grep -i Xilinx
17:00.0 Memory controller: Xilinx Corporation Device 9038

notooth@192:~$ sudo lspci  -s 17:00  -v
17:00.0 Memory controller: Xilinx Corporation Device 9038
	Subsystem: Xilinx Corporation Device 0007
	Flags: bus master, fast devsel, latency 0, IRQ 55
	Memory at fbff0000 (32-bit, non-prefetchable) [size=64K]
	Capabilities: [40] Power Management version 3
	Capabilities: [48] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [70] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [1c0] Secondary PCI Express
	Kernel driver in use: xdma
	Kernel modules: xdma, qdma_pf

notooth@192:~$ dmesg | grep -i xdma
[    7.366839] xdma:xdma_mod_init: Xilinx XDMA Reference Driver xdma v2020.2.2
[    7.366848] xdma:xdma_mod_init: desc_blen_max: 0xfffffff/268435455, timeout: h2c 10 c2h 10 sec.
[    7.367834] xdma:xdma_device_open: xdma device 0000:17:00.0, 0x000000006a9788b1.
[    7.368520] xdma:map_single_bar: BAR0 at 0xfbff0000 mapped at 0x00000000266bf17c, length=65536(/65536)
[    7.368532] xdma:map_bars: config bar 0, pos 0.
[    7.368535] xdma:identify_bars: 1 BARs: config 0, user -1, bypass -1.
[    7.368845] xdma:pci_keep_intx_enabled: 0000:17:00.0: clear INTX_DISABLE, 0x447 -> 0x47.
[    7.368875] xdma:probe_one: 0000:17:00.0 xdma0, pdev 0x000000006a9788b1, xdev 0x0000000059af4a5c, 0x000000004b3dfd43, usr 16, ch 4,4.

notooth@192:~$ cd ./dma_ip_drivers/XDMA/linux-kernel/tools/

notooth@192:tools$ echo -n -e "\xff" >ff.bin   ;   od -A x -t x1z -v  ff.bin
000000 ff                                               >.<
000001

notooth@192:tools$ echo -n -e "\x00" >00.bin   ;   od -A x -t x1z -v  00.bin
000000 00                                               >.<
000001

notooth@192:tools$ sudo ./dma_from_device --verbose --device /dev/xdma0_c2h_0 --address 0x40000000 --size 4 --file RECV ; xxd -b RECV
dev /dev/xdma0_c2h_0, addr 0x40000000, aperture 0x0, size 0x4, offset 0x0, count 1
host buffer 0x1004, 0x174c000.
#0: CLOCK_MONOTONIC 0.000147425 sec. read 4/4 bytes
** Avg time device /dev/xdma0_c2h_0, total time 147425 nsec, avg_time = 147425.000000, size = 4, BW = 0.027132 
/dev/xdma0_c2h_0 ** Average BW = 4, 0.027132
00000000: 11101001 00000000 00000000 00000000                    ....

notooth@192:tools$ sudo ./dma_from_device --verbose --device /dev/xdma0_c2h_0 --address 0x40000000 --size 4 --file RECV ; xxd -b RECV
dev /dev/xdma0_c2h_0, addr 0x40000000, aperture 0x0, size 0x4, offset 0x0, count 1
host buffer 0x1004, 0x196c000.
#0: CLOCK_MONOTONIC 0.000163964 sec. read 4/4 bytes
** Avg time device /dev/xdma0_c2h_0, total time 163964 nsec, avg_time = 163964.000000, size = 4, BW = 0.024396 
/dev/xdma0_c2h_0 ** Average BW = 4, 0.024396
00000000: 00101001 00000000 00000000 00000000                    )...

notooth@192:tools$ sudo ./dma_from_device --verbose --device /dev/xdma0_c2h_0 --address 0x40000000 --size 4 --file RECV ; xxd -b RECV
dev /dev/xdma0_c2h_0, addr 0x40000000, aperture 0x0, size 0x4, offset 0x0, count 1
host buffer 0x1004, 0x2541000.
#0: CLOCK_MONOTONIC 0.000107604 sec. read 4/4 bytes
** Avg time device /dev/xdma0_c2h_0, total time 107604 nsec, avg_time = 107604.000000, size = 4, BW = 0.037173 
/dev/xdma0_c2h_0 ** Average BW = 4, 0.037173
00000000: 00110001 00000000 00000000 00000000                    1...

notooth@192:tools$ sudo ./dma_from_device --verbose --device /dev/xdma0_c2h_0 --address 0x00000000 --size 4 --file RECV ; xxd -b RECV
dev /dev/xdma0_c2h_0, addr 0x0, aperture 0x0, size 0x4, offset 0x0, count 1
host buffer 0x1004, 0xaea000.
#0: CLOCK_MONOTONIC 0.000155515 sec. read 4/4 bytes
** Avg time device /dev/xdma0_c2h_0, total time 155515 nsec, avg_time = 155515.000000, size = 4, BW = 0.025721 
/dev/xdma0_c2h_0 ** Average BW = 4, 0.025721
00000000: 00010000 00010001 00010010 00010011                    ....

notooth@192:tools$ sudo ./dma_to_device   --verbose --device /dev/xdma0_h2c_0 --address 0x00000000 --size 1  -f    ff.bin
dev /dev/xdma0_h2c_0, addr 0x0, aperture 0x0, size 0x1, offset 0x0, count 1
host buffer 0x1001 = 0x2599000
#0: CLOCK_MONOTONIC 0.000118067 sec. write 1 bytes
** Avg time device /dev/xdma0_h2c_0, total time 118067 nsec, avg_time = 118067.000000, size = 1, BW = 0.008470 
/dev/xdma0_h2c_0 ** Average BW = 1, 0.008470

notooth@192:tools$ sudo ./dma_from_device --verbose --device /dev/xdma0_c2h_0 --address 0x00000000 --size 4 --file RECV ; xxd -b RECV
dev /dev/xdma0_c2h_0, addr 0x0, aperture 0x0, size 0x4, offset 0x0, count 1
host buffer 0x1004, 0x6dd000.
#0: CLOCK_MONOTONIC 0.000177620 sec. read 4/4 bytes
** Avg time device /dev/xdma0_c2h_0, total time 177620 nsec, avg_time = 177620.000000, size = 4, BW = 0.022520 
/dev/xdma0_c2h_0 ** Average BW = 4, 0.022520
00000000: 11111111 00010001 00010010 00010011

notooth@192:tools$ cd ../tests

notooth@192:tests$ sudo ./run_test.sh
Info: Number of enabled h2c channels = 4
Info: Number of enabled c2h channels = 4
Info: The PCIe DMA core is memory mapped.
Info: Running PCIe DMA memory mapped write read test
	transfer size:  1024, count: 1
Info: Writing to h2c channel 0 at address offset 0.
Info: Writing to h2c channel 1 at address offset 1024.
Info: Writing to h2c channel 2 at address offset 2048.
Info: Writing to h2c channel 3 at address offset 3072.
Info: Wait for current transactions to complete.
/dev/xdma0_h2c_2 ** Average BW = 1024, 19.637548
/dev/xdma0_h2c_0 ** Average BW = 1024, 34.552570
/dev/xdma0_h2c_1 ** Average BW = 1024, 24.760614
/dev/xdma0_h2c_3 ** Average BW = 1024, 8.072272
Info: Reading from c2h channel 0 at  address offset 0.
Info: Reading from c2h channel 1 at  address offset 1024.
Info: Reading from c2h channel 2 at  address offset 2048.
Info: Reading from c2h channel 3 at  address offset 3072.
Info: Wait for current transactions to complete.
/dev/xdma0_c2h_2 ** Average BW = 1024, 12.910058
/dev/xdma0_c2h_3 ** Average BW = 1024, 8.150465
/dev/xdma0_c2h_0 ** Average BW = 1024, 5.995702
/dev/xdma0_c2h_1 ** Average BW = 1024, 8.220542
Info: Checking data integrity.
Info: Data check passed for address range  0 - 1024
Info: Data check passed for address range  1024 - 2048
Info: Data check passed for address range  2048 - 3072
Info: Data check passed for address range  3072 - 4096
Info: All PCIe DMA memory mapped tests passed.
Info: All tests in run_tests.sh passed.
1 Like