- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, in order to improve the performance, I hope use the Nios DMA (Not Nios II) module to increase the transfer speed. But now I don't know how to use it. I simply use its subroutine on my original circuit, but it does not work. So, can anybody send a simple exaple to me?? Thus, let me understand the design method of DMA module between the software and the hardware. And I will very appreciate your kindness. Thanks.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why not NIOS2 ?
I where made DMA to speed up transfer between 2 memory's using nios2 and it not very dificault And i use HAL for that I can give examle to you if it's exactly that what you want.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is soft for using DMA on NIOS2
void memcpy_my(int *where,int * from,int howmurch) { while ((IORD_ALTERA_AVALON_DMA_STATUS(WR_DMA_BASE) & ALTERA_AVALON_DMA_STATUS_BUSY_MSK)); IOWR_ALTERA_AVALON_DMA_CONTROL(WR_DMA_BASE,0); IOWR_ALTERA_AVALON_DMA_STATUS(WR_DMA_BASE, 0); IOWR_ALTERA_AVALON_DMA_LENGTH(WR_DMA_BASE, howmurch); IOWR_ALTERA_AVALON_DMA_RADDRESS(WR_DMA_BASE, from); IOWR_ALTERA_AVALON_DMA_WADDRESS(WR_DMA_BASE, where); IOWR_ALTERA_AVALON_DMA_CONTROL(WR_DMA_BASE,ALTERA_AVALON_DMA_CONTROL_GO_MSK | ALTERA_AVALON_DMA_CONTROL_BYTE_MSK| ALTERA_AVALON_DMA_CONTROL_WEEN_MSK| ALTERA_AVALON_DMA_CONTROL_LEEN_MSK); while ((IORD_ALTERA_AVALON_DMA_STATUS(WR_DMA_BASE) & ALTERA_AVALON_DMA_STATUS_BUSY_MSK));# ifdef DEBUG printf("\nDMA packet\nfrom 0x%x\nwhere - 0x%x\nhowmurch - %d",from,where,howmurch); short status=0;# endif }- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But what headers are required ? Does it work under uClinux (I have read this (http://www.altera.com/literature/hb/nios2/n2sw_nii52010.pdf), is it enough ?) ? Do I have to use nios-ide ? Can I use only the nios2-toolchain ? Sorry for the many question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I'm trying to use NIOS2 DMA too, but actually I have to transfer data to/from an external device from/to my NIOS2 cpu. Please, what's your impression on this, does anyone have some suggestion to me in the architecture definition? I should have some kind of input/output device to connect to the dma avalon master, maybe a PIO? and how to manage FLOW control trough the PIO, for DMA and my external device? Thanks a Lot Massy
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page