Forum Discussion

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

Using Avalon ST packet transfer with SGDMA

Hi,

I am creating a component between custom hardware and the SGDMA controller. The descriptors of the SGDMA are setup to transfer a large number of bytes at a time (24000 bytes) from the custom hardware to a ddr2 memory stick.

My question is regarding the the way in which to communicate from the custom component to the SGDMA controller using the Avalon Streaming Interface. The Streaming interface requires packet transfer, so I need to have the start-of-packet and end-of-packet signals in the component. But the SGDMA descriptor specifies a set transfer length (24000 bytes for each descriptor).

In the component, if I set the end-of-packet signal before the total number of bytes (24000) for a transfer has been sent, does that terminate the transfer? Or will the SGDMA continue the same transfer at the next start-of-packet until the total number of bytes are transfered?

Could I, say, use small packets of 64 bytes to transfer the total 24000 bytes? What would the burst length be?

Also, do I need to use a burst transfer?

Thanks for your help!

2 Replies

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

    You have two options, packet and non-packet transfers. For non-packet transfers you specify the transfer length. Packet transfers rely on the EOP signal to tell the DMA that the transfer is complete. For ST-->MM this will be controlled by the streaming component connected to the SGDMA. For MM-->ST it's up to you to set the SOP and EOP bits because you have to tell the DMA how much data is in the packet and also let it know that you want the SOP and EOP bits to be controlled in hardware.

    Now if you are always moving 24000 bytes at a time and don't need packet support as a result you can just not use it. The maximum burst length should be set to whatever the memory uses (or other bursting IP in your system). DDR2 SDRAM in full rate mode uses an Avalon-MM burst length of 2 and in halfrate mode it doesn't burst on the Avalon side. As a result you should either choose an SGDMA max burst length of 2 or non-bursting depending on what you need.