Forum Discussion
Altera_Forum
Honored Contributor
12 years agoI take a look at your C code and I understand what u're trying to do. Read a byte on each interrupt, but the overhead slow down the performance. A hardware solution is the right way. I don't know how to use DMA component of Nios, too.
If you have SRAM in your system ( not SDRAM, SRAM ), you can implement a simple state machine that when it is triggered acquires de sample, store them in RAM and when finishes make it know to the nios processor. The nios can interface with the SRAM ( to read the samples ) with IO ports. This is not an elegant solution but it should work. You can make it with a SDRAM, too, but it is harder. How many byte are you storing in SDRAM?