Altera_Forum
Honored Contributor
14 years agoA problem with on-chip FIFO memory and NIOS II
Hi there,
I am pretty new to NIOS II, but used to work hard in the previous months :) I stumbled upon a strange behaviour with the On-chip FIFO memory. Namely, I have, as a tryout, a system containg a single clock on-chip FIFO (MM to ST) and an SGDMA (stream to memory). Although the both APIs seem to be quite clear and easy-to-use, I cannot seem to get it working. The first thing is that when I write to an empty FIFO, it seems as if the data is instantaneously lost for the first four writes. The Empty interrupt is generated as if something reads out the FIFO, althoug the SGDMA has not been set up yet. On the 5th successive write the FIFO level becomes 1 and so on until it overflows. Once the SGDMA is set up, it does not read out FIFO too... I am pretty sure the hw has been set up well. Just in case: FIFO: Backpressure on (for the sake of the SGDMA) Bits per symbol 8 Symbols per beat 4 Error width 0 Channel width 0 Packet data enabled (for the sake of the SGDMA) SGDMA: Enable bursting on descriptor read master OFF Allw unaligned transfers OFF Enable burst transfers OFF Data width 32 Error widths (both) 0