Altera Forum






Threads: 18,921
Posts: 77,325
Members: 29,164
Welcome to our newest member, rbn
User
Reputation
9135
7620
5891
4150
2930
2197
2056
1706
1388
1300




 
Register
Quick Search
 
  Altera Forums > IP and Dev Kit Related > Nios Forum > General Discussion > General Discussion Forum

The problem of SGDMA descriptor

Reply
 
Thread Tools Display Modes
  #1  
Old January 20th, 2010, 09:28 AM
li_polaris li_polaris is offline
Altera Teacher
 
Join Date: Oct 2009
Posts: 53
Rep Power: 363
li_polaris is on a distinguished road
Default The problem of SGDMA descriptor

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.
Reply With Quote
  #2  
Old January 20th, 2010, 12:48 PM
slacker slacker is offline
Altera Guru
 
Join Date: Apr 2004
Location: Palo Alto, CA
Posts: 651
Rep Power: 2948
slacker is a name known to allslacker is a name known to allslacker is a name known to allslacker is a name known to allslacker is a name known to allslacker is a name known to all
Default Re: The problem of SGDMA descriptor

I wouldn't waste your time with the existing SGDMA, but rather use the one that is provided here.

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
Reply With Quote
  #3  
Old January 20th, 2010, 11:35 PM
li_polaris li_polaris is offline
Altera Teacher
 
Join Date: Oct 2009
Posts: 53
Rep Power: 363
li_polaris is on a distinguished road
Default Re: The problem of SGDMA descriptor

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.
Reply With Quote
  #4  
Old January 21st, 2010, 01:54 PM
BadOmen's Avatar
BadOmen BadOmen is offline
Super Moderator
 
Join Date: Aug 2004
Location: San Jose
Posts: 786
Rep Power: 3065
BadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to allBadOmen is a name known to all
Default Re: The problem of SGDMA descriptor

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.
Reply With Quote
  #5  
Old January 21st, 2010, 09:28 PM
li_polaris li_polaris is offline
Altera Teacher
 
Join Date: Oct 2009
Posts: 53
Rep Power: 363
li_polaris is on a distinguished road
Default Re: The problem of SGDMA descriptor

thank you for your suggestion!
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SGDMA questions Mike21 General Discussion Forum 1 September 25th, 2009 03:34 PM
SGDMA interrupt swordflyer General Altera Discussion 1 April 13th, 2009 08:10 PM
How to define the NULL descriptor in SGDMA draculaor IP Discussion 4 February 16th, 2009 12:55 AM
problem adding TSE_MAC + SGDMA bertronicom General Altera Discussion 3 February 6th, 2009 04:10 AM
PCI with SGDMA operation newfrance IP Discussion 2 November 10th, 2008 11:30 PM


All times are GMT -8. The time now is 02:43 PM.