Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21611 Discussions

SG-DMA descriptor chain not working.

Altera_Forum
Honored Contributor II
1,543 Views

Hi everyone, 

I'm doing SG-DMA for streaming data to LCD. 

This is how I do, 

 

SG-DMA memory-to-stream SOPC connection. 

descriptor read and write-->DDR-SDRAM 

read data -->DDR-SDRAM 

 

created descriptor using malloc. 

 

descriptor 0: 

current descriptor pointer: descriptor[0]  

next descriptor pointer: descriptor[1] 

SOP(start of package) = 1 

EOP(end of package) = 0 

 

descriptor 1: 

current descriptor pointer: descriptor[1]  

next descriptor pointer: descriptor[0] 

SOP(start of package) = 0 

EOP(end of package) = 1 

 

PARK MODE ENABLE 

 

so this configuration should introduce a loop chain for the descriptor. However its not working unless i put the loop only inside 1 descriptor(current descriptor pointer: descriptor[0]  

next descriptor pointer: descriptor[0]). 

 

I just want to make the data stream continuous base on this 2 descriptor. Is it I lost something?? 

 

Thanks for any reply. :o
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
531 Views

Additional info from my question: 

 

descriptor(0) 

current_descriptor : descriptor[0] 

next_descriptor : descriptor[1] 

 

descriptor(1) 

current_descriptor : descriptor[1] 

next_descriptor : descriptor[2] 

 

descriptor(2) 

current_descriptor : descriptor[2] 

next_descriptor : descriptor[2] 

 

*if I create descriptor above, the data keep looping sending descriptor(2), 

*if I change next_descriptor(2) like below to get a loop, 

 

descriptor(2) 

current_descriptor : descriptor[2] 

next_descriptor : descriptor[0] 

 

*this one will cause the sgdma stop sending continuous data stream. 

 

:confused:
0 Kudos
Altera_Forum
Honored Contributor II
531 Views

additional info: 

DDR(150MHz) -> SG-DMA (100MHz) -> VSYNC DRIVER(100MHz) 

SGDMA send 32bits,RGB converter convert it to 24 bits per 1 cycle, and the sync driver covert the 24 bits and send 8 bits for 3 times.
0 Kudos
Altera_Forum
Honored Contributor II
531 Views

Are you using the default SGDMA (which is "kinda funky"...nice way to put it) or the one described here? 

 

http://www.altera.com/support/examples/nios2/exm-modular-scatter-gather-dma.html 

 

Use the latter and you'll be happier....even if you have to bit-bang the driver for it. 

 

Regards, 

 

slacker
0 Kudos
Reply