Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

SGDMA questions

Hi,

I read the SGDMA documentation, but couldn't come to any resolution.

What is the exact difference between PARK mode and RUN mode, beside setting the OWNED_BY_HW bit? I can only seem to get the controller to run when I set it to PARK mode. The descriptor list is set up in a circular fashion (last points to first).

I want the SGDMA controller to continuously loop, but want to occasionaly change the read addresses to a new value. What is the safest/most effective way of doing this?

Thanks,

Mike

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    With park mode turned off the SGDMA flips the owned by hardware bit to 0 in the descriptor after the transfer is complete. This doesn't happen when you have park mode enabled.

    So if you loop the descriptor list back on itself with park mode enabled the SGDMA will continuously keep re-using those descriptors. With park mode off you would hit the last descriptor, the SGDMA would then loop back to the beginning of the list but it's waiting for the owned by hardware bit to be set.

    For what you are doing you can have two descriptor lists. One using park mode to keep looping the same transfers and the second with the next loop you want to use. Then when you are ready to switch turn park off and program the SGDMA to use the 2nd list. You can then ping-pong back and forth. My explanation assumes you are using the SGDMA for something video related so when I say 'loop' I'm talking about a chain of descriptor that form a frame buffer. The 2nd list is just the offscreen frame buffer that will be displayed next.

    If you want to get early access to a new SGDMA I'm working on send me a PM with your email and I can send it over. It doesn't have the 16kB transfer length limitation and the park mode is much easier to use. I'm still writing the documentation for it but it should be easy enough to use that you won't need it. I was planning on creating a video display demo on the NEEK board but I'm not sure when I'll get around to doing that.

    - JCJB