- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the "ALT_PCIE_QSYS_SIMPLE" sample application. The code is executed successfully. It had leaded me to the following doubts:
--------- Doubt 1 --------- By default, the target address specified 0x07000000, however, if I tried to change to other value, it caused the entire PC hang. I couldn't further trace the problem. How do I find out what is the correct target address to right? --------- Doubt 2 --------- The example had shown that the maximum data to be written from PC to FPGA which is 1MB, as the following is the code extracted from the main.cpp:// DMA read example
printf("\nDMA read example\n");
DMA_Read(hDev, target_address, 4096);
DMA_Read(hDev, target_address, 16384);
DMA_Read(hDev, target_address, 65536);
DMA_Read(hDev, target_address, 262144);
My board has 1GB RAM, and the current example show that I am only can write 1MB. How do I write more data, say (10MB or 100MB) ?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The mSGDMA masters are probably only setup to handle 1MB worth of data in that example. If you increase the payload size you'll have to change the master settings to handle that.
That said.... if you are sending more than 1MB of data over PCIe, just use more descriptors. It's a scatter-gather DMA so it's meant to handle multiple back to back transfers. Increasing the payload size that the masters can handle is going to drop your Fmax of your design so you are better off just using multiple descriptors.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply. I still have the following doubt.
- Where is the master settings? - Do you mean putting a loop over the ReadDMA function? - How about the target address doubt? I need to specify 0x07000000, if other target address, PC will hang?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The master settings are in the master IP core(s). I wouldn't recommend changing those settings until reading what they do. There is a .pdf that documents each of the cores that makes up the DMA.
You can put the read DMA into a loop. I just mean if you want to transfer say 16MB, you can always break that down into 16 1MB transfers (that's the "normal" way to use a scatter gather DMA) I have no clue about the target address changes causing problems. I would study the host code to see how it works, it's possible that by changing the address you are accessing invalid locations and that would be a problem.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page