This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5K2E04: inbound problem on communication with FPGA over PCIE

Part Number: AM5K2E04

Tool/software: Linux

Hi!

Our system consists of an AM5K2E04 chip and a Xilinx FPGA chip. They are connected by PCIE.

I used XPDMA IP core (which has a PCIE core and a DMA core) in FPGA, and also installed the proper PCIE driver provided by Xilinx.

I can use ARM to access the PCIE register and DMA register in FPGA successfully, that means that I can do both cfg access and memory access correctly, in the outbound direction.

But the DMA core in FPGA need the PCIE core in FPGA to be a master, which means AM5K2E04 PCIE should be able to work in the inbound direction.

Here is the problem: 

1. When I start Linux OS with PCIE RC mode, only BAR0 is configured, and BAR1 is disabled.

2. When I install the PCIE driver provided by Xilinx, BAR1 is not enabled either.

3. When I enable BAR1 with the instruction in the PCIE user guide, access started by FPGA does not work.

4. When I check the PCIE register in FPGA, it says that there is a CRC error.

Should BAR1 be disabled due to the default configuration of Linux OS?

How can I use the driver correctly and which register should I configure for the inbound access ? 

Thank you very much!

  • I've forwarded your query to the software experts. Their feedback should be posted here.

    BR
    Tsvetolin Shulev
  • Hi, Yuetan,

    If I understand correctly, the BAR0 should be the cfg space, but BAR1 the data space. When you mention that the BAR1 is enabled, what do you mean and how do you enable it? Could you provide the link to the User's Guide you referred to?

    Do you configure an area for the data mapping to the PCIe endpoint? You can refer to the K2E memory map in the datasheet. There are 2 256MB PCIe data spaces. One for each PCIe port.

    Rex