Altera_Forum
Honored Contributor
9 years agousing the SGDMA (M -> ST) without a NIOS processor
Hi,
I am having a hard time getting thre sgdma to work without the use of a nios processor. What I want to achieve is to read a bunch of data from the SDRAM and push that into a dual clock ST FIFO. So I setup a basic qsys with sdram controller, sgdma, dcstfifo, a custom st sink component to connect the output of the dc st fifo to and a custom component which should control the datatransfer (start it). The st sink component I got working but the other controller is the problem. For that IP I have a mm master -> sgdma csr, two mm slaves -> sgdma read descriptor / write descriptor and a irq receiver -> sgdma interrupt. On the SGDMA I enabled bursting, set read burstcount signal length of 4 (I want to transfer 800 bytes (400 32 bit words)) and datawidth to 32 bits, error width is 0. So what I do is I first initialize the sgdma by writing to the control register with the mm master. Address = 4 I set the bits of IE_DESCRIPTOR_COMPLETED, IE_GLOBAL, PARK, CLEAR_INTERRUPT so it should be NOT running, generate a interrupt when a descriptor has been completed, NOT modify the owned by hwbit, and it should stop after one descriptor has been completed. If I want to start a transfer I write again to the control register: Address = 4 I set the bits of IE_DESCRIPTOR_COMPLETED, IE_GLOBAL, RUN, PARK So now I was expecting to see a read request on one of the mm slaves for the read descriptor but nothing is happening, I can read back the status register of the sgdma but it is always 00000000. Can someone please give me hint what I am doing wrong? ... I am really surprised that I have such a hard time understanding the documentation of the QSYS / Avalon stuff and getting it to run because before all this I was working with mikrocontrollers for years and I ate datasheets for breakfast and was always able to pull off what I wanted to do... What I figured is that I would just need 1 dma descriptor because I want to read always the same amount of bytes just from a different starting address. (Pixel Line Buffer) So I do not want to use onchip memmory or something like that to store the descriptors in but to generate them on the fly with the mm slaves when they are needed.