- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I am trying to use the SGDMA to transfer data,but I find it's hard to write the descriptor.I spend o lot of time to read the desgin example SG-DMA,it's hard to be understand. Is there someone can give me a simple example of the SGDMA. thanks a lot.Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wouldn't waste your time with the existing SGDMA, but rather use the one that is provided here (http://www.altera.com/support/examples/nios2/exm-modular-scatter-gather-dma.html).
The latter is both more capable and designed more sensibly. It's what I advocate for any designs that require SGDMA capabilities going forward. Cheers, - slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you for your suggestion.
but i want to know the Scatter-Gather DMA Controller Core PDF shows the mode of the descriptor data struct is: typedef struct { alt_u32 *read_addr; alt_u32 read_addr_pad; alt_u32 *write_addr; alt_u32 write_addr_pad; alt_u32 *next; alt_u32 next_pad; alt_u16 bytes_to_transfer; alt_u8 read_burst; /* Reserved field. Set to 0. */ alt_u8 write_burst;/* Reserved field. Set to 0. */ alt_u16 actual_bytes_transferred; alt_u8 status; alt_u8 control; } alt_avalon_sgdma_packed alt_sgdma_descriptor; but in the code i didn't find the structure. thank you very much.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at this software: http://www.nioswiki.com/exampledesigns/sgdma
Really though you shouldn't need to modify the structure directly, there is an API for creating descriptors and sending them to memory for the SGDMA to access. There are a lot of pitfalls you can run into since the SGDMA accesses the descriptors in memory so you have to be very careful how you synchronize between the CPU and SGDMA engine.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you for your suggestion!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear BadOmen,
Above link seems to be very old and it opens wiki home page when i click. Kindly provide an updated link for Design Example of SGDMA. Nandish Jasani.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yep that's the page I was referring to back then. I heard that some are having difficulty getting that design working these days so if you get stuck I wouldn't spent too much time trying to debug it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you share the SGDMA example with me? I find it's hard to transfer several descriptors without software intervention. And can you help me ? Thank you very much.

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