Part Number: TDA4VM
Hello,
I'm currently trying to use a J721E EVM to access via PCIe a Xilinx FPGA with PCIe IP core. The J721E is the RC, the FPGA the EP. As driver I use the LLD of the RTOS SDK 07_03_00_07, resp. pdk_jacinto_07_03_00_29.
Unfortunately, in the Jacinto SDK there is no PCIe example. Surprisingly, I found one in the Sitara SDK resp. PDK (pdk_am65xx_07_03_00_54, the path there is \pdk_am65xx_07_03_00_54\packages\ti\drv\pcie\example\sample\j721e\src). Based on this example I've built my own application to set up the PCIe controller. With this it is at least possible to establish a link between the the Jacinto and the FPGA. This is indicated by the PCIE_USER_LINKSTATUS register.
However, I'm not able to access any data on the FPGA. If I access the expected address ranges (see questions below), the debugger gets disconnected and I need a power cycle to be able to reconnect. It looks like some exception occurred.
I'm relatively new to PCIe, probably I've just made some beginner's mistake. So becoming clearer about how PCIe works (not only) on the Jacinto might already be part of the solution:
Since I'm relatively new to PCIe, maybe the problem can already be solved by just getting a correct understanding of how PCIe works (not only) on the Jacinto:
Q1) As I understand, access to the config space of the EP is standardized and should always be possible. Thereto I took the Outbound ATU configuration from the Sitara example:

Now my expectation was that I just have to read from the base address configured in the ATU to get the data (which there was 0x18010000, and which is also on the Jacinto part of the PCI address space). According to my understanding, the read access will trigger the PCIe controller to send a Configuration Read TLB, which is completed by the EP. Is this assumption correct, or do I need any additional / other configuration to access the config space? Currently, reading from 0x18010000 does not work.
Q2) As I've seen in the example that for an Outbound ATU memory region on one side, a matching inbound ATU memory region and a BAR on the other side is configured. My expectation for a read request was, that I have to read from the base address configured for the Outbound ATU region (in the example: 0x19000000). The PCIe controller will generate from this read access a Read Memory TLP. When this matches the configured BAR and Inbound Region on the EP, a Completion TLP is sent back to the RC and the data is presented to the originator of the read access. Here I also get an exception if I try to read from 0x19000000.