Forum Discussion
Reading from On-Chip FIFO does not consumes data
- 3 years ago
According to this, you've got your addresses swapped in your read command:
The FIFO output (the agent interface) should be listed first and the CSR interface should be listed second.
I guess I'm missing some important details about the functionality of this FIFO of NiosII. For me as a client, what I understand of a FIFO is: I will read a value from the fifo (the oldest that arrived to the FIFO), and under the table the FIFO will pop that value, and advance to next available value. Me as a client wont care about, checking is there is a new value to point to, advancing the write/read head of the FIFO, handling cases like trying to write when the FIFO is full, etc.
Or in this case, should all this be handled by the client by software? (In that case whats the FIFO here, just an array?)
On the other hand, do you know any code examples avilable on how to reading/writing data to FIFOs by software on the NiosII? The only example I have found is for the initialization (https://www.intel.com/content/www/us/en/docs/programmable/683130/22-1/software-example.html).