How to use the PCIE of tx2 to communicate with a TI DSP?

We have a tx2 core-board with a 1x pcie interface.
We want to test the pcie interface .So we decide to use a TI DSP TMS320C6678 to act as an EP and the tx2 as a RC .
Is there any APIs I can use to test the bandwidth between the two devices?

Can you please give more details on what that other device is? Does it have PCIe interface which you want to use to connect that device to TX2? If yes, you need to have a device driver for your device through which the internal DMA’s of that device can be configured to move data around. You can refer to Linux kernel’s documentation on writing a PCIe device driver for your device.

the device is ti DSP TMS320C6678

I see that this particular chip has PCIe x2, Gen-2 interface. So, you can connect it to TX2 as PCIe endpoint. As far as perf is concerned, from TX2 point of view, you can expect almost all of spec defined bandwidth for PCIe-x2 and Gen-2 interface. I quickly checked for any device driver presence in kernel for TMS320C6678 but couldn’t find any.
Bandwidth mainly depends on what is the programming interface of that DSP and how is driver written to effectively use DSP’s internal DMAs to extract max bandwidth Etc. Also, it would be good to get some number from the vendor of that DSP as well along with the platform and driver versions with which those numbers are observed.