1, the order of the driving function given by Nios is generally 1, the clear interrupt 2, write control register, 3, write the parameter Register 4, interrupt registration, 5, start to work. Since the start of the work control bit in the control register, so you will think of the last piece to write, easy, but in the DMA test found that the copy of the data at the beginning of a number of 0, and copy is not complete. The problem disappears when you separate the write control register from the starting work.
2, Interrupt registration needs: 1, interrupt the controller ID, I found that is not 0 is -1,0 is the interrupt of the peripheral interrupt controller id,-1 is a non-disruptive peripheral interrupt Controller id,2, interrupt number, 3, interrupt processing function, 4, the parameters passed to the interrupt function, can be null,5, reserved, is usually 0x00;
3, when adding DMA to the soft core, it is important to note that the DMA has a special readdata and WriteData line that needs to be connected to a read-write storage device.
A little sentiment in Niosii DMA experiment