Hi @Sijith,
I have reviewed the forum threads previously. Regarding the 'API.cc' file, are you referring to 'Demonstrations/PCIe_SW_KIT/Windows/PCIe_DDR4/PCIE_DDR4.cpp'? If so, you will need to modify the driver to suit the modifications you've made to the design example. As per my understanding, the PCIE_DDR4 application provided by Terasic is specifically designed for the PCIe Reference Design - DDR4.
From the DE5a_Net_User_Manual.pdf:
In Chapter 7.3, the PCIe library module TERASIC_PCIE_AVMM.dll provides DMA and direct I/O access for user application program to communicate with FPGA. Users can develop their applications based on this DLL.
In Chapter 7.4, below shows the exported API in the TERASIC_PCIE_AVMM.dll.
Perhaps you can start from here to modify the driver for your design application. Please note that driver support falls outside my area of expertise.
If you want to perform DMA read operation from host side, then it needs to run from the host. On the other hand, if you want to perform DMA write operation from the FPGA side, then you would need to modify the driver to initiate the DMA from the FPGA side.
Noted, and take the time you need. I look forward to your updates.
Thanks.
Best Regards,
VenTingT