Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

PERIPHERAL

Altera_Forum
Honored Contributor II
917 Views

Can I use the DMA to load a FIFO? If so, how would I go about that?  

 

Thanks again.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
230 Views

Look at the sample components, included with your Nios II installation. In particular, I would start by looking at the altera_avalon_pio component.  

 

The altera_avalon_pio_regs.h file is a pretty good starting point for anyone wanting to write "HAL"-compliant register headers. It&#39;s in the <nios2_install_dir>/components/altera_avalon_pio/inc/altera_avalon_pio_regs.h file. 

 

Also, I&#39;d be curious to know why you didn&#39;t use the Component Editor...that is, of course, if you&#39;re using the 1.1 version of the Nios II kit. 

 

The "0" does represent an offset. 0 would be offset zero from the address, as you entered below, and "1" would be offset 0x4 from the address you entered. You&#39;ll get a good idea, of how this works, if you have a look at the _pio_regs.h file, I mentioned earlier. 

 

Cheers, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
230 Views

Thanks slacker, I&#39;ll take a look at that. What about loading the FIFO from DMA (from SDRAM)? Is that possible?

0 Kudos
Altera_Forum
Honored Contributor II
230 Views

Yes, your SDRAM would be an incrementing address, and you would have the destination a fixed address. I haven&#39;t done this before but have seen it documented under the Nios II literature section on the Altera site.

0 Kudos
Reply