Forum Discussion

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

DMA vs MM templates

The goal is for the nios needs to transmit short bursts of data (512bits) from sdram to an ip block every 50 usec.

Probably tons of ways to do this, but I figure one way would be for the ip block to instantiate 512bits of ram to store the incoming data, as well as a mm slave template for access to the avalon bus.. the nios could then command a transfer from sd to the ip block.

However, would a dma be more effective? For example, could a dma controller write directly from sdram to an ipblock (not on the avalon bus)?

Is there a better way to do this?

2 Replies

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

    The Nios CPU would need to do 16 32-bit transfers to write 512 bits to your IP, and this doesn't seem a lot to do it every 50 us.

    You could use a DMA too. A SGDMA component, as an example, could transfer the data to your IP block through an Avalon Stream interface. But if the DMA needs to read your main RAM at a different location each time, I think that the time to fill the DMA descriptor will take some time too, and I'm not sure that you'll gain a lot.