Forum Discussion

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

PERIPHERAL

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

Thanks again.

3 Replies

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

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

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

    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.