本帖最后由 无星之夜的 于 2023-10-24 17:22 编辑
本程序在达芬奇PRO上可以正常运行,其实也就是基于达芬奇的例程改的,现在切换到我自己的一块K7的开发板就用不了,求助。FPGA: XC7K325T-2FFG900I XDMA version 4.1 block design设计如下
在 win10 电脑上安装 XDMA 驱动程序后,运行 xdma_info.exe,我得到了以下信息(见文末 PCIE701_info.txt),这证明我的驱动程序安装正确。 当我运行 xdma_test.exe 时,程序被挂起,当我试图关闭程序时,出现蓝屏。 于是我决定调试程序,然后编写了一个向 FPGA 发送数据的程序。 当程序运行到 WriteFile() 函数时,程序卡住了,通过查看堆栈,程序卡在了 NtWriteFile() 函数中。(本人对于驱动开发不懂)见下图
并且我还查看了ILA的波形。ILA1如下图所示,说明XDMA的PCIE链接应该成功建立了,且DDR3也初始化完成了 当我通过上位机发送数据 "ABCDEFGH "时,查看ILA2可以看到数据,我认为数据已通过 AXI_BVALID、AXI_BRESEP 和 AXI_BREADY 正确写入 DDR3。​ 所以,我觉得可能是驱动程序的问题,但我也不是很确定。如果我描述得不清楚,请告诉我。 希望得到您的帮助,非常感谢!😭
附件 PCIE701_info.txt Found 1 XDMA devices
device path: \\?\pci#ven_10ee&dev_7028&subsys_000710ee&rev_00#4&798c2c0&0&00dc#{74c7e4a9-6d5d-4a70-bc0d-20691dff9e9d}
H2C Module
Channel ID: 0
Version: 2017.1
Streaming: false
Running: false
IE descr stop: true
IE descr complete: true
IE align mismatch: true
IE magic stopped: true
IE invalid length: true
IE idle stopped: false
IE read error: 1f
IE write error: 1f
IE descr error: 1f
Non incremental mode: false
Pollmode wb: false
AXI-ST wb disabled: false
Busy: false
Descriptor stopped: false
Descriptor completed: false
Alignment mismatch: false
Magic stopped: false
Invalid length: false
Idle stopped: false
Read error: 0x0
Write error: 0x0
Descriptor error: 0x0
Completed Descriptors: 0
Addr Alignment: 1 bytes
Len Granularity: 1 bytes
Addr bits: 64 bits
Poll wb addr lo: 0x284cd000
Poll wb addr hi: 0x4
IM Descr stopped: true
IM Descr completed: true
IM Alignment mismatch: true
IM Magic stopped: true
IM Invalid length: true
IM Idle stopped: false
IM Read error: 0x1f
IM Write error: 0x1f
IM Descriptor error: 0x1f
Channel ID: 1
Version: 2017.1
Streaming: false
Running: false
IE descr stop: true
IE descr complete: true
IE align mismatch: true
IE magic stopped: true
IE invalid length: true
IE idle stopped: false
IE read error: 1f
IE write error: 1f
IE descr error: 1f
Non incremental mode: false
Pollmode wb: false
AXI-ST wb disabled: false
Busy: false
Descriptor stopped: false
Descriptor completed: false
Alignment mismatch: false
Magic stopped: false
Invalid length: false
Idle stopped: false
Read error: 0x0
Write error: 0x0
Descriptor error: 0x0
Completed Descriptors: 0
Addr Alignment: 1 bytes
Len Granularity: 1 bytes
Addr bits: 64 bits
Poll wb addr lo: 0x284c4000
Poll wb addr hi: 0x4
IM Descr stopped: true
IM Descr completed: true
IM Alignment mismatch: true
IM Magic stopped: true
IM Invalid length: true
IM Idle stopped: false
IM Read error: 0x1f
IM Write error: 0x1f
IM Descriptor error: 0x1f
C2H Module
Channel ID: 0
Version: 2017.1
Streaming: false
Running: false
IE descr stop: true
IE descr complete: true
IE align mismatch: true
IE magic stopped: true
IE invalid length: true
IE idle stopped: false
IE read error: 1f
IE write error: 1f
IE descr error: 1f
Non incremental mode: false
Pollmode wb: false
AXI-ST wb disabled: false
Busy: false
Descriptor stopped: false
Descriptor completed: false
Alignment mismatch: false
Magic stopped: false
Invalid length: false
Idle stopped: false
Read error: 0x0
Write error: 0x0
Descriptor error: 0x0
Completed Descriptors: 0
Addr Alignment: 1 bytes
Len Granularity: 1 bytes
Addr bits: 64 bits
Poll wb addr lo: 0x284c3000
Poll wb addr hi: 0x4
IM Descr stopped: true
IM Descr completed: true
IM Alignment mismatch: true
IM Magic stopped: true
IM Invalid length: true
IM Idle stopped: false
IM Read error: 0x1f
IM Write error: 0x1f
IM Descriptor error: 0x1f
Channel ID: 1
Version: 2017.1
Streaming: false
Running: false
IE descr stop: true
IE descr complete: true
IE align mismatch: true
IE magic stopped: true
IE invalid length: true
IE idle stopped: false
IE read error: 1f
IE write error: 1f
IE descr error: 1f
Non incremental mode: false
Pollmode wb: false
AXI-ST wb disabled: false
Busy: false
Descriptor stopped: false
Descriptor completed: false
Alignment mismatch: false
Magic stopped: false
Invalid length: false
Idle stopped: false
Read error: 0x0
Write error: 0x0
Descriptor error: 0x0
Completed Descriptors: 0
Addr Alignment: 1 bytes
Len Granularity: 1 bytes
Addr bits: 64 bits
Poll wb addr lo: 0x2849f000
Poll wb addr hi: 0x4
IM Descr stopped: true
IM Descr completed: true
IM Alignment mismatch: true
IM Magic stopped: true
IM Invalid length: true
IM Idle stopped: false
IM Read error: 0x1f
IM Write error: 0x1f
IM Descriptor error: 0x1f
IRQ Module
Version: 2017.1
User IRQ en mask: 0x1
Chan IRQ en mask: 0xf
User IRQ: 0x0
Chan IRQ: 0x0
User IRQ pending: 0x0
Chan IRQ pending: 0x0
User IRQ Vector 0: 0
User IRQ Vector 1: 1
User IRQ Vector 2: 2
User IRQ Vector 3: 3
User IRQ Vector 4: 0
User IRQ Vector 5: 1
User IRQ Vector 6: 2
User IRQ Vector 7: 3
User IRQ Vector 8: 0
User IRQ Vector 9: 1
User IRQ Vector 10: 2
User IRQ Vector 11: 3
User IRQ Vector 12: 0
User IRQ Vector 13: 1
User IRQ Vector 14: 2
User IRQ Vector 15: 3
Chan IRQ Vector 0: 16
Chan IRQ Vector 1: 17
Chan IRQ Vector 2: 18
Chan IRQ Vector 3: 19
Chan IRQ Vector 4: 16
Chan IRQ Vector 5: 17
Chan IRQ Vector 6: 18
Chan IRQ Vector 7: 19
Config Module
Version: 2017.1
PCIe bus: 0
PCIe device: 0
PCIe function: 0
PCIE MPS: 256 bytes
PCIE MRRS: 512 bytes
System ID: 0x1234
MSI support: false
MSI-X support: true
PCIE Data Width: 128 bits
PCIE Control: 0x1
User PRG MPS: 4096 bytes
User EFF MPS: 4096 bytes
User PRG MRRS: 4096 bytes
User EFF MRRS: 4096 bytes
Write Flush Timeout: 0x0
H2C SGDMA Module
Channel ID: 0
Version: 2017.1
Streaming: false
Descr addr lo: 0x282af000
Descr addr hi: 0x4
Adj Descriptors: 0
Descr credits: 0
Channel ID: 1
Version: 2017.1
Streaming: false
Descr addr lo: 0x2827a000
Descr addr hi: 0x4
Adj Descriptors: 0
Descr credits: 0
C2H SGDMA Module
Channel ID: 0
Version: 2017.1
Streaming: false
Descr addr lo: 0x28269000
Descr addr hi: 0x4
Adj Descriptors: 0
Descr credits: 0
Channel ID: 1
Version: 2017.1
Streaming: false
Descr addr lo: 0x28258000
Descr addr hi: 0x4
Adj Descriptors: 0
Descr credits: 0
SGDMA Common Module
Version: 2017.1
Halt H2C descr fetch: 0x0
Halt C2H descr fetch: 0x0
H2C descr credit: 0x0
C2H descr credit: 0x0
|