Forum Discussion
3 Replies
- Altera_Forum
Honored 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's in the <nios2_install_dir>/components/altera_avalon_pio/inc/altera_avalon_pio_regs.h file. Also, I'd be curious to know why you didn't use the Component Editor...that is, of course, if you'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'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
Honored Contributor
Thanks slacker, I'll take a look at that. What about loading the FIFO from DMA (from SDRAM)? Is that possible?
- Altera_Forum
Honored Contributor
Yes, your SDRAM would be an incrementing address, and you would have the destination a fixed address. I haven't done this before but have seen it documented under the Nios II literature section on the Altera site.