Forum Discussion
Altera_Forum
Honored Contributor
17 years agoAndy, how do you know the dma transfer occurred correctly? Did you check the dma status register?
Here are a couple of tips from my experience with getting the dma working (only doing single pages so far): 1. Make sure your PCIe simulation works correctly. Reference the control signals used in the simulation testbench (inside altpcietb_bfm_driver.vhd) to see which addresses the DMA control registers are mapped to .. I found that they differed from the address map for the PCIe user guide example. 2. Base your software off the Jungo driver code provided in the WinDriver PCI User's Manual. I'm not sure, but I think using the windriver API calls for word writes are better for writing to the dma control registers rather than using the kernel-mode physical memory pointers you mentioned. I suspect caching can cause problems when attempting to write to a memory mapped hardware peripheral register. On a similar note, be sure to syncCpu and syncIo as shown in the sample code. 3. There is some jungo sample code also available under the altera directory. I've found the code there to be incorrect for the pcie example, but it serves as a useful guide for how to write your own. Good luck!